| Previous | 15994 Revisions | Next |
| r15083 Thursday 3rd May, 2012 at 11:51:16 UTC by Miodrag Milanović |
|---|
| Sync with MAME r16169 (no whatsnew) |
| [ROOT] | makefile |
| [src/emu] | crsshair.c devcb.c devcb.h device.c device.h driver.c driver.h emu.h info.c ioport.c ioport.h machine.c memory.c rendlay.c screen.c screen.h ui.c uiinput.c uimain.c uimain.h uimenu.c validity.c validity.h |
| [src/emu/cpu/m68000] | m68000.h m68kcpu.c |
| [src/emu/machine] | generic.c i8155.c jvsdev.c microtch.c |
| [src/emu/sound] | disc_cls.h disc_inp.c |
| [src/emu/video] | pc_cga.c |
| [src/ldplayer] | ldplayer.c |
| [src/mame] | mame.lst mame.mak |
| [src/mame/audio] | 8080bw.c atarijsa.c cchasm.c cyberbal.c harddriv.c mario.c micro3d.c midway.c mw8080bw.c suna8.c |
| [src/mame/drivers] | 2mindril.c 30test.c 39in1.c 3do.c 40love.c 5clown.c 8080bw.c ace.c acefruit.c acommand.c actfancr.c adp.c aeroboto.c airbustr.c albazg.c aleck64.c alg.c alpha68k.c ampoker2.c amspdwy.c angelkds.c aquarium.c arabian.c arcadecl.c aristmk4.c aristmk5.c arkanoid.c armedf.c artmagic.c asterix.c asteroid.c astinvad.c astrafr.c astrocde.c astrocorp.c astrof.c asuka.c atarifb.c atarig1.c atarig42.c atarigt.c atarigx2.c atarisy1.c atarisy2.c atarisy4.c ataxx.c atetris.c attckufo.c avalnche.c aztarac.c backfire.c badlands.c bagman.c balsente.c baraduke.c batman.c battlane.c battlera.c bbusters.c beaminv.c beathead.c berzerk.c bfcobra.c bfm_sc1.c bfm_sc2.c bfm_sc4h.c bfm_swp.c big10.c bigevglf.c bionicc.c bladestl.c blitz.c blitz68k.c blktiger.c blmbycar.c blockade.c bloodbro.c blstroid.c bmcbowl.c bmcpokr.c bnstars.c bogeyman.c boogwing.c boxer.c brkthru.c bsktball.c btime.c bwidow.c bwing.c byvid.c bzone.c cabal.c calchase.c calomega.c canyon.c capbowl.c cave.c cb2001.c cbasebal.c cbuster.c ccastles.c cchance.c cd32.c cdi.c centiped.c cesclass.c cham24.c champbwl.c chanbara.c chance32.c* changela.c chinagat.c chinsan.c chqflag.c cinemat.c circus.c cischeat.c citycon.c clayshoo.c cliffhgr.c cloak.c cloud9.c clshroad.c cmmb.c cninja.c cntsteer.c combatsc.c compgolf.c coolpool.c cop01.c copsnrob.c corona.c cosmic.c cps1.c cps2.c cps3.c crbaloon.c crgolf.c crshrace.c crystal.c cshooter.c csplayh5.c cubeqst.c cvs.c cyberbal.c cybertnk.c dai3wksi.c dambustr.c darius.c darkhors.c darkseal.c dassault.c dblewing.c dcheese.c dday.c ddealer.c ddenlovr.c ddragon.c ddragon3.c deadang.c dec0.c dec8.c deco156.c deco32.c deco_ld.c deco_mlc.c decocass.c deshoros.c destroyr.c dgpix.c dietgo.c discoboy.c djboy.c djmain.c dkong.c dlair.c dmndrby.c dogfgt.c dooyong.c dragrace.c dribling.c drw80pkr.c dunhuang.c dwarfd.c dynax.c dynduke.c embargo.c enigma2.c eolith.c eolith16.c eprom.c equites.c ertictac.c esd16.c esripsys.c ettrivia.c exerion.c exidy.c exidy440.c exprraid.c exterm.c f-32.c f1gp.c famibox.c fantland.c fcombat.c feversoc.c fgoal.c finalizr.c firebeat.c firefox.c firetrap.c firetrk.c flkatck.c flyball.c foodf.c forte2.c freekick.c fromanc2.c fromance.c funkball.c funkybee.c funkyjet.c fuukifg3.c gaelco2.c gaelco3d.c galaga.c galastrm.c galaxia.c galaxian.c galaxold.c galdrvr.c galivan.c galpani3.c gameplan.c gauntlet.c gcpinbal.c gei.c gijoe.c gladiatr.c go2000.c goal92.c goldnpkr.c goldstar.c gomoku.c goodejan.c gottlieb.c gpworld.c grchamp.c gridlee.c groundfx.c gstream.c gsword.c gticlub.c guab.c gunbustr.c gundealr.c gunpey.c halleys.c hanaawas.c harddriv.c highvdeo.c hitme.c hitpoker.c hnayayoi.c hng64.c homedata.c hornet.c hvyunit.c hyhoo.c icecold.c igs009.c igs011.c igs017.c igspoker.c imolagp.c irobot.c itech32.c itech8.c jack.c jackal.c jackpool.c jaguar.c jalmah.c jangou.c jantotsu.c jchan.c jedi.c jongkyo.c jpmimpct.c jpmsys5.c kaneko16.c karnov.c kas89.c kingdrby.c kingobox.c kinst.c klax.c koikoi.c konamigq.c konamigv.c konamigx.c kongambl.c kopunch.c ksys573.c ladybug.c laserbat.c lastfght.c lazercmd.c leland.c lemmings.c lethal.c lethalj.c liberate.c liberatr.c limenko.c lockon.c looping.c lordgun.c lvcards.c m10.c m107.c m14.c m63.c m72.c m79amb.c macs.c madalien.c madmotor.c magic10.c magicfly.c magtouch.c majorpkr.c malzak.c mappy.c marinedt.c matmania.c maxaflex.c maygay1b.c maygayv1.c mayumi.c mazerbla.c mcatadv.c mcr.c mcr3.c mcr68.c mediagx.c megadrvb.c megasys1.c megatech.c meijinsn.c merit.c meritm.c metlclsh.c metro.c mexico86.c meyc8080.c meyc8088.c mgolf.c midas.c midvunit.c midzeus.c mirage.c mirax.c missile.c mitchell.c mjkjidai.c mjsister.c mlanding.c model1.c model2.c model3.c moo.c mpoker.c mpu3.c mpu4.c mpu4vid.c mpu5.c mquake.c ms32.c msisaac.c mugsmash.c multigam.c mw18w.c mw8080bw.c mwarr.c mystston.c mystwarr.c namcofl.c namcona1.c namconb1.c namcos1.c namcos10.c namcos11.c namcos12.c namcos21.c namcos22.c namcos23.c namcos86.c naomi.c naughtyb.c nbmj8688.c nbmj8891.c nbmj8900.c nbmj8991.c nbmj9195.c nemesis.c neodrvr.c neogeo.c nexus3d.c nightgal.c ninjakd2.c nitedrvr.c niyanpai.c nmg5.c nmk16.c nova2001.c nwk-tr.c nycaptor.c nyny.c offtwall.c ojankohs.c omegrace.c oneshot.c onetwo.c opwolf.c orbit.c othldrby.c othunder.c overdriv.c pachifev.c pacland.c pacman.c paradise.c pastelg.c pcat_nit.c pcxt.c pengadvb.c peplus.c peyper.c pgm.c phoenix.c pingpong.c pinkiri8.c pipedrm.c pktgaldx.c playch10.c playmark.c pluto5.c plygonet.c pntnpuzl.c polepos.c polyplay.c poolshrk.c popeye.c popper.c powerbal.c prehisle.c progolf.c psikyo.c psikyo4.c psikyosh.c pushman.c pzletime.c qdrmfgp.c quantum.c quasar.c quizpani.c raiden.c rainbow.c rallyx.c rampart.c re900.c realbrk.c redalert.c redclash.c relief.c renegade.c rltennis.c rmhaihai.c rohga.c rollrace.c route16.c royalmah.c rpunch.c runaway.c rungun.c safarir.c saturn.c sbowling.c sbrkout.c scobra.c scramble.c scregg.c sderby.c seattle.c segac2.c segae.c segag80r.c segag80v.c segahang.c segaorun.c segas16a.c segas16b.c segas18.c segas24.c segas32.c segaxbd.c segaybd.c seibuspi.c seicross.c sengokmj.c senjyo.c seta.c seta2.c sf.c sfbonus.c sfkick.c shadfrce.c shangha3.c shangkid.c shisen.c shootout.c shuuz.c sidearms.c sigmab98.c simpl156.c skimaxx.c skullxbo.c skydiver.c skyfox.c skykid.c skyraid.c slapshot.c slotcarn.c snesb.c snk.c snk68.c snookr10.c snowbros.c spacefb.c spcforce.c spdodgeb.c speedatk.c spiders.c splash.c splus.c spoker.c spool99.c sprint2.c sprint4.c sprint8.c srmp2.c srmp5.c srmp6.c ssfindo.c sshangha.c ssingles.c ssozumo.c ssrj.c sstrangr.c ssv.c st0016.c stactics.c stadhero.c starfire.c starshp1.c statriv2.c stlforce.c stv.c subs.c subsino2.c suna8.c supbtime.c superchs.c superqix.c suprgolf.c suprnova.c suprridr.c system1.c system16.c tagteam.c tail2nos.c taito_b.c taito_f2.c taito_f3.c taito_h.c taito_l.c taito_o.c taito_x.c taito_z.c taitoair.c taitogn.c taitojc.c taitosj.c tank8.c tankbatt.c tapatune.c tatsumi.c taxidriv.c tceptor.c tecmo.c tecmosys.c tehkanwc.c tempest.c terracre.c tetrisp2.c thayers.c thedeep.c thepit.c thief.c thunderj.c tiamc1.c tickee.c timetrv.c tmaster.c tmmjprd.c tmnt.c tmspoker.c tnzs.c toaplan1.c toaplan2.c tomcat.c toobin.c topspeed.c toratora.c tourtabl.c tourvis.c toypop.c trackfld.c triplhnt.c truco.c tryout.c tugboat.c tumbleb.c tumblep.c tunhunt.c turbo.c twin16.c twincobr.c twinkle.c tx1.c uapce.c ultratnk.c ultrsprt.c undrfire.c unico.c unkhorse.c upscope.c usgames.c vamphalf.c vaportra.c vball.c vcombat.c vegaeo.c vegas.c vendetta.c vicdual.c videopin.c videopkr.c vindictr.c viper.c vmetal.c voyager.c vpoker.c wardner.c warpsped.c warpwarp.c wecleman.c wgp.c williams.c wink.c wiping.c witch.c wolfpack.c wwfwfest.c xexex.c xmen.c xtheball.c xxmissio.c xybots.c xyonix.c yunsung8.c zac2650.c zaccaria.c zaxxon.c zn.c zr107.c |
| [src/mame/includes] | bfm_sc45.h bombjack.h galpnipt.h iremipt.h lockon.h lordgun.h msisaac.h toaplipt.h |
| [src/mame/layout] | awpdmd.lay awpvid14.lay awpvid16.lay bfm_sc1.lay drwho.lay gamball.lay gldarrow.lay* mpu4.lay mpu4ext.lay |
| [src/mame/machine] | acitya.c ajax.c amiga.c arkanoid.c asteroid.c atari.c atarifb.c balsente.c beezer.c bonzeadv.c bsktball.c bublbobl.c carpolo.c cchip.c cdislave.c dc-ctrl.c dec0.c decocass.c decoprot.c gaelco2.c galaxold.c gaplus.c harddriv.c irobot.c jvs13551.c kaneko16.c leland.c lsasquad.c mcr68.c megadriv.c mexico86.c mhavoc.c micro3d.c midtunit.c midwayic.c midwunit.c midxunit.c midyunit.c mie.c n64.c namcos1.c namcos2.c nb1413m3.c nitedrvr.c opwolf.c pcecommn.c pckeybrd.c pgmprot.c pgmprot1.c pgmprot2.c pgmprot4.c pgmprot6.c playch10.c qix.c rainbow.c scramble.c segamsys.c seicop.c simpsons.c slikshot.c smpc.c snes.c starwars.c stfight.c subs.c tait8741.c taitosj.c tatsumi.c tnzs.c toaplan1.c vectrex.c vertigo.c volfied.c vsnes.c williams.c xevious.c |
| [src/mame/video] | aeroboto.c amiga.c argus.c artmagic.c astrocde.c atari.c atarisy1.c balsente.c bking.c blockade.c bombjack.c btime.c bwing.c canyon.c cave.c centiped.c changela.c cinemat.c cischeat.c cosmic.c cps1.c dc.c dcheese.c deco_mlc.c decocass.c dkong.c dooyong.c dynax.c esripsys.c exerion.c exidy.c exidy440.c f1gp.c fgoal.c gomoku.c hyprduel.c itech32.c itech8.c jaguar.c kangaroo.c lazercmd.c lethalj.c lockon.c lordgun.c lwings.c m52.c m57.c m58.c m62.c m72.c m92.c madalien.c mario.c mcatadv.c mcd212.c metro.c model2.c momoko.c mystston.c n8080.c namcos22.c naughtyb.c neogeo.c niyanpai.c nmk16.c oneshot.c opwolf.c orbit.c pgm.c phoenix.c policetr.c prehisle.c psikyo.c psychic5.c route16.c shisen.c snes.c system1.c thepit.c tmnt.c travrusa.c turbo.c tx1.c undrfire.c vectrex.c vertigo.c wecleman.c zac2650.c |
| [src/mess/drivers] | 4004clk.c a2600.c a5105.c a7800.c abc80.c abc80x.c ace.c acrnsys1.c adam.c alphatro.c ami1200.c amico2k.c amiga.c amstr_pc.c amstrad.c apexc.c apf.c aquarius.c argo.c astrocde.c atarist.c atom.c avigo.c b16.c babbage.c bcs3.c beehive.c beta.c bmjr.c bml3.c bob85.c bullet.c busicom.c bw12.c bw2.c c128.c c64.c c65.c c80.c cat.c cbmb.c cfx9850.c channelf.c chessmst.c chesstrv.c coco12.c coco3.c comx35.c cosmicos.c crvision.c csc.c cvicny.c d6800.c dai.c dectalk.c digel804.c dolphin.c eacc.c einstein.c elf.c elwro800.c enterp.c esq1.c et3400.c eti660.c fidelz80.c fk1.c fm7.c fmtowns.c fp1100.c galeb.c gba.c geneve.c gizmondo.c glasgow.c gmaster.c gp32.c h8.c homelab.c homez80.c hp49gp.c huebler.c intv.c iq151.c jr100.c jr200.c juicebox.c junior.c kim1.c kyocera.c lc80.c lcmate2.c lx800.c m5.c mac.c mc10.c mc1000.c mc80.c megadriv.c mekd2.c mephisto.c micronic.c mikromik.c mini2440.c mirage.c mk1.c mk14.c mk2.c mmd1.c mmodular.c mpf1.c mpz80.c mstation.c multi8.c mycom.c mz2000.c mz2500.c n64.c nakajies.c nanos.c nc.c nes.c newbrain.c ng_aes.c ngp.c okean240.c oric.c osbexec.c osi.c palm.c palmz22.c pasogo.c pb1000.c pc.c pc100.c pc1500.c pc1512.c pc2000.c pc4.c pc6001.c pc8401a.c pc8801.c pc88va.c pc9801.c pce.c pce220.c pcw.c pcw16.c pdp1.c pdp11.c pegasus.c pk8000.c plan80.c pmi80.c pockstat.c poly880.c portfoli.c prestige.c pro80.c prof80.c psion.c psx.c ptcsol.c pv1000.c pv2000.c px4.c px8.c pyl601.c ql.c qx10.c rex6000.c rt1715.c rx78.c samcoupe.c savia84.c sc1.c sc2.c scorpion.c scv.c sdk85.c sdk86.c selz80.c sg1000.c sgi_ip2.c slc1.c smc777.c sms.c snes.c socrates.c sorcerer.c spc1000.c spectrum.c ssem.c ssystem3.c studio2.c supercon.c svision.c tec1.c tek405x.c ti89.c ti99_2.c ti99_4p.c ti99_4x.c ti99_8.c tiki100.c tk80bs.c tm990189.c tmc1800.c tmc2000e.c tmc600.c trs80m2.c tsispch.c tutor.c tvc.c tx0.c unior.c v1050.c vboy.c vc4000.c vcs80.c vic10.c vic20.c vidbrain.c vii.c vip.c vixen.c vt100.c vtech1.c wangpc.c x07.c x1.c x68k.c xerox820.c z100.c z1013.c z88.c zrt80.c |
| [src/mess/formats] | z80bin.c |
| [src/mess/includes] | amstr_pc.h coco.h pc1251.h pc1350.h pc1401.h pc1403.h |
| [src/mess/machine] | a2ssc.c a7800.c abc77.c abc800kb.c abc99.c ac1.c advision.c aim65.c amigakbd.c amstr_pc.c amstrad.c apollo.c apollo_kbd.c apple1.c apple2.c apple2gs.c apricotkb.c ay3600.c b2m.c bbc.c bk.c c128.c c16.c c64.c c64_4cga.c c64_4dxh.c c64_4ksa.c c64_4tba.c c64_easyflash.c c64_ide64.c c64_sfx_sound_expander.c c64_sw8k.c c65.c cbm.c cbmb.c cbmipt.c cgenie.c coco.c coco_fdc.c coco_pak.c coleco.c compis.c comx_joy.c comxpl80.c concept.c cybiko.c dai.c dgn_beta.c ecb_grip.c electron.c galaxy.c gamecom.c gamepock.c gb.c genpc.c hec2hrp.c hp48.c intv.c irisha.c isa_gus.c isa_ide.c isa_ide_cd.c isa_sblaster.c jupiter.c kay_kbd.c kb_keytro.c kc_d002.c kc_keyb.c keyboard.c kr2376.c kramermc.c lisa.c llc.c lux10828.c lux21046.c lux4105.c lviv.c lynx.c mac.c macadb.c mbc55x.c mbee.c mboard.c mface2.c microtan.c mikro80.c msx.c mtx.c mz700.c mz80.c nascom1.c nes.c nes_pcb.c nextkbd.c odyssey2.c ondra.c orao.c oric.c osborne1.c p2000t.c pc.c pc1251.c pc1350.c pc1401.c pc1403.c pc1512kb.c pc_joy.c pc_lpt.c pc_turbo.c pce.c pecom.c pet.c pk8020.c pmd85.c pokemini.c poly88.c pp01.c primo.c radio86.c rmnimbus.c s100_dj2db.c s100_mm65k16s.c s100_wunderbus.c samcoupe.c sapi1.c ser_mouse.c sms.c sorcerer.c special.c super80.c svi318.c sym1.c tandy2kb.c terminal.c tf20.c thomflop.c thomson.c ti85.c trs80.c trs80m2kb.c ut88.c v1050kb.c vector06.c vic1110.c victor9kb.c vtech2.c wangpckb.c wswan.c z80ne.c zx.c |
| [src/mess/machine/ti99] | bwg.c datamux.c evpc.c genboard.c gromport.c handset.c hfdc.c horizon.c hsgpl.c mecmouse.c memex.c myarcmem.c p_code.c ti_rs232.c tn_ide.c tn_usbsm.c |
| [src/mess/video] | 733_asr.c 911_vdt.c arcadia.c isa_cga.c isa_ega.c isa_svga_cirrus.c isa_svga_s3.c isa_svga_tseng.c mac.c mbee.c mc6847.h nes.c pc1512.c pc1640.c pc_aga.c ssystem3.c super80.c thomson.c vc4000.c x68k.c |
| [src/osd/sdl] | input.c |
| [src/osd/windows] | debugwin.c input.c windows.mak |
| r15082 | r15083 | |
|---|---|---|
| 206 | 206 | mooncrsto // (c) 1980 Nichibutsu |
| 207 | 207 | mooncrstg // (c) 1980 Gremlin |
| 208 | 208 | mooncrstuk // (c) 1980 Nichibutsu UK |
| 209 | mooncrstuku // (c) 1980 Nichibutsu UK | |
| 209 | 210 | smooncrs // Gremlin |
| 210 | 211 | sstarcrs // Taito (Brazil) |
| 211 | 212 | mooncmw // bootleg |
| r15082 | r15083 | |
| 603 | 604 | wcatcher // (c) 1993 |
| 604 | 605 | jituroku // (c) 1993 Windom |
| 605 | 606 | yosimoto // (c) 1994 Nichibutsu/Yoshimoto Kougyou |
| 607 | yosimotm // (c) 1994 Nichibutsu/Yoshimoto Kougyou | |
| 606 | 608 | psailor1 // (c) 1994 SPHINX |
| 607 | 609 | psailor2 // (c) 1994 SPHINX |
| 608 | 610 | otatidai // (c) 1995 SPHINX |
| r15082 | r15083 | |
| 618 | 620 | mjegolf // (c) 1994 FUJIC/AV JAPAN |
| 619 | 621 | |
| 620 | 622 | mhhonban // (c) 199? |
| 623 | zokumahj // (c) 199? | |
| 621 | 624 | 4psimasy // (c) 1994 |
| 622 | 625 | musobana // (c) 1995 |
| 623 | 626 | niyanpai // (c) 1996 |
| r15082 | r15083 | |
| 10036 | 10039 | gtsers9 // (c) 1984 Greyhound Electronics |
| 10037 | 10040 | gtsers10 // (c) 1984 Greyhound Electronics |
| 10038 | 10041 | gtsers11 // (c) 1984 Greyhound Electronics |
| 10042 | gtsers12 // (c) 1984 Greyhound Electronics | |
| 10043 | gtsers14 // (c) 1984 Greyhound Electronics | |
| 10039 | 10044 | gt103a1 // (c) 1984 Greyhound Electronics |
| 10040 | gt103a2 // (c) 1984 Greyhound Electronics | |
| 10041 | gt103a3 // (c) 1984 Greyhound Electronics | |
| 10042 | 10045 | gt103aa // (c) 1984 Greyhound Electronics |
| 10043 | 10046 | gt103asx // (c) 1984 Greyhound Electronics |
| 10044 | 10047 | reelfun // (c) 1986 Grayhound Electronics |
| r15082 | r15083 | |
| 10567 | 10570 | sb2003a // (c) 2003 Limenko |
| 10568 | 10571 | spotty // (c) 2001 Prince Co. |
| 10569 | 10572 | carrera // (c) 19?? BS Electronics |
| 10573 | chance32 // (c) 19?? PAL Company | |
| 10570 | 10574 | |
| 10571 | 10575 | // Golden Poker / Potten's Poker / Witch Card hardware |
| 10572 | 10576 | goldnpkr // (c) 1981 Bonanza |
| r15082 | r15083 | |
| 10806 | 10810 | ggconnie // (c) ???? Capcom |
| 10807 | 10811 | paranoia // (c) 1990 Naxat Soft |
| 10808 | 10812 | tourvis // (c) ???? Tourvision |
| 10813 | tvlegaxe // (c) 1988 Victor Musical Industries, Inc. (Tourvision bootleg) | |
| 10809 | 10814 | tvusapb // (c) 1989 Aicom (Tourvision bootleg) |
| 10810 | 10815 | tvdunexp // (c) 1989 Hudson / Atlus (Tourvision bootleg) |
| 10811 | 10816 | tvthbld // (c) 1990 Sega / NEC Avenue (Tourvision bootleg) |
| 10812 | 10817 | tvrs2 // (c) 1990 Taito (Tourvision bootleg) |
| 10813 | 10818 | tvpwlg4 // (c) 1991 Hudson (Tourvision bootleg) |
| 10814 | 10819 | tvsci // (c) 1991 Taito (Tourvision bootleg) |
| 10820 | tvsvball // (c) 1990 Video System (Tourvision bootleg) | |
| 10815 | 10821 | vcombat // (c) 1993 VR8 Inc. |
| 10816 | 10822 | shadfgtr // (c) 1993 DUTECH Inc. |
| 10817 | 10823 | skimaxx // (c) 1996 Kyle Hodgetts/ICE |
| r15082 | r15083 | |
| 20076 | 20082 | Bally MPU AS-2518-133 |
| 20077 | 20083 | */ |
| 20078 | 20084 | babypac |
| 20085 | babypac2 | |
| 20079 | 20086 | granny |
| 20080 | 20087 | |
| 20081 | 20088 | // by68701.c |
| r15082 | r15083 | |
|---|---|---|
| 52 | 52 | { |
| 53 | 53 | suna8_state *state = device.machine().driver_data<suna8_state>(); |
| 54 | 54 | running_machine &machine = device.machine(); |
| 55 | int i, len = | |
| 55 | int i, len = sta | |
| 56 | 56 | UINT8 *ROM = state->memregion("samples")->base(); |
| 57 | 57 | |
| 58 | 58 | state->m_samplebuf = auto_alloc_array(machine, INT16, len); |
| r15082 | r15083 | |
|---|---|---|
| 407 | 407 | |
| 408 | 408 | switch (offset) |
| 409 | 409 | { |
| 410 | case 0x01: return (m_sound_port_latch[offset] & 0x7f) | i | |
| 410 | case 0x01: return (m_sound_port_latch[offset] & 0x7f) | iop | |
| 411 | 411 | case 0x03: return (m_sound_port_latch[offset] & 0xf7) | (upd7759_busy_r(machine().device("upd7759")) ? 0x08 : 0); |
| 412 | 412 | default: return 0; |
| 413 | 413 | } |
| r15082 | r15083 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | READ8_MEMBER(cyberbal_state::cyberbal_special_port3_r) |
| 39 | 39 | { |
| 40 | int temp = input_port_read(machine(), "JSAII"); | |
| 41 | if (!(input_port_read(machine(), "IN0") & 0x8000)) temp ^= 0x80; | |
| 40 | int temp = ioport("JSAII")->read(); | |
| 41 | if (!(ioport("IN0")->read() & 0x8000)) temp ^= 0x80; | |
| 42 | 42 | if (m_cpu_to_sound_ready) temp ^= 0x40; |
| 43 | 43 | if (m_sound_to_cpu_ready) temp ^= 0x20; |
| 44 | 44 | return temp; |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | 0x02 = coin 2 |
| 228 | 228 | 0x01 = coin 1 |
| 229 | 229 | */ |
| 230 | result = input_port_read(space->machine(), "JSAI"); | |
| 231 | if (!(input_port_read(space->machine(), test_port) & test_mask)) result ^= 0x80; | |
| 230 | result = space->machine().root_device().ioport("JSAI")->read(); | |
| 231 | if (!(space->machine().root_device().ioport(test_port)->read() & test_mask)) result ^= 0x80; | |
| 232 | 232 | if (atarigen->m_cpu_to_sound_ready) result ^= 0x40; |
| 233 | 233 | if (atarigen->m_sound_to_cpu_ready) result ^= 0x20; |
| 234 | 234 | if ((tms5220 != NULL) && (tms5220_readyq_r(tms5220) == 0)) |
| r15082 | r15083 | |
| 360 | 360 | 0x02 = coin 2 |
| 361 | 361 | 0x01 = coin 1 |
| 362 | 362 | */ |
| 363 | result = input_port_read(space->machine(), "JSAII"); | |
| 364 | if (!(input_port_read(space->machine(), test_port) & test_mask)) result ^= 0x80; | |
| 363 | result = space->machine().root_device().ioport("JSAII")->read(); | |
| 364 | if (!(space->machine().root_device().ioport(test_port)->read() & test_mask)) result ^= 0x80; | |
| 365 | 365 | if (atarigen->m_cpu_to_sound_ready) result ^= 0x40; |
| 366 | 366 | if (atarigen->m_sound_to_cpu_ready) result ^= 0x20; |
| 367 | 367 | break; |
| r15082 | r15083 | |
| 483 | 483 | 0x02 = coin L (active high) |
| 484 | 484 | 0x01 = coin R (active high) |
| 485 | 485 | */ |
| 486 | result = input_port_read(space->machine(), "JSAIII"); | |
| 487 | if (!(input_port_read(space->machine(), test_port) & test_mask)) result ^= 0x90; | |
| 486 | result = space->machine().root_device().ioport("JSAIII")->read(); | |
| 487 | if (!(space->machine().root_device().ioport(test_port)->read() & test_mask)) result ^= 0x90; | |
| 488 | 488 | if (atarigen->m_cpu_to_sound_ready) result ^= 0x40; |
| 489 | 489 | if (atarigen->m_sound_to_cpu_ready) result ^= 0x20; |
| 490 | 490 | break; |
| r15082 | r15083 | |
| 617 | 617 | 0x02 = coin L (active high) |
| 618 | 618 | 0x01 = coin R (active high) |
| 619 | 619 | */ |
| 620 | result = input_port_read(space->machine(), "JSAIII"); | |
| 621 | if (!(input_port_read(space->machine(), test_port) & test_mask)) result ^= 0x90; | |
| 620 | result = space->machine().root_device().ioport("JSAIII")->read(); | |
| 621 | if (!(space->machine().root_device().ioport(test_port)->read() & test_mask)) result ^= 0x90; | |
| 622 | 622 | if (atarigen->m_cpu_to_sound_ready) result ^= 0x40; |
| 623 | 623 | if (atarigen->m_sound_to_cpu_ready) result ^= 0x20; |
| 624 | 624 | break; |
| r15082 | r15083 | |
|---|---|---|
| 865 | 865 | m_schaser_background_disable = (data >> 3) & 0x01; |
| 866 | 866 | m_schaser_background_select = (data >> 4) & 0x01; |
| 867 | 867 | |
| 868 | m_c8080bw_flip_screen = (data & 0x20) && (i | |
| 868 | m_c8080bw_flip_screen = (data & 0x20) && (iop | |
| 869 | 869 | |
| 870 | 870 | m_port_2_last_extra = data; |
| 871 | 871 | } |
| r15082 | r15083 | |
| 1032 | 1032 | |
| 1033 | 1033 | m_color_map = data & 0x40; |
| 1034 | 1034 | |
| 1035 | m_c8080bw_flip_screen = (data & 0x20) && (i | |
| 1035 | m_c8080bw_flip_screen = (data & 0x20) && (iop | |
| 1036 | 1036 | |
| 1037 | 1037 | m_port_2_last_extra = data; |
| 1038 | 1038 | } |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | READ8_MEMBER(cchasm_state::cchasm_coin_sound_r) |
| 34 | 34 | { |
| 35 | UINT8 coin = (i | |
| 35 | UINT8 coin = (iop | |
| 36 | 36 | return m_sound_flags | (m_coin_flag << 3) | coin; |
| 37 | 37 | } |
| 38 | 38 | |
| r15082 | r15083 | |
| 85 | 85 | m_sound_flags &= ~0x40; |
| 86 | 86 | return soundlatch4_byte_r(space,offset) << 8; |
| 87 | 87 | case 0x2: |
| 88 | return (m_sound_flags| (i | |
| 88 | return (m_sound_flags| (iop | |
| 89 | 89 | case 0x5: |
| 90 | return i | |
| 90 | return iop | |
| 91 | 91 | case 0x8: |
| 92 | return i | |
| 92 | return iop | |
| 93 | 93 | default: |
| 94 | 94 | return 0xff << 8; |
| 95 | 95 | } |
| r15082 | r15083 | |
|---|---|---|
| 144 | 144 | { |
| 145 | 145 | static const char *const port[] = { "IP0", "IP1", "IP2", "IP3", "IP4" }; |
| 146 | 146 | astring tempstr; |
| 147 | UINT8 result = i | |
| 147 | UINT8 result = iop | |
| 148 | 148 | if (!m_custom_input[offset].isnull()) |
| 149 | 149 | result = (result & ~m_custom_input_mask[offset]) | |
| 150 | 150 | (m_custom_input[offset](space, offset, 0xff) & m_custom_input_mask[offset]); |
| r15082 | r15083 | |
|---|---|---|
| 144 | 144 | // D13 = Test Switch |
| 145 | 145 | // D12 = 5220 Ready Flag (0=Ready) |
| 146 | 146 | logerror("%06X:hdsnd68k_status_r(%04X)\n", cpu_get_previouspc(&space.device()), offset); |
| 147 | return (m_mainflag << 15) | (m_soundflag << 14) | 0x2000 | 0;//((i | |
| 147 | return (m_mainflag << 15) | (m_soundflag << 14) | 0x2000 | 0;//((iop | |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 |
| r15082 | r15083 | |
|---|---|---|
| 416 | 416 | mario_state *state = machine.driver_data<mario_state>(); |
| 417 | 417 | device_t *audiocpu = machine.device("audiocpu"); |
| 418 | 418 | #if USE_8039 |
| 419 | UINT8 *SND = | |
| 419 | UINT8 *SND = sta | |
| 420 | 420 | |
| 421 | 421 | SND[0x1001] = 0x01; |
| 422 | 422 | #endif |
| r15082 | r15083 | |
| 426 | 426 | { |
| 427 | 427 | state->m_eabank = "bank1"; |
| 428 | 428 | audiocpu->memory().space(AS_PROGRAM)->install_read_bank(0x000, 0x7ff, "bank1"); |
| 429 | state->membank("bank1")->configure_entry(0, | |
| 429 | state->membank("bank1")->configure_entry(0, sta | |
| 430 | 430 | state->membank("bank1")->configure_entry(1, state->memregion("audiocpu")->base() + 0x1000); |
| 431 | 431 | } |
| 432 | 432 |
| r15082 | r15083 | |
|---|---|---|
| 575 | 575 | void maze_write_discrete(device_t *device, UINT8 maze_tone_timing_state) |
| 576 | 576 | { |
| 577 | 577 | /* controls need to be active low */ |
| 578 | int controls = ~ | |
| 578 | int controls = ~ | |
| 579 | 579 | |
| 580 | 580 | discrete_sound_w(device, MAZE_TONE_TIMING, maze_tone_timing_state); |
| 581 | 581 | discrete_sound_w(device, MAZE_P1_DATA, controls & 0x0f); |
| r15082 | r15083 | |
| 587 | 587 | /* A better option might be to update it at vblank or set a timer to do it. */ |
| 588 | 588 | /* The only noticeable difference doing it here, is that the controls don't */ |
| 589 | 589 | /* immediately start making tones if pressed right after the coin is inserted. */ |
| 590 | discrete_sound_w(device, MAZE_COIN, (~ | |
| 590 | discrete_sound_w(device, MAZE_COIN, (~ | |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | 593 |
| r15082 | r15083 | |
|---|---|---|
| 761 | 761 | coin_counter_w(machine, 1, state->m_CRAM[0][8] & 0x20); |
| 762 | 762 | coin_counter_w(machine, 0, state->m_CRAM[0][8] & 0x10); |
| 763 | 763 | |
| 764 | state->m_CRAM[0][3] = input_port_read(machine, "800007"); /* STARTn + SERVICE1 */ | |
| 765 | state->m_CRAM[0][4] = input_port_read(machine, "800009"); /* COINn */ | |
| 766 | state->m_CRAM[0][5] = input_port_read(machine, "80000B"); /* Player controls + TILT */ | |
| 767 | state->m_CRAM[0][6] = input_port_read(machine, "80000D"); /* Player controls (cocktail) */ | |
| 764 | state->m_CRAM[0][3] = machine.root_device().ioport("800007")->read(); /* STARTn + SERVICE1 */ | |
| 765 | state->m_CRAM[0][4] = machine.root_device().ioport("800009")->read(); /* COINn */ | |
| 766 | state->m_CRAM[0][5] = machine.root_device().ioport("80000B")->read(); /* Player controls + TILT */ | |
| 767 | state->m_CRAM[0][6] = machine.root_device().ioport("80000D")->read(); /* Player controls (cocktail) */ | |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | /************************************* |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | switch ( offset ) |
| 175 | 175 | { |
| 176 | 176 | default: |
| 177 | case 0: return ~BITSWAP8(input_port_read(space->machine(), "IN0H"),7,6,5,4,2,3,1,0); | |
| 178 | case 1: return ~input_port_read(space->machine(), "IN1L"); | |
| 179 | case 2: return ~input_port_read(space->machine(), "IN1H"); | |
| 180 | case 3: return ~input_port_read(space->machine(), "IN0L"); | |
| 177 | case 0: return ~BITSWAP8(space->machine().root_device().ioport("IN0H")->read(),7,6,5,4,2,3,1,0); | |
| 178 | case 1: return ~space->machine().root_device().ioport("IN1L")->read(); | |
| 179 | case 2: return ~space->machine().root_device().ioport("IN1H")->read(); | |
| 180 | case 3: return ~space->machine().root_device().ioport("IN0L")->read(); | |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 |
| r15082 | r15083 | |
|---|---|---|
| 185 | 185 | { |
| 186 | 186 | |
| 187 | 187 | //logerror("%04x: 6801U4 port 1 read\n", cpu_get_pc(&space.device())); |
| 188 | m_port1_in = i | |
| 188 | m_port1_in = iop | |
| 189 | 189 | return (m_port1_out & m_ddr1) | (m_port1_in & ~m_ddr1); |
| 190 | 190 | } |
| 191 | 191 | |
| r15082 | r15083 | |
| 236 | 236 | { |
| 237 | 237 | // read |
| 238 | 238 | if ((address & 0x0800) == 0x0000) |
| 239 | m_port3_in = i | |
| 239 | m_port3_in = iop | |
| 240 | 240 | else if ((address & 0x0c00) == 0x0c00) |
| 241 | 241 | m_port3_in = m_mcu_sharedram[address & 0x03ff]; |
| 242 | 242 | // logerror("reading %02x from shared RAM %04x\n", m_port3_in, address); |
| r15082 | r15083 | |
| 448 | 448 | if ((m_address & 0x0800) == 0x0000) |
| 449 | 449 | { |
| 450 | 450 | //logerror("%04x: 68705 read input port %02x\n", cpu_get_pc(&space.device()), m_address); |
| 451 | m_latch = i | |
| 451 | m_latch = iop | |
| 452 | 452 | } |
| 453 | 453 | else if ((m_address & 0x0c00) == 0x0c00) |
| 454 | 454 | { |
| r15082 | r15083 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | switch (m_input_select & 0x0f) |
| 45 | 45 | { |
| 46 | case 0x0a: data = input_port_read(machine(), "IN2"); break; | |
| 47 | case 0x0c: data = input_port_read(machine(), "IN0"); break; | |
| 48 | case 0x0d: data = input_port_read(machine(), "IN1"); break; | |
| 46 | case 0x0a: data = ioport("IN2")->read(); break; | |
| 47 | case 0x0c: data = ioport("IN0")->read(); break; | |
| 48 | case 0x0d: data = ioport("IN1")->read(); break; | |
| 49 | 49 | default: data = 0xff; break; |
| 50 | 50 | } |
| 51 | 51 | |
| r15082 | r15083 | |
| 56 | 56 | |
| 57 | 57 | READ8_MEMBER(tnzs_state::tnzs_port2_r) |
| 58 | 58 | { |
| 59 | int data = i | |
| 59 | int data = iop | |
| 60 | 60 | |
| 61 | 61 | // logerror("I8742:%04x Read %02x from port 2\n", cpu_get_previouspc(&space.device()), data); |
| 62 | 62 | |
| r15082 | r15083 | |
| 83 | 83 | |
| 84 | 84 | // logerror("PC %04x: read input %04x\n", cpu_get_pc(&space.device()), 0xf000 + offset); |
| 85 | 85 | |
| 86 | val = i | |
| 86 | val = iop | |
| 87 | 87 | if (offset & 1) |
| 88 | 88 | return ((val >> 8) & 0xff); |
| 89 | 89 | else |
| r15082 | r15083 | |
| 214 | 214 | } |
| 215 | 215 | else return m_mcu_credits; |
| 216 | 216 | } |
| 217 | else return i | |
| 217 | else return iop | |
| 218 | 218 | |
| 219 | 219 | default: |
| 220 | 220 | logerror("error, unknown mcu command\n"); |
| r15082 | r15083 | |
| 306 | 306 | switch (m_mcu_command) |
| 307 | 307 | { |
| 308 | 308 | case 0x01: |
| 309 | return i | |
| 309 | return iop | |
| 310 | 310 | |
| 311 | 311 | case 0x02: |
| 312 | return i | |
| 312 | return iop | |
| 313 | 313 | |
| 314 | 314 | case 0x1a: |
| 315 | return (i | |
| 315 | return (iop | |
| 316 | 316 | |
| 317 | 317 | case 0x21: |
| 318 | return i | |
| 318 | return iop | |
| 319 | 319 | |
| 320 | 320 | case 0x41: |
| 321 | 321 | return m_mcu_credits; |
| r15082 | r15083 | |
| 343 | 343 | else return m_mcu_credits; |
| 344 | 344 | } |
| 345 | 345 | /* buttons */ |
| 346 | else return ((i | |
| 346 | else return ((iop | |
| 347 | 347 | |
| 348 | 348 | default: |
| 349 | 349 | logerror("error, unknown mcu command\n"); |
| r15082 | r15083 | |
| 610 | 610 | case MCU_DRTOPPEL: |
| 611 | 611 | case MCU_PLUMPOP: |
| 612 | 612 | coin = 0; |
| 613 | coin |= ((input_port_read(device->machine(), "COIN1") & 1) << 0); | |
| 614 | coin |= ((input_port_read(device->machine(), "COIN2") & 1) << 1); | |
| 615 | coin |= ((input_port_read(device->machine(), "IN2") & 3) << 2); | |
| 613 | coin |= ((state->ioport("COIN1")->read() & 1) << 0); | |
| 614 | coin |= ((state->ioport("COIN2")->read() & 1) << 1); | |
| 615 | coin |= ((state->ioport("IN2")->read() & 3) << 2); | |
| 616 | 616 | coin ^= 0x0c; |
| 617 | 617 | mcu_handle_coins(device->machine(), coin); |
| 618 | 618 | break; |
| r15082 | r15083 | |
| 671 | 671 | MACHINE_START( tnzs ) |
| 672 | 672 | { |
| 673 | 673 | tnzs_state *state = machine.driver_data<tnzs_state>(); |
| 674 | UINT8 *ROM = | |
| 674 | UINT8 *ROM = sta | |
| 675 | 675 | UINT8 *SUB = state->memregion("sub")->base(); |
| 676 | 676 | |
| 677 | 677 | state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); |
| r15082 | r15083 | |
| 709 | 709 | MACHINE_START( jpopnics ) |
| 710 | 710 | { |
| 711 | 711 | tnzs_state *state = machine.driver_data<tnzs_state>(); |
| 712 | UINT8 *ROM = | |
| 712 | UINT8 *ROM = sta | |
| 713 | 713 | UINT8 *SUB = state->memregion("sub")->base(); |
| 714 | 714 | |
| 715 | 715 | state->membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000); |
| r15082 | r15083 | |
|---|---|---|
| 114 | 114 | { |
| 115 | 115 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "DSW", "UNK0", "UNK1" }; |
| 116 | 116 | |
| 117 | return i | |
| 117 | return iop | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | |
| r15082 | r15083 | |
| 130 | 130 | static const char *const portnames[] = { "IN0", "IN1", NULL, "DSW", "UNK0", "UNK1" }; |
| 131 | 131 | |
| 132 | 132 | if (offset != 2) |
| 133 | return i | |
| 133 | return iop | |
| 134 | 134 | |
| 135 | 135 | switch (m_term2_analog_select) |
| 136 | 136 | { |
| 137 | 137 | default: |
| 138 | case 0: return input_port_read(machine(), "STICK0_X"); | |
| 139 | case 1: return input_port_read(machine(), "STICK0_Y"); | |
| 140 | case 2: return input_port_read(machine(), "STICK1_X"); | |
| 141 | case 3: return input_port_read(machine(), "STICK1_Y"); | |
| 138 | case 0: return ioport("STICK0_X")->read(); | |
| 139 | case 1: return ioport("STICK0_Y")->read(); | |
| 140 | case 2: return ioport("STICK1_X")->read(); | |
| 141 | case 3: return ioport("STICK1_Y")->read(); | |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 |
| r15082 | r15083 | |
|---|---|---|
| 16 | 16 | INTERRUPT_GEN( asteroid_interrupt ) |
| 17 | 17 | { |
| 18 | 18 | /* Turn off interrupts if self-test is enabled */ |
| 19 | if (!( | |
| 19 | if (!( | |
| 20 | 20 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | INTERRUPT_GEN( asterock_interrupt ) |
| 24 | 24 | { |
| 25 | 25 | /* Turn off interrupts if self-test is enabled */ |
| 26 | if (( | |
| 26 | if (( | |
| 27 | 27 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | INTERRUPT_GEN( llander_interrupt ) |
| 31 | 31 | { |
| 32 | 32 | /* Turn off interrupts if self-test is enabled */ |
| 33 | if ( | |
| 33 | if ( | |
| 34 | 34 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | READ8_MEMBER(asteroid_state::asteroid_IN0_r) |
| 38 | 38 | { |
| 39 | int res = i | |
| 39 | int res = iop | |
| 40 | 40 | int bitmask = (1 << offset); |
| 41 | 41 | |
| 42 | 42 | if (res & bitmask) |
| r15082 | r15083 | |
| 50 | 50 | |
| 51 | 51 | READ8_MEMBER(asteroid_state::asterock_IN0_r) |
| 52 | 52 | { |
| 53 | int res = i | |
| 53 | int res = iop | |
| 54 | 54 | int bitmask = (1 << offset); |
| 55 | 55 | |
| 56 | 56 | if (res & bitmask) |
| r15082 | r15083 | |
| 68 | 68 | |
| 69 | 69 | READ8_MEMBER(asteroid_state::asteroid_IN1_r) |
| 70 | 70 | { |
| 71 | int res = i | |
| 71 | int res = iop | |
| 72 | 72 | int bitmask = (1 << (offset & 0x7)); |
| 73 | 73 | |
| 74 | 74 | if (res & bitmask) |
| r15082 | r15083 | |
| 85 | 85 | int res; |
| 86 | 86 | int res1; |
| 87 | 87 | |
| 88 | res1 = i | |
| 88 | res1 = iop | |
| 89 | 89 | |
| 90 | 90 | res = 0xfc | ((res1 >> (2 * (3 - (offset & 0x3)))) & 0x3); |
| 91 | 91 | return res; |
| r15082 | r15083 | |
|---|---|---|
| 214 | 214 | { |
| 215 | 215 | const char *tag1 = (const char *)param; |
| 216 | 216 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 217 | return i | |
| 217 | return iop | |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | CUSTOM_INPUT_MEMBER(mhavoc_state::gamma_rcvd_r) |
| r15082 | r15083 | |
|---|---|---|
| 35 | 35 | switch (offset) |
| 36 | 36 | { |
| 37 | 37 | case 0: |
| 38 | return i | |
| 38 | return iop | |
| 39 | 39 | case 1: |
| 40 | 40 | return (mode == 2) ? m_customio_3[offset] : 0x0f; |
| 41 | 41 | case 2: |
| r15082 | r15083 | |
|---|---|---|
| 105 | 105 | { |
| 106 | 106 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "DSW" }; |
| 107 | 107 | |
| 108 | return i | |
| 108 | return iop | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 |
| r15082 | r15083 | |
|---|---|---|
| 217 | 217 | |
| 218 | 218 | |
| 219 | 219 | /* check the coins here as well - they drive the clock of the flip-flops */ |
| 220 | port_value = | |
| 220 | port_value = s | |
| 221 | 221 | |
| 222 | 222 | state->m_ttl7474_2s_1->clock_w((port_value & 0x01) >> 0); |
| 223 | 223 | state->m_ttl7474_2s_2->clock_w((port_value & 0x02) >> 1); |
| r15082 | r15083 | |
| 240 | 240 | case 3: movement_flip_flop = state->m_ttl7474_1a_1; dir_flip_flop = state->m_ttl7474_1a_2; break; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | port_value = | |
| 243 | port_value = | |
| 244 | 244 | |
| 245 | 245 | if (port_value != state->m_last_wheel_value[player]) |
| 246 | 246 | { |
| r15082 | r15083 | |
| 258 | 258 | |
| 259 | 259 | |
| 260 | 260 | /* finally read the accelerator pedals */ |
| 261 | port_value = | |
| 261 | port_value = | |
| 262 | 262 | |
| 263 | 263 | for (player = 0; player < 4; player++) |
| 264 | 264 | { |
| r15082 | r15083 | |
| 422 | 422 | (state->m_ttl7474_1c_2->output_r() ? 0x02 : 0x00) | |
| 423 | 423 | (state->m_ttl7474_1d_2->output_r() ? 0x04 : 0x00) | |
| 424 | 424 | (state->m_ttl7474_1f_2->output_r() ? 0x08 : 0x00) | |
| 425 | ( | |
| 425 | (s | |
| 426 | 426 | |
| 427 | 427 | return ret; |
| 428 | 428 | } |
| r15082 | r15083 | |
|---|---|---|
| 1282 | 1282 | int ret; |
| 1283 | 1283 | |
| 1284 | 1284 | if (!qnum) |
| 1285 | ret = ( | |
| 1285 | ret = ( | |
| 1286 | 1286 | else |
| 1287 | ret = ( | |
| 1287 | ret = ( | |
| 1288 | 1288 | |
| 1289 | 1289 | qstrobe ^= 0x40; |
| 1290 | 1290 | |
| r15082 | r15083 | |
| 1295 | 1295 | int ret; |
| 1296 | 1296 | |
| 1297 | 1297 | if (!qnum) |
| 1298 | ret = ( | |
| 1298 | ret = ( | |
| 1299 | 1299 | else |
| 1300 | ret = ( | |
| 1300 | ret = ( | |
| 1301 | 1301 | |
| 1302 | 1302 | if (!qstrobe) qnum ^= 0x20; |
| 1303 | 1303 | |
| r15082 | r15083 | |
| 1327 | 1327 | { |
| 1328 | 1328 | int inp = input_count; |
| 1329 | 1329 | |
| 1330 | if (inp == 4) res = | |
| 1330 | if (inp == 4) res = | |
| 1331 | 1331 | else |
| 1332 | 1332 | { |
| 1333 | 1333 | char portname[40]; |
| r15082 | r15083 | |
| 1336 | 1336 | static int counter[4]; |
| 1337 | 1337 | |
| 1338 | 1338 | sprintf(portname,"IN%d",inp); /* IN0-IN3 */ |
| 1339 | res = | |
| 1339 | res = | |
| 1340 | 1340 | if (res & 0x80) |
| 1341 | 1341 | { |
| 1342 | 1342 | if (counter[inp] >= 0) |
| r15082 | r15083 | |
| 1360 | 1360 | counter[inp] = -1; |
| 1361 | 1361 | #else |
| 1362 | 1362 | sprintf(portname,"IN%d",inp); /* IN0-IN3 */ |
| 1363 | res = | |
| 1363 | res = | |
| 1364 | 1364 | if (res & 1) res = 0x7f; /* weak */ |
| 1365 | 1365 | else if (res & 2) res = 0x48; /* medium */ |
| 1366 | 1366 | else if (res & 4) res = 0x40; /* strong */ |
| r15082 | r15083 | |
| 1371 | 1371 | } |
| 1372 | 1372 | else |
| 1373 | 1373 | { |
| 1374 | res = | |
| 1374 | res = | |
| 1375 | 1375 | |
| 1376 | 1376 | /* the strobe cannot happen too often, otherwise the MCU will waste too |
| 1377 | 1377 | much time reading the inputs and won't have enough cycles to play two |
| r15082 | r15083 | |
| 1413 | 1413 | |
| 1414 | 1414 | if (offset == 0) |
| 1415 | 1415 | { |
| 1416 | res = ( | |
| 1416 | res = ( | |
| 1417 | 1417 | |
| 1418 | 1418 | return res; |
| 1419 | 1419 | } |
| 1420 | 1420 | else |
| 1421 | 1421 | { |
| 1422 | res = | |
| 1422 | res = | |
| 1423 | 1423 | |
| 1424 | 1424 | /* the strobe cannot happen too often, otherwise the MCU will waste too |
| 1425 | 1425 | much time reading the inputs and won't have enough cycles to play two |
| r15082 | r15083 | |
| 1434 | 1434 | switch (input_count) |
| 1435 | 1435 | { |
| 1436 | 1436 | case 0: |
| 1437 | stored_input[0] = input_port_read(space->machine(), "IN0") & 0x1f; | |
| 1438 | stored_input[1] = (input_port_read(space->machine(), "IN3") & 0x07) << 3; | |
| 1437 | stored_input[0] = space->machine().root_device().ioport("IN0")->read() & 0x1f; | |
| 1438 | stored_input[1] = (space->machine().root_device().ioport("IN3")->read() & 0x07) << 3; | |
| 1439 | 1439 | break; |
| 1440 | 1440 | |
| 1441 | 1441 | case 3: |
| 1442 | stored_input[0] = | |
| 1442 | stored_input[0] = | |
| 1443 | 1443 | break; |
| 1444 | 1444 | |
| 1445 | 1445 | case 4: |
| 1446 | stored_input[0] = input_port_read(space->machine(), "IN1") & 0x1f; | |
| 1447 | stored_input[1] = input_port_read(space->machine(), "IN3") & 0x18; | |
| 1446 | stored_input[0] = space->machine().root_device().ioport("IN1")->read() & 0x1f; | |
| 1447 | stored_input[1] = space->machine().root_device().ioport("IN3")->read() & 0x18; | |
| 1448 | 1448 | break; |
| 1449 | 1449 | |
| 1450 | 1450 | default: |
| r15082 | r15083 | |
|---|---|---|
| 183 | 183 | int scan_code_set; |
| 184 | 184 | int last_code; |
| 185 | 185 | |
| 186 | | |
| 186 | | |
| 187 | 187 | } at_keyboard; |
| 188 | 188 | |
| 189 | 189 | static at_keyboard keyboard; |
| r15082 | r15083 | |
| 306 | 306 | |
| 307 | 307 | static int at_keyboard_queue_size(void); |
| 308 | 308 | static int at_keyboard_queue_chars(running_machine &machine, const unicode_char *text, size_t text_len); |
| 309 | static int at_keyboard_accept_char(running_machine &machine, unicode_char ch); | |
| 310 | static int at_keyboard_charqueue_empty(running_machine &machine); | |
| 309 | static bool at_keyboard_accept_char(running_machine &machine, unicode_char ch); | |
| 310 | static bool at_keyboard_charqueue_empty(running_machine &machine); | |
| 311 | 311 | |
| 312 | 312 | |
| 313 | 313 | |
| r15082 | r15083 | |
| 339 | 339 | keyboard.ports[i] = machine.root_device().ioport(buf); |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | inputx_setup_natural_keyboard(machine, | |
| 343 | at_keyboard_queue_chars, | |
| 344 | at_keyboard_accept_char, | |
| 345 | at_keyboard_charqueue_empty); | |
| 342 | machine.ioport().natkeyboard().configure( | |
| 343 | ioport_queue_chars_delegate(FUNC(at_keyboard_queue_chars), &machine), | |
| 344 | ioport_accept_char_delegate(FUNC(at_keyboard_accept_char), &machine), | |
| 345 | ioport_charqueue_empty_delegate(FUNC(at_keyboard_charqueue_empty), &machine)); | |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | |
| r15082 | r15083 | |
| 499 | 499 | { |
| 500 | 500 | UINT32 result = 0; |
| 501 | 501 | if (keyboard.ports[port] != NULL) |
| 502 | result = | |
| 502 | result = | |
| 503 | 503 | return result; |
| 504 | 504 | } |
| 505 | 505 | |
| r15082 | r15083 | |
| 1237 | 1237 | Inputx stuff |
| 1238 | 1238 | ***************************************************************************/ |
| 1239 | 1239 | |
| 1240 | static | |
| 1240 | static bool at_keyboard_accept_char(running_machine &machine, unicode_char ch) | |
| 1241 | 1241 | { |
| 1242 | 1242 | return unicode_char_to_at_keycode(ch) != 0; |
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | 1245 | |
| 1246 | 1246 | |
| 1247 | static | |
| 1247 | static bool at_keyboard_charqueue_empty(running_machine &machine) | |
| 1248 | 1248 | { |
| 1249 | 1249 | return at_keyboard_queue_size() == 0; |
| 1250 | 1250 | } |
| r15082 | r15083 | |
|---|---|---|
| 273 | 273 | static READ16_HANDLER( kovsh_fake_region_r ) |
| 274 | 274 | { |
| 275 | 275 | pgm_arm_type1_state *state = space->machine().driver_data<pgm_arm_type1_state>(); |
| 276 | int regionhack = | |
| 276 | int regionhack = s | |
| 277 | 277 | if (regionhack != 0xff) return regionhack; |
| 278 | 278 | |
| 279 | 279 | offset = 0x4; |
| r15082 | r15083 | |
| 1388 | 1388 | static READ16_HANDLER( pgm_arm7_type1_sim_protram_r ) |
| 1389 | 1389 | { |
| 1390 | 1390 | if (offset == 4) |
| 1391 | return | |
| 1391 | return | |
| 1392 | 1392 | |
| 1393 | 1393 | return 0x0000; |
| 1394 | 1394 | } |
| r15082 | r15083 | |
| 1398 | 1398 | pgm_arm_type1_state *state = space->machine().driver_data<pgm_arm_type1_state>(); |
| 1399 | 1399 | |
| 1400 | 1400 | if (offset == 4) //region |
| 1401 | return | |
| 1401 | return s | |
| 1402 | 1402 | else if (offset >= 0x10) //timer |
| 1403 | 1403 | { |
| 1404 | 1404 | logerror("PSTARS ACCESS COUNTER %6X\n", state->m_extra_ram[offset - 0x10]); |
| r15082 | r15083 | |
|---|---|---|
| 436 | 436 | { |
| 437 | 437 | switch (offset) |
| 438 | 438 | { |
| 439 | case 0x03: return input_port_read(machine(), "F00007"); /* STARTn + SERVICE1 */ | |
| 440 | case 0x04: return input_port_read(machine(), "F00009"); /* COINn */ | |
| 441 | case 0x05: return input_port_read(machine(), "F0000B"); /* Player controls + TILT */ | |
| 442 | case 0x06: return input_port_read(machine(), "F0000D"); /* Player controls (cocktail) */ | |
| 439 | case 0x03: return ioport("F00007")->read(); /* STARTn + SERVICE1 */ | |
| 440 | case 0x04: return ioport("F00009")->read(); /* COINn */ | |
| 441 | case 0x05: return ioport("F0000B")->read(); /* Player controls + TILT */ | |
| 442 | case 0x06: return ioport("F0000D")->read(); /* Player controls (cocktail) */ | |
| 443 | 443 | case 0x08: return m_cc_port; |
| 444 | 444 | } |
| 445 | 445 | } |
| r15082 | r15083 | |
|---|---|---|
| 62 | 62 | /* we latch the beam values on the first interrupt after VBLANK */ |
| 63 | 63 | if (param == 64) |
| 64 | 64 | { |
| 65 | state->m_shooter_x = input_port_read(timer.machine(), "FAKEX"); | |
| 66 | state->m_shooter_y = input_port_read(timer.machine(), "FAKEY"); | |
| 65 | state->m_shooter_x = timer.machine().root_device().ioport("FAKEX")->read(); | |
| 66 | state->m_shooter_y = timer.machine().root_device().ioport("FAKEY")->read(); | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /* which bits get returned depends on which scanline we're at */ |
| r15082 | r15083 | |
| 172 | 172 | memset(state->m_noise_position, 0, sizeof(state->m_noise_position)); |
| 173 | 173 | |
| 174 | 174 | /* point the banks to bank 0 */ |
| 175 | numbanks = (machine.root_device().memregion("maincpu")->bytes() > 0x40000) ? 16 : 8; | |
| 176 | state->membank("bank1")->configure_entries(0, numbanks, &machine.root_device().memregion("maincpu")->base()[0x10000], 0x6000); | |
| 175 | numbanks = (state->memregion("maincpu")->bytes() > 0x40000) ? 16 : 8; | |
| 176 | state->membank("bank1")->configure_entries(0, numbanks, &state->memregion("maincpu")->base()[0x10000], 0x6000); | |
| 177 | 177 | state->membank("bank2")->configure_entries(0, numbanks, &state->memregion("maincpu")->base()[0x12000], 0x6000); |
| 178 | 178 | state->membank("bank1")->set_entry(0); |
| 179 | 179 | state->membank("bank2")->set_entry(0); |
| r15082 | r15083 | |
| 569 | 569 | /* ports are read once a frame, just at varying intervals. To get around this, we */ |
| 570 | 570 | /* read all the analog inputs at VBLANK time and just return the cached values. */ |
| 571 | 571 | for (i = 0; i < 4; i++) |
| 572 | state->m_analog_input_data[i] = | |
| 572 | state->m_analog_input_data[i] = | |
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | |
| r15082 | r15083 | |
| 1140 | 1140 | INT8 diff[3]; |
| 1141 | 1141 | |
| 1142 | 1142 | /* read the current steering values */ |
| 1143 | wheel[0] = input_port_read(machine, "AN0"); | |
| 1144 | wheel[1] = input_port_read(machine, "AN1"); | |
| 1145 | wheel[2] = input_port_read(machine, "AN2"); | |
| 1143 | wheel[0] = state->ioport("AN0")->read(); | |
| 1144 | wheel[1] = state->ioport("AN1")->read(); | |
| 1145 | wheel[2] = state->ioport("AN2")->read(); | |
| 1146 | 1146 | |
| 1147 | 1147 | /* diff the values */ |
| 1148 | 1148 | diff[0] = wheel[0] - state->m_grudge_last_steering[0]; |
| r15082 | r15083 | |
|---|---|---|
| 38 | 38 | if (data & 1) |
| 39 | 39 | { |
| 40 | 40 | /* load up the latches */ |
| 41 | m_input_latch[0] = input_port_read(machine(), "IN0"); | |
| 42 | m_input_latch[1] = input_port_read(machine(), "IN1"); | |
| 41 | m_input_latch[0] = ioport("IN0")->read(); | |
| 42 | m_input_latch[1] = ioport("IN1")->read(); | |
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| r15082 | r15083 | |
| 50 | 50 | /* shift */ |
| 51 | 51 | m_input_latch[0] >>= 1; |
| 52 | 52 | |
| 53 | ret |= input_port_read(machine(), "COINS"); /* merge coins, etc */ | |
| 54 | ret |= (input_port_read(machine(), "DSW0") & 3) << 3; /* merge 2 dipswitches */ | |
| 53 | ret |= ioport("COINS")->read(); /* merge coins, etc */ | |
| 54 | ret |= (ioport("DSW0")->read() & 3) << 3; /* merge 2 dipswitches */ | |
| 55 | 55 | |
| 56 | 56 | /* The gun games expect a 1 returned on every 5th read after sound_fix is reset*/ |
| 57 | 57 | /* Info Supplied by Ben Parnell <xodnizel@home.com> of FCE Ultra fame */ |
| r15082 | r15083 | |
| 75 | 75 | /* shift */ |
| 76 | 76 | m_input_latch[0] >>= 1; |
| 77 | 77 | |
| 78 | ret |= input_port_read(machine(), "COINS"); /* merge coins, etc */ | |
| 79 | ret |= (input_port_read(machine(), "DSW0") & 3) << 3; /* merge 2 dipswitches */ | |
| 78 | ret |= ioport("COINS")->read(); /* merge coins, etc */ | |
| 79 | ret |= (ioport("DSW0")->read() & 3) << 3; /* merge 2 dipswitches */ | |
| 80 | 80 | |
| 81 | 81 | return ret; |
| 82 | 82 | |
| r15082 | r15083 | |
| 86 | 86 | { |
| 87 | 87 | int ret = (m_input_latch[1]) & 1; |
| 88 | 88 | |
| 89 | ret |= i | |
| 89 | ret |= iop | |
| 90 | 90 | |
| 91 | 91 | /* shift */ |
| 92 | 92 | m_input_latch[1] >>= 1; |
| r15082 | r15083 | |
| 100 | 100 | if (data & 1) |
| 101 | 101 | { |
| 102 | 102 | /* load up the latches */ |
| 103 | m_input_latch[2] = input_port_read(machine(), "IN2"); | |
| 104 | m_input_latch[3] = input_port_read(machine(), "IN3"); | |
| 103 | m_input_latch[2] = ioport("IN2")->read(); | |
| 104 | m_input_latch[3] = ioport("IN3")->read(); | |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| r15082 | r15083 | |
| 112 | 112 | /* shift */ |
| 113 | 113 | m_input_latch[2] >>= 1; |
| 114 | 114 | |
| 115 | ret |= input_port_read(machine(), "COINS2"); /* merge coins, etc */ | |
| 116 | ret |= (input_port_read(machine(), "DSW1") & 3) << 3; /* merge 2 dipswitches */ | |
| 115 | ret |= ioport("COINS2")->read(); /* merge coins, etc */ | |
| 116 | ret |= (ioport("DSW1")->read() & 3) << 3; /* merge 2 dipswitches */ | |
| 117 | 117 | return ret; |
| 118 | 118 | } |
| 119 | 119 | |
| r15082 | r15083 | |
| 121 | 121 | { |
| 122 | 122 | int ret = (m_input_latch[3]) & 1; |
| 123 | 123 | |
| 124 | ret |= i | |
| 124 | ret |= iop | |
| 125 | 125 | |
| 126 | 126 | /* shift */ |
| 127 | 127 | m_input_latch[3] >>= 1; |
| r15082 | r15083 | |
| 202 | 202 | |
| 203 | 203 | ppu1_space->install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(vsnes_state::vsnes_nt0_r),state), write8_delegate(FUNC(vsnes_state::vsnes_nt0_w),state)); |
| 204 | 204 | |
| 205 | state->m_vrom[0] = | |
| 205 | state->m_vrom[0] = sta | |
| 206 | 206 | state->m_vrom_size[0] = state->memregion("gfx1")->bytes(); |
| 207 | 207 | state->m_vrom_banks = state->m_vrom_size[0] / 0x400; |
| 208 | 208 | |
| r15082 | r15083 | |
| 227 | 227 | MACHINE_START( vsdual ) |
| 228 | 228 | { |
| 229 | 229 | vsnes_state *state = machine.driver_data<vsnes_state>(); |
| 230 | state->m_vrom[0] = machine.root_device().memregion("gfx1")->base(); | |
| 231 | state->m_vrom[1] = machine.root_device().memregion("gfx2")->base(); | |
| 232 | state->m_vrom_size[0] = machine.root_device().memregion("gfx1")->bytes(); | |
| 230 | state->m_vrom[0] = state->memregion("gfx1")->base(); | |
| 231 | state->m_vrom[1] = state->memregion("gfx2")->base(); | |
| 232 | state->m_vrom_size[0] = state->memregion("gfx1")->bytes(); | |
| 233 | 233 | state->m_vrom_size[1] = state->memregion("gfx2")->bytes(); |
| 234 | 234 | |
| 235 | 235 | /* establish nametable ram */ |
| r15082 | r15083 | |
| 365 | 365 | { |
| 366 | 366 | |
| 367 | 367 | /* load up the latches */ |
| 368 | m_input_latch[0] = i | |
| 368 | m_input_latch[0] = iop | |
| 369 | 369 | |
| 370 | 370 | /* do the gun thing */ |
| 371 | int x = input_port_read(machine(), "GUNX"); | |
| 372 | int y = input_port_read(machine(), "GUNY"); | |
| 371 | int x = ioport("GUNX")->read(); | |
| 372 | int y = ioport("GUNY")->read(); | |
| 373 | 373 | UINT32 pix, color_base; |
| 374 | 374 | |
| 375 | 375 | /* get the pixel at the gun position */ |
| r15082 | r15083 | |
| 385 | 385 | m_input_latch[0] |= 0x40; |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | m_input_latch[1] = i | |
| 388 | m_input_latch[1] = iop | |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | if ((m_zapstore & 1) && (!(data & 1))) |
| r15082 | r15083 | |
| 773 | 773 | DRIVER_INIT( MMC3 ) |
| 774 | 774 | { |
| 775 | 775 | vsnes_state *state = machine.driver_data<vsnes_state>(); |
| 776 | UINT8 *prg = | |
| 776 | UINT8 *prg = sta | |
| 777 | 777 | state->m_IRQ_enable = state->m_IRQ_count = state->m_IRQ_count_latch = 0; |
| 778 | 778 | int MMC3_prg_chunks = (state->memregion("maincpu")->bytes() - 0x10000) / 0x4000; |
| 779 | 779 |
| r15082 | r15083 | |
|---|---|---|
| 1788 | 1788 | { |
| 1789 | 1789 | /* here we read B, C & the additional buttons */ |
| 1790 | 1790 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1791 | (((input_port_read_safe(machine, pad3names[portnum], 0) & 0x30) | | |
| 1792 | (input_port_read_safe(machine, pad6names[portnum], 0) & 0x0f)) & ~helper); | |
| 1791 | (((machine.root_device().ioport(pad3names[portnum])->read_safe(0) & 0x30) | | |
| 1792 | (machine.root_device().ioport(pad6names[portnum])->read_safe(0) & 0x0f)) & ~helper); | |
| 1793 | 1793 | } |
| 1794 | 1794 | else |
| 1795 | 1795 | { |
| 1796 | 1796 | /* here we read B, C & the directional buttons */ |
| 1797 | 1797 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1798 | ((in | |
| 1798 | ((machine. | |
| 1799 | 1799 | } |
| 1800 | 1800 | } |
| 1801 | 1801 | else |
| r15082 | r15083 | |
| 1804 | 1804 | { |
| 1805 | 1805 | /* here we read ((Start & A) >> 2) | 0x00 */ |
| 1806 | 1806 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1807 | (((in | |
| 1807 | (((machine. | |
| 1808 | 1808 | } |
| 1809 | 1809 | else if (io_stage[portnum]==2) |
| 1810 | 1810 | { |
| 1811 | 1811 | /* here we read ((Start & A) >> 2) | 0x0f */ |
| 1812 | 1812 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1813 | ((((in | |
| 1813 | ((((machine. | |
| 1814 | 1814 | } |
| 1815 | 1815 | else |
| 1816 | 1816 | { |
| 1817 | 1817 | /* here we read ((Start & A) >> 2) | Up and Down */ |
| 1818 | 1818 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1819 | ((((input_port_read_safe(machine, pad3names[portnum], 0) & 0xc0) >> 2) | | |
| 1820 | (input_port_read_safe(machine, pad3names[portnum], 0) & 0x03)) & ~helper); | |
| 1819 | ((((machine.root_device().ioport(pad3names[portnum])->read_safe(0) & 0xc0) >> 2) | | |
| 1820 | (machine.root_device().ioport(pad3names[portnum])->read_safe(0) & 0x03)) & ~helper); | |
| 1821 | 1821 | } |
| 1822 | 1822 | } |
| 1823 | 1823 | |
| r15082 | r15083 | |
| 1837 | 1837 | { |
| 1838 | 1838 | /* here we read B, C & the directional buttons */ |
| 1839 | 1839 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1840 | (((in | |
| 1840 | (((machine. | |
| 1841 | 1841 | } |
| 1842 | 1842 | else |
| 1843 | 1843 | { |
| 1844 | 1844 | /* here we read ((Start & A) >> 2) | Up and Down */ |
| 1845 | 1845 | retdata = (megadrive_io_data_regs[portnum] & helper) | |
| 1846 | ((((input_port_read_safe(machine, pad3names[portnum], 0) & 0xc0) >> 2) | | |
| 1847 | (input_port_read_safe(machine, pad3names[portnum], 0) & 0x03) | 0x40) & ~helper); | |
| 1846 | ((((machine.root_device().ioport(pad3names[portnum])->read_safe(0) & 0xc0) >> 2) | | |
| 1847 | (machine.root_device().ioport(pad3names[portnum])->read_safe(0) & 0x03) | 0x40) & ~helper); | |
| 1848 | 1848 | } |
| 1849 | 1849 | |
| 1850 | 1850 | return retdata; |
| r15082 | r15083 | |
| 1858 | 1858 | if (ctrl == 0x55) |
| 1859 | 1859 | { |
| 1860 | 1860 | /* A keys */ |
| 1861 | retdata = ((input_port_read(machine, "PAD1") & 0x40) >> 2) | | |
| 1862 | ((input_port_read(machine, "PAD2") & 0x40) >> 4) | 0xeb; | |
| 1861 | retdata = ((machine.root_device().ioport("PAD1")->read() & 0x40) >> 2) | | |
| 1862 | ((machine.root_device().ioport("PAD2")->read() & 0x40) >> 4) | 0xeb; | |
| 1863 | 1863 | } |
| 1864 | 1864 | else |
| 1865 | 1865 | { |
| 1866 | 1866 | if (offset == 0) |
| 1867 | 1867 | { |
| 1868 | retdata = (in | |
| 1868 | retdata = (machine.root_device().ioport | |
| 1869 | 1869 | } |
| 1870 | 1870 | else |
| 1871 | 1871 | { |
| 1872 | retdata = ((in | |
| 1872 | retdata = ((machine.root_device().ioport | |
| 1873 | 1873 | } |
| 1874 | 1874 | |
| 1875 | 1875 | } |
| r15082 | r15083 | |
| 7133 | 7133 | /* emulate testmode plug */ |
| 7134 | 7134 | static UINT8 megadrive_io_read_data_port_svp(running_machine &machine, int portnum) |
| 7135 | 7135 | { |
| 7136 | if (portnum == 0 && in | |
| 7136 | if (portnum == 0 && machine. | |
| 7137 | 7137 | { |
| 7138 | 7138 | return (megadrive_io_data_regs[0] & 0xc0); |
| 7139 | 7139 | } |
| r15082 | r15083 | |
| 9277 | 9277 | /* default state of z80 = reset, with bus */ |
| 9278 | 9278 | mame_printf_debug("Resetting Megadrive / Genesis\n"); |
| 9279 | 9279 | |
| 9280 | switch (in | |
| 9280 | switch (machine.root_device().ioport("REGION")->read_safe( | |
| 9281 | 9281 | { |
| 9282 | 9282 | |
| 9283 | 9283 | case 1: // US |
| r15082 | r15083 | |
| 9414 | 9414 | megadrive_imode_odd_frame^=1; |
| 9415 | 9415 | // cputag_set_input_line(machine, "genesis_snd_z80", 0, CLEAR_LINE); // if the z80 interrupt hasn't happened by now, clear it.. |
| 9416 | 9416 | |
| 9417 | if ( | |
| 9417 | if ( | |
| 9418 | 9418 | cputag_set_input_line(screen.machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE); |
| 9419 | 9419 | |
| 9420 | 9420 | /* |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | int i; |
| 68 | 68 | int coin_curr; |
| 69 | 69 | |
| 70 | coin_curr = ~in | |
| 70 | coin_curr = ~machine.root_device().ioport | |
| 71 | 71 | if (coin_curr && !state->m_coin_last && state->m_protection_ram[0x01] < 9) |
| 72 | 72 | { |
| 73 | 73 | state->m_protection_ram[0x01]++; // increase credits counter |
| r15082 | r15083 | |
| 77 | 77 | |
| 78 | 78 | state->m_protection_ram[0x04] = 0x3c; // coin inputs |
| 79 | 79 | |
| 80 | state->m_protection_ram[0x02] = BITSWAP8(input_port_read(machine, "IN1"), 7,6,5,4,2,3,1,0); // player 1 | |
| 81 | state->m_protection_ram[0x03] = BITSWAP8(input_port_read(machine, "IN2"), 7,6,5,4,2,3,1,0); // player 2 | |
| 80 | state->m_protection_ram[0x02] = BITSWAP8(machine.root_device().ioport("IN1")->read(), 7,6,5,4,2,3,1,0); // player 1 | |
| 81 | state->m_protection_ram[0x03] = BITSWAP8(machine.root_device().ioport("IN2")->read(), 7,6,5,4,2,3,1,0); // player 2 | |
| 82 | 82 | |
| 83 | 83 | if (state->m_protection_ram[0x19] == 0xaa) // player 2 active |
| 84 | 84 | state->m_protection_ram[0x1b] = state->m_protection_ram[0x03]; |
| r15082 | r15083 | |
| 293 | 293 | else |
| 294 | 294 | { |
| 295 | 295 | //logerror("%04x: 68705 read input port %04x\n", cpu_get_pc(&space.device()), m_address); |
| 296 | m_latch = i | |
| 296 | m_latch = iop | |
| 297 | 297 | } |
| 298 | 298 | } |
| 299 | 299 | else /* write */ |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | MACHINE_START( taitosj ) |
| 20 | 20 | { |
| 21 | 21 | taitosj_state *state = machine.driver_data<taitosj_state>(); |
| 22 | state->membank("bank1")->configure_entry(0, | |
| 22 | state->membank("bank1")->configure_entry(0, sta | |
| 23 | 23 | state->membank("bank1")->configure_entry(1, state->memregion("maincpu")->base() + 0x10000); |
| 24 | 24 | |
| 25 | 25 | state->save_item(NAME(state->m_fromz80)); |
| r15082 | r15083 | |
| 308 | 308 | |
| 309 | 309 | READ8_MEMBER(taitosj_state::alpine_port_2_r) |
| 310 | 310 | { |
| 311 | return i | |
| 311 | return iop | |
| 312 | 312 | } |
| r15082 | r15083 | |
|---|---|---|
| 419 | 419 | |
| 420 | 420 | CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert ) |
| 421 | 421 | { |
| 422 | UINT8 bits = i | |
| 422 | UINT8 bits = iop | |
| 423 | 423 | int up = (bits >> 0) & 1; |
| 424 | 424 | int down = (bits >> 1) & 1; |
| 425 | 425 | int left = (bits >> 2) & 1; |
| r15082 | r15083 | |
| 1180 | 1180 | case REG_JOY0DAT: |
| 1181 | 1181 | if (state->m_intf->joy0dat_r != NULL) |
| 1182 | 1182 | return (*state->m_intf->joy0dat_r)(space->machine()); |
| 1183 | return | |
| 1183 | return s | |
| 1184 | 1184 | |
| 1185 | 1185 | case REG_JOY1DAT: |
| 1186 | 1186 | if (state->m_intf->joy1dat_r != NULL) |
| 1187 | 1187 | return (*state->m_intf->joy1dat_r)(space->machine()); |
| 1188 | return | |
| 1188 | return s | |
| 1189 | 1189 | |
| 1190 | 1190 | case REG_POTGOR: |
| 1191 | return i | |
| 1191 | return state->iop | |
| 1192 | 1192 | |
| 1193 | 1193 | case REG_POT0DAT: |
| 1194 | return | |
| 1194 | return s | |
| 1195 | 1195 | |
| 1196 | 1196 | case REG_POT1DAT: |
| 1197 | return | |
| 1197 | return s | |
| 1198 | 1198 | |
| 1199 | 1199 | case REG_DSKBYTR: |
| 1200 | 1200 | return space->machine().device<amiga_fdc>("fdc")->dskbytr_r(); |
| r15082 | r15083 | |
|---|---|---|
| 119 | 119 | if (offset > 2) |
| 120 | 120 | m_adc_result = 0; |
| 121 | 121 | else |
| 122 | m_adc_result = i | |
| 122 | m_adc_result = iop | |
| 123 | 123 | |
| 124 | 124 | update_irq_encoder(machine(), INPUT_LINE_IRQ2, ASSERT_LINE); |
| 125 | 125 | return 0; |
| r15082 | r15083 | |
| 136 | 136 | READ16_MEMBER(vertigo_state::vertigo_coin_r) |
| 137 | 137 | { |
| 138 | 138 | update_irq_encoder(machine(), INPUT_LINE_IRQ6, CLEAR_LINE); |
| 139 | return (i | |
| 139 | return (iop | |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | |
| 143 | 143 | INTERRUPT_GEN( vertigo_interrupt ) |
| 144 | 144 | { |
| 145 | 145 | /* Coin inputs cause IRQ6 */ |
| 146 | if (( | |
| 146 | if (( | |
| 147 | 147 | update_irq_encoder(device->machine(), INPUT_LINE_IRQ6, ASSERT_LINE); |
| 148 | 148 | } |
| 149 | 149 |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | void cdislave_device::perform_mouse_update() |
| 81 | 81 | { |
| 82 | UINT16 x = input_port_read(machine(), "MOUSEX"); | |
| 83 | UINT16 y = input_port_read(machine(), "MOUSEY"); | |
| 84 | UINT8 buttons = input_port_read(machine(), "MOUSEBTN"); | |
| 82 | UINT16 x = ioport("MOUSEX")->read(); | |
| 83 | UINT16 y = ioport("MOUSEY")->read(); | |
| 84 | UINT8 buttons = ioport("MOUSEBTN")->read(); | |
| 85 | 85 | |
| 86 | 86 | UINT16 old_mouse_x = m_real_mouse_x; |
| 87 | 87 | UINT16 old_mouse_y = m_real_mouse_y; |
| r15082 | r15083 | |
|---|---|---|
| 126 | 126 | case 1: |
| 127 | 127 | case 2: |
| 128 | 128 | case 3: |
| 129 | return i | |
| 129 | return iop | |
| 130 | 130 | |
| 131 | 131 | case 4: |
| 132 | 132 | return (midway_serial_pic_status_r() << 12) | midwunit_sound_state_r(space,0,0xffff); |
| r15082 | r15083 | |
| 156 | 156 | register_state_saving(machine); |
| 157 | 157 | |
| 158 | 158 | /* load the graphics ROMs -- quadruples */ |
| 159 | midtunit_gfx_rom = base = | |
| 159 | midtunit_gfx_rom = base = sta | |
| 160 | 160 | len = state->memregion("gfx1")->bytes(); |
| 161 | 161 | for (i = 0; i < len / 0x400000; i++) |
| 162 | 162 | { |
| r15082 | r15083 | |
|---|---|---|
| 736 | 736 | switch((data>>2) & 0x07) |
| 737 | 737 | { |
| 738 | 738 | case 0: |
| 739 | namcos2_mcu_analog_data= | |
| 739 | namcos2_mcu_analog_data= | |
| 740 | 740 | break; |
| 741 | 741 | case 1: |
| 742 | namcos2_mcu_analog_data= | |
| 742 | namcos2_mcu_analog_data= | |
| 743 | 743 | break; |
| 744 | 744 | case 2: |
| 745 | namcos2_mcu_analog_data= | |
| 745 | namcos2_mcu_analog_data= | |
| 746 | 746 | break; |
| 747 | 747 | case 3: |
| 748 | namcos2_mcu_analog_data= | |
| 748 | namcos2_mcu_analog_data= | |
| 749 | 749 | break; |
| 750 | 750 | case 4: |
| 751 | namcos2_mcu_analog_data= | |
| 751 | namcos2_mcu_analog_data= | |
| 752 | 752 | break; |
| 753 | 753 | case 5: |
| 754 | namcos2_mcu_analog_data= | |
| 754 | namcos2_mcu_analog_data= | |
| 755 | 755 | break; |
| 756 | 756 | case 6: |
| 757 | namcos2_mcu_analog_data= | |
| 757 | namcos2_mcu_analog_data= | |
| 758 | 758 | break; |
| 759 | 759 | case 7: |
| 760 | namcos2_mcu_analog_data= | |
| 760 | namcos2_mcu_analog_data= | |
| 761 | 761 | break; |
| 762 | 762 | default: |
| 763 | 763 | output_set_value("anunk",data); |
| r15082 | r15083 | |
| 815 | 815 | int data = 0; |
| 816 | 816 | |
| 817 | 817 | /* Read/convert the bits one at a time */ |
| 818 | if(input_port_read(space->machine(), "AN0") > threshold) data |= 0x01; | |
| 819 | if(input_port_read(space->machine(), "AN1") > threshold) data |= 0x02; | |
| 820 | if(input_port_read(space->machine(), "AN2") > threshold) data |= 0x04; | |
| 821 | if(input_port_read(space->machine(), "AN3") > threshold) data |= 0x08; | |
| 822 | if(input_port_read(space->machine(), "AN4") > threshold) data |= 0x10; | |
| 823 | if(input_port_read(space->machine(), "AN5") > threshold) data |= 0x20; | |
| 824 | if(input_port_read(space->machine(), "AN6") > threshold) data |= 0x40; | |
| 825 | if(input_port_read(space->machine(), "AN7") > threshold) data |= 0x80; | |
| 818 | if(space->machine().root_device().ioport("AN0")->read() > threshold) data |= 0x01; | |
| 819 | if(space->machine().root_device().ioport("AN1")->read() > threshold) data |= 0x02; | |
| 820 | if(space->machine().root_device().ioport("AN2")->read() > threshold) data |= 0x04; | |
| 821 | if(space->machine().root_device().ioport("AN3")->read() > threshold) data |= 0x08; | |
| 822 | if(space->machine().root_device().ioport("AN4")->read() > threshold) data |= 0x10; | |
| 823 | if(space->machine().root_device().ioport("AN5")->read() > threshold) data |= 0x20; | |
| 824 | if(space->machine().root_device().ioport("AN6")->read() > threshold) data |= 0x40; | |
| 825 | if(space->machine().root_device().ioport("AN7")->read() > threshold) data |= 0x80; | |
| 826 | 826 | |
| 827 | 827 | /* Return the result */ |
| 828 | 828 | return data; |
| r15082 | r15083 | |
| 830 | 830 | |
| 831 | 831 | READ8_HANDLER( namcos2_input_port_0_r ) |
| 832 | 832 | { |
| 833 | int data = | |
| 833 | int data = | |
| 834 | 834 | return data; |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | 837 | READ8_HANDLER( namcos2_input_port_10_r ) |
| 838 | 838 | { |
| 839 | int data = | |
| 839 | int data = | |
| 840 | 840 | return data; |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | READ8_HANDLER( namcos2_input_port_12_r ) |
| 844 | 844 | { |
| 845 | int data = | |
| 845 | int data = | |
| 846 | 846 | return data; |
| 847 | 847 | } |
| r15082 | r15083 | |
|---|---|---|
| 182 | 182 | { |
| 183 | 183 | pgm_arm_type2_state *state = space->machine().driver_data<pgm_arm_type2_state>(); |
| 184 | 184 | int pc = cpu_get_pc(&space->device()); |
| 185 | int regionhack = | |
| 185 | int regionhack = s | |
| 186 | 186 | if (pc==0x190 && regionhack != 0xff) data = (data & 0xffff0000) | (regionhack << 0); |
| 187 | 187 | COMBINE_DATA(&state->m_arm7_shareram[0x138/4]); |
| 188 | 188 | } |
| r15082 | r15083 | |
| 235 | 235 | { |
| 236 | 236 | pgm_arm_type2_state *state = space->machine().driver_data<pgm_arm_type2_state>(); |
| 237 | 237 | int pc = cpu_get_pc(&space->device()); |
| 238 | int regionhack = | |
| 238 | int regionhack = s | |
| 239 | 239 | if (pc==0x170 && regionhack != 0xff) data = (data & 0xffff0000) | (regionhack << 0); |
| 240 | 240 | COMBINE_DATA(&state->m_arm7_shareram[0x138/4]); |
| 241 | 241 | } |
| r15082 | r15083 | |
| 256 | 256 | { |
| 257 | 257 | pgm_arm_type2_state *state = space->machine().driver_data<pgm_arm_type2_state>(); |
| 258 | 258 | int pc = cpu_get_pc(&space->device()); |
| 259 | int regionhack = | |
| 259 | int regionhack = s | |
| 260 | 260 | if (pc==0x0174 && regionhack != 0xff) data = (data & 0x0000ffff) | (regionhack << 16); |
| 261 | 261 | COMBINE_DATA(&state->m_arm7_shareram[0x0]); |
| 262 | 262 | } |
| r15082 | r15083 | |
| 312 | 312 | |
| 313 | 313 | DRIVER_INIT( dw2001 ) |
| 314 | 314 | { |
| 315 | //pgm_arm_type2_state *state = machine.driver_data<pgm_arm_type2_state>(); | |
| 316 | UINT16 *mem16 = (UINT16 *)machine.root_device().memregion("maincpu")->base(); | |
| 315 | pgm_arm_type2_state *state = machine.driver_data<pgm_arm_type2_state>(); | |
| 316 | UINT16 *mem16 = (UINT16 *)state->memregion("maincpu")->base(); | |
| 317 | 317 | |
| 318 | 318 | pgm_basic_init(machine); |
| 319 | 319 | kov2_latch_init(machine); |
| r15082 | r15083 | |
| 330 | 330 | mem16[0x11eb04 / 2] = 0x4e71; |
| 331 | 331 | |
| 332 | 332 | /* patch ARM area with fake code */ |
| 333 | UINT16 *temp16 = (UINT16 *) | |
| 333 | UINT16 *temp16 = (UINT16 *)sta | |
| 334 | 334 | temp16[(0x0000)/2] = 0xd088; |
| 335 | 335 | temp16[(0x0002)/2] = 0xe59f; |
| 336 | 336 | temp16[(0x0004)/2] = 0x0680; |
| r15082 | r15083 | |
| 346 | 346 | |
| 347 | 347 | DRIVER_INIT( dwpc ) |
| 348 | 348 | { |
| 349 | //pgm_arm_type2_state *state = machine.driver_data<pgm_arm_type2_state>(); | |
| 350 | UINT16 *mem16 = (UINT16 *)machine.root_device().memregion("maincpu")->base(); | |
| 349 | pgm_arm_type2_state *state = machine.driver_data<pgm_arm_type2_state>(); | |
| 350 | UINT16 *mem16 = (UINT16 *)state->memregion("maincpu")->base(); | |
| 351 | 351 | |
| 352 | 352 | pgm_basic_init(machine); |
| 353 | 353 | kov2_latch_init(machine); |
| r15082 | r15083 | |
| 365 | 365 | |
| 366 | 366 | |
| 367 | 367 | /* patch ARM area with fake code */ |
| 368 | UINT16 *temp16 = (UINT16 *) | |
| 368 | UINT16 *temp16 = (UINT16 *)sta | |
| 369 | 369 | temp16[(0x0000)/2] = 0xd088; |
| 370 | 370 | temp16[(0x0002)/2] = 0xe59f; |
| 371 | 371 | temp16[(0x0004)/2] = 0x0680; |
| r15082 | r15083 | |
|---|---|---|
| 202 | 202 | READ8_MEMBER(mie_device::gpio_r) |
| 203 | 203 | { |
| 204 | 204 | if(gpiodir & (1 << offset)) |
| 205 | return gpio_name[offset] ? i | |
| 205 | return gpio_name[offset] ? iop | |
| 206 | 206 | else |
| 207 | 207 | return gpio_val[offset]; |
| 208 | 208 | } |
| r15082 | r15083 | |
| 211 | 211 | { |
| 212 | 212 | gpio_val[offset] = data; |
| 213 | 213 | if(!(gpiodir & (1 << offset)) && gpio_name[offset]) |
| 214 | i | |
| 214 | iop | |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | READ8_MEMBER(mie_device::gpiodir_r) |
| r15082 | r15083 | |
|---|---|---|
| 130 | 130 | { |
| 131 | 131 | switch (offset<<1) { |
| 132 | 132 | case 0x110: /* Player input */ |
| 133 | return | |
| 133 | return | |
| 134 | 134 | |
| 135 | 135 | case 0x36c: /* Coins */ |
| 136 | 136 | case 0x334: /* Probably also, c6, 2c0, 2e0, 4b2, 46a, 4da, rohga is 44c */ |
| 137 | return | |
| 137 | return | |
| 138 | 138 | case 0x0dc: |
| 139 | return | |
| 139 | return | |
| 140 | 140 | |
| 141 | 141 | case 0x494: /* Dips */ |
| 142 | return | |
| 142 | return | |
| 143 | 143 | |
| 144 | 144 | case 0x244: |
| 145 | 145 | return deco16_prot_ram[0]; |
| r15082 | r15083 | |
| 364 | 364 | |
| 365 | 365 | /* Player 1 & 2 controls, read in IRQ then written *back* to protection device */ |
| 366 | 366 | case 0x50: /* written to 9e byte */ |
| 367 | return | |
| 367 | return | |
| 368 | 368 | case 0x6f8: /* written to 76 byte */ |
| 369 | return ( | |
| 369 | return ( | |
| 370 | 370 | |
| 371 | 371 | case 0x5c: /* After coin insert, high 0x8000 bit set starts game */ |
| 372 | 372 | return deco16_prot_ram[0x3b]; |
| r15082 | r15083 | |
| 376 | 376 | return ((deco16_prot_ram[0x9e/2]&0xff00)>>8) | ((deco16_prot_ram[0x9e/2]&0x00ff)<<8); |
| 377 | 377 | |
| 378 | 378 | case 0xac: /* Dip switches */ |
| 379 | return | |
| 379 | return | |
| 380 | 380 | case 0xc2: |
| 381 | return | |
| 381 | return | |
| 382 | 382 | |
| 383 | 383 | case 0x5d4: /* The state of the dips last frame */ |
| 384 | 384 | return deco16_prot_ram[0x34/2]; |
| r15082 | r15083 | |
| 390 | 390 | return (((deco16_prot_ram[0]&0xfff0)>>0) | ((deco16_prot_ram[0]&0x000c)>>2) | ((deco16_prot_ram[0]&0x0003)<<2)) & (~deco16_prot_ram[0x36/2]); |
| 391 | 391 | |
| 392 | 392 | case 0x76a: /* Coins */ |
| 393 | return | |
| 393 | return | |
| 394 | 394 | |
| 395 | 395 | case 0x284: /* Bit shifting with inverted mask register */ |
| 396 | 396 | return (((deco16_prot_ram[0x40/2]&0xfff0)>>0) | ((deco16_prot_ram[0x40/2]&0x0007)<<1) | ((deco16_prot_ram[0x40/2]&0x0008)>>3)) & (~deco16_prot_ram[0x36/2]); |
| r15082 | r15083 | |
| 404 | 404 | return (((deco16_prot_ram[0x6a/2]&0x00f0)<<4) | ((deco16_prot_ram[0x6a/2]&0x0f00)<<4) | ((deco16_prot_ram[0x6a/2]&0x0007)<<5) | ((deco16_prot_ram[0x6a/2]&0x0008)<<1)) & (~deco16_prot_ram[0x36/2]); |
| 405 | 405 | |
| 406 | 406 | case 0x7d6: /* XOR IN0 */ |
| 407 | return | |
| 407 | return | |
| 408 | 408 | case 0x4b4: |
| 409 | 409 | return ((deco16_prot_ram[0x32/2]&0x00f0)<<8) | ((deco16_prot_ram[0x32/2]&0x000e)<<7) | ((deco16_prot_ram[0x32/2]&0x0001)<<11); |
| 410 | 410 | } |
| r15082 | r15083 | |
| 467 | 467 | |
| 468 | 468 | switch (offset*2) { |
| 469 | 469 | case 0xac: /* Dip switches */ |
| 470 | return | |
| 470 | return | |
| 471 | 471 | case 0xc2: /* Dip switches */ |
| 472 | return | |
| 472 | return | |
| 473 | 473 | case 0x46: /* Coins */ |
| 474 | return | |
| 474 | return | |
| 475 | 475 | case 0x50: /* Player 1 & 2 input ports */ |
| 476 | return | |
| 476 | return | |
| 477 | 477 | case 0x63c: /* Player 1 & 2 input ports */ |
| 478 | return | |
| 478 | return | |
| 479 | 479 | |
| 480 | 480 | case 0x5f4: |
| 481 | 481 | return deco16_prot_ram[0x18/2]; |
| r15082 | r15083 | |
| 652 | 652 | return deco16_prot_ram[15]; |
| 653 | 653 | |
| 654 | 654 | case 0x36: /* Dip switches */ |
| 655 | return | |
| 655 | return | |
| 656 | 656 | |
| 657 | 657 | case 0x1c8: /* Coins */ |
| 658 | return | |
| 658 | return | |
| 659 | 659 | |
| 660 | 660 | case 0x22c: /* Player 1 & 2 input ports */ |
| 661 | return | |
| 661 | return | |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | logerror("Protection PC %06x: warning - read unmapped memory address %04x\n",cpu_get_pc(&space->device()),offset); |
| r15082 | r15083 | |
| 750 | 750 | return ((deco16_prot_ram[0x78e>>1]>>4)&0xff00) | (deco16_prot_ram[0x78e>>1]&0x000f) | ((deco16_prot_ram[0x78e>>1]<<8)&0xf000); |
| 751 | 751 | |
| 752 | 752 | case 0x00c >> 1: /* Player 1 & Player 2 joysticks & fire buttons */ |
| 753 | return | |
| 753 | return | |
| 754 | 754 | case 0x778 >> 1: /* Credits */ |
| 755 | return | |
| 755 | return | |
| 756 | 756 | case 0x382 >> 1: /* DIPS */ |
| 757 | return | |
| 757 | return | |
| 758 | 758 | } |
| 759 | 759 | |
| 760 | 760 | if (cpu_get_pc(&space->device())!=0xc0ea) |
| 761 | logerror("CPU #0 PC %06x: warning - read unmapped control address %06x (ctrl %04x)\n", cpu_get_pc(&space->device()), offset<<1, | |
| 761 | logerror("CPU #0 PC %06x: warning - read unmapped control address %06x (ctrl %04x)\n", cpu_get_pc(&space->device()), offset<<1, | |
| 762 | 762 | |
| 763 | 763 | return 0; |
| 764 | 764 | } |
| r15082 | r15083 | |
| 868 | 868 | |
| 869 | 869 | switch (offset) { |
| 870 | 870 | case 0x88/2: /* Player 1 & 2 input ports */ |
| 871 | return | |
| 871 | return | |
| 872 | 872 | case 0x36c/2: |
| 873 | return | |
| 873 | return | |
| 874 | 874 | case 0x44c/2: |
| 875 | return (( | |
| 875 | return (( | |
| 876 | 876 | case 0x292/2: /* Dips */ |
| 877 | return | |
| 877 | return | |
| 878 | 878 | |
| 879 | 879 | case 0x44/2: |
| 880 | 880 | return ((((DECO_PORT(0x2c)&0x000f)<<12)) ^ deco16_xor) & (~deco16_mask); |
| r15082 | r15083 | |
| 1253 | 1253 | switch (offset) |
| 1254 | 1254 | { |
| 1255 | 1255 | case 0x582: /* Player 1 & Player 2 */ |
| 1256 | return | |
| 1256 | return | |
| 1257 | 1257 | case 0x04c: /* Coins/VBL */ |
| 1258 | return | |
| 1258 | return | |
| 1259 | 1259 | case 0x672: /* Dip switches */ |
| 1260 | return | |
| 1260 | return | |
| 1261 | 1261 | |
| 1262 | 1262 | case 0x13a: |
| 1263 | 1263 | return ((DECO_PORT(0x190)&0x00f0)<<8) | ((DECO_PORT(0x190)&0x0003)<<10) | ((DECO_PORT(0x190)&0x000c)<<6); |
| r15082 | r15083 | |
| 1315 | 1315 | |
| 1316 | 1316 | /*********************************************************************************/ |
| 1317 | 1317 | |
| 1318 | // case 0x582: return input_port_read(space->machine(), "IN0"); /* IN0 */ | |
| 1319 | // case 0x672: return input_port_read(space->machine(), "IN1"); /* IN1 */ | |
| 1318 | // case 0x582: return space->machine().root_device().ioport("IN0")->read(); /* IN0 */ | |
| 1319 | // case 0x672: return space->machine().root_device().ioport("IN1")->read(); /* IN1 */ | |
| 1320 | 1320 | // case 0x04c: return space->machine().device<eeprom_device>("eeprom")->read_bit(); |
| 1321 | 1321 | |
| 1322 | 1322 | case 0x468: |
| r15082 | r15083 | |
| 1664 | 1664 | /* Special case inputs, because this is the only game with an eprom */ |
| 1665 | 1665 | switch (addr) |
| 1666 | 1666 | { |
| 1667 | case 0x582: return (input_port_read(space->machine(), "IN0")<<16) | 0xffff; /* IN0 */ | |
| 1668 | case 0x672: return (input_port_read(space->machine(), "IN1")<<16) | 0xffff; /* IN1 */ | |
| 1667 | case 0x582: return (space->machine().root_device().ioport("IN0")->read()<<16) | 0xffff; /* IN0 */ | |
| 1668 | case 0x672: return (space->machine().root_device().ioport("IN1")->read()<<16) | 0xffff; /* IN1 */ | |
| 1669 | 1669 | case 0x04c: return (space->machine().device<eeprom_device>("eeprom")->read_bit()<<16) | 0xffff; |
| 1670 | 1670 | } |
| 1671 | 1671 | |
| r15082 | r15083 | |
| 1740 | 1740 | { |
| 1741 | 1741 | switch (offset * 2) |
| 1742 | 1742 | { |
| 1743 | case 0x298: return input_port_read(space->machine(), "IN0"); | |
| 1744 | case 0x342: return input_port_read(space->machine(), "IN1"); | |
| 1745 | case 0x506: return input_port_read(space->machine(), "DSW"); | |
| 1743 | case 0x298: return space->machine().root_device().ioport("IN0")->read(); | |
| 1744 | case 0x342: return space->machine().root_device().ioport("IN1")->read(); | |
| 1745 | case 0x506: return space->machine().root_device().ioport("DSW")->read(); | |
| 1746 | 1746 | } |
| 1747 | 1747 | |
| 1748 | 1748 | logerror("Protection PC %06x: warning - read unmapped memory address %04x\n", cpu_get_pc(&space->device()), offset<<1); |
| r15082 | r15083 | |
| 1769 | 1769 | const UINT16* prot_ram=deco16_prot_ram; |
| 1770 | 1770 | switch (offset * 2) |
| 1771 | 1771 | { |
| 1772 | case 0x5b2: return input_port_read(space->machine(), "SYSTEM"); | |
| 1773 | case 0x44c: return input_port_read(space->machine(), "DSW"); | |
| 1774 | case 0x042: return input_port_read(space->machine(), "INPUTS"); | |
| 1772 | case 0x5b2: return space->machine().root_device().ioport("SYSTEM")->read(); | |
| 1773 | case 0x44c: return space->machine().root_device().ioport("DSW")->read(); | |
| 1774 | case 0x042: return space->machine().root_device().ioport("INPUTS")->read(); | |
| 1775 | 1775 | |
| 1776 | 1776 | case 0x510: return DECO_PORT(0); |
| 1777 | 1777 | case 0x51a: return DECO_PORT(2); |
| r15082 | r15083 | |
|---|---|---|
| 108 | 108 | { |
| 109 | 109 | switch (m_apache3_adc) |
| 110 | 110 | { |
| 111 | case 0: return input_port_read(machine(), "STICK_X"); | |
| 112 | case 1: return input_port_read(machine(), "STICK_Y"); | |
| 111 | case 0: return ioport("STICK_X")->read(); | |
| 112 | case 1: return ioport("STICK_Y")->read(); | |
| 113 | 113 | case 2: return 0; // VSP1 |
| 114 | 114 | case 3: return 0; |
| 115 | case 4: return (UINT8)((255./100) * (100 - input_port_read(machine(), "VR1"))); | |
| 116 | case 5: return input_port_read(machine(), "THROTTLE"); | |
| 115 | case 4: return (UINT8)((255./100) * (100 - ioport("VR1")->read())); | |
| 116 | case 5: return ioport("THROTTLE")->read(); | |
| 117 | 117 | case 6: return 0; // RPSNC |
| 118 | 118 | case 7: return 0; // LPSNC |
| 119 | 119 | } |
| r15082 | r15083 | |
|---|---|---|
| 1180 | 1180 | end_of_frame(screen.machine(), md_sms_vdp); |
| 1181 | 1181 | |
| 1182 | 1182 | // the SMS has a 'RESET' button on the machine, it generates an NMI |
| 1183 | if ( | |
| 1183 | if ( | |
| 1184 | 1184 | cputag_set_input_line(screen.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 1185 | 1185 | } |
| 1186 | 1186 | } |
| r15082 | r15083 | |
| 1464 | 1464 | |
| 1465 | 1465 | static UINT8 ioport_gg00_r(running_machine& machine) |
| 1466 | 1466 | { |
| 1467 | UINT8 GG_START_BUTTON = in | |
| 1467 | UINT8 GG_START_BUTTON = machine. | |
| 1468 | 1468 | |
| 1469 | 1469 | return (GG_START_BUTTON << 7) | |
| 1470 | 1470 | (0 << 6) | |
| r15082 | r15083 | |
| 1567 | 1567 | running_machine &machine = space->machine(); |
| 1568 | 1568 | /* 2009-05 FP: would it be worth to give separate inputs to SMS? SMS has only 2 keys A,B (which are B,C on megadrive) */ |
| 1569 | 1569 | /* bit 4: TL-A; bit 5: TR-A */ |
| 1570 | return (in | |
| 1570 | return (machine.root_device().ioport | |
| 1571 | 1571 | } |
| 1572 | 1572 | |
| 1573 | 1573 | READ8_HANDLER (megatech_sms_ioport_dd_r) |
| r15082 | r15083 | |
| 1575 | 1575 | running_machine &machine = space->machine(); |
| 1576 | 1576 | /* 2009-05 FP: would it be worth to give separate inputs to SMS? SMS has only 2 keys A,B (which are B,C on megadrive) */ |
| 1577 | 1577 | /* bit 2: TL-B; bit 3: TR-B; bit 4: RESET; bit 5: unused; bit 6: TH-A; bit 7: TH-B*/ |
| 1578 | return ((in | |
| 1578 | return ((machine.root_device().ioport | |
| 1579 | 1579 | } |
| 1580 | 1580 | |
| 1581 | 1581 |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | int p2_vert; |
| 59 | 59 | int temp; |
| 60 | 60 | |
| 61 | p1_horiz = input_port_read(machine(), "TRACK0_X"); | |
| 62 | p1_vert = input_port_read(machine(), "TRACK0_Y"); | |
| 63 | p2_horiz = input_port_read(machine(), "TRACK1_X"); | |
| 64 | p2_vert = input_port_read(machine(), "TRACK1_Y"); | |
| 61 | p1_horiz = ioport("TRACK0_X")->read(); | |
| 62 | p1_vert = ioport("TRACK0_Y")->read(); | |
| 63 | p2_horiz = ioport("TRACK1_X")->read(); | |
| 64 | p2_vert = ioport("TRACK1_Y")->read(); | |
| 65 | 65 | |
| 66 | 66 | /* Set direction bits */ |
| 67 | 67 | |
| r15082 | r15083 | |
| 146 | 146 | } |
| 147 | 147 | else |
| 148 | 148 | { |
| 149 | temp = i | |
| 149 | temp = iop | |
| 150 | 150 | |
| 151 | 151 | return (temp | m_dir0 | m_dir1 | m_dir2 | m_dir3); |
| 152 | 152 | } |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | atarigen_init(machine); |
| 60 | 60 | |
| 61 | 61 | /* predetermine memory regions */ |
| 62 | state->m_sim_memory = (UINT16 *) | |
| 62 | state->m_sim_memory = (UINT16 *)sta | |
| 63 | 63 | state->m_sim_memory_size = state->memregion("user1")->bytes() / 2; |
| 64 | 64 | state->m_adsp_pgm_memory_word = (UINT16 *)(reinterpret_cast<UINT8 *>(state->m_adsp_pgm_memory.target()) + 1); |
| 65 | 65 | } |
| r15082 | r15083 | |
| 238 | 238 | ..... |
| 239 | 239 | 0x8000 = SW1 #1 |
| 240 | 240 | */ |
| 241 | int temp = | |
| 241 | int temp = | |
| 242 | 242 | if (atarigen_get_hblank(*space->machine().primary_screen)) temp ^= 0x0002; |
| 243 | 243 | temp ^= 0x0018; /* both EOCs always high for now */ |
| 244 | 244 | return temp; |
| r15082 | r15083 | |
| 248 | 248 | READ16_HANDLER( hdc68k_port1_r ) |
| 249 | 249 | { |
| 250 | 250 | harddriv_state *state = space->machine().driver_data<harddriv_state>(); |
| 251 | UINT16 result = | |
| 251 | UINT16 result = s | |
| 252 | 252 | UINT16 diff = result ^ state->m_hdc68k_last_port1; |
| 253 | 253 | |
| 254 | 254 | /* if a new shifter position is selected, use it */ |
| r15082 | r15083 | |
| 277 | 277 | READ16_HANDLER( hda68k_port1_r ) |
| 278 | 278 | { |
| 279 | 279 | harddriv_state *state = space->machine().driver_data<harddriv_state>(); |
| 280 | UINT16 result = | |
| 280 | UINT16 result = s | |
| 281 | 281 | |
| 282 | 282 | /* merge in the wheel edge latch bit */ |
| 283 | 283 | if (state->m_hdc68k_wheel_edge) |
| r15082 | r15083 | |
| 292 | 292 | harddriv_state *state = space->machine().driver_data<harddriv_state>(); |
| 293 | 293 | |
| 294 | 294 | /* grab the new wheel value and upconvert to 12 bits */ |
| 295 | UINT16 new_wheel = | |
| 295 | UINT16 new_wheel = s | |
| 296 | 296 | |
| 297 | 297 | /* hack to display the wheel position */ |
| 298 | 298 | if (space->machine().input().code_pressed(KEYCODE_LSHIFT)) |
| r15082 | r15083 | |
| 350 | 350 | if (state->m_adc_control & 0x08) |
| 351 | 351 | { |
| 352 | 352 | state->m_adc8_select = state->m_adc_control & 0x07; |
| 353 | state->m_adc8_data = | |
| 353 | state->m_adc8_data = s | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | /* handle a write to the 12-bit ADC address select */ |
| 357 | 357 | if (state->m_adc_control & 0x40) |
| 358 | 358 | { |
| 359 | 359 | state->m_adc12_select = (state->m_adc_control >> 4) & 0x03; |
| 360 | state->m_adc12_data = | |
| 360 | state->m_adc12_data = | |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /* bit 7 selects which byte of the 12 bit data to read */ |
| r15082 | r15083 | |
|---|---|---|
| 111 | 111 | switch (data & 0x03) |
| 112 | 112 | { |
| 113 | 113 | case 0: |
| 114 | state->m_pbus = | |
| 114 | state->m_pbus = s | |
| 115 | 115 | break; |
| 116 | 116 | case 1: |
| 117 | state->m_pbus = | |
| 117 | state->m_pbus = s | |
| 118 | 118 | break; |
| 119 | 119 | case 2: |
| 120 | state->m_pbus = | |
| 120 | state->m_pbus = s | |
| 121 | 121 | break; |
| 122 | 122 | case 3: |
| 123 | state->m_pbus = | |
| 123 | state->m_pbus = s | |
| 124 | 124 | break; |
| 125 | 125 | } |
| 126 | 126 | } |
| r15082 | r15083 | |
|---|---|---|
| 2059 | 2059 | |
| 2060 | 2060 | if ( calc3.mcu_status != (1|2|4|8) ) return; |
| 2061 | 2061 | |
| 2062 | if (calc3.dsw_addr) space->write_byte(calc3.dsw_addr+0x200000, ( ~i | |
| 2062 | if (calc3.dsw_addr) space->write_byte(calc3.dsw_addr+0x200000, ( ~state->iop | |
| 2063 | 2063 | |
| 2064 | 2064 | |
| 2065 | 2065 | //calc3.mcu_status = 0; |
| r15082 | r15083 | |
| 2100 | 2100 | printf("Calc 3 Init Command - %04x ROM Checksum Address\n", calc3.checksumaddress); |
| 2101 | 2101 | printf("Calc 3 Init Command - %08x Data Write Address\n", calc3.writeaddress); |
| 2102 | 2102 | #endif |
| 2103 | // space->write_byte(calc3.dsw_addr+0x200000, ( ~i | |
| 2103 | // space->write_byte(calc3.dsw_addr+0x200000, ( ~state->iop | |
| 2104 | 2104 | |
| 2105 | 2105 | state->m_mcu_ram[calc3.checksumaddress / 2] = calc3.mcu_crc; // MCU Rom Checksum! |
| 2106 | 2106 | |
| r15082 | r15083 | |
| 2406 | 2406 | |
| 2407 | 2407 | case 0x03: // DSW |
| 2408 | 2408 | { |
| 2409 | kaneko16_mcu_ram[mcu_offset] = in | |
| 2409 | kaneko16_mcu_ram[mcu_offset] = machine.root_device().ioport | |
| 2410 | 2410 | logerror("%s : MCU executed command: %04X %04X (read DSW)\n", machine.describe_context(), mcu_command, mcu_offset*2); |
| 2411 | 2411 | } |
| 2412 | 2412 | break; |
| r15082 | r15083 | |
| 2464 | 2464 | |
| 2465 | 2465 | case 0x03: // DSW |
| 2466 | 2466 | { |
| 2467 | kaneko16_mcu_ram[mcu_offset] = in | |
| 2467 | kaneko16_mcu_ram[mcu_offset] = machine.root_device().ioport | |
| 2468 | 2468 | logerror("%s : MCU executed command: %04X %04X (read DSW)\n", machine.describe_context(), mcu_command, mcu_offset*2); |
| 2469 | 2469 | } |
| 2470 | 2470 | break; |
| r15082 | r15083 | |
| 2537 | 2537 | |
| 2538 | 2538 | case 0x03: // DSW |
| 2539 | 2539 | { |
| 2540 | kaneko16_mcu_ram[mcu_offset] = in | |
| 2540 | kaneko16_mcu_ram[mcu_offset] = machine.root_device().ioport | |
| 2541 | 2541 | } |
| 2542 | 2542 | break; |
| 2543 | 2543 |
| r15082 | r15083 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | // The mode is dependent on the region |
| 23 | 23 | static const int modes[4] = { 1, 1, 3, 2 }; |
| 24 | int mode = modes[in | |
| 24 | int mode = modes[machine.root_device().ioport | |
| 25 | 25 | |
| 26 | 26 | switch (mode) |
| 27 | 27 | { |
| r15082 | r15083 | |
| 60 | 60 | |
| 61 | 61 | switch (state->m_asic3_reg) |
| 62 | 62 | { |
| 63 | case 0x00: res = (state->m_asic3_latch[0] & 0xf7) | (( | |
| 63 | case 0x00: res = (state->m_asic3_latch[0] & 0xf7) | ((s | |
| 64 | 64 | case 0x01: res = state->m_asic3_latch[1]; break; |
| 65 | case 0x02: res = (state->m_asic3_latch[2] & 0x7f) | (( | |
| 65 | case 0x02: res = (state->m_asic3_latch[2] & 0x7f) | ((s | |
| 66 | 66 | case 0x03: |
| 67 | 67 | res = (BIT(state->m_asic3_hold, 15) << 0) |
| 68 | 68 | | (BIT(state->m_asic3_hold, 12) << 1) |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | static READ8_DEVICE_HANDLER( zwackery_port_1_r ) |
| 43 | 43 | { |
| 44 | UINT8 ret = | |
| 44 | UINT8 ret = | |
| 45 | 45 | |
| 46 | 46 | downcast<pia6821_device *>(device)->set_port_a_z_mask(ret); |
| 47 | 47 | |
| r15082 | r15083 | |
| 51 | 51 | |
| 52 | 52 | static READ8_DEVICE_HANDLER( zwackery_port_3_r ) |
| 53 | 53 | { |
| 54 | UINT8 ret = | |
| 54 | UINT8 ret = | |
| 55 | 55 | |
| 56 | 56 | downcast<pia6821_device *>(device)->set_port_a_z_mask(ret); |
| 57 | 57 |
| r15082 | r15083 | |
|---|---|---|
| 154 | 154 | (m_sign_x_2 >> 6) | |
| 155 | 155 | (m_sign_y_1 >> 5) | |
| 156 | 156 | (m_sign_x_1 >> 4) | |
| 157 | i | |
| 157 | iop | |
| 158 | 158 | return val; |
| 159 | 159 | } |
| 160 | 160 | else |
| r15082 | r15083 | |
| 162 | 162 | int new_x, new_y; |
| 163 | 163 | |
| 164 | 164 | /* Read player 1 trackball */ |
| 165 | new_x = i | |
| 165 | new_x = iop | |
| 166 | 166 | if (new_x != m_counter_x_in0) |
| 167 | 167 | { |
| 168 | 168 | m_sign_x_1 = (new_x - m_counter_x_in0) & 0x80; |
| 169 | 169 | m_counter_x_in0 = new_x; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | new_y = i | |
| 172 | new_y = iop | |
| 173 | 173 | if (new_y != m_counter_y_in0) |
| 174 | 174 | { |
| 175 | 175 | m_sign_y_1 = (new_y - m_counter_y_in0) & 0x80; |
| r15082 | r15083 | |
| 186 | 186 | |
| 187 | 187 | if ((m_CTRLD & 0x20) == 0x00) |
| 188 | 188 | { |
| 189 | return i | |
| 189 | return iop | |
| 190 | 190 | } |
| 191 | 191 | else |
| 192 | 192 | { |
| 193 | 193 | int new_x, new_y; |
| 194 | 194 | |
| 195 | 195 | /* Read player 2 trackball */ |
| 196 | new_x = i | |
| 196 | new_x = iop | |
| 197 | 197 | if (new_x != m_counter_x_in2) |
| 198 | 198 | { |
| 199 | 199 | m_sign_x_2 = (new_x - m_counter_x_in2) & 0x80; |
| 200 | 200 | m_counter_x_in2 = new_x; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | new_y = i | |
| 203 | new_y = iop | |
| 204 | 204 | if (new_y != m_counter_y_in2) |
| 205 | 205 | { |
| 206 | 206 | m_sign_y_2 = (new_y - m_counter_y_in2) & 0x80; |
| r15082 | r15083 | |
| 235 | 235 | int new_x, new_y; |
| 236 | 236 | |
| 237 | 237 | /* Read player 1 trackball */ |
| 238 | new_x = i | |
| 238 | new_x = iop | |
| 239 | 239 | if (new_x != m_counter_x_in0) |
| 240 | 240 | { |
| 241 | 241 | m_sign_x_1 = (new_x - m_counter_x_in0) & 0x80; |
| 242 | 242 | m_counter_x_in0 = new_x; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | new_y = i | |
| 245 | new_y = iop | |
| 246 | 246 | if (new_y != m_counter_y_in0) |
| 247 | 247 | { |
| 248 | 248 | m_sign_y_1 = (new_y - m_counter_y_in0) & 0x80; |
| r15082 | r15083 | |
| 257 | 257 | int new_x, new_y; |
| 258 | 258 | |
| 259 | 259 | /* Read player 2 trackball */ |
| 260 | new_x = i | |
| 260 | new_x = iop | |
| 261 | 261 | if (new_x != m_counter_x_in0b) |
| 262 | 262 | { |
| 263 | 263 | m_sign_x_2 = (new_x - m_counter_x_in0b) & 0x80; |
| 264 | 264 | m_counter_x_in0b = new_x; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | new_y = i | |
| 267 | new_y = iop | |
| 268 | 268 | if (new_y != m_counter_y_in0b) |
| 269 | 269 | { |
| 270 | 270 | m_sign_y_2 = (new_y - m_counter_y_in0b) & 0x80; |
| r15082 | r15083 | |
| 283 | 283 | |
| 284 | 284 | if ((m_CTRLD & 0x40) == 0x00) |
| 285 | 285 | { |
| 286 | return i | |
| 286 | return iop | |
| 287 | 287 | } |
| 288 | 288 | else if ((m_CTRLD & 0x60) == 0x60) |
| 289 | 289 | /* LD1 and LD2 both high, return Team 2 right player (player 3) */ |
| r15082 | r15083 | |
| 291 | 291 | int new_x, new_y; |
| 292 | 292 | |
| 293 | 293 | /* Read player 3 trackball */ |
| 294 | new_x = i | |
| 294 | new_x = iop | |
| 295 | 295 | if (new_x != m_counter_x_in2) |
| 296 | 296 | { |
| 297 | 297 | m_sign_x_3 = (new_x - m_counter_x_in2) & 0x80; |
| 298 | 298 | m_counter_x_in2 = new_x; |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | new_y = i | |
| 301 | new_y = iop | |
| 302 | 302 | if (new_y != m_counter_y_in2) |
| 303 | 303 | { |
| 304 | 304 | m_sign_y_3 = (new_y - m_counter_y_in2) & 0x80; |
| r15082 | r15083 | |
| 313 | 313 | int new_x, new_y; |
| 314 | 314 | |
| 315 | 315 | /* Read player 4 trackball */ |
| 316 | new_x = i | |
| 316 | new_x = iop | |
| 317 | 317 | if (new_x != m_counter_x_in2b) |
| 318 | 318 | { |
| 319 | 319 | m_sign_x_4 = (new_x - m_counter_x_in2b) & 0x80; |
| 320 | 320 | m_counter_x_in2b = new_x; |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | new_y = i | |
| 323 | new_y = iop | |
| 324 | 324 | if (new_y != m_counter_y_in2b) |
| 325 | 325 | { |
| 326 | 326 | m_sign_y_4 = (new_y - m_counter_y_in2b) & 0x80; |
| r15082 | r15083 | |
|---|---|---|
| 17 | 17 | if (data == 0xff) |
| 18 | 18 | return; |
| 19 | 19 | |
| 20 | i | |
| 20 | iop | |
| 21 | 21 | |
| 22 | 22 | m_video_bank = data & 0x03; |
| 23 | 23 | simpsons_video_banking(machine(), m_video_bank); |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | { |
| 73 | 73 | dest[0] = 0x20000000; // Controller |
| 74 | 74 | dest[1] = |
| 75 | (input_port_exists(machine(), port_tag[2]) ? 0x010000 : 0) | | |
| 76 | (input_port_exists(machine(), port_tag[3]) ? 0x020000 : 0) | | |
| 77 | (input_port_exists(machine(), port_tag[4]) ? 0x040000 : 0) | | |
| 78 | (input_port_exists(machine(), port_tag[5]) ? 0x080000 : 0) | | |
| 79 | (input_port_exists(machine(), port_tag[6]) ? 0x100000 : 0) | | |
| 80 | (input_port_exists(machine(), port_tag[7]) ? 0x200000 : 0) | | |
| 81 | (input_port_active_safe(machine(), port_tag[0], 0) << 8) | | |
| 82 | input_port_active_safe(machine(), port_tag[1], 0); // 1st function - controller | |
| 75 | ((machine().root_device().ioport(port_tag[2]) != NULL) ? 0x010000 : 0) | | |
| 76 | ((machine().root_device().ioport(port_tag[3]) != NULL) ? 0x020000 : 0) | | |
| 77 | ((machine().root_device().ioport(port_tag[4]) != NULL) ? 0x040000 : 0) | | |
| 78 | ((machine().root_device().ioport(port_tag[5]) != NULL) ? 0x080000 : 0) | | |
| 79 | ((machine().root_device().ioport(port_tag[6]) != NULL) ? 0x100000 : 0) | | |
| 80 | ((machine().root_device().ioport(port_tag[7]) != NULL) ? 0x200000 : 0) | | |
| 81 | (machine().root_device().ioport(port_tag[0])->active_safe(0) << 8) | | |
| 82 | machine().root_device().ioport(port_tag[1])->active_safe(0); // 1st function - controller | |
| 83 | 83 | dest[2] = 0; // No 2nd function |
| 84 | 84 | dest[3] = 0; // No 3rd function |
| 85 | 85 | dest[4] = 0x00ff; // Every region, no expansion |
| r15082 | r15083 | |
| 97 | 97 | { |
| 98 | 98 | dest[0] = 0x21000000; // Controller |
| 99 | 99 | dest[1] = |
| 100 | input_port_read_safe(machine(), port_tag[0], 0xff) | | |
| 101 | (input_port_read_safe(machine(), port_tag[1], 0xff) << 8) | | |
| 102 | (input_port_read_safe(machine(), port_tag[2], 0x00) << 16) | | |
| 103 | (input_port_read_safe(machine(), port_tag[3], 0x00) << 24); | |
| 100 | ioport(port_tag[0])->read_safe(0xff) | | |
| 101 | (ioport(port_tag[1])->read_safe(0xff) << 8) | | |
| 102 | (ioport(port_tag[2])->read_safe(0x00) << 16) | | |
| 103 | (ioport(port_tag[3])->read_safe(0x00) << 24); | |
| 104 | 104 | dest[2] = |
| 105 | input_port_read_safe(machine(), port_tag[4], 0x80) | | |
| 106 | (input_port_read_safe(machine(), port_tag[5], 0x80) << 8) | | |
| 107 | (input_port_read_safe(machine(), port_tag[6], 0x80) << 16) | | |
| 108 | (input_port_read_safe(machine(), port_tag[7], 0x80) << 24); | |
| 105 | ioport(port_tag[4])->read_safe(0x80) | | |
| 106 | (ioport(port_tag[5])->read_safe(0x80) << 8) | | |
| 107 | (ioport(port_tag[6])->read_safe(0x80) << 16) | | |
| 108 | (ioport(port_tag[7])->read_safe(0x80) << 24); | |
| 109 | 109 | } |
| 110 | 110 |
| r15082 | r15083 | |
|---|---|---|
| 488 | 488 | |
| 489 | 489 | READ16_MEMBER(micro3d_state::micro3d_encoder_h_r) |
| 490 | 490 | { |
| 491 | UINT16 x_encoder = input_port_read_safe(machine(), "JOYSTICK_X", 0); | |
| 492 | UINT16 y_encoder = input_port_read_safe(machine(), "JOYSTICK_Y", 0); | |
| 491 | UINT16 x_encoder = ioport("JOYSTICK_X")->read_safe(0); | |
| 492 | UINT16 y_encoder = ioport("JOYSTICK_Y")->read_safe(0); | |
| 493 | 493 | |
| 494 | 494 | return (y_encoder & 0xf00) | ((x_encoder & 0xf00) >> 8); |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | READ16_MEMBER(micro3d_state::micro3d_encoder_l_r) |
| 498 | 498 | { |
| 499 | UINT16 x_encoder = input_port_read_safe(machine(), "JOYSTICK_X", 0); | |
| 500 | UINT16 y_encoder = input_port_read_safe(machine(), "JOYSTICK_Y", 0); | |
| 499 | UINT16 x_encoder = ioport("JOYSTICK_X")->read_safe(0); | |
| 500 | UINT16 y_encoder = ioport("JOYSTICK_Y")->read_safe(0); | |
| 501 | 501 | |
| 502 | 502 | return ((y_encoder & 0xff) << 8) | (x_encoder & 0xff); |
| 503 | 503 | } |
| r15082 | r15083 | |
| 508 | 508 | |
| 509 | 509 | switch (param) |
| 510 | 510 | { |
| 511 | case 0: state->m_adc_val = i | |
| 511 | case 0: state->m_adc_val = state->iop | |
| 512 | 512 | break; |
| 513 | case 1: state->m_adc_val = (UINT8)((255.0/100.0) * i | |
| 513 | case 1: state->m_adc_val = (UINT8)((255.0/100.0) * state->iop | |
| 514 | 514 | break; |
| 515 | 515 | case 2: break; |
| 516 | 516 | case 3: break; |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | MACHINE_START( pc10 ) |
| 47 | 47 | { |
| 48 | 48 | playch10_state *state = machine.driver_data<playch10_state>(); |
| 49 | state->m_vrom = | |
| 49 | state->m_vrom = sta | |
| 50 | 50 | |
| 51 | 51 | /* allocate 4K of nametable ram here */ |
| 52 | 52 | /* move to individual boards as documentation of actual boards allows */ |
| r15082 | r15083 | |
| 214 | 214 | return; |
| 215 | 215 | |
| 216 | 216 | /* load up the latches */ |
| 217 | m_input_latch[0] = input_port_read(machine(), "P1"); | |
| 218 | m_input_latch[1] = input_port_read(machine(), "P2"); | |
| 217 | m_input_latch[0] = ioport("P1")->read(); | |
| 218 | m_input_latch[1] = ioport("P2")->read(); | |
| 219 | 219 | |
| 220 | 220 | /* apply any masking from the BIOS */ |
| 221 | 221 | if (m_cntrl_mask) |
| r15082 | r15083 | |
| 250 | 250 | if (m_pc10_gun_controller) |
| 251 | 251 | { |
| 252 | 252 | ppu2c0x_device *ppu = machine().device<ppu2c0x_device>("ppu"); |
| 253 | int trigger = input_port_read(machine(), "P1"); | |
| 254 | int x = input_port_read(machine(), "GUNX"); | |
| 255 | int y = input_port_read(machine(), "GUNY"); | |
| 253 | int trigger = ioport("P1")->read(); | |
| 254 | int x = ioport("GUNX")->read(); | |
| 255 | int y = ioport("GUNY")->read(); | |
| 256 | 256 | UINT32 pix, color_base; |
| 257 | 257 | |
| 258 | 258 | /* no sprite hit (yet) */ |
| r15082 | r15083 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | READ8_DEVICE_HANDLER(atari_pia_pa_r) |
| 66 | 66 | { |
| 67 | return | |
| 67 | return | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | READ8_DEVICE_HANDLER(atari_pia_pb_r) |
| 71 | 71 | { |
| 72 | return | |
| 72 | return | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w) { a600xl_mmu(device->machine(), data); } |
| r15082 | r15083 | |
| 169 | 169 | /* check keyboard */ |
| 170 | 170 | for( i = 0; i < 8; i++ ) |
| 171 | 171 | { |
| 172 | ipt = in | |
| 172 | ipt = machine.root_device().ioport(tag[i])->read_safe( | |
| 173 | 173 | |
| 174 | 174 | if( ipt ) |
| 175 | 175 | { |
| r15082 | r15083 | |
| 183 | 183 | atari_code = i*8 + count; |
| 184 | 184 | |
| 185 | 185 | /* SHIFT */ |
| 186 | if(in | |
| 186 | if(machine.root_device().ioport("fake")->read_safe( | |
| 187 | 187 | atari_code |= 0x40; |
| 188 | 188 | |
| 189 | 189 | /* CTRL */ |
| 190 | if(in | |
| 190 | if(machine.root_device().ioport("fake")->read_safe( | |
| 191 | 191 | atari_code |= 0x80; |
| 192 | 192 | |
| 193 | 193 | if( atari_code != AKEY_NONE ) |
| r15082 | r15083 | |
| 251 | 251 | /* check keypad */ |
| 252 | 252 | for( i = 0; i < 4; i++ ) |
| 253 | 253 | { |
| 254 | ipt = in | |
| 254 | ipt = machine.root_device().ioport(tag[i])->read_safe( | |
| 255 | 255 | |
| 256 | 256 | if( ipt ) |
| 257 | 257 | { |
| r15082 | r15083 | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | /* check top button */ |
| 284 | if ((in | |
| 284 | if ((machine.root_device().ioport | |
| 285 | 285 | { |
| 286 | 286 | if (atari_last == 0xfe) |
| 287 | 287 | return; |
| r15082 | r15083 | |
| 316 | 316 | |
| 317 | 317 | static UINT8 console_read(address_space *space) |
| 318 | 318 | { |
| 319 | return | |
| 319 | return | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 |
| r15082 | r15083 | |
|---|---|---|
| 345 | 345 | static const char *const padnames[] = { "JOY1", "JOY2" }; |
| 346 | 346 | UINT16 pad_data; |
| 347 | 347 | |
| 348 | pad_data = in | |
| 348 | pad_data = machine.root_device().ioport | |
| 349 | 349 | state->m_smpc.OREG[0+pad_num*offset] = 0xf1; |
| 350 | 350 | state->m_smpc.OREG[1+pad_num*offset] = 0x02; |
| 351 | 351 | state->m_smpc.OREG[2+pad_num*offset] = pad_data>>8; |
| r15082 | r15083 | |
| 360 | 360 | { "AN_X2", "AN_Y2", "AN_Z2" }}; |
| 361 | 361 | UINT16 pad_data; |
| 362 | 362 | |
| 363 | pad_data = in | |
| 363 | pad_data = machine.root_device().ioport | |
| 364 | 364 | state->m_smpc.OREG[0+pad_num*offset] = 0xf1; |
| 365 | 365 | state->m_smpc.OREG[1+pad_num*offset] = id; |
| 366 | 366 | state->m_smpc.OREG[2+pad_num*offset] = pad_data>>8; |
| 367 | 367 | state->m_smpc.OREG[3+pad_num*offset] = pad_data & 0xff; |
| 368 | state->m_smpc.OREG[4+pad_num*offset] = in | |
| 368 | state->m_smpc.OREG[4+pad_num*offset] = machine.root_device().ioport | |
| 369 | 369 | if(id == 0x15) |
| 370 | 370 | { |
| 371 | state->m_smpc.OREG[5+pad_num*offset] = input_port_read(machine, annames[pad_num][1]); | |
| 372 | state->m_smpc.OREG[6+pad_num*offset] = input_port_read(machine, annames[pad_num][2]); | |
| 371 | state->m_smpc.OREG[5+pad_num*offset] = machine.root_device().ioport(annames[pad_num][1])->read(); | |
| 372 | state->m_smpc.OREG[6+pad_num*offset] = machine.root_device().ioport(annames[pad_num][2])->read(); | |
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | |
| r15082 | r15083 | |
| 380 | 380 | |
| 381 | 381 | game_key = 0xffff; |
| 382 | 382 | |
| 383 | game_key ^= ((input_port_read(machine, "KEYS_1") & 0x80) << 8); // right | |
| 384 | game_key ^= ((input_port_read(machine, "KEYS_1") & 0x40) << 8); // left | |
| 385 | game_key ^= ((input_port_read(machine, "KEYS_1") & 0x20) << 8); // down | |
| 386 | game_key ^= ((input_port_read(machine, "KEYS_1") & 0x10) << 8); // up | |
| 387 | game_key ^= ((input_port_read(machine, "KEYF") & 0x80) << 4); // ESC -> START | |
| 388 | game_key ^= ((input_port_read(machine, "KEY3") & 0x04) << 8); // Z / A trigger | |
| 389 | game_key ^= ((input_port_read(machine, "KEY4") & 0x02) << 8); // C / C trigger | |
| 390 | game_key ^= ((input_port_read(machine, "KEY6") & 0x04) << 6); // X / B trigger | |
| 391 | game_key ^= ((input_port_read(machine, "KEY2") & 0x20) << 2); // Q / R trigger | |
| 392 | game_key ^= ((input_port_read(machine, "KEY3") & 0x10) << 2); // A / X trigger | |
| 393 | game_key ^= ((input_port_read(machine, "KEY3") & 0x08) << 2); // S / Y trigger | |
| 394 | game_key ^= ((input_port_read(machine, "KEY4") & 0x08) << 1); // D / Z trigger | |
| 395 | game_key ^= ((input_port_read(machine, "KEY4") & 0x10) >> 1); // E / L trigger | |
| 383 | game_key ^= ((state->ioport("KEYS_1")->read() & 0x80) << 8); // right | |
| 384 | game_key ^= ((state->ioport("KEYS_1")->read() & 0x40) << 8); // left | |
| 385 | game_key ^= ((state->ioport("KEYS_1")->read() & 0x20) << 8); // down | |
| 386 | game_key ^= ((state->ioport("KEYS_1")->read() & 0x10) << 8); // up | |
| 387 | game_key ^= ((state->ioport("KEYF")->read() & 0x80) << 4); // ESC -> START | |
| 388 | game_key ^= ((state->ioport("KEY3")->read() & 0x04) << 8); // Z / A trigger | |
| 389 | game_key ^= ((state->ioport("KEY4")->read() & 0x02) << 8); // C / C trigger | |
| 390 | game_key ^= ((state->ioport("KEY6")->read() & 0x04) << 6); // X / B trigger | |
| 391 | game_key ^= ((state->ioport("KEY2")->read() & 0x20) << 2); // Q / R trigger | |
| 392 | game_key ^= ((state->ioport("KEY3")->read() & 0x10) << 2); // A / X trigger | |
| 393 | game_key ^= ((state->ioport("KEY3")->read() & 0x08) << 2); // S / Y trigger | |
| 394 | game_key ^= ((state->ioport("KEY4")->read() & 0x08) << 1); // D / Z trigger | |
| 395 | game_key ^= ((state->ioport("KEY4")->read() & 0x10) >> 1); // E / L trigger | |
| 396 | 396 | |
| 397 | 397 | state->m_smpc.OREG[0+pad_num*offset] = 0xf1; |
| 398 | 398 | state->m_smpc.OREG[1+pad_num*offset] = 0x34; |
| r15082 | r15083 | |
| 420 | 420 | UINT8 mouse_ctrl; |
| 421 | 421 | INT16 mouse_x, mouse_y; |
| 422 | 422 | |
| 423 | mouse_ctrl = input_port_read(machine, mousenames[pad_num][0]); | |
| 424 | mouse_x = input_port_read(machine, mousenames[pad_num][1]); | |
| 425 | mouse_y = input_port_read(machine, mousenames[pad_num][2]); | |
| 423 | mouse_ctrl = machine.root_device().ioport(mousenames[pad_num][0])->read(); | |
| 424 | mouse_x = machine.root_device().ioport(mousenames[pad_num][1])->read(); | |
| 425 | mouse_y = machine.root_device().ioport(mousenames[pad_num][2])->read(); | |
| 426 | 426 | |
| 427 | 427 | if(mouse_x < 0) |
| 428 | 428 | mouse_ctrl |= 0x10; |
| r15082 | r15083 | |
| 450 | 450 | static const char *const padnames[] = { "MD_JOY1", "MD_JOY2" }; |
| 451 | 451 | UINT16 pad_data; |
| 452 | 452 | |
| 453 | pad_data = in | |
| 453 | pad_data = machine.root_device().ioport | |
| 454 | 454 | state->m_smpc.OREG[0+pad_num*offset] = 0xf1; |
| 455 | 455 | state->m_smpc.OREG[1+pad_num*offset] = id; |
| 456 | 456 | state->m_smpc.OREG[2+pad_num*offset] = pad_data>>8; |
| r15082 | r15083 | |
| 475 | 475 | |
| 476 | 476 | // if (LOG_SMPC) logerror("SMPC: providing PAD data for intback, pad %d\n", intback_stage-2); |
| 477 | 477 | |
| 478 | read_id[0] = (input_port_read(machine, "INPUT_TYPE")) & 0x0f; | |
| 479 | read_id[1] = (input_port_read(machine, "INPUT_TYPE")) >> 4; | |
| 478 | read_id[0] = (machine.root_device().ioport("INPUT_TYPE")->read()) & 0x0f; | |
| 479 | read_id[1] = (machine.root_device().ioport("INPUT_TYPE")->read()) >> 4; | |
| 480 | 480 | |
| 481 | 481 | /* doesn't work? */ |
| 482 | 482 | //pad_num = state->m_smpc.intback_stage - 1; |
| r15082 | r15083 | |
| 744 | 744 | return_data = state->m_smpc.SF; |
| 745 | 745 | |
| 746 | 746 | if (offset == 0x75)//PDR1 read |
| 747 | return_data = | |
| 747 | return_data = s | |
| 748 | 748 | |
| 749 | 749 | if (offset == 0x77)//PDR2 read |
| 750 | 750 | return_data = (0xfe | space->machine().device<eeprom_device>("eeprom")->read_bit()); |
| r15082 | r15083 | |
| 866 | 866 | const int shift_bit[4] = { 4, 12, 8, 0 }; |
| 867 | 867 | const char *const padnames[] = { "JOY1", "JOY2" }; |
| 868 | 868 | |
| 869 | if( | |
| 869 | if( | |
| 870 | 870 | { |
| 871 | 871 | popmessage("Warning: read with SH-2 direct mode with a non-pad device"); |
| 872 | 872 | return 0; |
| r15082 | r15083 | |
| 879 | 879 | |
| 880 | 880 | if (LOG_SMPC) logerror("SMPC: SH-2 direct mode, returning data for phase %d\n", hshake); |
| 881 | 881 | |
| 882 | return_data = 0x80 | 0x10 | (( | |
| 882 | return_data = 0x80 | 0x10 | (( | |
| 883 | 883 | } |
| 884 | 884 | } |
| 885 | 885 |
| r15082 | r15083 | |
|---|---|---|
| 184 | 184 | MACHINE_START( acitya ) |
| 185 | 185 | { |
| 186 | 186 | pacman_state *state = machine.driver_data<pacman_state>(); |
| 187 | UINT8 *RAM = | |
| 187 | UINT8 *RAM = sta | |
| 188 | 188 | |
| 189 | 189 | /* While the PAL supports up to 16 decryption methods, only four |
| 190 | 190 | are actually used in the PAL. Therefore, we'll take a little |
| r15082 | r15083 | |
|---|---|---|
| 334 | 334 | } |
| 335 | 335 | else |
| 336 | 336 | { |
| 337 | UINT32 protvalue = 0x89911400 | | |
| 337 | UINT32 protvalue = 0x89911400 | | |
| 338 | 338 | ret = (protvalue >> (8 * (state->m_kb_ptr - 1))) & 0xff; |
| 339 | 339 | } |
| 340 | 340 | |
| r15082 | r15083 | |
| 514 | 514 | else if(state->m_kb_cmd==5) |
| 515 | 515 | { |
| 516 | 516 | UINT32 protvalue; |
| 517 | protvalue = 0x60000| | |
| 517 | protvalue = 0x60000| | |
| 518 | 518 | res=(protvalue>>(8*(ptr-1)))&0xff; |
| 519 | 519 | |
| 520 | 520 |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | decocass_state *state = space->machine().driver_data<decocass_state>(); |
| 153 | 153 | |
| 154 | 154 | /* just latch the analog controls here */ |
| 155 | state->m_quadrature_decoder[0] = input_port_read(space->machine(), "AN0"); | |
| 156 | state->m_quadrature_decoder[1] = input_port_read(space->machine(), "AN1"); | |
| 157 | state->m_quadrature_decoder[2] = input_port_read(space->machine(), "AN2"); | |
| 158 | state->m_quadrature_decoder[3] = input_port_read(space->machine(), "AN3"); | |
| 155 | state->m_quadrature_decoder[0] = state->ioport("AN0")->read(); | |
| 156 | state->m_quadrature_decoder[1] = state->ioport("AN1")->read(); | |
| 157 | state->m_quadrature_decoder[2] = state->ioport("AN2")->read(); | |
| 158 | state->m_quadrature_decoder[3] = state->ioport("AN3")->read(); | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | WRITE8_HANDLER( decocass_adc_w ) |
| r15082 | r15083 | |
| 181 | 181 | switch (offset & 7) |
| 182 | 182 | { |
| 183 | 183 | case 0: case 1: case 2: |
| 184 | data = | |
| 184 | data = | |
| 185 | 185 | break; |
| 186 | 186 | case 3: case 4: case 5: case 6: |
| 187 | 187 | data = state->m_quadrature_decoder[(offset & 7) - 3]; |
| r15082 | r15083 | |
|---|---|---|
| 204 | 204 | { |
| 205 | 205 | |
| 206 | 206 | if (m_control_num == 0) |
| 207 | return i | |
| 207 | return iop | |
| 208 | 208 | else if (m_control_num == 1) |
| 209 | return i | |
| 209 | return iop | |
| 210 | 210 | return 0; |
| 211 | 211 | |
| 212 | 212 | } |
| r15082 | r15083 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | READ8_MEMBER(leland_state::cerberus_dial_1_r) |
| 85 | 85 | { |
| 86 | int original = input_port_read(machine(), "IN0"); | |
| 87 | int modified = dial_compute_value(machine(), input_port_read(machine(), "AN0"), 0); | |
| 86 | int original = ioport("IN0")->read(); | |
| 87 | int modified = dial_compute_value(machine(), ioport("AN0")->read(), 0); | |
| 88 | 88 | return (original & 0xc0) | ((modified & 0x80) >> 2) | (modified & 0x1f); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | READ8_MEMBER(leland_state::cerberus_dial_2_r) |
| 93 | 93 | { |
| 94 | int original = input_port_read(machine(), "IN0"); | |
| 95 | int modified = dial_compute_value(machine(), input_port_read(machine(), "AN1"), 1); | |
| 94 | int original = ioport("IN0")->read(); | |
| 95 | int modified = dial_compute_value(machine(), ioport("AN1")->read(), 1); | |
| 96 | 96 | return (original & 0xc0) | ((modified & 0x80) >> 2) | (modified & 0x1f); |
| 97 | 97 | } |
| 98 | 98 | |
| r15082 | r15083 | |
| 136 | 136 | static void update_dangerz_xy(running_machine &machine) |
| 137 | 137 | { |
| 138 | 138 | leland_state *state = machine.driver_data<leland_state>(); |
| 139 | UINT8 newy = input_port_read(machine, "AN0"); | |
| 140 | UINT8 newx = input_port_read(machine, "AN1"); | |
| 139 | UINT8 newy = state->ioport("AN0")->read(); | |
| 140 | UINT8 newx = state->ioport("AN1")->read(); | |
| 141 | 141 | int deltay = newy - state->m_dial_last_input[0]; |
| 142 | 142 | int deltax = newx - state->m_dial_last_input[1]; |
| 143 | 143 | |
| r15082 | r15083 | |
| 190 | 190 | |
| 191 | 191 | READ8_MEMBER(leland_state::redline_pedal_1_r) |
| 192 | 192 | { |
| 193 | int pedal = i | |
| 193 | int pedal = iop | |
| 194 | 194 | return redline_pedal_value[pedal >> 5] | 0x0f; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
| 198 | 198 | READ8_MEMBER(leland_state::redline_pedal_2_r) |
| 199 | 199 | { |
| 200 | int pedal = i | |
| 200 | int pedal = iop | |
| 201 | 201 | return redline_pedal_value[pedal >> 5] | 0x0f; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | |
| 205 | 205 | READ8_MEMBER(leland_state::redline_wheel_1_r) |
| 206 | 206 | { |
| 207 | return dial_compute_value(machine(), i | |
| 207 | return dial_compute_value(machine(), iop | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | |
| 211 | 211 | READ8_MEMBER(leland_state::redline_wheel_2_r) |
| 212 | 212 | { |
| 213 | return dial_compute_value(machine(), i | |
| 213 | return dial_compute_value(machine(), iop | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | |
| r15082 | r15083 | |
| 223 | 223 | |
| 224 | 224 | READ8_MEMBER(leland_state::offroad_wheel_1_r) |
| 225 | 225 | { |
| 226 | return dial_compute_value(machine(), i | |
| 226 | return dial_compute_value(machine(), iop | |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | |
| 230 | 230 | READ8_MEMBER(leland_state::offroad_wheel_2_r) |
| 231 | 231 | { |
| 232 | return dial_compute_value(machine(), i | |
| 232 | return dial_compute_value(machine(), iop | |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | |
| 236 | 236 | READ8_MEMBER(leland_state::offroad_wheel_3_r) |
| 237 | 237 | { |
| 238 | return dial_compute_value(machine(), i | |
| 238 | return dial_compute_value(machine(), iop | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | |
| r15082 | r15083 | |
| 250 | 250 | { |
| 251 | 251 | static const char *const tracknames[] = { "AN0", "AN1", "AN2", "AN3" }; |
| 252 | 252 | |
| 253 | return dial_compute_value(machine(), i | |
| 253 | return dial_compute_value(machine(), iop | |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | |
| r15082 | r15083 | |
| 265 | 265 | { |
| 266 | 266 | static const char *const tracknames[] = { "AN0", "AN1", "AN2" }; |
| 267 | 267 | |
| 268 | return dial_compute_value(machine(), i | |
| 268 | return dial_compute_value(machine(), iop | |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | |
| r15082 | r15083 | |
| 297 | 297 | switch (offset) |
| 298 | 298 | { |
| 299 | 299 | case 3: |
| 300 | m_analog_result = i | |
| 300 | m_analog_result = iop | |
| 301 | 301 | break; |
| 302 | 302 | |
| 303 | 303 | case 0: |
| r15082 | r15083 | |
| 354 | 354 | state->m_alternate_bank = 0; |
| 355 | 355 | |
| 356 | 356 | /* initialize the master banks */ |
| 357 | state->m_master_length = machine.root_device().memregion("master")->bytes(); | |
| 358 | state->m_master_base = machine.root_device().memregion("master")->base(); | |
| 357 | state->m_master_length = state->memregion("master")->bytes(); | |
| 358 | state->m_master_base = state->memregion("master")->base(); | |
| 359 | 359 | (*state->m_update_master_bank)(machine); |
| 360 | 360 | |
| 361 | 361 | /* initialize the slave banks */ |
| 362 | state->m_slave_length = | |
| 362 | state->m_slave_length = sta | |
| 363 | 363 | state->m_slave_base = state->memregion("slave")->base(); |
| 364 | 364 | if (state->m_slave_length > 0x10000) |
| 365 | 365 | state->membank("bank3")->set_base(&state->m_slave_base[0x10000]); |
| r15082 | r15083 | |
| 385 | 385 | state->m_master_int_timer->adjust(machine.primary_screen->time_until_pos(8), 8); |
| 386 | 386 | |
| 387 | 387 | /* initialize the XROM */ |
| 388 | state->m_xrom_length = machine.root_device().memregion("user1")->bytes(); | |
| 389 | state->m_xrom_base = machine.root_device().memregion("user1")->base(); | |
| 388 | state->m_xrom_length = state->memregion("user1")->bytes(); | |
| 389 | state->m_xrom_base = state->memregion("user1")->base(); | |
| 390 | 390 | state->m_xrom1_addr = 0; |
| 391 | 391 | state->m_xrom2_addr = 0; |
| 392 | 392 | |
| r15082 | r15083 | |
| 400 | 400 | state->m_master_bank = 0; |
| 401 | 401 | |
| 402 | 402 | /* initialize the master banks */ |
| 403 | state->m_master_length = machine.root_device().memregion("master")->bytes(); | |
| 404 | state->m_master_base = machine.root_device().memregion("master")->base(); | |
| 403 | state->m_master_length = state->memregion("master")->bytes(); | |
| 404 | state->m_master_base = state->memregion("master")->base(); | |
| 405 | 405 | ataxx_bankswitch(machine); |
| 406 | 406 | |
| 407 | 407 | /* initialize the slave banks */ |
| 408 | state->m_slave_length = | |
| 408 | state->m_slave_length = sta | |
| 409 | 409 | state->m_slave_base = state->memregion("slave")->base(); |
| 410 | 410 | if (state->m_slave_length > 0x10000) |
| 411 | 411 | state->membank("bank3")->set_base(&state->m_slave_base[0x10000]); |
| r15082 | r15083 | |
| 452 | 452 | INTERRUPT_GEN( leland_master_interrupt ) |
| 453 | 453 | { |
| 454 | 454 | /* check for coins here */ |
| 455 | if (( | |
| 455 | if (( | |
| 456 | 456 | device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); |
| 457 | 457 | } |
| 458 | 458 | |
| r15082 | r15083 | |
| 824 | 824 | |
| 825 | 825 | READ8_DEVICE_HANDLER( ataxx_eeprom_r ) |
| 826 | 826 | { |
| 827 | int port = | |
| 827 | int port = | |
| 828 | 828 | if (LOG_EEPROM) logerror("%s:EE read\n", device->machine().describe_context()); |
| 829 | 829 | return port; |
| 830 | 830 | } |
| r15082 | r15083 | |
| 1060 | 1060 | break; |
| 1061 | 1061 | |
| 1062 | 1062 | case 0x01: /* FE = analog port select/bankswitch */ |
| 1063 | m_analog_result = i | |
| 1063 | m_analog_result = iop | |
| 1064 | 1064 | |
| 1065 | 1065 | /* update top board banking for some games */ |
| 1066 | 1066 | if (LOG_BANKSWITCHING_M) |
| r15082 | r15083 | |
| 1091 | 1091 | switch (offset) |
| 1092 | 1092 | { |
| 1093 | 1093 | case 0x00: /* /GIN0 */ |
| 1094 | result = i | |
| 1094 | result = iop | |
| 1095 | 1095 | break; |
| 1096 | 1096 | |
| 1097 | 1097 | case 0x01: /* /GIN1 */ |
| 1098 | result = i | |
| 1098 | result = iop | |
| 1099 | 1099 | if (cpu_get_reg(machine().device("slave"), Z80_HALT)) |
| 1100 | 1100 | result ^= 0x01; |
| 1101 | 1101 | break; |
| r15082 | r15083 | |
| 1111 | 1111 | break; |
| 1112 | 1112 | |
| 1113 | 1113 | case 0x10: /* /GIN0 */ |
| 1114 | result = i | |
| 1114 | result = iop | |
| 1115 | 1115 | break; |
| 1116 | 1116 | |
| 1117 | 1117 | case 0x11: /* /GIN1 */ |
| 1118 | result = i | |
| 1118 | result = iop | |
| 1119 | 1119 | if (LOG_EEPROM) logerror("%04X:EE read\n", cpu_get_pc(&space.device())); |
| 1120 | 1120 | break; |
| 1121 | 1121 | |
| r15082 | r15083 | |
| 1173 | 1173 | switch (offset) |
| 1174 | 1174 | { |
| 1175 | 1175 | case 0x06: /* /GIN0 */ |
| 1176 | result = i | |
| 1176 | result = iop | |
| 1177 | 1177 | break; |
| 1178 | 1178 | |
| 1179 | 1179 | case 0x07: /* /SLVBLK */ |
| 1180 | result = i | |
| 1180 | result = iop | |
| 1181 | 1181 | if (cpu_get_reg(machine().device("slave"), Z80_HALT)) |
| 1182 | 1182 | result ^= 0x01; |
| 1183 | 1183 | break; |
| r15082 | r15083 | |
|---|---|---|
| 862 | 862 | switch (offset) |
| 863 | 863 | { |
| 864 | 864 | case IOASIC_PORT0: |
| 865 | result = | |
| 865 | result = | |
| 866 | 866 | /* bit 0 seems to be a ready flag before shuffling happens */ |
| 867 | 867 | if (!ioasic.shuffle_active) |
| 868 | 868 | { |
| r15082 | r15083 | |
| 874 | 874 | break; |
| 875 | 875 | |
| 876 | 876 | case IOASIC_PORT1: |
| 877 | result = | |
| 877 | result = | |
| 878 | 878 | break; |
| 879 | 879 | |
| 880 | 880 | case IOASIC_PORT2: |
| 881 | result = | |
| 881 | result = | |
| 882 | 882 | break; |
| 883 | 883 | |
| 884 | 884 | case IOASIC_PORT3: |
| 885 | result = | |
| 885 | result = | |
| 886 | 886 | break; |
| 887 | 887 | |
| 888 | 888 | case IOASIC_UARTIN: |
| r15082 | r15083 | |
|---|---|---|
| 446 | 446 | { |
| 447 | 447 | switch (offset) |
| 448 | 448 | { |
| 449 | case 0x03: return input_port_read(space->machine(), "800007"); /* STARTn + SERVICE1 */ | |
| 450 | case 0x04: return input_port_read(space->machine(), "800009"); /* COINn */ | |
| 451 | case 0x05: return input_port_read(space->machine(), "80000B"); /* Player controls + TILT */ | |
| 452 | case 0x06: return input_port_read(space->machine(), "80000D"); /* Player controls (cocktail) */ | |
| 449 | case 0x03: return state->ioport("800007")->read(); /* STARTn + SERVICE1 */ | |
| 450 | case 0x04: return state->ioport("800009")->read(); /* COINn */ | |
| 451 | case 0x05: return state->ioport("80000B")->read(); /* Player controls + TILT */ | |
| 452 | case 0x06: return state->ioport("80000D")->read(); /* Player controls (cocktail) */ | |
| 453 | 453 | case 0x08: return state->m_cc_port; |
| 454 | 454 | } |
| 455 | 455 |
| r15082 | r15083 | |
|---|---|---|
| 187 | 187 | { |
| 188 | 188 | /* Bit 0x80 is secondary CPU (HD647180) ready signal */ |
| 189 | 189 | logerror("PC:%04x Warning !!! IO reading from $14000a\n",cpu_get_previouspc(&space.device())); |
| 190 | return (0x80 | i | |
| 190 | return (0x80 | iop | |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | READ16_MEMBER(toaplan1_state::vimana_system_port_r) |
| r15082 | r15083 | |
| 203 | 203 | int data, p, r, d, slot, reg, dsw; |
| 204 | 204 | |
| 205 | 205 | slot = -1; |
| 206 | d = input_port_read(machine(), "DSWA"); | |
| 207 | r = input_port_read(machine(), "TJUMP"); | |
| 208 | p = input_port_read(machine(), "SYSTEM"); | |
| 206 | d = ioport("DSWA")->read(); | |
| 207 | r = ioport("TJUMP")->read(); | |
| 208 | p = ioport("SYSTEM")->read(); | |
| 209 | 209 | m_vimana_latch ^= p; |
| 210 | 210 | data = (m_vimana_latch & p); |
| 211 | 211 |
| r15082 | r15083 | |
|---|---|---|
| 125 | 125 | void vectrex_configuration(running_machine &machine) |
| 126 | 126 | { |
| 127 | 127 | vectrex_state *state = machine.driver_data<vectrex_state>(); |
| 128 | unsigned char cport = i | |
| 128 | unsigned char cport = state->iop | |
| 129 | 129 | |
| 130 | 130 | /* Vectrex 'dipswitch' configuration */ |
| 131 | 131 | |
| r15082 | r15083 | |
| 202 | 202 | state->m_beam_color = RGB_WHITE; |
| 203 | 203 | state->m_imager_colors[0] = state->m_imager_colors[1] = state->m_imager_colors[2] = state->m_imager_colors[3] = state->m_imager_colors[4] = state->m_imager_colors[5] = RGB_WHITE; |
| 204 | 204 | } |
| 205 | state->m_lightpen_port = in | |
| 205 | state->m_lightpen_port = machine.root_device().ioport | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | |
| r15082 | r15083 | |
| 224 | 224 | int pot; |
| 225 | 225 | static const char *const ctrlnames[] = { "CONTR1X", "CONTR1Y", "CONTR2X", "CONTR2Y" }; |
| 226 | 226 | |
| 227 | pot = | |
| 227 | pot = | |
| 228 | 228 | |
| 229 | 229 | if (pot > (signed char)state->m_via_out[PORTA]) |
| 230 | 230 | state->m_via_out[PORTB] |= 0x20; |
| r15082 | r15083 | |
| 253 | 253 | READ8_DEVICE_HANDLER(vectrex_s1_via_pb_r) |
| 254 | 254 | { |
| 255 | 255 | vectrex_state *state = device->machine().driver_data<vectrex_state>(); |
| 256 | return (state->m_via_out[PORTB] & ~0x40) | ( | |
| 256 | return (state->m_via_out[PORTB] & ~0x40) | (s | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 |
| r15082 | r15083 | |
|---|---|---|
| 43 | 43 | 0x2b, 0x2a, 0x28, 0x29, 0x09, 0x08, 0x0a, 0x0b, |
| 44 | 44 | 0x0f, 0x0e, 0x0c, 0x0d, 0x2d, 0x2c, 0x2e, 0x2f, |
| 45 | 45 | 0x27, 0x26, 0x24, 0x25, 0x05, 0x04, 0x06, 0x07 }; |
| 46 | UINT8 val = i | |
| 46 | UINT8 val = iop | |
| 47 | 47 | |
| 48 | 48 | return remap[val >> 2]; |
| 49 | 49 | } |
| r15082 | r15083 | |
|---|---|---|
| 126 | 126 | case 1: |
| 127 | 127 | case 2: |
| 128 | 128 | case 3: |
| 129 | return i | |
| 129 | return iop | |
| 130 | 130 | |
| 131 | 131 | default: |
| 132 | 132 | logerror("%08X:Unknown I/O read from %d\n", cpu_get_pc(&space.device()), offset); |
| r15082 | r15083 | |
| 140 | 140 | { |
| 141 | 141 | static const char *const portnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5" }; |
| 142 | 142 | |
| 143 | return i | |
| 143 | return iop | |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | |
| r15082 | r15083 | |
| 299 | 299 | register_state_saving(machine); |
| 300 | 300 | |
| 301 | 301 | /* load the graphics ROMs -- quadruples */ |
| 302 | midtunit_gfx_rom = base = | |
| 302 | midtunit_gfx_rom = base = sta | |
| 303 | 303 | len = state->memregion("gfx1")->bytes(); |
| 304 | 304 | for (i = 0; i < len / 0x200000; i++) |
| 305 | 305 | { |
| r15082 | r15083 | |
|---|---|---|
| 1781 | 1781 | case 1: //p2 inputs |
| 1782 | 1782 | { |
| 1783 | 1783 | //printf("Read p%d inputs\n", channel + 1); |
| 1784 | buttons = input_port_read(machine(), portnames[(channel*3) + 0]); | |
| 1785 | x = input_port_read(machine(), portnames[(channel*3) + 1]) - 128; | |
| 1786 | y = input_port_read(machine(), portnames[(channel*3) + 2]) - 128; | |
| 1784 | buttons = ioport(portnames[(channel*3) + 0])->read(); | |
| 1785 | x = ioport(portnames[(channel*3) + 1])->read() - 128; | |
| 1786 | y = ioport(portnames[(channel*3) + 2])->read() - 128; | |
| 1787 | 1787 | |
| 1788 | 1788 | rdata[0] = (buttons >> 8) & 0xff; |
| 1789 | 1789 | rdata[1] = (buttons >> 0) & 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 132 | 132 | // Perhaps define dipswitches as active low? |
| 133 | 133 | READ8_MEMBER(stfight_state::stfight_dsw_r) |
| 134 | 134 | { |
| 135 | return( ~i | |
| 135 | return( ~iop | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | READ8_MEMBER(stfight_state::stfight_coin_r) |
| r15082 | r15083 | |
| 154 | 154 | * since it's read by the 30Hz interrupt ISR |
| 155 | 155 | */ |
| 156 | 156 | |
| 157 | coin_mech_data = i | |
| 157 | coin_mech_data = iop | |
| 158 | 158 | |
| 159 | 159 | for( i=0; i<2; i++ ) |
| 160 | 160 | { |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | else |
| 178 | 178 | { /* port select */ |
| 179 | 179 | st->parallelselect = data & 0x07; |
| 180 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,st->parallelselect) : st->portName ? | |
| 180 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,st->parallelselect) : st->portName ? | |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | } |
| r15082 | r15083 | |
| 188 | 188 | case -1: /* no command data */ |
| 189 | 189 | break; |
| 190 | 190 | case 0x00: /* read from parallel port */ |
| 191 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,0) : st->portName ? | |
| 191 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space,0) : st->portName ? | |
| 192 | 192 | break; |
| 193 | 193 | case 0x01: /* read receive buffer 0 */ |
| 194 | 194 | case 0x02: /* read receive buffer 1 */ |
| r15082 | r15083 | |
| 201 | 201 | taito8741_hostdata_w(st,st->rxd[data-1]); |
| 202 | 202 | break; |
| 203 | 203 | case 0x08: /* latch received serial data */ |
| 204 | st->txd[0] = st->portHandler ? st->portHandler(space,0) : st->portName ? | |
| 204 | st->txd[0] = st->portHandler ? st->portHandler(space,0) : st->portName ? | |
| 205 | 205 | if( sst ) |
| 206 | 206 | { |
| 207 | 207 | space->machine().scheduler().synchronize(FUNC(taito8741_serial_tx), num); |
| r15082 | r15083 | |
| 295 | 295 | switch( st->mode ) |
| 296 | 296 | { |
| 297 | 297 | case TAITO8741_PORT: /* parallel data */ |
| 298 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect) : st->portName ? | |
| 298 | taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect) : st->portName ? | |
| 299 | 299 | break; |
| 300 | 300 | } |
| 301 | 301 | return ret; |
| r15082 | r15083 | |
| 472 | 472 | break; |
| 473 | 473 | case 2: |
| 474 | 474 | #if 1 |
| 475 | mcu->rxd = | |
| 475 | mcu->rxd = | |
| 476 | 476 | mcu->sts |= 0x01; /* RD ready */ |
| 477 | 477 | #endif |
| 478 | 478 | break; |
| r15082 | r15083 | |
| 515 | 515 | if(offset==1) |
| 516 | 516 | { |
| 517 | 517 | if(mcu->rst) |
| 518 | mcu->rxd = | |
| 518 | mcu->rxd = | |
| 519 | 519 | ret = mcu->sts; |
| 520 | 520 | LOG(("%s:8741[%d] SR %02X\n",space->machine().describe_context(),num,ret)); |
| 521 | 521 | } |
| r15082 | r15083 | |
| 579 | 579 | cyclemb_mcu.rst = 0; |
| 580 | 580 | break; |
| 581 | 581 | case 2: |
| 582 | cyclemb_mcu.rxd = ( | |
| 582 | cyclemb_mcu.rxd = ( | |
| 583 | 583 | cyclemb_mcu.rst = 0; |
| 584 | 584 | break; |
| 585 | 585 | case 3: |
| 586 | //cyclemb_mcu.rxd = | |
| 586 | //cyclemb_mcu.rxd = | |
| 587 | 587 | cyclemb_mcu.rst = 1; |
| 588 | 588 | break; |
| 589 | 589 | } |
| r15082 | r15083 | |
| 613 | 613 | /* FIXME: remove cpu_get_pc hack */ |
| 614 | 614 | switch(cpu_get_pc(&space->device())) |
| 615 | 615 | { |
| 616 | case 0x760: cyclemb_mcu.rxd = (( | |
| 616 | case 0x760: cyclemb_mcu.rxd = (( | |
| 617 | 617 | case 0x35c: |
| 618 | 618 | { |
| 619 | 619 | static UINT8 mux_r; |
| 620 | 620 | mux_r^=0x20; |
| 621 | 621 | if(mux_r & 0x20) |
| 622 | cyclemb_mcu.rxd = (( | |
| 622 | cyclemb_mcu.rxd = (( | |
| 623 | 623 | else |
| 624 | cyclemb_mcu.rxd = (( | |
| 624 | cyclemb_mcu.rxd = (( | |
| 625 | 625 | } |
| 626 | 626 | break; |
| 627 | 627 | } |
| r15082 | r15083 | |
|---|---|---|
| 57 | 57 | } |
| 58 | 58 | else |
| 59 | 59 | { |
| 60 | data = | |
| 60 | data = | |
| 61 | 61 | } |
| 62 | 62 | if(joystick_data_select) data >>= 4; |
| 63 | 63 | ret = (data & 0x0F) | pce.io_port_options; |
| r15082 | r15083 | |
|---|---|---|
| 410 | 410 | |
| 411 | 411 | UINT8 ddr = m_68705_ddr[1]; |
| 412 | 412 | UINT8 out = m_68705_port_out[1]; |
| 413 | UINT8 in = (i | |
| 413 | UINT8 in = (iop | |
| 414 | 414 | return (out & ddr) | (in & ~ddr); |
| 415 | 415 | } |
| 416 | 416 | |
| r15082 | r15083 | |
| 420 | 420 | |
| 421 | 421 | UINT8 ddr = m_68705_ddr[2]; |
| 422 | 422 | UINT8 out = m_68705_port_out[2]; |
| 423 | UINT8 in = (m_coinctrl & 0x08) | ((i | |
| 423 | UINT8 in = (m_coinctrl & 0x08) | ((iop | |
| 424 | 424 | return (out & ddr) | (in & ~ddr); |
| 425 | 425 | } |
| 426 | 426 | |
| r15082 | r15083 | |
| 534 | 534 | { |
| 535 | 535 | qix_state *state = device->machine().driver_data<qix_state>(); |
| 536 | 536 | |
| 537 | return | |
| 537 | return s | |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | 540 | |
| r15082 | r15083 | |
| 542 | 542 | { |
| 543 | 543 | qix_state *state = device->machine().driver_data<qix_state>(); |
| 544 | 544 | |
| 545 | return | |
| 545 | return s | |
| 546 | 546 | } |
| r15082 | r15083 | |
|---|---|---|
| 577 | 577 | |
| 578 | 578 | case 0x4100: /* NSS Dip-Switches */ |
| 579 | 579 | { |
| 580 | | |
| 580 | | |
| 581 | 581 | if (port != NULL) |
| 582 | return | |
| 582 | return | |
| 583 | 583 | else |
| 584 | 584 | return snes_open_bus_r(space, 0); |
| 585 | 585 | } |
| r15082 | r15083 | |
| 1644 | 1644 | |
| 1645 | 1645 | for (port = 0; port < 2; port++) |
| 1646 | 1646 | { |
| 1647 | state->m_data1[port] = input_port_read(machine, portnames[port][0]) | (input_port_read(machine, portnames[port][1]) << 8); | |
| 1648 | state->m_data2[port] = input_port_read(machine, portnames[port][2]) | (input_port_read(machine, portnames[port][3]) << 8); | |
| 1647 | state->m_data1[port] = state->ioport(portnames[port][0])->read() | (state->ioport(portnames[port][1])->read() << 8); | |
| 1648 | state->m_data2[port] = state->ioport(portnames[port][2])->read() | (state->ioport(portnames[port][3])->read() << 8); | |
| 1649 | 1649 | |
| 1650 | 1650 | // avoid sending signals that could crash games |
| 1651 | 1651 | // if left, no right |
| r15082 | r15083 | |
| 1998 | 1998 | UINT16 total_blocks, read_blocks; |
| 1999 | 1999 | UINT8 *rom; |
| 2000 | 2000 | |
| 2001 | rom = | |
| 2001 | rom = sta | |
| 2002 | 2002 | snes_ram = auto_alloc_array_clear(machine, UINT8, 0x1400000); |
| 2003 | 2003 | |
| 2004 | 2004 | /* all NSS games seem to use MODE 20 */ |
| r15082 | r15083 | |
| 2064 | 2064 | UINT16 total_blocks, read_blocks; |
| 2065 | 2065 | UINT8 *rom; |
| 2066 | 2066 | |
| 2067 | rom = | |
| 2067 | rom = sta | |
| 2068 | 2068 | snes_ram = auto_alloc_array(machine, UINT8, 0x1400000); |
| 2069 | 2069 | memset(snes_ram, 0, 0x1400000); |
| 2070 | 2070 |
| r15082 | r15083 | |
|---|---|---|
| 248 | 248 | { |
| 249 | 249 | if (!(data & 0xff)) |
| 250 | 250 | { |
| 251 | m_analog_ports[0] = input_port_read_safe(machine(), "ANALOG0", 0); | |
| 252 | m_analog_ports[1] = input_port_read_safe(machine(), "ANALOG1", 0); | |
| 251 | m_analog_ports[0] = ioport("ANALOG0")->read_safe(0); | |
| 252 | m_analog_ports[1] = ioport("ANALOG1")->read_safe(0); | |
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | else |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | res = state->m_olds_cmd3; |
| 121 | 121 | else if (state->m_kb_cmd == 5) |
| 122 | 122 | { |
| 123 | UINT32 protvalue = 0x900000 | | |
| 123 | UINT32 protvalue = 0x900000 | s | |
| 124 | 124 | res = (protvalue >> (8 * (state->m_kb_ptr - 1))) & 0xff; // includes region 1 = taiwan , 2 = china, 3 = japan (title = orlegend special), 4 = korea, 5 = hongkong, 6 = world |
| 125 | 125 | |
| 126 | 126 | } |
| r15082 | r15083 | |
|---|---|---|
| 116 | 116 | { |
| 117 | 117 | const char *tag1 = (const char *)param; |
| 118 | 118 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 119 | return i | |
| 119 | return iop | |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /* |
| r15082 | r15083 | |
| 575 | 575 | { |
| 576 | 576 | UINT8 arkanoid_bootleg_d008_bit[8]; |
| 577 | 577 | UINT8 arkanoid_bootleg_d008_val; |
| 578 | UINT8 arkanoid_paddle_value = i | |
| 578 | UINT8 arkanoid_paddle_value = iop | |
| 579 | 579 | int b; |
| 580 | 580 | |
| 581 | 581 | arkanoid_bootleg_d008_bit[4] = arkanoid_bootleg_d008_bit[6] = arkanoid_bootleg_d008_bit[7] = 0; /* untested bits */ |
| r15082 | r15083 | |
|---|---|---|
| 259 | 259 | static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" }; |
| 260 | 260 | int bit_mask = (FPTR)param; |
| 261 | 261 | |
| 262 | return (i | |
| 262 | return (iop | |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | #ifdef UNUSED_FUNCTION |
| r15082 | r15083 | |
| 399 | 399 | { |
| 400 | 400 | galaxold_state *state = machine.driver_data<galaxold_state>(); |
| 401 | 401 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 402 | offs_t i, len = | |
| 402 | offs_t i, len = sta | |
| 403 | 403 | UINT8 *RAM = state->memregion("maincpu")->base(); |
| 404 | 404 | |
| 405 | 405 | /* Decrypt Program Roms */ |
| r15082 | r15083 | |
|---|---|---|
| 559 | 559 | SCREEN_UPDATE32_CALL(itech8_2page); |
| 560 | 560 | |
| 561 | 561 | /* add the current X,Y positions to the list */ |
| 562 | state->m_xbuffer[state->m_ybuffer_next % YBUFFER_COUNT] = input_port_read_safe(screen.machine(), "FAKEX", 0); | |
| 563 | state->m_ybuffer[state->m_ybuffer_next % YBUFFER_COUNT] = input_port_read_safe(screen.machine(), "FAKEY", 0); | |
| 562 | state->m_xbuffer[state->m_ybuffer_next % YBUFFER_COUNT] = state->ioport("FAKEX")->read_safe(0); | |
| 563 | state->m_ybuffer[state->m_ybuffer_next % YBUFFER_COUNT] = state->ioport("FAKEY")->read_safe(0); | |
| 564 | 564 | state->m_ybuffer_next++; |
| 565 | 565 | |
| 566 | 566 | /* determine where to draw the starting point */ |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | if(count_players > 2 || bytes_per_switch > 2) |
| 121 | 121 | return false; |
| 122 | 122 | |
| 123 | *buf++ = i | |
| 123 | *buf++ = ioport(port_tag[0])->read_safe( | |
| 124 | 124 | for(int i=0; i<count_players; i++) { |
| 125 | UINT32 val = i | |
| 125 | UINT32 val = iop | |
| 126 | 126 | for(int j=0; j<bytes_per_switch; j++) |
| 127 | 127 | *buf++ = val >> ((1-j) << 3); |
| 128 | 128 | } |
| r15082 | r15083 | |
| 135 | 135 | if(count > 8) |
| 136 | 136 | return false; |
| 137 | 137 | for(int i=0; i<count; i++) { |
| 138 | UINT16 val = i | |
| 138 | UINT16 val = iop | |
| 139 | 139 | *buf++ = val >> 8; |
| 140 | 140 | *buf++ = val; |
| 141 | 141 | } |
| r15082 | r15083 | |
| 148 | 148 | return false; |
| 149 | 149 | jvs_outputs = vals[0] & 0x3f; |
| 150 | 150 | logerror("837-13551: output %02x\n", jvs_outputs); |
| 151 | in | |
| 151 | machine(). | |
| 152 | 152 | return true; |
| 153 | 153 | } |
| 154 | 154 |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | switch (offset<<1) |
| 20 | 20 | { |
| 21 | 21 | case 0: /* Player 1 & 2 joystick & buttons */ |
| 22 | return i | |
| 22 | return iop | |
| 23 | 23 | |
| 24 | 24 | case 2: /* Credits, start buttons */ |
| 25 | return i | |
| 25 | return iop | |
| 26 | 26 | |
| 27 | 27 | case 4: /* Byte 4: Dipswitch bank 2, Byte 5: Dipswitch Bank 1 */ |
| 28 | return i | |
| 28 | return iop | |
| 29 | 29 | |
| 30 | 30 | case 8: /* Intel 8751 mc, Bad Dudes & Heavy Barrel only */ |
| 31 | 31 | //logerror("CPU #0 PC %06x: warning - read i8751 %06x - %04x\n", cpu_get_pc(&space.device()), 0x30c000+offset, m_i8751_return); |
| r15082 | r15083 | |
| 43 | 43 | switch (offset<<1) |
| 44 | 44 | { |
| 45 | 45 | case 0: /* Player 1 rotary */ |
| 46 | return ~(1 << i | |
| 46 | return ~(1 << iop | |
| 47 | 47 | |
| 48 | 48 | case 8: /* Player 2 rotary */ |
| 49 | return ~(1 << i | |
| 49 | return ~(1 << iop | |
| 50 | 50 | |
| 51 | 51 | default: |
| 52 | 52 | logerror("Unknown rotary read at 300000 %02x\n", offset); |
| r15082 | r15083 | |
| 62 | 62 | switch (offset<<1) |
| 63 | 63 | { |
| 64 | 64 | case 0: /* Player 1 Joystick + start, Player 2 Joystick + start */ |
| 65 | return i | |
| 65 | return iop | |
| 66 | 66 | |
| 67 | 67 | case 2: /* Dipswitches */ |
| 68 | return i | |
| 68 | return iop | |
| 69 | 69 | |
| 70 | 70 | case 4: /* Player 1 rotary */ |
| 71 | return ~(1 << i | |
| 71 | return ~(1 << iop | |
| 72 | 72 | |
| 73 | 73 | case 6: /* Player 2 rotary */ |
| 74 | return ~(1 << i | |
| 74 | return ~(1 << iop | |
| 75 | 75 | |
| 76 | 76 | case 8: /* Credits, start buttons */ |
| 77 | return i | |
| 77 | return iop | |
| 78 | 78 | |
| 79 | 79 | case 12: |
| 80 | 80 | return 0; /* ?? watchdog ?? */ |
| r15082 | r15083 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | READ8_MEMBER(lsasquad_state::lsasquad_mcu_status_r) |
| 183 | 183 | { |
| 184 | int res = i | |
| 184 | int res = iop | |
| 185 | 185 | |
| 186 | 186 | /* bit 0 = when 1, mcu is ready to receive data from main cpu */ |
| 187 | 187 | /* bit 1 = when 0, mcu has sent data to the main cpu */ |
| r15082 | r15083 | |
| 196 | 196 | |
| 197 | 197 | READ8_MEMBER(lsasquad_state::daikaiju_mcu_status_r) |
| 198 | 198 | { |
| 199 | int res = i | |
| 199 | int res = iop | |
| 200 | 200 | |
| 201 | 201 | /* bit 0 = when 1, mcu is ready to receive data from main cpu */ |
| 202 | 202 | /* bit 1 = when 0, mcu has sent data to the main cpu */ |
| r15082 | r15083 | |
|---|---|---|
| 622 | 622 | if (m_port_select != 0) |
| 623 | 623 | tag += strlen(tag) + 1; |
| 624 | 624 | |
| 625 | return i | |
| 625 | return iop | |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | /* |
| r15082 | r15083 | |
| 653 | 653 | READ8_DEVICE_HANDLER( williams_49way_port_0_r ) |
| 654 | 654 | { |
| 655 | 655 | static const UINT8 translate49[7] = { 0x0, 0x4, 0x6, 0x7, 0xb, 0x9, 0x8 }; |
| 656 | return (translate49[ | |
| 656 | return (translate49[ | |
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | |
| r15082 | r15083 | |
| 663 | 663 | if (state->m_port_select) |
| 664 | 664 | return williams_49way_port_0_r(device, 0); |
| 665 | 665 | else |
| 666 | return | |
| 666 | return s | |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | |
| r15082 | r15083 | |
| 879 | 879 | |
| 880 | 880 | /* banking is different for blaster */ |
| 881 | 881 | state->membank("bank1")->configure_entry(0, state->m_videoram); |
| 882 | state->membank("bank1")->configure_entries(1, 16, | |
| 882 | state->membank("bank1")->configure_entries(1, 16, sta | |
| 883 | 883 | |
| 884 | 884 | state->membank("bank2")->configure_entry(0, state->m_videoram + 0x4000); |
| 885 | 885 | state->membank("bank2")->configure_entries(1, 16, state->memregion("maincpu")->base() + 0x10000, 0x0000); |
| r15082 | r15083 | |
| 946 | 946 | static READ8_DEVICE_HANDLER( tshoot_input_port_0_3_r ) |
| 947 | 947 | { |
| 948 | 948 | /* merge in the gun inputs with the standard data */ |
| 949 | int data = | |
| 949 | int data = | |
| 950 | 950 | int gun = (data & 0x3f) ^ ((data & 0x3f) >> 1); |
| 951 | 951 | return (data & 0xc0) | gun; |
| 952 | 952 |
| r15082 | r15083 | |
|---|---|---|
| 117 | 117 | { |
| 118 | 118 | switch (offset) |
| 119 | 119 | { |
| 120 | case 0x00: return input_port_read(space->machine(), "IN0"); /* Player 1 controls + START1 */ | |
| 121 | case 0x01: return input_port_read(space->machine(), "IN1"); /* Player 2 controls + START2 */ | |
| 122 | case 0x02: return input_port_read(space->machine(), "IN2"); /* COINn + SERVICE1 + TILT */ | |
| 120 | case 0x00: return space->machine().root_device().ioport("IN0")->read(); /* Player 1 controls + START1 */ | |
| 121 | case 0x01: return space->machine().root_device().ioport("IN1")->read(); /* Player 2 controls + START2 */ | |
| 122 | case 0x02: return space->machine().root_device().ioport("IN2")->read(); /* COINn + SERVICE1 + TILT */ | |
| 123 | 123 | case 0x03: return cc_port; |
| 124 | 124 | } |
| 125 | 125 | } |
| r15082 | r15083 | |
|---|---|---|
| 529 | 529 | opwolf_state *state = machine.driver_data<opwolf_state>(); |
| 530 | 530 | |
| 531 | 531 | // Update input ports, these are used by both the 68k directly and by the c-chip |
| 532 | state->m_cchip_ram[0x4] = input_port_read(machine, "IN0"); | |
| 533 | state->m_cchip_ram[0x5] = input_port_read(machine, "IN1"); | |
| 532 | state->m_cchip_ram[0x4] = state->ioport("IN0")->read(); | |
| 533 | state->m_cchip_ram[0x5] = state->ioport("IN1")->read(); | |
| 534 | 534 | |
| 535 | 535 | // Coin slots |
| 536 | 536 | if (state->m_cchip_ram[0x4] != state->m_cchip_last_04) |
| r15082 | r15083 | |
|---|---|---|
| 125 | 125 | { |
| 126 | 126 | /* pitch */ |
| 127 | 127 | if (m_control_num == kPitch) |
| 128 | return i | |
| 128 | return iop | |
| 129 | 129 | |
| 130 | 130 | /* yaw */ |
| 131 | 131 | else if (m_control_num == kYaw) |
| 132 | return i | |
| 132 | return iop | |
| 133 | 133 | |
| 134 | 134 | /* default to unused thrust */ |
| 135 | 135 | else |
| r15082 | r15083 | |
|---|---|---|
| 363 | 363 | |
| 364 | 364 | READ8_HANDLER( nb1413m3_inputport0_r ) |
| 365 | 365 | { |
| 366 | return (( | |
| 366 | return (( | |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | READ8_HANDLER( nb1413m3_inputport1_r ) |
| 370 | 370 | { |
| 371 | device_t &root = space->machine().root_device(); | |
| 371 | 372 | switch (nb1413m3_type) |
| 372 | 373 | { |
| 373 | 374 | case NB1413M3_HYHOO: |
| 374 | 375 | case NB1413M3_HYHOO2: |
| 375 | 376 | switch ((nb1413m3_inputport ^ 0xff) & 0x07) |
| 376 | 377 | { |
| 377 | case 0x01: return input_port_read(space->machine(), "IN0"); | |
| 378 | case 0x02: return input_port_read(space->machine(), "IN1"); | |
| 378 | case 0x01: return root.ioport("IN0")->read(); | |
| 379 | case 0x02: return root.ioport("IN1")->read(); | |
| 379 | 380 | case 0x04: return 0xff; |
| 380 | 381 | default: return 0xff; |
| 381 | 382 | } |
| 382 | 383 | break; |
| 383 | 384 | case NB1413M3_MSJIKEN: |
| 384 | 385 | case NB1413M3_TELMAHJN: |
| 385 | if (i | |
| 386 | if (root.iop | |
| 386 | 387 | { |
| 387 | 388 | switch ((nb1413m3_inputport ^ 0xff) & 0x1f) |
| 388 | 389 | { |
| 389 | case 0x01: return input_port_read(space->machine(), "KEY0"); | |
| 390 | case 0x02: return input_port_read(space->machine(), "KEY1"); | |
| 391 | case 0x04: return input_port_read(space->machine(), "KEY2"); | |
| 392 | case 0x08: return input_port_read(space->machine(), "KEY3"); | |
| 393 | case 0x10: return input_port_read(space->machine(), "KEY4"); | |
| 394 | default: return (input_port_read(space->machine(), "KEY0") & input_port_read(space->machine(), "KEY1") & input_port_read(space->machine(), "KEY2") | |
| 395 | & input_port_read(space->machine(), "KEY3") & input_port_read(space->machine(), "KEY4")); | |
| 390 | case 0x01: return root.ioport("KEY0")->read(); | |
| 391 | case 0x02: return root.ioport("KEY1")->read(); | |
| 392 | case 0x04: return root.ioport("KEY2")->read(); | |
| 393 | case 0x08: return root.ioport("KEY3")->read(); | |
| 394 | case 0x10: return root.ioport("KEY4")->read(); | |
| 395 | default: return (root.ioport("KEY0")->read() & root.ioport("KEY1")->read() & root.ioport("KEY2")->read() | |
| 396 | & root.ioport("KEY3")->read() & root.ioport("KEY4")->read()); | |
| 396 | 397 | } |
| 397 | 398 | } |
| 398 | else return i | |
| 399 | else return root.iop | |
| 399 | 400 | break; |
| 400 | 401 | case NB1413M3_PAIRSNB: |
| 401 | 402 | case NB1413M3_PAIRSTEN: |
| 402 | 403 | case NB1413M3_OHPAIPEE: |
| 403 | 404 | case NB1413M3_TOGENKYO: |
| 404 | return i | |
| 405 | return root.iop | |
| 405 | 406 | default: |
| 406 | 407 | switch ((nb1413m3_inputport ^ 0xff) & 0x1f) |
| 407 | 408 | { |
| 408 | case 0x01: return input_port_read(space->machine(), "KEY0"); | |
| 409 | case 0x02: return input_port_read(space->machine(), "KEY1"); | |
| 410 | case 0x04: return input_port_read(space->machine(), "KEY2"); | |
| 411 | case 0x08: return input_port_read(space->machine(), "KEY3"); | |
| 412 | case 0x10: return input_port_read(space->machine(), "KEY4"); | |
| 413 | default: return (input_port_read(space->machine(), "KEY0") & input_port_read(space->machine(), "KEY1") & input_port_read(space->machine(), "KEY2") | |
| 414 | & input_port_read(space->machine(), "KEY3") & input_port_read(space->machine(), "KEY4")); | |
| 409 | case 0x01: return root.ioport("KEY0")->read(); | |
| 410 | case 0x02: return root.ioport("KEY1")->read(); | |
| 411 | case 0x04: return root.ioport("KEY2")->read(); | |
| 412 | case 0x08: return root.ioport("KEY3")->read(); | |
| 413 | case 0x10: return root.ioport("KEY4")->read(); | |
| 414 | default: return (root.ioport("KEY0")->read() & root.ioport("KEY1")->read() & root.ioport("KEY2")->read() | |
| 415 | & root.ioport("KEY3")->read() & root.ioport("KEY4")->read()); | |
| 415 | 416 | } |
| 416 | 417 | break; |
| 417 | 418 | } |
| r15082 | r15083 | |
| 419 | 420 | |
| 420 | 421 | READ8_HANDLER( nb1413m3_inputport2_r ) |
| 421 | 422 | { |
| 423 | device_t &root = space->machine().root_device(); | |
| 422 | 424 | switch (nb1413m3_type) |
| 423 | 425 | { |
| 424 | 426 | case NB1413M3_HYHOO: |
| r15082 | r15083 | |
| 427 | 429 | { |
| 428 | 430 | case 0x01: return 0xff; |
| 429 | 431 | case 0x02: return 0xff; |
| 430 | case 0x04: return i | |
| 432 | case 0x04: return root.iop | |
| 431 | 433 | default: return 0xff; |
| 432 | 434 | } |
| 433 | 435 | break; |
| 434 | 436 | case NB1413M3_MSJIKEN: |
| 435 | 437 | case NB1413M3_TELMAHJN: |
| 436 | if (i | |
| 438 | if (root.iop | |
| 437 | 439 | { |
| 438 | 440 | switch ((nb1413m3_inputport ^ 0xff) & 0x1f) |
| 439 | 441 | { |
| 440 | case 0x01: return input_port_read(space->machine(), "KEY5"); | |
| 441 | case 0x02: return input_port_read(space->machine(), "KEY6"); | |
| 442 | case 0x04: return input_port_read(space->machine(), "KEY7"); | |
| 443 | case 0x08: return input_port_read(space->machine(), "KEY8"); | |
| 444 | case 0x10: return input_port_read(space->machine(), "KEY9"); | |
| 445 | default: return (input_port_read(space->machine(), "KEY5") & input_port_read(space->machine(), "KEY6") & input_port_read(space->machine(), "KEY7") | |
| 446 | & input_port_read(space->machine(), "KEY8") & input_port_read(space->machine(), "KEY9")); | |
| 442 | case 0x01: return root.ioport("KEY5")->read(); | |
| 443 | case 0x02: return root.ioport("KEY6")->read(); | |
| 444 | case 0x04: return root.ioport("KEY7")->read(); | |
| 445 | case 0x08: return root.ioport("KEY8")->read(); | |
| 446 | case 0x10: return root.ioport("KEY9")->read(); | |
| 447 | default: return (root.ioport("KEY5")->read() & root.ioport("KEY6")->read() & root.ioport("KEY7")->read() | |
| 448 | & root.ioport("KEY8")->read() & root.ioport("KEY9")->read()); | |
| 447 | 449 | } |
| 448 | 450 | } |
| 449 | else return i | |
| 451 | else return root.iop | |
| 450 | 452 | break; |
| 451 | 453 | case NB1413M3_PAIRSNB: |
| 452 | 454 | case NB1413M3_PAIRSTEN: |
| 453 | 455 | case NB1413M3_OHPAIPEE: |
| 454 | 456 | case NB1413M3_TOGENKYO: |
| 455 | return i | |
| 457 | return root.iop | |
| 456 | 458 | default: |
| 457 | 459 | switch ((nb1413m3_inputport ^ 0xff) & 0x1f) |
| 458 | 460 | { |
| 459 | case 0x01: return input_port_read(space->machine(), "KEY5"); | |
| 460 | case 0x02: return input_port_read(space->machine(), "KEY6"); | |
| 461 | case 0x04: return input_port_read(space->machine(), "KEY7"); | |
| 462 | case 0x08: return input_port_read(space->machine(), "KEY8"); | |
| 463 | case 0x10: return input_port_read(space->machine(), "KEY9"); | |
| 464 | default: return (input_port_read(space->machine(), "KEY5") & input_port_read(space->machine(), "KEY6") & input_port_read(space->machine(), "KEY7") | |
| 465 | & input_port_read(space->machine(), "KEY8") & input_port_read(space->machine(), "KEY9")); | |
| 461 | case 0x01: return root.ioport("KEY5")->read(); | |
| 462 | case 0x02: return root.ioport("KEY6")->read(); | |
| 463 | case 0x04: return root.ioport("KEY7")->read(); | |
| 464 | case 0x08: return root.ioport("KEY8")->read(); | |
| 465 | case 0x10: return root.ioport("KEY9")->read(); | |
| 466 | default: return (root.ioport("KEY5")->read() & root.ioport("KEY6")->read() & root.ioport("KEY7")->read() | |
| 467 | & root.ioport("KEY8")->read() & root.ioport("KEY9")->read()); | |
| 466 | 468 | } |
| 467 | 469 | break; |
| 468 | 470 | } |
| r15082 | r15083 | |
| 493 | 495 | |
| 494 | 496 | READ8_HANDLER( nb1413m3_dipsw1_r ) |
| 495 | 497 | { |
| 498 | device_t &root = space->machine().root_device(); | |
| 496 | 499 | switch (nb1413m3_type) |
| 497 | 500 | { |
| 498 | 501 | case NB1413M3_KANATUEN: |
| 499 | 502 | case NB1413M3_KYUHITO: |
| 500 | return i | |
| 503 | return root.iop | |
| 501 | 504 | case NB1413M3_TAIWANMB: |
| 502 | return ((i | |
| 505 | return ((root.iop | |
| 503 | 506 | case NB1413M3_OTONANO: |
| 504 | 507 | case NB1413M3_MJCAMERA: |
| 505 | 508 | case NB1413M3_IDHIMITU: |
| 506 | 509 | case NB1413M3_KAGUYA2: |
| 507 | return (((i | |
| 510 | return (((root.iop | |
| 508 | 511 | case NB1413M3_SCANDAL: |
| 509 | 512 | case NB1413M3_SCANDALM: |
| 510 | 513 | case NB1413M3_MJFOCUSM: |
| r15082 | r15083 | |
| 515 | 518 | case NB1413M3_UCHUUAI: |
| 516 | 519 | case NB1413M3_TOKIMBSJ: |
| 517 | 520 | case NB1413M3_TOKYOGAL: |
| 518 | return ((i | |
| 521 | return ((root.iop | |
| 519 | 522 | case NB1413M3_TRIPLEW1: |
| 520 | 523 | case NB1413M3_NTOPSTAR: |
| 521 | 524 | case NB1413M3_PSTADIUM: |
| r15082 | r15083 | |
| 525 | 528 | case NB1413M3_MJLSTORY: |
| 526 | 529 | case NB1413M3_QMHAYAKU: |
| 527 | 530 | case NB1413M3_MJGOTTUB: |
| 528 | return (((input_port_read(space->machine(), "DSWB") & 0x01) >> 0) | ((input_port_read(space->machine(), "DSWB") & 0x04) >> 1) | | |
| 529 | ((input_port_read(space->machine(), "DSWB") & 0x10) >> 2) | ((input_port_read(space->machine(), "DSWB") & 0x40) >> 3) | | |
| 530 | ((input_port_read(space->machine(), "DSWA") & 0x01) << 4) | ((input_port_read(space->machine(), "DSWA") & 0x04) << 3) | | |
| 531 | ((input_port_read(space->machine(), "DSWA") & 0x10) << 2) | ((input_port_read(space->machine(), "DSWA") & 0x40) << 1)); | |
| 531 | return (((root.ioport("DSWB")->read() & 0x01) >> 0) | ((root.ioport("DSWB")->read() & 0x04) >> 1) | | |
| 532 | ((root.ioport("DSWB")->read() & 0x10) >> 2) | ((root.ioport("DSWB")->read() & 0x40) >> 3) | | |
| 533 | ((root.ioport("DSWA")->read() & 0x01) << 4) | ((root.ioport("DSWA")->read() & 0x04) << 3) | | |
| 534 | ((root.ioport("DSWA")->read() & 0x10) << 2) | ((root.ioport("DSWA")->read() & 0x40) << 1)); | |
| 532 | 535 | default: |
| 533 | return | |
| 536 | return | |
| 534 | 537 | } |
| 535 | 538 | } |
| 536 | 539 | |
| 537 | 540 | READ8_HANDLER( nb1413m3_dipsw2_r ) |
| 538 | 541 | { |
| 542 | device_t &root = space->machine().root_device(); | |
| 539 | 543 | switch (nb1413m3_type) |
| 540 | 544 | { |
| 541 | 545 | case NB1413M3_KANATUEN: |
| 542 | 546 | case NB1413M3_KYUHITO: |
| 543 | return i | |
| 547 | return root.iop | |
| 544 | 548 | case NB1413M3_TAIWANMB: |
| 545 | return (((i | |
| 549 | return (((root.iop | |
| 546 | 550 | case NB1413M3_OTONANO: |
| 547 | 551 | case NB1413M3_MJCAMERA: |
| 548 | 552 | case NB1413M3_IDHIMITU: |
| 549 | 553 | case NB1413M3_KAGUYA2: |
| 550 | return ((i | |
| 554 | return ((root.iop | |
| 551 | 555 | case NB1413M3_SCANDAL: |
| 552 | 556 | case NB1413M3_SCANDALM: |
| 553 | 557 | case NB1413M3_MJFOCUSM: |
| r15082 | r15083 | |
| 558 | 562 | case NB1413M3_UCHUUAI: |
| 559 | 563 | case NB1413M3_TOKIMBSJ: |
| 560 | 564 | case NB1413M3_TOKYOGAL: |
| 561 | return (((i | |
| 565 | return (((root.iop | |
| 562 | 566 | case NB1413M3_TRIPLEW1: |
| 563 | 567 | case NB1413M3_NTOPSTAR: |
| 564 | 568 | case NB1413M3_PSTADIUM: |
| r15082 | r15083 | |
| 568 | 572 | case NB1413M3_MJLSTORY: |
| 569 | 573 | case NB1413M3_QMHAYAKU: |
| 570 | 574 | case NB1413M3_MJGOTTUB: |
| 571 | return (((input_port_read(space->machine(), "DSWB") & 0x02) >> 1) | ((input_port_read(space->machine(), "DSWB") & 0x08) >> 2) | | |
| 572 | ((input_port_read(space->machine(), "DSWB") & 0x20) >> 3) | ((input_port_read(space->machine(), "DSWB") & 0x80) >> 4) | | |
| 573 | ((input_port_read(space->machine(), "DSWA") & 0x02) << 3) | ((input_port_read(space->machine(), "DSWA") & 0x08) << 2) | | |
| 574 | ((input_port_read(space->machine(), "DSWA") & 0x20) << 1) | ((input_port_read(space->machine(), "DSWA") & 0x80) << 0)); | |
| 575 | return (((root.ioport("DSWB")->read() & 0x02) >> 1) | ((root.ioport("DSWB")->read() & 0x08) >> 2) | | |
| 576 | ((root.ioport("DSWB")->read() & 0x20) >> 3) | ((root.ioport("DSWB")->read() & 0x80) >> 4) | | |
| 577 | ((root.ioport("DSWA")->read() & 0x02) << 3) | ((root.ioport("DSWA")->read() & 0x08) << 2) | | |
| 578 | ((root.ioport("DSWA")->read() & 0x20) << 1) | ((root.ioport("DSWA")->read() & 0x80) << 0)); | |
| 575 | 579 | default: |
| 576 | return | |
| 580 | return | |
| 577 | 581 | } |
| 578 | 582 | } |
| 579 | 583 | |
| 580 | 584 | READ8_HANDLER( nb1413m3_dipsw3_l_r ) |
| 581 | 585 | { |
| 582 | return (( | |
| 586 | return (( | |
| 583 | 587 | } |
| 584 | 588 | |
| 585 | 589 | READ8_HANDLER( nb1413m3_dipsw3_h_r ) |
| 586 | 590 | { |
| 587 | return (( | |
| 591 | return (( | |
| 588 | 592 | } |
| 589 | 593 | |
| 590 | 594 | WRITE8_HANDLER( nb1413m3_outcoin_w ) |
| r15082 | r15083 | |
|---|---|---|
| 26 | 26 | INTERRUPT_GEN( subs_interrupt ) |
| 27 | 27 | { |
| 28 | 28 | /* only do NMI interrupt if not in TEST mode */ |
| 29 | if (( | |
| 29 | if (( | |
| 30 | 30 | device_set_input_line(device,INPUT_LINE_NMI,PULSE_LINE); |
| 31 | 31 | } |
| 32 | 32 | |
| r15082 | r15083 | |
| 43 | 43 | int this_val; |
| 44 | 44 | int delta; |
| 45 | 45 | |
| 46 | this_val=i | |
| 46 | this_val=state->iop | |
| 47 | 47 | |
| 48 | 48 | delta=this_val-state->m_last_val_1; |
| 49 | 49 | state->m_last_val_1=this_val; |
| r15082 | r15083 | |
| 72 | 72 | int this_val; |
| 73 | 73 | int delta; |
| 74 | 74 | |
| 75 | this_val=i | |
| 75 | this_val=state->iop | |
| 76 | 76 | |
| 77 | 77 | delta=this_val-state->m_last_val_2; |
| 78 | 78 | state->m_last_val_2=this_val; |
| r15082 | r15083 | |
| 109 | 109 | ***************************************************************************/ |
| 110 | 110 | READ8_MEMBER(subs_state::subs_control_r) |
| 111 | 111 | { |
| 112 | int inport = i | |
| 112 | int inport = iop | |
| 113 | 113 | |
| 114 | 114 | switch (offset & 0x07) |
| 115 | 115 | { |
| r15082 | r15083 | |
| 131 | 131 | ***************************************************************************/ |
| 132 | 132 | READ8_MEMBER(subs_state::subs_coin_r) |
| 133 | 133 | { |
| 134 | int inport = i | |
| 134 | int inport = iop | |
| 135 | 135 | |
| 136 | 136 | switch (offset & 0x07) |
| 137 | 137 | { |
| r15082 | r15083 | |
| 153 | 153 | ***************************************************************************/ |
| 154 | 154 | READ8_MEMBER(subs_state::subs_options_r) |
| 155 | 155 | { |
| 156 | int opts = i | |
| 156 | int opts = iop | |
| 157 | 157 | |
| 158 | 158 | switch (offset & 0x03) |
| 159 | 159 | { |
| r15082 | r15083 | |
|---|---|---|
| 1680 | 1680 | //case (0x5b4/2): |
| 1681 | 1681 | // return cop_mcu_ram[offset]; |
| 1682 | 1682 | |
| 1683 | case (0x700/2): return input_port_read(space->machine(), "DSW1"); | |
| 1684 | case (0x704/2): return input_port_read(space->machine(), "PLAYERS12"); | |
| 1685 | case (0x708/2): return input_port_read(space->machine(), "PLAYERS34"); | |
| 1686 | case (0x70c/2): return input_port_read(space->machine(), "SYSTEM"); | |
| 1687 | case (0x71c/2): return input_port_read(space->machine(), "DSW2"); | |
| 1683 | case (0x700/2): return space->machine().root_device().ioport("DSW1")->read(); | |
| 1684 | case (0x704/2): return space->machine().root_device().ioport("PLAYERS12")->read(); | |
| 1685 | case (0x708/2): return space->machine().root_device().ioport("PLAYERS34")->read(); | |
| 1686 | case (0x70c/2): return space->machine().root_device().ioport("SYSTEM")->read(); | |
| 1687 | case (0x71c/2): return space->machine().root_device().ioport("DSW2")->read(); | |
| 1688 | 1688 | } |
| 1689 | 1689 | } |
| 1690 | 1690 | |
| r15082 | r15083 | |
| 2676 | 2676 | { |
| 2677 | 2677 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2678 | 2678 | |
| 2679 | return | |
| 2679 | return | |
| 2680 | 2680 | } |
| 2681 | 2681 | |
| 2682 | 2682 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2726 | 2726 | { |
| 2727 | 2727 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2728 | 2728 | |
| 2729 | return | |
| 2729 | return | |
| 2730 | 2730 | } |
| 2731 | 2731 | |
| 2732 | 2732 | if(offset == 0x35c/2) |
| 2733 | 2733 | { |
| 2734 | return | |
| 2734 | return | |
| 2735 | 2735 | } |
| 2736 | 2736 | |
| 2737 | 2737 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2768 | 2768 | { |
| 2769 | 2769 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2770 | 2770 | |
| 2771 | return | |
| 2771 | return | |
| 2772 | 2772 | } |
| 2773 | 2773 | |
| 2774 | 2774 | if(offset == 0x31c/2) |
| 2775 | 2775 | { |
| 2776 | return | |
| 2776 | return | |
| 2777 | 2777 | } |
| 2778 | 2778 | |
| 2779 | 2779 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2820 | 2820 | { |
| 2821 | 2821 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2822 | 2822 | |
| 2823 | return | |
| 2823 | return | |
| 2824 | 2824 | } |
| 2825 | 2825 | |
| 2826 | 2826 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2867 | 2867 | { |
| 2868 | 2868 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2869 | 2869 | |
| 2870 | return | |
| 2870 | return | |
| 2871 | 2871 | } |
| 2872 | 2872 | |
| 2873 | 2873 | if(offset == 0x35c/2) |
| 2874 | 2874 | { |
| 2875 | return | |
| 2875 | return | |
| 2876 | 2876 | } |
| 2877 | 2877 | |
| 2878 | 2878 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2919 | 2919 | { |
| 2920 | 2920 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "PLAYERS34", "SYSTEM" }; |
| 2921 | 2921 | |
| 2922 | return | |
| 2922 | return | |
| 2923 | 2923 | } |
| 2924 | 2924 | |
| 2925 | 2925 | if(offset == 0x35c/2) |
| 2926 | 2926 | { |
| 2927 | return | |
| 2927 | return | |
| 2928 | 2928 | } |
| 2929 | 2929 | |
| 2930 | 2930 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 2967 | 2967 | { |
| 2968 | 2968 | static const char *const portnames[] = { "DSW1", "PLAYERS12", "UNK", "SYSTEM" }; |
| 2969 | 2969 | |
| 2970 | return | |
| 2970 | return | |
| 2971 | 2971 | } |
| 2972 | 2972 | |
| 2973 | 2973 | return generic_cop_r(space, offset, mem_mask); |
| r15082 | r15083 | |
|---|---|---|
| 115 | 115 | data = machine().rand(); |
| 116 | 116 | break; |
| 117 | 117 | case 0x04: /* 2P inputs */ |
| 118 | data = i | |
| 118 | data = iop | |
| 119 | 119 | break; |
| 120 | 120 | case 0x06: /* 1P inputs + DIPSW #1 & #2 */ |
| 121 | 121 | index = offset & 0x01; |
| 122 | data = i | |
| 122 | data = iop | |
| 123 | 123 | break; |
| 124 | 124 | case 0x07: /* DIPSW #3 */ |
| 125 | data = i | |
| 125 | data = iop | |
| 126 | 126 | break; |
| 127 | 127 | |
| 128 | 128 | default: |
| r15082 | r15083 | |
| 197 | 197 | MACHINE_START( ajax ) |
| 198 | 198 | { |
| 199 | 199 | ajax_state *state = machine.driver_data<ajax_state>(); |
| 200 | UINT8 *MAIN = | |
| 200 | UINT8 *MAIN = sta | |
| 201 | 201 | UINT8 *SUB = state->memregion("sub")->base(); |
| 202 | 202 | |
| 203 | 203 | state->membank("bank1")->configure_entries(0, 9, &SUB[0x10000], 0x2000); |
| r15082 | r15083 | |
|---|---|---|
| 21 | 21 | static int nitedrvr_steering( running_machine &machine ) |
| 22 | 22 | { |
| 23 | 23 | nitedrvr_state *state = machine.driver_data<nitedrvr_state>(); |
| 24 | int this_val = i | |
| 24 | int this_val = state->iop | |
| 25 | 25 | int delta = this_val - state->m_last_steering_val; |
| 26 | 26 | |
| 27 | 27 | state->m_last_steering_val = this_val; |
| r15082 | r15083 | |
| 98 | 98 | |
| 99 | 99 | READ8_MEMBER(nitedrvr_state::nitedrvr_in0_r) |
| 100 | 100 | { |
| 101 | int gear = i | |
| 101 | int gear = iop | |
| 102 | 102 | |
| 103 | 103 | if (gear & 0x10) m_gear = 1; |
| 104 | 104 | else if (gear & 0x20) m_gear = 2; |
| r15082 | r15083 | |
| 108 | 108 | switch (offset & 0x03) |
| 109 | 109 | { |
| 110 | 110 | case 0x00: /* No remapping necessary */ |
| 111 | return i | |
| 111 | return iop | |
| 112 | 112 | case 0x01: /* No remapping necessary */ |
| 113 | return i | |
| 113 | return iop | |
| 114 | 114 | case 0x02: /* Remap our gear shift */ |
| 115 | 115 | if (m_gear == 1) |
| 116 | 116 | return 0xe0; |
| r15082 | r15083 | |
| 121 | 121 | else |
| 122 | 122 | return 0x70; |
| 123 | 123 | case 0x03: /* Remap our steering */ |
| 124 | return (i | |
| 124 | return (iop | |
| 125 | 125 | default: |
| 126 | 126 | return 0xff; |
| 127 | 127 | } |
| r15082 | r15083 | |
| 161 | 161 | |
| 162 | 162 | READ8_MEMBER(nitedrvr_state::nitedrvr_in1_r) |
| 163 | 163 | { |
| 164 | int port = i | |
| 164 | int port = iop | |
| 165 | 165 | |
| 166 | 166 | m_ac_line = (m_ac_line + 1) % 3; |
| 167 | 167 |
| r15082 | r15083 | |
|---|---|---|
| 55 | 55 | /*----------- defined in video/lordgun.c -----------*/ |
| 56 | 56 | |
| 57 | 57 | |
| 58 | float lordgun_crosshair_mapper(const i | |
| 58 | float lordgun_crosshair_mapper(const ioport_field | |
| 59 | 59 | void lordgun_update_gun(running_machine &machine, int i); |
| 60 | 60 | |
| 61 | 61 | VIDEO_START( lordgun ); |
| r15082 | r15083 | |
|---|---|---|
| 101 | 101 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ |
| 102 | 102 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) )\ |
| 103 | 103 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ |
| 104 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 105 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 106 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 107 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 104 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 105 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 106 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 107 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 108 | 108 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ |
| 109 | 109 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) )\ |
| 110 | 110 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) )\ |
| 111 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 112 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 113 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 114 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008) | |
| 111 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 112 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 113 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 114 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008) | |
| 115 | 115 | |
| 116 | 116 | #define COINAGE_TEST_LOC\ |
| 117 | 117 | PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" )\ |
| r15082 | r15083 | |
| 125 | 125 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ |
| 126 | 126 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) )\ |
| 127 | 127 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ |
| 128 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 129 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 130 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 131 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 128 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 129 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 130 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 131 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 132 | 132 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ |
| 133 | 133 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) )\ |
| 134 | 134 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) )\ |
| 135 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008)\ | |
| 136 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 137 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0000)\ | |
| 138 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,PORTCOND_EQUALS,0x0008) | |
| 135 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ | |
| 136 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 137 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ | |
| 138 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008) | |
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | #define DIFFICULTY_DEMO_SOUNDS\ |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | /* Mode 2 Coinage */ |
| 95 | 95 | |
| 96 | 96 | #define IREM_COIN_MODE_2_OLD_LOC(DIPBANK) \ |
| 97 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, | |
| 97 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, | |
| 98 | 98 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 99 | 99 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 100 | 100 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 101 | 101 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \ |
| 102 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, | |
| 102 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, | |
| 103 | 103 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 104 | 104 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 105 | 105 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \ |
| 106 | 106 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 107 | 107 | |
| 108 | 108 | #define IREM_COIN_MODE_2_DSW1_LOC(DIPBANK) \ |
| 109 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, | |
| 109 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, | |
| 110 | 110 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) \ |
| 111 | 111 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 112 | 112 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 113 | 113 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 114 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, | |
| 114 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, | |
| 115 | 115 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 116 | 116 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 117 | 117 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \ |
| r15082 | r15083 | |
| 122 | 122 | /* to make the definitions a bit more general. However, these are enough to cover */ |
| 123 | 123 | /* all the currently emulated games */ |
| 124 | 124 | #define IREM_COIN_MODE_2 \ |
| 125 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW1", 0x04, | |
| 125 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW1", 0x04, | |
| 126 | 126 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) \ |
| 127 | 127 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 128 | 128 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 129 | 129 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 130 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW1", 0x04, | |
| 130 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW1", 0x04, | |
| 131 | 131 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 132 | 132 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 133 | 133 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \ |
| 134 | 134 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 135 | 135 | |
| 136 | 136 | #define IREM_COIN_MODE_2_HIGH \ |
| 137 | PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0800, | |
| 137 | PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0800, | |
| 138 | 138 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) \ |
| 139 | 139 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) \ |
| 140 | 140 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) \ |
| 141 | 141 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) \ |
| 142 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0800, | |
| 142 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0800, | |
| 143 | 143 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_2C ) ) \ |
| 144 | 144 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) \ |
| 145 | 145 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_5C ) ) \ |
| r15082 | r15083 | |
| 150 | 150 | |
| 151 | 151 | #define IREM_Z80_COINAGE_TYPE_1_LOC(DIPBANK) \ |
| 152 | 152 | /* Coin Mode 1 */ \ |
| 153 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 153 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 154 | 154 | /* PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) */ \ |
| 155 | 155 | PORT_DIPSETTING( 0x90, DEF_STR( 7C_1C ) ) \ |
| 156 | 156 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \ |
| r15082 | r15083 | |
| 172 | 172 | |
| 173 | 173 | #define IREM_Z80_COINAGE_TYPE_2_LOC(DIPBANK) \ |
| 174 | 174 | /* Coin Mode 1 */ \ |
| 175 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 175 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 176 | 176 | /* PORT_DIPSETTING( 0x80, DEF_STR( Free_Play ) ) */ \ |
| 177 | 177 | /* PORT_DIPSETTING( 0x90, DEF_STR( Free_Play ) ) */ \ |
| 178 | 178 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \ |
| r15082 | r15083 | |
| 194 | 194 | |
| 195 | 195 | #define IREM_Z80_COINAGE_TYPE_3_LOC(DIPBANK) \ |
| 196 | 196 | /* Coin Mode 1 */ \ |
| 197 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 197 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 198 | 198 | PORT_DIPSETTING( 0x90, DEF_STR( 7C_1C ) ) \ |
| 199 | 199 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \ |
| 200 | 200 | PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \ |
| r15082 | r15083 | |
| 216 | 216 | |
| 217 | 217 | #define IREM_Z80_COINAGE_TYPE_4_LOC(DIPBANK) \ |
| 218 | 218 | /* Coin Mode 1 */ \ |
| 219 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 219 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 220 | 220 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \ |
| 221 | 221 | PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \ |
| 222 | 222 | PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) \ |
| r15082 | r15083 | |
| 238 | 238 | |
| 239 | 239 | #define IREM_Z80_COINAGE_TYPE_5_LOC(DIPBANK) \ |
| 240 | 240 | /* Coin Mode 1 */ \ |
| 241 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 241 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, | |
| 242 | 242 | PORT_DIPSETTING( 0x00, DEF_STR( 8C_1C ) ) \ |
| 243 | 243 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \ |
| 244 | 244 | PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \ |
| r15082 | r15083 | |
| 281 | 281 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 282 | 282 | |
| 283 | 283 | #define IREM_COIN_MODE_1_NEW_HIGH \ |
| 284 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 284 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 285 | 285 | PORT_DIPSETTING( 0xa000, DEF_STR( 6C_1C ) ) \ |
| 286 | 286 | PORT_DIPSETTING( 0xb000, DEF_STR( 5C_1C ) ) \ |
| 287 | 287 | PORT_DIPSETTING( 0xc000, DEF_STR( 4C_1C ) ) \ |
| r15082 | r15083 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | DECLARE_READ16_MEMBER(sc4_mem_r); |
| 53 | 53 | DECLARE_WRITE16_MEMBER(sc4_mem_w); |
| 54 | ||
| 55 | DECLARE_READ16_MEMBER(sc4_cs1_r); | |
| 54 | 56 | }; |
| 55 | 57 | |
| 56 | 58 | class sc4_adder4_state : public sc4_state |
| r15082 | r15083 | |
| 60 | 62 | : sc4_state(mconfig, type, tag), |
| 61 | 63 | m_adder4cpu(*this, "adder4") |
| 62 | 64 | { } |
| 65 | ||
| 66 | UINT32* m_adder4cpuregion; | |
| 67 | UINT32* m_adder4ram; | |
| 63 | 68 | |
| 69 | DECLARE_READ32_MEMBER(adder4_mem_r); | |
| 70 | DECLARE_WRITE32_MEMBER(adder4_mem_w); | |
| 71 | ||
| 72 | ||
| 64 | 73 | // devices |
| 65 | 74 | required_device<cpu_device> m_adder4cpu; |
| 66 | 75 | }; |
| r15082 | r15083 | |
|---|---|---|
| 17 | 17 | required_shared_ptr<UINT8> m_videoram; |
| 18 | 18 | required_shared_ptr<UINT8> m_colorram; |
| 19 | 19 | required_shared_ptr<UINT8> m_spriteram; |
| 20 | // UINT8 * m_paletteram; // currently this uses generic palette handling | |
| 21 | size_t m_spriteram_size; | |
| 22 | 20 | |
| 23 | 21 | /* video-related */ |
| 24 | 22 | tilemap_t *m_fg_tilemap; |
| r15082 | r15083 | |
|---|---|---|
| 17 | 17 | required_shared_ptr<UINT8> m_videoram3; |
| 18 | 18 | required_shared_ptr<UINT8> m_videoram2; |
| 19 | 19 | |
| 20 | size_t m_videoram_size; | |
| 21 | size_t m_spriteram_size; | |
| 22 | size_t m_spriteram2_size; | |
| 23 | ||
| 24 | 20 | /* video-related */ |
| 25 | 21 | bitmap_ind16 *m_tmp_bitmap1; |
| 26 | 22 | bitmap_ind16 *m_tmp_bitmap2; |
| r15082 | r15083 | |
|---|---|---|
| 33 | 33 | required_shared_ptr<UINT16> m_ground_ram; |
| 34 | 34 | required_shared_ptr<UINT16> m_object_ram; |
| 35 | 35 | |
| 36 | size_t m_hudram_size; | |
| 37 | size_t m_objectram_size; | |
| 38 | size_t m_groundram_size; | |
| 39 | ||
| 40 | 36 | /* video-related */ |
| 41 | tilemap_t *m_tilemap; | |
| 42 | UINT8 m_ground_ctrl; | |
| 43 | UINT16 m_scroll_h; | |
| 44 | UINT16 m_scroll_v; | |
| 37 | tilemap_t *m_tilemap; | |
| 38 | UINT8 m_ground_ctrl; | |
| 39 | UINT16 m_scroll_h; | |
| 40 | UINT16 m_scroll_v; | |
| 45 | 41 | bitmap_ind16 *m_front_buffer; |
| 46 | 42 | bitmap_ind16 *m_back_buffer; |
| 47 | emu_timer *m_bufend_timer; | |
| 48 | emu_timer *m_cursor_timer; | |
| 43 | emu_timer *m_bufend_timer; | |
| 44 | emu_timer *m_cursor_timer; | |
| 49 | 45 | |
| 50 | 46 | /* Rotation Control */ |
| 51 | 47 | UINT16 m_xsal; |
| r15082 | r15083 | |
| 59 | 55 | |
| 60 | 56 | /* Object palette RAM control */ |
| 61 | 57 | UINT32 m_iden; |
| 62 | UINT8 * | |
| 58 | UINT8 * | |
| 63 | 59 | UINT32 m_obj_pal_latch; |
| 64 | 60 | UINT32 m_obj_pal_addr; |
| 65 | 61 |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | #define TOAPLAN_COINAGE_DUAL_LOC(DIP, MASK, WORLD, DIPBANK) \ |
| 93 | 93 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":!5,!6") \ |
| 94 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 95 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 96 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 97 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 94 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 95 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 96 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 97 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 98 | 98 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \ |
| 99 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 100 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 99 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 100 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 101 | 101 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":!7,!8") \ |
| 102 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 103 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 104 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 105 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 106 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 107 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 108 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 109 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) | |
| 102 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 103 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 104 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 105 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 106 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 107 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 108 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 109 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) | |
| 110 | 110 | |
| 111 | 111 | /* without location */ |
| 112 | 112 | #define TOAPLAN_COINAGE_JAPAN_COIN_A \ |
| r15082 | r15083 | |
| 147 | 147 | |
| 148 | 148 | #define TOAPLAN_COINAGE_DUAL(DIP, MASK, WORLD) \ |
| 149 | 149 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) \ |
| 150 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 151 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 152 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 153 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 150 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 151 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 152 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 153 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 154 | 154 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \ |
| 155 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 156 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 155 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 156 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 157 | 157 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) \ |
| 158 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 159 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 160 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 161 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_NOTEQUALS,WORLD) \ | |
| 162 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 163 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 164 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) \ | |
| 165 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) PORT_CONDITION(#DIP,MASK,PORTCOND_EQUALS,WORLD) | |
| 158 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 159 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 160 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 161 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,NOTEQUALS,WORLD) \ | |
| 162 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 163 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 164 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) \ | |
| 165 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) PORT_CONDITION(#DIP,MASK,EQUALS,WORLD) | |
| 166 | 166 | |
| 167 | 167 | |
| 168 | 168 | /************************** Difficulty Dip Switches ***************************/ |
| r15082 | r15083 | |
|---|---|---|
| 1696 | 1696 | $(DRIVERS)/cb2001.o \ |
| 1697 | 1697 | $(DRIVERS)/cdi.o $(VIDEO)/mcd212.o $(MACHINE)/cdi070.o $(MACHINE)/cdislave.o $(MACHINE)/cdicdic.o \ |
| 1698 | 1698 | $(DRIVERS)/cesclass.o \ |
| 1699 | $(DRIVERS)/chance32.o \ | |
| 1699 | 1700 | $(DRIVERS)/chsuper.o \ |
| 1700 | 1701 | $(DRIVERS)/cidelsa.o $(VIDEO)/cidelsa.o \ |
| 1701 | 1702 | $(DRIVERS)/coinmstr.o \ |
| r15082 | r15083 | |
| 2071 | 2072 | $(LAYOUT)/mdrawpkr.lh \ |
| 2072 | 2073 | $(LAYOUT)/meybjack.lh |
| 2073 | 2074 | |
| 2075 | $(DRIVERS)/meyc8088.o: $(LAYOUT)/gldarrow.lh | |
| 2076 | ||
| 2074 | 2077 | $(DRIVERS)/midzeus.o: $(LAYOUT)/crusnexo.lh |
| 2075 | 2078 | |
| 2076 | 2079 | $(DRIVERS)/mil4000.o: $(LAYOUT)/mil4000.lh |
| r15082 | r15083 | |
|---|---|---|
| 216 | 216 | UINT32 *index_ptr=0; |
| 217 | 217 | int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1; |
| 218 | 218 | int xoffs,yoffs; |
| 219 | UINT8 *rom = | |
| 219 | UINT8 *rom = sta | |
| 220 | 220 | UINT8 *rawrom = state->memregion("gfx2")->base(); |
| 221 | 221 | int blockIsTilemapIndex=0; |
| 222 | 222 | int sprite2=0,indx2=0,use8bppMode=0; |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | /* draw color overlay foreground and background */ |
| 50 | 50 | |
| 51 | if (state->m_fgoal_player == 1 && ( | |
| 51 | if (state->m_fgoal_player == 1 && ( | |
| 52 | 52 | { |
| 53 | 53 | drawgfxzoom_opaque(state->m_fgbitmap, cliprect, screen.machine().gfx[0], |
| 54 | 54 | 0, (state->m_fgoal_player << 2) | state->m_current_color, |
| r15082 | r15083 | |
|---|---|---|
| 1115 | 1115 | { |
| 1116 | 1116 | running_machine &machine = mcd212->machine(); |
| 1117 | 1117 | int x = 0; |
| 1118 | UINT8 debug_mode = in | |
| 1118 | UINT8 debug_mode = machine.root_device().ioport | |
| 1119 | 1119 | UINT8 global_plane_a_disable = debug_mode & 1; |
| 1120 | 1120 | UINT8 global_plane_b_disable = debug_mode & 2; |
| 1121 | 1121 | UINT8 debug_backdrop_enable = debug_mode & 4; |
| r15082 | r15083 | |
|---|---|---|
| 257 | 257 | { |
| 258 | 258 | mystston_state *state = screen.machine().driver_data<mystston_state>(); |
| 259 | 259 | |
| 260 | int flip = (*state->m_video_control & 0x80) ^ (( | |
| 260 | int flip = (*state->m_video_control & 0x80) ^ (( | |
| 261 | 261 | |
| 262 | 262 | set_palette(screen.machine(), state); |
| 263 | 263 |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | VIDEO_START( artmagic ) |
| 42 | 42 | { |
| 43 | 43 | artmagic_state *state = machine.driver_data<artmagic_state>(); |
| 44 | state->m_blitter_base = (UINT16 *) | |
| 44 | state->m_blitter_base = (UINT16 *)sta | |
| 45 | 45 | state->m_blitter_mask = state->memregion("gfx1")->bytes()/2 - 1; |
| 46 | 46 | |
| 47 | 47 | state_save_register_global_array(machine, state->m_xor); |
| r15082 | r15083 | |
|---|---|---|
| 194 | 194 | |
| 195 | 195 | READ8_MEMBER(bking_state::bking_input_port_5_r) |
| 196 | 196 | { |
| 197 | return i | |
| 197 | return iop | |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | READ8_MEMBER(bking_state::bking_input_port_6_r) |
| 201 | 201 | { |
| 202 | return i | |
| 202 | return iop | |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | READ8_MEMBER(bking_state::bking_pos_r) |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | { |
| 83 | 83 | orbit_state *state = screen.machine().driver_data<orbit_state>(); |
| 84 | 84 | |
| 85 | state->m_flip_screen = | |
| 85 | state->m_flip_screen = | |
| 86 | 86 | |
| 87 | 87 | state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 88 | 88 |
| r15082 | r15083 | |
|---|---|---|
| 26 | 26 | { |
| 27 | 27 | policetr_state *state = machine.driver_data<policetr_state>(); |
| 28 | 28 | /* the source bitmap is in ROM */ |
| 29 | state->m_srcbitmap = | |
| 29 | state->m_srcbitmap = sta | |
| 30 | 30 | |
| 31 | 31 | /* compute the height */ |
| 32 | 32 | state->m_srcbitmap_height_mask = (state->memregion("gfx1")->bytes() / SRCBITMAP_WIDTH) - 1; |
| r15082 | r15083 | |
| 267 | 267 | { |
| 268 | 268 | /* latch 0x00 is player 1's gun X coordinate */ |
| 269 | 269 | case 0x00: |
| 270 | inputval = ((i | |
| 270 | inputval = ((iop | |
| 271 | 271 | inputval += 0x50; |
| 272 | 272 | return (inputval << 20) | 0x20000000; |
| 273 | 273 | |
| 274 | 274 | /* latch 0x01 is player 1's gun Y coordinate */ |
| 275 | 275 | case 0x01: |
| 276 | inputval = ((i | |
| 276 | inputval = ((iop | |
| 277 | 277 | inputval += 0x17; |
| 278 | 278 | return (inputval << 20); |
| 279 | 279 | |
| 280 | 280 | /* latch 0x02 is player 2's gun X coordinate */ |
| 281 | 281 | case 0x02: |
| 282 | inputval = ((i | |
| 282 | inputval = ((iop | |
| 283 | 283 | inputval += 0x50; |
| 284 | 284 | return (inputval << 20) | 0x20000000; |
| 285 | 285 | |
| 286 | 286 | /* latch 0x03 is player 2's gun Y coordinate */ |
| 287 | 287 | case 0x03: |
| 288 | inputval = ((i | |
| 288 | inputval = ((iop | |
| 289 | 289 | inputval += 0x17; |
| 290 | 290 | return (inputval << 20); |
| 291 | 291 |
| r15082 | r15083 | |
|---|---|---|
| 363 | 363 | static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset) |
| 364 | 364 | { |
| 365 | 365 | system1_state *state = machine.driver_data<system1_state>(); |
| 366 | UINT32 gfxbanks = | |
| 366 | UINT32 gfxbanks = sta | |
| 367 | 367 | const UINT8 *gfxbase = state->memregion("sprites")->base(); |
| 368 | 368 | UINT8 *spriteram = state->m_spriteram; |
| 369 | 369 | int flipscreen = state->flip_screen(); |
| r15082 | r15083 | |
|---|---|---|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | state->m_nb19010_busyflag = 0; |
| 333 | machine.scheduler().timer_set(attotime::from_nsec(1 | |
| 333 | machine.scheduler().timer_set(attotime::from_nsec(1000 * state->m_nb19010_busyctr), FUNC(blitter_timer_callback)); | |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /****************************************************************************** |
| r15082 | r15083 | |
|---|---|---|
| 356 | 356 | { |
| 357 | 357 | dynax_state *state = machine.driver_data<dynax_state>(); |
| 358 | 358 | UINT8 cmd; |
| 359 | UINT8 *ROM = | |
| 359 | UINT8 *ROM = sta | |
| 360 | 360 | size_t ROM_size = state->memregion(gfx)->bytes(); |
| 361 | 361 | |
| 362 | 362 | int sx; |
| r15082 | r15083 | |
| 1204 | 1204 | if (toggle) |
| 1205 | 1205 | { |
| 1206 | 1206 | dynax_state *state = machine.driver_data<dynax_state>(); |
| 1207 | UINT8 *RAM = | |
| 1207 | UINT8 *RAM = sta | |
| 1208 | 1208 | size_t size = state->memregion( "gfx1" )->bytes(); |
| 1209 | 1209 | static int i = 0, c = 0, r = 0; |
| 1210 | 1210 |
| r15082 | r15083 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | /* reset the system */ |
| 24 | 24 | state->m_palettebank_vis = 0; |
| 25 | state->m_sprite_bank[0] = machine.root_device().memregion("gfx1")->base(); | |
| 26 | state->m_sprite_bank[1] = machine.root_device().memregion("gfx1")->base() + 0x10000; | |
| 25 | state->m_sprite_bank[0] = state->memregion("gfx1")->base(); | |
| 26 | state->m_sprite_bank[1] = state->memregion("gfx1")->base() + 0x10000; | |
| 27 | 27 | |
| 28 | 28 | /* determine sprite size */ |
| 29 | state->m_sprite_data = | |
| 29 | state->m_sprite_data = sta | |
| 30 | 30 | state->m_sprite_mask = state->memregion("gfx1")->bytes() - 1; |
| 31 | 31 | |
| 32 | 32 | /* register for saving */ |
| r15082 | r15083 | |
|---|---|---|
| 184 | 184 | state->m_videoplane[0][i] = state->m_videoplane[1][i] = 0xff; |
| 185 | 185 | |
| 186 | 186 | /* fetch the GROM base */ |
| 187 | state->m_grom_base = | |
| 187 | state->m_grom_base = sta | |
| 188 | 188 | state->m_grom_size = state->memregion("gfx1")->bytes(); |
| 189 | 189 | state->m_grom_bank = 0; |
| 190 | 190 | state->m_grom_bank_mask = state->m_grom_size >> 24; |
| r15082 | r15083 | |
|---|---|---|
| 212 | 212 | { |
| 213 | 213 | undrfire_state *state = machine.driver_data<undrfire_state>(); |
| 214 | 214 | UINT32 *spriteram32 = state->m_spriteram; |
| 215 | UINT16 *spritemap = (UINT16 *) | |
| 215 | UINT16 *spritemap = (UINT16 *)sta | |
| 216 | 216 | UINT8 *spritemapHibit = (UINT8 *)state->memregion("user2")->base(); |
| 217 | 217 | |
| 218 | 218 | int offs, data, tilenum, color, flipx, flipy; |
| r15082 | r15083 | |
| 468 | 468 | /* See if we should draw artificial gun targets */ |
| 469 | 469 | /* (not yet implemented...) */ |
| 470 | 470 | |
| 471 | if ( | |
| 471 | if ( | |
| 472 | 472 | { |
| 473 | 473 | popmessage("Gunsights on"); |
| 474 | 474 | } |
| r15082 | r15083 | |
|---|---|---|
| 147 | 147 | { |
| 148 | 148 | amiga_state *state = screen.machine().driver_data<amiga_state>(); |
| 149 | 149 | UINT32 hvpos = (state->m_last_scanline << 8) | (screen.hpos() >> 2); |
| 150 | UINT32 latchedpos = i | |
| 150 | UINT32 latchedpos = state->iop | |
| 151 | 151 | |
| 152 | 152 | /* if there's no latched position, or if we are in the active display area */ |
| 153 | 153 | /* but before the latching point, return the live HV position */ |
| r15082 | r15083 | |
|---|---|---|
| 159 | 159 | int i; |
| 160 | 160 | UINT64 *mcode; |
| 161 | 161 | |
| 162 | state->m_vectorrom = (UINT16 *) | |
| 162 | state->m_vectorrom = (UINT16 *)sta | |
| 163 | 163 | mcode = (UINT64 *)state->memregion("proms")->base(); |
| 164 | 164 | |
| 165 | 165 | /* Decode microcode */ |
| r15082 | r15083 | |
|---|---|---|
| 369 | 369 | int voffs; |
| 370 | 370 | int offs; |
| 371 | 371 | |
| 372 | UINT8 *VROM1 = | |
| 372 | UINT8 *VROM1 = sta | |
| 373 | 373 | UINT8 *VROM2 = state->memregion("user2")->base(); /* "ag_16.bin" */ |
| 374 | 374 | |
| 375 | 375 | /* offset in pattern data */ |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | { |
| 64 | 64 | lwings_state *state = machine.driver_data<lwings_state>(); |
| 65 | 65 | int code, color; |
| 66 | UINT8 *rom = | |
| 66 | UINT8 *rom = sta | |
| 67 | 67 | int mask = state->memregion("gfx5")->bytes() - 1; |
| 68 | 68 | |
| 69 | 69 | tile_index = (tile_index + state->m_bg2_image * 0x20) & mask; |
| r15082 | r15083 | |
|---|---|---|
| 880 | 880 | static void check_palette(running_machine &machine) |
| 881 | 881 | { |
| 882 | 882 | dkong_state *state = machine.driver_data<dkong_state>(); |
| 883 | | |
| 883 | | |
| 884 | 884 | int newset; |
| 885 | 885 | |
| 886 | 886 | port = state->ioport("VIDHW"); |
| 887 | 887 | if (port != NULL) |
| 888 | 888 | { |
| 889 | newset = | |
| 889 | newset = | |
| 890 | 890 | if (newset != state->m_vidhw) |
| 891 | 891 | { |
| 892 | 892 | state->m_vidhw = newset; |
| r15082 | r15083 | |
| 937 | 937 | { |
| 938 | 938 | case HARDWARE_TRS02: |
| 939 | 939 | machine.primary_screen->register_screen_bitmap(state->m_bg_bits); |
| 940 | state->m_gfx3 = machine.root_device().memregion("gfx3")->base(); | |
| 941 | state->m_gfx3_len = machine.root_device().memregion("gfx3")->bytes(); | |
| 940 | state->m_gfx3 = state->memregion("gfx3")->base(); | |
| 941 | state->m_gfx3_len = state->memregion("gfx3")->bytes(); | |
| 942 | 942 | /* fall through */ |
| 943 | 943 | case HARDWARE_TKG04: |
| 944 | 944 | case HARDWARE_TKG02: |
| r15082 | r15083 | |
| 950 | 950 | state->m_bg_tilemap->set_scrolldx(0, 128); |
| 951 | 951 | |
| 952 | 952 | machine.primary_screen->register_screen_bitmap(state->m_bg_bits); |
| 953 | state->m_gfx4 = machine.root_device().memregion("gfx4")->base(); | |
| 954 | state->m_gfx3 = machine.root_device().memregion("gfx3")->base(); | |
| 953 | state->m_gfx4 = state->memregion("gfx4")->base(); | |
| 954 | state->m_gfx3 = state->memregion("gfx3")->base(); | |
| 955 | 955 | state->m_gfx3_len = state->memregion("gfx3")->bytes(); |
| 956 | 956 | |
| 957 | 957 | break; |
| r15082 | r15083 | |
|---|---|---|
| 276 | 276 | WRITE8_MEMBER(travrusa_state::travrusa_flipscreen_w) |
| 277 | 277 | { |
| 278 | 278 | /* screen flip is handled both by software and hardware */ |
| 279 | data ^= ~i | |
| 279 | data ^= ~iop | |
| 280 | 280 | |
| 281 | 281 | flip_screen_set(data & 1); |
| 282 | 282 |
| r15082 | r15083 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | switch (offset) |
| 31 | 31 | { |
| 32 | case 0x08: return input_port_read(machine(), "P2"); // Player 2 | |
| 33 | case 0x10: return input_port_read(machine(), "COIN"); // Coins, Tilt, Service | |
| 34 | case 0x20: return input_port_read(machine(), "P1") ^ m_invert_controls; // Player 1 | |
| 35 | case 0x21: return input_port_read(machine(), "DSW0"); // DIPs | |
| 36 | case 0x22: return input_port_read(machine(), "DSW1"); // DIPs + VBLANK | |
| 32 | case 0x08: return ioport("P2")->read(); // Player 2 | |
| 33 | case 0x10: return ioport("COIN")->read(); // Coins, Tilt, Service | |
| 34 | case 0x20: return ioport("P1")->read() ^ m_invert_controls; // Player 1 | |
| 35 | case 0x21: return ioport("DSW0")->read(); // DIPs | |
| 36 | case 0x22: return ioport("DSW1")->read(); // DIPs + VBLANK | |
| 37 | 37 | default: return 0; |
| 38 | 38 | } |
| 39 | 39 | } |
| r15082 | r15083 | |
|---|---|---|
| 264 | 264 | /* For now we just check 0x40 in DSW1, and ignore the write if we */ |
| 265 | 265 | /* are in upright controls mode. */ |
| 266 | 266 | |
| 267 | if (i | |
| 267 | if (iop | |
| 268 | 268 | btime_video_control_w(space, offset, data); |
| 269 | 269 | } |
| 270 | 270 | |
| r15082 | r15083 | |
| 278 | 278 | |
| 279 | 279 | m_btime_palette = (data & 0x30) >> 3; |
| 280 | 280 | |
| 281 | if (i | |
| 281 | if (iop | |
| 282 | 282 | flip_screen_set(data & 0x80); |
| 283 | 283 | } |
| 284 | 284 | |
| r15082 | r15083 | |
| 286 | 286 | { |
| 287 | 287 | m_btime_palette = (data >> 2) & 0x03; |
| 288 | 288 | |
| 289 | if (!(i | |
| 289 | if (!(iop | |
| 290 | 290 | flip_screen_set(data & 0x01); |
| 291 | 291 | } |
| 292 | 292 |
| r15082 | r15083 | |
|---|---|---|
| 1619 | 1619 | m_cps_b_regs[m_game_config->mult_factor2 / 2]) >> 16; |
| 1620 | 1620 | |
| 1621 | 1621 | if (offset == m_game_config->in2_addr / 2) /* Extra input ports (on C-board) */ |
| 1622 | return i | |
| 1622 | return iop | |
| 1623 | 1623 | |
| 1624 | 1624 | if (offset == m_game_config->in3_addr / 2) /* Player 4 controls (on C-board) ("Captain Commando") */ |
| 1625 | return i | |
| 1625 | return iop | |
| 1626 | 1626 | |
| 1627 | 1627 | if (m_cps_version == 2) |
| 1628 | 1628 | { |
| r15082 | r15083 | |
|---|---|---|
| 27 | 27 | int width = visarea.width(); |
| 28 | 28 | int height = visarea.height(); |
| 29 | 29 | |
| 30 | *x = ((input_port_read_safe(machine, gunnames[player * 2], 0x00) & 0xff) * width) / 255; | |
| 31 | *y = ((input_port_read_safe(machine, gunnames[1 + player * 2], 0x00) & 0xff) * height) / 255; | |
| 30 | *x = ((machine.root_device().ioport(gunnames[player * 2])->read_safe(0x00) & 0xff) * width) / 255; | |
| 31 | *y = ((machine.root_device().ioport(gunnames[1 + player * 2])->read_safe(0x00) & 0xff) * height) / 255; | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | |
| r15082 | r15083 | |
| 82 | 82 | state->m_screenram = auto_alloc_array(machine, UINT16, BLITTER_DEST_WIDTH * BLITTER_DEST_HEIGHT); |
| 83 | 83 | |
| 84 | 84 | /* predetermine blitter info */ |
| 85 | state->m_blitter_base = (UINT16 *) | |
| 85 | state->m_blitter_base = (UINT16 *)sta | |
| 86 | 86 | state->m_blitter_rows = state->memregion("gfx1")->bytes() / (2*BLITTER_SOURCE_WIDTH); |
| 87 | 87 | } |
| 88 | 88 |
| r15082 | r15083 | |
|---|---|---|
| 175 | 175 | state->m_page_select = 0xc0; |
| 176 | 176 | |
| 177 | 177 | /* fetch the GROM base */ |
| 178 | state->m_grom_base = | |
| 178 | state->m_grom_base = sta | |
| 179 | 179 | state->m_grom_size = state->memregion("grom")->bytes(); |
| 180 | 180 | } |
| 181 | 181 | |
| r15082 | r15083 | |
| 461 | 461 | |
| 462 | 462 | /* a read from offsets 12-15 return input port values */ |
| 463 | 463 | if (offset >= 12 && offset <= 15) |
| 464 | result = i | |
| 464 | result = iop | |
| 465 | 465 | |
| 466 | 466 | return result; |
| 467 | 467 | } |
| r15082 | r15083 | |
|---|---|---|
| 472 | 472 | { |
| 473 | 473 | hyprduel_state *state = machine.driver_data<hyprduel_state>(); |
| 474 | 474 | UINT8 *base_gfx4 = state->m_expanded_gfx1; |
| 475 | UINT8 *base_gfx8 = | |
| 475 | UINT8 *base_gfx8 = sta | |
| 476 | 476 | UINT32 gfx_size = state->memregion("gfx1")->bytes(); |
| 477 | 477 | |
| 478 | 478 | int max_x = machine.primary_screen->width(); |
| r15082 | r15083 | |
|---|---|---|
| 373 | 373 | { |
| 374 | 374 | cosmic_state *state = machine.driver_data<cosmic_state>(); |
| 375 | 375 | UINT8 y; |
| 376 | UINT8 *horz_PROM = | |
| 376 | UINT8 *horz_PROM = sta | |
| 377 | 377 | UINT8 *vert_PROM = state->memregion("user3")->base(); |
| 378 | 378 | offs_t horz_addr = 0; |
| 379 | 379 |
| r15082 | r15083 | |
|---|---|---|
| 2713 | 2713 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(model2_exit), &machine)); |
| 2714 | 2714 | |
| 2715 | 2715 | /* initialize the hardware rasterizer */ |
| 2716 | model2_3d_init( machine, (UINT16*) | |
| 2716 | model2_3d_init( machine, (UINT16*)sta | |
| 2717 | 2717 | |
| 2718 | 2718 | /* initialize the geometry engine */ |
| 2719 | 2719 | geo_init( machine, (UINT32*)state->memregion("user2")->base() ); |
| r15082 | r15083 | |
|---|---|---|
| 29 | 29 | int xbit, ybit, size; |
| 30 | 30 | |
| 31 | 31 | size = 2; |
| 32 | if (in | |
| 32 | if (machine.root_device().ioport | |
| 33 | 33 | { |
| 34 | 34 | size = 4; |
| 35 | 35 | } |
| r15082 | r15083 | |
| 55 | 55 | lazercmd_state *state = screen.machine().driver_data<lazercmd_state>(); |
| 56 | 56 | int i, x, y; |
| 57 | 57 | |
| 58 | int video_inverted = | |
| 58 | int video_inverted = | |
| 59 | 59 | |
| 60 | 60 | /* The first row of characters are invisible */ |
| 61 | 61 | for (i = 0; i < (VERT_RES - 1) * HORZ_RES; i++) |
| r15082 | r15083 | |
|---|---|---|
| 6 | 6 | m_videoram[offset] = data; |
| 7 | 7 | m_bg_tilemap->mark_tile_dirty(offset); |
| 8 | 8 | |
| 9 | if (i | |
| 9 | if (iop | |
| 10 | 10 | { |
| 11 | 11 | logerror("blockade_videoram_w: scanline %d\n", machine().primary_screen->vpos()); |
| 12 | 12 | device_spin_until_interrupt(&space.device()); |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | |
| 178 | 178 | static const char *const gunnames[] = { "LIGHT0_X", "LIGHT1_X", "LIGHT0_Y", "LIGHT1_Y" }; |
| 179 | 179 | |
| 180 | float lordgun_crosshair_mapper( | |
| 180 | float lordgun_crosshair_mapper( | |
| 181 | 181 | { |
| 182 | 182 | int x = linear_value - 0x3c; |
| 183 | 183 | |
| r15082 | r15083 | |
| 190 | 190 | static void lorddgun_calc_gun_scr(running_machine &machine, int i) |
| 191 | 191 | { |
| 192 | 192 | lordgun_state *state = machine.driver_data<lordgun_state>(); |
| 193 | // popmessage("%03x, %02x", | |
| 193 | // popmessage("%03x, %02x", | |
| 194 | 194 | |
| 195 | int x = i | |
| 195 | int x = state->iop | |
| 196 | 196 | |
| 197 | 197 | if ( (x < 0) || (x > sizeof(lordgun_gun_x_table)/sizeof(lordgun_gun_x_table[0])) ) |
| 198 | 198 | x = 0; |
| 199 | 199 | |
| 200 | 200 | state->m_gun[i].scr_x = lordgun_gun_x_table[x]; |
| 201 | state->m_gun[i].scr_y = i | |
| 201 | state->m_gun[i].scr_y = state->iop | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | void lordgun_update_gun(running_machine &machine, int i) |
| r15082 | r15083 | |
| 206 | 206 | lordgun_state *state = machine.driver_data<lordgun_state>(); |
| 207 | 207 | const rectangle &visarea = machine.primary_screen->visible_area(); |
| 208 | 208 | |
| 209 | state->m_gun[i].hw_x = input_port_read(machine, gunnames[i]); | |
| 210 | state->m_gun[i].hw_y = input_port_read(machine, gunnames[i+2]); | |
| 209 | state->m_gun[i].hw_x = state->ioport(gunnames[i])->read(); | |
| 210 | state->m_gun[i].hw_y = state->ioport(gunnames[i+2])->read(); | |
| 211 | 211 | |
| 212 | 212 | lorddgun_calc_gun_scr(machine, i); |
| 213 | 213 |
| r15082 | r15083 | |
|---|---|---|
| 466 | 466 | /* bit 0 is data */ |
| 467 | 467 | /* bit 1 is cs (active low) */ |
| 468 | 468 | /* bit 2 is clock (active high) */ |
| 469 | i | |
| 469 | iop | |
| 470 | 470 | |
| 471 | 471 | /* bits 3-4 control palette dimming */ |
| 472 | 472 | /* 4 = DIMPOL = when set, negate SHAD */ |
| r15082 | r15083 | |
|---|---|---|
| 2679 | 2679 | pvr_drawframebuffer(screen.machine(),bitmap,cliprect); |
| 2680 | 2680 | |
| 2681 | 2681 | // update this here so we only do string lookup once per frame |
| 2682 | state->debug_dip_status = | |
| 2682 | state->debug_dip_status = | |
| 2683 | 2683 | |
| 2684 | 2684 | return 0; |
| 2685 | 2685 | } |
| r15082 | r15083 | |
|---|---|---|
| 533 | 533 | |
| 534 | 534 | tilemap_t *tmptilemap0, *tmptilemap1; |
| 535 | 535 | |
| 536 | state->flip_screen_set(~ | |
| 536 | state->flip_screen_set(~ | |
| 537 | 537 | |
| 538 | 538 | /* Layers enable (not quite right) */ |
| 539 | 539 | |
| r15082 | r15083 | |
| 707 | 707 | |
| 708 | 708 | tilemap_t *tmptilemap0, *tmptilemap1; |
| 709 | 709 | |
| 710 | state->flip_screen_set(~ | |
| 710 | state->flip_screen_set(~ | |
| 711 | 711 | |
| 712 | 712 | /* Layers enable (not quite right) */ |
| 713 | 713 |
| r15082 | r15083 | |
|---|---|---|
| 620 | 620 | pgm_state *state = machine.driver_data<pgm_state>(); |
| 621 | 621 | int i; |
| 622 | 622 | |
| 623 | state->m_bdata = | |
| 623 | state->m_bdata = sta | |
| 624 | 624 | state->m_bdatasize = state->memregion("sprmask")->bytes() - 1; |
| 625 | 625 | state->m_aoffset = 0; |
| 626 | 626 | state->m_boffset = 0; |
| r15082 | r15083 | |
|---|---|---|
| 1505 | 1505 | struct SCANLINE *scanline1, *scanline2; |
| 1506 | 1506 | UINT16 c; |
| 1507 | 1507 | UINT16 prev_colour = 0; |
| 1508 | int blurring = in | |
| 1508 | int blurring = machine. | |
| 1509 | 1509 | |
| 1510 | 1510 | g_profiler.start(PROFILER_VIDEO); |
| 1511 | 1511 | |
| r15082 | r15083 | |
| 2661 | 2661 | static UINT8 snes_dbg_video( running_machine &machine, UINT16 curline ) |
| 2662 | 2662 | { |
| 2663 | 2663 | int i; |
| 2664 | UINT8 toggles = in | |
| 2664 | UINT8 toggles = machine.root_device().ioport("DEBUG1")->read_safe( | |
| 2665 | 2665 | debug_options.select_pri[SNES_BG1] = (toggles & 0x03); |
| 2666 | 2666 | debug_options.select_pri[SNES_BG2] = (toggles & 0x0c) >> 2; |
| 2667 | 2667 | debug_options.select_pri[SNES_BG3] = (toggles & 0x30) >> 4; |
| 2668 | 2668 | debug_options.select_pri[SNES_BG4] = (toggles & 0xc0) >> 6; |
| 2669 | 2669 | |
| 2670 | toggles = in | |
| 2670 | toggles = machine.root_device().ioport("DEBUG2")->read_safe( | |
| 2671 | 2671 | for (i = 0; i < 4; i++) |
| 2672 | 2672 | DEBUG_TOGGLE(i, debug_options.bg_disabled[i], ("Debug: Disabled BG%d.\n", i + 1), ("Debug: Enabled BG%d.\n", i + 1)) |
| 2673 | 2673 | DEBUG_TOGGLE(4, debug_options.bg_disabled[SNES_OAM], ("Debug: Disabled OAM.\n"), ("Debug: Enabled OAM.\n")) |
| r15082 | r15083 | |
| 2675 | 2675 | DEBUG_TOGGLE(6, debug_options.colormath_disabled, ("Debug: Disabled Color Math.\n"), ("Debug: Enabled Color Math.\n")) |
| 2676 | 2676 | DEBUG_TOGGLE(7, debug_options.windows_disabled, ("Debug: Disabled Window Masks.\n"), ("Debug: Enabled Window Masks.\n")) |
| 2677 | 2677 | |
| 2678 | toggles = in | |
| 2678 | toggles = machine.root_device().ioport("DEBUG4")->read_safe( | |
| 2679 | 2679 | for (i = 0; i < 8; i++) |
| 2680 | 2680 | DEBUG_TOGGLE(i, debug_options.mode_disabled[i], ("Debug: Disabled Mode %d drawing.\n", i), ("Debug: Enabled Mode %d drawing.\n", i)) |
| 2681 | 2681 | |
| 2682 | toggles = in | |
| 2682 | toggles = machine.root_device().ioport("DEBUG3")->read_safe( | |
| 2683 | 2683 | DEBUG_TOGGLE(2, debug_options.mosaic_disabled, ("Debug: Disabled Mosaic.\n"), ("Debug: Enabled Mosaic.\n")) |
| 2684 | 2684 | debug_options.sprite_reversed = BIT(toggles, 7); |
| 2685 | 2685 | debug_options.select_pri[SNES_OAM] = (toggles & 0x70) >> 4; |
| r15082 | r15083 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | UINT16 *destline; |
| 62 | 62 | UINT8 *priline; |
| 63 | UINT8 *sprdata = | |
| 63 | UINT8 *sprdata = sta | |
| 64 | 64 | int sprmask = state->memregion("gfx1")->bytes()-1; |
| 65 | 65 | |
| 66 | 66 | int xstart, xend, xinc; |
| r15082 | r15083 | |
|---|---|---|
| 232 | 232 | |
| 233 | 233 | SCREEN_UPDATE_RGB32( spacewar ) |
| 234 | 234 | { |
| 235 | int sw_option = | |
| 235 | int sw_option = | |
| 236 | 236 | |
| 237 | 237 | SCREEN_UPDATE32_CALL(cinemat); |
| 238 | 238 |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | { |
| 78 | 78 | wecleman_state *state = machine.driver_data<wecleman_state>(); |
| 79 | 79 | const pen_t *base_pal = machine.pens; |
| 80 | UINT8 *base_gfx = | |
| 80 | UINT8 *base_gfx = sta | |
| 81 | 81 | int gfx_max = state->memregion("gfx1")->bytes(); |
| 82 | 82 | |
| 83 | 83 | UINT16 *source = state->m_spriteram; |
| r15082 | r15083 | |
|---|---|---|
| 299 | 299 | { |
| 300 | 300 | switch (offset) |
| 301 | 301 | { |
| 302 | case 0x0000/2 : return input_port_read(machine(), "IN1"); // Coins | |
| 303 | case 0x0002/2 : return input_port_read(machine(), "IN2"); // Buttons | |
| 304 | case 0x0004/2 : return input_port_read(machine(), "IN3"); // Motor Limit Switches | |
| 305 | case 0x0006/2 : return input_port_read(machine(), "IN4"); // DSW 1 & 2 | |
| 302 | case 0x0000/2 : return ioport("IN1")->read(); // Coins | |
| 303 | case 0x0002/2 : return ioport("IN2")->read(); // Buttons | |
| 304 | case 0x0004/2 : return ioport("IN3")->read(); // Motor Limit Switches | |
| 305 | case 0x0006/2 : return ioport("IN4")->read(); // DSW 1 & 2 | |
| 306 | 306 | |
| 307 | 307 | case 0x0008/2 : return soundlatch2_word_r(space,0,0xffff); // From sound cpu |
| 308 | 308 | |
| 309 | 309 | case 0x0010/2 : |
| 310 | 310 | switch (m_ip_select & 0x3) |
| 311 | 311 | { |
| 312 | case 0 : return i | |
| 312 | case 0 : return iop | |
| 313 | 313 | case 1 : return 0xffff; // Cockpit: Up / Down Position |
| 314 | 314 | case 2 : return 0xffff; // Cockpit: Left / Right Position? |
| 315 | case 3 : return i | |
| 315 | case 3 : return iop | |
| 316 | 316 | default: return 0xffff; |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | |
| 320 | case 0x2200/2 : return i | |
| 320 | case 0x2200/2 : return iop | |
| 321 | 321 | |
| 322 | 322 | default: SHOW_READ_ERROR("vreg %04X read!",offset*2); |
| 323 | 323 | return m_vregs[offset]; |
| r15082 | r15083 | |
| 395 | 395 | { |
| 396 | 396 | switch (offset) |
| 397 | 397 | { |
| 398 | case 0x0000/2 : return input_port_read(machine(), "IN1"); // Coins | |
| 399 | case 0x0002/2 : return input_port_read(machine(), "IN2"); // Buttons | |
| 400 | case 0x0004/2 : return input_port_read(machine(), "IN3"); // Motor Limit Switches | |
| 401 | case 0x0006/2 : return input_port_read(machine(), "IN4"); // DSW 1 & 2 | |
| 398 | case 0x0000/2 : return ioport("IN1")->read(); // Coins | |
| 399 | case 0x0002/2 : return ioport("IN2")->read(); // Buttons | |
| 400 | case 0x0004/2 : return ioport("IN3")->read(); // Motor Limit Switches | |
| 401 | case 0x0006/2 : return ioport("IN4")->read(); // DSW 1 & 2 | |
| 402 | 402 | |
| 403 | 403 | case 0x0010/2 : |
| 404 | 404 | switch (m_ip_select & 0x3) |
| 405 | 405 | { |
| 406 | case 0 : return i | |
| 406 | case 0 : return iop | |
| 407 | 407 | case 1 : return ~0; // Cockpit: Up / Down Position? |
| 408 | 408 | case 2 : return ~0; // Cockpit: Left / Right Position? |
| 409 | 409 | default: return ~0; |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | case 0x2200/2 : return i | |
| 412 | case 0x2200/2 : return iop | |
| 413 | 413 | case 0x2300/2 : return soundlatch2_byte_r(space,0); // From sound cpu |
| 414 | 414 | |
| 415 | 415 | default: SHOW_READ_ERROR("vreg %04X read!",offset*2); |
| r15082 | r15083 | |
| 488 | 488 | { |
| 489 | 489 | switch (offset) |
| 490 | 490 | { |
| 491 | case 0x0000/2 : return i | |
| 491 | case 0x0000/2 : return iop | |
| 492 | 492 | |
| 493 | 493 | // case 0x0002/2 : return 0xFFFF; |
| 494 | 494 | |
| 495 | case 0x0004/2 : return i | |
| 495 | case 0x0004/2 : return iop | |
| 496 | 496 | |
| 497 | case 0x0006/2 : return i | |
| 497 | case 0x0006/2 : return iop | |
| 498 | 498 | |
| 499 | 499 | case 0x0008/2 : return soundlatch2_byte_r(space,0); // From sound cpu |
| 500 | 500 | |
| 501 | case 0x000c/2 : return i | |
| 501 | case 0x000c/2 : return iop | |
| 502 | 502 | |
| 503 | 503 | case 0x0010/2 : // Accel + Driving Wheel |
| 504 | return (i | |
| 504 | return (iop | |
| 505 | 505 | |
| 506 | 506 | default: SHOW_READ_ERROR("vreg %04X read!",offset*2); |
| 507 | 507 | return m_vregs[offset]; |
| r15082 | r15083 | |
| 534 | 534 | |
| 535 | 535 | switch (offset) |
| 536 | 536 | { |
| 537 | case 0x0000/2 : return i | |
| 537 | case 0x0000/2 : return iop | |
| 538 | 538 | |
| 539 | case 0x0004/2 : return i | |
| 539 | case 0x0004/2 : return iop | |
| 540 | 540 | |
| 541 | 541 | case 0x0008/2 : return soundlatch2_byte_r(space,0); // From sound cpu |
| 542 | 542 | |
| 543 | 543 | case 0x0010/2 : // X, Y |
| 544 | return i | |
| 544 | return iop | |
| 545 | 545 | |
| 546 | 546 | case 0x0018/2 : |
| 547 | 547 | return (m_f1gpstr2_ioready[0]&1) ? 0xff : 0xf0; |
| r15082 | r15083 | |
|---|---|---|
| 2741 | 2741 | for (code = 0; code < machine.gfx[GFX_TEXTURE_TILE]->total_elements; code++) |
| 2742 | 2742 | gfx_element_decode(machine.gfx[GFX_TEXTURE_TILE], code); |
| 2743 | 2743 | |
| 2744 | Prepare3dTexture(machine, | |
| 2744 | Prepare3dTexture(machine, sta | |
| 2745 | 2745 | state->m_dirtypal = auto_alloc_array(machine, UINT8, NAMCOS22_PALETTE_SIZE/4); |
| 2746 | state->m_mPtRomSize = | |
| 2746 | state->m_mPtRomSize = sta | |
| 2747 | 2747 | state->m_mpPolyL = state->memregion("pointrom")->base(); |
| 2748 | 2748 | state->m_mpPolyM = state->m_mpPolyL + state->m_mPtRomSize; |
| 2749 | 2749 | state->m_mpPolyH = state->m_mpPolyM + state->m_mPtRomSize; |
| r15082 | r15083 | |
|---|---|---|
| 462 | 462 | { |
| 463 | 463 | centiped_state *state = screen.machine().driver_data<centiped_state>(); |
| 464 | 464 | UINT8 *spriteram = state->m_spriteram; |
| 465 | int upright_mode = | |
| 465 | int upright_mode = | |
| 466 | 466 | int offs; |
| 467 | 467 | |
| 468 | 468 | /* if the cocktail/upright switch flipped, force refresh */ |
| r15082 | r15083 | |
|---|---|---|
| 557 | 557 | static void decode_gfx(running_machine &machine, UINT16 *pflookup, UINT16 *molookup) |
| 558 | 558 | { |
| 559 | 559 | atarisy1_state *state = machine.driver_data<atarisy1_state>(); |
| 560 | UINT8 *prom1 = & | |
| 560 | UINT8 *prom1 = &sta | |
| 561 | 561 | UINT8 *prom2 = &state->memregion("proms")->u8(0x200); |
| 562 | 562 | int obj, i; |
| 563 | 563 |
| r15082 | r15083 | |
|---|---|---|
| 446 | 446 | { |
| 447 | 447 | metro_state *state = machine.driver_data<metro_state>(); |
| 448 | 448 | UINT8 *base_gfx4 = state->m_expanded_gfx1; |
| 449 | UINT8 *base_gfx8 = | |
| 449 | UINT8 *base_gfx8 = sta | |
| 450 | 450 | UINT32 gfx_size = state->memregion("gfx1")->bytes(); |
| 451 | 451 | const rectangle &visarea = machine.primary_screen->visible_area(); |
| 452 | 452 |
| r15082 | r15083 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | pc090oj_draw_sprites(state->m_pc090oj, bitmap, cliprect, 1); |
| 54 | 54 | |
| 55 | // if (input_port_read(machine, "P1X")) | |
| 56 | // popmessage("%d %d", input_port_read(machine, "P1X"), input_port_read(machine, "P1Y")); | |
| 55 | // if (state->ioport("P1X")->read()) | |
| 56 | // popmessage("%d %d", machine, "P1X"), state->ioport("P1Y")->read()); | |
| 57 | 57 | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
| r15082 | r15083 | |
|---|---|---|
| 276 | 276 | WRITE8_MEMBER(m52_state::m52_flipscreen_w) |
| 277 | 277 | { |
| 278 | 278 | /* screen flip is handled both by software and hardware */ |
| 279 | flip_screen_set((data & 0x01) ^ (~i | |
| 279 | flip_screen_set((data & 0x01) ^ (~iop | |
| 280 | 280 | |
| 281 | 281 | coin_counter_w(machine(), 0, data & 0x02); |
| 282 | 282 | coin_counter_w(machine(), 1, data & 0x20); |
| r15082 | r15083 | |
|---|---|---|
| 239 | 239 | int width = visarea.width(); |
| 240 | 240 | int height = visarea.height(); |
| 241 | 241 | /* only 2 lightguns are connected */ |
| 242 | *x = visarea.min_x + (((input_port_read(machine, player ? "FAKE2_X" : "FAKE1_X") & 0xff) * width) >> 8); | |
| 243 | *y = visarea.min_y + (((input_port_read(machine, player ? "FAKE2_Y" : "FAKE1_Y") & 0xff) * height) >> 8); | |
| 242 | *x = visarea.min_x + (((machine.root_device().ioport(player ? "FAKE2_X" : "FAKE1_X")->read() & 0xff) * width) >> 8); | |
| 243 | *y = visarea.min_y + (((machine.root_device().ioport(player ? "FAKE2_Y" : "FAKE1_Y")->read() & 0xff) * height) >> 8); | |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | |
| r15082 | r15083 | |
| 805 | 805 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 806 | 806 | |
| 807 | 807 | case 2: |
| 808 | return | |
| 808 | return | |
| 809 | 809 | } |
| 810 | 810 | return 0; |
| 811 | 811 | } |
| r15082 | r15083 | |
|---|---|---|
| 254 | 254 | SCREEN_UPDATE_IND16( helifire ) |
| 255 | 255 | { |
| 256 | 256 | n8080_state *state = screen.machine().driver_data<n8080_state>(); |
| 257 | int SUN_BRIGHTNESS = input_port_read(screen.machine(), "POT0"); | |
| 258 | int SEA_BRIGHTNESS = input_port_read(screen.machine(), "POT1"); | |
| 257 | int SUN_BRIGHTNESS = screen.machine().root_device().ioport("POT0")->read(); | |
| 258 | int SEA_BRIGHTNESS = screen.machine().root_device().ioport("POT1")->read(); | |
| 259 | 259 | |
| 260 | 260 | static const int wave[8] = { 0, 1, 2, 2, 2, 1, 0, 0 }; |
| 261 | 261 |
| r15082 | r15083 | |
|---|---|---|
| 341 | 341 | VR1 = 310 Ohm |
| 342 | 342 | VR2 = 910 Ohm |
| 343 | 343 | */ |
| 344 | info->step[level] = sprite_xscale(xscale, 1.0e3 * input_port_read(machine, "VR1") / 100.0, 1.0e3 * input_port_read(machine, "VR2") / 100.0, 100e-12); | |
| 345 | } | |
| 344 | info->step[level] = sprite_xscale(xscale, 1.0e3 * machine.root_device().ioport("VR1")->read() / 100.0, 1.0e3 * machine.root_device().ioport("VR2")->read() / 100.0, 100e-12); | |
| 345 | } | |
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | bombjack_state *state = machine.driver_data<bombjack_state>(); |
| 78 | 78 | int offs; |
| 79 | 79 | |
| 80 | for (offs = state->m_spriteram | |
| 80 | for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4) | |
| 81 | 81 | { |
| 82 | 82 | |
| 83 | 83 | /* |
| r15082 | r15083 | |
|---|---|---|
| 481 | 481 | break; |
| 482 | 482 | |
| 483 | 483 | case 0x10: /* player 1 handle */ |
| 484 | result = i | |
| 484 | result = iop | |
| 485 | 485 | break; |
| 486 | 486 | |
| 487 | 487 | case 0x11: /* player 2 handle */ |
| 488 | result = i | |
| 488 | result = iop | |
| 489 | 489 | break; |
| 490 | 490 | |
| 491 | 491 | case 0x12: /* player 3 handle */ |
| 492 | result = i | |
| 492 | result = iop | |
| 493 | 493 | break; |
| 494 | 494 | |
| 495 | 495 | case 0x13: /* player 4 handle */ |
| 496 | result = i | |
| 496 | result = iop | |
| 497 | 497 | break; |
| 498 | 498 | |
| 499 | 499 | case 0x14: /* keypad column 0 */ |
| 500 | result = i | |
| 500 | result = iop | |
| 501 | 501 | break; |
| 502 | 502 | |
| 503 | 503 | case 0x15: /* keypad column 1 */ |
| 504 | result = i | |
| 504 | result = iop | |
| 505 | 505 | break; |
| 506 | 506 | |
| 507 | 507 | case 0x16: /* keypad column 2 */ |
| 508 | result = i | |
| 508 | result = iop | |
| 509 | 509 | break; |
| 510 | 510 | |
| 511 | 511 | case 0x17: /* keypad column 3 */ |
| 512 | result = i | |
| 512 | result = iop | |
| 513 | 513 | break; |
| 514 | 514 | |
| 515 | 515 | case 0x1c: /* player 1 knob */ |
| 516 | result = i | |
| 516 | result = iop | |
| 517 | 517 | break; |
| 518 | 518 | |
| 519 | 519 | case 0x1d: /* player 2 knob */ |
| 520 | result = i | |
| 520 | result = iop | |
| 521 | 521 | break; |
| 522 | 522 | |
| 523 | 523 | case 0x1e: /* player 3 knob */ |
| 524 | result = i | |
| 524 | result = iop | |
| 525 | 525 | break; |
| 526 | 526 | |
| 527 | 527 | case 0x1f: /* player 4 knob */ |
| 528 | result = i | |
| 528 | result = iop | |
| 529 | 529 | break; |
| 530 | 530 | } |
| 531 | 531 |
| r15082 | r15083 | |
|---|---|---|
| 305 | 305 | WRITE8_MEMBER(m62_state::m62_flipscreen_w) |
| 306 | 306 | { |
| 307 | 307 | /* screen flip is handled both by software and hardware */ |
| 308 | data ^= ~i | |
| 308 | data ^= ~iop | |
| 309 | 309 | |
| 310 | 310 | m_flipscreen = data & 0x01; |
| 311 | 311 | if (m_flipscreen) |
| r15082 | r15083 | |
|---|---|---|
| 110 | 110 | { |
| 111 | 111 | switch (offset) |
| 112 | 112 | { |
| 113 | case 0x00: return input_port_read(machine(), "SYSTEM"); | |
| 114 | case 0x01: return input_port_read(machine(), "P1"); | |
| 115 | case 0x02: return input_port_read(machine(), "P2"); | |
| 116 | case 0x03: return input_port_read(machine(), "DSW1"); | |
| 117 | case 0x04: return input_port_read(machine(), "DSW2"); | |
| 113 | case 0x00: return ioport("SYSTEM")->read(); | |
| 114 | case 0x01: return ioport("P1")->read(); | |
| 115 | case 0x02: return ioport("P2")->read(); | |
| 116 | case 0x03: return ioport("DSW1")->read(); | |
| 117 | case 0x04: return ioport("DSW2")->read(); | |
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 |
| r15082 | r15083 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | if (x_flip) |
| 227 | 227 | { |
| 228 | rom_l = | |
| 228 | rom_l = sta | |
| 229 | 229 | rom_r = state->memregion("8bpp_l")->base(); |
| 230 | 230 | } |
| 231 | 231 | else |
| r15082 | r15083 | |
|---|---|---|
| 83 | 83 | draw_bombs(screen.machine(), bitmap, cliprect); |
| 84 | 84 | |
| 85 | 85 | /* watchdog is disabled during service mode */ |
| 86 | screen.machine().watchdog_enable(!( | |
| 86 | screen.machine().watchdog_enable(!( | |
| 87 | 87 | |
| 88 | 88 | return 0; |
| 89 | 89 | } |
| r15082 | r15083 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | state->m_fg_tilemap->set_transparent_pen(0xff); |
| 54 | 54 | |
| 55 | state->m_zoomdata = (UINT16 *) | |
| 55 | state->m_zoomdata = (UINT16 *)sta | |
| 56 | 56 | gfx_element_set_source(machine.gfx[3], (UINT8 *)state->m_zoomdata); |
| 57 | 57 | |
| 58 | 58 | // state->save_pointer(NAME(state->m_zoomdata), state->memregion("gfx4")->bytes()); |
| r15082 | r15083 | |
| 68 | 68 | |
| 69 | 69 | state->m_fg_tilemap->set_transparent_pen(0xff); |
| 70 | 70 | |
| 71 | state->m_zoomdata = (UINT16 *) | |
| 71 | state->m_zoomdata = (UINT16 *)sta | |
| 72 | 72 | gfx_element_set_source(machine.gfx[3], (UINT8 *)state->m_zoomdata); |
| 73 | 73 | |
| 74 | 74 | // state->save_pointer(NAME(state->m_zoomdata), state->memregion("gfx4")->bytes()); |
| r15082 | r15083 | |
|---|---|---|
| 130 | 130 | route16_state *state = machine.driver_data<route16_state>(); |
| 131 | 131 | offs_t offs; |
| 132 | 132 | |
| 133 | UINT8 *color_prom1 = & | |
| 133 | UINT8 *color_prom1 = &sta | |
| 134 | 134 | UINT8 *color_prom2 = &state->memregion("proms")->base()[0x100]; |
| 135 | 135 | |
| 136 | 136 | for (offs = 0; offs < state->m_videoram1.bytes(); offs++) |
| r15082 | r15083 | |
|---|---|---|
| 435 | 435 | { |
| 436 | 436 | int i; |
| 437 | 437 | |
| 438 | int beamx = ((input_port_read(screen.machine(), "AN0") & 0xff) * (HBSTART - HBEND)) >> 8; | |
| 439 | int beamy = ((input_port_read(screen.machine(), "AN1") & 0xff) * (VBSTART - VBEND)) >> 8; | |
| 438 | int beamx = ((screen.machine().root_device().ioport("AN0")->read() & 0xff) * (HBSTART - HBEND)) >> 8; | |
| 439 | int beamy = ((screen.machine().root_device().ioport("AN1")->read() & 0xff) * (VBSTART - VBEND)) >> 8; | |
| 440 | 440 | |
| 441 | 441 | /* The timing of this FIRQ is very important. The games look for an FIRQ |
| 442 | 442 | and then wait about 650 cycles, clear the old FIRQ, and wait a |
| r15082 | r15083 | |
|---|---|---|
| 416 | 416 | UINT8 pix[2][4][3]; |
| 417 | 417 | |
| 418 | 418 | /* Road slice map ROMs */ |
| 419 | const UINT8 *const gfx3 = | |
| 419 | const UINT8 *const gfx3 = sta | |
| 420 | 420 | const UINT8 *const rom_a = gfx3; |
| 421 | 421 | const UINT8 *const rom_b = gfx3 + 0x2000; |
| 422 | 422 | const UINT8 *const rom_c = gfx3 + 0x4000; |
| r15082 | r15083 | |
| 859 | 859 | UINT32 offs; |
| 860 | 860 | |
| 861 | 861 | /* The many lookup table ROMs */ |
| 862 | const UINT8 *const ic48 = | |
| 862 | const UINT8 *const ic48 = sta | |
| 863 | 863 | const UINT8 *const ic281 = ic48 + 0x2000; |
| 864 | 864 | |
| 865 | const UINT8 *const proms = | |
| 865 | const UINT8 *const proms = sta | |
| 866 | 866 | const UINT8 *const ic190 = proms + 0xc00; |
| 867 | 867 | const UINT8 *const ic162 = proms + 0xe00; |
| 868 | 868 | const UINT8 *const ic25 = proms + 0x1000; |
| 869 | 869 | |
| 870 | const UINT8 *const ic106 = | |
| 870 | const UINT8 *const ic106 = sta | |
| 871 | 871 | const UINT8 *const ic73 = ic106 + 0x4000; |
| 872 | 872 | |
| 873 | 873 | const UINT8 *const pixdata_rgn = state->memregion("obj_tiles")->base(); |
| r15082 | r15083 | |
| 1300 | 1300 | UINT32 x_mask; |
| 1301 | 1301 | |
| 1302 | 1302 | /* 2bpp characters */ |
| 1303 | chars = | |
| 1303 | chars = sta | |
| 1304 | 1304 | gfx2 = state->memregion("char_tiles")->base() + 0x4000; |
| 1305 | 1305 | |
| 1306 | 1306 | /* X/Y scroll values are the last word in char RAM */ |
| r15082 | r15083 | |
| 1535 | 1535 | UINT32 rva20_6; |
| 1536 | 1536 | |
| 1537 | 1537 | /* ROM/PROM lookup tables */ |
| 1538 | const UINT8 *rcols = (UINT8*)( | |
| 1538 | const UINT8 *rcols = (UINT8*)(sta | |
| 1539 | 1539 | const UINT8 *rom = state->memregion("road")->base(); |
| 1540 | 1540 | const UINT8 *prom0 = rom + 0x4000; |
| 1541 | 1541 | const UINT8 *prom1 = rom + 0x4200; |
| r15082 | r15083 | |
| 2167 | 2167 | UINT32 rva20_6; |
| 2168 | 2168 | |
| 2169 | 2169 | /* ROM/PROM lookup tables */ |
| 2170 | const UINT8 *rcols = (UINT8*)( | |
| 2170 | const UINT8 *rcols = (UINT8*)(sta | |
| 2171 | 2171 | const UINT8 *rom = state->memregion("road")->base(); |
| 2172 | 2172 | const UINT8 *prom0 = rom + 0x4000; |
| 2173 | 2173 | const UINT8 *prom1 = rom + 0x4200; |
| r15082 | r15083 | |
| 2580 | 2580 | UINT32 x_stride; |
| 2581 | 2581 | |
| 2582 | 2582 | /* The many lookup table ROMs */ |
| 2583 | const UINT8 *const bug13 = (UINT8*) | |
| 2583 | const UINT8 *const bug13 = (UINT8*)sta | |
| 2584 | 2584 | const UINT8 *const bug18s = bug13 + 0x2000; |
| 2585 | const UINT8 *const bb8 = (UINT8*) | |
| 2585 | const UINT8 *const bb8 = (UINT8*)sta | |
| 2586 | 2586 | |
| 2587 | const UINT8 *const bug16s = (UINT8*) | |
| 2587 | const UINT8 *const bug16s = (UINT8*)sta | |
| 2588 | 2588 | const UINT8 *const bug17s = bug16s + 0x8000; |
| 2589 | 2589 | |
| 2590 | const UINT8 *const bb9o = (UINT8*) | |
| 2590 | const UINT8 *const bb9o = (UINT8*)sta | |
| 2591 | 2591 | const UINT8 *const bb9e = bb9o + 0x800; |
| 2592 | 2592 | |
| 2593 | 2593 | const UINT8 *const pixdata_rgn = (UINT8*)state->memregion("obj_tiles")->base(); |
| r15082 | r15083 | |
|---|---|---|
| 365 | 365 | coin_counter_w(machine(), 1,data & 0x02); |
| 366 | 366 | |
| 367 | 367 | /* bit 2 is flip screen (handled both by software and hardware) */ |
| 368 | flip_screen_set(((data & 0x04) >> 2) ^ ((~i | |
| 368 | flip_screen_set(((data & 0x04) >> 2) ^ ((~iop | |
| 369 | 369 | |
| 370 | 370 | /* bit 3 is display disable */ |
| 371 | 371 | m_video_off = data & 0x08; |
| r15082 | r15083 | |
| 391 | 391 | coin_counter_w(machine(), 1,data & 0x02); |
| 392 | 392 | |
| 393 | 393 | /* bit 2 is flip screen (handled both by software and hardware) */ |
| 394 | flip_screen_set(((data & 0x04) >> 2) ^ ((~i | |
| 394 | flip_screen_set(((data & 0x04) >> 2) ^ ((~iop | |
| 395 | 395 | |
| 396 | 396 | /* bit 3 is display disable */ |
| 397 | 397 | m_video_off = data & 0x08; |
| r15082 | r15083 | |
|---|---|---|
| 253 | 253 | static SCREEN_UPDATE_IND16( madalien ) |
| 254 | 254 | { |
| 255 | 255 | madalien_state *state = screen.machine().driver_data<madalien_state>(); |
| 256 | int flip = BIT( | |
| 256 | int flip = BIT( | |
| 257 | 257 | |
| 258 | 258 | // bits #0 and #1 define scrolling mode |
| 259 | 259 | // |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | READ8_MEMBER(aeroboto_state::aeroboto_in0_r) |
| 83 | 83 | { |
| 84 | return i | |
| 84 | return iop | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | WRITE8_MEMBER(aeroboto_state::aeroboto_3000_w) |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | //int xpos,ypos; |
| 70 | 70 | |
| 71 | 71 | /* get gun raw coordinates (player 1) */ |
| 72 | state->m_gun_x_p1 = (input_port_read(machine, "LIGHT0_X") & 0xff) * 320 / 256; | |
| 73 | state->m_gun_y_p1 = (input_port_read(machine, "LIGHT0_Y") & 0xff) * 240 / 256; | |
| 72 | state->m_gun_x_p1 = (state->ioport("LIGHT0_X")->read() & 0xff) * 320 / 256; | |
| 73 | state->m_gun_y_p1 = (state->ioport("LIGHT0_Y")->read() & 0xff) * 240 / 256; | |
| 74 | 74 | |
| 75 | 75 | /* compute the coordinates for drawing (from routine at 0x009ab0) */ |
| 76 | 76 | //xpos = state->m_gun_x_p1; |
| r15082 | r15083 | |
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | /* get gun raw coordinates (player 2) */ |
| 87 | state->m_gun_x_p2 = (input_port_read(machine, "LIGHT1_X") & 0xff) * 320 / 256; | |
| 88 | state->m_gun_y_p2 = (input_port_read(machine, "LIGHT1_Y") & 0xff) * 240 / 256; | |
| 87 | state->m_gun_x_p2 = (state->ioport("LIGHT1_X")->read() & 0xff) * 320 / 256; | |
| 88 | state->m_gun_y_p2 = (state->ioport("LIGHT1_Y")->read() & 0xff) * 240 / 256; | |
| 89 | 89 | |
| 90 | 90 | /* compute the coordinates for drawing (from routine at 0x009b6e) */ |
| 91 | 91 | //xpos = state->m_gun_x_p2; |
| r15082 | r15083 | |
|---|---|---|
| 209 | 209 | mario_state *state = screen.machine().driver_data<mario_state>(); |
| 210 | 210 | int t; |
| 211 | 211 | |
| 212 | t = | |
| 212 | t = | |
| 213 | 213 | if (t != state->m_monitor) |
| 214 | 214 | { |
| 215 | 215 | state->m_monitor = t; |
| r15082 | r15083 | |
|---|---|---|
| 117 | 117 | pleiads_sound_control_c_w(machine().device("cust"),offset,data); |
| 118 | 118 | |
| 119 | 119 | m_cocktail = |
| 120 | ( ( i | |
| 120 | ( ( iop | |
| 121 | 121 | ( data & 0x01 ) ); // handling player 2 |
| 122 | 122 | m_palreg = (data >> 1) & 0x03; // palette sel is bit 1 & 2 |
| 123 | 123 | m_bankreg = (data >> 2) & 0x01; // banksel is just bit 2 |
| r15082 | r15083 | |
| 129 | 129 | pleiads_sound_control_c_w(machine().device("cust"),offset,data); |
| 130 | 130 | |
| 131 | 131 | m_cocktail = |
| 132 | ( ( i | |
| 132 | ( ( iop | |
| 133 | 133 | ( data & 0x01 ) ); // handling player 2 |
| 134 | 134 | m_palreg = (data >> 1) & 0x03; // palette sel is bit 1 & 2 |
| 135 | 135 | m_bankreg = (data >> 3) & 0x01; // banksel is just bit 3 |
| r15082 | r15083 | |
|---|---|---|
| 113 | 113 | UINT8 *TEXT_COLOR = state->memregion("proms")->base(); |
| 114 | 114 | |
| 115 | 115 | |
| 116 | flip = state->m_flipscreen ^ ( | |
| 116 | flip = state->m_flipscreen ^ ( | |
| 117 | 117 | |
| 118 | 118 | /* draw BG layer */ |
| 119 | 119 | dx = (7 - state->m_bg_scrollx[0]) & 7; |
| r15082 | r15083 | |
|---|---|---|
| 251 | 251 | m_videoram_pg_index = data & 1; |
| 252 | 252 | membank("bank1")->set_entry(m_videoram_pg_index); |
| 253 | 253 | |
| 254 | m_cocktail_mode = m_videoram_pg_index && (i | |
| 254 | m_cocktail_mode = m_videoram_pg_index && (iop | |
| 255 | 255 | |
| 256 | 256 | machine().tilemap().set_flip_all(m_cocktail_mode ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); |
| 257 | 257 | machine().tilemap().mark_all_dirty(); |
| r15082 | r15083 | |
| 274 | 274 | m_videoram_pg_index = data & 1; |
| 275 | 275 | membank("bank1")->set_entry(m_videoram_pg_index); |
| 276 | 276 | |
| 277 | m_cocktail_mode = m_videoram_pg_index && (i | |
| 277 | m_cocktail_mode = m_videoram_pg_index && (iop | |
| 278 | 278 | |
| 279 | 279 | machine().tilemap().set_flip_all(m_cocktail_mode ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); |
| 280 | 280 | machine().tilemap().mark_all_dirty(); |
| r15082 | r15083 | |
| 310 | 310 | CUSTOM_INPUT_MEMBER(phoenix_state::player_input_r) |
| 311 | 311 | { |
| 312 | 312 | if (m_cocktail_mode) |
| 313 | return (i | |
| 313 | return (iop | |
| 314 | 314 | else |
| 315 | return (i | |
| 315 | return (iop | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | CUSTOM_INPUT_MEMBER(phoenix_state::pleiads_protection_r) |
| r15082 | r15083 | |
| 365 | 365 | #define REMAP_JS(js) ((ret & 0xf) | ( (js & 0xf) << 4)) |
| 366 | 366 | READ8_MEMBER(phoenix_state::survival_input_port_0_r) |
| 367 | 367 | { |
| 368 | UINT8 ret = ~i | |
| 368 | UINT8 ret = ~iop | |
| 369 | 369 | |
| 370 | 370 | if( m_survival_input_readc++ == 2 ) |
| 371 | 371 | { |
| r15082 | r15083 | |
|---|---|---|
| 440 | 440 | const UINT8 *const gfxrom = state->memregion("gfx5")->base(); |
| 441 | 441 | const UINT8 *const sproms = state->memregion("proms")->base() + 0x800; |
| 442 | 442 | |
| 443 | for (offs = 0; offs < state->m_objectram | |
| 443 | for (offs = 0; offs < state->m_object_ram.bytes(); offs += 4) | |
| 444 | 444 | { |
| 445 | 445 | UINT32 y; |
| 446 | 446 | UINT32 xpos; |
| r15082 | r15083 | |
| 802 | 802 | UINT8 *tile_rom = state->memregion("gfx3")->base(); |
| 803 | 803 | UINT32 offs; |
| 804 | 804 | |
| 805 | for (offs = 0x0; offs <= state->m_hudram | |
| 805 | for (offs = 0x0; offs <= state->m_hud_ram.bytes(); offs += 2) | |
| 806 | 806 | { |
| 807 | 807 | UINT32 y; |
| 808 | 808 | UINT32 y_pos; |
| r15082 | r15083 | |
|---|---|---|
| 774 | 774 | |
| 775 | 775 | copybitmap(bitmap, *antic.bitmap, 0, 0, 0, 0, cliprect); |
| 776 | 776 | |
| 777 | new_tv_artifacts = | |
| 777 | new_tv_artifacts = | |
| 778 | 778 | if( tv_artifacts != new_tv_artifacts ) |
| 779 | 779 | { |
| 780 | 780 | tv_artifacts = new_tv_artifacts; |
| r15082 | r15083 | |
| 1501 | 1501 | |
| 1502 | 1502 | if( antic.scanline == VBL_START ) |
| 1503 | 1503 | { |
| 1504 | button_port = in | |
| 1504 | button_port = machine.root_device().ioport("djoy_b")->read_safe( | |
| 1505 | 1505 | |
| 1506 | 1506 | /* specify buttons relevant to this Atari variant */ |
| 1507 | 1507 | for (i = 0; i < button_count; i++) |
| r15082 | r15083 | |
|---|---|---|
| 526 | 526 | int scrollx, scrolly_l, scrolly_r; |
| 527 | 527 | rectangle clip; |
| 528 | 528 | |
| 529 | if (0xc0 != ( | |
| 529 | if (0xc0 != ( | |
| 530 | 530 | device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); |
| 531 | 531 | |
| 532 | 532 | if (0 == (state->m_watchdog_flip & 0x04)) |
| r15082 | r15083 | |
|---|---|---|
| 106 | 106 | VIDEO_START( gomoku ) |
| 107 | 107 | { |
| 108 | 108 | gomoku_state *state = machine.driver_data<gomoku_state>(); |
| 109 | UINT8 *GOMOKU_BG_X = machine.root_device().memregion( "user1" )->base(); | |
| 110 | UINT8 *GOMOKU_BG_Y = machine.root_device().memregion( "user2" )->base(); | |
| 109 | UINT8 *GOMOKU_BG_X = state->memregion( "user1" )->base(); | |
| 110 | UINT8 *GOMOKU_BG_Y = state->memregion( "user2" )->base(); | |
| 111 | 111 | UINT8 *GOMOKU_BG_D = state->memregion( "user3" )->base(); |
| 112 | 112 | int x, y; |
| 113 | 113 | int bgdata; |
| r15082 | r15083 | |
|---|---|---|
| 162 | 162 | { |
| 163 | 163 | |
| 164 | 164 | /* screen flip is handled both by software and hardware */ |
| 165 | m_flipscreen = (data & 0x01) ^ (~i | |
| 165 | m_flipscreen = (data & 0x01) ^ (~iop | |
| 166 | 166 | m_bg_tilemap->set_flip(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); |
| 167 | 167 | |
| 168 | 168 | coin_counter_w(machine(), 0,data & 0x02); |
| r15082 | r15083 | |
|---|---|---|
| 271 | 271 | neogeo_state *state = machine.driver_data<neogeo_state>(); |
| 272 | 272 | int x; |
| 273 | 273 | |
| 274 | UINT8* gfx_base = | |
| 274 | UINT8* gfx_base = sta | |
| 275 | 275 | UINT32 addr_mask = state->memregion(state->m_fixed_layer_source ? "fixed" : "fixedbios")->bytes() - 1; |
| 276 | 276 | UINT16 *video_data = &state->m_videoram[0x7000 | (scanline >> 3)]; |
| 277 | 277 | UINT32 *pixel_addr = &bitmap.pix32(scanline, NEOGEO_HBEND); |
| r15082 | r15083 | |
|---|---|---|
| 435 | 435 | /* Check lightpen */ |
| 436 | 436 | if (state->m_lightpen_port != 0) |
| 437 | 437 | { |
| 438 | state->m_lightpen_down = | |
| 438 | state->m_lightpen_down = s | |
| 439 | 439 | |
| 440 | 440 | if (state->m_lightpen_down) |
| 441 | 441 | { |
| 442 | state->m_pen_x = input_port_read(device->machine(), "LPENX") * (state->m_x_max / 0xff); | |
| 443 | state->m_pen_y = input_port_read(device->machine(), "LPENY") * (state->m_y_max / 0xff); | |
| 442 | state->m_pen_x = state->ioport("LPENX")->read() * (state->m_x_max / 0xff); | |
| 443 | state->m_pen_y = state->ioport("LPENY")->read() * (state->m_y_max / 0xff); | |
| 444 | 444 | |
| 445 | 445 | dx = abs(state->m_pen_x - state->m_x_int); |
| 446 | 446 | dy = abs(state->m_pen_y - state->m_y_int); |
| r15082 | r15083 | |
|---|---|---|
| 62 | 62 | { |
| 63 | 63 | exidy_state *state = machine.driver_data<exidy_state>(); |
| 64 | 64 | collision ^= state->m_collision_invert; |
| 65 | state->m_int_condition = (i | |
| 65 | state->m_int_condition = (state->iop | |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 |
| r15082 | r15083 | |
|---|---|---|
| 101 | 101 | static void blitter_execute( running_machine &machine ) |
| 102 | 102 | { |
| 103 | 103 | kangaroo_state *state = machine.driver_data<kangaroo_state>(); |
| 104 | UINT32 gfxhalfsize = | |
| 104 | UINT32 gfxhalfsize = sta | |
| 105 | 105 | const UINT8 *gfxbase = state->memregion("gfx1")->base(); |
| 106 | 106 | UINT16 src = state->m_video_control[0] + 256 * state->m_video_control[1]; |
| 107 | 107 | UINT16 dst = state->m_video_control[2] + 256 * state->m_video_control[3]; |
| r15082 | r15083 | |
|---|---|---|
| 545 | 545 | |
| 546 | 546 | /* Flipscreen appears hardwired to the dipswitch - strange */ |
| 547 | 547 | m92_state *state = screen.machine().driver_data<m92_state>(); |
| 548 | if ( | |
| 548 | if ( | |
| 549 | 549 | state->flip_screen_set(0); |
| 550 | 550 | else |
| 551 | 551 | state->flip_screen_set(1); |
| r15082 | r15083 | |
| 563 | 563 | |
| 564 | 564 | /* Flipscreen appears hardwired to the dipswitch - strange */ |
| 565 | 565 | m92_state *state = screen.machine().driver_data<m92_state>(); |
| 566 | if ( | |
| 566 | if ( | |
| 567 | 567 | state->flip_screen_set(0); |
| 568 | 568 | else |
| 569 | 569 | state->flip_screen_set(1); |
| r15082 | r15083 | |
|---|---|---|
| 201 | 201 | WRITE8_MEMBER(m58_state::yard_flipscreen_w) |
| 202 | 202 | { |
| 203 | 203 | /* screen flip is handled both by software and hardware */ |
| 204 | flip_screen_set((data & 0x01) ^ (~i | |
| 204 | flip_screen_set((data & 0x01) ^ (~iop | |
| 205 | 205 | |
| 206 | 206 | coin_counter_w(machine(), 0, data & 0x02); |
| 207 | 207 | coin_counter_w(machine(), 1, data & 0x20); |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | READ8_MEMBER(zac2650_state::tinvader_port_0_r) |
| 43 | 43 | { |
| 44 | return i | |
| 44 | return iop | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /*****************************************/ |
| r15082 | r15083 | |
|---|---|---|
| 168 | 168 | INT32 dxdy = (INT32)(((state->m_blitter_xparam[6] & 0x0fff) | ((state->m_blitter_xparam[7] & 0x0fff) << 12)) << 12) >> 12; |
| 169 | 169 | INT32 dydx = (INT32)(((state->m_blitter_yparam[4] & 0x0fff) | ((state->m_blitter_yparam[5] & 0x0fff) << 12)) << 12) >> 12; |
| 170 | 170 | INT32 dydy = (INT32)(((state->m_blitter_yparam[6] & 0x0fff) | ((state->m_blitter_yparam[7] & 0x0fff) << 12)) << 12) >> 12; |
| 171 | UINT8 *src = | |
| 171 | UINT8 *src = sta | |
| 172 | 172 | UINT32 pagemask = (state->memregion("gfx1")->bytes() - 1) / 0x40000; |
| 173 | 173 | int xstart = state->m_blitter_xparam[14]; |
| 174 | 174 | int xend = state->m_blitter_xparam[15] + 1; |
| r15082 | r15083 | |
| 307 | 307 | { |
| 308 | 308 | /* analog inputs seem to be hooked up here -- might not actually map to blitter */ |
| 309 | 309 | if (offset == 0x02/2) |
| 310 | return i | |
| 310 | return iop | |
| 311 | 311 | if (offset == 0x0e/2) |
| 312 | return i | |
| 312 | return iop | |
| 313 | 313 | |
| 314 | 314 | /* early code polls on this bit, wants it to be 0 */ |
| 315 | 315 | if (offset == 0x36/2) |
| r15082 | r15083 | |
|---|---|---|
| 150 | 150 | g = ((g << 5) + (g << 2) + (g >> 1)); |
| 151 | 151 | b = ((b << 5) + (b << 2) + (b >> 1)); |
| 152 | 152 | |
| 153 | if ((i = i | |
| 153 | if ((i = iop | |
| 154 | 154 | { |
| 155 | 155 | r = (float)r * rgb[i][0]; |
| 156 | 156 | g = (float)g * rgb[i][1]; |
| r15082 | r15083 | |
|---|---|---|
| 515 | 515 | { |
| 516 | 516 | cave_state *state = machine.driver_data<cave_state>(); |
| 517 | 517 | pen_t base_pal = 0; |
| 518 | const UINT8 *base_gfx = | |
| 518 | const UINT8 *base_gfx = sta | |
| 519 | 519 | int code_max = state->memregion("sprites")->bytes() / (16*16); |
| 520 | 520 | |
| 521 | 521 | UINT16 *source; |
| r15082 | r15083 | |
| 644 | 644 | { |
| 645 | 645 | cave_state *state = machine.driver_data<cave_state>(); |
| 646 | 646 | pen_t base_pal = 0; |
| 647 | const UINT8 *base_gfx = | |
| 647 | const UINT8 *base_gfx = sta | |
| 648 | 648 | int code_max = state->memregion("sprites")->bytes() / (16*16); |
| 649 | 649 | |
| 650 | 650 | UINT16 *source; |
| r15082 | r15083 | |
|---|---|---|
| 629 | 629 | { |
| 630 | 630 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 631 | 631 | /* Configure tilemap callbacks */ |
| 632 | state->m_bg_tilerom = | |
| 632 | state->m_bg_tilerom = sta | |
| 633 | 633 | state->m_fg_tilerom = state->memregion("gfx6")->base(); |
| 634 | 634 | state->m_bg_tilerom2 = NULL; |
| 635 | 635 | state->m_fg_tilerom2 = NULL; |
| r15082 | r15083 | |
| 669 | 669 | { |
| 670 | 670 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 671 | 671 | /* Configure tilemap callbacks */ |
| 672 | state->m_bg_tilerom = | |
| 672 | state->m_bg_tilerom = sta | |
| 673 | 673 | state->m_fg_tilerom = state->memregion("gfx6")->base(); |
| 674 | 674 | state->m_bg_tilerom2 = NULL; |
| 675 | 675 | state->m_fg_tilerom2 = NULL; |
| r15082 | r15083 | |
| 708 | 708 | { |
| 709 | 709 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 710 | 710 | /* Configure tilemap callbacks */ |
| 711 | state->m_bg_tilerom = | |
| 711 | state->m_bg_tilerom = sta | |
| 712 | 712 | state->m_fg_tilerom = state->memregion("gfx6")->base(); |
| 713 | 713 | state->m_bg_tilerom2 = NULL; |
| 714 | 714 | state->m_fg_tilerom2 = NULL; |
| r15082 | r15083 | |
| 744 | 744 | { |
| 745 | 745 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 746 | 746 | /* Configure tilemap callbacks */ |
| 747 | state->m_bg_tilerom = machine.root_device().memregion("gfx3")->base() + 0x78000; | |
| 748 | state->m_fg_tilerom = machine.root_device().memregion("gfx4")->base() + 0x78000; | |
| 747 | state->m_bg_tilerom = state->memregion("gfx3")->base() + 0x78000; | |
| 748 | state->m_fg_tilerom = state->memregion("gfx4")->base() + 0x78000; | |
| 749 | 749 | state->m_fg2_tilerom = state->memregion("gfx5")->base() + 0x38000; |
| 750 | 750 | state->m_bg_tilerom2 = NULL; |
| 751 | 751 | state->m_fg_tilerom2 = NULL; |
| r15082 | r15083 | |
| 785 | 785 | { |
| 786 | 786 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 787 | 787 | /* Configure tilemap callbacks */ |
| 788 | state->m_bg_tilerom = | |
| 788 | state->m_bg_tilerom = sta | |
| 789 | 789 | state->m_fg_tilerom = state->memregion("gfx4")->base() + 0x78000; |
| 790 | 790 | state->m_bg_tilerom2 = NULL; |
| 791 | 791 | state->m_fg_tilerom2 = NULL; |
| r15082 | r15083 | |
| 821 | 821 | { |
| 822 | 822 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 823 | 823 | /* Configure tilemap callbacks */ |
| 824 | state->m_bg_tilerom = machine.root_device().memregion("gfx2")->base() + machine.root_device().memregion("gfx2")->bytes() - 0x8000; | |
| 825 | state->m_fg_tilerom = machine.root_device().memregion("gfx3")->base() + state->memregion("gfx3")->bytes() - 0x8000; | |
| 824 | state->m_bg_tilerom = state->memregion("gfx2")->base() + state->memregion("gfx2")->bytes() - 0x8000; | |
| 825 | state->m_fg_tilerom = state->memregion("gfx3")->base() + state->memregion("gfx3")->bytes() - 0x8000; | |
| 826 | 826 | state->m_bg_tilerom2 = NULL; |
| 827 | 827 | state->m_fg_tilerom2 = NULL; |
| 828 | 828 | state->m_bg_gfx = 1; |
| r15082 | r15083 | |
| 856 | 856 | { |
| 857 | 857 | dooyong_state *state = machine.driver_data<dooyong_state>(); |
| 858 | 858 | /* Configure tilemap callbacks */ |
| 859 | state->m_bg_tilerom = machine.root_device().memregion("gfx5")->base(); | |
| 860 | state->m_bg2_tilerom = machine.root_device().memregion("gfx4")->base(); | |
| 861 | state->m_fg_tilerom = machine.root_device().memregion("gfx3")->base(); | |
| 862 | state->m_fg2_tilerom = machine.root_device().memregion("gfx2")->base(); | |
| 863 | state->m_bg_tilerom2 = machine.root_device().memregion("gfx6")->base() + 0x60000; | |
| 864 | state->m_bg2_tilerom2 = machine.root_device().memregion("gfx6")->base() + 0x40000; | |
| 865 | state->m_fg_tilerom2 = machine.root_device().memregion("gfx6")->base() + 0x20000; | |
| 859 | state->m_bg_tilerom = state->memregion("gfx5")->base(); | |
| 860 | state->m_bg2_tilerom = state->memregion("gfx4")->base(); | |
| 861 | state->m_fg_tilerom = state->memregion("gfx3")->base(); | |
| 862 | state->m_fg2_tilerom = state->memregion("gfx2")->base(); | |
| 863 | state->m_bg_tilerom2 = state->memregion("gfx6")->base() + 0x60000; | |
| 864 | state->m_bg2_tilerom2 = state->memregion("gfx6")->base() + 0x40000; | |
| 865 | state->m_fg_tilerom2 = state->memregion("gfx6")->base() + 0x20000; | |
| 866 | 866 | state->m_fg2_tilerom2 = state->memregion("gfx6")->base() + 0x00000; |
| 867 | 867 | state->m_bg_gfx = 4; |
| 868 | 868 | state->m_bg2_gfx = 3; |
| r15082 | r15083 | |
|---|---|---|
| 210 | 210 | horizontal flip switch. (This is how the real PCB does it) */ |
| 211 | 211 | if (m_flip_screen_x) |
| 212 | 212 | { |
| 213 | return i | |
| 213 | return iop | |
| 214 | 214 | } |
| 215 | 215 | else |
| 216 | 216 | { |
| 217 | return i | |
| 217 | return iop | |
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 |
| r15082 | r15083 | |
|---|---|---|
| 175 | 175 | changela_state *state = machine.driver_data<changela_state>(); |
| 176 | 176 | int sx, i, j; |
| 177 | 177 | |
| 178 | UINT8* ROM = | |
| 178 | UINT8* ROM = sta | |
| 179 | 179 | UINT8* RAM = state->m_memory_devices + 0x800; |
| 180 | UINT8* TILE_ROM = | |
| 180 | UINT8* TILE_ROM = sta | |
| 181 | 181 | UINT8* TILE_RAM = state->m_memory_devices + 0x1000; |
| 182 | 182 | UINT8* PROM = state->memregion("proms")->base(); |
| 183 | 183 | |
| r15082 | r15083 | |
| 355 | 355 | int sx, i, j; |
| 356 | 356 | |
| 357 | 357 | /* State machine */ |
| 358 | UINT8* ROM = | |
| 358 | UINT8* ROM = sta | |
| 359 | 359 | UINT8* RAM = state->m_memory_devices + 0x840 + 0x40 * tree_num; |
| 360 | UINT8* PROM = | |
| 360 | UINT8* PROM = sta | |
| 361 | 361 | |
| 362 | 362 | /* Tree Data */ |
| 363 | 363 | UINT8* RAM2 = state->m_tree_ram + 0x20 * tree_num; |
| 364 | UINT8* TILE_ROM = (tree_num ? ( | |
| 364 | UINT8* TILE_ROM = (tree_num ? (sta | |
| 365 | 365 | UINT8* TILE_RAM = (tree_num ? (state->memregion("user3")->base()) : (state->m_memory_devices + 0x1800)); |
| 366 | 366 | |
| 367 | 367 | int preload = ((sy < 32) ? 1 : 0); |
| r15082 | r15083 | |
|---|---|---|
| 111 | 111 | UINT8 *gfx; |
| 112 | 112 | |
| 113 | 113 | /* get pointers to the mixing and lookup PROMs */ |
| 114 | state->m_background_mixer = | |
| 114 | state->m_background_mixer = sta | |
| 115 | 115 | |
| 116 | 116 | /* allocate memory for the decoded background graphics */ |
| 117 | 117 | state->m_background_gfx[0] = auto_alloc_array(machine, UINT16, 256 * 256 * 4); |
| r15082 | r15083 | |
|---|---|---|
| 66 | 66 | // on Irem boards, screen flip is handled in both hardware and software. |
| 67 | 67 | // this game doesn't have cocktail mode so if there's software control we don't |
| 68 | 68 | // know where it is mapped. |
| 69 | state->flip_screen_set(~ | |
| 69 | state->flip_screen_set(~ | |
| 70 | 70 | |
| 71 | 71 | |
| 72 | 72 | state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| r15082 | r15083 | |
|---|---|---|
| 979 | 979 | if (dsw_flipscreen) |
| 980 | 980 | { |
| 981 | 981 | |
| 982 | state->flip_screen_x_set(~input_port_read(machine, "DSW1") & 0x0100); | |
| 983 | state->flip_screen_y_set(~input_port_read(machine, "DSW1") & 0x0200); | |
| 982 | state->flip_screen_x_set(~state->ioport("DSW1")->read() & 0x0100); | |
| 983 | state->flip_screen_y_set(~state->ioport("DSW1")->read() & 0x0200); | |
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | <color red="0.0" green="1.0" blue="0.0" /> |
| 20 | 20 | </rect> |
| 21 | 21 | </element> |
| 22 | <element name="Steppers" defstate="96"> | |
| 23 | <text string="00" state="0"> | |
| 24 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 25 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 26 | </text> | |
| 27 | <text string="01" state="1"> | |
| 28 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 29 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 30 | </text> | |
| 31 | <text string="02" state="2"> | |
| 32 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 33 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 34 | </text> | |
| 35 | <text string="03" state="3"> | |
| 36 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 37 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 38 | </text> | |
| 39 | <text string="04" state="4"> | |
| 40 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 41 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 42 | </text> | |
| 43 | <text string="05" state="5"> | |
| 44 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 45 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 46 | </text> | |
| 47 | <text string="06" state="6"> | |
| 48 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 49 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 50 | </text> | |
| 51 | <text string="07" state="7"> | |
| 52 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 53 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 54 | </text> | |
| 55 | <text string="08" state="8"> | |
| 56 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 57 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 58 | </text> | |
| 59 | <text string="09" state="9"> | |
| 60 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 61 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 62 | </text> | |
| 63 | <text string="10" state="10"> | |
| 64 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 65 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 66 | </text> | |
| 67 | <text string="11" state="11"> | |
| 68 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 69 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 70 | </text> | |
| 71 | <text string="12" state="12"> | |
| 72 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 73 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 74 | </text> | |
| 75 | <text string="13" state="13"> | |
| 76 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 77 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 78 | </text> | |
| 79 | <text string="14" state="14"> | |
| 80 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 81 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 82 | </text> | |
| 83 | <text string="15" state="15"> | |
| 84 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 85 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 86 | </text> | |
| 87 | <text string="16" state="16"> | |
| 88 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 89 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 90 | </text> | |
| 91 | <text string="17" state="17"> | |
| 92 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 93 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 94 | </text> | |
| 95 | <text string="18" state="18"> | |
| 96 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 97 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 98 | </text> | |
| 99 | <text string="19" state="19"> | |
| 100 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 101 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 102 | </text> | |
| 103 | <text string="20" state="20"> | |
| 104 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 105 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 106 | </text> | |
| 107 | <text string="21" state="21"> | |
| 108 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 109 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 110 | </text> | |
| 111 | <text string="22" state="22"> | |
| 112 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 113 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 114 | </text> | |
| 115 | <text string="23" state="23"> | |
| 116 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 117 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 118 | </text> | |
| 119 | <text string="24" state="24"> | |
| 120 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 121 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 122 | </text> | |
| 123 | <text string="25" state="25"> | |
| 124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 126 | </text> | |
| 127 | <text string="26" state="26"> | |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 130 | </text> | |
| 131 | <text string="27" state="27"> | |
| 132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 134 | </text> | |
| 135 | <text string="28" state="28"> | |
| 136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 138 | </text> | |
| 139 | <text string="29" state="29"> | |
| 140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 142 | </text> | |
| 143 | <text string="30" state="30"> | |
| 144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 146 | </text> | |
| 147 | <text string="31" state="31"> | |
| 148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 150 | </text> | |
| 151 | <text string="32" state="32"> | |
| 152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 154 | </text> | |
| 155 | <text string="33" state="33"> | |
| 156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 158 | </text> | |
| 159 | <text string="34" state="34"> | |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 162 | </text> | |
| 163 | <text string="35" state="35"> | |
| 164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 166 | </text> | |
| 167 | <text string="36" state="36"> | |
| 168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 170 | </text> | |
| 171 | <text string="37" state="37"> | |
| 172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 174 | </text> | |
| 175 | <text string="38" state="38"> | |
| 176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 178 | </text> | |
| 179 | <text string="39" state="39"> | |
| 180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 182 | </text> | |
| 183 | <text string="40" state="40"> | |
| 184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 186 | </text> | |
| 187 | <text string="41" state="41"> | |
| 188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 190 | </text> | |
| 191 | <text string="42" state="42"> | |
| 192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 194 | </text> | |
| 195 | <text string="43" state="43"> | |
| 196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 198 | </text> | |
| 199 | <text string="44" state="44"> | |
| 200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 202 | </text> | |
| 203 | <text string="45" state="45"> | |
| 204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 206 | </text> | |
| 207 | <text string="46" state="46"> | |
| 208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 210 | </text> | |
| 211 | <text string="47" state="47"> | |
| 212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 214 | </text> | |
| 215 | <text string="48" state="48"> | |
| 216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 218 | </text> | |
| 219 | <text string="49" state="49"> | |
| 220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 222 | </text> | |
| 223 | <text string="50" state="50"> | |
| 224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 226 | </text> | |
| 227 | <text string="51" state="51"> | |
| 228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 230 | </text> | |
| 231 | <text string="52" state="52"> | |
| 232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 234 | </text> | |
| 235 | <text string="53" state="53"> | |
| 236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 238 | </text> | |
| 239 | <text string="54" state="54"> | |
| 240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 242 | </text> | |
| 243 | <text string="55" state="55"> | |
| 244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 246 | </text> | |
| 247 | <text string="56" state="56"> | |
| 248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 250 | </text> | |
| 251 | <text string="57" state="57"> | |
| 252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 254 | </text> | |
| 255 | <text string="58" state="58"> | |
| 256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 258 | </text> | |
| 259 | <text string="59" state="59"> | |
| 260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 262 | </text> | |
| 263 | <text string="60" state="60"> | |
| 264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 266 | </text> | |
| 267 | <text string="61" state="61"> | |
| 268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 270 | </text> | |
| 271 | <text string="62" state="62"> | |
| 272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 274 | </text> | |
| 275 | <text string="63" state="63"> | |
| 276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 278 | </text> | |
| 279 | <text string="64" state="64"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 282 | </text> | |
| 283 | <text string="65" state="65"> | |
| 284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 286 | </text> | |
| 287 | <text string="66" state="66"> | |
| 288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 290 | </text> | |
| 291 | <text string="67" state="67"> | |
| 292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 294 | </text> | |
| 295 | <text string="68" state="68"> | |
| 296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 298 | </text> | |
| 299 | <text string="69" state="69"> | |
| 300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 302 | </text> | |
| 303 | <text string="70" state="70"> | |
| 304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 306 | </text> | |
| 307 | <text string="71" state="71"> | |
| 308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 310 | </text> | |
| 311 | <text string="72" state="72"> | |
| 312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 314 | </text> | |
| 315 | <text string="73" state="73"> | |
| 316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 318 | </text> | |
| 319 | <text string="74" state="74"> | |
| 320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 322 | </text> | |
| 323 | <text string="75" state="75"> | |
| 324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 326 | </text> | |
| 327 | <text string="76" state="76"> | |
| 328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 330 | </text> | |
| 331 | <text string="77" state="77"> | |
| 332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 334 | </text> | |
| 335 | <text string="78" state="78"> | |
| 336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 338 | </text> | |
| 339 | <text string="79" state="79"> | |
| 340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 342 | </text> | |
| 343 | <text string="80" state="80"> | |
| 344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 346 | </text> | |
| 347 | <text string="81" state="81"> | |
| 348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 350 | </text> | |
| 351 | <text string="82" state="82"> | |
| 352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 354 | </text> | |
| 355 | <text string="83" state="83"> | |
| 356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 358 | </text> | |
| 359 | <text string="84" state="84"> | |
| 360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 362 | </text> | |
| 363 | <text string="85" state="85"> | |
| 364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 366 | </text> | |
| 367 | <text string="86" state="86"> | |
| 368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 370 | </text> | |
| 371 | <text string="87" state="87"> | |
| 372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 374 | </text> | |
| 375 | <text string="88" state="88"> | |
| 376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 378 | </text> | |
| 379 | <text string="89" state="89"> | |
| 380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 382 | </text> | |
| 383 | <text string="90" state="90"> | |
| 384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 386 | </text> | |
| 387 | <text string="91" state="91"> | |
| 388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 390 | </text> | |
| 391 | <text string="92" state="92"> | |
| 392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 394 | </text> | |
| 395 | <text string="93" state="93"> | |
| 396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 398 | </text> | |
| 399 | <text string="94" state="94"> | |
| 400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 402 | </text> | |
| 403 | <text string="95" state="95"> | |
| 404 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 405 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 406 | </text> | |
| 22 | <element name="Steppers" defstate="0"> | |
| 23 | <simplecounter maxstate="999" digits="3"> | |
| 24 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 25 | <bounds x="0" y="0" width="1" height="1" /> | |
| 26 | </simplecounter> | |
| 407 | 27 | </element> |
| 408 | 28 | <element name="vfd0"> |
| 409 | 29 | <led16segsc> |
| r15082 | r15083 | |
|---|---|---|
| 14 | 14 | <color red="0.0" green="1.0" blue="0.0" /> |
| 15 | 15 | </rect> |
| 16 | 16 | </element> |
| 17 | <element name="Steppers" defstate="96"> | |
| 18 | <text string="00" state="0"> | |
| 19 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 20 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 21 | </text> | |
| 22 | <text string="01" state="1"> | |
| 23 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 24 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 25 | </text> | |
| 26 | <text string="02" state="2"> | |
| 27 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 28 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 29 | </text> | |
| 30 | <text string="03" state="3"> | |
| 31 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 32 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 33 | </text> | |
| 34 | <text string="04" state="4"> | |
| 35 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 36 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 37 | </text> | |
| 38 | <text string="05" state="5"> | |
| 39 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 40 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 41 | </text> | |
| 42 | <text string="06" state="6"> | |
| 43 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 44 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 45 | </text> | |
| 46 | <text string="07" state="7"> | |
| 47 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 48 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 49 | </text> | |
| 50 | <text string="08" state="8"> | |
| 51 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 52 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 53 | </text> | |
| 54 | <text string="09" state="9"> | |
| 55 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 56 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 57 | </text> | |
| 58 | <text string="10" state="10"> | |
| 59 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 60 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 61 | </text> | |
| 62 | <text string="11" state="11"> | |
| 63 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 64 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 65 | </text> | |
| 66 | <text string="12" state="12"> | |
| 67 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 68 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 69 | </text> | |
| 70 | <text string="13" state="13"> | |
| 71 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 72 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 73 | </text> | |
| 74 | <text string="14" state="14"> | |
| 75 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 76 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 77 | </text> | |
| 78 | <text string="15" state="15"> | |
| 79 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 80 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 81 | </text> | |
| 82 | <text string="16" state="16"> | |
| 83 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 84 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 85 | </text> | |
| 86 | <text string="17" state="17"> | |
| 87 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 88 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 89 | </text> | |
| 90 | <text string="18" state="18"> | |
| 91 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 92 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 93 | </text> | |
| 94 | <text string="19" state="19"> | |
| 95 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 96 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 97 | </text> | |
| 98 | <text string="20" state="20"> | |
| 99 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 100 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 101 | </text> | |
| 102 | <text string="21" state="21"> | |
| 103 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 104 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 105 | </text> | |
| 106 | <text string="22" state="22"> | |
| 107 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 108 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 109 | </text> | |
| 110 | <text string="23" state="23"> | |
| 111 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 112 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 113 | </text> | |
| 114 | <text string="24" state="24"> | |
| 115 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 116 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 117 | </text> | |
| 118 | <text string="25" state="25"> | |
| 119 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 120 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 121 | </text> | |
| 122 | ||
| 123 | <text string="26" state="26"> | |
| 124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 126 | </text> | |
| 127 | <text string="27" state="27"> | |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 130 | </text> | |
| 131 | <text string="28" state="28"> | |
| 132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 134 | </text> | |
| 135 | <text string="29" state="29"> | |
| 136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 138 | </text> | |
| 139 | <text string="30" state="30"> | |
| 140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 142 | </text> | |
| 143 | <text string="31" state="31"> | |
| 144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 146 | </text> | |
| 147 | <text string="32" state="32"> | |
| 148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 150 | </text> | |
| 151 | <text string="33" state="33"> | |
| 152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 154 | </text> | |
| 155 | <text string="34" state="34"> | |
| 156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 158 | </text> | |
| 159 | <text string="35" state="35"> | |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 162 | </text> | |
| 163 | <text string="36" state="36"> | |
| 164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 166 | </text> | |
| 167 | <text string="37" state="37"> | |
| 168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 170 | </text> | |
| 171 | <text string="38" state="38"> | |
| 172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 174 | </text> | |
| 175 | <text string="39" state="39"> | |
| 176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 178 | </text> | |
| 179 | <text string="40" state="40"> | |
| 180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 182 | </text> | |
| 183 | <text string="41" state="41"> | |
| 184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 186 | </text> | |
| 187 | <text string="42" state="42"> | |
| 188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 190 | </text> | |
| 191 | <text string="43" state="43"> | |
| 192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 194 | </text> | |
| 195 | <text string="44" state="44"> | |
| 196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 198 | </text> | |
| 199 | <text string="45" state="45"> | |
| 200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 202 | </text> | |
| 203 | <text string="46" state="46"> | |
| 204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 206 | </text> | |
| 207 | <text string="47" state="47"> | |
| 208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 210 | </text> | |
| 211 | <text string="48" state="48"> | |
| 212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 214 | </text> | |
| 215 | <text string="49" state="49"> | |
| 216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 218 | </text> | |
| 219 | <text string="50" state="50"> | |
| 220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 222 | </text> | |
| 223 | <text string="51" state="51"> | |
| 224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 226 | </text> | |
| 227 | <text string="52" state="52"> | |
| 228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 230 | </text> | |
| 231 | <text string="53" state="53"> | |
| 232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 234 | </text> | |
| 235 | <text string="54" state="54"> | |
| 236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 238 | </text> | |
| 239 | <text string="55" state="55"> | |
| 240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 242 | </text> | |
| 243 | <text string="56" state="56"> | |
| 244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 246 | </text> | |
| 247 | <text string="57" state="57"> | |
| 248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 250 | </text> | |
| 251 | <text string="58" state="58"> | |
| 252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 254 | </text> | |
| 255 | <text string="59" state="59"> | |
| 256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 258 | </text> | |
| 259 | <text string="60" state="60"> | |
| 260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 262 | </text> | |
| 263 | <text string="61" state="61"> | |
| 264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 266 | </text> | |
| 267 | <text string="62" state="62"> | |
| 268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 270 | </text> | |
| 271 | <text string="63" state="63"> | |
| 272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 274 | </text> | |
| 275 | <text string="64" state="64"> | |
| 276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 278 | </text> | |
| 279 | <text string="65" state="65"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 282 | </text> | |
| 283 | <text string="66" state="66"> | |
| 284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 286 | </text> | |
| 287 | <text string="67" state="67"> | |
| 288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 290 | </text> | |
| 291 | <text string="68" state="68"> | |
| 292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 294 | </text> | |
| 295 | <text string="69" state="69"> | |
| 296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 298 | </text> | |
| 299 | <text string="70" state="70"> | |
| 300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 302 | </text> | |
| 303 | <text string="71" state="71"> | |
| 304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 306 | </text> | |
| 307 | <text string="72" state="72"> | |
| 308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 310 | </text> | |
| 311 | <text string="73" state="73"> | |
| 312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 314 | </text> | |
| 315 | <text string="74" state="74"> | |
| 316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 318 | </text> | |
| 319 | <text string="75" state="75"> | |
| 320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 322 | </text> | |
| 323 | <text string="76" state="76"> | |
| 324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 326 | </text> | |
| 327 | <text string="77" state="77"> | |
| 328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 330 | </text> | |
| 331 | <text string="78" state="78"> | |
| 332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 334 | </text> | |
| 335 | <text string="79" state="79"> | |
| 336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 338 | </text> | |
| 339 | <text string="80" state="80"> | |
| 340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 342 | </text> | |
| 343 | <text string="81" state="81"> | |
| 344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 346 | </text> | |
| 347 | <text string="82" state="82"> | |
| 348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 350 | </text> | |
| 351 | <text string="83" state="83"> | |
| 352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 354 | </text> | |
| 355 | <text string="84" state="84"> | |
| 356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 358 | </text> | |
| 359 | <text string="85" state="85"> | |
| 360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 362 | </text> | |
| 363 | <text string="86" state="86"> | |
| 364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 366 | </text> | |
| 367 | <text string="87" state="87"> | |
| 368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 370 | </text> | |
| 371 | <text string="88" state="88"> | |
| 372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 374 | </text> | |
| 375 | <text string="89" state="89"> | |
| 376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 378 | </text> | |
| 379 | <text string="90" state="90"> | |
| 380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 382 | </text> | |
| 383 | <text string="91" state="91"> | |
| 384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 386 | </text> | |
| 387 | <text string="92" state="92"> | |
| 388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 390 | </text> | |
| 391 | <text string="93" state="93"> | |
| 392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 394 | </text> | |
| 395 | <text string="94" state="94"> | |
| 396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 398 | </text> | |
| 399 | <text string="95" state="95"> | |
| 400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 402 | </text> | |
| 17 | <element name="Steppers" defstate="0"> | |
| 18 | <simplecounter maxstate="999" digits="3"> | |
| 19 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 20 | <bounds x="0" y="0" width="1" height="1" /> | |
| 21 | </simplecounter> | |
| 403 | 22 | </element> |
| 23 | ||
| 404 | 24 | <element name="vfd0"> |
| 405 | 25 | <led14segsc> |
| 406 | 26 | <color red="0" green="0.6" blue="1.0" /> |
| r15082 | r15083 | |
|---|---|---|
| 14 | 14 | <color red="0.0" green="1.0" blue="0.0" /> |
| 15 | 15 | </rect> |
| 16 | 16 | </element> |
| 17 | <element name="Steppers" defstate="96"> | |
| 18 | <text string="00" state="0"> | |
| 19 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 20 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 21 | </text> | |
| 22 | <text string="01" state="1"> | |
| 23 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 24 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 25 | </text> | |
| 26 | <text string="02" state="2"> | |
| 27 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 28 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 29 | </text> | |
| 30 | <text string="03" state="3"> | |
| 31 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 32 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 33 | </text> | |
| 34 | <text string="04" state="4"> | |
| 35 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 36 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 37 | </text> | |
| 38 | <text string="05" state="5"> | |
| 39 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 40 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 41 | </text> | |
| 42 | <text string="06" state="6"> | |
| 43 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 44 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 45 | </text> | |
| 46 | <text string="07" state="7"> | |
| 47 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 48 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 49 | </text> | |
| 50 | <text string="08" state="8"> | |
| 51 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 52 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 53 | </text> | |
| 54 | <text string="09" state="9"> | |
| 55 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 56 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 57 | </text> | |
| 58 | <text string="10" state="10"> | |
| 59 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 60 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 61 | </text> | |
| 62 | <text string="11" state="11"> | |
| 63 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 64 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 65 | </text> | |
| 66 | <text string="12" state="12"> | |
| 67 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 68 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 69 | </text> | |
| 70 | <text string="13" state="13"> | |
| 71 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 72 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 73 | </text> | |
| 74 | <text string="14" state="14"> | |
| 75 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 76 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 77 | </text> | |
| 78 | <text string="15" state="15"> | |
| 79 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 80 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 81 | </text> | |
| 82 | <text string="16" state="16"> | |
| 83 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 84 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 85 | </text> | |
| 86 | <text string="17" state="17"> | |
| 87 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 88 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 89 | </text> | |
| 90 | <text string="18" state="18"> | |
| 91 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 92 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 93 | </text> | |
| 94 | <text string="19" state="19"> | |
| 95 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 96 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 97 | </text> | |
| 98 | <text string="20" state="20"> | |
| 99 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 100 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 101 | </text> | |
| 102 | <text string="21" state="21"> | |
| 103 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 104 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 105 | </text> | |
| 106 | <text string="22" state="22"> | |
| 107 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 108 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 109 | </text> | |
| 110 | <text string="23" state="23"> | |
| 111 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 112 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 113 | </text> | |
| 114 | <text string="24" state="24"> | |
| 115 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 116 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 117 | </text> | |
| 118 | <text string="25" state="25"> | |
| 119 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 120 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 121 | </text> | |
| 122 | ||
| 123 | <text string="26" state="26"> | |
| 124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 126 | </text> | |
| 127 | <text string="27" state="27"> | |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 130 | </text> | |
| 131 | <text string="28" state="28"> | |
| 132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 134 | </text> | |
| 135 | <text string="29" state="29"> | |
| 136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 138 | </text> | |
| 139 | <text string="30" state="30"> | |
| 140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 142 | </text> | |
| 143 | <text string="31" state="31"> | |
| 144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 146 | </text> | |
| 147 | <text string="32" state="32"> | |
| 148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 150 | </text> | |
| 151 | <text string="33" state="33"> | |
| 152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 154 | </text> | |
| 155 | <text string="34" state="34"> | |
| 156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 158 | </text> | |
| 159 | <text string="35" state="35"> | |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 162 | </text> | |
| 163 | <text string="36" state="36"> | |
| 164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 166 | </text> | |
| 167 | <text string="37" state="37"> | |
| 168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 170 | </text> | |
| 171 | <text string="38" state="38"> | |
| 172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 174 | </text> | |
| 175 | <text string="39" state="39"> | |
| 176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 178 | </text> | |
| 179 | <text string="40" state="40"> | |
| 180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 182 | </text> | |
| 183 | <text string="41" state="41"> | |
| 184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 186 | </text> | |
| 187 | <text string="42" state="42"> | |
| 188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 190 | </text> | |
| 191 | <text string="43" state="43"> | |
| 192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 194 | </text> | |
| 195 | <text string="44" state="44"> | |
| 196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 198 | </text> | |
| 199 | <text string="45" state="45"> | |
| 200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 202 | </text> | |
| 203 | <text string="46" state="46"> | |
| 204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 206 | </text> | |
| 207 | <text string="47" state="47"> | |
| 208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 210 | </text> | |
| 211 | <text string="48" state="48"> | |
| 212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 214 | </text> | |
| 215 | <text string="49" state="49"> | |
| 216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 218 | </text> | |
| 219 | <text string="50" state="50"> | |
| 220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 222 | </text> | |
| 223 | <text string="51" state="51"> | |
| 224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 226 | </text> | |
| 227 | <text string="52" state="52"> | |
| 228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 230 | </text> | |
| 231 | <text string="53" state="53"> | |
| 232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 234 | </text> | |
| 235 | <text string="54" state="54"> | |
| 236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 238 | </text> | |
| 239 | <text string="55" state="55"> | |
| 240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 242 | </text> | |
| 243 | <text string="56" state="56"> | |
| 244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 246 | </text> | |
| 247 | <text string="57" state="57"> | |
| 248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 250 | </text> | |
| 251 | <text string="58" state="58"> | |
| 252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 254 | </text> | |
| 255 | <text string="59" state="59"> | |
| 256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 258 | </text> | |
| 259 | <text string="60" state="60"> | |
| 260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 262 | </text> | |
| 263 | <text string="61" state="61"> | |
| 264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 266 | </text> | |
| 267 | <text string="62" state="62"> | |
| 268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 270 | </text> | |
| 271 | <text string="63" state="63"> | |
| 272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 274 | </text> | |
| 275 | <text string="64" state="64"> | |
| 276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 278 | </text> | |
| 279 | <text string="65" state="65"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 282 | </text> | |
| 283 | <text string="66" state="66"> | |
| 284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 286 | </text> | |
| 287 | <text string="67" state="67"> | |
| 288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 290 | </text> | |
| 291 | <text string="68" state="68"> | |
| 292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 294 | </text> | |
| 295 | <text string="69" state="69"> | |
| 296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 298 | </text> | |
| 299 | <text string="70" state="70"> | |
| 300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 302 | </text> | |
| 303 | <text string="71" state="71"> | |
| 304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 306 | </text> | |
| 307 | <text string="72" state="72"> | |
| 308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 310 | </text> | |
| 311 | <text string="73" state="73"> | |
| 312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 314 | </text> | |
| 315 | <text string="74" state="74"> | |
| 316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 318 | </text> | |
| 319 | <text string="75" state="75"> | |
| 320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 322 | </text> | |
| 323 | <text string="76" state="76"> | |
| 324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 326 | </text> | |
| 327 | <text string="77" state="77"> | |
| 328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 330 | </text> | |
| 331 | <text string="78" state="78"> | |
| 332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 334 | </text> | |
| 335 | <text string="79" state="79"> | |
| 336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 338 | </text> | |
| 339 | <text string="80" state="80"> | |
| 340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 342 | </text> | |
| 343 | <text string="81" state="81"> | |
| 344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 346 | </text> | |
| 347 | <text string="82" state="82"> | |
| 348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 350 | </text> | |
| 351 | <text string="83" state="83"> | |
| 352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 354 | </text> | |
| 355 | <text string="84" state="84"> | |
| 356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 358 | </text> | |
| 359 | <text string="85" state="85"> | |
| 360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 362 | </text> | |
| 363 | <text string="86" state="86"> | |
| 364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 366 | </text> | |
| 367 | <text string="87" state="87"> | |
| 368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 370 | </text> | |
| 371 | <text string="88" state="88"> | |
| 372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 374 | </text> | |
| 375 | <text string="89" state="89"> | |
| 376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 378 | </text> | |
| 379 | <text string="90" state="90"> | |
| 380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 382 | </text> | |
| 383 | <text string="91" state="91"> | |
| 384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 386 | </text> | |
| 387 | <text string="92" state="92"> | |
| 388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 390 | </text> | |
| 391 | <text string="93" state="93"> | |
| 392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 394 | </text> | |
| 395 | <text string="94" state="94"> | |
| 396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 398 | </text> | |
| 399 | <text string="95" state="95"> | |
| 400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 402 | </text> | |
| 17 | <element name="Steppers" defstate="0"> | |
| 18 | <simplecounter maxstate="999" digits="3"> | |
| 19 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 20 | <bounds x="0" y="0" width="1" height="1" /> | |
| 21 | </simplecounter> | |
| 403 | 22 | </element> |
| 23 | ||
| 404 | 24 | <element name="vfd0"> |
| 405 | 25 | <led16segsc> |
| 406 | 26 | <color red="0" green="0.6" blue="1.0" /> |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | <color red="0" green="0.6" blue="1.0" /> |
| 20 | 20 | </led14segsc> |
| 21 | 21 | </element> |
| 22 | <element name="Steppers" defstate="96"> | |
| 23 | <text string="00" state="0"> | |
| 24 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 25 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 26 | </text> | |
| 27 | <text string="01" state="1"> | |
| 28 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 29 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 30 | </text> | |
| 31 | <text string="02" state="2"> | |
| 32 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 33 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 34 | </text> | |
| 35 | <text string="03" state="3"> | |
| 36 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 37 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 38 | </text> | |
| 39 | <text string="04" state="4"> | |
| 40 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 41 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 42 | </text> | |
| 43 | <text string="05" state="5"> | |
| 44 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 45 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 46 | </text> | |
| 47 | <text string="06" state="6"> | |
| 48 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 49 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 50 | </text> | |
| 51 | <text string="07" state="7"> | |
| 52 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 53 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 54 | </text> | |
| 55 | <text string="08" state="8"> | |
| 56 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 57 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 58 | </text> | |
| 59 | <text string="09" state="9"> | |
| 60 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 61 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 62 | </text> | |
| 63 | <text string="10" state="10"> | |
| 64 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 65 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 66 | </text> | |
| 67 | <text string="11" state="11"> | |
| 68 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 69 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 70 | </text> | |
| 71 | <text string="12" state="12"> | |
| 72 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 73 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 74 | </text> | |
| 75 | <text string="13" state="13"> | |
| 76 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 77 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 78 | </text> | |
| 79 | <text string="14" state="14"> | |
| 80 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 81 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 82 | </text> | |
| 83 | <text string="15" state="15"> | |
| 84 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 85 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 86 | </text> | |
| 87 | <text string="16" state="16"> | |
| 88 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 89 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 90 | </text> | |
| 91 | <text string="17" state="17"> | |
| 92 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 93 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 94 | </text> | |
| 95 | <text string="18" state="18"> | |
| 96 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 97 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 98 | </text> | |
| 99 | <text string="19" state="19"> | |
| 100 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 101 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 102 | </text> | |
| 103 | <text string="20" state="20"> | |
| 104 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 105 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 106 | </text> | |
| 107 | <text string="21" state="21"> | |
| 108 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 109 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 110 | </text> | |
| 111 | <text string="22" state="22"> | |
| 112 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 113 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 114 | </text> | |
| 115 | <text string="23" state="23"> | |
| 116 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 117 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 118 | </text> | |
| 119 | <text string="24" state="24"> | |
| 120 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 121 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 122 | </text> | |
| 123 | <text string="25" state="25"> | |
| 124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 126 | </text> | |
| 127 | <text string="26" state="26"> | |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 130 | </text> | |
| 131 | <text string="27" state="27"> | |
| 132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 134 | </text> | |
| 135 | <text string="28" state="28"> | |
| 136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 138 | </text> | |
| 139 | <text string="29" state="29"> | |
| 140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 142 | </text> | |
| 143 | <text string="30" state="30"> | |
| 144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 146 | </text> | |
| 147 | <text string="31" state="31"> | |
| 148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 150 | </text> | |
| 151 | <text string="32" state="32"> | |
| 152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 154 | </text> | |
| 155 | <text string="33" state="33"> | |
| 156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 158 | </text> | |
| 159 | <text string="34" state="34"> | |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 162 | </text> | |
| 163 | <text string="35" state="35"> | |
| 164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 166 | </text> | |
| 167 | <text string="36" state="36"> | |
| 168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 170 | </text> | |
| 171 | <text string="37" state="37"> | |
| 172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 174 | </text> | |
| 175 | <text string="38" state="38"> | |
| 176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 178 | </text> | |
| 179 | <text string="39" state="39"> | |
| 180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 182 | </text> | |
| 183 | <text string="40" state="40"> | |
| 184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 186 | </text> | |
| 187 | <text string="41" state="41"> | |
| 188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 190 | </text> | |
| 191 | <text string="42" state="42"> | |
| 192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 194 | </text> | |
| 195 | <text string="43" state="43"> | |
| 196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 198 | </text> | |
| 199 | <text string="44" state="44"> | |
| 200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 202 | </text> | |
| 203 | <text string="45" state="45"> | |
| 204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 206 | </text> | |
| 207 | <text string="46" state="46"> | |
| 208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 210 | </text> | |
| 211 | <text string="47" state="47"> | |
| 212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 214 | </text> | |
| 215 | <text string="48" state="48"> | |
| 216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 218 | </text> | |
| 219 | <text string="49" state="49"> | |
| 220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 222 | </text> | |
| 223 | <text string="50" state="50"> | |
| 224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 226 | </text> | |
| 227 | <text string="51" state="51"> | |
| 228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 230 | </text> | |
| 231 | <text string="52" state="52"> | |
| 232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 234 | </text> | |
| 235 | <text string="53" state="53"> | |
| 236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 238 | </text> | |
| 239 | <text string="54" state="54"> | |
| 240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 242 | </text> | |
| 243 | <text string="55" state="55"> | |
| 244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 246 | </text> | |
| 247 | <text string="56" state="56"> | |
| 248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 250 | </text> | |
| 251 | <text string="57" state="57"> | |
| 252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 254 | </text> | |
| 255 | <text string="58" state="58"> | |
| 256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 258 | </text> | |
| 259 | <text string="59" state="59"> | |
| 260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 262 | </text> | |
| 263 | <text string="60" state="60"> | |
| 264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 266 | </text> | |
| 267 | <text string="61" state="61"> | |
| 268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 270 | </text> | |
| 271 | <text string="62" state="62"> | |
| 272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 274 | </text> | |
| 275 | <text string="63" state="63"> | |
| 276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 278 | </text> | |
| 279 | <text string="64" state="64"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 282 | </text> | |
| 283 | <text string="65" state="65"> | |
| 284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 286 | </text> | |
| 287 | <text string="66" state="66"> | |
| 288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 290 | </text> | |
| 291 | <text string="67" state="67"> | |
| 292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 294 | </text> | |
| 295 | <text string="68" state="68"> | |
| 296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 298 | </text> | |
| 299 | <text string="69" state="69"> | |
| 300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 302 | </text> | |
| 303 | <text string="70" state="70"> | |
| 304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 306 | </text> | |
| 307 | <text string="71" state="71"> | |
| 308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 310 | </text> | |
| 311 | <text string="72" state="72"> | |
| 312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 314 | </text> | |
| 315 | <text string="73" state="73"> | |
| 316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 318 | </text> | |
| 319 | <text string="74" state="74"> | |
| 320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 322 | </text> | |
| 323 | <text string="75" state="75"> | |
| 324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 326 | </text> | |
| 327 | <text string="76" state="76"> | |
| 328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 330 | </text> | |
| 331 | <text string="77" state="77"> | |
| 332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 334 | </text> | |
| 335 | <text string="78" state="78"> | |
| 336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 338 | </text> | |
| 339 | <text string="79" state="79"> | |
| 340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 342 | </text> | |
| 343 | <text string="80" state="80"> | |
| 344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 346 | </text> | |
| 347 | <text string="81" state="81"> | |
| 348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 350 | </text> | |
| 351 | <text string="82" state="82"> | |
| 352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 354 | </text> | |
| 355 | <text string="83" state="83"> | |
| 356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 358 | </text> | |
| 359 | <text string="84" state="84"> | |
| 360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 362 | </text> | |
| 363 | <text string="85" state="85"> | |
| 364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 366 | </text> | |
| 367 | <text string="86" state="86"> | |
| 368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 370 | </text> | |
| 371 | <text string="87" state="87"> | |
| 372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 374 | </text> | |
| 375 | <text string="88" state="88"> | |
| 376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 378 | </text> | |
| 379 | <text string="89" state="89"> | |
| 380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 382 | </text> | |
| 383 | <text string="90" state="90"> | |
| 384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 386 | </text> | |
| 387 | <text string="91" state="91"> | |
| 388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 390 | </text> | |
| 391 | <text string="92" state="92"> | |
| 392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 394 | </text> | |
| 395 | <text string="93" state="93"> | |
| 396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 398 | </text> | |
| 399 | <text string="94" state="94"> | |
| 400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 402 | </text> | |
| 403 | <text string="95" state="95"> | |
| 404 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 405 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 406 | </text> | |
| 22 | ||
| 23 | <element name="Steppers" defstate="0"> | |
| 24 | <simplecounter maxstate="999" digits="3"> | |
| 25 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 26 | <bounds x="0" y="0" width="1" height="1" /> | |
| 27 | </simplecounter> | |
| 407 | 28 | </element> |
| 408 | 29 | |
| 409 | 30 | <view name="Full Output"> |
| r0 | r15083 | |
|---|---|---|
| 1 | <?xml version="1.0"?> | |
| 2 | <mamelayout version="2"> | |
| 3 | ||
| 4 | <element name="stop1" defstate="0"> | |
| 5 | <rect state="1"> | |
| 6 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 7 | </rect> | |
| 8 | <rect state="0"> | |
| 9 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 10 | </rect> | |
| 11 | <text string="STOP 1"> | |
| 12 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 13 | <bounds x="0.1" y="0.25" width="0.8" height="0.5" /> | |
| 14 | </text> | |
| 15 | </element> | |
| 16 | ||
| 17 | <element name="stop2" defstate="0"> | |
| 18 | <rect state="1"> | |
| 19 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 20 | </rect> | |
| 21 | <rect state="0"> | |
| 22 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 23 | </rect> | |
| 24 | <text string="STOP 2"> | |
| 25 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 26 | <bounds x="0.1" y="0.25" width="0.8" height="0.5" /> | |
| 27 | </text> | |
| 28 | </element> | |
| 29 | ||
| 30 | <element name="stop3" defstate="0"> | |
| 31 | <rect state="1"> | |
| 32 | <color red="1.0" green="0.0" blue="0.0" /> | |
| 33 | </rect> | |
| 34 | <rect state="0"> | |
| 35 | <color red="0.3" green="0.0" blue="0.0" /> | |
| 36 | </rect> | |
| 37 | <text string="STOP 3"> | |
| 38 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 39 | <bounds x="0.1" y="0.25" width="0.8" height="0.5" /> | |
| 40 | </text> | |
| 41 | </element> | |
| 42 | ||
| 43 | <element name="bet" defstate="0"> | |
| 44 | <rect state="1"> | |
| 45 | <color red="1.0" green="0.6" blue="0.0" /> | |
| 46 | </rect> | |
| 47 | <rect state="0"> | |
| 48 | <color red="0.3" green="0.1" blue="0.0" /> | |
| 49 | </rect> | |
| 50 | <text string="BET"> | |
| 51 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 52 | <bounds x="0.1" y="0.25" width="0.8" height="0.5" /> | |
| 53 | </text> | |
| 54 | </element> | |
| 55 | ||
| 56 | <element name="start" defstate="0"> | |
| 57 | <rect state="1"> | |
| 58 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 59 | </rect> | |
| 60 | <rect state="0"> | |
| 61 | <color red="0.3" green="0.3" blue="0.3" /> | |
| 62 | </rect> | |
| 63 | <text string="START"> | |
| 64 | <color red="0.0" green="0.0" blue="0.0" /> | |
| 65 | <bounds x="0.1" y="0.25" width="0.8" height="0.5" /> | |
| 66 | </text> | |
| 67 | </element> | |
| 68 | ||
| 69 | ||
| 70 | <view name="Button Lamps"> | |
| 71 | ||
| 72 | <screen index="0"> | |
| 73 | <bounds left="0" top="0" right="4" bottom="3" /> | |
| 74 | </screen> | |
| 75 | ||
| 76 | <bezel name="lamp10" element="stop3"> | |
| 77 | <bounds x="1.5" y="3.05" width="0.40" height="0.24" /> | |
| 78 | </bezel> | |
| 79 | <bezel name="lamp11" element="stop2"> | |
| 80 | <bounds x="1.0" y="3.05" width="0.40" height="0.24" /> | |
| 81 | </bezel> | |
| 82 | <bezel name="lamp12" element="stop1"> | |
| 83 | <bounds x="0.5" y="3.05" width="0.40" height="0.24" /> | |
| 84 | </bezel> | |
| 85 | <bezel name="lamp9" element="start"> | |
| 86 | <bounds x="3.1" y="3.05" width="0.40" height="0.24" /> | |
| 87 | </bezel> | |
| 88 | <bezel name="lamp8" element="bet"> | |
| 89 | <bounds x="2.6" y="3.05" width="0.40" height="0.24" /> | |
| 90 | </bezel> | |
| 91 | ||
| 92 | </view> | |
| 93 | </mamelayout> |
| r15082 | r15083 | |
|---|---|---|
| 1 | 1 | <?xml version="1.0"?> |
| 2 | 2 | <mamelayout version="2"> |
| 3 | <element name="TotalReels" defstate="4"/> | |
| 4 | <element name="ReelSteps1" defstate="6"/> | |
| 5 | <element name="ReelSymbols1" defstate="3"/> | |
| 6 | <element name="ReelSteps4" defstate="4"/> | |
| 7 | <element name="ReelSymbols4" defstate="1"/> | |
| 8 | 3 | <element name="vfd0"> |
| 9 | 4 | <led14segsc> |
| 10 | 5 | <color red="0" green="0.6" blue="1.0" /> |
| r15082 | r15083 | |
| 24 | 19 | <color red="0.0" green="1.0" blue="0.0"/> |
| 25 | 20 | </rect> |
| 26 | 21 | </element> |
| 27 | <element name="Reel1" defstate="96"> | |
| 28 | <text string="Cherry" state="0"> | |
| 29 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 30 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 31 | </text> | |
| 32 | <text string="Cherry" state="1"> | |
| 33 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 34 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 35 | </text> | |
| 36 | <text string="Cherry" state="2"> | |
| 37 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 38 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 39 | </text> | |
| 40 | <text string="Single Bar K9" state="3"> | |
| 41 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 42 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 43 | </text> | |
| 44 | <text string="Single Bar K9" state="4"> | |
| 45 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 46 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 47 | </text> | |
| 48 | <text string="Single Bar K9" state="5"> | |
| 49 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 50 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 51 | </text> | |
| 52 | <text string="Single Bar K9" state="6"> | |
| 53 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 54 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 55 | </text> | |
| 56 | <text string="Single Bar K9" state="7"> | |
| 57 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 58 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 59 | </text> | |
| 60 | <text string="Single Bar K9" state="8"> | |
| 61 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 62 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 63 | </text> | |
| 64 | <text string="Blue 7" state="9"> | |
| 65 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 66 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 67 | </text> | |
| 68 | <text string="Blue 7" state="10"> | |
| 69 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 70 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 71 | </text> | |
| 72 | <text string="Blue 7" state="11"> | |
| 73 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 74 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 75 | </text> | |
| 76 | <text string="Blue 7" state="12"> | |
| 77 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 78 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 79 | </text> | |
| 80 | <text string="Blue 7" state="13"> | |
| 81 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 82 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 83 | </text> | |
| 84 | <text string="Blue 7" state="14"> | |
| 85 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 86 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 87 | </text> | |
| 88 | <text string="Double Bar" state="15"> | |
| 89 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 90 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 91 | </text> | |
| 92 | <text string="Double Bar" state="16"> | |
| 93 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 94 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 95 | </text> | |
| 96 | <text string="Double Bar" state="17"> | |
| 97 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 98 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 99 | </text> | |
| 100 | <text string="Double Bar" state="18"> | |
| 101 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 102 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 103 | </text> | |
| 104 | <text string="Double Bar" state="19"> | |
| 105 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 106 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 107 | </text> | |
| 108 | <text string="Double Bar" state="20"> | |
| 109 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 110 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 111 | </text> | |
| 112 | <text string="Cherry(3)" state="21"> | |
| 113 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 114 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 115 | </text> | |
| 116 | <text string="Cherry(3)" state="22"> | |
| 117 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 118 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 119 | </text> | |
| 120 | <text string="Cherry(3)" state="23"> | |
| 121 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 122 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 123 | </text> | |
| 124 | <text string="Cherry(3)" state="24"> | |
| 125 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 126 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 127 | </text> | |
| 128 | <text string="Cherry(3)" state="25"> | |
| 129 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 130 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 131 | </text> | |
| 132 | <text string="Cherry(3)" state="26"> | |
| 133 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 134 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 135 | </text> | |
| 136 | <text string="Red 7" state="27"> | |
| 137 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 138 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 139 | </text> | |
| 140 | <text string="Red 7" state="28"> | |
| 141 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 142 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 143 | </text> | |
| 144 | <text string="Red 7" state="29"> | |
| 145 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 146 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 147 | </text> | |
| 148 | <text string="Red 7" state="30"> | |
| 149 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 150 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 151 | </text> | |
| 152 | <text string="Red 7" state="31"> | |
| 153 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 154 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 155 | </text> | |
| 156 | <text string="Red 7" state="32"> | |
| 157 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 158 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 159 | </text> | |
| 160 | <text string="Single Bar" state="33"> | |
| 161 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 162 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 163 | </text> | |
| 164 | <text string="Single Bar" state="34"> | |
| 165 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 166 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 167 | </text> | |
| 168 | <text string="Single Bar" state="35"> | |
| 169 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 170 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 171 | </text> | |
| 172 | <text string="Single Bar" state="36"> | |
| 173 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 174 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 175 | </text> | |
| 176 | <text string="Single Bar" state="37"> | |
| 177 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 178 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 179 | </text> | |
| 180 | <text string="Single Bar" state="38"> | |
| 181 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 182 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 183 | </text> | |
| 184 | <text string="Triple Bar(1)" state="39"> | |
| 185 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 186 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 187 | </text> | |
| 188 | <text string="Triple Bar(1)" state="40"> | |
| 189 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 190 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 191 | </text> | |
| 192 | <text string="Triple Bar(1)" state="41"> | |
| 193 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 194 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 195 | </text> | |
| 196 | <text string="Triple Bar(1)" state="42"> | |
| 197 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 198 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 199 | </text> | |
| 200 | <text string="Triple Bar(1)" state="43"> | |
| 201 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 202 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 203 | </text> | |
| 204 | <text string="Triple Bar(1)" state="44"> | |
| 205 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 206 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 207 | </text> | |
| 208 | <text string="Blue 7" state="45"> | |
| 209 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 210 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 211 | </text> | |
| 212 | <text string="Blue 7" state="46"> | |
| 213 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 214 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 215 | </text> | |
| 216 | <text string="Blue 7" state="47"> | |
| 217 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 218 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 219 | </text> | |
| 220 | <text string="Blue 7" state="48"> | |
| 221 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 222 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 223 | </text> | |
| 224 | <text string="Blue 7" state="49"> | |
| 225 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 226 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 227 | </text> | |
| 228 | <text string="Blue 7" state="50"> | |
| 229 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 230 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 231 | </text> | |
| 232 | <text string="Double Bar" state="51"> | |
| 233 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 234 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 235 | </text> | |
| 236 | <text string="Double Bar" state="52"> | |
| 237 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 238 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 239 | </text> | |
| 240 | <text string="Double Bar" state="53"> | |
| 241 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 242 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 243 | </text> | |
| 244 | <text string="Double Bar" state="54"> | |
| 245 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 246 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 247 | </text> | |
| 248 | <text string="Double Bar" state="55"> | |
| 249 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 250 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 251 | </text> | |
| 252 | <text string="Double Bar" state="56"> | |
| 253 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 254 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 255 | </text> | |
| 256 | <text string="Cherry" state="57"> | |
| 257 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 258 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 259 | </text> | |
| 260 | <text string="Cherry" state="58"> | |
| 261 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 262 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 263 | </text> | |
| 264 | <text string="Cherry" state="59"> | |
| 265 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 266 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 267 | </text> | |
| 268 | <text string="Cherry" state="60"> | |
| 269 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 270 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 271 | </text> | |
| 272 | <text string="Cherry" state="61"> | |
| 273 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 274 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 275 | </text> | |
| 276 | <text string="Cherry" state="62"> | |
| 277 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 278 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 279 | </text> | |
| 280 | <text string="Single Bar(2)" state="63"> | |
| 281 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 282 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 283 | </text> | |
| 284 | <text string="Single Bar(2)" state="64"> | |
| 285 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 286 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 287 | </text> | |
| 288 | <text string="Single Bar(2)" state="65"> | |
| 289 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 290 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 291 | </text> | |
| 292 | <text string="Single Bar(2)" state="66"> | |
| 293 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 294 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 295 | </text> | |
| 296 | <text string="Single Bar(2)" state="67"> | |
| 297 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 298 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 299 | </text> | |
| 300 | <text string="Single Bar(2)" state="68"> | |
| 301 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 302 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 303 | </text> | |
| 304 | <text string="Double Bar" state="69"> | |
| 305 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 306 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 307 | </text> | |
| 308 | <text string="Double Bar" state="70"> | |
| 309 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 310 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 311 | </text> | |
| 312 | <text string="Double Bar" state="71"> | |
| 313 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 314 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 315 | </text> | |
| 316 | <text string="Double Bar" state="72"> | |
| 317 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 318 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 319 | </text> | |
| 320 | <text string="Double Bar" state="73"> | |
| 321 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 322 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 323 | </text> | |
| 324 | <text string="Double Bar" state="74"> | |
| 325 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 326 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 327 | </text> | |
| 328 | <text string="Triple Bar" state="75"> | |
| 329 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 330 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 331 | </text> | |
| 332 | <text string="Triple Bar" state="76"> | |
| 333 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 334 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 335 | </text> | |
| 336 | <text string="Triple Bar" state="77"> | |
| 337 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 338 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 339 | </text> | |
| 340 | <text string="Triple Bar" state="78"> | |
| 341 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 342 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 343 | </text> | |
| 344 | <text string="Triple Bar" state="79"> | |
| 345 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 346 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 347 | </text> | |
| 348 | <text string="Triple Bar" state="80"> | |
| 349 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 350 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 351 | </text> | |
| 352 | <text string="Cherry(2)" state="81"> | |
| 353 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 354 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 355 | </text> | |
| 356 | <text string="Cherry(2)" state="82"> | |
| 357 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 358 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 359 | </text> | |
| 360 | <text string="Cherry(2)" state="83"> | |
| 361 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 362 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 363 | </text> | |
| 364 | <text string="Cherry(2)" state="84"> | |
| 365 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 366 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 367 | </text> | |
| 368 | <text string="Cherry(2)" state="85"> | |
| 369 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 370 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 371 | </text> | |
| 372 | <text string="Cherry(2)" state="86"> | |
| 373 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 374 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 375 | </text> | |
| 376 | <text string="Red 7" state="87"> | |
| 377 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 378 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 379 | </text> | |
| 380 | <text string="Red 7" state="88"> | |
| 381 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 382 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 383 | </text> | |
| 384 | <text string="Red 7" state="89"> | |
| 385 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 386 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 387 | </text> | |
| 388 | <text string="Red 7" state="90"> | |
| 389 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 390 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 391 | </text> | |
| 392 | <text string="Red 7" state="91"> | |
| 393 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 394 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 395 | </text> | |
| 396 | <text string="Red 7" state="92"> | |
| 397 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 398 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 399 | </text> | |
| 400 | <text string="Cherry" state="93"> | |
| 401 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 402 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 403 | </text> | |
| 404 | <text string="Cherry" state="94"> | |
| 405 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 406 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 407 | </text> | |
| 408 | <text string="Cherry" state="95"> | |
| 409 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 410 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 411 | </text> | |
| 22 | ||
| 23 | ||
| 24 | <element name="SteppersReel1" defstate="0"> | |
| 25 | <reel stateoffset="-6826" symbollist="Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Single Bar (K9):DW_SBar_K9.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Cherry (2):DW_Cherry_2.png,Triple Bar:DW_TBar.png,Double Bar:DW_DBar.png,Single Bar (2):DW_SBar_2.png,Cherry:DW_Cherry.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_SBar.png,Red 7:DW_Red7.png,Cherry (3):DW_Cherry_3.png" reelreversed="1"> | |
| 26 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 27 | <bounds x="0" y="0" width="1" height="1" /> | |
| 28 | </reel> | |
| 412 | 29 | </element> |
| 413 | 30 | |
| 414 | <element name="Reel2" defstate="96"> | |
| 415 | <text string="Cherry" state="0"> | |
| 416 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 417 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 418 | </text> | |
| 419 | <text string="Cherry" state="1"> | |
| 420 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 421 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 422 | </text> | |
| 423 | <text string="Cherry" state="2"> | |
| 424 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 425 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 426 | </text> | |
| 427 | <text string="Single Bar(1)" state="3"> | |
| 428 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 429 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 430 | </text> | |
| 431 | <text string="Single Bar(1)" state="4"> | |
| 432 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 433 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 434 | </text> | |
| 435 | <text string="Single Bar(1)" state="5"> | |
| 436 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 437 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 438 | </text> | |
| 439 | <text string="Single Bar(1)" state="6"> | |
| 440 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 441 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 442 | </text> | |
| 443 | <text string="Single Bar(1)" state="7"> | |
| 444 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 445 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 446 | </text> | |
| 447 | <text string="Single Bar(1)" state="8"> | |
| 448 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 449 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 450 | </text> | |
| 451 | <text string="Triple Bar" state="9"> | |
| 452 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 453 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 454 | </text> | |
| 455 | <text string="Triple Bar" state="10"> | |
| 456 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 457 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 458 | </text> | |
| 459 | <text string="Triple Bar" state="11"> | |
| 460 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 461 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 462 | </text> | |
| 463 | <text string="Triple Bar" state="12"> | |
| 464 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 465 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 466 | </text> | |
| 467 | <text string="Triple Bar" state="13"> | |
| 468 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 469 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 470 | </text> | |
| 471 | <text string="Triple Bar" state="14"> | |
| 472 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 473 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 474 | </text> | |
| 475 | <text string="Double Bar" state="15"> | |
| 476 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 477 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 478 | </text> | |
| 479 | <text string="Double Bar" state="16"> | |
| 480 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 481 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 482 | </text> | |
| 483 | <text string="Double Bar" state="17"> | |
| 484 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 485 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 486 | </text> | |
| 487 | <text string="Double Bar" state="18"> | |
| 488 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 489 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 490 | </text> | |
| 491 | <text string="Double Bar" state="19"> | |
| 492 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 493 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 494 | </text> | |
| 495 | <text string="Double Bar" state="20"> | |
| 496 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 497 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 498 | </text> | |
| 499 | <text string="Cherry(2)" state="21"> | |
| 500 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 501 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 502 | </text> | |
| 503 | <text string="Cherry(2)" state="22"> | |
| 504 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 505 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 506 | </text> | |
| 507 | <text string="Cherry(2)" state="23"> | |
| 508 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 509 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 510 | </text> | |
| 511 | <text string="Cherry(2)" state="24"> | |
| 512 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 513 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 514 | </text> | |
| 515 | <text string="Cherry(2)" state="25"> | |
| 516 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 517 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 518 | </text> | |
| 519 | <text string="Cherry(2)" state="26"> | |
| 520 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 521 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 522 | </text> | |
| 523 | <text string="Blue 7" state="27"> | |
| 524 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 525 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 526 | </text> | |
| 527 | <text string="Blue 7" state="28"> | |
| 528 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 529 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 530 | </text> | |
| 531 | <text string="Blue 7" state="29"> | |
| 532 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 533 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 534 | </text> | |
| 535 | <text string="Blue 7" state="30"> | |
| 536 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 537 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 538 | </text> | |
| 539 | <text string="Blue 7" state="31"> | |
| 540 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 541 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 542 | </text> | |
| 543 | <text string="Blue 7" state="32"> | |
| 544 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 545 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 546 | </text> | |
| 547 | <text string="Single Bar" state="33"> | |
| 548 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 549 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 550 | </text> | |
| 551 | <text string="Single Bar" state="34"> | |
| 552 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 553 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 554 | </text> | |
| 555 | <text string="Single Bar" state="35"> | |
| 556 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 557 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 558 | </text> | |
| 559 | <text string="Single Bar" state="36"> | |
| 560 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 561 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 562 | </text> | |
| 563 | <text string="Single Bar" state="37"> | |
| 564 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 565 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 566 | </text> | |
| 567 | <text string="Single Bar" state="38"> | |
| 568 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 569 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 570 | </text> | |
| 571 | <text string="Triple Bar(1)" state="39"> | |
| 572 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 573 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 574 | </text> | |
| 575 | <text string="Triple Bar(1)" state="40"> | |
| 576 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 577 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 578 | </text> | |
| 579 | <text string="Triple Bar(1)" state="41"> | |
| 580 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 581 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 582 | </text> | |
| 583 | <text string="Triple Bar(1)" state="42"> | |
| 584 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 585 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 586 | </text> | |
| 587 | <text string="Triple Bar(1)" state="43"> | |
| 588 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 589 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 590 | </text> | |
| 591 | <text string="Triple Bar(1)" state="44"> | |
| 592 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 593 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 594 | </text> | |
| 595 | <text string="Blue 7" state="45"> | |
| 596 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 597 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 598 | </text> | |
| 599 | <text string="Blue 7" state="46"> | |
| 600 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 601 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 602 | </text> | |
| 603 | <text string="Blue 7" state="47"> | |
| 604 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 605 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 606 | </text> | |
| 607 | <text string="Blue 7" state="48"> | |
| 608 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 609 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 610 | </text> | |
| 611 | <text string="Blue 7" state="49"> | |
| 612 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 613 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 614 | </text> | |
| 615 | <text string="Blue 7" state="50"> | |
| 616 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 617 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 618 | </text> | |
| 619 | <text string="Double Bar" state="51"> | |
| 620 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 621 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 622 | </text> | |
| 623 | <text string="Double Bar" state="52"> | |
| 624 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 625 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 626 | </text> | |
| 627 | <text string="Double Bar" state="53"> | |
| 628 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 629 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 630 | </text> | |
| 631 | <text string="Double Bar" state="54"> | |
| 632 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 633 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 634 | </text> | |
| 635 | <text string="Double Bar" state="55"> | |
| 636 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 637 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 638 | </text> | |
| 639 | <text string="Double Bar" state="56"> | |
| 640 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 641 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 642 | </text> | |
| 643 | <text string="Cherry K9" state="57"> | |
| 644 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 645 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 646 | </text> | |
| 647 | <text string="Cherry K9" state="58"> | |
| 648 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 649 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 650 | </text> | |
| 651 | <text string="Cherry K9" state="59"> | |
| 652 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 653 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 654 | </text> | |
| 655 | <text string="Cherry K9" state="60"> | |
| 656 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 657 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 658 | </text> | |
| 659 | <text string="Cherry K9" state="61"> | |
| 660 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 661 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 662 | </text> | |
| 663 | <text string="Cherry K9" state="62"> | |
| 664 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 665 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 666 | </text> | |
| 667 | <text string="Single Bar" state="63"> | |
| 668 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 669 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 670 | </text> | |
| 671 | <text string="Single Bar" state="64"> | |
| 672 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 673 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 674 | </text> | |
| 675 | <text string="Single Bar" state="65"> | |
| 676 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 677 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 678 | </text> | |
| 679 | <text string="Single Bar" state="66"> | |
| 680 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 681 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 682 | </text> | |
| 683 | <text string="Single Bar" state="67"> | |
| 684 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 685 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 686 | </text> | |
| 687 | <text string="Single Bar" state="68"> | |
| 688 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 689 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 690 | </text> | |
| 691 | <text string="Double Bar(3)" state="69"> | |
| 692 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 693 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 694 | </text> | |
| 695 | <text string="Double Bar(3)" state="70"> | |
| 696 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 697 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 698 | </text> | |
| 699 | <text string="Double Bar(3)" state="71"> | |
| 700 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 701 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 702 | </text> | |
| 703 | <text string="Double Bar(3)" state="72"> | |
| 704 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 705 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 706 | </text> | |
| 707 | <text string="Double Bar(3)" state="73"> | |
| 708 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 709 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 710 | </text> | |
| 711 | <text string="Double Bar(3)" state="74"> | |
| 712 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 713 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 714 | </text> | |
| 715 | <text string="Triple Bar" state="75"> | |
| 716 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 717 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 718 | </text> | |
| 719 | <text string="Triple Bar" state="76"> | |
| 720 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 721 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 722 | </text> | |
| 723 | <text string="Triple Bar" state="77"> | |
| 724 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 725 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 726 | </text> | |
| 727 | <text string="Triple Bar" state="78"> | |
| 728 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 729 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 730 | </text> | |
| 731 | <text string="Triple Bar" state="79"> | |
| 732 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 733 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 734 | </text> | |
| 735 | <text string="Triple Bar" state="80"> | |
| 736 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 737 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 738 | </text> | |
| 739 | <text string="Single Bar" state="81"> | |
| 740 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 741 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 742 | </text> | |
| 743 | <text string="Single Bar" state="82"> | |
| 744 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 745 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 746 | </text> | |
| 747 | <text string="Single Bar" state="83"> | |
| 748 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 749 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 750 | </text> | |
| 751 | <text string="Single Bar" state="84"> | |
| 752 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 753 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 754 | </text> | |
| 755 | <text string="Single Bar" state="85"> | |
| 756 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 757 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 758 | </text> | |
| 759 | <text string="Single Bar" state="86"> | |
| 760 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 761 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 762 | </text> | |
| 763 | <text string="Red 7" state="87"> | |
| 764 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 765 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 766 | </text> | |
| 767 | <text string="Red 7" state="88"> | |
| 768 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 769 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 770 | </text> | |
| 771 | <text string="Red 7" state="89"> | |
| 772 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 773 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 774 | </text> | |
| 775 | <text string="Red 7" state="90"> | |
| 776 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 777 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 778 | </text> | |
| 779 | <text string="Red 7" state="91"> | |
| 780 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 781 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 782 | </text> | |
| 783 | <text string="Red 7" state="92"> | |
| 784 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 785 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 786 | </text> | |
| 787 | <text string="Cherry" state="93"> | |
| 788 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 789 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 790 | </text> | |
| 791 | <text string="Cherry" state="94"> | |
| 792 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 793 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 794 | </text> | |
| 795 | <text string="Cherry" state="95"> | |
| 796 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 797 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 798 | </text> | |
| 31 | <element name="SteppersReel2" defstate="0"> | |
| 32 | <reel stateoffset="-6826" symbollist="Double Bar:DW_DBar.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_Sbar_1.png,Cherry:DW_Cherry.png,Red 7:DW_Red7.png,Single Bar:DW_Sbar.png,Triple Bar:DW_TBar.png,Double Bar (3):DW_DBar_3.png,Single Bar:DW_Sbar.png,Cherry (K9):DW_Cherry_K9.png,Double Bar:DW_DBar.png,Blue 7:DW_Blue7.png,Triple Bar (1):DW_TBar_1.png,Single Bar:DW_Sbar.png,Blue 7:DW_Blue7.png,Cherry (2):DW_Cherry_2.png" reelreversed="1"> | |
| 33 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 34 | <bounds x="0" y="0" width="1" height="1" /> | |
| 35 | </reel> | |
| 799 | 36 | </element> |
| 800 | 37 | |
| 801 | <element name="Reel3" defstate="96"> | |
| 802 | <text string="Cherry(2)" state="0"> | |
| 803 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 804 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 805 | </text> | |
| 806 | <text string="Cherry(2)" state="1"> | |
| 807 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 808 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 809 | </text> | |
| 810 | <text string="Cherry(2)" state="2"> | |
| 811 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 812 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 813 | </text> | |
| 814 | <text string="Single Bar" state="3"> | |
| 815 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 816 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 817 | </text> | |
| 818 | <text string="Single Bar" state="4"> | |
| 819 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 820 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 821 | </text> | |
| 822 | <text string="Single Bar" state="5"> | |
| 823 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 824 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 825 | </text> | |
| 826 | <text string="Single Bar" state="6"> | |
| 827 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 828 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 829 | </text> | |
| 830 | <text string="Single Bar" state="7"> | |
| 831 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 832 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 833 | </text> | |
| 834 | <text string="Single Bar" state="8"> | |
| 835 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 836 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 837 | </text> | |
| 838 | <text string="Blue 7" state="9"> | |
| 839 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 840 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 841 | </text> | |
| 842 | <text string="Blue 7" state="10"> | |
| 843 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 844 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 845 | </text> | |
| 846 | <text string="Blue 7" state="11"> | |
| 847 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 848 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 849 | </text> | |
| 850 | <text string="Blue 7" state="12"> | |
| 851 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 852 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 853 | </text> | |
| 854 | <text string="Blue 7" state="13"> | |
| 855 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 856 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 857 | </text> | |
| 858 | <text string="Blue 7" state="14"> | |
| 859 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 860 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 861 | </text> | |
| 862 | <text string="Double Bar(3)" state="15"> | |
| 863 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 864 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 865 | </text> | |
| 866 | <text string="Double Bar(3)" state="16"> | |
| 867 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 868 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 869 | </text> | |
| 870 | <text string="Double Bar(3)" state="17"> | |
| 871 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 872 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 873 | </text> | |
| 874 | <text string="Double Bar(3)" state="18"> | |
| 875 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 876 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 877 | </text> | |
| 878 | <text string="Double Bar(3)" state="19"> | |
| 879 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 880 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 881 | </text> | |
| 882 | <text string="Double Bar(3)" state="20"> | |
| 883 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 884 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 885 | </text> | |
| 886 | <text string="Cherry" state="21"> | |
| 887 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 888 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 889 | </text> | |
| 890 | <text string="Cherry" state="22"> | |
| 891 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 892 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 893 | </text> | |
| 894 | <text string="Cherry" state="23"> | |
| 895 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 896 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 897 | </text> | |
| 898 | <text string="Cherry" state="24"> | |
| 899 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 900 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 901 | </text> | |
| 902 | <text string="Cherry" state="25"> | |
| 903 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 904 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 905 | </text> | |
| 906 | <text string="Cherry" state="26"> | |
| 907 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 908 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 909 | </text> | |
| 910 | <text string="Red 7" state="27"> | |
| 911 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 912 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 913 | </text> | |
| 914 | <text string="Red 7" state="28"> | |
| 915 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 916 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 917 | </text> | |
| 918 | <text string="Red 7" state="29"> | |
| 919 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 920 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 921 | </text> | |
| 922 | <text string="Red 7" state="30"> | |
| 923 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 924 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 925 | </text> | |
| 926 | <text string="Red 7" state="31"> | |
| 927 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 928 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 929 | </text> | |
| 930 | <text string="Red 7" state="32"> | |
| 931 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 932 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 933 | </text> | |
| 934 | <text string="Single Bar(1)" state="33"> | |
| 935 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 936 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 937 | </text> | |
| 938 | <text string="Single Bar(1)" state="34"> | |
| 939 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 940 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 941 | </text> | |
| 942 | <text string="Single Bar(1)" state="35"> | |
| 943 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 944 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 945 | </text> | |
| 946 | <text string="Single Bar(1)" state="36"> | |
| 947 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 948 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 949 | </text> | |
| 950 | <text string="Single Bar(1)" state="37"> | |
| 951 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 952 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 953 | </text> | |
| 954 | <text string="Single Bar(1)" state="38"> | |
| 955 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 956 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 957 | </text> | |
| 958 | <text string="Triple Bar" state="39"> | |
| 959 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 960 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 961 | </text> | |
| 962 | <text string="Triple Bar" state="40"> | |
| 963 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 964 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 965 | </text> | |
| 966 | <text string="Triple Bar" state="41"> | |
| 967 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 968 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 969 | </text> | |
| 970 | <text string="Triple Bar" state="42"> | |
| 971 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 972 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 973 | </text> | |
| 974 | <text string="Triple Bar" state="43"> | |
| 975 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 976 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 977 | </text> | |
| 978 | <text string="Triple Bar" state="44"> | |
| 979 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 980 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 981 | </text> | |
| 982 | <text string="Blue 7" state="45"> | |
| 983 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 984 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 985 | </text> | |
| 986 | <text string="Blue 7" state="46"> | |
| 987 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 988 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 989 | </text> | |
| 990 | <text string="Blue 7" state="47"> | |
| 991 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 992 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 993 | </text> | |
| 994 | <text string="Blue 7" state="48"> | |
| 995 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 996 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 997 | </text> | |
| 998 | <text string="Blue 7" state="49"> | |
| 999 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1000 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1001 | </text> | |
| 1002 | <text string="Blue 7" state="50"> | |
| 1003 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1004 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1005 | </text> | |
| 1006 | <text string="Double Bar(2)" state="51"> | |
| 1007 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1008 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1009 | </text> | |
| 1010 | <text string="Double Bar(2)" state="52"> | |
| 1011 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1012 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1013 | </text> | |
| 1014 | <text string="Double Bar(2)" state="53"> | |
| 1015 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1016 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1017 | </text> | |
| 1018 | <text string="Double Bar(2)" state="54"> | |
| 1019 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1020 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1021 | </text> | |
| 1022 | <text string="Double Bar(2)" state="55"> | |
| 1023 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1024 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1025 | </text> | |
| 1026 | <text string="Double Bar(2)" state="56"> | |
| 1027 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1028 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1029 | </text> | |
| 1030 | <text string="Cherry" state="57"> | |
| 1031 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1032 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1033 | </text> | |
| 1034 | <text string="Cherry" state="58"> | |
| 1035 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1036 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1037 | </text> | |
| 1038 | <text string="Cherry" state="59"> | |
| 1039 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1040 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1041 | </text> | |
| 1042 | <text string="Cherry" state="60"> | |
| 1043 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1044 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1045 | </text> | |
| 1046 | <text string="Cherry" state="61"> | |
| 1047 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1048 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1049 | </text> | |
| 1050 | <text string="Cherry" state="62"> | |
| 1051 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1052 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1053 | </text> | |
| 1054 | <text string="Single Bar" state="63"> | |
| 1055 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1056 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1057 | </text> | |
| 1058 | <text string="Single Bar" state="64"> | |
| 1059 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1060 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1061 | </text> | |
| 1062 | <text string="Single Bar" state="65"> | |
| 1063 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1064 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1065 | </text> | |
| 1066 | <text string="Single Bar" state="66"> | |
| 1067 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1068 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1069 | </text> | |
| 1070 | <text string="Single Bar" state="67"> | |
| 1071 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1072 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1073 | </text> | |
| 1074 | <text string="Single Bar" state="68"> | |
| 1075 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1076 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1077 | </text> | |
| 1078 | <text string="Double Bar(1)" state="69"> | |
| 1079 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1080 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1081 | </text> | |
| 1082 | <text string="Double Bar(1)" state="70"> | |
| 1083 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1084 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1085 | </text> | |
| 1086 | <text string="Double Bar(1)" state="71"> | |
| 1087 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1088 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1089 | </text> | |
| 1090 | <text string="Double Bar(1)" state="72"> | |
| 1091 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1092 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1093 | </text> | |
| 1094 | <text string="Double Bar(1)" state="73"> | |
| 1095 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1096 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1097 | </text> | |
| 1098 | <text string="Double Bar(1)" state="74"> | |
| 1099 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1100 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1101 | </text> | |
| 1102 | <text string="Triple Bar" state="75"> | |
| 1103 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1104 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1105 | </text> | |
| 1106 | <text string="Triple Bar" state="76"> | |
| 1107 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1108 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1109 | </text> | |
| 1110 | <text string="Triple Bar" state="77"> | |
| 1111 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1112 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1113 | </text> | |
| 1114 | <text string="Triple Bar" state="78"> | |
| 1115 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1116 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1117 | </text> | |
| 1118 | <text string="Triple Bar" state="79"> | |
| 1119 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1120 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1121 | </text> | |
| 1122 | <text string="Triple Bar" state="80"> | |
| 1123 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1124 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1125 | </text> | |
| 1126 | <text string="Cherry" state="81"> | |
| 1127 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1128 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1129 | </text> | |
| 1130 | <text string="Cherry" state="82"> | |
| 1131 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1132 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1133 | </text> | |
| 1134 | <text string="Cherry" state="83"> | |
| 1135 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1136 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1137 | </text> | |
| 1138 | <text string="Cherry" state="84"> | |
| 1139 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1140 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1141 | </text> | |
| 1142 | <text string="Cherry" state="85"> | |
| 1143 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1144 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1145 | </text> | |
| 1146 | <text string="Cherry" state="86"> | |
| 1147 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1148 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1149 | </text> | |
| 1150 | <text string="Red 7" state="87"> | |
| 1151 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1152 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1153 | </text> | |
| 1154 | <text string="Red 7" state="88"> | |
| 1155 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1156 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1157 | </text> | |
| 1158 | <text string="Red 7" state="89"> | |
| 1159 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1160 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1161 | </text> | |
| 1162 | <text string="Red 7" state="90"> | |
| 1163 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1164 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1165 | </text> | |
| 1166 | <text string="Red 7" state="91"> | |
| 1167 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1168 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1169 | </text> | |
| 1170 | <text string="Red 7" state="92"> | |
| 1171 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1172 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1173 | </text> | |
| 1174 | <text string="Cherry(2)" state="93"> | |
| 1175 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1176 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1177 | </text> | |
| 1178 | <text string="Cherry(2)" state="94"> | |
| 1179 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1180 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1181 | </text> | |
| 1182 | <text string="Cherry(2)" state="95"> | |
| 1183 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1184 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1185 | </text> | |
| 38 | <element name="SteppersReel3" defstate="0"> | |
| 39 | <reel stateoffset="-6826" symbollist="Double Bar (3):DW_DBar_3.png,Blue 7:DW_Blue7.png,Single Bar:DW_SBar.png,Cherry (2):DW_Cherry_2.png,Red 7:DW_Red7.png,Cherry:DW_Cherry.png,Triple Bar:DW_TBar.png,Double Bar (1):DW_DBar_1.png,Single Bar:DW_SBar.png,Cherry:DW_Cherry.png,Double Bar (2):DW_DBar_2.png,Blue 7:DW_Blue7.png,Triple Bar:DW_TBar.png,Single Bar (1):DW_SBar_1.png,Red 7:DW_Red7.png,Cherry:DW_Cherry.png" reelreversed="1"> | |
| 40 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 41 | <bounds x="0" y="0" width="1" height="1" /> | |
| 42 | </reel> | |
| 1186 | 43 | </element> |
| 1187 | 44 | |
| 1188 | <element name="Reel4" defstate="96"> | |
| 1189 | <text string="4 3" state="0"> | |
| 1190 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1191 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1192 | </text> | |
| 1193 | <text string="4 3" state="1"> | |
| 1194 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1195 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1196 | </text> | |
| 1197 | <text string="4 3" state="2"> | |
| 1198 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1199 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1200 | </text> | |
| 1201 | <text string="4 3" state="3"> | |
| 1202 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1203 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1204 | </text> | |
| 1205 | <text string="4" state="4"> | |
| 1206 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1207 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1208 | </text> | |
| 1209 | <text string="4" state="5"> | |
| 1210 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1211 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1212 | </text> | |
| 1213 | <text string="4" state="6"> | |
| 1214 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1215 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1216 | </text> | |
| 1217 | <text string="4" state="7"> | |
| 1218 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1219 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1220 | </text> | |
| 1221 | <text string="5 4" state="8"> | |
| 1222 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1223 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1224 | </text> | |
| 1225 | <text string="5 4" state="9"> | |
| 1226 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1227 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1228 | </text> | |
| 1229 | <text string="5 4" state="10"> | |
| 1230 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1231 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1232 | </text> | |
| 1233 | <text string="5 4" state="11"> | |
| 1234 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1235 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1236 | </text> | |
| 1237 | <text string="5" state="12"> | |
| 1238 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1239 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1240 | </text> | |
| 1241 | <text string="5" state="13"> | |
| 1242 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1243 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1244 | </text> | |
| 1245 | <text string="5" state="14"> | |
| 1246 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1247 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1248 | </text> | |
| 1249 | <text string="5" state="15"> | |
| 1250 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1251 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1252 | </text> | |
| 1253 | <text string="6 5" state="16"> | |
| 1254 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1255 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1256 | </text> | |
| 1257 | <text string="6 5" state="17"> | |
| 1258 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1259 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1260 | </text> | |
| 1261 | <text string="6 5" state="18"> | |
| 1262 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1263 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1264 | </text> | |
| 1265 | <text string="6 5" state="19"> | |
| 1266 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1267 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1268 | </text> | |
| 1269 | <text string="6" state="20"> | |
| 1270 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1271 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1272 | </text> | |
| 1273 | <text string="6" state="21"> | |
| 1274 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1275 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1276 | </text> | |
| 1277 | <text string="6" state="22"> | |
| 1278 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1279 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1280 | </text> | |
| 1281 | <text string="6" state="23"> | |
| 1282 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1283 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1284 | </text> | |
| 1285 | <text string="1 6" state="24"> | |
| 1286 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1287 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1288 | </text> | |
| 1289 | <text string="1 6" state="25"> | |
| 1290 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1291 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1292 | </text> | |
| 1293 | <text string="1 6" state="26"> | |
| 1294 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1295 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1296 | </text> | |
| 1297 | <text string="1 6" state="27"> | |
| 1298 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1299 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1300 | </text> | |
| 1301 | <text string="1" state="28"> | |
| 1302 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1303 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1304 | </text> | |
| 1305 | <text string="1" state="29"> | |
| 1306 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1307 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1308 | </text> | |
| 1309 | <text string="1" state="30"> | |
| 1310 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1311 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1312 | </text> | |
| 1313 | <text string="1" state="31"> | |
| 1314 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1315 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1316 | </text> | |
| 1317 | <text string="2 1" state="32"> | |
| 1318 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1319 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1320 | </text> | |
| 1321 | <text string="2 1" state="33"> | |
| 1322 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1323 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1324 | </text> | |
| 1325 | <text string="2 1" state="34"> | |
| 1326 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1327 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1328 | </text> | |
| 1329 | <text string="2 1" state="35"> | |
| 1330 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1331 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1332 | </text> | |
| 1333 | <text string="2" state="36"> | |
| 1334 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1335 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1336 | </text> | |
| 1337 | <text string="2" state="37"> | |
| 1338 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1339 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1340 | </text> | |
| 1341 | <text string="2" state="38"> | |
| 1342 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1343 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1344 | </text> | |
| 1345 | <text string="2" state="39"> | |
| 1346 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1347 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1348 | </text> | |
| 1349 | <text string="3 1" state="40"> | |
| 1350 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1351 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1352 | </text> | |
| 1353 | <text string="3 1" state="41"> | |
| 1354 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1355 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1356 | </text> | |
| 1357 | <text string="3 1" state="42"> | |
| 1358 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1359 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1360 | </text> | |
| 1361 | <text string="3 1" state="43"> | |
| 1362 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1363 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1364 | </text> | |
| 1365 | <text string="3" state="44"> | |
| 1366 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1367 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1368 | </text> | |
| 1369 | <text string="3" state="45"> | |
| 1370 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1371 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1372 | </text> | |
| 1373 | <text string="3" state="46"> | |
| 1374 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1375 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1376 | </text> | |
| 1377 | <text string="3" state="47"> | |
| 1378 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1379 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1380 | </text> | |
| 1381 | <text string="4 3" state="48"> | |
| 1382 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1383 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1384 | </text> | |
| 1385 | <text string="4 3" state="49"> | |
| 1386 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1387 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1388 | </text> | |
| 1389 | <text string="4 3" state="50"> | |
| 1390 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1391 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1392 | </text> | |
| 1393 | <text string="4 3" state="51"> | |
| 1394 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1395 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1396 | </text> | |
| 1397 | <text string="4" state="52"> | |
| 1398 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1399 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1400 | </text> | |
| 1401 | <text string="4" state="53"> | |
| 1402 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1403 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1404 | </text> | |
| 1405 | <text string="4" state="54"> | |
| 1406 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1407 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1408 | </text> | |
| 1409 | <text string="4" state="55"> | |
| 1410 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1411 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1412 | </text> | |
| 1413 | <text string="5 4" state="56"> | |
| 1414 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1415 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1416 | </text> | |
| 1417 | <text string="5 4" state="57"> | |
| 1418 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1419 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1420 | </text> | |
| 1421 | <text string="5 4" state="58"> | |
| 1422 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1423 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1424 | </text> | |
| 1425 | <text string="5 4" state="59"> | |
| 1426 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1427 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1428 | </text> | |
| 1429 | <text string="5" state="60"> | |
| 1430 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1431 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1432 | </text> | |
| 1433 | <text string="5" state="61"> | |
| 1434 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1435 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1436 | </text> | |
| 1437 | <text string="5" state="62"> | |
| 1438 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1439 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1440 | </text> | |
| 1441 | <text string="5" state="63"> | |
| 1442 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1443 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1444 | </text> | |
| 1445 | <text string="6 5" state="64"> | |
| 1446 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1447 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1448 | </text> | |
| 1449 | <text string="6 5" state="65"> | |
| 1450 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1451 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1452 | </text> | |
| 1453 | <text string="6 5" state="66"> | |
| 1454 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1455 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1456 | </text> | |
| 1457 | <text string="6 5" state="67"> | |
| 1458 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1459 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1460 | </text> | |
| 1461 | <text string="6" state="68"> | |
| 1462 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1463 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1464 | </text> | |
| 1465 | <text string="6" state="69"> | |
| 1466 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1467 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1468 | </text> | |
| 1469 | <text string="6" state="70"> | |
| 1470 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1471 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1472 | </text> | |
| 1473 | <text string="6" state="71"> | |
| 1474 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1475 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1476 | </text> | |
| 1477 | <text string="1 6" state="72"> | |
| 1478 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1479 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1480 | </text> | |
| 1481 | <text string="1 6" state="73"> | |
| 1482 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1483 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1484 | </text> | |
| 1485 | <text string="1 6" state="74"> | |
| 1486 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1487 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1488 | </text> | |
| 1489 | <text string="1 6" state="75"> | |
| 1490 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1491 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1492 | </text> | |
| 1493 | <text string="1" state="76"> | |
| 1494 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1495 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1496 | </text> | |
| 1497 | <text string="1" state="77"> | |
| 1498 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1499 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1500 | </text> | |
| 1501 | <text string="1" state="78"> | |
| 1502 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1503 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1504 | </text> | |
| 1505 | <text string="1" state="79"> | |
| 1506 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1507 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1508 | </text> | |
| 1509 | <text string="2 1" state="80"> | |
| 1510 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1511 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1512 | </text> | |
| 1513 | <text string="2 1" state="81"> | |
| 1514 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1515 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1516 | </text> | |
| 1517 | <text string="2 1" state="82"> | |
| 1518 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1519 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1520 | </text> | |
| 1521 | <text string="2 1" state="83"> | |
| 1522 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1523 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1524 | </text> | |
| 1525 | <text string="2" state="84"> | |
| 1526 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1527 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1528 | </text> | |
| 1529 | <text string="2" state="85"> | |
| 1530 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1531 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1532 | </text> | |
| 1533 | <text string="2" state="86"> | |
| 1534 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1535 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1536 | </text> | |
| 1537 | <text string="2" state="87"> | |
| 1538 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1539 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1540 | </text> | |
| 1541 | <text string="3 2" state="88"> | |
| 1542 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1543 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1544 | </text> | |
| 1545 | <text string="3 2" state="89"> | |
| 1546 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1547 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1548 | </text> | |
| 1549 | <text string="3 2" state="90"> | |
| 1550 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1551 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1552 | </text> | |
| 1553 | <text string="3 2" state="91"> | |
| 1554 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1555 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1556 | </text> | |
| 1557 | <text string="3" state="92"> | |
| 1558 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1559 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1560 | </text> | |
| 1561 | <text string="3" state="93"> | |
| 1562 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1563 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1564 | </text> | |
| 1565 | <text string="3" state="94"> | |
| 1566 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1567 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1568 | </text> | |
| 1569 | <text string="3" state="95"> | |
| 1570 | <color red="1.0" green="1.0" blue="1.0"/> | |
| 1571 | <bounds x="0" y="0.1" width="1" height="1"/> | |
| 1572 | </text> | |
| 45 | <element name="SteppersReel4" defstate="0"> | |
| 46 | <reel stateoffset="-8192" symbollist="5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png,6:dice6.png,5:dice5.png,4:dice4.png,3:dice3.png,2:dice2.png,1:dice1.png,6:dice6.png" reelreversed="1" numsymbolsvisible="1"> | |
| 47 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 48 | <bounds x="0" y="0" width="1" height="1" /> | |
| 49 | </reel> | |
| 1573 | 50 | </element> |
| 1574 | 51 | |
| 1575 | 52 | <view name="AWP Simulated Video (Lamp Matrix and Reels)"> |
| r15082 | r15083 | |
| 1621 | 98 | <backdrop name="vfd15" element="vfd0" state="0"> |
| 1622 | 99 | <bounds x="145" y="200" width="9" height="17"/> |
| 1623 | 100 | </backdrop> |
| 1624 | <backdrop name="TotalReels" element="TotalReels"/> | |
| 1625 | <backdrop name="ReelSteps2" element="ReelSteps1"/> | |
| 1626 | <backdrop name="ReelSteps3" element="ReelSteps1"/> | |
| 1627 | <backdrop name="ReelSteps1" element="ReelSteps1"/> | |
| 1628 | <backdrop name="ReelSteps4" element="ReelSteps4"/> | |
| 1629 | <backdrop name="ReelSymbols1" element="ReelSymbols1"/> | |
| 1630 | <backdrop name="ReelSymbols2" element="ReelSymbols1"/> | |
| 1631 | <backdrop name="ReelSymbols3" element="ReelSymbols1"/> | |
| 1632 | <backdrop name="ReelSymbols4" element="ReelSymbols4"/> | |
| 1633 | <backdrop name="reel1a1" element="Reel1" state="96"> | |
| 1634 | <bounds x="85" y="463" width="49" height="29.3333"/> | |
| 101 | ||
| 102 | <backdrop name="sreel1" element="SteppersReel1" state="0"> | |
| 103 | <bounds x="85" y="491.3333" width="50" height="90"/> | |
| 1635 | 104 | </backdrop> |
| 1636 | <backdrop name="reel1" element="Reel1" state="96"> | |
| 1637 | <bounds x="85" y="491.3333" width="49" height="29.3333"/> | |
| 105 | <backdrop name="sreel2" element="SteppersReel2" state="0"> | |
| 106 | <bounds x="161" y="491.3333" width="50" height="90"/> | |
| 1638 | 107 | </backdrop> |
| 1639 | <backdrop name="reel1b1" element="Reel1" state="96"> | |
| 1640 | <bounds x="85" y="520.6666" width="49" height="29.3333"/> | |
| 108 | <backdrop name="sreel3" element="SteppersReel3" state="0"> | |
| 109 | <bounds x="236" y="491.3333" width="50" height="90"/> | |
| 1641 | 110 | </backdrop> |
| 1642 | <backdrop name="reel2a1" element="Reel2" state="96"> | |
| 1643 | <bounds x="161" y="463" width="49" height="29.3333"/> | |
| 111 | <backdrop name="sreel4" element="SteppersReel4" state="0"> | |
| 112 | <bounds x="277" y="214" width="40" height="80"/> | |
| 1644 | 113 | </backdrop> |
| 1645 | <backdrop name="reel2" element="Reel2" state="96"> | |
| 1646 | <bounds x="161" y="491.3333" width="49" height="29.3333"/> | |
| 1647 | </backdrop> | |
| 1648 | <backdrop name="reel2b1" element="Reel2" state="96"> | |
| 1649 | <bounds x="161" y="520.6666" width="49" height="29.3333"/> | |
| 1650 | </backdrop> | |
| 1651 | <backdrop name="reel3a1" element="Reel3" state="96"> | |
| 1652 | <bounds x="236" y="463" width="49" height="29.3333"/> | |
| 1653 | </backdrop> | |
| 1654 | <backdrop name="reel3" element="Reel3" state="96"> | |
| 1655 | <bounds x="236" y="491.3333" width="49" height="29.3333"/> | |
| 1656 | </backdrop> | |
| 1657 | <backdrop name="reel3b1" element="Reel3" state="96"> | |
| 1658 | <bounds x="236" y="520.6666" width="49" height="29.3333"/> | |
| 1659 | </backdrop> | |
| 1660 | <backdrop name="reel4" element="Reel4" state="0"> | |
| 1661 | <bounds x="277" y="214" width="39" height="40"/> | |
| 1662 | </backdrop> | |
| 1663 | 114 | <backdrop name="lamp0" element="matrixlamp" state="0"> |
| 1664 | 115 | <bounds x="0" y="0" width="7" height="7"/> |
| 1665 | 116 | </backdrop> |
| r15082 | r15083 | |
|---|---|---|
| 1 | 1 | <?xml version="1.0"?> |
| 2 | 2 | <mamelayout version="2"> |
| 3 | <element name="TotalReels" defstate="4"/> | |
| 4 | <element name="ReelSteps1" defstate="8"/> | |
| 5 | <element name="ReelSymbols1" defstate="3"/> | |
| 6 | <element name="ReelSteps2" defstate="6"/> | |
| 7 | 3 | <element name="digit"> |
| 8 | 4 | <led7seg> |
| 9 | 5 | <color red="1.0" green="0.0" blue="0.0" /> |
| r15082 | r15083 | |
| 257 | 253 | <bounds x="0" y="0.1" width="1" height="1" /> |
| 258 | 254 | </text> |
| 259 | 255 | </element> |
| 260 | <element name="Reel1" defstate="96"> | |
| 261 | <text string="3.00 RPT" state="0"> | |
| 262 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 263 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 264 | </text> | |
| 265 | <text string="3.00 RPT" state="1"> | |
| 266 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 267 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 268 | </text> | |
| 269 | <text string="3.00 RPT" state="2"> | |
| 270 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 271 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 272 | </text> | |
| 273 | <text string="3.00 RPT" state="3"> | |
| 274 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 275 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 276 | </text> | |
| 277 | <text string="3.00 RPT" state="4"> | |
| 278 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 279 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 280 | </text> | |
| 281 | <text string="3.00 RPT" state="5"> | |
| 282 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 283 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 284 | </text> | |
| 285 | <text string="3.00 RPT" state="6"> | |
| 286 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 287 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 288 | </text> | |
| 289 | <text string="3.00 RPT" state="7"> | |
| 290 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 291 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 292 | </text> | |
| 293 | <text string="POT" state="8"> | |
| 294 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 295 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 296 | </text> | |
| 297 | <text string="POT" state="9"> | |
| 298 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 299 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 300 | </text> | |
| 301 | <text string="POT" state="10"> | |
| 302 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 303 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 304 | </text> | |
| 305 | <text string="POT" state="11"> | |
| 306 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 307 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 308 | </text> | |
| 309 | <text string="POT" state="12"> | |
| 310 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 311 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 312 | </text> | |
| 313 | <text string="POT" state="13"> | |
| 314 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 315 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 316 | </text> | |
| 317 | <text string="POT" state="14"> | |
| 318 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 319 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 320 | </text> | |
| 321 | <text string="POT" state="15"> | |
| 322 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 323 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 324 | </text> | |
| 325 | <text string="JACK" state="16"> | |
| 326 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 327 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 328 | </text> | |
| 329 | <text string="JACK" state="17"> | |
| 330 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 331 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 332 | </text> | |
| 333 | <text string="JACK" state="18"> | |
| 334 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 335 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 336 | </text> | |
| 337 | <text string="JACK" state="19"> | |
| 338 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 339 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 340 | </text> | |
| 341 | <text string="JACK" state="20"> | |
| 342 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 343 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 344 | </text> | |
| 345 | <text string="JACK" state="21"> | |
| 346 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 347 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 348 | </text> | |
| 349 | <text string="JACK" state="22"> | |
| 350 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 351 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 352 | </text> | |
| 353 | <text string="JACK" state="23"> | |
| 354 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 355 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 356 | </text> | |
| 357 | <text string="LOSE" state="24"> | |
| 358 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 359 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 360 | </text> | |
| 361 | <text string="LOSE" state="25"> | |
| 362 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 363 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 364 | </text> | |
| 365 | <text string="LOSE" state="26"> | |
| 366 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 367 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 368 | </text> | |
| 369 | <text string="LOSE" state="27"> | |
| 370 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 371 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 372 | </text> | |
| 373 | <text string="LOSE" state="28"> | |
| 374 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 375 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 376 | </text> | |
| 377 | <text string="LOSE" state="29"> | |
| 378 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 379 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 380 | </text> | |
| 381 | <text string="LOSE" state="30"> | |
| 382 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 383 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 384 | </text> | |
| 385 | <text string="LOSE" state="31"> | |
| 386 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 387 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 388 | </text> | |
| 389 | <text string="60p" state="32"> | |
| 390 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 391 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 392 | </text> | |
| 393 | <text string="60p" state="33"> | |
| 394 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 395 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 396 | </text> | |
| 397 | <text string="60p" state="34"> | |
| 398 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 399 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 400 | </text> | |
| 401 | <text string="60p" state="35"> | |
| 402 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 403 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 404 | </text> | |
| 405 | <text string="60p" state="36"> | |
| 406 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 407 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 408 | </text> | |
| 409 | <text string="60p" state="37"> | |
| 410 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 411 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 412 | </text> | |
| 413 | <text string="60p" state="38"> | |
| 414 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 415 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 416 | </text> | |
| 417 | <text string="60p" state="39"> | |
| 418 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 419 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 420 | </text> | |
| 421 | <text string="80p" state="40"> | |
| 422 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 423 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 424 | </text> | |
| 425 | <text string="80p" state="41"> | |
| 426 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 427 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 428 | </text> | |
| 429 | <text string="80p" state="42"> | |
| 430 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 431 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 432 | </text> | |
| 433 | <text string="80p" state="43"> | |
| 434 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 435 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 436 | </text> | |
| 437 | <text string="80p" state="44"> | |
| 438 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 439 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 440 | </text> | |
| 441 | <text string="80p" state="45"> | |
| 442 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 443 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 444 | </text> | |
| 445 | <text string="80p" state="46"> | |
| 446 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 447 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 448 | </text> | |
| 449 | <text string="80p" state="47"> | |
| 450 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 451 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 452 | </text> | |
| 453 | <text string="1.00" state="48"> | |
| 454 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 455 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 456 | </text> | |
| 457 | <text string="1.00" state="49"> | |
| 458 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 459 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 460 | </text> | |
| 461 | <text string="1.00" state="50"> | |
| 462 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 463 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 464 | </text> | |
| 465 | <text string="1.00" state="51"> | |
| 466 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 467 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 468 | </text> | |
| 469 | <text string="1.00" state="52"> | |
| 470 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 471 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 472 | </text> | |
| 473 | <text string="1.00" state="53"> | |
| 474 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 475 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 476 | </text> | |
| 477 | <text string="1.00" state="54"> | |
| 478 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 479 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 480 | </text> | |
| 481 | <text string="1.00" state="55"> | |
| 482 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 483 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 484 | </text> | |
| 485 | <text string="1.20" state="56"> | |
| 486 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 487 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 488 | </text> | |
| 489 | <text string="1.20" state="57"> | |
| 490 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 491 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 492 | </text> | |
| 493 | <text string="1.20" state="58"> | |
| 494 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 495 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 496 | </text> | |
| 497 | <text string="1.20" state="59"> | |
| 498 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 499 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 500 | </text> | |
| 501 | <text string="1.20" state="60"> | |
| 502 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 503 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 504 | </text> | |
| 505 | <text string="1.20" state="61"> | |
| 506 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 507 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 508 | </text> | |
| 509 | <text string="1.20" state="62"> | |
| 510 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 511 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 512 | </text> | |
| 513 | <text string="1.20" state="63"> | |
| 514 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 515 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 516 | </text> | |
| 517 | <text string="1.60" state="64"> | |
| 518 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 519 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 520 | </text> | |
| 521 | <text string="1.60" state="65"> | |
| 522 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 523 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 524 | </text> | |
| 525 | <text string="1.60" state="66"> | |
| 526 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 527 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 528 | </text> | |
| 529 | <text string="1.60" state="67"> | |
| 530 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 531 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 532 | </text> | |
| 533 | <text string="1.60" state="68"> | |
| 534 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 535 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 536 | </text> | |
| 537 | <text string="1.60" state="69"> | |
| 538 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 539 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 540 | </text> | |
| 541 | <text string="1.60" state="70"> | |
| 542 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 543 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 544 | </text> | |
| 545 | <text string="1.60" state="71"> | |
| 546 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 547 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 548 | </text> | |
| 549 | <text string="2.00" state="72"> | |
| 550 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 551 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 552 | </text> | |
| 553 | <text string="2.00" state="73"> | |
| 554 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 555 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 556 | </text> | |
| 557 | <text string="2.00" state="74"> | |
| 558 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 559 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 560 | </text> | |
| 561 | <text string="2.00" state="75"> | |
| 562 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 563 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 564 | </text> | |
| 565 | <text string="2.00" state="76"> | |
| 566 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 567 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 568 | </text> | |
| 569 | <text string="2.00" state="77"> | |
| 570 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 571 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 572 | </text> | |
| 573 | <text string="2.00" state="78"> | |
| 574 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 575 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 576 | </text> | |
| 577 | <text string="2.00" state="79"> | |
| 578 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 579 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 580 | </text> | |
| 581 | <text string="2.20" state="80"> | |
| 582 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 583 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 584 | </text> | |
| 585 | <text string="2.20" state="81"> | |
| 586 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 587 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 588 | </text> | |
| 589 | <text string="2.20" state="82"> | |
| 590 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 591 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 592 | </text> | |
| 593 | <text string="2.20" state="83"> | |
| 594 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 595 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 596 | </text> | |
| 597 | <text string="2.20" state="84"> | |
| 598 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 599 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 600 | </text> | |
| 601 | <text string="2.20" state="85"> | |
| 602 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 603 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 604 | </text> | |
| 605 | <text string="2.20" state="86"> | |
| 606 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 607 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 608 | </text> | |
| 609 | <text string="2.20" state="87"> | |
| 610 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 611 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 612 | </text> | |
| 613 | <text string="2.40" state="88"> | |
| 614 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 615 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 616 | </text> | |
| 617 | <text string="2.40" state="89"> | |
| 618 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 619 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 620 | </text> | |
| 621 | <text string="2.40" state="90"> | |
| 622 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 623 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 624 | </text> | |
| 625 | <text string="2.40" state="91"> | |
| 626 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 627 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 628 | </text> | |
| 629 | <text string="2.40" state="92"> | |
| 630 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 631 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 632 | </text> | |
| 633 | <text string="2.40" state="93"> | |
| 634 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 635 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 636 | </text> | |
| 637 | <text string="2.40" state="94"> | |
| 638 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 639 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 640 | </text> | |
| 641 | <text string="2.40" state="95"> | |
| 642 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 643 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 644 | </text> | |
| 256 | ||
| 257 | <element name="SteppersReel1" defstate="0"> | |
| 258 | <reel stateoffset="0" symbollist="3.00 RPT:300p.png,2.40:240.png,2.20:220.png,2.00:200.png,1.60:160.png,1.20:120.png,1.00:100p.png,80p:80p.png,60p:60p.png,LOSE:lose.png,JACK:jack.png,POT:pot.png" reelreversed="1" numsymbolsvisible="2"> | |
| 259 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 260 | <bounds x="0" y="0" width="1" height="1" /> | |
| 261 | </reel> | |
| 645 | 262 | </element> |
| 646 | 263 | |
| 647 | <element name="Reel2" defstate="96"> | |
| 648 | <text string="7" state="0"> | |
| 649 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 650 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 651 | </text> | |
| 652 | <text string="7" state="1"> | |
| 653 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 654 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 655 | </text> | |
| 656 | <text string="7" state="2"> | |
| 657 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 658 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 659 | </text> | |
| 660 | <text string="7" state="3"> | |
| 661 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 662 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 663 | </text> | |
| 664 | <text string="7" state="4"> | |
| 665 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 666 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 667 | </text> | |
| 668 | <text string="7" state="5"> | |
| 669 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 670 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 671 | </text> | |
| 672 | <text string="Melon" state="6"> | |
| 673 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 674 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 675 | </text> | |
| 676 | <text string="Melon" state="7"> | |
| 677 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 678 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 679 | </text> | |
| 680 | <text string="Melon" state="8"> | |
| 681 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 682 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 683 | </text> | |
| 684 | <text string="Melon" state="9"> | |
| 685 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 686 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 687 | </text> | |
| 688 | <text string="Melon" state="10"> | |
| 689 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 690 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 691 | </text> | |
| 692 | <text string="Melon" state="11"> | |
| 693 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 694 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 695 | </text> | |
| 696 | <text string="Bar" state="12"> | |
| 697 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 698 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 699 | </text> | |
| 700 | <text string="Bar" state="13"> | |
| 701 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 702 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 703 | </text> | |
| 704 | <text string="Bar" state="14"> | |
| 705 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 706 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 707 | </text> | |
| 708 | <text string="Bar" state="15"> | |
| 709 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 710 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 711 | </text> | |
| 712 | <text string="Bar" state="16"> | |
| 713 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 714 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 715 | </text> | |
| 716 | <text string="Bar" state="17"> | |
| 717 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 718 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 719 | </text> | |
| 720 | <text string="Bell" state="18"> | |
| 721 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 722 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 723 | </text> | |
| 724 | <text string="Bell" state="19"> | |
| 725 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 726 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 727 | </text> | |
| 728 | <text string="Bell" state="20"> | |
| 729 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 730 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 731 | </text> | |
| 732 | <text string="Bell" state="21"> | |
| 733 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 734 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 735 | </text> | |
| 736 | <text string="Bell" state="22"> | |
| 737 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 738 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 739 | </text> | |
| 740 | <text string="Bell" state="23"> | |
| 741 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 742 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 743 | </text> | |
| 744 | <text string="Cherry" state="24"> | |
| 745 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 746 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 747 | </text> | |
| 748 | <text string="Cherry" state="25"> | |
| 749 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 750 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 751 | </text> | |
| 752 | <text string="Cherry" state="26"> | |
| 753 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 754 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 755 | </text> | |
| 756 | <text string="Cherry" state="27"> | |
| 757 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 758 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 759 | </text> | |
| 760 | <text string="Cherry" state="28"> | |
| 761 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 762 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 763 | </text> | |
| 764 | <text string="Cherry" state="29"> | |
| 765 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 766 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 767 | </text> | |
| 768 | <text string="Bar" state="30"> | |
| 769 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 770 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 771 | </text> | |
| 772 | <text string="Bar" state="31"> | |
| 773 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 774 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 775 | </text> | |
| 776 | <text string="Bar" state="32"> | |
| 777 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 778 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 779 | </text> | |
| 780 | <text string="Bar" state="33"> | |
| 781 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 782 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 783 | </text> | |
| 784 | <text string="Bar" state="34"> | |
| 785 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 786 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 787 | </text> | |
| 788 | <text string="Bar" state="35"> | |
| 789 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 790 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 791 | </text> | |
| 792 | <text string="7" state="36"> | |
| 793 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 794 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 795 | </text> | |
| 796 | <text string="7" state="37"> | |
| 797 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 798 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 799 | </text> | |
| 800 | <text string="7" state="38"> | |
| 801 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 802 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 803 | </text> | |
| 804 | <text string="7" state="39"> | |
| 805 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 806 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 807 | </text> | |
| 808 | <text string="7" state="40"> | |
| 809 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 810 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 811 | </text> | |
| 812 | <text string="7" state="41"> | |
| 813 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 814 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 815 | </text> | |
| 816 | <text string="Bell" state="42"> | |
| 817 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 818 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 819 | </text> | |
| 820 | <text string="Bell" state="43"> | |
| 821 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 822 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 823 | </text> | |
| 824 | <text string="Bell" state="44"> | |
| 825 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 826 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 827 | </text> | |
| 828 | <text string="Bell" state="45"> | |
| 829 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 830 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 831 | </text> | |
| 832 | <text string="Bell" state="46"> | |
| 833 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 834 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 835 | </text> | |
| 836 | <text string="Bell" state="47"> | |
| 837 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 838 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 839 | </text> | |
| 840 | <text string="Melon" state="48"> | |
| 841 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 842 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 843 | </text> | |
| 844 | <text string="Melon" state="49"> | |
| 845 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 846 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 847 | </text> | |
| 848 | <text string="Melon" state="50"> | |
| 849 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 850 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 851 | </text> | |
| 852 | <text string="Melon" state="51"> | |
| 853 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 854 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 855 | </text> | |
| 856 | <text string="Melon" state="52"> | |
| 857 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 858 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 859 | </text> | |
| 860 | <text string="Melon" state="53"> | |
| 861 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 862 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 863 | </text> | |
| 864 | <text string="Cherry" state="54"> | |
| 865 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 866 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 867 | </text> | |
| 868 | <text string="Cherry" state="55"> | |
| 869 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 870 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 871 | </text> | |
| 872 | <text string="Cherry" state="56"> | |
| 873 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 874 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 875 | </text> | |
| 876 | <text string="Cherry" state="57"> | |
| 877 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 878 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 879 | </text> | |
| 880 | <text string="Cherry" state="58"> | |
| 881 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 882 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 883 | </text> | |
| 884 | <text string="Cherry" state="59"> | |
| 885 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 886 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 887 | </text> | |
| 888 | <text string="Bell" state="60"> | |
| 889 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 890 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 891 | </text> | |
| 892 | <text string="Bell" state="61"> | |
| 893 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 894 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 895 | </text> | |
| 896 | <text string="Bell" state="62"> | |
| 897 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 898 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 899 | </text> | |
| 900 | <text string="Bell" state="63"> | |
| 901 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 902 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 903 | </text> | |
| 904 | <text string="Bell" state="64"> | |
| 905 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 906 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 907 | </text> | |
| 908 | <text string="Bell" state="65"> | |
| 909 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 910 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 911 | </text> | |
| 912 | <text string="Bar" state="66"> | |
| 913 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 914 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 915 | </text> | |
| 916 | <text string="Bar" state="67"> | |
| 917 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 918 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 919 | </text> | |
| 920 | <text string="Bar" state="68"> | |
| 921 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 922 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 923 | </text> | |
| 924 | <text string="Bar" state="69"> | |
| 925 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 926 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 927 | </text> | |
| 928 | <text string="Bar" state="70"> | |
| 929 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 930 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 931 | </text> | |
| 932 | <text string="Bar" state="71"> | |
| 933 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 934 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 935 | </text> | |
| 936 | <text string="7" state="72"> | |
| 937 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 938 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 939 | </text> | |
| 940 | <text string="7" state="73"> | |
| 941 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 942 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 943 | </text> | |
| 944 | <text string="7" state="74"> | |
| 945 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 946 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 947 | </text> | |
| 948 | <text string="7" state="75"> | |
| 949 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 950 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 951 | </text> | |
| 952 | <text string="7" state="76"> | |
| 953 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 954 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 955 | </text> | |
| 956 | <text string="7" state="77"> | |
| 957 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 958 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 959 | </text> | |
| 960 | <text string="Melon" state="78"> | |
| 961 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 962 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 963 | </text> | |
| 964 | <text string="Melon" state="79"> | |
| 965 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 966 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 967 | </text> | |
| 968 | <text string="Melon" state="80"> | |
| 969 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 970 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 971 | </text> | |
| 972 | <text string="Melon" state="81"> | |
| 973 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 974 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 975 | </text> | |
| 976 | <text string="Melon" state="82"> | |
| 977 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 978 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 979 | </text> | |
| 980 | <text string="Melon" state="83"> | |
| 981 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 982 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 983 | </text> | |
| 984 | <text string="Bar" state="84"> | |
| 985 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 986 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 987 | </text> | |
| 988 | <text string="Bar" state="85"> | |
| 989 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 990 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 991 | </text> | |
| 992 | <text string="Bar" state="86"> | |
| 993 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 994 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 995 | </text> | |
| 996 | <text string="Bar" state="87"> | |
| 997 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 998 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 999 | </text> | |
| 1000 | <text string="Bar" state="88"> | |
| 1001 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1002 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1003 | </text> | |
| 1004 | <text string="Bar" state="89"> | |
| 1005 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1006 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1007 | </text> | |
| 1008 | <text string="Cherry" state="90"> | |
| 1009 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1010 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1011 | </text> | |
| 1012 | <text string="Cherry" state="91"> | |
| 1013 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1014 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1015 | </text> | |
| 1016 | <text string="Cherry" state="92"> | |
| 1017 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1018 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1019 | </text> | |
| 1020 | <text string="Cherry" state="93"> | |
| 1021 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1022 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1023 | </text> | |
| 1024 | <text string="Cherry" state="94"> | |
| 1025 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1026 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1027 | </text> | |
| 1028 | <text string="Cherry" state="95"> | |
| 1029 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1030 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1031 | </text> | |
| 264 | <element name="SteppersReel2" defstate="0"> | |
| 265 | <reel stateoffset="0" symbollist="Melon:melon.png,7:7.png,Cherry:cherry.png,Bar:bar.png,Melon:melon.png,7:7.png,Bar:bar.png,Bell:bell.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,7:7.png,Bar:bar.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png" reelreversed="1" numsymbolsvisible="3"> | |
| 266 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 267 | <bounds x="0" y="0" width="1" height="1" /> | |
| 268 | </reel> | |
| 1032 | 269 | </element> |
| 1033 | 270 | |
| 1034 | <element name="Reel3" defstate="96"> | |
| 1035 | <text string="7" state="0"> | |
| 1036 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1037 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1038 | </text> | |
| 1039 | <text string="7" state="1"> | |
| 1040 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1041 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1042 | </text> | |
| 1043 | <text string="7" state="2"> | |
| 1044 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1045 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1046 | </text> | |
| 1047 | <text string="7" state="3"> | |
| 1048 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1049 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1050 | </text> | |
| 1051 | <text string="7" state="4"> | |
| 1052 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1053 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1054 | </text> | |
| 1055 | <text string="7" state="5"> | |
| 1056 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1057 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1058 | </text> | |
| 1059 | <text string="Bell" state="6"> | |
| 1060 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1061 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1062 | </text> | |
| 1063 | <text string="Bell" state="7"> | |
| 1064 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1065 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1066 | </text> | |
| 1067 | <text string="Bell" state="8"> | |
| 1068 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1069 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1070 | </text> | |
| 1071 | <text string="Bell" state="9"> | |
| 1072 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1073 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1074 | </text> | |
| 1075 | <text string="Bell" state="10"> | |
| 1076 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1077 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1078 | </text> | |
| 1079 | <text string="Bell" state="11"> | |
| 1080 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1081 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1082 | </text> | |
| 1083 | <text string="Cherry" state="12"> | |
| 1084 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1085 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1086 | </text> | |
| 1087 | <text string="Cherry" state="13"> | |
| 1088 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1089 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1090 | </text> | |
| 1091 | <text string="Cherry" state="14"> | |
| 1092 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1093 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1094 | </text> | |
| 1095 | <text string="Cherry" state="15"> | |
| 1096 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1097 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1098 | </text> | |
| 1099 | <text string="Cherry" state="16"> | |
| 1100 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1101 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1102 | </text> | |
| 1103 | <text string="Cherry" state="17"> | |
| 1104 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1105 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1106 | </text> | |
| 1107 | <text string="Melon" state="18"> | |
| 1108 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1109 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1110 | </text> | |
| 1111 | <text string="Melon" state="19"> | |
| 1112 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1113 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1114 | </text> | |
| 1115 | <text string="Melon" state="20"> | |
| 1116 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1117 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1118 | </text> | |
| 1119 | <text string="Melon" state="21"> | |
| 1120 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1121 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1122 | </text> | |
| 1123 | <text string="Melon" state="22"> | |
| 1124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1126 | </text> | |
| 1127 | <text string="Melon" state="23"> | |
| 1128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1130 | </text> | |
| 1131 | <text string="Cherry" state="24"> | |
| 1132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1134 | </text> | |
| 1135 | <text string="Cherry" state="25"> | |
| 1136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1138 | </text> | |
| 1139 | <text string="Cherry" state="26"> | |
| 1140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1142 | </text> | |
| 1143 | <text string="Cherry" state="27"> | |
| 1144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1146 | </text> | |
| 1147 | <text string="Cherry" state="28"> | |
| 1148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1150 | </text> | |
| 1151 | <text string="Cherry" state="29"> | |
| 1152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1154 | </text> | |
| 1155 | <text string="Bar" state="30"> | |
| 1156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1158 | </text> | |
| 1159 | <text string="Bar" state="31"> | |
| 1160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1162 | </text> | |
| 1163 | <text string="Bar" state="32"> | |
| 1164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1166 | </text> | |
| 1167 | <text string="Bar" state="33"> | |
| 1168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1170 | </text> | |
| 1171 | <text string="Bar" state="34"> | |
| 1172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1174 | </text> | |
| 1175 | <text string="Bar" state="35"> | |
| 1176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1178 | </text> | |
| 1179 | <text string="Melon" state="36"> | |
| 1180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1182 | </text> | |
| 1183 | <text string="Melon" state="37"> | |
| 1184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1186 | </text> | |
| 1187 | <text string="Melon" state="38"> | |
| 1188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1190 | </text> | |
| 1191 | <text string="Melon" state="39"> | |
| 1192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1194 | </text> | |
| 1195 | <text string="Melon" state="40"> | |
| 1196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1198 | </text> | |
| 1199 | <text string="Melon" state="41"> | |
| 1200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1202 | </text> | |
| 1203 | <text string="7" state="42"> | |
| 1204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1206 | </text> | |
| 1207 | <text string="7" state="43"> | |
| 1208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1210 | </text> | |
| 1211 | <text string="7" state="44"> | |
| 1212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1214 | </text> | |
| 1215 | <text string="7" state="45"> | |
| 1216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1218 | </text> | |
| 1219 | <text string="7" state="46"> | |
| 1220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1222 | </text> | |
| 1223 | <text string="7" state="47"> | |
| 1224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1226 | </text> | |
| 1227 | <text string="Cherry" state="48"> | |
| 1228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1230 | </text> | |
| 1231 | <text string="Cherry" state="49"> | |
| 1232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1234 | </text> | |
| 1235 | <text string="Cherry" state="50"> | |
| 1236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1238 | </text> | |
| 1239 | <text string="Cherry" state="51"> | |
| 1240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1242 | </text> | |
| 1243 | <text string="Cherry" state="52"> | |
| 1244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1246 | </text> | |
| 1247 | <text string="Cherry" state="53"> | |
| 1248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1250 | </text> | |
| 1251 | <text string="Bar" state="54"> | |
| 1252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1254 | </text> | |
| 1255 | <text string="Bar" state="55"> | |
| 1256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1258 | </text> | |
| 1259 | <text string="Bar" state="56"> | |
| 1260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1262 | </text> | |
| 1263 | <text string="Bar" state="57"> | |
| 1264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1266 | </text> | |
| 1267 | <text string="Bar" state="58"> | |
| 1268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1270 | </text> | |
| 1271 | <text string="Bar" state="59"> | |
| 1272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1274 | </text> | |
| 1275 | <text string="Melon" state="60"> | |
| 1276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1278 | </text> | |
| 1279 | <text string="Melon" state="61"> | |
| 1280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1282 | </text> | |
| 1283 | <text string="Melon" state="62"> | |
| 1284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1286 | </text> | |
| 1287 | <text string="Melon" state="63"> | |
| 1288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1290 | </text> | |
| 1291 | <text string="Melon" state="64"> | |
| 1292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1294 | </text> | |
| 1295 | <text string="Melon" state="65"> | |
| 1296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1298 | </text> | |
| 1299 | <text string="Bell" state="66"> | |
| 1300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1302 | </text> | |
| 1303 | <text string="Bell" state="67"> | |
| 1304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1306 | </text> | |
| 1307 | <text string="Bell" state="68"> | |
| 1308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1310 | </text> | |
| 1311 | <text string="Bell" state="69"> | |
| 1312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1314 | </text> | |
| 1315 | <text string="Bell" state="70"> | |
| 1316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1318 | </text> | |
| 1319 | <text string="Bell" state="71"> | |
| 1320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1322 | </text> | |
| 1323 | <text string="Bar" state="72"> | |
| 1324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1326 | </text> | |
| 1327 | <text string="Bar" state="73"> | |
| 1328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1330 | </text> | |
| 1331 | <text string="Bar" state="74"> | |
| 1332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1334 | </text> | |
| 1335 | <text string="Bar" state="75"> | |
| 1336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1338 | </text> | |
| 1339 | <text string="Bar" state="76"> | |
| 1340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1342 | </text> | |
| 1343 | <text string="Bar" state="77"> | |
| 1344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1346 | </text> | |
| 1347 | <text string="Cherry" state="78"> | |
| 1348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1350 | </text> | |
| 1351 | <text string="Cherry" state="79"> | |
| 1352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1354 | </text> | |
| 1355 | <text string="Cherry" state="80"> | |
| 1356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1358 | </text> | |
| 1359 | <text string="Cherry" state="81"> | |
| 1360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1362 | </text> | |
| 1363 | <text string="Cherry" state="82"> | |
| 1364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1366 | </text> | |
| 1367 | <text string="Cherry" state="83"> | |
| 1368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1370 | </text> | |
| 1371 | <text string="Bell" state="84"> | |
| 1372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1374 | </text> | |
| 1375 | <text string="Bell" state="85"> | |
| 1376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1378 | </text> | |
| 1379 | <text string="Bell" state="86"> | |
| 1380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1382 | </text> | |
| 1383 | <text string="Bell" state="87"> | |
| 1384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1386 | </text> | |
| 1387 | <text string="Bell" state="88"> | |
| 1388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1390 | </text> | |
| 1391 | <text string="Bell" state="89"> | |
| 1392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1394 | </text> | |
| 1395 | <text string="Melon" state="90"> | |
| 1396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1398 | </text> | |
| 1399 | <text string="Melon" state="91"> | |
| 1400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1402 | </text> | |
| 1403 | <text string="Melon" state="92"> | |
| 1404 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1405 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1406 | </text> | |
| 1407 | <text string="Melon" state="93"> | |
| 1408 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1409 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1410 | </text> | |
| 1411 | <text string="Melon" state="94"> | |
| 1412 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1413 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1414 | </text> | |
| 1415 | <text string="Melon" state="95"> | |
| 1416 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1417 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1418 | </text> | |
| 271 | <element name="SteppersReel3" defstate="0"> | |
| 272 | <reel stateoffset="0" symbollist="Bell:bell.png,7:7.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,Bell:bell.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,7:7.png,Melon:melon.png,Bar:bar.png,Cherry:cherry.png,Melon:melon.png,Cherry:cherry.png" reelreversed="1" numsymbolsvisible="3"> | |
| 273 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 274 | <bounds x="0" y="0" width="1" height="1" /> | |
| 275 | </reel> | |
| 1419 | 276 | </element> |
| 1420 | 277 | |
| 1421 | <element name="Reel4" defstate="96"> | |
| 1422 | <text string="Bell" state="0"> | |
| 1423 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1424 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1425 | </text> | |
| 1426 | <text string="Bell" state="1"> | |
| 1427 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1428 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1429 | </text> | |
| 1430 | <text string="Bell" state="2"> | |
| 1431 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1432 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1433 | </text> | |
| 1434 | <text string="Bell" state="3"> | |
| 1435 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1436 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1437 | </text> | |
| 1438 | <text string="Bell" state="4"> | |
| 1439 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1440 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1441 | </text> | |
| 1442 | <text string="Bell" state="5"> | |
| 1443 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1444 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1445 | </text> | |
| 1446 | <text string="Melon" state="6"> | |
| 1447 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1448 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1449 | </text> | |
| 1450 | <text string="Melon" state="7"> | |
| 1451 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1452 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1453 | </text> | |
| 1454 | <text string="Melon" state="8"> | |
| 1455 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1456 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1457 | </text> | |
| 1458 | <text string="Melon" state="9"> | |
| 1459 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1460 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1461 | </text> | |
| 1462 | <text string="Melon" state="10"> | |
| 1463 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1464 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1465 | </text> | |
| 1466 | <text string="Melon" state="11"> | |
| 1467 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1468 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1469 | </text> | |
| 1470 | <text string="Bar" state="12"> | |
| 1471 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1472 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1473 | </text> | |
| 1474 | <text string="Bar" state="13"> | |
| 1475 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1476 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1477 | </text> | |
| 1478 | <text string="Bar" state="14"> | |
| 1479 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1480 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1481 | </text> | |
| 1482 | <text string="Bar" state="15"> | |
| 1483 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1484 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1485 | </text> | |
| 1486 | <text string="Bar" state="16"> | |
| 1487 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1488 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1489 | </text> | |
| 1490 | <text string="Bar" state="17"> | |
| 1491 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1492 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1493 | </text> | |
| 1494 | <text string="Bell" state="18"> | |
| 1495 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1496 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1497 | </text> | |
| 1498 | <text string="Bell" state="19"> | |
| 1499 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1500 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1501 | </text> | |
| 1502 | <text string="Bell" state="20"> | |
| 1503 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1504 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1505 | </text> | |
| 1506 | <text string="Bell" state="21"> | |
| 1507 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1508 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1509 | </text> | |
| 1510 | <text string="Bell" state="22"> | |
| 1511 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1512 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1513 | </text> | |
| 1514 | <text string="Bell" state="23"> | |
| 1515 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1516 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1517 | </text> | |
| 1518 | <text string="Cherry" state="24"> | |
| 1519 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1520 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1521 | </text> | |
| 1522 | <text string="Cherry" state="25"> | |
| 1523 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1524 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1525 | </text> | |
| 1526 | <text string="Cherry" state="26"> | |
| 1527 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1528 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1529 | </text> | |
| 1530 | <text string="Cherry" state="27"> | |
| 1531 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1532 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1533 | </text> | |
| 1534 | <text string="Cherry" state="28"> | |
| 1535 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1536 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1537 | </text> | |
| 1538 | <text string="Cherry" state="29"> | |
| 1539 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1540 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1541 | </text> | |
| 1542 | <text string="Melon" state="30"> | |
| 1543 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1544 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1545 | </text> | |
| 1546 | <text string="Melon" state="31"> | |
| 1547 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1548 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1549 | </text> | |
| 1550 | <text string="Melon" state="32"> | |
| 1551 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1552 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1553 | </text> | |
| 1554 | <text string="Melon" state="33"> | |
| 1555 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1556 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1557 | </text> | |
| 1558 | <text string="Melon" state="34"> | |
| 1559 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1560 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1561 | </text> | |
| 1562 | <text string="Melon" state="35"> | |
| 1563 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1564 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1565 | </text> | |
| 1566 | <text string="7" state="36"> | |
| 1567 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1568 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1569 | </text> | |
| 1570 | <text string="7" state="37"> | |
| 1571 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1572 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1573 | </text> | |
| 1574 | <text string="7" state="38"> | |
| 1575 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1576 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1577 | </text> | |
| 1578 | <text string="7" state="39"> | |
| 1579 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1580 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1581 | </text> | |
| 1582 | <text string="7" state="40"> | |
| 1583 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1584 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1585 | </text> | |
| 1586 | <text string="7" state="41"> | |
| 1587 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1588 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1589 | </text> | |
| 1590 | <text string="Bar" state="42"> | |
| 1591 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1592 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1593 | </text> | |
| 1594 | <text string="Bar" state="43"> | |
| 1595 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1596 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1597 | </text> | |
| 1598 | <text string="Bar" state="44"> | |
| 1599 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1600 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1601 | </text> | |
| 1602 | <text string="Bar" state="45"> | |
| 1603 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1604 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1605 | </text> | |
| 1606 | <text string="Bar" state="46"> | |
| 1607 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1608 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1609 | </text> | |
| 1610 | <text string="Bar" state="47"> | |
| 1611 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1612 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1613 | </text> | |
| 1614 | <text string="Cherry" state="48"> | |
| 1615 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1616 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1617 | </text> | |
| 1618 | <text string="Cherry" state="49"> | |
| 1619 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1620 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1621 | </text> | |
| 1622 | <text string="Cherry" state="50"> | |
| 1623 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1624 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1625 | </text> | |
| 1626 | <text string="Cherry" state="51"> | |
| 1627 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1628 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1629 | </text> | |
| 1630 | <text string="Cherry" state="52"> | |
| 1631 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1632 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1633 | </text> | |
| 1634 | <text string="Cherry" state="53"> | |
| 1635 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1636 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1637 | </text> | |
| 1638 | <text string="Bell" state="54"> | |
| 1639 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1640 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1641 | </text> | |
| 1642 | <text string="Bell" state="55"> | |
| 1643 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1644 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1645 | </text> | |
| 1646 | <text string="Bell" state="56"> | |
| 1647 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1648 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1649 | </text> | |
| 1650 | <text string="Bell" state="57"> | |
| 1651 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1652 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1653 | </text> | |
| 1654 | <text string="Bell" state="58"> | |
| 1655 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1656 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1657 | </text> | |
| 1658 | <text string="Bell" state="59"> | |
| 1659 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1660 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1661 | </text> | |
| 1662 | <text string="Melon" state="60"> | |
| 1663 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1664 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1665 | </text> | |
| 1666 | <text string="Melon" state="61"> | |
| 1667 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1668 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1669 | </text> | |
| 1670 | <text string="Melon" state="62"> | |
| 1671 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1672 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1673 | </text> | |
| 1674 | <text string="Melon" state="63"> | |
| 1675 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1676 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1677 | </text> | |
| 1678 | <text string="Melon" state="64"> | |
| 1679 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1680 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1681 | </text> | |
| 1682 | <text string="Melon" state="65"> | |
| 1683 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1684 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1685 | </text> | |
| 1686 | <text string="Cherry" state="66"> | |
| 1687 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1688 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1689 | </text> | |
| 1690 | <text string="Cherry" state="67"> | |
| 1691 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1692 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1693 | </text> | |
| 1694 | <text string="Cherry" state="68"> | |
| 1695 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1696 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1697 | </text> | |
| 1698 | <text string="Cherry" state="69"> | |
| 1699 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1700 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1701 | </text> | |
| 1702 | <text string="Cherry" state="70"> | |
| 1703 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1704 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1705 | </text> | |
| 1706 | <text string="Cherry" state="71"> | |
| 1707 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1708 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1709 | </text> | |
| 1710 | <text string="7" state="72"> | |
| 1711 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1712 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1713 | </text> | |
| 1714 | <text string="7" state="73"> | |
| 1715 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1716 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1717 | </text> | |
| 1718 | <text string="7" state="74"> | |
| 1719 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1720 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1721 | </text> | |
| 1722 | <text string="7" state="75"> | |
| 1723 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1724 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1725 | </text> | |
| 1726 | <text string="7" state="76"> | |
| 1727 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1728 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1729 | </text> | |
| 1730 | <text string="7" state="77"> | |
| 1731 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1732 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1733 | </text> | |
| 1734 | <text string="Bar" state="78"> | |
| 1735 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1736 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1737 | </text> | |
| 1738 | <text string="Bar" state="79"> | |
| 1739 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1740 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1741 | </text> | |
| 1742 | <text string="Bar" state="80"> | |
| 1743 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1744 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1745 | </text> | |
| 1746 | <text string="Bar" state="81"> | |
| 1747 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1748 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1749 | </text> | |
| 1750 | <text string="Bar" state="82"> | |
| 1751 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1752 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1753 | </text> | |
| 1754 | <text string="Bar" state="83"> | |
| 1755 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1756 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1757 | </text> | |
| 1758 | <text string="Bell" state="84"> | |
| 1759 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1760 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1761 | </text> | |
| 1762 | <text string="Bell" state="85"> | |
| 1763 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1764 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1765 | </text> | |
| 1766 | <text string="Bell" state="86"> | |
| 1767 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1768 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1769 | </text> | |
| 1770 | <text string="Bell" state="87"> | |
| 1771 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1772 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1773 | </text> | |
| 1774 | <text string="Bell" state="88"> | |
| 1775 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1776 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1777 | </text> | |
| 1778 | <text string="Bell" state="89"> | |
| 1779 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1780 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1781 | </text> | |
| 1782 | <text string="7" state="90"> | |
| 1783 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1784 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1785 | </text> | |
| 1786 | <text string="7" state="91"> | |
| 1787 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1788 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1789 | </text> | |
| 1790 | <text string="7" state="92"> | |
| 1791 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1792 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1793 | </text> | |
| 1794 | <text string="7" state="93"> | |
| 1795 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1796 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1797 | </text> | |
| 1798 | <text string="7" state="94"> | |
| 1799 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1800 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1801 | </text> | |
| 1802 | <text string="7" state="95"> | |
| 1803 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 1804 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 1805 | </text> | |
| 278 | <element name="SteppersReel4" defstate="0"> | |
| 279 | <reel stateoffset="0" symbollist="Melon:melon.png,Bell:bell.png,7:7.png,Bell:bell.png,Bar:bar.png,7:7.png,Cherry:cherry.png,Melon:melon.png,Bell:bell.png,Cherry:cherry.png,Bar:bar.png,7:7.png,Melon:melon.png,Cherry:cherry.png,Bell:bell.png,Bar:bar.png" reelreversed="1" numsymbolsvisible="3"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0" width="1" height="1" /> | |
| 282 | </reel> | |
| 1806 | 283 | </element> |
| 1807 | 284 | <element name="vfd0"> |
| 1808 | 285 | <led16segsc> |
| r15082 | r15083 | |
| 1811 | 288 | </element> |
| 1812 | 289 | |
| 1813 | 290 | <view name="Gamball AWP Simulated Video (No Artwork)"> |
| 1814 | <backdrop name="TotalReels" element="TotalReels"/> | |
| 1815 | <backdrop name="ReelSteps1" element="ReelSteps1"/> | |
| 1816 | <backdrop name="ReelSteps2" element="ReelSteps2"/> | |
| 1817 | <backdrop name="ReelSteps3" element="ReelSteps2"/> | |
| 1818 | <backdrop name="ReelSteps4" element="ReelSteps2"/> | |
| 1819 | <backdrop name="ReelSymbols1" element="ReelSymbols1"/> | |
| 1820 | <backdrop name="ReelSymbols2" element="ReelSymbols1"/> | |
| 1821 | <backdrop name="ReelSymbols3" element="ReelSymbols1"/> | |
| 1822 | <backdrop name="ReelSymbols4" element="ReelSymbols1"/> | |
| 1823 | 291 | <backdrop name="lamp8" element="reellamp" state="0"> |
| 1824 | 292 | <bounds x="85" y="491.3333" width="49" height="29.3333"/> |
| 1825 | 293 | </backdrop> |
| 1826 | <backdrop name="reel1" element="Reel1" state="96"> | |
| 1827 | <bounds x="85" y="491.3333" width="49" height="29.3333"/> | |
| 1828 | </backdrop> | |
| 1829 | 294 | <backdrop name="lamp16" element="reellamp" state="0"> |
| 1830 | 295 | <bounds x="85" y="520.6666" width="49" height="29.3333"/> |
| 1831 | 296 | </backdrop> |
| 1832 | <backdrop name="reel1b1" element="Reel1" state="96"> | |
| 1833 | <bounds x="85" y="520.6666" width="49" height="29.3333"/> | |
| 297 | ||
| 298 | <backdrop name="sreel1" element="SteppersReel1" state="0"> | |
| 299 | <bounds x="85" y="491.3333" width="50" height="58.6666"/> | |
| 1834 | 300 | </backdrop> |
| 301 | ||
| 1835 | 302 | <backdrop name="lamp26" element="cancol" state="0" inputtag="BLACK2" inputmask="0x04"> |
| 1836 | 303 | <bounds x="10" y="560" width="50" height="30"/> |
| 1837 | 304 | </backdrop> |
| r15082 | r15083 | |
| 1879 | 346 | <backdrop name="lamp1" element="reellamp" state="0"> |
| 1880 | 347 | <bounds x="161" y="463" width="49" height="29.3333"/> |
| 1881 | 348 | </backdrop> |
| 1882 | <backdrop name="reel2a1" element="Reel2" state="96"> | |
| 1883 | <bounds x="161" y="463" width="49" height="29.3333"/> | |
| 1884 | </backdrop> | |
| 1885 | 349 | <backdrop name="lamp9" element="reellamp" state="0"> |
| 1886 | 350 | <bounds x="161" y="491.3333" width="49" height="29.3333"/> |
| 1887 | 351 | </backdrop> |
| 1888 | <backdrop name="reel2" element="Reel2" state="96"> | |
| 1889 | <bounds x="161" y="491.3333" width="49" height="29.3333"/> | |
| 1890 | </backdrop> | |
| 1891 | 352 | <backdrop name="lamp17" element="reellamp" state="0"> |
| 1892 | 353 | <bounds x="161" y="520.6666" width="49" height="29.3333"/> |
| 1893 | 354 | </backdrop> |
| 1894 | <backdrop name="reel2b1" element="Reel2" state="96"> | |
| 1895 | <bounds x="161" y="520.6666" width="49" height="29.3333"/> | |
| 355 | <backdrop name="sreel2" element="SteppersReel2" state="96"> | |
| 356 | <bounds x="161" y="463" width="49" height="87.9999"/> | |
| 1896 | 357 | </backdrop> |
| 1897 | 358 | <backdrop name="lamp2" element="reellamp" state="0"> |
| 1898 | 359 | <bounds x="236" y="463" width="49" height="29.3333"/> |
| 1899 | 360 | </backdrop> |
| 1900 | <backdrop name="reel3a1" element="Reel3" state="96"> | |
| 1901 | <bounds x="236" y="463" width="49" height="29.3333"/> | |
| 1902 | </backdrop> | |
| 1903 | 361 | <backdrop name="lamp10" element="reellamp" state="0"> |
| 1904 | 362 | <bounds x="236" y="491.333" width="49" height="29.3333"/> |
| 1905 | 363 | </backdrop> |
| 1906 | <backdrop name="reel3" element="Reel3" state="96"> | |
| 1907 | <bounds x="236" y="491.3333" width="49" height="29.3333"/> | |
| 1908 | </backdrop> | |
| 1909 | 364 | <backdrop name="lamp18" element="reellamp" state="0"> |
| 1910 | 365 | <bounds x="236" y="520.6666" width="49" height="29.3333"/> |
| 1911 | 366 | </backdrop> |
| 1912 | <backdrop name="reel3b1" element="Reel3" state="96"> | |
| 1913 | <bounds x="236" y="520.6666" width="49" height="29.3333"/> | |
| 367 | <backdrop name="sreel3" element="SteppersReel3" state="96"> | |
| 368 | <bounds x="236" y="463" width="49" height="87.9999"/> | |
| 1914 | 369 | </backdrop> |
| 1915 | 370 | <backdrop name="lamp3" element="reellamp" state="0"> |
| 1916 | 371 | <bounds x="311" y="463" width="49" height="29.3333"/> |
| 1917 | 372 | </backdrop> |
| 1918 | <backdrop name="reel4a1" element="Reel4" state="96"> | |
| 1919 | <bounds x="311" y="463" width="49" height="29.3333"/> | |
| 1920 | </backdrop> | |
| 1921 | 373 | <backdrop name="lamp11" element="reellamp" state="0"> |
| 1922 | 374 | <bounds x="311" y="491.3333" width="49" height="29.3333"/> |
| 1923 | 375 | </backdrop> |
| 1924 | <backdrop name="reel4" element="Reel4" state="96"> | |
| 1925 | <bounds x="311" y="491.3333" width="49" height="29.3333"/> | |
| 1926 | </backdrop> | |
| 1927 | 376 | <backdrop name="lamp19" element="reellamp" state="0"> |
| 1928 | 377 | <bounds x="311" y="520.6666" width="49" height="29.3333"/> |
| 1929 | 378 | </backdrop> |
| 1930 | <backdrop name="reel4b1" element="Reel4" state="96"> | |
| 1931 | <bounds x="311" y="520.6666" width="49" height="29.3333"/> | |
| 379 | <backdrop name="sreel4" element="SteppersReel4" state="96"> | |
| 380 | <bounds x="311" y="463" width="49" height="87.9999"/> | |
| 1932 | 381 | </backdrop> |
| 1933 | ||
| 1934 | 382 | <backdrop name="lamp68" element="1" state="0"> |
| 1935 | 383 | <bounds x="64" y="310" width="30" height="20"/> |
| 1936 | 384 | </backdrop> |
| r15082 | r15083 | |
|---|---|---|
| 20 | 20 | </dotmatrix> |
| 21 | 21 | </element> |
| 22 | 22 | |
| 23 | <element name="Steppers" defstate="96"> | |
| 24 | <text string="00" state="0"> | |
| 25 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 26 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 27 | </text> | |
| 28 | <text string="01" state="1"> | |
| 29 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 30 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 31 | </text> | |
| 32 | <text string="02" state="2"> | |
| 33 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 34 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 35 | </text> | |
| 36 | <text string="03" state="3"> | |
| 37 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 38 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 39 | </text> | |
| 40 | <text string="04" state="4"> | |
| 41 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 42 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 43 | </text> | |
| 44 | <text string="05" state="5"> | |
| 45 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 46 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 47 | </text> | |
| 48 | <text string="06" state="6"> | |
| 49 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 50 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 51 | </text> | |
| 52 | <text string="07" state="7"> | |
| 53 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 54 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 55 | </text> | |
| 56 | <text string="08" state="8"> | |
| 57 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 58 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 59 | </text> | |
| 60 | <text string="09" state="9"> | |
| 61 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 62 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 63 | </text> | |
| 64 | <text string="10" state="10"> | |
| 65 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 66 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 67 | </text> | |
| 68 | <text string="11" state="11"> | |
| 69 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 70 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 71 | </text> | |
| 72 | <text string="12" state="12"> | |
| 73 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 74 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 75 | </text> | |
| 76 | <text string="13" state="13"> | |
| 77 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 78 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 79 | </text> | |
| 80 | <text string="14" state="14"> | |
| 81 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 82 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 83 | </text> | |
| 84 | <text string="15" state="15"> | |
| 85 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 86 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 87 | </text> | |
| 88 | <text string="16" state="16"> | |
| 89 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 90 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 91 | </text> | |
| 92 | <text string="17" state="17"> | |
| 93 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 94 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 95 | </text> | |
| 96 | <text string="18" state="18"> | |
| 97 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 98 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 99 | </text> | |
| 100 | <text string="19" state="19"> | |
| 101 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 102 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 103 | </text> | |
| 104 | <text string="20" state="20"> | |
| 105 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 106 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 107 | </text> | |
| 108 | <text string="21" state="21"> | |
| 109 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 110 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 111 | </text> | |
| 112 | <text string="22" state="22"> | |
| 113 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 114 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 115 | </text> | |
| 116 | <text string="23" state="23"> | |
| 117 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 118 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 119 | </text> | |
| 120 | <text string="24" state="24"> | |
| 121 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 122 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 123 | </text> | |
| 124 | <text string="25" state="25"> | |
| 125 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 126 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 127 | </text> | |
| 128 | ||
| 129 | <text string="26" state="26"> | |
| 130 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 131 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 132 | </text> | |
| 133 | <text string="27" state="27"> | |
| 134 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 135 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 136 | </text> | |
| 137 | <text string="28" state="28"> | |
| 138 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 139 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 140 | </text> | |
| 141 | <text string="29" state="29"> | |
| 142 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 143 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 144 | </text> | |
| 145 | <text string="30" state="30"> | |
| 146 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 147 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 148 | </text> | |
| 149 | <text string="31" state="31"> | |
| 150 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 151 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 152 | </text> | |
| 153 | <text string="32" state="32"> | |
| 154 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 155 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 156 | </text> | |
| 157 | <text string="33" state="33"> | |
| 158 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 159 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 160 | </text> | |
| 161 | <text string="34" state="34"> | |
| 162 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 163 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 164 | </text> | |
| 165 | <text string="35" state="35"> | |
| 166 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 167 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 168 | </text> | |
| 169 | <text string="36" state="36"> | |
| 170 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 171 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 172 | </text> | |
| 173 | <text string="37" state="37"> | |
| 174 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 175 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 176 | </text> | |
| 177 | <text string="38" state="38"> | |
| 178 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 179 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 180 | </text> | |
| 181 | <text string="39" state="39"> | |
| 182 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 183 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 184 | </text> | |
| 185 | <text string="40" state="40"> | |
| 186 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 187 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 188 | </text> | |
| 189 | <text string="41" state="41"> | |
| 190 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 191 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 192 | </text> | |
| 193 | <text string="42" state="42"> | |
| 194 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 195 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 196 | </text> | |
| 197 | <text string="43" state="43"> | |
| 198 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 199 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 200 | </text> | |
| 201 | <text string="44" state="44"> | |
| 202 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 203 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 204 | </text> | |
| 205 | <text string="45" state="45"> | |
| 206 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 207 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 208 | </text> | |
| 209 | <text string="46" state="46"> | |
| 210 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 211 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 212 | </text> | |
| 213 | <text string="47" state="47"> | |
| 214 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 215 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 216 | </text> | |
| 217 | <text string="48" state="48"> | |
| 218 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 219 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 220 | </text> | |
| 221 | <text string="49" state="49"> | |
| 222 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 223 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 224 | </text> | |
| 225 | <text string="50" state="50"> | |
| 226 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 227 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 228 | </text> | |
| 229 | <text string="51" state="51"> | |
| 230 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 231 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 232 | </text> | |
| 233 | <text string="52" state="52"> | |
| 234 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 235 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 236 | </text> | |
| 237 | <text string="53" state="53"> | |
| 238 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 239 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 240 | </text> | |
| 241 | <text string="54" state="54"> | |
| 242 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 243 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 244 | </text> | |
| 245 | <text string="55" state="55"> | |
| 246 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 247 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 248 | </text> | |
| 249 | <text string="56" state="56"> | |
| 250 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 251 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 252 | </text> | |
| 253 | <text string="57" state="57"> | |
| 254 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 255 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 256 | </text> | |
| 257 | <text string="58" state="58"> | |
| 258 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 259 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 260 | </text> | |
| 261 | <text string="59" state="59"> | |
| 262 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 263 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 264 | </text> | |
| 265 | <text string="60" state="60"> | |
| 266 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 267 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 268 | </text> | |
| 269 | <text string="61" state="61"> | |
| 270 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 271 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 272 | </text> | |
| 273 | <text string="62" state="62"> | |
| 274 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 275 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 276 | </text> | |
| 277 | <text string="63" state="63"> | |
| 278 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 279 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 280 | </text> | |
| 281 | <text string="64" state="64"> | |
| 282 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 283 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 284 | </text> | |
| 285 | <text string="65" state="65"> | |
| 286 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 287 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 288 | </text> | |
| 289 | <text string="66" state="66"> | |
| 290 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 291 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 292 | </text> | |
| 293 | <text string="67" state="67"> | |
| 294 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 295 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 296 | </text> | |
| 297 | <text string="68" state="68"> | |
| 298 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 299 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 300 | </text> | |
| 301 | <text string="69" state="69"> | |
| 302 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 303 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 304 | </text> | |
| 305 | <text string="70" state="70"> | |
| 306 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 307 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 308 | </text> | |
| 309 | <text string="71" state="71"> | |
| 310 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 311 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 312 | </text> | |
| 313 | <text string="72" state="72"> | |
| 314 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 315 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 316 | </text> | |
| 317 | <text string="73" state="73"> | |
| 318 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 319 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 320 | </text> | |
| 321 | <text string="74" state="74"> | |
| 322 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 323 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 324 | </text> | |
| 325 | <text string="75" state="75"> | |
| 326 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 327 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 328 | </text> | |
| 329 | <text string="76" state="76"> | |
| 330 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 331 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 332 | </text> | |
| 333 | <text string="77" state="77"> | |
| 334 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 335 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 336 | </text> | |
| 337 | <text string="78" state="78"> | |
| 338 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 339 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 340 | </text> | |
| 341 | <text string="79" state="79"> | |
| 342 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 343 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 344 | </text> | |
| 345 | <text string="80" state="80"> | |
| 346 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 347 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 348 | </text> | |
| 349 | <text string="81" state="81"> | |
| 350 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 351 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 352 | </text> | |
| 353 | <text string="82" state="82"> | |
| 354 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 355 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 356 | </text> | |
| 357 | <text string="83" state="83"> | |
| 358 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 359 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 360 | </text> | |
| 361 | <text string="84" state="84"> | |
| 362 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 363 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 364 | </text> | |
| 365 | <text string="85" state="85"> | |
| 366 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 367 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 368 | </text> | |
| 369 | <text string="86" state="86"> | |
| 370 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 371 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 372 | </text> | |
| 373 | <text string="87" state="87"> | |
| 374 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 375 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 376 | </text> | |
| 377 | <text string="88" state="88"> | |
| 378 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 379 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 380 | </text> | |
| 381 | <text string="89" state="89"> | |
| 382 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 383 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 384 | </text> | |
| 385 | <text string="90" state="90"> | |
| 386 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 387 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 388 | </text> | |
| 389 | <text string="91" state="91"> | |
| 390 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 391 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 392 | </text> | |
| 393 | <text string="92" state="92"> | |
| 394 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 395 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 396 | </text> | |
| 397 | <text string="93" state="93"> | |
| 398 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 399 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 400 | </text> | |
| 401 | <text string="94" state="94"> | |
| 402 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 403 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 404 | </text> | |
| 405 | <text string="95" state="95"> | |
| 406 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 407 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 408 | </text> | |
| 23 | <element name="Steppers" defstate="0"> | |
| 24 | <simplecounter maxstate="999" digits="3"> | |
| 25 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 26 | <bounds x="0" y="0" width="1" height="1" /> | |
| 27 | </simplecounter> | |
| 409 | 28 | </element> |
| 410 | 29 | |
| 30 | ||
| 411 | 31 | <view name="AWP Simulated Video (Reels and Lamp Matrix)"> |
| 412 | 32 | <backdrop name="matrix0" element="matrix" state="0"> |
| 413 | 33 | <bounds x="150" y="60" width="8" height="1"/> |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | <color red="0.0" green="1.0" blue="0.0" /> |
| 20 | 20 | </rect> |
| 21 | 21 | </element> |
| 22 | <element name="Steppers" defstate="96"> | |
| 23 | <text string="00" state="0"> | |
| 24 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 25 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 26 | </text> | |
| 27 | <text string="01" state="1"> | |
| 28 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 29 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 30 | </text> | |
| 31 | <text string="02" state="2"> | |
| 32 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 33 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 34 | </text> | |
| 35 | <text string="03" state="3"> | |
| 36 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 37 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 38 | </text> | |
| 39 | <text string="04" state="4"> | |
| 40 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 41 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 42 | </text> | |
| 43 | <text string="05" state="5"> | |
| 44 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 45 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 46 | </text> | |
| 47 | <text string="06" state="6"> | |
| 48 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 49 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 50 | </text> | |
| 51 | <text string="07" state="7"> | |
| 52 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 53 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 54 | </text> | |
| 55 | <text string="08" state="8"> | |
| 56 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 57 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 58 | </text> | |
| 59 | <text string="09" state="9"> | |
| 60 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 61 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 62 | </text> | |
| 63 | <text string="10" state="10"> | |
| 64 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 65 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 66 | </text> | |
| 67 | <text string="11" state="11"> | |
| 68 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 69 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 70 | </text> | |
| 71 | <text string="12" state="12"> | |
| 72 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 73 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 74 | </text> | |
| 75 | <text string="13" state="13"> | |
| 76 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 77 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 78 | </text> | |
| 79 | <text string="14" state="14"> | |
| 80 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 81 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 82 | </text> | |
| 83 | <text string="15" state="15"> | |
| 84 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 85 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 86 | </text> | |
| 87 | <text string="16" state="16"> | |
| 88 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 89 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 90 | </text> | |
| 91 | <text string="17" state="17"> | |
| 92 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 93 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 94 | </text> | |
| 95 | <text string="18" state="18"> | |
| 96 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 97 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 98 | </text> | |
| 99 | <text string="19" state="19"> | |
| 100 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 101 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 102 | </text> | |
| 103 | <text string="20" state="20"> | |
| 104 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 105 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 106 | </text> | |
| 107 | <text string="21" state="21"> | |
| 108 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 109 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 110 | </text> | |
| 111 | <text string="22" state="22"> | |
| 112 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 113 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 114 | </text> | |
| 115 | <text string="23" state="23"> | |
| 116 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 117 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 118 | </text> | |
| 119 | <text string="24" state="24"> | |
| 120 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 121 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 122 | </text> | |
| 123 | <text string="25" state="25"> | |
| 124 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 125 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 126 | </text> | |
| 127 | <text string="26" state="26"> | |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 129 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 130 | </text> | |
| 131 | <text string="27" state="27"> | |
| 132 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 133 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 134 | </text> | |
| 135 | <text string="28" state="28"> | |
| 136 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 137 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 138 | </text> | |
| 139 | <text string="29" state="29"> | |
| 140 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 141 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 142 | </text> | |
| 143 | <text string="30" state="30"> | |
| 144 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 145 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 146 | </text> | |
| 147 | <text string="31" state="31"> | |
| 148 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 149 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 150 | </text> | |
| 151 | <text string="32" state="32"> | |
| 152 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 153 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 154 | </text> | |
| 155 | <text string="33" state="33"> | |
| 156 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 157 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 158 | </text> | |
| 159 | <text string="34" state="34"> | |
| 160 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 161 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 162 | </text> | |
| 163 | <text string="35" state="35"> | |
| 164 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 165 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 166 | </text> | |
| 167 | <text string="36" state="36"> | |
| 168 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 169 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 170 | </text> | |
| 171 | <text string="37" state="37"> | |
| 172 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 173 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 174 | </text> | |
| 175 | <text string="38" state="38"> | |
| 176 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 177 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 178 | </text> | |
| 179 | <text string="39" state="39"> | |
| 180 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 181 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 182 | </text> | |
| 183 | <text string="40" state="40"> | |
| 184 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 185 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 186 | </text> | |
| 187 | <text string="41" state="41"> | |
| 188 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 189 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 190 | </text> | |
| 191 | <text string="42" state="42"> | |
| 192 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 193 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 194 | </text> | |
| 195 | <text string="43" state="43"> | |
| 196 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 197 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 198 | </text> | |
| 199 | <text string="44" state="44"> | |
| 200 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 201 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 202 | </text> | |
| 203 | <text string="45" state="45"> | |
| 204 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 205 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 206 | </text> | |
| 207 | <text string="46" state="46"> | |
| 208 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 209 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 210 | </text> | |
| 211 | <text string="47" state="47"> | |
| 212 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 213 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 214 | </text> | |
| 215 | <text string="48" state="48"> | |
| 216 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 217 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 218 | </text> | |
| 219 | <text string="49" state="49"> | |
| 220 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 221 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 222 | </text> | |
| 223 | <text string="50" state="50"> | |
| 224 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 225 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 226 | </text> | |
| 227 | <text string="51" state="51"> | |
| 228 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 229 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 230 | </text> | |
| 231 | <text string="52" state="52"> | |
| 232 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 233 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 234 | </text> | |
| 235 | <text string="53" state="53"> | |
| 236 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 237 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 238 | </text> | |
| 239 | <text string="54" state="54"> | |
| 240 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 241 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 242 | </text> | |
| 243 | <text string="55" state="55"> | |
| 244 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 245 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 246 | </text> | |
| 247 | <text string="56" state="56"> | |
| 248 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 249 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 250 | </text> | |
| 251 | <text string="57" state="57"> | |
| 252 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 253 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 254 | </text> | |
| 255 | <text string="58" state="58"> | |
| 256 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 257 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 258 | </text> | |
| 259 | <text string="59" state="59"> | |
| 260 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 261 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 262 | </text> | |
| 263 | <text string="60" state="60"> | |
| 264 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 265 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 266 | </text> | |
| 267 | <text string="61" state="61"> | |
| 268 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 269 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 270 | </text> | |
| 271 | <text string="62" state="62"> | |
| 272 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 273 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 274 | </text> | |
| 275 | <text string="63" state="63"> | |
| 276 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 277 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 278 | </text> | |
| 279 | <text string="64" state="64"> | |
| 280 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 281 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 282 | </text> | |
| 283 | <text string="65" state="65"> | |
| 284 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 285 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 286 | </text> | |
| 287 | <text string="66" state="66"> | |
| 288 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 289 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 290 | </text> | |
| 291 | <text string="67" state="67"> | |
| 292 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 293 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 294 | </text> | |
| 295 | <text string="68" state="68"> | |
| 296 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 297 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 298 | </text> | |
| 299 | <text string="69" state="69"> | |
| 300 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 301 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 302 | </text> | |
| 303 | <text string="70" state="70"> | |
| 304 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 305 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 306 | </text> | |
| 307 | <text string="71" state="71"> | |
| 308 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 309 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 310 | </text> | |
| 311 | <text string="72" state="72"> | |
| 312 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 313 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 314 | </text> | |
| 315 | <text string="73" state="73"> | |
| 316 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 317 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 318 | </text> | |
| 319 | <text string="74" state="74"> | |
| 320 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 321 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 322 | </text> | |
| 323 | <text string="75" state="75"> | |
| 324 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 325 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 326 | </text> | |
| 327 | <text string="76" state="76"> | |
| 328 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 329 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 330 | </text> | |
| 331 | <text string="77" state="77"> | |
| 332 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 333 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 334 | </text> | |
| 335 | <text string="78" state="78"> | |
| 336 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 337 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 338 | </text> | |
| 339 | <text string="79" state="79"> | |
| 340 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 341 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 342 | </text> | |
| 343 | <text string="80" state="80"> | |
| 344 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 345 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 346 | </text> | |
| 347 | <text string="81" state="81"> | |
| 348 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 349 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 350 | </text> | |
| 351 | <text string="82" state="82"> | |
| 352 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 353 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 354 | </text> | |
| 355 | <text string="83" state="83"> | |
| 356 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 357 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 358 | </text> | |
| 359 | <text string="84" state="84"> | |
| 360 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 361 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 362 | </text> | |
| 363 | <text string="85" state="85"> | |
| 364 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 365 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 366 | </text> | |
| 367 | <text string="86" state="86"> | |
| 368 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 369 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 370 | </text> | |
| 371 | <text string="87" state="87"> | |
| 372 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 373 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 374 | </text> | |
| 375 | <text string="88" state="88"> | |
| 376 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 377 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 378 | </text> | |
| 379 | <text string="89" state="89"> | |
| 380 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 381 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 382 | </text> | |
| 383 | <text string="90" state="90"> | |
| 384 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 385 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 386 | </text> | |
| 387 | <text string="91" state="91"> | |
| 388 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 389 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 390 | </text> | |
| 391 | <text string="92" state="92"> | |
| 392 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 393 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 394 | </text> | |
| 395 | <text string="93" state="93"> | |
| 396 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 397 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 398 | </text> | |
| 399 | <text string="94" state="94"> | |
| 400 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 401 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 402 | </text> | |
| 403 | <text string="95" state="95"> | |
| 404 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 405 | <bounds x="0" y="0.1" width="1" height="1" /> | |
| 406 | </text> | |
| 22 | <element name="Steppers" defstate="0"> | |
| 23 | <simplecounter maxstate="999" digits="3"> | |
| 24 | <color red="1.0" green="1.0" blue="1.0" /> | |
| 25 | <bounds x="0" y="0" width="1" height="1" /> | |
| 26 | </simplecounter> | |
| 407 | 27 | </element> |
| 408 | 28 | <element name="vfd0"> |
| 409 | 29 | <led16segsc> |
| r15082 | r15083 | |
|---|---|---|
| 914 | 914 | } |
| 915 | 915 | case 0x22: |
| 916 | 916 | { |
| 917 | val = 0x40 | i | |
| 917 | val = 0x40 | iop | |
| 918 | 918 | break; |
| 919 | 919 | } |
| 920 | 920 | default: |
| r15082 | r15083 | |
| 1433 | 1433 | |
| 1434 | 1434 | /* Clock is low */ |
| 1435 | 1435 | if (!(data & 0x08)) |
| 1436 | m_mux_input = i | |
| 1436 | m_mux_input = iop | |
| 1437 | 1437 | } |
| 1438 | 1438 | break; |
| 1439 | 1439 | } |
| r15082 | r15083 | |
|---|---|---|
| 233 | 233 | |
| 234 | 234 | READ8_MEMBER(nycaptor_state::nycaptor_by_r) |
| 235 | 235 | { |
| 236 | int port = i | |
| 236 | int port = iop | |
| 237 | 237 | |
| 238 | 238 | if (m_gametype == 1) |
| 239 | 239 | port = 255 - port; |
| r15082 | r15083 | |
| 243 | 243 | |
| 244 | 244 | READ8_MEMBER(nycaptor_state::nycaptor_bx_r) |
| 245 | 245 | { |
| 246 | return (i | |
| 246 | return (iop | |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | otherwise music doesn't work. |
| 121 | 121 | */ |
| 122 | 122 | |
| 123 | return (i | |
| 123 | return (iop | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | static WRITE8_DEVICE_HANDLER( eeprom_cs_w ) |
| r15082 | r15083 | |
| 166 | 166 | |
| 167 | 167 | if (m_dial_selected) |
| 168 | 168 | { |
| 169 | int delta = (i | |
| 169 | int delta = (iop | |
| 170 | 170 | |
| 171 | 171 | if (delta & 0x80) |
| 172 | 172 | { |
| r15082 | r15083 | |
| 194 | 194 | } |
| 195 | 195 | else |
| 196 | 196 | { |
| 197 | int res = i | |
| 197 | int res = iop | |
| 198 | 198 | |
| 199 | 199 | if (m_dir[offset]) |
| 200 | 200 | res |= 0x08; |
| r15082 | r15083 | |
| 209 | 209 | if (data == 0x08) |
| 210 | 210 | { |
| 211 | 211 | /* reset the dial counters */ |
| 212 | m_dial[0] = input_port_read(machine(), "DIAL1"); | |
| 213 | m_dial[1] = input_port_read(machine(), "DIAL2"); | |
| 212 | m_dial[0] = ioport("DIAL1")->read(); | |
| 213 | m_dial[1] = ioport("DIAL2")->read(); | |
| 214 | 214 | } |
| 215 | 215 | else if (data == 0x80) |
| 216 | 216 | m_dial_selected = 0; |
| r15082 | r15083 | |
| 231 | 231 | for (i = 0; i < 5; i++) |
| 232 | 232 | { |
| 233 | 233 | if (m_keymatrix & (0x80 >> i)) |
| 234 | return i | |
| 234 | return iop | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | return 0xff; |
| r15082 | r15083 | |
| 251 | 251 | { |
| 252 | 252 | case 0: |
| 253 | 253 | default: |
| 254 | return i | |
| 254 | return iop | |
| 255 | 255 | case 1: /* Mahjong games */ |
| 256 | 256 | if (offset) |
| 257 | 257 | return mahjong_input_r(space, offset - 1); |
| 258 | 258 | else |
| 259 | return i | |
| 259 | return iop | |
| 260 | 260 | break; |
| 261 | 261 | case 2: /* Block Block - dial control */ |
| 262 | 262 | if (offset) |
| 263 | 263 | return block_input_r(space, offset - 1); |
| 264 | 264 | else |
| 265 | return i | |
| 265 | return iop | |
| 266 | 266 | break; |
| 267 | 267 | case 3: /* Super Pang - simulate START 1 press to initialize EEPROM */ |
| 268 | return i | |
| 268 | return iop | |
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |
| r15082 | r15083 | |
| 420 | 420 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 421 | 421 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 422 | 422 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 423 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 423 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 424 | 424 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 425 | 425 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 426 | 426 | |
| r15082 | r15083 | |
| 670 | 670 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 671 | 671 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 672 | 672 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 673 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 673 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 674 | 674 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 675 | 675 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 676 | 676 | |
| r15082 | r15083 | |
| 721 | 721 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 722 | 722 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 723 | 723 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 724 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 724 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 725 | 725 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 726 | 726 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 727 | 727 | |
| r15082 | r15083 | |
| 837 | 837 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 838 | 838 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 839 | 839 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 840 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 840 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 841 | 841 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 842 | 842 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 843 | 843 | |
| r15082 | r15083 | |
| 877 | 877 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 878 | 878 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 879 | 879 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 880 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 880 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 881 | 881 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 882 | 882 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 883 | 883 | |
| r15082 | r15083 | |
| 919 | 919 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 920 | 920 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 921 | 921 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 922 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 922 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 923 | 923 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 924 | 924 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 925 | 925 |
| r15082 | r15083 | |
|---|---|---|
| 139 | 139 | PORT_DIPNAME( 0x0001, 0x0001, "Coin Mode" ) PORT_DIPLOCATION("SW1:1") |
| 140 | 140 | PORT_DIPSETTING( 0x0001, "Mode 1" ) |
| 141 | 141 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| 142 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3") PORT_CONDITION("DSW", 0x0001, | |
| 142 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3") PORT_CONDITION("DSW", 0x0001, | |
| 143 | 143 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 144 | 144 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| 145 | 145 | PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) |
| 146 | 146 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_1C ) ) |
| 147 | PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5") PORT_CONDITION("DSW", 0x0001, | |
| 147 | PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5") PORT_CONDITION("DSW", 0x0001, | |
| 148 | 148 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) ) |
| 149 | 149 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) |
| 150 | 150 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) ) |
| 151 | 151 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 152 | 152 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 153 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5") PORT_CONDITION("DSW", 0x0001, | |
| 153 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5") PORT_CONDITION("DSW", 0x0001, | |
| 154 | 154 | PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) ) |
| 155 | 155 | PORT_DIPSETTING( 0x001a, DEF_STR( 3C_1C ) ) |
| 156 | 156 | PORT_DIPSETTING( 0x001c, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | |
| 60 | 60 | WRITE8_MEMBER(blktiger_state::blktiger_coinlockout_w) |
| 61 | 61 | { |
| 62 | if (i | |
| 62 | if (iop | |
| 63 | 63 | { |
| 64 | 64 | coin_lockout_w(machine(), 0,~data & 0x01); |
| 65 | 65 | coin_lockout_w(machine(), 1,~data & 0x02); |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | static void update_plunger( running_machine &machine ) |
| 92 | 92 | { |
| 93 | 93 | mgolf_state *state = machine.driver_data<mgolf_state>(); |
| 94 | UINT8 val = i | |
| 94 | UINT8 val = state->iop | |
| 95 | 95 | |
| 96 | 96 | if (state->m_prev != val) |
| 97 | 97 | { |
| r15082 | r15083 | |
| 143 | 143 | |
| 144 | 144 | READ8_MEMBER(mgolf_state::mgolf_dial_r) |
| 145 | 145 | { |
| 146 | UINT8 val = i | |
| 146 | UINT8 val = iop | |
| 147 | 147 | |
| 148 | if ((i | |
| 148 | if ((iop | |
| 149 | 149 | { |
| 150 | 150 | val |= 0x01; |
| 151 | 151 | } |
| 152 | if ((i | |
| 152 | if ((iop | |
| 153 | 153 | { |
| 154 | 154 | val |= 0x02; |
| 155 | 155 | } |
| r15082 | r15083 | |
| 162 | 162 | { |
| 163 | 163 | double plunger = calc_plunger_pos(machine()); /* see Video Pinball */ |
| 164 | 164 | |
| 165 | UINT8 val = i | |
| 165 | UINT8 val = iop | |
| 166 | 166 | |
| 167 | 167 | if (plunger >= 0.000 && plunger <= 0.001) |
| 168 | 168 | { |
| r15082 | r15083 | |
| 232 | 232 | PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* DIAL A */ |
| 233 | 233 | PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* DIAL B */ |
| 234 | 234 | PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 235 | PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 235 | PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 236 | 236 | |
| 237 | 237 | PORT_START("60") |
| 238 | 238 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
|---|---|---|
| 110 | 110 | READ32_MEMBER(deco_mlc_state::test2_r) |
| 111 | 111 | { |
| 112 | 112 | // if (offset==0) |
| 113 | // return i | |
| 113 | // return iop | |
| 114 | 114 | // logerror("%08x: Test2_r %d\n",cpu_get_pc(&space.device()),offset); |
| 115 | 115 | return machine().rand(); //0xffffffff; |
| 116 | 116 | } |
| r15082 | r15083 | |
|---|---|---|
| 124 | 124 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 125 | 125 | |
| 126 | 126 | PORT_START("DSW1") // Coins, DSW + Vblank |
| 127 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 127 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 128 | 128 | PORT_DIPNAME( 0x0e, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 129 | 129 | PORT_DIPSETTING( 0x0e, DEF_STR( 5C_1C ) ) |
| 130 | 130 | PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | { |
| 74 | 74 | fgoal_state *state = machine.driver_data<fgoal_state>(); |
| 75 | 75 | int scanline; |
| 76 | int coin = (i | |
| 76 | int coin = (state->iop | |
| 77 | 77 | |
| 78 | 78 | device_set_input_line(state->m_maincpu, 0, ASSERT_LINE); |
| 79 | 79 | |
| r15082 | r15083 | |
| 100 | 100 | |
| 101 | 101 | READ8_MEMBER(fgoal_state::fgoal_analog_r) |
| 102 | 102 | { |
| 103 | return i | |
| 103 | return iop | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | PORT_DIPNAME(0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7") |
| 178 | 178 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 179 | 179 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 180 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 180 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 181 | 181 | INPUT_PORTS_END |
| 182 | 182 | |
| 183 | 183 |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 178 | 178 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 179 | 179 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 180 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 180 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 181 | 181 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 182 | 182 | |
| 183 | 183 | PORT_START("IN1") |
| r15082 | r15083 | |
| 221 | 221 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 222 | 222 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 223 | 223 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 224 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 224 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 225 | 225 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 226 | 226 | |
| 227 | 227 | PORT_START("IN1") |
| r15082 | r15083 | |
| 271 | 271 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 272 | 272 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 273 | 273 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 274 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 274 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 275 | 275 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 276 | 276 | |
| 277 | 277 | PORT_START("IN1") |
| r15082 | r15083 | |
|---|---|---|
| 205 | 205 | { |
| 206 | 206 | state->m_irq_status = 0x01 |0x02; //0xff; |
| 207 | 207 | |
| 208 | state->m_sc1_Inputs[2] = | |
| 208 | state->m_sc1_Inputs[2] = s | |
| 209 | 209 | |
| 210 | 210 | generic_pulse_irq_line(device->machine().device("maincpu"), M6809_IRQ_LINE, 1); |
| 211 | 211 | } |
| r15082 | r15083 | |
| 320 | 320 | |
| 321 | 321 | READ8_MEMBER(bfm_sc1_state::dipcoin_r) |
| 322 | 322 | { |
| 323 | return i | |
| 323 | return iop | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /////////////////////////////////////////////////////////////////////////// |
| r15082 | r15083 | |
| 444 | 444 | |
| 445 | 445 | if ( !(data & 0x08) ) |
| 446 | 446 | { |
| 447 | m_sc1_Inputs[ input_strobe ] = i | |
| 447 | m_sc1_Inputs[ input_strobe ] = iop | |
| 448 | 448 | |
| 449 | 449 | m_mux1_input = m_sc1_Inputs[ input_strobe ]; |
| 450 | 450 | } |
| r15082 | r15083 | |
|---|---|---|
| 418 | 418 | { |
| 419 | 419 | case 0x23: |
| 420 | 420 | case 0x26: |
| 421 | snd = | |
| 421 | snd = sta | |
| 422 | 422 | memcpy(snd+0x20000, snd+0x80000+0x00000, 0x20000); |
| 423 | 423 | state->m_sb3_music_is_playing = 1; |
| 424 | 424 | break; |
| 425 | 425 | |
| 426 | 426 | case 0x24: |
| 427 | snd = | |
| 427 | snd = sta | |
| 428 | 428 | memcpy(snd+0x20000, snd+0x80000+0x20000, 0x20000); |
| 429 | 429 | state->m_sb3_music_is_playing = 1; |
| 430 | 430 | break; |
| r15082 | r15083 | |
| 558 | 558 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 559 | 559 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 560 | 560 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 561 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 562 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 563 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 564 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 561 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 562 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 563 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 564 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 565 | 565 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 566 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 567 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 566 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 567 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 568 | 568 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 569 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 570 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 571 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 572 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 573 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 574 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 575 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 576 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 569 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 570 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 571 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 572 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 573 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 574 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 575 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 576 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 577 | 577 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 578 | 578 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 579 | 579 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r15082 | r15083 | |
| 667 | 667 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 668 | 668 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 669 | 669 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 670 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 670 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* Must be low or game stops! */ | |
| 671 | 671 | |
| 672 | 672 | PORT_START("DSW2") |
| 673 | 673 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) |
| r15082 | r15083 | |
| 743 | 743 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 744 | 744 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 745 | 745 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 746 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 746 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* Must be low or game stops! */ | |
| 747 | 747 | |
| 748 | 748 | PORT_START("DSW2") |
| 749 | 749 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) |
| r15082 | r15083 | |
| 2352 | 2352 | static DRIVER_INIT( cookbib2 ) |
| 2353 | 2353 | { |
| 2354 | 2354 | //snowbros_state *state = machine.driver_data<snowbros_state>(); |
| 2355 | // UINT16 *HCROM = (UINT16*) | |
| 2355 | // UINT16 *HCROM = (UINT16*)sta | |
| 2356 | 2356 | // UINT16 *PROTDATA = (UINT16*)state->memregion("user1")->base(); |
| 2357 | 2357 | // int i; |
| 2358 | 2358 | // state->m_hyperpac_ram[0xf000/2] = 0x46fc; |
| r15082 | r15083 | |
|---|---|---|
| 451 | 451 | int which = (state->m_iochip_regs[0][2] >> 2) & 7; |
| 452 | 452 | |
| 453 | 453 | /* on the write, latch the selected input port and stash the value */ |
| 454 | int value = | |
| 454 | int value = s | |
| 455 | 455 | |
| 456 | 456 | /* reverse some port values */ |
| 457 | 457 | if (state->m_adc_reverse[which]) |
| r15082 | r15083 | |
| 512 | 512 | D6: /INTR of ADC0804 |
| 513 | 513 | D5-D0: CN C pin 24-19 (switch state 0= open, 1= closed) |
| 514 | 514 | */ |
| 515 | return iochip_r(space->machine(), 0, 0, | |
| 515 | return iochip_r(space->machine(), 0, 0, | |
| 516 | 516 | |
| 517 | 517 | case 1: |
| 518 | 518 | /* I/O port: CN C pins 17,15,13,11,9,7,5,3 */ |
| 519 | return iochip_r(space->machine(), 0, 1, | |
| 519 | return iochip_r(space->machine(), 0, 1, | |
| 520 | 520 | |
| 521 | 521 | case 2: |
| 522 | 522 | /* Output port */ |
| r15082 | r15083 | |
| 588 | 588 | { |
| 589 | 589 | case 0: |
| 590 | 590 | /* Input port: switches, CN D pin A1-8 (switch state 1= open, 0= closed) */ |
| 591 | return iochip_r(space->machine(), 1, 0, | |
| 591 | return iochip_r(space->machine(), 1, 0, | |
| 592 | 592 | |
| 593 | 593 | case 1: |
| 594 | 594 | /* Input port: switches, CN D pin A9-16 (switch state 1= open, 0= closed) */ |
| 595 | return iochip_r(space->machine(), 1, 1, | |
| 595 | return iochip_r(space->machine(), 1, 1, | |
| 596 | 596 | |
| 597 | 597 | case 2: |
| 598 | 598 | /* Input port: DIP switches (1= off, 0= on) */ |
| 599 | return iochip_r(space->machine(), 1, 2, | |
| 599 | return iochip_r(space->machine(), 1, 2, | |
| 600 | 600 | |
| 601 | 601 | case 3: |
| 602 | 602 | /* Input port: DIP switches (1= off, 0= on) */ |
| 603 | return iochip_r(space->machine(), 1, 3, | |
| 603 | return iochip_r(space->machine(), 1, 3, | |
| 604 | 604 | |
| 605 | 605 | case 4: |
| 606 | 606 | /* Unused */ |
| r15082 | r15083 | |
|---|---|---|
| 30 | 30 | #include "includes/nbmj9195.h" |
| 31 | 31 | |
| 32 | 32 | |
| 33 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 34 | #if SIGNED_DAC | |
| 35 | #define DAC_WRITE dac_signed_w | |
| 36 | #else | |
| 37 | #define DAC_WRITE dac_w | |
| 38 | #endif | |
| 39 | ||
| 40 | ||
| 41 | 33 | WRITE8_MEMBER(nbmj9195_state::nbmj9195_soundbank_w) |
| 42 | 34 | { |
| 43 | 35 | UINT8 *SNDROM = memregion("audiocpu")->base(); |
| r15082 | r15083 | |
| 80 | 72 | static int nbmj9195_dipsw_r(running_machine &machine) |
| 81 | 73 | { |
| 82 | 74 | nbmj9195_state *state = machine.driver_data<nbmj9195_state>(); |
| 83 | return ((( | |
| 75 | return (((state->iop | |
| 84 | 76 | } |
| 85 | 77 | |
| 86 | 78 | static void nbmj9195_dipswbitsel_w(address_space *space, int data) |
| r15082 | r15083 | |
| 112 | 104 | READ8_MEMBER(nbmj9195_state::mscoutm_dipsw_0_r) |
| 113 | 105 | { |
| 114 | 106 | // DIPSW A |
| 115 | return (((input_port_read(machine(), "DSWA") & 0x01) << 7) | ((input_port_read(machine(), "DSWA") & 0x02) << 5) | | |
| 116 | ((input_port_read(machine(), "DSWA") & 0x04) << 3) | ((input_port_read(machine(), "DSWA") & 0x08) << 1) | | |
| 117 | ((input_port_read(machine(), "DSWA") & 0x10) >> 1) | ((input_port_read(machine(), "DSWA") & 0x20) >> 3) | | |
| 118 | ((input_port_read(machine(), "DSWA") & 0x40) >> 5) | ((input_port_read(machine(), "DSWA") & 0x80) >> 7)); | |
| 107 | return (((ioport("DSWA")->read() & 0x01) << 7) | ((ioport("DSWA")->read() & 0x02) << 5) | | |
| 108 | ((ioport("DSWA")->read() & 0x04) << 3) | ((ioport("DSWA")->read() & 0x08) << 1) | | |
| 109 | ((ioport("DSWA")->read() & 0x10) >> 1) | ((ioport("DSWA")->read() & 0x20) >> 3) | | |
| 110 | ((ioport("DSWA")->read() & 0x40) >> 5) | ((ioport("DSWA")->read() & 0x80) >> 7)); | |
| 119 | 111 | } |
| 120 | 112 | |
| 121 | 113 | READ8_MEMBER(nbmj9195_state::mscoutm_dipsw_1_r) |
| 122 | 114 | { |
| 123 | 115 | // DIPSW B |
| 124 | return (((input_port_read(machine(), "DSWB") & 0x01) << 7) | ((input_port_read(machine(), "DSWB") & 0x02) << 5) | | |
| 125 | ((input_port_read(machine(), "DSWB") & 0x04) << 3) | ((input_port_read(machine(), "DSWB") & 0x08) << 1) | | |
| 126 | ((input_port_read(machine(), "DSWB") & 0x10) >> 1) | ((input_port_read(machine(), "DSWB") & 0x20) >> 3) | | |
| 127 | ((input_port_read(machine(), "DSWB") & 0x40) >> 5) | ((input_port_read(machine(), "DSWB") & 0x80) >> 7)); | |
| 116 | return (((ioport("DSWB")->read() & 0x01) << 7) | ((ioport("DSWB")->read() & 0x02) << 5) | | |
| 117 | ((ioport("DSWB")->read() & 0x04) << 3) | ((ioport("DSWB")->read() & 0x08) << 1) | | |
| 118 | ((ioport("DSWB")->read() & 0x10) >> 1) | ((ioport("DSWB")->read() & 0x20) >> 3) | | |
| 119 | ((ioport("DSWB")->read() & 0x40) >> 5) | ((ioport("DSWB")->read() & 0x80) >> 7)); | |
| 128 | 120 | } |
| 129 | 121 | |
| 130 | 122 | |
| r15082 | r15083 | |
| 144 | 136 | { |
| 145 | 137 | case 0: /* PA_0 */ |
| 146 | 138 | // COIN IN, ETC... |
| 147 | portdata = i | |
| 139 | portdata = iop | |
| 148 | 140 | break; |
| 149 | 141 | case 1: /* PB_0 */ |
| 150 | 142 | // PLAYER1 KEY, DIPSW A/B |
| 151 | 143 | switch (m_mscoutm_inputport) |
| 152 | 144 | { |
| 153 | 145 | case 0x01: |
| 154 | portdata = i | |
| 146 | portdata = iop | |
| 155 | 147 | break; |
| 156 | 148 | case 0x02: |
| 157 | portdata = i | |
| 149 | portdata = iop | |
| 158 | 150 | break; |
| 159 | 151 | case 0x04: |
| 160 | portdata = i | |
| 152 | portdata = iop | |
| 161 | 153 | break; |
| 162 | 154 | case 0x08: |
| 163 | portdata = i | |
| 155 | portdata = iop | |
| 164 | 156 | break; |
| 165 | 157 | case 0x10: |
| 166 | portdata = i | |
| 158 | portdata = iop | |
| 167 | 159 | break; |
| 168 | 160 | default: |
| 169 | portdata = (input_port_read(machine(), "KEY0") & input_port_read(machine(), "KEY1") & input_port_read(machine(), "KEY2") | |
| 170 | & input_port_read(machine(), "KEY3") & input_port_read(machine(), "KEY4")); | |
| 161 | portdata = (ioport("KEY0")->read() & ioport("KEY1")->read() & ioport("KEY2")->read() | |
| 162 | & ioport("KEY3")->read() & ioport("KEY4")->read()); | |
| 171 | 163 | break; |
| 172 | 164 | } |
| 173 | 165 | break; |
| r15082 | r15083 | |
| 176 | 168 | switch (m_mscoutm_inputport) |
| 177 | 169 | { |
| 178 | 170 | case 0x01: |
| 179 | portdata = i | |
| 171 | portdata = iop | |
| 180 | 172 | break; |
| 181 | 173 | case 0x02: |
| 182 | portdata = i | |
| 174 | portdata = iop | |
| 183 | 175 | break; |
| 184 | 176 | case 0x04: |
| 185 | portdata = i | |
| 177 | portdata = iop | |
| 186 | 178 | break; |
| 187 | 179 | case 0x08: |
| 188 | portdata = i | |
| 180 | portdata = iop | |
| 189 | 181 | break; |
| 190 | 182 | case 0x10: |
| 191 | portdata = i | |
| 183 | portdata = iop | |
| 192 | 184 | break; |
| 193 | 185 | default: |
| 194 | portdata = (input_port_read(machine(), "KEY5") & input_port_read(machine(), "KEY6") & input_port_read(machine(), "KEY7") | |
| 195 | & input_port_read(machine(), "KEY8") & input_port_read(machine(), "KEY9")); | |
| 186 | portdata = (ioport("KEY5")->read() & ioport("KEY6")->read() & ioport("KEY7")->read() | |
| 187 | & ioport("KEY8")->read() & ioport("KEY9")->read()); | |
| 196 | 188 | break; |
| 197 | 189 | } |
| 198 | 190 | break; |
| r15082 | r15083 | |
| 231 | 223 | { |
| 232 | 224 | case 0: /* PA_0 */ |
| 233 | 225 | // COIN IN, ETC... |
| 234 | portdata = ((i | |
| 226 | portdata = ((iop | |
| 235 | 227 | break; |
| 236 | 228 | case 1: /* PB_0 */ |
| 237 | 229 | // PLAYER1 KEY, DIPSW A/B |
| 238 | 230 | switch (m_inputport) |
| 239 | 231 | { |
| 240 | 232 | case 0x01: |
| 241 | portdata = i | |
| 233 | portdata = iop | |
| 242 | 234 | break; |
| 243 | 235 | case 0x02: |
| 244 | portdata = i | |
| 236 | portdata = iop | |
| 245 | 237 | break; |
| 246 | 238 | case 0x04: |
| 247 | portdata = i | |
| 239 | portdata = iop | |
| 248 | 240 | break; |
| 249 | 241 | case 0x08: |
| 250 | portdata = i | |
| 242 | portdata = iop | |
| 251 | 243 | break; |
| 252 | 244 | case 0x10: |
| 253 | portdata = ((i | |
| 245 | portdata = ((iop | |
| 254 | 246 | break; |
| 255 | 247 | default: |
| 256 | portdata = (i | |
| 248 | portdata = (iop | |
| 257 | 249 | break; |
| 258 | 250 | } |
| 259 | 251 | break; |
| r15082 | r15083 | |
| 262 | 254 | switch (m_inputport) |
| 263 | 255 | { |
| 264 | 256 | case 0x01: |
| 265 | portdata = i | |
| 257 | portdata = iop | |
| 266 | 258 | break; |
| 267 | 259 | case 0x02: |
| 268 | portdata = i | |
| 260 | portdata = iop | |
| 269 | 261 | break; |
| 270 | 262 | case 0x04: |
| 271 | portdata = i | |
| 263 | portdata = iop | |
| 272 | 264 | break; |
| 273 | 265 | case 0x08: |
| 274 | portdata = i | |
| 266 | portdata = iop | |
| 275 | 267 | break; |
| 276 | 268 | case 0x10: |
| 277 | portdata = i | |
| 269 | portdata = iop | |
| 278 | 270 | break; |
| 279 | 271 | default: |
| 280 | portdata = (i | |
| 272 | portdata = (iop | |
| 281 | 273 | break; |
| 282 | 274 | } |
| 283 | 275 | break; |
| r15082 | r15083 | |
| 341 | 333 | nbmj9195_soundbank_w(space, 0, data); |
| 342 | 334 | break; |
| 343 | 335 | case 6: /* PB_1 */ |
| 344 | | |
| 336 | dac_w | |
| 345 | 337 | break; |
| 346 | 338 | case 7: /* PC_1 */ |
| 347 | | |
| 339 | dac_w | |
| 348 | 340 | break; |
| 349 | 341 | case 8: /* PD_1 */ |
| 350 | 342 | break; |
| r15082 | r15083 | |
| 379 | 371 | nbmj9195_soundbank_w(space, 0, data); |
| 380 | 372 | break; |
| 381 | 373 | case 6: /* PB_1 */ |
| 382 | | |
| 374 | dac_w | |
| 383 | 375 | break; |
| 384 | 376 | case 7: /* PC_1 */ |
| 385 | | |
| 377 | dac_w | |
| 386 | 378 | break; |
| 387 | 379 | case 8: /* PD_1 */ |
| 388 | 380 | break; |
| r15082 | r15083 | |
| 669 | 661 | |
| 670 | 662 | // initialize sound rom bank |
| 671 | 663 | state->nbmj9195_soundbank_w(*space, 0, 0); |
| 664 | logerror("DRIVER_INIT( nbmj9195 )\n"); | |
| 672 | 665 | } |
| 673 | 666 | |
| 674 | 667 | static ADDRESS_MAP_START( tmpz84c011_regs, AS_IO, 8, nbmj9195_state ) |
| r15082 | r15083 | |
| 739 | 732 | AM_RANGE(0xb6, 0xb6) AM_WRITE(nbmj9195_inputportsel_w) |
| 740 | 733 | ADDRESS_MAP_END |
| 741 | 734 | |
| 742 | ||
| 743 | 735 | static ADDRESS_MAP_START( koinomp_io_map, AS_IO, 8, nbmj9195_state ) |
| 744 | 736 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 745 | 737 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 759 | 751 | AM_RANGE(0xcf, 0xcf) AM_WRITENOP |
| 760 | 752 | ADDRESS_MAP_END |
| 761 | 753 | |
| 762 | ||
| 763 | 754 | static ADDRESS_MAP_START( patimono_io_map, AS_IO, 8, nbmj9195_state ) |
| 764 | 755 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 765 | 756 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 846 | 837 | AM_RANGE(0xf0, 0xff) AM_WRITE(nbmj9195_clut_1_w) |
| 847 | 838 | ADDRESS_MAP_END |
| 848 | 839 | |
| 849 | ||
| 850 | 840 | static ADDRESS_MAP_START( mkeibaou_io_map, AS_IO, 8, nbmj9195_state ) |
| 851 | 841 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 852 | 842 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 865 | 855 | AM_RANGE(0xde, 0xde) AM_WRITE(nbmj9195_inputportsel_w) |
| 866 | 856 | ADDRESS_MAP_END |
| 867 | 857 | |
| 868 | ||
| 869 | 858 | static ADDRESS_MAP_START( pachiten_io_map, AS_IO, 8, nbmj9195_state ) |
| 870 | 859 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 871 | 860 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 920 | 909 | AM_RANGE(0xfe, 0xfe) AM_WRITE(nbmj9195_inputportsel_w) |
| 921 | 910 | ADDRESS_MAP_END |
| 922 | 911 | |
| 923 | ||
| 924 | 912 | static ADDRESS_MAP_START( psailor1_io_map, AS_IO, 8, nbmj9195_state ) |
| 925 | 913 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 926 | 914 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 993 | 981 | AM_RANGE(0xd0, 0xdf) AM_WRITE(nbmj9195_clut_1_w) |
| 994 | 982 | ADDRESS_MAP_END |
| 995 | 983 | |
| 984 | static ADDRESS_MAP_START( yosimotm_io_map, AS_IO, 8, nbmj9195_state ) | |
| 985 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 986 | AM_IMPORT_FROM( tmpz84c011_regs ) | |
| 987 | ||
| 988 | AM_RANGE(0x60, 0x61) AM_READ(nbmj9195_blitter_0_r) | |
| 989 | AM_RANGE(0x60, 0x6f) AM_WRITE(nbmj9195_blitter_0_w) | |
| 990 | AM_RANGE(0x70, 0x7f) AM_WRITE(nbmj9195_clut_0_w) | |
| 991 | ||
| 992 | AM_RANGE(0x80, 0x81) AM_READ(nbmj9195_blitter_1_r) | |
| 993 | AM_RANGE(0x80, 0x8f) AM_WRITE(nbmj9195_blitter_1_w) | |
| 994 | AM_RANGE(0x90, 0x9f) AM_WRITE(nbmj9195_clut_1_w) | |
| 995 | ||
| 996 | AM_RANGE(0xf0, 0xf0) AM_WRITE(nbmj9195_inputportsel_w) | |
| 997 | AM_RANGE(0xfc, 0xfc) AM_WRITE(nbmj9195_sound_w) | |
| 998 | AM_RANGE(0xf4, 0xf4) AM_NOP | |
| 999 | AM_RANGE(0xf8, 0xf8) AM_NOP | |
| 1000 | ADDRESS_MAP_END | |
| 1001 | ||
| 996 | 1002 | static ADDRESS_MAP_START( jituroku_io_map, AS_IO, 8, nbmj9195_state ) |
| 997 | 1003 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 998 | 1004 | AM_IMPORT_FROM( tmpz84c011_regs ) |
| r15082 | r15083 | |
| 2415 | 2421 | PORT_DIPNAME( 0x40, 0x00, "Voices" ) |
| 2416 | 2422 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2417 | 2423 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2418 | PORT_DIPNAME( 0x80, 0x | |
| 2424 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) | |
| 2419 | 2425 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2420 | 2426 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2421 | 2427 | |
| r15082 | r15083 | |
| 2457 | 2463 | PORT_INCLUDE( nbmjcontrols ) |
| 2458 | 2464 | INPUT_PORTS_END |
| 2459 | 2465 | |
| 2466 | static INPUT_PORTS_START( yosimotm ) | |
| 2467 | ||
| 2468 | // I don't have manual for this game. | |
| 2469 | ||
| 2470 | PORT_START("DSWA") | |
| 2471 | PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" ) | |
| 2472 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2473 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2474 | PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" ) | |
| 2475 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2476 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2477 | PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" ) | |
| 2478 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2479 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2480 | PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" ) | |
| 2481 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2482 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2483 | PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" ) | |
| 2484 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2485 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2486 | PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" ) | |
| 2487 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2488 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2489 | PORT_DIPNAME( 0x40, 0x40, "Character Display Test" ) | |
| 2490 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2491 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2492 | PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" ) | |
| 2493 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2494 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2495 | ||
| 2496 | PORT_START("DSWB") | |
| 2497 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Flip_Screen ) ) | |
| 2498 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2499 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2500 | PORT_DIPNAME( 0x02, 0x02, "Character Display Test" ) | |
| 2501 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2502 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2503 | PORT_DIPNAME( 0x04, 0x04, "Score Pool" ) | |
| 2504 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2505 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 2506 | PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" ) | |
| 2507 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2508 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2509 | PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" ) | |
| 2510 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2511 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2512 | PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" ) | |
| 2513 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2514 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2515 | PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" ) | |
| 2516 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2517 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2518 | PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" ) | |
| 2519 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2520 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2521 | ||
| 2522 | PORT_START("SYSTEM") | |
| 2523 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // COIN OUT | |
| 2524 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET | |
| 2525 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER | |
| 2526 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR | |
| 2527 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST | |
| 2528 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 | |
| 2529 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 | |
| 2530 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE | |
| 2531 | ||
| 2532 | PORT_INCLUDE( nbmjcontrols ) | |
| 2533 | INPUT_PORTS_END | |
| 2534 | ||
| 2460 | 2535 | static INPUT_PORTS_START( jituroku ) |
| 2461 | 2536 | |
| 2462 | 2537 | // I don't have manual for this game. |
| r15082 | r15083 | |
| 2474 | 2549 | PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" ) |
| 2475 | 2550 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2476 | 2551 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2477 | PORT_DIPNAME( 0x10, 0x | |
| 2552 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Flip_Screen ) ) | |
| 2478 | 2553 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2479 | 2554 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2480 | 2555 | PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" ) |
| r15082 | r15083 | |
| 3102 | 3177 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) |
| 3103 | 3178 | |
| 3104 | 3179 | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 3105 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0. | |
| 3180 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 3106 | 3181 | |
| 3107 | 3182 | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 3108 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 3183 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 3109 | 3184 | MACHINE_CONFIG_END |
| 3110 | 3185 | |
| 3111 | 3186 | |
| r15082 | r15083 | |
| 3281 | 3356 | MACHINE_CONFIG_END |
| 3282 | 3357 | |
| 3283 | 3358 | |
| 3359 | static MACHINE_CONFIG_DERIVED( yosimotm, NBMJDRV1 ) | |
| 3360 | ||
| 3361 | /* basic machine hardware */ | |
| 3362 | MCFG_CPU_MODIFY("maincpu") | |
| 3363 | MCFG_CPU_IO_MAP(yosimotm_io_map) | |
| 3364 | ||
| 3365 | MCFG_NVRAM_ADD_0FILL("nvram") | |
| 3366 | MACHINE_CONFIG_END | |
| 3367 | ||
| 3368 | ||
| 3284 | 3369 | static MACHINE_CONFIG_DERIVED( jituroku, NBMJDRV1 ) |
| 3285 | 3370 | |
| 3286 | 3371 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3706 | 3791 | ROM_LOAD( "8.9h", 0x280000, 0x80000, CRC(dbad97fc) SHA1(ead04086ffec53ede90e3ebcf150018a91bb8457) ) |
| 3707 | 3792 | ROM_END |
| 3708 | 3793 | |
| 3794 | ROM_START( yosimotm ) | |
| 3795 | ROM_REGION( 0x10000, "maincpu", 0 ) /* main program */ | |
| 3796 | ROM_LOAD( "1.7c", 0x00000, 0x10000, CRC(d156b07d) SHA1(8dcf2d8ac60920dc7ea286d4b91399ed2db05a3b) ) | |
| 3797 | ||
| 3798 | ROM_REGION( 0x20000, "audiocpu", 0 ) /* sound program */ | |
| 3799 | ROM_LOAD( "2.12e", 0x00000, 0x20000, CRC(e2d84085) SHA1(890b4d4a02030253837b67e8232293dce30d7ca2) ) | |
| 3800 | ||
| 3801 | ROM_REGION( 0x300000, "gfx1", 0 ) /* gfx */ | |
| 3802 | ROM_LOAD( "3.3h", 0x000000, 0x80000, CRC(f421c6c8) SHA1(f9d68f542cbf379a7c41b47704b19e1aec69f237) ) | |
| 3803 | ROM_LOAD( "4.5h", 0x080000, 0x80000, CRC(a9b17359) SHA1(84cb71ab32e069c8ff8cffff7badb3a823d3abfd) ) | |
| 3804 | ROM_LOAD( "5.5h", 0x100000, 0x80000, CRC(927517b7) SHA1(de4fcc4e87bc1a31834ffb2312b8cee167ec16b5) ) | |
| 3805 | ROM_LOAD( "6.6h", 0x180000, 0x80000, CRC(31b0b9de) SHA1(b68c2028859b6804fe66a500f6afc375c1634bcd) ) | |
| 3806 | ROM_LOAD( "7.7h", 0x200000, 0x80000, CRC(a7249937) SHA1(81d4adfb4bebe1e94fbbe70b7346c97f582f07a8) ) | |
| 3807 | ROM_LOAD( "8.8h", 0x280000, 0x80000, CRC(a3cd2458) SHA1(a82b011a880f0d47362d2e70b9d77db85d83e6ed) ) | |
| 3808 | ROM_END | |
| 3809 | ||
| 3709 | 3810 | ROM_START( ngpgal ) |
| 3710 | 3811 | ROM_REGION( 0x10000, "maincpu", 0 ) /* main program */ |
| 3711 | 3812 | ROM_LOAD( "ngpg_01.bin", 0x00000, 0x10000, CRC(c766378b) SHA1(b221908eb14ebf5c87ae896c3c27d261b26b5146) ) |
| r15082 | r15083 | |
| 3943 | 4044 | GAME( 1993, sailorwa, sailorws, sailorws, sailorws, nbmj9195, ROT0, "Nichibutsu", "Mahjong Sailor Wars (Japan set 2)", 0 ) |
| 3944 | 4045 | GAME( 1993, sailorwr, sailorws, sailorwr, sailorwr, nbmj9195, ROT0, "Nichibutsu", "Mahjong Sailor Wars-R [BET] (Japan)", 0 ) |
| 3945 | 4046 | GAME( 1993, wcatcher, 0, otatidai, wcatcher, nbmj9195, ROT0, "Nichibutsu", "Mahjong Wakuwaku Catcher (Japan)", 0 ) |
| 3946 | GAME( 1993, jituroku, 0, jituroku, jituroku, nbmj9195, ROT180, "Windom", "Jitsuroku Maru-chi Mahjong (Japan)", 0 ) | |
| 3947 | GAME( 1994, yosimoto, 0, yosimoto, yosimoto, nbmj9195, ROT180, "Nichibutsu / Yoshimoto Kougyou", "Mahjong Yoshimoto Gekijou (Japan)", 0 ) | |
| 4047 | GAME( 1993, jituroku, 0, jituroku, jituroku, nbmj9195, ROT0, "Windom", "Jitsuroku Maru-chi Mahjong (Japan)", 0 ) | |
| 4048 | GAME( 1994, yosimoto, 0, yosimoto, yosimoto, nbmj9195, ROT0, "Nichibutsu / Yoshimoto Kougyou", "Mahjong Yoshimoto Gekijou (Japan)", 0 ) | |
| 4049 | GAME( 1994, yosimotm, yosimoto, yosimotm, yosimotm, nbmj9195, ROT0, "Nichibutsu / Yoshimoto Kougyou", "Mahjong Yoshimoto Gekijou [BET] (Japan)", 0 ) | |
| 3948 | 4050 | GAME( 1994, psailor1, 0, psailor1, psailor1, nbmj9195, ROT0, "Sphinx", "Bishoujo Janshi Pretty Sailor 18-kin (Japan)", 0 ) |
| 3949 | 4051 | GAME( 1994, psailor2, 0, psailor2, psailor2, nbmj9195, ROT0, "Sphinx", "Bishoujo Janshi Pretty Sailor 2 (Japan)", 0 ) |
| 3950 | 4052 | GAME( 1995, otatidai, 0, otatidai, otatidai, nbmj9195, ROT0, "Sphinx", "Disco Mahjong Otachidai no Okite (Japan)", 0 ) |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | READ8_MEMBER(copsnrob_state::copsnrob_misc_r) |
| 83 | 83 | { |
| 84 | return i | |
| 84 | return iop | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | WRITE8_MEMBER(copsnrob_state::copsnrob_misc2_w) |
| r15082 | r15083 | |
| 133 | 133 | * |
| 134 | 134 | *************************************/ |
| 135 | 135 | |
| 136 | static const i | |
| 136 | static const io | |
| 137 | 137 | |
| 138 | 138 | static INPUT_PORTS_START( copsnrob ) |
| 139 | 139 | PORT_START("IN0") |
| 140 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_VBLANK | |
| 140 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 141 | 141 | |
| 142 | 142 | PORT_START("IN1") |
| 143 | 143 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| r15082 | r15083 | |
|---|---|---|
| 501 | 501 | READ8_MEMBER(cntsteer_state::cntsteer_adx_r) |
| 502 | 502 | { |
| 503 | 503 | UINT8 res = 0, adx_val; |
| 504 | adx_val = i | |
| 504 | adx_val = iop | |
| 505 | 505 | |
| 506 | 506 | if (adx_val >= 0x70 && adx_val <= 0x90) |
| 507 | 507 | res = 0xff; |
| r15082 | r15083 | |
| 643 | 643 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 644 | 644 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 645 | 645 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 646 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 646 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 647 | 647 | |
| 648 | 648 | PORT_START("P1") |
| 649 | 649 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r15082 | r15083 | |
| 716 | 716 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 717 | 717 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 718 | 718 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 719 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 719 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 720 | 720 | |
| 721 | 721 | PORT_START("DSW0") |
| 722 | 722 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 92 | 92 | { |
| 93 | 93 | switch(m_mux_data) |
| 94 | 94 | { |
| 95 | case 0x01: return input_port_read(machine(), "KEY0"); | |
| 96 | case 0x02: return input_port_read(machine(), "KEY1"); | |
| 97 | case 0x04: return input_port_read(machine(), "KEY2"); | |
| 98 | case 0x08: return input_port_read(machine(), "KEY3"); | |
| 99 | case 0x10: return input_port_read(machine(), "KEY4"); | |
| 95 | case 0x01: return ioport("KEY0")->read(); | |
| 96 | case 0x02: return ioport("KEY1")->read(); | |
| 97 | case 0x04: return ioport("KEY2")->read(); | |
| 98 | case 0x08: return ioport("KEY3")->read(); | |
| 99 | case 0x10: return ioport("KEY4")->read(); | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | return 0xffff; |
| r15082 | r15083 | |
|---|---|---|
| 263 | 263 | { |
| 264 | 264 | nexus3d_state *state = machine.driver_data<nexus3d_state>(); |
| 265 | 265 | // the first part of the flash ROM automatically gets copied to RAM |
| 266 | memcpy( state->m_mainram, | |
| 266 | memcpy( state->m_mainram, sta | |
| 267 | 267 | state->m_flash_region = state->memregion("user1")->base(); |
| 268 | 268 | } |
| 269 | 269 |
| r15082 | r15083 | |
|---|---|---|
| 145 | 145 | case 0x330: return 0; // controls bonuses such as shoot type,bombs etc. |
| 146 | 146 | case 0x1d4: return m_70c_data; //controls restart points |
| 147 | 147 | |
| 148 | case 0x0ac: return (i | |
| 148 | case 0x0ac: return (iop | |
| 149 | 149 | case 0x4b0: return m_608_data;//coinage |
| 150 | 150 | case 0x068: |
| 151 | 151 | { |
| 152 | switch (i | |
| 152 | switch (iop | |
| 153 | 153 | { |
| 154 | 154 | case 0x0000: return 0x000;//0 |
| 155 | 155 | case 0x0100: return 0x060;//3 |
| r15082 | r15083 | |
| 159 | 159 | } |
| 160 | 160 | case 0x094: return m_104_data;// p1 inputs select screen OK |
| 161 | 161 | case 0x24c: return m_008_data;//read DSW (mirror for coinage/territory) |
| 162 | case 0x298: return input_port_read(machine(), "SYSTEM");//vblank | |
| 163 | case 0x476: return input_port_read(machine(), "SYSTEM");//mirror for coins | |
| 164 | case 0x506: return input_port_read(machine(), "DSW"); | |
| 162 | case 0x298: return ioport("SYSTEM")->read();//vblank | |
| 163 | case 0x476: return ioport("SYSTEM")->read();//mirror for coins | |
| 164 | case 0x506: return ioport("DSW")->read(); | |
| 165 | 165 | case 0x5d8: return m_406_data; |
| 166 | case 0x2b4: return input_port_read(machine(), "P1_P2"); | |
| 167 | case 0x1a8: return (input_port_read(machine(), "DSW") & 0x4000) >> 12;//allow continue | |
| 166 | case 0x2b4: return ioport("P1_P2")->read(); | |
| 167 | case 0x1a8: return (ioport("DSW")->read() & 0x4000) >> 12;//allow continue | |
| 168 | 168 | case 0x3ec: return m_70c_data; //score entry |
| 169 | 169 | case 0x246: return m_580_data; // these three controls "perfect bonus" I suppose... |
| 170 | 170 | case 0x52e: return m_580_data; |
| r15082 | r15083 | |
| 424 | 424 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 425 | 425 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 426 | 426 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 427 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 427 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 428 | 428 | |
| 429 | 429 | PORT_START("DSW") |
| 430 | 430 | /* 16bit - These values are for Dip Switch #1 */ |
| r15082 | r15083 | |
|---|---|---|
| 145 | 145 | { |
| 146 | 146 | if (~sel & (1 << i)) |
| 147 | 147 | { |
| 148 | val = i | |
| 148 | val = iop | |
| 149 | 149 | break; |
| 150 | 150 | } |
| 151 | 151 | } |
| r15082 | r15083 | |
|---|---|---|
| 53 | 53 | |
| 54 | 54 | switch(offset) |
| 55 | 55 | { |
| 56 | case 0: retval = input_port_read(machine(), "IN0") & (clear_hack ? 0xf7ff : 0xffff); break; | |
| 57 | case 1: retval = input_port_read(machine(), "IN1") & (clear_hack ? 0xfff7 : 0xffff); break; | |
| 56 | case 0: retval = ioport("IN0")->read() & (clear_hack ? 0xf7ff : 0xffff); break; | |
| 57 | case 1: retval = ioport("IN1")->read() & (clear_hack ? 0xfff7 : 0xffff); break; | |
| 58 | 58 | default: logerror("IO R %x %x = %x @ %x\n", offset, mem_mask, retval, cpu_get_pc(&space.device())); |
| 59 | 59 | } |
| 60 | 60 | return retval; |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | static INTERRUPT_GEN( thief_interrupt ) |
| 37 | 37 | { |
| 38 | 38 | /* SLAM switch causes an NMI if it's pressed */ |
| 39 | if( ( | |
| 39 | if( ( | |
| 40 | 40 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 41 | 41 | else |
| 42 | 42 | device_set_input_line(device, 0, HOLD_LINE); |
| r15082 | r15083 | |
| 141 | 141 | { |
| 142 | 142 | switch( m_input_select ) |
| 143 | 143 | { |
| 144 | case 0x01: return input_port_read(machine(), "DSW1"); | |
| 145 | case 0x02: return input_port_read(machine(), "DSW2"); | |
| 146 | case 0x04: return input_port_read(machine(), "P1"); | |
| 147 | case 0x08: return input_port_read(machine(), "P2"); | |
| 144 | case 0x01: return ioport("DSW1")->read(); | |
| 145 | case 0x02: return ioport("DSW2")->read(); | |
| 146 | case 0x04: return ioport("P1")->read(); | |
| 147 | case 0x08: return ioport("P2")->read(); | |
| 148 | 148 | } |
| 149 | 149 | return 0x00; |
| 150 | 150 | } |
| r15082 | r15083 | |
|---|---|---|
| 471 | 471 | case 0: /* I/O port 0 */ |
| 472 | 472 | case 1: /* I/O port 1 */ |
| 473 | 473 | case 2: /* I/O port 2 */ |
| 474 | r = i | |
| 474 | r = iop | |
| 475 | 475 | break; |
| 476 | 476 | |
| 477 | 477 | case 3: /* I/O port 3 */ |
| r15082 | r15083 | |
| 489 | 489 | break; |
| 490 | 490 | |
| 491 | 491 | case 4: /* I/O port 4 - DIP switches */ |
| 492 | r = i | |
| 492 | r = iop | |
| 493 | 493 | break; |
| 494 | 494 | } |
| 495 | 495 | return r; |
| r15082 | r15083 | |
| 524 | 524 | 0x02 = LAMP1 |
| 525 | 525 | 0x01 = LAMP0 |
| 526 | 526 | */ |
| 527 | i | |
| 527 | iop | |
| 528 | 528 | mame_printf_debug("System register 0 = %02X\n", data); |
| 529 | 529 | break; |
| 530 | 530 | |
| r15082 | r15083 | |
| 1255 | 1255 | { |
| 1256 | 1256 | hornet_state *state = machine.driver_data<hornet_state>(); |
| 1257 | 1257 | init_konami_cgboard(machine, 2, CGBOARD_TYPE_HORNET); |
| 1258 | set_cgboard_texture_bank(machine, 0, "bank5", | |
| 1258 | set_cgboard_texture_bank(machine, 0, "bank5", sta | |
| 1259 | 1259 | set_cgboard_texture_bank(machine, 1, "bank6", state->memregion("user5")->base()); |
| 1260 | 1260 | |
| 1261 | 1261 | state->m_led_reg0 = state->m_led_reg1 = 0x7f; |
| r15082 | r15083 | |
|---|---|---|
| 595 | 595 | state->m_subcpu = machine.device("sub"); |
| 596 | 596 | |
| 597 | 597 | /* initialize main Z80 bank */ |
| 598 | state->membank("bank1")->configure_entries(0, 8, | |
| 598 | state->membank("bank1")->configure_entries(0, 8, sta | |
| 599 | 599 | state->membank("bank1")->set_entry(0); |
| 600 | 600 | |
| 601 | 601 | /* initialize sound bank */ |
| r15082 | r15083 | |
|---|---|---|
| 365 | 365 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 366 | 366 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 367 | 367 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 368 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 368 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 369 | 369 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") |
| 370 | 370 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) |
| 371 | 371 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 420 | 420 | PORT_DIPSETTING( 0x0800, DEF_STR( On ) ) |
| 421 | 421 | PORT_SERVICE_DIPLOC( 0x1000, IP_ACTIVE_LOW, "SW2:5" ) |
| 422 | 422 | PORT_DIPNAME( 0x2000, 0x2000, "Stage Clear Energy" ) PORT_DIPLOCATION("SW2:6") |
| 423 | PORT_DIPSETTING( 0x2000, "0" ) PORT_CONDITION("IN3", 0x0100, PORTCOND_EQUALS, 0x0100) | |
| 424 | PORT_DIPSETTING( 0x0000, "50" ) PORT_CONDITION("IN3", 0x0100, PORTCOND_EQUALS, 0x0100) | |
| 425 | PORT_DIPSETTING( 0x2000, "100" ) PORT_CONDITION("IN3", 0x0100, PORTCOND_EQUALS, 0x0000) | |
| 426 | PORT_DIPSETTING( 0x0000, "150" ) PORT_CONDITION("IN3", 0x0100, PORTCOND_EQUALS, 0x0000) | |
| 423 | PORT_DIPSETTING( 0x2000, "0" ) PORT_CONDITION("IN3", 0x0100, EQUALS, 0x0100) | |
| 424 | PORT_DIPSETTING( 0x0000, "50" ) PORT_CONDITION("IN3", 0x0100, EQUALS, 0x0100) | |
| 425 | PORT_DIPSETTING( 0x2000, "100" ) PORT_CONDITION("IN3", 0x0100, EQUALS, 0x0000) | |
| 426 | PORT_DIPSETTING( 0x0000, "150" ) PORT_CONDITION("IN3", 0x0100, EQUALS, 0x0000) | |
| 427 | 427 | PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 428 | 428 | |
| 429 | 429 | PORT_START("IN3") |
| r15082 | r15083 | |
|---|---|---|
| 191 | 191 | rectangle visarea; |
| 192 | 192 | |
| 193 | 193 | /* initialize globals */ |
| 194 | state->m_syncprom = | |
| 194 | state->m_syncprom = sta | |
| 195 | 195 | |
| 196 | 196 | /* find the start of VBLANK in the SYNC PROM */ |
| 197 | 197 | for (state->m_vblank_start = 0; state->m_vblank_start < 256; state->m_vblank_start++) |
| r15082 | r15083 | |
| 273 | 273 | { |
| 274 | 274 | static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" }; |
| 275 | 275 | |
| 276 | return i | |
| 276 | return iop | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 |
| r15082 | r15083 | |
|---|---|---|
| 560 | 560 | static DRIVER_INIT( discoboy ) |
| 561 | 561 | { |
| 562 | 562 | discoboy_state *state = machine.driver_data<discoboy_state>(); |
| 563 | UINT8 *ROM = | |
| 563 | UINT8 *ROM = sta | |
| 564 | 564 | UINT8 *AUDIO = state->memregion("audiocpu")->base(); |
| 565 | 565 | |
| 566 | 566 | memset(state->m_ram_1, 0, sizeof(state->m_ram_1)); |
| r15082 | r15083 | |
|---|---|---|
| 572 | 572 | |
| 573 | 573 | if (ACCESSING_BITS_8_15) |
| 574 | 574 | { |
| 575 | UINT8 nibble = m_parallel_latched;//(i | |
| 575 | UINT8 nibble = m_parallel_latched;//(iop | |
| 576 | 576 | r |= ((~nibble & 0x08) << 12) | ((nibble & 0x07) << 11); |
| 577 | 577 | logerror("%08X:parallel_port_r()\n", cpu_get_pc(&space.device())); |
| 578 | 578 | #if 0 |
| 579 | 579 | if (m_controls_data == 0x18) |
| 580 | 580 | { |
| 581 | r |= i | |
| 581 | r |= iop | |
| 582 | 582 | } |
| 583 | 583 | else if (m_controls_data == 0x60) |
| 584 | 584 | { |
| 585 | r |= i | |
| 585 | r |= iop | |
| 586 | 586 | } |
| 587 | 587 | else if (m_controls_data == 0xff || m_controls_data == 0x50) |
| 588 | 588 | { |
| 589 | r |= i | |
| 589 | r |= iop | |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | //r |= m_control_read << 8; |
| r15082 | r15083 | |
| 625 | 625 | |
| 626 | 626 | logerror("%08X:", cpu_get_pc(&space.device())); |
| 627 | 627 | |
| 628 | m_parallel_latched = (i | |
| 628 | m_parallel_latched = (iop | |
| 629 | 629 | //parallel_pointer++; |
| 630 | 630 | //logerror("[%02X] Advance pointer to %d\n", data, parallel_pointer); |
| 631 | 631 | switch (data & 0xfc) |
| r15082 | r15083 | |
|---|---|---|
| 187 | 187 | PORT_DIPNAME( 0x40, 0x40, "DIAG TEST" ) /* should be off */ |
| 188 | 188 | PORT_DIPSETTING( 0x40, DEF_STR( Off )) |
| 189 | 189 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 190 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 190 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 191 | 191 | |
| 192 | 192 | PORT_START("BUTTONS") /* 2800 */ |
| 193 | 193 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Game 7 / Strong Gravity") PORT_CODE(KEYCODE_7_PAD) |
| r15082 | r15083 | |
|---|---|---|
| 138 | 138 | static VIDEO_START( skimaxx ) |
| 139 | 139 | { |
| 140 | 140 | skimaxx_state *state = machine.driver_data<skimaxx_state>(); |
| 141 | state->m_blitter_gfx = (UINT16 *) | |
| 141 | state->m_blitter_gfx = (UINT16 *) sta | |
| 142 | 142 | state->m_blitter_gfx_len = state->memregion( "blitter" )->bytes() / 2; |
| 143 | 143 | |
| 144 | 144 | state->m_bg_buffer = auto_alloc_array(machine, UINT32, 0x400 * 0x100 * sizeof(UINT16) / sizeof(UINT32) * 2); // 2 buffers |
| r15082 | r15083 | |
| 150 | 150 | |
| 151 | 151 | static SCREEN_UPDATE_IND16( skimaxx ) |
| 152 | 152 | { |
| 153 | // popmessage("%02x %02x", i | |
| 153 | // popmessage("%02x %02x", state->iop | |
| 154 | 154 | |
| 155 | 155 | SCREEN_UPDATE16_CALL(tms340x0_ind16); |
| 156 | 156 | |
| r15082 | r15083 | |
| 308 | 308 | */ |
| 309 | 309 | READ32_MEMBER(skimaxx_state::skimaxx_analog_r) |
| 310 | 310 | { |
| 311 | return BITSWAP8(i | |
| 311 | return BITSWAP8(iop | |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /************************************* |
| r15082 | r15083 | |
|---|---|---|
| 281 | 281 | md_boot_state *state = space->machine().driver_data<md_boot_state>(); |
| 282 | 282 | if (cpu_get_pc(&space->device())==0x1b2a56) |
| 283 | 283 | { |
| 284 | state->m_aladmdb_mcu_port = | |
| 284 | state->m_aladmdb_mcu_port = s | |
| 285 | 285 | |
| 286 | 286 | if (state->m_aladmdb_mcu_port & 0x100) |
| 287 | 287 | return ((state->m_aladmdb_mcu_port & 0x0f) | 0x100); // coin inserted, calculate the number of coins |
| r15082 | r15083 | |
| 289 | 289 | return (0x100); //MCU status, needed if you fall into a pitfall |
| 290 | 290 | } |
| 291 | 291 | if (cpu_get_pc(&space->device())==0x1b2a72) return 0x0000; |
| 292 | if (cpu_get_pc(&space->device())==0x1b2d24) return ( | |
| 292 | if (cpu_get_pc(&space->device())==0x1b2d24) return ( | |
| 293 | 293 | if (cpu_get_pc(&space->device())==0x1b2d4e) return 0x0000; |
| 294 | 294 | |
| 295 | 295 | logerror("aladbl_r : %06x\n",cpu_get_pc(&space->device())); |
| r15082 | r15083 | |
| 300 | 300 | static READ16_HANDLER( mk3mdb_dsw_r ) |
| 301 | 301 | { |
| 302 | 302 | static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; |
| 303 | return | |
| 303 | return | |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | static READ16_HANDLER( ssf2mdb_dsw_r ) |
| 307 | 307 | { |
| 308 | 308 | static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; |
| 309 | return | |
| 309 | return | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | static READ16_HANDLER( srmdb_dsw_r ) |
| 313 | 313 | { |
| 314 | 314 | static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; |
| 315 | return | |
| 315 | return | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | static READ16_HANDLER( topshoot_200051_r ) |
| r15082 | r15083 | |
|---|---|---|
| 243 | 243 | PORT_START("SYSTEM") |
| 244 | 244 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 245 | 245 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 246 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 246 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 247 | 247 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SPECIAL ) // otherwise it doesn't boot |
| 248 | 248 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 249 | 249 |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | for (t = 0 ; t < 8 ; t ++) |
| 96 | 96 | { |
| 97 | if (!(in | |
| 97 | if (!(machine.root_device().ioport | |
| 98 | 98 | { |
| 99 | 99 | return (i + t) | (p_side ? 0x20 : 0x00); |
| 100 | 100 | } |
| r15082 | r15083 | |
| 113 | 113 | return 0x80; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | if((i | |
| 116 | if((iop | |
| 117 | 117 | { |
| 118 | 118 | m_coin_impulse = m_coin_settings; |
| 119 | 119 | m_coin_impulse--; |
| r15082 | r15083 | |
|---|---|---|
| 591 | 591 | _5clown_state *state = device->machine().driver_data<_5clown_state>(); |
| 592 | 592 | switch( state->m_mux_data & 0xf0 ) /* bits 4-7 */ |
| 593 | 593 | { |
| 594 | case 0x10: return input_port_read(device->machine(), "IN0-0"); | |
| 595 | case 0x20: return input_port_read(device->machine(), "IN0-1"); | |
| 596 | case 0x40: return input_port_read(device->machine(), "IN0-2"); | |
| 597 | case 0x80: return input_port_read(device->machine(), "IN0-3"); | |
| 594 | case 0x10: return state->ioport("IN0-0")->read(); | |
| 595 | case 0x20: return state->ioport("IN0-1")->read(); | |
| 596 | case 0x40: return state->ioport("IN0-2")->read(); | |
| 597 | case 0x80: return state->ioport("IN0-3")->read(); | |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 214 | 214 | |
| 215 | 215 | switch (m_a2d_select) |
| 216 | 216 | { |
| 217 | case 0: ret = input_port_read(machine(), "STICKY"); break; | |
| 218 | case 2: ret = input_port_read(machine(), "STICKX"); break; | |
| 217 | case 0: ret = ioport("STICKY")->read(); break; | |
| 218 | case 2: ret = ioport("STICKX")->read(); break; | |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | return ret; |
| r15082 | r15083 | |
| 321 | 321 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) |
| 322 | 322 | PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 323 | 323 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, NULL) |
| 324 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 324 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 325 | 325 | |
| 326 | 326 | PORT_START("STICKY") /* analog Y */ |
| 327 | 327 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| r15082 | r15083 | |
|---|---|---|
| 220 | 220 | |
| 221 | 221 | switch (m_keyboard_row) |
| 222 | 222 | { |
| 223 | case 0x01: return input_port_read(machine(), "P1_KEY0"); | |
| 224 | case 0x02: return input_port_read(machine(), "P1_KEY1"); | |
| 225 | case 0x04: return input_port_read(machine(), "P1_KEY2"); | |
| 226 | case 0x08: return input_port_read(machine(), "P1_KEY3"); | |
| 227 | case 0x10: return input_port_read(machine(), "P1_KEY4"); | |
| 223 | case 0x01: return ioport("P1_KEY0")->read(); | |
| 224 | case 0x02: return ioport("P1_KEY1")->read(); | |
| 225 | case 0x04: return ioport("P1_KEY2")->read(); | |
| 226 | case 0x08: return ioport("P1_KEY3")->read(); | |
| 227 | case 0x10: return ioport("P1_KEY4")->read(); | |
| 228 | 228 | default: logerror("p1_r with keyboard_row = %02x\n", m_keyboard_row); return 0xffff; |
| 229 | 229 | } |
| 230 | 230 | } |
| r15082 | r15083 | |
| 234 | 234 | |
| 235 | 235 | switch (m_keyboard_row) |
| 236 | 236 | { |
| 237 | case 0x01: return input_port_read(machine(), "P2_KEY0"); | |
| 238 | case 0x02: return input_port_read(machine(), "P2_KEY1"); | |
| 239 | case 0x04: return input_port_read(machine(), "P2_KEY2"); | |
| 240 | case 0x08: return input_port_read(machine(), "P2_KEY3"); | |
| 241 | case 0x10: return input_port_read(machine(), "P2_KEY4"); | |
| 237 | case 0x01: return ioport("P2_KEY0")->read(); | |
| 238 | case 0x02: return ioport("P2_KEY1")->read(); | |
| 239 | case 0x04: return ioport("P2_KEY2")->read(); | |
| 240 | case 0x08: return ioport("P2_KEY3")->read(); | |
| 241 | case 0x10: return ioport("P2_KEY4")->read(); | |
| 242 | 242 | default: logerror("p2_r with keyboard_row = %02x\n", m_keyboard_row); return 0xffff; |
| 243 | 243 | } |
| 244 | 244 | } |
| r15082 | r15083 | |
| 330 | 330 | |
| 331 | 331 | READ16_MEMBER(seta2_state::pzlbowl_coins_r) |
| 332 | 332 | { |
| 333 | return i | |
| 333 | return iop | |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | WRITE16_MEMBER(seta2_state::pzlbowl_coin_counter_w) |
| r15082 | r15083 | |
| 567 | 567 | return machine().rand(); |
| 568 | 568 | |
| 569 | 569 | case CF_PPDAT: |
| 570 | return i | |
| 570 | return iop | |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | return m_coldfire_regs[offset]; |
| r15082 | r15083 | |
| 575 | 575 | |
| 576 | 576 | READ32_MEMBER(seta2_state::funcube_debug_r) |
| 577 | 577 | { |
| 578 | UINT32 ret = i | |
| 578 | UINT32 ret = iop | |
| 579 | 579 | |
| 580 | 580 | // This bits let you move the crosshair in the inputs / touch panel test with a joystick |
| 581 | 581 | if (!(machine().primary_screen->frame_number() % 3)) |
| r15082 | r15083 | |
| 638 | 638 | |
| 639 | 639 | READ8_MEMBER(seta2_state::funcube_coins_r) |
| 640 | 640 | { |
| 641 | UINT8 ret = i | |
| 641 | UINT8 ret = iop | |
| 642 | 642 | UINT8 coin_bit0 = 1; // active low |
| 643 | 643 | UINT8 coin_bit1 = 1; |
| 644 | 644 | |
| r15082 | r15083 | |
| 2153 | 2153 | } |
| 2154 | 2154 | else |
| 2155 | 2155 | { |
| 2156 | UINT8 press = | |
| 2156 | UINT8 press = | |
| 2157 | 2157 | UINT8 release = state->m_funcube_press && !press; |
| 2158 | 2158 | |
| 2159 | 2159 | if ( press || release ) |
| 2160 | 2160 | { |
| 2161 | 2161 | state->m_funcube_serial_fifo[0] = press ? 0xfe : 0xfd; |
| 2162 | state->m_funcube_serial_fifo[1] = input_port_read(device->machine(),"TOUCH_X"); | |
| 2163 | state->m_funcube_serial_fifo[2] = input_port_read(device->machine(),"TOUCH_Y"); | |
| 2162 | state->m_funcube_serial_fifo[1] = device->machine().root_device().ioport("TOUCH_X")->read(); | |
| 2163 | state->m_funcube_serial_fifo[2] = device->machine().root_device().ioport("TOUCH_Y")->read(); | |
| 2164 | 2164 | state->m_funcube_serial_fifo[3] = 0xff; |
| 2165 | 2165 | state->m_funcube_serial_count = 4; |
| 2166 | 2166 | } |
| r15082 | r15083 | |
|---|---|---|
| 47 | 47 | { |
| 48 | 48 | case 0x00: |
| 49 | 49 | if (offset & 0x02) |
| 50 | data = i | |
| 50 | data = iop | |
| 51 | 51 | else |
| 52 | data = i | |
| 52 | data = iop | |
| 53 | 53 | break; |
| 54 | 54 | case 0x01: |
| 55 | 55 | if (offset & 0x02) |
| 56 | data = i | |
| 56 | data = iop | |
| 57 | 57 | break; |
| 58 | 58 | } |
| 59 | 59 |
| r15082 | r15083 | |
|---|---|---|
| 342 | 342 | { |
| 343 | 343 | if( state->m_b_lastclock ) |
| 344 | 344 | { |
| 345 | int bit = ( ( i | |
| 345 | int bit = ( ( state->iop | |
| 346 | 346 | verboselog( machine, 2, "read dip %02x -> %02x\n", n_data, bit * PSX_SIO_IN_DATA ); |
| 347 | 347 | psx_sio_input( machine, 0, PSX_SIO_IN_DATA, bit * PSX_SIO_IN_DATA ); |
| 348 | 348 | state->m_n_dip_bit++; |
| r15082 | r15083 | |
| 2094 | 2094 | |
| 2095 | 2095 | if( state->m_jdredd_gun_mux == 0 ) |
| 2096 | 2096 | { |
| 2097 | x = input_port_read(state->machine(), "GUN1X"); | |
| 2098 | y = input_port_read(state->machine(), "GUN1Y"); | |
| 2097 | x = state->machine().root_device().ioport("GUN1X")->read(); | |
| 2098 | y = state->machine().root_device().ioport("GUN1Y")->read(); | |
| 2099 | 2099 | } |
| 2100 | 2100 | else |
| 2101 | 2101 | { |
| 2102 | x = input_port_read(state->machine(), "GUN2X"); | |
| 2103 | y = input_port_read(state->machine(), "GUN2Y"); | |
| 2102 | x = state->machine().root_device().ioport("GUN2X")->read(); | |
| 2103 | y = state->machine().root_device().ioport("GUN2Y")->read(); | |
| 2104 | 2104 | } |
| 2105 | 2105 | |
| 2106 | 2106 | if( x > 0x393 && x < 0xcb2 && |
| r15082 | r15083 | |
|---|---|---|
| 260 | 260 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 261 | 261 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 262 | 262 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 263 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 263 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 264 | 264 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 265 | 265 | INPUT_PORTS_END |
| 266 | 266 | |
| r15082 | r15083 | |
| 345 | 345 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 346 | 346 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 347 | 347 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 348 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 348 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 349 | 349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 350 | 350 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 351 | 351 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 424 | 424 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 425 | 425 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 426 | 426 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 427 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 427 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 428 | 428 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 429 | 429 | INPUT_PORTS_END |
| 430 | 430 | |
| r15082 | r15083 | |
| 506 | 506 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 507 | 507 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 508 | 508 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 509 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 509 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 510 | 510 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 511 | 511 | INPUT_PORTS_END |
| 512 | 512 | |
| r15082 | r15083 | |
| 588 | 588 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 589 | 589 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 590 | 590 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 591 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 591 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 592 | 592 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 593 | 593 | INPUT_PORTS_END |
| 594 | 594 | |
| r15082 | r15083 | |
| 672 | 672 | static MACHINE_START( paradise ) |
| 673 | 673 | { |
| 674 | 674 | paradise_state *state = machine.driver_data<paradise_state>(); |
| 675 | int bank_n = | |
| 675 | int bank_n = sta | |
| 676 | 676 | UINT8 *ROM = state->memregion("maincpu")->base(); |
| 677 | 677 | |
| 678 | 678 | state->membank("bank1")->configure_entries(0, 3, &ROM[0x00000], 0x4000); |
| r15082 | r15083 | |
|---|---|---|
| 385 | 385 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 386 | 386 | PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 387 | 387 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 388 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 388 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 389 | 389 | |
| 390 | 390 | /* Analog ports */ |
| 391 | 391 | PORT_START("AN0") |
| r15082 | r15083 | |
|---|---|---|
| 529 | 529 | { |
| 530 | 530 | case 0x03: // DSW |
| 531 | 531 | { |
| 532 | state->m_mcu_ram[mcu_offset] = i | |
| 532 | state->m_mcu_ram[mcu_offset] = state->iop | |
| 533 | 533 | logerror("%s : MCU executed command: %04X %04X (read DSW)\n", machine.describe_context(), mcu_command, mcu_offset*2); |
| 534 | 534 | } |
| 535 | 535 | break; |
| r15082 | r15083 | |
|---|---|---|
| 133 | 133 | |
| 134 | 134 | READ16_MEMBER(terracre_state::horekid_IN2_r) |
| 135 | 135 | { |
| 136 | int data = i | |
| 136 | int data = iop | |
| 137 | 137 | |
| 138 | 138 | if (!(data & 0x40)) // FAKE button 3 for "Debug Mode" |
| 139 | 139 | { |
| r15082 | r15083 | |
|---|---|---|
| 44 | 44 | |
| 45 | 45 | *********************************************************** |
| 46 | 46 | |
| 47 | To initialize battery RAM, go into testmode (F1 -> F2), | |
| 48 | and then press the Reset Counters button. | |
| 47 | To initialize battery RAM, go into Meter Read mode (F1 -> 9), | |
| 48 | and then press the Meter Read + Reset buttons (9 + 0). | |
| 49 | 49 | |
| 50 | 50 | If a game is not turned off properly, eg. exiting MAME |
| 51 | 51 | in mid-game, it may run faulty on the next boot. |
| r15082 | r15083 | |
| 83 | 83 | }; |
| 84 | 84 | |
| 85 | 85 | |
| 86 | #define NUM_PENS (8) | |
| 87 | ||
| 88 | ||
| 89 | 86 | /************************************* |
| 90 | 87 | * |
| 91 | 88 | * Video system |
| 92 | 89 | * |
| 93 | 90 | *************************************/ |
| 94 | 91 | |
| 95 | static void get_pens(pen_t *pens) | |
| 96 | { | |
| 97 | offs_t i; | |
| 98 | ||
| 99 | for (i = 0; i < NUM_PENS; i++) | |
| 100 | { | |
| 101 | pens[i] = MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0)); | |
| 102 | } | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | 92 | static SCREEN_UPDATE_RGB32( meyc8080 ) |
| 107 | 93 | { |
| 108 | 94 | meyc8080_state *state = screen.machine().driver_data<meyc8080_state>(); |
| 109 | pen_t pens[NUM_PENS]; | |
| 110 | 95 | offs_t offs; |
| 111 | 96 | |
| 112 | get_pens(pens); | |
| 113 | ||
| 114 | 97 | for (offs = 0; offs < state->m_videoram_0.bytes(); offs++) |
| 115 | 98 | { |
| 116 | 99 | int i; |
| r15082 | r15083 | |
| 130 | 113 | |
| 131 | 114 | for (i = 0; i < 8; i++) |
| 132 | 115 | { |
| 133 | UINT8 color = ((data_r >> 5) & 0x04) | | |
| 134 | ((data_g >> 6) & 0x02) | | |
| 135 | ((data_b >> 7) & 0x01); | |
| 116 | bitmap.pix32(y, x) = MAKE_RGB(pal1bit(data_r >> 7), pal1bit(data_g >> 7), pal1bit(data_b >> 7)); | |
| 136 | 117 | |
| 137 | bitmap.pix32(y, x) = pens[color]; | |
| 138 | ||
| 139 | 118 | data_r = data_r << 1; |
| 140 | 119 | data_g = data_g << 1; |
| 141 | 120 | data_b = data_b << 1; |
| r15082 | r15083 | |
| 344 | 323 | |
| 345 | 324 | static INPUT_PORTS_START( wldarrow ) |
| 346 | 325 | PORT_START("IN0") |
| 347 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 326 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 348 | 327 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 349 | 328 | PORT_DIPNAME( 0x04, 0x00, "Monitor" ) |
| 350 | 329 | PORT_DIPSETTING( 0x00, "Color" ) |
| r15082 | r15083 | |
| 377 | 356 | PORT_DIPNAME( 0x40, 0x00, "Bit Switch 7" ) PORT_DIPLOCATION("BSW:7") |
| 378 | 357 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 379 | 358 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 380 | PORT_DIPNAME( 0x80, 0x00, "Bit Switch 8" ) PORT_DIPLOCATION("BSW:8") | |
| 381 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 382 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 359 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "BSW:8" ) | |
| 383 | 360 | |
| 384 | 361 | PORT_START("IN1") |
| 385 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_C) PORT_NAME("Stop Reel 3") /* Skill Stop only? */ | |
| 386 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_X) PORT_NAME("Stop Reel 2") /* Skill Stop only? */ | |
| 387 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Stop Reel 1") /* Skill Stop only? */ | |
| 388 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_M) PORT_NAME("Start") | |
| 389 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_N) PORT_NAME("Bet") | |
| 390 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset Counters") | |
| 391 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 362 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) | |
| 363 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) | |
| 364 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) | |
| 365 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 366 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) | |
| 367 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Meter Reset") | |
| 368 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Meter Read") | |
| 392 | 369 | PORT_DIPNAME( 0x80, 0x80, "Night Switch" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 393 | 370 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 394 | 371 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 407 | 384 | |
| 408 | 385 | static INPUT_PORTS_START( mdrawpkr ) |
| 409 | 386 | PORT_START("IN0") |
| 410 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 387 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 411 | 388 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 412 | 389 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 413 | 390 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 429 | 406 | PORT_DIPNAME( 0x08, 0x00, "Bit Switch 4" ) PORT_DIPLOCATION("BSW:4") |
| 430 | 407 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 431 | 408 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 432 | PORT_DIPNAME( 0x10, 0x00, "Bit Switch 5" ) PORT_DIPLOCATION("BSW:5") | |
| 409 | PORT_DIPNAME( 0x10, 0x00, "Bit Switch 5" ) PORT_DIPLOCATION("BSW:5") // no coinage sw | |
| 433 | 410 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 434 | 411 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 435 | 412 | PORT_DIPNAME( 0x20, 0x00, "Bit Switch 6" ) PORT_DIPLOCATION("BSW:6") |
| r15082 | r15083 | |
| 438 | 415 | PORT_DIPNAME( 0x40, 0x00, "Bit Switch 7" ) PORT_DIPLOCATION("BSW:7") |
| 439 | 416 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 440 | 417 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 441 | PORT_DIPNAME( 0x80, 0x00, "Bit Switch 8" ) PORT_DIPLOCATION("BSW:8") | |
| 442 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 443 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 418 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "BSW:8" ) | |
| 444 | 419 | |
| 445 | 420 | PORT_START("IN1") |
| 446 | 421 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) |
| r15082 | r15083 | |
| 448 | 423 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) |
| 449 | 424 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) |
| 450 | 425 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 451 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset Counters") | |
| 452 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 426 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Meter Reset") | |
| 427 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Meter Read") | |
| 453 | 428 | PORT_DIPNAME( 0x80, 0x80, "Night Switch" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 454 | 429 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 455 | 430 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 468 | 443 | |
| 469 | 444 | static INPUT_PORTS_START( mdrawpkra ) |
| 470 | 445 | PORT_START("IN0") |
| 471 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 446 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 472 | 447 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 473 | 448 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 474 | 449 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 490 | 465 | PORT_DIPNAME( 0x08, 0x00, "Bit Switch 4" ) PORT_DIPLOCATION("BSW:4") |
| 491 | 466 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 492 | 467 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 493 | PORT_DIPNAME( 0x10, 0x00, "Bit Switch 5" ) PORT_DIPLOCATION("BSW:5") | |
| 494 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 495 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 468 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("BSW:5") | |
| 469 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 470 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) | |
| 496 | 471 | PORT_DIPNAME( 0x20, 0x00, "Bit Switch 6" ) PORT_DIPLOCATION("BSW:6") |
| 497 | 472 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 498 | 473 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 499 | 474 | PORT_DIPNAME( 0x40, 0x00, "Bit Switch 7" ) PORT_DIPLOCATION("BSW:7") |
| 500 | 475 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 501 | 476 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 502 | PORT_DIPNAME( 0x80, 0x00, "Bit Switch 8" ) PORT_DIPLOCATION("BSW:8") | |
| 503 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 504 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 477 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "BSW:8" ) | |
| 505 | 478 | |
| 506 | 479 | PORT_START("IN1") |
| 507 | 480 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) |
| r15082 | r15083 | |
| 509 | 482 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) |
| 510 | 483 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) |
| 511 | 484 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 512 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset Counters") | |
| 513 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 485 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Meter Reset") | |
| 486 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Meter Read") | |
| 514 | 487 | PORT_DIPNAME( 0x80, 0x80, "Night Switch" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 515 | 488 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 516 | 489 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 529 | 502 | |
| 530 | 503 | static INPUT_PORTS_START( casbjack ) |
| 531 | 504 | PORT_START("IN0") |
| 532 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 505 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 533 | 506 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 534 | 507 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 535 | 508 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 551 | 524 | PORT_DIPNAME( 0x08, 0x00, "Bit Switch 4" ) PORT_DIPLOCATION("BSW:4") |
| 552 | 525 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 553 | 526 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 554 | PORT_DIPNAME( 0x10, 0x00, "Bit Switch 5" ) PORT_DIPLOCATION("BSW:5") | |
| 555 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 556 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 527 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("BSW:5") | |
| 528 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 529 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) | |
| 557 | 530 | PORT_DIPNAME( 0x20, 0x00, "Bit Switch 6" ) PORT_DIPLOCATION("BSW:6") |
| 558 | 531 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 559 | 532 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 560 | 533 | PORT_DIPNAME( 0x40, 0x00, "Bit Switch 7" ) PORT_DIPLOCATION("BSW:7") |
| 561 | 534 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 562 | 535 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 563 | PORT_DIPNAME( 0x80, 0x00, "Bit Switch 8" ) PORT_DIPLOCATION("BSW:8") | |
| 564 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 565 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 536 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "BSW:8" ) | |
| 566 | 537 | |
| 567 | 538 | PORT_START("IN1") |
| 568 | 539 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("Split") |
| r15082 | r15083 | |
| 570 | 541 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Bet") |
| 571 | 542 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("Hit") |
| 572 | 543 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 573 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset Counters") | |
| 574 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 544 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Meter Reset") | |
| 545 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Meter Read") | |
| 575 | 546 | PORT_DIPNAME( 0x80, 0x80, "Night Switch" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 576 | 547 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 577 | 548 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 637 | 608 | |
| 638 | 609 | /* |
| 639 | 610 | |
| 640 | Meyco Games, | |
| 611 | Meyco Games, | |
| 641 | 612 | |
| 642 | NOTE TO WHOEVER IS MAME DEVELOPER FOR THIS DRIVER: This is obviously part of a multiple board set. | |
| 643 | The other PCB board(s) were unfound. If/when the game is identified, | |
| 644 | could you please let me know what it is? | |
| 645 | ||
| 646 | 613 | Dumper notes: |
| 647 | 614 | |
| 648 | 615 | - Board is approximately 16.5"x14.25", with no daughterboards or satellite add-on boards. |
| r15082 | r15083 | |
| 675 | 642 | |------------------------------------------------------------------------------| |
| 676 | 643 | |
| 677 | 644 | * = 8 pin connector |
| 678 | & = 50 pin connector ( | |
| 645 | & = 50 pin connector ( | |
| 679 | 646 | |
| 680 | 647 | */ |
| 681 | 648 | |
| r15082 | r15083 | |
| 689 | 656 | ROM_LOAD( "tms2516.k3", 0x2800, 0x0800, CRC(30904dc8) SHA1(c82276aa0eb8f48d136ad8c15dd309c9b880c294) ) |
| 690 | 657 | ROM_END |
| 691 | 658 | |
| 659 | ||
| 692 | 660 | /* |
| 693 | 661 | |
| 694 | 662 | Board silkscreened: |
| r15082 | r15083 | |
| 750 | 718 | * |
| 751 | 719 | *************************************/ |
| 752 | 720 | |
| 753 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 754 | GAMEL( 1982, wldarrow, 0, meyc8080, wldarrow, 0, ROT0, "Meyco Games, Inc.", "Wild Arrow (color, Standard V4.8)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_wldarrow ) // B&W version not dumped yet | |
| 755 | GAMEL( 1984, mdrawpkr, 0, meyc8080, mdrawpkr, 0, ROT0, "Meyco Games, Inc.", "Draw Poker - Joker's Wild (Standard)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_mdrawpkr ) // year not shown, but it is in mdrawpkra | |
| 756 | GAMEL( 1984, mdrawpkra, mdrawpkr, meyc8080, mdrawpkra, 0, ROT0, "Meyco Games, Inc.", "Draw Poker - Joker's Wild (02-11)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_mdrawpkr ) | |
| 757 | GAMEL( 1983, casbjack, 0, meyc8080, casbjack, 0, ROT0, "Meyco Games, Inc.", "Casino Black Jack (color, Standard 00-05)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_meybjack ) // B&W version not dumped yet | |
| 721 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ | |
| 722 | GAMEL(1982, wldarrow, 0, meyc8080, wldarrow, 0, ROT0, "Meyco Games, Inc.", "Wild Arrow (color, Standard V4.8)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_wldarrow ) // B&W version not dumped yet | |
| 723 | GAMEL(1984, mdrawpkr, 0, meyc8080, mdrawpkr, 0, ROT0, "Meyco Games, Inc.", "Draw Poker - Joker's Wild (Standard)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_mdrawpkr ) // year not shown, but it is in mdrawpkra | |
| 724 | GAMEL(1984, mdrawpkra, mdrawpkr, meyc8080, mdrawpkra, 0, ROT0, "Meyco Games, Inc.", "Draw Poker - Joker's Wild (02-11)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_mdrawpkr ) | |
| 725 | GAMEL(1983, casbjack, 0, meyc8080, casbjack, 0, ROT0, "Meyco Games, Inc.", "Casino Black Jack (color, Standard 00-05)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_meybjack ) // B&W version not dumped yet |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | // POT switch position, read from port A of the first S2636 |
| 83 | 83 | // Not sure of the correct values to return, but these should |
| 84 | 84 | // do based on the game code. |
| 85 | switch (i | |
| 85 | switch (iop | |
| 86 | 86 | { |
| 87 | 87 | case 0: // Normal play |
| 88 | 88 | return 0xf0; |
| r15082 | r15083 | |
| 210 | 210 | /* No POT switch on Malzak as far as I know */ |
| 211 | 211 | |
| 212 | 212 | PORT_START("SENSE") |
| 213 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 213 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 214 | 214 | |
| 215 | 215 | INPUT_PORTS_END |
| 216 | 216 | |
| r15082 | r15083 | |
| 237 | 237 | PORT_DIPSETTING( 0x03, "4" ) // Change settings |
| 238 | 238 | |
| 239 | 239 | PORT_START("SENSE") |
| 240 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 240 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 241 | 241 | |
| 242 | 242 | INPUT_PORTS_END |
| 243 | 243 |
| r15082 | r15083 | |
|---|---|---|
| 358 | 358 | { |
| 359 | 359 | /* Protection/IO chip 75, same as Lemmings & Robocop 2 */ |
| 360 | 360 | switch (offset<<2) { |
| 361 | case 0x0a0: return input_port_read(machine(), "IN0"); /* Player 1 & 2 controls */ | |
| 362 | case 0x158: return input_port_read(machine(), "IN1"); /* Player 3 & 4 controls */ | |
| 363 | case 0xed4: return input_port_read(machine(), "IN2"); /* Misc */ | |
| 361 | case 0x0a0: return ioport("IN0")->read(); /* Player 1 & 2 controls */ | |
| 362 | case 0x158: return ioport("IN1")->read(); /* Player 3 & 4 controls */ | |
| 363 | case 0xed4: return ioport("IN2")->read(); /* Misc */ | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | logerror("%08x: Unmapped protection read %04x\n",cpu_get_pc(&space.device()),offset<<2); |
| r15082 | r15083 | |
| 370 | 370 | READ32_MEMBER(deco32_state::captaven_soundcpu_r) |
| 371 | 371 | { |
| 372 | 372 | /* Top byte - top bit low == sound cpu busy, bottom word is dips */ |
| 373 | return 0xffff0000 | i | |
| 373 | return 0xffff0000 | iop | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | READ32_MEMBER(deco32_state::fghthist_control_r) |
| 377 | 377 | { |
| 378 | 378 | switch (offset) { |
| 379 | case 0: return 0xffff0000 | input_port_read(machine(), "IN0"); | |
| 380 | case 1: return 0xffff0000 | input_port_read(machine(), "IN1"); //check top bits?? | |
| 379 | case 0: return 0xffff0000 | ioport("IN0")->read(); | |
| 380 | case 1: return 0xffff0000 | ioport("IN1")->read(); //check top bits?? | |
| 381 | 381 | case 2: return 0xfffffffe | machine().device<eeprom_device>("eeprom")->read_bit(); |
| 382 | 382 | } |
| 383 | 383 | |
| r15082 | r15083 | |
| 405 | 405 | READ32_MEMBER(deco32_state::dragngun_service_r) |
| 406 | 406 | { |
| 407 | 407 | // logerror("%08x:Read service\n",cpu_get_pc(&space.device())); |
| 408 | return i | |
| 408 | return iop | |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | READ32_MEMBER(deco32_state::lockload_gun_mirror_r) |
| r15082 | r15083 | |
| 413 | 413 | //logerror("%08x:Read gun %d\n",cpu_get_pc(&space.device()),offset); |
| 414 | 414 | //return ((machine().rand()%0xffff)<<16) | machine().rand()%0xffff; |
| 415 | 415 | if (offset) /* Mirror of player 1 and player 2 fire buttons */ |
| 416 | return input_port_read(machine(), "IN4") | ((machine().rand()%0xff)<<16); | |
| 417 | return input_port_read(machine(), "IN3") | input_port_read(machine(), "LIGHT0_X") | (input_port_read(machine(), "LIGHT0_X")<<16) | (input_port_read(machine(), "LIGHT0_X")<<24); //((machine().rand()%0xff)<<16); | |
| 416 | return ioport("IN4")->read() | ((machine().rand()%0xff)<<16); | |
| 417 | return ioport("IN3")->read() | ioport("LIGHT0_X")->read() | (ioport("LIGHT0_X")->read()<<16) | (ioport("LIGHT0_X")->read()<<24); //((machine().rand()%0xff)<<16); | |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | READ32_MEMBER(deco32_state::dragngun_prot_r) |
| r15082 | r15083 | |
| 427 | 427 | //definitely vblank in locked load |
| 428 | 428 | |
| 429 | 429 | switch (offset<<1) { |
| 430 | case 0x140/2: return 0xffff0000 | input_port_read(machine(), "IN0"); /* IN0 */ | |
| 431 | case 0xadc/2: return 0xffff0000 | input_port_read(machine(), "IN1") | m_strobe; /* IN1 */ | |
| 432 | case 0x6a0/2: return 0xffff0000 | input_port_read(machine(), "DSW"); /* IN2 (Dip switch) */ | |
| 430 | case 0x140/2: return 0xffff0000 | ioport("IN0")->read(); /* IN0 */ | |
| 431 | case 0xadc/2: return 0xffff0000 | ioport("IN1")->read() | m_strobe; /* IN1 */ | |
| 432 | case 0x6a0/2: return 0xffff0000 | ioport("DSW")->read(); /* IN2 (Dip switch) */ | |
| 433 | 433 | } |
| 434 | 434 | return 0xffffffff; |
| 435 | 435 | } |
| r15082 | r15083 | |
| 439 | 439 | { |
| 440 | 440 | /* Ports 0-3 are read, but seem unused */ |
| 441 | 441 | switch (m_dragngun_lightgun_port) { |
| 442 | case 4: return input_port_read(machine(), "LIGHT0_X"); | |
| 443 | case 5: return input_port_read(machine(), "LIGHT1_X"); | |
| 444 | case 6: return input_port_read(machine(), "LIGHT0_Y"); | |
| 445 | case 7: return input_port_read(machine(), "LIGHT1_Y"); | |
| 442 | case 4: return ioport("LIGHT0_X")->read(); | |
| 443 | case 5: return ioport("LIGHT1_X")->read(); | |
| 444 | case 6: return ioport("LIGHT0_Y")->read(); | |
| 445 | case 7: return ioport("LIGHT1_Y")->read(); | |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | // logerror("Illegal lightgun port %d read \n",m_dragngun_lightgun_port); |
| r15082 | r15083 | |
| 479 | 479 | READ32_MEMBER(deco32_state::tattass_prot_r) |
| 480 | 480 | { |
| 481 | 481 | switch (offset<<1) { |
| 482 | case 0x280: return input_port_read(machine(), "IN0") << 16; | |
| 483 | case 0x4c4: return input_port_read(machine(), "IN1") << 16; | |
| 482 | case 0x280: return ioport("IN0")->read() << 16; | |
| 483 | case 0x4c4: return ioport("IN1")->read() << 16; | |
| 484 | 484 | case 0x35a: return m_tattass_eprom_bit << 16; |
| 485 | 485 | } |
| 486 | 486 | |
| r15082 | r15083 | |
| 637 | 637 | { |
| 638 | 638 | |
| 639 | 639 | switch (offset<<1) { |
| 640 | case 0x280: return input_port_read(machine(), "IN0") << 16| 0xffff; /* IN0 */ | |
| 641 | case 0x4c4: return input_port_read(machine(), "IN1") << 16| 0xffff; /* IN1 */ | |
| 640 | case 0x280: return ioport("IN0")->read() << 16| 0xffff; /* IN0 */ | |
| 641 | case 0x4c4: return ioport("IN1")->read() << 16| 0xffff; /* IN1 */ | |
| 642 | 642 | case 0x35a: return (machine().device<eeprom_device>("eeprom")->read_bit()<< 16) | 0xffff; // Debug switch in low word?? |
| 643 | 643 | } |
| 644 | 644 | |
| r15082 | r15083 | |
| 1208 | 1208 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1209 | 1209 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1210 | 1210 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 1211 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1211 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1212 | 1212 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1213 | 1213 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1214 | 1214 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1287 | 1287 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1288 | 1288 | |
| 1289 | 1289 | PORT_START("IN2") |
| 1290 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1290 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1291 | 1291 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1292 | 1292 | PORT_SERVICE( 0x0004, IP_ACTIVE_LOW ) |
| 1293 | 1293 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) //check //test BUTTON F2 |
| r15082 | r15083 | |
| 1363 | 1363 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1364 | 1364 | |
| 1365 | 1365 | PORT_START("IN2") |
| 1366 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1366 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") //IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1367 | 1367 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1368 | 1368 | PORT_SERVICE( 0x0004, IP_ACTIVE_LOW ) |
| 1369 | 1369 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNUSED ) //check //test BUTTON F2 |
| r15082 | r15083 | |
| 1413 | 1413 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1414 | 1414 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1415 | 1415 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 1416 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1416 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1417 | 1417 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 1418 | 1418 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1419 | 1419 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 1451 | 1451 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1452 | 1452 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1453 | 1453 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 1454 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1454 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1455 | 1455 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 1456 | 1456 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1457 | 1457 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 425 | 425 | static const UINT8 translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x0 }; |
| 426 | 426 | const char *namex = (const char *)param; |
| 427 | 427 | const char *namey = namex + strlen(namex) + 1; |
| 428 | return (translate49[i | |
| 428 | return (translate49[iop | |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | |
| r15082 | r15083 | |
| 438 | 438 | |
| 439 | 439 | CUSTOM_INPUT_MEMBER(midzeus_state::keypad_r) |
| 440 | 440 | { |
| 441 | UINT32 bits = i | |
| 441 | UINT32 bits = iop | |
| 442 | 442 | UINT8 select = keypad_select; |
| 443 | 443 | while ((select & 1) != 0) |
| 444 | 444 | { |
| r15082 | r15083 | |
| 461 | 461 | static const char * const tags[] = { "ANALOG0", "ANALOG1", "ANALOG2", "ANALOG3" }; |
| 462 | 462 | if (offset < 8 || offset > 11) |
| 463 | 463 | logerror("%06X:analog_r(%X)\n", cpu_get_pc(&space.device()), offset); |
| 464 | return i | |
| 464 | return iop | |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | |
| r15082 | r15083 | |
| 527 | 527 | { "GUNX1", "GUNY1" }, |
| 528 | 528 | { "GUNX2", "GUNY2" } |
| 529 | 529 | }; |
| 530 | gun_x[player] = input_port_read(machine(), names[player][0]) * visarea.width() / 255 + visarea.min_x + BEAM_XOFFS; | |
| 531 | gun_y[player] = input_port_read(machine(), names[player][1]) * visarea.height() / 255 + visarea.min_y; | |
| 530 | gun_x[player] = ioport(names[player][0])->read() * visarea.width() / 255 + visarea.min_x + BEAM_XOFFS; | |
| 531 | gun_y[player] = ioport(names[player][1])->read() * visarea.height() / 255 + visarea.min_y; | |
| 532 | 532 | gun_timer[player]->adjust(machine().primary_screen->time_until_pos(MAX(0, gun_y[player] - BEAM_DY), MAX(0, gun_x[player] - BEAM_DX)), player); |
| 533 | 533 | } |
| 534 | 534 | } |
| r15082 | r15083 | |
|---|---|---|
| 284 | 284 | { |
| 285 | 285 | |
| 286 | 286 | // TODO: Get Input Port Values |
| 287 | kbdin = ((i | |
| 287 | kbdin = ((iop | |
| 288 | 288 | |
| 289 | 289 | switch (kbdin) |
| 290 | 290 | { |
| r15082 | r15083 | |
|---|---|---|
| 89 | 89 | { |
| 90 | 90 | switch( m_control_num ) |
| 91 | 91 | { |
| 92 | case 0: return input_port_read(machine(), "STICKY"); | |
| 93 | case 1: return input_port_read(machine(), "STICKX"); | |
| 92 | case 0: return ioport("STICKY")->read(); | |
| 93 | case 1: return ioport("STICKX")->read(); | |
| 94 | 94 | default: return 0x7f7f; |
| 95 | 95 | } |
| 96 | 96 | } |
| r15082 | r15083 | |
| 99 | 99 | { |
| 100 | 100 | UINT16 result = 0; |
| 101 | 101 | if (ACCESSING_BITS_8_15) |
| 102 | result |= i | |
| 102 | result |= iop | |
| 103 | 103 | |
| 104 | 104 | return result; |
| 105 | 105 | } |
| r15082 | r15083 | |
|---|---|---|
| 356 | 356 | int num = (FPTR)param; |
| 357 | 357 | int delta, res; |
| 358 | 358 | |
| 359 | delta = i | |
| 359 | delta = iop | |
| 360 | 360 | |
| 361 | 361 | if (delta < 0x80) |
| 362 | 362 | { |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | state->m_gfx_type = 1; |
| 135 | 135 | |
| 136 | 136 | /* set up banking */ |
| 137 | state->membank("bank1")->configure_entries(0, 2, | |
| 137 | state->membank("bank1")->configure_entries(0, 2, sta | |
| 138 | 138 | state->membank("bank2")->configure_entries(0, 2, state->memregion("audiocpu")->base() + 0x0000, 0x10000); |
| 139 | 139 | } |
| 140 | 140 |
| r15082 | r15083 | |
|---|---|---|
| 407 | 407 | switch (offset << 1) |
| 408 | 408 | { |
| 409 | 409 | case 0: |
| 410 | return i | |
| 410 | return iop | |
| 411 | 411 | case 2: /* Start buttons & VBL */ |
| 412 | return i | |
| 412 | return iop | |
| 413 | 413 | case 4: |
| 414 | return i | |
| 414 | return iop | |
| 415 | 415 | case 6: /* i8751 return values */ |
| 416 | 416 | return m_i8751_return; |
| 417 | 417 | } |
| r15082 | r15083 | |
| 481 | 481 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 482 | 482 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 483 | 483 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 484 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 484 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 485 | 485 | INPUT_PORTS_END |
| 486 | 486 | |
| 487 | 487 | |
| r15082 | r15083 | |
| 728 | 728 | static INTERRUPT_GEN( karnov_interrupt ) |
| 729 | 729 | { |
| 730 | 730 | karnov_state *state = device->machine().driver_data<karnov_state>(); |
| 731 | UINT8 port = | |
| 731 | UINT8 port = s | |
| 732 | 732 | |
| 733 | 733 | /* Coin input to the i8751 generates an interrupt to the main cpu */ |
| 734 | 734 | if (port == state->m_coin_mask) |
| r15082 | r15083 | |
|---|---|---|
| 191 | 191 | |
| 192 | 192 | READ16_MEMBER(xtheball_state::analogx_r) |
| 193 | 193 | { |
| 194 | return (i | |
| 194 | return (iop | |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
| r15082 | r15083 | |
| 199 | 199 | { |
| 200 | 200 | /* doubles as a watchdog address */ |
| 201 | 201 | watchdog_reset_w(space,0,0); |
| 202 | return (i | |
| 202 | return (iop | |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 |
| r15082 | r15083 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | READ8_MEMBER(maxaflex_state::mcu_portA_r) |
| 77 | 77 | { |
| 78 | m_portA_in = i | |
| 78 | m_portA_in = iop | |
| 79 | 79 | return (m_portA_in & ~m_ddrA) | (m_portA_out & m_ddrA); |
| 80 | 80 | } |
| 81 | 81 | |
| r15082 | r15083 | |
| 371 | 371 | |
| 372 | 372 | READ8_DEVICE_HANDLER(maxaflex_atari_pia_pa_r) |
| 373 | 373 | { |
| 374 | return atari_input_disabled(device->machine()) ? 0xFF : | |
| 374 | return atari_input_disabled(device->machine()) ? 0xFF : | |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | 377 | READ8_DEVICE_HANDLER(maxaflex_atari_pia_pb_r) |
| 378 | 378 | { |
| 379 | return atari_input_disabled(device->machine()) ? 0xFF : | |
| 379 | return atari_input_disabled(device->machine()) ? 0xFF : | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 |
| r15082 | r15083 | |
|---|---|---|
| 20 | 20 | if (offset == 0) |
| 21 | 21 | return machine().rand(); |
| 22 | 22 | else |
| 23 | return (machine().rand() & 0x07) | i | |
| 23 | return (machine().rand() & 0x07) | iop | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | WRITE8_MEMBER(kopunch_state::kopunch_lamp_w) |
| r15082 | r15083 | |
|---|---|---|
| 287 | 287 | return state->m_misc_io_data[offset]; |
| 288 | 288 | |
| 289 | 289 | /* otherwise, return an input port */ |
| 290 | return | |
| 290 | return | |
| 291 | 291 | |
| 292 | 292 | /* 'SEGA' protection */ |
| 293 | 293 | case 0x10/2: |
| r15082 | r15083 | |
| 403 | 403 | segas1x_state *state = space->machine().driver_data<segas1x_state>(); |
| 404 | 404 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" }; |
| 405 | 405 | int selected = ((offset & 3) == 3) ? (3 + (state->m_misc_io_data[0x08/2] & 3)) : (offset & 3); |
| 406 | int value = | |
| 406 | int value = s | |
| 407 | 407 | |
| 408 | 408 | state->m_analog_data[offset & 3] = value; |
| 409 | 409 | } |
| r15082 | r15083 | |
|---|---|---|
| 228 | 228 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) // player 2 controls, not used |
| 229 | 229 | |
| 230 | 230 | PORT_START("SYSTEM") |
| 231 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 231 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 232 | 232 | PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) |
| 233 | 233 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 234 | 234 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r15082 | r15083 | |
|---|---|---|
| 189 | 189 | { |
| 190 | 190 | static const char *const portnames[] = { "STICK0_X", "STICK1_X", "STICK0_Y", "STICK1_Y" }; |
| 191 | 191 | |
| 192 | return i | |
| 192 | return iop | |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | |
| r15082 | r15083 | |
| 326 | 326 | |
| 327 | 327 | static READ8_DEVICE_HANDLER( pot_r ) |
| 328 | 328 | { |
| 329 | return ( | |
| 329 | return ( | |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | static const pokey_interface pokey_config = |
| r15082 | r15083 | |
|---|---|---|
| 229 | 229 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 230 | 230 | |
| 231 | 231 | PORT_START("VBLANK") |
| 232 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_VBLANK | |
| 232 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 233 | 233 | INPUT_PORTS_END |
| 234 | 234 | |
| 235 | 235 | static PALETTE_INIT( cesclassic ) |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | static READ8_DEVICE_HANDLER(forte2_ay8910_read_input) |
| 73 | 73 | { |
| 74 | 74 | forte2_state *state = device->machine().driver_data<forte2_state>(); |
| 75 | return | |
| 75 | return s | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | static WRITE8_DEVICE_HANDLER( forte2_ay8910_set_input_mask ) |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | READ8_MEMBER(skyraid_state::skyraid_port_0_r) |
| 38 | 38 | { |
| 39 | UINT8 val = i | |
| 39 | UINT8 val = iop | |
| 40 | 40 | |
| 41 | if (i | |
| 41 | if (iop | |
| 42 | 42 | val |= 0x40; |
| 43 | if (i | |
| 43 | if (iop | |
| 44 | 44 | val |= 0x80; |
| 45 | 45 | |
| 46 | 46 | return val; |
| r15082 | r15083 | |
|---|---|---|
| 430 | 430 | static int blit_draw( running_machine &machine, int src, int sx ) |
| 431 | 431 | { |
| 432 | 432 | dynax_state *state = machine.driver_data<dynax_state>(); |
| 433 | UINT8 *src_data = | |
| 433 | UINT8 *src_data = sta | |
| 434 | 434 | int src_len = state->memregion("blitter")->bytes(); |
| 435 | 435 | int bit_addr = (src & 0xffffff) * state->m_ddenlovr_blit_rom_bits; /* convert to bit address */ |
| 436 | 436 | int pen_size, arg_size, cmd; |
| r15082 | r15083 | |
| 1597 | 1597 | /* 0 and 1 are read from offset 1, 2 from offset 0... */ |
| 1598 | 1598 | switch (m_input_sel) |
| 1599 | 1599 | { |
| 1600 | case 0x00: return input_port_read(machine(), "P1"); | |
| 1601 | case 0x01: return input_port_read(machine(), "P2"); | |
| 1602 | case 0x02: return input_port_read(machine(), "SYSTEM"); | |
| 1600 | case 0x00: return ioport("P1")->read(); | |
| 1601 | case 0x01: return ioport("P2")->read(); | |
| 1602 | case 0x02: return ioport("SYSTEM")->read(); | |
| 1603 | 1603 | } |
| 1604 | 1604 | return 0xff; |
| 1605 | 1605 | } |
| r15082 | r15083 | |
| 1609 | 1609 | { |
| 1610 | 1610 | dynax_state *state = device->machine().driver_data<dynax_state>(); |
| 1611 | 1611 | |
| 1612 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(device->machine(), "DSW1"); | |
| 1613 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(device->machine(), "DSW2"); | |
| 1614 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(device->machine(), "DSW3"); | |
| 1612 | if (!BIT(state->m_dsw_sel, 0)) return state->ioport("DSW1")->read(); | |
| 1613 | if (!BIT(state->m_dsw_sel, 1)) return state->ioport("DSW2")->read(); | |
| 1614 | if (!BIT(state->m_dsw_sel, 2)) return state->ioport("DSW3")->read(); | |
| 1615 | 1615 | if (!BIT(state->m_dsw_sel, 3)) return 0xff;//device->machine().rand(); |
| 1616 | 1616 | if (!BIT(state->m_dsw_sel, 4)) return 0xff;//device->machine().rand(); |
| 1617 | 1617 | return 0xff; |
| r15082 | r15083 | |
| 1624 | 1624 | /* 0 and 1 are read from offset 1, 2 from offset 0... */ |
| 1625 | 1625 | switch (m_input_sel) |
| 1626 | 1626 | { |
| 1627 | case 0x10: return input_port_read(machine(), "P1"); | |
| 1628 | case 0x11: return input_port_read(machine(), "P2"); | |
| 1629 | case 0x12: return input_port_read(machine(), "SYSTEM"); | |
| 1627 | case 0x10: return ioport("P1")->read(); | |
| 1628 | case 0x11: return ioport("P2")->read(); | |
| 1629 | case 0x12: return ioport("SYSTEM")->read(); | |
| 1630 | 1630 | } |
| 1631 | 1631 | return 0xff; |
| 1632 | 1632 | } |
| r15082 | r15083 | |
| 1728 | 1728 | READ16_MEMBER(dynax_state::ddenlovj_dsw_r) |
| 1729 | 1729 | { |
| 1730 | 1730 | UINT16 dsw = 0; |
| 1731 | if ((~*m_dsw_sel16) & 0x01) dsw |= input_port_read(machine(), "DSW1"); | |
| 1732 | if ((~*m_dsw_sel16) & 0x02) dsw |= input_port_read(machine(), "DSW2"); | |
| 1733 | if ((~*m_dsw_sel16) & 0x04) dsw |= input_port_read(machine(), "DSW3"); | |
| 1731 | if ((~*m_dsw_sel16) & 0x01) dsw |= ioport("DSW1")->read(); | |
| 1732 | if ((~*m_dsw_sel16) & 0x02) dsw |= ioport("DSW2")->read(); | |
| 1733 | if ((~*m_dsw_sel16) & 0x04) dsw |= ioport("DSW3")->read(); | |
| 1734 | 1734 | return dsw; |
| 1735 | 1735 | } |
| 1736 | 1736 | |
| r15082 | r15083 | |
| 1888 | 1888 | READ16_MEMBER(dynax_state::nettoqc_input_r) |
| 1889 | 1889 | { |
| 1890 | 1890 | |
| 1891 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 1892 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 1893 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 1891 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); | |
| 1892 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); | |
| 1893 | if (!BIT(m_dsw_sel, 2)) return ioport("DSW3")->read(); | |
| 1894 | 1894 | return 0xffff; |
| 1895 | 1895 | } |
| 1896 | 1896 | |
| r15082 | r15083 | |
| 1971 | 1971 | READ8_MEMBER(dynax_state::rongrong_input_r) |
| 1972 | 1972 | { |
| 1973 | 1973 | |
| 1974 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 1975 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 1974 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); | |
| 1975 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); | |
| 1976 | 1976 | if (!BIT(m_dsw_sel, 2)) return 0xff;//machine().rand(); |
| 1977 | 1977 | if (!BIT(m_dsw_sel, 3)) return 0xff;//machine().rand(); |
| 1978 | if (!BIT(m_dsw_sel, 4)) return i | |
| 1978 | if (!BIT(m_dsw_sel, 4)) return iop | |
| 1979 | 1979 | return 0xff; |
| 1980 | 1980 | } |
| 1981 | 1981 | |
| r15082 | r15083 | |
| 2252 | 2252 | READ8_MEMBER(dynax_state::funkyfig_dsw_r) |
| 2253 | 2253 | { |
| 2254 | 2254 | |
| 2255 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 2256 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 2257 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 2255 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); | |
| 2256 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); | |
| 2257 | if (!BIT(m_dsw_sel, 2)) return ioport("DSW3")->read(); | |
| 2258 | 2258 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space.device()), m_dsw_sel); |
| 2259 | 2259 | return 0xff; |
| 2260 | 2260 | } |
| r15082 | r15083 | |
| 2264 | 2264 | |
| 2265 | 2265 | switch (m_input_sel) |
| 2266 | 2266 | { |
| 2267 | case 0x22: return i | |
| 2267 | case 0x22: return iop | |
| 2268 | 2268 | case 0x23: return m_funkyfig_lockout; |
| 2269 | 2269 | } |
| 2270 | 2270 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space.device()), m_input_sel); |
| r15082 | r15083 | |
| 2276 | 2276 | |
| 2277 | 2277 | switch (m_input_sel) |
| 2278 | 2278 | { |
| 2279 | case 0x20: return input_port_read(machine(), "IN0"); | |
| 2280 | case 0x21: return input_port_read(machine(), "IN1"); | |
| 2279 | case 0x20: return ioport("IN0")->read(); | |
| 2280 | case 0x21: return ioport("IN1")->read(); | |
| 2281 | 2281 | } |
| 2282 | 2282 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space.device()), m_input_sel); |
| 2283 | 2283 | return 0xff; |
| r15082 | r15083 | |
| 2379 | 2379 | |
| 2380 | 2380 | UINT8 val = 0xff; |
| 2381 | 2381 | |
| 2382 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 2383 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 2384 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 2385 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 2386 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 2382 | if (!BIT(m_keyb, 0)) val = ioport(offset ? "KEY5" : "KEY0")->read(); | |
| 2383 | else if (!BIT(m_keyb, 1)) val = ioport(offset ? "KEY6" : "KEY1")->read(); | |
| 2384 | else if (!BIT(m_keyb, 2)) val = ioport(offset ? "KEY7" : "KEY2")->read(); | |
| 2385 | else if (!BIT(m_keyb, 3)) val = ioport(offset ? "KEY8" : "KEY3")->read(); | |
| 2386 | else if (!BIT(m_keyb, 4)) val = ioport(offset ? "KEY9" : "KEY4")->read(); | |
| 2387 | 2387 | |
| 2388 | val |= i | |
| 2388 | val |= iop | |
| 2389 | 2389 | return val; |
| 2390 | 2390 | } |
| 2391 | 2391 | |
| 2392 | 2392 | READ8_MEMBER(dynax_state::hanakanz_dsw_r) |
| 2393 | 2393 | { |
| 2394 | 2394 | |
| 2395 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 2396 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 2397 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 2398 | if (!BIT(m_dsw_sel, 3)) return input_port_read(machine(), "DSW4"); | |
| 2399 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW5"); | |
| 2395 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); | |
| 2396 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); | |
| 2397 | if (!BIT(m_dsw_sel, 2)) return ioport("DSW3")->read(); | |
| 2398 | if (!BIT(m_dsw_sel, 3)) return ioport("DSW4")->read(); | |
| 2399 | if (!BIT(m_dsw_sel, 4)) return ioport("DSW5")->read(); | |
| 2400 | 2400 | return 0xff; |
| 2401 | 2401 | } |
| 2402 | 2402 | |
| r15082 | r15083 | |
| 2562 | 2562 | { |
| 2563 | 2563 | UINT8 val = 0xff; |
| 2564 | 2564 | |
| 2565 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 2566 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 2567 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 2568 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 2569 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 2565 | if (!BIT(m_keyb, 0)) val = ioport(offset ? "KEY5" : "KEY0")->read(); | |
| 2566 | else if (!BIT(m_keyb, 1)) val = ioport(offset ? "KEY6" : "KEY1")->read(); | |
| 2567 | else if (!BIT(m_keyb, 2)) val = ioport(offset ? "KEY7" : "KEY2")->read(); | |
| 2568 | else if (!BIT(m_keyb, 3)) val = ioport(offset ? "KEY8" : "KEY3")->read(); | |
| 2569 | else if (!BIT(m_keyb, 4)) val = ioport(offset ? "KEY9" : "KEY4")->read(); | |
| 2570 | 2570 | |
| 2571 | val |= i | |
| 2571 | val |= iop | |
| 2572 | 2572 | |
| 2573 | 2573 | if (offset) |
| 2574 | 2574 | val |= 0x80; // blitter busy |
| r15082 | r15083 | |
| 2585 | 2585 | static void mjchuuka_get_romdata(running_machine &machine) |
| 2586 | 2586 | { |
| 2587 | 2587 | dynax_state *state = machine.driver_data<dynax_state>(); |
| 2588 | UINT8 *rom = | |
| 2588 | UINT8 *rom = sta | |
| 2589 | 2589 | size_t size = state->memregion("blitter")->bytes(); |
| 2590 | 2590 | int address = (state->m_ddenlovr_blit_address & 0xffffff) * 2; |
| 2591 | 2591 | |
| r15082 | r15083 | |
| 2716 | 2716 | |
| 2717 | 2717 | switch (m_input_sel) |
| 2718 | 2718 | { |
| 2719 | case 0x00: return i | |
| 2719 | case 0x00: return iop | |
| 2720 | 2720 | case 0x01: return 0xff; |
| 2721 | 2721 | case 0x02: return 0xff; // bit 7 = 0 -> blitter busy, + hopper switch |
| 2722 | 2722 | case 0x03: return 0xff; |
| r15082 | r15083 | |
| 2731 | 2731 | { |
| 2732 | 2732 | UINT8 ret = 0xff; |
| 2733 | 2733 | |
| 2734 | if (BIT(m_keyb, 0)) ret = input_port_read(machine(), "KEY0"); | |
| 2735 | else if (BIT(m_keyb, 1)) ret = input_port_read(machine(), "KEY1"); | |
| 2736 | else if (BIT(m_keyb, 2)) ret = input_port_read(machine(), "KEY2"); | |
| 2737 | else if (BIT(m_keyb, 3)) ret = input_port_read(machine(), "KEY3"); | |
| 2738 | else if (BIT(m_keyb, 4)) ret = input_port_read(machine(), "KEY4"); | |
| 2734 | if (BIT(m_keyb, 0)) ret = ioport("KEY0")->read(); | |
| 2735 | else if (BIT(m_keyb, 1)) ret = ioport("KEY1")->read(); | |
| 2736 | else if (BIT(m_keyb, 2)) ret = ioport("KEY2")->read(); | |
| 2737 | else if (BIT(m_keyb, 3)) ret = ioport("KEY3")->read(); | |
| 2738 | else if (BIT(m_keyb, 4)) ret = ioport("KEY4")->read(); | |
| 2739 | 2739 | else logerror("%06x: warning, unknown bits read, keyb = %02x\n", cpu_get_pc(&space.device()), m_keyb); |
| 2740 | 2740 | |
| 2741 | 2741 | m_keyb <<= 1; |
| r15082 | r15083 | |
| 2746 | 2746 | READ8_MEMBER(dynax_state::mjmyster_dsw_r) |
| 2747 | 2747 | { |
| 2748 | 2748 | |
| 2749 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW4"); | |
| 2750 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW3"); | |
| 2751 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW2"); | |
| 2752 | if (!BIT(m_dsw_sel, 3)) return input_port_read(machine(), "DSW1"); | |
| 2753 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW5"); | |
| 2749 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW4")->read(); | |
| 2750 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW3")->read(); | |
| 2751 | if (!BIT(m_dsw_sel, 2)) return ioport("DSW2")->read(); | |
| 2752 | if (!BIT(m_dsw_sel, 3)) return ioport("DSW1")->read(); | |
| 2753 | if (!BIT(m_dsw_sel, 4)) return ioport("DSW5")->read(); | |
| 2754 | 2754 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space.device()), m_dsw_sel); |
| 2755 | 2755 | return 0xff; |
| 2756 | 2756 | } |
| r15082 | r15083 | |
| 2841 | 2841 | { |
| 2842 | 2842 | dynax_state *state = device->machine().driver_data<dynax_state>(); |
| 2843 | 2843 | |
| 2844 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(device->machine(), "DSW4"); | |
| 2845 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(device->machine(), "DSW3"); | |
| 2846 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(device->machine(), "DSW2"); | |
| 2847 | if (!BIT(state->m_dsw_sel, 3)) return input_port_read(device->machine(), "DSW1"); | |
| 2848 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(device->machine(), "DSW5"); | |
| 2844 | if (!BIT(state->m_dsw_sel, 0)) return state->ioport("DSW4")->read(); | |
| 2845 | if (!BIT(state->m_dsw_sel, 1)) return state->ioport("DSW3")->read(); | |
| 2846 | if (!BIT(state->m_dsw_sel, 2)) return state->ioport("DSW2")->read(); | |
| 2847 | if (!BIT(state->m_dsw_sel, 3)) return state->ioport("DSW1")->read(); | |
| 2848 | if (!BIT(state->m_dsw_sel, 4)) return state->ioport("DSW5")->read(); | |
| 2849 | 2849 | |
| 2850 | 2850 | logerror("%s: warning, unknown bits read, ddenlovr_select = %02x\n", device->machine().describe_context(), state->m_dsw_sel); |
| 2851 | 2851 | return 0xff; |
| r15082 | r15083 | |
| 2862 | 2862 | |
| 2863 | 2863 | switch (m_input_sel) |
| 2864 | 2864 | { |
| 2865 | case 0x20: return input_port_read(machine(), "SYSTEM"); | |
| 2866 | case 0x21: return input_port_read(machine(), "BET"); | |
| 2865 | case 0x20: return ioport("SYSTEM")->read(); | |
| 2866 | case 0x21: return ioport("BET")->read(); | |
| 2867 | 2867 | case 0x22: return 0x7f; // bit 7 = blitter busy, bit 6 = hopper |
| 2868 | 2868 | case 0x23: return m_coins; |
| 2869 | 2869 | } |
| r15082 | r15083 | |
| 2912 | 2912 | |
| 2913 | 2913 | // player 1 |
| 2914 | 2914 | case 0xa1: |
| 2915 | return i | |
| 2915 | return iop | |
| 2916 | 2916 | |
| 2917 | 2917 | // player 2 |
| 2918 | 2918 | case 0xa2: |
| 2919 | return i | |
| 2919 | return iop | |
| 2920 | 2920 | } |
| 2921 | 2921 | logerror("%04x: input_r with select = %02x\n", cpu_get_pc(&space.device()), m_input_sel); |
| 2922 | 2922 | return 0xff; |
| r15082 | r15083 | |
| 2988 | 2988 | dynax_state *state = space->machine().driver_data<dynax_state>(); |
| 2989 | 2989 | UINT8 hopper_bit = ((state->m_hopper && !(space->machine().primary_screen->frame_number() % 10)) ? 0 : (1 << 6)); |
| 2990 | 2990 | |
| 2991 | if (!BIT(state->m_input_sel, 0)) return input_port_read(space->machine(), player ? "KEY5" : "KEY0") | hopper_bit; | |
| 2992 | if (!BIT(state->m_input_sel, 1)) return input_port_read(space->machine(), player ? "KEY6" : "KEY1") | hopper_bit; | |
| 2993 | if (!BIT(state->m_input_sel, 2)) return input_port_read(space->machine(), player ? "KEY7" : "KEY2") | hopper_bit; | |
| 2994 | if (!BIT(state->m_input_sel, 3)) return input_port_read(space->machine(), player ? "KEY8" : "KEY3") | hopper_bit; | |
| 2995 | if (!BIT(state->m_input_sel, 4)) return input_port_read(space->machine(), player ? "KEY9" : "KEY4") | hopper_bit; | |
| 2991 | if (!BIT(state->m_input_sel, 0)) return state->ioport(player ? "KEY5" : "KEY0")->read() | hopper_bit; | |
| 2992 | if (!BIT(state->m_input_sel, 1)) return state->ioport(player ? "KEY6" : "KEY1")->read() | hopper_bit; | |
| 2993 | if (!BIT(state->m_input_sel, 2)) return state->ioport(player ? "KEY7" : "KEY2")->read() | hopper_bit; | |
| 2994 | if (!BIT(state->m_input_sel, 3)) return state->ioport(player ? "KEY8" : "KEY3")->read() | hopper_bit; | |
| 2995 | if (!BIT(state->m_input_sel, 4)) return state->ioport(player ? "KEY9" : "KEY4")->read() | hopper_bit; | |
| 2996 | 2996 | |
| 2997 | 2997 | return 0x7f; // bit 7 = blitter busy, bit 6 = hopper |
| 2998 | 2998 | } |
| r15082 | r15083 | |
| 3007 | 3007 | |
| 3008 | 3008 | switch (m_dsw_sel) |
| 3009 | 3009 | { |
| 3010 | case 0x20: return i | |
| 3010 | case 0x20: return iop | |
| 3011 | 3011 | case 0x21: return hgokou_player_r(&space, 1); |
| 3012 | 3012 | case 0x22: return hgokou_player_r(&space, 0); |
| 3013 | 3013 | case 0x23: return m_coins; |
| r15082 | r15083 | |
| 3170 | 3170 | |
| 3171 | 3171 | switch (m_input_sel) |
| 3172 | 3172 | { |
| 3173 | case 0x00: return input_port_read(machine(), "P1"); | |
| 3174 | case 0x01: return input_port_read(machine(), "P2"); | |
| 3175 | case 0x02: return input_port_read(machine(), "SYSTEM"); | |
| 3173 | case 0x00: return ioport("P1")->read(); | |
| 3174 | case 0x01: return ioport("P2")->read(); | |
| 3175 | case 0x02: return ioport("SYSTEM")->read(); | |
| 3176 | 3176 | case 0x0d: return 0x00; |
| 3177 | case 0x80: return input_port_read(machine(), keynames0[m_keyb++]); // P1 (Keys) | |
| 3178 | case 0x81: return input_port_read(machine(), keynames1[m_keyb++]); // P2 (Keys) | |
| 3177 | case 0x80: return ioport(keynames0[m_keyb++])->read(); // P1 (Keys) | |
| 3178 | case 0x81: return ioport(keynames1[m_keyb++])->read(); // P2 (Keys) | |
| 3179 | 3179 | } |
| 3180 | 3180 | logerror("%06x: warning, unknown bits read, input_sel = %02x\n", cpu_get_pc(&space.device()), m_input_sel); |
| 3181 | 3181 | return 0xff; |
| r15082 | r15083 | |
| 3184 | 3184 | READ8_MEMBER(dynax_state::hparadis_dsw_r) |
| 3185 | 3185 | { |
| 3186 | 3186 | |
| 3187 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 3188 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 3187 | if (!BIT(m_dsw_sel, 0)) return ioport("DSW1")->read(); | |
| 3188 | if (!BIT(m_dsw_sel, 1)) return ioport("DSW2")->read(); | |
| 3189 | 3189 | if (!BIT(m_dsw_sel, 2)) return 0xff; |
| 3190 | 3190 | if (!BIT(m_dsw_sel, 3)) return 0xff; |
| 3191 | if (!BIT(m_dsw_sel, 4)) return i | |
| 3191 | if (!BIT(m_dsw_sel, 4)) return iop | |
| 3192 | 3192 | return 0xff; |
| 3193 | 3193 | } |
| 3194 | 3194 | |
| r15082 | r15083 | |
| 3246 | 3246 | |
| 3247 | 3247 | switch (m_input_sel) |
| 3248 | 3248 | { |
| 3249 | case 0x80: return i | |
| 3249 | case 0x80: return iop | |
| 3250 | 3250 | case 0x81: return 0x00; |
| 3251 | 3251 | case 0x82: return 0xff; // bit 7 = 0 -> blitter busy, + hopper switch |
| 3252 | 3252 | case 0x83: return 0x00; |
| r15082 | r15083 | |
| 3316 | 3316 | { |
| 3317 | 3317 | UINT16 dsw = 0; |
| 3318 | 3318 | |
| 3319 | if (m_dsw_sel16[1] == 0xff) dsw |= input_port_read(machine(), "DSW1"); | |
| 3320 | if (m_dsw_sel16[0] == 0xff) dsw |= input_port_read(machine(), "DSW2"); | |
| 3319 | if (m_dsw_sel16[1] == 0xff) dsw |= ioport("DSW1")->read(); | |
| 3320 | if (m_dsw_sel16[0] == 0xff) dsw |= ioport("DSW2")->read(); | |
| 3321 | 3321 | return dsw; |
| 3322 | 3322 | } |
| 3323 | 3323 | |
| r15082 | r15083 | |
| 3402 | 3402 | { |
| 3403 | 3403 | UINT8 val = 0xff; |
| 3404 | 3404 | |
| 3405 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 3406 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 3407 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 3408 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 3409 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 3405 | if (!BIT(m_keyb, 0)) val = ioport(offset ? "KEY5" : "KEY0")->read(); | |
| 3406 | else if (!BIT(m_keyb, 1)) val = ioport(offset ? "KEY6" : "KEY1")->read(); | |
| 3407 | else if (!BIT(m_keyb, 2)) val = ioport(offset ? "KEY7" : "KEY2")->read(); | |
| 3408 | else if (!BIT(m_keyb, 3)) val = ioport(offset ? "KEY8" : "KEY3")->read(); | |
| 3409 | else if (!BIT(m_keyb, 4)) val = ioport(offset ? "KEY9" : "KEY4")->read(); | |
| 3410 | 3410 | |
| 3411 | 3411 | return val; |
| 3412 | 3412 | } |
| r15082 | r15083 | |
| 3524 | 3524 | { |
| 3525 | 3525 | UINT8 val = 0x3f; |
| 3526 | 3526 | |
| 3527 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 3528 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 3529 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 3530 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 3531 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 3527 | if (!BIT(m_keyb, 0)) val = ioport(offset ? "KEY5" : "KEY0")->read(); | |
| 3528 | else if (!BIT(m_keyb, 1)) val = ioport(offset ? "KEY6" : "KEY1")->read(); | |
| 3529 | else if (!BIT(m_keyb, 2)) val = ioport(offset ? "KEY7" : "KEY2")->read(); | |
| 3530 | else if (!BIT(m_keyb, 3)) val = ioport(offset ? "KEY8" : "KEY3")->read(); | |
| 3531 | else if (!BIT(m_keyb, 4)) val = ioport(offset ? "KEY9" : "KEY4")->read(); | |
| 3532 | 3532 | |
| 3533 | val |= i | |
| 3533 | val |= iop | |
| 3534 | 3534 | if (offset) |
| 3535 | 3535 | val &= 0x7f; // bit 7 = blitter busy |
| 3536 | 3536 | return val; |
| r15082 | r15083 | |
| 3600 | 3600 | { |
| 3601 | 3601 | UINT8 val = 0x3f; |
| 3602 | 3602 | |
| 3603 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), "KEY0"); | |
| 3604 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), "KEY1"); | |
| 3605 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), "KEY2"); | |
| 3606 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), "KEY3"); | |
| 3607 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), "KEY4"); | |
| 3603 | if (!BIT(m_keyb, 0)) val = ioport("KEY0")->read(); | |
| 3604 | else if (!BIT(m_keyb, 1)) val = ioport("KEY1")->read(); | |
| 3605 | else if (!BIT(m_keyb, 2)) val = ioport("KEY2")->read(); | |
| 3606 | else if (!BIT(m_keyb, 3)) val = ioport("KEY3")->read(); | |
| 3607 | else if (!BIT(m_keyb, 4)) val = ioport("KEY4")->read(); | |
| 3608 | 3608 | |
| 3609 | val |= i | |
| 3609 | val |= iop | |
| 3610 | 3610 | return val; |
| 3611 | 3611 | } |
| 3612 | 3612 | |
| r15082 | r15083 | |
| 3614 | 3614 | { |
| 3615 | 3615 | UINT8 val = 0x3f; |
| 3616 | 3616 | |
| 3617 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), "KEY5"); | |
| 3618 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), "KEY6"); | |
| 3619 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), "KEY7"); | |
| 3620 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), "KEY8"); | |
| 3621 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), "KEY9"); | |
| 3617 | if (!BIT(m_keyb, 0)) val = ioport("KEY5")->read(); | |
| 3618 | else if (!BIT(m_keyb, 1)) val = ioport("KEY6")->read(); | |
| 3619 | else if (!BIT(m_keyb, 2)) val = ioport("KEY7")->read(); | |
| 3620 | else if (!BIT(m_keyb, 3)) val = ioport("KEY8")->read(); | |
| 3621 | else if (!BIT(m_keyb, 4)) val = ioport("KEY9")->read(); | |
| 3622 | 3622 | |
| 3623 | val |= i | |
| 3623 | val |= iop | |
| 3624 | 3624 | return val; |
| 3625 | 3625 | } |
| 3626 | 3626 |
| r15082 | r15083 | |
|---|---|---|
| 387 | 387 | |
| 388 | 388 | static INPUT_PORTS_START( chinagat ) |
| 389 | 389 | PORT_START("SYSTEM") |
| 390 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 390 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 391 | 391 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 392 | 392 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 393 | 393 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r15082 | r15083 | |
| 912 | 912 | static DRIVER_INIT( chinagat ) |
| 913 | 913 | { |
| 914 | 914 | ddragon_state *state = machine.driver_data<ddragon_state>(); |
| 915 | UINT8 *MAIN = | |
| 915 | UINT8 *MAIN = sta | |
| 916 | 916 | UINT8 *SUB = state->memregion("sub")->base(); |
| 917 | 917 | |
| 918 | 918 | state->m_technos_video_hw = 1; |
| r15082 | r15083 | |
|---|---|---|
| 343 | 343 | { |
| 344 | 344 | if (ACCESSING_BITS_0_7) |
| 345 | 345 | { |
| 346 | i | |
| 346 | iop | |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | if (ACCESSING_BITS_8_15) |
| r15082 | r15083 | |
| 612 | 612 | READ16_MEMBER(kaneko16_state::gtmr_wheel_r) |
| 613 | 613 | { |
| 614 | 614 | // check 'Controls' dip switch |
| 615 | switch (i | |
| 615 | switch (iop | |
| 616 | 616 | { |
| 617 | 617 | case 0x0000: // 'Both Sides' = 270deg Wheel |
| 618 | return (i | |
| 618 | return (iop | |
| 619 | 619 | case 0x1000: // '1P Side' = 360' Wheel |
| 620 | return (i | |
| 620 | return (iop | |
| 621 | 621 | default: |
| 622 | 622 | return (0); |
| 623 | 623 | } |
| r15082 | r15083 | |
| 700 | 700 | |
| 701 | 701 | READ16_MEMBER(kaneko16_state::gtmr2_wheel_r) |
| 702 | 702 | { |
| 703 | switch (i | |
| 703 | switch (iop | |
| 704 | 704 | { |
| 705 | 705 | case 0x0000: // 270' A. Wheel |
| 706 | return (i | |
| 706 | return (iop | |
| 707 | 707 | case 0x1000: // 270' D. Wheel |
| 708 | return (i | |
| 708 | return (iop | |
| 709 | 709 | case 0x0800: // 360' Wheel |
| 710 | return (i | |
| 710 | return (iop | |
| 711 | 711 | default: |
| 712 | 712 | logerror("gtmr2_wheel_r : read at %06x with joystick\n", cpu_get_pc(&space.device())); |
| 713 | 713 | return (~0); |
| r15082 | r15083 | |
| 716 | 716 | |
| 717 | 717 | READ16_MEMBER(kaneko16_state::gtmr2_IN1_r) |
| 718 | 718 | { |
| 719 | return | |
| 719 | return (iop | |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | static ADDRESS_MAP_START( gtmr2_map, AS_PROGRAM, 16, kaneko16_state ) |
| r15082 | r15083 | |
| 1362 | 1362 | PORT_DIPSETTING( 0x0800, DEF_STR( Joystick ) ) |
| 1363 | 1363 | PORT_DIPSETTING( 0x0000, "Wheel" ) |
| 1364 | 1364 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW1:5") |
| 1365 | PORT_DIPSETTING( 0x1000, "1P Side" ) PORT_CONDITION("DSW1",0x0800,PORTCOND_NOTEQUALS,0x00) | |
| 1366 | PORT_DIPSETTING( 0x0000, "Both Sides" ) PORT_CONDITION("DSW1",0x0800,PORTCOND_NOTEQUALS,0x00) | |
| 1367 | PORT_DIPSETTING( 0x1000, "360 degree wheel" ) PORT_CONDITION("DSW1",0x0800,PORTCOND_EQUALS,0x00) | |
| 1368 | PORT_DIPSETTING( 0x0000, "270 degree wheel" ) PORT_CONDITION("DSW1",0x0800,PORTCOND_EQUALS,0x00) | |
| 1365 | PORT_DIPSETTING( 0x1000, "1P Side" ) PORT_CONDITION("DSW1",0x0800,NOTEQUALS,0x00) | |
| 1366 | PORT_DIPSETTING( 0x0000, "Both Sides" ) PORT_CONDITION("DSW1",0x0800,NOTEQUALS,0x00) | |
| 1367 | PORT_DIPSETTING( 0x1000, "360 degree wheel" ) PORT_CONDITION("DSW1",0x0800,EQUALS,0x00) | |
| 1368 | PORT_DIPSETTING( 0x0000, "270 degree wheel" ) PORT_CONDITION("DSW1",0x0800,EQUALS,0x00) | |
| 1369 | 1369 | PORT_DIPNAME( 0x2000, 0x2000, "Use Brake" ) PORT_DIPLOCATION("SW1:6") /* Valid only when joystick is used */ |
| 1370 | 1370 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1371 | 1371 | PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 531 | 531 | switch( offset ) |
| 532 | 532 | { |
| 533 | 533 | case 2/2: |
| 534 | return i | |
| 534 | return iop | |
| 535 | 535 | |
| 536 | 536 | // 0x00110007 is controller device select |
| 537 | 537 | // 0x001100D5 is controller data |
| r15082 | r15083 | |
| 540 | 540 | switch( (m_io_ram[6/2]) & 0xff ) |
| 541 | 541 | { |
| 542 | 542 | case 0: |
| 543 | m_io_ram[0xd4/2] = i | |
| 543 | m_io_ram[0xd4/2] = iop | |
| 544 | 544 | break; |
| 545 | 545 | |
| 546 | 546 | case 0x20: |
| 547 | m_io_ram[0xd4/2] = i | |
| 547 | m_io_ram[0xd4/2] = iop | |
| 548 | 548 | break; |
| 549 | 549 | |
| 550 | 550 | case 0x40: |
| 551 | m_io_ram[0xd4/2] = i | |
| 551 | m_io_ram[0xd4/2] = iop | |
| 552 | 552 | break; |
| 553 | 553 | |
| 554 | 554 | case 0x42: |
| r15082 | r15083 | |
| 560 | 560 | break; |
| 561 | 561 | |
| 562 | 562 | case 0x60: |
| 563 | m_io_ram[0xd4/2] = i | |
| 563 | m_io_ram[0xd4/2] = iop | |
| 564 | 564 | break; |
| 565 | 565 | |
| 566 | 566 | //default: |
| r15082 | r15083 | |
| 569 | 569 | return 0; |
| 570 | 570 | |
| 571 | 571 | case 6/2: |
| 572 | return i | |
| 572 | return iop | |
| 573 | 573 | |
| 574 | 574 | case 8/2: |
| 575 | return i | |
| 575 | return iop | |
| 576 | 576 | |
| 577 | 577 | case 0xa/2: |
| 578 | return i | |
| 578 | return iop | |
| 579 | 579 | |
| 580 | 580 | case 0xd4/2: |
| 581 | 581 | return m_io_ram[offset]; // controller data |
| r15082 | r15083 | |
|---|---|---|
| 352 | 352 | */ |
| 353 | 353 | |
| 354 | 354 | UINT16 dd16 = d16 ^ key; |
| 355 | ||
| 356 | key = d16; | |
| 355 | 357 | |
| 356 | 358 | key = |
| 357 | (( BIT(d16, 3) ^ (BIT(cnt, 0) & !BIT(cnt, 2))) << 15) | | |
| 359 | //(( BIT(d16, 3) ^ (BIT(cnt, 0) & !BIT(cnt, 2))) << 15) | | |
| 360 | ((1 ^ BIT(key, 3) ^ BIT(d16, 0)) << 15) | | |
| 358 | 361 | ((1 ^ BIT(key, 13) ^ BIT(cnt, 0)) << 14) | |
| 359 | 362 | ((1 ^ BIT(key, 11) ^ BIT(d16, 5) ^ BIT(d16, 2)) << 13) | |
| 360 | 363 | (( BIT(key, 9) ^ BIT(cnt, 3)) << 12) | |
| r15082 | r15083 | |
| 369 | 372 | ((1 ^ BIT(key, 8) ^ (BIT(cnt, 7) | BIT(d16, 3))) << 3) | |
| 370 | 373 | (( BIT(key, 14) ^ (BIT(cnt, 1) | BIT(d16, 7))) << 2) | |
| 371 | 374 | ((1 ^ BIT(key, 12) ^ (BIT(cnt, 7) & BIT(d16, 7))) << 1) | |
| 372 | (( (BIT(cnt, 0) | BIT(cnt, 2))) << 0); | |
| 375 | //(( (BIT(cnt, 0) | BIT(cnt, 2))) << 0); | |
| 376 | ((1 ^ BIT(key, 0) ^ BIT(cnt, 2)) << 0); | |
| 373 | 377 | |
| 374 | 378 | cnt++; |
| 375 | 379 | |
| r15082 | r15083 | |
| 491 | 495 | static void memn_driver_init( running_machine &machine ) |
| 492 | 496 | { |
| 493 | 497 | namcos10_state *state = machine.driver_data<namcos10_state>(); |
| 494 | UINT8 *BIOS = (UINT8 *) | |
| 498 | UINT8 *BIOS = (UINT8 *)sta | |
| 495 | 499 | state->nand_base = (UINT8 *)state->memregion( "user2" )->base(); |
| 496 | 500 | |
| 497 | 501 | state->nand_copy( (UINT32 *)( BIOS + 0x0000000 ), 0x08000, 0x001c000 ); |
| r15082 | r15083 | |
|---|---|---|
| 187 | 187 | |
| 188 | 188 | READ16_MEMBER(gauntlet_state::port4_r) |
| 189 | 189 | { |
| 190 | int temp = i | |
| 190 | int temp = iop | |
| 191 | 191 | if (m_cpu_to_sound_ready) temp ^= 0x0020; |
| 192 | 192 | if (m_sound_to_cpu_ready) temp ^= 0x0010; |
| 193 | 193 | return temp; |
| r15082 | r15083 | |
| 240 | 240 | if (m_cpu_to_sound_ready) temp ^= 0x80; |
| 241 | 241 | if (m_sound_to_cpu_ready) temp ^= 0x40; |
| 242 | 242 | if (!tms5220_readyq_r(machine().device("tms"))) temp ^= 0x20; |
| 243 | if (!(i | |
| 243 | if (!(iop | |
| 244 | 244 | |
| 245 | 245 | return temp; |
| 246 | 246 | } |
| r15082 | r15083 | |
| 408 | 408 | PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 409 | 409 | PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) |
| 410 | 410 | PORT_BIT( 0x0030, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 411 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_VBLANK | |
| 411 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 412 | 412 | PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 413 | 413 | |
| 414 | 414 | PORT_START("COIN") /* 1020 (sound) */ |
| r15082 | r15083 | |
| 455 | 455 | PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 456 | 456 | PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) |
| 457 | 457 | PORT_BIT( 0x0030, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 458 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_VBLANK | |
| 458 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 459 | 459 | PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 460 | 460 | |
| 461 | 461 | PORT_START("COIN") /* 1020 (sound) */ |
| r15082 | r15083 | |
|---|---|---|
| 183 | 183 | switch (m_mahjong_input_select[0]) |
| 184 | 184 | { |
| 185 | 185 | case 0x01: |
| 186 | mj_input = i | |
| 186 | mj_input = iop | |
| 187 | 187 | break; |
| 188 | 188 | case 0x02: |
| 189 | mj_input = i | |
| 189 | mj_input = iop | |
| 190 | 190 | break; |
| 191 | 191 | case 0x04: |
| 192 | mj_input = i | |
| 192 | mj_input = iop | |
| 193 | 193 | break; |
| 194 | 194 | case 0x08: |
| 195 | mj_input = i | |
| 195 | mj_input = iop | |
| 196 | 196 | break; |
| 197 | 197 | case 0x10: |
| 198 | mj_input = i | |
| 198 | mj_input = iop | |
| 199 | 199 | break; |
| 200 | 200 | default: |
| 201 | 201 | mj_input = 0; |
| r15082 | r15083 | |
| 209 | 209 | READ32_MEMBER(ms32_state::ms32_read_inputs3) |
| 210 | 210 | { |
| 211 | 211 | int a,b,c,d; |
| 212 | a = input_port_read(machine(), "AN2?"); // unused? | |
| 213 | b = input_port_read(machine(), "AN2?"); // unused? | |
| 214 | c = input_port_read(machine(), "AN1"); | |
| 215 | d = (input_port_read(machine(), "AN0") - 0xb0) & 0xff; | |
| 212 | a = ioport("AN2?")->read(); // unused? | |
| 213 | b = ioport("AN2?")->read(); // unused? | |
| 214 | c = ioport("AN1")->read(); | |
| 215 | d = (ioport("AN0")->read() - 0xb0) & 0xff; | |
| 216 | 216 | return a << 24 | b << 16 | c << 8 | d << 0; |
| 217 | 217 | } |
| 218 | 218 | |
| r15082 | r15083 | |
| 2202 | 2202 | { |
| 2203 | 2203 | ms32_state *state = machine.driver_data<ms32_state>(); |
| 2204 | 2204 | state_save_register_global(machine, state->m_to_main); |
| 2205 | state->membank("bank4")->configure_entries(0, 16, | |
| 2205 | state->membank("bank4")->configure_entries(0, 16, sta | |
| 2206 | 2206 | state->membank("bank5")->configure_entries(0, 16, state->memregion("audiocpu")->base() + 0x14000, 0x4000); |
| 2207 | 2207 | } |
| 2208 | 2208 |
| r15082 | r15083 | |
|---|---|---|
| 910 | 910 | } |
| 911 | 911 | LOG(("%s: IC5 PIA Read of Port A (AUX1)\n",device->machine().describe_context())); |
| 912 | 912 | |
| 913 | return | |
| 913 | return | |
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | static WRITE8_DEVICE_HANDLER( pia_ic5_porta_w ) |
| r15082 | r15083 | |
| 1099 | 1099 | coin_lockout_w(device->machine(), 1, (pia_ic5->b_output() & 0x02) ); |
| 1100 | 1100 | coin_lockout_w(device->machine(), 2, (pia_ic5->b_output() & 0x04) ); |
| 1101 | 1101 | coin_lockout_w(device->machine(), 3, (pia_ic5->b_output() & 0x08) ); |
| 1102 | return | |
| 1102 | return | |
| 1103 | 1103 | } |
| 1104 | 1104 | |
| 1105 | 1105 | |
| r15082 | r15083 | |
| 1415 | 1415 | /* The orange inputs are polled twice as often as the black ones, for reasons of efficiency. |
| 1416 | 1416 | This is achieved via connecting every input line to an AND gate, thus allowing two strobes |
| 1417 | 1417 | to represent each orange input bank (strobes are active low). */ |
| 1418 | pia_ic5->cb1_w(input_port_read(device->machine(), "AUX2") & 0x80); | |
| 1419 | return input_port_read(device->machine(), portnames[state->m_input_strobe]); | |
| 1418 | pia_ic5->cb1_w(device->machine().root_device().ioport("AUX2")->read() & 0x80); | |
| 1419 | return device->machine().root_device().ioport(portnames[state->m_input_strobe])->read(); | |
| 1420 | 1420 | } |
| 1421 | 1421 | |
| 1422 | 1422 |
| r15082 | r15083 | |
|---|---|---|
| 45 | 45 | switch (offset<<1) |
| 46 | 46 | { |
| 47 | 47 | case 0: |
| 48 | return i | |
| 48 | return iop | |
| 49 | 49 | |
| 50 | 50 | case 2: |
| 51 | return i | |
| 51 | return iop | |
| 52 | 52 | |
| 53 | 53 | case 4: |
| 54 | return i | |
| 54 | return iop | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | return ~0; |
| r15082 | r15083 | |
| 120 | 120 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 121 | 121 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 122 | 122 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 123 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 123 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 124 | 124 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 125 | 125 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 126 | 126 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 119 | 119 | { |
| 120 | 120 | switch(m_mux_data) |
| 121 | 121 | { |
| 122 | case 1: return input_port_read(machine(), "IN1"); | |
| 123 | case 2: return input_port_read(machine(), "IN2"); | |
| 124 | case 4: return input_port_read(machine(), "IN3"); | |
| 122 | case 1: return ioport("IN1")->read(); | |
| 123 | case 2: return ioport("IN2")->read(); | |
| 124 | case 4: return ioport("IN3")->read(); | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | return m_mux_data; |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | |
| 110 | 110 | static INTERRUPT_GEN( redalert_vblank_interrupt ) |
| 111 | 111 | { |
| 112 | if( | |
| 112 | if( | |
| 113 | 113 | /* the service coin as conntected to the CPU's RDY pin as well */ |
| 114 | 114 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 115 | 115 | |
| r15082 | r15083 | |
| 136 | 136 | { |
| 137 | 137 | cputag_set_input_line(machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE); |
| 138 | 138 | |
| 139 | return i | |
| 139 | return iop | |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | READ8_MEMBER(redalert_state::panther_unk_r) |
| 143 | 143 | { |
| 144 | return ((machine().rand() & 0x01) | (i | |
| 144 | return ((machine().rand() & 0x01) | (iop | |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /************************************* |
| r15082 | r15083 | |
|---|---|---|
| 143 | 143 | |
| 144 | 144 | READ8_MEMBER(mcr3_state::demoderm_ip1_r) |
| 145 | 145 | { |
| 146 | return input_port_read(machine(), "MONO.IP1") | | |
| 147 | (input_port_read(machine(), m_input_mux ? "MONO.IP1.ALT2" : "MONO.IP1.ALT1") << 2); | |
| 146 | return ioport("MONO.IP1")->read() | | |
| 147 | (ioport(m_input_mux ? "MONO.IP1.ALT2" : "MONO.IP1.ALT1")->read() << 2); | |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | |
| 151 | 151 | READ8_MEMBER(mcr3_state::demoderm_ip2_r) |
| 152 | 152 | { |
| 153 | return input_port_read(machine(), "MONO.IP2") | | |
| 154 | (input_port_read(machine(), m_input_mux ? "MONO.IP2.ALT2" : "MONO.IP2.ALT1") << 2); | |
| 153 | return ioport("MONO.IP2")->read() | | |
| 154 | (ioport(m_input_mux ? "MONO.IP2.ALT2" : "MONO.IP2.ALT1")->read() << 2); | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
| r15082 | r15083 | |
| 182 | 182 | READ8_MEMBER(mcr3_state::maxrpm_ip2_r) |
| 183 | 183 | { |
| 184 | 184 | static const UINT8 shift_bits[5] = { 0x00, 0x05, 0x06, 0x01, 0x02 }; |
| 185 | UINT8 start = input_port_read(machine(), "MONO.IP0"); | |
| 186 | UINT8 shift = input_port_read(machine(), "SHIFT"); | |
| 185 | UINT8 start = ioport("MONO.IP0")->read(); | |
| 186 | UINT8 shift = ioport("SHIFT")->read(); | |
| 187 | 187 | |
| 188 | 188 | /* reset on a start */ |
| 189 | 189 | if (!(start & 0x08)) |
| r15082 | r15083 | |
| 256 | 256 | |
| 257 | 257 | /* when the read is toggled is when the ADC value is latched */ |
| 258 | 258 | if (!(data & 0x80)) |
| 259 | m_latched_input = i | |
| 259 | m_latched_input = iop | |
| 260 | 260 | |
| 261 | 261 | /* when both the write and the enable are low, it's a write to the ADC0844 */ |
| 262 | 262 | /* unfortunately the behavior below doesn't match up with the inputs on the */ |
| r15082 | r15083 | |
| 278 | 278 | |
| 279 | 279 | READ8_MEMBER(mcr3_state::rampage_ip4_r) |
| 280 | 280 | { |
| 281 | return i | |
| 281 | return iop | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | |
| r15082 | r15083 | |
| 301 | 301 | |
| 302 | 302 | READ8_MEMBER(mcr3_state::powerdrv_ip2_r) |
| 303 | 303 | { |
| 304 | return i | |
| 304 | return iop | |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | |
| r15082 | r15083 | |
| 345 | 345 | |
| 346 | 346 | READ8_MEMBER(mcr3_state::stargrds_ip0_r) |
| 347 | 347 | { |
| 348 | UINT8 result = i | |
| 348 | UINT8 result = iop | |
| 349 | 349 | if (m_input_mux) |
| 350 | result = (result & ~0x0a) | (i | |
| 350 | result = (result & ~0x0a) | (iop | |
| 351 | 351 | return (result & ~0x10) | ((m_sounds_good->read(space, 0) << 4) & 0x10); |
| 352 | 352 | } |
| 353 | 353 | |
| r15082 | r15083 | |
| 388 | 388 | |
| 389 | 389 | READ8_MEMBER(mcr3_state::spyhunt_ip1_r) |
| 390 | 390 | { |
| 391 | return i | |
| 391 | return iop | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | |
| 395 | 395 | READ8_MEMBER(mcr3_state::spyhunt_ip2_r) |
| 396 | 396 | { |
| 397 | 397 | /* multiplexed steering wheel/gas pedal */ |
| 398 | return i | |
| 398 | return iop | |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | |
| r15082 | r15083 | |
| 447 | 447 | { |
| 448 | 448 | /* multiplexed steering wheel/gas pedal */ |
| 449 | 449 | if (m_input_mux) |
| 450 | return i | |
| 450 | return iop | |
| 451 | 451 | |
| 452 | return i | |
| 452 | return iop | |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 |
| r15082 | r15083 | |
|---|---|---|
| 25 | 25 | switch (offset<<1) |
| 26 | 26 | { |
| 27 | 27 | case 0: |
| 28 | return i | |
| 28 | return iop | |
| 29 | 29 | |
| 30 | 30 | case 2: |
| 31 | return i | |
| 31 | return iop | |
| 32 | 32 | |
| 33 | 33 | case 4: |
| 34 | return i | |
| 34 | return iop | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | logerror("CPU #0 PC %06x: warning - read unmapped memory address %06x\n",cpu_get_pc(&space.device()),0x30c000+offset); |
| r15082 | r15083 | |
| 150 | 150 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 151 | 151 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 152 | 152 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 153 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 153 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 154 | 154 | INPUT_PORTS_END |
| 155 | 155 | |
| 156 | 156 | /******************************************************************************/ |
| r15082 | r15083 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | READ16_MEMBER(taitob_state::tracky1_hi_r) |
| 338 | 338 | { |
| 339 | return i | |
| 339 | return iop | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | READ16_MEMBER(taitob_state::tracky1_lo_r) |
| 343 | 343 | { |
| 344 | return (i | |
| 344 | return (iop | |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | READ16_MEMBER(taitob_state::trackx1_hi_r) |
| 348 | 348 | { |
| 349 | return i | |
| 349 | return iop | |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | READ16_MEMBER(taitob_state::trackx1_lo_r) |
| 353 | 353 | { |
| 354 | return (i | |
| 354 | return (iop | |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | READ16_MEMBER(taitob_state::tracky2_hi_r) |
| 358 | 358 | { |
| 359 | return i | |
| 359 | return iop | |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | READ16_MEMBER(taitob_state::tracky2_lo_r) |
| 363 | 363 | { |
| 364 | return (i | |
| 364 | return (iop | |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | READ16_MEMBER(taitob_state::trackx2_hi_r) |
| 368 | 368 | { |
| 369 | return i | |
| 369 | return iop | |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | READ16_MEMBER(taitob_state::trackx2_lo_r) |
| 373 | 373 | { |
| 374 | return (i | |
| 374 | return (iop | |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | 377 | |
| r15082 | r15083 | |
| 438 | 438 | /* bit 7 - set all the time (Chip Select?) */ |
| 439 | 439 | |
| 440 | 440 | /* EEPROM */ |
| 441 | i | |
| 441 | iop | |
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
| r15082 | r15083 | |
| 475 | 475 | switch (offset) |
| 476 | 476 | { |
| 477 | 477 | case 0x01: |
| 478 | return i | |
| 478 | return iop | |
| 479 | 479 | |
| 480 | 480 | default: |
| 481 | 481 | return tc0640fio_r(m_tc0640fio, offset) << 8; |
| r15082 | r15083 | |
|---|---|---|
| 1604 | 1604 | } |
| 1605 | 1605 | if (ACCESSING_BITS_32_39) |
| 1606 | 1606 | { |
| 1607 | UINT64 reg = i | |
| 1607 | UINT64 reg = iop | |
| 1608 | 1608 | r |= reg << 32; |
| 1609 | 1609 | } |
| 1610 | 1610 | if (ACCESSING_BITS_24_31) |
| 1611 | 1611 | { |
| 1612 | UINT64 reg = i | |
| 1612 | UINT64 reg = iop | |
| 1613 | 1613 | r |= reg << 24; |
| 1614 | 1614 | } |
| 1615 | 1615 | if (ACCESSING_BITS_16_23) |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | READ8_MEMBER(jackal_state::topgunbl_rotary_r) |
| 87 | 87 | { |
| 88 | return (1 << i | |
| 88 | return (1 << iop | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | WRITE8_MEMBER(jackal_state::jackal_flipscreen_w) |
| r15082 | r15083 | |
|---|---|---|
| 315 | 315 | |
| 316 | 316 | CUSTOM_INPUT_MEMBER(mw8080bw_state::seawolf_erase_input_r) |
| 317 | 317 | { |
| 318 | return input_port_read(machine(), SEAWOLF_ERASE_SW_PORT_TAG) & | |
| 319 | input_port_read(machine(), SEAWOLF_ERASE_DIP_PORT_TAG); | |
| 318 | return ioport(SEAWOLF_ERASE_SW_PORT_TAG)->read() & | |
| 319 | ioport(SEAWOLF_ERASE_DIP_PORT_TAG)->read(); | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
| r15082 | r15083 | |
| 353 | 353 | /* The actual commutator pcb (encoder) has 30 positions and works like the table says. */ |
| 354 | 354 | PORT_BIT( 0x1f, 0x0f, IPT_POSITIONAL ) PORT_POSITIONS(30) PORT_REMAP_TABLE(seawolf_controller_table) PORT_INVERT PORT_SENSITIVITY(20) PORT_KEYDELTA(8) PORT_CENTERDELTA(0) PORT_NAME("Periscope axis") PORT_CROSSHAIR(X, ((float)MW8080BW_HPIXCOUNT - 28) / MW8080BW_HPIXCOUNT, 16.0 / MW8080BW_HPIXCOUNT, 32.0 / MW8080BW_VBSTART) |
| 355 | 355 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 356 | PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0xe0, PORTCOND_NOTEQUALS, 0xe0) PORT_DIPLOCATION("G4:1,2") | |
| 357 | PORT_DIPSETTING( 0x00, "60 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_NOTEQUALS, 0x00) | |
| 358 | PORT_DIPSETTING( 0x40, "70 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_NOTEQUALS, 0x00) | |
| 359 | PORT_DIPSETTING( 0x80, "80 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_NOTEQUALS, 0x00) | |
| 360 | PORT_DIPSETTING( 0xc0, "90 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_NOTEQUALS, 0x00) | |
| 361 | PORT_DIPSETTING( 0x00, "60 seconds" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_EQUALS, 0x00) | |
| 362 | PORT_DIPSETTING( 0x40, "70 seconds" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_EQUALS, 0x00) | |
| 363 | PORT_DIPSETTING( 0x80, "80 seconds" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_EQUALS, 0x00) | |
| 364 | PORT_DIPSETTING( 0xc0, "90 seconds" ) PORT_CONDITION("IN1", 0xe0, PORTCOND_EQUALS, 0x00) | |
| 356 | PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0xe0, NOTEQUALS, 0xe0) PORT_DIPLOCATION("G4:1,2") | |
| 357 | PORT_DIPSETTING( 0x00, "60 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, NOTEQUALS, 0x00) | |
| 358 | PORT_DIPSETTING( 0x40, "70 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, NOTEQUALS, 0x00) | |
| 359 | PORT_DIPSETTING( 0x80, "80 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, NOTEQUALS, 0x00) | |
| 360 | PORT_DIPSETTING( 0xc0, "90 seconds + 20 extended" ) PORT_CONDITION("IN1", 0xe0, NOTEQUALS, 0x00) | |
| 361 | PORT_DIPSETTING( 0x00, "60 seconds" ) PORT_CONDITION("IN1", 0xe0, EQUALS, 0x00) | |
| 362 | PORT_DIPSETTING( 0x40, "70 seconds" ) PORT_CONDITION("IN1", 0xe0, EQUALS, 0x00) | |
| 363 | PORT_DIPSETTING( 0x80, "80 seconds" ) PORT_CONDITION("IN1", 0xe0, EQUALS, 0x00) | |
| 364 | PORT_DIPSETTING( 0xc0, "90 seconds" ) PORT_CONDITION("IN1", 0xe0, EQUALS, 0x00) | |
| 365 | 365 | |
| 366 | 366 | PORT_START("IN1") |
| 367 | 367 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 368 | 368 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) |
| 369 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0xe0, | |
| 369 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0xe0, | |
| 370 | 370 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 371 | 371 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 372 | 372 | PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) |
| r15082 | r15083 | |
| 548 | 548 | |
| 549 | 549 | UINT8 tornbase_get_cabinet_type(running_machine &machine) |
| 550 | 550 | { |
| 551 | return in | |
| 551 | return machine.root_device().ioport | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | |
| 555 | 555 | CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_hit_left_input_r) |
| 556 | 556 | { |
| 557 | return i | |
| 557 | return iop | |
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | |
| r15082 | r15083 | |
| 565 | 565 | switch (tornbase_get_cabinet_type(machine())) |
| 566 | 566 | { |
| 567 | 567 | case TORNBASE_CAB_TYPE_UPRIGHT_OLD: |
| 568 | ret = i | |
| 568 | ret = iop | |
| 569 | 569 | break; |
| 570 | 570 | |
| 571 | 571 | case TORNBASE_CAB_TYPE_UPRIGHT_NEW: |
| 572 | 572 | case TORNBASE_CAB_TYPE_COCKTAIL: |
| 573 | 573 | default: |
| 574 | ret = i | |
| 574 | ret = iop | |
| 575 | 575 | break; |
| 576 | 576 | } |
| 577 | 577 | |
| r15082 | r15083 | |
| 587 | 587 | { |
| 588 | 588 | case TORNBASE_CAB_TYPE_UPRIGHT_OLD: |
| 589 | 589 | case TORNBASE_CAB_TYPE_UPRIGHT_NEW: |
| 590 | ret = i | |
| 590 | ret = iop | |
| 591 | 591 | break; |
| 592 | 592 | |
| 593 | 593 | case TORNBASE_CAB_TYPE_COCKTAIL: |
| 594 | 594 | default: |
| 595 | ret = i | |
| 595 | ret = iop | |
| 596 | 596 | break; |
| 597 | 597 | } |
| 598 | 598 | |
| r15082 | r15083 | |
| 602 | 602 | |
| 603 | 603 | CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_pitch_right_input_r) |
| 604 | 604 | { |
| 605 | return i | |
| 605 | return iop | |
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | |
| 609 | 609 | CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_score_input_r) |
| 610 | 610 | { |
| 611 | return input_port_read(machine(), TORNBASE_SCORE_SW_PORT_TAG) & | |
| 612 | input_port_read(machine(), TORNBASE_SCORE_DIP_PORT_TAG); | |
| 611 | return ioport(TORNBASE_SCORE_SW_PORT_TAG)->read() & | |
| 612 | ioport(TORNBASE_SCORE_DIP_PORT_TAG)->read(); | |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | |
| r15082 | r15083 | |
| 643 | 643 | PORT_START("IN0") |
| 644 | 644 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_left_input_r, NULL) |
| 645 | 645 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_left_input_r, NULL) |
| 646 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 646 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 647 | 647 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 648 | 648 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 649 | 649 | |
| r15082 | r15083 | |
| 656 | 656 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 657 | 657 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* schematics shows it as "START", but not used by the software */ |
| 658 | 658 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_score_input_r, NULL) |
| 659 | PORT_DIPNAME( 0x78, 0x40, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 659 | PORT_DIPNAME( 0x78, 0x40, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 660 | 660 | PORT_DIPSETTING( 0x18, "4 Coins/1 Inning" ) |
| 661 | 661 | PORT_DIPSETTING( 0x10, "3 Coins/1 Inning" ) |
| 662 | 662 | PORT_DIPSETTING( 0x38, "4 Coins/2 Innings" ) |
| r15082 | r15083 | |
| 774 | 774 | PORT_BIT( 0xff, 0x7f, IPT_PADDLE ) PORT_MINMAX(0x01,0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1) |
| 775 | 775 | |
| 776 | 776 | PORT_START("IN2") |
| 777 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x0c, | |
| 777 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x0c, | |
| 778 | 778 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| 779 | 779 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 780 | 780 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 781 | 781 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 782 | 782 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("E3:3,4") |
| 783 | PORT_DIPSETTING( 0x0c, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x20) | |
| 784 | PORT_DIPSETTING( 0x00, "80 seconds + 40 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x20) | |
| 785 | PORT_DIPSETTING( 0x08, "99 seconds + 50 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x20) | |
| 786 | PORT_DIPSETTING( 0x0c, "60 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x20) | |
| 787 | PORT_DIPSETTING( 0x00, "80 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x20) | |
| 788 | PORT_DIPSETTING( 0x08, "99 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x20) | |
| 783 | PORT_DIPSETTING( 0x0c, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x20) | |
| 784 | PORT_DIPSETTING( 0x00, "80 seconds + 40 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x20) | |
| 785 | PORT_DIPSETTING( 0x08, "99 seconds + 50 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x20) | |
| 786 | PORT_DIPSETTING( 0x0c, "60 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x20) | |
| 787 | PORT_DIPSETTING( 0x00, "80 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x20) | |
| 788 | PORT_DIPSETTING( 0x08, "99 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x20) | |
| 789 | 789 | PORT_DIPSETTING( 0x04, "Test Mode" ) |
| 790 | PORT_DIPNAME( 0x30, 0x00, "Extended Time At" ) PORT_CONDITION("IN2", 0x0c, | |
| 790 | PORT_DIPNAME( 0x30, 0x00, "Extended Time At" ) PORT_CONDITION("IN2", 0x0c, | |
| 791 | 791 | PORT_DIPSETTING( 0x10, "2.00" ) |
| 792 | 792 | PORT_DIPSETTING( 0x00, "2.50" ) |
| 793 | 793 | PORT_DIPSETTING( 0x20, DEF_STR( None ) ) |
| 794 | 794 | /* PORT_DIPSETTING( 0x30, DEF_STR( None ) ) */ |
| 795 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Language )) PORT_CONDITION("IN2", 0x0c, | |
| 795 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Language )) PORT_CONDITION("IN2", 0x0c, | |
| 796 | 796 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 797 | 797 | PORT_DIPSETTING( 0x40, DEF_STR( German ) ) |
| 798 | 798 | PORT_DIPSETTING( 0x80, DEF_STR( French ) ) |
| r15082 | r15083 | |
| 817 | 817 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 818 | 818 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 819 | 819 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 820 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0x04) PORT_DIPLOCATION("E3:3,4") | |
| 821 | PORT_DIPSETTING( 0x00, "45 seconds + 22 extended" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0xc0) | |
| 822 | PORT_DIPSETTING( 0x04, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0xc0) | |
| 823 | PORT_DIPSETTING( 0x08, "75 seconds + 37 extended" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0xc0) | |
| 824 | PORT_DIPSETTING( 0x0c, "90 seconds + 45 extended" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0xc0) | |
| 825 | PORT_DIPSETTING( 0x00, "45 seconds" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_EQUALS, 0xc0) | |
| 826 | PORT_DIPSETTING( 0x04, "60 seconds" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_EQUALS, 0xc0) | |
| 827 | PORT_DIPSETTING( 0x08, "75 seconds" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_EQUALS, 0xc0) | |
| 828 | PORT_DIPSETTING( 0x0c, "90 seconds" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_EQUALS, 0xc0) | |
| 829 | PORT_DIPNAME( 0x30, 0x20, "Extended Time At" ) PORT_CONDITION("IN2", 0xc0, PORTCOND_NOTEQUALS, 0xc0) PORT_DIPLOCATION("E3:5,6") | |
| 820 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0x04) PORT_DIPLOCATION("E3:3,4") | |
| 821 | PORT_DIPSETTING( 0x00, "45 seconds + 22 extended" ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0xc0) | |
| 822 | PORT_DIPSETTING( 0x04, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0xc0) | |
| 823 | PORT_DIPSETTING( 0x08, "75 seconds + 37 extended" ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0xc0) | |
| 824 | PORT_DIPSETTING( 0x0c, "90 seconds + 45 extended" ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0xc0) | |
| 825 | PORT_DIPSETTING( 0x00, "45 seconds" ) PORT_CONDITION("IN2", 0xc0, EQUALS, 0xc0) | |
| 826 | PORT_DIPSETTING( 0x04, "60 seconds" ) PORT_CONDITION("IN2", 0xc0, EQUALS, 0xc0) | |
| 827 | PORT_DIPSETTING( 0x08, "75 seconds" ) PORT_CONDITION("IN2", 0xc0, EQUALS, 0xc0) | |
| 828 | PORT_DIPSETTING( 0x0c, "90 seconds" ) PORT_CONDITION("IN2", 0xc0, EQUALS, 0xc0) | |
| 829 | PORT_DIPNAME( 0x30, 0x20, "Extended Time At" ) PORT_CONDITION("IN2", 0xc0, NOTEQUALS, 0xc0) PORT_DIPLOCATION("E3:5,6") | |
| 830 | 830 | PORT_DIPSETTING( 0x00, "350" ) |
| 831 | 831 | PORT_DIPSETTING( 0x10, "400" ) |
| 832 | 832 | PORT_DIPSETTING( 0x20, "450" ) |
| r15082 | r15083 | |
| 940 | 940 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 941 | 941 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* labeled 'Not Used' */ |
| 942 | 942 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 943 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x80, | |
| 943 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x80, | |
| 944 | 944 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 945 | 945 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 946 | 946 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) |
| 947 | 947 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) |
| 948 | PORT_DIPNAME( 0x40, 0x40, "2 Player Game Time" ) PORT_CONDITION("IN1", 0x80, | |
| 948 | PORT_DIPNAME( 0x40, 0x40, "2 Player Game Time" ) PORT_CONDITION("IN1", 0x80, | |
| 949 | 949 | PORT_DIPSETTING( 0x40, "4 minutes" ) |
| 950 | 950 | PORT_DIPSETTING( 0x00, "6 minutes" ) |
| 951 | 951 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "SW:4" ) |
| r15082 | r15083 | |
| 1024 | 1024 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1025 | 1025 | |
| 1026 | 1026 | PORT_START("IN2") |
| 1027 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x10, | |
| 1027 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x10, | |
| 1028 | 1028 | PORT_DIPSETTING( 0x02, "2 Coins per Player" ) |
| 1029 | 1029 | PORT_DIPSETTING( 0x03, "2 Coins/1 or 2 Players" ) |
| 1030 | 1030 | PORT_DIPSETTING( 0x00, "1 Coin per Player" ) |
| 1031 | 1031 | PORT_DIPSETTING( 0x01, "1 Coin/1 or 2 Players" ) |
| 1032 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x10, | |
| 1032 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x10, | |
| 1033 | 1033 | PORT_DIPSETTING( 0x00, "60 seconds" ) |
| 1034 | 1034 | PORT_DIPSETTING( 0x04, "70 seconds" ) |
| 1035 | 1035 | PORT_DIPSETTING( 0x08, "80 seconds" ) |
| r15082 | r15083 | |
| 1111 | 1111 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) |
| 1112 | 1112 | |
| 1113 | 1113 | PORT_START("IN2") |
| 1114 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1114 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1115 | 1115 | PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Players" ) |
| 1116 | 1116 | PORT_DIPSETTING( 0x01, "1 Coin/1 or 2 Players, 2 Coins/3 or 4 Players" ) |
| 1117 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1117 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1118 | 1118 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1119 | 1119 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1120 | PORT_DIPNAME( 0x0c, 0x04, "Rounds" ) PORT_CONDITION("IN2", 0x80, | |
| 1120 | PORT_DIPNAME( 0x0c, 0x04, "Rounds" ) PORT_CONDITION("IN2", 0x80, | |
| 1121 | 1121 | PORT_DIPSETTING( 0x00, "2" ) |
| 1122 | 1122 | PORT_DIPSETTING( 0x04, "3" ) |
| 1123 | 1123 | PORT_DIPSETTING( 0x08, "4" ) |
| 1124 | 1124 | PORT_DIPSETTING( 0x0c, "5" ) |
| 1125 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1125 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1126 | 1126 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1127 | 1127 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 1128 | PORT_DIPNAME( 0x60, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN2", 0x80, | |
| 1128 | PORT_DIPNAME( 0x60, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN2", 0x80, | |
| 1129 | 1129 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 1130 | 1130 | PORT_DIPSETTING( 0x20, "Language 2" ) |
| 1131 | 1131 | PORT_DIPSETTING( 0x40, "Language 3" ) |
| r15082 | r15083 | |
| 1190 | 1190 | UINT32 ret; |
| 1191 | 1191 | |
| 1192 | 1192 | if (m_desertgun_controller_select) |
| 1193 | ret = i | |
| 1193 | ret = iop | |
| 1194 | 1194 | else |
| 1195 | ret = i | |
| 1195 | ret = iop | |
| 1196 | 1196 | |
| 1197 | 1197 | return ret; |
| 1198 | 1198 | } |
| r15082 | r15083 | |
| 1203 | 1203 | UINT32 ret; |
| 1204 | 1204 | |
| 1205 | 1205 | if (m_desertgun_controller_select) |
| 1206 | ret = i | |
| 1206 | ret = iop | |
| 1207 | 1207 | else |
| 1208 | ret = i | |
| 1208 | ret = iop | |
| 1209 | 1209 | |
| 1210 | 1210 | return ret; |
| 1211 | 1211 | } |
| r15082 | r15083 | |
| 1234 | 1234 | |
| 1235 | 1235 | PORT_START("IN1") |
| 1236 | 1236 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_dip_sw_0_1_r, NULL) |
| 1237 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN1", 0x30, | |
| 1237 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN1", 0x30, | |
| 1238 | 1238 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 1239 | 1239 | PORT_DIPSETTING( 0x04, DEF_STR( German ) ) |
| 1240 | 1240 | PORT_DIPSETTING( 0x08, DEF_STR( French ) ) |
| r15082 | r15083 | |
| 1257 | 1257 | /* D0 and D1 in the DIP SW input port can reflect two sets of switches depending on the controller |
| 1258 | 1258 | select bit. These two ports are fakes to handle this case */ |
| 1259 | 1259 | PORT_START(DESERTGU_DIP_SW_0_1_SET_1_TAG) |
| 1260 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x30, | |
| 1260 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x30, | |
| 1261 | 1261 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| 1262 | 1262 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1263 | 1263 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| r15082 | r15083 | |
| 1265 | 1265 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1266 | 1266 | |
| 1267 | 1267 | PORT_START(DESERTGU_DIP_SW_0_1_SET_2_TAG) |
| 1268 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0x30, | |
| 1268 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0x30, | |
| 1269 | 1269 | PORT_DIPSETTING( 0x00, "40 seconds + 30 extended" ) |
| 1270 | 1270 | PORT_DIPSETTING( 0x01, "50 seconds + 30 extended" ) |
| 1271 | 1271 | PORT_DIPSETTING( 0x02, "60 seconds + 30 extended" ) |
| r15082 | r15083 | |
| 1318 | 1318 | { |
| 1319 | 1319 | UINT32 ret; |
| 1320 | 1320 | |
| 1321 | if (input_port_read(machine(), DPLAY_CAB_TYPE_PORT_TAG) == DPLAY_CAB_TYPE_UPRIGHT) | |
| 1322 | ret = input_port_read(machine(), DPLAY_L_PITCH_PORT_TAG); | |
| 1321 | if (ioport(DPLAY_CAB_TYPE_PORT_TAG)->read() == DPLAY_CAB_TYPE_UPRIGHT) | |
| 1322 | ret = ioport(DPLAY_L_PITCH_PORT_TAG)->read(); | |
| 1323 | 1323 | else |
| 1324 | ret = i | |
| 1324 | ret = iop | |
| 1325 | 1325 | |
| 1326 | 1326 | return ret; |
| 1327 | 1327 | } |
| r15082 | r15083 | |
| 1329 | 1329 | |
| 1330 | 1330 | CUSTOM_INPUT_MEMBER(mw8080bw_state::dplay_pitch_right_input_r) |
| 1331 | 1331 | { |
| 1332 | return i | |
| 1332 | return iop | |
| 1333 | 1333 | } |
| 1334 | 1334 | |
| 1335 | 1335 | |
| r15082 | r15083 | |
| 1361 | 1361 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1362 | 1362 | |
| 1363 | 1363 | PORT_START("IN2") |
| 1364 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage )) PORT_CONDITION("IN2", 0x40, | |
| 1364 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage )) PORT_CONDITION("IN2", 0x40, | |
| 1365 | 1365 | PORT_DIPSETTING( 0x05, "2 Coins/1 Inning/1 Player, 4 Coins/1 Inning/2 Players, 8 Coins/3 Innings/2 Players" ) |
| 1366 | 1366 | PORT_DIPSETTING( 0x04, "1 Coin/1 Inning/1 Player, 2 Coins/1 Inning/2 Players, 4 Coins/3 Innings/2 Players" ) |
| 1367 | 1367 | PORT_DIPSETTING( 0x02, "2 Coins per Inning" ) |
| r15082 | r15083 | |
| 1370 | 1370 | /* PORT_DIPSETTING( 0x06, "1 Coin per Inning" ) */ |
| 1371 | 1371 | /* PORT_DIPSETTING( 0x07, "1 Coin per Inning" ) */ |
| 1372 | 1372 | PORT_DIPSETTING( 0x01, "1 Coin/1 Inning, 2 Coins/3 Innings" ) |
| 1373 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1373 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1374 | 1374 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1375 | 1375 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1376 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1376 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1377 | 1377 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1378 | 1378 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 1379 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1379 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1380 | 1380 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1381 | 1381 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 1382 | 1382 | PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "C1:7" ) |
| r15082 | r15083 | |
| 1425 | 1425 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1426 | 1426 | |
| 1427 | 1427 | PORT_START("IN2") |
| 1428 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage )) PORT_CONDITION("IN2", 0x40, | |
| 1428 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage )) PORT_CONDITION("IN2", 0x40, | |
| 1429 | 1429 | PORT_DIPSETTING( 0x05, "2 Coins/1 Inning/1 Player, 4 Coins/1 Inning/2 Players, 8 Coins/3 Innings/2 Players" ) |
| 1430 | 1430 | PORT_DIPSETTING( 0x04, "1 Coin/1 Inning/1 Player, 2 Coins/1 Inning/2 Players, 4 Coins/3 Innings/2 Players" ) |
| 1431 | 1431 | PORT_DIPSETTING( 0x02, "2 Coins per Inning" ) |
| r15082 | r15083 | |
| 1434 | 1434 | /* PORT_DIPSETTING( 0x06, "1 Coin per Inning" ) */ |
| 1435 | 1435 | /* PORT_DIPSETTING( 0x07, "1 Coin per Inning" ) */ |
| 1436 | 1436 | PORT_DIPSETTING( 0x01, "1 Coin/1 Inning, 2 Coins/3 Innings" ) |
| 1437 | PORT_DIPNAME( 0x08, 0x00, "Wall Knock Out Behavior" ) PORT_CONDITION("IN2", 0x40, | |
| 1437 | PORT_DIPNAME( 0x08, 0x00, "Wall Knock Out Behavior" ) PORT_CONDITION("IN2", 0x40, | |
| 1438 | 1438 | PORT_DIPSETTING( 0x00, "Individually" ) |
| 1439 | 1439 | PORT_DIPSETTING( 0x08, "In Pairs" ) |
| 1440 | PORT_DIPNAME( 0x10, 0x00, "Double Score when Special Lit" ) PORT_CONDITION("IN2", 0x40, | |
| 1440 | PORT_DIPNAME( 0x10, 0x00, "Double Score when Special Lit" ) PORT_CONDITION("IN2", 0x40, | |
| 1441 | 1441 | PORT_DIPSETTING( 0x00, "Home Run Only" ) |
| 1442 | 1442 | PORT_DIPSETTING( 0x10, "Any Hit" ) |
| 1443 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1443 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x40, | |
| 1444 | 1444 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1445 | 1445 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 1446 | 1446 | PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "C1:7" ) |
| r15082 | r15083 | |
| 1550 | 1550 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1551 | 1551 | |
| 1552 | 1552 | PORT_START("IN2") |
| 1553 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1553 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1554 | 1554 | PORT_DIPSETTING( 0x01, "2 Coins per Player" ) |
| 1555 | 1555 | PORT_DIPSETTING( 0x00, "2 Coins/1 or 2 Players" ) |
| 1556 | 1556 | PORT_DIPSETTING( 0x03, "1 Coin per Player" ) |
| 1557 | 1557 | PORT_DIPSETTING( 0x02, "1 Coin/1 or 2 Players" ) |
| 1558 | PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x80, | |
| 1558 | PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x80, | |
| 1559 | 1559 | PORT_DIPSETTING( 0x00, "60 seconds + 30 extended" ) |
| 1560 | 1560 | PORT_DIPSETTING( 0x08, "70 seconds + 35 extended" ) |
| 1561 | 1561 | PORT_DIPSETTING( 0x04, "80 seconds + 40 extended" ) |
| 1562 | 1562 | PORT_DIPSETTING( 0x0c, "90 seconds + 45 extended" ) |
| 1563 | PORT_DIPNAME( 0x30, 0x10, "Extended Time At" ) PORT_CONDITION("IN2", 0x80, | |
| 1563 | PORT_DIPNAME( 0x30, 0x10, "Extended Time At" ) PORT_CONDITION("IN2", 0x80, | |
| 1564 | 1564 | PORT_DIPSETTING( 0x00, "500" ) |
| 1565 | 1565 | PORT_DIPSETTING( 0x20, "700" ) |
| 1566 | 1566 | PORT_DIPSETTING( 0x10, "1000" ) |
| 1567 | 1567 | PORT_DIPSETTING( 0x30, "1300" ) |
| 1568 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1568 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, | |
| 1569 | 1569 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1570 | 1570 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1571 | 1571 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "D1:8" ) |
| r15082 | r15083 | |
| 1644 | 1644 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */ |
| 1645 | 1645 | |
| 1646 | 1646 | PORT_START("IN2") |
| 1647 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x10, | |
| 1647 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x10, | |
| 1648 | 1648 | PORT_DIPSETTING( 0x02, "2 Coins per Player" ) |
| 1649 | 1649 | PORT_DIPSETTING( 0x03, "2 Coins/1 or 2 Players" ) |
| 1650 | 1650 | PORT_DIPSETTING( 0x00, "1 Coin per Player" ) |
| 1651 | 1651 | PORT_DIPSETTING( 0x01, "1 Coin/1 or 2 Players" ) |
| 1652 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x10, | |
| 1652 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Game_Time ) ) PORT_CONDITION("IN2", 0x10, | |
| 1653 | 1653 | PORT_DIPSETTING( 0x00, "60 seconds" ) |
| 1654 | 1654 | PORT_DIPSETTING( 0x04, "70 seconds" ) |
| 1655 | 1655 | PORT_DIPSETTING( 0x08, "80 seconds" ) |
| r15082 | r15083 | |
| 1711 | 1711 | |
| 1712 | 1712 | if (m_clowns_controller_select) |
| 1713 | 1713 | { |
| 1714 | ret = i | |
| 1714 | ret = iop | |
| 1715 | 1715 | } |
| 1716 | 1716 | else |
| 1717 | 1717 | { |
| 1718 | ret = i | |
| 1718 | ret = iop | |
| 1719 | 1719 | } |
| 1720 | 1720 | |
| 1721 | 1721 | return ret; |
| r15082 | r15083 | |
| 1754 | 1754 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */ |
| 1755 | 1755 | |
| 1756 | 1756 | PORT_START("IN2") |
| 1757 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1757 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1758 | 1758 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) |
| 1759 | 1759 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_2C ) ) |
| 1760 | 1760 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1761 | 1761 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 1762 | PORT_DIPNAME( 0x0c, 0x00, "Bonus Game" ) PORT_CONDITION("IN2", 0x80, | |
| 1762 | PORT_DIPNAME( 0x0c, 0x00, "Bonus Game" ) PORT_CONDITION("IN2", 0x80, | |
| 1763 | 1763 | PORT_DIPSETTING( 0x00, "No Bonus" ) |
| 1764 | 1764 | PORT_DIPSETTING( 0x04, "9000" ) |
| 1765 | 1765 | PORT_DIPSETTING( 0x08, "11000" ) |
| 1766 | 1766 | PORT_DIPSETTING( 0x0c, "13000" ) |
| 1767 | PORT_DIPNAME( 0x10, 0x00, "Balloon Resets" ) PORT_CONDITION("IN2", 0x80, | |
| 1767 | PORT_DIPNAME( 0x10, 0x00, "Balloon Resets" ) PORT_CONDITION("IN2", 0x80, | |
| 1768 | 1768 | PORT_DIPSETTING( 0x00, "Each Row" ) |
| 1769 | 1769 | PORT_DIPSETTING( 0x10, "All Rows" ) |
| 1770 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x80, | |
| 1770 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x80, | |
| 1771 | 1771 | PORT_DIPSETTING( 0x00, "3000" ) |
| 1772 | 1772 | PORT_DIPSETTING( 0x20, "4000" ) |
| 1773 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Lives ) ) PORT_CONDITION("IN2", 0x80, | |
| 1773 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Lives ) ) PORT_CONDITION("IN2", 0x80, | |
| 1774 | 1774 | PORT_DIPSETTING( 0x00, "3" ) |
| 1775 | 1775 | PORT_DIPSETTING( 0x40, "4" ) |
| 1776 | 1776 | /* test mode - press coin button for input test */ |
| r15082 | r15083 | |
| 1803 | 1803 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1804 | 1804 | |
| 1805 | 1805 | PORT_START("IN2") |
| 1806 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1806 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, | |
| 1807 | 1807 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) |
| 1808 | 1808 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_2C ) ) |
| 1809 | 1809 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1810 | 1810 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 1811 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) ) PORT_CONDITION("IN2", 0x80, | |
| 1811 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Lives ) ) PORT_CONDITION("IN2", 0x80, | |
| 1812 | 1812 | PORT_DIPSETTING( 0x00, "2" ) |
| 1813 | 1813 | PORT_DIPSETTING( 0x04, "3" ) |
| 1814 | 1814 | PORT_DIPSETTING( 0x08, "4" ) |
| 1815 | 1815 | PORT_DIPSETTING( 0x0c, "5" ) |
| 1816 | PORT_DIPNAME( 0x10, 0x00, "Balloon Resets" ) PORT_CONDITION("IN2", 0x80, | |
| 1816 | PORT_DIPNAME( 0x10, 0x00, "Balloon Resets" ) PORT_CONDITION("IN2", 0x80, | |
| 1817 | 1817 | PORT_DIPSETTING( 0x00, "Each Row" ) |
| 1818 | 1818 | PORT_DIPSETTING( 0x10, "All Rows" ) |
| 1819 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x80, | |
| 1819 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x80, | |
| 1820 | 1820 | PORT_DIPSETTING( 0x00, "3000" ) |
| 1821 | 1821 | PORT_DIPSETTING( 0x20, "4000" ) |
| 1822 | 1822 | PORT_DIPNAME( 0x40, 0x00, "Input Test" ) PORT_DIPLOCATION("SW:7") |
| r15082 | r15083 | |
| 1895 | 1895 | but ROM contents suggests it's not connected (no different languages or unmapped reads) */ |
| 1896 | 1896 | PORT_START("IN2") |
| 1897 | 1897 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("C2:1,2") |
| 1898 | PORT_DIPSETTING( 0x03, "40 seconds + 20 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x00) // 45 + 20 for 2 players | |
| 1899 | PORT_DIPSETTING( 0x02, "50 seconds + 25 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x00) // 60 + 30 for 2 players | |
| 1900 | PORT_DIPSETTING( 0x01, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x00) // 75 + 35 for 2 players | |
| 1901 | PORT_DIPSETTING( 0x00, "70 seconds + 35 extended" ) PORT_CONDITION("IN2", 0x30, PORTCOND_NOTEQUALS, 0x00) // 90 + 45 for 2 players | |
| 1902 | PORT_DIPSETTING( 0x03, "40 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x00) | |
| 1903 | PORT_DIPSETTING( 0x02, "50 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x00) | |
| 1904 | PORT_DIPSETTING( 0x01, "60 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x00) | |
| 1905 | PORT_DIPSETTING( 0x00, "70 seconds" ) PORT_CONDITION("IN2", 0x30, PORTCOND_EQUALS, 0x00) | |
| 1898 | PORT_DIPSETTING( 0x03, "40 seconds + 20 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x00) // 45 + 20 for 2 players | |
| 1899 | PORT_DIPSETTING( 0x02, "50 seconds + 25 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x00) // 60 + 30 for 2 players | |
| 1900 | PORT_DIPSETTING( 0x01, "60 seconds + 30 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x00) // 75 + 35 for 2 players | |
| 1901 | PORT_DIPSETTING( 0x00, "70 seconds + 35 extended" ) PORT_CONDITION("IN2", 0x30, NOTEQUALS, 0x00) // 90 + 45 for 2 players | |
| 1902 | PORT_DIPSETTING( 0x03, "40 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x00) | |
| 1903 | PORT_DIPSETTING( 0x02, "50 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x00) | |
| 1904 | PORT_DIPSETTING( 0x01, "60 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x00) | |
| 1905 | PORT_DIPSETTING( 0x00, "70 seconds" ) PORT_CONDITION("IN2", 0x30, EQUALS, 0x00) | |
| 1906 | 1906 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("C2:3,4") |
| 1907 | 1907 | PORT_DIPSETTING( 0x00, "1 Coin per Player" ) |
| 1908 | 1908 | PORT_DIPSETTING( 0x04, "1 Coin/1 or 2 Players" ) |
| r15082 | r15083 | |
| 1972 | 1972 | |
| 1973 | 1973 | static INPUT_PORTS_START( shuffle ) |
| 1974 | 1974 | PORT_START("IN0") |
| 1975 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN0", 0x80, | |
| 1975 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN0", 0x80, | |
| 1976 | 1976 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 1977 | 1977 | PORT_DIPSETTING( 0x01, DEF_STR( French ) ) |
| 1978 | 1978 | PORT_DIPSETTING( 0x02, DEF_STR( German ) ) |
| 1979 | 1979 | /* PORT_DIPSETTING( 0x03, DEF_STR( German ) ) */ |
| 1980 | PORT_DIPNAME( 0x0c, 0x04, "Points to Win" ) PORT_CONDITION("IN0", 0x80, | |
| 1980 | PORT_DIPNAME( 0x0c, 0x04, "Points to Win" ) PORT_CONDITION("IN0", 0x80, | |
| 1981 | 1981 | PORT_DIPSETTING( 0x00, "Game 1 = 25, Game 2 = 11" ) |
| 1982 | 1982 | PORT_DIPSETTING( 0x04, "Game 1 = 35, Game 2 = 15" ) |
| 1983 | 1983 | PORT_DIPSETTING( 0x08, "Game 1 = 40, Game 2 = 18" ) |
| 1984 | 1984 | PORT_DIPSETTING( 0x0c, "Game 1 = 50, Game 2 = 21" ) |
| 1985 | PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) PORT_CONDITION("IN0", 0x80, | |
| 1985 | PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) PORT_CONDITION("IN0", 0x80, | |
| 1986 | 1986 | PORT_DIPSETTING( 0x30, "2 Coins per Player" ) |
| 1987 | 1987 | PORT_DIPSETTING( 0x20, "2 Coins/1 or 2 Players" ) |
| 1988 | 1988 | PORT_DIPSETTING( 0x10, "1 Coin per Player" ) |
| 1989 | 1989 | PORT_DIPSETTING( 0x00, "1 Coin/1 or 2 Players" ) |
| 1990 | PORT_DIPNAME( 0x40, 0x40, "Time Limit" ) PORT_CONDITION("IN0", 0x80, | |
| 1990 | PORT_DIPNAME( 0x40, 0x40, "Time Limit" ) PORT_CONDITION("IN0", 0x80, | |
| 1991 | 1991 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1992 | 1992 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1993 | 1993 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "B3:8" ) |
| r15082 | r15083 | |
| 2073 | 2073 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2074 | 2074 | |
| 2075 | 2075 | PORT_START("IN2") |
| 2076 | PORT_DIPNAME( 0x03, 0x02, "Number of Cans" ) PORT_CONDITION("IN2", 0x20, | |
| 2076 | PORT_DIPNAME( 0x03, 0x02, "Number of Cans" ) PORT_CONDITION("IN2", 0x20, | |
| 2077 | 2077 | PORT_DIPSETTING( 0x03, "10" ) |
| 2078 | 2078 | PORT_DIPSETTING( 0x02, "15" ) |
| 2079 | 2079 | PORT_DIPSETTING( 0x01, "20" ) |
| 2080 | 2080 | PORT_DIPSETTING( 0x00, "25" ) |
| 2081 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x20, | |
| 2081 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x20, | |
| 2082 | 2082 | PORT_DIPSETTING( 0x08, "2 Coins per Player" ) |
| 2083 | 2083 | PORT_DIPSETTING( 0x0c, "2 Coins/1 or 2 Players" ) |
| 2084 | 2084 | PORT_DIPSETTING( 0x00, "1 Coin per Player" ) |
| 2085 | 2085 | PORT_DIPSETTING( 0x04, "1 Coin/1 or 2 Players" ) |
| 2086 | PORT_DIPNAME( 0x10, 0x10, "Extended Time Reward" ) PORT_CONDITION("IN2", 0x20, | |
| 2086 | PORT_DIPNAME( 0x10, 0x10, "Extended Time Reward" ) PORT_CONDITION("IN2", 0x20, | |
| 2087 | 2087 | PORT_DIPSETTING( 0x10, "3 extra cans" ) |
| 2088 | 2088 | PORT_DIPSETTING( 0x00, "5 extra cans" ) |
| 2089 | 2089 | PORT_SERVICE_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW:6" ) |
| 2090 | PORT_DIPNAME( 0xc0, 0x40, "Extended Time At" ) PORT_CONDITION("IN2", 0x20, | |
| 2090 | PORT_DIPNAME( 0xc0, 0x40, "Extended Time At" ) PORT_CONDITION("IN2", 0x20, | |
| 2091 | 2091 | PORT_DIPSETTING( 0xc0, "150" ) |
| 2092 | 2092 | PORT_DIPSETTING( 0x80, "175" ) |
| 2093 | 2093 | PORT_DIPSETTING( 0x40, "225" ) |
| r15082 | r15083 | |
| 2234 | 2234 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* marked as COIN #2, but the software never reads it */ |
| 2235 | 2235 | |
| 2236 | 2236 | PORT_START("IN2") |
| 2237 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x30, | |
| 2237 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Bonus_Life ) ) PORT_CONDITION("IN2", 0x30, | |
| 2238 | 2238 | PORT_DIPSETTING( 0x00, "2000 4000 8000" ) |
| 2239 | 2239 | PORT_DIPSETTING( 0x01, "3000 6000 12000" ) |
| 2240 | 2240 | PORT_DIPSETTING( 0x02, "4000 8000 16000" ) |
| 2241 | 2241 | PORT_DIPSETTING( 0x03, "5000 10000 20000" ) |
| 2242 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x30, | |
| 2242 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x30, | |
| 2243 | 2243 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 2244 | 2244 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2245 | 2245 | PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) |
| r15082 | r15083 | |
| 2249 | 2249 | PORT_DIPSETTING( 0x30, "Bonus Off" ) |
| 2250 | 2250 | PORT_DIPSETTING( 0x20, "Cross Hatch" ) |
| 2251 | 2251 | PORT_DIPSETTING( 0x10, "Test Mode" ) |
| 2252 | PORT_DIPNAME( 0xc0, 0x40, "Time" ) PORT_CONDITION("IN2", 0x30, | |
| 2252 | PORT_DIPNAME( 0xc0, 0x40, "Time" ) PORT_CONDITION("IN2", 0x30, | |
| 2253 | 2253 | PORT_DIPSETTING( 0x00, "45" ) |
| 2254 | 2254 | PORT_DIPSETTING( 0x40, "60" ) |
| 2255 | 2255 | PORT_DIPSETTING( 0x80, "75" ) |
| r15082 | r15083 | |
| 2329 | 2329 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */ |
| 2330 | 2330 | |
| 2331 | 2331 | PORT_START("IN1") |
| 2332 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x20, | |
| 2332 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN1", 0x20, | |
| 2333 | 2333 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) |
| 2334 | 2334 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2335 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0x20, | |
| 2335 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Game_Time ) ) PORT_CONDITION("IN1", 0x20, | |
| 2336 | 2336 | PORT_DIPSETTING( 0x00, "45 seconds + 20 extended (at 20 points)" ) |
| 2337 | 2337 | PORT_DIPSETTING( 0x02, "60 seconds + 25 extended (at 25 points)" ) |
| 2338 | 2338 | PORT_DIPSETTING( 0x04, "75 seconds + 30 extended (at 30 points)" ) |
| 2339 | 2339 | PORT_DIPSETTING( 0x06, "90 seconds + 35 extended (at 35 points)" ) |
| 2340 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2340 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2341 | 2341 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2342 | 2342 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2343 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2343 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2344 | 2344 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2345 | 2345 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 2346 | 2346 | PORT_SERVICE_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW:6" ) |
| 2347 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2347 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2348 | 2348 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2349 | 2349 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 2350 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2350 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x20, | |
| 2351 | 2351 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2352 | 2352 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2353 | 2353 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 2452 | 2452 | |
| 2453 | 2453 | static INPUT_PORTS_START( bowler ) |
| 2454 | 2454 | PORT_START("IN0") |
| 2455 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN0", 0x80, | |
| 2455 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN0", 0x80, | |
| 2456 | 2456 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 2457 | 2457 | PORT_DIPSETTING( 0x01, DEF_STR( French ) ) |
| 2458 | 2458 | PORT_DIPSETTING( 0x02, DEF_STR( German ) ) |
| 2459 | 2459 | /*PORT_DIPSETTING( 0x03, DEF_STR( German ) ) */ |
| 2460 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_CONDITION("IN0", 0x80, | |
| 2460 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_CONDITION("IN0", 0x80, | |
| 2461 | 2461 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2462 | 2462 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) /* every 17 minutes */ |
| 2463 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Game_Time ) ) PORT_CONDITION("IN0", 0x80, | |
| 2463 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Game_Time ) ) PORT_CONDITION("IN0", 0x80, | |
| 2464 | 2464 | PORT_DIPSETTING( 0x00, "No Limit" ) |
| 2465 | 2465 | PORT_DIPSETTING( 0x08, "5 Minutes" ) |
| 2466 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN0", 0x80, | |
| 2466 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("IN0", 0x80, | |
| 2467 | 2467 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 2468 | 2468 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2469 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) PORT_CONDITION("IN0", 0x80, | |
| 2469 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) ) PORT_CONDITION("IN0", 0x80, | |
| 2470 | 2470 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 2471 | 2471 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 2472 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_CONDITION("IN0", 0x80, | |
| 2472 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_CONDITION("IN0", 0x80, | |
| 2473 | 2473 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 2474 | 2474 | PORT_DIPSETTING( 0x40, "Cocktail (not functional)" ) |
| 2475 | 2475 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_HIGH, "B3:8" ) |
| r15082 | r15083 | |
| 2534 | 2534 | |
| 2535 | 2535 | CUSTOM_INPUT_MEMBER(mw8080bw_state::invaders_coin_input_r) |
| 2536 | 2536 | { |
| 2537 | UINT32 ret = i | |
| 2537 | UINT32 ret = iop | |
| 2538 | 2538 | |
| 2539 | 2539 | coin_counter_w(machine(), 0, !ret); |
| 2540 | 2540 | |
| r15082 | r15083 | |
| 2552 | 2552 | if (invaders_is_cabinet_cocktail(machine())) |
| 2553 | 2553 | ret = 0x03; |
| 2554 | 2554 | else |
| 2555 | ret = i | |
| 2555 | ret = iop | |
| 2556 | 2556 | |
| 2557 | 2557 | return ret; |
| 2558 | 2558 | } |
| r15082 | r15083 | |
| 2568 | 2568 | if (invaders_is_cabinet_cocktail(machine())) |
| 2569 | 2569 | ret = 0x01; |
| 2570 | 2570 | else |
| 2571 | ret = i | |
| 2571 | ret = iop | |
| 2572 | 2572 | |
| 2573 | 2573 | return ret; |
| 2574 | 2574 | } |
| r15082 | r15083 | |
| 2584 | 2584 | if (invaders_is_cabinet_cocktail(machine())) |
| 2585 | 2585 | ret = 0x07; |
| 2586 | 2586 | else |
| 2587 | ret = i | |
| 2587 | ret = iop | |
| 2588 | 2588 | |
| 2589 | 2589 | return ret; |
| 2590 | 2590 | } |
| r15082 | r15083 | |
| 2592 | 2592 | |
| 2593 | 2593 | CUSTOM_INPUT_MEMBER(mw8080bw_state::invaders_in1_control_r) |
| 2594 | 2594 | { |
| 2595 | return i | |
| 2595 | return iop | |
| 2596 | 2596 | } |
| 2597 | 2597 | |
| 2598 | 2598 | |
| r15082 | r15083 | |
| 2604 | 2604 | cocktail PCB: P2 controls */ |
| 2605 | 2605 | |
| 2606 | 2606 | if (invaders_is_cabinet_cocktail(machine())) |
| 2607 | ret = i | |
| 2607 | ret = iop | |
| 2608 | 2608 | else |
| 2609 | ret = i | |
| 2609 | ret = iop | |
| 2610 | 2610 | |
| 2611 | 2611 | return ret; |
| 2612 | 2612 | } |
| r15082 | r15083 | |
| 2614 | 2614 | |
| 2615 | 2615 | int invaders_is_cabinet_cocktail(running_machine &machine) |
| 2616 | 2616 | { |
| 2617 | return in | |
| 2617 | return machine.root_device().ioport | |
| 2618 | 2618 | } |
| 2619 | 2619 | |
| 2620 | 2620 | |
| r15082 | r15083 | |
| 2741 | 2741 | |
| 2742 | 2742 | CUSTOM_INPUT_MEMBER(mw8080bw_state::blueshrk_coin_input_r) |
| 2743 | 2743 | { |
| 2744 | UINT32 ret = i | |
| 2744 | UINT32 ret = iop | |
| 2745 | 2745 | |
| 2746 | 2746 | coin_counter_w(machine(), 0, !ret); |
| 2747 | 2747 | |
| r15082 | r15083 | |
| 2770 | 2770 | PORT_START("IN1") |
| 2771 | 2771 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2772 | 2772 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,blueshrk_coin_input_r, NULL) |
| 2773 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, | |
| 2773 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, | |
| 2774 | 2774 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2775 | 2775 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2776 | 2776 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) /* not shown on the schematics, instead DIP SW4 is connected here */ |
| 2777 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, | |
| 2777 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, | |
| 2778 | 2778 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2779 | 2779 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2780 | PORT_DIPNAME( 0x60, 0x40, "Replay" ) PORT_CONDITION("IN1", 0x80, | |
| 2780 | PORT_DIPNAME( 0x60, 0x40, "Replay" ) PORT_CONDITION("IN1", 0x80, | |
| 2781 | 2781 | PORT_DIPSETTING( 0x20, "14000" ) |
| 2782 | 2782 | PORT_DIPSETTING( 0x40, "18000" ) |
| 2783 | 2783 | PORT_DIPSETTING( 0x60, "22000" ) |
| r15082 | r15083 | |
| 2820 | 2820 | #ifdef UNUSED_FUNCTION |
| 2821 | 2821 | static UINT32 invad2ct_coin_input_r(void *param) |
| 2822 | 2822 | { |
| 2823 | UINT32 ret = in | |
| 2823 | UINT32 ret = machine.root_device().ioport | |
| 2824 | 2824 | |
| 2825 | 2825 | coin_counter_w(machine, 0, !ret); |
| 2826 | 2826 |
| r15082 | r15083 | |
|---|---|---|
| 450 | 450 | { |
| 451 | 451 | switch(m_mux_data) |
| 452 | 452 | { |
| 453 | case 0x01: return input_port_read(machine(), "PL2_01"); | |
| 454 | case 0x02: return input_port_read(machine(), "PL2_02"); | |
| 455 | case 0x04: return input_port_read(machine(), "PL2_03"); | |
| 456 | case 0x08: return input_port_read(machine(), "PL2_04"); | |
| 457 | case 0x10: return input_port_read(machine(), "PL2_05"); | |
| 453 | case 0x01: return ioport("PL2_01")->read(); | |
| 454 | case 0x02: return ioport("PL2_02")->read(); | |
| 455 | case 0x04: return ioport("PL2_03")->read(); | |
| 456 | case 0x08: return ioport("PL2_04")->read(); | |
| 457 | case 0x10: return ioport("PL2_05")->read(); | |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | return 0xff; |
| r15082 | r15083 | |
| 464 | 464 | { |
| 465 | 465 | switch(m_mux_data) |
| 466 | 466 | { |
| 467 | case 0x01: return input_port_read(machine(), "PL1_01"); | |
| 468 | case 0x02: return input_port_read(machine(), "PL1_02"); | |
| 469 | case 0x04: return input_port_read(machine(), "PL1_03"); | |
| 470 | case 0x08: return input_port_read(machine(), "PL1_04"); | |
| 471 | case 0x10: return input_port_read(machine(), "PL1_05"); | |
| 467 | case 0x01: return ioport("PL1_01")->read(); | |
| 468 | case 0x02: return ioport("PL1_02")->read(); | |
| 469 | case 0x04: return ioport("PL1_03")->read(); | |
| 470 | case 0x08: return ioport("PL1_04")->read(); | |
| 471 | case 0x10: return ioport("PL1_05")->read(); | |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 34 | 34 | switch (offset << 1) |
| 35 | 35 | { |
| 36 | 36 | case 4: |
| 37 | return i | |
| 37 | return iop | |
| 38 | 38 | case 2: |
| 39 | return i | |
| 39 | return iop | |
| 40 | 40 | case 0: |
| 41 | return i | |
| 41 | return iop | |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | logerror("Unknown control read at %d\n",offset); |
| r15082 | r15083 | |
| 112 | 112 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 113 | 113 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 114 | 114 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 115 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 115 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 116 | 116 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 117 | 117 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 118 | 118 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 214 | 214 | { |
| 215 | 215 | int rhi, rlo; |
| 216 | 216 | |
| 217 | rhi = ( input_port_read(machine(), "DSWA") & 0x01 ) << 4; | |
| 218 | rhi |= ( input_port_read(machine(), "DSWA") & 0x04 ) << 3; | |
| 219 | rhi |= ( input_port_read(machine(), "DSWA") & 0x10 ) << 2; | |
| 220 | rhi |= ( input_port_read(machine(), "DSWA") & 0x40 ) << 1; | |
| 217 | rhi = ( ioport("DSWA")->read() & 0x01 ) << 4; | |
| 218 | rhi |= ( ioport("DSWA")->read() & 0x04 ) << 3; | |
| 219 | rhi |= ( ioport("DSWA")->read() & 0x10 ) << 2; | |
| 220 | rhi |= ( ioport("DSWA")->read() & 0x40 ) << 1; | |
| 221 | 221 | |
| 222 | rlo = ( input_port_read(machine(), "DSWB") & 0x01 ); | |
| 223 | rlo |= ( input_port_read(machine(), "DSWB") & 0x04 ) >> 1; | |
| 224 | rlo |= ( input_port_read(machine(), "DSWB") & 0x10 ) >> 2; | |
| 225 | rlo |= ( input_port_read(machine(), "DSWB") & 0x40 ) >> 3; | |
| 222 | rlo = ( ioport("DSWB")->read() & 0x01 ); | |
| 223 | rlo |= ( ioport("DSWB")->read() & 0x04 ) >> 1; | |
| 224 | rlo |= ( ioport("DSWB")->read() & 0x10 ) >> 2; | |
| 225 | rlo |= ( ioport("DSWB")->read() & 0x40 ) >> 3; | |
| 226 | 226 | |
| 227 | 227 | return rhi | rlo; |
| 228 | 228 | } |
| r15082 | r15083 | |
| 231 | 231 | { |
| 232 | 232 | int rhi, rlo; |
| 233 | 233 | |
| 234 | rhi = ( input_port_read(machine(), "DSWA") & 0x02 ) << 3; | |
| 235 | rhi |= ( input_port_read(machine(), "DSWA") & 0x08 ) << 2; | |
| 236 | rhi |= ( input_port_read(machine(), "DSWA") & 0x20 ) << 1; | |
| 237 | rhi |= ( input_port_read(machine(), "DSWA") & 0x80 ); | |
| 234 | rhi = ( ioport("DSWA")->read() & 0x02 ) << 3; | |
| 235 | rhi |= ( ioport("DSWA")->read() & 0x08 ) << 2; | |
| 236 | rhi |= ( ioport("DSWA")->read() & 0x20 ) << 1; | |
| 237 | rhi |= ( ioport("DSWA")->read() & 0x80 ); | |
| 238 | 238 | |
| 239 | rlo = ( input_port_read(machine(), "DSWB") & 0x02 ) >> 1; | |
| 240 | rlo |= ( input_port_read(machine(), "DSWB") & 0x08 ) >> 2; | |
| 241 | rlo |= ( input_port_read(machine(), "DSWB") & 0x20 ) >> 3; | |
| 242 | rlo |= ( input_port_read(machine(), "DSWB") & 0x80 ) >> 4; | |
| 239 | rlo = ( ioport("DSWB")->read() & 0x02 ) >> 1; | |
| 240 | rlo |= ( ioport("DSWB")->read() & 0x08 ) >> 2; | |
| 241 | rlo |= ( ioport("DSWB")->read() & 0x20 ) >> 3; | |
| 242 | rlo |= ( ioport("DSWB")->read() & 0x80 ) >> 4; | |
| 243 | 243 | |
| 244 | 244 | return rhi | rlo; |
| 245 | 245 | } |
| r15082 | r15083 | |
|---|---|---|
| 470 | 470 | |
| 471 | 471 | switch (*m_hardhead_ip) |
| 472 | 472 | { |
| 473 | case 0: return input_port_read(machine(), "P1"); | |
| 474 | case 1: return input_port_read(machine(), "P2"); | |
| 475 | case 2: return input_port_read(machine(), "DSW1"); | |
| 476 | case 3: return input_port_read(machine(), "DSW2"); | |
| 473 | case 0: return ioport("P1")->read(); | |
| 474 | case 1: return ioport("P2")->read(); | |
| 475 | case 2: return ioport("DSW1")->read(); | |
| 476 | case 3: return ioport("DSW2")->read(); | |
| 477 | 477 | default: |
| 478 | 478 | logerror("CPU #0 - PC %04X: Unknown IP read: %02X\n", cpu_get_pc(&space.device()), *m_hardhead_ip); |
| 479 | 479 | return 0xff; |
| r15082 | r15083 | |
| 1329 | 1329 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1330 | 1330 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1331 | 1331 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1332 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1332 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1333 | 1333 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1334 | 1334 | |
| 1335 | 1335 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 265 | 265 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 266 | 266 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 267 | 267 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* same coinage as COIN1 */ |
| 268 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 268 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 269 | 269 | |
| 270 | 270 | PORT_START ("P1") |
| 271 | 271 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 223 | 223 | /* however if the previous instruction was JSR (which caused a write to */ |
| 224 | 224 | /* the stack), fetch the address of the next instruction. */ |
| 225 | 225 | addr1 = cpu_get_previouspc(&space->device()); |
| 226 | src1 = (addr1 < 0x9000) ? state->m_rambase : s | |
| 226 | src1 = (addr1 < 0x9000) ? state->m_rambase : state-> | |
| 227 | 227 | if (decrypted[addr1] == 0x20) /* JSR $xxxx */ |
| 228 | 228 | addr = src1[addr1 + 1] + 256 * src1[addr1 + 2]; |
| 229 | 229 | |
| r15082 | r15083 | |
| 550 | 550 | |
| 551 | 551 | READ8_MEMBER(btime_state::zoar_dsw1_read) |
| 552 | 552 | { |
| 553 | return (!machine().primary_screen->vblank() << 7) | (i | |
| 553 | return (!machine().primary_screen->vblank() << 7) | (iop | |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | static INPUT_PORTS_START( btime ) |
| r15082 | r15083 | |
| 611 | 611 | // PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("15D:8") |
| 612 | 612 | // PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 613 | 613 | // PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 615 | 615 | |
| 616 | 616 | PORT_START("DSW2") |
| 617 | 617 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("14D:1") |
| r15082 | r15083 | |
| 684 | 684 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 685 | 685 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 686 | 686 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 687 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 687 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 688 | 688 | |
| 689 | 689 | PORT_START("DSW2") |
| 690 | 690 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
| 833 | 833 | // PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8") |
| 834 | 834 | // PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 835 | 835 | // PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 836 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 836 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 837 | 837 | |
| 838 | 838 | PORT_START("DSW2") |
| 839 | 839 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1") |
| r15082 | r15083 | |
| 896 | 896 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 897 | 897 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 898 | 898 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 899 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 899 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 900 | 900 | |
| 901 | 901 | PORT_START("DSW2") |
| 902 | 902 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
| 972 | 972 | // PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) |
| 973 | 973 | // PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 974 | 974 | // PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 975 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 975 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 976 | 976 | |
| 977 | 977 | PORT_START("DSW2") |
| 978 | 978 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
| 1050 | 1050 | // PORT_DIPNAME( 0x80, 0x00, "Control Panel" ) PORT_DIPLOCATION("8D:8") |
| 1051 | 1051 | // PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1052 | 1052 | // PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 1053 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1053 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1054 | 1054 | |
| 1055 | 1055 | PORT_START("DSW2") |
| 1056 | 1056 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("7D:1") |
| r15082 | r15083 | |
| 1141 | 1141 | |
| 1142 | 1142 | PORT_START("VBLANK") |
| 1143 | 1143 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1144 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1144 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1145 | 1145 | INPUT_PORTS_END |
| 1146 | 1146 | |
| 1147 | 1147 | static INPUT_PORTS_START( sdtennis ) |
| r15082 | r15083 | |
| 1193 | 1193 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 1194 | 1194 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1195 | 1195 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 1196 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1196 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1197 | 1197 | |
| 1198 | 1198 | PORT_START("DSW2") |
| 1199 | 1199 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
|---|---|---|
| 162 | 162 | READ8_MEMBER(m14_state::m14_rng_r) |
| 163 | 163 | { |
| 164 | 164 | /* graphic artifacts happens if this doesn't return random values. */ |
| 165 | return (machine().rand() & 0x0f) | 0xf0; /* | (i | |
| 165 | return (machine().rand() & 0x0f) | 0xf0; /* | (iop | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /* Here routes the hopper & the inputs */ |
| r15082 | r15083 | |
| 175 | 175 | return 0; //0x43 status bits |
| 176 | 176 | } |
| 177 | 177 | else |
| 178 | return i | |
| 178 | return iop | |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | #if 0 |
| r15082 | r15083 | |
|---|---|---|
| 315 | 315 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 316 | 316 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 317 | 317 | PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 319 | 319 | |
| 320 | 320 | PORT_START("DSW1") |
| 321 | 321 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") |
| r15082 | r15083 | |
| 381 | 381 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 382 | 382 | |
| 383 | 383 | PORT_START("IN2") /* 0xa002 */ |
| 384 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 384 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 385 | 385 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nova2001_state,ninjakun_io_A002_ctrl_r, NULL) |
| 386 | 386 | |
| 387 | 387 | PORT_START("DSW1") // printed "SW 2" |
| r15082 | r15083 | |
| 442 | 442 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 443 | 443 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 444 | 444 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 446 | 446 | |
| 447 | 447 | PORT_START("IN1") |
| 448 | 448 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL |
| r15082 | r15083 | |
| 491 | 491 | |
| 492 | 492 | static INPUT_PORTS_START( raiders5 ) |
| 493 | 493 | PORT_START("IN0") |
| 494 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 494 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 495 | 495 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 496 | 496 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 497 | 497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r15082 | r15083 | |
|---|---|---|
| 238 | 238 | UINT8 i,res; |
| 239 | 239 | |
| 240 | 240 | // printf("%02x\n", m_mux_data); |
| 241 | res = i | |
| 241 | res = iop | |
| 242 | 242 | |
| 243 | 243 | for(i=0;i<8;i++) |
| 244 | 244 | { |
| 245 | 245 | if((~m_mux_data) & (1 << i)) |
| 246 | res |= i | |
| 246 | res |= iop | |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | return res; |
| r15082 | r15083 | |
| 260 | 260 | a side-by-side test (to know if the background colors really works) to be sure. */ |
| 261 | 261 | READ8_MEMBER(jantotsu_state::jantotsu_dsw2_r) |
| 262 | 262 | { |
| 263 | return (i | |
| 263 | return (iop | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | static WRITE8_DEVICE_HANDLER( jan_adpcm_w ) |
| r15082 | r15083 | |
| 490 | 490 | jantotsu_state *state = machine.driver_data<jantotsu_state>(); |
| 491 | 491 | |
| 492 | 492 | /*Load hard-wired background color.*/ |
| 493 | state->m_col_bank = (i | |
| 493 | state->m_col_bank = (state->iop | |
| 494 | 494 | |
| 495 | 495 | state->m_vram_bank = 0; |
| 496 | 496 | state->m_mux_data = 0; |
| r15082 | r15083 | |
|---|---|---|
| 449 | 449 | { |
| 450 | 450 | if (!(data & 0xff)) |
| 451 | 451 | { |
| 452 | m_analog_ports[0] = input_port_read_safe(machine(), "ANALOG0", 0); | |
| 453 | m_analog_ports[1] = input_port_read_safe(machine(), "ANALOG1", 0); | |
| 454 | m_analog_ports[2] = input_port_read_safe(machine(), "ANALOG2", 0); | |
| 455 | m_analog_ports[3] = input_port_read_safe(machine(), "ANALOG3", 0); | |
| 452 | m_analog_ports[0] = ioport("ANALOG0")->read_safe(0); | |
| 453 | m_analog_ports[1] = ioport("ANALOG1")->read_safe(0); | |
| 454 | m_analog_ports[2] = ioport("ANALOG2")->read_safe(0); | |
| 455 | m_analog_ports[3] = ioport("ANALOG3")->read_safe(0); | |
| 456 | 456 | } |
| 457 | 457 | } |
| 458 | 458 | else |
| r15082 | r15083 | |
|---|---|---|
| 181 | 181 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* SLAM */ |
| 182 | 182 | PORT_SERVICE( 0x20, IP_ACTIVE_HIGH) |
| 183 | 183 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* Serve */ |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* VBLANK */ | |
| 185 | 185 | |
| 186 | 186 | PORT_START("PADDLE") |
| 187 | 187 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x40, 0xb7) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) |
| r15082 | r15083 | |
|---|---|---|
| 741 | 741 | { |
| 742 | 742 | static const char *const ports[] = { "P1ROT", "P2ROT" }; |
| 743 | 743 | int which = (int)(FPTR)param; |
| 744 | int value = i | |
| 744 | int value = iop | |
| 745 | 745 | |
| 746 | 746 | if ((m_last_value[which] == 0x5 && value == 0x6) || (m_last_value[which] == 0x6 && value == 0x5)) |
| 747 | 747 | { |
| r15082 | r15083 | |
| 756 | 756 | |
| 757 | 757 | CUSTOM_INPUT_MEMBER(snk_state::gwarb_rotary) |
| 758 | 758 | { |
| 759 | if (i | |
| 759 | if (iop | |
| 760 | 760 | { |
| 761 | 761 | return gwar_rotary(field, param); |
| 762 | 762 | } |
| r15082 | r15083 | |
| 805 | 805 | CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_x) |
| 806 | 806 | { |
| 807 | 807 | |
| 808 | return i | |
| 808 | return iop | |
| 809 | 809 | } |
| 810 | 810 | |
| 811 | 811 | CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y) |
| 812 | 812 | { |
| 813 | 813 | |
| 814 | return i | |
| 814 | return iop | |
| 815 | 815 | } |
| 816 | 816 | |
| 817 | 817 | |
| r15082 | r15083 | |
| 824 | 824 | switch (bit_mask) |
| 825 | 825 | { |
| 826 | 826 | case 0x01: /* older games : "Occurrence" Dip Switch (DSW2:1) */ |
| 827 | return ((i | |
| 827 | return ((iop | |
| 828 | 828 | case 0xc0: /* older games : "Bonus Life" Dip Switches (DSW1:7,8) */ |
| 829 | return ((i | |
| 829 | return ((iop | |
| 830 | 830 | |
| 831 | 831 | case 0x04: /* later games : "Occurrence" Dip Switch (DSW1:3) */ |
| 832 | return ((i | |
| 832 | return ((iop | |
| 833 | 833 | case 0x30: /* later games : "Bonus Life" Dip Switches (DSW2:5,6) */ |
| 834 | return ((i | |
| 834 | return ((iop | |
| 835 | 835 | |
| 836 | 836 | default: |
| 837 | 837 | logerror("snk_bonus_r : invalid %02X bit_mask\n",bit_mask); |
| r15082 | r15083 | |
| 2388 | 2388 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:3") |
| 2389 | 2389 | PORT_DIPSETTING( 0x04, DEF_STR( Upright ) ) /* Dual Controls */ |
| 2390 | 2390 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 2391 | PORT_DIPNAME( 0x08, 0x00, "Gameplay" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) PORT_DIPLOCATION("DSW1:4") /* code at 0x011e */ | |
| 2392 | PORT_DIPSETTING( 0x00, "Basic Player" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 2393 | PORT_DIPSETTING( 0x08, "Avid Golfer" ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) | |
| 2394 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION("DSW1:4") | |
| 2395 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 2396 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) | |
| 2391 | PORT_DIPNAME( 0x08, 0x00, "Gameplay" ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) PORT_DIPLOCATION("DSW1:4") /* code at 0x011e */ | |
| 2392 | PORT_DIPSETTING( 0x00, "Basic Player" ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 2393 | PORT_DIPSETTING( 0x08, "Avid Golfer" ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x01) | |
| 2394 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) PORT_DIPLOCATION("DSW1:4") | |
| 2395 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 2396 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_CONDITION("DSW1", 0x01, EQUALS, 0x00) | |
| 2397 | 2397 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") |
| 2398 | 2398 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 2399 | 2399 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 194 | 194 | |
| 195 | 195 | READ16_MEMBER(highvdeo_state::read1_r) |
| 196 | 196 | { |
| 197 | return i | |
| 197 | return iop | |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | READ16_MEMBER(highvdeo_state::read2_r) |
| 201 | 201 | { |
| 202 | return i | |
| 202 | return iop | |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | READ16_MEMBER(highvdeo_state::read3_r) |
| 206 | 206 | { |
| 207 | return i | |
| 207 | return iop | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | WRITE16_MEMBER(highvdeo_state::tv_vcf_paletteram_w) |
| r15082 | r15083 | |
| 322 | 322 | // machine resets itself. |
| 323 | 323 | resetpulse ^= 0x40; |
| 324 | 324 | |
| 325 | return (i | |
| 325 | return (iop | |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | static WRITE16_DEVICE_HANDLER( tv_ncf_oki6376_w ) |
| r15082 | r15083 | |
|---|---|---|
| 813 | 813 | |
| 814 | 814 | switch( offset ) |
| 815 | 815 | { |
| 816 | case 0: case 1: result = (UINT8)(0x0f + input_port_read(machine(), "LIGHT1_Y") * 224/255); break; /* Y (p2) */ | |
| 817 | case 2: case 3: result = (UINT8)(0x26 + input_port_read(machine(), "LIGHT1_X") * 288/314); break; /* X (p2) */ | |
| 818 | case 4: case 5: result = (UINT8)(0x0f + input_port_read(machine(), "LIGHT0_Y") * 224/255); break; /* Y (p1) */ | |
| 819 | case 6: case 7: result = (UINT8)(0x26 + input_port_read(machine(), "LIGHT0_X") * 288/314); break; /* X (p1) */ | |
| 816 | case 0: case 1: result = (UINT8)(0x0f + ioport("LIGHT1_Y")->read() * 224/255); break; /* Y (p2) */ | |
| 817 | case 2: case 3: result = (UINT8)(0x26 + ioport("LIGHT1_X")->read() * 288/314); break; /* X (p2) */ | |
| 818 | case 4: case 5: result = (UINT8)(0x0f + ioport("LIGHT0_Y")->read() * 224/255); break; /* Y (p1) */ | |
| 819 | case 6: case 7: result = (UINT8)(0x26 + ioport("LIGHT0_X")->read() * 288/314); break; /* X (p1) */ | |
| 820 | 820 | } |
| 821 | 821 | return result<<24; |
| 822 | 822 | } /* gunbulet_gun_r */ |
| r15082 | r15083 | |
| 932 | 932 | switch (m_nbx_port6 & 0xf0) |
| 933 | 933 | { |
| 934 | 934 | case 0x00: |
| 935 | return i | |
| 935 | return iop | |
| 936 | 936 | |
| 937 | 937 | case 0x20: |
| 938 | return i | |
| 938 | return iop | |
| 939 | 939 | |
| 940 | 940 | case 0x40: |
| 941 | return i | |
| 941 | return iop | |
| 942 | 942 | |
| 943 | 943 | case 0x60: |
| 944 | return i | |
| 944 | return iop | |
| 945 | 945 | |
| 946 | 946 | default: |
| 947 | 947 | break; |
| r15082 | r15083 | |
| 955 | 955 | // register full scale, so it works... |
| 956 | 956 | READ8_MEMBER(namconb1_state::dac7_r)// bit 7 |
| 957 | 957 | { |
| 958 | return i | |
| 958 | return iop | |
| 959 | 959 | } |
| 960 | 960 | |
| 961 | 961 | READ8_MEMBER(namconb1_state::dac6_r)// bit 3 |
| 962 | 962 | { |
| 963 | return (i | |
| 963 | return (iop | |
| 964 | 964 | } |
| 965 | 965 | |
| 966 | 966 | READ8_MEMBER(namconb1_state::dac5_r)// bit 2 |
| 967 | 967 | { |
| 968 | return (i | |
| 968 | return (iop | |
| 969 | 969 | } |
| 970 | 970 | |
| 971 | 971 | READ8_MEMBER(namconb1_state::dac4_r)// bit 1 |
| 972 | 972 | { |
| 973 | return (i | |
| 973 | return (iop | |
| 974 | 974 | } |
| 975 | 975 | |
| 976 | 976 | READ8_MEMBER(namconb1_state::dac3_r)// bit 0 |
| 977 | 977 | { |
| 978 | return (i | |
| 978 | return (iop | |
| 979 | 979 | } |
| 980 | 980 | |
| 981 | 981 | READ8_MEMBER(namconb1_state::dac2_r)// bit 4 |
| 982 | 982 | { |
| 983 | return (i | |
| 983 | return (iop | |
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | READ8_MEMBER(namconb1_state::dac1_r)// bit 5 |
| 987 | 987 | { |
| 988 | return (i | |
| 988 | return (iop | |
| 989 | 989 | } |
| 990 | 990 | |
| 991 | 991 | READ8_MEMBER(namconb1_state::dac0_r)// bit 6 |
| 992 | 992 | { |
| 993 | return (i | |
| 993 | return (iop | |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | static ADDRESS_MAP_START( namcoc75_io, AS_IO, 8, namconb1_state ) |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | if ((pc == 0x000379de) || (pc == 0x000379cc) ) |
| 70 | 70 | m_maincpu->eat_cycles(100); |
| 71 | 71 | //else printf("PC %08x\n", pc ); |
| 72 | return i | |
| 72 | return iop | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| r15082 | r15083 | |
| 107 | 107 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 108 | 108 | PORT_SERVICE_NO_TOGGLE( 0x00000400, IP_ACTIVE_LOW ) |
| 109 | 109 | PORT_BIT( 0x00007800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 110 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 110 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 111 | 111 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 112 | 112 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 113 | 113 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| r15082 | r15083 | |
|---|---|---|
| 315 | 315 | READ8_MEMBER(cosmic_state::cosmicg_port_0_r) |
| 316 | 316 | { |
| 317 | 317 | /* The top four address lines from the CRTC are bits 0-3 */ |
| 318 | return (i | |
| 318 | return (iop | |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | READ8_MEMBER(cosmic_state::magspot_coinage_dip_r) |
| 322 | 322 | { |
| 323 | return (i | |
| 323 | return (iop | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | |
| r15082 | r15083 | |
| 328 | 328 | |
| 329 | 329 | READ8_MEMBER(cosmic_state::nomnlnd_port_0_1_r) |
| 330 | 330 | { |
| 331 | int control = input_port_read(machine(), offset ? "IN1" : "IN0"); | |
| 332 | int fire = input_port_read(machine(), "IN3"); | |
| 331 | int control = ioport(offset ? "IN1" : "IN0")->read(); | |
| 332 | int fire = ioport("IN3")->read(); | |
| 333 | 333 | |
| 334 | 334 | /* If firing - stop tank */ |
| 335 | 335 | if ((fire & 0xc0) == 0) return 0xff; |
| r15082 | r15083 | |
| 630 | 630 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 631 | 631 | |
| 632 | 632 | PORT_START("IN3") |
| 633 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 633 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 634 | 634 | PORT_BIT( 0x1e, IP_ACTIVE_LOW, IPT_UNUSED ) /* always HI */ |
| 635 | 635 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) /* reads what was written to 4808. Probably not used?? */ |
| 636 | 636 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| r15082 | r15083 | |
| 715 | 715 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 716 | 716 | |
| 717 | 717 | PORT_START("IN3") |
| 718 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 718 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 719 | 719 | PORT_BIT( 0x3e, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 720 | 720 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 721 | 721 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r15082 | r15083 | |
| 811 | 811 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 812 | 812 | |
| 813 | 813 | PORT_START("IN3") |
| 814 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 814 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 815 | 815 | PORT_BIT( 0x1e, IP_ACTIVE_LOW, IPT_UNUSED ) /* always HI */ |
| 816 | 816 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) /* reads what was written to 4808. Probably not used?? */ |
| 817 | 817 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| r15082 | r15083 | |
| 1512 | 1512 | cosmic_state *state = machine.driver_data<cosmic_state>(); |
| 1513 | 1513 | offs_t offs, len; |
| 1514 | 1514 | UINT8 *rom; |
| 1515 | len = | |
| 1515 | len = sta | |
| 1516 | 1516 | rom = state->memregion("maincpu")->base(); |
| 1517 | 1517 | for (offs = 0; offs < len; offs++) |
| 1518 | 1518 | { |
| r15082 | r15083 | |
|---|---|---|
| 356 | 356 | static MACHINE_RESET(model2_scsp) |
| 357 | 357 | { |
| 358 | 358 | model2_state *state = machine.driver_data<model2_state>(); |
| 359 | state->membank("bank4")->set_base(machine.root_device().memregion("scsp")->base() + 0x200000); | |
| 360 | state->membank("bank5")->set_base(machine.root_device().memregion("scsp")->base() + 0x600000); | |
| 359 | state->membank("bank4")->set_base(state->memregion("scsp")->base() + 0x200000); | |
| 360 | state->membank("bank5")->set_base(state->memregion("scsp")->base() + 0x600000); | |
| 361 | 361 | |
| 362 | 362 | // copy the 68k vector table into RAM |
| 363 | 363 | memcpy(state->m_soundram, state->memregion("audiocpu")->base() + 0x80000, 16); |
| r15082 | r15083 | |
| 454 | 454 | |
| 455 | 455 | CUSTOM_INPUT_MEMBER(model2_state::_1c00000_r) |
| 456 | 456 | { |
| 457 | UINT32 ret = i | |
| 457 | UINT32 ret = iop | |
| 458 | 458 | |
| 459 | 459 | if(m_ctrlmode == 0) |
| 460 | 460 | { |
| r15082 | r15083 | |
| 473 | 473 | if(m_analog_channel < 4) |
| 474 | 474 | { |
| 475 | 475 | static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" }; |
| 476 | iptval = i | |
| 476 | iptval = iop | |
| 477 | 477 | ++m_analog_channel; |
| 478 | 478 | } |
| 479 | 479 | return iptval; |
| r15082 | r15083 | |
|---|---|---|
| 115 | 115 | |
| 116 | 116 | PORT_START("IN1") /* 0xF7 */ |
| 117 | 117 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT ) |
| 118 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 118 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 119 | 119 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 120 | 120 | |
| 121 | 121 | PORT_START("IN2") /* 0x20 */ |
| r15082 | r15083 | |
| 146 | 146 | |
| 147 | 147 | PORT_START("IN1") /* 0xF7 */ |
| 148 | 148 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT ) |
| 149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 150 | 150 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 151 | 151 | |
| 152 | 152 | PORT_START("IN2") /* 0x20 */ |
| r15082 | r15083 | |
| 198 | 198 | |
| 199 | 199 | PORT_START("IN1") /* 0xF7 */ |
| 200 | 200 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT ) |
| 201 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 201 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 202 | 202 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 203 | 203 | |
| 204 | 204 | PORT_START("IN2") /* 0x20 */ |
| r15082 | r15083 | |
| 244 | 244 | |
| 245 | 245 | PORT_START("IN1") /* 0xF7 */ |
| 246 | 246 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT ) |
| 247 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 247 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 248 | 248 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 249 | 249 | |
| 250 | 250 | PORT_START("IN2") /* 0x20 */ |
| r15082 | r15083 | |
|---|---|---|
| 655 | 655 | |
| 656 | 656 | switch( (m_mux_data & 0xf0) ) /* 00-10-20-30-0F-1F-2F-3F */ |
| 657 | 657 | { |
| 658 | case 0x00: return input_port_read(machine(), "DSW1"); /* confirmed */ | |
| 659 | case 0x10: return input_port_read(machine(), "DSW2"); /* confirmed */ | |
| 660 | case 0x20: return input_port_read(machine(), "DSW3"); /* confirmed */ | |
| 661 | case 0x30: return input_port_read(machine(), "DSW4"); /* confirmed */ | |
| 658 | case 0x00: return ioport("DSW1")->read(); /* confirmed */ | |
| 659 | case 0x10: return ioport("DSW2")->read(); /* confirmed */ | |
| 660 | case 0x20: return ioport("DSW3")->read(); /* confirmed */ | |
| 661 | case 0x30: return ioport("DSW4")->read(); /* confirmed */ | |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | return 0xff; |
| r15082 | r15083 | |
| 669 | 669 | |
| 670 | 670 | if ((m_mux_data & 0x0f) == 4) |
| 671 | 671 | { |
| 672 | return i | |
| 672 | return iop | |
| 673 | 673 | } |
| 674 | 674 | else |
| 675 | 675 | { |
| 676 | return i | |
| 676 | return iop | |
| 677 | 677 | } |
| 678 | 678 | } |
| 679 | 679 |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | switch (offset) |
| 74 | 74 | { |
| 75 | 75 | case 0x050 >> 1: |
| 76 | return i | |
| 76 | return iop | |
| 77 | 77 | case 0x76a >> 1: |
| 78 | return i | |
| 78 | return iop | |
| 79 | 79 | case 0x0ac >> 1: |
| 80 | return i | |
| 80 | return iop | |
| 81 | 81 | |
| 82 | 82 | // Protection TODO |
| 83 | 83 | } |
| r15082 | r15083 | |
| 91 | 91 | switch (offset) |
| 92 | 92 | { |
| 93 | 93 | case 0x050 >> 1: |
| 94 | return i | |
| 94 | return iop | |
| 95 | 95 | case 0x76a >> 1: |
| 96 | return i | |
| 96 | return iop | |
| 97 | 97 | case 0x0ac >> 1: |
| 98 | return i | |
| 98 | return iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return m_prot_data[offset]; |
| r15082 | r15083 | |
| 259 | 259 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 260 | 260 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 261 | 261 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 262 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 262 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 263 | 263 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 264 | 264 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 265 | 265 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 278 | 278 | PORT_DIPSETTING( 0x0010, "Mode 1" ) |
| 279 | 279 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| 280 | 280 | PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 281 | PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 282 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 283 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 284 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 285 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 286 | PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 287 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 288 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 281 | PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 282 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 283 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 284 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 285 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 286 | PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 287 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 288 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 289 | 289 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 290 | PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 291 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 292 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 293 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 | |
| 294 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 295 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 296 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 297 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 | |
| 290 | PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 291 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 292 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 293 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, EQUALS, 0x0010) //Mode 1 | |
| 294 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 295 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 296 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 297 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, NOTEQUALS, 0x0010) //Mode 2 | |
| 298 | 298 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 299 | 299 | PORT_DIPSETTING( 0x4000, DEF_STR( Easy ) ) |
| 300 | 300 | PORT_DIPSETTING( 0xc000, DEF_STR( Normal ) ) |
| r15082 | r15083 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | res = 0; |
| 49 | 49 | for (i = 0; i < 8; i++) |
| 50 | res |= ((i | |
| 50 | res |= ((iop | |
| 51 | 51 | |
| 52 | 52 | return res; |
| 53 | 53 | } |
| r15082 | r15083 | |
|---|---|---|
| 407 | 407 | int res; |
| 408 | 408 | |
| 409 | 409 | |
| 410 | res = input_port_read(device->machine(), "DSW0"); | |
| 411 | res |= (input_port_read(device->machine(), "DSW1") << (7-state->m_dswbit)) & 0x80; | |
| 410 | res = state->ioport("DSW0")->read(); | |
| 411 | res |= (state->ioport("DSW1")->read() << (7-state->m_dswbit)) & 0x80; | |
| 412 | 412 | |
| 413 | 413 | return res; |
| 414 | 414 | } |
| r15082 | r15083 | |
|---|---|---|
| 185 | 185 | int result; |
| 186 | 186 | |
| 187 | 187 | /* PORT_SERVICE_NO_TOGGLE */ |
| 188 | result = (i | |
| 188 | result = (iop | |
| 189 | 189 | |
| 190 | 190 | return ~result; |
| 191 | 191 | } |
| r15082 | r15083 | |
| 195 | 195 | int result; |
| 196 | 196 | |
| 197 | 197 | /* IPT_COIN1 */ |
| 198 | result = ((i | |
| 198 | result = ((iop | |
| 199 | 199 | /* IPT_COIN2 */ |
| 200 | result |= ((i | |
| 200 | result |= ((iop | |
| 201 | 201 | /* IPT_START1 */ |
| 202 | result |= ((i | |
| 202 | result |= ((iop | |
| 203 | 203 | /* IPT_START2 */ |
| 204 | result |= ((i | |
| 204 | result |= ((iop | |
| 205 | 205 | /* PORT_SERVICE_NO_TOGGLE */ |
| 206 | result |= ((i | |
| 206 | result |= ((iop | |
| 207 | 207 | |
| 208 | 208 | return ~result; |
| 209 | 209 | } |
| r15082 | r15083 | |
|---|---|---|
| 99 | 99 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 100 | 100 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 101 | 101 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 102 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 102 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 103 | 103 | |
| 104 | 104 | PORT_START("DSW1") |
| 105 | 105 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
|---|---|---|
| 706 | 706 | /* bit 7 - */ |
| 707 | 707 | |
| 708 | 708 | /* EEPROM */ |
| 709 | | |
| 709 | s | |
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | if (ACCESSING_BITS_0_7) |
| r15082 | r15083 | |
| 798 | 798 | cps_state *state = space->machine().driver_data<cps_state>(); |
| 799 | 799 | |
| 800 | 800 | if (state->m_readpaddle != 0) |
| 801 | return ( | |
| 801 | return (s | |
| 802 | 802 | else |
| 803 | return ( | |
| 803 | return (s | |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | |
| r15082 | r15083 | |
| 8181 | 8181 | { |
| 8182 | 8182 | cps_state *state = machine.driver_data<cps_state>(); |
| 8183 | 8183 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 8184 | UINT16 *rom = (UINT16 *) | |
| 8184 | UINT16 *rom = (UINT16 *)sta | |
| 8185 | 8185 | int length = state->memregion("maincpu")->bytes(); |
| 8186 | 8186 | |
| 8187 | 8187 | gigaman2_gfx_reorder(machine); |
| r15082 | r15083 | |
| 9498 | 9498 | ROM_LOAD16_WORD_SWAP( "vh2j_d.04a", 0x080000, 0x80000, CRC(ced9bba3) SHA1(ef7be9d39ae93ffde7d940736de9711a24585ef4) ) |
| 9499 | 9499 | ROM_LOAD16_WORD_SWAP( "vh2j.05", 0x100000, 0x80000, CRC(de34f624) SHA1(60bbbd1765e76839b01c38765da2368c5188ec61) ) |
| 9500 | 9500 | ROM_LOAD16_WORD_SWAP( "vh2j.06", 0x180000, 0x80000, CRC(6a3b9897) SHA1(4f3b37004db8a3d3dde709b51c94c392615134b5) ) |
| 9501 | ROM_LOAD16_WORD_SWAP( "vh2j | |
| 9501 | ROM_LOAD16_WORD_SWAP( "vh2j | |
| 9502 | 9502 | ROM_LOAD16_WORD_SWAP( "vh2j.08", 0x280000, 0x80000, CRC(ac873dff) SHA1(ad9a085b8403801035683b6f63eee33daf4e97ae) ) |
| 9503 | 9503 | ROM_LOAD16_WORD_SWAP( "vh2j.09", 0x300000, 0x80000, CRC(eaefce9c) SHA1(d842a824f0d0adc13a86f780084164c1273c45a4) ) |
| 9504 | 9504 | ROM_LOAD16_WORD_SWAP( "vh2j.10", 0x380000, 0x80000, CRC(11730952) SHA1(2966b80b99ab065614a6ddb546110f482b998e32) ) |
| r15082 | r15083 | |
| 9524 | 9524 | ROM_END |
| 9525 | 9525 | |
| 9526 | 9526 | |
| 9527 | ROM_START( vsav2d ) | |
| 9527 | ROM_START( vsav2d ) | |
| 9528 | 9528 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ |
| 9529 | ROM_LOAD16_WORD_SWAP( "vs2j_d.03", 0x000000, 0x80000, CRC(5ee19aee) SHA1(da16d64c4de0b14a39c4a19a00c59f59579d0bd8) ) | |
| 9530 | ROM_LOAD16_WORD_SWAP( "vs2j_d.04", 0x080000, 0x80000, CRC(80116c47) SHA1(e73c2d1fc006a74e3bb4c7a0e1b888b24b3f4c33) ) | |
| 9531 | ROM_LOAD16_WORD_SWAP( "vs2j_d.05", 0x100000, 0x80000, CRC(dc74a062) SHA1(723e806f70a1cfcfcb37d59fae30bfd27a581f3a) ) | |
| 9529 | ROM_LOAD16_WORD_SWAP( "vs2j_d.03", 0x000000, 0x80000, CRC(50865f7b) SHA1(30914bde1caec55847f28167bfb48bc4473a376c) ) | |
| 9530 | ROM_LOAD16_WORD_SWAP( "vs2j_d.04", 0x080000, 0x80000, CRC(c3bff0e3) SHA1(5b81dfdc3bf4e78a9d023cd8c753ce0839c0e175) ) | |
| 9531 | ROM_LOAD16_WORD_SWAP( "vs2j.05", 0x100000, 0x80000, CRC(61979638) SHA1(4d5625a9a06926c1a42c8f6e3a4c943f17750ec2) ) | |
| 9532 | 9532 | ROM_LOAD16_WORD_SWAP( "vs2j.06", 0x180000, 0x80000, CRC(f37c5bc2) SHA1(d8c1040a6ee6b9fc677a6a32b99bf02b6a707812) ) |
| 9533 | 9533 | ROM_LOAD16_WORD_SWAP( "vs2j.07", 0x200000, 0x80000, CRC(8f885809) SHA1(69dac07e1f483b6478f792d20a137d6a081fbea3) ) |
| 9534 | ROM_LOAD16_WORD_SWAP( "vs2j | |
| 9534 | ROM_LOAD16_WORD_SWAP( "vs2j | |
| 9535 | 9535 | ROM_LOAD16_WORD_SWAP( "vs2j.09", 0x300000, 0x80000, CRC(fac3c217) SHA1(0e9dd54e401e6d7c4fe81107ffd27e42ca810fcb) ) |
| 9536 | 9536 | ROM_LOAD16_WORD_SWAP( "vs2j.10", 0x380000, 0x80000, CRC(eb490213) SHA1(bf0416df66a33c7a4678ab4a047de334dfd3b31e) ) |
| 9537 | 9537 | |
| r15082 | r15083 | |
| 9788 | 9788 | GAME( 1997, sgemfd, sgemf, dead_cps2, cps2_2p3b, cps2, ROT0, "bootleg", "Super Gem Fighter Mini Mix (USA 970904 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| 9789 | 9789 | GAME( 2000, mmatrixd, mmatrix, dead_cps2, cps2_2p1b, cps2, ROT0, "bootleg", "Mars Matrix: Hyper Solid Shooting (Japan 000412 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| 9790 | 9790 | GAME( 2000, dimahoud, dimahoo, dead_cps2, cps2_2p3b, cps2, ROT270, "bootleg", "Dimahoo (USA 000121 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| 9791 | GAME( 1997, vhunt2d, vhunt2, dead_cps2, cps2_2p6b, cps2, ROT0, "bootleg", "Vampire Hunter 2: Darkstalkers Revenge (Japan 9709 | |
| 9791 | GAME( 1997, vhunt2d, vhunt2, dead_cps2, cps2_2p6b, cps2, ROT0, "bootleg", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970913 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 9792 | 9792 | GAME( 1997, vsav2d, vsav2, dead_cps2, cps2_2p6b, cps2, ROT0, "bootleg", "Vampire Savior 2: The Lord of Vampire (Japan 970913 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| 9793 | 9793 | GAME( 1997, csclub1d, csclub, dead_cps2, cps2_2p3b, cps2, ROT0, "bootleg", "Capcom Sports Club (Euro 970722 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| 9794 | 9794 | GAME( 1995, cybotsud, cybots, dead_cps2, cybots, cps2, ROT0, "bootleg", "Cyberbots: Fullmetal Madness (USA 950424 Phoenix Edition) (bootleg)", GAME_SUPPORTS_SAVE ) |
| r15082 | r15083 | |
|---|---|---|
| 219 | 219 | static void expand_sprites(running_machine &machine) |
| 220 | 220 | { |
| 221 | 221 | igs017_state *state = machine.driver_data<igs017_state>(); |
| 222 | UINT8 *rom = | |
| 222 | UINT8 *rom = sta | |
| 223 | 223 | int size = state->memregion("sprites")->bytes(); |
| 224 | 224 | int i; |
| 225 | 225 | |
| r15082 | r15083 | |
| 1259 | 1259 | { |
| 1260 | 1260 | switch (m_input_select) |
| 1261 | 1261 | { |
| 1262 | case 0x00: return input_port_read(machine(), "PLAYER1"); | |
| 1263 | case 0x01: return input_port_read(machine(), "PLAYER2"); | |
| 1264 | case 0x02: return input_port_read(machine(), "COINS"); | |
| 1262 | case 0x00: return ioport("PLAYER1")->read(); | |
| 1263 | case 0x01: return ioport("PLAYER2")->read(); | |
| 1264 | case 0x02: return ioport("COINS")->read(); | |
| 1265 | 1265 | |
| 1266 | 1266 | case 0x03: return 01; |
| 1267 | 1267 | |
| r15082 | r15083 | |
| 1377 | 1377 | static READ8_DEVICE_HANDLER( mgcs_keys_r ) |
| 1378 | 1378 | { |
| 1379 | 1379 | igs017_state *state = device->machine().driver_data<igs017_state>(); |
| 1380 | if (~state->m_input_select & 0x08) return input_port_read(device->machine(), "KEY0"); | |
| 1381 | if (~state->m_input_select & 0x10) return input_port_read(device->machine(), "KEY1"); | |
| 1382 | if (~state->m_input_select & 0x20) return input_port_read(device->machine(), "KEY2"); | |
| 1383 | if (~state->m_input_select & 0x40) return input_port_read(device->machine(), "KEY3"); | |
| 1384 | if (~state->m_input_select & 0x80) return input_port_read(device->machine(), "KEY4"); | |
| 1380 | if (~state->m_input_select & 0x08) return state->ioport("KEY0")->read(); | |
| 1381 | if (~state->m_input_select & 0x10) return state->ioport("KEY1")->read(); | |
| 1382 | if (~state->m_input_select & 0x20) return state->ioport("KEY2")->read(); | |
| 1383 | if (~state->m_input_select & 0x40) return state->ioport("KEY3")->read(); | |
| 1384 | if (~state->m_input_select & 0x80) return state->ioport("KEY4")->read(); | |
| 1385 | 1385 | |
| 1386 | 1386 | logerror("%s: warning, reading key with input_select = %02x\n", device->machine().describe_context(), state->m_input_select); |
| 1387 | 1387 | return 0xff; |
| r15082 | r15083 | |
| 1449 | 1449 | |
| 1450 | 1450 | READ8_MEMBER(igs017_state::sdmg2_keys_r) |
| 1451 | 1451 | { |
| 1452 | if (~m_input_select & 0x01) return input_port_read(machine(), "KEY0"); | |
| 1453 | if (~m_input_select & 0x02) return input_port_read(machine(), "KEY1"); | |
| 1454 | if (~m_input_select & 0x04) return input_port_read(machine(), "KEY2"); | |
| 1455 | if (~m_input_select & 0x08) return input_port_read(machine(), "KEY3"); | |
| 1456 | if (~m_input_select & 0x10) return input_port_read(machine(), "KEY4"); | |
| 1452 | if (~m_input_select & 0x01) return ioport("KEY0")->read(); | |
| 1453 | if (~m_input_select & 0x02) return ioport("KEY1")->read(); | |
| 1454 | if (~m_input_select & 0x04) return ioport("KEY2")->read(); | |
| 1455 | if (~m_input_select & 0x08) return ioport("KEY3")->read(); | |
| 1456 | if (~m_input_select & 0x10) return ioport("KEY4")->read(); | |
| 1457 | 1457 | |
| 1458 | if (m_input_select == 0x1f) return i | |
| 1458 | if (m_input_select == 0x1f) return iop | |
| 1459 | 1459 | |
| 1460 | 1460 | logerror("%s: warning, reading key with input_select = %02x\n", machine().describe_context(), m_input_select); |
| 1461 | 1461 | return 0xff; |
| r15082 | r15083 | |
| 1502 | 1502 | case 0x00: |
| 1503 | 1503 | { |
| 1504 | 1504 | UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001; |
| 1505 | return i | |
| 1505 | return iop | |
| 1506 | 1506 | } |
| 1507 | 1507 | |
| 1508 | 1508 | case 0x02: |
| r15082 | r15083 | |
| 1538 | 1538 | |
| 1539 | 1539 | READ8_MEMBER(igs017_state::mgdh_keys_r) |
| 1540 | 1540 | { |
| 1541 | if (~m_input_select & 0x04) return input_port_read(machine(), "KEY0"); | |
| 1542 | if (~m_input_select & 0x08) return input_port_read(machine(), "KEY1"); | |
| 1543 | if (~m_input_select & 0x10) return input_port_read(machine(), "KEY2"); | |
| 1544 | if (~m_input_select & 0x20) return input_port_read(machine(), "KEY3"); | |
| 1545 | if (~m_input_select & 0x40) return input_port_read(machine(), "KEY4"); | |
| 1541 | if (~m_input_select & 0x04) return ioport("KEY0")->read(); | |
| 1542 | if (~m_input_select & 0x08) return ioport("KEY1")->read(); | |
| 1543 | if (~m_input_select & 0x10) return ioport("KEY2")->read(); | |
| 1544 | if (~m_input_select & 0x20) return ioport("KEY3")->read(); | |
| 1545 | if (~m_input_select & 0x40) return ioport("KEY4")->read(); | |
| 1546 | 1546 | |
| 1547 | if ((m_input_select & 0xfc) == 0xfc) return i | |
| 1547 | if ((m_input_select & 0xfc) == 0xfc) return iop | |
| 1548 | 1548 | |
| 1549 | 1549 | logerror("%s: warning, reading key with input_select = %02x\n", machine().describe_context(), m_input_select); |
| 1550 | 1550 | return 0xff; |
| r15082 | r15083 | |
| 1616 | 1616 | return mgdh_keys_r(space, 0); |
| 1617 | 1617 | |
| 1618 | 1618 | case 0x01: |
| 1619 | return i | |
| 1619 | return iop | |
| 1620 | 1620 | |
| 1621 | 1621 | case 0x02: |
| 1622 | return BITSWAP8(i | |
| 1622 | return BITSWAP8(iop | |
| 1623 | 1623 | |
| 1624 | 1624 | case 0x03: |
| 1625 | 1625 | { |
| 1626 | 1626 | UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0001; |
| 1627 | return i | |
| 1627 | return iop | |
| 1628 | 1628 | } |
| 1629 | 1629 | |
| 1630 | 1630 | default: |
| r15082 | r15083 | |
| 1702 | 1702 | { |
| 1703 | 1703 | switch (m_input_select) |
| 1704 | 1704 | { |
| 1705 | case 0x00: return input_port_read(machine(), "PLAYER1"); | |
| 1706 | case 0x01: return input_port_read(machine(), "PLAYER2"); | |
| 1707 | case 0x02: return input_port_read(machine(), "COINS"); | |
| 1705 | case 0x00: return ioport("PLAYER1")->read(); | |
| 1706 | case 0x01: return ioport("PLAYER2")->read(); | |
| 1707 | case 0x02: return ioport("COINS")->read(); | |
| 1708 | 1708 | case 0x03: |
| 1709 | 1709 | { |
| 1710 | 1710 | UINT8 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x00 : 0x20; |
| 1711 | return i | |
| 1711 | return iop | |
| 1712 | 1712 | } |
| 1713 | 1713 | |
| 1714 | 1714 | default: |
| r15082 | r15083 | |
| 1794 | 1794 | { |
| 1795 | 1795 | case 0x01: |
| 1796 | 1796 | { |
| 1797 | if (~m_input_select & 0x01) return input_port_read(machine(), "KEY0"); | |
| 1798 | if (~m_input_select & 0x02) return input_port_read(machine(), "KEY1"); | |
| 1799 | if (~m_input_select & 0x04) return input_port_read(machine(), "KEY2"); | |
| 1800 | if (~m_input_select & 0x08) return input_port_read(machine(), "KEY3"); | |
| 1801 | if (~m_input_select & 0x10) return input_port_read(machine(), "KEY4"); | |
| 1797 | if (~m_input_select & 0x01) return ioport("KEY0")->read(); | |
| 1798 | if (~m_input_select & 0x02) return ioport("KEY1")->read(); | |
| 1799 | if (~m_input_select & 0x04) return ioport("KEY2")->read(); | |
| 1800 | if (~m_input_select & 0x08) return ioport("KEY3")->read(); | |
| 1801 | if (~m_input_select & 0x10) return ioport("KEY4")->read(); | |
| 1802 | 1802 | |
| 1803 | 1803 | logerror("%s: warning, reading key with input_select = %02x\n", machine().describe_context(), m_input_select); |
| 1804 | 1804 | return 0xffff; |
| r15082 | r15083 | |
| 1885 | 1885 | { |
| 1886 | 1886 | case 0x00: // Keys |
| 1887 | 1887 | { |
| 1888 | if (~m_input_select & 0x01) return input_port_read(machine(), "KEY0") << 8; | |
| 1889 | if (~m_input_select & 0x02) return input_port_read(machine(), "KEY1") << 8; | |
| 1890 | if (~m_input_select & 0x04) return input_port_read(machine(), "KEY2") << 8; | |
| 1891 | if (~m_input_select & 0x08) return input_port_read(machine(), "KEY3") << 8; | |
| 1892 | if (~m_input_select & 0x10) return input_port_read(machine(), "KEY4") << 8; | |
| 1888 | if (~m_input_select & 0x01) return ioport("KEY0")->read() << 8; | |
| 1889 | if (~m_input_select & 0x02) return ioport("KEY1")->read() << 8; | |
| 1890 | if (~m_input_select & 0x04) return ioport("KEY2")->read() << 8; | |
| 1891 | if (~m_input_select & 0x08) return ioport("KEY3")->read() << 8; | |
| 1892 | if (~m_input_select & 0x10) return ioport("KEY4")->read() << 8; | |
| 1893 | 1893 | |
| 1894 | 1894 | logerror("%s: warning, reading key with input_select = %02x\n", machine().describe_context(), m_input_select); |
| 1895 | 1895 | return 0xffff; |
| r15082 | r15083 | |
| 1898 | 1898 | case 0x02: |
| 1899 | 1899 | { |
| 1900 | 1900 | UINT16 hopper_bit = (m_hopper && ((machine().primary_screen->frame_number()/10)&1)) ? 0x0000 : 0x0002; |
| 1901 | return (i | |
| 1901 | return (iop | |
| 1902 | 1902 | } |
| 1903 | 1903 | |
| 1904 | 1904 | case 0x04: |
| 1905 | return i | |
| 1905 | return iop | |
| 1906 | 1906 | } |
| 1907 | 1907 | |
| 1908 | 1908 | return 0xffff; |
| r15082 | r15083 | |
| 2011 | 2011 | switch(m_igs_magic[0]) |
| 2012 | 2012 | { |
| 2013 | 2013 | case 0x00: |
| 2014 | return i | |
| 2014 | return iop | |
| 2015 | 2015 | case 0x01: |
| 2016 | return i | |
| 2016 | return iop | |
| 2017 | 2017 | case 0x02: |
| 2018 | return i | |
| 2018 | return iop | |
| 2019 | 2019 | |
| 2020 | 2020 | default: |
| 2021 | 2021 | logerror("%s: warning, reading with igs_magic = %02x\n", machine().describe_context(), m_igs_magic[0]); |
| r15082 | r15083 | |
| 2559 | 2559 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) |
| 2560 | 2560 | |
| 2561 | 2561 | // Keyboard mode: |
| 2562 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_CONDITION("DSW2",0x40, | |
| 2562 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_CONDITION("DSW2",0x40, | |
| 2563 | 2563 | // Joystick mode: |
| 2564 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x40, | |
| 2564 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x40, | |
| 2565 | 2565 | |
| 2566 | 2566 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2567 | 2567 | |
| 2568 | 2568 | PORT_START("KEY0") |
| 2569 | 2569 | // Keyboard mode: |
| 2570 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2571 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2572 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2573 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2574 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2575 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2576 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2577 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2570 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2571 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2572 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2573 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2574 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2575 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2576 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2577 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2578 | 2578 | // Joystick mode: |
| 2579 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2580 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2581 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2582 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2583 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2584 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2585 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2586 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2579 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2580 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2581 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2582 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2583 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2584 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2585 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2586 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2587 | 2587 | |
| 2588 | 2588 | PORT_START("KEY1") |
| 2589 | 2589 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| r15082 | r15083 | |
| 2690 | 2690 | |
| 2691 | 2691 | PORT_START("KEY0") |
| 2692 | 2692 | // Keyboard mode: |
| 2693 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2694 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2695 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2696 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2697 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2698 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2699 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2700 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x02) | |
| 2693 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2694 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2695 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2696 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2697 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2698 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2699 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2700 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) | |
| 2701 | 2701 | // Joystick mode: |
| 2702 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2703 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2704 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2705 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2706 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2707 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2708 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2709 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 2702 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2703 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2704 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2705 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2706 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2707 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2708 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2709 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 2710 | 2710 | |
| 2711 | 2711 | PORT_START("KEY1") |
| 2712 | 2712 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| r15082 | r15083 | |
|---|---|---|
| 215 | 215 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 216 | 216 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 217 | 217 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 218 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK | |
| 218 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* not sure, probably wrong */ | |
| 219 | 219 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 220 | 220 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 221 | 221 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r15082 | r15083 | |
| 282 | 282 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 283 | 283 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 284 | 284 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 285 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK | |
| 285 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* not sure, probably wrong */ | |
| 286 | 286 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 287 | 287 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 288 | 288 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r15082 | r15083 | |
|---|---|---|
| 49 | 49 | for (i = 0; i < 5; i++) |
| 50 | 50 | { |
| 51 | 51 | if (~m_keyb & (1 << i)) |
| 52 | res &= i | |
| 52 | res &= iop | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return res; |
| r15082 | r15083 | |
|---|---|---|
| 250 | 250 | } |
| 251 | 251 | case 0xd: |
| 252 | 252 | { |
| 253 | val = i | |
| 253 | val = iop | |
| 254 | 254 | break; |
| 255 | 255 | } |
| 256 | 256 | case 0xe: |
| r15082 | r15083 | |
| 366 | 366 | { |
| 367 | 367 | if (m_touch_cnt == 0) |
| 368 | 368 | { |
| 369 | if ( i | |
| 369 | if ( iop | |
| 370 | 370 | { |
| 371 | 371 | m_touch_data[0] = 0x2a; |
| 372 | m_touch_data[1] = 0x7 - (input_port_read(machine(), "TOUCH_Y") >> 5) + 0x30; | |
| 373 | m_touch_data[2] = (input_port_read(machine(), "TOUCH_X") >> 5) + 0x30; | |
| 372 | m_touch_data[1] = 0x7 - (ioport("TOUCH_Y")->read() >> 5) + 0x30; | |
| 373 | m_touch_data[2] = (ioport("TOUCH_X")->read() >> 5) + 0x30; | |
| 374 | 374 | |
| 375 | 375 | /* Return RXRDY */ |
| 376 | 376 | return 0x1; |
| r15082 | r15083 | |
| 434 | 434 | { |
| 435 | 435 | case 0: |
| 436 | 436 | { |
| 437 | val = i | |
| 437 | val = iop | |
| 438 | 438 | break; |
| 439 | 439 | } |
| 440 | 440 | case 2: |
| 441 | 441 | { |
| 442 | val = i | |
| 442 | val = iop | |
| 443 | 443 | break; |
| 444 | 444 | } |
| 445 | 445 | case 4: |
| 446 | 446 | { |
| 447 | val = i | |
| 447 | val = iop | |
| 448 | 448 | break; |
| 449 | 449 | } |
| 450 | 450 | case 9: |
| 451 | 451 | { |
| 452 | val = i | |
| 452 | val = iop | |
| 453 | 453 | break; |
| 454 | 454 | } |
| 455 | 455 | } |
| r15082 | r15083 | |
| 1038 | 1038 | { |
| 1039 | 1039 | case 0: |
| 1040 | 1040 | { |
| 1041 | val = i | |
| 1041 | val = iop | |
| 1042 | 1042 | break; |
| 1043 | 1043 | } |
| 1044 | 1044 | case 1: |
| 1045 | 1045 | { |
| 1046 | val = i | |
| 1046 | val = iop | |
| 1047 | 1047 | break; |
| 1048 | 1048 | } |
| 1049 | 1049 | case 2: |
| 1050 | 1050 | { |
| 1051 | val = i | |
| 1051 | val = iop | |
| 1052 | 1052 | break; |
| 1053 | 1053 | } |
| 1054 | 1054 | case 3: |
| 1055 | 1055 | { |
| 1056 | val = i | |
| 1056 | val = iop | |
| 1057 | 1057 | break; |
| 1058 | 1058 | } |
| 1059 | 1059 | case 4: |
| 1060 | 1060 | { |
| 1061 | val = i | |
| 1061 | val = iop | |
| 1062 | 1062 | break; |
| 1063 | 1063 | } |
| 1064 | 1064 | case 5: |
| 1065 | 1065 | { |
| 1066 | val = (i | |
| 1066 | val = (iop | |
| 1067 | 1067 | break; |
| 1068 | 1068 | } |
| 1069 | 1069 | case 6: |
| 1070 | 1070 | { |
| 1071 | val = (i | |
| 1071 | val = (iop | |
| 1072 | 1072 | break; |
| 1073 | 1073 | } |
| 1074 | 1074 | case 7://5 |
| 1075 | 1075 | { |
| 1076 | val = (i | |
| 1076 | val = (iop | |
| 1077 | 1077 | break; |
| 1078 | 1078 | } |
| 1079 | 1079 | case 9: |
| 1080 | 1080 | { |
| 1081 | val = i | |
| 1081 | val = iop | |
| 1082 | 1082 | break; |
| 1083 | 1083 | } |
| 1084 | 1084 | } |
| r15082 | r15083 | |
|---|---|---|
| 1296 | 1296 | switch( offset ) |
| 1297 | 1297 | { |
| 1298 | 1298 | case 0: |
| 1299 | data = i | |
| 1299 | data = iop | |
| 1300 | 1300 | break; |
| 1301 | 1301 | case 1: |
| 1302 | data = ( i | |
| 1302 | data = ( iop | |
| 1303 | 1303 | break; |
| 1304 | 1304 | case 2: |
| 1305 | data = i | |
| 1305 | data = iop | |
| 1306 | 1306 | break; |
| 1307 | 1307 | case 3: |
| 1308 | data = ( i | |
| 1308 | data = ( iop | |
| 1309 | 1309 | break; |
| 1310 | 1310 | } |
| 1311 | 1311 | verboselog( machine(), 2, "system11gun_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| r15082 | r15083 | |
| 1573 | 1573 | |
| 1574 | 1574 | READ8_MEMBER(namcos12_state::s12_mcu_gun_h_r) |
| 1575 | 1575 | { |
| 1576 | | |
| 1576 | | |
| 1577 | 1577 | if( port != NULL ) |
| 1578 | 1578 | { |
| 1579 | int rv = | |
| 1579 | int rv = | |
| 1580 | 1580 | |
| 1581 | 1581 | if( ( offset & 1 ) != 0 ) |
| 1582 | 1582 | { |
| r15082 | r15083 | |
| 1592 | 1592 | |
| 1593 | 1593 | READ8_MEMBER(namcos12_state::s12_mcu_gun_v_r) |
| 1594 | 1594 | { |
| 1595 | | |
| 1595 | | |
| 1596 | 1596 | if( port != NULL ) |
| 1597 | 1597 | { |
| 1598 | int rv = | |
| 1598 | int rv = | |
| 1599 | 1599 | |
| 1600 | 1600 | if( ( offset & 1 ) != 0 ) |
| 1601 | 1601 | { |
| r15082 | r15083 | |
| 1627 | 1627 | |
| 1628 | 1628 | psx_driver_init(machine); |
| 1629 | 1629 | |
| 1630 | state->membank("bank1")->configure_entries(0, | |
| 1630 | state->membank("bank1")->configure_entries(0, sta | |
| 1631 | 1631 | |
| 1632 | 1632 | state->m_s12_porta = 0; |
| 1633 | 1633 | state->m_s12_rtcstate = 0; |
| r15082 | r15083 | |
|---|---|---|
| 475 | 475 | CUSTOM_INPUT_MEMBER(scramble_state::ckongs_coinage_r) |
| 476 | 476 | { |
| 477 | 477 | int bit_mask = (FPTR)param; |
| 478 | return (i | |
| 478 | return (iop | |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
| r15082 | r15083 | |
| 816 | 816 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* protection check? */ |
| 817 | 817 | |
| 818 | 818 | PORT_START("SENSE") |
| 819 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 819 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 820 | 820 | INPUT_PORTS_END |
| 821 | 821 | |
| 822 | 822 | static INPUT_PORTS_START( hncholms ) |
| r15082 | r15083 | |
| 860 | 860 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* protection check? */ |
| 861 | 861 | |
| 862 | 862 | PORT_START("SENSE") |
| 863 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 863 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 864 | 864 | INPUT_PORTS_END |
| 865 | 865 | |
| 866 | 866 | static INPUT_PORTS_START( cavelon ) |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | static READ8_DEVICE_HANDLER( p1c_r ) |
| 70 | 70 | { |
| 71 | 71 | taxidriv_state *state = device->machine().driver_data<taxidriv_state>(); |
| 72 | return (state->m_s2 << 7) | (state->m_s4 << 6) | (( | |
| 72 | return (state->m_s2 << 7) | (state->m_s4 << 6) | ((s | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | static WRITE8_DEVICE_HANDLER( p1a_w ) |
| r15082 | r15083 | |
|---|---|---|
| 108 | 108 | { |
| 109 | 109 | int joy; |
| 110 | 110 | |
| 111 | joy = i | |
| 111 | joy = iop | |
| 112 | 112 | if (joy & 1) return -63; |
| 113 | 113 | if (joy & 2) return 63; |
| 114 | return i | |
| 114 | return iop | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | READ8_MEMBER(tehkanwc_state::tehkanwc_track_1_r) |
| 118 | 118 | { |
| 119 | 119 | int joy; |
| 120 | 120 | |
| 121 | joy = i | |
| 121 | joy = iop | |
| 122 | 122 | if (joy & 1) return -63; |
| 123 | 123 | if (joy & 2) return 63; |
| 124 | return i | |
| 124 | return iop | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | WRITE8_MEMBER(tehkanwc_state::tehkanwc_track_0_reset_w) |
| 128 | 128 | { |
| 129 | 129 | /* reset the trackball counters */ |
| 130 | m_track0[offset] = i | |
| 130 | m_track0[offset] = iop | |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | WRITE8_MEMBER(tehkanwc_state::tehkanwc_track_1_reset_w) |
| 134 | 134 | { |
| 135 | 135 | /* reset the trackball counters */ |
| 136 | m_track1[offset] = i | |
| 136 | m_track1[offset] = iop | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 |
| r15082 | r15083 | |
|---|---|---|
| 182 | 182 | /* input becomes the starting point for the trackball counters */ |
| 183 | 183 | if (((data ^ m_ctrld) & 0x10) && (data & 0x10)) |
| 184 | 184 | { |
| 185 | UINT8 trackball = input_port_read(machine(), "FAKE"); | |
| 186 | UINT8 switches = input_port_read(machine(), "IN0"); | |
| 185 | UINT8 trackball = ioport("FAKE")->read(); | |
| 186 | UINT8 switches = ioport("IN0")->read(); | |
| 187 | 187 | m_trackball_offset = ((trackball & 0xf0) - (switches & 0xf0)) | ((trackball - switches) & 0x0f); |
| 188 | 188 | } |
| 189 | 189 | m_ctrld = data & 0x10; |
| r15082 | r15083 | |
| 195 | 195 | /* if ctrld is high, the /ld signal on the LS191 is NOT set, meaning that the trackball is counting */ |
| 196 | 196 | if (m_ctrld) |
| 197 | 197 | { |
| 198 | UINT8 trackball = i | |
| 198 | UINT8 trackball = iop | |
| 199 | 199 | return ((trackball & 0xf0) - (m_trackball_offset & 0xf0)) | ((trackball - m_trackball_offset) & 0x0f); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | /* otherwise, the LS191 is simply passing through the raw switch inputs */ |
| 203 | 203 | else |
| 204 | return i | |
| 204 | return iop | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
| r15082 | r15083 | |
| 300 | 300 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 301 | 301 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 302 | 302 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| 303 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_VBLANK | |
| 303 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 304 | 304 | |
| 305 | 305 | PORT_START("DSW1") /* IN2 - Game Option switches DSW @ D4 on PCB */ |
| 306 | 306 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
|---|---|---|
| 87 | 87 | WRITE16_MEMBER(bionicc_state::bionicc_mpu_trigger_w) |
| 88 | 88 | { |
| 89 | 89 | |
| 90 | data = i | |
| 90 | data = iop | |
| 91 | 91 | m_inp[0] = data ^ 0x0f; |
| 92 | 92 | |
| 93 | data = i | |
| 93 | data = iop | |
| 94 | 94 | m_inp[1] = data ^ 0xff; |
| 95 | 95 | |
| 96 | data = i | |
| 96 | data = iop | |
| 97 | 97 | m_inp[2] = data ^ 0xff; |
| 98 | 98 | } |
| 99 | 99 |
| r15082 | r15083 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | READ8_MEMBER(citycon_state::citycon_in_r) |
| 18 | 18 | { |
| 19 | return i | |
| 19 | return iop | |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | READ8_MEMBER(citycon_state::citycon_irq_ack_r) |
| r15082 | r15083 | |
|---|---|---|
| 703 | 703 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Out") PORT_CODE(KEYCODE_G) |
| 704 | 704 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Supervisor Key") PORT_TOGGLE PORT_CODE(KEYCODE_0) |
| 705 | 705 | PORT_DIPNAME( 0x08, 0x08, "Remote Credits" ) PORT_DIPLOCATION("SW1:1") /* DSW1 */ |
| 706 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1", 0x08, PORTCOND_EQUALS,0x08) | |
| 707 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1", 0x08, PORTCOND_EQUALS,0x08) | |
| 708 | PORT_DIPSETTING( 0x08, "Cred x 20" ) PORT_CONDITION("IN1", 0x08, PORTCOND_EQUALS,0x00) /* x100 in ampkr95 */ | |
| 709 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1", 0x08, PORTCOND_EQUALS,0x00) | |
| 706 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1", 0x08, EQUALS,0x08) | |
| 707 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1", 0x08, EQUALS,0x08) | |
| 708 | PORT_DIPSETTING( 0x08, "Cred x 20" ) PORT_CONDITION("IN1", 0x08, EQUALS,0x00) /* x100 in ampkr95 */ | |
| 709 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1", 0x08, EQUALS,0x00) | |
| 710 | 710 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Black Card") |
| 711 | 711 | |
| 712 | 712 | PORT_START("IN4") |
| r15082 | r15083 | |
| 788 | 788 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Out") PORT_CODE(KEYCODE_G) |
| 789 | 789 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Supervisor Key") PORT_TOGGLE PORT_CODE(KEYCODE_0) |
| 790 | 790 | PORT_DIPNAME( 0x08, 0x08, "Remote Credits" ) PORT_DIPLOCATION("SW1:1") /* DSW1 */ |
| 791 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x08) | |
| 792 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x08) | |
| 793 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x00) /* x100 in ampkr95 */ | |
| 794 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x00) | |
| 791 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,EQUALS,0x08) | |
| 792 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1",0x08,EQUALS,0x08) | |
| 793 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,EQUALS,0x00) /* x100 in ampkr95 */ | |
| 794 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1",0x08,EQUALS,0x00) | |
| 795 | 795 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Black Card") |
| 796 | 796 | |
| 797 | 797 | PORT_START("IN4") |
| r15082 | r15083 | |
| 873 | 873 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Out") PORT_CODE(KEYCODE_G) |
| 874 | 874 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Supervisor Key") PORT_TOGGLE PORT_CODE(KEYCODE_0) |
| 875 | 875 | PORT_DIPNAME( 0x08, 0x08, "Remote Credits" ) PORT_DIPLOCATION("SW1:1") /* DSW1 */ |
| 876 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x08) | |
| 877 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x08) | |
| 878 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x00) /* x100 in ampkr95 */ | |
| 879 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1",0x08,PORTCOND_EQUALS,0x00) | |
| 876 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,EQUALS,0x08) | |
| 877 | PORT_DIPSETTING( 0x00, "Cred x 50" ) PORT_CONDITION("IN1",0x08,EQUALS,0x08) | |
| 878 | PORT_DIPSETTING( 0x08, "Cred x 100" ) PORT_CONDITION("IN1",0x08,EQUALS,0x00) /* x100 in ampkr95 */ | |
| 879 | PORT_DIPSETTING( 0x00, "Remote Off" ) PORT_CONDITION("IN1",0x08,EQUALS,0x00) | |
| 880 | 880 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Double") PORT_CODE(KEYCODE_S) |
| 881 | 881 | |
| 882 | 882 | PORT_START("IN4") |
| r15082 | r15083 | |
|---|---|---|
| 414 | 414 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 415 | 415 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 416 | 416 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 417 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 417 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 418 | 418 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) |
| 419 | 419 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) |
| 420 | 420 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 431 | 431 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) |
| 432 | 432 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 433 | 433 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 434 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 434 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 435 | 435 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 436 | 436 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 437 | 437 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 438 | 438 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 439 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 439 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 440 | 440 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| 441 | 441 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 442 | 442 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
| 513 | 513 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 514 | 514 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 515 | 515 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 516 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 516 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 517 | 517 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) |
| 518 | 518 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) |
| 519 | 519 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 530 | 530 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) |
| 531 | 531 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 532 | 532 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 533 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 533 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 534 | 534 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 535 | 535 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 536 | 536 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 537 | 537 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 538 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 538 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 539 | 539 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| 540 | 540 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 541 | 541 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
| 661 | 661 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 662 | 662 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 663 | 663 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 664 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 664 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 665 | 665 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) |
| 666 | 666 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) |
| 667 | 667 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 678 | 678 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) |
| 679 | 679 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 680 | 680 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 681 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 681 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 682 | 682 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 683 | 683 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 684 | 684 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 685 | 685 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 686 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 686 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 687 | 687 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| 688 | 688 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 689 | 689 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
| 725 | 725 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 726 | 726 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 727 | 727 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 728 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 728 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 729 | 729 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) /* EEPROM data */ |
| 730 | 730 | |
| 731 | 731 | PORT_START("DSW1") |
| r15082 | r15083 | |
| 756 | 756 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 757 | 757 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 758 | 758 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 759 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 759 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 760 | 760 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) |
| 761 | 761 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) |
| 762 | 762 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 773 | 773 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) |
| 774 | 774 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 775 | 775 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 776 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 776 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 777 | 777 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 778 | 778 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 779 | 779 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 780 | 780 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 781 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 781 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 782 | 782 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| 783 | 783 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 784 | 784 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
| 852 | 852 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 853 | 853 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 854 | 854 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 855 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 855 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW2", 0x01, | |
| 856 | 856 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) |
| 857 | 857 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) |
| 858 | 858 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 869 | 869 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) |
| 870 | 870 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 871 | 871 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 872 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 872 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 873 | 873 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 874 | 874 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 875 | 875 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 876 | 876 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) |
| 877 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 877 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW2", 0x01, | |
| 878 | 878 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) |
| 879 | 879 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 880 | 880 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
| 1678 | 1678 | static DRIVER_INIT( bigtwin ) |
| 1679 | 1679 | { |
| 1680 | 1680 | playmark_state *state = machine.driver_data<playmark_state>(); |
| 1681 | UINT8 *playmark_PICROM_HEX = | |
| 1681 | UINT8 *playmark_PICROM_HEX = sta | |
| 1682 | 1682 | UINT16 *playmark_PICROM = (UINT16 *)state->memregion("audiocpu")->base(); |
| 1683 | 1683 | INT32 offs, data; |
| 1684 | 1684 | UINT16 src_pos = 0; |
| r15082 | r15083 | |
|---|---|---|
| 277 | 277 | jangou_state *state = device->machine().driver_data<jangou_state>(); |
| 278 | 278 | switch(state->m_mux_data) |
| 279 | 279 | { |
| 280 | case 0x01: return input_port_read(device->machine(), "PL1_1"); | |
| 281 | case 0x02: return input_port_read(device->machine(), "PL1_2"); | |
| 282 | case 0x04: return input_port_read(device->machine(), "PL2_1"); | |
| 283 | case 0x08: return input_port_read(device->machine(), "PL2_2"); | |
| 284 | case 0x10: return input_port_read(device->machine(), "PL1_3"); | |
| 285 | case 0x20: return input_port_read(device->machine(), "PL2_3"); | |
| 280 | case 0x01: return state->ioport("PL1_1")->read(); | |
| 281 | case 0x02: return state->ioport("PL1_2")->read(); | |
| 282 | case 0x04: return state->ioport("PL2_1")->read(); | |
| 283 | case 0x08: return state->ioport("PL2_2")->read(); | |
| 284 | case 0x10: return state->ioport("PL1_3")->read(); | |
| 285 | case 0x20: return state->ioport("PL2_3")->read(); | |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | return | |
| 288 | return | |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | static READ8_DEVICE_HANDLER( input_system_r ) |
| 292 | 292 | { |
| 293 | return | |
| 293 | return | |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | |
| r15082 | r15083 | |
| 595 | 595 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") |
| 596 | 596 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 597 | 597 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 598 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 598 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess | |
| 599 | 599 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag |
| 600 | 600 | INPUT_PORTS_END |
| 601 | 601 | |
| r15082 | r15083 | |
| 656 | 656 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") |
| 657 | 657 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 658 | 658 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 659 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 659 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess | |
| 660 | 660 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag |
| 661 | 661 | INPUT_PORTS_END |
| 662 | 662 | |
| r15082 | r15083 | |
| 782 | 782 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") |
| 783 | 783 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 784 | 784 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 785 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 785 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 786 | 786 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //blitter busy flag |
| 787 | 787 | INPUT_PORTS_END |
| 788 | 788 |
| r15082 | r15083 | |
|---|---|---|
| 2257 | 2257 | static DRIVER_INIT( winrun ) |
| 2258 | 2258 | { |
| 2259 | 2259 | namcos21_state *state = machine.driver_data<namcos21_state>(); |
| 2260 | UINT16 *pMem = (UINT16 *) | |
| 2260 | UINT16 *pMem = (UINT16 *)sta | |
| 2261 | 2261 | int pc = 0; |
| 2262 | 2262 | pMem[pc++] = 0xff80; /* b */ |
| 2263 | 2263 | pMem[pc++] = 0; |
| r15082 | r15083 | |
| 2301 | 2301 | static DRIVER_INIT( driveyes ) |
| 2302 | 2302 | { |
| 2303 | 2303 | namcos21_state *state = machine.driver_data<namcos21_state>(); |
| 2304 | UINT16 *pMem = (UINT16 *) | |
| 2304 | UINT16 *pMem = (UINT16 *)sta | |
| 2305 | 2305 | int pc = 0; |
| 2306 | 2306 | pMem[pc++] = 0xff80; /* b */ |
| 2307 | 2307 | pMem[pc++] = 0; |
| r15082 | r15083 | |
|---|---|---|
| 3613 | 3613 | static void expand_colourdata( running_machine &machine ) |
| 3614 | 3614 | { |
| 3615 | 3615 | pgm_state *state = machine.driver_data<pgm_state>(); |
| 3616 | UINT8 *src = | |
| 3616 | UINT8 *src = sta | |
| 3617 | 3617 | size_t srcsize = state->memregion( "sprcol" )->bytes(); |
| 3618 | 3618 | int cnt; |
| 3619 | 3619 | size_t needed = srcsize / 2 * 3; |
| r15082 | r15083 | |
|---|---|---|
| 110 | 110 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "DSW0", "DSW1" }; |
| 111 | 111 | gameplan_state *state = device->machine().driver_data<gameplan_state>(); |
| 112 | 112 | |
| 113 | return | |
| 113 | return s | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 |
| r15082 | r15083 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | static READ8_DEVICE_HANDLER( pengadvb_psg_port_a_r ) |
| 180 | 180 | { |
| 181 | return | |
| 181 | return | |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | static const ay8910_interface pengadvb_ay8910_interface = |
| r15082 | r15083 | |
| 212 | 212 | i8255_device *ppi = device->machine().device<i8255_device>("ppi8255"); |
| 213 | 213 | address_space *space = device->machine().firstcpu->memory().space(AS_PROGRAM); |
| 214 | 214 | if ((ppi->read(*space, 2) & 0x0f) == 0) |
| 215 | return | |
| 215 | return | |
| 216 | 216 | |
| 217 | 217 | return 0xff; |
| 218 | 218 | } |
| r15082 | r15083 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | static INTERRUPT_GEN( capbowl_interrupt ) |
| 109 | 109 | { |
| 110 | if ( | |
| 110 | if ( | |
| 111 | 111 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); /* trigger self test */ |
| 112 | 112 | } |
| 113 | 113 | |
| r15082 | r15083 | |
| 152 | 152 | |
| 153 | 153 | READ8_MEMBER(capbowl_state::track_0_r) |
| 154 | 154 | { |
| 155 | return (i | |
| 155 | return (iop | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | |
| 159 | 159 | READ8_MEMBER(capbowl_state::track_1_r) |
| 160 | 160 | { |
| 161 | return (i | |
| 161 | return (iop | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
| r15082 | r15083 | |
| 166 | 166 | { |
| 167 | 167 | |
| 168 | 168 | /* reset the trackball counters */ |
| 169 | m_last_trackball_val[0] = input_port_read(machine(), "TRACKY"); | |
| 170 | m_last_trackball_val[1] = input_port_read(machine(), "TRACKX"); | |
| 169 | m_last_trackball_val[0] = ioport("TRACKY")->read(); | |
| 170 | m_last_trackball_val[1] = ioport("TRACKX")->read(); | |
| 171 | 171 | |
| 172 | 172 | watchdog_reset_w(space, offset, data); |
| 173 | 173 | } |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | return (tc0140syt_comm_r(m_tc0140syt, 0) & 0xff); /* sound interface read */ |
| 181 | 181 | |
| 182 | 182 | case 0x04: |
| 183 | return i | |
| 183 | return iop | |
| 184 | 184 | |
| 185 | 185 | case 0x05: |
| 186 | return i | |
| 186 | return iop | |
| 187 | 187 | |
| 188 | 188 | case 0x06: |
| 189 | return i | |
| 189 | return iop | |
| 190 | 190 | |
| 191 | 191 | case 0x07: |
| 192 | 192 | return m_coin_word; /* bits 3&4 coin lockouts, must return zero */ |
| 193 | 193 | |
| 194 | 194 | case 0x08: |
| 195 | return i | |
| 195 | return iop | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | logerror("CPU #0 PC %06x: warning - read unmapped ioc offset %06x\n",cpu_get_pc(&space.device()),offset); |
| r15082 | r15083 | |
| 842 | 842 | { |
| 843 | 843 | darius_state *state = machine.driver_data<darius_state>(); |
| 844 | 844 | |
| 845 | state->membank("bank1")->configure_entries(0, 4, | |
| 845 | state->membank("bank1")->configure_entries(0, 4, sta | |
| 846 | 846 | state->membank("bank1")->configure_entry(4, state->memregion("audiocpu")->base()); |
| 847 | 847 | state->membank("bank1")->set_entry(4); |
| 848 | 848 |
| r15082 | r15083 | |
|---|---|---|
| 342 | 342 | CUSTOM_INPUT_MEMBER(ssingles_state::controls_r) |
| 343 | 343 | { |
| 344 | 344 | int data = 7; |
| 345 | switch(i | |
| 345 | switch(iop | |
| 346 | 346 | { |
| 347 | 347 | case 0x01: data = 1; break; |
| 348 | 348 | case 0x02: data = 2; break; |
| r15082 | r15083 | |
|---|---|---|
| 338 | 338 | switch (offset) |
| 339 | 339 | { |
| 340 | 340 | case 2: /* $90 -- sound return */ |
| 341 | result = i | |
| 341 | result = iop | |
| 342 | 342 | result &= ~0x0002; |
| 343 | 343 | if (dcs_control_r(machine()) & 0x800) |
| 344 | 344 | result |= 0x0002; |
| r15082 | r15083 | |
| 347 | 347 | case 0: /* $80 */ |
| 348 | 348 | case 1: /* $88 */ |
| 349 | 349 | case 3: /* $98 */ |
| 350 | result = i | |
| 350 | result = iop | |
| 351 | 351 | break; |
| 352 | 352 | |
| 353 | 353 | case 4: /* $a0 */ |
| 354 | result = i | |
| 354 | result = iop | |
| 355 | 355 | if (cpu_get_pc(&space.device()) == 0x802d428) |
| 356 | 356 | device_spin_until_interrupt(&space.device()); |
| 357 | 357 | break; |
| r15082 | r15083 | |
|---|---|---|
| 168 | 168 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 169 | 169 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 170 | 170 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 171 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 171 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* ? */ | |
| 172 | 172 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 173 | 173 | |
| 174 | 174 | PORT_START( "IO_01" ) |
| r15082 | r15083 | |
|---|---|---|
| 256 | 256 | |
| 257 | 257 | READ32_MEMBER( beathead_state::input_2_r ) |
| 258 | 258 | { |
| 259 | int result = i | |
| 259 | int result = iop | |
| 260 | 260 | if (m_sound_to_cpu_ready) result ^= 0x10; |
| 261 | 261 | if (m_cpu_to_sound_ready) result ^= 0x20; |
| 262 | 262 | return result; |
| r15082 | r15083 | |
|---|---|---|
| 258 | 258 | If you change the status *every* read, the HW stucks. |
| 259 | 259 | */ |
| 260 | 260 | |
| 261 | m_mixdata = (i | |
| 261 | m_mixdata = (iop | |
| 262 | 262 | |
| 263 | 263 | return m_mixdata; |
| 264 | 264 | } |
| r15082 | r15083 | |
|---|---|---|
| 45 | 45 | xxxx - input port #2 |
| 46 | 46 | xxxx - dip switches (2x8 bits) (multiplexed) |
| 47 | 47 | */ |
| 48 | int retval = i | |
| 48 | int retval = iop | |
| 49 | 49 | |
| 50 | 50 | switch(mux_port & 0x30) |
| 51 | 51 | { |
| 52 | case 0x00: retval |= ((input_port_read(machine(), "DSW1") & 1) << 4) | ((input_port_read(machine(), "DSW1") & 0x10) << 1) | |
| 53 | | ((input_port_read(machine(), "DSW2") & 1) << 6) | ((input_port_read(machine(), "DSW2") & 0x10) <<3); break; | |
| 54 | case 0x10: retval |= ((input_port_read(machine(), "DSW1") & 2) << 3) | ((input_port_read(machine(), "DSW1") & 0x20) ) | |
| 55 | | ((input_port_read(machine(), "DSW2") & 2) << 5) | ((input_port_read(machine(), "DSW2") & 0x20) <<2); break; | |
| 56 | case 0x20: retval |= ((input_port_read(machine(), "DSW1") & 4) << 2) | ((input_port_read(machine(), "DSW1") & 0x40) >> 1) | |
| 57 | | ((input_port_read(machine(), "DSW2") & 4) << 4) | ((input_port_read(machine(), "DSW2") & 0x40) <<1); break; | |
| 58 | case 0x30: retval |= ((input_port_read(machine(), "DSW1") & 8) << 1) | ((input_port_read(machine(), "DSW1") & 0x80) >> 2) | |
| 59 | | ((input_port_read(machine(), "DSW2") & 8) << 3) | ((input_port_read(machine(), "DSW2") & 0x80) ); break; | |
| 52 | case 0x00: retval |= ((ioport("DSW1")->read() & 1) << 4) | ((ioport("DSW1")->read() & 0x10) << 1) | |
| 53 | | ((ioport("DSW2")->read() & 1) << 6) | ((ioport("DSW2")->read() & 0x10) <<3); break; | |
| 54 | case 0x10: retval |= ((ioport("DSW1")->read() & 2) << 3) | ((ioport("DSW1")->read() & 0x20) ) | |
| 55 | | ((ioport("DSW2")->read() & 2) << 5) | ((ioport("DSW2")->read() & 0x20) <<2); break; | |
| 56 | case 0x20: retval |= ((ioport("DSW1")->read() & 4) << 2) | ((ioport("DSW1")->read() & 0x40) >> 1) | |
| 57 | | ((ioport("DSW2")->read() & 4) << 4) | ((ioport("DSW2")->read() & 0x40) <<1); break; | |
| 58 | case 0x30: retval |= ((ioport("DSW1")->read() & 8) << 1) | ((ioport("DSW1")->read() & 0x80) >> 2) | |
| 59 | | ((ioport("DSW2")->read() & 8) << 3) | ((ioport("DSW2")->read() & 0x80) ); break; | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return retval; |
| r15082 | r15083 | |
|---|---|---|
| 285 | 285 | { |
| 286 | 286 | UINT8 p1_sht_sw,p2_sht_sw; |
| 287 | 287 | |
| 288 | p1_sht_sw = (input_port_read(device->machine(), "P1_RELEASE") & 0x80)>>7; | |
| 289 | p2_sht_sw = (input_port_read(device->machine(), "P2_RELEASE") & 0x80)>>6; | |
| 288 | p1_sht_sw = (device->machine().root_device().ioport("P1_RELEASE")->read() & 0x80)>>7; | |
| 289 | p2_sht_sw = (device->machine().root_device().ioport("P2_RELEASE")->read() & 0x80)>>6; | |
| 290 | 290 | |
| 291 | 291 | return p1_sht_sw | p2_sht_sw; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | static READ8_DEVICE_HANDLER( p1_r ) |
| 295 | 295 | { |
| 296 | return ( | |
| 296 | return ( | |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | static READ8_DEVICE_HANDLER( p2_r ) |
| 300 | 300 | { |
| 301 | return ( | |
| 301 | return ( | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | static ADDRESS_MAP_START( suprgolf_map, AS_PROGRAM, 8, suprgolf_state ) |
| r15082 | r15083 | |
|---|---|---|
| 287 | 287 | |
| 288 | 288 | static UINT8 duart_input( device_t *device ) |
| 289 | 289 | { |
| 290 | return | |
| 290 | return | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | static const microtouch_interface adb_microtouch_config = |
| r15082 | r15083 | |
| 386 | 386 | |
| 387 | 387 | switch (m_mux_data) |
| 388 | 388 | { |
| 389 | case 0x00: value = input_port_read(machine(), "x0"); break; | |
| 390 | case 0x01: value = input_port_read(machine(), "x1"); break; | |
| 391 | case 0x02: value = input_port_read(machine(), "x2"); break; | |
| 392 | case 0x03: value = input_port_read(machine(), "1P_UP"); break; | |
| 393 | case 0x04: value = input_port_read(machine(), "1P_B1"); break; | |
| 394 | case 0x05: value = input_port_read(machine(), "x5"); break; | |
| 395 | case 0x06: value = input_port_read(machine(), "1P_RIGHT"); break; | |
| 396 | case 0x07: value = input_port_read(machine(), "1P_DOWN"); break; | |
| 397 | case 0x08: value = input_port_read(machine(), "1P_LEFT"); break; | |
| 398 | case 0x09: value = input_port_read(machine(), "x9"); break; | |
| 399 | case 0x0a: value = input_port_read(machine(), "x10"); break; | |
| 400 | case 0x0b: value = input_port_read(machine(), "x11"); break; | |
| 401 | case 0x0c: value = input_port_read(machine(), "x12"); break; | |
| 402 | case 0x0d: value = input_port_read(machine(), "x13"); break; | |
| 403 | case 0x0e: value = input_port_read(machine(), "1P_START"); break; | |
| 404 | case 0x0f: value = input_port_read(machine(), "1P_COIN"); break; | |
| 389 | case 0x00: value = ioport("x0")->read(); break; | |
| 390 | case 0x01: value = ioport("x1")->read(); break; | |
| 391 | case 0x02: value = ioport("x2")->read(); break; | |
| 392 | case 0x03: value = ioport("1P_UP")->read(); break; | |
| 393 | case 0x04: value = ioport("1P_B1")->read(); break; | |
| 394 | case 0x05: value = ioport("x5")->read(); break; | |
| 395 | case 0x06: value = ioport("1P_RIGHT")->read(); break; | |
| 396 | case 0x07: value = ioport("1P_DOWN")->read(); break; | |
| 397 | case 0x08: value = ioport("1P_LEFT")->read(); break; | |
| 398 | case 0x09: value = ioport("x9")->read(); break; | |
| 399 | case 0x0a: value = ioport("x10")->read(); break; | |
| 400 | case 0x0b: value = ioport("x11")->read(); break; | |
| 401 | case 0x0c: value = ioport("x12")->read(); break; | |
| 402 | case 0x0d: value = ioport("x13")->read(); break; | |
| 403 | case 0x0e: value = ioport("1P_START")->read(); break; | |
| 404 | case 0x0f: value = ioport("1P_COIN")->read(); break; | |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | m_mux_data++; |
| r15082 | r15083 | |
|---|---|---|
| 144 | 144 | |
| 145 | 145 | WRITE32_MEMBER(konamigq_state::eeprom_w) |
| 146 | 146 | { |
| 147 | i | |
| 147 | iop | |
| 148 | 148 | cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE ); |
| 149 | 149 | } |
| 150 | 150 |
| r15082 | r15083 | |
|---|---|---|
| 212 | 212 | /* Generic read handlers for Dip Switches and coins inputs */ |
| 213 | 213 | READ8_MEMBER(snesb_state::snesb_dsw1_r) |
| 214 | 214 | { |
| 215 | return i | |
| 215 | return iop | |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | READ8_MEMBER(snesb_state::snesb_dsw2_r) |
| 219 | 219 | { |
| 220 | return i | |
| 220 | return iop | |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | READ8_MEMBER(snesb_state::snesb_coin_r) |
| 224 | 224 | { |
| 225 | return i | |
| 225 | return iop | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | READ8_MEMBER(pcxt_state::disk_iobank_r) |
| 147 | 147 | { |
| 148 | 148 | //printf("Read Prototyping card [%02x] @ PC=%05x\n",offset,cpu_get_pc(&space.device())); |
| 149 | //if(offset == 0) return input_port_read(machine(), "DSW"); | |
| 150 | if(offset == 1) return input_port_read(machine(), "IN1"); | |
| 149 | //if(offset == 0) return ioport("DSW")->read(); | |
| 150 | if(offset == 1) return ioport("IN1")->read(); | |
| 151 | 151 | |
| 152 | 152 | return m_disk_data[offset]; |
| 153 | 153 | } |
| r15082 | r15083 | |
|---|---|---|
| 279 | 279 | PORT_DIPSETTING( 0x0800, "Mode 1" ) |
| 280 | 280 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| 281 | 281 | PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 282 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 283 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 284 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 282 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 283 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 284 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 285 | 285 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) |
| 286 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 287 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 288 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 286 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 287 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 288 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 289 | 289 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 290 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 291 | PORT_DIPSETTING( 0x4000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 292 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 290 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 291 | PORT_DIPSETTING( 0x4000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 292 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 293 | 293 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_1C ) ) |
| 294 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 295 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0800) | |
| 296 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x0800, PORTCOND_EQUALS, 0x0000) | |
| 294 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 295 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0800) | |
| 296 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x0800, EQUALS, 0x0000) | |
| 297 | 297 | |
| 298 | 298 | PORT_START("DSW2") |
| 299 | 299 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 662 | 662 | { |
| 663 | 663 | INT8 value, new_value; |
| 664 | 664 | |
| 665 | new_value = i | |
| 665 | new_value = iop | |
| 666 | 666 | if (new_value == m_old_p1_paddle_h) return 0; |
| 667 | 667 | value = new_value - m_old_p1_paddle_h; |
| 668 | 668 | m_old_p1_paddle_h = new_value; |
| r15082 | r15083 | |
| 674 | 674 | { |
| 675 | 675 | INT8 value, new_value; |
| 676 | 676 | |
| 677 | new_value = i | |
| 677 | new_value = iop | |
| 678 | 678 | if (new_value == m_old_p2_paddle_h) return 0; |
| 679 | 679 | value = new_value - m_old_p2_paddle_h; |
| 680 | 680 | m_old_p2_paddle_h = new_value; |
| r15082 | r15083 | |
| 788 | 788 | |
| 789 | 789 | READ8_MEMBER(toaplan2_state::v25_dswa_r) |
| 790 | 790 | { |
| 791 | return i | |
| 791 | return iop | |
| 792 | 792 | } |
| 793 | 793 | |
| 794 | 794 | |
| 795 | 795 | READ8_MEMBER(toaplan2_state::v25_dswb_r) |
| 796 | 796 | { |
| 797 | return i | |
| 797 | return iop | |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | |
| 801 | 801 | READ8_MEMBER(toaplan2_state::v25_jmpr_r) |
| 802 | 802 | { |
| 803 | return i | |
| 803 | return iop | |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | |
| r15082 | r15083 | |
| 1010 | 1010 | logerror("CPU #0 PC:%06X - Unknown EEPROM data being written %04X\n",cpu_get_pc(&space.device()),data); |
| 1011 | 1011 | |
| 1012 | 1012 | if ( ACCESSING_BITS_0_7 ) |
| 1013 | i | |
| 1013 | iop | |
| 1014 | 1014 | |
| 1015 | 1015 | m_z80_busreq = data & 0x10; // see bbakraid_eeprom_r above |
| 1016 | 1016 | } |
| r15082 | r15083 | |
| 2521 | 2521 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) ) |
| 2522 | 2522 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) ) |
| 2523 | 2523 | PORT_DIPSETTING( 0x001c, DEF_STR( Free_Play ) ) |
| 2524 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2525 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2526 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2527 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2528 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2529 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2530 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2531 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2532 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2524 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2525 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2526 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2527 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2528 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2529 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2530 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2531 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2532 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x001c, NOTEQUALS, 0x001c) | |
| 2533 | 2533 | // When Coin_A is set to Free_Play, Coin_A becomes Coin_A and Coin_B, and the following dips occur |
| 2534 | PORT_DIPNAME( 0x0020, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2535 | PORT_DIPSETTING( 0x0000, "90 degrees ACW" ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2536 | PORT_DIPSETTING( 0x0020, DEF_STR( Normal ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2537 | PORT_DIPNAME( 0x0040, 0x0000, "Effect" ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2538 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2539 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2540 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2541 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2542 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2534 | PORT_DIPNAME( 0x0020, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2535 | PORT_DIPSETTING( 0x0000, "90 degrees ACW" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2536 | PORT_DIPSETTING( 0x0020, DEF_STR( Normal ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2537 | PORT_DIPNAME( 0x0040, 0x0000, "Effect" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2538 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2539 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2540 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2541 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2542 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSWA", 0x001c, EQUALS, 0x001c) | |
| 2543 | 2543 | |
| 2544 | 2544 | PORT_START("DSWB") |
| 2545 | 2545 | PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:!1,!2") |
| r15082 | r15083 | |
| 2563 | 2563 | PORT_DIPSETTING( 0x0060, DEF_STR( Infinite ) ) |
| 2564 | 2564 | PORT_DIPSETTING( 0x0070, "Invulnerability (Cheat)" ) |
| 2565 | 2565 | PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:!8") |
| 2566 | PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) PORT_CONDITION("JMPR",0x0003,PORTCOND_NOTEQUALS,0x0000) // Non-Japan | |
| 2567 | PORT_DIPSETTING( 0x0080, "Every 2000k" ) PORT_CONDITION("JMPR",0x0003,PORTCOND_NOTEQUALS,0x0000) // Non-Japan | |
| 2568 | PORT_DIPSETTING( 0x0080, "1000k and 2000k" ) PORT_CONDITION("JMPR",0x0003,PORTCOND_EQUALS,0x0000) // Japan | |
| 2569 | PORT_DIPSETTING( 0x0000, "Every 1000k" ) PORT_CONDITION("JMPR",0x0003,PORTCOND_EQUALS,0x0000) // Japan | |
| 2566 | PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) PORT_CONDITION("JMPR",0x0003,NOTEQUALS,0x0000) // Non-Japan | |
| 2567 | PORT_DIPSETTING( 0x0080, "Every 2000k" ) PORT_CONDITION("JMPR",0x0003,NOTEQUALS,0x0000) // Non-Japan | |
| 2568 | PORT_DIPSETTING( 0x0080, "1000k and 2000k" ) PORT_CONDITION("JMPR",0x0003,EQUALS,0x0000) // Japan | |
| 2569 | PORT_DIPSETTING( 0x0000, "Every 1000k" ) PORT_CONDITION("JMPR",0x0003,EQUALS,0x0000) // Japan | |
| 2570 | 2570 | |
| 2571 | 2571 | PORT_START("JMPR") |
| 2572 | 2572 | PORT_DIPNAME( 0x0008, 0x0000, "Stage Edit" ) PORT_DIPLOCATION("SW3:!1") |
| r15082 | r15083 | |
| 2642 | 2642 | |
| 2643 | 2643 | PORT_START("DSW") // DSWA and DSWB |
| 2644 | 2644 | PORT_SERVICE_DIPLOC(0x0001, IP_ACTIVE_HIGH, "SW1:!1") |
| 2645 | PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2646 | PORT_DIPSETTING( 0x0000, "1" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2647 | PORT_DIPSETTING( 0x0002, "2" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2648 | PORT_DIPNAME( 0x0002, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2649 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2650 | PORT_DIPSETTING( 0x0002, "90 degrees ACW" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2645 | PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2646 | PORT_DIPSETTING( 0x0000, "1" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2647 | PORT_DIPSETTING( 0x0002, "2" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2648 | PORT_DIPNAME( 0x0002, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2649 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2650 | PORT_DIPSETTING( 0x0002, "90 degrees ACW" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2651 | 2651 | PORT_DIPNAME( 0x001c, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!3,!4,!5") |
| 2652 | 2652 | PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) ) |
| 2653 | 2653 | PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
| 2657 | 2657 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) ) |
| 2658 | 2658 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) ) |
| 2659 | 2659 | PORT_DIPSETTING( 0x001c, DEF_STR( Free_Play ) ) |
| 2660 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2661 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2662 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2663 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2664 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2665 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2666 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2667 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2668 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2660 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2661 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2662 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2663 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2664 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2665 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2666 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2667 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2668 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2669 | 2669 | // When Coin_A is set to Free_Play, Coin_A becomes Coin_A and Coin_B, and the following dips occur |
| 2670 | PORT_DIPNAME( 0x0020, 0x0000, "Hit Score" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2671 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2672 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2673 | PORT_DIPNAME( 0x0040, 0x0000, "Sound Effect" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2674 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2675 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2676 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2677 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2678 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2670 | PORT_DIPNAME( 0x0020, 0x0000, "Hit Score" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2671 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2672 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2673 | PORT_DIPNAME( 0x0040, 0x0000, "Sound Effect" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2674 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2675 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2676 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2677 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2678 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2679 | 2679 | PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:!1,!2") |
| 2680 | 2680 | PORT_DIPSETTING( 0x0100, DEF_STR( Easy ) ) |
| 2681 | 2681 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) |
| r15082 | r15083 | |
| 2771 | 2771 | |
| 2772 | 2772 | PORT_START("DSW") // DSWA and DSWB |
| 2773 | 2773 | PORT_SERVICE_DIPLOC(0x0001, IP_ACTIVE_HIGH, "SW1:!1") |
| 2774 | PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2775 | PORT_DIPSETTING( 0x0000, "1" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2776 | PORT_DIPSETTING( 0x0002, "2" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2777 | PORT_DIPNAME( 0x0002, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2778 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2779 | PORT_DIPSETTING( 0x0002, "90 degrees ACW" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2774 | PORT_DIPNAME( 0x0002, 0x0000, "Credits to Start" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2775 | PORT_DIPSETTING( 0x0000, "1" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2776 | PORT_DIPSETTING( 0x0002, "2" ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2777 | PORT_DIPNAME( 0x0002, 0x0000, "Joystick Mode" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!2") | |
| 2778 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2779 | PORT_DIPSETTING( 0x0002, "90 degrees ACW" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2780 | 2780 | PORT_DIPNAME( 0x001c, 0x0000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!3,!4,!5") |
| 2781 | 2781 | PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) ) |
| 2782 | 2782 | PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
| 2786 | 2786 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) ) |
| 2787 | 2787 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) ) |
| 2788 | 2788 | PORT_DIPSETTING( 0x001c, DEF_STR( Free_Play ) ) |
| 2789 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2790 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2791 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2792 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2793 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2794 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2795 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2796 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2797 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_NOTEQUALS, 0x001c) | |
| 2789 | PORT_DIPNAME( 0x00e0, 0x0000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6,!7,!8") | |
| 2790 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2791 | PORT_DIPSETTING( 0x00a0, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2792 | PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2793 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2794 | // PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2795 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2796 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2797 | PORT_DIPSETTING( 0x0060, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x001c, NOTEQUALS, 0x001c) | |
| 2798 | 2798 | // When Coin_A is set to Free_Play, Coin_A becomes Coin_A and Coin_B, and the following dips occur |
| 2799 | PORT_DIPNAME( 0x0020, 0x0000, "Hit Score" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2800 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2801 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2802 | PORT_DIPNAME( 0x0040, 0x0000, "Sound Effect" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2803 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2804 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2805 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2806 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2807 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, PORTCOND_EQUALS, 0x001c) | |
| 2799 | PORT_DIPNAME( 0x0020, 0x0000, "Hit Score" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!6") | |
| 2800 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2801 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2802 | PORT_DIPNAME( 0x0040, 0x0000, "Sound Effect" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!7") | |
| 2803 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2804 | PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2805 | PORT_DIPNAME( 0x0080, 0x0000, "Music" ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) PORT_DIPLOCATION("SW1:!8") | |
| 2806 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2807 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) PORT_CONDITION("DSW", 0x001c, EQUALS, 0x001c) | |
| 2808 | 2808 | PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:!1,!2") |
| 2809 | 2809 | PORT_DIPSETTING( 0x0100, DEF_STR( Easy ) ) |
| 2810 | 2810 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | READ8_MEMBER(cinemat_state::inputs_r) |
| 81 | 81 | { |
| 82 | return (i | |
| 82 | return (iop | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | READ8_MEMBER(cinemat_state::switches_r) |
| 87 | 87 | { |
| 88 | 88 | static const UINT8 switch_shuffle[8] = { 2,5,4,3,0,1,6,7 }; |
| 89 | return (i | |
| 89 | return (iop | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | |
| r15082 | r15083 | |
| 149 | 149 | else |
| 150 | 150 | { |
| 151 | 151 | int xval = (INT16)(cpu_get_reg(device, CCPU_X) << 4) >> 4; |
| 152 | return ( | |
| 152 | return (s | |
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
| r15082 | r15083 | |
| 167 | 167 | int delta_wheel; |
| 168 | 168 | |
| 169 | 169 | /* the shift register is cleared once per 'frame' */ |
| 170 | delta_wheel = (INT8)i | |
| 170 | delta_wheel = (INT8)iop | |
| 171 | 171 | if (delta_wheel > 3) |
| 172 | 172 | delta_wheel = 3; |
| 173 | 173 | else if (delta_wheel < -3) |
| r15082 | r15083 | |
| 179 | 179 | |
| 180 | 180 | READ8_MEMBER(cinemat_state::speedfrk_gear_r) |
| 181 | 181 | { |
| 182 | int gearval = i | |
| 182 | int gearval = iop | |
| 183 | 183 | |
| 184 | 184 | /* check the fake gear input port and determine the bit settings for the gear */ |
| 185 | 185 | if ((gearval & 0x0f) != 0x0f) |
| 186 | 186 | m_gear = gearval & 0x0f; |
| 187 | 187 | |
| 188 | 188 | /* add the start key into the mix -- note that it overlaps 4th gear */ |
| 189 | if (!(i | |
| 189 | if (!(iop | |
| 190 | 190 | m_gear &= ~0x08; |
| 191 | 191 | |
| 192 | 192 | return (m_gear >> offset) & 1; |
| r15082 | r15083 | |
| 232 | 232 | { |
| 233 | 233 | /* handle special keys first */ |
| 234 | 234 | if (sundance_port_map[offset].portname) |
| 235 | return (i | |
| 235 | return (iop | |
| 236 | 236 | else |
| 237 | return (i | |
| 237 | return (iop | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | |
| r15082 | r15083 | |
| 247 | 247 | |
| 248 | 248 | READ8_MEMBER(cinemat_state::boxingb_dial_r) |
| 249 | 249 | { |
| 250 | int value = i | |
| 250 | int value = iop | |
| 251 | 251 | if (!m_mux_select) offset += 4; |
| 252 | 252 | return (value >> offset) & 1; |
| 253 | 253 | } |
| r15082 | r15083 | |
|---|---|---|
| 124 | 124 | { |
| 125 | 125 | if (~m_keyb & (1 << i)) |
| 126 | 126 | { |
| 127 | res = i | |
| 127 | res = iop | |
| 128 | 128 | break; |
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | res |= (i | |
| 132 | res |= (iop | |
| 133 | 133 | |
| 134 | 134 | if (m_nvram_init_count) |
| 135 | 135 | { |
| r15082 | r15083 | |
|---|---|---|
| 371 | 371 | { |
| 372 | 372 | switch ( (m_selected_ip >> 5) & 3 ) |
| 373 | 373 | { // From WEC Le Mans Schems: |
| 374 | case 0: return i | |
| 374 | case 0: return iop | |
| 375 | 375 | case 1: return ~0; // ????? - Schems: Not Used |
| 376 | case 2: return i | |
| 376 | case 2: return iop | |
| 377 | 377 | case 3: return ~0; // Table - Schems: Turnvr |
| 378 | 378 | |
| 379 | 379 | default: return ~0; |
| r15082 | r15083 | |
| 1251 | 1251 | wecleman_state *state = machine.driver_data<wecleman_state>(); |
| 1252 | 1252 | int i, len; |
| 1253 | 1253 | UINT8 *RAM; |
| 1254 | // UINT16 *RAM1 = (UINT16 *) | |
| 1254 | // UINT16 *RAM1 = (UINT16 *) sta | |
| 1255 | 1255 | // RAM1[0x08c2/2] = 0x601e; // faster self test |
| 1256 | 1256 | |
| 1257 | 1257 | /* Decode GFX Roms - Compensate for the address lines scrambling */ |
| r15082 | r15083 | |
| 1261 | 1261 | I hope you'll appreciate this effort! */ |
| 1262 | 1262 | |
| 1263 | 1263 | /* let's swap even and odd *pixels* of the sprites */ |
| 1264 | RAM = | |
| 1264 | RAM = sta | |
| 1265 | 1265 | len = state->memregion("gfx1")->bytes(); |
| 1266 | 1266 | for (i = 0; i < len; i ++) |
| 1267 | 1267 | { |
| r15082 | r15083 | |
| 1393 | 1393 | static DRIVER_INIT( hotchase ) |
| 1394 | 1394 | { |
| 1395 | 1395 | wecleman_state *state = machine.driver_data<wecleman_state>(); |
| 1396 | // UINT16 *RAM1 = (UINT16) | |
| 1396 | // UINT16 *RAM1 = (UINT16) sta | |
| 1397 | 1397 | // RAM[0x1140/2] = 0x0015; RAM[0x195c/2] = 0x601A; // faster self test |
| 1398 | 1398 | |
| 1399 | 1399 | UINT8 *RAM; |
| r15082 | r15083 | |
| 1401 | 1401 | /* Decode GFX Roms */ |
| 1402 | 1402 | |
| 1403 | 1403 | /* Let's swap even and odd bytes of the sprites gfx roms */ |
| 1404 | RAM = | |
| 1404 | RAM = sta | |
| 1405 | 1405 | |
| 1406 | 1406 | /* Now we can unpack each nibble of the sprites into a pixel (one byte) */ |
| 1407 | 1407 | hotchase_sprite_decode(machine,3,0x80000*2); // num banks, bank len |
| r15082 | r15083 | |
|---|---|---|
| 290 | 290 | { |
| 291 | 291 | switch(m_mux_data) |
| 292 | 292 | { |
| 293 | case 0x01: return input_port_read(machine(), "PL1"); | |
| 294 | case 0x02: return input_port_read(machine(), "PL2"); | |
| 295 | case 0x04: return input_port_read(machine(), "PL3"); | |
| 296 | case 0x08: return input_port_read(machine(), "PL4"); | |
| 297 | case 0x10: return input_port_read(machine(), "PL5"); | |
| 298 | case 0x20: return input_port_read(machine(), "PL6"); | |
| 293 | case 0x01: return ioport("PL1")->read(); | |
| 294 | case 0x02: return ioport("PL2")->read(); | |
| 295 | case 0x04: return ioport("PL3")->read(); | |
| 296 | case 0x08: return ioport("PL4")->read(); | |
| 297 | case 0x10: return ioport("PL5")->read(); | |
| 298 | case 0x20: return ioport("PL6")->read(); | |
| 299 | 299 | case 0x40: |
| 300 | 300 | { |
| 301 | output_set_lamp_value(37, 1 - ((input_port_read(machine(), "SVC") >> 5) & 1)); /* Operator Key LAMP */ | |
| 302 | return input_port_read(machine(), "SVC"); | |
| 301 | output_set_lamp_value(37, 1 - ((ioport("SVC")->read() >> 5) & 1)); /* Operator Key LAMP */ | |
| 302 | return ioport("SVC")->read(); | |
| 303 | 303 | } |
| 304 | case 0x80: return input_port_read(machine(), "DSW"); /* Polled at $162a through NMI routine */ | |
| 305 | case 0x3f: return input_port_read(machine(), "UNK"); | |
| 304 | case 0x80: return ioport("DSW")->read(); /* Polled at $162a through NMI routine */ | |
| 305 | case 0x3f: return ioport("UNK")->read(); | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | logerror("Mux_data %02X\n", m_mux_data); |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | /* enable coin & start input? Wild guess!!! */ |
| 75 | 75 | if (m_pc3092_data[1] & 0x02) |
| 76 | ret = i | |
| 76 | ret = iop | |
| 77 | 77 | else |
| 78 | 78 | ret = 0x00; |
| 79 | 79 | |
| r15082 | r15083 | |
| 143 | 143 | |
| 144 | 144 | if (LOG_PC3259) logerror("%04X: read PC3259 #%d = 0x%02x\n", cpu_get_pc(&space.device()), reg, ret); |
| 145 | 145 | |
| 146 | return ret | (i | |
| 146 | return ret | (iop | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | { |
| 92 | 92 | switch(offset & 7) |
| 93 | 93 | { |
| 94 | case 0: return input_port_read(machine(), "IN0"); | |
| 95 | case 1: return input_port_read(machine(), "IN1"); | |
| 96 | case 2: return input_port_read(machine(), "IN2"); | |
| 97 | case 3: return input_port_read(machine(), "IN3"); | |
| 98 | case 4: return input_port_read(machine(), "IN4"); | |
| 99 | case 5: return input_port_read(machine(), "IN5"); | |
| 100 | case 6: return input_port_read(machine(), "IN6"); | |
| 101 | case 7: return input_port_read(machine(), "IN7"); | |
| 94 | case 0: return ioport("IN0")->read(); | |
| 95 | case 1: return ioport("IN1")->read(); | |
| 96 | case 2: return ioport("IN2")->read(); | |
| 97 | case 3: return ioport("IN3")->read(); | |
| 98 | case 4: return ioport("IN4")->read(); | |
| 99 | case 5: return ioport("IN5")->read(); | |
| 100 | case 6: return ioport("IN6")->read(); | |
| 101 | case 7: return ioport("IN7")->read(); | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | return 0xff; |
| r15082 | r15083 | |
| 209 | 209 | PORT_DIPSETTING( 0x04, "480p (cash + tokens)" ) |
| 210 | 210 | PORT_DIPSETTING( 0x00, "600p (cash + tokens)" ) |
| 211 | 211 | PORT_DIPNAME( 0x30, 0x00, "Percentage Payout" ) |
| 212 | PORT_DIPSETTING( 0x00, "76%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_LESSTHAN, 0x80) | |
| 213 | PORT_DIPSETTING( 0x10, "80%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_LESSTHAN, 0x80) | |
| 214 | PORT_DIPSETTING( 0x20, "86%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_LESSTHAN, 0x80) | |
| 215 | PORT_DIPSETTING( 0x30, "88%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_LESSTHAN, 0x80) | |
| 216 | PORT_DIPSETTING( 0x00, "78%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_NOTLESSTHAN, 0x80) | |
| 217 | PORT_DIPSETTING( 0x10, "82%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_NOTLESSTHAN, 0x80) | |
| 218 | PORT_DIPSETTING( 0x20, "86%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_NOTLESSTHAN, 0x80) | |
| 219 | PORT_DIPSETTING( 0x30, "90%" ) PORT_CONDITION("DSW1", 0xc0, PORTCOND_NOTLESSTHAN, 0x80) | |
| 212 | PORT_DIPSETTING( 0x00, "76%" ) PORT_CONDITION("DSW1", 0xc0, LESSTHAN, 0x80) | |
| 213 | PORT_DIPSETTING( 0x10, "80%" ) PORT_CONDITION("DSW1", 0xc0, LESSTHAN, 0x80) | |
| 214 | PORT_DIPSETTING( 0x20, "86%" ) PORT_CONDITION("DSW1", 0xc0, LESSTHAN, 0x80) | |
| 215 | PORT_DIPSETTING( 0x30, "88%" ) PORT_CONDITION("DSW1", 0xc0, LESSTHAN, 0x80) | |
| 216 | PORT_DIPSETTING( 0x00, "78%" ) PORT_CONDITION("DSW1", 0xc0, NOTLESSTHAN, 0x80) | |
| 217 | PORT_DIPSETTING( 0x10, "82%" ) PORT_CONDITION("DSW1", 0xc0, NOTLESSTHAN, 0x80) | |
| 218 | PORT_DIPSETTING( 0x20, "86%" ) PORT_CONDITION("DSW1", 0xc0, NOTLESSTHAN, 0x80) | |
| 219 | PORT_DIPSETTING( 0x30, "90%" ) PORT_CONDITION("DSW1", 0xc0, NOTLESSTHAN, 0x80) | |
| 220 | 220 | PORT_DIPNAME( 0xc0, 0x80, "Price Per Game" ) |
| 221 | 221 | PORT_DIPSETTING( 0x00, "2p" ) |
| 222 | 222 | PORT_DIPSETTING( 0x40, "5p" ) |
| r15082 | r15083 | |
|---|---|---|
| 80 | 80 | READ8_MEMBER(funkybee_state::funkybee_input_port_0_r) |
| 81 | 81 | { |
| 82 | 82 | watchdog_reset_r(space, 0); |
| 83 | return i | |
| 83 | return iop | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | WRITE8_MEMBER(funkybee_state::funkybee_coin_counter_w) |
| r15082 | r15083 | |
|---|---|---|
| 532 | 532 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) // returns back to MS-DOS (likely to be unmapped and actually used as a lame protection check) |
| 533 | 533 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 534 | 534 | PORT_START("IOCARD3") |
| 535 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 535 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 536 | 536 | PORT_BIT( 0xdfff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 537 | 537 | |
| 538 | 538 | PORT_START("IOCARD4") |
| r15082 | r15083 | |
|---|---|---|
| 125 | 125 | //printf("%02x R\n",offset); |
| 126 | 126 | switch(offset) |
| 127 | 127 | { |
| 128 | case 0x00: return i | |
| 128 | case 0x00: return iop | |
| 129 | 129 | case 0x03: return 4; //eeprom? |
| 130 | case 0x0e: return input_port_read(machine(), "IN0"); | |
| 131 | case 0x0f: return input_port_read(machine(), "IN1"); | |
| 130 | case 0x0e: return ioport("IN0")->read(); | |
| 131 | case 0x0f: return ioport("IN1")->read(); | |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 102 | 102 | { |
| 103 | 103 | switch (offset & 15) |
| 104 | 104 | { |
| 105 | case 0: return input_port_read(machine(), "DSW"); | |
| 106 | case 1: return input_port_read(machine(), "SYSTEM"); /* Note: need to loopback sounds lengths on that one */ | |
| 107 | case 5: return input_port_read(machine(), "STICKZ"); | |
| 108 | case 6: return input_port_read(machine(), "STICKX"); | |
| 109 | case 7: return input_port_read(machine(), "STICKY"); | |
| 105 | case 0: return ioport("DSW")->read(); | |
| 106 | case 1: return ioport("SYSTEM")->read(); /* Note: need to loopback sounds lengths on that one */ | |
| 107 | case 5: return ioport("STICKZ")->read(); | |
| 108 | case 6: return ioport("STICKX")->read(); | |
| 109 | case 7: return ioport("STICKY")->read(); | |
| 110 | 110 | default: return 0xff; |
| 111 | 111 | } |
| 112 | 112 | } |
| r15082 | r15083 | |
| 130 | 130 | |
| 131 | 131 | switch (offset & 15) |
| 132 | 132 | { |
| 133 | case 0: return input_port_read(machine(), "DSW"); | |
| 134 | case 1: return input_port_read(machine(), "SYSTEM"); | |
| 133 | case 0: return ioport("DSW")->read(); | |
| 134 | case 1: return ioport("SYSTEM")->read(); | |
| 135 | 135 | case 2: |
| 136 | temp = m_fireone_select ? i | |
| 136 | temp = m_fireone_select ? iop | |
| 137 | 137 | temp = (temp & 0xc0) | fireone_paddle_map[temp & 0x3f]; |
| 138 | 138 | return temp; |
| 139 | 139 | default: return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | memset(mask, 0, sizeof mask); |
| 83 | 83 | |
| 84 | mask[input_port_read(machine, "STICK0_X")] |= 0x01; | |
| 85 | mask[input_port_read(machine, "STICK0_Y")] |= 0x02; | |
| 86 | mask[input_port_read(machine, "PADDLE0")] |= 0x04; | |
| 87 | mask[input_port_read(machine, "STICK1_X")] |= 0x08; | |
| 88 | mask[input_port_read(machine, "STICK1_Y")] |= 0x10; | |
| 89 | mask[input_port_read(machine, "PADDLE1")] |= 0x20; | |
| 84 | mask[state->ioport("STICK0_X")->read()] |= 0x01; | |
| 85 | mask[state->ioport("STICK0_Y")->read()] |= 0x02; | |
| 86 | mask[state->ioport("PADDLE0")->read()] |= 0x04; | |
| 87 | mask[state->ioport("STICK1_X")->read()] |= 0x08; | |
| 88 | mask[state->ioport("STICK1_Y")->read()] |= 0x10; | |
| 89 | mask[state->ioport("PADDLE1")->read()] |= 0x20; | |
| 90 | 90 | |
| 91 | 91 | for (i = 1; i < 256; i++) |
| 92 | 92 | if (mask[i] != 0) |
| r15082 | r15083 | |
| 203 | 203 | |
| 204 | 204 | READ8_MEMBER(boxer_state::boxer_input_r) |
| 205 | 205 | { |
| 206 | UINT8 val = i | |
| 206 | UINT8 val = iop | |
| 207 | 207 | |
| 208 | if (i | |
| 208 | if (iop | |
| 209 | 209 | val |= 0x02; |
| 210 | 210 | |
| 211 | 211 | return (val << ((offset & 7) ^ 7)) & 0x80; |
| r15082 | r15083 | |
| 227 | 227 | break; |
| 228 | 228 | |
| 229 | 229 | case 2: |
| 230 | val = i | |
| 230 | val = iop | |
| 231 | 231 | break; |
| 232 | 232 | |
| 233 | 233 | case 3: |
| 234 | val = i | |
| 234 | val = iop | |
| 235 | 235 | break; |
| 236 | 236 | } |
| 237 | 237 |
| r15082 | r15083 | |
|---|---|---|
| 429 | 429 | |
| 430 | 430 | READ16_MEMBER(cischeat_state::scudhamm_analog_r) |
| 431 | 431 | { |
| 432 | int i=i | |
| 432 | int i=iop | |
| 433 | 433 | |
| 434 | 434 | if ((i^m_prev)&0x4000) { |
| 435 | 435 | if (i<m_prev) m_prev-=0x8000; |
| r15082 | r15083 | |
| 527 | 527 | { |
| 528 | 528 | int armdelta; |
| 529 | 529 | |
| 530 | armdelta = input_port_read(machine(), "IN1") - m_armold; | |
| 531 | m_armold = input_port_read(machine(), "IN1"); | |
| 530 | armdelta = ioport("IN1")->read() - m_armold; | |
| 531 | m_armold = ioport("IN1")->read(); | |
| 532 | 532 | |
| 533 | 533 | return ~( m_scudhamm_motor_command + armdelta ); // + x : x<=0 and player loses, x>0 and player wins |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | READ16_MEMBER(cischeat_state::armchmp2_buttons_r) |
| 537 | 537 | { |
| 538 | int arm_x = i | |
| 538 | int arm_x = iop | |
| 539 | 539 | |
| 540 | UINT16 ret = i | |
| 540 | UINT16 ret = iop | |
| 541 | 541 | |
| 542 | 542 | if (arm_x < 0x40) ret &= ~1; |
| 543 | 543 | else if (arm_x > 0xc0) ret &= ~2; |
| r15082 | r15083 | |
| 844 | 844 | // DSW 3 |
| 845 | 845 | PORT_DIPNAME( 0x0003, 0x0003, "Extra Setting For Coin B" ) PORT_DIPLOCATION("SW302:8,7") /* 'Not used' (and must be OFF) according to the manual */ |
| 846 | 846 | PORT_DIPSETTING( 0x0003, DEF_STR( Unused ) ) |
| 847 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) | |
| 848 | PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) | |
| 849 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_7C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) | |
| 850 | PORT_DIPSETTING( 0x0001, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) | |
| 851 | PORT_DIPSETTING( 0x0002, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) | |
| 852 | PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) | |
| 847 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) ) PORT_CONDITION("IN4", 0x1c00, NOTEQUALS, 0x0000) | |
| 848 | PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) PORT_CONDITION("IN4", 0x1c00, NOTEQUALS, 0x0000) | |
| 849 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_7C ) ) PORT_CONDITION("IN4", 0x1c00, NOTEQUALS, 0x0000) | |
| 850 | PORT_DIPSETTING( 0x0001, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, EQUALS, 0x0000) | |
| 851 | PORT_DIPSETTING( 0x0002, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, EQUALS, 0x0000) | |
| 852 | PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, EQUALS, 0x0000) | |
| 853 | 853 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW302:6") |
| 854 | 854 | PORT_DIPSETTING( 0x0004, DEF_STR( No ) ) |
| 855 | 855 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| r15082 | r15083 | |
| 875 | 875 | PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW301:7") |
| 876 | 876 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 877 | 877 | PORT_DIPSETTING( 0x0200, DEF_STR( On ) ) |
| 878 | PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, | |
| 878 | PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, | |
| 879 | 879 | PORT_DIPSETTING( 0x1000, DEF_STR( 4C_1C ) ) |
| 880 | 880 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) ) |
| 881 | 881 | PORT_DIPSETTING( 0x1800, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 884 | 884 | PORT_DIPSETTING( 0x1400, DEF_STR( 1C_3C ) ) |
| 885 | 885 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 886 | 886 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 887 | PORT_DIPNAME( 0x1c00, 0x1c00, "Set Coin B" ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, | |
| 887 | PORT_DIPNAME( 0x1c00, 0x1c00, "Set Coin B" ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, | |
| 888 | 888 | PORT_DIPSETTING( 0x1c00, DEF_STR( Unused ) ) |
| 889 | 889 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 890 | 890 | PORT_DIPNAME( 0xe000, 0xe000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW301:3,2,1") |
| r15082 | r15083 | |
| 1051 | 1051 | PORT_START("IN1") // DSW 1 & 2 - $80000.w -> !f9012 |
| 1052 | 1052 | // DSW 1 |
| 1053 | 1053 | // Coinage Japan & USA (it changes with Country) |
| 1054 | PORT_DIPNAME( 0x0007, 0x0007, "Coin A (JP US)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, | |
| 1054 | PORT_DIPNAME( 0x0007, 0x0007, "Coin A (JP US)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, | |
| 1055 | 1055 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| 1056 | 1056 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| 1057 | 1057 | PORT_DIPSETTING( 0x0003, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 1060 | 1060 | PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) |
| 1061 | 1061 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) |
| 1062 | 1062 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 1063 | PORT_DIPNAME( 0x0038, 0x0038, "Coin B (JP US)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, | |
| 1063 | PORT_DIPNAME( 0x0038, 0x0038, "Coin B (JP US)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, | |
| 1064 | 1064 | PORT_DIPSETTING( 0x0008, DEF_STR( 4C_1C ) ) |
| 1065 | 1065 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) |
| 1066 | 1066 | PORT_DIPSETTING( 0x0018, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 1068 | 1068 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) |
| 1069 | 1069 | PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) |
| 1070 | 1070 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) |
| 1071 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, | |
| 1071 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, | |
| 1072 | 1072 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 1073 | 1073 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1074 | 1074 | // Coinage Europe & France (it changes with Country) |
| 1075 | PORT_DIPNAME( 0x0007, 0x0007, "Coin A (EU FR)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, | |
| 1075 | PORT_DIPNAME( 0x0007, 0x0007, "Coin A (EU FR)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, | |
| 1076 | 1076 | PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) |
| 1077 | 1077 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) |
| 1078 | 1078 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1081 | 1081 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) |
| 1082 | 1082 | PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) |
| 1083 | 1083 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_7C ) ) |
| 1084 | PORT_DIPNAME( 0x0038, 0x0038, "Coin B (EU FR)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, | |
| 1084 | PORT_DIPNAME( 0x0038, 0x0038, "Coin B (EU FR)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, | |
| 1085 | 1085 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 1086 | 1086 | PORT_DIPSETTING( 0x0008, DEF_STR( 4C_1C ) ) |
| 1087 | 1087 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
| 1090 | 1090 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) |
| 1091 | 1091 | PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) |
| 1092 | 1092 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) |
| 1093 | PORT_DIPNAME( 0x0040, 0x0040, "Free Play (EU & FR)" ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, | |
| 1093 | PORT_DIPNAME( 0x0040, 0x0040, "Free Play (EU & FR)" ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, | |
| 1094 | 1094 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 1095 | 1095 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1096 | 1096 | |
| r15082 | r15083 | |
| 1113 | 1113 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW02:6") |
| 1114 | 1114 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1115 | 1115 | PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) |
| 1116 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, | |
| 1116 | PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, | |
| 1117 | 1117 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 1118 | 1118 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1119 | PORT_DIPNAME( 0x4000, 0x4000, "Choose Race (US EU FR)" ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, | |
| 1119 | PORT_DIPNAME( 0x4000, 0x4000, "Choose Race (US EU FR)" ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, | |
| 1120 | 1120 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1121 | 1121 | PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) |
| 1122 | 1122 | PORT_DIPNAME( 0x8000, 0x8000, "Vibrations" ) PORT_DIPLOCATION("SW02:8") |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | READ8_MEMBER(freekick_state::spinner_r) |
| 65 | 65 | { |
| 66 | return i | |
| 66 | return iop | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | WRITE8_MEMBER(freekick_state::pbillrd_bankswitch_w) |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 110 | 110 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 111 | 111 | /* them this way is enough to get the game running. */ |
| 112 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 112 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 113 | 113 | |
| 114 | 114 | PORT_START("DSW1") |
| 115 | 115 | PORT_DIPNAME( 0x03, 0x03, "Difficulty?" ) |
| r15082 | r15083 | |
| 202 | 202 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 203 | 203 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 204 | 204 | /* them this way is enough to get the game running. */ |
| 205 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 205 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 206 | 206 | |
| 207 | 207 | PORT_START("DSW1") |
| 208 | 208 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:8" ) /* Switches 6-8 are not used */ |
| r15082 | r15083 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | int vicdual_is_cabinet_color(running_machine &machine) |
| 172 | 172 | { |
| 173 | return (in | |
| 173 | return (machine.root_device().ioport | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | |
| r15082 | r15083 | |
| 233 | 233 | { |
| 234 | 234 | UINT8 ret = 0; |
| 235 | 235 | |
| 236 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 237 | if (offset & 0x08) ret = input_port_read(machine(), "IN1"); | |
| 236 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 237 | if (offset & 0x08) ret = ioport("IN1")->read(); | |
| 238 | 238 | |
| 239 | 239 | return ret; |
| 240 | 240 | } |
| r15082 | r15083 | |
| 315 | 315 | { |
| 316 | 316 | UINT8 ret = 0; |
| 317 | 317 | |
| 318 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 319 | if (offset & 0x08) ret = input_port_read(machine(), "IN1"); | |
| 318 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 319 | if (offset & 0x08) ret = ioport("IN1")->read(); | |
| 320 | 320 | |
| 321 | 321 | return ret; |
| 322 | 322 | } |
| r15082 | r15083 | |
| 399 | 399 | { |
| 400 | 400 | UINT8 ret = 0; |
| 401 | 401 | |
| 402 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 403 | if (offset & 0x08) ret = input_port_read(machine(), "IN1"); | |
| 402 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 403 | if (offset & 0x08) ret = ioport("IN1")->read(); | |
| 404 | 404 | |
| 405 | 405 | return ret; |
| 406 | 406 | } |
| r15082 | r15083 | |
| 507 | 507 | { |
| 508 | 508 | UINT8 ret = 0; |
| 509 | 509 | |
| 510 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 511 | if (offset & 0x08) ret = input_port_read(machine(), "IN1"); | |
| 510 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 511 | if (offset & 0x08) ret = ioport("IN1")->read(); | |
| 512 | 512 | |
| 513 | 513 | return ret; |
| 514 | 514 | } |
| r15082 | r15083 | |
| 518 | 518 | { |
| 519 | 519 | UINT8 ret = 0; |
| 520 | 520 | |
| 521 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 522 | if (offset & 0x04) ret = input_port_read(machine(), "IN1"); | |
| 523 | if (offset & 0x08) ret = input_port_read(machine(), "IN2"); | |
| 521 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 522 | if (offset & 0x04) ret = ioport("IN1")->read(); | |
| 523 | if (offset & 0x08) ret = ioport("IN2")->read(); | |
| 524 | 524 | |
| 525 | 525 | return ret; |
| 526 | 526 | } |
| r15082 | r15083 | |
| 717 | 717 | { |
| 718 | 718 | UINT8 ret = 0; |
| 719 | 719 | |
| 720 | if (offset & 0x01) ret = i | |
| 720 | if (offset & 0x01) ret = iop | |
| 721 | 721 | if (offset & 0x02) /* schematics show this as in input port, but never read from */ |
| 722 | if (offset & 0x04) ret = input_port_read(machine(), "IN1"); | |
| 723 | if (offset & 0x08) ret = input_port_read(machine(), "IN2"); | |
| 722 | if (offset & 0x04) ret = ioport("IN1")->read(); | |
| 723 | if (offset & 0x08) ret = ioport("IN2")->read(); | |
| 724 | 724 | if (offset & 0x12) logerror("********* Read from port %x\n", offset); |
| 725 | 725 | |
| 726 | 726 | return ret; |
| r15082 | r15083 | |
| 1628 | 1628 | CUSTOM_INPUT_MEMBER(vicdual_state::brdrline_lives) |
| 1629 | 1629 | { |
| 1630 | 1630 | int bit_mask = (FPTR)param; |
| 1631 | return (i | |
| 1631 | return (iop | |
| 1632 | 1632 | } |
| 1633 | 1633 | |
| 1634 | 1634 | static INPUT_PORTS_START( brdrline ) |
| r15082 | r15083 | |
| 2167 | 2167 | { |
| 2168 | 2168 | UINT8 ret = 0; |
| 2169 | 2169 | |
| 2170 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 2171 | if (offset & 0x08) ret = input_port_read(machine(), "IN1"); | |
| 2170 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 2171 | if (offset & 0x08) ret = ioport("IN1")->read(); | |
| 2172 | 2172 | |
| 2173 | 2173 | return ret; |
| 2174 | 2174 | } |
| r15082 | r15083 | |
| 2262 | 2262 | { |
| 2263 | 2263 | UINT8 ret = 0; |
| 2264 | 2264 | |
| 2265 | if (offset & 0x01) ret = input_port_read(machine(), "IN0"); | |
| 2266 | if (offset & 0x02) ret = input_port_read(machine(), "IN1"); | |
| 2267 | if (offset & 0x08) ret = input_port_read(machine(), "IN2"); | |
| 2265 | if (offset & 0x01) ret = ioport("IN0")->read(); | |
| 2266 | if (offset & 0x02) ret = ioport("IN1")->read(); | |
| 2267 | if (offset & 0x08) ret = ioport("IN2")->read(); | |
| 2268 | 2268 | |
| 2269 | 2269 | return ret; |
| 2270 | 2270 | } |
| r15082 | r15083 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | READ16_MEMBER(xybots_state::special_port1_r) |
| 68 | 68 | { |
| 69 | int result = i | |
| 69 | int result = iop | |
| 70 | 70 | |
| 71 | 71 | if (m_cpu_to_sound_ready) result ^= 0x0200; |
| 72 | 72 | result ^= m_h256 ^= 0x0400; |
| r15082 | r15083 | |
| 135 | 135 | PORT_SERVICE( 0x0100, IP_ACTIVE_LOW ) |
| 136 | 136 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) /* /AUDBUSY */ |
| 137 | 137 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) /* 256H */ |
| 138 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 138 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* VBLANK */ | |
| 139 | 139 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 140 | 140 | |
| 141 | 141 | PORT_INCLUDE( atarijsa_i ) /* audio port */ |
| r15082 | r15083 | |
|---|---|---|
| 561 | 561 | { |
| 562 | 562 | switch( m_input_selector ) |
| 563 | 563 | { |
| 564 | case 0x01: return input_port_read(machine(), "IN0-0"); | |
| 565 | case 0x02: return input_port_read(machine(), "IN0-1"); | |
| 566 | case 0x04: return input_port_read(machine(), "IN0-2"); | |
| 567 | case 0x08: return input_port_read(machine(), "IN0-3"); | |
| 568 | case 0x00: return input_port_read(machine(), "DSW0"); | |
| 564 | case 0x01: return ioport("IN0-0")->read(); | |
| 565 | case 0x02: return ioport("IN0-1")->read(); | |
| 566 | case 0x04: return ioport("IN0-2")->read(); | |
| 567 | case 0x08: return ioport("IN0-3")->read(); | |
| 568 | case 0x00: return ioport("DSW0")->read(); | |
| 569 | 569 | } |
| 570 | 570 | return 0xff; |
| 571 | 571 | } |
| r15082 | r15083 | |
|---|---|---|
| 528 | 528 | |
| 529 | 529 | /* if we're to read the dipswitches behind the trackball data, do it now */ |
| 530 | 530 | if (state->m_dsw_select) |
| 531 | return (in | |
| 531 | return (machine.root_device().ioport | |
| 532 | 532 | |
| 533 | 533 | /* get the new position and adjust the result */ |
| 534 | newpos = in | |
| 534 | newpos = machine.root_device().ioport | |
| 535 | 535 | if (newpos != state->m_oldpos[idx]) |
| 536 | 536 | { |
| 537 | 537 | state->m_sign[idx] = (newpos - state->m_oldpos[idx]) & 0x80; |
| r15082 | r15083 | |
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | /* blend with the bits from the switch port */ |
| 542 | return (in | |
| 542 | return (machine.root_device().ioport | |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | |
| r15082 | r15083 | |
| 562 | 562 | |
| 563 | 563 | READ8_MEMBER(centiped_state::milliped_IN2_r) |
| 564 | 564 | { |
| 565 | UINT8 data = i | |
| 565 | UINT8 data = iop | |
| 566 | 566 | |
| 567 | 567 | /* MSH - 15 Feb, 2007 |
| 568 | 568 | * The P2 X Joystick inputs are not properly handled in |
| r15082 | r15083 | |
| 573 | 573 | */ |
| 574 | 574 | if (0 != m_control_select) { |
| 575 | 575 | /* Bottom 4 bits is our joystick inputs */ |
| 576 | UINT8 joy2data = i | |
| 576 | UINT8 joy2data = iop | |
| 577 | 577 | data = data & 0xf0; /* Keep the top 4 bits */ |
| 578 | 578 | data |= (joy2data & 0x0a) >> 1; /* flip left and up */ |
| 579 | 579 | data |= (joy2data & 0x05) << 1; /* flip right and down */ |
| r15082 | r15083 | |
| 599 | 599 | { |
| 600 | 600 | static const char *const sticknames[] = { "STICK0", "STICK1", "STICK2", "STICK3" }; |
| 601 | 601 | |
| 602 | return i | |
| 602 | return iop | |
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | |
| r15082 | r15083 | |
| 879 | 879 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 880 | 880 | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 881 | 881 | PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) |
| 882 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 882 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 883 | 883 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* trackball sign bit */ |
| 884 | 884 | |
| 885 | 885 | PORT_START("IN1") |
| r15082 | r15083 | |
| 1115 | 1115 | PORT_DIPSETTING( 0x0c, "0 1x 2x 3x" ) |
| 1116 | 1116 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1117 | 1117 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 1118 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1118 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1119 | 1119 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* trackball sign bit */ |
| 1120 | 1120 | |
| 1121 | 1121 | PORT_START("IN1") /* $2001 */ /* see port 7 for y trackball */ |
| r15082 | r15083 | |
| 1224 | 1224 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1225 | 1225 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 1226 | 1226 | PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) |
| 1227 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1227 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1228 | 1228 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) |
| 1229 | 1229 | PORT_DIPSETTING( 0x80, "Upright (overlay)" ) |
| 1230 | 1230 | PORT_DIPSETTING( 0x00, "Cocktail (no overlay)" ) |
| r15082 | r15083 | |
| 1307 | 1307 | PORT_DIPNAME( 0x40, 0x00, "Minimum credits" ) PORT_DIPLOCATION("SW0:!7") |
| 1308 | 1308 | PORT_DIPSETTING( 0x00, "1" ) |
| 1309 | 1309 | PORT_DIPSETTING( 0x40, "2" ) |
| 1310 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1310 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1311 | 1311 | |
| 1312 | 1312 | PORT_START("IN1") |
| 1313 | 1313 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1396 | 1396 | PORT_START("IN0") |
| 1397 | 1397 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* trackball data */ |
| 1398 | 1398 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1399 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1399 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1400 | 1400 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* trackball sign bit */ |
| 1401 | 1401 | |
| 1402 | 1402 | PORT_START("IN1") |
| r15082 | r15083 | |
|---|---|---|
| 533 | 533 | READ16_MEMBER(wgp_state::wgp_adinput_r) |
| 534 | 534 | { |
| 535 | 535 | int steer = 0x40; |
| 536 | int fake = i | |
| 536 | int fake = iop | |
| 537 | 537 | |
| 538 | 538 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 539 | 539 | { |
| 540 | 540 | /* Reduce span to 0x80 */ |
| 541 | steer = (i | |
| 541 | steer = (iop | |
| 542 | 542 | } |
| 543 | 543 | else /* Digital steer */ |
| 544 | 544 | { |
| r15082 | r15083 | |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | case 0x05: |
| 586 | return i | |
| 586 | return iop | |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | logerror("CPU #0 PC %06x: warning - read unmapped a/d input offset %06x\n",cpu_get_pc(&space.device()),offset); |
| r15082 | r15083 | |
|---|---|---|
| 142 | 142 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 143 | 143 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 144 | 144 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 145 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 145 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 146 | 146 | |
| 147 | 147 | PORT_START("DSW2") |
| 148 | 148 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) |
| r15082 | r15083 | |
|---|---|---|
| 341 | 341 | switch( offset ) |
| 342 | 342 | { |
| 343 | 343 | case 0x00: /* "counter 1" lo */ |
| 344 | return i | |
| 344 | return iop | |
| 345 | 345 | |
| 346 | 346 | case 0x01: /* "counter 2" lo */ |
| 347 | return i | |
| 347 | return iop | |
| 348 | 348 | |
| 349 | 349 | case 0x02: /* "counter 1" hi */ |
| 350 | if(i | |
| 350 | if(iop | |
| 351 | 351 | return 0xff; |
| 352 | 352 | |
| 353 | 353 | return 0; |
| 354 | 354 | |
| 355 | 355 | case 0x03: /* "counter 2" hi */ |
| 356 | return (i | |
| 356 | return (iop | |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | return 0; |
| r15082 | r15083 | |
| 364 | 364 | switch( offset ) |
| 365 | 365 | { |
| 366 | 366 | case 0x00: /* "counter 3" lo */ |
| 367 | return i | |
| 367 | return iop | |
| 368 | 368 | |
| 369 | 369 | case 0x02: /* "counter 3" hi */ |
| 370 | return (i | |
| 370 | return (iop | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 131 | 131 | |
| 132 | 132 | READ8_MEMBER(tceptor_state::dsw0_r) |
| 133 | 133 | { |
| 134 | return fix_input0(i | |
| 134 | return fix_input0(iop | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | READ8_MEMBER(tceptor_state::dsw1_r) |
| 138 | 138 | { |
| 139 | return fix_input1(i | |
| 139 | return fix_input1(iop | |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | READ8_MEMBER(tceptor_state::input0_r) |
| 143 | 143 | { |
| 144 | return fix_input0(i | |
| 144 | return fix_input0(iop | |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | READ8_MEMBER(tceptor_state::input1_r) |
| 148 | 148 | { |
| 149 | return fix_input1(i | |
| 149 | return fix_input1(iop | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | READ8_MEMBER(tceptor_state::readFF) |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | { |
| 47 | 47 | |
| 48 | 48 | int data; |
| 49 | data = (i | |
| 49 | data = (iop | |
| 50 | 50 | data |= m_aquarium_snd_ack; |
| 51 | 51 | m_aquarium_snd_ack = 0; |
| 52 | 52 |
| r15082 | r15083 | |
|---|---|---|
| 839 | 839 | /* Really weird way of mapping 3 DSWs */ |
| 840 | 840 | READ16_MEMBER(metro_state::balcube_dsw_r) |
| 841 | 841 | { |
| 842 | UINT16 dsw1 = input_port_read(machine(), "DSW0") >> 0; | |
| 843 | UINT16 dsw2 = input_port_read(machine(), "DSW0") >> 8; | |
| 844 | UINT16 dsw3 = input_port_read(machine(), "IN2"); | |
| 842 | UINT16 dsw1 = ioport("DSW0")->read() >> 0; | |
| 843 | UINT16 dsw2 = ioport("DSW0")->read() >> 8; | |
| 844 | UINT16 dsw3 = ioport("IN2")->read(); | |
| 845 | 845 | |
| 846 | 846 | switch (offset * 2) |
| 847 | 847 | { |
| r15082 | r15083 | |
| 1293 | 1293 | { |
| 1294 | 1294 | UINT16 input_sel = (*m_input_sel) ^ 0x3e; |
| 1295 | 1295 | // Bit 0 ?? |
| 1296 | if (input_sel & 0x0002) return input_port_read(machine(), "KEY0"); | |
| 1297 | if (input_sel & 0x0004) return input_port_read(machine(), "KEY1"); | |
| 1298 | if (input_sel & 0x0008) return input_port_read(machine(), "KEY2"); | |
| 1299 | if (input_sel & 0x0010) return input_port_read(machine(), "KEY3"); | |
| 1300 | if (input_sel & 0x0020) return input_port_read(machine(), "KEY4"); | |
| 1296 | if (input_sel & 0x0002) return ioport("KEY0")->read(); | |
| 1297 | if (input_sel & 0x0004) return ioport("KEY1")->read(); | |
| 1298 | if (input_sel & 0x0008) return ioport("KEY2")->read(); | |
| 1299 | if (input_sel & 0x0010) return ioport("KEY3")->read(); | |
| 1300 | if (input_sel & 0x0020) return ioport("KEY4")->read(); | |
| 1301 | 1301 | return 0xffff; |
| 1302 | 1302 | } |
| 1303 | 1303 | |
| r15082 | r15083 | |
| 5995 | 5995 | { |
| 5996 | 5996 | metro_state *state = machine.driver_data<metro_state>(); |
| 5997 | 5997 | |
| 5998 | const size_t len = | |
| 5998 | const size_t len = sta | |
| 5999 | 5999 | UINT8 *src = state->memregion("gfx1")->base(); |
| 6000 | 6000 | UINT8 *end = src + len; |
| 6001 | 6001 |
| r15082 | r15083 | |
|---|---|---|
| 160 | 160 | static const char *const portnames[] = { "I81", "I82" }; |
| 161 | 161 | static const char *const fakenames[] = { "FAKE1", "FAKE2" }; |
| 162 | 162 | |
| 163 | fake = i | |
| 163 | fake = iop | |
| 164 | 164 | |
| 165 | return ((fake & 0x01) ? fake : i | |
| 165 | return ((fake & 0x01) ? fake : iop | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | #else |
| r15082 | r15083 | |
| 171 | 171 | { |
| 172 | 172 | static const char *const portnames[] = { "I81", "I82" }; |
| 173 | 173 | |
| 174 | return i | |
| 174 | return iop | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | #endif |
| r15082 | r15083 | |
|---|---|---|
| 420 | 420 | static READ8_DEVICE_HANDLER( input_1p_r ) |
| 421 | 421 | { |
| 422 | 422 | nightgal_state *state = device->machine().driver_data<nightgal_state>(); |
| 423 | UINT8 cr_clear = | |
| 423 | UINT8 cr_clear = s | |
| 424 | 424 | |
| 425 | 425 | switch (state->m_mux_data) |
| 426 | 426 | { |
| 427 | case 0x01: return input_port_read(device->machine(), "PL1_1") | cr_clear; | |
| 428 | case 0x02: return input_port_read(device->machine(), "PL1_2") | cr_clear; | |
| 429 | case 0x04: return input_port_read(device->machine(), "PL1_3") | cr_clear; | |
| 430 | case 0x08: return input_port_read(device->machine(), "PL1_4") | cr_clear; | |
| 431 | case 0x10: return input_port_read(device->machine(), "PL1_5") | cr_clear; | |
| 432 | case 0x20: return input_port_read(device->machine(), "PL1_6") | cr_clear; | |
| 427 | case 0x01: return state->ioport("PL1_1")->read() | cr_clear; | |
| 428 | case 0x02: return state->ioport("PL1_2")->read() | cr_clear; | |
| 429 | case 0x04: return state->ioport("PL1_3")->read() | cr_clear; | |
| 430 | case 0x08: return state->ioport("PL1_4")->read() | cr_clear; | |
| 431 | case 0x10: return state->ioport("PL1_5")->read() | cr_clear; | |
| 432 | case 0x20: return state->ioport("PL1_6")->read() | cr_clear; | |
| 433 | 433 | } |
| 434 | 434 | //printf("%04x\n", state->m_mux_data); |
| 435 | 435 | |
| 436 | return (input_port_read(device->machine(), "PL1_1") & input_port_read(device->machine(), "PL1_2") & input_port_read(device->machine(), "PL1_3") & | |
| 437 | input_port_read(device->machine(), "PL1_4") & input_port_read(device->machine(), "PL1_5") & input_port_read(device->machine(), "PL1_6")) | cr_clear; | |
| 436 | return (state->ioport("PL1_1")->read() & state->ioport("PL1_2")->read() & state->ioport("PL1_3")->read() & | |
| 437 | state->ioport("PL1_4")->read() & state->ioport("PL1_5")->read() & state->ioport("PL1_6")->read()) | cr_clear; | |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | static READ8_DEVICE_HANDLER( input_2p_r ) |
| 441 | 441 | { |
| 442 | 442 | nightgal_state *state = device->machine().driver_data<nightgal_state>(); |
| 443 | UINT8 coin_port = | |
| 443 | UINT8 coin_port = s | |
| 444 | 444 | |
| 445 | 445 | switch (state->m_mux_data) |
| 446 | 446 | { |
| 447 | case 0x01: return input_port_read(device->machine(), "PL2_1") | coin_port; | |
| 448 | case 0x02: return input_port_read(device->machine(), "PL2_2") | coin_port; | |
| 449 | case 0x04: return input_port_read(device->machine(), "PL2_3") | coin_port; | |
| 450 | case 0x08: return input_port_read(device->machine(), "PL2_4") | coin_port; | |
| 451 | case 0x10: return input_port_read(device->machine(), "PL2_5") | coin_port; | |
| 452 | case 0x20: return input_port_read(device->machine(), "PL2_6") | coin_port; | |
| 447 | case 0x01: return state->ioport("PL2_1")->read() | coin_port; | |
| 448 | case 0x02: return state->ioport("PL2_2")->read() | coin_port; | |
| 449 | case 0x04: return state->ioport("PL2_3")->read() | coin_port; | |
| 450 | case 0x08: return state->ioport("PL2_4")->read() | coin_port; | |
| 451 | case 0x10: return state->ioport("PL2_5")->read() | coin_port; | |
| 452 | case 0x20: return state->ioport("PL2_6")->read() | coin_port; | |
| 453 | 453 | } |
| 454 | 454 | //printf("%04x\n", state->m_mux_data); |
| 455 | 455 | |
| 456 | return (input_port_read(device->machine(), "PL2_1") & input_port_read(device->machine(), "PL2_2") & input_port_read(device->machine(), "PL2_3") & | |
| 457 | input_port_read(device->machine(), "PL2_4") & input_port_read(device->machine(), "PL2_5") & input_port_read(device->machine(), "PL2_6")) | coin_port; | |
| 456 | return (state->ioport("PL2_1")->read() & state->ioport("PL2_2")->read() & state->ioport("PL2_3")->read() & | |
| 457 | state->ioport("PL2_4")->read() & state->ioport("PL2_5")->read() & state->ioport("PL2_6")->read()) | coin_port; | |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | /******************************************** |
| r15082 | r15083 | |
|---|---|---|
| 532 | 532 | case 0x40: |
| 533 | 533 | addr = i8279.command & 0x07; |
| 534 | 534 | |
| 535 | result = i | |
| 535 | result = iop | |
| 536 | 536 | |
| 537 | 537 | /* handle autoincrement */ |
| 538 | 538 | if (i8279.command & 0x10) |
| r15082 | r15083 | |
| 730 | 730 | case 1: |
| 731 | 731 | { |
| 732 | 732 | if ( !BIT(m_p3, 4) ) |
| 733 | return (i | |
| 733 | return (iop | |
| 734 | 734 | else |
| 735 | 735 | return 0; |
| 736 | 736 | } |
| r15082 | r15083 | |
|---|---|---|
| 75 | 75 | { |
| 76 | 76 | static const char *const dswnames[] = { "IN0", "DSW0", "DSW1" }; |
| 77 | 77 | |
| 78 | return i | |
| 78 | return iop | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | |
| r15082 | r15083 | |
| 228 | 228 | switch (offset) |
| 229 | 229 | { |
| 230 | 230 | case 0: |
| 231 | return i | |
| 231 | return iop | |
| 232 | 232 | |
| 233 | 233 | case 2: |
| 234 | 234 | return 0x10; /* Jack Rabbit */ |
| r15082 | r15083 | |
|---|---|---|
| 104 | 104 | { |
| 105 | 105 | switch(offset) |
| 106 | 106 | { |
| 107 | case 0: return input_port_read(machine(), "DSW"); | |
| 108 | case 2: return input_port_read(machine(), "INPUT"); | |
| 107 | case 0: return ioport("DSW")->read(); | |
| 108 | case 2: return ioport("INPUT")->read(); | |
| 109 | 109 | } |
| 110 | 110 | return 0xff; |
| 111 | 111 | } |
| r15082 | r15083 | |
|---|---|---|
| 144 | 144 | static READ8_DEVICE_HANDLER( input_1p_r ) |
| 145 | 145 | { |
| 146 | 146 | jongkyo_state *state = device->machine().driver_data<jongkyo_state>(); |
| 147 | UINT8 cr_clear = | |
| 147 | UINT8 cr_clear = s | |
| 148 | 148 | |
| 149 | 149 | switch (state->m_mux_data) |
| 150 | 150 | { |
| 151 | case 0x01: return input_port_read(device->machine(), "PL1_1") | cr_clear; | |
| 152 | case 0x02: return input_port_read(device->machine(), "PL1_2") | cr_clear; | |
| 153 | case 0x04: return input_port_read(device->machine(), "PL1_3") | cr_clear; | |
| 154 | case 0x08: return input_port_read(device->machine(), "PL1_4") | cr_clear; | |
| 155 | case 0x10: return input_port_read(device->machine(), "PL1_5") | cr_clear; | |
| 156 | case 0x20: return input_port_read(device->machine(), "PL1_6") | cr_clear; | |
| 151 | case 0x01: return state->ioport("PL1_1")->read() | cr_clear; | |
| 152 | case 0x02: return state->ioport("PL1_2")->read() | cr_clear; | |
| 153 | case 0x04: return state->ioport("PL1_3")->read() | cr_clear; | |
| 154 | case 0x08: return state->ioport("PL1_4")->read() | cr_clear; | |
| 155 | case 0x10: return state->ioport("PL1_5")->read() | cr_clear; | |
| 156 | case 0x20: return state->ioport("PL1_6")->read() | cr_clear; | |
| 157 | 157 | } |
| 158 | 158 | // printf("%04x\n", state->m_mux_data); |
| 159 | 159 | |
| 160 | return (input_port_read(device->machine(), "PL1_1") & input_port_read(device->machine(), "PL1_2") & input_port_read(device->machine(), "PL1_3") & | |
| 161 | input_port_read(device->machine(), "PL1_4") & input_port_read(device->machine(), "PL1_5") & input_port_read(device->machine(), "PL1_6")) | cr_clear; | |
| 160 | return (state->ioport("PL1_1")->read() & state->ioport("PL1_2")->read() & state->ioport("PL1_3")->read() & | |
| 161 | state->ioport("PL1_4")->read() & state->ioport("PL1_5")->read() & state->ioport("PL1_6")->read()) | cr_clear; | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | static READ8_DEVICE_HANDLER( input_2p_r ) |
| 165 | 165 | { |
| 166 | 166 | jongkyo_state *state = device->machine().driver_data<jongkyo_state>(); |
| 167 | UINT8 coin_port = | |
| 167 | UINT8 coin_port = s | |
| 168 | 168 | |
| 169 | 169 | switch (state->m_mux_data) |
| 170 | 170 | { |
| 171 | case 0x01: return input_port_read(device->machine(), "PL2_1") | coin_port; | |
| 172 | case 0x02: return input_port_read(device->machine(), "PL2_2") | coin_port; | |
| 173 | case 0x04: return input_port_read(device->machine(), "PL2_3") | coin_port; | |
| 174 | case 0x08: return input_port_read(device->machine(), "PL2_4") | coin_port; | |
| 175 | case 0x10: return input_port_read(device->machine(), "PL2_5") | coin_port; | |
| 176 | case 0x20: return input_port_read(device->machine(), "PL2_6") | coin_port; | |
| 171 | case 0x01: return state->ioport("PL2_1")->read() | coin_port; | |
| 172 | case 0x02: return state->ioport("PL2_2")->read() | coin_port; | |
| 173 | case 0x04: return state->ioport("PL2_3")->read() | coin_port; | |
| 174 | case 0x08: return state->ioport("PL2_4")->read() | coin_port; | |
| 175 | case 0x10: return state->ioport("PL2_5")->read() | coin_port; | |
| 176 | case 0x20: return state->ioport("PL2_6")->read() | coin_port; | |
| 177 | 177 | } |
| 178 | 178 | // printf("%04x\n", state->m_mux_data); |
| 179 | 179 | |
| 180 | return (input_port_read(device->machine(), "PL2_1") & input_port_read(device->machine(), "PL2_2") & input_port_read(device->machine(), "PL2_3") & | |
| 181 | input_port_read(device->machine(), "PL2_4") & input_port_read(device->machine(), "PL2_5") & input_port_read(device->machine(), "PL2_6")) | coin_port; | |
| 180 | return (state->ioport("PL2_1")->read() & state->ioport("PL2_2")->read() & state->ioport("PL2_3")->read() & | |
| 181 | state->ioport("PL2_4")->read() & state->ioport("PL2_5")->read() & state->ioport("PL2_6")->read()) | coin_port; | |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | WRITE8_MEMBER(jongkyo_state::videoram2_w) |
| r15082 | r15083 | |
|---|---|---|
| 118 | 118 | PORT_DIPSETTING( 0x40, "Upright, Dual Controls" ) |
| 119 | 119 | // PORT_DIPSETTING( 0x20, "Cocktail, Single Controls" ) // IMPOSSIBLE ! |
| 120 | 120 | PORT_DIPSETTING( 0x60, DEF_STR( Cocktail ) ) // "Cocktail, Dual Controls" |
| 121 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 121 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 122 | 122 | |
| 123 | 123 | PORT_START("DSW2") |
| 124 | 124 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1") |
| r15082 | r15083 | |
| 144 | 144 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) |
| 145 | 145 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) |
| 146 | 146 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) |
| 147 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2", 0xe0, PORTCOND_NOTEQUALS, 0x80) //Mode 1 | |
| 148 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2", 0xe0, PORTCOND_EQUALS, 0x80) //Mode 2 | |
| 147 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2", 0xe0, NOTEQUALS, 0x80) //Mode 1 | |
| 148 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2", 0xe0, EQUALS, 0x80) //Mode 2 | |
| 149 | 149 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4") |
| 150 | 150 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) |
| 151 | 151 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) |
| 152 | 152 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) |
| 153 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2", 0xe0, PORTCOND_NOTEQUALS, 0x80) //Mode 1 | |
| 154 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2", 0xe0, PORTCOND_EQUALS, 0x80) //Mode 2 | |
| 153 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2", 0xe0, NOTEQUALS, 0x80) //Mode 1 | |
| 154 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2", 0xe0, EQUALS, 0x80) //Mode 2 | |
| 155 | 155 | |
| 156 | 156 | PORT_MODIFY("DSW2") |
| 157 | 157 | PORT_DIPNAME( 0xe0, 0x00, "Coin Mode" ) PORT_DIPLOCATION("SW2:6,7,8") |
| r15082 | r15083 | |
|---|---|---|
| 112 | 112 | */ |
| 113 | 113 | eolith_speedup_read(&space); |
| 114 | 114 | |
| 115 | return (i | |
| 115 | return (iop | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | WRITE32_MEMBER(eolith_state::systemcontrol_w) |
| r15082 | r15083 | |
| 121 | 121 | coin_counter_w(machine(), 0, data & m_coin_counter_bit); |
| 122 | 122 | set_led_status(machine(), 0, data & 1); |
| 123 | 123 | |
| 124 | i | |
| 124 | iop | |
| 125 | 125 | |
| 126 | 126 | // bit 0x100 and 0x040 ? |
| 127 | 127 | } |
| r15082 | r15083 | |
| 129 | 129 | READ32_MEMBER(eolith_state::hidctch3_pen1_r) |
| 130 | 130 | { |
| 131 | 131 | //320 x 240 |
| 132 | int xpos = input_port_read(machine(), "PEN_X_P1"); | |
| 133 | int ypos = input_port_read(machine(), "PEN_Y_P1"); | |
| 132 | int xpos = ioport("PEN_X_P1")->read(); | |
| 133 | int ypos = ioport("PEN_Y_P1")->read(); | |
| 134 | 134 | |
| 135 | 135 | return xpos + (ypos*168*2); |
| 136 | 136 | } |
| r15082 | r15083 | |
| 138 | 138 | READ32_MEMBER(eolith_state::hidctch3_pen2_r) |
| 139 | 139 | { |
| 140 | 140 | //320 x 240 |
| 141 | int xpos = input_port_read(machine(), "PEN_X_P2"); | |
| 142 | int ypos = input_port_read(machine(), "PEN_Y_P2"); | |
| 141 | int xpos = ioport("PEN_X_P2")->read(); | |
| 142 | int ypos = ioport("PEN_Y_P2")->read(); | |
| 143 | 143 | |
| 144 | 144 | return xpos + (ypos*168*2); |
| 145 | 145 | } |
| r15082 | r15083 | |
|---|---|---|
| 1705 | 1705 | |
| 1706 | 1706 | case 2: case 3: |
| 1707 | 1707 | // These may be coming from another CPU, in particular the I/O one |
| 1708 | m_ctl_inp_buffer[offset-2] = i | |
| 1708 | m_ctl_inp_buffer[offset-2] = iop | |
| 1709 | 1709 | break; |
| 1710 | 1710 | case 5: |
| 1711 | 1711 | if(m_ctl_vbl_active) { |
| r15082 | r15083 | |
| 1728 | 1728 | { |
| 1729 | 1729 | switch(offset) { |
| 1730 | 1730 | // 0100 set freezes gorgon (polygon fifo flag) |
| 1731 | case 1: return 0x0000 | i | |
| 1731 | case 1: return 0x0000 | iop | |
| 1732 | 1732 | case 2: case 3: { |
| 1733 | 1733 | UINT16 res = m_ctl_inp_buffer[offset-2] & 0x800 ? 0xffff : 0x0000; |
| 1734 | 1734 | m_ctl_inp_buffer[offset-2] = (m_ctl_inp_buffer[offset-2] << 1) | 1; |
| r15082 | r15083 | |
| 2992 | 2992 | |
| 2993 | 2993 | READ8_MEMBER(namcos23_state::s23_gun_r) |
| 2994 | 2994 | { |
| 2995 | UINT16 xpos = input_port_read_safe(machine(), "LIGHTX", 0) * 640 / 0xff + 0x80; | |
| 2996 | UINT16 ypos = input_port_read_safe(machine(), "LIGHTY", 0) * 240 / 0xff + 0x20; | |
| 2995 | UINT16 xpos = ioport("LIGHTX")->read_safe(0) * 640 / 0xff + 0x80; | |
| 2996 | UINT16 ypos = ioport("LIGHTY")->read_safe(0) * 240 / 0xff + 0x20; | |
| 2997 | 2997 | |
| 2998 | 2998 | // note: will need angle adjustments for accurate aiming at screen sides |
| 2999 | 2999 | switch(offset) |
| r15082 | r15083 | |
| 3070 | 3070 | { |
| 3071 | 3071 | namcos23_state *state = machine.driver_data<namcos23_state>(); |
| 3072 | 3072 | render_t &render = state->m_render; |
| 3073 | state->m_ptrom = (const UINT32 *)machine.root_device().memregion("pointrom")->base(); | |
| 3074 | state->m_tmlrom = (const UINT16 *)machine.root_device().memregion("textilemapl")->base(); | |
| 3075 | state->m_tmhrom = machine.root_device().memregion("textilemaph")->base(); | |
| 3076 | state->m_texrom = machine.root_device().memregion("textile")->base(); | |
| 3073 | state->m_ptrom = (const UINT32 *)state->memregion("pointrom")->base(); | |
| 3074 | state->m_tmlrom = (const UINT16 *)state->memregion("textilemapl")->base(); | |
| 3075 | state->m_tmhrom = state->memregion("textilemaph")->base(); | |
| 3076 | state->m_texrom = state->memregion("textile")->base(); | |
| 3077 | 3077 | |
| 3078 | state->m_tileid_mask = (machine.root_device().memregion("textilemapl")->bytes()/2 - 1) & ~0xff; // Used for y masking | |
| 3079 | state->m_tile_mask = machine.root_device().memregion("textile")->bytes()/256 - 1; | |
| 3078 | state->m_tileid_mask = (state->memregion("textilemapl")->bytes()/2 - 1) & ~0xff; // Used for y masking | |
| 3079 | state->m_tile_mask = state->memregion("textile")->bytes()/256 - 1; | |
| 3080 | 3080 | state->m_ptrom_limit = state->memregion("pointrom")->bytes()/4; |
| 3081 | 3081 | |
| 3082 | 3082 | state->m_mi_rd = state->m_mi_wr = state->m_im_rd = state->m_im_wr = 0; |
| r15082 | r15083 | |
|---|---|---|
| 360 | 360 | |
| 361 | 361 | READ16_MEMBER(atarisy2_state::switch_r) |
| 362 | 362 | { |
| 363 | int result = i | |
| 363 | int result = iop | |
| 364 | 364 | |
| 365 | 365 | if (m_cpu_to_sound_ready) result ^= 0x20; |
| 366 | 366 | if (m_sound_to_cpu_ready) result ^= 0x10; |
| r15082 | r15083 | |
| 371 | 371 | |
| 372 | 372 | READ8_MEMBER(atarisy2_state::switch_6502_r) |
| 373 | 373 | { |
| 374 | int result = i | |
| 374 | int result = iop | |
| 375 | 375 | |
| 376 | 376 | if (m_cpu_to_sound_ready) result |= 0x01; |
| 377 | 377 | if (m_sound_to_cpu_ready) result |= 0x02; |
| 378 | 378 | if ((m_has_tms5220) && (tms5220_readyq_r(machine().device("tms")) == 0)) |
| 379 | 379 | result &= ~0x04; |
| 380 | if (!(i | |
| 380 | if (!(iop | |
| 381 | 381 | |
| 382 | 382 | return result; |
| 383 | 383 | } |
| r15082 | r15083 | |
| 412 | 412 | static const char *const adcnames[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 413 | 413 | |
| 414 | 414 | if (m_which_adc < m_pedal_count) |
| 415 | return ~i | |
| 415 | return ~iop | |
| 416 | 416 | |
| 417 | return i | |
| 417 | return iop | |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | |
| r15082 | r15083 | |
| 424 | 424 | |
| 425 | 425 | if (offset <= 1 && m_pedal_count == -1) /* 720 */ |
| 426 | 426 | { |
| 427 | switch (i | |
| 427 | switch (iop | |
| 428 | 428 | { |
| 429 | 429 | case 0: /* Real */ |
| 430 | 430 | break; |
| r15082 | r15083 | |
| 432 | 432 | case 1: /* Fake Joystick */ |
| 433 | 433 | /* special thanks to MAME Analog+ for the mapping code */ |
| 434 | 434 | { |
| 435 | int analogx = input_port_read(machine(), "FAKE_JOY_X") - 128; | |
| 436 | int analogy = input_port_read(machine(), "FAKE_JOY_Y") - 128; | |
| 435 | int analogx = ioport("FAKE_JOY_X")->read() - 128; | |
| 436 | int analogy = ioport("FAKE_JOY_Y")->read() - 128; | |
| 437 | 437 | double angle; |
| 438 | 438 | |
| 439 | 439 | /* if the joystick is centered, leave the rest of this alone */ |
| r15082 | r15083 | |
| 472 | 472 | { |
| 473 | 473 | INT32 diff; |
| 474 | 474 | UINT32 temp; |
| 475 | UINT32 rotate_count = i | |
| 475 | UINT32 rotate_count = iop | |
| 476 | 476 | /* rotate_count behaves the same as the real LEAT1 Rotate encoder |
| 477 | 477 | * we use it to generate the LETA0 Center encoder count |
| 478 | 478 | */ |
| r15082 | r15083 | |
| 550 | 550 | return 0xff; |
| 551 | 551 | } |
| 552 | 552 | } |
| 553 | return i | |
| 553 | return iop | |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | |
| r15082 | r15083 | |
| 962 | 962 | /* Center disc */ |
| 963 | 963 | /* X1, X2 LETA inputs */ |
| 964 | 964 | PORT_MODIFY("LETA0") /* not direct mapped */ |
| 965 | PORT_BIT( 0xff, 0x00, IPT_DIAL_V ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_NAME("Center") PORT_CONDITION("SELECT",0x03, | |
| 965 | PORT_BIT( 0xff, 0x00, IPT_DIAL_V ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_NAME("Center") PORT_CONDITION("SELECT",0x03, | |
| 966 | 966 | |
| 967 | 967 | /* Rotate disc */ |
| 968 | 968 | /* Y1, Y2 LETA inputs */ |
| 969 | 969 | /* The disc has 72 teeth which are read by the hardware at 2x */ |
| 970 | 970 | /* Computer hardware reads at 4x, so we set the sensitivity to 50% */ |
| 971 | 971 | PORT_MODIFY("LETA1") /* not direct mapped */ |
| 972 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_FULL_TURN_COUNT(144) PORT_NAME("Rotate") PORT_CONDITION("SELECT",0x03, | |
| 972 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_FULL_TURN_COUNT(144) PORT_NAME("Rotate") PORT_CONDITION("SELECT",0x03, | |
| 973 | 973 | |
| 974 | 974 | PORT_START("FAKE_JOY_X") /* not direct mapped */ |
| 975 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03, | |
| 975 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03, | |
| 976 | 976 | |
| 977 | 977 | PORT_START("FAKE_JOY_Y") /* not direct mapped */ |
| 978 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_CONDITION("SELECT",0x03, | |
| 978 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_CONDITION("SELECT",0x03, | |
| 979 | 979 | |
| 980 | 980 | /* Let's assume we are using a 1200 count spinner. We scale to get a 144 count. |
| 981 | 981 | * 144/1200 = 0.12 = 12% */ |
| 982 | 982 | PORT_START("FAKE_SPINNER") /* not direct mapped */ |
| 983 | PORT_BIT( 0xffff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03, | |
| 983 | PORT_BIT( 0xffff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03, | |
| 984 | 984 | |
| 985 | 985 | PORT_START("SELECT") |
| 986 | 986 | PORT_CONFNAME( 0x03, 0x02, "Controller Type" ) |
| r15082 | r15083 | |
|---|---|---|
| 309 | 309 | PORT_START("IN12") |
| 310 | 310 | PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 311 | 311 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 312 | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 312 | PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 313 | 313 | |
| 314 | 314 | PORT_START("IN13") |
| 315 | 315 | PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 228 | 228 | { |
| 229 | 229 | ninjakd2_state *state = device.machine().driver_data<ninjakd2_state>(); |
| 230 | 230 | running_machine &machine = device.machine(); |
| 231 | const UINT8* const rom = | |
| 231 | const UINT8* const rom = sta | |
| 232 | 232 | const int length = state->memregion("pcm")->bytes(); |
| 233 | 233 | INT16* sampledata = auto_alloc_array(machine, INT16, length); |
| 234 | 234 | |
| r15082 | r15083 | |
| 350 | 350 | case 1: // dip switches |
| 351 | 351 | switch (offset) |
| 352 | 352 | { |
| 353 | case 0: result = input_port_read(machine(), "DIPSW1"); break; | |
| 354 | case 1: result = input_port_read(machine(), "DIPSW2"); break; | |
| 353 | case 0: result = ioport("DIPSW1")->read(); break; | |
| 354 | case 1: result = ioport("DIPSW2")->read(); break; | |
| 355 | 355 | case 2: result = 0x02; break; |
| 356 | 356 | } |
| 357 | 357 | break; |
| r15082 | r15083 | |
| 359 | 359 | case 2: // player inputs |
| 360 | 360 | switch (offset) |
| 361 | 361 | { |
| 362 | case 0: result = input_port_read(machine(), "PAD1"); break; | |
| 363 | case 1: result = input_port_read(machine(), "PAD2"); break; | |
| 362 | case 0: result = ioport("PAD1")->read(); break; | |
| 363 | case 1: result = ioport("PAD2")->read(); break; | |
| 364 | 364 | case 2: result = 0x01; break; |
| 365 | 365 | } |
| 366 | 366 | break; |
| r15082 | r15083 | |
| 615 | 615 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 616 | 616 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 617 | 617 | PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:5,4") |
| 618 | PORT_DIPSETTING( 0x00, "2 Coins/1 Credit, 6/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 619 | PORT_DIPSETTING( 0x18, "1 Coin/1 Credit, 3/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 620 | PORT_DIPSETTING( 0x10, "1 Coin/2 Credits, 2/6, 3/10" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 621 | PORT_DIPSETTING( 0x08, "1 Coin/3 Credits, 3/12" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 622 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 623 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 624 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 625 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 618 | PORT_DIPSETTING( 0x00, "2 Coins/1 Credit, 6/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 619 | PORT_DIPSETTING( 0x18, "1 Coin/1 Credit, 3/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 620 | PORT_DIPSETTING( 0x10, "1 Coin/2 Credits, 2/6, 3/10" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 621 | PORT_DIPSETTING( 0x08, "1 Coin/3 Credits, 3/12" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 622 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 623 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 624 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 625 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 626 | 626 | PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:3,2,1") |
| 627 | PORT_DIPSETTING( 0x00, "5 Coins/1 Credit, 15/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 628 | PORT_DIPSETTING( 0x20, "4 Coins/1 Credit, 12/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 629 | PORT_DIPSETTING( 0x40, "3 Coins/1 Credit, 9/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 630 | PORT_DIPSETTING( 0x60, "2 Coins/1 Credit, 6/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 631 | PORT_DIPSETTING( 0xe0, "1 Coin/1 Credit, 3/4" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 632 | PORT_DIPSETTING( 0xc0, "1 Coin/2 Credits, 2/6, 3/10" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 633 | PORT_DIPSETTING( 0xa0, "1 Coin/3 Credits, 3/12" ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 634 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) | |
| 635 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 636 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 637 | PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 638 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 639 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 640 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 641 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 642 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DIPSW2", 0x04, PORTCOND_EQUALS, 0x00) | |
| 627 | PORT_DIPSETTING( 0x00, "5 Coins/1 Credit, 15/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 628 | PORT_DIPSETTING( 0x20, "4 Coins/1 Credit, 12/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 629 | PORT_DIPSETTING( 0x40, "3 Coins/1 Credit, 9/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 630 | PORT_DIPSETTING( 0x60, "2 Coins/1 Credit, 6/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 631 | PORT_DIPSETTING( 0xe0, "1 Coin/1 Credit, 3/4" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 632 | PORT_DIPSETTING( 0xc0, "1 Coin/2 Credits, 2/6, 3/10" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 633 | PORT_DIPSETTING( 0xa0, "1 Coin/3 Credits, 3/12" ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 634 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DIPSW2", 0x04, NOTEQUALS, 0x00) | |
| 635 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 636 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 637 | PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 638 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 639 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 640 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 641 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 642 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DIPSW2", 0x04, EQUALS, 0x00) | |
| 643 | 643 | INPUT_PORTS_END |
| 644 | 644 | |
| 645 | 645 | static INPUT_PORTS_START( rdaction ) |
| r15082 | r15083 | |
|---|---|---|
| 266 | 266 | for (i = 0; i < 6; i++) |
| 267 | 267 | { |
| 268 | 268 | if (BIT(p, i)) |
| 269 | ret |= i | |
| 269 | ret |= iop | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | return ret; |
| r15082 | r15083 | |
| 449 | 449 | static MACHINE_START( mjsister ) |
| 450 | 450 | { |
| 451 | 451 | mjsister_state *state = machine.driver_data<mjsister_state>(); |
| 452 | UINT8 *ROM = | |
| 452 | UINT8 *ROM = sta | |
| 453 | 453 | |
| 454 | 454 | state->membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x8000); |
| 455 | 455 |
| r15082 | r15083 | |
|---|---|---|
| 466 | 466 | static MACHINE_START( yunsung8 ) |
| 467 | 467 | { |
| 468 | 468 | yunsung8_state *state = machine.driver_data<yunsung8_state>(); |
| 469 | UINT8 *MAIN = machine.root_device().memregion("maincpu")->base(); | |
| 470 | UINT8 *AUDIO = machine.root_device().memregion("audiocpu")->base(); | |
| 469 | UINT8 *MAIN = state->memregion("maincpu")->base(); | |
| 470 | UINT8 *AUDIO = state->memregion("audiocpu")->base(); | |
| 471 | 471 | |
| 472 | 472 | state->m_videoram_0 = state->m_videoram + 0x0000; // Ram is banked |
| 473 | 473 | state->m_videoram_1 = state->m_videoram + 0x2000; |
| r15082 | r15083 | |
|---|---|---|
| 461 | 461 | ROM_LOAD( "tst-c-a.5n", 0x3800, 0x0800, CRC(1a798fbf) SHA1(65ff2fe91c2037378314c4a68b2bd21fd167c64a) ) |
| 462 | 462 | |
| 463 | 463 | ROM_REGION( 0x1000, "audiocpu", 0 ) |
| 464 | ROM_LOAD( " | |
| 464 | ROM_LOAD( "tst-e-20.bin | |
| 465 | 465 | |
| 466 | 466 | ROM_REGION( 0x1000, "gfx1", 0 ) /* sprites */ |
| 467 | 467 | ROM_LOAD( "tst-v-a.5k", 0x0000, 0x0800, CRC(236e1ff7) SHA1(575b8ed9ab054a864207e0fde3ae93cdcafbebf2) ) |
| 468 | 468 | ROM_LOAD( "tst-v-a.6k", 0x0800, 0x0800, CRC(bf901a4e) SHA1(71207ad1ca60aa617dbbc3cd2e4e42520b7c8513) ) |
| 469 | 469 | |
| 470 | 470 | ROM_REGION( 0x0100, "gfx2", 0 ) /* bullets */ |
| 471 | ROM_LOAD( "4i | |
| 471 | ROM_LOAD( "mb7052-a.4i | |
| 472 | 472 | |
| 473 | 473 | ROM_REGION( 0x0020, "proms", 0 ) |
| 474 | ROM_LOAD( "mb7051.3n", 0x0000, 0x0020, | |
| 474 | ROM_LOAD( "mb7051-a.3n", 0x0000, 0x0020, | |
| 475 | 475 | ROM_END |
| 476 | 476 | |
| 477 | 477 |
| r15082 | r15083 | |
|---|---|---|
| 155 | 155 | static const char *const portnames[] = { "SW0", "SW1", "DSW2", "PLACEHOLDER" }; // "IN1" & "IN2" are read separately when offset==3 |
| 156 | 156 | |
| 157 | 157 | offset &= 3; |
| 158 | res = i | |
| 158 | res = iop | |
| 159 | 159 | if (offset == 3) |
| 160 | 160 | { |
| 161 | res = i | |
| 161 | res = iop | |
| 162 | 162 | if (m_handle_joystick) |
| 163 | 163 | { |
| 164 | 164 | /* map digital two-way joystick to two fixed VOLIN values */ |
| r15082 | r15083 | |
| 231 | 231 | /* Read Switch Inputs */ |
| 232 | 232 | READ8_MEMBER(warpwarp_state::warpwarp_sw_r) |
| 233 | 233 | { |
| 234 | return (i | |
| 234 | return (iop | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | /* Read Dipswitches */ |
| 238 | 238 | static READ8_DEVICE_HANDLER( warpwarp_dsw1_r ) |
| 239 | 239 | { |
| 240 | return ( | |
| 240 | return ( | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /* Read mux Controller Inputs */ |
| r15082 | r15083 | |
| 246 | 246 | warpwarp_state *state = device->machine().driver_data<warpwarp_state>(); |
| 247 | 247 | int res; |
| 248 | 248 | |
| 249 | res = | |
| 249 | res = s | |
| 250 | 250 | if (state->m_handle_joystick) |
| 251 | 251 | { |
| 252 | 252 | if (res & 1) return 0x0f; |
| r15082 | r15083 | |
| 379 | 379 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 380 | 380 | PORT_DIPSETTING( 0x0c, DEF_STR( Free_Play ) ) |
| 381 | 381 | PORT_DIPNAME( 0x30, 0x10, "Replay" ) PORT_DIPLOCATION("DSW2:5,6") // awards 1 credit |
| 382 | PORT_DIPSETTING( 0x10, "40k 80k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 383 | PORT_DIPSETTING( 0x20, "70k 140k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 384 | PORT_DIPSETTING( 0x30, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 385 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 386 | PORT_DIPSETTING( 0x10, "60k 120k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 387 | PORT_DIPSETTING( 0x20, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 388 | PORT_DIPSETTING( 0x30, "150k 300k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 389 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 382 | PORT_DIPSETTING( 0x10, "40k 80k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 383 | PORT_DIPSETTING( 0x20, "70k 140k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 384 | PORT_DIPSETTING( 0x30, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 385 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 386 | PORT_DIPSETTING( 0x10, "60k 120k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 387 | PORT_DIPSETTING( 0x20, "100k 200k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 388 | PORT_DIPSETTING( 0x30, "150k 300k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 389 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 390 | 390 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 391 | 391 | |
| 392 | 392 | PORT_START("IN1") |
| r15082 | r15083 | |
| 401 | 401 | |
| 402 | 402 | PORT_MODIFY("DSW2") |
| 403 | 403 | PORT_DIPNAME( 0x30, 0x10, "Replay" ) // awards 1 credit |
| 404 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 405 | PORT_DIPSETTING( 0x20, "70k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 406 | PORT_DIPSETTING( 0x30, "100k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 408 | PORT_DIPSETTING( 0x10, "60k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 409 | PORT_DIPSETTING( 0x20, "100k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 410 | PORT_DIPSETTING( 0x30, "150k" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 411 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 404 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 405 | PORT_DIPSETTING( 0x20, "70k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 406 | PORT_DIPSETTING( 0x30, "100k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 408 | PORT_DIPSETTING( 0x10, "60k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 409 | PORT_DIPSETTING( 0x20, "100k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 410 | PORT_DIPSETTING( 0x30, "150k" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 411 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 412 | 412 | INPUT_PORTS_END |
| 413 | 413 | |
| 414 | 414 | static INPUT_PORTS_START( navarone ) |
| r15082 | r15083 | |
| 432 | 432 | PORT_DIPSETTING( 0x00, "2" ) |
| 433 | 433 | PORT_DIPSETTING( 0x02, "3" ) |
| 434 | 434 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:3,4") |
| 435 | PORT_DIPSETTING( 0x04, "5000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 436 | PORT_DIPSETTING( 0x08, "6000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 437 | PORT_DIPSETTING( 0x0c, "7000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 438 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x00) | |
| 439 | PORT_DIPSETTING( 0x04, "6000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 440 | PORT_DIPSETTING( 0x08, "7000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 441 | PORT_DIPSETTING( 0x0c, "8000" ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 442 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, PORTCOND_EQUALS, 0x02) | |
| 435 | PORT_DIPSETTING( 0x04, "5000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 436 | PORT_DIPSETTING( 0x08, "6000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 437 | PORT_DIPSETTING( 0x0c, "7000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 438 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) | |
| 439 | PORT_DIPSETTING( 0x04, "6000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 440 | PORT_DIPSETTING( 0x08, "7000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 441 | PORT_DIPSETTING( 0x0c, "8000" ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 442 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) | |
| 443 | 443 | PORT_DIPNAME( 0x30, 0x10, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW2:5,6") |
| 444 | 444 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) ) |
| 445 | 445 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 661 | 661 | PORT_DIPSETTING( 0x08, "4" ) |
| 662 | 662 | PORT_DIPSETTING( 0x0c, "5" ) |
| 663 | 663 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW1:5,6") |
| 664 | PORT_DIPSETTING( 0x00, "8k 30k 30k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 665 | PORT_DIPSETTING( 0x10, "10k 40k 40k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 666 | PORT_DIPSETTING( 0x20, "15k 60k 60k+" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 667 | PORT_DIPSETTING(0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_NOTEQUALS, 0x0c) | |
| 668 | PORT_DIPSETTING( 0x00, "30k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 669 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 670 | PORT_DIPSETTING( 0x20, "60k" ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 671 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, PORTCOND_EQUALS, 0x0c) | |
| 664 | PORT_DIPSETTING( 0x00, "8k 30k 30k+" ) PORT_CONDITION("DSW1", 0x0c, NOTEQUALS, 0x0c) | |
| 665 | PORT_DIPSETTING( 0x10, "10k 40k 40k+" ) PORT_CONDITION("DSW1", 0x0c, NOTEQUALS, 0x0c) | |
| 666 | PORT_DIPSETTING( 0x20, "15k 60k 60k+" ) PORT_CONDITION("DSW1", 0x0c, NOTEQUALS, 0x0c) | |
| 667 | PORT_DIPSETTING(0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, NOTEQUALS, 0x0c) | |
| 668 | PORT_DIPSETTING( 0x00, "30k" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c) | |
| 669 | PORT_DIPSETTING( 0x10, "40k" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c) | |
| 670 | PORT_DIPSETTING( 0x20, "60k" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c) | |
| 671 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c) | |
| 672 | 672 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW1:7") |
| 673 | 673 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 674 | 674 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 555 | 555 | joystick_data = 0xffffffff; |
| 556 | 556 | eeprom_bit_count = 0; |
| 557 | 557 | blitter_status = 1; |
| 558 | if ((using_cart) && (in | |
| 558 | if ((using_cart) && (machine.root_device().ioport | |
| 559 | 559 | { |
| 560 | 560 | cart_base[0x102] = 1; |
| 561 | 561 | using_cart = 0; |
| r15082 | r15083 | |
| 825 | 825 | { |
| 826 | 826 | if ((joystick_data & (0x10000 << i)) == 0) |
| 827 | 827 | { |
| 828 | joystick_result &= input_port_read(machine(), keynames[0][i]); | |
| 829 | joybuts_result &= input_port_read(machine(), keynames[1][i]); | |
| 828 | joystick_result &= ioport(keynames[0][i])->read(); | |
| 829 | joybuts_result &= ioport(keynames[1][i])->read(); | |
| 830 | 830 | } |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | 833 | joystick_result |= machine().device<eeprom_device>("eeprom")->read_bit(); |
| 834 | joybuts_result |= (i | |
| 834 | joybuts_result |= (iop | |
| 835 | 835 | |
| 836 | 836 | return (joystick_result << 16) | joybuts_result; |
| 837 | 837 | } |
| r15082 | r15083 | |
|---|---|---|
| 215 | 215 | PORT_DIPSETTING( 0x08, DEF_STR( Normal ) ) |
| 216 | 216 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 217 | 217 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 218 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04, | |
| 218 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04, | |
| 219 | 219 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) |
| 220 | 220 | PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) |
| 221 | 221 | PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 232 | 232 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_5C ) ) |
| 233 | 233 | PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) |
| 234 | 234 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 235 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04, | |
| 235 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04, | |
| 236 | 236 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 237 | 237 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| 238 | 238 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 239 | 239 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 240 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04, | |
| 240 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04, | |
| 241 | 241 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) |
| 242 | 242 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) |
| 243 | 243 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 51 | 51 | #include "machine/nvram.h" |
| 52 | 52 | |
| 53 | 53 | |
| 54 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 55 | #if SIGNED_DAC | |
| 56 | #define DAC_WRITE dac_signed_w | |
| 57 | #else | |
| 58 | #define DAC_WRITE dac_w | |
| 59 | #endif | |
| 60 | ||
| 61 | ||
| 62 | 54 | static DRIVER_INIT( gionbana ) |
| 63 | 55 | { |
| 64 | 56 | UINT8 *prot = machine.root_device().memregion("protection")->base(); |
| r15082 | r15083 | |
| 451 | 443 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 452 | 444 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 453 | 445 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) //AM_WRITENOP |
| 454 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 446 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 455 | 447 | AM_RANGE(0xe0, 0xe0) AM_WRITE(nbmj8891_vramsel_w) |
| 456 | 448 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 457 | 449 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 470 | 462 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 471 | 463 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 472 | 464 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) //AM_WRITENOP |
| 473 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 465 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 474 | 466 | AM_RANGE(0xe0, 0xe0) AM_WRITE(nbmj8891_vramsel_w) |
| 475 | 467 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 476 | 468 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 493 | 485 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 494 | 486 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) AM_WRITENOP |
| 495 | 487 | AM_RANGE(0xd0, 0xdf) AM_READ(nbmj8891_clut_r) |
| 496 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 488 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 497 | 489 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 498 | 490 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| 499 | 491 | ADDRESS_MAP_END |
| r15082 | r15083 | |
| 511 | 503 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 512 | 504 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 513 | 505 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) //AM_WRITENOP |
| 514 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 506 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 515 | 507 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 516 | 508 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) //AM_WRITENOP |
| 517 | 509 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 530 | 522 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 531 | 523 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 532 | 524 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) //AM_WRITENOP |
| 533 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 525 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 534 | 526 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 535 | 527 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) //AM_WRITENOP |
| 536 | 528 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 549 | 541 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 550 | 542 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 551 | 543 | AM_RANGE(0xc0, 0xc0) AM_READWRITE_LEGACY(nb1413m3_inputport3_r,nb1413m3_nmi_clock_w) |
| 552 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 544 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 553 | 545 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 554 | 546 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) //AM_WRITENOP |
| 555 | 547 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 569 | 561 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 570 | 562 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 571 | 563 | AM_RANGE(0xc0, 0xc0) AM_READWRITE_LEGACY(nb1413m3_inputport3_r,nb1413m3_nmi_clock_w) |
| 572 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 564 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 573 | 565 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 574 | 566 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 575 | 567 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 589 | 581 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 590 | 582 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 591 | 583 | AM_RANGE(0xc0, 0xc0) AM_READWRITE_LEGACY(nb1413m3_inputport3_r,nb1413m3_nmi_clock_w) |
| 592 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 584 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 593 | 585 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 594 | 586 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 595 | 587 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 608 | 600 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 609 | 601 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 610 | 602 | AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT0-2") |
| 611 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 603 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 612 | 604 | AM_RANGE(0xe0, 0xe0) AM_WRITE(nbmj8891_vramsel_w) |
| 613 | 605 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 614 | 606 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 627 | 619 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 628 | 620 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 629 | 621 | AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT0-2") //AM_WRITENOP |
| 630 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 622 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 631 | 623 | AM_RANGE(0xe0, 0xe0) AM_WRITE(nbmj8891_vramsel_w) |
| 632 | 624 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 633 | 625 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 643 | 635 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 644 | 636 | // AM_RANGE(0xc0, 0xc0) AM_WRITENOP // ? |
| 645 | 637 | // AM_RANGE(0xd0, 0xd0) AM_READ_LEGACY(ff_r) // irq ack? watchdog? |
| 646 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 638 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 647 | 639 | AM_RANGE(0xe0, 0xe0) AM_READ_LEGACY(nb1413m3_dipsw3_h_r) AM_WRITE(nbmj8891_taiwanmb_gfxdraw_w) // blitter draw start |
| 648 | 640 | AM_RANGE(0xe1, 0xe1) AM_READ_LEGACY(nb1413m3_dipsw3_l_r) |
| 649 | 641 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw2_r,nb1413m3_outcoin_w) |
| r15082 | r15083 | |
| 2604 | 2596 | }; |
| 2605 | 2597 | |
| 2606 | 2598 | |
| 2607 | ||
| 2608 | ||
| 2609 | 2599 | static MACHINE_CONFIG_START( gionbana, nbmj8891_state ) |
| 2610 | 2600 | |
| 2611 | 2601 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2638 | 2628 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 2639 | 2629 | MACHINE_CONFIG_END |
| 2640 | 2630 | |
| 2641 | ||
| 2642 | 2631 | static MACHINE_CONFIG_DERIVED( mgion, gionbana ) |
| 2643 | 2632 | |
| 2644 | 2633 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2649 | 2638 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 2650 | 2639 | MACHINE_CONFIG_END |
| 2651 | 2640 | |
| 2652 | ||
| 2653 | 2641 | static MACHINE_CONFIG_DERIVED( omotesnd, gionbana ) |
| 2654 | 2642 | |
| 2655 | 2643 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2665 | 2653 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) |
| 2666 | 2654 | MACHINE_CONFIG_END |
| 2667 | 2655 | |
| 2668 | ||
| 2669 | 2656 | /* NBMJDRV2 */ |
| 2670 | 2657 | static MACHINE_CONFIG_DERIVED( mjcamerb, gionbana ) |
| 2671 | 2658 | |
| r15082 | r15083 | |
| 2708 | 2695 | MCFG_VIDEO_START(nbmj8891_1layer) |
| 2709 | 2696 | MACHINE_CONFIG_END |
| 2710 | 2697 | |
| 2711 | ||
| 2712 | 2698 | static MACHINE_CONFIG_DERIVED( msjiken, hanamomo ) |
| 2713 | 2699 | |
| 2714 | 2700 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2717 | 2703 | MCFG_CPU_IO_MAP(msjiken_io_map) |
| 2718 | 2704 | MACHINE_CONFIG_END |
| 2719 | 2705 | |
| 2720 | ||
| 2721 | ||
| 2722 | 2706 | /* NBMJDRV3 */ |
| 2723 | 2707 | static MACHINE_CONFIG_DERIVED( telmahjn, gionbana ) |
| 2724 | 2708 | |
| r15082 | r15083 | |
| 2735 | 2719 | MCFG_VIDEO_START(nbmj8891_1layer) |
| 2736 | 2720 | MACHINE_CONFIG_END |
| 2737 | 2721 | |
| 2738 | ||
| 2739 | 2722 | /* NBMJDRV5 */ |
| 2740 | 2723 | static MACHINE_CONFIG_DERIVED( mjnanpas, gionbana ) |
| 2741 | 2724 | |
| r15082 | r15083 | |
| 2744 | 2727 | MCFG_CPU_PROGRAM_MAP(club90s_map) |
| 2745 | 2728 | MACHINE_CONFIG_END |
| 2746 | 2729 | |
| 2747 | ||
| 2748 | 2730 | static MACHINE_CONFIG_DERIVED( maiko, mjnanpas ) |
| 2749 | 2731 | |
| 2750 | 2732 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2753 | 2735 | MCFG_CPU_IO_MAP(maiko_io_map) |
| 2754 | 2736 | MACHINE_CONFIG_END |
| 2755 | 2737 | |
| 2756 | ||
| 2757 | 2738 | static MACHINE_CONFIG_DERIVED( mmaiko, maiko ) |
| 2758 | 2739 | |
| 2759 | 2740 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2763 | 2744 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 2764 | 2745 | MACHINE_CONFIG_END |
| 2765 | 2746 | |
| 2766 | ||
| 2767 | 2747 | static MACHINE_CONFIG_DERIVED( lovehous, mjnanpas ) |
| 2768 | 2748 | |
| 2769 | 2749 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2774 | 2754 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 2775 | 2755 | MACHINE_CONFIG_END |
| 2776 | 2756 | |
| 2777 | ||
| 2778 | 2757 | static MACHINE_CONFIG_DERIVED( hanaoji, maiko ) |
| 2779 | 2758 | |
| 2780 | 2759 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2808 | 2787 | MCFG_CPU_IO_MAP(scandal_io_map) |
| 2809 | 2788 | MACHINE_CONFIG_END |
| 2810 | 2789 | |
| 2811 | ||
| 2812 | 2790 | static MACHINE_CONFIG_DERIVED( bananadr, mjnanpas ) |
| 2813 | 2791 | |
| 2814 | 2792 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2819 | 2797 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 2820 | 2798 | MACHINE_CONFIG_END |
| 2821 | 2799 | |
| 2822 | ||
| 2823 | 2800 | /* NBMJDRV6 */ |
| 2824 | 2801 | static MACHINE_CONFIG_DERIVED( mjfocusm, gionbana ) |
| 2825 | 2802 | |
| r15082 | r15083 | |
| 2838 | 2815 | /* sound hardware */ |
| 2839 | 2816 | MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000) |
| 2840 | 2817 | MCFG_SOUND_CONFIG(ay8910_config) |
| 2841 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0. | |
| 2818 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) | |
| 2842 | 2819 | MACHINE_CONFIG_END |
| 2843 | 2820 | |
| 2844 | ||
| 2845 | 2821 | static MACHINE_CONFIG_DERIVED( taiwanmb, gionbana ) |
| 2846 | 2822 | |
| 2847 | 2823 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2860 | 2836 | /* sound hardware */ |
| 2861 | 2837 | MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000) |
| 2862 | 2838 | MCFG_SOUND_CONFIG(ay8910_config) |
| 2863 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0. | |
| 2839 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) | |
| 2864 | 2840 | MACHINE_CONFIG_END |
| 2865 | 2841 | |
| 2866 | 2842 | |
| 2867 | ||
| 2868 | 2843 | ROM_START( gionbana ) |
| 2869 | 2844 | ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ |
| 2870 | 2845 | ROM_LOAD( "gion_03.bin", 0x00000, 0x10000, CRC(615e993b) SHA1(6efda8d1f0d5be6418a73dd86b898bb518de3f8b) ) |
| r15082 | r15083 | |
| 3835 | 3810 | DISK_IMAGE_READONLY( "hnageman", 0, NO_DUMP ) |
| 3836 | 3811 | ROM_END |
| 3837 | 3812 | |
| 3813 | ||
| 3838 | 3814 | // YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS) |
| 3839 | 3815 | GAME( 1988, msjiken, 0, msjiken, msjiken, msjiken, ROT270, "Nichibutsu", "Mahjong Satsujin Jiken (Japan 881017)", 0 ) |
| 3840 | 3816 | GAME( 1988, hanamomo, 0, hanamomo, hanamomo, hanamomo, ROT0, "Nichibutsu", "Mahjong Hana no Momoko gumi (Japan 881201)", 0 ) |
| r15082 | r15083 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | READ8_MEMBER(liberate_state::deco16_io_r) |
| 56 | 56 | { |
| 57 | if (offset == 0) return input_port_read(machine(), "IN1"); /* Player 1 controls */ | |
| 58 | if (offset == 1) return input_port_read(machine(), "IN2"); /* Player 2 controls */ | |
| 59 | if (offset == 2) return input_port_read(machine(), "IN3"); /* Vblank, coins */ | |
| 60 | if (offset == 3) return input_port_read(machine(), "DSW1"); /* Dip 1 */ | |
| 61 | if (offset == 4) return input_port_read(machine(), "DSW2"); /* Dip 2 */ | |
| 57 | if (offset == 0) return ioport("IN1")->read(); /* Player 1 controls */ | |
| 58 | if (offset == 1) return ioport("IN2")->read(); /* Player 2 controls */ | |
| 59 | if (offset == 2) return ioport("IN3")->read(); /* Vblank, coins */ | |
| 60 | if (offset == 3) return ioport("DSW1")->read(); /* Dip 1 */ | |
| 61 | if (offset == 4) return ioport("DSW2")->read(); /* Dip 2 */ | |
| 62 | 62 | |
| 63 | 63 | logerror("%04x: Read input %d\n", cpu_get_pc(&space.device()), offset); |
| 64 | 64 | return 0xff; |
| r15082 | r15083 | |
| 338 | 338 | |
| 339 | 339 | static INPUT_PORTS_START( generic_input ) |
| 340 | 340 | PORT_START("IN0") |
| 341 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 341 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 342 | 342 | |
| 343 | 343 | PORT_START("IN1") |
| 344 | 344 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| r15082 | r15083 | |
| 358 | 358 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 359 | 359 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 360 | 360 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 361 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 361 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 362 | 362 | |
| 363 | 363 | PORT_START("IN3") |
| 364 | 364 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r15082 | r15083 | |
| 489 | 489 | PORT_INCLUDE( kamikcab ) |
| 490 | 490 | |
| 491 | 491 | PORT_MODIFY("IN0") |
| 492 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 492 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 493 | 493 | PORT_BIT( 0xfb, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 494 | 494 | INPUT_PORTS_END |
| 495 | 495 | |
| r15082 | r15083 | |
| 575 | 575 | |
| 576 | 576 | PORT_MODIFY("IN0") |
| 577 | 577 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT ) |
| 578 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 578 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 579 | 579 | PORT_BIT( 0xf9, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 580 | 580 | |
| 581 | 581 | PORT_MODIFY("DSW1") |
| r15082 | r15083 | |
| 763 | 763 | static INTERRUPT_GEN( deco16_interrupt ) |
| 764 | 764 | { |
| 765 | 765 | liberate_state *state = device->machine().driver_data<liberate_state>(); |
| 766 | int p = ~ | |
| 766 | int p = ~s | |
| 767 | 767 | if ((p & 0x43) && !state->m_latch) |
| 768 | 768 | { |
| 769 | 769 | device_set_input_line(device, DECO16_IRQ_LINE, ASSERT_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 1517 | 1517 | /* DSW reading for 16 bit CPUs */ |
| 1518 | 1518 | READ16_MEMBER(seta_state::seta_dsw_r) |
| 1519 | 1519 | { |
| 1520 | UINT16 dsw = i | |
| 1520 | UINT16 dsw = iop | |
| 1521 | 1521 | if (offset == 0) return (dsw >> 8) & 0xff; |
| 1522 | 1522 | else return (dsw >> 0) & 0xff; |
| 1523 | 1523 | } |
| r15082 | r15083 | |
| 1527 | 1527 | |
| 1528 | 1528 | static READ8_DEVICE_HANDLER( dsw1_r ) |
| 1529 | 1529 | { |
| 1530 | return ( | |
| 1530 | return ( | |
| 1531 | 1531 | } |
| 1532 | 1532 | |
| 1533 | 1533 | static READ8_DEVICE_HANDLER( dsw2_r ) |
| 1534 | 1534 | { |
| 1535 | return ( | |
| 1535 | return ( | |
| 1536 | 1536 | } |
| 1537 | 1537 | |
| 1538 | 1538 | |
| r15082 | r15083 | |
| 1628 | 1628 | |
| 1629 | 1629 | READ16_MEMBER(seta_state::calibr50_ip_r) |
| 1630 | 1630 | { |
| 1631 | int dir1 = input_port_read(machine(), "ROT1"); // analog port | |
| 1632 | int dir2 = input_port_read(machine(), "ROT2"); // analog port | |
| 1631 | int dir1 = ioport("ROT1")->read(); // analog port | |
| 1632 | int dir2 = ioport("ROT2")->read(); // analog port | |
| 1633 | 1633 | |
| 1634 | 1634 | switch (offset) |
| 1635 | 1635 | { |
| 1636 | case 0x00/2: return input_port_read(machine(), "P1"); // p1 | |
| 1637 | case 0x02/2: return input_port_read(machine(), "P2"); // p2 | |
| 1636 | case 0x00/2: return ioport("P1")->read(); // p1 | |
| 1637 | case 0x02/2: return ioport("P2")->read(); // p2 | |
| 1638 | 1638 | |
| 1639 | case 0x08/2: return i | |
| 1639 | case 0x08/2: return iop | |
| 1640 | 1640 | |
| 1641 | 1641 | case 0x10/2: return (dir1 & 0xff); // lower 8 bits of p1 rotation |
| 1642 | 1642 | case 0x12/2: return (dir1 >> 8); // upper 4 bits of p1 rotation |
| r15082 | r15083 | |
| 1691 | 1691 | { |
| 1692 | 1692 | switch (offset) |
| 1693 | 1693 | { |
| 1694 | case 0/2: return (input_port_read(machine(), "DSW") >> 8) & 0xf; | |
| 1695 | case 2/2: return (input_port_read(machine(), "DSW") >> 12) & 0xf; | |
| 1696 | case 4/2: return (input_port_read(machine(), "DSW") >> 0) & 0xf; | |
| 1697 | case 6/2: return (input_port_read(machine(), "DSW") >> 4) & 0xf; | |
| 1694 | case 0/2: return (ioport("DSW")->read() >> 8) & 0xf; | |
| 1695 | case 2/2: return (ioport("DSW")->read() >> 12) & 0xf; | |
| 1696 | case 4/2: return (ioport("DSW")->read() >> 0) & 0xf; | |
| 1697 | case 6/2: return (ioport("DSW")->read() >> 4) & 0xf; | |
| 1698 | 1698 | } |
| 1699 | 1699 | return 0; |
| 1700 | 1700 | } |
| r15082 | r15083 | |
| 1705 | 1705 | |
| 1706 | 1706 | switch (offset) |
| 1707 | 1707 | { |
| 1708 | case 0/2: return (input_port_read(machine(), portx_name[m_usclssic_port_select]) >> 0) & 0xff; | |
| 1709 | case 2/2: return (input_port_read(machine(), portx_name[m_usclssic_port_select]) >> 8) & 0xff; | |
| 1708 | case 0/2: return (ioport(portx_name[m_usclssic_port_select])->read() >> 0) & 0xff; | |
| 1709 | case 2/2: return (ioport(portx_name[m_usclssic_port_select])->read() >> 8) & 0xff; | |
| 1710 | 1710 | } |
| 1711 | 1711 | return 0; |
| 1712 | 1712 | } |
| r15082 | r15083 | |
| 1717 | 1717 | |
| 1718 | 1718 | switch (offset) |
| 1719 | 1719 | { |
| 1720 | case 0/2: return (input_port_read(machine(), porty_name[m_usclssic_port_select]) >> 0) & 0xff; | |
| 1721 | case 2/2: return (input_port_read(machine(), porty_name[m_usclssic_port_select]) >> 8) & 0xff; | |
| 1720 | case 0/2: return (ioport(porty_name[m_usclssic_port_select])->read() >> 0) & 0xff; | |
| 1721 | case 2/2: return (ioport(porty_name[m_usclssic_port_select])->read() >> 8) & 0xff; | |
| 1722 | 1722 | } |
| 1723 | 1723 | return 0; |
| 1724 | 1724 | } |
| r15082 | r15083 | |
| 1866 | 1866 | { |
| 1867 | 1867 | static const char *const portnames[] = { "GUNX1", "GUNY1", "GUNX2", "GUNY2" }; |
| 1868 | 1868 | |
| 1869 | int data = i | |
| 1869 | int data = iop | |
| 1870 | 1870 | return (data >> m_gun_input_bit) & 1; |
| 1871 | 1871 | } |
| 1872 | 1872 | |
| r15082 | r15083 | |
| 2076 | 2076 | |
| 2077 | 2077 | READ16_MEMBER(seta_state::keroppi_coin_r) |
| 2078 | 2078 | { |
| 2079 | UINT16 result = i | |
| 2079 | UINT16 result = iop | |
| 2080 | 2080 | |
| 2081 | 2081 | if (m_keroppi_prize_hop == 2) |
| 2082 | 2082 | { |
| r15082 | r15083 | |
| 2393 | 2393 | READ16_MEMBER(seta_state::krzybowl_input_r) |
| 2394 | 2394 | { |
| 2395 | 2395 | // analog ports |
| 2396 | int dir1x = input_port_read(machine(), "TRACK1_X") & 0xfff; | |
| 2397 | int dir1y = input_port_read(machine(), "TRACK1_Y") & 0xfff; | |
| 2398 | int dir2x = input_port_read(machine(), "TRACK2_X") & 0xfff; | |
| 2399 | int dir2y = input_port_read(machine(), "TRACK2_Y") & 0xfff; | |
| 2396 | int dir1x = ioport("TRACK1_X")->read() & 0xfff; | |
| 2397 | int dir1y = ioport("TRACK1_Y")->read() & 0xfff; | |
| 2398 | int dir2x = ioport("TRACK2_X")->read() & 0xfff; | |
| 2399 | int dir2y = ioport("TRACK2_Y")->read() & 0xfff; | |
| 2400 | 2400 | |
| 2401 | 2401 | switch (offset) |
| 2402 | 2402 | { |
| r15082 | r15083 | |
| 2567 | 2567 | |
| 2568 | 2568 | switch( offset ) |
| 2569 | 2569 | { |
| 2570 | case 0x00/2: return i | |
| 2570 | case 0x00/2: return iop | |
| 2571 | 2571 | case 0x02/2: return 0xffff; |
| 2572 | case 0x04/2: return i | |
| 2572 | case 0x04/2: return iop | |
| 2573 | 2573 | // case 0x06/2: |
| 2574 | 2574 | case 0x08/2: return 0xffff; |
| 2575 | 2575 | |
| r15082 | r15083 | |
| 2838 | 2838 | READ16_MEMBER(seta_state::inttoote_dsw_r) |
| 2839 | 2839 | { |
| 2840 | 2840 | int shift = offset * 4; |
| 2841 | return ((((input_port_read(machine(), "DSW1") >> shift) & 0xf)) << 0) | | |
| 2842 | ((((input_port_read(machine(), "DSW2_3") >> shift) & 0xf)) << 4) | | |
| 2843 | ((((input_port_read(machine(), "DSW2_3") >> (shift+8)) & 0xf)) << 8) ; | |
| 2841 | return ((((ioport("DSW1")->read() >> shift) & 0xf)) << 0) | | |
| 2842 | ((((ioport("DSW2_3")->read() >> shift) & 0xf)) << 4) | | |
| 2843 | ((((ioport("DSW2_3")->read() >> (shift+8)) & 0xf)) << 8) ; | |
| 2844 | 2844 | } |
| 2845 | 2845 | |
| 2846 | 2846 | READ16_MEMBER(seta_state::inttoote_key_r) |
| r15082 | r15083 | |
| 2848 | 2848 | |
| 2849 | 2849 | switch( *m_inttoote_key_select ) |
| 2850 | 2850 | { |
| 2851 | case 0x08: return input_port_read(machine(), "BET0"); | |
| 2852 | case 0x10: return input_port_read(machine(), "BET1"); | |
| 2853 | case 0x20: return input_port_read(machine(), "BET2"); | |
| 2854 | case 0x40: return input_port_read(machine(), "BET3"); | |
| 2855 | case 0x80: return input_port_read(machine(), "BET4"); | |
| 2851 | case 0x08: return ioport("BET0")->read(); | |
| 2852 | case 0x10: return ioport("BET1")->read(); | |
| 2853 | case 0x20: return ioport("BET2")->read(); | |
| 2854 | case 0x40: return ioport("BET3")->read(); | |
| 2855 | case 0x80: return ioport("BET4")->read(); | |
| 2856 | 2856 | } |
| 2857 | 2857 | |
| 2858 | 2858 | logerror("%06X: unknown read, select = %04x\n",cpu_get_pc(&space.device()), *m_inttoote_key_select); |
| r15082 | r15083 | |
| 2905 | 2905 | |
| 2906 | 2906 | switch( m_jockeyc_key_select ) |
| 2907 | 2907 | { |
| 2908 | case 0x08: return input_port_read(machine(), "BET0"); | |
| 2909 | case 0x10: return input_port_read(machine(), "BET1"); | |
| 2910 | case 0x20: return input_port_read(machine(), "BET2"); | |
| 2911 | case 0x40: return input_port_read(machine(), "BET3"); | |
| 2912 | case 0x80: return input_port_read(machine(), "BET4"); | |
| 2908 | case 0x08: return ioport("BET0")->read(); | |
| 2909 | case 0x10: return ioport("BET1")->read(); | |
| 2910 | case 0x20: return ioport("BET2")->read(); | |
| 2911 | case 0x40: return ioport("BET3")->read(); | |
| 2912 | case 0x80: return ioport("BET4")->read(); | |
| 2913 | 2913 | } |
| 2914 | 2914 | |
| 2915 | 2915 | return 0xffff; |
| r15082 | r15083 | |
| 3037 | 3037 | |
| 3038 | 3038 | READ8_MEMBER(seta_state::downtown_ip_r) |
| 3039 | 3039 | { |
| 3040 | int dir1 = input_port_read(machine(), "ROT1"); // analog port | |
| 3041 | int dir2 = input_port_read(machine(), "ROT2"); // analog port | |
| 3040 | int dir1 = ioport("ROT1")->read(); // analog port | |
| 3041 | int dir2 = ioport("ROT2")->read(); // analog port | |
| 3042 | 3042 | |
| 3043 | 3043 | dir1 = (~ (0x800 >> dir1)) & 0xfff; |
| 3044 | 3044 | dir2 = (~ (0x800 >> dir2)) & 0xfff; |
| 3045 | 3045 | |
| 3046 | 3046 | switch (offset) |
| 3047 | 3047 | { |
| 3048 | case 0: return (i | |
| 3048 | case 0: return (iop | |
| 3049 | 3049 | case 1: return (dir1 & 0xff); // lower 8 bits of p1 rotation |
| 3050 | case 2: return i | |
| 3050 | case 2: return iop | |
| 3051 | 3051 | case 3: return 0xff; // ? |
| 3052 | 3052 | case 4: return (dir2 >> 8); // upper 4 bits of p2 rotation + ? |
| 3053 | 3053 | case 5: return (dir2 & 0xff); // lower 8 bits of p2 rotation |
| 3054 | case 6: return i | |
| 3054 | case 6: return iop | |
| 3055 | 3055 | case 7: return 0xff; // ? |
| 3056 | 3056 | } |
| 3057 | 3057 | |
| r15082 | r15083 | |
| 3234 | 3234 | |
| 3235 | 3235 | PORT_START("DSW") // 2 DSWs - $600001 & 3.b |
| 3236 | 3236 | PORT_DIPNAME( 0x0001, 0x0001, "Licensed To" ) PORT_DIPLOCATION("SW1:1") /* Manual states "Don't Touch" */ |
| 3237 | PORT_DIPSETTING( 0x0000, "Taito" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 3238 | PORT_DIPSETTING( 0x0001, "Jordan" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 3239 | PORT_DIPSETTING( 0x0000, "Taito" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) | |
| 3240 | PORT_DIPSETTING( 0x0001, "Romstar" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) /* Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 3237 | PORT_DIPSETTING( 0x0000, "Taito" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 3238 | PORT_DIPSETTING( 0x0001, "Jordan" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 3239 | PORT_DIPSETTING( 0x0000, "Taito" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) | |
| 3240 | PORT_DIPSETTING( 0x0001, "Romstar" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) /* Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 3241 | 3241 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") |
| 3242 | 3242 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| 3243 | 3243 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 3246 | 3246 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 3247 | 3247 | PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) |
| 3248 | 3248 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 3249 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3250 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3251 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3252 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3253 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3254 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3255 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3256 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3249 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3250 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3251 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3252 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3253 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3254 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3255 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3256 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3257 | 3257 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 3258 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3259 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3260 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3261 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3262 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3263 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3264 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3265 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3258 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3259 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3260 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3261 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3262 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3263 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3264 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3265 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3266 | 3266 | PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 3267 | 3267 | PORT_DIPSETTING( 0x0300, DEF_STR( Easy ) ) |
| 3268 | 3268 | PORT_DIPSETTING( 0x0200, DEF_STR( Hard ) ) |
| r15082 | r15083 | |
| 3406 | 3406 | PORT_DIPSETTING( 0x0014, DEF_STR( 1C_3C ) ) |
| 3407 | 3407 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 3408 | 3408 | PORT_DIPNAME( 0x00e0, 0x00e0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:6,7,8") |
| 3409 | PORT_DIPSETTING( 0x0080, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3410 | PORT_DIPSETTING( 0x0040, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3411 | PORT_DIPSETTING( 0x0020, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3412 | PORT_DIPSETTING( 0x0060, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3413 | PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3414 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3415 | PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_EQUALS,0x0002) | |
| 3416 | PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3417 | PORT_DIPSETTING( 0x0060, DEF_STR( 2C_4C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3418 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3419 | PORT_DIPSETTING( 0x0080, "3 Coins/7 Credits" ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) /* Manuals states "2 Coin 7 Credit" */ | |
| 3420 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_5C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3421 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_6C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3422 | PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0002,PORTCOND_NOTEQUALS,0x0002) | |
| 3409 | PORT_DIPSETTING( 0x0080, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3410 | PORT_DIPSETTING( 0x0040, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3411 | PORT_DIPSETTING( 0x0020, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3412 | PORT_DIPSETTING( 0x0060, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3413 | PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3414 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3415 | PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0002,EQUALS,0x0002) | |
| 3416 | PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3417 | PORT_DIPSETTING( 0x0060, DEF_STR( 2C_4C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3418 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3419 | PORT_DIPSETTING( 0x0080, "3 Coins/7 Credits" ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) /* Manuals states "2 Coin 7 Credit" */ | |
| 3420 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_5C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3421 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_6C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3422 | PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0002,NOTEQUALS,0x0002) | |
| 3423 | 3423 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 3424 | 3424 | |
| 3425 | 3425 | |
| r15082 | r15083 | |
| 3535 | 3535 | |
| 3536 | 3536 | PORT_START("DSW") //2 DSWs - $600001 & 3.b |
| 3537 | 3537 | PORT_DIPNAME( 0x0001, 0x0001, "Copyright / License" ) PORT_DIPLOCATION("SW1:1") /* Romstar's Manual states "Don't Touch" */ |
| 3538 | PORT_DIPSETTING( 0x0000, "Seta (Japan only)" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 3539 | PORT_DIPSETTING( 0x0001, "Seta USA / Romstar" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 3540 | PORT_DIPSETTING( 0x0000, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) | |
| 3541 | PORT_DIPSETTING( 0x0001, "Seta USA / Taito America" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) /* Romstar's Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 3538 | PORT_DIPSETTING( 0x0000, "Seta (Japan only)" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 3539 | PORT_DIPSETTING( 0x0001, "Seta USA / Romstar" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 3540 | PORT_DIPSETTING( 0x0000, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) | |
| 3541 | PORT_DIPSETTING( 0x0001, "Seta USA / Taito America" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) /* Romstar's Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 3542 | 3542 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") |
| 3543 | 3543 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| 3544 | 3544 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 3547 | 3547 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 3548 | 3548 | PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) |
| 3549 | 3549 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 3550 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3551 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3552 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3553 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3554 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3555 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3556 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3557 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3550 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3551 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3552 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3553 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3554 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3555 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3556 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3557 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3558 | 3558 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 3559 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3560 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3561 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3562 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 3563 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3564 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3565 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3566 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 3559 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3560 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3561 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3562 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 3563 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3564 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3565 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3566 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 3567 | 3567 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 3568 | 3568 | PORT_DIPSETTING( 0x0300, DEF_STR( Easiest ) ) |
| 3569 | 3569 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) |
| r15082 | r15083 | |
| 3740 | 3740 | PORT_DIPSETTING( 0x0000, "1 of 8 Scenes" ) |
| 3741 | 3741 | PORT_SERVICE_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" ) |
| 3742 | 3742 | PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:5,6") |
| 3743 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3744 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3745 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3746 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3747 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3748 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3749 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3750 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3743 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3744 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3745 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3746 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3747 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3748 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3749 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3750 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3751 | 3751 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:7,8") |
| 3752 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3753 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3754 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3755 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_EQUALS,0x0010) | |
| 3756 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3757 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3758 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_4C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3759 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("COINS",0x0010,PORTCOND_NOTEQUALS,0x0010) | |
| 3752 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3753 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_1C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3754 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3755 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,EQUALS,0x0010) | |
| 3756 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_2C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3757 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3758 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_4C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3759 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("COINS",0x0010,NOTEQUALS,0x0010) | |
| 3760 | 3760 | |
| 3761 | 3761 | INPUT_PORTS_END |
| 3762 | 3762 | |
| r15082 | r15083 | |
| 4140 | 4140 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) |
| 4141 | 4141 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4142 | 4142 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 4143 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4144 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4145 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4146 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4147 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4148 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4149 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4150 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4143 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4144 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4145 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4146 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4147 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4148 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4149 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4150 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4151 | 4151 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 4152 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4153 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4154 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4155 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4156 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4157 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4158 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4159 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4152 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4153 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4154 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4155 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4156 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4157 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4158 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4159 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4160 | 4160 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 4161 | 4161 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) |
| 4162 | 4162 | PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) |
| r15082 | r15083 | |
| 4853 | 4853 | |
| 4854 | 4854 | PORT_START("DSW") //$600001 & 3.b |
| 4855 | 4855 | PORT_DIPNAME( 0x0001, 0x0001, "Copyright / License" ) PORT_DIPLOCATION("SW1:1") /* Romstar's Manual states "Don't Touch" */ |
| 4856 | PORT_DIPSETTING( 0x0000, "Seta USA / Taito America" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 4857 | PORT_DIPSETTING( 0x0001, "Seta / Jordan I.S." ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 4858 | PORT_DIPSETTING( 0x0000, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) | |
| 4859 | PORT_DIPSETTING( 0x0001, "Seta USA / Romstar" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) /* Romstar's Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 4856 | PORT_DIPSETTING( 0x0000, "Seta USA / Taito America" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 4857 | PORT_DIPSETTING( 0x0001, "Seta / Jordan I.S." ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 4858 | PORT_DIPSETTING( 0x0000, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) | |
| 4859 | PORT_DIPSETTING( 0x0001, "Seta USA / Romstar" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) /* Romstar's Manual shows DSW1-1=Off & DSW2-7=Off */ | |
| 4860 | 4860 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") |
| 4861 | 4861 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| 4862 | 4862 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 4865 | 4865 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 4866 | 4866 | PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) |
| 4867 | 4867 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 4868 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4869 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4870 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4871 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4872 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4873 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4874 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4875 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4868 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4869 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4870 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4871 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4872 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4873 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4874 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4875 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4876 | 4876 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 4877 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4878 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4879 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4880 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 4881 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4882 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4883 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4884 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 4877 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4878 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4879 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4880 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 4881 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4882 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4883 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4884 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 4885 | 4885 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 4886 | 4886 | PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) |
| 4887 | 4887 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) |
| r15082 | r15083 | |
| 5702 | 5702 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) |
| 5703 | 5703 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5704 | 5704 | PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 5705 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5706 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5707 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5708 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5709 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5710 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5711 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5712 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5705 | PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5706 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5707 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5708 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5709 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5710 | PORT_DIPSETTING( 0x1000, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5711 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5712 | PORT_DIPSETTING( 0x3000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5713 | 5713 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 5714 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5715 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5716 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5717 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_EQUALS,0x0080) | |
| 5718 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5719 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5720 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5721 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x0080,PORTCOND_NOTEQUALS,0x0080) | |
| 5714 | PORT_DIPSETTING( 0x4000, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5715 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5716 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5717 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,EQUALS,0x0080) | |
| 5718 | PORT_DIPSETTING( 0xc000, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5719 | PORT_DIPSETTING( 0x8000, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5720 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5721 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x0080,NOTEQUALS,0x0080) | |
| 5722 | 5722 | INPUT_PORTS_END |
| 5723 | 5723 | |
| 5724 | 5724 | |
| r15082 | r15083 | |
| 5775 | 5775 | |
| 5776 | 5776 | PORT_START("DSW") //2 DSWs - $600001 & 3.b |
| 5777 | 5777 | PORT_DIPNAME( 0x0001, 0x0001, "Copyright / License" ) PORT_DIPLOCATION("SW1:1") /* Always "Seta" if sim. players = 1 */ |
| 5778 | PORT_DIPSETTING( 0x0000, "Taito America / Romstar" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) | |
| 5779 | PORT_DIPSETTING( 0x0001, "Taito Corp Japan" ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x4000) /* "World" Copyright */ | |
| 5780 | PORT_DIPSETTING( 0x0000, "Taito America" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) | |
| 5781 | PORT_DIPSETTING( 0x0001, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x4000) /* Japan Only Notice */ | |
| 5778 | PORT_DIPSETTING( 0x0000, "Taito America / Romstar" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) | |
| 5779 | PORT_DIPSETTING( 0x0001, "Taito Corp Japan" ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x4000) /* "World" Copyright */ | |
| 5780 | PORT_DIPSETTING( 0x0000, "Taito America" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) | |
| 5781 | PORT_DIPSETTING( 0x0001, "Seta / Taito" ) PORT_CONDITION("DSW",0x4000,EQUALS,0x4000) /* Japan Only Notice */ | |
| 5782 | 5782 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") |
| 5783 | 5783 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| 5784 | 5784 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 5787 | 5787 | PORT_DIPSETTING( 0x0000, DEF_STR( Upright ) ) |
| 5788 | 5788 | PORT_DIPSETTING( 0x0008, DEF_STR( Cocktail ) ) |
| 5789 | 5789 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 5790 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5791 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5792 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5793 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5794 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5795 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5796 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5797 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5790 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5791 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5792 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5793 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5794 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5795 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5796 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5797 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5798 | 5798 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 5799 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5800 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5801 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5802 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 5803 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5804 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5805 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5806 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,PORTCOND_NOTEQUALS,0x8000) | |
| 5799 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5800 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5801 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5802 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 5803 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5804 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5805 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5806 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x8000,NOTEQUALS,0x8000) | |
| 5807 | 5807 | PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 5808 | 5808 | PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) |
| 5809 | 5809 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) |
| r15082 | r15083 | |
| 10646 | 10646 | |
| 10647 | 10647 | static DRIVER_INIT( crazyfgt ) |
| 10648 | 10648 | { |
| 10649 | //seta_state *state = machine.driver_data<seta_state>(); | |
| 10650 | UINT16 *RAM = (UINT16 *) machine.root_device().memregion("maincpu")->base(); | |
| 10649 | seta_state *state = machine.driver_data<seta_state>(); | |
| 10650 | UINT16 *RAM = (UINT16 *) state->memregion("maincpu")->base(); | |
| 10651 | 10651 | |
| 10652 | 10652 | // protection check at boot |
| 10653 | 10653 | RAM[0x1078/2] = 0x4e71; |
| 10654 | 10654 | |
| 10655 | 10655 | // fixed priorities? |
| 10656 | seta_state *state = machine.driver_data<seta_state>(); | |
| 10657 | 10656 | state->m_vregs.allocate(3); |
| 10658 | 10657 | |
| 10659 | 10658 | DRIVER_INIT_CALL(blandia); |
| r15082 | r15083 | |
| 10665 | 10664 | |
| 10666 | 10665 | static DRIVER_INIT( inttoote ) |
| 10667 | 10666 | { |
| 10668 | //seta_state *state = machine.driver_data<seta_state>(); | |
| 10669 | UINT16 *ROM = (UINT16 *)machine.root_device().memregion( "maincpu" )->base(); | |
| 10667 | seta_state *state = machine.driver_data<seta_state>(); | |
| 10668 | UINT16 *ROM = (UINT16 *)state->memregion( "maincpu" )->base(); | |
| 10670 | 10669 | |
| 10671 | 10670 | // missing / unused video regs |
| 10672 | seta_state *state = machine.driver_data<seta_state>(); | |
| 10673 | 10671 | state->m_vregs.allocate(3); |
| 10674 | 10672 | |
| 10675 | 10673 | // code patches (to be removed...) |
| r15082 | r15083 | |
|---|---|---|
| 395 | 395 | truco_state *state = device->machine().driver_data<truco_state>(); |
| 396 | 396 | /* coinup */ |
| 397 | 397 | |
| 398 | if ( | |
| 398 | if ( s | |
| 399 | 399 | { |
| 400 | 400 | if ( state->m_trigger == 0 ) |
| 401 | 401 | { |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | { |
| 78 | 78 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" }; |
| 79 | 79 | |
| 80 | return i | |
| 80 | return iop | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | WRITE8_MEMBER(laserbat_state::laserbat_cnteff_w) |
| r15082 | r15083 | |
| 283 | 283 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 284 | 284 | |
| 285 | 285 | PORT_START("SENSE") |
| 286 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 286 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 287 | 287 | INPUT_PORTS_END |
| 288 | 288 | |
| 289 | 289 | static INPUT_PORTS_START( lazarian ) |
| r15082 | r15083 | |
| 361 | 361 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 362 | 362 | |
| 363 | 363 | PORT_START("SENSE") |
| 364 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 364 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 365 | 365 | INPUT_PORTS_END |
| 366 | 366 | |
| 367 | 367 | static INPUT_PORTS_START( catnmous ) |
| r15082 | r15083 | |
| 444 | 444 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 445 | 445 | |
| 446 | 446 | PORT_START("SENSE") |
| 447 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 447 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 448 | 448 | INPUT_PORTS_END |
| 449 | 449 | |
| 450 | 450 | static const gfx_layout charlayout = |
| r15082 | r15083 | |
|---|---|---|
| 258 | 258 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 259 | 259 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 260 | 260 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 261 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 261 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 262 | 262 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 263 | 263 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 264 | 264 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 1726 | 1726 | |
| 1727 | 1727 | if (reg == 0x280/4) |
| 1728 | 1728 | { |
| 1729 | UINT32 coins = | |
| 1729 | UINT32 coins = | |
| 1730 | 1730 | |
| 1731 | 1731 | if (coins & 0x01) |
| 1732 | 1732 | { |
| r15082 | r15083 | |
|---|---|---|
| 422 | 422 | PORT_DIPSETTING ( 0x00, DEF_STR( Normal ) ) |
| 423 | 423 | PORT_DIPSETTING ( 0x20, "Special" ) |
| 424 | 424 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:7,8") |
| 425 | PORT_DIPSETTING ( 0xc0, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x20,PORTCOND_EQUALS,0x00) | |
| 426 | PORT_DIPSETTING ( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x20,PORTCOND_EQUALS,0x00) | |
| 427 | PORT_DIPSETTING ( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x20,PORTCOND_EQUALS,0x00) | |
| 428 | // PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x20,PORTCOND_EQUALS,0x00) | |
| 429 | PORT_DIPSETTING ( 0xc0, "Coin A 2/1 Coin B 2/1 Coin C 1/1" ) PORT_CONDITION("DSW1",0x20,PORTCOND_NOTEQUALS,0x00) | |
| 430 | PORT_DIPSETTING ( 0x80, "Coin A 1/1 Coin B 1/1 Coin C 1/2" ) PORT_CONDITION("DSW1",0x20,PORTCOND_NOTEQUALS,0x00) | |
| 431 | PORT_DIPSETTING ( 0x40, "Coin A 1/2 Coin B 1/2 Coin C 1/4" ) PORT_CONDITION("DSW1",0x20,PORTCOND_NOTEQUALS,0x00) | |
| 432 | // PORT_DIPSETTING ( 0x00, "Coin A 1/1 Coin B 1/1 Coin C 1/2" ) PORT_CONDITION("DSW1",0x20,PORTCOND_NOTEQUALS,0x00) | |
| 425 | PORT_DIPSETTING ( 0xc0, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x20,EQUALS,0x00) | |
| 426 | PORT_DIPSETTING ( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x20,EQUALS,0x00) | |
| 427 | PORT_DIPSETTING ( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x20,EQUALS,0x00) | |
| 428 | // PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x20,EQUALS,0x00) | |
| 429 | PORT_DIPSETTING ( 0xc0, "Coin A 2/1 Coin B 2/1 Coin C 1/1" ) PORT_CONDITION("DSW1",0x20,NOTEQUALS,0x00) | |
| 430 | PORT_DIPSETTING ( 0x80, "Coin A 1/1 Coin B 1/1 Coin C 1/2" ) PORT_CONDITION("DSW1",0x20,NOTEQUALS,0x00) | |
| 431 | PORT_DIPSETTING ( 0x40, "Coin A 1/2 Coin B 1/2 Coin C 1/4" ) PORT_CONDITION("DSW1",0x20,NOTEQUALS,0x00) | |
| 432 | // PORT_DIPSETTING ( 0x00, "Coin A 1/1 Coin B 1/1 Coin C 1/2" ) PORT_CONDITION("DSW1",0x20,NOTEQUALS,0x00) | |
| 433 | 433 | INPUT_PORTS_END |
| 434 | 434 | |
| 435 | 435 |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | |
| 59 | 59 | switch(offset) |
| 60 | 60 | { |
| 61 | case 0x01: res = input_port_read(machine(), "PORTA"); break; // P1 | |
| 62 | case 0x03: res = input_port_read(machine(), "PORTB"); break; // P2 | |
| 63 | case 0x05: res = input_port_read(machine(), "PORTC"); break; // SYSTEM | |
| 61 | case 0x01: res = ioport("PORTA")->read(); break; // P1 | |
| 62 | case 0x03: res = ioport("PORTB")->read(); break; // P2 | |
| 63 | case 0x05: res = ioport("PORTC")->read(); break; // SYSTEM | |
| 64 | 64 | case 0x07: res = m_system_output | 0xf0; break; // port D, read-backs value written |
| 65 | case 0x09: res = input_port_read(machine(), "PORTE"); break; // P3 | |
| 66 | case 0x0b: res = input_port_read(machine(), "PORTF"); break; // P4 | |
| 65 | case 0x09: res = ioport("PORTE")->read(); break; // P3 | |
| 66 | case 0x0b: res = ioport("PORTF")->read(); break; // P4 | |
| 67 | 67 | case 0x1b: res = 0; break; // Serial COM READ status |
| 68 | 68 | } |
| 69 | 69 | |
| r15082 | r15083 | |
| 101 | 101 | { |
| 102 | 102 | case 0x01: |
| 103 | 103 | case 0x03: |
| 104 | res = i | |
| 104 | res = iop | |
| 105 | 105 | res = BITSWAP8(res, 2, 3, 0, 1, 6, 7, 5, 4) & 0xf3; |
| 106 | res |= (i | |
| 106 | res |= (iop | |
| 107 | 107 | break; |
| 108 | 108 | default: res = stv_ioga_r(space,offset); break; |
| 109 | 109 | } |
| r15082 | r15083 | |
| 169 | 169 | for(i=0;i<5;i++) |
| 170 | 170 | { |
| 171 | 171 | if(m_mux_data & 1 << i) |
| 172 | res = i | |
| 172 | res = iop | |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | break; |
| r15082 | r15083 | |
|---|---|---|
| 222 | 222 | UINT8* game_region; |
| 223 | 223 | |
| 224 | 224 | sprintf(tempname, "game%d", param); |
| 225 | game_region = | |
| 225 | game_region = sta | |
| 226 | 226 | |
| 227 | 227 | memcpy(state->memregion("maincpu")->base(), game_region, 0x400000); |
| 228 | 228 |
| r15082 | r15083 | |
|---|---|---|
| 175 | 175 | READ8_MEMBER(champbwl_state::trackball_r) |
| 176 | 176 | { |
| 177 | 177 | UINT8 ret; |
| 178 | UINT8 port4 = input_port_read(machine(), "FAKEX"); | |
| 179 | UINT8 port5 = input_port_read(machine(), "FAKEY"); | |
| 178 | UINT8 port4 = ioport("FAKEX")->read(); | |
| 179 | UINT8 port5 = ioport("FAKEY")->read(); | |
| 180 | 180 | |
| 181 | 181 | ret = (((port4 - m_last_trackball_val[0]) & 0x0f)<<4) | ((port5 - m_last_trackball_val[1]) & 0x0f); |
| 182 | 182 |
| r15082 | r15083 | |
|---|---|---|
| 649 | 649 | CUSTOM_INPUT_MEMBER(vamphalf_state::boonggab_photo_sensors_r) |
| 650 | 650 | { |
| 651 | 651 | static const UINT16 photo_sensors_table[8] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; |
| 652 | UINT8 res = i | |
| 652 | UINT8 res = iop | |
| 653 | 653 | |
| 654 | 654 | switch(res) |
| 655 | 655 | { |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | READ8_MEMBER(poolshrk_state::poolshrk_input_r) |
| 73 | 73 | { |
| 74 | 74 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" }; |
| 75 | UINT8 val = i | |
| 75 | UINT8 val = iop | |
| 76 | 76 | |
| 77 | int x = input_port_read(machine(), (offset & 1) ? "AN1" : "AN0"); | |
| 78 | int y = input_port_read(machine(), (offset & 1) ? "AN3" : "AN2"); | |
| 77 | int x = ioport((offset & 1) ? "AN1" : "AN0")->read(); | |
| 78 | int y = ioport((offset & 1) ? "AN3" : "AN2")->read(); | |
| 79 | 79 | |
| 80 | 80 | if (x >= m_da_latch) val |= 8; |
| 81 | 81 | if (y >= m_da_latch) val |= 4; |
| r15082 | r15083 | |
|---|---|---|
| 124 | 124 | for (i = 0; i < 5; i++) |
| 125 | 125 | { |
| 126 | 126 | if (BIT(p, i)) |
| 127 | ret &= i | |
| 127 | ret &= iop | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return ret; |
| r15082 | r15083 | |
|---|---|---|
| 138 | 138 | PORT_DIPSETTING( 0x0001, "A" ) |
| 139 | 139 | PORT_DIPSETTING( 0x0000, "B" ) |
| 140 | 140 | /* Coin Mode A */ |
| 141 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0001, | |
| 141 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0001, | |
| 142 | 142 | PORT_DIPSETTING( 0x0014, DEF_STR( 6C_1C ) ) |
| 143 | 143 | PORT_DIPSETTING( 0x0016, DEF_STR( 5C_1C ) ) |
| 144 | 144 | PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 156 | 156 | PORT_DIPSETTING( 0x000a, DEF_STR( 1C_6C ) ) |
| 157 | 157 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 158 | 158 | /* Coin Mode B */ |
| 159 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0001, | |
| 159 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0001, | |
| 160 | 160 | PORT_DIPSETTING( 0x0000, "5C/1C or Free if Coin B too" ) |
| 161 | 161 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| 162 | 162 | PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) |
| 163 | 163 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_1C ) ) |
| 164 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0001, | |
| 164 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0001, | |
| 165 | 165 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) ) |
| 166 | 166 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) |
| 167 | 167 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | PORT_DIPSETTING( 0x0001, "Mode 1" ) \ |
| 175 | 175 | PORT_DIPSETTING( 0x0000, "Mode 2" ) \ |
| 176 | 176 | /* Coin Mode 1 */ \ |
| 177 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5") PORT_CONDITION("DSW",0x0001, | |
| 177 | PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5") PORT_CONDITION("DSW",0x0001, | |
| 178 | 178 | PORT_DIPSETTING( 0x0014, DEF_STR( 6C_1C ) ) \ |
| 179 | 179 | PORT_DIPSETTING( 0x0016, DEF_STR( 5C_1C ) ) \ |
| 180 | 180 | PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) ) \ |
| r15082 | r15083 | |
| 192 | 192 | PORT_DIPSETTING( 0x000a, DEF_STR( 1C_6C ) ) \ |
| 193 | 193 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) \ |
| 194 | 194 | /* Coin Mode 2 */ \ |
| 195 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3") PORT_CONDITION("DSW",0x0001, | |
| 195 | PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3") PORT_CONDITION("DSW",0x0001, | |
| 196 | 196 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) \ |
| 197 | 197 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) \ |
| 198 | 198 | PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) \ |
| 199 | 199 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_1C ) ) \ |
| 200 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5") PORT_CONDITION("DSW",0x0001, | |
| 200 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5") PORT_CONDITION("DSW",0x0001, | |
| 201 | 201 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) ) \ |
| 202 | 202 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) \ |
| 203 | 203 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) ) \ |
| r15082 | r15083 | |
|---|---|---|
| 234 | 234 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 235 | 235 | |
| 236 | 236 | PORT_START("SENSE") |
| 237 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 237 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 238 | 238 | INPUT_PORTS_END |
| 239 | 239 | |
| 240 | 240 |
| r15082 | r15083 | |
|---|---|---|
| 93 | 93 | READ32_MEMBER(vegaeo_state::vegaeo_custom_read) |
| 94 | 94 | { |
| 95 | 95 | eolith_speedup_read(&space); |
| 96 | return i | |
| 96 | return iop | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | static ADDRESS_MAP_START( vega_map, AS_PROGRAM, 32, vegaeo_state ) |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | |
| 59 | 59 | switch (m_portselect) |
| 60 | 60 | { |
| 61 | case 0x01: ret = input_port_read(machine(), "KEY0"); break; | |
| 62 | case 0x02: ret = input_port_read(machine(), "KEY1"); break; | |
| 63 | case 0x04: ret = input_port_read(machine(), "KEY2"); break; | |
| 64 | case 0x08: ret = input_port_read(machine(), "KEY3"); break; | |
| 61 | case 0x01: ret = ioport("KEY0")->read(); break; | |
| 62 | case 0x02: ret = ioport("KEY1")->read(); break; | |
| 63 | case 0x04: ret = ioport("KEY2")->read(); break; | |
| 64 | case 0x08: ret = ioport("KEY3")->read(); break; | |
| 65 | 65 | default: ret = 0xffff; |
| 66 | 66 | logerror("PC:%08X unknown %02X\n", cpu_get_pc(&space.device()), m_portselect); |
| 67 | 67 | break; |
| r15082 | r15083 | |
| 88 | 88 | WRITE16_MEMBER(fromanc2_state::fromanc2_eeprom_w) |
| 89 | 89 | { |
| 90 | 90 | if (ACCESSING_BITS_8_15) |
| 91 | i | |
| 91 | iop | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | WRITE16_MEMBER(fromanc2_state::fromancr_eeprom_w) |
| r15082 | r15083 | |
| 96 | 96 | if (ACCESSING_BITS_0_7) |
| 97 | 97 | { |
| 98 | 98 | fromancr_gfxbank_w(machine(), data & 0xfff8); |
| 99 | i | |
| 99 | iop | |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | WRITE16_MEMBER(fromanc2_state::fromanc4_eeprom_w) |
| 104 | 104 | { |
| 105 | 105 | if (ACCESSING_BITS_0_7) |
| 106 | i | |
| 106 | iop | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | WRITE16_MEMBER(fromanc2_state::fromanc2_subcpu_w) |
| r15082 | r15083 | |
| 524 | 524 | { |
| 525 | 525 | fromanc2_state *state = machine.driver_data<fromanc2_state>(); |
| 526 | 526 | |
| 527 | state->membank("bank1")->configure_entries(0, 4, machine.root_device().memregion("sub")->base(), 0x4000); | |
| 528 | state->membank("bank2")->configure_entry(0, machine.root_device().memregion("sub")->base() + 0x08000); | |
| 527 | state->membank("bank1")->configure_entries(0, 4, state->memregion("sub")->base(), 0x4000); | |
| 528 | state->membank("bank2")->configure_entry(0, state->memregion("sub")->base() + 0x08000); | |
| 529 | 529 | state->membank("bank2")->configure_entries(1, 3, state->memregion("sub")->base() + 0x14000, 0x4000); |
| 530 | 530 | |
| 531 | 531 | MACHINE_START_CALL(fromanc4); |
| r15082 | r15083 | |
|---|---|---|
| 397 | 397 | PORT_DIPSETTING( 0x20, "3 Cars, Medium" ) |
| 398 | 398 | PORT_DIPSETTING( 0x38, "3 Cars, Hard" ) |
| 399 | 399 | PORT_DIPNAME( 0x06, 0x02, DEF_STR( Bonus_Life ) ) |
| 400 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x00) | |
| 401 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x00) | |
| 402 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x00) | |
| 400 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x00) | |
| 401 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x00) | |
| 402 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x00) | |
| 403 | 403 | |
| 404 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x08) | |
| 405 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x08) | |
| 406 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x08) | |
| 404 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x08) | |
| 405 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x08) | |
| 406 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x08) | |
| 407 | 407 | |
| 408 | PORT_DIPSETTING( 0x02, "10000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x10) | |
| 409 | PORT_DIPSETTING( 0x04, "20000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x10) | |
| 410 | PORT_DIPSETTING( 0x06, "30000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x10) | |
| 408 | PORT_DIPSETTING( 0x02, "10000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x10) | |
| 409 | PORT_DIPSETTING( 0x04, "20000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x10) | |
| 410 | PORT_DIPSETTING( 0x06, "30000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x10) | |
| 411 | 411 | |
| 412 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x18) | |
| 413 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x18) | |
| 414 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x18) | |
| 412 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x18) | |
| 413 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x18) | |
| 414 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x18) | |
| 415 | 415 | |
| 416 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x20) | |
| 417 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x20) | |
| 418 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x20) | |
| 416 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x20) | |
| 417 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x20) | |
| 418 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x20) | |
| 419 | 419 | |
| 420 | PORT_DIPSETTING( 0x02, "10000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x28) | |
| 421 | PORT_DIPSETTING( 0x04, "20000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x28) | |
| 422 | PORT_DIPSETTING( 0x06, "30000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x28) | |
| 420 | PORT_DIPSETTING( 0x02, "10000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x28) | |
| 421 | PORT_DIPSETTING( 0x04, "20000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x28) | |
| 422 | PORT_DIPSETTING( 0x06, "30000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x28) | |
| 423 | 423 | |
| 424 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x30) | |
| 425 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x30) | |
| 426 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x30) | |
| 424 | PORT_DIPSETTING( 0x02, "15000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x30) | |
| 425 | PORT_DIPSETTING( 0x04, "30000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x30) | |
| 426 | PORT_DIPSETTING( 0x06, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x30) | |
| 427 | 427 | |
| 428 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x38) | |
| 429 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x38) | |
| 430 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, PORTCOND_EQUALS, 0x38) | |
| 428 | PORT_DIPSETTING( 0x02, "20000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x38) | |
| 429 | PORT_DIPSETTING( 0x04, "40000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x38) | |
| 430 | PORT_DIPSETTING( 0x06, "60000" ) PORT_CONDITION("DSW", 0x38, EQUALS, 0x38) | |
| 431 | 431 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 432 | 432 | PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) |
| 433 | 433 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | static const char *const portnames[] = { "TRACK0_Y", "TRACK0_X", "TRACK1_Y", "TRACK1_X" }; |
| 181 | 181 | |
| 182 | 182 | /* first read the new trackball value and compute the signed delta */ |
| 183 | newval = i | |
| 183 | newval = iop | |
| 184 | 184 | delta = (int)newval - (int)m_last_analog_input[offset]; |
| 185 | 185 | |
| 186 | 186 | /* handle the case where we wrap around from 0x00 to 0xff, or vice versa */ |
| r15082 | r15083 | |
| 390 | 390 | PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 391 | 391 | PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) |
| 392 | 392 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 393 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 393 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 394 | 394 | INPUT_PORTS_END |
| 395 | 395 | |
| 396 | 396 |
| r15082 | r15083 | |
|---|---|---|
| 1246 | 1246 | return 0xffffffff; |
| 1247 | 1247 | |
| 1248 | 1248 | case 0x0000: |
| 1249 | return i | |
| 1249 | return iop | |
| 1250 | 1250 | |
| 1251 | 1251 | case 0x0080: |
| 1252 | return i | |
| 1252 | return iop | |
| 1253 | 1253 | |
| 1254 | 1254 | case 0x2000: |
| 1255 | return i | |
| 1255 | return iop | |
| 1256 | 1256 | |
| 1257 | 1257 | case 0x2080: |
| 1258 | return i | |
| 1258 | return iop | |
| 1259 | 1259 | |
| 1260 | 1260 | } |
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | 1263 | READ32_MEMBER(bnstars_state::bnstars2_r) |
| 1264 | 1264 | { |
| 1265 | return i | |
| 1265 | return iop | |
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | 1268 | READ32_MEMBER(bnstars_state::bnstars3_r) |
| 1269 | 1269 | { |
| 1270 | return i | |
| 1270 | return iop | |
| 1271 | 1271 | } |
| 1272 | 1272 | |
| 1273 | 1273 | WRITE32_MEMBER(bnstars_state::bnstars1_mahjong_select_w) |
| r15082 | r15083 | |
|---|---|---|
| 150 | 150 | } |
| 151 | 151 | else |
| 152 | 152 | { |
| 153 | if (i | |
| 153 | if (state->iop | |
| 154 | 154 | color = vr_prom2[value]; |
| 155 | 155 | else |
| 156 | 156 | color = vr_prom1[value]; |
| r15082 | r15083 | |
|---|---|---|
| 53 | 53 | READ16_MEMBER(realbrk_state::realbrk_dsw_r) |
| 54 | 54 | { |
| 55 | 55 | UINT16 sel = ~m_dsw_select[0]; |
| 56 | if (sel & 0x01) return (input_port_read(machine(), "SW1") & 0x00ff) << 8; // DSW1 low bits | |
| 57 | if (sel & 0x02) return (input_port_read(machine(), "SW2") & 0x00ff) << 8; // DSW2 low bits | |
| 58 | if (sel & 0x04) return (input_port_read(machine(), "SW3") & 0x00ff) << 8; // DSW3 low bits | |
| 59 | if (sel & 0x08) return (input_port_read(machine(), "SW4") & 0x00ff) << 8; // DSW4 low bits | |
| 56 | if (sel & 0x01) return (ioport("SW1")->read() & 0x00ff) << 8; // DSW1 low bits | |
| 57 | if (sel & 0x02) return (ioport("SW2")->read() & 0x00ff) << 8; // DSW2 low bits | |
| 58 | if (sel & 0x04) return (ioport("SW3")->read() & 0x00ff) << 8; // DSW3 low bits | |
| 59 | if (sel & 0x08) return (ioport("SW4")->read() & 0x00ff) << 8; // DSW4 low bits | |
| 60 | 60 | |
| 61 | if (sel & 0x10) return ((input_port_read(machine(), "SW1") & 0x0300) << 0) | // DSWs high 2 bits | |
| 62 | ((input_port_read(machine(), "SW2") & 0x0300) << 2) | | |
| 63 | ((input_port_read(machine(), "SW3") & 0x0300) << 4) | | |
| 64 | ((input_port_read(machine(), "SW4") & 0x0300) << 6) ; | |
| 61 | if (sel & 0x10) return ((ioport("SW1")->read() & 0x0300) << 0) | // DSWs high 2 bits | |
| 62 | ((ioport("SW2")->read() & 0x0300) << 2) | | |
| 63 | ((ioport("SW3")->read() & 0x0300) << 4) | | |
| 64 | ((ioport("SW4")->read() & 0x0300) << 6) ; | |
| 65 | 65 | |
| 66 | 66 | logerror("CPU #0 PC %06X: read with unknown dsw_select = %02x\n",cpu_get_pc(&space.device()),m_dsw_select[0]); |
| 67 | 67 | return 0xffff; |
| r15082 | r15083 | |
| 73 | 73 | { |
| 74 | 74 | case 0x00/2: return 0xffff; |
| 75 | 75 | case 0x02/2: return 0xffff; |
| 76 | case 0x04/2: return input_port_read(machine(), "IN0"); /*Service buttons*/ | |
| 77 | case 0x06/2: return input_port_read(machine(), "SW1"); /*DIP 2*/ | |
| 78 | case 0x08/2: return input_port_read(machine(), "SW2"); /*DIP 1*/ | |
| 79 | case 0x0a/2: return input_port_read(machine(), "SW3"); /*DIP 1+2 Hi-Bits*/ | |
| 80 | case 0x0c/2: return input_port_read(machine(), "PADDLE1"); /*Handle 1p*/ | |
| 81 | case 0x0e/2: return input_port_read(machine(), "P1"); /*Buttons 1p*/ | |
| 82 | case 0x10/2: return input_port_read(machine(), "PADDLE2"); /*Handle 2p*/ | |
| 83 | case 0x12/2: return input_port_read(machine(), "P2"); /*Buttons 2p*/ | |
| 76 | case 0x04/2: return ioport("IN0")->read(); /*Service buttons*/ | |
| 77 | case 0x06/2: return ioport("SW1")->read(); /*DIP 2*/ | |
| 78 | case 0x08/2: return ioport("SW2")->read(); /*DIP 1*/ | |
| 79 | case 0x0a/2: return ioport("SW3")->read(); /*DIP 1+2 Hi-Bits*/ | |
| 80 | case 0x0c/2: return ioport("PADDLE1")->read(); /*Handle 1p*/ | |
| 81 | case 0x0e/2: return ioport("P1")->read(); /*Buttons 1p*/ | |
| 82 | case 0x10/2: return ioport("PADDLE2")->read(); /*Handle 2p*/ | |
| 83 | case 0x12/2: return ioport("P2")->read(); /*Buttons 2p*/ | |
| 84 | 84 | } |
| 85 | 85 | return 0xffff; |
| 86 | 86 | } |
| r15082 | r15083 | |
| 92 | 92 | switch(offset) |
| 93 | 93 | { |
| 94 | 94 | case 0x00/2: return 0xffff; |
| 95 | case 0x02/2: return i | |
| 95 | case 0x02/2: return iop | |
| 96 | 96 | /*DSW,same handling as realbrk*/ |
| 97 | 97 | case 0x04/2: |
| 98 | if (sel & 0x01) return (input_port_read(machine(), "SW1") & 0x00ff) << 8; // DSW1 low bits | |
| 99 | if (sel & 0x02) return (input_port_read(machine(), "SW2") & 0x00ff) << 8; // DSW2 low bits | |
| 100 | if (sel & 0x04) return (input_port_read(machine(), "SW3") & 0x00ff) << 8; // DSW3 low bits | |
| 101 | if (sel & 0x08) return (input_port_read(machine(), "SW4") & 0x00ff) << 8; // DSW4 low bits | |
| 98 | if (sel & 0x01) return (ioport("SW1")->read() & 0x00ff) << 8; // DSW1 low bits | |
| 99 | if (sel & 0x02) return (ioport("SW2")->read() & 0x00ff) << 8; // DSW2 low bits | |
| 100 | if (sel & 0x04) return (ioport("SW3")->read() & 0x00ff) << 8; // DSW3 low bits | |
| 101 | if (sel & 0x08) return (ioport("SW4")->read() & 0x00ff) << 8; // DSW4 low bits | |
| 102 | 102 | |
| 103 | if (sel & 0x10) return ((input_port_read(machine(), "SW1") & 0x0300) << 0) | // DSWs high 2 bits | |
| 104 | ((input_port_read(machine(), "SW2") & 0x0300) << 2) | | |
| 105 | ((input_port_read(machine(), "SW3") & 0x0300) << 4) | | |
| 106 | ((input_port_read(machine(), "SW4") & 0x0300) << 6) ; | |
| 103 | if (sel & 0x10) return ((ioport("SW1")->read() & 0x0300) << 0) | // DSWs high 2 bits | |
| 104 | ((ioport("SW2")->read() & 0x0300) << 2) | | |
| 105 | ((ioport("SW3")->read() & 0x0300) << 4) | | |
| 106 | ((ioport("SW4")->read() & 0x0300) << 6) ; | |
| 107 | 107 | |
| 108 | 108 | return 0xffff; |
| 109 | case 0x06/2: return input_port_read(machine(), "P2");/*Buttons+Handle 2p*/ | |
| 110 | case 0x08/2: return input_port_read(machine(), "P1");/*Buttons+Handle 1p*/ | |
| 109 | case 0x06/2: return ioport("P2")->read();/*Buttons+Handle 2p*/ | |
| 110 | case 0x08/2: return ioport("P1")->read();/*Buttons+Handle 1p*/ | |
| 111 | 111 | case 0x0a/2: return 0xffff; |
| 112 | 112 | case 0x0c/2: return 0xffff; |
| 113 | 113 | case 0x0e/2: return 0xffff; |
| r15082 | r15083 | |
|---|---|---|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | |
| 167 | READ16_MEMBER(vmetal_state::varia_dips_bit8_r){ return ((input_port_read(machine(), "DSW2") & 0x80) << 0) | ((input_port_read(machine(), "DSW1") & 0x80) >> 1); } | |
| 168 | READ16_MEMBER(vmetal_state::varia_dips_bit7_r){ return ((input_port_read(machine(), "DSW2") & 0x40) << 1) | ((input_port_read(machine(), "DSW1") & 0x40) >> 0); } | |
| 169 | READ16_MEMBER(vmetal_state::varia_dips_bit6_r){ return ((input_port_read(machine(), "DSW2") & 0x20) << 2) | ((input_port_read(machine(), "DSW1") & 0x20) << 1); } | |
| 170 | READ16_MEMBER(vmetal_state::varia_dips_bit5_r){ return ((input_port_read(machine(), "DSW2") & 0x10) << 3) | ((input_port_read(machine(), "DSW1") & 0x10) << 2); } | |
| 171 | READ16_MEMBER(vmetal_state::varia_dips_bit4_r){ return ((input_port_read(machine(), "DSW2") & 0x08) << 4) | ((input_port_read(machine(), "DSW1") & 0x08) << 3); } | |
| 172 | READ16_MEMBER(vmetal_state::varia_dips_bit3_r){ return ((input_port_read(machine(), "DSW2") & 0x04) << 5) | ((input_port_read(machine(), "DSW1") & 0x04) << 4); } | |
| 173 | READ16_MEMBER(vmetal_state::varia_dips_bit2_r){ return ((input_port_read(machine(), "DSW2") & 0x02) << 6) | ((input_port_read(machine(), "DSW1") & 0x02) << 5); } | |
| 174 | READ16_MEMBER(vmetal_state::varia_dips_bit1_r){ return ((input_port_read(machine(), "DSW2") & 0x01) << 7) | ((input_port_read(machine(), "DSW1") & 0x01) << 6); } | |
| 167 | READ16_MEMBER(vmetal_state::varia_dips_bit8_r){ return ((ioport("DSW2")->read() & 0x80) << 0) | ((ioport("DSW1")->read() & 0x80) >> 1); } | |
| 168 | READ16_MEMBER(vmetal_state::varia_dips_bit7_r){ return ((ioport("DSW2")->read() & 0x40) << 1) | ((ioport("DSW1")->read() & 0x40) >> 0); } | |
| 169 | READ16_MEMBER(vmetal_state::varia_dips_bit6_r){ return ((ioport("DSW2")->read() & 0x20) << 2) | ((ioport("DSW1")->read() & 0x20) << 1); } | |
| 170 | READ16_MEMBER(vmetal_state::varia_dips_bit5_r){ return ((ioport("DSW2")->read() & 0x10) << 3) | ((ioport("DSW1")->read() & 0x10) << 2); } | |
| 171 | READ16_MEMBER(vmetal_state::varia_dips_bit4_r){ return ((ioport("DSW2")->read() & 0x08) << 4) | ((ioport("DSW1")->read() & 0x08) << 3); } | |
| 172 | READ16_MEMBER(vmetal_state::varia_dips_bit3_r){ return ((ioport("DSW2")->read() & 0x04) << 5) | ((ioport("DSW1")->read() & 0x04) << 4); } | |
| 173 | READ16_MEMBER(vmetal_state::varia_dips_bit2_r){ return ((ioport("DSW2")->read() & 0x02) << 6) | ((ioport("DSW1")->read() & 0x02) << 5); } | |
| 174 | READ16_MEMBER(vmetal_state::varia_dips_bit1_r){ return ((ioport("DSW2")->read() & 0x01) << 7) | ((ioport("DSW1")->read() & 0x01) << 6); } | |
| 175 | 175 | |
| 176 | 176 | static WRITE8_DEVICE_HANDLER( vmetal_control_w ) |
| 177 | 177 | { |
| r15082 | r15083 | |
| 423 | 423 | static void expand_gfx1(running_machine &machine) |
| 424 | 424 | { |
| 425 | 425 | metro_state *state = machine.driver_data<metro_state>(); |
| 426 | UINT8 *base_gfx = | |
| 426 | UINT8 *base_gfx = sta | |
| 427 | 427 | UINT32 length = 2 * state->memregion("gfx1")->bytes(); |
| 428 | 428 | state->m_expanded_gfx1 = auto_alloc_array(machine, UINT8, length); |
| 429 | 429 | for (int i = 0; i < length; i += 2) |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | switch (offset) |
| 110 | 110 | { |
| 111 | 111 | case 0x00: |
| 112 | return i | |
| 112 | return iop | |
| 113 | 113 | |
| 114 | 114 | case 0x01: |
| 115 | 115 | return m_coin_word<<16; |
| r15082 | r15083 | |
| 169 | 169 | |
| 170 | 170 | READ32_MEMBER(superchs_state::superchs_stick_r) |
| 171 | 171 | { |
| 172 | int fake = i | |
| 172 | int fake = iop | |
| 173 | 173 | int accel; |
| 174 | 174 | |
| 175 | 175 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 176 | 176 | { |
| 177 | m_steer = i | |
| 177 | m_steer = iop | |
| 178 | 178 | } |
| 179 | 179 | else /* Digital steer, with smoothing - speed depends on how often stick_r is called */ |
| 180 | 180 | { |
| r15082 | r15083 | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /* Accelerator is an analogue input but the game treats it as digital (on/off) */ |
| 202 | if (i | |
| 202 | if (iop | |
| 203 | 203 | accel = 0x0; |
| 204 | 204 | else |
| 205 | 205 | accel = 0xff; |
| 206 | 206 | |
| 207 | 207 | /* Todo: Verify brake - and figure out other input */ |
| 208 | return (m_steer << 24) | (accel << 16) | (i | |
| 208 | return (m_steer << 24) | (accel << 16) | (iop | |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | WRITE32_MEMBER(superchs_state::superchs_stick_w) |
| r15082 | r15083 | |
|---|---|---|
| 51 | 51 | { |
| 52 | 52 | switch (m_control_port_select) |
| 53 | 53 | { |
| 54 | case 0xfe: return input_port_read(machine(), "IN0"); /* Player 1 */ | |
| 55 | case 0xfd: return input_port_read(machine(), "IN1"); /* Player 2 */ | |
| 56 | case 0xfb: return input_port_read(machine(), "IN2"); /* Coins */ | |
| 57 | case 0xf7: return input_port_read(machine(), "DSW2"); /* Dip 2 */ | |
| 58 | case 0xef: return input_port_read(machine(), "DSW1"); /* Dip 1 */ | |
| 54 | case 0xfe: return ioport("IN0")->read(); /* Player 1 */ | |
| 55 | case 0xfd: return ioport("IN1")->read(); /* Player 2 */ | |
| 56 | case 0xfb: return ioport("IN2")->read(); /* Coins */ | |
| 57 | case 0xf7: return ioport("DSW2")->read(); /* Dip 2 */ | |
| 58 | case 0xef: return ioport("DSW1")->read(); /* Dip 1 */ | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 369 | 369 | |
| 370 | 370 | READ8_MEMBER(namcos1_state::dsw_r) |
| 371 | 371 | { |
| 372 | int ret = i | |
| 372 | int ret = iop | |
| 373 | 373 | if (!(offset & 2)) ret >>= 4; |
| 374 | 374 | return 0xf0 | ret; |
| 375 | 375 | } |
| r15082 | r15083 | |
|---|---|---|
| 898 | 898 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN2\0GLIN2") |
| 899 | 899 | |
| 900 | 900 | PORT_START("GMIN0") /* Ghost Muncher - IN0 */ |
| 901 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 902 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 903 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 904 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 905 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 906 | PORT_DIPNAME( 0x20, 0x00, "Ghost Muncher - Cabinet" ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 901 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 902 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 903 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 904 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 905 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 906 | PORT_DIPNAME( 0x20, 0x00, "Ghost Muncher - Cabinet" ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 907 | 907 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 908 | 908 | PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) ) |
| 909 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 910 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 909 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 910 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 911 | 911 | |
| 912 | 912 | PORT_START("GMIN1") /* Ghost Muncher - IN1 */ |
| 913 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 914 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 915 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 916 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 917 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 918 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 919 | PORT_DIPNAME( 0xc0, 0x40, "Ghost Muncher - Bonus Life" ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 913 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 914 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 915 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 916 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 917 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 918 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 919 | PORT_DIPNAME( 0xc0, 0x40, "Ghost Muncher - Bonus Life" ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01) | |
| 920 | 920 | PORT_DIPSETTING( 0x40, "10000" ) |
| 921 | 921 | PORT_DIPSETTING( 0x80, "15000" ) |
| 922 | 922 | PORT_DIPSETTING( 0xc0, "20000" ) |
| 923 | 923 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 924 | 924 | |
| 925 | 925 | PORT_START("GMIN2") /* Ghost Muncher - IN2 */ |
| 926 | PORT_DIPNAME( 0x03, 0x02, "Ghost Muncher - Coinage" ) PORT_CONDITION("GAMESEL",0x01, | |
| 926 | PORT_DIPNAME( 0x03, 0x02, "Ghost Muncher - Coinage" ) PORT_CONDITION("GAMESEL",0x01, | |
| 927 | 927 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) |
| 928 | 928 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) |
| 929 | 929 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 930 | 930 | PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) |
| 931 | PORT_DIPNAME( 0x0c, 0x04, "Ghost Muncher - Lives" ) PORT_CONDITION("GAMESEL",0x01, | |
| 931 | PORT_DIPNAME( 0x0c, 0x04, "Ghost Muncher - Lives" ) PORT_CONDITION("GAMESEL",0x01, | |
| 932 | 932 | PORT_DIPSETTING( 0x0c, "1" ) |
| 933 | 933 | PORT_DIPSETTING( 0x08, "2" ) |
| 934 | 934 | PORT_DIPSETTING( 0x04, "3" ) |
| r15082 | r15083 | |
| 936 | 936 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 937 | 937 | |
| 938 | 938 | PORT_START("GLIN0") /* Galaxian - IN0 */ |
| 939 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 940 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 941 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 942 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 943 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 944 | PORT_DIPNAME( 0x20, 0x00, "Galaxian - Cabinet" ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 939 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 940 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 941 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 942 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 943 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 944 | PORT_DIPNAME( 0x20, 0x00, "Galaxian - Cabinet" ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 945 | 945 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 946 | 946 | PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) ) |
| 947 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 948 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 947 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 948 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 949 | 949 | |
| 950 | 950 | PORT_START("GLIN1") /* Galaxian - IN1 */ |
| 951 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 952 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 953 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 954 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 955 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 956 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 957 | PORT_DIPNAME( 0xc0, 0x00, "Galaxian - Coinage" ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_EQUALS,0x01) | |
| 951 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 952 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 953 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 954 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 955 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 956 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 957 | PORT_DIPNAME( 0xc0, 0x00, "Galaxian - Coinage" ) PORT_CONDITION("GAMESEL",0x01,EQUALS,0x01) | |
| 958 | 958 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) |
| 959 | 959 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 960 | 960 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 961 | 961 | PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) |
| 962 | 962 | |
| 963 | 963 | PORT_START("GLIN2") /* Galaxian - IN2 */ |
| 964 | PORT_DIPNAME( 0x03, 0x01, "Galaxian - Bonus Life" ) PORT_CONDITION("GAMESEL",0x01, | |
| 964 | PORT_DIPNAME( 0x03, 0x01, "Galaxian - Bonus Life" ) PORT_CONDITION("GAMESEL",0x01, | |
| 965 | 965 | PORT_DIPSETTING( 0x01, "4000" ) |
| 966 | 966 | PORT_DIPSETTING( 0x02, "5000" ) |
| 967 | 967 | PORT_DIPSETTING( 0x03, "7000" ) |
| 968 | 968 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 969 | PORT_DIPNAME( 0x04, 0x00, "Galaxian - Lives" ) PORT_CONDITION("GAMESEL",0x01, | |
| 969 | PORT_DIPNAME( 0x04, 0x00, "Galaxian - Lives" ) PORT_CONDITION("GAMESEL",0x01, | |
| 970 | 970 | PORT_DIPSETTING( 0x00, "3" ) |
| 971 | 971 | PORT_DIPSETTING( 0x04, "5" ) |
| 972 | 972 | PORT_DIPUNUSED( 0x08, 0x00 ) |
| r15082 | r15083 | |
| 2489 | 2489 | // see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic |
| 2490 | 2490 | // I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature |
| 2491 | 2491 | |
| 2492 | signed char dialread = i | |
| 2492 | signed char dialread = iop | |
| 2493 | 2493 | |
| 2494 | 2494 | UINT8 ret; |
| 2495 | 2495 | |
| r15082 | r15083 | |
| 2521 | 2521 | PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) /* see notes */ |
| 2522 | 2522 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| 2523 | 2523 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) |
| 2524 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: p2 thrust | |
| 2525 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: p1&p2 hyperflip | |
| 2524 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("IN2", 0x08, EQUALS, 0x08) // cocktail: p2 thrust | |
| 2525 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CONDITION("IN2", 0x08, EQUALS, 0x00) // upright: p1&p2 hyperflip | |
| 2526 | 2526 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) // both: p1(upright: &p2) shield |
| 2527 | 2527 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // both: p1(upright: &p2) thrust |
| 2528 | 2528 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // both: p1(upright: &p2) fire |
| r15082 | r15083 | |
| 2543 | 2543 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2544 | 2544 | |
| 2545 | 2545 | PORT_START("P1_DIAL") |
| 2546 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_REVERSE PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: dial is reversed | |
| 2547 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: dial works normally | |
| 2546 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_REVERSE PORT_RESET PORT_CONDITION("IN2", 0x08, EQUALS, 0x08) // cocktail: dial is reversed | |
| 2547 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_CONDITION("IN2", 0x08, EQUALS, 0x00) // upright: dial works normally | |
| 2548 | 2548 | |
| 2549 | 2549 | PORT_START("P2_DIAL") |
| 2550 | 2550 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_COCKTAIL PORT_REVERSE // cocktail: dial is reversed |
| r15082 | r15083 | |
| 4203 | 4203 | ROM_LOAD( "mmi6331.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) /* Compatible with 82s123 prom */ |
| 4204 | 4204 | ROM_END |
| 4205 | 4205 | |
| 4206 | ROM_START( mooncrstuku ) | |
| 4207 | ROM_REGION( 0x8000, "maincpu", 0 ) | |
| 4208 | ROM_LOAD( "smc1f", 0x0000, 0x0800, CRC(389ca0d6) SHA1(51cf6d190a0ebf23b70c2bcf1ccaa4705e29cd09) ) | |
| 4209 | ROM_LOAD( "smc2f", 0x0800, 0x0800, CRC(410ab430) SHA1(d89abff6ac4afbf69377a1d63043d629a634aab7) ) | |
| 4210 | ROM_LOAD( "smc3f", 0x1000, 0x0800, CRC(a6b4144b) SHA1(2b27ad54d716286c0dc9476d47df182ae01bcfd7) ) | |
| 4211 | ROM_LOAD( "smc4f", 0x1800, 0x0800, CRC(4cc046fe) SHA1(465eaacd50967d768babadd09ab9cad35380f6bf) ) | |
| 4212 | ROM_LOAD( "smc5f", 0x2000, 0x0800, CRC(06d378a6) SHA1(99dbe9fc7f95f8fdce86eb5c32bd1ca1bea0ca3c) ) | |
| 4213 | ROM_LOAD( "smc6f", 0x2800, 0x0800, CRC(6e84a927) SHA1(82e8e825d157c3c947a3a222bca059a735169c7d) ) | |
| 4214 | ROM_LOAD( "smc7f", 0x3000, 0x0800, CRC(b45af1e8) SHA1(d7020774707234acdaef5c655f667d5ee9e54a13) ) | |
| 4215 | ROM_LOAD( "smc8f_uk", 0x3800, 0x0800, CRC(b968b2ff) SHA1(40105423f48d2260e85597c3c1e4d8fe947db793) ) | |
| 4216 | ||
| 4217 | ROM_REGION( 0x2000, "gfx1", 0 ) | |
| 4218 | ROM_LOAD( "mcs_b", 0x0000, 0x0800, CRC(fb0f1f81) SHA1(38a6679a8b69bc1870a0e67e692131c42f9535c8) ) | |
| 4219 | ROM_LOAD( "mcs_d", 0x0800, 0x0800, CRC(13932a15) SHA1(b8885c555c6ad7021be55c6925a0a0872c1b6abd) ) | |
| 4220 | ROM_LOAD( "mcs_a", 0x1000, 0x0800, CRC(631ebb5a) SHA1(5bc9493afa76c55858b8c8849524cbc77dc838fc) ) | |
| 4221 | ROM_LOAD( "mcs_c", 0x1800, 0x0800, CRC(24cfd145) SHA1(08c6599db170dd6ee364c44f70a0f5c0f881b6ef) ) | |
| 4222 | ||
| 4223 | ROM_REGION( 0x0020, "proms", 0 ) | |
| 4224 | ROM_LOAD( "mmi6331.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) /* Compatible with 82s123 prom */ | |
| 4225 | ROM_END | |
| 4226 | ||
| 4206 | 4227 | ROM_START( mooncrstu ) |
| 4207 | 4228 | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 4208 | 4229 | ROM_LOAD( "smc1f", 0x0000, 0x0800, CRC(389ca0d6) SHA1(51cf6d190a0ebf23b70c2bcf1ccaa4705e29cd09) ) |
| r15082 | r15083 | |
| 6421 | 6442 | *************************************/ |
| 6422 | 6443 | |
| 6423 | 6444 | /* based on Galaxian, but with altered address map for more ROM */ |
| 6424 | GAME( 1980, mooncrst, 0, mooncrst, mooncrst, mooncrst, ROT90, "Nichibutsu", "Moon Cresta (Nichibutsu)", GAME_SUPPORTS_SAVE ) | |
| 6425 | GAME( 1980, mooncrstuk,mooncrst, mooncrst, mooncrst, mooncrst, ROT90, "Nichibutsu UK", "Moon Cresta (Nichibutsu UK)", GAME_SUPPORTS_SAVE ) | |
| 6426 | GAME( 1980, mooncrstu, mooncrst, mooncrst, mooncrst, mooncrsu, ROT90, "Nichibutsu USA", "Moon Cresta (Nichibutsu USA, unencrypted)", GAME_SUPPORTS_SAVE ) | |
| 6427 | GAME( 1980, mooncrsto, mooncrst, mooncrst, mooncrsa, mooncrst, ROT90, "Nichibutsu", "Moon Cresta (Nichibutsu, old rev)", GAME_SUPPORTS_SAVE ) | |
| 6428 | GAME( 1980, mooncrstg, mooncrst, mooncrst, mooncrsg, mooncrsu, ROT90, "Nichibutsu (Gremlin license)", "Moon Cresta (Gremlin)", GAME_SUPPORTS_SAVE ) | |
| 6445 | GAME( 1980, mooncrst, 0, mooncrst, mooncrst, mooncrst, ROT90, "Nichibutsu", "Moon Cresta (Nichibutsu)", GAME_SUPPORTS_SAVE ) | |
| 6446 | GAME( 1980, mooncrstuk, mooncrst, mooncrst, mooncrst, mooncrst, ROT90, "Nichibutsu UK", "Moon Cresta (Nichibutsu UK)", GAME_SUPPORTS_SAVE ) | |
| 6447 | GAME( 1980, mooncrstuku,mooncrst, mooncrst, mooncrst, mooncrsu, ROT90, "Nichibutsu UK", "Moon Cresta (Nichibutsu UK, unencrypted)", GAME_SUPPORTS_SAVE ) | |
| 6448 | GAME( 1980, mooncrstu, mooncrst, mooncrst, mooncrst, mooncrsu, ROT90, "Nichibutsu USA", "Moon Cresta (Nichibutsu USA, unencrypted)", GAME_SUPPORTS_SAVE ) | |
| 6449 | GAME( 1980, mooncrsto, mooncrst, mooncrst, mooncrsa, mooncrst, ROT90, "Nichibutsu", "Moon Cresta (Nichibutsu, old rev)", GAME_SUPPORTS_SAVE ) | |
| 6450 | GAME( 1980, mooncrstg, mooncrst, mooncrst, mooncrsg, mooncrsu, ROT90, "Nichibutsu (Gremlin license)", "Moon Cresta (Gremlin)", GAME_SUPPORTS_SAVE ) | |
| 6429 | 6451 | |
| 6430 | 6452 | /* straight Moon Cresta ripoffs on basic mooncrst hardware */ |
| 6431 | 6453 | GAME( 1980, mooncrsb, mooncrst, mooncrst, mooncrsa, mooncrsu, ROT90, "bootleg", "Moon Cresta (bootleg set 1)", GAME_SUPPORTS_SAVE ) |
| r15082 | r15083 | |
|---|---|---|
| 498 | 498 | break; |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | state->m_rambase[0x004] = input_port_read(timer.machine(), "IN2"); | |
| 502 | state->m_rambase[0x005] = input_port_read(timer.machine(), "IN1"); | |
| 503 | state->m_rambase[0x006] = input_port_read(timer.machine(), "IN0"); | |
| 501 | state->m_rambase[0x004] = timer.machine().root_device().ioport("IN2")->read(); | |
| 502 | state->m_rambase[0x005] = timer.machine().root_device().ioport("IN1")->read(); | |
| 503 | state->m_rambase[0x006] = timer.machine().root_device().ioport("IN0")->read(); | |
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | static MACHINE_CONFIG_DERIVED( yamyam, gundealr ) |
| r15082 | r15083 | |
|---|---|---|
| 381 | 381 | { |
| 382 | 382 | if( m_control_num == 0 ) |
| 383 | 383 | { |
| 384 | return i | |
| 384 | return iop | |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | return i | |
| 387 | return iop | |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | WRITE8_MEMBER(firefox_state::adc_select_w) |
| r15082 | r15083 | |
| 579 | 579 | PORT_START("rdin1") |
| 580 | 580 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, NULL) |
| 581 | 581 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, NULL) |
| 582 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 582 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 583 | 583 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 584 | 584 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 585 | 585 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r15082 | r15083 | |
|---|---|---|
| 89 | 89 | if (ACCESSING_BITS_0_7) |
| 90 | 90 | { |
| 91 | 91 | m_oki2->set_bank_base(0x40000 * (data & 0x7)); |
| 92 | i | |
| 92 | iop | |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| r15082 | r15083 | |
| 189 | 189 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 190 | 190 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 191 | 191 | PORT_SERVICE_NO_TOGGLE( 0x00080000, IP_ACTIVE_LOW ) |
| 192 | PORT_BIT( 0x00100000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 192 | PORT_BIT( 0x00100000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 193 | 193 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 194 | 194 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 195 | 195 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 231 | 231 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 232 | 232 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 233 | 233 | PORT_SERVICE_NO_TOGGLE( 0x00080000, IP_ACTIVE_LOW ) |
| 234 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 234 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 235 | 235 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 236 | 236 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 237 | 237 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 1290 | 1290 | UINT8 *src, *dst; |
| 1291 | 1291 | |
| 1292 | 1292 | /* expand gfx roms */ |
| 1293 | src = | |
| 1293 | src = sta | |
| 1294 | 1294 | dst = state->memregion("gfx2")->base(); |
| 1295 | 1295 | |
| 1296 | 1296 | for (i = 0; i < 0x4000; i++) |
| r15082 | r15083 | |
|---|---|---|
| 717 | 717 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* attack right */ |
| 718 | 718 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* attack right */ |
| 719 | 719 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, renegade_state,mcu_status_r, NULL) |
| 720 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 720 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 721 | 721 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 722 | 722 | |
| 723 | 723 | PORT_START("DSW1") /* DIP1 */ |
| r15082 | r15083 | |
|---|---|---|
| 42 | 42 | #include "machine/nvram.h" |
| 43 | 43 | |
| 44 | 44 | |
| 45 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 46 | #if SIGNED_DAC | |
| 47 | #define DAC_WRITE dac_signed_w | |
| 48 | #else | |
| 49 | #define DAC_WRITE dac_w | |
| 50 | #endif | |
| 51 | ||
| 52 | ||
| 53 | 45 | static DRIVER_INIT( mjsikaku ) |
| 54 | 46 | { |
| 55 | 47 | nb1413m3_type = NB1413M3_MJSIKAKU; |
| r15082 | r15083 | |
| 316 | 308 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 317 | 309 | AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) |
| 318 | 310 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 319 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 311 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 320 | 312 | AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) |
| 321 | 313 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 322 | 314 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 341 | 333 | AM_RANGE(0xb0, 0xb0) AM_READ_LEGACY(nb1413m3_inputport2_r) AM_WRITE(barline_output_w) |
| 342 | 334 | AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) |
| 343 | 335 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 344 | // AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 336 | // AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 345 | 337 | AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) |
| 346 | 338 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) |
| 347 | 339 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 359 | 351 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 360 | 352 | AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) |
| 361 | 353 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 362 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 354 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 363 | 355 | AM_RANGE(0xe0, 0xe0) AM_WRITE(crystalg_romsel_w) |
| 364 | 356 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 365 | 357 | // AM_RANGE(0xf0, 0xf0) AM_WRITENOP |
| r15082 | r15083 | |
| 379 | 371 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 380 | 372 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 381 | 373 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 382 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 374 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 383 | 375 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 384 | 376 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) |
| 385 | 377 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 399 | 391 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 400 | 392 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 401 | 393 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 402 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 394 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 403 | 395 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 404 | 396 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) |
| 405 | 397 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 420 | 412 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 421 | 413 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 422 | 414 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 423 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 415 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 424 | 416 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 425 | 417 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 426 | 418 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 442 | 434 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 443 | 435 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 444 | 436 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 445 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 437 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 446 | 438 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 447 | 439 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 448 | 440 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 462 | 454 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 463 | 455 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 464 | 456 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 465 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 457 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 466 | 458 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 467 | 459 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 468 | 460 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 487 | 479 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 488 | 480 | AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) |
| 489 | 481 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 490 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 482 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 491 | 483 | AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) |
| 492 | 484 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 493 | 485 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 508 | 500 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 509 | 501 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 510 | 502 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 511 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 503 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 512 | 504 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 513 | 505 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 514 | 506 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 530 | 522 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 531 | 523 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 532 | 524 | AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? |
| 533 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 525 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 534 | 526 | AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) |
| 535 | 527 | // AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 536 | 528 | // AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 1345 | 1337 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1346 | 1338 | INPUT_PORTS_END |
| 1347 | 1339 | |
| 1348 | ||
| 1349 | 1340 | static INPUT_PORTS_START( citylove ) |
| 1350 | 1341 | PORT_START("DSWA") |
| 1351 | 1342 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Difficulty ) ) |
| r15082 | r15083 | |
| 2915 | 2906 | }; |
| 2916 | 2907 | |
| 2917 | 2908 | |
| 2918 | ||
| 2919 | 2909 | static MACHINE_CONFIG_START( NBMJDRV_4096, nbmj8688_state ) |
| 2920 | 2910 | |
| 2921 | 2911 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2946 | 2936 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) |
| 2947 | 2937 | |
| 2948 | 2938 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 2949 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 2939 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 2950 | 2940 | MACHINE_CONFIG_END |
| 2951 | 2941 | |
| 2952 | ||
| 2953 | 2942 | static MACHINE_CONFIG_DERIVED( NBMJDRV_256, NBMJDRV_4096 ) |
| 2954 | 2943 | |
| 2955 | 2944 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2961 | 2950 | MCFG_VIDEO_START(mbmj8688_8bit) |
| 2962 | 2951 | MACHINE_CONFIG_END |
| 2963 | 2952 | |
| 2964 | ||
| 2965 | 2953 | static MACHINE_CONFIG_DERIVED( NBMJDRV_65536, NBMJDRV_4096 ) |
| 2966 | 2954 | |
| 2967 | 2955 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2974 | 2962 | MCFG_VIDEO_START(mbmj8688_hybrid_16bit) |
| 2975 | 2963 | MACHINE_CONFIG_END |
| 2976 | 2964 | |
| 2977 | ||
| 2978 | 2965 | // -------------------------------------------------------------------------------- |
| 2979 | 2966 | |
| 2980 | 2967 | static MACHINE_CONFIG_DERIVED( crystalg, NBMJDRV_256 ) |
| r15082 | r15083 | |
| 2985 | 2972 | MCFG_CPU_IO_MAP(crystalg_io_map) |
| 2986 | 2973 | MACHINE_CONFIG_END |
| 2987 | 2974 | |
| 2988 | ||
| 2989 | 2975 | static MACHINE_CONFIG_DERIVED( apparel, NBMJDRV_256 ) |
| 2990 | 2976 | |
| 2991 | 2977 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 2994 | 2980 | MCFG_CPU_IO_MAP(secolove_io_map) |
| 2995 | 2981 | MACHINE_CONFIG_END |
| 2996 | 2982 | |
| 2997 | ||
| 2998 | 2983 | static MACHINE_CONFIG_DERIVED( mbmj_h12bit, NBMJDRV_4096 ) |
| 2999 | 2984 | |
| 3000 | 2985 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3014 | 2999 | MCFG_CPU_IO_MAP(barline_io_map) |
| 3015 | 3000 | |
| 3016 | 3001 | MCFG_SOUND_REPLACE("psg", YM3812, 20000000/8) |
| 3017 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0. | |
| 3002 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) | |
| 3018 | 3003 | |
| 3019 | 3004 | MCFG_DEVICE_REMOVE("dac") |
| 3020 | 3005 | MACHINE_CONFIG_END |
| r15082 | r15083 | |
| 3030 | 3015 | MCFG_VIDEO_START(mbmj8688_pure_16bit) |
| 3031 | 3016 | MACHINE_CONFIG_END |
| 3032 | 3017 | |
| 3033 | ||
| 3034 | 3018 | static MACHINE_CONFIG_START( mbmj_p16bit_LCD, nbmj8688_state ) |
| 3035 | 3019 | |
| 3036 | 3020 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3079 | 3063 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35) |
| 3080 | 3064 | |
| 3081 | 3065 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 3082 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 3066 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 3083 | 3067 | MACHINE_CONFIG_END |
| 3084 | 3068 | |
| 3085 | ||
| 3086 | 3069 | static MACHINE_CONFIG_DERIVED( seiha, NBMJDRV_65536 ) |
| 3087 | 3070 | |
| 3088 | 3071 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3108 | 3091 | MCFG_CPU_IO_MAP(iemoto_io_map) |
| 3109 | 3092 | MACHINE_CONFIG_END |
| 3110 | 3093 | |
| 3111 | ||
| 3112 | 3094 | static MACHINE_CONFIG_DERIVED( ojousan, NBMJDRV_65536 ) |
| 3113 | 3095 | |
| 3114 | 3096 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3125 | 3107 | MCFG_CPU_IO_MAP(kaguya_io_map) |
| 3126 | 3108 | MACHINE_CONFIG_END |
| 3127 | 3109 | |
| 3128 | ||
| 3129 | 3110 | static MACHINE_CONFIG_DERIVED( mjsikaku, NBMJDRV_4096 ) |
| 3130 | 3111 | |
| 3131 | 3112 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3138 | 3119 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) |
| 3139 | 3120 | MACHINE_CONFIG_END |
| 3140 | 3121 | |
| 3141 | ||
| 3142 | 3122 | static MACHINE_CONFIG_DERIVED( mmsikaku, NBMJDRV_4096 ) |
| 3143 | 3123 | |
| 3144 | 3124 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3147 | 3127 | MCFG_CPU_IO_MAP(mmsikaku_io_map) |
| 3148 | 3128 | MACHINE_CONFIG_END |
| 3149 | 3129 | |
| 3150 | ||
| 3151 | 3130 | static MACHINE_CONFIG_DERIVED( otonano, mjsikaku ) |
| 3152 | 3131 | |
| 3153 | 3132 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 3156 | 3135 | MACHINE_CONFIG_END |
| 3157 | 3136 | |
| 3158 | 3137 | |
| 3159 | ||
| 3160 | ||
| 3161 | 3138 | ROM_START( crystalg ) |
| 3162 | 3139 | ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ |
| 3163 | 3140 | ROM_LOAD( "mbs1.3c", 0x00000, 0x04000, CRC(1cacdbbd) SHA1(672e67b761ef1723ec2445f13881a435dbbdf53f) ) |
| r15082 | r15083 | |
| 3454 | 3431 | |
| 3455 | 3432 | /*TODO: check if the w labeled roms are correctly mapped.*/ |
| 3456 | 3433 | ROM_REGION( 0x400000, "gfx1", 0 ) /* gfx */ |
| 3457 | ROM_LOAD( "se1507.6a",0x000000, 0x80000, CRC(f1e9555e) SHA1(a34ffcff2b2d6ba40a8a453b89970d636515a8ad) ) | |
| 3434 | ROM_LOAD( "se1507.6a",0x000000, 0x80000, CRC(f1e9555e) SHA1(a34ffcff2b2d6ba40a8a453b89970d636515a8ad) ) // seiha/se1507.6a | |
| 3458 | 3435 | ROM_LOAD( "w19.1a", 0x080000, 0x40000, CRC(788cd3ca) SHA1(955a520e122aaee30e080d0a784556b69ba3de36) ) |
| 3459 | 3436 | ROM_LOAD( "w20.2a", 0x0c0000, 0x40000, CRC(a3175a8f) SHA1(8214fdefa1186dd96bc55a30b64a24a486750f05) ) |
| 3460 | 3437 | ROM_LOAD( "w21.3a", 0x100000, 0x40000, CRC(da46163e) SHA1(c6e5f59fe813915f94d81ff28526614c943b7082) ) |
| 3461 | ROM_LOAD( "6.2a", 0x180000, 0x10000, CRC(9fefe2ca) SHA1(7b638a739640e9d311ee15c0e7b4f3f2dfdd3589) ) // seiha/seiha06.8a | |
| 3462 | ROM_LOAD( "7.3a", 0x190000, 0x10000, CRC(a7d438ec) SHA1(5d145bab0ffc76fd77582ea5495ca4496210d41a) ) // seiha/seiha07.9a | |
| 3438 | ROM_LOAD( "6.2a", 0x180000, 0x10000, CRC(9fefe2ca) SHA1(7b638a739640e9d311ee15c0e7b4f3f2dfdd3589) ) // seiha/seiha06.8a | |
| 3439 | ROM_LOAD( "7.3a", 0x190000, 0x10000, CRC(a7d438ec) SHA1(5d145bab0ffc76fd77582ea5495ca4496210d41a) ) // seiha/seiha07.9a | |
| 3463 | 3440 | ROM_LOAD( "8.4a", 0x1a0000, 0x10000, CRC(e8e61e48) SHA1(e1d0e64b39bad3e294b061fb6f02ece2f2ee4bca) ) |
| 3464 | ROM_LOAD( "9.2b", 0x1b0000, 0x10000, CRC(541f6e9f) SHA1(946a9c9cc8e6985098af4dd035f80ecc50e800ec) ) | |
| 3441 | ROM_LOAD( "9.2b", 0x1b0000, 0x10000, CRC(541f6e9f) SHA1(946a9c9cc8e6985098af4dd035f80ecc50e800ec) ) | |
| 3465 | 3442 | ROM_LOAD( "10.3b", 0x1c0000, 0x10000, CRC(a4144f78) SHA1(316ebe91aa604f1d4a0f1942df9d87de487c977a) ) |
| 3466 | 3443 | ROM_LOAD( "w22.4a", 0x200000, 0x40000, CRC(ea2b78b3) SHA1(38ec10a29f32cbb6b270fa10ade815cf3e0a54c2) ) |
| 3467 | 3444 | ROM_LOAD( "w23.5a", 0x240000, 0x40000, CRC(0263ff75) SHA1(16a18dfaf732ab94dec70fd8e955d6179525115c) ) |
| r15082 | r15083 | |
| 4035 | 4012 | ROM_LOAD( "16061.k7", 0x000, 0x104, CRC(d25ccac8) SHA1(cfad5a4cd9609ac2461314d77a5e0cecd326c63b) ) |
| 4036 | 4013 | ROM_END |
| 4037 | 4014 | |
| 4015 | ||
| 4038 | 4016 | /* 8-bit palette */ |
| 4039 | 4017 | GAME( 1986, crystalg, 0, crystalg, crystalg, crystalg, ROT0, "Nichibutsu", "Crystal Gal (Japan 860512)", 0 ) |
| 4040 | 4018 | GAME( 1986, crystal2, 0, crystalg, crystal2, crystal2, ROT0, "Nichibutsu", "Crystal Gal 2 (Japan 860620)", 0 ) |
| r15082 | r15083 | |
| 4085 | 4063 | GAME( 1988, mmsikaku, mjsikaku, mmsikaku, mmsikaku, mmsikaku, ROT0, "Nichibutsu", "Mahjong Shikaku [BET] (Japan 880929)", 0 ) |
| 4086 | 4064 | GAME( 1988, otonano, 0, otonano, otonano, otonano, ROT0, "Apple", "Otona no Mahjong (Japan 880628)", 0 ) |
| 4087 | 4065 | GAME( 1988, mjcamera, 0, otonano, mjcamera, mjcamera, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 1) (Japan 881109)", 0 ) |
| 4088 | ||
| 4089 | ||
| 4090 | /* | |
| 4091 | ||
| 4092 | iemotom outcoin check | |
| 4093 | ojousanm outcoin check | |
| 4094 | ryuuha outcoin check | |
| 4095 | ||
| 4096 | */ |
| r15082 | r15083 | |
|---|---|---|
| 289 | 289 | PORT_DIPNAME( 0x40, 0x40, "Monitor" ) //a JP probably |
| 290 | 290 | PORT_DIPSETTING( 0x40, "15KHz" ) |
| 291 | 291 | PORT_DIPSETTING( 0x00, "24KHz" ) |
| 292 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 292 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 293 | 293 | |
| 294 | 294 | PORT_START("IN0") |
| 295 | 295 | PORT_DIPNAME( 0x01, 0x01, "IN0" ) |
| r15082 | r15083 | |
|---|---|---|
| 188 | 188 | switch( port ) |
| 189 | 189 | { |
| 190 | 190 | case 0x08: /* trackball y coords bottom 8 bits for 2nd player */ |
| 191 | return i | |
| 191 | return iop | |
| 192 | 192 | |
| 193 | 193 | case 0x09: /* trackball y coords top 8 bits for 2nd player */ |
| 194 | if (i | |
| 194 | if (iop | |
| 195 | 195 | return 0xff; |
| 196 | 196 | else /* y+ direction (positive value) */ |
| 197 | 197 | return 0x00; |
| 198 | 198 | |
| 199 | 199 | case 0x0a: /* trackball x coords bottom 8 bits for 2nd player */ |
| 200 | return i | |
| 200 | return iop | |
| 201 | 201 | |
| 202 | 202 | case 0x0b: /* trackball x coords top 8 bits for 2nd player */ |
| 203 | if (i | |
| 203 | if (iop | |
| 204 | 204 | return 0xff; |
| 205 | 205 | else /* x+ direction (positive value) */ |
| 206 | 206 | return 0x00; |
| 207 | 207 | |
| 208 | 208 | case 0x0c: /* trackball y coords bottom 8 bits for 1st player */ |
| 209 | return i | |
| 209 | return iop | |
| 210 | 210 | |
| 211 | 211 | case 0x0d: /* trackball y coords top 8 bits for 1st player */ |
| 212 | if (i | |
| 212 | if (iop | |
| 213 | 213 | return 0xff; |
| 214 | 214 | else /* y+ direction (positive value) */ |
| 215 | 215 | return 0x00; |
| 216 | 216 | |
| 217 | 217 | case 0x0e: /* trackball x coords bottom 8 bits for 1st player */ |
| 218 | return i | |
| 218 | return iop | |
| 219 | 219 | |
| 220 | 220 | case 0x0f: /* trackball x coords top 8 bits for 1st player */ |
| 221 | if (i | |
| 221 | if (iop | |
| 222 | 222 | return 0xff; |
| 223 | 223 | else /* x+ direction (positive value) */ |
| 224 | 224 | return 0x00; |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | tail2nos_state *state = machine.driver_data<tail2nos_state>(); |
| 228 | 228 | |
| 229 | 229 | /* point to the extra ROMs */ |
| 230 | state->membank("bank1")->set_base( | |
| 230 | state->membank("bank1")->set_base(sta | |
| 231 | 231 | state->membank("bank2")->set_base(state->memregion("user2")->base()); |
| 232 | 232 | |
| 233 | 233 | state->m_charbank = 0; |
| r15082 | r15083 | |
|---|---|---|
| 114 | 114 | |
| 115 | 115 | READ8_MEMBER(m79amb_state::gray5bit_controller0_r) |
| 116 | 116 | { |
| 117 | UINT8 port_data = input_port_read(machine(), "8004"); | |
| 118 | UINT8 gun_pos = input_port_read(machine(), "GUN1"); | |
| 117 | UINT8 port_data = ioport("8004")->read(); | |
| 118 | UINT8 gun_pos = ioport("GUN1")->read(); | |
| 119 | 119 | |
| 120 | 120 | return (port_data & 0xe0) | m_lut_gun1[gun_pos]; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | READ8_MEMBER(m79amb_state::gray5bit_controller1_r) |
| 124 | 124 | { |
| 125 | UINT8 port_data = input_port_read(machine(), "8005"); | |
| 126 | UINT8 gun_pos = input_port_read(machine(), "GUN2"); | |
| 125 | UINT8 port_data = ioport("8005")->read(); | |
| 126 | UINT8 gun_pos = ioport("GUN2")->read(); | |
| 127 | 127 | |
| 128 | 128 | return (port_data & 0xe0) | m_lut_gun2[gun_pos]; |
| 129 | 129 | } |
| r15082 | r15083 | |
| 171 | 171 | PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play )) |
| 172 | 172 | |
| 173 | 173 | PORT_START("8002") |
| 174 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 174 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 175 | 175 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 176 | 176 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 177 | 177 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) |
| r15082 | r15083 | |
|---|---|---|
| 194 | 194 | switch (offset) |
| 195 | 195 | { |
| 196 | 196 | case 0x03: |
| 197 | return ((input_port_read(machine(), "SYSTEM") & 0xef) | | |
| 198 | (input_port_read(machine(), "SERVICE") & 0x10)) << 8; /* IN3 + service switch */ | |
| 197 | return ((ioport("SYSTEM")->read() & 0xef) | | |
| 198 | (ioport("SERVICE")->read() & 0x10)) << 8; /* IN3 + service switch */ | |
| 199 | 199 | |
| 200 | 200 | default: |
| 201 | 201 | return tc0640fio_r(m_tc0640fio, offset) << 8; |
| r15082 | r15083 | |
| 207 | 207 | { |
| 208 | 208 | static const char *const adcnames[] = { "GUN1X", "GUN1Y", "GUN2X", "GUN2Y" }; |
| 209 | 209 | |
| 210 | return i | |
| 210 | return iop | |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | WRITE16_MEMBER(slapshot_state::opwolf3_adc_req_w) |
| r15082 | r15083 | |
|---|---|---|
| 1016 | 1016 | state->m_ram = auto_alloc_array(machine, UINT8, 0x8000 ); |
| 1017 | 1017 | machine.device<nvram_device>("nvram")->set_base(state->m_ram, 0x8000); |
| 1018 | 1018 | memset(state->m_ram, 0x00, 0x8000); |
| 1019 | state->membank("bank1")->configure_entries(0, 128, | |
| 1019 | state->membank("bank1")->configure_entries(0, 128, sta | |
| 1020 | 1020 | state->membank("bank2")->configure_entries(0, 128, state->memregion("maincpu")->base(), 0x8000); |
| 1021 | 1021 | state->membank("bank3")->configure_entries(0, 4, state->m_ram, 0x2000); |
| 1022 | 1022 | state->m_bank = 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 44 | 44 | |
| 45 | 45 | switch(offset) |
| 46 | 46 | { |
| 47 | case 0x04/4: return input_port_read(machine(), "DSW1") & 0xff; | |
| 48 | case 0x08/4: return input_port_read(machine(), "DSW2") & 0xff; | |
| 49 | case 0x10/4: return input_port_read(machine(), "SYSTEM") & 0xff; | |
| 50 | case 0x14/4: return input_port_read(machine(), "P2") & 0xff; | |
| 51 | case 0x18/4: return input_port_read(machine(), "P1") & 0xff; | |
| 47 | case 0x04/4: return ioport("DSW1")->read() & 0xff; | |
| 48 | case 0x08/4: return ioport("DSW2")->read() & 0xff; | |
| 49 | case 0x10/4: return ioport("SYSTEM")->read() & 0xff; | |
| 50 | case 0x14/4: return ioport("P2")->read() & 0xff; | |
| 51 | case 0x18/4: return ioport("P1")->read() & 0xff; | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | return 0; |
| r15082 | r15083 | |
| 167 | 167 | PORT_DIPSETTING( 0x01, "Manual" ) |
| 168 | 168 | PORT_DIPSETTING( 0x00, "Automatic" ) |
| 169 | 169 | PORT_DIPNAME( 0x1A, 0x00, "Setting 2" ) PORT_DIPLOCATION("DSW2:3,4,5") |
| 170 | PORT_DIPSETTING( 0x00, "Extremely Easy - 2:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 171 | PORT_DIPSETTING( 0x02, "Very Easy - 1:30") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 172 | PORT_DIPSETTING( 0x08, "Easy - 2:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 173 | PORT_DIPSETTING( 0x0A, "Normal 1 - 1:30") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 174 | PORT_DIPSETTING( 0x10, "Normal 2 - 1:45") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 175 | PORT_DIPSETTING( 0x12, "Difficult - 2:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 176 | PORT_DIPSETTING( 0x18, "Very Difficult - 2:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 177 | PORT_DIPSETTING( 0x1A, "Extremely Difficult - 1:30") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x00) | |
| 178 | PORT_DIPSETTING( 0x00, "Clear 20% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 179 | PORT_DIPSETTING( 0x02, "Clear 30% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 180 | PORT_DIPSETTING( 0x08, "Clear 40% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 181 | PORT_DIPSETTING( 0x0A, "Clear 50% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 182 | PORT_DIPSETTING( 0x10, "Clear 60% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 183 | PORT_DIPSETTING( 0x12, "Clear 70% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 184 | PORT_DIPSETTING( 0x18, "Clear 80% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 185 | PORT_DIPSETTING( 0x1A, "Clear 90% - 1:00") PORT_CONDITION("DSW2", 0x01, PORTCOND_EQUALS, 0x01) | |
| 170 | PORT_DIPSETTING( 0x00, "Extremely Easy - 2:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 171 | PORT_DIPSETTING( 0x02, "Very Easy - 1:30") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 172 | PORT_DIPSETTING( 0x08, "Easy - 2:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 173 | PORT_DIPSETTING( 0x0A, "Normal 1 - 1:30") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 174 | PORT_DIPSETTING( 0x10, "Normal 2 - 1:45") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 175 | PORT_DIPSETTING( 0x12, "Difficult - 2:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 176 | PORT_DIPSETTING( 0x18, "Very Difficult - 2:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 177 | PORT_DIPSETTING( 0x1A, "Extremely Difficult - 1:30") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) | |
| 178 | PORT_DIPSETTING( 0x00, "Clear 20% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 179 | PORT_DIPSETTING( 0x02, "Clear 30% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 180 | PORT_DIPSETTING( 0x08, "Clear 40% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 181 | PORT_DIPSETTING( 0x0A, "Clear 50% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 182 | PORT_DIPSETTING( 0x10, "Clear 60% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 183 | PORT_DIPSETTING( 0x12, "Clear 70% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 184 | PORT_DIPSETTING( 0x18, "Clear 80% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 185 | PORT_DIPSETTING( 0x1A, "Clear 90% - 1:00") PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) | |
| 186 | 186 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSW2:1" ) |
| 187 | 187 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSW2:6" ) |
| 188 | 188 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 687 | 687 | |
| 688 | 688 | READ16_MEMBER(atarisy4_state::analog_r) |
| 689 | 689 | { |
| 690 | return (i | |
| 690 | return (iop | |
| 691 | 691 | } |
| 692 | 692 | |
| 693 | 693 | static INPUT_PORTS_START( atarisy4 ) |
| r15082 | r15083 | |
| 969 | 969 | state->m_shared_ram[0] = auto_alloc_array_clear(machine, UINT16, 0x2000); |
| 970 | 970 | |
| 971 | 971 | /* Populate the 68000 address space with data from the HEX files */ |
| 972 | load_hexfile(main, machine.root_device().memregion("code")->base()); | |
| 973 | load_hexfile(main, machine.root_device().memregion("data")->base()); | |
| 972 | load_hexfile(main, state->memregion("code")->base()); | |
| 973 | load_hexfile(main, state->memregion("data")->base()); | |
| 974 | 974 | |
| 975 | 975 | /* Set up the DSP */ |
| 976 | 976 | state->membank("dsp0_bank0")->set_base(state->m_shared_ram[0]); |
| r15082 | r15083 | |
| 986 | 986 | state->m_shared_ram[1] = auto_alloc_array_clear(machine, UINT16, 0x4000); |
| 987 | 987 | |
| 988 | 988 | /* Populate RAM with data from the HEX files */ |
| 989 | load_hexfile(machine.device("maincpu")->memory().space(AS_PROGRAM), | |
| 989 | load_hexfile(machine.device("maincpu")->memory().space(AS_PROGRAM), sta | |
| 990 | 990 | |
| 991 | 991 | /* Set up the first DSP */ |
| 992 | 992 | state->membank("dsp0_bank0")->set_base(state->m_shared_ram[0]); |
| 993 | 993 | state->membank("dsp0_bank1")->set_base(&state->m_shared_ram[0][0x800]); |
| 994 | load_ldafile(machine.device("dsp0")->memory().space(AS_PROGRAM), | |
| 994 | load_ldafile(machine.device("dsp0")->memory().space(AS_PROGRAM), sta | |
| 995 | 995 | |
| 996 | 996 | /* Set up the second DSP */ |
| 997 | 997 | state->membank("dsp1_bank0")->set_base(state->m_shared_ram[1]); |
| r15082 | r15083 | |
|---|---|---|
| 131 | 131 | switch (offset << 1) |
| 132 | 132 | { |
| 133 | 133 | case 0x41a: /* Player 1 & 2 input ports */ |
| 134 | return i | |
| 134 | return iop | |
| 135 | 135 | case 0x320: /* Coins */ |
| 136 | return i | |
| 136 | return iop | |
| 137 | 137 | case 0x4e6: /* Dip switches */ |
| 138 | return i | |
| 138 | return iop | |
| 139 | 139 | case 0x504: /* PC: 6b6. b4, 2c, 36 written before read */ |
| 140 | 140 | logerror("Protection PC %06x: warning - read unmapped memory address %04x\n", cpu_get_pc(&space.device()), offset); |
| 141 | 141 | return 0x84; |
| r15082 | r15083 | |
| 386 | 386 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 387 | 387 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 388 | 388 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 389 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 389 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 390 | 390 | |
| 391 | 391 | PORT_START("DSW") |
| 392 | 392 | DATAEAST_COINAGE |
| r15082 | r15083 | |
| 440 | 440 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 441 | 441 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 442 | 442 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 443 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 443 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 444 | 444 | |
| 445 | 445 | PORT_START("DSW") /* Dip switch bank 1 */ |
| 446 | 446 | |
| r15082 | r15083 | |
| 509 | 509 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 510 | 510 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 511 | 511 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 512 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 512 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 513 | 513 | |
| 514 | 514 | PORT_START("DSW") /* Dip switch bank 1 */ |
| 515 | 515 | |
| r15082 | r15083 | |
| 577 | 577 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 578 | 578 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 579 | 579 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 580 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 580 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 581 | 581 | |
| 582 | 582 | PORT_START("DSW") /* Dip switch bank 1 */ |
| 583 | 583 |
| r15082 | r15083 | |
|---|---|---|
| 291 | 291 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 292 | 292 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 293 | 293 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) |
| 294 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 294 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* "V-BLANKING" in "test mode" */ | |
| 295 | 295 | |
| 296 | 296 | PORT_START("DSWA") |
| 297 | 297 | TOAPLAN_MACHINE_COCKTAIL_LOC(SW1) |
| r15082 | r15083 | |
|---|---|---|
| 798 | 798 | if (m_ctrld) /* trackball */ |
| 799 | 799 | { |
| 800 | 800 | if (!m_flipscreen) |
| 801 | | |
| 801 | | |
| 802 | 802 | else |
| 803 | | |
| 803 | | |
| 804 | 804 | } |
| 805 | 805 | else /* buttons */ |
| 806 | result = i | |
| 806 | result = iop | |
| 807 | 807 | } |
| 808 | 808 | |
| 809 | 809 | /* IN1 */ |
| 810 | 810 | else if (offset < 0x4a00) |
| 811 | result = i | |
| 811 | result = iop | |
| 812 | 812 | |
| 813 | 813 | /* IN2 */ |
| 814 | 814 | else if (offset < 0x4b00) |
| 815 | result = i | |
| 815 | result = iop | |
| 816 | 816 | |
| 817 | 817 | /* anything else */ |
| 818 | 818 | else |
| r15082 | r15083 | |
|---|---|---|
| 136 | 136 | PORT_DIPSETTING( 0x0100, "7" ) |
| 137 | 137 | PORT_DIPSETTING( 0x0000, "8" ) |
| 138 | 138 | PORT_DIPNAME( 0x1800, 0x1800, "M1 value" ) PORT_DIPLOCATION("SW-2:4,5") |
| 139 | PORT_DIPSETTING( 0x0800, "3000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 140 | PORT_DIPSETTING( 0x0000, "3500" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 141 | PORT_DIPSETTING( 0x1800, "4000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 142 | PORT_DIPSETTING( 0x1000, "4500" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 143 | PORT_DIPSETTING( 0x0800, "6000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_NOTEQUALS, 0x0000) | |
| 144 | PORT_DIPSETTING( 0x0000, "7000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_NOTEQUALS, 0x0000) | |
| 145 | PORT_DIPSETTING( 0x1800, "8000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_NOTEQUALS, 0x0000) | |
| 146 | PORT_DIPSETTING( 0x1000, "9000" ) PORT_CONDITION("DSW", 0x0003, PORTCOND_NOTEQUALS, 0x0000) | |
| 139 | PORT_DIPSETTING( 0x0800, "3000" ) PORT_CONDITION("DSW", 0x0003, EQUALS, 0x0000) | |
| 140 | PORT_DIPSETTING( 0x0000, "3500" ) PORT_CONDITION("DSW", 0x0003, EQUALS, 0x0000) | |
| 141 | PORT_DIPSETTING( 0x1800, "4000" ) PORT_CONDITION("DSW", 0x0003, EQUALS, 0x0000) | |
| 142 | PORT_DIPSETTING( 0x1000, "4500" ) PORT_CONDITION("DSW", 0x0003, EQUALS, 0x0000) | |
| 143 | PORT_DIPSETTING( 0x0800, "6000" ) PORT_CONDITION("DSW", 0x0003, NOTEQUALS, 0x0000) | |
| 144 | PORT_DIPSETTING( 0x0000, "7000" ) PORT_CONDITION("DSW", 0x0003, NOTEQUALS, 0x0000) | |
| 145 | PORT_DIPSETTING( 0x1800, "8000" ) PORT_CONDITION("DSW", 0x0003, NOTEQUALS, 0x0000) | |
| 146 | PORT_DIPSETTING( 0x1000, "9000" ) PORT_CONDITION("DSW", 0x0003, NOTEQUALS, 0x0000) | |
| 147 | 147 | PORT_DIPUNKNOWN_DIPLOC( 0x2000, IP_ACTIVE_LOW, "SW-2:6" ) |
| 148 | 148 | PORT_DIPNAME( 0xc000, 0xc000, "Difficult-2" ) PORT_DIPLOCATION("SW-2:7,8") |
| 149 | 149 | PORT_DIPSETTING( 0xc000, "1" ) |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | { |
| 83 | 83 | UINT8 ret = 0; |
| 84 | 84 | |
| 85 | if ((i | |
| 85 | if ((iop | |
| 86 | 86 | ret = 1; |
| 87 | 87 | |
| 88 | 88 | return ret; |
| r15082 | r15083 | |
| 682 | 682 | PORT_DIPSETTING( 0x02, "Horizontal" ) |
| 683 | 683 | PORT_DIPSETTING( 0x00, "Vertical" ) |
| 684 | 684 | PORT_DIPNAME( 0x05, 0x05, "Gaming Option Number" ) PORT_DIPLOCATION("SW1:!1,!3") |
| 685 | PORT_DIPSETTING( 0x01, "2" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_EQUALS, 0x20) | |
| 686 | PORT_DIPSETTING( 0x05, "3" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_EQUALS, 0x20) | |
| 687 | PORT_DIPSETTING( 0x00, "4" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_EQUALS, 0x20) | |
| 688 | PORT_DIPSETTING( 0x04, "5" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_EQUALS, 0x20) | |
| 689 | PORT_DIPSETTING( 0x01, "4" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 690 | PORT_DIPSETTING( 0x05, "5" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 691 | PORT_DIPSETTING( 0x00, "6" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 692 | PORT_DIPSETTING( 0x04, "7" ) PORT_CONDITION("DSW1", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 685 | PORT_DIPSETTING( 0x01, "2" ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) | |
| 686 | PORT_DIPSETTING( 0x05, "3" ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) | |
| 687 | PORT_DIPSETTING( 0x00, "4" ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) | |
| 688 | PORT_DIPSETTING( 0x04, "5" ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) | |
| 689 | PORT_DIPSETTING( 0x01, "4" ) PORT_CONDITION("DSW1", 0x20, NOTEQUALS, 0x20) | |
| 690 | PORT_DIPSETTING( 0x05, "5" ) PORT_CONDITION("DSW1", 0x20, NOTEQUALS, 0x20) | |
| 691 | PORT_DIPSETTING( 0x00, "6" ) PORT_CONDITION("DSW1", 0x20, NOTEQUALS, 0x20) | |
| 692 | PORT_DIPSETTING( 0x04, "7" ) PORT_CONDITION("DSW1", 0x20, NOTEQUALS, 0x20) | |
| 693 | 693 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!4") |
| 694 | 694 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| 695 | 695 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r15082 | r15083 | |
| 857 | 857 | static INTERRUPT_GEN( joinem_vblank_irq ) |
| 858 | 858 | { |
| 859 | 859 | /* TODO: looks hackish to me ... */ |
| 860 | if (!( | |
| 860 | if (!( | |
| 861 | 861 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 862 | 862 | } |
| 863 | 863 |
| r15082 | r15083 | |
|---|---|---|
| 160 | 160 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) |
| 161 | 161 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 162 | 162 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 163 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 163 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 164 | 164 | |
| 165 | 165 | /* Manual shows: |
| 166 | 166 |
| r15082 | r15083 | |
|---|---|---|
| 290 | 290 | port_tag = "GEARP2"; |
| 291 | 291 | |
| 292 | 292 | /* gear MUST be 1, 2 or 3 */ |
| 293 | if (input_port_read(machine(), port_tag) & 0x01) m_kikstart_gears[player] = 0x02; | |
| 294 | if (input_port_read(machine(), port_tag) & 0x02) m_kikstart_gears[player] = 0x03; | |
| 295 | if (input_port_read(machine(), port_tag) & 0x04) m_kikstart_gears[player] = 0x01; | |
| 293 | if (ioport(port_tag)->read() & 0x01) m_kikstart_gears[player] = 0x02; | |
| 294 | if (ioport(port_tag)->read() & 0x02) m_kikstart_gears[player] = 0x03; | |
| 295 | if (ioport(port_tag)->read() & 0x04) m_kikstart_gears[player] = 0x01; | |
| 296 | 296 | |
| 297 | 297 | return m_kikstart_gears[player]; |
| 298 | 298 | } |
| r15082 | r15083 | |
|---|---|---|
| 38 | 38 | #include "machine/nvram.h" |
| 39 | 39 | |
| 40 | 40 | |
| 41 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 42 | #if SIGNED_DAC | |
| 43 | #define DAC_WRITE dac_signed_w | |
| 44 | #else | |
| 45 | #define DAC_WRITE dac_w | |
| 46 | #endif | |
| 47 | ||
| 48 | ||
| 49 | 41 | WRITE8_MEMBER(nbmj8991_state::nbmj8991_soundbank_w) |
| 50 | 42 | { |
| 51 | 43 | if (!(data & 0x80)) soundlatch_clear_byte_w(space, 0, 0); |
| r15082 | r15083 | |
| 261 | 253 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 262 | 254 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 263 | 255 | AM_RANGE(0xc0, 0xc0) AM_READWRITE_LEGACY(nb1413m3_inputport3_r,nb1413m3_nmi_clock_w) |
| 264 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 256 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 265 | 257 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 266 | 258 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 267 | 259 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 276 | 268 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 277 | 269 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 278 | 270 | AM_RANGE(0xc0, 0xc0) AM_READWRITE_LEGACY(nb1413m3_inputport3_r,nb1413m3_nmi_clock_w) |
| 279 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 271 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 280 | 272 | // AM_RANGE(0xe0, 0xe0) AM_WRITENOP |
| 281 | 273 | AM_RANGE(0xf0, 0xf0) AM_READWRITE_LEGACY(nb1413m3_dipsw1_r,nb1413m3_outcoin_w) |
| 282 | 274 | AM_RANGE(0xf1, 0xf1) AM_READ_LEGACY(nb1413m3_dipsw2_r) |
| r15082 | r15083 | |
| 318 | 310 | |
| 319 | 311 | static ADDRESS_MAP_START( nbmj8991_sound_io_map, AS_IO, 8, nbmj8991_state ) |
| 320 | 312 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 321 | AM_RANGE(0x00, 0x00) AM_READ(nbmj8991_sound_r) AM_DEVWRITE_LEGACY("dac1", DAC_WRITE) | |
| 322 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("dac2", DAC_WRITE) | |
| 313 | AM_RANGE(0x00, 0x00) AM_READ(nbmj8991_sound_r) AM_DEVWRITE_LEGACY("dac1", dac_w) | |
| 314 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("dac2", dac_w) | |
| 323 | 315 | AM_RANGE(0x04, 0x04) AM_WRITE(nbmj8991_soundbank_w) |
| 324 | 316 | AM_RANGE(0x06, 0x06) AM_WRITENOP |
| 325 | 317 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("fmsnd", ym3812_w) |
| r15082 | r15083 | |
|---|---|---|
| 1085 | 1085 | galivan_state *state = machine.driver_data<galivan_state>(); |
| 1086 | 1086 | machine.device("maincpu")->memory().space(AS_IO)->install_write_handler(0x82, 0x82, write8_delegate(FUNC(galivan_state::youmab_extra_bank_w),state)); // banks rom at 0x8000? writes 0xff and 0x00 before executing code there |
| 1087 | 1087 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x0000, 0x7fff, "bank3"); |
| 1088 | state->membank("bank3")->set_base( | |
| 1088 | state->membank("bank3")->set_base(sta | |
| 1089 | 1089 | |
| 1090 | 1090 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x8000, 0xbfff, "bank2"); |
| 1091 | 1091 | state->membank("bank2")->configure_entries(0, 2, state->memregion("user2")->base(), 0x4000); |
| r15082 | r15083 | |
|---|---|---|
| 10 | 10 | also thanks to Darrell Hal Smith, Kevin Mullins |
| 11 | 11 | |
| 12 | 12 | |
| 13 | To initialize battery RAM, go into Meter Read mode (F1 -> 9), | |
| 14 | and then press the Meter Read + Reset buttons (9 + 0). | |
| 15 | ||
| 16 | If a game is not turned off properly, eg. exiting MAME | |
| 17 | in mid-game, it may run faulty on the next boot. | |
| 18 | Enable the Night Switch to prevent this. | |
| 19 | ||
| 20 | ||
| 13 | 21 | TODO: |
| 14 | - fix vblank failure | |
| 15 | * dox note: to boot it in debugger, set bp ff5ec, and then ip=f5fe | |
| 16 | 22 | - coincounters/hopper |
| 17 | 23 | |
| 18 | 24 | ****************************************************************/ |
| r15082 | r15083 | |
| 24 | 30 | #include "sound/dac.h" |
| 25 | 31 | #include "video/resnet.h" |
| 26 | 32 | |
| 33 | #include "gldarrow.lh" | |
| 34 | ||
| 35 | ||
| 27 | 36 | class meyc8088_state : public driver_device |
| 28 | 37 | { |
| 29 | 38 | public: |
| 30 | 39 | meyc8088_state(const machine_config &mconfig, device_type type, const char *tag) |
| 31 | 40 | : driver_device(mconfig, type, tag) , |
| 32 | 41 | m_maincpu(*this,"maincpu"), |
| 33 | m_vram(*this, "vram") | |
| 42 | m_vram(*this, "vram"), | |
| 43 | m_heartbeat(*this, "heartbeat") | |
| 34 | 44 | { } |
| 35 | 45 | |
| 36 | 46 | required_device<cpu_device> m_maincpu; |
| 37 | 47 | required_shared_ptr<UINT8> m_vram; |
| 48 | required_device<timer_device> m_heartbeat; | |
| 38 | 49 | |
| 39 | 50 | UINT8 m_status; |
| 40 | 51 | UINT8 m_common; |
| r15082 | r15083 | |
| 148 | 159 | |
| 149 | 160 | ***************************************************************************/ |
| 150 | 161 | |
| 162 | TIMER_DEVICE_CALLBACK( heartbeat_callback ) | |
| 163 | { | |
| 164 | meyc8088_state *state = timer.machine().driver_data<meyc8088_state>(); | |
| 165 | state->m_status |= 0x20; | |
| 166 | } | |
| 167 | ||
| 151 | 168 | WRITE8_MEMBER(meyc8088_state::drive_w) |
| 152 | 169 | { |
| 170 | // drivers go into high-impedance state ~100ms after write (LS374 /OC) | |
| 153 | 171 | m_status &= ~0x20; |
| 172 | m_heartbeat->adjust(attotime::from_msec(100)); | |
| 154 | 173 | |
| 155 | 174 | // d0-d3: DC counter drivers |
| 156 | 175 | // d4-d7: AC motor drivers |
| r15082 | r15083 | |
| 203 | 222 | UINT8 ret = 0xff; |
| 204 | 223 | |
| 205 | 224 | // multiplexed switch inputs |
| 206 | if (~state->m_common & 1) ret &= input_port_read_safe(device->machine(), "C0", 0); // bit switches | |
| 207 | if (~state->m_common & 2) ret &= input_port_read_safe(device->machine(), "C1", 0); // control switches | |
| 208 | if (~state->m_common & 4) ret &= input_port_read_safe(device->machine(), "C2", 0); // light switches | |
| 209 | if (~state->m_common & 8) ret &= input_port_read_safe(device->machine(), "C3", 0); // light switches | |
| 225 | if (~state->m_common & 1) ret &= state->ioport("C0")->read_safe(0); // bit switches | |
| 226 | if (~state->m_common & 2) ret &= state->ioport("C1")->read_safe(0); // control switches | |
| 227 | if (~state->m_common & 4) ret &= state->ioport("C2")->read_safe(0); // light switches | |
| 228 | if (~state->m_common & 8) ret &= state->ioport("C3")->read_safe(0); // light switches | |
| 210 | 229 | |
| 211 | 230 | return ret; |
| 212 | 231 | } |
| r15082 | r15083 | |
| 221 | 240 | // d3: N/C |
| 222 | 241 | // d4: battery ok |
| 223 | 242 | // d5: /drive on |
| 224 | return (state->m_status & 7) | 0x18; | |
| 243 | return (state->m_status & 0x27) | 0x18; | |
| 225 | 244 | } |
| 226 | 245 | |
| 227 | 246 | |
| r15082 | r15083 | |
| 229 | 248 | { |
| 230 | 249 | // lite 1-8 |
| 231 | 250 | for (int i = 0; i < 8; i++) |
| 232 | output_set_lamp_value(i, data >> i & 1); | |
| 251 | output_set_lamp_value(i, ~data >> i & 1); | |
| 233 | 252 | } |
| 234 | 253 | |
| 235 | 254 | static WRITE8_DEVICE_HANDLER(meyc8088_lights2_w) |
| 236 | 255 | { |
| 237 | 256 | // lite 9-16 |
| 238 | 257 | for (int i = 0; i < 8; i++) |
| 239 | output_set_lamp_value(i + 8, data >> i & 1); | |
| 258 | output_set_lamp_value(i + 8, ~data >> i & 1); | |
| 240 | 259 | } |
| 241 | 260 | |
| 242 | 261 | static WRITE8_DEVICE_HANDLER(meyc8088_common_w) |
| r15082 | r15083 | |
| 292 | 311 | |
| 293 | 312 | static INPUT_PORTS_START( gldarrow ) |
| 294 | 313 | PORT_START("SW") |
| 295 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 314 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 296 | 315 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 297 | 316 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) // coin4 |
| 298 | 317 | PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 351 | 370 | static MACHINE_CONFIG_START( meyc8088, meyc8088_state ) |
| 352 | 371 | |
| 353 | 372 | /* basic machine hardware */ |
| 354 | MCFG_CPU_ADD("maincpu", I8088, XTAL_15MHz / 3) | |
| 373 | MCFG_CPU_ADD("maincpu", I8088, (XTAL_15MHz / 3) * 0.95) // NOTE: underclocked to prevent errors on diagnostics, MAME i8088 cycle timing is probably inaccurate | |
| 355 | 374 | MCFG_CPU_PROGRAM_MAP(meyc8088_map) |
| 356 | 375 | |
| 357 | 376 | MCFG_I8155_ADD("i8155_1", XTAL_15MHz / (3*1), i8155_intf[0]) |
| r15082 | r15083 | |
| 359 | 378 | |
| 360 | 379 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 361 | 380 | |
| 381 | MCFG_TIMER_ADD("heartbeat", heartbeat_callback) | |
| 382 | ||
| 362 | 383 | /* video hardware */ |
| 363 | 384 | MCFG_SCREEN_ADD("screen", RASTER) |
| 364 | 385 | MCFG_SCREEN_RAW_PARAMS(XTAL_15MHz/3, 320, 0, 256, 261, 0, 224) |
| r15082 | r15083 | |
| 387 | 408 | ROM_END |
| 388 | 409 | |
| 389 | 410 | |
| 390 | GAME( | |
| 411 | GAMEL( |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | switch(offset) |
| 82 | 82 | { |
| 83 | 83 | case 0x00: return 0xff; //printer read |
| 84 | case 0x03: return input_port_read(machine(), "KEY0" ); | |
| 85 | case 0x04: return input_port_read(machine(), "KEY1" ); | |
| 86 | case 0x05: return input_port_read(machine(), "SYSTEM" ); | |
| 84 | case 0x03: return ioport("KEY0" )->read(); | |
| 85 | case 0x04: return ioport("KEY1" )->read(); | |
| 86 | case 0x05: return ioport("SYSTEM" )->read(); | |
| 87 | 87 | case 0x0a: return m_io_ram[offset]; //"buzzer" 0 read |
| 88 | 88 | case 0x0b: return m_io_ram[offset]; //"buzzer" 1 read |
| 89 | 89 | } |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | UINT8 val = 0; |
| 69 | 69 | |
| 70 | if ((i | |
| 70 | if ((iop | |
| 71 | 71 | val |= 0x80; |
| 72 | 72 | |
| 73 | if ((i | |
| 73 | if ((iop | |
| 74 | 74 | val |= 0x01; |
| 75 | 75 | |
| 76 | 76 | return val; |
| r15082 | r15083 | |
| 79 | 79 | |
| 80 | 80 | READ8_MEMBER(canyon_state::canyon_options_r) |
| 81 | 81 | { |
| 82 | return (i | |
| 82 | return (iop | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | |
| r15082 | r15083 | |
| 160 | 160 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 161 | 161 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) |
| 162 | 162 | PORT_SERVICE( 0x10, IP_ACTIVE_HIGH ) |
| 163 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_VBLANK | |
| 163 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 164 | 164 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hiscore Reset") PORT_CODE(KEYCODE_H) |
| 165 | 165 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) /* SLAM */ |
| 166 | 166 |
| r15082 | r15083 | |
|---|---|---|
| 1056 | 1056 | static DRIVER_INIT( funystrp ) |
| 1057 | 1057 | { |
| 1058 | 1058 | splash_state *state = machine.driver_data<splash_state>(); |
| 1059 | UINT16 *ROM = (UINT16 *) | |
| 1059 | UINT16 *ROM = (UINT16 *)sta | |
| 1060 | 1060 | |
| 1061 | 1061 | state->m_bitmap_type = 0; |
| 1062 | 1062 | state->m_sprite_attr2_shift = 0; |
| r15082 | r15083 | |
|---|---|---|
| 786 | 786 | |
| 787 | 787 | READ8_MEMBER(subsino2_state::dsw_r) |
| 788 | 788 | { |
| 789 | return ( (input_port_read(machine(), "DSW1") & m_dsw_mask) ? 0x01 : 0 ) | | |
| 790 | ( (input_port_read(machine(), "DSW2") & m_dsw_mask) ? 0x02 : 0 ) | | |
| 791 | ( (input_port_read(machine(), "DSW3") & m_dsw_mask) ? 0x04 : 0 ) | | |
| 792 | ( (input_port_read(machine(), "DSW4") & m_dsw_mask) ? 0x08 : 0 ) ; | |
| 789 | return ( (ioport("DSW1")->read() & m_dsw_mask) ? 0x01 : 0 ) | | |
| 790 | ( (ioport("DSW2")->read() & m_dsw_mask) ? 0x02 : 0 ) | | |
| 791 | ( (ioport("DSW3")->read() & m_dsw_mask) ? 0x04 : 0 ) | | |
| 792 | ( (ioport("DSW4")->read() & m_dsw_mask) ? 0x08 : 0 ) ; | |
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | |
| r15082 | r15083 | |
| 915 | 915 | |
| 916 | 916 | for (i = 0; i < 5; i++) |
| 917 | 917 | if (m_bishjan_input & (1 << i)) |
| 918 | res = i | |
| 918 | res = iop | |
| 919 | 919 | |
| 920 | 920 | return (res << 8) | // high byte |
| 921 | i | |
| 921 | iop | |
| 922 | 922 | (machine().device<ticket_dispenser_device>("hopper")->read(space, 0) ? 0x00 : 0x04) // bit 2: hopper sensor |
| 923 | 923 | ; |
| 924 | 924 | } |
| r15082 | r15083 | |
|---|---|---|
| 163 | 163 | |
| 164 | 164 | switch (m_ttmahjng_port_select) |
| 165 | 165 | { |
| 166 | case 1: ret = input_port_read(machine(), "KEY0"); break; | |
| 167 | case 2: ret = input_port_read(machine(), "KEY1"); break; | |
| 168 | case 4: ret = input_port_read(machine(), "KEY2"); break; | |
| 169 | case 8: ret = input_port_read(machine(), "KEY3"); break; | |
| 166 | case 1: ret = ioport("KEY0")->read(); break; | |
| 167 | case 2: ret = ioport("KEY1")->read(); break; | |
| 168 | case 4: ret = ioport("KEY2")->read(); break; | |
| 169 | case 8: ret = ioport("KEY3")->read(); break; | |
| 170 | 170 | default: break; |
| 171 | 171 | } |
| 172 | 172 |
| r15082 | r15083 | |
|---|---|---|
| 544 | 544 | PORT_DIPSETTING( 0x04, "x1.2" ) |
| 545 | 545 | PORT_DIPSETTING( 0x08, "x1.4" ) |
| 546 | 546 | PORT_DIPSETTING( 0x0c, "x1.6" ) |
| 547 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!5,!6") PORT_CONDITION("DSW1",0x04, | |
| 547 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:!5,!6") PORT_CONDITION("DSW1",0x04, | |
| 548 | 548 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) |
| 549 | 549 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 550 | 550 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 551 | 551 | PORT_DIPSETTING( 0x30, DEF_STR( Free_Play ) ) /* Not documented */ |
| 552 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:!7,!8") PORT_CONDITION("DSW1",0x04, | |
| 552 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:!7,!8") PORT_CONDITION("DSW1",0x04, | |
| 553 | 553 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) |
| 554 | 554 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) |
| 555 | 555 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_5C ) ) |
| 556 | 556 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 557 | PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!5,!6,!7,!8") PORT_CONDITION("DSW1",0x04, | |
| 557 | PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!5,!6,!7,!8") PORT_CONDITION("DSW1",0x04, | |
| 558 | 558 | PORT_DIPSETTING( 0x60, DEF_STR( 7C_1C ) ) |
| 559 | 559 | PORT_DIPSETTING( 0x50, DEF_STR( 6C_1C ) ) |
| 560 | 560 | PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) |
| r15082 | r15083 | |
| 696 | 696 | { |
| 697 | 697 | running_machine &machine = device.machine(); |
| 698 | 698 | m63_state *state = machine.driver_data<m63_state>(); |
| 699 | int i, len = | |
| 699 | int i, len = sta | |
| 700 | 700 | UINT8 *ROM = state->memregion("samples")->base(); |
| 701 | 701 | |
| 702 | 702 | state->m_samplebuf = auto_alloc_array(machine, INT16, len); |
| r15082 | r15083 | |
|---|---|---|
| 447 | 447 | |
| 448 | 448 | static MACHINE_START( tecmosys ) |
| 449 | 449 | { |
| 450 | // tecmosys_state *state = machine.driver_data<tecmosys_state>(); | |
| 451 | machine.root_device().membank("bank1")->configure_entries(0, 16, machine.root_device().memregion("audiocpu")->base(), 0x4000); | |
| 450 | tecmosys_state *state = machine.driver_data<tecmosys_state>(); | |
| 451 | state->membank("bank1")->configure_entries(0, 16, state->memregion("audiocpu")->base(), 0x4000); | |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | static MACHINE_CONFIG_START( deroon, tecmosys_state ) |
| r15082 | r15083 | |
|---|---|---|
| 129 | 129 | { |
| 130 | 130 | polyplay_state *state = device->machine().driver_data<polyplay_state>(); |
| 131 | 131 | |
| 132 | if ( | |
| 132 | if (s | |
| 133 | 133 | state->m_last = 0; |
| 134 | 134 | else |
| 135 | 135 | { |
| r15082 | r15083 | |
|---|---|---|
| 282 | 282 | CUSTOM_INPUT_MEMBER(exidy440_state::hitnmiss_button1_r) |
| 283 | 283 | { |
| 284 | 284 | /* button 1 shows up in two bits */ |
| 285 | UINT32 button1 = i | |
| 285 | UINT32 button1 = iop | |
| 286 | 286 | return (button1 << 1) | button1; |
| 287 | 287 | } |
| 288 | 288 | |
| r15082 | r15083 | |
| 336 | 336 | { |
| 337 | 337 | /* I/O1 accesses clear the CIRQ flip/flop */ |
| 338 | 338 | cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE); |
| 339 | return i | |
| 339 | return iop | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
| r15082 | r15083 | |
| 424 | 424 | |
| 425 | 425 | READ8_MEMBER(exidy440_state::topsecex_input_port_5_r) |
| 426 | 426 | { |
| 427 | return (i | |
| 427 | return (iop | |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | switch (offset << 1) |
| 135 | 135 | { |
| 136 | 136 | case 0: /* Player 1 & Player 2 joysticks & fire buttons */ |
| 137 | return i | |
| 137 | return iop | |
| 138 | 138 | |
| 139 | 139 | case 2: /* Player 3 & Player 4 joysticks & fire buttons */ |
| 140 | return i | |
| 140 | return iop | |
| 141 | 141 | |
| 142 | 142 | case 4: /* Dip 1 (stored at 0x3f8035) */ |
| 143 | return i | |
| 143 | return iop | |
| 144 | 144 | |
| 145 | 145 | case 6: /* Dip 2 (stored at 0x3f8034) */ |
| 146 | return i | |
| 146 | return iop | |
| 147 | 147 | |
| 148 | 148 | case 8: /* VBL, Credits */ |
| 149 | return i | |
| 149 | return iop | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | return 0xffff; |
| r15082 | r15083 | |
| 161 | 161 | |
| 162 | 162 | READ16_MEMBER(dassault_state::dassault_sub_control_r) |
| 163 | 163 | { |
| 164 | return i | |
| 164 | return iop | |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | WRITE16_MEMBER(dassault_state::dassault_sound_w) |
| r15082 | r15083 | |
| 302 | 302 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 303 | 303 | |
| 304 | 304 | PORT_START("VBLANK1") /* Cpu 1 vblank */ |
| 305 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 305 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 306 | 306 | INPUT_PORTS_END |
| 307 | 307 | |
| 308 | 308 | static INPUT_PORTS_START( thndzone ) |
| r15082 | r15083 | |
| 312 | 312 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 313 | 313 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 314 | 314 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Adds 4 credits/coins ! |
| 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 316 | 316 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 317 | 317 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 318 | 318 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 369 | 369 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 370 | 370 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 371 | 371 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 372 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 372 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 373 | 373 | |
| 374 | 374 | PORT_START("DSW1") |
| 375 | 375 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") |
| r15082 | r15083 | |
| 427 | 427 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 428 | 428 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 429 | 429 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 430 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 430 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 431 | 431 | |
| 432 | 432 | PORT_START("DSW1") |
| 433 | 433 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3") |
| r15082 | r15083 | |
|---|---|---|
| 136 | 136 | PORT_DIPSETTING( 0x00, "1" ) |
| 137 | 137 | PORT_DIPSETTING( 0x40, "2" ) |
| 138 | 138 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:!2") |
| 139 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 140 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 141 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/2" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 142 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/6" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 139 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x00) | |
| 140 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x00) | |
| 141 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/2" ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x40) | |
| 142 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/6" ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x40) | |
| 143 | 143 | |
| 144 | 144 | PORT_START("DSW") |
| 145 | 145 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:!3,!4") |
| r15082 | r15083 | |
| 162 | 162 | |
| 163 | 163 | PORT_MODIFY("IN1") |
| 164 | 164 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:!2") |
| 165 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 166 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x00) | |
| 167 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/6" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 168 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/12" ) PORT_CONDITION("IN1", 0x40, PORTCOND_EQUALS, 0x40) | |
| 165 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x00) | |
| 166 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x00) | |
| 167 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/6" ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x40) | |
| 168 | PORT_DIPSETTING( 0x00, "A 1/2 B 1/12" ) PORT_CONDITION("IN1", 0x40, EQUALS, 0x40) | |
| 169 | 169 | INPUT_PORTS_END |
| 170 | 170 | |
| 171 | 171 |
| r15082 | r15083 | |
|---|---|---|
| 188 | 188 | READ16_MEMBER(tatsumi_state::cyclwarr_input_r) |
| 189 | 189 | { |
| 190 | 190 | static const char *const port[] = { "SERVICE", "P1", "P2", "DSW3" }; |
| 191 | return i | |
| 191 | return iop | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | READ16_MEMBER(tatsumi_state::cyclwarr_input2_r) |
| 195 | 195 | { |
| 196 | 196 | static const char *const port2[] = { "DSW1", "DSW2", "P3", "P4" }; |
| 197 | return i | |
| 197 | return iop | |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | WRITE16_MEMBER(tatsumi_state::cyclwarr_sound_w) |
| r15082 | r15083 | |
| 1284 | 1284 | static DRIVER_INIT( apache3 ) |
| 1285 | 1285 | { |
| 1286 | 1286 | tatsumi_state *state = machine.driver_data<tatsumi_state>(); |
| 1287 | UINT8 *dst = machine.root_device().memregion("gfx1")->base(); | |
| 1288 | UINT8 *src1 = machine.root_device().memregion("gfx2")->base(); | |
| 1287 | UINT8 *dst = state->memregion("gfx1")->base(); | |
| 1288 | UINT8 *src1 = state->memregion("gfx2")->base(); | |
| 1289 | 1289 | UINT8 *src2 = state->memregion("gfx3")->base(); |
| 1290 | 1290 | int i; |
| 1291 | 1291 | |
| r15082 | r15083 | |
| 1312 | 1312 | static DRIVER_INIT( roundup5 ) |
| 1313 | 1313 | { |
| 1314 | 1314 | tatsumi_state *state = machine.driver_data<tatsumi_state>(); |
| 1315 | UINT8 *dst = machine.root_device().memregion("gfx1")->base(); | |
| 1316 | UINT8 *src1 = machine.root_device().memregion("gfx2")->base(); | |
| 1315 | UINT8 *dst = state->memregion("gfx1")->base(); | |
| 1316 | UINT8 *src1 = state->memregion("gfx2")->base(); | |
| 1317 | 1317 | UINT8 *src2 = state->memregion("gfx3")->base(); |
| 1318 | 1318 | int i; |
| 1319 | 1319 | |
| r15082 | r15083 | |
| 1338 | 1338 | static DRIVER_INIT( cyclwarr ) |
| 1339 | 1339 | { |
| 1340 | 1340 | tatsumi_state *state = machine.driver_data<tatsumi_state>(); |
| 1341 | UINT8 *dst = machine.root_device().memregion("gfx1")->base(); | |
| 1342 | UINT8 *src1 = machine.root_device().memregion("gfx2")->base(); | |
| 1343 | int len1 = machine.root_device().memregion("gfx2")->bytes(); | |
| 1344 | UINT8 *src2 = machine.root_device().memregion("gfx3")->base(); | |
| 1341 | UINT8 *dst = state->memregion("gfx1")->base(); | |
| 1342 | UINT8 *src1 = state->memregion("gfx2")->base(); | |
| 1343 | int len1 = state->memregion("gfx2")->bytes(); | |
| 1344 | UINT8 *src2 = state->memregion("gfx3")->base(); | |
| 1345 | 1345 | int len2 = state->memregion("gfx3")->bytes(); |
| 1346 | 1346 | int i; |
| 1347 | 1347 | for (i=0; i<len1; i+=32) { |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | switch (offset << 1) |
| 37 | 37 | { |
| 38 | 38 | case 0: |
| 39 | return i | |
| 39 | return iop | |
| 40 | 40 | case 2: |
| 41 | return i | |
| 41 | return iop | |
| 42 | 42 | case 8: |
| 43 | return i | |
| 43 | return iop | |
| 44 | 44 | case 10: /* ? Not used for anything */ |
| 45 | 45 | case 12: |
| 46 | 46 | return 0; |
| r15082 | r15083 | |
| 131 | 131 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 132 | 132 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 133 | 133 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 134 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 134 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 135 | 135 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 136 | 136 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 137 | 137 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 209 | 209 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 210 | 210 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 211 | 211 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 212 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 212 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 213 | 213 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 214 | 214 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 215 | 215 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 62 | 62 | { |
| 63 | 63 | |
| 64 | 64 | if (ACCESSING_BITS_0_7) |
| 65 | m_pot_wheel = ~i | |
| 65 | m_pot_wheel = ~iop | |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | WRITE16_MEMBER(blmbycar_state::blmbycar_pot_wheel_shift_w) |
| r15082 | r15083 | |
| 86 | 86 | |
| 87 | 87 | READ16_MEMBER(blmbycar_state::blmbycar_opt_wheel_r) |
| 88 | 88 | { |
| 89 | return (~i | |
| 89 | return (~iop | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 |
| r15082 | r15083 | |
|---|---|---|
| 148 | 148 | if (state->m_timer & 0x100) |
| 149 | 149 | popmessage("watchdog!"); |
| 150 | 150 | |
| 151 | if (state->m_last != ( | |
| 151 | if (state->m_last != (s | |
| 152 | 152 | { |
| 153 | state->m_last = | |
| 153 | state->m_last = s | |
| 154 | 154 | generic_pulse_irq_line(device, 0, 1); |
| 155 | 155 | } |
| 156 | state->m_pia_u1->set_a_input(input_port_read(device->machine(), "INPUT") & 0x0f, 0); | |
| 157 | state->m_pia_u1->ca1_w(input_port_read(device->machine(), "INPUT") & 0x10); | |
| 158 | state->m_pia_u1->ca2_w(input_port_read(device->machine(), "INPUT") & 0x20); | |
| 156 | state->m_pia_u1->set_a_input(device->machine().root_device().ioport("INPUT")->read() & 0x0f, 0); | |
| 157 | state->m_pia_u1->ca1_w(device->machine().root_device().ioport("INPUT")->read() & 0x10); | |
| 158 | state->m_pia_u1->ca2_w(device->machine().root_device().ioport("INPUT")->read() & 0x20); | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | READ8_MEMBER(toratora_state::timer_r) |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 82 | 82 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 83 | 83 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 84 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 84 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 85 | 85 | |
| 86 | 86 | PORT_START("DSW1") |
| 87 | 87 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 845 | 845 | |
| 846 | 846 | for (i = 0;i < 4;i++) |
| 847 | 847 | { |
| 848 | curr = i | |
| 848 | curr = iop | |
| 849 | 849 | m_diff[i] = (curr - m_prev[i]); |
| 850 | 850 | m_prev[i] = curr; |
| 851 | 851 | } |
| r15082 | r15083 | |
| 857 | 857 | case 0: |
| 858 | 858 | return (m_diff[0] & 0xff) | ((m_diff[2] & 0xff) << 8); |
| 859 | 859 | case 1: |
| 860 | return ((m_diff[0] >> 8) & 0x1f) | (m_diff[2] & 0x1f00) | (i | |
| 860 | return ((m_diff[0] >> 8) & 0x1f) | (m_diff[2] & 0x1f00) | (iop | |
| 861 | 861 | case 2: |
| 862 | 862 | return (m_diff[1] & 0xff) | ((m_diff[3] & 0xff) << 8); |
| 863 | 863 | case 3: |
| r15082 | r15083 | |
| 1122 | 1122 | ADDRESS_MAP_END |
| 1123 | 1123 | |
| 1124 | 1124 | #define COIN_MODE_1 \ |
| 1125 | PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1125 | PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1126 | 1126 | PORT_DIPSETTING( 0x00a0, DEF_STR( 6C_1C ) ) \ |
| 1127 | 1127 | PORT_DIPSETTING( 0x00b0, DEF_STR( 5C_1C ) ) \ |
| 1128 | 1128 | PORT_DIPSETTING( 0x00c0, DEF_STR( 4C_1C ) ) \ |
| r15082 | r15083 | |
| 1141 | 1141 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 1142 | 1142 | |
| 1143 | 1143 | #define COIN_MODE_2_A \ |
| 1144 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1144 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1145 | 1145 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) \ |
| 1146 | 1146 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) \ |
| 1147 | 1147 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) \ |
| 1148 | 1148 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) \ |
| 1149 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1149 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW", 0x0400, | |
| 1150 | 1150 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) \ |
| 1151 | 1151 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) \ |
| 1152 | 1152 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_5C ) ) \ |
| r15082 | r15083 | |
| 1426 | 1426 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) |
| 1427 | 1427 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1428 | 1428 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2") |
| 1429 | PORT_DIPSETTING( 0x0000, "Upright (single)" ) PORT_CONDITION("DSW", 0x1000, PORTCOND_NOTEQUALS, 0x0000) | |
| 1430 | PORT_DIPSETTING( 0x0200, DEF_STR( Cocktail ) ) PORT_CONDITION("DSW", 0x1000, PORTCOND_NOTEQUALS, 0x0000) | |
| 1431 | PORT_DIPSETTING( 0x0000, "Upright (double) On" ) PORT_CONDITION("DSW", 0x1000, PORTCOND_EQUALS, 0x0000) | |
| 1432 | PORT_DIPSETTING( 0x0200, "Upright (double) Off" ) PORT_CONDITION("DSW", 0x1000, PORTCOND_EQUALS, 0x0000) | |
| 1429 | PORT_DIPSETTING( 0x0000, "Upright (single)" ) PORT_CONDITION("DSW", 0x1000, NOTEQUALS, 0x0000) | |
| 1430 | PORT_DIPSETTING( 0x0200, DEF_STR( Cocktail ) ) PORT_CONDITION("DSW", 0x1000, NOTEQUALS, 0x0000) | |
| 1431 | PORT_DIPSETTING( 0x0000, "Upright (double) On" ) PORT_CONDITION("DSW", 0x1000, EQUALS, 0x0000) | |
| 1432 | PORT_DIPSETTING( 0x0200, "Upright (double) Off" ) PORT_CONDITION("DSW", 0x1000, EQUALS, 0x0000) | |
| 1433 | 1433 | PORT_DIPNAME( 0x0400, 0x0400, "Coin Mode" ) PORT_DIPLOCATION("SW2:3") |
| 1434 | 1434 | PORT_DIPSETTING( 0x0400, "Mode 1" ) |
| 1435 | 1435 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| r15082 | r15083 | |
| 1621 | 1621 | PORT_DIPSETTING( 0x0800, "Mode 1" ) |
| 1622 | 1622 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| 1623 | 1623 | /* Coin Mode 1 */ |
| 1624 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 1624 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 1625 | 1625 | PORT_DIPSETTING( 0xa000, DEF_STR( 6C_1C ) ) |
| 1626 | 1626 | PORT_DIPSETTING( 0xb000, DEF_STR( 5C_1C ) ) |
| 1627 | 1627 | PORT_DIPSETTING( 0xc000, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 1683 | 1683 | PORT_DIPSETTING( 0x0800, "Mode 1" ) |
| 1684 | 1684 | PORT_DIPSETTING( 0x0000, "Mode 2" ) |
| 1685 | 1685 | /* Coin Mode 1 */ |
| 1686 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 1686 | PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_CONDITION("DSW", 0x0800, | |
| 1687 | 1687 | PORT_DIPSETTING( 0xa000, DEF_STR( 6C_1C ) ) |
| 1688 | 1688 | PORT_DIPSETTING( 0xb000, DEF_STR( 5C_1C ) ) |
| 1689 | 1689 | PORT_DIPSETTING( 0xc000, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 90 | 90 | { |
| 91 | 91 | static const char *const portnames[] = { "IN0", "IN1", "P1", "P2", "DSW", "UNUSED0", "UNUSED1" }; |
| 92 | 92 | |
| 93 | return i | |
| 93 | return iop | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | READ8_MEMBER(crgolf_state::analog_input_r) |
| 98 | 98 | { |
| 99 | return ((i | |
| 99 | return ((iop | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 |
| r15082 | r15083 | |
|---|---|---|
| 114 | 114 | |
| 115 | 115 | for (i = 0; i < 31; i++) |
| 116 | 116 | { |
| 117 | if (i | |
| 117 | if (iop | |
| 118 | 118 | } |
| 119 | if (i | |
| 119 | if (iop | |
| 120 | 120 | return 0; |
| 121 | 121 | } |
| 122 | 122 | case 0x5c7b: // rmhaihai, rmhaisei, rmhaijin |
| r15082 | r15083 | |
|---|---|---|
| 324 | 324 | { |
| 325 | 325 | UINT8 port = tc0220ioc_port_r(m_tc0220ioc, 0); /* read port number */ |
| 326 | 326 | int steer = 0; |
| 327 | int analogue_steer = input_port_read_safe(machine(), STEER_PORT_TAG, 0x00); | |
| 328 | int fake = input_port_read_safe(machine(), FAKE_PORT_TAG, 0x00); | |
| 327 | int analogue_steer = ioport(STEER_PORT_TAG)->read_safe(0x00); | |
| 328 | int fake = ioport(FAKE_PORT_TAG)->read_safe(0x00); | |
| 329 | 329 | |
| 330 | 330 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 331 | 331 | { |
| r15082 | r15083 | |
|---|---|---|
| 487 | 487 | temp = 0; |
| 488 | 488 | |
| 489 | 489 | if (m_port_fa_last == 0x08) /* 0000 1000 */ /* Angle */ |
| 490 | temp = i | |
| 490 | temp = iop | |
| 491 | 491 | |
| 492 | 492 | if (m_port_fa_last == 0x09) /* 0000 1001 */ /* Accel */ |
| 493 | temp = i | |
| 493 | temp = iop | |
| 494 | 494 | |
| 495 | 495 | return temp; |
| 496 | 496 | } |
| r15082 | r15083 | |
| 524 | 524 | |
| 525 | 525 | if (data & 1) |
| 526 | 526 | { |
| 527 | int curr = i | |
| 527 | int curr = iop | |
| 528 | 528 | m_diff1 = ((curr - m_last1) & 0x0fff) | (curr & 0xf000); |
| 529 | 529 | m_last1 = curr; |
| 530 | 530 | } |
| 531 | 531 | if (data & 2) |
| 532 | 532 | { |
| 533 | int curr = i | |
| 533 | int curr = iop | |
| 534 | 534 | m_diff2 = ((curr - m_last2) & 0x0fff) | (curr & 0xf000); |
| 535 | 535 | m_last2 = curr; |
| 536 | 536 | } |
| r15082 | r15083 | |
|---|---|---|
| 38 | 38 | { |
| 39 | 39 | amspdwy_state *state = machine.driver_data<amspdwy_state>(); |
| 40 | 40 | static const char *const portnames[] = { "WHEEL1", "WHEEL2", "AN1", "AN2" }; |
| 41 | UINT8 wheel = in | |
| 41 | UINT8 wheel = machine.root_device().ioport | |
| 42 | 42 | if (wheel != state->m_wheel_old[index]) |
| 43 | 43 | { |
| 44 | 44 | wheel = (wheel & 0x7fff) - (wheel & 0x8000); |
| r15082 | r15083 | |
| 49 | 49 | |
| 50 | 50 | state->m_wheel_old[index] = wheel; |
| 51 | 51 | } |
| 52 | return state->m_wheel_return[index] | in | |
| 52 | return state->m_wheel_return[index] | machine.root_device().ioport | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | READ8_MEMBER(amspdwy_state::amspdwy_wheel_0_r) |
| r15082 | r15083 | |
| 64 | 64 | |
| 65 | 65 | static READ8_DEVICE_HANDLER( amspdwy_sound_r ) |
| 66 | 66 | { |
| 67 | return (ym2151_status_port_r(device, 0) & ~ 0x30) | | |
| 67 | return (ym2151_status_port_r(device, 0) & ~ 0x30) | | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | WRITE8_MEMBER(amspdwy_state::amspdwy_sound_w) |
| r15082 | r15083 | |
|---|---|---|
| 179 | 179 | { |
| 180 | 180 | int x, y, f; |
| 181 | 181 | |
| 182 | switch (i | |
| 182 | switch (iop | |
| 183 | 183 | { |
| 184 | 184 | case 3: |
| 185 | case 1: return input_port_read(machine(), offset ? "P2_GUN" : "P1_GUN"); // Lightgun buttons | |
| 186 | case 2: return input_port_read(machine(), offset ? "P2_JOY" : "P1_JOY"); // Joystick | |
| 185 | case 1: return ioport(offset ? "P2_GUN" : "P1_GUN")->read(); // Lightgun buttons | |
| 186 | case 2: return ioport(offset ? "P2_JOY" : "P1_JOY")->read(); // Joystick | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | // Trackball |
| 190 | 190 | |
| 191 | x = input_port_read(machine(), offset ? "P2 Trackball X" : "P1 Trackball X"); | |
| 192 | y = input_port_read(machine(), offset ? "P2 Trackball Y" : "P1 Trackball Y"); | |
| 191 | x = ioport(offset ? "P2 Trackball X" : "P1 Trackball X")->read(); | |
| 192 | y = ioport(offset ? "P2 Trackball Y" : "P1 Trackball Y")->read(); | |
| 193 | 193 | f = machine().primary_screen->frame_number(); |
| 194 | 194 | |
| 195 | m_input_ret[offset] = (m_input_ret[offset] & 0x14) | (i | |
| 195 | m_input_ret[offset] = (m_input_ret[offset] & 0x14) | (iop | |
| 196 | 196 | |
| 197 | 197 | x = (x & 0x7f) - (x & 0x80); |
| 198 | 198 | y = (y & 0x7f) - (y & 0x80); |
| r15082 | r15083 | |
| 368 | 368 | if (!state->m_adpcm_playing[voice]) |
| 369 | 369 | return; |
| 370 | 370 | |
| 371 | rom = | |
| 371 | rom = st | |
| 372 | 372 | len = state->memregion("adpcm")->bytes() * 2; |
| 373 | 373 | |
| 374 | 374 | start = state->m_adpcm_addr[0][voice] + state->m_adpcm_nibble[voice]; |
| r15082 | r15083 | |
| 585 | 585 | |
| 586 | 586 | static INPUT_PORTS_START( borntofi ) |
| 587 | 587 | PORT_START("P1_GUN") /* 53000 (Lightgun) */ |
| 588 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 589 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 590 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 591 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 592 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 593 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 594 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 595 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 588 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 589 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 590 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 591 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 592 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 593 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 594 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 595 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 596 | 596 | |
| 597 | 597 | PORT_START("P2_GUN") /* 53001 (Lightgun) */ |
| 598 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 599 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 600 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) PORT_PLAYER(2) | |
| 601 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) PORT_PLAYER(2) | |
| 602 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 603 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 604 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 605 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x03) | |
| 598 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 599 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 600 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) PORT_PLAYER(2) | |
| 601 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) PORT_PLAYER(2) | |
| 602 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 603 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 604 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 605 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x03) | |
| 606 | 606 | |
| 607 | 607 | PORT_START("P1_TRACK") /* 53000 (Trackball) */ |
| 608 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 609 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 610 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball x | |
| 611 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball x | |
| 612 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball y | |
| 613 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball y | |
| 614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 608 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 609 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 610 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball x | |
| 611 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball x | |
| 612 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball y | |
| 613 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball y | |
| 614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 616 | 616 | |
| 617 | 617 | PORT_START("P2_TRACK") /* 53001 (Trackball) */ |
| 618 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 619 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) | |
| 620 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball x | |
| 621 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball x | |
| 622 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball y | |
| 623 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) // trackball y | |
| 624 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) PORT_PLAYER(2) | |
| 625 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x00) PORT_PLAYER(2) | |
| 618 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 619 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) | |
| 620 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball x | |
| 621 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball x | |
| 622 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball y | |
| 623 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) // trackball y | |
| 624 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) PORT_PLAYER(2) | |
| 625 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x00) PORT_PLAYER(2) | |
| 626 | 626 | |
| 627 | 627 | PORT_START("P1_JOY") /* 53000 (Joystick) */ |
| 628 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 629 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 630 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 631 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 632 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 633 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 634 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 635 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 628 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 629 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 630 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 631 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 632 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 633 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 634 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 635 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 636 | 636 | |
| 637 | 637 | PORT_START("P2_JOY") /* 53001 (Joystick) */ |
| 638 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 639 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) | |
| 640 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 641 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 642 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 643 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 644 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 645 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, PORTCOND_EQUALS, 0x02) PORT_PLAYER(2) | |
| 638 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 639 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) | |
| 640 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 641 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 642 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 643 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 644 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 645 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("Controls", 0x03, EQUALS, 0x02) PORT_PLAYER(2) | |
| 646 | 646 | |
| 647 | 647 | PORT_START("DSW") /* 53002 */ |
| 648 | 648 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:1,2,3") |
| r15082 | r15083 | |
| 721 | 721 | CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r) |
| 722 | 722 | { |
| 723 | 723 | int player = (FPTR)param; |
| 724 | int delta = i | |
| 724 | int delta = iop | |
| 725 | 725 | delta = (delta & 0x7f) - (delta & 0x80) + 4; |
| 726 | 726 | |
| 727 | 727 | if (delta > 7) delta = 7; |
| r15082 | r15083 | |
|---|---|---|
| 92 | 92 | |
| 93 | 93 | READ16_MEMBER(atarig1_state::special_port0_r) |
| 94 | 94 | { |
| 95 | int temp = i | |
| 95 | int temp = iop | |
| 96 | 96 | if (m_cpu_to_sound_ready) temp ^= 0x1000; |
| 97 | 97 | temp ^= 0x2000; /* A2DOK always high for now */ |
| 98 | 98 | return temp; |
| r15082 | r15083 | |
| 111 | 111 | |
| 112 | 112 | /* Pit Fighter has no A2D, just another input port */ |
| 113 | 113 | if (m_is_pitfight) |
| 114 | return i | |
| 114 | return iop | |
| 115 | 115 | |
| 116 | 116 | /* otherwise, assume it's hydra */ |
| 117 | 117 | if (m_which_input < 3) |
| 118 | return i | |
| 118 | return iop | |
| 119 | 119 | |
| 120 | 120 | return 0; |
| 121 | 121 | } |
| r15082 | r15083 | |
| 247 | 247 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 248 | 248 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 249 | 249 | PORT_SERVICE( 0x4000, IP_ACTIVE_LOW ) |
| 250 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 250 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 251 | 251 | |
| 252 | 252 | PORT_START("ADC0") /* ADC 0 @ fc8000 */ |
| 253 | 253 | PORT_BIT( 0x00ff, 0x0080, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) |
| r15082 | r15083 | |
| 279 | 279 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 280 | 280 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 281 | 281 | PORT_SERVICE( 0x4000, IP_ACTIVE_LOW ) |
| 282 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 282 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 283 | 283 | |
| 284 | 284 | PORT_START("ADC0") /* fc8000 */ |
| 285 | 285 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) |
| r15082 | r15083 | |
| 324 | 324 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 325 | 325 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 326 | 326 | PORT_SERVICE( 0x4000, IP_ACTIVE_LOW ) |
| 327 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 327 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 328 | 328 | |
| 329 | 329 | PORT_START("ADC0") /* fc8000 */ |
| 330 | 330 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 90 | 90 | |
| 91 | 91 | READ16_MEMBER(toobin_state::special_port1_r) |
| 92 | 92 | { |
| 93 | int result = i | |
| 93 | int result = iop | |
| 94 | 94 | if (atarigen_get_hblank(*machine().primary_screen)) result ^= 0x8000; |
| 95 | 95 | if (m_cpu_to_sound_ready) result ^= 0x2000; |
| 96 | 96 | return result; |
| r15082 | r15083 | |
| 158 | 158 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 159 | 159 | PORT_SERVICE( 0x1000, IP_ACTIVE_LOW ) |
| 160 | 160 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 161 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 161 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 162 | 162 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 163 | 163 | |
| 164 | 164 | PORT_INCLUDE( atarijsa_i ) /* audio port */ |
| r15082 | r15083 | |
|---|---|---|
| 299 | 299 | |
| 300 | 300 | READ16_MEMBER(midas_state::hammer_sensor_r) |
| 301 | 301 | { |
| 302 | if (i | |
| 302 | if (iop | |
| 303 | 303 | return 0xffff; |
| 304 | 304 | |
| 305 | return (i | |
| 305 | return (iop | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | WRITE16_MEMBER(midas_state::hammer_coin_w) |
| r15082 | r15083 | |
|---|---|---|
| 321 | 321 | There are 4 possible combinations for colour select via SW7, colours vary based on software installed. |
| 322 | 322 | */ |
| 323 | 323 | |
| 324 | switch(i | |
| 324 | switch(state->iop | |
| 325 | 325 | { |
| 326 | 326 | case 0x00: |
| 327 | 327 | // restore defaults |
| r15082 | r15083 | |
| 380 | 380 | READ8_MEMBER(aristmk4_state::ldsw) |
| 381 | 381 | { |
| 382 | 382 | |
| 383 | int U3_p2_ret= i | |
| 383 | int U3_p2_ret= iop | |
| 384 | 384 | if(U3_p2_ret & 0x1) |
| 385 | 385 | { |
| 386 | 386 | return 0; |
| 387 | 387 | } |
| 388 | return m_cgdrsw = i | |
| 388 | return m_cgdrsw = iop | |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | READ8_MEMBER(aristmk4_state::cgdrr) |
| r15082 | r15083 | |
| 420 | 420 | READ8_MEMBER(aristmk4_state::u3_p2) |
| 421 | 421 | { |
| 422 | 422 | |
| 423 | int u3_p2_ret= input_port_read(machine(), "5002"); | |
| 424 | int u3_p3_ret= input_port_read(machine(), "5003"); | |
| 423 | int u3_p2_ret= ioport("5002")->read(); | |
| 424 | int u3_p3_ret= ioport("5003")->read(); | |
| 425 | 425 | |
| 426 | 426 | output_set_lamp_value(19, (u3_p2_ret >> 4) & 1); //auditkey light |
| 427 | 427 | output_set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light |
| r15082 | r15083 | |
| 434 | 434 | |
| 435 | 435 | if (m_inscrd==0) |
| 436 | 436 | { |
| 437 | m_inscrd=i | |
| 437 | m_inscrd=iop | |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | if (m_inscrd==1) |
| r15082 | r15083 | |
| 446 | 446 | READ8_MEMBER(aristmk4_state::u3_p3) |
| 447 | 447 | { |
| 448 | 448 | |
| 449 | int u3_p3_ret= i | |
| 449 | int u3_p3_ret= iop | |
| 450 | 450 | |
| 451 | 451 | if ((m_printer_motor)==1) // Printer Motor Off |
| 452 | 452 | |
| r15082 | r15083 | |
| 474 | 474 | switch(m_insnote) |
| 475 | 475 | { |
| 476 | 476 | case 0x01: |
| 477 | bv_p0_ret=i | |
| 477 | bv_p0_ret=iop | |
| 478 | 478 | m_insnote++; |
| 479 | 479 | break; |
| 480 | 480 | case 0x02: |
| r15082 | r15083 | |
| 496 | 496 | int bv_p1_ret=0x00; |
| 497 | 497 | |
| 498 | 498 | if (m_insnote==0) |
| 499 | m_insnote=i | |
| 499 | m_insnote=iop | |
| 500 | 500 | |
| 501 | 501 | if (m_insnote==1) |
| 502 | 502 | bv_p1_ret=0x08; |
| r15082 | r15083 | |
| 645 | 645 | { |
| 646 | 646 | aristmk4_state *state = device->machine().driver_data<aristmk4_state>(); |
| 647 | 647 | |
| 648 | int ret= | |
| 648 | int ret=s | |
| 649 | 649 | |
| 650 | 650 | // Not expecting to read anything from port B on the AY8910's ( controls BC1, BC2 and BDIR ) |
| 651 | 651 | // However there are extra 4 bits not going to the AY8910's on the schematics, which get read from here. |
| r15082 | r15083 | |
| 1561 | 1561 | |
| 1562 | 1562 | static READ8_DEVICE_HANDLER(pa1_r) |
| 1563 | 1563 | { |
| 1564 | return ( | |
| 1564 | return ( | |
| 1565 | 1565 | } |
| 1566 | 1566 | |
| 1567 | 1567 | static READ8_DEVICE_HANDLER(pb1_r) |
| 1568 | 1568 | { |
| 1569 | return ( | |
| 1569 | return ( | |
| 1570 | 1570 | } |
| 1571 | 1571 | |
| 1572 | 1572 | static READ8_DEVICE_HANDLER(pc1_r) |
| r15082 | r15083 | |
| 1630 | 1630 | static MACHINE_RESET( aristmk4 ) |
| 1631 | 1631 | { |
| 1632 | 1632 | /* mark 4 has a link on the motherboard to switch between 1.5MHz and 3MHz clock speed */ |
| 1633 | switch(in | |
| 1633 | switch(machine.root_device().ioport | |
| 1634 | 1634 | { |
| 1635 | 1635 | case 0x00: |
| 1636 | 1636 | machine.device("maincpu")->set_unscaled_clock(MAIN_CLOCK/4); // 3 MHz |
| r15082 | r15083 | |
| 1659 | 1659 | Note: The use of 1 Hz in the timer is to avoid unintentional triggering the NMI ( ie.. hold down L for at least 1 second ) |
| 1660 | 1660 | */ |
| 1661 | 1661 | |
| 1662 | if( | |
| 1662 | if( | |
| 1663 | 1663 | { |
| 1664 | 1664 | cputag_set_input_line( timer.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE ); |
| 1665 | 1665 | } |
| r15082 | r15083 | |
|---|---|---|
| 25 | 25 | static void update_plunger(running_machine &machine) |
| 26 | 26 | { |
| 27 | 27 | videopin_state *state = machine.driver_data<videopin_state>(); |
| 28 | UINT8 val = i | |
| 28 | UINT8 val = state->iop | |
| 29 | 29 | |
| 30 | 30 | if (state->m_prev != val) |
| 31 | 31 | { |
| r15082 | r15083 | |
| 94 | 94 | // signals received. This results in the MPU displaying the |
| 95 | 95 | // ball being shot onto the playfield at a certain speed. |
| 96 | 96 | |
| 97 | UINT8 val = i | |
| 97 | UINT8 val = iop | |
| 98 | 98 | |
| 99 | 99 | if (plunger >= 0.000 && plunger <= 0.001) |
| 100 | 100 | { |
| r15082 | r15083 | |
| 258 | 258 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 259 | 259 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 260 | 260 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Nudge") PORT_CODE(KEYCODE_SPACE) |
| 261 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 261 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 262 | 262 | |
| 263 | 263 | PORT_START("IN2") |
| 264 | 264 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Ball Shooter") PORT_CODE(KEYCODE_DOWN) |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | { |
| 51 | 51 | UINT8 val = 0; |
| 52 | 52 | |
| 53 | if (i | |
| 53 | if (iop | |
| 54 | 54 | { |
| 55 | 55 | val |= 0x80; |
| 56 | 56 | } |
| 57 | if (i | |
| 57 | if (iop | |
| 58 | 58 | { |
| 59 | 59 | val |= 0x40; |
| 60 | 60 | } |
| r15082 | r15083 | |
| 65 | 65 | |
| 66 | 66 | static READ8_DEVICE_HANDLER( runaway_pot_r ) |
| 67 | 67 | { |
| 68 | return ( | |
| 68 | return ( | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | |
| r15082 | r15083 | |
| 107 | 107 | static INPUT_PORTS_START( qwak ) |
| 108 | 108 | PORT_START("3000D7") /* 3000 D7 */ |
| 109 | 109 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 110 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 110 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 111 | 111 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 112 | 112 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 113 | 113 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 159 | 159 | static INPUT_PORTS_START( runaway ) |
| 160 | 160 | PORT_START("3000D7") /* 3000 D7 */ |
| 161 | 161 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 162 | PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 162 | PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 163 | 163 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 164 | 164 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 165 | 165 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
|---|---|---|
| 306 | 306 | PORT_DIPSETTING( 0x1c, "40k 120k 200k 400k 600k 1m" ) |
| 307 | 307 | PORT_DIPSETTING( 0x0c, "40k 140k 250k 400k 700k 1m" ) |
| 308 | 308 | // bonus scores for 1, 2 or 3 lives |
| 309 | PORT_DIPSETTING( 0x14, "50k 150k 300k 500k 700k 1m" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 310 | PORT_DIPSETTING( 0x04, "40k 120k and every 120k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 311 | PORT_DIPSETTING( 0x18, "40k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 312 | PORT_DIPSETTING( 0x08, "50k 150k 300k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 313 | PORT_DIPSETTING( 0x10, "40k 120k 200k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 309 | PORT_DIPSETTING( 0x14, "50k 150k 300k 500k 700k 1m" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 310 | PORT_DIPSETTING( 0x04, "40k 120k and every 120k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 311 | PORT_DIPSETTING( 0x18, "40k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 312 | PORT_DIPSETTING( 0x08, "50k 150k 300k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 313 | PORT_DIPSETTING( 0x10, "40k 120k 200k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 314 | 314 | // bonus scores for 5 lives |
| 315 | PORT_DIPSETTING( 0x14, "40k 120k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) | |
| 316 | PORT_DIPSETTING( 0x04, "50k 150k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) | |
| 317 | PORT_DIPSETTING( 0x18, "50k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) | |
| 318 | PORT_DIPSETTING( 0x08, "60k 200k and every 200k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) | |
| 319 | PORT_DIPSETTING( 0x10, "50k" ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) | |
| 315 | PORT_DIPSETTING( 0x14, "40k 120k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) | |
| 316 | PORT_DIPSETTING( 0x04, "50k 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) | |
| 317 | PORT_DIPSETTING( 0x18, "50k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) | |
| 318 | PORT_DIPSETTING( 0x08, "60k 200k and every 200k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) | |
| 319 | PORT_DIPSETTING( 0x10, "50k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) | |
| 320 | 320 | // bonus scores for common |
| 321 | 321 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 322 | 322 | PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:3,2,1") |
| r15082 | r15083 | |
| 493 | 493 | |
| 494 | 494 | ***************************************************************************/ |
| 495 | 495 | |
| 496 | static READ8_DEVICE_HANDLER( dipA_l ) { return input_port_read(device->machine(), "DSW1"); } // dips A | |
| 497 | static READ8_DEVICE_HANDLER( dipA_h ) { return input_port_read(device->machine(), "DSW1") >> 4; } // dips A | |
| 498 | static READ8_DEVICE_HANDLER( dipB_l ) { return input_port_read(device->machine(), "DSW2"); } // dips B | |
| 499 | static READ8_DEVICE_HANDLER( dipB_h ) { return input_port_read(device->machine(), "DSW2") >> 4; } // dips B | |
| 496 | static READ8_DEVICE_HANDLER( dipA_l ) { return device->machine().root_device().ioport("DSW1")->read(); } // dips A | |
| 497 | static READ8_DEVICE_HANDLER( dipA_h ) { return device->machine().root_device().ioport("DSW1")->read() >> 4; } // dips A | |
| 498 | static READ8_DEVICE_HANDLER( dipB_l ) { return device->machine().root_device().ioport("DSW2")->read(); } // dips B | |
| 499 | static READ8_DEVICE_HANDLER( dipB_h ) { return device->machine().root_device().ioport("DSW2")->read() >> 4; } // dips B | |
| 500 | 500 | |
| 501 | 501 | static WRITE8_DEVICE_HANDLER( out_coin0 ) |
| 502 | 502 | { |
| r15082 | r15083 | |
|---|---|---|
| 361 | 361 | switch (offset << 1) |
| 362 | 362 | { |
| 363 | 363 | case 0: |
| 364 | return i | |
| 364 | return iop | |
| 365 | 365 | case 2: |
| 366 | return i | |
| 366 | return iop | |
| 367 | 367 | case 8: |
| 368 | return i | |
| 368 | return iop | |
| 369 | 369 | case 10: /* ? */ |
| 370 | 370 | case 12: |
| 371 | 371 | return 0; |
| r15082 | r15083 | |
| 952 | 952 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 953 | 953 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 954 | 954 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 955 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 955 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 956 | 956 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 957 | 957 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 958 | 958 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1039 | 1039 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1040 | 1040 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1041 | 1041 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1042 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1042 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1043 | 1043 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1044 | 1044 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1045 | 1045 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1159 | 1159 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1160 | 1160 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1161 | 1161 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1162 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1162 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1163 | 1163 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1164 | 1164 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1165 | 1165 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1247 | 1247 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1248 | 1248 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1249 | 1249 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1250 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1250 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1251 | 1251 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1252 | 1252 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1253 | 1253 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1309 | 1309 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1310 | 1310 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1311 | 1311 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1312 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1312 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1313 | 1313 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1314 | 1314 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1315 | 1315 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1371 | 1371 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1372 | 1372 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1373 | 1373 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1374 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1374 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1375 | 1375 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1376 | 1376 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1377 | 1377 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1446 | 1446 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1447 | 1447 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1448 | 1448 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1449 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1449 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1450 | 1450 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1451 | 1451 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1452 | 1452 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1516 | 1516 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1517 | 1517 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1518 | 1518 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // must be high to avoid endless loops |
| 1519 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1519 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1520 | 1520 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1521 | 1521 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1522 | 1522 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1593 | 1593 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1594 | 1594 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1595 | 1595 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1596 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1596 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1597 | 1597 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1598 | 1598 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1599 | 1599 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1671 | 1671 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1672 | 1672 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1673 | 1673 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1674 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1674 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1675 | 1675 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1676 | 1676 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1677 | 1677 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1814 | 1814 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1815 | 1815 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1816 | 1816 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1817 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1817 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // to be confirmed | |
| 1818 | 1818 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1819 | 1819 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1820 | 1820 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 2227 | 2227 | tumbleb_state *state = machine.driver_data<tumbleb_state>(); |
| 2228 | 2228 | |
| 2229 | 2229 | /* copy protection data every reset */ |
| 2230 | UINT16 *PROTDATA = (UINT16*) | |
| 2230 | UINT16 *PROTDATA = (UINT16*)sta | |
| 2231 | 2231 | int i, len = state->memregion("user1")->bytes(); |
| 2232 | 2232 | |
| 2233 | 2233 | for (i = 0; i < len / 2; i++) |
| r15082 | r15083 | |
| 3441 | 3441 | //mame_printf_debug("bcstory_io %06x\n",cpu_get_pc(&space.device())); |
| 3442 | 3442 | |
| 3443 | 3443 | if (cpu_get_pc(&space.device())==0x0560) return 0x1a0; |
| 3444 | else return i | |
| 3444 | else return iop | |
| 3445 | 3445 | } |
| 3446 | 3446 | |
| 3447 | 3447 | static DRIVER_INIT ( bcstory ) |
| r15082 | r15083 | |
| 3456 | 3456 | { |
| 3457 | 3457 | |
| 3458 | 3458 | tumbleb_state *state = machine.driver_data<tumbleb_state>(); |
| 3459 | // UINT16 *HCROM = (UINT16*)machine.root_device().memregion("maincpu")->base(); | |
| 3460 | UINT16 *PROTDATA = (UINT16*)machine.root_device().memregion("user1")->base(); | |
| 3459 | // UINT16 *HCROM = (UINT16*)state->memregion("maincpu")->base(); | |
| 3460 | UINT16 *PROTDATA = (UINT16*)state->memregion("user1")->base(); | |
| 3461 | 3461 | int i, len = state->memregion("user1")->bytes(); |
| 3462 | 3462 | /* simulate RAM initialization done by the protection MCU */ |
| 3463 | 3463 | /* verified on real hardware */ |
| r15082 | r15083 | |
|---|---|---|
| 223 | 223 | /* shift at 1 == return one, >1 = return button states */ |
| 224 | 224 | if (state->m_cd32_shifter[i] == 0) |
| 225 | 225 | potgor &= ~p9dat; /* shift at zero == return zero */ |
| 226 | if (state->m_cd32_shifter[i] >= 2 && (i | |
| 226 | if (state->m_cd32_shifter[i] >= 2 && (state->iop | |
| 227 | 227 | potgor &= ~p9dat; |
| 228 | 228 | } |
| 229 | 229 | return potgor; |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | public: |
| 49 | 49 | bmcpokr_state(const machine_config &mconfig, device_type type, const char *tag) |
| 50 | 50 | : driver_device(mconfig, type, tag), |
| 51 | m_maincpu(*this,"maincpu") | |
| 51 | m_maincpu(*this,"maincpu"), | |
| 52 | m_videoram(*this, "videoram") | |
| 52 | 53 | { } |
| 53 | 54 | |
| 55 | DECLARE_READ16_MEMBER( bmcpokr_unk_r ) | |
| 56 | { | |
| 57 | return space.machine().rand(); | |
| 58 | } | |
| 59 | ||
| 54 | 60 | required_device<cpu_device> m_maincpu; |
| 61 | required_shared_ptr<UINT16> m_videoram; | |
| 55 | 62 | }; |
| 56 | 63 | |
| 57 | 64 | |
| 58 | 65 | |
| 59 | 66 | static ADDRESS_MAP_START( bmcpokr_mem, AS_PROGRAM, 16, bmcpokr_state ) |
| 60 | 67 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 68 | AM_RANGE(0x210000, 0x21ffff) AM_RAM | |
| 69 | ||
| 70 | AM_RANGE(0x2c0000, 0x2dffff) AM_RAM AM_SHARE("videoram") | |
| 71 | ||
| 72 | AM_RANGE(0x2FF800, 0x2FFFFF) AM_RAM | |
| 73 | AM_RANGE(0x34001A, 0x34001B) AM_READ(bmcpokr_unk_r) | |
| 74 | ||
| 61 | 75 | ADDRESS_MAP_END |
| 62 | 76 | |
| 63 | 77 | static INPUT_PORTS_START( bmcpokr ) |
| r15082 | r15083 | |
| 185 | 199 | |
| 186 | 200 | SCREEN_UPDATE_IND16( bmcpokr ) |
| 187 | 201 | { |
| 202 | bmcpokr_state *state = screen.machine().driver_data<bmcpokr_state>(); | |
| 203 | const gfx_element *gfx = screen.machine().gfx[0]; | |
| 204 | ||
| 205 | int count = 0; | |
| 206 | for (int y=0;y<32;y++) | |
| 207 | { | |
| 208 | for (int x=0;x<64;x++) | |
| 209 | { | |
| 210 | UINT16 data = state->m_videoram[count]; | |
| 211 | count++; | |
| 212 | ||
| 213 | drawgfx_opaque(bitmap,cliprect,gfx,data,0,0,0,x*8,y*8); | |
| 214 | ||
| 215 | } | |
| 216 | } | |
| 217 | ||
| 218 | ||
| 219 | ||
| 188 | 220 | return 0; |
| 189 | 221 | } |
| 190 | 222 | |
| r15082 | r15083 | |
| 197 | 229 | static MACHINE_CONFIG_START( bmcpokr, bmcpokr_state ) |
| 198 | 230 | MCFG_CPU_ADD("maincpu", M68000, XTAL_42MHz/4) |
| 199 | 231 | MCFG_CPU_PROGRAM_MAP(bmcpokr_mem) |
| 200 | | |
| 232 | | |
| 201 | 233 | |
| 202 | 234 | MCFG_SCREEN_ADD("screen", RASTER) |
| 203 | 235 | MCFG_SCREEN_REFRESH_RATE(60) |
| r15082 | r15083 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | CUSTOM_INPUT_MEMBER(ultratnk_state::get_joystick) |
| 28 | 28 | { |
| 29 | UINT8 joy = i | |
| 29 | UINT8 joy = iop | |
| 30 | 30 | |
| 31 | 31 | if (joy == 1) |
| 32 | 32 | { |
| r15082 | r15083 | |
| 50 | 50 | |
| 51 | 51 | /* NMI and watchdog are disabled during service mode */ |
| 52 | 52 | |
| 53 | machine.watchdog_enable(in | |
| 53 | machine.watchdog_enable(machine.root_device().ioport | |
| 54 | 54 | |
| 55 | if (in | |
| 55 | if (machine.root_device().ioport | |
| 56 | 56 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 57 | 57 | |
| 58 | 58 | machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(nmi_callback), scanline); |
| r15082 | r15083 | |
| 74 | 74 | |
| 75 | 75 | READ8_MEMBER(ultratnk_state::ultratnk_analog_r) |
| 76 | 76 | { |
| 77 | return (i | |
| 77 | return (iop | |
| 78 | 78 | } |
| 79 | 79 | READ8_MEMBER(ultratnk_state::ultratnk_coin_r) |
| 80 | 80 | { |
| 81 | return (i | |
| 81 | return (iop | |
| 82 | 82 | } |
| 83 | 83 | READ8_MEMBER(ultratnk_state::ultratnk_collision_r) |
| 84 | 84 | { |
| 85 | return (i | |
| 85 | return (iop | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | READ8_MEMBER(ultratnk_state::ultratnk_options_r) |
| 90 | 90 | { |
| 91 | return (i | |
| 91 | return (iop | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | |
| r15082 | r15083 | |
| 181 | 181 | static INPUT_PORTS_START( ultratnk ) |
| 182 | 182 | PORT_START("IN0") |
| 183 | 183 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 185 | 185 | |
| 186 | 186 | PORT_START("IN1") |
| 187 | 187 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Option 1") PORT_TOGGLE |
| r15082 | r15083 | |
|---|---|---|
| 145 | 145 | { |
| 146 | 146 | tugboat_state *state = device->machine().driver_data<tugboat_state>(); |
| 147 | 147 | if (~state->m_ctrl & 0x80) |
| 148 | return | |
| 148 | return s | |
| 149 | 149 | else if (~state->m_ctrl & 0x40) |
| 150 | return | |
| 150 | return s | |
| 151 | 151 | else if (~state->m_ctrl & 0x20) |
| 152 | return | |
| 152 | return s | |
| 153 | 153 | else if (~state->m_ctrl & 0x10) |
| 154 | return | |
| 154 | return s | |
| 155 | 155 | else |
| 156 | return | |
| 156 | return s | |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | static READ8_DEVICE_HANDLER( tugboat_ctrl_r ) |
| r15082 | r15083 | |
|---|---|---|
| 267 | 267 | static READ8_DEVICE_HANDLER( hopper_io_r ) |
| 268 | 268 | { |
| 269 | 269 | kingdrby_state *state = device->machine().driver_data<kingdrby_state>(); |
| 270 | return ( | |
| 270 | return (s | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | static WRITE8_DEVICE_HANDLER( hopper_io_w ) |
| r15082 | r15083 | |
| 300 | 300 | { |
| 301 | 301 | kingdrby_state *state = device->machine().driver_data<kingdrby_state>(); |
| 302 | 302 | if(state->m_mux_data & 0x80) |
| 303 | return | |
| 303 | return s | |
| 304 | 304 | else |
| 305 | return | |
| 305 | return s | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | static READ8_DEVICE_HANDLER( key_matrix_r ) |
| r15082 | r15083 | |
| 310 | 310 | UINT16 p1_val,p2_val; |
| 311 | 311 | UINT8 p1_res,p2_res; |
| 312 | 312 | |
| 313 | p1_val = input_port_read(device->machine(),"KEY_1P"); | |
| 314 | p2_val = input_port_read(device->machine(),"KEY_2P"); | |
| 313 | p1_val = device->machine().root_device().ioport("KEY_1P")->read(); | |
| 314 | p2_val = device->machine().root_device().ioport("KEY_2P")->read(); | |
| 315 | 315 | |
| 316 | 316 | p1_res = 0; |
| 317 | 317 | p2_res = 0; |
| r15082 | r15083 | |
| 556 | 556 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) //2p hopper i/o |
| 557 | 557 | |
| 558 | 558 | PORT_START("IN1") // ppi0 (5001) |
| 559 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 559 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") //? | |
| 560 | 560 | PORT_DIPNAME( 0x02, 0x02, "IN1" ) |
| 561 | 561 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 562 | 562 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 739 | 739 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 740 | 740 | |
| 741 | 741 | PORT_START("IN1") // ppi0 (5001) |
| 742 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VBLANK | |
| 742 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") //? | |
| 743 | 743 | PORT_DIPNAME( 0x02, 0x02, "IN1" ) |
| 744 | 744 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 745 | 745 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 101 | 101 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:7" ) |
| 102 | 102 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 103 | 103 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 104 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 104 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 105 | 105 | |
| 106 | 106 | PORT_START("CAB") /* fake port for non-memory mapped dip switch */ |
| 107 | 107 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!8" ) |
| r15082 | r15083 | |
| 113 | 113 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 114 | 114 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 115 | 115 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 116 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 117 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 118 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 119 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 116 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 117 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 118 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 119 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 120 | 120 | INPUT_PORTS_END |
| 121 | 121 | |
| 122 | 122 | static INPUT_PORTS_START( phoenixa ) |
| r15082 | r15083 | |
| 184 | 184 | PORT_DIPSETTING( 0x50, "Fast" ) |
| 185 | 185 | PORT_DIPSETTING( 0x60, "Faster" ) |
| 186 | 186 | PORT_DIPSETTING( 0x70, "Fastest" ) |
| 187 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 187 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 188 | 188 | |
| 189 | 189 | PORT_START("DSW1") |
| 190 | 190 | PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW2:1,2,3,4" ) |
| r15082 | r15083 | |
| 232 | 232 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 233 | 233 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 234 | 234 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 235 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 236 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 237 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 238 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 235 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 236 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 237 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 238 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 239 | 239 | INPUT_PORTS_END |
| 240 | 240 | |
| 241 | 241 | static INPUT_PORTS_START( falconz ) |
| r15082 | r15083 | |
| 305 | 305 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 306 | 306 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 307 | 307 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 308 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 309 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 310 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 311 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01) | |
| 308 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 309 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 310 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 311 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CAB",0x01,EQUALS,0x01) | |
| 312 | 312 | INPUT_PORTS_END |
| 313 | 313 | |
| 314 | 314 | static INPUT_PORTS_START( pleiadbl ) |
| r15082 | r15083 | |
| 381 | 381 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) |
| 382 | 382 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) |
| 383 | 383 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) ) |
| 384 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 384 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 385 | 385 | |
| 386 | 386 | PORT_START("CAB") /* fake port for non-memory mapped dip switch */ |
| 387 | 387 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| r15082 | r15083 | |
|---|---|---|
| 382 | 382 | { |
| 383 | 383 | // high byte: |
| 384 | 384 | // mask 0x1c: from sound? |
| 385 | return (machine().rand() & 0x1c00) | i | |
| 385 | return (machine().rand() & 0x1c00) | iop | |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | READ16_MEMBER(lastfght_state::lastfght_c00004_r) |
| 389 | 389 | { |
| 390 | return i | |
| 390 | return iop | |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | READ16_MEMBER(lastfght_state::lastfght_c00006_r) |
| r15082 | r15083 | |
| 395 | 395 | // low byte: |
| 396 | 396 | // bit 7 = protection? |
| 397 | 397 | // bit 5 = blitter? |
| 398 | return i | |
| 398 | return iop | |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | WRITE16_MEMBER(lastfght_state::lastfght_c00006_w) |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | READ8_MEMBER(embargo_state::input_port_bit_r) |
| 74 | 74 | { |
| 75 | return (i | |
| 75 | return (iop | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| r15082 | r15083 | |
| 97 | 97 | |
| 98 | 98 | if (m_dial_enable_1 && !m_dial_enable_2) |
| 99 | 99 | { |
| 100 | lo = input_port_read(machine(), "DIAL0"); | |
| 101 | hi = input_port_read(machine(), "DIAL1"); | |
| 100 | lo = ioport("DIAL0")->read(); | |
| 101 | hi = ioport("DIAL1")->read(); | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if (m_dial_enable_2 && !m_dial_enable_1) |
| 105 | 105 | { |
| 106 | lo = input_port_read(machine(), "DIAL2"); | |
| 107 | hi = input_port_read(machine(), "DIAL3"); | |
| 106 | lo = ioport("DIAL2")->read(); | |
| 107 | hi = ioport("DIAL3")->read(); | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | lo = 12 * lo / 256; |
| r15082 | r15083 | |
|---|---|---|
| 112 | 112 | { |
| 113 | 113 | superqix_state *state = device.machine().driver_data<superqix_state>(); |
| 114 | 114 | running_machine &machine = device.machine(); |
| 115 | UINT8 *src = | |
| 115 | UINT8 *src = sta | |
| 116 | 116 | int i, len = state->memregion("samples")->bytes(); |
| 117 | 117 | |
| 118 | 118 | /* convert 8-bit unsigned samples to 8-bit signed */ |
| r15082 | r15083 | |
| 174 | 174 | { |
| 175 | 175 | superqix_state *state = device->machine().driver_data<superqix_state>(); |
| 176 | 176 | // logerror("%04x: in4_mcu_r\n",cpu_get_pc(&space->device())); |
| 177 | return | |
| 177 | return s | |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | static READ8_DEVICE_HANDLER( sqix_from_mcu_r ) |
| r15082 | r15083 | |
| 255 | 255 | { |
| 256 | 256 | if ((m_port1 & 0x10) == 0) |
| 257 | 257 | { |
| 258 | return i | |
| 258 | return iop | |
| 259 | 259 | } |
| 260 | 260 | else if ((m_port1 & 0x20) == 0) |
| 261 | 261 | { |
| 262 | return i | |
| 262 | return iop | |
| 263 | 263 | } |
| 264 | 264 | else if ((m_port1 & 0x40) == 0) |
| 265 | 265 | { |
| r15082 | r15083 | |
| 272 | 272 | |
| 273 | 273 | READ8_MEMBER(superqix_state::sqixu_mcu_p0_r) |
| 274 | 274 | { |
| 275 | return i | |
| 275 | return iop | |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | WRITE8_MEMBER(superqix_state::sqixu_mcu_p2_w) |
| r15082 | r15083 | |
| 325 | 325 | |
| 326 | 326 | static READ8_DEVICE_HANDLER( bootleg_in0_r ) |
| 327 | 327 | { |
| 328 | return BITSWAP8( | |
| 328 | return BITSWAP8( | |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | WRITE8_MEMBER(superqix_state::bootleg_flipscreen_w) |
| r15082 | r15083 | |
| 352 | 352 | int newpos; |
| 353 | 353 | |
| 354 | 354 | /* get the new position and adjust the result */ |
| 355 | newpos = i | |
| 355 | newpos = state->iop | |
| 356 | 356 | if (newpos != state->m_oldpos[player]) |
| 357 | 357 | { |
| 358 | 358 | state->m_sign[player] = ((newpos - state->m_oldpos[player]) & 0x80) >> 7; |
| r15082 | r15083 | |
| 429 | 429 | switch (data & 0x07) |
| 430 | 430 | { |
| 431 | 431 | case 0x0: // dsw A |
| 432 | m_portA_in = i | |
| 432 | m_portA_in = iop | |
| 433 | 433 | break; |
| 434 | 434 | |
| 435 | 435 | case 0x1: // dsw B |
| 436 | m_portA_in = i | |
| 436 | m_portA_in = iop | |
| 437 | 437 | break; |
| 438 | 438 | |
| 439 | 439 | case 0x2: |
| r15082 | r15083 | |
| 478 | 478 | { |
| 479 | 479 | superqix_state *state = device->machine().driver_data<superqix_state>(); |
| 480 | 480 | // logerror("%04x: ay_port_a_r and mcu_pending is %d\n",cpu_get_pc(&space->device()),state->m_from_mcu_pending); |
| 481 | return | |
| 481 | return s | |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | /************************************************************************** |
| r15082 | r15083 | |
| 499 | 499 | { |
| 500 | 500 | case 0x01: |
| 501 | 501 | { |
| 502 | UINT8 p = i | |
| 502 | UINT8 p = iop | |
| 503 | 503 | if ((p & 0x3f) == 0) p |= 0x40; |
| 504 | 504 | return p; |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | case 0x02: return i | |
| 507 | case 0x02: return iop | |
| 508 | 508 | |
| 509 | case 0x04: return input_port_read(machine(), "DSW1"); | |
| 510 | case 0x08: return input_port_read(machine(), "DSW2"); | |
| 509 | case 0x04: return ioport("DSW1")->read(); | |
| 510 | case 0x08: return ioport("DSW2")->read(); | |
| 511 | 511 | |
| 512 | 512 | case 0x80: m_curr_player = 0; return 0; |
| 513 | 513 | case 0x81: m_curr_player = 1; return 0; |
| r15082 | r15083 | |
| 521 | 521 | { |
| 522 | 522 | // logerror("%04x: ay_port_a_r\n",cpu_get_pc(&space->device())); |
| 523 | 523 | /* bits 76------ MCU status bits */ |
| 524 | return (device->machine().rand() & 0xc0) | | |
| 524 | return (device->machine().rand() & 0xc0) | | |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | |
| r15082 | r15083 | |
| 867 | 867 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 868 | 868 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 869 | 869 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 870 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 870 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* ??? */ | |
| 871 | 871 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 872 | 872 | |
| 873 | 873 | PORT_START("P2") |
| r15082 | r15083 | |
|---|---|---|
| 86 | 86 | /* accessed */ |
| 87 | 87 | PORT_START("DSW0") |
| 88 | 88 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") |
| 89 | PORT_DIPSETTING( 0x00, "2" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x80) | |
| 90 | PORT_DIPSETTING( 0x01, "3" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x80) | |
| 91 | PORT_DIPSETTING( 0x02, "4" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x80) | |
| 92 | PORT_DIPSETTING( 0x03, "5" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x80) | |
| 93 | PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x00) | |
| 94 | PORT_DIPSETTING( 0x01, "6" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x00) | |
| 95 | PORT_DIPSETTING( 0x02, "7" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x00) | |
| 96 | PORT_DIPSETTING( 0x03, "8" ) PORT_CONDITION("DSW0", 0x80, PORTCOND_EQUALS, 0x00) | |
| 89 | PORT_DIPSETTING( 0x00, "2" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x80) | |
| 90 | PORT_DIPSETTING( 0x01, "3" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x80) | |
| 91 | PORT_DIPSETTING( 0x02, "4" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x80) | |
| 92 | PORT_DIPSETTING( 0x03, "5" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x80) | |
| 93 | PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x00) | |
| 94 | PORT_DIPSETTING( 0x01, "6" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x00) | |
| 95 | PORT_DIPSETTING( 0x02, "7" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x00) | |
| 96 | PORT_DIPSETTING( 0x03, "8" ) PORT_CONDITION("DSW0", 0x80, EQUALS, 0x00) | |
| 97 | 97 | |
| 98 | 98 | PORT_DIPNAME( 0x0c, 0x00, "Extended Play At" ) PORT_DIPLOCATION("SW3:3,4") |
| 99 | 99 | PORT_DIPSETTING( 0x00, "10000" ) |
| r15082 | r15083 | |
|---|---|---|
| 103 | 103 | |
| 104 | 104 | READ16_MEMBER(cyberbal_state::special_port0_r) |
| 105 | 105 | { |
| 106 | int temp = i | |
| 106 | int temp = iop | |
| 107 | 107 | if (m_cpu_to_sound_ready) temp ^= 0x0080; |
| 108 | 108 | return temp; |
| 109 | 109 | } |
| r15082 | r15083 | |
| 111 | 111 | |
| 112 | 112 | READ16_MEMBER(cyberbal_state::special_port2_r) |
| 113 | 113 | { |
| 114 | int temp = i | |
| 114 | int temp = iop | |
| 115 | 115 | if (m_cpu_to_sound_ready) temp ^= 0x2000; |
| 116 | 116 | return temp; |
| 117 | 117 | } |
| r15082 | r15083 | |
| 306 | 306 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 307 | 307 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 308 | 308 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 309 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 309 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 310 | 310 | |
| 311 | 311 | PORT_START("IN2") /* fake port for screen switching */ |
| 312 | 312 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 346 | 346 | PORT_START("IN2") /* fc4000 */ |
| 347 | 347 | PORT_BIT( 0x1fff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 348 | 348 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 349 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 349 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 350 | 350 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) |
| 351 | 351 | |
| 352 | 352 | PORT_INCLUDE( atarijsa_ii ) /* audio board port */ |
| r15082 | r15083 | |
|---|---|---|
| 332 | 332 | { |
| 333 | 333 | switch (offset) |
| 334 | 334 | { |
| 335 | case 0: return input_port_read(machine(), "ADC_BANK"); | |
| 336 | case 1: return input_port_read(machine(), "ADC_PITCH"); | |
| 337 | case 2: return input_port_read(machine(), "ADC_MISSILE"); | |
| 338 | case 3: return input_port_read(machine(), "ADC_HOVER"); | |
| 335 | case 0: return ioport("ADC_BANK")->read(); | |
| 336 | case 1: return ioport("ADC_PITCH")->read(); | |
| 337 | case 2: return ioport("ADC_MISSILE")->read(); | |
| 338 | case 3: return ioport("ADC_HOVER")->read(); | |
| 339 | 339 | default: return 0; |
| 340 | 340 | } |
| 341 | 341 | } |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | if (row<4) |
| 50 | 50 | { |
| 51 | value = (in | |
| 51 | value = (machine. | |
| 52 | 52 | } |
| 53 | 53 | else |
| 54 | 54 | { |
| 55 | value = (in | |
| 55 | value = (machine. | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | return value; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | READ16_MEMBER(sc4_state::sc4_cs1_r) | |
| 62 | { | |
| 63 | int pc = cpu_get_pc(&space.device()); | |
| 64 | ||
| 65 | if (offset<0x100000/2) | |
| 66 | { | |
| 67 | // allow some sets to boot, should probably return this data on Mbus once we figure out what it is | |
| 68 | if ((pc == m_chk41addr) && (offset == m_chk41addr>>1)) | |
| 69 | { | |
| 70 | UINT32 r_A0 = cpu_get_reg(&space.device(), M68K_A0); | |
| 71 | UINT32 r_A1 = cpu_get_reg(&space.device(), M68K_A1); | |
| 72 | UINT32 r_D1 = cpu_get_reg(&space.device(), M68K_D1); | |
| 73 | ||
| 74 | if (r_D1 == 0x7) | |
| 75 | { | |
| 76 | bool valid = true; | |
| 77 | for (int i=0;i<8;i++) | |
| 78 | { | |
| 79 | UINT8 code = space.read_byte(r_A0+i); | |
| 80 | if (code != 0xff) // assume our mbus code just returns 0xff for now.. | |
| 81 | valid = false; | |
| 82 | } | |
| 83 | ||
| 84 | if (valid && m_dochk41) | |
| 85 | { | |
| 86 | m_dochk41 = false; | |
| 87 | // the value is actually random.. probably based on other reads | |
| 88 | // making this a comparison? | |
| 89 | printf("Ident code? "); | |
| 90 | for (int i=0;i<8;i++) | |
| 91 | { | |
| 92 | UINT8 code = space.read_byte(r_A1+i); | |
| 93 | printf("%02x",code); | |
| 94 | space.write_byte(r_A0+i, code); | |
| 95 | } | |
| 96 | printf("\n"); | |
| 97 | } | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | ||
| 102 | return m_cpuregion[offset]; | |
| 103 | } | |
| 104 | else | |
| 105 | logerror("%08x maincpu read access offset %08x mem_mask %04x cs %d\n", pc, offset*2, mem_mask, 1); | |
| 106 | ||
| 107 | return 0x0000; | |
| 108 | } | |
| 109 | ||
| 61 | 110 | READ16_MEMBER(sc4_state::sc4_mem_r) |
| 62 | 111 | { |
| 63 | 112 | int pc = cpu_get_pc(&space.device()); |
| r15082 | r15083 | |
| 70 | 119 | switch ( cs ) |
| 71 | 120 | { |
| 72 | 121 | case 1: |
| 73 | if (offset<0x100000/2) | |
| 74 | { | |
| 75 | // allow some sets to boot, should probably return this data on Mbus once we figure out what it is | |
| 76 | if ((pc == m_chk41addr) && (offset == m_chk41addr>>1)) | |
| 77 | { | |
| 78 | UINT32 r_A0 = cpu_get_reg(&space.device(), M68K_A0); | |
| 79 | UINT32 r_A1 = cpu_get_reg(&space.device(), M68K_A1); | |
| 80 | UINT32 r_D1 = cpu_get_reg(&space.device(), M68K_D1); | |
| 122 | return sc4_cs1_r(space,offset,mem_mask); | |
| 81 | 123 | |
| 82 | if (r_D1 == 0x7) | |
| 83 | { | |
| 84 | bool valid = true; | |
| 85 | for (int i=0;i<8;i++) | |
| 86 | { | |
| 87 | UINT8 code = space.read_byte(r_A0+i); | |
| 88 | if (code != 0xff) // assume our mbus code just returns 0xff for now.. | |
| 89 | valid = false; | |
| 90 | } | |
| 91 | 124 | |
| 92 | if (valid && m_dochk41) | |
| 93 | { | |
| 94 | m_dochk41 = false; | |
| 95 | // the value is actually random.. probably based on other reads | |
| 96 | // making this a comparison? | |
| 97 | printf("Ident code? "); | |
| 98 | for (int i=0;i<8;i++) | |
| 99 | { | |
| 100 | UINT8 code = space.read_byte(r_A1+i); | |
| 101 | printf("%02x",code); | |
| 102 | space.write_byte(r_A0+i, code); | |
| 103 | } | |
| 104 | printf("\n"); | |
| 105 | } | |
| 106 | } | |
| 107 | } | |
| 108 | 125 | |
| 109 | ||
| 110 | return m_cpuregion[offset]; | |
| 111 | ||
| 112 | } | |
| 113 | else | |
| 114 | logerror("%08x maincpu read access offset %08x mem_mask %04x cs %d\n", pc, offset*2, mem_mask, cs); | |
| 115 | break; | |
| 116 | ||
| 117 | 126 | case 2: |
| 118 | 127 | base = 0x800000/2; |
| 119 | 128 | end = base + 0x10000 / 2; |
| r15082 | r15083 | |
| 378 | 387 | } |
| 379 | 388 | |
| 380 | 389 | static ADDRESS_MAP_START( sc4_map, AS_PROGRAM, 16, sc4_state ) |
| 390 | AM_RANGE(0x0000000, 0x0fffff) AM_READ(sc4_cs1_r) // technically we should be going through the cs handler, but this is always set to ROM, and assuming that is a lot faster | |
| 381 | 391 | AM_RANGE(0x0000000, 0xffffff) AM_READWRITE(sc4_mem_r, sc4_mem_w) |
| 382 | 392 | ADDRESS_MAP_END |
| 383 | 393 | |
| 394 | ||
| 395 | ||
| 396 | ||
| 397 | READ32_MEMBER(sc4_adder4_state::adder4_mem_r) | |
| 398 | { | |
| 399 | int pc = cpu_get_pc(&space.device()); | |
| 400 | int cs = m68340_get_cs(m_adder4cpu, offset * 4); | |
| 401 | ||
| 402 | switch ( cs ) | |
| 403 | { | |
| 404 | case 1: | |
| 405 | return m_adder4cpuregion[offset]; | |
| 406 | ||
| 407 | case 2: | |
| 408 | offset &=0x3fff; | |
| 409 | return m_adder4ram[offset]; | |
| 410 | ||
| 411 | default: | |
| 412 | logerror("%08x adder4cpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 413 | ||
| 414 | } | |
| 415 | ||
| 416 | return 0x0000; | |
| 417 | } | |
| 418 | ||
| 419 | WRITE32_MEMBER(sc4_adder4_state::adder4_mem_w) | |
| 420 | { | |
| 421 | int pc = cpu_get_pc(&space.device()); | |
| 422 | int cs = m68340_get_cs(m_adder4cpu, offset * 4); | |
| 423 | ||
| 424 | switch ( cs ) | |
| 425 | { | |
| 426 | default: | |
| 427 | logerror("%08x adder4cpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); | |
| 428 | ||
| 429 | case 2: | |
| 430 | offset &=0x3fff; | |
| 431 | COMBINE_DATA(&m_adder4ram[offset]); | |
| 432 | break; | |
| 433 | ||
| 434 | ||
| 435 | } | |
| 436 | ||
| 437 | } | |
| 438 | ||
| 384 | 439 | static ADDRESS_MAP_START( sc4_adder4_map, AS_PROGRAM, 32, sc4_adder4_state ) |
| 385 | AM_RANGE(0x000000, 0x | |
| 440 | AM_RANGE(0x00000000, 0x | |
| 386 | 441 | ADDRESS_MAP_END |
| 387 | 442 | |
| 388 | 443 | |
| r15082 | r15083 | |
| 722 | 777 | MACHINE_CONFIG_END |
| 723 | 778 | |
| 724 | 779 | |
| 780 | ||
| 781 | static MACHINE_START( adder4 ) | |
| 782 | { | |
| 783 | sc4_adder4_state *state = machine.driver_data<sc4_adder4_state>(); | |
| 784 | state->m_adder4cpuregion = (UINT32*)state->memregion( "adder4" )->base(); | |
| 785 | state->m_adder4ram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 786 | MACHINE_START_CALL(sc4); | |
| 787 | } | |
| 788 | ||
| 725 | 789 | MACHINE_CONFIG_DERIVED_CLASS( sc4_adder4, sc4, sc4_adder4_state ) |
| 726 | 790 | MCFG_CPU_ADD("adder4", M68340, 25175000) // 68340 (CPU32 core) |
| 727 | 791 | MCFG_CPU_PROGRAM_MAP(sc4_adder4_map) |
| 792 | ||
| 793 | MCFG_MACHINE_START( adder4 ) | |
| 728 | 794 | MACHINE_CONFIG_END |
| 729 | 795 | |
| 730 | 796 |
| r15082 | r15083 | |
|---|---|---|
| 243 | 243 | PORT_START("IN2") |
| 244 | 244 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 245 | 245 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 246 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 246 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 247 | 247 | |
| 248 | 248 | PORT_START("DSW") |
| 249 | 249 | PORT_DIPNAME( 0x07, 0x00, "Coin/Time" ) |
| r15082 | r15083 | |
|---|---|---|
| 74 | 74 | /* bit 3 (unknown: coin) */ |
| 75 | 75 | /* bit 5 is enable irq 6 */ |
| 76 | 76 | /* bit 7 (unknown: enable irq 5?) */ |
| 77 | i | |
| 77 | iop | |
| 78 | 78 | |
| 79 | 79 | m_cur_control2 = data; |
| 80 | 80 |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | READ16_MEMBER(rltennis_state::rlt_io_r) |
| 73 | 73 | { |
| 74 | 74 | |
| 75 | return (i | |
| 75 | return (iop | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | WRITE16_MEMBER(rltennis_state::rlt_snd1_w) |
| r15082 | r15083 | |
| 162 | 162 | state->m_screen = machine.device( "screen"); |
| 163 | 163 | state->m_dac_1 = machine.device("dac1"); |
| 164 | 164 | state->m_dac_2 = machine.device("dac2"); |
| 165 | state->m_samples_1 = machine.root_device().memregion("samples1")->base(); | |
| 166 | state->m_samples_2 = machine.root_device().memregion("samples2")->base(); | |
| 165 | state->m_samples_1 = state->memregion("samples1")->base(); | |
| 166 | state->m_samples_2 = state->memregion("samples2")->base(); | |
| 167 | 167 | state->m_gfx = state->memregion("gfx1")->base(); |
| 168 | 168 | state->m_timer = machine.scheduler().timer_alloc(FUNC(sample_player)); |
| 169 | 169 | } |
| r15082 | r15083 | |
|---|---|---|
| 719 | 719 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 720 | 720 | |
| 721 | 721 | PORT_START("IN0") |
| 722 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x40) | |
| 723 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) PORT_NAME ("Start in no coins mode") | |
| 724 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x40) | |
| 725 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) | |
| 722 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x40) | |
| 723 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x00) PORT_NAME ("Start in no coins mode") | |
| 724 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x40) | |
| 725 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x00) | |
| 726 | 726 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r) /* ticket status */ |
| 727 | 727 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 728 | 728 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 896 | 896 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 897 | 897 | |
| 898 | 898 | PORT_START("IN0") |
| 899 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x40) | |
| 900 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) PORT_NAME ("Start in no coins mode") | |
| 901 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x40) | |
| 902 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWA", 0x40, PORTCOND_EQUALS, 0x00) | |
| 899 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x40) | |
| 900 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x00) PORT_NAME ("Start in no coins mode") | |
| 901 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x40) | |
| 902 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWA", 0x40, EQUALS, 0x00) | |
| 903 | 903 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r) /* ticket status */ |
| 904 | 904 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 905 | 905 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1695 | 1695 | /* Missing "General Facts" */ |
| 1696 | 1696 | ROM_END |
| 1697 | 1697 | |
| 1698 | ROM_START( gt1 | |
| 1698 | ROM_START( gtsers12 | |
| 1699 | 1699 | ROM_REGION( 0x38000, "maincpu", 0 ) |
| 1700 | ROM_LOAD( "prog1_versiona", 0x00000, 0x4000, CRC(537d6566) SHA1(282a33e4a9fc54d34094393c00026bf31ccd6ab5) ) | |
| 1701 | ROM_LOAD( "new_science_2", 0x10000, 0x8000, CRC(3bd80fb8) SHA1(9a196595bc5dc6ed5ee5853786839ed4847fa436) ) /* Questions from an unknown set, will be corrected when verified */ | |
| 1702 | ROM_LOAD( "nfl_football", 0x18000, 0x8000, CRC(d676b7cd) SHA1(d652d2441adb500f7af526d110d0335ea453d75b) ) /* These questions are likely mix-n-match do to opperator swaps */ | |
| 1703 | ROM_LOAD( "rock_music", 0x20000, 0x8000, CRC(7f11733a) SHA1(d4d0dee75518edf986cb1241ade45ccb4840f088) ) /* Currently unverified are Series 12, 13 & 14 */ | |
| 1704 | ROM_LOAD( "war_and_peace", 0x28000, 0x8000, CRC(bc709383) SHA1(2fba4c80773abea7bbd826c39378b821cddaa255) ) | |
| 1705 | ROM_LOAD( "entertainment", 0x30000, 0x8000, CRC(07068c9f) SHA1(1aedc78d071281ec8b08488cd82655d41a77cf6b) ) | |
| 1700 | ROM_LOAD( "prog1_versionc", 0x00000, 0x4000, CRC(340246a4) SHA1(d655e1cf2b1e87a05e87ff6af4b794e6d54a2a52) ) | |
| 1701 | ROM_LOAD( "new_science_2", 0x10000, 0x8000, CRC(3bd80fb8) SHA1(9a196595bc5dc6ed5ee5853786839ed4847fa436) ) | |
| 1702 | ROM_LOAD( "adult_sex_4", 0x18000, 0x8000, CRC(36a75071) SHA1(f08d31f241e1dc9b94b940cd2872a692f6f8475b) ) | |
| 1703 | ROM_LOAD( "cops_&_robbers", 0x20000, 0x8000, CRC(8b367c33) SHA1(013468157bf469c9cf138809fdc45b3ba60a423b) ) | |
| 1704 | ROM_LOAD( "famous_quotes", 0x28000, 0x8000, CRC(0a27d8ae) SHA1(427e6ae25e47da7f7f7c3e92a37e330d711da90c) ) | |
| 1705 | ROM_LOAD( "vices", 0x30000, 0x8000, CRC(e6069955) SHA1(68f7453f21a4ce1be912141bbe947fbd81d918a3) ) | |
| 1706 | 1706 | ROM_END |
| 1707 | 1707 | |
| 1708 | ROM_START( gt1 | |
| 1708 | ROM_START( gtsers14 | |
| 1709 | 1709 | ROM_REGION( 0x38000, "maincpu", 0 ) |
| 1710 | 1710 | ROM_LOAD( "prog1_versionc", 0x00000, 0x4000, CRC(340246a4) SHA1(d655e1cf2b1e87a05e87ff6af4b794e6d54a2a52) ) |
| 1711 | ROM_LOAD( "vices", 0x10000, 0x8000, CRC(e6069955) SHA1(68f7453f21a4ce1be912141bbe947fbd81d918a3) ) /* Questions from an unknown set, will be corrected when verified */ | |
| 1712 | ROM_LOAD( "cops_&_robbers", 0x18000, 0x8000, CRC(8b367c33) SHA1(013468157bf469c9cf138809fdc45b3ba60a423b) ) /* These questions are likely mix-n-match do to opperator swaps */ | |
| 1713 | ROM_LOAD( "famous_couples", 0x20000, 0x8000, CRC(e0618218) SHA1(ff64fcd6dec83a2271b63c3ae64dc932a3954ec5) ) /* Currently unverified are Series 12, 13 & 14 */ | |
| 1714 | ROM_LOAD( "famous_quotes", 0x28000, 0x8000, CRC(0a27d8ae) SHA1(427e6ae25e47da7f7f7c3e92a37e330d711da90c) ) | |
| 1711 | ROM_LOAD( "famous_couples", 0x10000, 0x8000, CRC(e0618218) SHA1(ff64fcd6dec83a2271b63c3ae64dc932a3954ec5) ) | |
| 1712 | ROM_LOAD( "war_and_peace", 0x18000, 0x8000, CRC(bc709383) SHA1(2fba4c80773abea7bbd826c39378b821cddaa255) ) | |
| 1713 | ROM_LOAD( "tv_comedies", 0x20000, 0x8000, CRC(992ae38e) SHA1(312780d651a85a1c433f587ff2ede579456d3fd9) ) | |
| 1714 | ROM_LOAD( "the_sixties", 0x28000, 0x8000, CRC(8cfa854e) SHA1(81428c12f99841db1c61b471ac8d00f0c411883b) ) | |
| 1715 | /* Missing "New Sports" */ | |
| 1715 | 1716 | ROM_END |
| 1716 | 1717 | |
| 1717 | ROM_START( gt103a | |
| 1718 | ROM_START( gt103a1 ) /* Need to verify these are actually Series 13 */ | |
| 1718 | 1719 | ROM_REGION( 0x38000, "maincpu", 0 ) |
| 1719 | ROM_LOAD( "t_3a-8_1.bin", 0x00000, 0x4000, CRC(02aef306) SHA1(1ffc10c79a55d41ea36bcaab13cb3f02cb3f9712) ) | |
| 1720 | ROM_LOAD( "rock-n-roll_alt", 0x10000, 0x8000, CRC(8eb83052) SHA1(93e3c1ae6c2048fb44ecafe1013b6a96da38fa84) ) /* Questions from an unknown set, will be corrected when verified */ | |
| 1721 | ROM_LOAD( "history-geog", 0x18000, 0x8000, CRC(c9a70fc3) SHA1(4021e5d702844416e8c798ed0a57c9ecd20b1d4b) ) /* These questions are likely mix-n-match do to opperator swaps */ | |
| 1722 | ROM_LOAD( "the_sixties", 0x20000, 0x8000, CRC(8cfa854e) SHA1(81428c12f99841db1c61b471ac8d00f0c411883b) ) /* Currently unverified are Series 12, 13 & 14 */ | |
| 1723 | ROM_LOAD( "tv_comedies", 0x28000, 0x8000, CRC(992ae38e) SHA1(312780d651a85a1c433f587ff2ede579456d3fd9) ) | |
| 1720 | ROM_LOAD( "prog1_versiona", 0x00000, 0x4000, CRC(537d6566) SHA1(282a33e4a9fc54d34094393c00026bf31ccd6ab5) ) /* Currently unverified Series 13 */ | |
| 1721 | ROM_LOAD( "history-geog", 0x10000, 0x8000, CRC(c9a70fc3) SHA1(4021e5d702844416e8c798ed0a57c9ecd20b1d4b) ) | |
| 1722 | ROM_LOAD( "nfl_football", 0x18000, 0x8000, CRC(d676b7cd) SHA1(d652d2441adb500f7af526d110d0335ea453d75b) ) | |
| 1723 | ROM_LOAD( "rock_music", 0x20000, 0x8000, CRC(7f11733a) SHA1(d4d0dee75518edf986cb1241ade45ccb4840f088) ) | |
| 1724 | ROM_LOAD( "rock-n-roll_alt", 0x28000, 0x8000, CRC(8eb83052) SHA1(93e3c1ae6c2048fb44ecafe1013b6a96da38fa84) ) | |
| 1725 | ROM_LOAD( "entertainment", 0x30000, 0x8000, CRC(07068c9f) SHA1(1aedc78d071281ec8b08488cd82655d41a77cf6b) ) | |
| 1724 | 1726 | ROM_END |
| 1725 | 1727 | |
| 1726 | 1728 | ROM_START( gt103aa ) |
| 1727 | 1729 | ROM_REGION( 0x38000, "maincpu", 0 ) |
| 1728 | 1730 | ROM_LOAD( "t_3a-8_1.bin", 0x00000, 0x4000, CRC(02aef306) SHA1(1ffc10c79a55d41ea36bcaab13cb3f02cb3f9712) ) |
| 1729 | ROM_LOAD( "entertainment_alt", 0x10000, 0x8000, CRC(9a6628b9) SHA1(c0cb7e974329d4d5b91f107296d21a674e35a51b) ) /* Questions from an unknown set, will be corrected when verified */ | |
| 1730 | ROM_LOAD( "general_alt", 0x18000, 0x8000, CRC(df34f7f9) SHA1(329d123eea711d5135dc02dd7b89b220ce8ddd28) ) /* These questions are likely mix-n-match do to opperator swaps */ | |
| 1731 | ROM_LOAD( "science_alt", 0x20000, 0x8000, CRC(9eaebd18) SHA1(3a4d787cb006dbb23ce346577cb1bb5e543ba52c) ) /* Currently unverified are Series 12, 13 & 14 */ | |
| 1731 | ROM_LOAD( "entertainment_alt", 0x10000, 0x8000, CRC(9a6628b9) SHA1(c0cb7e974329d4d5b91f107296d21a674e35a51b) ) | |
| 1732 | ROM_LOAD( "general_alt", 0x18000, 0x8000, CRC(df34f7f9) SHA1(329d123eea711d5135dc02dd7b89b220ce8ddd28) ) | |
| 1733 | ROM_LOAD( "science_alt", 0x20000, 0x8000, CRC(9eaebd18) SHA1(3a4d787cb006dbb23ce346577cb1bb5e543ba52c) ) | |
| 1732 | 1734 | ROM_LOAD( "science_alt2", 0x28000, 0x8000, CRC(ac93d348) SHA1(55550ba6b5daffdf9653854075ad4f8398a5e621) ) |
| 1733 | 1735 | ROM_LOAD( "sports_alt2", 0x30000, 0x8000, CRC(40207845) SHA1(2dddb9685dcefabfde07057a639aa9d08da2329e) ) |
| 1734 | 1736 | ROM_END |
| 1735 | 1737 | |
| 1736 | 1738 | ROM_START( gt103asx ) |
| 1737 | 1739 | ROM_REGION( 0x38000, "maincpu", 0 ) |
| 1738 | ROM_LOAD( "t_3a-8_1.bin", 0x00000, 0x4000, CRC(02aef306) SHA1(1ffc10c79a55d41ea36bcaab13cb3f02cb3f9712) ) | |
| 1739 | ROM_LOAD( "adult_sex_2", 0x10000, 0x8000, CRC(0d683f21) SHA1(f47ce3c31c4c5ed02247fa280303e6ae760315df) ) | |
| 1740 | ROM_LOAD( "adult_sex_2_alt", 0x18000, 0x8000, CRC(8c0eacc8) SHA1(ddaa25548d161394b41c65a2db57a9fcf793062b) ) | |
| 1740 | ROM_LOAD( "t_3a-8_1.bin", 0x00000, 0x4000, CRC(02aef306) SHA1(1ffc10c79a55d41ea36bcaab13cb3f02cb3f9712) ) /* Not sure there was ever a specific Adult set */ | |
| 1741 | ROM_LOAD( "adult_sex_2", 0x10000, 0x8000, CRC(0d683f21) SHA1(f47ce3c31c4c5ed02247fa280303e6ae760315df) ) /* These are likely just the collection of adult */ | |
| 1742 | ROM_LOAD( "adult_sex_2_alt", 0x18000, 0x8000, CRC(8c0eacc8) SHA1(ddaa25548d161394b41c65a2db57a9fcf793062b) ) /* from all the series combined here. */ | |
| 1741 | 1743 | ROM_LOAD( "adult_sex_3_alt", 0x20000, 0x8000, CRC(63cbd1d6) SHA1(8dcd5546dc8688d6b8404d5cf63d8a59acc9bf4c) ) |
| 1742 | 1744 | ROM_LOAD( "adult_sex_4", 0x28000, 0x8000, CRC(36a75071) SHA1(f08d31f241e1dc9b94b940cd2872a692f6f8475b) ) |
| 1743 | 1745 | ROM_LOAD( "adult_sex_5", 0x30000, 0x8000, CRC(fdbc3729) SHA1(7cb7cec4439ddc39de2f7f62c25623cfb869f493) ) |
| r15082 | r15083 | |
| 1909 | 1911 | GAME( 1984, gtsers9, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Questions Series 9)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1910 | 1912 | GAME( 1984, gtsers10, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Questions Series 10)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1911 | 1913 | GAME( 1984, gtsers11, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Questions Series 11)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1914 | GAME( 1984, gtsers12, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Questions Series 12)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1915 | GAME( 1984, gtsers14, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Questions Series 14)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1912 | 1916 | GAME( 1984, gt103a1, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Version 1.03a) (alt 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1913 | GAME( 1984, gt103a2, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Version 1.03a) (alt 2)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1914 | GAME( 1984, gt103a3, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Version 1.03a) (alt 3)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1915 | 1917 | GAME( 1984, gt103aa, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Version 1.03a Alt questions)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1916 | 1918 | GAME( 1984, gt103asx, gtsers8, findout, gt103a, 0, ROT0, "Greyhound Electronics", "Trivia (Version 1.03a Sex questions)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1917 | 1919 | |
| r15082 | r15083 | |
| 1935 | 1937 | GAME( 1991, quiz211, 0, findout, quiz, 0, ROT0, "Elettronolo", "Quiz (Revision 2.11)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1936 | 1938 | |
| 1937 | 1939 | GAME( 1992, geimulti, 0, geimulti, geimulti, geimulti,ROT0, "Grayhound Electronics", "GEI Multi Game", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1938 | GAME( 1992, sprtauth, 0, sprtauth, sprtauth, geimulti,ROT0, "Classic Games", "Sports Authority", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1940 | GAME( 1992, sprtauth, 0, sprtauth, sprtauth, geimulti,ROT0, "Classic Games", "Sports Authority", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| No newline at end of file |
| r15082 | r15083 | |
|---|---|---|
| 613 | 613 | return state->m_misc_io_data[which][offset]; |
| 614 | 614 | |
| 615 | 615 | /* otherwise, return an input port */ |
| 616 | return | |
| 616 | return s | |
| 617 | 617 | |
| 618 | 618 | /* 'SEGA' protection */ |
| 619 | 619 | case 0x10/2: |
| r15082 | r15083 | |
| 885 | 885 | case 0x12/2: |
| 886 | 886 | case 0x14/2: |
| 887 | 887 | case 0x16/2: |
| 888 | m_analog_value[offset & 3] = i | |
| 888 | m_analog_value[offset & 3] = iop | |
| 889 | 889 | return; |
| 890 | 890 | } |
| 891 | 891 | logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", cpu_get_pc(&space.device()), offset*2, data, mem_mask); |
| r15082 | r15083 | |
| 901 | 901 | case 0x22/2: |
| 902 | 902 | case 0x24/2: |
| 903 | 903 | case 0x26/2: |
| 904 | return i | |
| 904 | return iop | |
| 905 | 905 | } |
| 906 | 906 | |
| 907 | 907 | logerror("%06X:unknown extra_custom_io_r(%X) & %04X\n", cpu_get_pc(&space.device()), offset*2, mem_mask); |
| r15082 | r15083 | |
| 918 | 918 | case 0x12/2: |
| 919 | 919 | case 0x14/2: |
| 920 | 920 | case 0x16/2: |
| 921 | m_analog_value[offset & 3] = i | |
| 921 | m_analog_value[offset & 3] = iop | |
| 922 | 922 | return; |
| 923 | 923 | |
| 924 | 924 | case 0x20/2: |
| r15082 | r15083 | |
| 941 | 941 | case 0x0c/2: |
| 942 | 942 | case 0x10/2: |
| 943 | 943 | case 0x14/2: |
| 944 | return (UINT8)(i | |
| 944 | return (UINT8)(iop | |
| 945 | 945 | } |
| 946 | 946 | |
| 947 | 947 | logerror("%06X:unknown sonic_custom_io_r(%X) & %04X\n", cpu_get_pc(&space.device()), offset*2, mem_mask); |
| r15082 | r15083 | |
| 958 | 958 | case 0x00/2: |
| 959 | 959 | case 0x08/2: |
| 960 | 960 | case 0x10/2: |
| 961 | m_sonic_last[offset/2 + 0] = input_port_read(machine(), names[offset/2 + 0]); | |
| 962 | m_sonic_last[offset/2 + 1] = input_port_read(machine(), names[offset/2 + 1]); | |
| 961 | m_sonic_last[offset/2 + 0] = ioport(names[offset/2 + 0])->read(); | |
| 962 | m_sonic_last[offset/2 + 1] = ioport(names[offset/2 + 1])->read(); | |
| 963 | 963 | return; |
| 964 | 964 | } |
| 965 | 965 |
| r15082 | r15083 | |
|---|---|---|
| 900 | 900 | static DRIVER_INIT( looping ) |
| 901 | 901 | { |
| 902 | 902 | looping_state *state = machine.driver_data<looping_state>(); |
| 903 | int length = | |
| 903 | int length = sta | |
| 904 | 904 | UINT8 *rom = state->memregion("maincpu")->base(); |
| 905 | 905 | int i; |
| 906 | 906 |
| r15082 | r15083 | |
|---|---|---|
| 192 | 192 | /* sound IRQ is on 32V */ |
| 193 | 193 | if (scanline & 32) |
| 194 | 194 | atarigen_6502_irq_ack_r(space, 0); |
| 195 | else if (!( | |
| 195 | else if (!( | |
| 196 | 196 | atarigen_6502_irq_gen(screen.machine().device("audiocpu")); |
| 197 | 197 | } |
| 198 | 198 | |
| r15082 | r15083 | |
| 232 | 232 | static INTERRUPT_GEN( vblank_int ) |
| 233 | 233 | { |
| 234 | 234 | badlands_state *state = device->machine().driver_data<badlands_state>(); |
| 235 | int pedal_state = | |
| 235 | int pedal_state = s | |
| 236 | 236 | int i; |
| 237 | 237 | |
| 238 | 238 | /* update the pedals once per frame */ |
| r15082 | r15083 | |
| 306 | 306 | 0x02 = coin 2 |
| 307 | 307 | 0x01 = coin 1 |
| 308 | 308 | */ |
| 309 | result = input_port_read(machine(), "AUDIO"); | |
| 310 | if (!(input_port_read(machine(), "FE4000") & 0x0080)) result ^= 0x90; | |
| 309 | result = ioport("AUDIO")->read(); | |
| 310 | if (!(ioport("FE4000")->read() & 0x0080)) result ^= 0x90; | |
| 311 | 311 | if (m_cpu_to_sound_ready) result ^= 0x40; |
| 312 | 312 | if (m_sound_to_cpu_ready) result ^= 0x20; |
| 313 | 313 | result ^= 0x10; |
| r15082 | r15083 | |
| 426 | 426 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 427 | 427 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 428 | 428 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 429 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 429 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 430 | 430 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 431 | 431 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 432 | 432 | |
| r15082 | r15083 | |
| 586 | 586 | badlands_state *state = machine.driver_data<badlands_state>(); |
| 587 | 587 | |
| 588 | 588 | /* initialize the audio system */ |
| 589 | state->m_bank_base = & | |
| 589 | state->m_bank_base = &sta | |
| 590 | 590 | state->m_bank_source_data = &state->memregion("audiocpu")->base()[0x10000]; |
| 591 | 591 | } |
| 592 | 592 | |
| r15082 | r15083 | |
| 688 | 688 | /* sound IRQ is on 32V */ |
| 689 | 689 | // if (scanline & 32) |
| 690 | 690 | // atarigen_6502_irq_ack_r(screen.machine(), 0); |
| 691 | // else if (!(in | |
| 691 | // else if (!(machine.root_device().ioport | |
| 692 | 692 | // atarigen_6502_irq_gen(screen.machine().device("audiocpu")); |
| 693 | 693 | } |
| 694 | 694 |
| r15082 | r15083 | |
|---|---|---|
| 338 | 338 | { |
| 339 | 339 | if (ACCESSING_BITS_24_31) |
| 340 | 340 | { |
| 341 | return | |
| 341 | return | |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | logerror("Unk EEPROM read mask %x\n", mem_mask); |
| r15082 | r15083 | |
| 437 | 437 | GND 55|56 GND |
| 438 | 438 | */ |
| 439 | 439 | |
| 440 | UINT32 controls = input_port_read(machine(), "CONTROLLER"); | |
| 441 | UINT32 value = input_port_read(machine(), "INPUTS"); | |
| 440 | UINT32 controls = ioport("CONTROLLER")->read(); | |
| 441 | UINT32 value = ioport("INPUTS")->read(); | |
| 442 | 442 | |
| 443 | 443 | if(controls) { |
| 444 | 444 | // Clearly has ghosting, game will only recognise one key depressed at once, and keyboard can only represent keys with distinct rows and columns |
| r15082 | r15083 | |
| 483 | 483 | KEY11 | KEY6, // Ron |
| 484 | 484 | KEY1 | KEY3 // Start |
| 485 | 485 | }; // generic Mahjong keyboard encoder, corresponds to ordering in input port |
| 486 | UINT32 keys = i | |
| 486 | UINT32 keys = iop | |
| 487 | 487 | UINT32 which_key = 0x1; |
| 488 | 488 | int count = 0; |
| 489 | 489 |
| r15082 | r15083 | |
|---|---|---|
| 352 | 352 | if (bits_gone_hi & 0x08) state->m_samples->start(5, SND_FLEET4); |
| 353 | 353 | if (bits_gone_hi & 0x10) state->m_samples->start(4, SND_UFOHIT); |
| 354 | 354 | |
| 355 | state->m_screen_flip = ( | |
| 355 | state->m_screen_flip = (s | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | |
| r15082 | r15083 | |
| 383 | 383 | |
| 384 | 384 | if (bits_gone_hi & 0x04) m_samples->start(3, SND_INVADERHIT); |
| 385 | 385 | |
| 386 | m_screen_flip = (i | |
| 386 | m_screen_flip = (iop | |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | |
| r15082 | r15083 | |
| 460 | 460 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL |
| 461 | 461 | |
| 462 | 462 | PORT_START("IN2") |
| 463 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 463 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 464 | 464 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 465 | 465 | |
| 466 | 466 | PORT_START("CABINET") |
| r15082 | r15083 | |
|---|---|---|
| 148 | 148 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 149 | 149 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 150 | 150 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 151 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 151 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 152 | 152 | |
| 153 | 153 | PORT_START("DSW") |
| 154 | 154 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | READ16_MEMBER(offtwall_state::special_port3_r) |
| 93 | 93 | { |
| 94 | int result = i | |
| 94 | int result = iop | |
| 95 | 95 | if (m_cpu_to_sound_ready) result ^= 0x0020; |
| 96 | 96 | return result; |
| 97 | 97 | } |
| r15082 | r15083 | |
| 346 | 346 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 347 | 347 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* tested before writing to 260040 */ |
| 348 | 348 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 349 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 349 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 350 | 350 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 351 | 351 | |
| 352 | 352 | PORT_START("260012") |
| r15082 | r15083 | |
|---|---|---|
| 9559 | 9559 | |
| 9560 | 9560 | static TIMER_CALLBACK( ms5pcb_bios_timer_callback ) |
| 9561 | 9561 | { |
| 9562 | int harddip3 = in | |
| 9562 | int harddip3 = machine.root_device().ioport | |
| 9563 | 9563 | machine.root_device().membank(NEOGEO_BANK_BIOS)->set_base(machine.root_device().memregion("mainbios")->base() + 0x20000 + harddip3 * 0x20000); |
| 9564 | 9564 | } |
| 9565 | 9565 | |
| r15082 | r15083 | |
| 9596 | 9596 | |
| 9597 | 9597 | static TIMER_CALLBACK( svcpcb_bios_timer_callback ) |
| 9598 | 9598 | { |
| 9599 | int harddip3 = in | |
| 9599 | int harddip3 = machine.root_device().ioport | |
| 9600 | 9600 | machine.root_device().membank(NEOGEO_BANK_BIOS)->set_base(machine.root_device().memregion("mainbios")->base() + 0x20000 + harddip3 * 0x20000); |
| 9601 | 9601 | } |
| 9602 | 9602 |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | int ret = 0xff; |
| 181 | 181 | |
| 182 | 182 | if (m_portselect & 0x01) |
| 183 | ret &= i | |
| 183 | ret &= iop | |
| 184 | 184 | if (m_portselect & 0x02) |
| 185 | ret &= i | |
| 185 | ret &= iop | |
| 186 | 186 | if (m_portselect & 0x04) |
| 187 | ret &= i | |
| 187 | ret &= iop | |
| 188 | 188 | if (m_portselect & 0x08) |
| 189 | ret &= i | |
| 189 | ret &= iop | |
| 190 | 190 | if (m_portselect & 0x10) |
| 191 | ret &= i | |
| 191 | ret &= iop | |
| 192 | 192 | |
| 193 | 193 | return ret; |
| 194 | 194 | } |
| r15082 | r15083 | |
|---|---|---|
| 37 | 37 | switch (m_inputport_selected) |
| 38 | 38 | { |
| 39 | 39 | case 0x00: /* DSW B (bits 0-4) */ |
| 40 | return (i | |
| 40 | return (iop | |
| 41 | 41 | case 0x01: /* DSW B (bits 5-7), DSW A (bits 0-1) */ |
| 42 | return ((i | |
| 42 | return ((iop | |
| 43 | 43 | case 0x02: /* DSW A (bits 2-6) */ |
| 44 | return (i | |
| 44 | return (iop | |
| 45 | 45 | case 0x03: /* DSW A (bit 7), DSW C (bits 0-3) */ |
| 46 | return ((i | |
| 46 | return ((iop | |
| 47 | 47 | case 0x04: /* coins, start */ |
| 48 | return i | |
| 48 | return iop | |
| 49 | 49 | case 0x05: /* 2P controls */ |
| 50 | return i | |
| 50 | return iop | |
| 51 | 51 | case 0x06: /* 1P controls */ |
| 52 | return i | |
| 52 | return iop | |
| 53 | 53 | default: |
| 54 | 54 | return 0xff; |
| 55 | 55 | } |
| r15082 | r15083 | |
|---|---|---|
| 1488 | 1488 | bitmap.fill(state->m_bgcolor, cliprect); |
| 1489 | 1489 | |
| 1490 | 1490 | #ifdef MAME_DEBUG |
| 1491 | if ( | |
| 1491 | if ( | |
| 1492 | 1492 | #endif |
| 1493 | 1493 | |
| 1494 | 1494 | copy_scroll_xp(bitmap, state->m_render_layer[2], *state->m_scrollx1, *state->m_scrolly1); |
| r15082 | r15083 | |
| 1628 | 1628 | // 0x8599 : 'benberob' |
| 1629 | 1629 | // 0x83e2 : 'halleys', 'halleysc', 'halleycj' |
| 1630 | 1630 | // 0x83df : 'halley87' |
| 1631 | int inp = input_port_read(machine(), "IN0"); | |
| 1632 | int result = ((input_port_read(machine(), "DSW4")) & 0x20) >> 5; | |
| 1631 | int inp = ioport("IN0")->read(); | |
| 1632 | int result = ((ioport("DSW4")->read()) & 0x20) >> 5; | |
| 1633 | 1633 | |
| 1634 | 1634 | if (inp & 0x80) result |= 0x02; |
| 1635 | 1635 | if (inp & 0x40) result |= 0x04; |
| r15082 | r15083 | |
| 1642 | 1642 | { |
| 1643 | 1643 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" }; |
| 1644 | 1644 | |
| 1645 | return i | |
| 1645 | return iop | |
| 1646 | 1646 | } |
| 1647 | 1647 | |
| 1648 | 1648 |
| r15082 | r15083 | |
|---|---|---|
| 229 | 229 | READ8_MEMBER(djmain_state::inp1_r) |
| 230 | 230 | { |
| 231 | 231 | static const char *const portnames[] = { "DSW3", "BTN3", "BTN2", "BTN1" }; |
| 232 | return i | |
| 232 | return iop | |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | READ8_MEMBER(djmain_state::inp2_r) |
| 236 | 236 | { |
| 237 | 237 | static const char *const portnames[] = { "DSW1", "DSW2", "UNK2", "UNK1" }; |
| 238 | return i | |
| 238 | return iop | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | READ32_MEMBER(djmain_state::turntable_r) |
| r15082 | r15083 | |
| 248 | 248 | UINT8 pos; |
| 249 | 249 | int delta; |
| 250 | 250 | |
| 251 | pos = i | |
| 251 | pos = iop | |
| 252 | 252 | delta = pos - m_turntable_last_pos[m_turntable_select]; |
| 253 | 253 | if (delta < -128) |
| 254 | 254 | delta += 256; |
| r15082 | r15083 | |
| 660 | 660 | |
| 661 | 661 | #ifdef PRIORITY_EASINESS_TO_PLAY |
| 662 | 662 | #define BEATMANIA_DSW3_STAGES_OLD \ |
| 663 | PORT_DIPNAME( 0x1c, 0x1c, "Normal Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 663 | PORT_DIPNAME( 0x1c, 0x1c, "Normal Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 664 | 664 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| 665 | 665 | PORT_DIPSETTING( 0x00, "4 Stages" ) \ |
| 666 | 666 | PORT_DIPSETTING( 0x08, "5 Stages" ) \ |
| 667 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 667 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 668 | 668 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 669 | 669 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 670 | 670 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 672 | 672 | PORT_DIPSETTING( 0x08, "5 Stages" ) |
| 673 | 673 | #else |
| 674 | 674 | #define BEATMANIA_DSW3_STAGES_OLD \ |
| 675 | PORT_DIPNAME( 0x1c, 0x1c, "Normal Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 675 | PORT_DIPNAME( 0x1c, 0x1c, "Normal Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 676 | 676 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| 677 | 677 | PORT_DIPSETTING( 0x1c, "4 Stages" ) /* duplicated setting */ \ |
| 678 | 678 | PORT_DIPSETTING( 0x0c, "4 Stages" ) /* duplicated setting */ \ |
| r15082 | r15083 | |
| 681 | 681 | PORT_DIPSETTING( 0x18, "4 Stages" ) /* duplicated setting */ \ |
| 682 | 682 | PORT_DIPSETTING( 0x00, "4 Stages" ) \ |
| 683 | 683 | PORT_DIPSETTING( 0x08, "5 Stages" ) \ |
| 684 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 684 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 685 | 685 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 686 | 686 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 687 | 687 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 694 | 694 | |
| 695 | 695 | #ifdef PRIORITY_EASINESS_TO_PLAY |
| 696 | 696 | #define BEATMANIA_DSW3_STAGES_MIDDLE( str ) \ |
| 697 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 697 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 698 | 698 | PORT_DIPSETTING( 0x10, "3 / 3 Stages" ) \ |
| 699 | 699 | PORT_DIPSETTING( 0x00, "4 / 4 Stages" ) \ |
| 700 | 700 | PORT_DIPSETTING( 0x08, "5 / 5 Stages" ) \ |
| 701 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 701 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 702 | 702 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 703 | 703 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 704 | 704 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 706 | 706 | PORT_DIPSETTING( 0x08, "5 Stages" ) |
| 707 | 707 | #else |
| 708 | 708 | #define BEATMANIA_DSW3_STAGES_MIDDLE( str ) \ |
| 709 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 709 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 710 | 710 | PORT_DIPSETTING( 0x10, "3 / 3 Stages" ) \ |
| 711 | 711 | PORT_DIPSETTING( 0x1c, "4 / 4 Stages" ) /* duplicated setting */ \ |
| 712 | 712 | PORT_DIPSETTING( 0x0c, "4 / 4 Stages" ) /* duplicated setting */ \ |
| r15082 | r15083 | |
| 715 | 715 | PORT_DIPSETTING( 0x18, "4 / 4 Stages" ) /* duplicated setting */ \ |
| 716 | 716 | PORT_DIPSETTING( 0x00, "4 / 4 Stages" ) \ |
| 717 | 717 | PORT_DIPSETTING( 0x08, "5 / 5 Stages" ) \ |
| 718 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 718 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 719 | 719 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 720 | 720 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 721 | 721 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 728 | 728 | |
| 729 | 729 | #ifdef PRIORITY_EASINESS_TO_PLAY |
| 730 | 730 | #define BEATMANIA_DSW3_STAGES_NEW( str ) \ |
| 731 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 731 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 732 | 732 | PORT_DIPSETTING( 0x10, "3 / 2 Stages" ) \ |
| 733 | 733 | PORT_DIPSETTING( 0x00, "4 / 3 Stages" ) \ |
| 734 | 734 | PORT_DIPSETTING( 0x08, "5 / 3 Stages" ) \ |
| 735 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 735 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 736 | 736 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 737 | 737 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 738 | 738 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 740 | 740 | PORT_DIPSETTING( 0x08, "5 Stages" ) |
| 741 | 741 | #else |
| 742 | 742 | #define BEATMANIA_DSW3_STAGES_NEW( str ) \ |
| 743 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 743 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 744 | 744 | PORT_DIPSETTING( 0x10, "3 / 2 Stages" ) \ |
| 745 | 745 | PORT_DIPSETTING( 0x1c, "4 / 3 Stages" ) /* duplicated setting */ \ |
| 746 | 746 | PORT_DIPSETTING( 0x0c, "4 / 3 Stages" ) /* duplicated setting */ \ |
| r15082 | r15083 | |
| 749 | 749 | PORT_DIPSETTING( 0x18, "4 / 3 Stages" ) /* duplicated setting */ \ |
| 750 | 750 | PORT_DIPSETTING( 0x00, "4 / 3 Stages" ) \ |
| 751 | 751 | PORT_DIPSETTING( 0x08, "5 / 3 Stages" ) \ |
| 752 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 752 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 753 | 753 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 754 | 754 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 755 | 755 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 853 | 853 | PORT_START("DSW3") \ |
| 854 | 854 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) /* bit 7,6 don't exist */ \ |
| 855 | 855 | BEATMANIA_DSW3_EVENTMODE /* SW3:1 */ \ |
| 856 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 856 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 857 | 857 | PORT_DIPSETTING( 0x1c, "3 / 3 Stages" ) \ |
| 858 | 858 | PORT_DIPSETTING( 0x10, "4 / 4 Stages" ) \ |
| 859 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 859 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 860 | 860 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 861 | 861 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 862 | 862 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 869 | 869 | PORT_START("DSW3") \ |
| 870 | 870 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) /* bit 7,6 don't exist */ \ |
| 871 | 871 | BEATMANIA_DSW3_EVENTMODE /* SW3:1 */ \ |
| 872 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 872 | PORT_DIPNAME( 0x1c, 0x1c, str ) PORT_CONDITION("DSW3", 0x20, | |
| 873 | 873 | PORT_DIPSETTING( 0x1c, "3 / 3 Stages" ) \ |
| 874 | 874 | PORT_DIPSETTING( 0x0c, "3 / 3 Stages" ) /* duplicated setting */ \ |
| 875 | 875 | PORT_DIPSETTING( 0x14, "3 / 3 Stages" ) /* duplicated setting */ \ |
| r15082 | r15083 | |
| 878 | 878 | PORT_DIPSETTING( 0x08, "3 / 3 Stages" ) /* duplicated setting */ \ |
| 879 | 879 | PORT_DIPSETTING( 0x00, "3 / 3 Stages" ) /* duplicated setting */ \ |
| 880 | 880 | PORT_DIPSETTING( 0x10, "4 / 4 Stages" ) \ |
| 881 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 881 | PORT_DIPNAME( 0x1c, 0x1c, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 882 | 882 | PORT_DIPSETTING( 0x0c, "1 Stage" ) \ |
| 883 | 883 | PORT_DIPSETTING( 0x14, "2 Stages" ) \ |
| 884 | 884 | PORT_DIPSETTING( 0x10, "3 Stages" ) \ |
| r15082 | r15083 | |
| 914 | 914 | /* "Free Hidden Songs" 3-3=On 3-6=On */ |
| 915 | 915 | PORT_MODIFY("DSW3") |
| 916 | 916 | BEATMANIA_DSW3_EVENTMODE /* SW3:1 */ |
| 917 | PORT_DIPNAME( 0x10, 0x10, "Unused (Used if Event Mode)" ) PORT_CONDITION("DSW3", 0x20, | |
| 917 | PORT_DIPNAME( 0x10, 0x10, "Unused (Used if Event Mode)" ) PORT_CONDITION("DSW3", 0x20, | |
| 918 | 918 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 919 | 919 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 920 | PORT_DIPNAME( 0x08, 0x08, "Free Hidden Songs (step1of2)" ) PORT_CONDITION("DSW3", 0x20, | |
| 920 | PORT_DIPNAME( 0x08, 0x08, "Free Hidden Songs (step1of2)" ) PORT_CONDITION("DSW3", 0x20, | |
| 921 | 921 | PORT_DIPSETTING( 0x08, "No (Off)" ) |
| 922 | 922 | PORT_DIPSETTING( 0x00, "Yes (On)" ) |
| 923 | PORT_DIPNAME( 0x18, 0x18, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 923 | PORT_DIPNAME( 0x18, 0x18, "Event Mode Stages" ) PORT_CONDITION("DSW3", 0x20, | |
| 924 | 924 | PORT_DIPSETTING( 0x18, "1 Stage" ) |
| 925 | 925 | PORT_DIPSETTING( 0x08, "2 Stages" ) |
| 926 | 926 | PORT_DIPSETTING( 0x10, "3 Stages" ) |
| 927 | 927 | PORT_DIPSETTING( 0x00, "4 Stages" ) |
| 928 | PORT_DIPNAME( 0x01, 0x01, "Free Hidden Songs (step2of2)" ) PORT_CONDITION("DSW3", 0x20, | |
| 928 | PORT_DIPNAME( 0x01, 0x01, "Free Hidden Songs (step2of2)" ) PORT_CONDITION("DSW3", 0x20, | |
| 929 | 929 | PORT_DIPSETTING( 0x01, "No (Off)" ) |
| 930 | 930 | PORT_DIPSETTING( 0x00, "Yes (On)" ) |
| 931 | PORT_DIPNAME( 0x01, 0x01, "Unused (Used if not Event Mode)" ) PORT_CONDITION("DSW3", 0x20, | |
| 931 | PORT_DIPNAME( 0x01, 0x01, "Unused (Used if not Event Mode)" ) PORT_CONDITION("DSW3", 0x20, | |
| 932 | 932 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 933 | 933 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 934 | 934 | /* "Free Hidden Songs" 3-3=On 3-6=On */ |
| r15082 | r15083 | |
|---|---|---|
| 298 | 298 | case 0x1000/2: |
| 299 | 299 | { |
| 300 | 300 | static const char *const sysports[] = { "SERVICE", "P1", "UNUSED", "P2" }; |
| 301 | return | |
| 301 | return s | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | case 0x2000/2: |
| 305 | return | |
| 305 | return s | |
| 306 | 306 | } |
| 307 | 307 | logerror("%06X:standard_io_r - unknown read access to address %04X\n", cpu_get_pc(&space->device()), offset * 2); |
| 308 | 308 | return 0xffff; |
| r15082 | r15083 | |
| 634 | 634 | { |
| 635 | 635 | switch (state->m_video_control & 0xf) |
| 636 | 636 | { |
| 637 | case 0x00: return input_port_read(space->machine(), "P1"); // "HANDX1" | |
| 638 | case 0x04: return input_port_read(space->machine(), "TRACKX1"); | |
| 639 | case 0x08: return input_port_read(space->machine(), "TRACKY1"); | |
| 640 | case 0x0c: return input_port_read(space->machine(), "HANDY1"); | |
| 637 | case 0x00: return state->ioport("P1")->read(); // "HANDX1" | |
| 638 | case 0x04: return state->ioport("TRACKX1")->read(); | |
| 639 | case 0x08: return state->ioport("TRACKY1")->read(); | |
| 640 | case 0x0c: return state->ioport("HANDY1")->read(); | |
| 641 | 641 | } |
| 642 | 642 | break; |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | 645 | case 0x02: |
| 646 | return | |
| 646 | return s | |
| 647 | 647 | // low nibble: Sega 56pin Edge "16"-"19" // rotary switch 10positions 4bit-binary-pinout |
| 648 | 648 | // high nibble: Sega 56pin Edge "T"-"W" // ditto |
| 649 | 649 | |
| r15082 | r15083 | |
| 651 | 651 | { |
| 652 | 652 | switch (state->m_video_control & 0xf) |
| 653 | 653 | { |
| 654 | case 0x00: return input_port_read(space->machine(), "P2"); // "HANDX2" | |
| 655 | case 0x04: return input_port_read(space->machine(), "TRACKX2"); | |
| 656 | case 0x08: return input_port_read(space->machine(), "TRACKY2"); | |
| 657 | case 0x0c: return input_port_read(space->machine(), "HANDY2"); | |
| 654 | case 0x00: return state->ioport("P2")->read(); // "HANDX2" | |
| 655 | case 0x04: return state->ioport("TRACKX2")->read(); | |
| 656 | case 0x08: return state->ioport("TRACKY2")->read(); | |
| 657 | case 0x0c: return state->ioport("HANDY2")->read(); | |
| 658 | 658 | } |
| 659 | 659 | break; |
| 660 | 660 | } |
| r15082 | r15083 | |
| 686 | 686 | /* upper bit of the trackball controls */ |
| 687 | 687 | case 0: |
| 688 | 688 | { |
| 689 | UINT8 buttons = input_port_read(space->machine(), "SERVICE"); | |
| 690 | UINT8 analog1 = input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 691 | UINT8 analog2 = input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 689 | UINT8 buttons = state->ioport("SERVICE")->read(); | |
| 690 | UINT8 analog1 = state->ioport((state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1")->read(); | |
| 691 | UINT8 analog2 = state->ioport((state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2")->read(); | |
| 692 | 692 | buttons |= (analog1 & 0x80) >> 1; |
| 693 | 693 | buttons |= (analog2 & 0x80); |
| 694 | 694 | return buttons; |
| r15082 | r15083 | |
| 698 | 698 | /* player 1 select switch mapped to bit 7 */ |
| 699 | 699 | case 1: |
| 700 | 700 | { |
| 701 | UINT8 buttons = input_port_read(space->machine(), "BUTTONS1"); | |
| 702 | UINT8 analog = input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 701 | UINT8 buttons = state->ioport("BUTTONS1")->read(); | |
| 702 | UINT8 analog = state->ioport((state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1")->read(); | |
| 703 | 703 | return (buttons & 0x80) | (analog & 0x7f); |
| 704 | 704 | } |
| 705 | 705 | |
| r15082 | r15083 | |
| 707 | 707 | case 2: |
| 708 | 708 | { |
| 709 | 709 | if (state->m_video_control & 4) |
| 710 | return ( | |
| 710 | return (s | |
| 711 | 711 | else |
| 712 | 712 | { |
| 713 | UINT8 buttons1 = input_port_read(space->machine(), "BUTTONS1"); | |
| 714 | UINT8 buttons2 = input_port_read(space->machine(), "BUTTONS2"); | |
| 713 | UINT8 buttons1 = state->ioport("BUTTONS1")->read(); | |
| 714 | UINT8 buttons2 = state->ioport("BUTTONS2")->read(); | |
| 715 | 715 | |
| 716 | 716 | if (!(buttons1 & 0x01)) |
| 717 | 717 | state->m_last_buttons1 = 0; |
| r15082 | r15083 | |
| 739 | 739 | /* player 2 select switch mapped to bit 7 */ |
| 740 | 740 | case 3: |
| 741 | 741 | { |
| 742 | UINT8 buttons = input_port_read(space->machine(), "BUTTONS2"); | |
| 743 | UINT8 analog = input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 742 | UINT8 buttons = state->ioport("BUTTONS2")->read(); | |
| 743 | UINT8 analog = state->ioport((state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2")->read(); | |
| 744 | 744 | return (buttons & 0x80) | (analog & 0x7f); |
| 745 | 745 | } |
| 746 | 746 | } |
| r15082 | r15083 | |
| 773 | 773 | case 1: |
| 774 | 774 | switch ((state->m_read_port++) & 3) |
| 775 | 775 | { |
| 776 | case 0: return input_port_read(space->machine(), "P1"); | |
| 777 | case 1: return input_port_read(space->machine(), "P2"); | |
| 778 | case 2: return input_port_read(space->machine(), "P3"); | |
| 779 | case 3: return input_port_read(space->machine(), "P4"); | |
| 776 | case 0: return state->ioport("P1")->read(); | |
| 777 | case 1: return state->ioport("P2")->read(); | |
| 778 | case 2: return state->ioport("P3")->read(); | |
| 779 | case 3: return state->ioport("P4")->read(); | |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | break; |
| r15082 | r15083 | |
| 803 | 803 | case 0x1000/2: |
| 804 | 804 | switch (offset & 3) |
| 805 | 805 | { |
| 806 | case 1: return input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1"); | |
| 807 | case 3: return input_port_read(space->machine(), (state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2"); | |
| 806 | case 1: return state->ioport((state->m_video_control & 4) ? "ANALOGY1" : "ANALOGX1")->read(); | |
| 807 | case 3: return state->ioport((state->m_video_control & 4) ? "ANALOGY2" : "ANALOGX2")->read(); | |
| 808 | 808 | } |
| 809 | 809 | break; |
| 810 | 810 | } |
| r15082 | r15083 | |
| 830 | 830 | switch (offset & 3) |
| 831 | 831 | { |
| 832 | 832 | case 1: |
| 833 | if ( | |
| 833 | if (s | |
| 834 | 834 | return 0xff & ~(1 << state->m_mj_input_num); |
| 835 | 835 | return 0xff; |
| 836 | 836 | |
| 837 | 837 | case 2: |
| 838 | return | |
| 838 | return s | |
| 839 | 839 | } |
| 840 | 840 | break; |
| 841 | 841 | } |
| r15082 | r15083 | |
| 973 | 973 | return maincpu_byte_r(space->machine(), 0x840001 ^ offset); |
| 974 | 974 | |
| 975 | 975 | case 5: |
| 976 | return s | |
| 976 | return state-> | |
| 977 | 977 | case 6: |
| 978 | return s | |
| 978 | return state-> | |
| 979 | 979 | case 7: |
| 980 | 980 | return state->memregion("maincpu")->base()[0x20000 + offset]; |
| 981 | 981 |
| r15082 | r15083 | |
|---|---|---|
| 391 | 391 | { "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" } |
| 392 | 392 | }; |
| 393 | 393 | |
| 394 | return i | |
| 394 | return iop | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | #if 1 // this needs to be added dynamically somehow |
| r15082 | r15083 | |
| 410 | 410 | { |
| 411 | 411 | default: |
| 412 | 412 | case 0x00: ret = 0x0000; break; /* nothing? */ |
| 413 | case 0x09: ret = input_port_read(machine(), "MAHJONG1"); break; | |
| 414 | case 0x12: ret = input_port_read(machine(), "MAHJONG2"); break; | |
| 415 | case 0x1b: ret = input_port_read(machine(), "MAHJONG3"); break; /* player 1 normal inputs? */ | |
| 416 | case 0x24: ret = input_port_read(machine(), "MAHJONG4"); break; | |
| 413 | case 0x09: ret = ioport("MAHJONG1")->read(); break; | |
| 414 | case 0x12: ret = ioport("MAHJONG2")->read(); break; | |
| 415 | case 0x1b: ret = ioport("MAHJONG3")->read(); break; /* player 1 normal inputs? */ | |
| 416 | case 0x24: ret = ioport("MAHJONG4")->read(); break; | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | return ret; |
| r15082 | r15083 | |
| 800 | 800 | UINT32 address_mask; |
| 801 | 801 | |
| 802 | 802 | /* audio bios/cartridge selection */ |
| 803 | if (machine.root_device().memregion("audiobios")->base()) | |
| 804 | state->membank(NEOGEO_BANK_AUDIO_CPU_MAIN_BANK)->configure_entry(0, machine.root_device().memregion("audiobios")->base()); | |
| 805 | state->membank(NEOGEO_BANK_AUDIO_CPU_MAIN_BANK)->configure_entry(1, machine.root_device().memregion("audiocpu")->base()); | |
| 803 | if (state->memregion("audiobios")->base()) | |
| 804 | state->membank(NEOGEO_BANK_AUDIO_CPU_MAIN_BANK)->configure_entry(0, state->memregion("audiobios")->base()); | |
| 805 | state->membank(NEOGEO_BANK_AUDIO_CPU_MAIN_BANK)->configure_entry(1, state->memregion("audiocpu")->base()); | |
| 806 | 806 | |
| 807 | 807 | /* audio banking */ |
| 808 | address_mask = | |
| 808 | address_mask = sta | |
| 809 | 809 | |
| 810 | 810 | rgn = state->memregion("audiocpu")->base(); |
| 811 | 811 | for (region = 0; region < 4; region++) |
| r15082 | r15083 | |
|---|---|---|
| 390 | 390 | BIT 7 = Complement of DS1, bit 7 |
| 391 | 391 | --------------------------------- |
| 392 | 392 | */ |
| 393 | return i | |
| 393 | return iop | |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | case 0x1000/2: /* Input ports and DIP switches */ |
| 181 | 181 | { |
| 182 | 182 | static const char *const sysports[] = { "SERVICE", "COINAGE", "DSW", "UNKNOWN" }; |
| 183 | return | |
| 183 | return | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | case 0x3000/2: /* PPI @ 4C */ |
| r15082 | r15083 | |
| 189 | 189 | case 0x3020/2: /* ADC0804 data output */ |
| 190 | 190 | { |
| 191 | 191 | static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 192 | return | |
| 192 | return s | |
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
| r15082 | r15083 | |
| 235 | 235 | case 0x0010/2: /* Input ports and DIP switches */ |
| 236 | 236 | { |
| 237 | 237 | static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" }; |
| 238 | return | |
| 238 | return | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | case 0x0020/2: /* PPI @ 4C */ |
| r15082 | r15083 | |
| 245 | 245 | case 0x0030/2: /* ADC0804 data output */ |
| 246 | 246 | { |
| 247 | 247 | static const char *const adcports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 248 | return | |
| 248 | return s | |
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
| r15082 | r15083 | |
| 393 | 393 | |
| 394 | 394 | static void sharrier_i8751_sim(running_machine &machine) |
| 395 | 395 | { |
| 396 | workram[0x492/2] = (in | |
| 396 | workram[0x492/2] = (machine.root_device().ioport | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 |
| r15082 | r15083 | |
|---|---|---|
| 204 | 204 | static INTERRUPT_GEN( statriv2_interrupt ) |
| 205 | 205 | { |
| 206 | 206 | statriv2_state *state = device->machine().driver_data<statriv2_state>(); |
| 207 | UINT8 new_coin = | |
| 207 | UINT8 new_coin = s | |
| 208 | 208 | |
| 209 | 209 | /* check the coin inputs once per frame */ |
| 210 | 210 | state->m_latched_coin |= new_coin & (new_coin ^ state->m_last_coin); |
| r15082 | r15083 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p1_control_r) |
| 205 | 205 | { |
| 206 | return i | |
| 206 | return iop | |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p2_control_r) |
| r15082 | r15083 | |
| 211 | 211 | UINT32 ret; |
| 212 | 212 | |
| 213 | 213 | /* upright cabinet only uses a single set of controls */ |
| 214 | if (input_port_read(machine(), "DSW0") & 0x20) | |
| 215 | ret = input_port_read(machine(), LADYBUG_P2_CONTROL_PORT_TAG); | |
| 214 | if (ioport("DSW0")->read() & 0x20) | |
| 215 | ret = ioport(LADYBUG_P2_CONTROL_PORT_TAG)->read(); | |
| 216 | 216 | else |
| 217 | ret = i | |
| 217 | ret = iop | |
| 218 | 218 | |
| 219 | 219 | return ret; |
| 220 | 220 | } |
| r15082 | r15083 | |
| 234 | 234 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 235 | 235 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 236 | 236 | /* them this way is enough to get the game running. */ |
| 237 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 237 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 238 | 238 | |
| 239 | 239 | PORT_START("IN2") |
| 240 | 240 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 331 | 331 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 332 | 332 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 333 | 333 | /* them this way is enough to get the game running. */ |
| 334 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 334 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 335 | 335 | |
| 336 | 336 | PORT_START("IN2") |
| 337 | 337 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 416 | 416 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 417 | 417 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 418 | 418 | /* them this way is enough to get the game running. */ |
| 419 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 419 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 420 | 420 | |
| 421 | 421 | PORT_START("IN2") |
| 422 | 422 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| r15082 | r15083 | |
| 499 | 499 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| 500 | 500 | /* high. There are probably other differencies in the hardware, but emulating */ |
| 501 | 501 | /* them this way is enough to get the game running. */ |
| 502 | PORT_BIT( 0xc0, 0x40, IPT_VBLANK | |
| 502 | PORT_BIT( 0xc0, 0x40, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 503 | 503 | |
| 504 | 504 | PORT_START("IN2") |
| 505 | 505 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 207 | 207 | { |
| 208 | 208 | case 0: |
| 209 | 209 | // override the ball gate switch |
| 210 | return i | |
| 210 | return iop | |
| 211 | 211 | case 1: |
| 212 | return i | |
| 212 | return iop | |
| 213 | 213 | case 2: |
| 214 | return i | |
| 214 | return iop | |
| 215 | 215 | default: |
| 216 | 216 | return 0xff; |
| 217 | 217 | } |
| r15082 | r15083 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | static INTERRUPT_GEN( starshp1_interrupt ) |
| 18 | 18 | { |
| 19 | if (( | |
| 19 | if (( | |
| 20 | 20 | generic_pulse_irq_line(device, 0, 1); |
| 21 | 21 | } |
| 22 | 22 | |
| r15082 | r15083 | |
| 71 | 71 | switch (m_analog_in_select) |
| 72 | 72 | { |
| 73 | 73 | case 0: |
| 74 | val = i | |
| 74 | val = iop | |
| 75 | 75 | break; |
| 76 | 76 | case 1: |
| 77 | val = i | |
| 77 | val = iop | |
| 78 | 78 | break; |
| 79 | 79 | case 2: |
| 80 | 80 | val = 0x20; /* DAC feedback, not used */ |
| 81 | 81 | break; |
| 82 | 82 | case 3: |
| 83 | val = i | |
| 83 | val = iop | |
| 84 | 84 | break; |
| 85 | 85 | } |
| 86 | 86 | |
| r15082 | r15083 | |
| 202 | 202 | PORT_START("VBLANK") |
| 203 | 203 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,starshp1_analog_r, NULL) /* analog in */ |
| 204 | 204 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 205 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 205 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 206 | 206 | |
| 207 | 207 | PORT_START("COINAGE") |
| 208 | 208 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,collision_latch_r, NULL) /* collision latch */ |
| r15082 | r15083 | |
|---|---|---|
| 324 | 324 | switch (offset) |
| 325 | 325 | { |
| 326 | 326 | case 0x00: |
| 327 | return (i | |
| 327 | return (iop | |
| 328 | 328 | |
| 329 | 329 | case 0x01: |
| 330 | return (i | |
| 330 | return (iop | |
| 331 | 331 | |
| 332 | 332 | case 0x02: |
| 333 | return (i | |
| 333 | return (iop | |
| 334 | 334 | |
| 335 | 335 | case 0x03: |
| 336 | return (i | |
| 336 | return (iop | |
| 337 | 337 | |
| 338 | 338 | case 0x04: |
| 339 | return (i | |
| 339 | return (iop | |
| 340 | 340 | |
| 341 | 341 | case 0x05: |
| 342 | return (i | |
| 342 | return (iop | |
| 343 | 343 | |
| 344 | 344 | case 0x06: |
| 345 | return (i | |
| 345 | return (iop | |
| 346 | 346 | |
| 347 | 347 | // case 0x07: |
| 348 | 348 | // return (coin_word & mem_mask); |
| r15082 | r15083 | |
| 360 | 360 | switch (offset) |
| 361 | 361 | { |
| 362 | 362 | case 0x00: |
| 363 | curr = i | |
| 363 | curr = iop | |
| 364 | 364 | res = curr - m_last[0]; |
| 365 | 365 | m_last[0] = curr; |
| 366 | 366 | return res; |
| 367 | 367 | |
| 368 | 368 | case 0x02: |
| 369 | curr = i | |
| 369 | curr = iop | |
| 370 | 370 | res = curr - m_last[1]; |
| 371 | 371 | m_last[1] = curr; |
| 372 | 372 | return res; |
| r15082 | r15083 | |
| 383 | 383 | { |
| 384 | 384 | case 0x00: |
| 385 | 385 | { |
| 386 | return (i | |
| 386 | return (iop | |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | case 0x01: |
| 390 | 390 | { |
| 391 | return (i | |
| 391 | return (iop | |
| 392 | 392 | } |
| 393 | 393 | } |
| 394 | 394 | |
| r15082 | r15083 | |
| 402 | 402 | switch (m_mjnquest_input) |
| 403 | 403 | { |
| 404 | 404 | case 0x01: |
| 405 | return i | |
| 405 | return iop | |
| 406 | 406 | |
| 407 | 407 | case 0x02: |
| 408 | return i | |
| 408 | return iop | |
| 409 | 409 | |
| 410 | 410 | case 0x04: |
| 411 | return i | |
| 411 | return iop | |
| 412 | 412 | |
| 413 | 413 | case 0x08: |
| 414 | return i | |
| 414 | return iop | |
| 415 | 415 | |
| 416 | 416 | case 0x10: |
| 417 | return i | |
| 417 | return iop | |
| 418 | 418 | |
| 419 | 419 | } |
| 420 | 420 | |
| r15082 | r15083 | |
| 2461 | 2461 | |
| 2462 | 2462 | PORT_START("IN0") |
| 2463 | 2463 | /* Joystick Control */ |
| 2464 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2465 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2466 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2467 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2468 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2469 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2470 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2471 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2464 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2465 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2466 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2467 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2468 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2469 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2470 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2471 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2472 | 2472 | /* 4 Buttons Control */ |
| 2473 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2474 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2475 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2476 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2477 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2478 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2479 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2480 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2473 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2474 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2475 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2476 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2477 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2478 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2479 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2480 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2481 | 2481 | |
| 2482 | 2482 | PORT_START("IN1") |
| 2483 | 2483 | /* Joystick Control */ |
| 2484 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2485 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2486 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2487 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2488 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2489 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2490 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2491 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 2484 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2485 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2486 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2487 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2488 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2489 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2490 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2491 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 2492 | 2492 | /* 4 Buttons Control */ |
| 2493 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2494 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2495 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2496 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2498 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2499 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2500 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 2493 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2494 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2495 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2496 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2498 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2499 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2500 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 2501 | 2501 | |
| 2502 | 2502 | PORT_START("IN2") |
| 2503 | 2503 | TAITO_F2_SYSTEM_INPUT |
| r15082 | r15083 | |
| 5310 | 5310 | static DRIVER_INIT( mjnquest ) |
| 5311 | 5311 | { |
| 5312 | 5312 | taitof2_state *state = machine.driver_data<taitof2_state>(); |
| 5313 | int i, len = | |
| 5313 | int i, len = sta | |
| 5314 | 5314 | UINT8 *gfx = state->memregion("gfx2")->base(); |
| 5315 | 5315 | |
| 5316 | 5316 | /* the bytes in each longword are in reversed order, put them in the |
| r15082 | r15083 | |
|---|---|---|
| 295 | 295 | const char *string = (const char *)param; |
| 296 | 296 | int which = string[0] - '0'; |
| 297 | 297 | |
| 298 | return i | |
| 298 | return iop | |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | |
| 302 | 302 | WRITE8_MEMBER(gottlieb_state::gottlieb_analog_reset_w) |
| 303 | 303 | { |
| 304 | 304 | /* reset the trackball counters */ |
| 305 | m_track[0] = input_port_read_safe(machine(), "TRACKX", 0); | |
| 306 | m_track[1] = input_port_read_safe(machine(), "TRACKY", 0); | |
| 305 | m_track[0] = ioport("TRACKX")->read_safe(0); | |
| 306 | m_track[1] = ioport("TRACKY")->read_safe(0); | |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | |
| 310 | 310 | CUSTOM_INPUT_MEMBER(gottlieb_state::stooges_joystick_r) |
| 311 | 311 | { |
| 312 | 312 | static const char *const joyport[] = { "P2JOY", "P3JOY", "P1JOY", NULL }; |
| 313 | return (joyport[m_joystick_select & 3] != NULL) ? i | |
| 313 | return (joyport[m_joystick_select & 3] != NULL) ? iop | |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | |
| r15082 | r15083 | |
| 1235 | 1235 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 1236 | 1236 | PORT_DIPSETTING( 0x20, DEF_STR( French ) ) |
| 1237 | 1237 | PORT_DIPNAME( 0xc2, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW:!6,!7,!8") |
| 1238 | PORT_DIPSETTING( 0x42, "A 3/1 B 1/2" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x20) | |
| 1239 | PORT_DIPSETTING( 0x42, "A 4/1 B 1/1" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x00) | |
| 1240 | PORT_DIPSETTING( 0x82, "A 1/5 B 1/2" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x20) | |
| 1241 | PORT_DIPSETTING( 0x82, "A 3/1 B 1/1" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x00) | |
| 1242 | PORT_DIPSETTING( 0x02, "A 2/1 B 2/3" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x20) | |
| 1243 | PORT_DIPSETTING( 0x02, "A 2/1 B 1/1" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x00) | |
| 1238 | PORT_DIPSETTING( 0x42, "A 3/1 B 1/2" ) PORT_CONDITION("DSW",0x20,EQUALS,0x20) | |
| 1239 | PORT_DIPSETTING( 0x42, "A 4/1 B 1/1" ) PORT_CONDITION("DSW",0x20,EQUALS,0x00) | |
| 1240 | PORT_DIPSETTING( 0x82, "A 1/5 B 1/2" ) PORT_CONDITION("DSW",0x20,EQUALS,0x20) | |
| 1241 | PORT_DIPSETTING( 0x82, "A 3/1 B 1/1" ) PORT_CONDITION("DSW",0x20,EQUALS,0x00) | |
| 1242 | PORT_DIPSETTING( 0x02, "A 2/1 B 2/3" ) PORT_CONDITION("DSW",0x20,EQUALS,0x20) | |
| 1243 | PORT_DIPSETTING( 0x02, "A 2/1 B 1/1" ) PORT_CONDITION("DSW",0x20,EQUALS,0x00) | |
| 1244 | 1244 | PORT_DIPSETTING( 0xc0, "A 2/1 B 2/1" ) |
| 1245 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/2" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x20) | |
| 1246 | PORT_DIPSETTING( 0x80, "A 2/1 B 1/2" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x00) | |
| 1247 | PORT_DIPSETTING( 0x40, "A 1/1 B 1/3" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x20) | |
| 1248 | PORT_DIPSETTING( 0x40, "A 2/1 B 1/3" ) PORT_CONDITION("DSW",0x20,PORTCOND_EQUALS,0x00) | |
| 1245 | PORT_DIPSETTING( 0x80, "A 1/1 B 1/2" ) PORT_CONDITION("DSW",0x20,EQUALS,0x20) | |
| 1246 | PORT_DIPSETTING( 0x80, "A 2/1 B 1/2" ) PORT_CONDITION("DSW",0x20,EQUALS,0x00) | |
| 1247 | PORT_DIPSETTING( 0x40, "A 1/1 B 1/3" ) PORT_CONDITION("DSW",0x20,EQUALS,0x20) | |
| 1248 | PORT_DIPSETTING( 0x40, "A 2/1 B 1/3" ) PORT_CONDITION("DSW",0x20,EQUALS,0x00) | |
| 1249 | 1249 | PORT_DIPSETTING( 0x00, "A 1/1 B 1/1" ) |
| 1250 | 1250 | PORT_DIPSETTING( 0xc2, DEF_STR( Free_Play ) ) |
| 1251 | 1251 |
| r15082 | r15083 | |
|---|---|---|
| 690 | 690 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 691 | 691 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 692 | 692 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 693 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 693 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 694 | 694 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state,sub_cpu_busy, NULL) |
| 695 | 695 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 696 | 696 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 2023 | 2023 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x3808, 0x3808, write8_delegate(FUNC(ddragon_state::toffy_bankswitch_w),state)); |
| 2024 | 2024 | |
| 2025 | 2025 | /* the program rom has a simple bitswap encryption */ |
| 2026 | rom = machine.root_device().memregion("maincpu")->base(); | |
| 2027 | length = machine.root_device().memregion("maincpu")->bytes(); | |
| 2026 | rom = state->memregion("maincpu")->base(); | |
| 2027 | length = state->memregion("maincpu")->bytes(); | |
| 2028 | 2028 | for (i = 0; i < length; i++) |
| 2029 | 2029 | rom[i] = BITSWAP8(rom[i], 6,7,5,4,3,2,1,0); |
| 2030 | 2030 | |
| 2031 | 2031 | /* and the fg gfx ... */ |
| 2032 | rom = machine.root_device().memregion("gfx1")->base(); | |
| 2033 | length = machine.root_device().memregion("gfx1")->bytes(); | |
| 2032 | rom = state->memregion("gfx1")->base(); | |
| 2033 | length = state->memregion("gfx1")->bytes(); | |
| 2034 | 2034 | for (i = 0; i < length; i++) |
| 2035 | 2035 | rom[i] = BITSWAP8(rom[i], 7,6,5,3,4,2,1,0); |
| 2036 | 2036 | |
| 2037 | 2037 | /* and the sprites gfx */ |
| 2038 | rom = machine.root_device().memregion("gfx2")->base(); | |
| 2039 | length = machine.root_device().memregion("gfx2")->bytes(); | |
| 2038 | rom = state->memregion("gfx2")->base(); | |
| 2039 | length = state->memregion("gfx2")->bytes(); | |
| 2040 | 2040 | for (i = 0; i < length; i++) |
| 2041 | 2041 | rom[i] = BITSWAP8(rom[i], 7,6,5,4,3,2,0,1); |
| 2042 | 2042 | |
| 2043 | 2043 | /* and the bg gfx */ |
| 2044 | rom = | |
| 2044 | rom = sta | |
| 2045 | 2045 | length = state->memregion("gfx3")->bytes(); |
| 2046 | 2046 | for (i = 0; i < length / 2; i++) |
| 2047 | 2047 | { |
| r15082 | r15083 | |
| 2058 | 2058 | int i; |
| 2059 | 2059 | UINT8 *dst,*src; |
| 2060 | 2060 | |
| 2061 | src = | |
| 2061 | src = sta | |
| 2062 | 2062 | dst = state->memregion("gfx1")->base(); |
| 2063 | 2063 | |
| 2064 | 2064 | for (i = 0; i < 0x8000; i++) |
| r15082 | r15083 | |
|---|---|---|
| 321 | 321 | ---- ---- ---- --x- (Activate Test) |
| 322 | 322 | ---- ---- ---- ---x (Advance through Tests) |
| 323 | 323 | */ |
| 324 | return i | |
| 324 | return iop | |
| 325 | 325 | case 0x0014/2: |
| 326 | 326 | case 0x0016/2: |
| 327 | 327 | return machine().device<okim6295_device>("oki1")->read(space,0); |
| r15082 | r15083 | |
| 392 | 392 | xxxx xxxx ---- ---- DIPSW4 |
| 393 | 393 | ---- ---- xxxx xxxx DIPSW3 |
| 394 | 394 | */ |
| 395 | return i | |
| 395 | return iop | |
| 396 | 396 | } |
| 397 | 397 | return m_ac_devram[offset]; |
| 398 | 398 | } |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | /* bit 0 is data */ |
| 47 | 47 | /* bit 1 is cs (active low) */ |
| 48 | 48 | /* bit 2 is clock (active high) */ |
| 49 | i | |
| 49 | iop | |
| 50 | 50 | |
| 51 | 51 | /* bit 5 is select tile bank */ |
| 52 | 52 | k056832_set_tile_bank(m_k056832, (data & 0x20) >> 5); |
| r15082 | r15083 | |
|---|---|---|
| 1199 | 1199 | goldnpkr_state *state = device->machine().driver_data<goldnpkr_state>(); |
| 1200 | 1200 | switch( state->m_mux_data & 0xf0 ) /* bits 4-7 */ |
| 1201 | 1201 | { |
| 1202 | case 0x10: return input_port_read(device->machine(), "IN0-0"); | |
| 1203 | case 0x20: return input_port_read(device->machine(), "IN0-1"); | |
| 1204 | case 0x40: return input_port_read(device->machine(), "IN0-2"); | |
| 1205 | case 0x80: return input_port_read(device->machine(), "IN0-3"); | |
| 1202 | case 0x10: return state->ioport("IN0-0")->read(); | |
| 1203 | case 0x20: return state->ioport("IN0-1")->read(); | |
| 1204 | case 0x40: return state->ioport("IN0-2")->read(); | |
| 1205 | case 0x80: return state->ioport("IN0-3")->read(); | |
| 1206 | 1206 | } |
| 1207 | 1207 | return 0xff; |
| 1208 | 1208 | } |
| r15082 | r15083 | |
| 1214 | 1214 | |
| 1215 | 1215 | switch( state->m_mux_data & 0xf0 ) /* bits 4-7 */ |
| 1216 | 1216 | { |
| 1217 | case 0x10: return input_port_read(device->machine(), "IN0-0"); | |
| 1218 | case 0x20: return input_port_read(device->machine(), "IN0-1"); | |
| 1219 | case 0x40: return input_port_read(device->machine(), "IN0-2"); | |
| 1220 | case 0x80: return input_port_read(device->machine(), "IN0-3"); | |
| 1217 | case 0x10: return state->ioport("IN0-0")->read(); | |
| 1218 | case 0x20: return state->ioport("IN0-1")->read(); | |
| 1219 | case 0x40: return state->ioport("IN0-2")->read(); | |
| 1220 | case 0x80: return state->ioport("IN0-3")->read(); | |
| 1221 | 1221 | } |
| 1222 | 1222 | |
| 1223 | 1223 | pa_7 = (state->m_pia0_PA_data >> 7) & 1; /* To do: bit PA5 to pin CB1 */ |
| r15082 | r15083 | |
|---|---|---|
| 199 | 199 | |
| 200 | 200 | PORT_START("STATUS") |
| 201 | 201 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x01) |
| 202 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 202 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 203 | 203 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x04) |
| 204 | 204 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x08) |
| 205 | 205 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x10) |
| r15082 | r15083 | |
|---|---|---|
| 29 | 29 | #include "includes/hyhoo.h" |
| 30 | 30 | #include "machine/nvram.h" |
| 31 | 31 | |
| 32 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 33 | #if SIGNED_DAC | |
| 34 | #define DAC_WRITE dac_signed_w | |
| 35 | #else | |
| 36 | #define DAC_WRITE dac_w | |
| 37 | #endif | |
| 38 | 32 | |
| 39 | ||
| 40 | 33 | static DRIVER_INIT( hyhoo ) |
| 41 | 34 | { |
| 42 | 35 | nb1413m3_type = NB1413M3_HYHOO; |
| r15082 | r15083 | |
| 64 | 57 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r, nb1413m3_inputportsel_w) |
| 65 | 58 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r, nb1413m3_sndrombank1_w) |
| 66 | 59 | AM_RANGE(0xc0, 0xcf) AM_WRITEONLY AM_SHARE("clut") |
| 67 | AM_RANGE(0xd0, 0xd0) AM_READNOP AM_DEVWRITE_LEGACY("dac", | |
| 60 | AM_RANGE(0xd0, 0xd0) AM_READNOP AM_DEVWRITE_LEGACY("dac", dac_w | |
| 68 | 61 | AM_RANGE(0xe0, 0xe0) AM_WRITE(hyhoo_romsel_w) |
| 69 | 62 | AM_RANGE(0xe0, 0xe1) AM_READ_LEGACY(nb1413m3_gfxrom_r) |
| 70 | 63 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| r15082 | r15083 | |
| 321 | 314 | ROM_END |
| 322 | 315 | |
| 323 | 316 | |
| 324 | GAME( 1987, hyhoo, 0, hyhoo, hyhoo, hyhoo, ROT90, "Nichibutsu", "Taisen Quiz HYHOO (Japan)", 0 ) | |
| 325 | GAME( 1987, hyhoo2, 0, hyhoo, hyhoo2, hyhoo2, ROT90, "Nichibutsu", "Taisen Quiz HYHOO 2 (Japan)", 0 ) | |
| 326 | ||
| 317 | GAME( 1987, hyhoo, 0, hyhoo, hyhoo, hyhoo, ROT90, "Nichibutsu", "Hayaoshi Taisen Quiz Hyhoo (Japan)", 0 ) | |
| 318 | GAME( 1987, hyhoo2, 0, hyhoo, hyhoo2, hyhoo2, ROT90, "Nichibutsu", "Hayaoshi Taisen Quiz Hyhoo 2 (Japan)", 0 ) |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | COMBINE_DATA(&m_cur_control2); |
| 84 | 84 | |
| 85 | i | |
| 85 | iop | |
| 86 | 86 | |
| 87 | 87 | if (data & 0x100) |
| 88 | 88 | k053246_set_objcha_line(m_k053246, ASSERT_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 487 | 487 | static READ8_DEVICE_HANDLER( portA_r ) |
| 488 | 488 | { |
| 489 | 489 | taitol_state *state = device->machine().driver_data<taitol_state>(); |
| 490 | return | |
| 490 | return s | |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | static READ8_DEVICE_HANDLER( portB_r ) |
| 494 | 494 | { |
| 495 | 495 | taitol_state *state = device->machine().driver_data<taitol_state>(); |
| 496 | return | |
| 496 | return s | |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | static READ8_DEVICE_HANDLER( extport_select_and_ym2203_r ) |
| r15082 | r15083 | |
| 551 | 551 | switch (m_mux_ctrl) |
| 552 | 552 | { |
| 553 | 553 | case 0: |
| 554 | return i | |
| 554 | return iop | |
| 555 | 555 | case 1: |
| 556 | return i | |
| 556 | return iop | |
| 557 | 557 | case 2: |
| 558 | return i | |
| 558 | return iop | |
| 559 | 559 | case 3: |
| 560 | return i | |
| 560 | return iop | |
| 561 | 561 | case 7: |
| 562 | return i | |
| 562 | return iop | |
| 563 | 563 | default: |
| 564 | 564 | logerror("Mux read from unknown port %d (%04x)\n", m_mux_ctrl, cpu_get_pc(&space.device())); |
| 565 | 565 | return 0xff; |
| r15082 | r15083 | |
| 636 | 636 | { |
| 637 | 637 | |
| 638 | 638 | /* reset the trackball counter */ |
| 639 | m_tracky = i | |
| 639 | m_tracky = iop | |
| 640 | 640 | return 0; |
| 641 | 641 | } |
| 642 | 642 | |
| r15082 | r15083 | |
| 644 | 644 | { |
| 645 | 645 | |
| 646 | 646 | /* reset the trackball counter */ |
| 647 | m_trackx = i | |
| 647 | m_trackx = iop | |
| 648 | 648 | return 0; |
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | READ8_MEMBER(taitol_state::horshoes_tracky_lo_r) |
| 652 | 652 | { |
| 653 | return (i | |
| 653 | return (iop | |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | READ8_MEMBER(taitol_state::horshoes_tracky_hi_r) |
| 657 | 657 | { |
| 658 | return (i | |
| 658 | return (iop | |
| 659 | 659 | } |
| 660 | 660 | |
| 661 | 661 | READ8_MEMBER(taitol_state::horshoes_trackx_lo_r) |
| 662 | 662 | { |
| 663 | return (i | |
| 663 | return (iop | |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | 666 | READ8_MEMBER(taitol_state::horshoes_trackx_hi_r) |
| 667 | 667 | { |
| 668 | return (i | |
| 668 | return (iop | |
| 669 | 669 | } |
| 670 | 670 | |
| 671 | 671 | |
| r15082 | r15083 | |
| 1532 | 1532 | PORT_DIPSETTING( 0x08, "Mode A" ) |
| 1533 | 1533 | PORT_DIPSETTING( 0x00, "Mode B" ) |
| 1534 | 1534 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 1535 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1536 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1537 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1538 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1539 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1540 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1541 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1542 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1535 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1536 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1537 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1538 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1539 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1540 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1541 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1542 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1543 | 1543 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 1544 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1545 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1546 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1547 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x08) | |
| 1548 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1549 | PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1550 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1551 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x08, PORTCOND_EQUALS, 0x00) | |
| 1544 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1545 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1546 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1547 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x08) | |
| 1548 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1549 | PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1550 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1551 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x08, EQUALS, 0x00) | |
| 1552 | 1552 | |
| 1553 | 1553 | PORT_START("DSWB") |
| 1554 | 1554 | TAITO_DIFFICULTY_LOC(SW2) /* Difficulty controls the number of hits requiered to destroy enemies */ |
| r15082 | r15083 | |
|---|---|---|
| 51 | 51 | m_vbuffer = (data & 0x80) >> 7; |
| 52 | 52 | coin_counter_w(machine(), 0, data & 1); |
| 53 | 53 | |
| 54 | i | |
| 54 | iop | |
| 55 | 55 | |
| 56 | 56 | //data & 0x100 and data & 0x004 always set |
| 57 | 57 | } |
| r15082 | r15083 | |
| 59 | 59 | READ16_MEMBER(eolith16_state::eolith16_custom_r) |
| 60 | 60 | { |
| 61 | 61 | eolith_speedup_read(&space); |
| 62 | return i | |
| 62 | return iop | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | if (ACCESSING_BITS_0_7) |
| 148 | 148 | { |
| 149 | i | |
| 149 | iop | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | break; |
| r15082 | r15083 | |
| 166 | 166 | |
| 167 | 167 | READ32_MEMBER(groundfx_state::groundfx_adc_r) |
| 168 | 168 | { |
| 169 | return (i | |
| 169 | return (iop | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | WRITE32_MEMBER(groundfx_state::groundfx_adc_w) |
| r15082 | r15083 | |
|---|---|---|
| 71 | 71 | { |
| 72 | 72 | const rectangle &visarea = machine.primary_screen->visible_area(); |
| 73 | 73 | |
| 74 | *x = (((input_port_read(machine, player ? "GUNX2" : "GUNX1") & 0xff) * visarea.width()) >> 8) + visarea.min_x; | |
| 75 | *y = (((input_port_read(machine, player ? "GUNY2" : "GUNY1") & 0xff) * visarea.height()) >> 8) + visarea.min_y; | |
| 74 | *x = (((machine.root_device().ioport(player ? "GUNX2" : "GUNX1")->read() & 0xff) * visarea.width()) >> 8) + visarea.min_x; | |
| 75 | *y = (((machine.root_device().ioport(player ? "GUNY2" : "GUNY1")->read() & 0xff) * visarea.height()) >> 8) + visarea.min_y; | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 |
| r15082 | r15083 | |
|---|---|---|
| 288 | 288 | switch (m_input_select) |
| 289 | 289 | { |
| 290 | 290 | case 0x01: |
| 291 | ret = i | |
| 291 | ret = iop | |
| 292 | 292 | break; |
| 293 | 293 | case 0x02: |
| 294 | ret = i | |
| 294 | ret = iop | |
| 295 | 295 | break; |
| 296 | 296 | case 0x04: |
| 297 | ret = i | |
| 297 | ret = iop | |
| 298 | 298 | break; |
| 299 | 299 | case 0x00: |
| 300 | 300 | case 0x08: |
| 301 | ret = i | |
| 301 | ret = iop | |
| 302 | 302 | break; |
| 303 | 303 | } |
| 304 | 304 | return ret; |
| r15082 | r15083 | |
|---|---|---|
| 61 | 61 | READ8_MEMBER(fcombat_state::fcombat_port01_r) |
| 62 | 62 | { |
| 63 | 63 | /* the cocktail flip bit muxes between ports 0 and 1 */ |
| 64 | return m_cocktail_flip ? | |
| 64 | return ioport(m_cocktail_flip ? | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
| r15082 | r15083 | |
| 194 | 194 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 195 | 195 | |
| 196 | 196 | PORT_START("DSW1") /* dip switches/VBLANK (0xe200) */ |
| 197 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 197 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 198 | 198 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) // related to vblank |
| 199 | 199 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 200 | 200 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | state->m_potsense[1] = 0; |
| 147 | 147 | |
| 148 | 148 | /* PCB supports two dials, but cab has only got one */ |
| 149 | machine.scheduler().timer_set(machine.primary_screen->time_until_pos(i | |
| 149 | machine.scheduler().timer_set(machine.primary_screen->time_until_pos(state->iop | |
| 150 | 150 | machine.scheduler().timer_set(machine.primary_screen->time_until_pos(0), FUNC(destroyr_frame_callback)); |
| 151 | 151 | } |
| 152 | 152 | |
| r15082 | r15083 | |
| 237 | 237 | |
| 238 | 238 | if (offset & 1) |
| 239 | 239 | { |
| 240 | return i | |
| 240 | return iop | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | else |
| 244 | 244 | { |
| 245 | UINT8 ret = i | |
| 245 | UINT8 ret = iop | |
| 246 | 246 | |
| 247 | 247 | if (m_potsense[0] && m_potmask[0]) |
| 248 | 248 | ret |= 4; |
| r15082 | r15083 | |
| 297 | 297 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 298 | 298 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 299 | 299 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 300 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 300 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 301 | 301 | |
| 302 | 302 | PORT_START("IN2") |
| 303 | 303 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:4,3") |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_3f_r) |
| 178 | 178 | { |
| 179 | 179 | const char *tag = (const char *)param; |
| 180 | return i | |
| 180 | return iop | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_c0_r) |
| 184 | 184 | { |
| 185 | 185 | const char *tag = (const char *)param; |
| 186 | return (i | |
| 186 | return (iop | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | |
| r15082 | r15083 | |
| 237 | 237 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 238 | 238 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 ) |
| 239 | 239 | PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW1") |
| 240 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK | |
| 240 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 241 | 241 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 242 | 242 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 243 | 243 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 138 | 138 | { |
| 139 | 139 | |
| 140 | 140 | m_x^=0x40; //vblank? eeprom read bit? |
| 141 | return (i | |
| 141 | return (iop | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | WRITE32_MEMBER(feversoc_state::output_w) |
| r15082 | r15083 | |
|---|---|---|
| 263 | 263 | m_in_0_shift = 0; |
| 264 | 264 | m_in_1_shift = 0; |
| 265 | 265 | |
| 266 | m_in_0 = input_port_read(machine(), "P1"); | |
| 267 | m_in_1 = input_port_read(machine(), "P2"); | |
| 266 | m_in_0 = ioport("P1")->read(); | |
| 267 | m_in_1 = ioport("P2")->read(); | |
| 268 | 268 | |
| 269 | 269 | m_in_dsw_shift = 0; |
| 270 | m_in_dsw = i | |
| 270 | m_in_dsw = iop | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | READ8_MEMBER(multigam_state::multigam_IN1_r) |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | switch (offset) |
| 78 | 78 | { |
| 79 | 79 | case 0x00 >> 1: |
| 80 | return i | |
| 80 | return iop | |
| 81 | 81 | case 0x02 >> 1: |
| 82 | 82 | return 0xffff; // to avoid game to reset (needs more work) |
| 83 | 83 | } |
| r15082 | r15083 | |
| 92 | 92 | switch (offset) |
| 93 | 93 | { |
| 94 | 94 | case 0x00 >> 1: |
| 95 | return i | |
| 95 | return iop | |
| 96 | 96 | case 0x02 >> 1: |
| 97 | return i | |
| 97 | return iop | |
| 98 | 98 | case 0x04 >> 1: |
| 99 | return i | |
| 99 | return iop | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | return 0xffff; |
| r15082 | r15083 | |
| 421 | 421 | static INPUT_PORTS_START( pmroulet ) |
| 422 | 422 | PORT_START("IN0") |
| 423 | 423 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 424 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 424 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* it must be toggled to boot anyway */ | |
| 425 | 425 | PORT_SERVICE_NO_TOGGLE(0x0020, IP_ACTIVE_LOW) |
| 426 | 426 | PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 427 | 427 | PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 199 | 199 | |
| 200 | 200 | READ16_MEMBER(vcombat_state::control_1_r) |
| 201 | 201 | { |
| 202 | return (i | |
| 202 | return (iop | |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | READ16_MEMBER(vcombat_state::control_2_r) |
| 206 | 206 | { |
| 207 | return (i | |
| 207 | return (iop | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | READ16_MEMBER(vcombat_state::control_3_r) |
| 211 | 211 | { |
| 212 | return (i | |
| 212 | return (iop | |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | static void wiggle_i860_common(device_t *device, UINT16 data) |
| r15082 | r15083 | |
|---|---|---|
| 207 | 207 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START2 ) |
| 208 | 208 | PORT_SERVICE_NO_TOGGLE(0x0020, IP_ACTIVE_LOW) |
| 209 | 209 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 210 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 210 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 211 | 211 | |
| 212 | 212 | PORT_START("DSW1") |
| 213 | 213 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r15082 | r15083 | |
| 268 | 268 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 269 | 269 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 270 | 270 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 271 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 271 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* vblank?? has to toggle */ | |
| 272 | 272 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 273 | 273 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 274 | 274 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| r15082 | r15083 | |
| 276 | 276 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 277 | 277 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 278 | 278 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 279 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 279 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* vblank?? has to toggle */ | |
| 280 | 280 | |
| 281 | 281 | PORT_START("SYSTEM") |
| 282 | 282 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r15082 | r15083 | |
| 347 | 347 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 348 | 348 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 349 | 349 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 350 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 350 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* vblank?? has to toggle */ | |
| 351 | 351 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 352 | 352 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 353 | 353 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| r15082 | r15083 | |
| 355 | 355 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 356 | 356 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 357 | 357 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 358 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 358 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* vblank?? has to toggle */ | |
| 359 | 359 | |
| 360 | 360 | PORT_START("SYSTEM") |
| 361 | 361 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r15082 | r15083 | |
|---|---|---|
| 1377 | 1377 | } |
| 1378 | 1378 | else if (cpu_get_pc(&space.device()) == 0xe3af4) |
| 1379 | 1379 | { |
| 1380 | return i | |
| 1380 | return iop | |
| 1381 | 1381 | } |
| 1382 | 1382 | else |
| 1383 | 1383 | { |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | { |
| 121 | 121 | switch(offset+0x7f40) |
| 122 | 122 | { |
| 123 | case 0x7f40: return input_port_read(machine(), "DSW1"); | |
| 124 | case 0x7f41: return input_port_read(machine(), "DSW2"); | |
| 125 | case 0x7f42: return input_port_read(machine(), "P1"); | |
| 126 | case 0x7f43: return input_port_read(machine(), "P2"); | |
| 127 | case 0x7f44: return input_port_read(machine(), "SYSTEM"); | |
| 123 | case 0x7f40: return ioport("DSW1")->read(); | |
| 124 | case 0x7f41: return ioport("DSW2")->read(); | |
| 125 | case 0x7f42: return ioport("P1")->read(); | |
| 126 | case 0x7f43: return ioport("P2")->read(); | |
| 127 | case 0x7f44: return ioport("SYSTEM")->read(); | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 579 | 579 | case 0x01: |
| 580 | 580 | case 0x02: |
| 581 | 581 | { |
| 582 | return i | |
| 582 | return iop | |
| 583 | 583 | } |
| 584 | 584 | case 0x30: |
| 585 | 585 | { |
| r15082 | r15083 | |
|---|---|---|
| 129 | 129 | switch (m_inputport_selected) |
| 130 | 130 | { |
| 131 | 131 | case 0x00: /* DSW A (bits 0-4) */ |
| 132 | return (i | |
| 132 | return (iop | |
| 133 | 133 | case 0x01: /* DSW A (bits 5-7), DSW B (bits 0-1) */ |
| 134 | return ((i | |
| 134 | return ((iop | |
| 135 | 135 | case 0x02: /* DSW B (bits 2-6) */ |
| 136 | return (i | |
| 136 | return (iop | |
| 137 | 137 | case 0x03: /* DSW B (bit 7), DSW C (bits 0-3) */ |
| 138 | return ((i | |
| 138 | return ((iop | |
| 139 | 139 | case 0x04: /* coins, start */ |
| 140 | return i | |
| 140 | return iop | |
| 141 | 141 | case 0x05: /* 2P controls */ |
| 142 | return i | |
| 142 | return iop | |
| 143 | 143 | case 0x06: /* 1P controls */ |
| 144 | return i | |
| 144 | return iop | |
| 145 | 145 | default: |
| 146 | 146 | return 0xff; |
| 147 | 147 | } |
| r15082 | r15083 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | READ8_MEMBER(beaminv_state::controller_r) |
| 223 | 223 | { |
| 224 | return i | |
| 224 | return iop | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 |
| r15082 | r15083 | |
|---|---|---|
| 337 | 337 | /* game in cocktail mode, they don't work at all. So we fake-mux */ |
| 338 | 338 | /* the controls through player 1's ports */ |
| 339 | 339 | if (mcr_cocktail_flip) |
| 340 | return i | |
| 340 | return iop | |
| 341 | 341 | else |
| 342 | return ((i | |
| 342 | return ((i | |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | |
| r15082 | r15083 | |
| 347 | 347 | { |
| 348 | 348 | /* same deal as above */ |
| 349 | 349 | if (mcr_cocktail_flip) |
| 350 | return i | |
| 350 | return iop | |
| 351 | 351 | else |
| 352 | return (i | |
| 352 | return (iop | |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | |
| r15082 | r15083 | |
| 362 | 362 | |
| 363 | 363 | READ8_MEMBER(mcr_state::kick_ip1_r) |
| 364 | 364 | { |
| 365 | return (i | |
| 365 | return (iop | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | |
| r15082 | r15083 | |
| 382 | 382 | READ8_MEMBER(mcr_state::wacko_ip1_r) |
| 383 | 383 | { |
| 384 | 384 | if (!input_mux) |
| 385 | return i | |
| 385 | return iop | |
| 386 | 386 | else |
| 387 | return i | |
| 387 | return iop | |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | |
| 391 | 391 | READ8_MEMBER(mcr_state::wacko_ip2_r) |
| 392 | 392 | { |
| 393 | 393 | if (!input_mux) |
| 394 | return i | |
| 394 | return iop | |
| 395 | 395 | else |
| 396 | return i | |
| 396 | return iop | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | |
| r15082 | r15083 | |
| 406 | 406 | |
| 407 | 407 | READ8_MEMBER(mcr_state::kroozr_ip1_r) |
| 408 | 408 | { |
| 409 | int dial = i | |
| 409 | int dial = iop | |
| 410 | 410 | return ((dial & 0x80) >> 1) | ((dial & 0x70) >> 4); |
| 411 | 411 | } |
| 412 | 412 | |
| r15082 | r15083 | |
| 629 | 629 | |
| 630 | 630 | READ8_MEMBER(mcr_state::demoderb_ip1_r) |
| 631 | 631 | { |
| 632 | return input_port_read(machine(), "ssio:IP1") | | |
| 633 | (input_port_read(machine(), input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1") << 2); | |
| 632 | return ioport("ssio:IP1")->read() | | |
| 633 | (ioport(input_mux ? "ssio:IP1.ALT2" : "ssio:IP1.ALT1")->read() << 2); | |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | |
| 637 | 637 | READ8_MEMBER(mcr_state::demoderb_ip2_r) |
| 638 | 638 | { |
| 639 | return input_port_read(machine(), "ssio:IP2") | | |
| 640 | (input_port_read(machine(), input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1") << 2); | |
| 639 | return ioport("ssio:IP2")->read() | | |
| 640 | (ioport(input_mux ? "ssio:IP2.ALT2" : "ssio:IP2.ALT1")->read() << 2); | |
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 |
| r15082 | r15083 | |
|---|---|---|
| 176 | 176 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* The default setting should be cocktail. */ |
| 177 | 177 | PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) ) |
| 178 | 178 | PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW1:7" ) |
| 179 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 179 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* Listed as always ON among DIPs in the manual */ | |
| 180 | 180 | |
| 181 | 181 | PORT_START("DSW2") |
| 182 | 182 | PORT_DIPNAME(0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 1182 | 1182 | LOG(("%s: IC5 PIA Read of Port A (AUX1)\n",device->machine().describe_context())); |
| 1183 | 1183 | |
| 1184 | 1184 | |
| 1185 | UINT8 data = | |
| 1185 | UINT8 data = s | |
| 1186 | 1186 | |
| 1187 | INT8 dx = input_port_read(device->machine(), "TRACKX"); | |
| 1188 | INT8 dy = input_port_read(device->machine(), "TRACKY"); | |
| 1187 | INT8 dx = state->ioport("TRACKX")->read(); | |
| 1188 | INT8 dy = state->ioport("TRACKY")->read(); | |
| 1189 | 1189 | |
| 1190 | 1190 | state->m_cur[0] = dy + dx; |
| 1191 | 1191 | state->m_cur[1] = dy - dx; |
| r15082 | r15083 | |
| 1468 | 1468 | |
| 1469 | 1469 | PORT_START("ORANGE2") |
| 1470 | 1470 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN5) PORT_NAME("20p Token")PORT_IMPULSE(5) |
| 1471 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x04) | |
| 1472 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x05) | |
| 1473 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x06) | |
| 1474 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x07) | |
| 1475 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x08) | |
| 1476 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x09) | |
| 1471 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x04) | |
| 1472 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x05) | |
| 1473 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x06) | |
| 1474 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x07) | |
| 1475 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x08) | |
| 1476 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p") PORT_CONDITION("DIL1",0x0f,EQUALS,0x09) | |
| 1477 | 1477 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 1478 | 1478 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 1479 | 1479 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| r15082 | r15083 | |
| 1484 | 1484 | PORT_START("BLACK1") |
| 1485 | 1485 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Gamble") |
| 1486 | 1486 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START2) PORT_NAME("Pontoon") |
| 1487 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x01) | |
| 1488 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x09) | |
| 1489 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x03) | |
| 1490 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x04) | |
| 1491 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x05) | |
| 1492 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x06) | |
| 1493 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x07) | |
| 1494 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x08) | |
| 1487 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x01) | |
| 1488 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x09) | |
| 1489 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x03) | |
| 1490 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x04) | |
| 1491 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x05) | |
| 1492 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x06) | |
| 1493 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x07) | |
| 1494 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x08) | |
| 1495 | 1495 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 1496 | 1496 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Test Button") PORT_CODE(KEYCODE_W) |
| 1497 | 1497 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE |
| 1498 | 1498 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_INTERLOCK) PORT_NAME("Rear Door") PORT_CODE(KEYCODE_Q) PORT_TOGGLE |
| 1499 | 1499 | |
| 1500 | 1500 | PORT_START("BLACK2") |
| 1501 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x00) | |
| 1502 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x02) | |
| 1501 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x00) | |
| 1502 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Hi-Lo") PORT_CONDITION("DIL1",0x0f,EQUALS,0x02) | |
| 1503 | 1503 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 1504 | 1504 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_NAME("Twist") |
| 1505 | 1505 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Lo") |
| r15082 | r15083 | |
| 1574 | 1574 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_SPECIAL) |
| 1575 | 1575 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_SPECIAL) |
| 1576 | 1576 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_SPECIAL) |
| 1577 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x00) | |
| 1578 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x01) | |
| 1579 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x02) | |
| 1580 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,PORTCOND_EQUALS,0x03) | |
| 1577 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,EQUALS,0x00) | |
| 1578 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,EQUALS,0x01) | |
| 1579 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,EQUALS,0x02) | |
| 1580 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("10p")PORT_IMPULSE(5) PORT_CONDITION("DIL1",0x0f,EQUALS,0x03) | |
| 1581 | 1581 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_COIN2) PORT_NAME("20p")PORT_IMPULSE(5) |
| 1582 | 1582 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_COIN3) PORT_NAME("50p")PORT_IMPULSE(5) |
| 1583 | 1583 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN4) PORT_NAME("100p")PORT_IMPULSE(5) |
| r15082 | r15083 | |
|---|---|---|
| 1 | /* Bellfruit SWP (Skill With Prizes) Video hardware */ | |
| 1 | /* Bellfruit SWP (Skill With Prizes) Video hardware | |
| 2 | aka Cobra 3 | |
| 2 | 3 | |
| 3 | /* | |
| 4 | This is 'Cobra 3' ? | |
| 5 | is that an expansion board for Scorpion 4, or somehow related? | |
| 6 | The CPU is the same (68340) | |
| 7 | ||
| 8 | Radio Times is probably the only *COMPLETE* dump here, as it | |
| 9 | includes the CD. Other games probably have CDs or HDDs too. | |
| 10 | ||
| 11 | Telly Addicts has a HDD dump (I'm assuming it's the same | |
| 12 | platform) but no sound roms. | |
| 13 | ||
| 14 | 4 | */ |
| 15 | 5 | |
| 16 | 6 | /* Radio Times readme #1 |
| r15082 | r15083 | |
| 128 | 118 | { |
| 129 | 119 | public: |
| 130 | 120 | bfm_swp_state(const machine_config &mconfig, device_type type, const char *tag) |
| 131 | : driver_device(mconfig, type, tag) { } | |
| 121 | : driver_device(mconfig, type, tag), | |
| 122 | m_maincpu(*this, "maincpu") | |
| 123 | { } | |
| 132 | 124 | |
| 125 | UINT32* m_cpuregion; | |
| 126 | UINT32* m_mainram; | |
| 127 | ||
| 128 | DECLARE_READ32_MEMBER(bfm_swp_mem_r); | |
| 129 | DECLARE_WRITE32_MEMBER(bfm_swp_mem_w); | |
| 130 | ||
| 131 | ||
| 133 | 132 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 134 | 133 | { |
| 135 | 134 | return 0; |
| 136 | 135 | } |
| 136 | ||
| 137 | protected: | |
| 138 | ||
| 139 | // devices | |
| 140 | required_device<cpu_device> m_maincpu; | |
| 141 | ||
| 137 | 142 | }; |
| 138 | 143 | |
| 139 | 144 | |
| 140 | 145 | |
| 146 | ||
| 147 | READ32_MEMBER(bfm_swp_state::bfm_swp_mem_r) | |
| 148 | { | |
| 149 | int pc = cpu_get_pc(&space.device()); | |
| 150 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 151 | ||
| 152 | switch ( cs ) | |
| 153 | { | |
| 154 | case 1: | |
| 155 | if (offset<0x100000/4) return m_cpuregion[offset]; | |
| 156 | ||
| 157 | case 2: | |
| 158 | offset&=0x3fff; | |
| 159 | return m_mainram[offset]; | |
| 160 | ||
| 161 | default: | |
| 162 | logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 163 | ||
| 164 | } | |
| 165 | ||
| 166 | return 0x0000; | |
| 167 | } | |
| 168 | ||
| 169 | WRITE32_MEMBER(bfm_swp_state::bfm_swp_mem_w) | |
| 170 | { | |
| 171 | int pc = cpu_get_pc(&space.device()); | |
| 172 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 173 | ||
| 174 | switch ( cs ) | |
| 175 | { | |
| 176 | default: | |
| 177 | logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); | |
| 178 | ||
| 179 | case 2: | |
| 180 | offset&=0x3fff; | |
| 181 | COMBINE_DATA(&m_mainram[offset]); | |
| 182 | break; | |
| 183 | ||
| 184 | ||
| 185 | } | |
| 186 | ||
| 187 | } | |
| 188 | ||
| 189 | ||
| 190 | ||
| 191 | ||
| 141 | 192 | static ADDRESS_MAP_START( bfm_swp_map, AS_PROGRAM, 32, bfm_swp_state ) |
| 142 | AM_RANGE(0x000000, 0x0fffff) AM_ROM | |
| 143 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM | |
| 193 | AM_RANGE(0x00000000, 0x000fffff) AM_ROM | |
| 194 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(bfm_swp_mem_r, bfm_swp_mem_w) | |
| 144 | 195 | ADDRESS_MAP_END |
| 145 | 196 | |
| 146 | 197 | |
| r15082 | r15083 | |
| 148 | 199 | INPUT_PORTS_END |
| 149 | 200 | |
| 150 | 201 | |
| 202 | static MACHINE_START( bfm_swp ) | |
| 203 | { | |
| 204 | bfm_swp_state *state = machine.driver_data<bfm_swp_state>(); | |
| 205 | state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base(); | |
| 206 | state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 207 | ||
| 208 | } | |
| 209 | ||
| 210 | ||
| 151 | 211 | static MACHINE_CONFIG_START( bfm_swp, bfm_swp_state ) |
| 152 | 212 | |
| 153 | 213 | /* basic machine hardware */ |
| 154 | MCFG_CPU_ADD("maincpu", M680 | |
| 214 | MCFG_CPU_ADD("maincpu", M68340 | |
| 155 | 215 | MCFG_CPU_PROGRAM_MAP(bfm_swp_map) |
| 156 | 216 | |
| 217 | MCFG_MACHINE_START( bfm_swp ) | |
| 218 | ||
| 157 | 219 | MCFG_SCREEN_ADD("screen", RASTER) |
| 158 | 220 | MCFG_SCREEN_REFRESH_RATE(60) |
| 159 | 221 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| r15082 | r15083 | |
| 232 | 294 | ROM_LOAD( "totpsnd.lhs", 0x000000, 0x080000, CRC(56a73136) SHA1(10656ede18de9432a8a728cc59d000b5b1bf0150) ) |
| 233 | 295 | ROM_LOAD( "totpsnd.rhs", 0x080000, 0x080000, CRC(28d156ab) SHA1(ebf5c4e008015b9b56b3aa5228c05b8e298daa80) ) |
| 234 | 296 | |
| 235 | DISK_REGION( "scsi" ) // CD or HDD | |
| 236 | DISK_IMAGE_READONLY( "cd or hdd", 0, NO_DUMP ) | |
| 297 | DISK_REGION( "scsi" ) // uses a CD, only one we've seen has been damaged to a point where not all data could be read tho | |
| 298 | DISK_IMAGE_READONLY( "cd", 0, NO_DUMP ) | |
| 237 | 299 | ROM_END |
| 238 | 300 | |
| 239 | 301 | ROM_START( c3_ppays ) |
| r15082 | r15083 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | READ8_MEMBER(clshroad_state::clshroad_input_r) |
| 33 | 33 | { |
| 34 | return ((~input_port_read(machine(), "P1") & (1 << offset)) ? 1 : 0) | | |
| 35 | ((~input_port_read(machine(), "P2") & (1 << offset)) ? 2 : 0) | | |
| 36 | ((~input_port_read(machine(), "DSW1") & (1 << offset)) ? 4 : 0) | | |
| 37 | ((~input_port_read(machine(), "DSW2") & (1 << offset)) ? 8 : 0) ; | |
| 34 | return ((~ioport("P1")->read() & (1 << offset)) ? 1 : 0) | | |
| 35 | ((~ioport("P2")->read() & (1 << offset)) ? 2 : 0) | | |
| 36 | ((~ioport("DSW1")->read() & (1 << offset)) ? 4 : 0) | | |
| 37 | ((~ioport("DSW2")->read() & (1 << offset)) ? 8 : 0) ; | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 |
| r15082 | r15083 | |
|---|---|---|
| 129 | 129 | /* bits $0080-$0010 are probably lamps */ |
| 130 | 130 | if (ACCESSING_BITS_0_7) |
| 131 | 131 | { |
| 132 | i | |
| 132 | iop | |
| 133 | 133 | machine().device<ticket_dispenser_device>("ticket")->write(space, 0, (data & 1) << 7); |
| 134 | 134 | } |
| 135 | 135 | } |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | { |
| 121 | 121 | switch (m_analog_ctrl & 0x03) |
| 122 | 122 | { |
| 123 | case 0x00: return (m_accel = input_port_read(machine(), "IN3")); /* accelerator */ | |
| 124 | case 0x01: return (m_wheel = input_port_read(machine(), "IN4")); /* steering */ | |
| 123 | case 0x00: return (m_accel = ioport("IN3")->read()); /* accelerator */ | |
| 124 | case 0x01: return (m_wheel = ioport("IN4")->read()); /* steering */ | |
| 125 | 125 | case 0x02: return m_accel; /* accelerator (previous?) */ |
| 126 | 126 | case 0x03: return m_wheel; /* steering (previous?) */ |
| 127 | 127 | } |
| r15082 | r15083 | |
|---|---|---|
| 80 | 80 | { |
| 81 | 81 | switch(m_sengokumj_mux_data) |
| 82 | 82 | { |
| 83 | case 0x0100: return input_port_read(machine(), "KEY0"); | |
| 84 | case 0x0200: return input_port_read(machine(), "KEY1"); | |
| 85 | case 0x0400: return input_port_read(machine(), "KEY2"); | |
| 86 | case 0x0800: return input_port_read(machine(), "KEY3"); | |
| 87 | case 0x1000: return input_port_read(machine(), "KEY4"); | |
| 88 | case 0x2000: return input_port_read(machine(), "UNUSED"); | |
| 83 | case 0x0100: return ioport("KEY0")->read(); | |
| 84 | case 0x0200: return ioport("KEY1")->read(); | |
| 85 | case 0x0400: return ioport("KEY2")->read(); | |
| 86 | case 0x0800: return ioport("KEY3")->read(); | |
| 87 | case 0x1000: return ioport("KEY4")->read(); | |
| 88 | case 0x2000: return ioport("UNUSED")->read(); | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | return 0xffff; |
| r15082 | r15083 | |
| 111 | 111 | |
| 112 | 112 | READ16_MEMBER(sengokmj_state::sengokmj_system_r) |
| 113 | 113 | { |
| 114 | return (i | |
| 114 | return (iop | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | static ADDRESS_MAP_START( sengokmj_map, AS_PROGRAM, 16, sengokmj_state ) |
| r15082 | r15083 | |
|---|---|---|
| 327 | 327 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 328 | 328 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 329 | 329 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:5,6") |
| 330 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 331 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 332 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 333 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 334 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 335 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 336 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 337 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 330 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 331 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 332 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 333 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 334 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 335 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 336 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 337 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 338 | 338 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:7,8") |
| 339 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 340 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 341 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 342 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_EQUALS, 0x02) | |
| 343 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 344 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 345 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 346 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWA", 0x02, PORTCOND_NOTEQUALS, 0x02) | |
| 339 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 340 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 341 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 342 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02) | |
| 343 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 344 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 345 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 346 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWA", 0x02, NOTEQUALS, 0x02) | |
| 347 | 347 | |
| 348 | 348 | PORT_START("DSWB") |
| 349 | 349 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:1,2") |
| r15082 | r15083 | |
| 413 | 413 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) |
| 414 | 414 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 415 | 415 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:5,6") |
| 416 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 417 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 418 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 419 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 420 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 421 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 422 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 423 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 416 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 417 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 418 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 419 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 420 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 421 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 422 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 423 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 424 | 424 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:7,8") |
| 425 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 426 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 427 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 428 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 429 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 430 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 431 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 432 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 425 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 426 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 427 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 428 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 429 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 430 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 431 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 432 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 433 | 433 | PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWB:1,2") |
| 434 | 434 | PORT_DIPSETTING( 0x0000, "1" ) |
| 435 | 435 | PORT_DIPSETTING( 0x0200, "2" ) |
| r15082 | r15083 | |
| 536 | 536 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 537 | 537 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 538 | 538 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 539 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_VBLANK | |
| 539 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* ??? */ | |
| 540 | 540 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 541 | 541 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 542 | 542 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 605 | 605 | |
| 606 | 606 | PORT_MODIFY("DSW") |
| 607 | 607 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:7,8") |
| 608 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 609 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 610 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 611 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 612 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 613 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 614 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 615 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_NOTEQUALS, 0x0002) | |
| 608 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 609 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 610 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 611 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 612 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 613 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 614 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 615 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, NOTEQUALS, 0x0002) | |
| 616 | 616 | INPUT_PORTS_END |
| 617 | 617 | |
| 618 | 618 | static INPUT_PORTS_START( superx ) |
| r15082 | r15083 | |
|---|---|---|
| 173 | 173 | m_in_0_shift = 0; |
| 174 | 174 | m_in_1_shift = 0; |
| 175 | 175 | |
| 176 | m_in_0 = input_port_read(machine(), "P1"); | |
| 177 | m_in_1 = input_port_read(machine(), "P2"); | |
| 176 | m_in_0 = ioport("P1")->read(); | |
| 177 | m_in_1 = ioport("P2")->read(); | |
| 178 | 178 | |
| 179 | 179 | } |
| 180 | 180 | |
| r15082 | r15083 | |
| 304 | 304 | { |
| 305 | 305 | cham24_state *state = machine.driver_data<cham24_state>(); |
| 306 | 306 | /* switch PRG rom */ |
| 307 | UINT8* dst = machine.root_device().memregion("maincpu")->base(); | |
| 308 | UINT8* src = machine.root_device().memregion("user1")->base(); | |
| 307 | UINT8* dst = state->memregion("maincpu")->base(); | |
| 308 | UINT8* src = state->memregion("user1")->base(); | |
| 309 | 309 | |
| 310 | 310 | memcpy(&dst[0x8000], &src[0x0f8000], 0x4000); |
| 311 | 311 | memcpy(&dst[0xc000], &src[0x0f8000], 0x4000); |
| r15082 | r15083 | |
|---|---|---|
| 181 | 181 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 182 | 182 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 183 | 183 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* used only by the self test */ | |
| 185 | 185 | |
| 186 | 186 | PORT_START("DSW1") |
| 187 | 187 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 40 | 40 | { |
| 41 | 41 | static const char *const tianames[] = { "PADDLE4", "PADDLE3", "PADDLE2", "PADDLE1", "TIA_IN4", "TIA_IN5" }; |
| 42 | 42 | |
| 43 | return | |
| 43 | return | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | static READ8_DEVICE_HANDLER( tourtabl_get_databus_contents ) |
| r15082 | r15083 | |
|---|---|---|
| 536 | 536 | PORT_DIPSETTING( 0x20, "Number of Wrong Answer" ) |
| 537 | 537 | PORT_DIPSETTING( 0x00, "Number of Good Answer for Bonus Question" ) |
| 538 | 538 | PORT_DIPNAME( 0xc0, 0x40, "Gaming Option Number" ) |
| 539 | PORT_DIPSETTING( 0x00, "2" ) PORT_CONDITION("DSW", 0x20, PORTCOND_EQUALS, 0x20) | |
| 540 | PORT_DIPSETTING( 0x40, "3" ) PORT_CONDITION("DSW", 0x20, PORTCOND_EQUALS, 0x20) | |
| 541 | PORT_DIPSETTING( 0x80, "4" ) PORT_CONDITION("DSW", 0x20, PORTCOND_EQUALS, 0x20) | |
| 542 | PORT_DIPSETTING( 0xc0, "5" ) PORT_CONDITION("DSW", 0x20, PORTCOND_EQUALS, 0x20) | |
| 543 | PORT_DIPSETTING( 0x00, "4" ) PORT_CONDITION("DSW", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 544 | PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("DSW", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 545 | PORT_DIPSETTING( 0x80, "6" ) PORT_CONDITION("DSW", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 546 | PORT_DIPSETTING( 0xc0, "7" ) PORT_CONDITION("DSW", 0x20, PORTCOND_NOTEQUALS, 0x20) | |
| 539 | PORT_DIPSETTING( 0x00, "2" ) PORT_CONDITION("DSW", 0x20, EQUALS, 0x20) | |
| 540 | PORT_DIPSETTING( 0x40, "3" ) PORT_CONDITION("DSW", 0x20, EQUALS, 0x20) | |
| 541 | PORT_DIPSETTING( 0x80, "4" ) PORT_CONDITION("DSW", 0x20, EQUALS, 0x20) | |
| 542 | PORT_DIPSETTING( 0xc0, "5" ) PORT_CONDITION("DSW", 0x20, EQUALS, 0x20) | |
| 543 | PORT_DIPSETTING( 0x00, "4" ) PORT_CONDITION("DSW", 0x20, NOTEQUALS, 0x20) | |
| 544 | PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("DSW", 0x20, NOTEQUALS, 0x20) | |
| 545 | PORT_DIPSETTING( 0x80, "6" ) PORT_CONDITION("DSW", 0x20, NOTEQUALS, 0x20) | |
| 546 | PORT_DIPSETTING( 0xc0, "7" ) PORT_CONDITION("DSW", 0x20, NOTEQUALS, 0x20) | |
| 547 | 547 | |
| 548 | 548 | /* Since the real inputs are multiplexed, we used this fake port |
| 549 | 549 | to read the 2nd player controls when the screen is flipped */ |
| r15082 | r15083 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | READ8_MEMBER(cloud9_state::leta_r) |
| 232 | 232 | { |
| 233 | return i | |
| 233 | return iop | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | CUSTOM_INPUT_MEMBER(rpunch_state::hi_bits_r) |
| 148 | 148 | { |
| 149 | return i | |
| 149 | return iop | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 |
| r15082 | r15083 | |
|---|---|---|
| 154 | 154 | albazg_state *state = device->machine().driver_data<albazg_state>(); |
| 155 | 155 | switch(state->m_mux_data) |
| 156 | 156 | { |
| 157 | case 0x00: return input_port_read(device->machine(), "IN0"); | |
| 158 | case 0x01: return input_port_read(device->machine(), "IN1"); | |
| 159 | case 0x02: return input_port_read(device->machine(), "IN2"); | |
| 160 | case 0x04: return input_port_read(device->machine(), "IN3"); | |
| 161 | case 0x08: return input_port_read(device->machine(), "IN4"); | |
| 162 | case 0x10: return input_port_read(device->machine(), "IN5"); | |
| 163 | case 0x20: return input_port_read(device->machine(), "IN6"); | |
| 157 | case 0x00: return state->ioport("IN0")->read(); | |
| 158 | case 0x01: return state->ioport("IN1")->read(); | |
| 159 | case 0x02: return state->ioport("IN2")->read(); | |
| 160 | case 0x04: return state->ioport("IN3")->read(); | |
| 161 | case 0x08: return state->ioport("IN4")->read(); | |
| 162 | case 0x10: return state->ioport("IN5")->read(); | |
| 163 | case 0x20: return state->ioport("IN6")->read(); | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | return 0xff; |
| r15082 | r15083 | |
| 276 | 276 | |
| 277 | 277 | PORT_START("IN1") |
| 278 | 278 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 280 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 281 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 283 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 284 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 BET Button") PORT_CODE(KEYCODE_3) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 285 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 286 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 280 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 281 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 283 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 284 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 BET Button") PORT_CODE(KEYCODE_3) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 285 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 286 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 287 | 287 | |
| 288 | 288 | PORT_START("IN2") |
| 289 | 289 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 290 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 291 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 292 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 293 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 294 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 295 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 296 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 297 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 290 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 291 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 292 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 293 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 294 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 295 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 296 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 297 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 298 | 298 | |
| 299 | 299 | PORT_START("IN3") |
| 300 | 300 | PORT_BIT( 0x9f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 301 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 302 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 BET Button") PORT_CODE(KEYCODE_3) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 303 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 304 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 301 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 302 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 BET Button") PORT_CODE(KEYCODE_3) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 303 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 304 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 305 | 305 | |
| 306 | 306 | /* Some bits of these three are actually used if you use the Royal Panel type */ |
| 307 | 307 | PORT_START("IN4") |
| r15082 | r15083 | |
| 309 | 309 | |
| 310 | 310 | PORT_START("IN5") |
| 311 | 311 | PORT_BIT( 0x9f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 312 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 313 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x08) | |
| 314 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 315 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_CONDITION("DSW2", 0x08, PORTCOND_EQUALS, 0x00) | |
| 312 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 313 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) | |
| 314 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 315 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) | |
| 316 | 316 | |
| 317 | 317 | PORT_START("IN6") |
| 318 | 318 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | READ8_MEMBER(changela_state::changela_68705_port_b_r) |
| 54 | 54 | { |
| 55 | return (m_port_b_out & m_ddr_b) | (i | |
| 55 | return (m_port_b_out & m_ddr_b) | (iop | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | WRITE8_MEMBER(changela_state::changela_68705_port_b_w) |
| r15082 | r15083 | |
| 122 | 122 | |
| 123 | 123 | READ8_MEMBER(changela_state::changela_30_r) |
| 124 | 124 | { |
| 125 | return i | |
| 125 | return iop | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | READ8_MEMBER(changela_state::changela_31_r) |
| r15082 | r15083 | |
| 130 | 130 | /* If the new value is less than the old value, and it did not wrap around, |
| 131 | 131 | or if the new value is greater than the old value, and it did wrap around, |
| 132 | 132 | then we are moving LEFT. */ |
| 133 | UINT8 curr_value = i | |
| 133 | UINT8 curr_value = iop | |
| 134 | 134 | |
| 135 | 135 | if ((curr_value < m_prev_value_31 && (m_prev_value_31 - curr_value) < 0x80) |
| 136 | 136 | || (curr_value > m_prev_value_31 && (curr_value - m_prev_value_31) > 0x80)) |
| r15082 | r15083 | |
| 147 | 147 | |
| 148 | 148 | READ8_MEMBER(changela_state::changela_2c_r) |
| 149 | 149 | { |
| 150 | int val = i | |
| 150 | int val = iop | |
| 151 | 151 | |
| 152 | 152 | val = (val & 0x30) | ((val & 1) << 7) | (((val & 1) ^ 1) << 6); |
| 153 | 153 | |
| r15082 | r15083 | |
| 164 | 164 | v8 = 1; |
| 165 | 165 | |
| 166 | 166 | /* Gas pedal is made up of 2 switches, 1 active low, 1 active high */ |
| 167 | switch (i | |
| 167 | switch (iop | |
| 168 | 168 | { |
| 169 | 169 | case 0x02: |
| 170 | 170 | gas = 0x80; |
| r15082 | r15083 | |
| 177 | 177 | break; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | return (i | |
| 180 | return (iop | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | WRITE8_MEMBER(changela_state::mcu_pc_0_w) |
| r15082 | r15083 | |
|---|---|---|
| 186 | 186 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 187 | 187 | |
| 188 | 188 | PORT_START("EXT") /* External switches */ |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 190 | 190 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 191 | 191 | INPUT_PORTS_END |
| 192 | 192 | |
| r15082 | r15083 | |
| 253 | 253 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 254 | 254 | |
| 255 | 255 | PORT_START("EXT") /* External switches */ |
| 256 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 256 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 257 | 257 | PORT_DIPNAME( 0x02, 0x00, "Player's Bullet Speed (Cheat)" ) |
| 258 | 258 | PORT_DIPSETTING( 0x00, "Slow" ) |
| 259 | 259 | PORT_DIPSETTING( 0x02, "Fast" ) |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | /* some kind of screen indicator? checked by backfirea set before it will boot */ |
| 178 | 178 | int backfire_screen = device->machine().rand() & 1; |
| 179 | 179 | eeprom_device *eeprom = downcast<eeprom_device *>(device); |
| 180 | return ((eeprom->read_bit() << 24) | input_port_read(device->machine(), "IN0") | |
| 181 | | ((input_port_read(device->machine(), "IN2") & 0xbf) << 16) | |
| 182 | | ((input_port_read(device->machine(), "IN3") & 0x40) << 16)) ^ (backfire_screen << 26) ; | |
| 180 | return ((eeprom->read_bit() << 24) | device->machine().root_device().ioport("IN0")->read() | |
| 181 | | ((device->machine().root_device().ioport("IN2")->read() & 0xbf) << 16) | |
| 182 | | ((device->machine().root_device().ioport("IN3")->read() & 0x40) << 16)) ^ (backfire_screen << 26) ; | |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | READ32_MEMBER(backfire_state::backfire_control2_r) |
| 186 | 186 | { |
| 187 | 187 | |
| 188 | 188 | // logerror("%08x:Read eprom %08x (%08x)\n", cpu_get_pc(&space.device()), offset << 1, mem_mask); |
| 189 | return (m_eeprom->read_bit() << 24) | i | |
| 189 | return (m_eeprom->read_bit() << 24) | iop | |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | #ifdef UNUSED_FUNCTION |
| r15082 | r15083 | |
| 194 | 194 | { |
| 195 | 195 | |
| 196 | 196 | // logerror("%08x:Read eprom %08x (%08x)\n", cpu_get_pc(&space.device()), offset << 1, mem_mask); |
| 197 | return (m_eeprom->read_bit() << 24) | i | |
| 197 | return (m_eeprom->read_bit() << 24) | iop | |
| 198 | 198 | } |
| 199 | 199 | #endif |
| 200 | 200 | |
| r15082 | r15083 | |
| 233 | 233 | #ifdef UNUSED_FUNCTION |
| 234 | 234 | READ32_MEMBER(backfire_state::backfire_unknown_wheel_r) |
| 235 | 235 | { |
| 236 | return i | |
| 236 | return iop | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | READ32_MEMBER(backfire_state::backfire_wheel1_r) |
| r15082 | r15083 | |
| 339 | 339 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 340 | 340 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 341 | 341 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 342 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 342 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 343 | 343 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 344 | 344 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 345 | 345 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 354 | 354 | |
| 355 | 355 | PORT_START("IN3") |
| 356 | 356 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) /* all other bits like low IN2 */ |
| 357 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 357 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 358 | 358 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 359 | 359 | |
| 360 | 360 | PORT_START("PADDLE0") |
| r15082 | r15083 | |
|---|---|---|
| 329 | 329 | |
| 330 | 330 | READ16_MEMBER(cubeqst_state::io_r) |
| 331 | 331 | { |
| 332 | UINT16 port_data = i | |
| 332 | UINT16 port_data = iop | |
| 333 | 333 | |
| 334 | 334 | /* |
| 335 | 335 | Certain bits depend on Q7 of the IO latch: |
| r15082 | r15083 | |
| 350 | 350 | /* Trackball ('CHOP') */ |
| 351 | 351 | READ16_MEMBER(cubeqst_state::chop_r) |
| 352 | 352 | { |
| 353 | return (i | |
| 353 | return (iop | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 |
| r15082 | r15083 | |
|---|---|---|
| 133 | 133 | CUSTOM_INPUT_MEMBER(exerion_state::exerion_controls_r) |
| 134 | 134 | { |
| 135 | 135 | static const char *const inname[2] = { "P1", "P2" }; |
| 136 | return i | |
| 136 | return iop | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | |
| r15082 | r15083 | |
| 261 | 261 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 262 | 262 | |
| 263 | 263 | PORT_START("DSW1") |
| 264 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 264 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 265 | 265 | PORT_DIPNAME( 0x0e, 0x00, DEF_STR( Coinage ) ) /* see notes */ |
| 266 | 266 | PORT_DIPSETTING( 0x0e, DEF_STR( 5C_1C ) ) |
| 267 | 267 | PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 252 | 252 | return state->m_misc_io_data[offset]; |
| 253 | 253 | |
| 254 | 254 | /* otherwise, return an input port */ |
| 255 | return | |
| 255 | return | |
| 256 | 256 | |
| 257 | 257 | /* 'SEGA' protection */ |
| 258 | 258 | case 0x10/2: |
| r15082 | r15083 | |
| 359 | 359 | |
| 360 | 360 | /* video control latch */ |
| 361 | 361 | case 0x2000/2: |
| 362 | return | |
| 362 | return | |
| 363 | 363 | } |
| 364 | 364 | if (state->m_custom_io_r) |
| 365 | 365 | return state->m_custom_io_r(space, offset, mem_mask); |
| r15082 | r15083 | |
| 450 | 450 | switch (offset) |
| 451 | 451 | { |
| 452 | 452 | case 0x3020/2: |
| 453 | return | |
| 453 | return | |
| 454 | 454 | |
| 455 | 455 | case 0x3022/2: |
| 456 | return | |
| 456 | return | |
| 457 | 457 | |
| 458 | 458 | case 0x3024/2: |
| 459 | return | |
| 459 | return | |
| 460 | 460 | } |
| 461 | 461 | return segaic16_open_bus_r(space, 0, mem_mask); |
| 462 | 462 | } |
| r15082 | r15083 | |
| 494 | 494 | switch (offset) |
| 495 | 495 | { |
| 496 | 496 | case 0x3010/2: |
| 497 | state->m_lghost_value = 255 - | |
| 497 | state->m_lghost_value = 255 - s | |
| 498 | 498 | break; |
| 499 | 499 | |
| 500 | 500 | case 0x3012/2: |
| 501 | state->m_lghost_value = | |
| 501 | state->m_lghost_value = s | |
| 502 | 502 | break; |
| 503 | 503 | |
| 504 | 504 | case 0x3014/2: |
| 505 | state->m_lghost_value = 255 - | |
| 505 | state->m_lghost_value = 255 - s | |
| 506 | 506 | break; |
| 507 | 507 | |
| 508 | 508 | case 0x3016/2: |
| 509 | state->m_lghost_value = | |
| 509 | state->m_lghost_value = s | |
| 510 | 510 | break; |
| 511 | 511 | |
| 512 | 512 | case 0x3020/2: |
| r15082 | r15083 | |
| 530 | 530 | switch (offset) |
| 531 | 531 | { |
| 532 | 532 | case 0x3000/2: |
| 533 | return ( | |
| 533 | return (s | |
| 534 | 534 | |
| 535 | 535 | case 0x3004/2: |
| 536 | return ( | |
| 536 | return (s | |
| 537 | 537 | |
| 538 | 538 | case 0x3008/2: |
| 539 | return ( | |
| 539 | return (s | |
| 540 | 540 | |
| 541 | 541 | case 0x300c/2: |
| 542 | return ( | |
| 542 | return (s | |
| 543 | 543 | |
| 544 | 544 | case 0x3010/2: |
| 545 | return ( | |
| 545 | return (s | |
| 546 | 546 | |
| 547 | 547 | case 0x3014/2: |
| 548 | return ( | |
| 548 | return (s | |
| 549 | 549 | } |
| 550 | 550 | return segaic16_open_bus_r(space, 0, mem_mask); |
| 551 | 551 | } |
| r15082 | r15083 | |
| 559 | 559 | { |
| 560 | 560 | case 0x3000/2: |
| 561 | 561 | case 0x3004/2: |
| 562 | state->m_wwally_last_x[0] = input_port_read(space->machine(), "TRACKX1"); | |
| 563 | state->m_wwally_last_y[0] = input_port_read(space->machine(), "TRACKY1"); | |
| 562 | state->m_wwally_last_x[0] = state->ioport("TRACKX1")->read(); | |
| 563 | state->m_wwally_last_y[0] = state->ioport("TRACKY1")->read(); | |
| 564 | 564 | break; |
| 565 | 565 | |
| 566 | 566 | case 0x3008/2: |
| 567 | 567 | case 0x300c/2: |
| 568 | state->m_wwally_last_x[1] = input_port_read(space->machine(), "TRACKX2"); | |
| 569 | state->m_wwally_last_y[1] = input_port_read(space->machine(), "TRACKY2"); | |
| 568 | state->m_wwally_last_x[1] = state->ioport("TRACKX2")->read(); | |
| 569 | state->m_wwally_last_y[1] = state->ioport("TRACKY2")->read(); | |
| 570 | 570 | break; |
| 571 | 571 | |
| 572 | 572 | case 0x3010/2: |
| 573 | 573 | case 0x3014/2: |
| 574 | state->m_wwally_last_x[2] = input_port_read(space->machine(), "TRACKX3"); | |
| 575 | state->m_wwally_last_y[2] = input_port_read(space->machine(), "TRACKY3"); | |
| 574 | state->m_wwally_last_x[2] = state->ioport("TRACKX3")->read(); | |
| 575 | state->m_wwally_last_y[2] = state->ioport("TRACKY3")->read(); | |
| 576 | 576 | break; |
| 577 | 577 | } |
| 578 | 578 | } |
| r15082 | r15083 | |
|---|---|---|
| 177 | 177 | { |
| 178 | 178 | if (ACCESSING_BITS_0_7) |
| 179 | 179 | { |
| 180 | i | |
| 180 | iop | |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 |
| r15082 | r15083 | |
|---|---|---|
| 112 | 112 | switch (offset) |
| 113 | 113 | { |
| 114 | 114 | case 0: /* Dipswitch 2 */ |
| 115 | m_shared_ram[0] = (source & 0xff00) | i | |
| 115 | m_shared_ram[0] = (source & 0xff00) | iop | |
| 116 | 116 | return 0; |
| 117 | 117 | |
| 118 | 118 | case 0x22: /* Coin value */ |
| r15082 | r15083 | |
| 123 | 123 | |
| 124 | 124 | m_credits = 0; |
| 125 | 125 | |
| 126 | if ((i | |
| 126 | if ((iop | |
| 127 | 127 | m_mcu_latch = 0; |
| 128 | 128 | |
| 129 | if ((i | |
| 129 | if ((iop | |
| 130 | 130 | { |
| 131 | 131 | m_shared_ram[0x29] = (source & 0xff00) | 0x22; // coinA |
| 132 | 132 | m_shared_ram[0x22] = (source & 0xff00) | 0x00; |
| 133 | 133 | m_mcu_latch = 1; |
| 134 | 134 | |
| 135 | m_coinvalue = (~i | |
| 135 | m_coinvalue = (~iop | |
| 136 | 136 | |
| 137 | 137 | m_deposits1++; |
| 138 | 138 | if (m_deposits1 == coinage1[m_coinvalue][0]) |
| r15082 | r15083 | |
| 143 | 143 | else |
| 144 | 144 | m_credits = 0; |
| 145 | 145 | } |
| 146 | else if ((i | |
| 146 | else if ((iop | |
| 147 | 147 | { |
| 148 | 148 | m_shared_ram[0x29] = (source & 0xff00) | 0x22; // coinA |
| 149 | 149 | m_shared_ram[0x22] = (source & 0xff00) | 0x00; |
| 150 | 150 | m_mcu_latch = 1; |
| 151 | 151 | |
| 152 | m_coinvalue = (~i | |
| 152 | m_coinvalue = (~iop | |
| 153 | 153 | |
| 154 | 154 | m_deposits2++; |
| 155 | 155 | if (m_deposits2 == coinage2[m_coinvalue][0]) |
| r15082 | r15083 | |
|---|---|---|
| 422 | 422 | blitz_state *state = device->machine().driver_data<blitz_state>(); |
| 423 | 423 | switch( state->m_mux_data & 0xf0 ) /* bits 4-7 */ |
| 424 | 424 | { |
| 425 | case 0x10: return input_port_read(device->machine(), "IN0-0"); | |
| 426 | case 0x20: return input_port_read(device->machine(), "IN0-1"); | |
| 427 | case 0x40: return input_port_read(device->machine(), "IN0-2"); | |
| 428 | case 0x80: return input_port_read(device->machine(), "IN0-3"); | |
| 425 | case 0x10: return state->ioport("IN0-0")->read(); | |
| 426 | case 0x20: return state->ioport("IN0-1")->read(); | |
| 427 | case 0x40: return state->ioport("IN0-2")->read(); | |
| 428 | case 0x80: return state->ioport("IN0-3")->read(); | |
| 429 | 429 | } |
| 430 | 430 | return 0xff; |
| 431 | 431 | } |
| r15082 | r15083 | |
|---|---|---|
| 78 | 78 | PORT_DIPNAME( 0x20, 0x20, "Bonus Time" ) |
| 79 | 79 | PORT_DIPSETTING( 0x00, DEF_STR ( No ) ) |
| 80 | 80 | PORT_DIPSETTING( 0x20, "Score = 350" ) |
| 81 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 81 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 82 | 82 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 83 | 83 | |
| 84 | 84 | PORT_START("GEARS") // fake |
| r15082 | r15083 | |
|---|---|---|
| 435 | 435 | PORT_START("DSWA") |
| 436 | 436 | TAITO_MACHINE_COCKTAIL |
| 437 | 437 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) |
| 438 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 439 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 440 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 441 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 442 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 443 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 444 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 445 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 438 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 439 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 440 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 441 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 442 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 443 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 444 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 445 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 446 | 446 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) |
| 447 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 448 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 449 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 450 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 451 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 452 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 453 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 454 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 447 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 448 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 449 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 450 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 451 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 452 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 453 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 454 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 455 | 455 | |
| 456 | 456 | PORT_START("DSWB") |
| 457 | 457 | TAITO_DIFFICULTY |
| r15082 | r15083 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | READ8_MEMBER(tunhunt_state::tunhunt_button_r) |
| 90 | 90 | { |
| 91 | int data = i | |
| 91 | int data = iop | |
| 92 | 92 | return ((data>>offset)&1)?0x00:0x80; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | 96 | static READ8_DEVICE_HANDLER( dsw2_0r ) |
| 97 | 97 | { |
| 98 | return ( | |
| 98 | return ( | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | static READ8_DEVICE_HANDLER( dsw2_1r ) |
| 103 | 103 | { |
| 104 | return ( | |
| 104 | return ( | |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | |
| 108 | 108 | static READ8_DEVICE_HANDLER( dsw2_2r ) |
| 109 | 109 | { |
| 110 | return ( | |
| 110 | return ( | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
| 114 | 114 | static READ8_DEVICE_HANDLER( dsw2_3r ) |
| 115 | 115 | { |
| 116 | return ( | |
| 116 | return ( | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
| 120 | 120 | static READ8_DEVICE_HANDLER( dsw2_4r ) |
| 121 | 121 | { |
| 122 | return ( | |
| 122 | return ( | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| r15082 | r15083 | |
| 171 | 171 | PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 172 | 172 | PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 173 | 173 | PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) |
| 174 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 174 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 175 | 175 | |
| 176 | 176 | PORT_START("IN1") |
| 177 | 177 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| r15082 | r15083 | |
|---|---|---|
| 140 | 140 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tryout_state,coin_inserted, 0) |
| 141 | 141 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 142 | 142 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 143 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 143 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 144 | 144 | INPUT_PORTS_END |
| 145 | 145 | |
| 146 | 146 | static const gfx_layout charlayout = |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | switch (offset) |
| 73 | 73 | { |
| 74 | 74 | case 0x00/2: |
| 75 | if (input_port_read(machine(), "DSW") & 0x20) | |
| 76 | return (input_port_read(machine(), "P1") | input_port_read(machine(), "P3") << 8); | |
| 75 | if (ioport("DSW")->read() & 0x20) | |
| 76 | return (ioport("P1")->read() | ioport("P3")->read() << 8); | |
| 77 | 77 | else |
| 78 | 78 | { |
| 79 | data = i | |
| 79 | data = iop | |
| 80 | 80 | return (data << 8 | data); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | case 0x02/2: |
| 84 | if (input_port_read(machine(), "DSW") & 0x20) | |
| 85 | return (input_port_read(machine(), "P2") | input_port_read(machine(), "P4") << 8); | |
| 84 | if (ioport("DSW")->read() & 0x20) | |
| 85 | return (ioport("P2")->read() | ioport("P4")->read() << 8); | |
| 86 | 86 | else |
| 87 | 87 | { |
| 88 | data = i | |
| 88 | data = iop | |
| 89 | 89 | return (data << 8 | data); |
| 90 | 90 | } |
| 91 | 91 | |
| r15082 | r15083 | |
| 95 | 95 | bit8 : freeze |
| 96 | 96 | bit9 : joysticks layout(auto detect???) |
| 97 | 97 | */ |
| 98 | return i | |
| 98 | return iop | |
| 99 | 99 | |
| 100 | 100 | case 0x06/2: |
| 101 | 101 | if (ACCESSING_BITS_0_7) |
| 102 | 102 | { |
| 103 | data = i | |
| 103 | data = iop | |
| 104 | 104 | } |
| 105 | 105 | return ((m_sysreg[0x06 / 2] & 0xff00) | data); |
| 106 | 106 | } |
| r15082 | r15083 | |
| 125 | 125 | bit10 : IRQ5 ACK |
| 126 | 126 | */ |
| 127 | 127 | if (ACCESSING_BITS_0_7) |
| 128 | i | |
| 128 | iop | |
| 129 | 129 | |
| 130 | 130 | if (!(data & 0x40)) |
| 131 | 131 | device_set_input_line(m_maincpu, M68K_IRQ_5, CLEAR_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 5733 | 5733 | |
| 5734 | 5734 | // dummy.rom helper |
| 5735 | 5735 | { |
| 5736 | UINT8 *ROM = machine.root_device().memregion("maincpu")->base(); | |
| 5737 | int length = machine.root_device().memregion("maincpu")->bytes(); | |
| 5736 | UINT8 *ROM = state->memregion("maincpu")->base(); | |
| 5737 | int length = state->memregion("maincpu")->bytes(); | |
| 5738 | 5738 | UINT8* ROM2 = state->memregion("user1")->base(); |
| 5739 | 5739 | |
| 5740 | 5740 | if (ROM2) |
| r15082 | r15083 | |
|---|---|---|
| 334 | 334 | |
| 335 | 335 | CUSTOM_INPUT_MEMBER(tempest_state::tempest_knob_r) |
| 336 | 336 | { |
| 337 | return input_port_read(machine(), (m_player_select == 0) ? | |
| 338 | TEMPEST_KNOB_P1_TAG : TEMPEST_KNOB_P2_TAG); | |
| 337 | return ioport((m_player_select == 0) ? TEMPEST_KNOB_P1_TAG : TEMPEST_KNOB_P2_TAG)->read(); | |
| 339 | 338 | } |
| 340 | 339 | |
| 341 | 340 | CUSTOM_INPUT_MEMBER(tempest_state::tempest_buttons_r) |
| 342 | 341 | { |
| 343 | return input_port_read(machine(), (m_player_select == 0) ? | |
| 344 | TEMPEST_BUTTONS_P1_TAG : TEMPEST_BUTTONS_P2_TAG); | |
| 342 | return ioport((m_player_select == 0) ? TEMPEST_BUTTONS_P1_TAG : TEMPEST_BUTTONS_P2_TAG)->read(); | |
| 345 | 343 | } |
| 346 | 344 | |
| 347 | 345 | |
| r15082 | r15083 | |
| 354 | 352 | |
| 355 | 353 | static READ8_DEVICE_HANDLER( input_port_1_bit_r ) |
| 356 | 354 | { |
| 357 | return ( | |
| 355 | return ( | |
| 358 | 356 | } |
| 359 | 357 | |
| 360 | 358 | |
| 361 | 359 | static READ8_DEVICE_HANDLER( input_port_2_bit_r ) |
| 362 | 360 | { |
| 363 | return ( | |
| 361 | return ( | |
| 364 | 362 | } |
| 365 | 363 | |
| 366 | 364 |
| r15082 | r15083 | |
|---|---|---|
| 233 | 233 | { |
| 234 | 234 | |
| 235 | 235 | if (offset == 0) |
| 236 | return i | |
| 236 | return iop | |
| 237 | 237 | else if (offset == 1) |
| 238 | return i | |
| 238 | return iop | |
| 239 | 239 | else if( offset == 2) |
| 240 | 240 | { |
| 241 | UINT8 Port4 = i | |
| 241 | UINT8 Port4 = iop | |
| 242 | 242 | if (!(Port4 & 0x10) && ((m_OldPort4 ^ Port4) & 0x10)) //coin buttons trigger IRQs |
| 243 | 243 | IntReq(machine(), 12); |
| 244 | 244 | if (!(Port4 & 0x20) && ((m_OldPort4 ^ Port4) & 0x20)) |
| 245 | 245 | IntReq(machine(), 19); |
| 246 | 246 | m_OldPort4 = Port4; |
| 247 | return /*dips*/i | |
| 247 | return /*dips*/iop | |
| 248 | 248 | } |
| 249 | 249 | return 0; |
| 250 | 250 | } |
| r15082 | r15083 | |
| 565 | 565 | crystal_state *state = machine.driver_data<crystal_state>(); |
| 566 | 566 | |
| 567 | 567 | if (state->m_Bank <= 2) |
| 568 | state->membank("bank1")->set_base( | |
| 568 | state->membank("bank1")->set_base(sta | |
| 569 | 569 | else |
| 570 | 570 | state->membank("bank1")->set_base(state->memregion("user2")->base()); |
| 571 | 571 | } |
| r15082 | r15083 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | READ16_MEMBER(eprom_state::special_port1_r) |
| 78 | 78 | { |
| 79 | int result = i | |
| 79 | int result = iop | |
| 80 | 80 | |
| 81 | 81 | if (m_sound_to_cpu_ready) result ^= 0x0004; |
| 82 | 82 | if (m_cpu_to_sound_ready) result ^= 0x0008; |
| r15082 | r15083 | |
| 89 | 89 | READ16_MEMBER(eprom_state::adc_r) |
| 90 | 90 | { |
| 91 | 91 | static const char *const adcnames[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 92 | int result = i | |
| 92 | int result = iop | |
| 93 | 93 | |
| 94 | 94 | m_last_offset = offset; |
| 95 | 95 | return result; |
| r15082 | r15083 | |
| 245 | 245 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 246 | 246 | |
| 247 | 247 | PORT_START("260010") |
| 248 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 248 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 249 | 249 | PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) |
| 250 | 250 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */ |
| 251 | 251 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@360030) */ |
| r15082 | r15083 | |
| 290 | 290 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 291 | 291 | |
| 292 | 292 | PORT_START("260010") |
| 293 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 293 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 294 | 294 | PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) |
| 295 | 295 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */ |
| 296 | 296 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@360030) */ |
| r15082 | r15083 | |
| 319 | 319 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 320 | 320 | |
| 321 | 321 | PORT_START("260010") /* 260010 */ |
| 322 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 322 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 323 | 323 | PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) |
| 324 | 324 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */ |
| 325 | 325 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@360030) */ |
| r15082 | r15083 | |
|---|---|---|
| 151 | 151 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 152 | 152 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 153 | 153 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 154 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 154 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 155 | 155 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 156 | 156 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 157 | 157 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 173 | 173 | /* i doubt these are both really the same.. */ |
| 174 | 174 | case 0x40: |
| 175 | 175 | case 0x4f: |
| 176 | return i | |
| 176 | return iop | |
| 177 | 177 | |
| 178 | 178 | case 0x53: |
| 179 | return i | |
| 179 | return iop | |
| 180 | 180 | |
| 181 | 181 | case 0x57: |
| 182 | return i | |
| 182 | return iop | |
| 183 | 183 | |
| 184 | 184 | case 0x5b: |
| 185 | return i | |
| 185 | return iop | |
| 186 | 186 | |
| 187 | 187 | case 0x5d: |
| 188 | return i | |
| 188 | return iop | |
| 189 | 189 | |
| 190 | 190 | case 0x5e: |
| 191 | return i | |
| 191 | return iop | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | printf("chinsan_input_port_0_r unk_r %02x\n", m_port_select); |
| r15082 | r15083 | |
| 203 | 203 | /* i doubt these are both really the same.. */ |
| 204 | 204 | case 0x40: |
| 205 | 205 | case 0x4f: |
| 206 | return i | |
| 206 | return iop | |
| 207 | 207 | |
| 208 | 208 | case 0x53: |
| 209 | return i | |
| 209 | return iop | |
| 210 | 210 | |
| 211 | 211 | case 0x57: |
| 212 | return i | |
| 212 | return iop | |
| 213 | 213 | |
| 214 | 214 | case 0x5b: |
| 215 | return i | |
| 215 | return iop | |
| 216 | 216 | |
| 217 | 217 | case 0x5d: |
| 218 | return i | |
| 218 | return iop | |
| 219 | 219 | |
| 220 | 220 | case 0x5e: |
| 221 | return i | |
| 221 | return iop | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | printf("chinsan_input_port_1_r unk_r %02x\n", m_port_select); |
| r15082 | r15083 | |
|---|---|---|
| 207 | 207 | m_in_0_shift = 0; |
| 208 | 208 | m_in_1_shift = 0; |
| 209 | 209 | |
| 210 | m_in_0 = input_port_read(machine(), "P1"); | |
| 211 | m_in_1 = input_port_read(machine(), "P2"); | |
| 210 | m_in_0 = ioport("P1")->read(); | |
| 211 | m_in_1 = ioport("P2")->read(); | |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | READ8_MEMBER(famibox_state::famibox_IN1_r) |
| r15082 | r15083 | |
| 312 | 312 | return ret; |
| 313 | 313 | } |
| 314 | 314 | case 2: |
| 315 | return i | |
| 315 | return iop | |
| 316 | 316 | case 3: |
| 317 | return i | |
| 317 | return iop | |
| 318 | 318 | case 7: |
| 319 | 319 | return 0x02; |
| 320 | 320 | default: |
| r15082 | r15083 | |
|---|---|---|
| 226 | 226 | /* Even reads must return 0xff - Odd reads must return the contents of input port 5. |
| 227 | 227 | Code at 0x5061 is executed once during P.O.S.T. where there is one read. |
| 228 | 228 | Code at 0x50b4 is then executed each frame (not sure) where there are 2 reads. */ |
| 229 | return ( (m_counter++ & 1) ? 0xff : i | |
| 229 | return ( (m_counter++ & 1) ? 0xff : iop | |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | WRITE8_MEMBER(cshooter_state::cshooter_c500_w) |
| r15082 | r15083 | |
|---|---|---|
| 78 | 78 | UINT32 r = 0; |
| 79 | 79 | |
| 80 | 80 | if (ACCESSING_BITS_24_31) |
| 81 | r |= i | |
| 81 | r |= iop | |
| 82 | 82 | |
| 83 | 83 | return r; |
| 84 | 84 | } |
| r15082 | r15083 | |
| 86 | 86 | WRITE32_MEMBER(ultrsprt_state::eeprom_w) |
| 87 | 87 | { |
| 88 | 88 | if (ACCESSING_BITS_24_31) |
| 89 | i | |
| 89 | iop | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | CUSTOM_INPUT_MEMBER(ultrsprt_state::analog_ctrl_r) |
| 93 | 93 | { |
| 94 | 94 | const char *tag = (const char *)param; |
| 95 | return i | |
| 95 | return iop | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | WRITE32_MEMBER(ultrsprt_state::int_ack_w) |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | { |
| 73 | 73 | hitme_state *state = screen.machine().driver_data<hitme_state>(); |
| 74 | 74 | /* the card width resistor comes from an input port, scaled to the range 0-25 kOhms */ |
| 75 | double width_resist = | |
| 75 | double width_resist = | |
| 76 | 76 | /* this triggers a oneshot for the following length of time */ |
| 77 | 77 | double width_duration = 0.45 * 1000e-12 * width_resist; |
| 78 | 78 | /* the dot clock runs at the standard horizontal frequency * 320+16 clocks per scanline */ |
| r15082 | r15083 | |
| 136 | 136 | hitme_state *state = machine.driver_data<hitme_state>(); |
| 137 | 137 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" }; |
| 138 | 138 | |
| 139 | UINT8 val = in | |
| 139 | UINT8 val = machine.root_device().ioport | |
| 140 | 140 | if (machine.time() > state->m_timeout_time) |
| 141 | 141 | val ^= 0x80; |
| 142 | 142 | return val; |
| r15082 | r15083 | |
| 192 | 192 | system's equivalent computation, or else we will hang notes. |
| 193 | 193 | */ |
| 194 | 194 | hitme_state *state = device->machine().driver_data<hitme_state>(); |
| 195 | UINT8 raw_game_speed = | |
| 195 | UINT8 raw_game_speed = s | |
| 196 | 196 | double resistance = raw_game_speed * 25000 / 100; |
| 197 | 197 | attotime duration = attotime(0, ATTOSECONDS_PER_SECOND * 0.45 * 6.8e-6 * resistance * (data + 1)); |
| 198 | 198 | state->m_timeout_time = device->machine().time() + duration; |
| r15082 | r15083 | |
|---|---|---|
| 667 | 667 | |
| 668 | 668 | ROM_START( starforc ) |
| 669 | 669 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 670 | ROM_LOAD( "starforc.3", 0x0000, 0x4000, CRC(8ba27691) SHA1(2b8b1e634ef5bed5c61a078e64a6dda77f84cdf5) ) | |
| 671 | ROM_LOAD( "starforc.2", 0x4000, 0x4000, CRC(0fc4d2d6) SHA1(0743e3928d5cc0e3f1bcdaf4b0cc83aeb7a2f7a8) ) | |
| 670 | ROM_LOAD( "3.3p", 0x0000, 0x4000, CRC(8ba27691) SHA1(2b8b1e634ef5bed5c61a078e64a6dda77f84cdf5) ) | |
| 671 | ROM_LOAD( "2.3mn", 0x4000, 0x4000, CRC(0fc4d2d6) SHA1(0743e3928d5cc0e3f1bcdaf4b0cc83aeb7a2f7a8) ) | |
| 672 | 672 | |
| 673 | 673 | ROM_REGION( 0x10000, "sub", 0 ) /* 64k for sound board */ |
| 674 | ROM_LOAD( " | |
| 674 | ROM_LOAD( " | |
| 675 | 675 | |
| 676 | 676 | ROM_REGION( 0x03000, "gfx1", 0 ) |
| 677 | ROM_LOAD( "starforc.7", 0x00000, 0x1000, CRC(f4803339) SHA1(a119d68c2dd1c0e191231ce77353b31f30f7aa76) ) /* fg */ | |
| 678 | ROM_LOAD( "starforc.8", 0x01000, 0x1000, CRC(96979684) SHA1(bb4f7d3afc8dfaa723dfb5374996cc4bfd76fa3c) ) | |
| 679 | ROM_LOAD( "starforc.9", 0x02000, 0x1000, CRC(eead1d5c) SHA1(7c9165ed227c5228122b494a265cbfd6e843ba61) ) | |
| 677 | ROM_LOAD( "7.2fh", 0x00000, 0x1000, CRC(f4803339) SHA1(a119d68c2dd1c0e191231ce77353b31f30f7aa76) ) /* fg */ | |
| 678 | ROM_LOAD( "8.3fh", 0x01000, 0x1000, CRC(96979684) SHA1(bb4f7d3afc8dfaa723dfb5374996cc4bfd76fa3c) ) | |
| 679 | ROM_LOAD( "9.3fh", 0x02000, 0x1000, CRC(eead1d5c) SHA1(7c9165ed227c5228122b494a265cbfd6e843ba61) ) | |
| 680 | 680 | |
| 681 | 681 | ROM_REGION( 0x06000, "gfx2", 0 ) |
| 682 | ROM_LOAD( "starforc.15", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 683 | ROM_LOAD( "starforc.14", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 684 | ROM_LOAD( "starforc.13", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 682 | ROM_LOAD( "15.10jk", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 683 | ROM_LOAD( "14.9jk", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 684 | ROM_LOAD( "13.8jk", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 685 | 685 | |
| 686 | 686 | ROM_REGION( 0x06000, "gfx3", 0 ) |
| 687 | ROM_LOAD( "starforc.12", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 688 | ROM_LOAD( "starforc.11", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 689 | ROM_LOAD( "starforc.10", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 687 | ROM_LOAD( "12.10de", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 688 | ROM_LOAD( "11.9de", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 689 | ROM_LOAD( "10.8de", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 690 | 690 | |
| 691 | 691 | ROM_REGION( 0x03000, "gfx4", 0 ) |
| 692 | ROM_LOAD( "starforc.18", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 693 | ROM_LOAD( "starforc.17", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 694 | ROM_LOAD( "starforc.16", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 692 | ROM_LOAD( "18.10pq", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 693 | ROM_LOAD( "17.9pq", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 694 | ROM_LOAD( "16.8pq", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 695 | 695 | |
| 696 | 696 | ROM_REGION( 0x0c000, "gfx5", 0 ) |
| 697 | ROM_LOAD( "starforc.6", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 698 | ROM_LOAD( "starforc.5", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 699 | ROM_LOAD( "starforc.4", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 697 | ROM_LOAD( "6.10lm", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 698 | ROM_LOAD( "5.9lm", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 699 | ROM_LOAD( "4.8lm", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 700 | 700 | |
| 701 | 701 | ROM_REGION( 0x0020, "proms", 0 ) /* PROMs */ |
| 702 | ROM_LOAD( "07b.bin", | |
| 702 | ROM_LOAD( "07b.bin", | |
| 703 | 703 | ROM_END |
| 704 | 704 | |
| 705 | 705 | ROM_START( starforcb ) |
| r15082 | r15083 | |
| 744 | 744 | ROM_LOAD( "a18s030.7b", 0x0000, 0x0020, CRC(68db8300) SHA1(33cd6b5ed92d7b73a708f2e4b12b6e7f6496d0c6) ) /* unknown - timing? */ |
| 745 | 745 | ROM_END |
| 746 | 746 | |
| 747 | ||
| 748 | 747 | ROM_START( starforca ) |
| 749 | 748 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 750 | 749 | ROM_LOAD( "5.bin", 0x0000, 0x2000, CRC(7691bbd4) SHA1(efcab11ea0ed58b6a47c9d7a994c921dfaa1b47e) ) |
| r15082 | r15083 | |
| 787 | 786 | ROM_LOAD( "prom.bin", 0x0000, 0x0020, CRC(68db8300) SHA1(33cd6b5ed92d7b73a708f2e4b12b6e7f6496d0c6) ) /* unknown - timing? */ |
| 788 | 787 | ROM_END |
| 789 | 788 | |
| 790 | ||
| 791 | 789 | ROM_START( starforce ) |
| 792 | 790 | ROM_REGION( 2*0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */ |
| 793 | 791 | ROM_LOAD( "starfore.005", 0x0000, 0x2000, CRC(825f7ebe) SHA1(d63fd516e075bcc28d42189216b95bbf491a4cd1) ) |
| r15082 | r15083 | |
| 799 | 797 | ROM_LOAD( "starfore.000", 0x0000, 0x2000, CRC(a277c268) SHA1(99ed8439119fa4b850ad8aadb7ff3e54d4cd40be) ) |
| 800 | 798 | |
| 801 | 799 | ROM_REGION( 0x03000, "gfx1", 0 ) |
| 802 | ROM_LOAD( "starforc.7", 0x00000, 0x1000, CRC(f4803339) SHA1(a119d68c2dd1c0e191231ce77353b31f30f7aa76) ) /* fg */ | |
| 803 | ROM_LOAD( "starforc.8", 0x01000, 0x1000, CRC(96979684) SHA1(bb4f7d3afc8dfaa723dfb5374996cc4bfd76fa3c) ) | |
| 804 | ROM_LOAD( "starforc.9", 0x02000, 0x1000, CRC(eead1d5c) SHA1(7c9165ed227c5228122b494a265cbfd6e843ba61) ) | |
| 800 | ROM_LOAD( "7.2fh", 0x00000, 0x1000, CRC(f4803339) SHA1(a119d68c2dd1c0e191231ce77353b31f30f7aa76) ) /* fg */ | |
| 801 | ROM_LOAD( "8.3fh", 0x01000, 0x1000, CRC(96979684) SHA1(bb4f7d3afc8dfaa723dfb5374996cc4bfd76fa3c) ) | |
| 802 | ROM_LOAD( "9.3fh", 0x02000, 0x1000, CRC(eead1d5c) SHA1(7c9165ed227c5228122b494a265cbfd6e843ba61) ) | |
| 805 | 803 | |
| 806 | 804 | ROM_REGION( 0x06000, "gfx2", 0 ) |
| 807 | ROM_LOAD( "starforc.15", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 808 | ROM_LOAD( "starforc.14", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 809 | ROM_LOAD( "starforc.13", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 805 | ROM_LOAD( "15.10jk", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 806 | ROM_LOAD( "14.9jk", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 807 | ROM_LOAD( "13.8jk", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 810 | 808 | |
| 811 | 809 | ROM_REGION( 0x06000, "gfx3", 0 ) |
| 812 | ROM_LOAD( "starforc.12", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 813 | ROM_LOAD( "starforc.11", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 814 | ROM_LOAD( "starforc.10", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 810 | ROM_LOAD( "12.10de", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 811 | ROM_LOAD( "11.9de", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 812 | ROM_LOAD( "10.8de", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 815 | 813 | |
| 816 | 814 | ROM_REGION( 0x03000, "gfx4", 0 ) |
| 817 | ROM_LOAD( "starforc.18", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 818 | ROM_LOAD( "starforc.17", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 819 | ROM_LOAD( "starforc.16", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 815 | ROM_LOAD( "18.10pq", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 816 | ROM_LOAD( "17.9pq", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 817 | ROM_LOAD( "16.8pq", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 820 | 818 | |
| 821 | 819 | ROM_REGION( 0x0c000, "gfx5", 0 ) |
| 822 | ROM_LOAD( "starforc.6", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 823 | ROM_LOAD( "starforc.5", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 824 | ROM_LOAD( "starforc.4", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 820 | ROM_LOAD( "6.10lm", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 821 | ROM_LOAD( "5.9lm", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 822 | ROM_LOAD( "4.8lm", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 825 | 823 | |
| 826 | 824 | ROM_REGION( 0x0020, "proms", 0 ) /* PROMs */ |
| 827 | ROM_LOAD( "07b.bin", | |
| 825 | ROM_LOAD( "07b.bin", | |
| 828 | 826 | ROM_END |
| 829 | 827 | |
| 830 | 828 | ROM_START( megaforc ) |
| 831 | 829 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 832 | ROM_LOAD( "mf3.bin", 0x0000, 0x4000, CRC(d3ea82ec) SHA1(e15fda65ba24517cc04abc55b5d079a33327553c) ) | |
| 833 | ROM_LOAD( "mf2.bin", 0x4000, 0x4000, CRC(aa320718) SHA1(cbbf8e4d06a1ecf77d776058d965afdaa7f5b47f) ) | |
| 830 | ROM_LOAD( "mf3.bin", 0x0000, 0x4000, CRC(d3ea82ec) SHA1(e15fda65ba24517cc04abc55b5d079a33327553c) ) | |
| 831 | ROM_LOAD( "mf2.bin", 0x4000, 0x4000, CRC(aa320718) SHA1(cbbf8e4d06a1ecf77d776058d965afdaa7f5b47f) ) | |
| 834 | 832 | |
| 835 | 833 | ROM_REGION( 0x10000, "sub", 0 ) /* 64k for sound board */ |
| 836 | ROM_LOAD( " | |
| 834 | ROM_LOAD( " | |
| 837 | 835 | |
| 838 | 836 | ROM_REGION( 0x03000, "gfx1", 0 ) |
| 839 | ROM_LOAD( "mf7.bin", 0x00000, 0x1000, CRC(43ef8d20) SHA1(07ebe3e10fa56b671788a122cdc02e661b624f40) ) /* fg */ | |
| 840 | ROM_LOAD( "mf8.bin", 0x01000, 0x1000, CRC(c36fb746) SHA1(01960e068046bcc0e3e9370fdfe73f9fd64491ae) ) | |
| 841 | ROM_LOAD( "mf9.bin", 0x02000, 0x1000, CRC(62e7c9ec) SHA1(24dd1de3e268865c36c732714dc257c58cb88d67) ) | |
| 837 | ROM_LOAD( "mf7.bin", 0x00000, 0x1000, CRC(43ef8d20) SHA1(07ebe3e10fa56b671788a122cdc02e661b624f40) ) /* fg */ | |
| 838 | ROM_LOAD( "mf8.bin", 0x01000, 0x1000, CRC(c36fb746) SHA1(01960e068046bcc0e3e9370fdfe73f9fd64491ae) ) | |
| 839 | ROM_LOAD( "mf9.bin", 0x02000, 0x1000, CRC(62e7c9ec) SHA1(24dd1de3e268865c36c732714dc257c58cb88d67) ) | |
| 842 | 840 | |
| 843 | 841 | ROM_REGION( 0x06000, "gfx2", 0 ) |
| 844 | ROM_LOAD( "starforc.15", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 845 | ROM_LOAD( "starforc.14", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 846 | ROM_LOAD( "starforc.13", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 842 | ROM_LOAD( "15.10jk", 0x00000, 0x2000, CRC(c3bda12f) SHA1(3748ea8e34222a31a365a02ec77430f268b0b397) ) /* bg1 */ | |
| 843 | ROM_LOAD( "14.9jk", 0x02000, 0x2000, CRC(9e9384fe) SHA1(3aaa9cc64ef3775325f64733da4f6c328abf6514) ) | |
| 844 | ROM_LOAD( "13.8jk", 0x04000, 0x2000, CRC(84603285) SHA1(f4d6dfa3968fbd8ebf1a6451d5ea1821d65d9b49) ) | |
| 847 | 845 | |
| 848 | 846 | ROM_REGION( 0x06000, "gfx3", 0 ) |
| 849 | ROM_LOAD( "starforc.12", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 850 | ROM_LOAD( "starforc.11", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 851 | ROM_LOAD( "starforc.10", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 847 | ROM_LOAD( "12.10de", 0x00000, 0x2000, CRC(fdd9e38b) SHA1(3766835d9e9fc7e5dd99521e7303562029b78a65) ) /* bg2 */ | |
| 848 | ROM_LOAD( "11.9de", 0x02000, 0x2000, CRC(668aea14) SHA1(62eb0df48f2f0c5778bb230cc3bf0b8eb3b4e3f8) ) | |
| 849 | ROM_LOAD( "10.8de", 0x04000, 0x2000, CRC(c62a19c1) SHA1(9ce0e29630d3c8cba4db4cff333b250481348968) ) | |
| 852 | 850 | |
| 853 | 851 | ROM_REGION( 0x03000, "gfx4", 0 ) |
| 854 | ROM_LOAD( "starforc.18", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 855 | ROM_LOAD( "starforc.17", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 856 | ROM_LOAD( "starforc.16", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 852 | ROM_LOAD( "18.10pq", 0x00000, 0x1000, CRC(6455c3ad) SHA1(b163ccd3dc26ccfa8be1d16d52e17bc660ff84e3) ) /* bg3 */ | |
| 853 | ROM_LOAD( "17.9pq", 0x01000, 0x1000, CRC(68c60d0f) SHA1(1152ba0c274ecadb534133a860bbc8a93577dcf2) ) | |
| 854 | ROM_LOAD( "16.8pq", 0x02000, 0x1000, CRC(ce20b469) SHA1(60177a669d9c8cbeedd03ca5e2edf3f589c1c815) ) | |
| 857 | 855 | |
| 858 | 856 | ROM_REGION( 0x0c000, "gfx5", 0 ) |
| 859 | ROM_LOAD( "starforc.6", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 860 | ROM_LOAD( "starforc.5", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 861 | ROM_LOAD( "starforc.4", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 857 | ROM_LOAD( "6.10lm", 0x00000, 0x4000, CRC(5468a21d) SHA1(4a1196d4cfb99616efdac9b3927609a85c6f1758) ) /* sprites */ | |
| 858 | ROM_LOAD( "5.9lm", 0x04000, 0x4000, CRC(f71717f8) SHA1(bf673571f772d8e0eddae89c00f31390c49a25d2) ) | |
| 859 | ROM_LOAD( "4.8lm", 0x08000, 0x4000, CRC(dd9d68a4) SHA1(34c60d2b34c7980bf65a5ebadb9c73f89128141f) ) | |
| 862 | 860 | |
| 863 | 861 | ROM_REGION( 0x0020, "proms", 0 ) /* PROMs */ |
| 864 | ROM_LOAD( "07b.bin", | |
| 862 | ROM_LOAD( "07b.bin", | |
| 865 | 863 | ROM_END |
| 866 | 864 | |
| 867 | 865 | ROM_START( baluba ) |
| r15082 | r15083 | |
| 947 | 945 | GAME( 1984, starforca,starforc, senjyo, starforc, starfora, ROT90, "Tehkan", "Star Force (encrypted, set 2)", 0 ) |
| 948 | 946 | GAME( 1985, megaforc, starforc, senjyo, starforc, starforc, ROT90, "Tehkan (Video Ware license)", "Mega Force", 0 ) |
| 949 | 947 | GAME( 1986, baluba, 0, senjyo, baluba, starforc, ROT90, "Able Corp, Ltd.", "Baluba-louk no Densetsu (Japan)", 0 ) |
| 950 |
| r15082 | r15083 | |
|---|---|---|
| 202 | 202 | /* read sensor RAM */ |
| 203 | 203 | case 0x40: |
| 204 | 204 | addr = chip->command & 0x07; |
| 205 | result = i | |
| 205 | result = iop | |
| 206 | 206 | /* handle autoincrement */ |
| 207 | 207 | if (chip->command & 0x10) |
| 208 | 208 | chip->command = (chip->command & 0xf0) | ((addr + 1) & 0x0f); |
| r15082 | r15083 | |
| 229 | 229 | { |
| 230 | 230 | if ( chip->read_sensor ) |
| 231 | 231 | { |
| 232 | result = i | |
| 232 | result = iop | |
| 233 | 233 | // break |
| 234 | 234 | } |
| 235 | 235 | if ( chip->sense_auto_inc ) |
| r15082 | r15083 | |
| 377 | 377 | { |
| 378 | 378 | /* read sensor RAM */ |
| 379 | 379 | case 0x40: |
| 380 | //result = ~i | |
| 380 | //result = ~iop | |
| 381 | 381 | break; |
| 382 | 382 | |
| 383 | 383 | /* read display RAM */ |
| r15082 | r15083 | |
|---|---|---|
| 504 | 504 | switch( m_io_offset ) |
| 505 | 505 | { |
| 506 | 506 | case 0x07: |
| 507 | data |= i | |
| 507 | data |= iop | |
| 508 | 508 | break; |
| 509 | 509 | |
| 510 | 510 | case 0x0f: |
| 511 | data |= i | |
| 511 | data |= iop | |
| 512 | 512 | break; |
| 513 | 513 | |
| 514 | 514 | case 0x17: |
| 515 | data |= i | |
| 515 | data |= iop | |
| 516 | 516 | break; |
| 517 | 517 | |
| 518 | 518 | case 0x1f: |
| 519 | data |= i | |
| 519 | data |= iop | |
| 520 | 520 | break; |
| 521 | 521 | |
| 522 | 522 | case 0x27: |
| 523 | data |= i | |
| 523 | data |= iop | |
| 524 | 524 | break; |
| 525 | 525 | |
| 526 | 526 | case 0x2f: |
| 527 | data |= i | |
| 527 | data |= iop | |
| 528 | 528 | break; |
| 529 | 529 | |
| 530 | 530 | default: |
| r15082 | r15083 | |
|---|---|---|
| 244 | 244 | |
| 245 | 245 | static INTERRUPT_GEN( bzone_interrupt ) |
| 246 | 246 | { |
| 247 | if ( | |
| 247 | if ( | |
| 248 | 248 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 249 | 249 | } |
| 250 | 250 | |
| r15082 | r15083 | |
| 278 | 278 | static READ8_DEVICE_HANDLER( redbaron_joy_r ) |
| 279 | 279 | { |
| 280 | 280 | bzone_state *state = device->machine().driver_data<bzone_state>(); |
| 281 | return | |
| 281 | return s | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | static WRITE8_DEVICE_HANDLER( redbaron_joysound_w ) |
| r15082 | r15083 | |
| 789 | 789 | static const char *const analog_port[] = { "AN0", "AN1", "AN2" }; |
| 790 | 790 | |
| 791 | 791 | if (offset <= 2) |
| 792 | m_analog_data = i | |
| 792 | m_analog_data = iop | |
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 |
| r15082 | r15083 | |
|---|---|---|
| 165 | 165 | { |
| 166 | 166 | switch(offset+0xaf00) |
| 167 | 167 | { |
| 168 | case 0xafd8: return i | |
| 168 | case 0xafd8: return iop | |
| 169 | 169 | // case 0xafd9: return 1; |
| 170 | case 0xafda: return i | |
| 170 | case 0xafda: return iop | |
| 171 | 171 | case 0xafdb: return 1; |
| 172 | case 0xafdc: return input_port_read(machine(),"SERVICE1");//attract mode | |
| 173 | case 0xafdd: return input_port_read(machine(),"HOLD3"); | |
| 174 | case 0xafde: return input_port_read(machine(),"HOLD4"); | |
| 175 | case 0xafdf: return input_port_read(machine(),"HOLD2"); | |
| 176 | case 0xafe0: return input_port_read(machine(),"HOLD1"); | |
| 177 | case 0xafe1: return input_port_read(machine(),"HOLD5"); | |
| 178 | case 0xafe2: return input_port_read(machine(),"START"); | |
| 179 | case 0xafe3: return input_port_read(machine(),"BET");//system 2 | |
| 180 | case 0xafe4: return input_port_read(machine(),"SERVICE2");//attract mode | |
| 172 | case 0xafdc: return ioport("SERVICE1")->read();//attract mode | |
| 173 | case 0xafdd: return ioport("HOLD3")->read(); | |
| 174 | case 0xafde: return ioport("HOLD4")->read(); | |
| 175 | case 0xafdf: return ioport("HOLD2")->read(); | |
| 176 | case 0xafe0: return ioport("HOLD1")->read(); | |
| 177 | case 0xafe1: return ioport("HOLD5")->read(); | |
| 178 | case 0xafe2: return ioport("START")->read(); | |
| 179 | case 0xafe3: return ioport("BET")->read();//system 2 | |
| 180 | case 0xafe4: return ioport("SERVICE2")->read();//attract mode | |
| 181 | 181 | // case 0xafe5: return 1; |
| 182 | 182 | // case 0xafe6: return 1; |
| 183 | 183 | case 0xafe7: return machine().device<eeprom_device>("eeprom")->read_bit(); |
| r15082 | r15083 | |
| 235 | 235 | { |
| 236 | 236 | switch(offset+0xa700) |
| 237 | 237 | { |
| 238 | case 0xa720: return input_port_read(machine(),"SERVICE1");//attract mode | |
| 239 | case 0xa722: return input_port_read(machine(),"COIN1"); | |
| 240 | case 0xa723: return input_port_read(machine(),"COIN2"); | |
| 241 | case 0xa724: return input_port_read(machine(),"SERVICE2");//attract mode | |
| 242 | case 0xa725: return input_port_read(machine(),"HOLD3"); | |
| 243 | case 0xa726: return input_port_read(machine(),"HOLD4"); | |
| 244 | case 0xa727: return input_port_read(machine(),"HOLD2"); | |
| 238 | case 0xa720: return ioport("SERVICE1")->read();//attract mode | |
| 239 | case 0xa722: return ioport("COIN1")->read(); | |
| 240 | case 0xa723: return ioport("COIN2")->read(); | |
| 241 | case 0xa724: return ioport("SERVICE2")->read();//attract mode | |
| 242 | case 0xa725: return ioport("HOLD3")->read(); | |
| 243 | case 0xa726: return ioport("HOLD4")->read(); | |
| 244 | case 0xa727: return ioport("HOLD2")->read(); | |
| 245 | 245 | case 0xa780: return machine().device<okim6295_device>("oki")->read(space,0); |
| 246 | case 0xa7a0: return input_port_read(machine(),"HOLD1"); | |
| 247 | case 0xa7a1: return input_port_read(machine(),"HOLD5"); | |
| 248 | case 0xa7a2: return input_port_read(machine(),"START"); | |
| 249 | case 0xa7a3: return input_port_read(machine(),"BET");//system 2 | |
| 246 | case 0xa7a0: return ioport("HOLD1")->read(); | |
| 247 | case 0xa7a1: return ioport("HOLD5")->read(); | |
| 248 | case 0xa7a2: return ioport("START")->read(); | |
| 249 | case 0xa7a3: return ioport("BET")->read();//system 2 | |
| 250 | 250 | |
| 251 | 251 | case 0xa7a7: return machine().device<eeprom_device>("eeprom")->read_bit(); |
| 252 | 252 |
| r15082 | r15083 | |
|---|---|---|
| 103 | 103 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 104 | 104 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 105 | 105 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 106 | PORT_BIT( 0x00f0, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 106 | PORT_BIT( 0x00f0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // all bits? check.. | |
| 107 | 107 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom?.. |
| 108 | 108 | |
| 109 | 109 | |
| r15082 | r15083 | |
| 130 | 130 | READ32_MEMBER(simpl156_state::simpl156_inputs_read) |
| 131 | 131 | { |
| 132 | 132 | int eep = m_eeprom->read_bit(); |
| 133 | UINT32 returndata = i | |
| 133 | UINT32 returndata = iop | |
| 134 | 134 | |
| 135 | 135 | returndata ^= ((eep << 8)); |
| 136 | 136 | return returndata; |
| r15082 | r15083 | |
| 161 | 161 | { |
| 162 | 162 | UINT32 returndata; |
| 163 | 163 | |
| 164 | returndata = i | |
| 164 | returndata = iop | |
| 165 | 165 | |
| 166 | 166 | return returndata; |
| 167 | 167 | } |
| r15082 | r15083 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | switch(m_mux_data) |
| 95 | 95 | { |
| 96 | case 0x01: res = input_port_read(machine(), "IN0"); break; | |
| 97 | case 0x02: res = input_port_read(machine(), "IN1"); break; | |
| 98 | case 0x04: res = input_port_read(machine(), "IN2"); break; | |
| 99 | case 0x08: res = input_port_read(machine(), "IN3"); break; | |
| 96 | case 0x01: res = ioport("IN0")->read(); break; | |
| 97 | case 0x02: res = ioport("IN1")->read(); break; | |
| 98 | case 0x04: res = ioport("IN2")->read(); break; | |
| 99 | case 0x08: res = ioport("IN3")->read(); break; | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | return res; |
| r15082 | r15083 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | READ16_MEMBER(deadang_state::ghunter_trackball_low_r) |
| 49 | 49 | { |
| 50 | return (i | |
| 50 | return (iop | |
| 51 | 51 | } |
| 52 | 52 | READ16_MEMBER(deadang_state::ghunter_trackball_high_r) |
| 53 | 53 | { |
| 54 | return ((i | |
| 54 | return ((iop | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /* Memory Maps */ |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | if (m_port_bank < 7) |
| 137 | return i | |
| 137 | return iop | |
| 138 | 138 | |
| 139 | 139 | /* output is pulled up for non-mapped ports */ |
| 140 | 140 | return 0xff; |
| r15082 | r15083 | |
| 555 | 555 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 556 | 556 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 557 | 557 | PORT_DIPNAME( 0x02, 0x02, "Single Coin Continue" ) PORT_DIPLOCATION("E11:2") |
| 558 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_CONDITION("BANK1",0x01,PORTCOND_EQUALS,0x00) | |
| 559 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_CONDITION("BANK1",0x01,PORTCOND_EQUALS,0x00) | |
| 558 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_CONDITION("BANK1",0x01,EQUALS,0x00) | |
| 559 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_CONDITION("BANK1",0x01,EQUALS,0x00) | |
| 560 | 560 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("E11:1") |
| 561 | 561 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 562 | 562 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 390 | 390 | |
| 391 | 391 | PORT_START("VBLANK") |
| 392 | 392 | PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 393 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 393 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 394 | 394 | INPUT_PORTS_END |
| 395 | 395 | |
| 396 | 396 | /* verified from M68000 and Z80 code */ |
| r15082 | r15083 | |
| 425 | 425 | |
| 426 | 426 | PORT_MODIFY("VBLANK") |
| 427 | 427 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 428 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 428 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 429 | 429 | INPUT_PORTS_END |
| 430 | 430 | |
| 431 | 431 | |
| r15082 | r15083 | |
| 471 | 471 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 472 | 472 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 473 | 473 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) |
| 474 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 474 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 475 | 475 | INPUT_PORTS_END |
| 476 | 476 | |
| 477 | 477 | /* verified from M68000 code */ |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | update_irq_state(machine()); |
| 153 | 153 | machine().scheduler().timer_set(attotime::from_usec(1), FUNC(irq_off)); |
| 154 | 154 | } |
| 155 | return i | |
| 155 | return iop | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | static int service_mode(running_machine &machine) |
| 51 | 51 | { |
| 52 | 52 | sprint2_state *state = machine.driver_data<sprint2_state>(); |
| 53 | UINT8 v = i | |
| 53 | UINT8 v = state->iop | |
| 54 | 54 | |
| 55 | 55 | if (GAME_IS_SPRINT1) |
| 56 | 56 | { |
| r15082 | r15083 | |
| 82 | 82 | |
| 83 | 83 | for (i = 0; i < 2; i++) |
| 84 | 84 | { |
| 85 | signed char delta = | |
| 85 | signed char delta = s | |
| 86 | 86 | |
| 87 | 87 | if (delta < 0) |
| 88 | 88 | { |
| r15082 | r15083 | |
| 95 | 95 | |
| 96 | 96 | state->m_dial[i] += delta; |
| 97 | 97 | |
| 98 | switch ( | |
| 98 | switch ( | |
| 99 | 99 | { |
| 100 | 100 | case 1: state->m_gear[i] = 1; break; |
| 101 | 101 | case 2: state->m_gear[i] = 2; break; |
| r15082 | r15083 | |
| 126 | 126 | |
| 127 | 127 | READ8_MEMBER(sprint2_state::sprint2_dip_r) |
| 128 | 128 | { |
| 129 | return (i | |
| 129 | return (iop | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | |
| 133 | 133 | READ8_MEMBER(sprint2_state::sprint2_input_A_r) |
| 134 | 134 | { |
| 135 | UINT8 val = i | |
| 135 | UINT8 val = iop | |
| 136 | 136 | |
| 137 | 137 | if (m_game == 2)// (GAME_IS_SPRINT2) |
| 138 | 138 | { |
| r15082 | r15083 | |
| 150 | 150 | |
| 151 | 151 | READ8_MEMBER(sprint2_state::sprint2_input_B_r) |
| 152 | 152 | { |
| 153 | UINT8 val = i | |
| 153 | UINT8 val = iop | |
| 154 | 154 | |
| 155 | 155 | if (m_game == 1) // (GAME_IS_SPRINT1) |
| 156 | 156 | { |
| r15082 | r15083 | |
|---|---|---|
| 101 | 101 | UINT16 port; |
| 102 | 102 | |
| 103 | 103 | /* Read the fake input port */ |
| 104 | UINT8 trackball_pos = | |
| 104 | UINT8 trackball_pos = s | |
| 105 | 105 | |
| 106 | 106 | /* Calculate the change from the last position. */ |
| 107 | 107 | UINT8 trackball_diff = state->m_trackball_old[which] - trackball_pos; |
| r15082 | r15083 | |
| 117 | 117 | state->m_aimpos[which] = (state->m_aimpos[which] + trackball_diff) & 0x3f; |
| 118 | 118 | |
| 119 | 119 | /* Combine it with the standard input bits */ |
| 120 | port = | |
| 120 | port = state->io | |
| 121 | 121 | |
| 122 | 122 | return (port & 0xc0ff) | (state->m_aimpos[which] << 8); |
| 123 | 123 | } |
| r15082 | r15083 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | for (i = 0; i < 2; i++) |
| 20 | 20 | { |
| 21 | switch ( | |
| 21 | switch ( | |
| 22 | 22 | { |
| 23 | 23 | case 0x01: state->m_gear[i] = 1; break; |
| 24 | 24 | case 0x02: state->m_gear[i] = 2; break; |
| r15082 | r15083 | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /* watchdog is disabled during service mode */ |
| 32 | timer.machine().watchdog_enable( | |
| 32 | timer.machine().watchdog_enable( | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
| r15082 | r15083 | |
| 112 | 112 | |
| 113 | 113 | READ8_MEMBER(dragrace_state::dragrace_input_r) |
| 114 | 114 | { |
| 115 | int val = i | |
| 115 | int val = iop | |
| 116 | 116 | static const char *const portnames[] = { "IN0", "IN1" }; |
| 117 | 117 | |
| 118 | 118 | UINT8 maskA = 1 << (offset % 8); |
| r15082 | r15083 | |
| 122 | 122 | |
| 123 | 123 | for (i = 0; i < 2; i++) |
| 124 | 124 | { |
| 125 | int in = i | |
| 125 | int in = iop | |
| 126 | 126 | |
| 127 | 127 | if (m_gear[i] != 0) |
| 128 | 128 | in &= ~(1 << m_gear[i]); |
| r15082 | r15083 | |
| 145 | 145 | |
| 146 | 146 | for (i = 0; i < 2; i++) |
| 147 | 147 | { |
| 148 | int dial = i | |
| 148 | int dial = iop | |
| 149 | 149 | |
| 150 | 150 | bitA[i] = ((dial + 1) / 2) & 1; |
| 151 | 151 | bitB[i] = ((dial + 0) / 2) & 1; |
| r15082 | r15083 | |
|---|---|---|
| 917 | 917 | { |
| 918 | 918 | if( ACCESSING_BITS_0_7 ) |
| 919 | 919 | { |
| 920 | return i | |
| 920 | return iop | |
| 921 | 921 | } |
| 922 | 922 | return 0xffffffff; |
| 923 | 923 | } |
| r15082 | r15083 | |
| 926 | 926 | { |
| 927 | 927 | if( ACCESSING_BITS_0_7 ) |
| 928 | 928 | { |
| 929 | return i | |
| 929 | return iop | |
| 930 | 930 | } |
| 931 | 931 | return 0xffffffff; |
| 932 | 932 | } |
| r15082 | r15083 | |
| 936 | 936 | switch(m_ejsakura_input_port) |
| 937 | 937 | { |
| 938 | 938 | case 0x01: |
| 939 | return i | |
| 939 | return iop | |
| 940 | 940 | case 0x02: |
| 941 | return i | |
| 941 | return iop | |
| 942 | 942 | case 0x04: |
| 943 | return i | |
| 943 | return iop | |
| 944 | 944 | case 0x08: |
| 945 | return i | |
| 945 | return iop | |
| 946 | 946 | case 0x10: |
| 947 | return i | |
| 947 | return iop | |
| 948 | 948 | default: |
| 949 | return i | |
| 949 | return iop | |
| 950 | 950 | } |
| 951 | 951 | return 0xffffffff; |
| 952 | 952 | } |
| r15082 | r15083 | |
| 985 | 985 | |
| 986 | 986 | READ8_MEMBER(seibuspi_state::z80_jp1_r) |
| 987 | 987 | { |
| 988 | return i | |
| 988 | return iop | |
| 989 | 989 | } |
| 990 | 990 | |
| 991 | 991 | READ8_MEMBER(seibuspi_state::z80_coin_r) |
| 992 | 992 | { |
| 993 | return i | |
| 993 | return iop | |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | READ32_MEMBER(seibuspi_state::soundrom_r) |
| r15082 | r15083 | |
| 1289 | 1289 | CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode) |
| 1290 | 1290 | { |
| 1291 | 1291 | static const UINT8 encoding[] = { 0x02, 0x10, 0x03, 0x18, 0x04, 0x20, 0x05, 0x28, 0x06, 0x30, 0x07 }; |
| 1292 | i | |
| 1292 | iop | |
| 1293 | 1293 | int bit; |
| 1294 | 1294 | |
| 1295 | 1295 | for (bit = 0; bit < ARRAY_LENGTH(encoding); bit++) |
| r15082 | r15083 | |
| 1812 | 1812 | { |
| 1813 | 1813 | seibuspi_state *state = machine.driver_data<seibuspi_state>(); |
| 1814 | 1814 | int i; |
| 1815 | UINT8 *sound = | |
| 1815 | UINT8 *sound = sta | |
| 1816 | 1816 | |
| 1817 | 1817 | UINT8 *rombase = state->memregion("user1")->base(); |
| 1818 | 1818 | UINT8 flash_data = rombase[0x1ffffc]; |
| r15082 | r15083 | |
| 2057 | 2057 | device_spin_until_interrupt(&space.device()); // idle |
| 2058 | 2058 | // Hack to enter test mode |
| 2059 | 2059 | r = m_spimainram[(0x002894c-0x800)/4] & (~0x400); |
| 2060 | return r | (((i | |
| 2060 | return r | (((iop | |
| 2061 | 2061 | } |
| 2062 | 2062 | |
| 2063 | 2063 | /* rfjetj */ |
| r15082 | r15083 | |
| 2075 | 2075 | state->m_flash[0] = machine.device<intel_e28f008sa_device>("flash0"); |
| 2076 | 2076 | state->m_flash[1] = machine.device<intel_e28f008sa_device>("flash1"); |
| 2077 | 2077 | |
| 2078 | seibuspi_text_decrypt(machine.root_device().memregion("gfx1")->base()); | |
| 2079 | seibuspi_bg_decrypt(machine.root_device().memregion("gfx2")->base(), machine.root_device().memregion("gfx2")->bytes()); | |
| 2078 | seibuspi_text_decrypt(state->memregion("gfx1")->base()); | |
| 2079 | seibuspi_bg_decrypt(state->memregion("gfx2")->base(), state->memregion("gfx2")->bytes()); | |
| 2080 | 2080 | seibuspi_sprite_decrypt(state->memregion("gfx3")->base(), 0x400000); |
| 2081 | 2081 | } |
| 2082 | 2082 | |
| r15082 | r15083 | |
| 2146 | 2146 | state->m_flash[1] = machine.device<intel_e28f008sa_device>("flash1"); |
| 2147 | 2147 | |
| 2148 | 2148 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x0282AC, 0x0282AF, read32_delegate(FUNC(seibuspi_state::rf2_speedup_r),state)); |
| 2149 | seibuspi_rise10_text_decrypt(machine.root_device().memregion("gfx1")->base()); | |
| 2150 | seibuspi_rise10_bg_decrypt(machine.root_device().memregion("gfx2")->base(), machine.root_device().memregion("gfx2")->bytes()); | |
| 2149 | seibuspi_rise10_text_decrypt(state->memregion("gfx1")->base()); | |
| 2150 | seibuspi_rise10_bg_decrypt(state->memregion("gfx2")->base(), state->memregion("gfx2")->bytes()); | |
| 2151 | 2151 | seibuspi_rise10_sprite_decrypt(state->memregion("gfx3")->base(), 0x600000); |
| 2152 | 2152 | |
| 2153 | 2153 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x560, 0x563, write32_delegate(FUNC(seibuspi_state::sprite_dma_start_w),state)); |
| r15082 | r15083 | |
| 2171 | 2171 | state->m_flash[1] = machine.device<intel_e28f008sa_device>("flash1"); |
| 2172 | 2172 | |
| 2173 | 2173 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x002894c, 0x002894f, read32_delegate(FUNC(seibuspi_state::rfjet_speedup_r),state)); |
| 2174 | seibuspi_rise11_text_decrypt(machine.root_device().memregion("gfx1")->base()); | |
| 2175 | seibuspi_rise11_bg_decrypt(machine.root_device().memregion("gfx2")->base(), machine.root_device().memregion("gfx2")->bytes()); | |
| 2174 | seibuspi_rise11_text_decrypt(state->memregion("gfx1")->base()); | |
| 2175 | seibuspi_rise11_bg_decrypt(state->memregion("gfx2")->base(), state->memregion("gfx2")->bytes()); | |
| 2176 | 2176 | seibuspi_rise11_sprite_decrypt_rfjet(state->memregion("gfx3")->base(), 0x800000); |
| 2177 | 2177 | |
| 2178 | 2178 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x560, 0x563, write32_delegate(FUNC(seibuspi_state::sprite_dma_start_w),state)); |
| r15082 | r15083 | |
|---|---|---|
| 406 | 406 | |
| 407 | 407 | m_result = (m_lastresult | 0x00ff); |
| 408 | 408 | |
| 409 | m_newx[1] = input_port_read(machine(), "XAXIS1"); /* Trackball 1 Left - Right */ | |
| 410 | m_newy[1] = input_port_read(machine(), "YAXIS1"); /* Trackball 1 Up - Down */ | |
| 411 | m_newx[2] = input_port_read(machine(), "XAXIS2"); /* Trackball 2 Left - Right */ | |
| 412 | m_newy[2] = input_port_read(machine(), "YAXIS2"); /* Trackball 2 Up - Down */ | |
| 409 | m_newx[1] = ioport("XAXIS1")->read(); /* Trackball 1 Left - Right */ | |
| 410 | m_newy[1] = ioport("YAXIS1")->read(); /* Trackball 1 Up - Down */ | |
| 411 | m_newx[2] = ioport("XAXIS2")->read(); /* Trackball 2 Left - Right */ | |
| 412 | m_newy[2] = ioport("YAXIS2")->read(); /* Trackball 2 Up - Down */ | |
| 413 | 413 | |
| 414 | 414 | m_dx[1] = (INT8)(m_newx[1] - m_oldx[1]); |
| 415 | 415 | m_dy[1] = (INT8)(m_newy[1] - m_oldy[1]); |
| r15082 | r15083 | |
| 572 | 572 | READ16_MEMBER(coolpool_state::coolpool_input_r) |
| 573 | 573 | { |
| 574 | 574 | |
| 575 | m_result = (input_port_read(machine(), "IN1") & 0x00ff) | (m_lastresult & 0xff00); | |
| 576 | m_newx[1] = input_port_read(machine(), "XAXIS"); | |
| 577 | m_newy[1] = input_port_read(machine(), "YAXIS"); | |
| 575 | m_result = (ioport("IN1")->read() & 0x00ff) | (m_lastresult & 0xff00); | |
| 576 | m_newx[1] = ioport("XAXIS")->read(); | |
| 577 | m_newy[1] = ioport("YAXIS")->read(); | |
| 578 | 578 | m_dx[1] = (INT8)(m_newx[1] - m_oldx[1]); |
| 579 | 579 | m_dy[1] = (INT8)(m_newy[1] - m_oldy[1]); |
| 580 | 580 |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | |
| 60 | 60 | READ8_MEMBER(timetrv_state::test1_r) |
| 61 | 61 | { |
| 62 | return i | |
| 62 | return iop | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | READ8_MEMBER(timetrv_state::test2_r) |
| 66 | 66 | { |
| 67 | 67 | /*bit 7,eeprom read bit*/ |
| 68 | return (i | |
| 68 | return (iop | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | { |
| 20 | 20 | public: |
| 21 | 21 | astrafr_state(const machine_config &mconfig, device_type type, const char *tag) |
| 22 | : driver_device(mconfig, type, tag) | |
| 22 | : driver_device(mconfig, type, tag), | |
| 23 | m_maincpu(*this, "maincpu"), | |
| 24 | m_slavecpu(*this, "slavecpu") | |
| 25 | ||
| 23 | 26 | { |
| 24 | 27 | fgpa_first_read_addr = 0xffff; |
| 25 | 28 | fgpa_rom_write_addr = 0xffff; |
| 26 | 29 | fgpa_after_rom_write_addr = 0xffff; |
| 27 | 30 | } |
| 28 | 31 | |
| 32 | UINT32* m_cpuregion; | |
| 33 | int m_cpuregion_size; | |
| 34 | UINT32* m_mainram; | |
| 35 | ||
| 36 | UINT32* m_slavecpuregion; | |
| 37 | int m_slavecpuregion_size; | |
| 38 | UINT32* m_slaveram; | |
| 39 | ||
| 40 | ||
| 41 | ||
| 42 | DECLARE_READ32_MEMBER(astrafr_mem_r); | |
| 43 | DECLARE_WRITE32_MEMBER(astrafr_mem_w); | |
| 44 | ||
| 45 | DECLARE_READ32_MEMBER(astrafr_slave_mem_r); | |
| 46 | DECLARE_WRITE32_MEMBER(astrafr_slave_mem_w); | |
| 47 | ||
| 48 | ||
| 29 | 49 | // ports move above from game to game.. |
| 30 | 50 | UINT16 fgpa_rom_write_addr; |
| 31 | 51 | UINT16 fgpa_first_read_addr; |
| r15082 | r15083 | |
| 91 | 111 | logerror("%08x astra_fgpa_slave_w offset %02x %02x\n", pc, offset, data); |
| 92 | 112 | } |
| 93 | 113 | } |
| 114 | ||
| 115 | // devices | |
| 116 | required_device<cpu_device> m_maincpu; | |
| 117 | optional_device<cpu_device> m_slavecpu; | |
| 94 | 118 | |
| 95 | 119 | }; |
| 96 | 120 | |
| 97 | 121 | |
| 122 | ||
| 123 | READ32_MEMBER(astrafr_state::astrafr_mem_r) | |
| 124 | { | |
| 125 | int pc = cpu_get_pc(&space.device()); | |
| 126 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 127 | ||
| 128 | switch ( cs ) | |
| 129 | { | |
| 130 | case 1: | |
| 131 | if (offset<m_cpuregion_size) | |
| 132 | return m_cpuregion[offset]; | |
| 133 | else | |
| 134 | return 0x0000; | |
| 135 | ||
| 136 | case 2: | |
| 137 | offset &= 0x3fff; | |
| 138 | return m_mainram[offset]; | |
| 139 | ||
| 140 | default: | |
| 141 | logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 142 | ||
| 143 | } | |
| 144 | ||
| 145 | return 0x0000; | |
| 146 | } | |
| 147 | ||
| 148 | ||
| 149 | ||
| 150 | WRITE32_MEMBER(astrafr_state::astrafr_mem_w) | |
| 151 | { | |
| 152 | int pc = cpu_get_pc(&space.device()); | |
| 153 | int address = offset * 4; | |
| 154 | int cs = m68340_get_cs(m_maincpu, address); | |
| 155 | ||
| 156 | ||
| 157 | switch ( cs ) | |
| 158 | { | |
| 159 | case 0: // some sets end up writng the FGPA data with CS0, I guess the CS logic is wrong?? | |
| 160 | case 3: | |
| 161 | address &= 0xfffff; | |
| 162 | ||
| 163 | if (mem_mask&0xff000000) astra_fgpa_w(space, address+0, data >> 24); | |
| 164 | if (mem_mask&0x00ff0000) astra_fgpa_w(space, address+1, data >> 16); | |
| 165 | if (mem_mask&0x0000ff00) astra_fgpa_w(space, address+2, data >> 8); | |
| 166 | if (mem_mask&0x000000ff) astra_fgpa_w(space, address+3, data >> 0); | |
| 167 | break; | |
| 168 | ||
| 169 | case 2: | |
| 170 | offset &= 0x3fff; | |
| 171 | COMBINE_DATA(&m_mainram[offset]); | |
| 172 | break; | |
| 173 | ||
| 174 | default: | |
| 175 | logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, address, data, mem_mask, cs); | |
| 176 | ||
| 177 | } | |
| 178 | } | |
| 179 | ||
| 180 | READ32_MEMBER(astrafr_state::astrafr_slave_mem_r) | |
| 181 | { | |
| 182 | int pc = cpu_get_pc(&space.device()); | |
| 183 | int cs = m68340_get_cs(m_slavecpu, offset * 4); | |
| 184 | ||
| 185 | switch ( cs ) | |
| 186 | { | |
| 187 | case 1: | |
| 188 | if (offset<m_slavecpuregion_size) | |
| 189 | return m_slavecpuregion[offset]; | |
| 190 | else | |
| 191 | return 0x0000; | |
| 192 | ||
| 193 | case 2: | |
| 194 | offset &= 0x3fff; | |
| 195 | return m_slaveram[offset]; | |
| 196 | ||
| 197 | default: | |
| 198 | logerror("%08x slavecpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 199 | ||
| 200 | } | |
| 201 | ||
| 202 | return 0x0000; | |
| 203 | } | |
| 204 | ||
| 205 | WRITE32_MEMBER(astrafr_state::astrafr_slave_mem_w) | |
| 206 | { | |
| 207 | int pc = cpu_get_pc(&space.device()); | |
| 208 | int address = offset * 4; | |
| 209 | int cs = m68340_get_cs(m_slavecpu, address); | |
| 210 | ||
| 211 | ||
| 212 | switch ( cs ) | |
| 213 | { | |
| 214 | case 0: // some sets end up writng the FGPA data with CS0, I guess the CS logic is wrong?? | |
| 215 | case 3: | |
| 216 | address &= 0xfffff; | |
| 217 | ||
| 218 | if (mem_mask&0xff000000) astra_fgpa_slave_w(space, address+0, data >> 24); | |
| 219 | if (mem_mask&0x00ff0000) astra_fgpa_slave_w(space, address+1, data >> 16); | |
| 220 | if (mem_mask&0x0000ff00) astra_fgpa_slave_w(space, address+2, data >> 8); | |
| 221 | if (mem_mask&0x000000ff) astra_fgpa_slave_w(space, address+3, data >> 0); | |
| 222 | break; | |
| 223 | ||
| 224 | case 2: | |
| 225 | offset &= 0x3fff; | |
| 226 | COMBINE_DATA(&m_slaveram[offset]); | |
| 227 | break; | |
| 228 | ||
| 229 | default: | |
| 230 | logerror("%08x slavecpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, address, data, mem_mask, cs); | |
| 231 | ||
| 232 | } | |
| 233 | } | |
| 234 | ||
| 235 | ||
| 236 | ||
| 98 | 237 | static ADDRESS_MAP_START( astrafr_master_map, AS_PROGRAM, 32, astrafr_state ) |
| 99 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 100 | AM_RANGE(0x800000, 0x8000ff) AM_READWRITE8(astra_fgpa_r, astra_fgpa_w, 0xffffffff) | |
| 101 | AM_RANGE(0x400000, 0x40ffff) AM_RAM // as_partyd set | |
| 238 | AM_RANGE(0x000000, 0xffffffff) AM_READWRITE(astrafr_mem_r, astrafr_mem_w) | |
| 102 | 239 | ADDRESS_MAP_END |
| 103 | 240 | |
| 104 | // probably identical, afaik they're linked units.. | |
| 105 | static ADDRESS_MAP_START( astrafr_slave_map, AS_PROGRAM, 32, astrafr_state ) | |
| 106 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 107 | AM_RANGE(0x800000, 0x8000ff) AM_READWRITE8(astra_fgpa_slave_r, astra_fgpa_slave_w, 0xffffffff) | |
| 108 | AM_RANGE(0x400000, 0x40ffff) AM_RAM // as_partyd set | |
| 109 | ADDRESS_MAP_END | |
| 110 | 241 | |
| 111 | ||
| 112 | 242 | static ADDRESS_MAP_START( astrafr_master_alt_map, AS_PROGRAM, 32, astrafr_state ) |
| 113 | AM_RANGE(0x0000000, 0x01fffff) AM_ROM | |
| 114 | AM_RANGE(0x1000000, 0x1009fff) AM_RAM // ? | |
| 115 | AM_RANGE(0x2000000, 0x20000ff) AM_READWRITE8(astra_fgpa_r, astra_fgpa_w, 0xffffffff) | |
| 243 | AM_RANGE(0x000000, 0xffffffff) AM_READWRITE(astrafr_mem_r, astrafr_mem_w) | |
| 116 | 244 | ADDRESS_MAP_END |
| 117 | 245 | |
| 118 | ||
| 119 | ||
| 120 | ||
| 121 | 246 | static ADDRESS_MAP_START( astra_map, AS_PROGRAM, 32, astrafr_state ) |
| 122 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 123 | AM_RANGE(0x800000, 0x8000ff) AM_READWRITE8(astra_fgpa_r, astra_fgpa_w, 0xffffffff) | |
| 124 | AM_RANGE(0x400000, 0x40ffff) AM_RAM // as_partyd set | |
| 247 | AM_RANGE(0x000000, 0xffffffff) AM_READWRITE(astrafr_mem_r, astrafr_mem_w) | |
| 125 | 248 | ADDRESS_MAP_END |
| 126 | 249 | |
| 127 | static ADDRESS_MAP_START( astra_alt_map, AS_PROGRAM, 32, astrafr_state ) | |
| 128 | AM_RANGE(0x0000000, 0x01fffff) AM_ROM | |
| 129 | AM_RANGE(0x1000000, 0x1009fff) AM_RAM // ? | |
| 130 | AM_RANGE(0x2000000, 0x20000ff) AM_READWRITE8(astra_fgpa_r, astra_fgpa_w, 0xffffffff) | |
| 250 | // probably identical, afaik they're linked units.. | |
| 251 | static ADDRESS_MAP_START( astrafr_slave_map, AS_PROGRAM, 32, astrafr_state ) | |
| 252 | AM_RANGE(0x000000, 0xffffffff) AM_READWRITE(astrafr_slave_mem_r, astrafr_slave_mem_w) | |
| 131 | 253 | ADDRESS_MAP_END |
| 132 | 254 | |
| 255 | ||
| 133 | 256 | static INPUT_PORTS_START( astrafr ) |
| 134 | 257 | INPUT_PORTS_END |
| 135 | 258 | |
| 259 | static MACHINE_START( astra_common ) | |
| 260 | { | |
| 261 | astrafr_state *state = machine.driver_data<astrafr_state>(); | |
| 262 | ||
| 263 | state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base(); | |
| 264 | state->m_cpuregion_size = state->memregion( "maincpu" )->bytes()/4; | |
| 265 | state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 266 | ||
| 267 | state->m_slavecpuregion = (UINT32*)state->memregion( "slavecpu" )->base(); | |
| 268 | state->m_slavecpuregion_size = state->memregion( "slavecpu" )->bytes()/4; | |
| 269 | state->m_slaveram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 270 | ||
| 271 | ||
| 272 | } | |
| 273 | ||
| 136 | 274 | /* the FPGA area read/write addresses move around ... */ |
| 137 | 275 | static MACHINE_START( astra_37 ) |
| 138 | 276 | { |
| r15082 | r15083 | |
| 140 | 278 | state->fgpa_after_rom_write_addr = 0x30; |
| 141 | 279 | state->fgpa_first_read_addr = 0x33; |
| 142 | 280 | state->fgpa_rom_write_addr = 0x37; |
| 281 | MACHINE_START_CALL(astra_common); | |
| 143 | 282 | } |
| 144 | 283 | |
| 145 | 284 | static MACHINE_START( astra_2e ) |
| r15082 | r15083 | |
| 148 | 287 | state->fgpa_after_rom_write_addr = 0x20; |
| 149 | 288 | state->fgpa_first_read_addr = 0x23; |
| 150 | 289 | state->fgpa_rom_write_addr = 0x2e; |
| 290 | MACHINE_START_CALL(astra_common); | |
| 151 | 291 | } |
| 152 | 292 | |
| 153 | 293 | |
| r15082 | r15083 | |
| 157 | 297 | |
| 158 | 298 | MCFG_CPU_ADD("slavecpu", M68340, 16000000) |
| 159 | 299 | MCFG_CPU_PROGRAM_MAP(astrafr_slave_map) |
| 300 | ||
| 301 | MCFG_MACHINE_START( astra_common ) | |
| 160 | 302 | MACHINE_CONFIG_END |
| 161 | 303 | |
| 162 | 304 | static MACHINE_CONFIG_DERIVED( astrafr_dual_2e, astrafr_dual ) |
| r15082 | r15083 | |
| 184 | 326 | static MACHINE_CONFIG_START( astra_single, astrafr_state ) |
| 185 | 327 | MCFG_CPU_ADD("maincpu", M68340, 16000000) |
| 186 | 328 | MCFG_CPU_PROGRAM_MAP(astra_map) |
| 329 | MCFG_MACHINE_START( astra_common ) | |
| 187 | 330 | MACHINE_CONFIG_END |
| 188 | 331 | |
| 189 | 332 | static MACHINE_CONFIG_DERIVED( astra_single_37, astra_single ) |
| r15082 | r15083 | |
| 200 | 343 | // state->fgpa_after_rom_write_addr = 0x20; |
| 201 | 344 | // state->fgpa_first_read_addr = 0x23; |
| 202 | 345 | state->fgpa_rom_write_addr = 0x57; |
| 346 | MACHINE_START_CALL(astra_common); | |
| 203 | 347 | } |
| 204 | 348 | |
| 205 | 349 | |
| 206 | 350 | static MACHINE_CONFIG_START( astra_single_alt, astrafr_state ) |
| 207 | 351 | MCFG_CPU_ADD("maincpu", M68340, 16000000) |
| 208 | MCFG_CPU_PROGRAM_MAP(astra_alt_map) | |
| 352 | MCFG_CPU_PROGRAM_MAP(astra_map) | |
| 353 | MCFG_MACHINE_START( astra_common ) | |
| 209 | 354 | MACHINE_CONFIG_END |
| 210 | 355 | |
| 211 | 356 | static MACHINE_CONFIG_DERIVED( astra_single_alt_57, astra_single_alt ) |
| r15082 | r15083 | |
| 2169 | 2314 | GAME( 200?, as_tblf, as_tbl , astra_single, astrafr, 0, ROT0, "Astra", "Triple Bells (Astra, V301)" , GAME_IS_SKELETON_MECHANICAL) |
| 2170 | 2315 | GAME( 200?, as_td, 0 , astra_single_2e, astrafr, astradec, ROT0, "Astra", "Twin Dragons (Astra, V103)" , GAME_IS_SKELETON_MECHANICAL) |
| 2171 | 2316 | |
| 2172 | GAME( 200?, as_twp, 0 , astra_single, astrafr, 0, ROT0, "Astra", "Twin Pots (Astra, V106)" , GAME_IS_SKELETON_MECHANICAL) | |
| 2317 | GAME( 200?, as_twp, 0 , astra_single_2e, astrafr, 0, ROT0, "Astra", "Twin Pots (Astra, V106)" , GAME_IS_SKELETON_MECHANICAL) | |
| 2173 | 2318 | GAME( 200?, as_twpa, as_twp , astra_single, astrafr, 0, ROT0, "Astra", "Twin Pots (Astra, V104)" , GAME_IS_SKELETON_MECHANICAL) |
| 2174 | 2319 | GAME( 200?, as_vn, 0 , astrafr_dual_alt_37, astrafr, astradec_dual, ROT0, "Astra", "Vegas Nights (Astra, V205)" , GAME_IS_SKELETON_MECHANICAL) |
| 2175 | 2320 | GAME( 200?, as_vcv, 0 , astra_single, astrafr, astradec, ROT0, "Astra", "Viva Cash Vegas (Astra, V005)" , GAME_IS_SKELETON_MECHANICAL) |
| r15082 | r15083 | |
|---|---|---|
| 356 | 356 | static MACHINE_START( system1 ) |
| 357 | 357 | { |
| 358 | 358 | system1_state *state = machine.driver_data<system1_state>(); |
| 359 | UINT32 numbanks = ( | |
| 359 | UINT32 numbanks = (sta | |
| 360 | 360 | |
| 361 | 361 | if (numbanks > 0) |
| 362 | state->membank("bank1")->configure_entries(0, numbanks, | |
| 362 | state->membank("bank1")->configure_entries(0, numbanks, sta | |
| 363 | 363 | else |
| 364 | 364 | state->membank("bank1")->configure_entry(0, state->memregion("maincpu")->base() + 0x8000); |
| 365 | 365 | state->membank("bank1")->set_entry(0); |
| r15082 | r15083 | |
| 442 | 442 | CUSTOM_INPUT_MEMBER(system1_state::dakkochn_mux_data_r) |
| 443 | 443 | { |
| 444 | 444 | static const char *const ports[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6" }; |
| 445 | return i | |
| 445 | return iop | |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 |
| r15082 | r15083 | |
|---|---|---|
| 14 | 14 | Mahjong Housoukyoku Honbanchuu |
| 15 | 15 | (c)199? Nihon Bussan Co.,Ltd. |
| 16 | 16 | |
| 17 | Zoku Mahjong Housoukyoku Honbanchuu | |
| 18 | (c)199? Nihon Bussan Co.,Ltd. | |
| 19 | ||
| 17 | 20 | Driver by Takahiro Nogi <nogi@kt.rim.or.jp> 2000/12/23 - |
| 18 | 21 | |
| 19 | 22 | ******************************************************************************/ |
| r15082 | r15083 | |
| 45 | 48 | #include "includes/niyanpai.h" |
| 46 | 49 | |
| 47 | 50 | |
| 48 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 49 | #if SIGNED_DAC | |
| 50 | #define DAC_WRITE dac_signed_w | |
| 51 | #else | |
| 52 | #define DAC_WRITE dac_w | |
| 53 | #endif | |
| 54 | ||
| 55 | ||
| 56 | 51 | static void niyanpai_soundbank_w(running_machine &machine, int data) |
| 57 | 52 | { |
| 58 | 53 | UINT8 *SNDROM = machine.root_device().memregion("audiocpu")->base(); |
| r15082 | r15083 | |
| 117 | 112 | niyanpai_soundbank_w(machine(), data & 0x03); |
| 118 | 113 | break; |
| 119 | 114 | case 1: /* PB_0 */ |
| 120 | | |
| 115 | dac_w | |
| 121 | 116 | break; |
| 122 | 117 | case 2: /* PC_0 */ |
| 123 | | |
| 118 | dac_w | |
| 124 | 119 | break; |
| 125 | 120 | case 3: /* PD_0 */ |
| 126 | 121 | break; |
| r15082 | r15083 | |
| 283 | 278 | { |
| 284 | 279 | UINT8 dipsw_a, dipsw_b; |
| 285 | 280 | |
| 286 | dipsw_a = (((input_port_read(machine(), "DSWA") & 0x01) << 7) | ((input_port_read(machine(), "DSWA") & 0x02) << 5) | | |
| 287 | ((input_port_read(machine(), "DSWA") & 0x04) << 3) | ((input_port_read(machine(), "DSWA") & 0x08) << 1) | | |
| 288 | ((input_port_read(machine(), "DSWA") & 0x10) >> 1) | ((input_port_read(machine(), "DSWA") & 0x20) >> 3) | | |
| 289 | ((input_port_read(machine(), "DSWA") & 0x40) >> 5) | ((input_port_read(machine(), "DSWA") & 0x80) >> 7)); | |
| 281 | dipsw_a = (((ioport("DSWA")->read() & 0x01) << 7) | ((ioport("DSWA")->read() & 0x02) << 5) | | |
| 282 | ((ioport("DSWA")->read() & 0x04) << 3) | ((ioport("DSWA")->read() & 0x08) << 1) | | |
| 283 | ((ioport("DSWA")->read() & 0x10) >> 1) | ((ioport("DSWA")->read() & 0x20) >> 3) | | |
| 284 | ((ioport("DSWA")->read() & 0x40) >> 5) | ((ioport("DSWA")->read() & 0x80) >> 7)); | |
| 290 | 285 | |
| 291 | dipsw_b = (((input_port_read(machine(), "DSWB") & 0x01) << 7) | ((input_port_read(machine(), "DSWB") & 0x02) << 5) | | |
| 292 | ((input_port_read(machine(), "DSWB") & 0x04) << 3) | ((input_port_read(machine(), "DSWB") & 0x08) << 1) | | |
| 293 | ((input_port_read(machine(), "DSWB") & 0x10) >> 1) | ((input_port_read(machine(), "DSWB") & 0x20) >> 3) | | |
| 294 | ((input_port_read(machine(), "DSWB") & 0x40) >> 5) | ((input_port_read(machine(), "DSWB") & 0x80) >> 7)); | |
| 286 | dipsw_b = (((ioport("DSWB")->read() & 0x01) << 7) | ((ioport("DSWB")->read() & 0x02) << 5) | | |
| 287 | ((ioport("DSWB")->read() & 0x04) << 3) | ((ioport("DSWB")->read() & 0x08) << 1) | | |
| 288 | ((ioport("DSWB")->read() & 0x10) >> 1) | ((ioport("DSWB")->read() & 0x20) >> 3) | | |
| 289 | ((ioport("DSWB")->read() & 0x40) >> 5) | ((ioport("DSWB")->read() & 0x80) >> 7)); | |
| 295 | 290 | |
| 296 | 291 | return ((dipsw_a << 8) | dipsw_b); |
| 297 | 292 | } |
| r15082 | r15083 | |
| 302 | 297 | |
| 303 | 298 | switch ((m_musobana_inputport ^ 0xff00) >> 8) |
| 304 | 299 | { |
| 305 | case 0x01: portdata = input_port_read(machine(), "KEY0"); break; | |
| 306 | case 0x02: portdata = input_port_read(machine(), "KEY1"); break; | |
| 307 | case 0x04: portdata = input_port_read(machine(), "KEY2"); break; | |
| 308 | case 0x08: portdata = input_port_read(machine(), "KEY3"); break; | |
| 309 | case 0x10: portdata = input_port_read(machine(), "KEY4"); break; | |
| 310 | default: portdata = input_port_read(machine(), "KEY0") & input_port_read(machine(), "KEY1") & input_port_read(machine(), "KEY2") | |
| 311 | & input_port_read(machine(), "KEY3") & input_port_read(machine(), "KEY4"); break; | |
| 300 | case 0x01: portdata = ioport("KEY0")->read(); break; | |
| 301 | case 0x02: portdata = ioport("KEY1")->read(); break; | |
| 302 | case 0x04: portdata = ioport("KEY2")->read(); break; | |
| 303 | case 0x08: portdata = ioport("KEY3")->read(); break; | |
| 304 | case 0x10: portdata = ioport("KEY4")->read(); break; | |
| 305 | default: portdata = ioport("KEY0")->read() & ioport("KEY1")->read() & ioport("KEY2")->read() | |
| 306 | & ioport("KEY3")->read() & ioport("KEY4")->read(); break; | |
| 312 | 307 | } |
| 313 | 308 | |
| 314 | 309 | return (portdata); |
| r15082 | r15083 | |
| 454 | 449 | AM_IMPORT_FROM( tmp68301_regs ) |
| 455 | 450 | ADDRESS_MAP_END |
| 456 | 451 | |
| 452 | static ADDRESS_MAP_START( zokumahj_map, AS_PROGRAM, 16, niyanpai_state ) | |
| 453 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 454 | AM_RANGE(0x0ff000, 0x0fffff) AM_RAM | |
| 457 | 455 | |
| 456 | AM_RANGE(0x0e0000, 0x0e08ff) AM_READWRITE(niyanpai_palette_r,niyanpai_palette_w) | |
| 457 | AM_RANGE(0x0e0900, 0x0e11ff) AM_RAM // palette work ram? | |
| 458 | ||
| 459 | AM_RANGE(0x0a8000, 0x0a87ff) AM_RAM AM_SHARE("nvram") | |
| 460 | AM_RANGE(0x0c0000, 0x0cffff) AM_RAM | |
| 461 | ||
| 462 | AM_RANGE(0x200000, 0x200001) AM_WRITE(niyanpai_sound_w) | |
| 463 | ||
| 464 | AM_RANGE(0x200200, 0x200201) AM_WRITE(musobana_inputport_w) // inputport select | |
| 465 | AM_RANGE(0x240000, 0x240009) AM_WRITENOP // unknown | |
| 466 | AM_RANGE(0x240200, 0x2403ff) AM_WRITENOP // unknown | |
| 467 | ||
| 468 | AM_RANGE(0x240400, 0x240403) AM_READ(niyanpai_blitter_0_r) | |
| 469 | AM_RANGE(0x240400, 0x24041f) AM_WRITE(niyanpai_blitter_0_w) | |
| 470 | AM_RANGE(0x240420, 0x24043f) AM_WRITE(niyanpai_clut_0_w) | |
| 471 | ||
| 472 | AM_RANGE(0x240600, 0x240603) AM_READ(niyanpai_blitter_1_r) | |
| 473 | AM_RANGE(0x240600, 0x24061f) AM_WRITE(niyanpai_blitter_1_w) | |
| 474 | AM_RANGE(0x240620, 0x24063f) AM_WRITE(niyanpai_clut_1_w) | |
| 475 | ||
| 476 | AM_RANGE(0x240800, 0x240803) AM_READ(niyanpai_blitter_2_r) | |
| 477 | AM_RANGE(0x240800, 0x24081f) AM_WRITE(niyanpai_blitter_2_w) | |
| 478 | AM_RANGE(0x240820, 0x24083f) AM_WRITE(niyanpai_clut_2_w) | |
| 479 | ||
| 480 | AM_RANGE(0x240a00, 0x240a01) AM_WRITE(niyanpai_clutsel_0_w) | |
| 481 | AM_RANGE(0x240c00, 0x240c01) AM_WRITE(niyanpai_clutsel_1_w) | |
| 482 | AM_RANGE(0x240e00, 0x240e01) AM_WRITE(niyanpai_clutsel_2_w) | |
| 483 | ||
| 484 | AM_RANGE(0x280000, 0x280001) AM_READ(niyanpai_dipsw_r) | |
| 485 | AM_RANGE(0x280200, 0x280201) AM_READ(musobana_inputport_0_r) | |
| 486 | AM_RANGE(0x280400, 0x280401) AM_READ_PORT("SYSTEM") | |
| 487 | ||
| 488 | AM_IMPORT_FROM( tmp68301_regs ) | |
| 489 | ADDRESS_MAP_END | |
| 490 | ||
| 491 | ||
| 458 | 492 | static ADDRESS_MAP_START( niyanpai_sound_map, AS_PROGRAM, 8, niyanpai_state ) |
| 459 | 493 | AM_RANGE(0x0000, 0x77ff) AM_ROM |
| 460 | 494 | AM_RANGE(0x7800, 0x7fff) AM_RAM |
| r15082 | r15083 | |
| 774 | 808 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 775 | 809 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 776 | 810 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) |
| 777 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) | |
| 778 | 811 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) |
| 812 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 779 | 813 | PORT_DIPNAME( 0x10, 0x00, "DIPSW 1-5" ) |
| 780 | 814 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 781 | 815 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 828 | 862 | PORT_INCLUDE( nbmjctrl_16 ) |
| 829 | 863 | INPUT_PORTS_END |
| 830 | 864 | |
| 865 | static INPUT_PORTS_START( zokumahj ) // I don't have manual for this game. | |
| 866 | PORT_START("DSWA") | |
| 867 | PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" ) | |
| 868 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 869 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 870 | PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" ) | |
| 871 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 872 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 873 | PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" ) | |
| 874 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 875 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 876 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) | |
| 877 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) | |
| 878 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 879 | PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" ) | |
| 880 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 881 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 882 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Flip_Screen ) ) | |
| 883 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 884 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 885 | PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" ) | |
| 886 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 887 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 888 | PORT_DIPNAME( 0x80, 0x80, "DIPSW 1-8" ) | |
| 889 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 890 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 831 | 891 | |
| 892 | PORT_START("DSWB") | |
| 893 | PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" ) | |
| 894 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 895 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 896 | PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" ) | |
| 897 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 898 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 899 | PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" ) | |
| 900 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 901 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 902 | PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" ) | |
| 903 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 904 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 905 | PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" ) | |
| 906 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 907 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 908 | PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" ) | |
| 909 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 910 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 911 | PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" ) | |
| 912 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 913 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 914 | PORT_DIPNAME( 0x80, 0x80, "Option Test" ) | |
| 915 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 916 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 917 | ||
| 918 | PORT_START("SYSTEM") | |
| 919 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 | |
| 920 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2 | |
| 921 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR | |
| 922 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET | |
| 923 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER | |
| 924 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 925 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 926 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST | |
| 927 | ||
| 928 | PORT_INCLUDE( nbmjctrl_16 ) | |
| 929 | INPUT_PORTS_END | |
| 930 | ||
| 931 | ||
| 832 | 932 | static INTERRUPT_GEN( niyanpai_interrupt ) |
| 833 | 933 | { |
| 834 | 934 | device_set_input_line_and_vector(device, 1, HOLD_LINE,0x100/4); |
| r15082 | r15083 | |
| 866 | 966 | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 240-1) |
| 867 | 967 | MCFG_SCREEN_UPDATE_STATIC(niyanpai) |
| 868 | 968 | |
| 869 | MCFG_PALETTE_LENGTH( | |
| 969 | MCFG_PALETTE_LENGTH(256*3) | |
| 870 | 970 | |
| 871 | 971 | MCFG_VIDEO_START(niyanpai) |
| 872 | 972 | |
| r15082 | r15083 | |
| 874 | 974 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 875 | 975 | |
| 876 | 976 | MCFG_SOUND_ADD("ymsnd", YM3812, 4000000) |
| 877 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 977 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) | |
| 878 | 978 | |
| 879 | 979 | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 880 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5 | |
| 980 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75 | |
| 881 | 981 | |
| 882 | 982 | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 883 | 983 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| r15082 | r15083 | |
| 897 | 997 | MCFG_CPU_PROGRAM_MAP(mhhonban_map) |
| 898 | 998 | MACHINE_CONFIG_END |
| 899 | 999 | |
| 1000 | static MACHINE_CONFIG_DERIVED( zokumahj, niyanpai ) | |
| 900 | 1001 | |
| 1002 | /* basic machine hardware */ | |
| 1003 | MCFG_CPU_MODIFY("maincpu") | |
| 1004 | MCFG_CPU_PROGRAM_MAP(zokumahj_map) | |
| 1005 | MACHINE_CONFIG_END | |
| 1006 | ||
| 1007 | ||
| 901 | 1008 | ROM_START( niyanpai ) |
| 902 | 1009 | ROM_REGION( 0x40000, "maincpu", 0 ) /* TMP68301 main program */ |
| 903 | 1010 | ROM_LOAD16_BYTE( "npai_01.bin", 0x00000, 0x20000, CRC(a904e8a1) SHA1(77865d7b48cac96af1e3cac4a702f7de4b5ee82b) ) |
| r15082 | r15083 | |
| 974 | 1081 | ROM_LOAD( "u107.bin", 0x280000, 0x80000, CRC(efc85912) SHA1(b9d523fd5f9ce879e2ed6916c89940be1d738a1c) ) |
| 975 | 1082 | ROM_END |
| 976 | 1083 | |
| 1084 | ROM_START( zokumahj ) | |
| 1085 | ROM_REGION( 0x40000, "maincpu", 0 ) /* TMP68301 main program */ | |
| 1086 | ROM_LOAD16_BYTE( "1.bin", 0x00000, 0x20000, CRC(53ca34a9) SHA1(5a1e2660442665efd529ec6c98ffc994c6103419) ) | |
| 1087 | ROM_LOAD16_BYTE( "2.bin", 0x00001, 0x20000, CRC(474f9303) SHA1(4b03e3b6b6ee864dfcce3978f19bf329e39b3fe7) ) | |
| 977 | 1088 | |
| 978 | GAME( 1996, niyanpai, 0, niyanpai, niyanpai, niyanpai, ROT0, "Nichibutsu", "Niyanpai (Japan)", 0 ) | |
| 979 | GAME( 1995, musobana, 0, musobana, musobana, niyanpai, ROT0, "Nichibutsu / Yubis", "Musoubana (Japan)", 0 ) | |
| 980 | GAME( 1994, 4psimasy, 0, musobana, 4psimasy, niyanpai, ROT0, "Sphinx / AV Japan", "Mahjong 4P Simasyo (Japan)", 0 ) | |
| 981 | GAME( 199?, mhhonban, 0, mhhonban, mhhonban, niyanpai, ROT0, "Nichibutsu?", "Mahjong Housoukyoku Honbanchuu (Japan)", 0 ) | |
| 1089 | ROM_REGION( 0x20000, "audiocpu", 0 ) /* TMPZ84C011 sound program */ | |
| 1090 | ROM_LOAD( "3.bin", 0x000000, 0x20000, CRC(48407507) SHA1(afd24d16d487fd2b6548d967e2f1ae122e2633a2) ) | |
| 1091 | ||
| 1092 | ROM_REGION( 0x300000, "gfx1", 0 ) /* gfx */ | |
| 1093 | ROM_LOAD( "4.bin", 0x000000, 0x80000, CRC(2b3e88b4) SHA1(d49a81f1bc6ac5b56df36caf7ee7188a917d947f) ) | |
| 1094 | ROM_LOAD( "5.bin", 0x080000, 0x80000, CRC(cfe9477a) SHA1(9d08f5b1d638cef7d8dc97bdd9d98627f9af1ef9) ) | |
| 1095 | ROM_LOAD( "6.bin", 0x100000, 0x80000, CRC(2d62df76) SHA1(83fe8e0a853c0137e7c77ecde762617c082774e5) ) | |
| 1096 | ROM_LOAD( "7.bin", 0x180000, 0x80000, CRC(75922e76) SHA1(4ad23e241a1a223e0fcd4fd26bd695b1a68c258a) ) | |
| 1097 | ROM_LOAD( "8.bin", 0x200000, 0x80000, CRC(22b3befa) SHA1(e44635e021962ce29b4e129ae394c794038aef39) ) | |
| 1098 | ROM_LOAD( "9.bin", 0x280000, 0x80000, CRC(f72d83af) SHA1(4b897b40765084fd9483065fd0eb0e29cbcfa5ac) ) | |
| 1099 | ROM_END | |
| 1100 | ||
| 1101 | ||
| 1102 | GAME( 1996, niyanpai, 0, niyanpai, niyanpai, niyanpai, ROT0, "Nichibutsu", "Niyanpai (Japan)", 0 ) | |
| 1103 | GAME( 1995, musobana, 0, musobana, musobana, niyanpai, ROT0, "Nichibutsu / Yubis", "Musoubana (Japan)", 0 ) | |
| 1104 | GAME( 1994, 4psimasy, 0, musobana, 4psimasy, niyanpai, ROT0, "Sphinx / AV Japan", "Mahjong 4P Simasyo (Japan)", 0 ) | |
| 1105 | GAME( 199?, mhhonban, 0, mhhonban, mhhonban, niyanpai, ROT0, "Nichibutsu?", "Mahjong Housoukyoku Honbanchuu (Japan)", 0 ) | |
| 1106 | GAME( 199?, zokumahj, mhhonban, zokumahj, zokumahj, niyanpai, ROT0, "Nichibutsu?", "Zoku Mahjong Housoukyoku (Japan)", 0 ) |
| r15082 | r15083 | |
|---|---|---|
| 630 | 630 | t1 = m_input_override[offset]; // strobe 0-7 data 0-4 |
| 631 | 631 | t2 = m_input_override[offset+idx]; // strobe 8-B data 0-4 |
| 632 | 632 | |
| 633 | t1 = (m_sc2_Inputs[offset] & t1) | ( ( i | |
| 633 | t1 = (m_sc2_Inputs[offset] & t1) | ( ( iop | |
| 634 | 634 | if (idx == 8) |
| 635 | t2 = (m_sc2_Inputs[offset+8] & t2) | ( ( i | |
| 635 | t2 = (m_sc2_Inputs[offset+8] & t2) | ( ( iop | |
| 636 | 636 | else |
| 637 | t2 = (m_sc2_Inputs[offset+4] & t2) | ( ( ( i | |
| 637 | t2 = (m_sc2_Inputs[offset+4] & t2) | ( ( ( iop | |
| 638 | 638 | |
| 639 | 639 | m_sc2_Inputs[offset] = (m_sc2_Inputs[offset] & ~0x1F) | t1; |
| 640 | 640 | m_sc2_Inputs[offset+idx] = (m_sc2_Inputs[offset+idx] & ~0x60) | t2; |
| r15082 | r15083 | |
| 857 | 857 | |
| 858 | 858 | READ8_MEMBER(bfm_sc2_state::coin_input_r) |
| 859 | 859 | { |
| 860 | return i | |
| 860 | return iop | |
| 861 | 861 | } |
| 862 | 862 | |
| 863 | 863 | /////////////////////////////////////////////////////////////////////////// |
| r15082 | r15083 | |
| 1696 | 1696 | |
| 1697 | 1697 | PORT_MODIFY("STROBE11") |
| 1698 | 1698 | PORT_DIPNAME( 0x01, 0x00, "Credits required:" )PORT_DIPLOCATION("DIL:!12") |
| 1699 | PORT_DIPSETTING( 0x00, "4 credits per game")PORT_CONDITION("STROBE10",0x10,PORTCOND_EQUALS,0x00) | |
| 1700 | PORT_DIPSETTING( 0x01, "2 credits per game")PORT_CONDITION("STROBE10",0x10,PORTCOND_EQUALS,0x00) | |
| 1701 | PORT_DIPSETTING( 0x00, "1 credit per round")PORT_CONDITION("STROBE10",0x10,PORTCOND_EQUALS,0x10) | |
| 1702 | PORT_DIPSETTING( 0x01, "4 credits per round")PORT_CONDITION("STROBE10",0x10,PORTCOND_EQUALS,0x10) | |
| 1699 | PORT_DIPSETTING( 0x00, "4 credits per game")PORT_CONDITION("STROBE10",0x10,EQUALS,0x00) | |
| 1700 | PORT_DIPSETTING( 0x01, "2 credits per game")PORT_CONDITION("STROBE10",0x10,EQUALS,0x00) | |
| 1701 | PORT_DIPSETTING( 0x00, "1 credit per round")PORT_CONDITION("STROBE10",0x10,EQUALS,0x10) | |
| 1702 | PORT_DIPSETTING( 0x01, "4 credits per round")PORT_CONDITION("STROBE10",0x10,EQUALS,0x10) | |
| 1703 | 1703 | PORT_DIPNAME( 0x02, 0x00, "Attract Mode" )PORT_DIPLOCATION("DIL:!13") |
| 1704 | 1704 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1705 | 1705 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 515 | 515 | READ32_MEMBER(tmmjprd_state::tmmjprd_mux_r) |
| 516 | 516 | { |
| 517 | 517 | |
| 518 | m_system_in = i | |
| 518 | m_system_in = iop | |
| 519 | 519 | |
| 520 | 520 | switch(m_mux_data) |
| 521 | 521 | { |
| 522 | case 0x01: return (m_system_in & 0xff) | (input_port_read(machine(), "PL1_1")<<8) | (input_port_read(machine(), "PL2_1")<<16) | 0xff000000; | |
| 523 | case 0x02: return (m_system_in & 0xff) | (input_port_read(machine(), "PL1_2")<<8) | (input_port_read(machine(), "PL2_2")<<16) | 0xff000000; | |
| 524 | case 0x04: return (m_system_in & 0xff) | (input_port_read(machine(), "PL1_3")<<8) | (input_port_read(machine(), "PL2_3")<<16) | 0xff000000; | |
| 525 | case 0x08: return (m_system_in & 0xff) | (input_port_read(machine(), "PL1_4")<<8) | (input_port_read(machine(), "PL2_4")<<16) | 0xff000000; | |
| 526 | case 0x10: return (m_system_in & 0xff) | (input_port_read(machine(), "PL1_5")<<8) | (input_port_read(machine(), "PL2_5")<<16) | 0xff000000; | |
| 522 | case 0x01: return (m_system_in & 0xff) | (ioport("PL1_1")->read()<<8) | (ioport("PL2_1")->read()<<16) | 0xff000000; | |
| 523 | case 0x02: return (m_system_in & 0xff) | (ioport("PL1_2")->read()<<8) | (ioport("PL2_2")->read()<<16) | 0xff000000; | |
| 524 | case 0x04: return (m_system_in & 0xff) | (ioport("PL1_3")->read()<<8) | (ioport("PL2_3")->read()<<16) | 0xff000000; | |
| 525 | case 0x08: return (m_system_in & 0xff) | (ioport("PL1_4")->read()<<8) | (ioport("PL2_4")->read()<<16) | 0xff000000; | |
| 526 | case 0x10: return (m_system_in & 0xff) | (ioport("PL1_5")->read()<<8) | (ioport("PL2_5")->read()<<16) | 0xff000000; | |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | return (m_system_in & 0xff) | 0xffffff00; |
| r15082 | r15083 | |
|---|---|---|
| 458 | 458 | CUSTOM_INPUT_MEMBER(skns_state::paddle_r) |
| 459 | 459 | { |
| 460 | 460 | const char *tag = (const char *)param; |
| 461 | return i | |
| 461 | return iop | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */ |
| r15082 | r15083 | |
|---|---|---|
| 345 | 345 | switch(offset) |
| 346 | 346 | { |
| 347 | 347 | case 0x02: return m_reg_a002; |
| 348 | case 0x04: return input_port_read(machine(), "A004"); | |
| 349 | case 0x05: return input_port_read(machine(), "A005"); | |
| 350 | case 0x0c: return input_port_read(machine(), "SERVICE"); // stats / reset | |
| 351 | case 0x0e: return input_port_read(machine(), "A00E"); // coin/reset | |
| 348 | case 0x04: return ioport("A004")->read(); | |
| 349 | case 0x05: return ioport("A005")->read(); | |
| 350 | case 0x0c: return ioport("SERVICE")->read(); // stats / reset | |
| 351 | case 0x0e: return ioport("A00E")->read(); // coin/reset | |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | if(offset == 0x00) //muxed with A002? |
| r15082 | r15083 | |
| 356 | 356 | switch(m_reg_a002 & 0x3f) |
| 357 | 357 | { |
| 358 | 358 | case 0x3b: |
| 359 | return i | |
| 359 | return iop | |
| 360 | 360 | case 0x3e: |
| 361 | return i | |
| 361 | return iop | |
| 362 | 362 | case 0x3d: |
| 363 | return i | |
| 363 | return iop | |
| 364 | 364 | default: |
| 365 | 365 | logerror("A000 read with mux=0x%02x\n", m_reg_a002 & 0x3f); |
| 366 | 366 | } |
| r15082 | r15083 | |
|---|---|---|
| 282 | 282 | switch (m_mcu_port6 & 0xf0) |
| 283 | 283 | { |
| 284 | 284 | case 0x00: |
| 285 | return i | |
| 285 | return iop | |
| 286 | 286 | |
| 287 | 287 | case 0x20: |
| 288 | return i | |
| 288 | return iop | |
| 289 | 289 | |
| 290 | 290 | case 0x40: |
| 291 | return i | |
| 291 | return iop | |
| 292 | 292 | |
| 293 | 293 | case 0x60: |
| 294 | return i | |
| 294 | return iop | |
| 295 | 295 | |
| 296 | 296 | default: |
| 297 | 297 | break; |
| r15082 | r15083 | |
| 302 | 302 | |
| 303 | 303 | READ8_MEMBER(namcofl_state::dac7_r) |
| 304 | 304 | { |
| 305 | return i | |
| 305 | return iop | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | READ8_MEMBER(namcofl_state::dac6_r) |
| 309 | 309 | { |
| 310 | return i | |
| 310 | return iop | |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | READ8_MEMBER(namcofl_state::dac5_r) |
| 314 | 314 | { |
| 315 | return i | |
| 315 | return iop | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | READ8_MEMBER(namcofl_state::dac4_r){ return 0xff; } |
| r15082 | r15083 | |
|---|---|---|
| 235 | 235 | int res = 0x3f; |
| 236 | 236 | |
| 237 | 237 | /* the game reads all rows at once (keyb = 0) to check if a key is pressed */ |
| 238 | if (!BIT(m_keyb, 0)) res &= input_port_read(machine(), "KEY0"); | |
| 239 | if (!BIT(m_keyb, 1)) res &= input_port_read(machine(), "KEY1"); | |
| 240 | if (!BIT(m_keyb, 2)) res &= input_port_read(machine(), "KEY2"); | |
| 241 | if (!BIT(m_keyb, 3)) res &= input_port_read(machine(), "KEY3"); | |
| 242 | if (!BIT(m_keyb, 4)) res &= input_port_read(machine(), "KEY4"); | |
| 238 | if (!BIT(m_keyb, 0)) res &= ioport("KEY0")->read(); | |
| 239 | if (!BIT(m_keyb, 1)) res &= ioport("KEY1")->read(); | |
| 240 | if (!BIT(m_keyb, 2)) res &= ioport("KEY2")->read(); | |
| 241 | if (!BIT(m_keyb, 3)) res &= ioport("KEY3")->read(); | |
| 242 | if (!BIT(m_keyb, 4)) res &= ioport("KEY4")->read(); | |
| 243 | 243 | |
| 244 | 244 | return res; |
| 245 | 245 | } |
| r15082 | r15083 | |
| 249 | 249 | int res = 0x3f; |
| 250 | 250 | |
| 251 | 251 | /* the game reads all rows at once (keyb = 0) to check if a key is pressed */ |
| 252 | if (!BIT(m_keyb, 0)) res &= input_port_read(machine(), "KEY5"); | |
| 253 | if (!BIT(m_keyb, 1)) res &= input_port_read(machine(), "KEY6"); | |
| 254 | if (!BIT(m_keyb, 2)) res &= input_port_read(machine(), "KEY7"); | |
| 255 | if (!BIT(m_keyb, 3)) res &= input_port_read(machine(), "KEY8"); | |
| 256 | if (!BIT(m_keyb, 4)) res &= input_port_read(machine(), "KEY9"); | |
| 252 | if (!BIT(m_keyb, 0)) res &= ioport("KEY5")->read(); | |
| 253 | if (!BIT(m_keyb, 1)) res &= ioport("KEY6")->read(); | |
| 254 | if (!BIT(m_keyb, 2)) res &= ioport("KEY7")->read(); | |
| 255 | if (!BIT(m_keyb, 3)) res &= ioport("KEY8")->read(); | |
| 256 | if (!BIT(m_keyb, 4)) res &= ioport("KEY9")->read(); | |
| 257 | 257 | |
| 258 | 258 | return res; |
| 259 | 259 | } |
| r15082 | r15083 | |
| 621 | 621 | |
| 622 | 622 | READ8_MEMBER(dynax_state::hjingi_keyboard_1_r) |
| 623 | 623 | { |
| 624 | return hanamai_keyboard_1_r(space, 0) | i | |
| 624 | return hanamai_keyboard_1_r(space, 0) | iop | |
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | static ADDRESS_MAP_START( hjingi_mem_map, AS_PROGRAM, 8, dynax_state ) |
| r15082 | r15083 | |
| 715 | 715 | switch (m_input_sel) |
| 716 | 716 | { |
| 717 | 717 | case 0x00: |
| 718 | return i | |
| 718 | return iop | |
| 719 | 719 | |
| 720 | 720 | case 0x02: |
| 721 | 721 | return 0xff; // bit 7 must be 1. Bit 2? |
| r15082 | r15083 | |
| 732 | 732 | // player 2 |
| 733 | 733 | case 0x01: //quiztvqq |
| 734 | 734 | case 0x81: |
| 735 | return i | |
| 735 | return iop | |
| 736 | 736 | |
| 737 | 737 | // player 1 |
| 738 | 738 | case 0x02: //quiztvqq |
| 739 | 739 | case 0x82: |
| 740 | return i | |
| 740 | return iop | |
| 741 | 741 | |
| 742 | 742 | default: |
| 743 | 743 | return 0xff; |
| r15082 | r15083 | |
| 1050 | 1050 | |
| 1051 | 1051 | READ8_MEMBER(dynax_state::mjelctrn_keyboard_1_r) |
| 1052 | 1052 | { |
| 1053 | return (hanamai_keyboard_1_r(space, 0) & 0x3f) | (i | |
| 1053 | return (hanamai_keyboard_1_r(space, 0) & 0x3f) | (iop | |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | 1056 | READ8_MEMBER(dynax_state::mjelctrn_dsw_r) |
| r15082 | r15083 | |
| 1058 | 1058 | int dsw = (m_keyb & 0xc0) >> 6; |
| 1059 | 1059 | static const char *const dswnames[] = { "DSW0", "DSW1", "DSW3", "DSW4" }; |
| 1060 | 1060 | |
| 1061 | return i | |
| 1061 | return iop | |
| 1062 | 1062 | } |
| 1063 | 1063 | |
| 1064 | 1064 | WRITE8_MEMBER(dynax_state::mjelctrn_blitter_ack_w) |
| r15082 | r15083 | |
| 1124 | 1124 | static READ8_DEVICE_HANDLER( htengoku_dsw_r ) |
| 1125 | 1125 | { |
| 1126 | 1126 | dynax_state *state = device->machine().driver_data<dynax_state>(); |
| 1127 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(device->machine(), "DSW0"); | |
| 1128 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(device->machine(), "DSW1"); | |
| 1129 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(device->machine(), "DSW2"); | |
| 1130 | if (!BIT(state->m_dsw_sel, 3)) return input_port_read(device->machine(), "DSW3"); | |
| 1131 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(device->machine(), "DSW4"); | |
| 1127 | if (!BIT(state->m_dsw_sel, 0)) return state->ioport("DSW0")->read(); | |
| 1128 | if (!BIT(state->m_dsw_sel, 1)) return state->ioport("DSW1")->read(); | |
| 1129 | if (!BIT(state->m_dsw_sel, 2)) return state->ioport("DSW2")->read(); | |
| 1130 | if (!BIT(state->m_dsw_sel, 3)) return state->ioport("DSW3")->read(); | |
| 1131 | if (!BIT(state->m_dsw_sel, 4)) return state->ioport("DSW4")->read(); | |
| 1132 | 1132 | logerror("%s: warning, unknown bits read, dsw_sel = %02x\n", device->machine().describe_context(), state->m_dsw_sel); |
| 1133 | 1133 | |
| 1134 | 1134 | return 0xff; |
| r15082 | r15083 | |
| 1165 | 1165 | |
| 1166 | 1166 | switch (m_input_sel) |
| 1167 | 1167 | { |
| 1168 | case 0x81: return input_port_read(machine(), keynames1[m_keyb++]); | |
| 1169 | case 0x82: return input_port_read(machine(), keynames0[m_keyb++]); | |
| 1168 | case 0x81: return ioport(keynames1[m_keyb++])->read(); | |
| 1169 | case 0x82: return ioport(keynames0[m_keyb++])->read(); | |
| 1170 | 1170 | case 0x0d: return 0xff; // unused |
| 1171 | 1171 | } |
| 1172 | 1172 | logerror("%04x: input_r with select = %02x\n", cpu_get_pc(&space.device()), m_input_sel); |
| r15082 | r15083 | |
| 1178 | 1178 | |
| 1179 | 1179 | switch (m_input_sel) |
| 1180 | 1180 | { |
| 1181 | case 0x00: return i | |
| 1181 | case 0x00: return iop | |
| 1182 | 1182 | case 0x01: return 0xff; //? |
| 1183 | 1183 | case 0x02: return 0xbf | ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : (1 << 6)); // bit 7 = blitter busy, bit 6 = hopper |
| 1184 | 1184 | case 0x03: return m_coins; |
| r15082 | r15083 | |
| 1290 | 1290 | switch (m_input_sel) |
| 1291 | 1291 | { |
| 1292 | 1292 | case 0x00: |
| 1293 | return i | |
| 1293 | return iop | |
| 1294 | 1294 | |
| 1295 | 1295 | default: |
| 1296 | 1296 | logerror("%04x: unmapped ip_sel=%02x read from offs %x\n", cpu_get_pc(&space.device()), m_input_sel, offset); |
| r15082 | r15083 | |
| 1309 | 1309 | case 0x81: |
| 1310 | 1310 | if (m_keyb >= 5) |
| 1311 | 1311 | logerror("%04x: unmapped keyb=%02x read\n", cpu_get_pc(&space.device()), m_keyb); |
| 1312 | return 0xff;//i | |
| 1312 | return 0xff;//iop | |
| 1313 | 1313 | |
| 1314 | 1314 | // player 1 |
| 1315 | 1315 | case 0x82: |
| 1316 | 1316 | if (m_keyb >= 5) |
| 1317 | 1317 | logerror("%04x: unmapped keyb=%02x read\n", cpu_get_pc(&space.device()), m_keyb); |
| 1318 | return i | |
| 1318 | return iop | |
| 1319 | 1319 | |
| 1320 | 1320 | default: |
| 1321 | 1321 | logerror("%04x: unmapped ip_sel=%02x read from offs %x\n", cpu_get_pc(&space.device()), m_input_sel, offset); |
| r15082 | r15083 | |
| 1337 | 1337 | { |
| 1338 | 1338 | dynax_state *state = device->machine().driver_data<dynax_state>(); |
| 1339 | 1339 | |
| 1340 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(device->machine(), "DSW0"); | |
| 1341 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(device->machine(), "DSW1"); | |
| 1342 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(device->machine(), "DSW2"); | |
| 1343 | if (!BIT(state->m_dsw_sel, 3)) return input_port_read(device->machine(), "DSW3"); | |
| 1344 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(device->machine(), "DSW4"); | |
| 1340 | if (!BIT(state->m_dsw_sel, 0)) return state->ioport("DSW0")->read(); | |
| 1341 | if (!BIT(state->m_dsw_sel, 1)) return state->ioport("DSW1")->read(); | |
| 1342 | if (!BIT(state->m_dsw_sel, 2)) return state->ioport("DSW2")->read(); | |
| 1343 | if (!BIT(state->m_dsw_sel, 3)) return state->ioport("DSW3")->read(); | |
| 1344 | if (!BIT(state->m_dsw_sel, 4)) return state->ioport("DSW4")->read(); | |
| 1345 | 1345 | logerror("%s: unmapped dsw %02x read\n", device->machine().describe_context(), state->m_dsw_sel); |
| 1346 | 1346 | |
| 1347 | 1347 | return 0xff; |
| r15082 | r15083 | |
| 1533 | 1533 | { |
| 1534 | 1534 | int res = 0x3f; |
| 1535 | 1535 | |
| 1536 | if (!BIT(m_keyb, 0)) res &= input_port_read(machine(), "KEY0"); | |
| 1537 | if (!BIT(m_keyb, 1)) res &= input_port_read(machine(), "KEY1"); | |
| 1538 | if (!BIT(m_keyb, 2)) res &= input_port_read(machine(), "KEY2"); | |
| 1539 | if (!BIT(m_keyb, 3)) res &= input_port_read(machine(), "KEY3"); | |
| 1540 | if (!BIT(m_keyb, 4)) res &= input_port_read(machine(), "KEY4"); | |
| 1536 | if (!BIT(m_keyb, 0)) res &= ioport("KEY0")->read(); | |
| 1537 | if (!BIT(m_keyb, 1)) res &= ioport("KEY1")->read(); | |
| 1538 | if (!BIT(m_keyb, 2)) res &= ioport("KEY2")->read(); | |
| 1539 | if (!BIT(m_keyb, 3)) res &= ioport("KEY3")->read(); | |
| 1540 | if (!BIT(m_keyb, 4)) res &= ioport("KEY4")->read(); | |
| 1541 | 1541 | |
| 1542 | 1542 | return res; |
| 1543 | 1543 | } |
| r15082 | r15083 | |
| 1545 | 1545 | { |
| 1546 | 1546 | int res = 0x3f; |
| 1547 | 1547 | |
| 1548 | if (!BIT(m_keyb, 0)) res &= input_port_read(machine(), "KEY5"); | |
| 1549 | if (!BIT(m_keyb, 1)) res &= input_port_read(machine(), "KEY6"); | |
| 1550 | if (!BIT(m_keyb, 2)) res &= input_port_read(machine(), "KEY7"); | |
| 1551 | if (!BIT(m_keyb, 3)) res &= input_port_read(machine(), "KEY8"); | |
| 1552 | if (!BIT(m_keyb, 4)) res &= input_port_read(machine(), "KEY9"); | |
| 1548 | if (!BIT(m_keyb, 0)) res &= ioport("KEY5")->read(); | |
| 1549 | if (!BIT(m_keyb, 1)) res &= ioport("KEY6")->read(); | |
| 1550 | if (!BIT(m_keyb, 2)) res &= ioport("KEY7")->read(); | |
| 1551 | if (!BIT(m_keyb, 3)) res &= ioport("KEY8")->read(); | |
| 1552 | if (!BIT(m_keyb, 4)) res &= ioport("KEY9")->read(); | |
| 1553 | 1553 | |
| 1554 | 1554 | // bit 6 |
| 1555 | res |= i | |
| 1555 | res |= iop | |
| 1556 | 1556 | |
| 1557 | 1557 | // bit 7 = blitter busy |
| 1558 | 1558 | |
| r15082 | r15083 | |
| 1586 | 1586 | |
| 1587 | 1587 | switch (offset + 0x8000) |
| 1588 | 1588 | { |
| 1589 | case 0x8061: return i | |
| 1589 | case 0x8061: return iop | |
| 1590 | 1590 | case 0x8062: return gekisha_keyboard_1_r(space, 0); |
| 1591 | 1591 | case 0x8063: return gekisha_keyboard_0_r(space, 0); |
| 1592 | case 0x8064: return input_port_read(machine(), "DSW1"); | |
| 1593 | case 0x8065: return input_port_read(machine(), "DSW3"); | |
| 1594 | case 0x8066: return input_port_read(machine(), "DSW4"); | |
| 1595 | case 0x8067: return input_port_read(machine(), "DSW2"); | |
| 1592 | case 0x8064: return ioport("DSW1")->read(); | |
| 1593 | case 0x8065: return ioport("DSW3")->read(); | |
| 1594 | case 0x8066: return ioport("DSW4")->read(); | |
| 1595 | case 0x8067: return ioport("DSW2")->read(); | |
| 1596 | 1596 | } |
| 1597 | 1597 | |
| 1598 | 1598 | logerror("%04x: unmapped offset %04X read with rombank=%02X\n",cpu_get_pc(&space.device()), offset, m_rombank); |
| r15082 | r15083 | |
| 4630 | 4630 | static MACHINE_START( jantouki ) |
| 4631 | 4631 | { |
| 4632 | 4632 | dynax_state *state = machine.driver_data<dynax_state>(); |
| 4633 | UINT8 *MAIN = | |
| 4633 | UINT8 *MAIN = sta | |
| 4634 | 4634 | UINT8 *SOUND = state->memregion("soundcpu")->base(); |
| 4635 | 4635 | |
| 4636 | 4636 | state->membank("bank1")->configure_entries(0, 0x10, &MAIN[0x8000], 0x8000); |
| r15082 | r15083 | |
|---|---|---|
| 721 | 721 | |
| 722 | 722 | READ8_MEMBER(sigmab98_state::sammymdl_coin_hopper_r) |
| 723 | 723 | { |
| 724 | UINT8 ret = i | |
| 724 | UINT8 ret = iop | |
| 725 | 725 | |
| 726 | 726 | // if ( !machine().device<ticket_dispenser_device>("hopper")->read(0) ) |
| 727 | 727 | // ret &= ~0x01; |
| r15082 | r15083 | |
| 1499 | 1499 | |
| 1500 | 1500 | PORT_START("EEPROM") |
| 1501 | 1501 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // protection? checks. Must be 0 |
| 1502 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1502 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // protection? checks. Must be 0 | |
| 1503 | 1503 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1504 | 1504 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1505 | 1505 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1537 | 1537 | |
| 1538 | 1538 | PORT_START("EEPROM") |
| 1539 | 1539 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // protection? checks. Must be 0 |
| 1540 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1540 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // protection? checks. Must be 0 | |
| 1541 | 1541 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1542 | 1542 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1543 | 1543 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1575 | 1575 | |
| 1576 | 1576 | PORT_START("EEPROM") |
| 1577 | 1577 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // protection? checks. Must be 0 |
| 1578 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1578 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // protection? checks. Must be 0 | |
| 1579 | 1579 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1580 | 1580 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1581 | 1581 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 171 | 171 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 172 | 172 | PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) |
| 173 | 173 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) /* this is set when either coin is inserted */ |
| 174 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 174 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 175 | 175 | INPUT_PORTS_END |
| 176 | 176 | |
| 177 | 177 | static INPUT_PORTS_START( shootouj ) |
| r15082 | r15083 | |
|---|---|---|
| 68 | 68 | |
| 69 | 69 | /* low value in the given bit selects */ |
| 70 | 70 | if (!(state->m_input_mux & 0x01)) |
| 71 | return | |
| 71 | return s | |
| 72 | 72 | else if (!(state->m_input_mux & 0x02)) |
| 73 | return | |
| 73 | return s | |
| 74 | 74 | else if (!(state->m_input_mux & 0x04)) |
| 75 | return | |
| 75 | return s | |
| 76 | 76 | return 0xff; |
| 77 | 77 | } |
| 78 | 78 |
| r15082 | r15083 | |
|---|---|---|
| 474 | 474 | |
| 475 | 475 | READ16_MEMBER(itech32_state::trackball_r) |
| 476 | 476 | { |
| 477 | int lower = input_port_read(machine(), "TRACKX1"); | |
| 478 | int upper = input_port_read(machine(), "TRACKY1"); | |
| 477 | int lower = ioport("TRACKX1")->read(); | |
| 478 | int upper = ioport("TRACKY1")->read(); | |
| 479 | 479 | |
| 480 | 480 | return (lower & 15) | ((upper & 15) << 4); |
| 481 | 481 | } |
| r15082 | r15083 | |
| 483 | 483 | |
| 484 | 484 | READ32_MEMBER(itech32_state::trackball32_8bit_r) |
| 485 | 485 | { |
| 486 | int lower = input_port_read(machine(), "TRACKX1"); | |
| 487 | int upper = input_port_read(machine(), "TRACKY1"); | |
| 486 | int lower = ioport("TRACKX1")->read(); | |
| 487 | int upper = ioport("TRACKY1")->read(); | |
| 488 | 488 | |
| 489 | 489 | return (lower & 255) | ((upper & 255) << 8); |
| 490 | 490 | } |
| r15082 | r15083 | |
| 499 | 499 | int upper, lower; |
| 500 | 500 | int dx, dy; |
| 501 | 501 | |
| 502 | int curx = input_port_read(machine(), "TRACKX1"); | |
| 503 | int cury = input_port_read(machine(), "TRACKY1"); | |
| 502 | int curx = ioport("TRACKX1")->read(); | |
| 503 | int cury = ioport("TRACKY1")->read(); | |
| 504 | 504 | |
| 505 | 505 | dx = curx - m_p1_effx; |
| 506 | 506 | if (dx < -0x80) dx += 0x100; |
| r15082 | r15083 | |
| 535 | 535 | int upper, lower; |
| 536 | 536 | int dx, dy; |
| 537 | 537 | |
| 538 | int curx = input_port_read(machine(), "TRACKX2"); | |
| 539 | int cury = input_port_read(machine(), "TRACKY2"); | |
| 538 | int curx = ioport("TRACKX2")->read(); | |
| 539 | int cury = ioport("TRACKY2")->read(); | |
| 540 | 540 | |
| 541 | 541 | dx = curx - m_p2_effx; |
| 542 | 542 | if (dx < -0x80) dx += 0x100; |
| r15082 | r15083 | |
| 571 | 571 | |
| 572 | 572 | READ32_MEMBER(itech32_state::drivedge_steering_r) |
| 573 | 573 | { |
| 574 | int val = i | |
| 574 | int val = iop | |
| 575 | 575 | if (val < 0) val = 0x100 | (-val); |
| 576 | 576 | return val << 16; |
| 577 | 577 | } |
| r15082 | r15083 | |
| 579 | 579 | |
| 580 | 580 | READ32_MEMBER(itech32_state::drivedge_gas_r) |
| 581 | 581 | { |
| 582 | int val = i | |
| 582 | int val = iop | |
| 583 | 583 | return val << 16; |
| 584 | 584 | } |
| 585 | 585 | |
| r15082 | r15083 | |
| 1115 | 1115 | PORT_START("DIPS") /* 58000 */ |
| 1116 | 1116 | PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW ) |
| 1117 | 1117 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1118 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1118 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1119 | 1119 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) |
| 1120 | 1120 | PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:1") |
| 1121 | 1121 | PORT_DIPSETTING( 0x0000, "-" ) |
| r15082 | r15083 | |
| 1160 | 1160 | PORT_START("DIPS") /* 280000 */ |
| 1161 | 1161 | PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW ) |
| 1162 | 1162 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1163 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1163 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1164 | 1164 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) |
| 1165 | 1165 | PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:4") |
| 1166 | 1166 | PORT_DIPSETTING( 0x0000, "-" ) |
| r15082 | r15083 | |
| 1278 | 1278 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1279 | 1279 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1280 | 1280 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 1281 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1281 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1282 | 1282 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_SPECIAL ) |
| 1283 | 1283 | PORT_DIPNAME( 0x70000000, 0x00000000, "Network Number" ) PORT_DIPLOCATION("SW1:4,3,2") |
| 1284 | 1284 | PORT_DIPSETTING( 0x00000000, "1" ) |
| r15082 | r15083 | |
| 1363 | 1363 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1364 | 1364 | PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_LOW ) |
| 1365 | 1365 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1366 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1366 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1367 | 1367 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) |
| 1368 | 1368 | PORT_DIPNAME( 0x00100000, 0x00000000, "Video Sync" ) PORT_DIPLOCATION("SW1:4") |
| 1369 | 1369 | PORT_DIPSETTING( 0x00000000, "-" ) |
| r15082 | r15083 | |
|---|---|---|
| 452 | 452 | |
| 453 | 453 | /*TODO: check the PCB and see how the halt / reset lines are connected. */ |
| 454 | 454 | if (machine.device("sub") != NULL) |
| 455 | cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, (i | |
| 455 | cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, (state->iop | |
| 456 | 456 | |
| 457 | 457 | state->m_port_a_in = 0; |
| 458 | 458 | state->m_port_a_out = 0; |
| r15082 | r15083 | |
|---|---|---|
| 493 | 493 | |
| 494 | 494 | READ16_MEMBER(calchase_state::calchase_iocard1_r) |
| 495 | 495 | { |
| 496 | return i | |
| 496 | return iop | |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | READ16_MEMBER(calchase_state::calchase_iocard2_r) |
| 500 | 500 | { |
| 501 | return i | |
| 501 | return iop | |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | READ16_MEMBER(calchase_state::calchase_iocard3_r) |
| 505 | 505 | { |
| 506 | return i | |
| 506 | return iop | |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | /* These two controls wheel pot or whatever this game uses ... */ |
| 510 | 510 | READ16_MEMBER(calchase_state::calchase_iocard4_r) |
| 511 | 511 | { |
| 512 | return i | |
| 512 | return iop | |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | READ16_MEMBER(calchase_state::calchase_iocard5_r) |
| 516 | 516 | { |
| 517 | return i | |
| 517 | return iop | |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | |
| r15082 | r15083 | |
| 677 | 677 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) // returns back to MS-DOS (likely to be unmapped and actually used as a lame protection check) |
| 678 | 678 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 679 | 679 | PORT_START("IOCARD3") |
| 680 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_VBLANK | |
| 680 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 681 | 681 | PORT_BIT( 0xdfff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 682 | 682 | |
| 683 | 683 | PORT_START("IOCARD4") |
| r15082 | r15083 | |
|---|---|---|
| 262 | 262 | { |
| 263 | 263 | case 0x00: |
| 264 | 264 | { |
| 265 | return i | |
| 265 | return iop | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | case 0x01: |
| 269 | 269 | { |
| 270 | return i | |
| 270 | return iop | |
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| r15082 | r15083 | |
| 376 | 376 | |
| 377 | 377 | case 0x00: /* P1 */ |
| 378 | 378 | { |
| 379 | x = input_port_read(machine(), "GUNX1") << 6; | |
| 380 | y = input_port_read(machine(), "GUNY1") << 6; | |
| 379 | x = ioport("GUNX1")->read() << 6; | |
| 380 | y = ioport("GUNY1")->read() << 6; | |
| 381 | 381 | |
| 382 | 382 | return ((x << 24) &0xff000000) | ((x << 8) &0xff0000) |
| 383 | 383 | | ((y << 8) &0xff00) | ((y >> 8) &0xff) ; |
| r15082 | r15083 | |
| 385 | 385 | |
| 386 | 386 | case 0x01: /* P2 */ |
| 387 | 387 | { |
| 388 | x = input_port_read(machine(), "GUNX2") << 6; | |
| 389 | y = input_port_read(machine(), "GUNY2") << 6; | |
| 388 | x = ioport("GUNX2")->read() << 6; | |
| 389 | y = ioport("GUNY2")->read() << 6; | |
| 390 | 390 | |
| 391 | 391 | return ((x << 24) &0xff000000) | ((x << 8) &0xff0000) |
| 392 | 392 | | ((y << 8) &0xff00) | ((y >> 8) &0xff) ; |
| r15082 | r15083 | |
| 457 | 457 | |
| 458 | 458 | READ32_MEMBER(undrfire_state::cbombers_adc_r) |
| 459 | 459 | { |
| 460 | return (i | |
| 460 | return (iop | |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | WRITE32_MEMBER(undrfire_state::cbombers_adc_w) |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | static MACHINE_RESET( grchamp ) |
| 80 | 80 | { |
| 81 | 81 | /* if the coin system is 1 way, lock Coin B (Page 40) */ |
| 82 | coin_lockout_w(machine, 1, (in | |
| 82 | coin_lockout_w(machine, 1, (machine.root_device().ioport | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 |
| r15082 | r15083 | |
|---|---|---|
| 346 | 346 | case 2: |
| 347 | 347 | case 3: |
| 348 | 348 | { |
| 349 | data = ( | |
| 349 | data = ( | |
| 350 | 350 | break; |
| 351 | 351 | } |
| 352 | 352 | case 4://DIL1 |
| 353 | 353 | case 6://DIL2 |
| 354 | 354 | { |
| 355 | swizzle = ( | |
| 355 | swizzle = ( | |
| 356 | 356 | data = (((swizzle & 0x01) << 7) + ((swizzle & 0x02) << 5) + ((swizzle & 0x04) << 3) |
| 357 | 357 | + ((swizzle & 0x08) << 1) +((swizzle & 0x10) >> 1) + ((swizzle & 0x20) >> 3)); |
| 358 | 358 | break; |
| r15082 | r15083 | |
| 360 | 360 | case 5://DIL1 |
| 361 | 361 | case 7://DIL2 |
| 362 | 362 | { |
| 363 | swizzle = ( | |
| 363 | swizzle = ( | |
| 364 | 364 | data = (((swizzle & 0x80) >> 1) + ((swizzle & 0x40) << 1)); |
| 365 | 365 | break; |
| 366 | 366 | } |
| r15082 | r15083 | |
| 600 | 600 | static READ8_DEVICE_HANDLER( pia_ic6_porta_r ) |
| 601 | 601 | { |
| 602 | 602 | mpu3_state *state = device->machine().driver_data<mpu3_state>(); |
| 603 | return ( | |
| 603 | return (s | |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | |
| 607 | 607 | static READ8_DEVICE_HANDLER( pia_ic6_portb_r ) |
| 608 | 608 | { |
| 609 | 609 | mpu3_state *state = device->machine().driver_data<mpu3_state>(); |
| 610 | return ( | |
| 610 | return (s | |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | static WRITE8_DEVICE_HANDLER( pia_ic6_porta_w ) |
| r15082 | r15083 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | switch(m_mux_data) |
| 90 | 90 | { |
| 91 | case 1: ret = input_port_read(machine(), "KEY0"); break; | |
| 92 | case 2: ret = input_port_read(machine(), "KEY1"); break; | |
| 93 | case 4: ret = input_port_read(machine(), "KEY2"); break; | |
| 94 | case 8: ret = input_port_read(machine(), "KEY3"); break; | |
| 95 | case 0x10: ret = input_port_read(machine(), "KEY4"); break; | |
| 91 | case 1: ret = ioport("KEY0")->read(); break; | |
| 92 | case 2: ret = ioport("KEY1")->read(); break; | |
| 93 | case 4: ret = ioport("KEY2")->read(); break; | |
| 94 | case 8: ret = ioport("KEY3")->read(); break; | |
| 95 | case 0x10: ret = ioport("KEY4")->read(); break; | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return ret; |
| r15082 | r15083 | |
|---|---|---|
| 199 | 199 | switch( offset ) |
| 200 | 200 | { |
| 201 | 201 | case 0: |
| 202 | return ( | |
| 202 | return ( | |
| 203 | 203 | case 1: |
| 204 | return ( | |
| 204 | return ( | |
| 205 | 205 | case 2: |
| 206 | 206 | { |
| 207 | UINT32 val = | |
| 207 | UINT32 val = | |
| 208 | 208 | |
| 209 | 209 | switch( dip_read_offset >> 8 & 0xff ) |
| 210 | 210 | { |
| r15082 | r15083 | |
|---|---|---|
| 634 | 634 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) |
| 635 | 635 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 636 | 636 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) |
| 637 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 638 | PORT_DIPSETTING( 0x00, "No Coin A" ) PORT_CONDITION("DSW1", 0xf0, PORTCOND_NOTEQUALS, 0x00) | |
| 637 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1", 0xf0, EQUALS, 0x00) | |
| 638 | PORT_DIPSETTING( 0x00, "No Coin A" ) PORT_CONDITION("DSW1", 0xf0, NOTEQUALS, 0x00) | |
| 639 | 639 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") |
| 640 | 640 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) |
| 641 | 641 | PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
| 652 | 652 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) |
| 653 | 653 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) |
| 654 | 654 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |
| 655 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 656 | PORT_DIPSETTING( 0x00, "No Coin B" ) PORT_CONDITION("DSW1", 0x0f, PORTCOND_NOTEQUALS, 0x00) | |
| 655 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1", 0x0f, EQUALS, 0x00) | |
| 656 | PORT_DIPSETTING( 0x00, "No Coin B" ) PORT_CONDITION("DSW1", 0x0f, NOTEQUALS, 0x00) | |
| 657 | 657 | /* No Coin X = coin slot X open (coins produce sound), but no effect on coin counter */ |
| 658 | 658 | |
| 659 | 659 | PORT_START("DSW2") |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | CUSTOM_INPUT_MEMBER(astrof_state::astrof_p1_controls_r) |
| 122 | 122 | { |
| 123 | return i | |
| 123 | return iop | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
| r15082 | r15083 | |
| 131 | 131 | /* on an upright cabinet, a single set of controls |
| 132 | 132 | is connected to both sets of pins on the edge |
| 133 | 133 | connector */ |
| 134 | if (input_port_read(machine(), "CAB")) | |
| 135 | ret = input_port_read(machine(), "P2"); | |
| 134 | if (ioport("CAB")->read()) | |
| 135 | ret = ioport("P2")->read(); | |
| 136 | 136 | else |
| 137 | ret = i | |
| 137 | ret = iop | |
| 138 | 138 | |
| 139 | 139 | return ret; |
| 140 | 140 | } |
| r15082 | r15083 | |
| 149 | 149 | (not verified on pcb) */ |
| 150 | 150 | |
| 151 | 151 | if (m_flipscreen) |
| 152 | ret = i | |
| 152 | ret = iop | |
| 153 | 153 | else |
| 154 | ret = i | |
| 154 | ret = iop | |
| 155 | 155 | |
| 156 | 156 | return ret; |
| 157 | 157 | } |
| r15082 | r15083 | |
| 204 | 204 | astrof_state *state = machine.driver_data<astrof_state>(); |
| 205 | 205 | offs_t i; |
| 206 | 206 | UINT8 bank = (state->m_astrof_palette_bank ? 0x10 : 0x00); |
| 207 | UINT8 config = i | |
| 207 | UINT8 config = state->iop | |
| 208 | 208 | UINT8 *prom = state->memregion("proms")->base(); |
| 209 | 209 | |
| 210 | 210 | /* a common wire hack to the pcb causes the prom halves to be inverted */ |
| r15082 | r15083 | |
| 240 | 240 | { |
| 241 | 241 | offs_t i; |
| 242 | 242 | UINT8 *prom = machine.root_device().memregion("proms")->base(); |
| 243 | UINT8 config = in | |
| 243 | UINT8 config = machine.root_device().ioport("FAKE")->read_safe( | |
| 244 | 244 | |
| 245 | 245 | for (i = 0; i < TOMAHAWK_NUM_PENS; i++) |
| 246 | 246 | { |
| r15082 | r15083 | |
| 295 | 295 | WRITE8_MEMBER(astrof_state::video_control_1_w) |
| 296 | 296 | { |
| 297 | 297 | |
| 298 | m_flipscreen = ((data >> 0) & 0x01) & i | |
| 298 | m_flipscreen = ((data >> 0) & 0x01) & iop | |
| 299 | 299 | |
| 300 | 300 | /* this ties to the CLR pin of the shift registers */ |
| 301 | 301 | m_screen_off = (data & 0x02) ? TRUE : FALSE; |
| r15082 | r15083 | |
| 690 | 690 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW:7") |
| 691 | 691 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 692 | 692 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 693 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 693 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 694 | 694 | |
| 695 | 695 | PORT_START("CAB") |
| 696 | 696 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") |
| r15082 | r15083 | |
| 745 | 745 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW:7") |
| 746 | 746 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 747 | 747 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 748 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 748 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 749 | 749 | |
| 750 | 750 | PORT_START("CAB") |
| 751 | 751 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") |
| r15082 | r15083 | |
| 797 | 797 | PORT_DIPSETTING( 0x20, "2500" ) |
| 798 | 798 | PORT_DIPSETTING( 0x30, "3000" ) |
| 799 | 799 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "SW:7" ) |
| 800 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 800 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 801 | 801 | |
| 802 | 802 | PORT_START("CAB") |
| 803 | 803 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") |
| r15082 | r15083 | |
| 852 | 852 | PORT_DIPNAME( 0x40, 0x00, "Kill Saucer after Invaders" ) PORT_DIPLOCATION("SW:7") |
| 853 | 853 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 854 | 854 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) /* if saucer lands, game is over */ |
| 855 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 855 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 856 | 856 | |
| 857 | 857 | PORT_START("CAB") |
| 858 | 858 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") |
| r15082 | r15083 | |
| 911 | 911 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW:7") |
| 912 | 912 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 913 | 913 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 914 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 914 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 915 | 915 | |
| 916 | 916 | PORT_START("CAB") |
| 917 | 917 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | switch (bit_mask) |
| 175 | 175 | { |
| 176 | 176 | case 0x03: |
| 177 | return ((i | |
| 177 | return ((iop | |
| 178 | 178 | case 0x40: |
| 179 | return ((i | |
| 179 | return ((iop | |
| 180 | 180 | default: |
| 181 | 181 | logerror("wolfman_replay_hs_r : invalid %02X bit_mask\n",bit_mask); |
| 182 | 182 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 1428 | 1428 | |
| 1429 | 1429 | if (data < 8 || data > 15) |
| 1430 | 1430 | logerror("%08X:Unexpected analog port select = %08X\n", cpu_get_pc(&space->device()), data); |
| 1431 | state->m_pending_analog_read = | |
| 1431 | state->m_pending_analog_read = s | |
| 1432 | 1432 | } |
| 1433 | 1433 | |
| 1434 | 1434 |
| r15082 | r15083 | |
|---|---|---|
| 105 | 105 | /* the 8-bit dipswitches are split across addresses */ |
| 106 | 106 | READ8_MEMBER(tecmo_state::tecmo_dswa_l_r) |
| 107 | 107 | { |
| 108 | UINT8 port = i | |
| 108 | UINT8 port = iop | |
| 109 | 109 | port &= 0x0f; |
| 110 | 110 | return port; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | READ8_MEMBER(tecmo_state::tecmo_dswa_h_r) |
| 114 | 114 | { |
| 115 | UINT8 port = i | |
| 115 | UINT8 port = iop | |
| 116 | 116 | port &= 0xf0; |
| 117 | 117 | return port>>4; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | READ8_MEMBER(tecmo_state::tecmo_dswb_l_r) |
| 121 | 121 | { |
| 122 | UINT8 port = i | |
| 122 | UINT8 port = iop | |
| 123 | 123 | port &= 0x0f; |
| 124 | 124 | return port; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | READ8_MEMBER(tecmo_state::tecmo_dswb_h_r) |
| 128 | 128 | { |
| 129 | UINT8 port = i | |
| 129 | UINT8 port = iop | |
| 130 | 130 | port &= 0xf0; |
| 131 | 131 | return port>>4; |
| 132 | 132 | } |
| r15082 | r15083 | |
|---|---|---|
| 492 | 492 | TOURVISION_BIOS |
| 493 | 493 | ROM_END |
| 494 | 494 | |
| 495 | ||
| 496 | ROM_START(tvlegaxe) | |
| 497 | ROM_REGION( 0x100000, "maincpu", 0 ) | |
| 498 | ROM_LOAD( "tourv_makyodensetsuthelegendaryaxe.bin", 0x00000, 0x100000, CRC(50ec3f97) SHA1(d583fa240a4dfd14b0d53ff78762fbac52694dd2) ) | |
| 499 | ||
| 500 | TOURVISION_BIOS | |
| 501 | ROM_END | |
| 502 | ||
| 503 | ||
| 504 | ROM_START(tvsvball) | |
| 505 | ROM_REGION( 0x100000, "maincpu", 0 ) | |
| 506 | ROM_LOAD( "tourv_supervalleyball.bin", 0x00000, 0x100000, CRC(8a32a1ca) SHA1(80144fb4035415eb9b2c67d78d55757ed0d641a1) ) | |
| 507 | ||
| 508 | TOURVISION_BIOS | |
| 509 | ROM_END | |
| 510 | ||
| 511 | ||
| 495 | 512 | static DRIVER_INIT(tourvision) |
| 496 | 513 | { |
| 497 | 514 | DRIVER_INIT_CALL(pce); |
| 498 | 515 | } |
| 499 | 516 | |
| 500 | 517 | GAME( 19??, tourvis, 0, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision)", "Tourvision PCE bootleg", GAME_IS_BIOS_ROOT | GAME_NOT_WORKING ) |
| 518 | GAME( 1988, tvlegaxe, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Victor Musical Industries, Inc.", " Makyo Densetsu - The Legenary Axe (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 501 | 519 | GAME( 1989, tvusapb, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Aicom", "USA Pro Basketball (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 502 | 520 | GAME( 1989, tvdunexp, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Hudson / Atlus", "Dungeon Explorer (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 503 | 521 | GAME( 1990, tvthbld, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Sega / NEC Avenue", "Thunder Blade (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 504 | 522 | GAME( 1990, tvrs2, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Taito", "Rastan Saga II (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 523 | GAME( 1990, tvsvball, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Video System", "Super Volleyball (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 505 | 524 | GAME( 1991, tvpwlg4, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Hudson", "Power League IV (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 506 | 525 | GAME( 1991, tvsci, tourvis, tourvision, tourvision, tourvision, ROT0, "bootleg (Tourvision) / Taito", "Special Criminal Investigation (Tourvision PCE bootleg)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| r15082 | r15083 | |
|---|---|---|
| 139 | 139 | KONAMI8_SYSTEM_10 |
| 140 | 140 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 141 | 141 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 142 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 142 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 143 | 143 | |
| 144 | 144 | PORT_START("P1") |
| 145 | 145 | KONAMI8_MONO_B12_UNK |
| r15082 | r15083 | |
|---|---|---|
| 100 | 100 | /* when reading the even ports, do a real analog port update */ |
| 101 | 101 | if (which == 0) |
| 102 | 102 | { |
| 103 | int dx = (INT8)input_port_read(machine(), "TRACKX"); | |
| 104 | int dy = (INT8)input_port_read(machine(), "TRACKY"); | |
| 103 | int dx = (INT8)ioport("TRACKX")->read(); | |
| 104 | int dy = (INT8)ioport("TRACKY")->read(); | |
| 105 | 105 | |
| 106 | 106 | m_cur[0] = dx + dy; |
| 107 | 107 | m_cur[1] = dx - dy; |
| r15082 | r15083 | |
| 121 | 121 | |
| 122 | 122 | READ16_MEMBER(shuuz_state::special_port0_r) |
| 123 | 123 | { |
| 124 | int result = i | |
| 124 | int result = iop | |
| 125 | 125 | |
| 126 | 126 | if ((result & 0x0800) && atarigen_get_hblank(*machine().primary_screen)) |
| 127 | 127 | result &= ~0x0800; |
| r15082 | r15083 | |
| 171 | 171 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 172 | 172 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 173 | 173 | PORT_BIT( 0x07fc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 174 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_VBLANK | |
| 174 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 175 | 175 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 176 | 176 | |
| 177 | 177 | PORT_START("BUTTONS") |
| r15082 | r15083 | |
| 198 | 198 | PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 199 | 199 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Step Debug SW") PORT_CODE(KEYCODE_S) |
| 200 | 200 | PORT_BIT( 0x0600, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 201 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_VBLANK | |
| 201 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 202 | 202 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Playfield Debug SW") PORT_CODE(KEYCODE_Y) |
| 203 | 203 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset Debug SW") PORT_CODE(KEYCODE_E) |
| 204 | 204 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Crosshair Debug SW") PORT_CODE(KEYCODE_C) |
| r15082 | r15083 | |
|---|---|---|
| 365 | 365 | if (m_protection_data != 0xff) |
| 366 | 366 | ret = m_protection_data ^ 0x88; |
| 367 | 367 | else |
| 368 | ret = i | |
| 368 | ret = iop | |
| 369 | 369 | break; |
| 370 | 370 | |
| 371 | 371 | case 0x02: |
| r15082 | r15083 | |
| 413 | 413 | |
| 414 | 414 | WRITE8_MEMBER(enigma2_state::enigma2_flip_screen_w) |
| 415 | 415 | { |
| 416 | m_flip_screen = ((data >> 5) & 0x01) && ((i | |
| 416 | m_flip_screen = ((data >> 5) & 0x01) && ((iop | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | |
| 420 | 420 | CUSTOM_INPUT_MEMBER(enigma2_state::p1_controls_r) |
| 421 | 421 | { |
| 422 | return i | |
| 422 | return iop | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
| 426 | 426 | CUSTOM_INPUT_MEMBER(enigma2_state::p2_controls_r) |
| 427 | 427 | { |
| 428 | 428 | if (m_flip_screen) |
| 429 | return i | |
| 429 | return iop | |
| 430 | 430 | else |
| 431 | return i | |
| 431 | return iop | |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 |
| r15082 | r15083 | |
|---|---|---|
| 493 | 493 | { |
| 494 | 494 | videopkr_state *state = machine.driver_data<videopkr_state>(); |
| 495 | 495 | int offs = tile_index; |
| 496 | int attr = state->m_color_ram[offs] + i | |
| 496 | int attr = state->m_color_ram[offs] + state->iop | |
| 497 | 497 | int code = state->m_video_ram[offs]; |
| 498 | 498 | int color = attr; |
| 499 | 499 | SET_TILE_INFO(0, code, color, 0); |
| r15082 | r15083 | |
| 536 | 536 | { |
| 537 | 537 | case 0xef: /* inputs are multiplexed through a diode matrix */ |
| 538 | 538 | { |
| 539 | hf = ((input_port_read(machine(), "IN1") & 0x10 ) >> 4) & 1; /* Hopper full detection */ | |
| 540 | co = 0x10 * ((input_port_read(machine(), "IN1") & 0x20 ) >> 5); /* Coin Out detection */ | |
| 541 | kbdin = ((input_port_read(machine(), "IN1") & 0xaf ) << 8) + input_port_read(machine(), "IN0"); | |
| 539 | hf = ((ioport("IN1")->read() & 0x10 ) >> 4) & 1; /* Hopper full detection */ | |
| 540 | co = 0x10 * ((ioport("IN1")->read() & 0x20 ) >> 5); /* Coin Out detection */ | |
| 541 | kbdin = ((ioport("IN1")->read() & 0xaf ) << 8) + ioport("IN0")->read(); | |
| 542 | 542 | |
| 543 | 543 | switch (kbdin) |
| 544 | 544 | { |
| r15082 | r15083 | |
|---|---|---|
| 298 | 298 | |
| 299 | 299 | switch (data) |
| 300 | 300 | { |
| 301 | case 0x00: m_protection_res = i | |
| 301 | case 0x00: m_protection_res = iop | |
| 302 | 302 | // CSK227 |
| 303 | 303 | case 0x20: m_protection_res = 0x49; break; |
| 304 | 304 | case 0x21: m_protection_res = 0x47; break; |
| r15082 | r15083 | |
|---|---|---|
| 663 | 663 | case 0x10/2: |
| 664 | 664 | { |
| 665 | 665 | static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" }; |
| 666 | return | |
| 666 | return | |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | case 0x30/2: |
| 670 | 670 | { |
| 671 | 671 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" }; |
| 672 | return | |
| 672 | return s | |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | case 0x60/2: |
| r15082 | r15083 | |
| 733 | 733 | case 0x1006/2: |
| 734 | 734 | { |
| 735 | 735 | static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" }; |
| 736 | return | |
| 736 | return | |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | case 0x3020/2: |
| 740 | 740 | { |
| 741 | 741 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| 742 | return | |
| 742 | return s | |
| 743 | 743 | } |
| 744 | 744 | } |
| 745 | 745 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", cpu_get_pc(&space->device()), offset * 2); |
| r15082 | r15083 | |
|---|---|---|
| 165 | 165 | |
| 166 | 166 | if (!state->m_inputcnt) |
| 167 | 167 | { |
| 168 | int key = | |
| 168 | int key = s | |
| 169 | 169 | int keyval = 0; //we must return 0 (0x2 in 2nd read) to clear 4 bit at $6600 and allow next read |
| 170 | 170 | |
| 171 | 171 | if (key) |
| r15082 | r15083 | |
| 202 | 202 | READ8_MEMBER(koikoi_state::io_r) |
| 203 | 203 | { |
| 204 | 204 | if (!offset) |
| 205 | return i | |
| 205 | return iop | |
| 206 | 206 | |
| 207 | 207 | return 0; |
| 208 | 208 | } |
| r15082 | r15083 | |
|---|---|---|
| 343 | 343 | case 0: |
| 344 | 344 | case 1: |
| 345 | 345 | case 3: |
| 346 | return i | |
| 346 | return iop | |
| 347 | 347 | |
| 348 | 348 | case 2: |
| 349 | 349 | return adc1038_sars_read(adc1038) << 7; |
| r15082 | r15083 | |
| 727 | 727 | int value = 0; |
| 728 | 728 | switch (input) |
| 729 | 729 | { |
| 730 | case 0: value = input_port_read(device->machine(), "AN0"); break; | |
| 731 | case 1: value = input_port_read(device->machine(), "AN1"); break; | |
| 732 | case 2: value = input_port_read(device->machine(), "AN2"); break; | |
| 733 | case 3: value = input_port_read(device->machine(), "AN3"); break; | |
| 730 | case 0: value = device->machine().root_device().ioport("AN0")->read(); break; | |
| 731 | case 1: value = device->machine().root_device().ioport("AN1")->read(); break; | |
| 732 | case 2: value = device->machine().root_device().ioport("AN2")->read(); break; | |
| 733 | case 3: value = device->machine().root_device().ioport("AN3")->read(); break; | |
| 734 | 734 | case 4: value = 0x000; break; |
| 735 | 735 | case 5: value = 0x000; break; |
| 736 | 736 | case 6: value = 0x000; break; |
| r15082 | r15083 | |
| 1165 | 1165 | |
| 1166 | 1166 | state->m_sharc_dataram_0 = auto_alloc_array(machine, UINT32, 0x100000/4); |
| 1167 | 1167 | |
| 1168 | K001005_preprocess_texture_data( | |
| 1168 | K001005_preprocess_texture_data(sta | |
| 1169 | 1169 | } |
| 1170 | 1170 | |
| 1171 | 1171 | static DRIVER_INIT(hangplt) |
| r15082 | r15083 | |
| 1173 | 1173 | gticlub_state *state = machine.driver_data<gticlub_state>(); |
| 1174 | 1174 | |
| 1175 | 1175 | init_konami_cgboard(machine, 2, CGBOARD_TYPE_HANGPLT); |
| 1176 | set_cgboard_texture_bank(machine, 0, "bank5", | |
| 1176 | set_cgboard_texture_bank(machine, 0, "bank5", sta | |
| 1177 | 1177 | set_cgboard_texture_bank(machine, 1, "bank6", state->memregion("user5")->base()); |
| 1178 | 1178 | |
| 1179 | 1179 | state->m_sharc_dataram_0 = auto_alloc_array(machine, UINT32, 0x100000/4); |
| r15082 | r15083 | |
|---|---|---|
| 889 | 889 | |
| 890 | 890 | UINT8 ret = 0; |
| 891 | 891 | |
| 892 | ret = i | |
| 892 | ret = iop | |
| 893 | 893 | |
| 894 | 894 | return ret; |
| 895 | 895 | } |
| r15082 | r15083 | |
|---|---|---|
| 881 | 881 | switch (m_mcu_port6 & 0xe0) |
| 882 | 882 | { |
| 883 | 883 | case 0x40: |
| 884 | return i | |
| 884 | return iop | |
| 885 | 885 | |
| 886 | 886 | case 0x60: |
| 887 | return i | |
| 887 | return iop | |
| 888 | 888 | |
| 889 | 889 | case 0x20: |
| 890 | return i | |
| 890 | return iop | |
| 891 | 891 | |
| 892 | 892 | case 0x00: |
| 893 | return i | |
| 893 | return iop | |
| 894 | 894 | } |
| 895 | 895 | |
| 896 | 896 | return 0xff; |
| r15082 | r15083 | |
| 940 | 940 | READ8_MEMBER(namcona1_state::portana_r) |
| 941 | 941 | { |
| 942 | 942 | static const UINT8 bitnum[8] = { 0x40, 0x20, 0x10, 0x01, 0x02, 0x04, 0x08, 0x80 }; |
| 943 | UINT8 port = i | |
| 943 | UINT8 port = iop | |
| 944 | 944 | |
| 945 | 945 | return (port & bitnum[offset>>1]) ? 0xff : 0x00; |
| 946 | 946 | } |
| r15082 | r15083 | |
|---|---|---|
| 556 | 556 | break; |
| 557 | 557 | |
| 558 | 558 | case 0x642/2: |
| 559 | return (i | |
| 559 | return (iop | |
| 560 | 560 | |
| 561 | 561 | case 0x644/2: |
| 562 | return (i | |
| 562 | return (iop | |
| 563 | 563 | |
| 564 | 564 | case 0x646/2: |
| 565 | return (i | |
| 565 | return (iop | |
| 566 | 566 | |
| 567 | 567 | case 0x648/2: |
| 568 | return (i | |
| 568 | return (iop | |
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | |
| r15082 | r15083 | |
| 581 | 581 | } |
| 582 | 582 | break; |
| 583 | 583 | case 0x642/2: |
| 584 | return (i | |
| 584 | return (iop | |
| 585 | 585 | |
| 586 | 586 | case 0x644/2: |
| 587 | return (i | |
| 587 | return (iop | |
| 588 | 588 | |
| 589 | 589 | case 0x646/2: |
| 590 | return (i | |
| 590 | return (iop | |
| 591 | 591 | |
| 592 | 592 | case 0x648/2: |
| 593 | return (i | |
| 593 | return (iop | |
| 594 | 594 | |
| 595 | 595 | /* |
| 596 | 596 | protection controls where the program code should jump to. |
| r15082 | r15083 | |
|---|---|---|
| 128 | 128 | /* 0x80 - DR3 = PL1 V DIR */ |
| 129 | 129 | |
| 130 | 130 | PORT_START("IN1") |
| 131 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 131 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 132 | 132 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) |
| 133 | 133 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* SPARE */ |
| 134 | 134 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* TEST STEP */ |
| r15082 | r15083 | |
|---|---|---|
| 87 | 87 | switch((FPTR)param) |
| 88 | 88 | { |
| 89 | 89 | case 0x39: |
| 90 | if(i | |
| 90 | if(iop | |
| 91 | 91 | break; |
| 92 | 92 | case 0x37: |
| 93 | if(i | |
| 93 | if(iop | |
| 94 | 94 | break; |
| 95 | 95 | case 0x31: |
| 96 | if(i | |
| 96 | if(iop | |
| 97 | 97 | break; |
| 98 | 98 | case 0x32: |
| 99 | if(i | |
| 99 | if(iop | |
| 100 | 100 | break; |
| 101 | 101 | case 0x33: |
| 102 | if(i | |
| 102 | if(iop | |
| 103 | 103 | break; |
| 104 | 104 | |
| 105 | 105 | case 0x30: |
| 106 | if(i | |
| 106 | if(iop | |
| 107 | 107 | break; |
| 108 | 108 | case 0x38: |
| 109 | if(i | |
| 109 | if(iop | |
| 110 | 110 | break; |
| 111 | 111 | case 0x34: |
| 112 | if(i | |
| 112 | if(iop | |
| 113 | 113 | break; |
| 114 | 114 | case 0x35: |
| 115 | if(i | |
| 115 | if(iop | |
| 116 | 116 | break; |
| 117 | 117 | case 0x36: |
| 118 | if(i | |
| 118 | if(iop | |
| 119 | 119 | break; |
| 120 | 120 | } |
| 121 | 121 |
| r15082 | r15083 | |
|---|---|---|
| 579 | 579 | UINT8 mcustatus = latch8_bit4_q_r(m_dev_vp2, 0); |
| 580 | 580 | UINT8 r; |
| 581 | 581 | |
| 582 | r = (i | |
| 582 | r = (iop | |
| 583 | 583 | coin_counter_w(machine(), offset, r >> 7); |
| 584 | 584 | if (r & 0x10) |
| 585 | 585 | r = (r & ~0x10) | 0x80; /* service ==> coin */ |
| r15082 | r15083 | |
| 592 | 592 | |
| 593 | 593 | UINT8 r; |
| 594 | 594 | |
| 595 | r = (i | |
| 595 | r = (iop | |
| 596 | 596 | coin_counter_w(machine(), offset, r >> 7); |
| 597 | 597 | if (r & 0x10) |
| 598 | 598 | r = (r & ~0x10) | 0x80; /* service ==> coin */ |
| r15082 | r15083 | |
| 724 | 724 | |
| 725 | 725 | READ8_MEMBER(dkong_state::strtheat_inputport_0_r) |
| 726 | 726 | { |
| 727 | if(i | |
| 727 | if(iop | |
| 728 | 728 | { |
| 729 | 729 | /* Joystick inputs */ |
| 730 | return i | |
| 730 | return iop | |
| 731 | 731 | } |
| 732 | 732 | else |
| 733 | 733 | { |
| 734 | 734 | /* Steering Wheel inputs */ |
| 735 | return (i | |
| 735 | return (iop | |
| 736 | 736 | } |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | |
| 740 | 740 | READ8_MEMBER(dkong_state::strtheat_inputport_1_r) |
| 741 | 741 | { |
| 742 | if(i | |
| 742 | if(iop | |
| 743 | 743 | { |
| 744 | 744 | /* Joystick inputs */ |
| 745 | return i | |
| 745 | return iop | |
| 746 | 746 | } |
| 747 | 747 | else |
| 748 | 748 | { |
| 749 | 749 | /* Steering Wheel inputs */ |
| 750 | return (i | |
| 750 | return (iop | |
| 751 | 751 | } |
| 752 | 752 | } |
| 753 | 753 | |
| r15082 | r15083 | |
| 1196 | 1196 | PORT_DIPSETTING( 0x0c, "80000" ) |
| 1197 | 1197 | |
| 1198 | 1198 | PORT_START("SENSE") /* Sense */ |
| 1199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1200 | 1200 | |
| 1201 | 1201 | PORT_INCLUDE( dkong_config ) |
| 1202 | 1202 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1240 | 1240 | PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) |
| 1241 | 1241 | |
| 1242 | 1242 | PORT_START("SENSE") /* Sense */ |
| 1243 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1243 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1244 | 1244 | |
| 1245 | 1245 | PORT_INCLUDE( dkong_config ) |
| 1246 | 1246 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1273 | 1273 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" ) |
| 1274 | 1274 | |
| 1275 | 1275 | PORT_START("SENSE") /* Sense */ |
| 1276 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1276 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1277 | 1277 | |
| 1278 | 1278 | PORT_INCLUDE( dkong_config ) |
| 1279 | 1279 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1292 | 1292 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" ) |
| 1293 | 1293 | |
| 1294 | 1294 | PORT_START("SENSE") /* Sense */ |
| 1295 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1295 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1296 | 1296 | |
| 1297 | 1297 | PORT_INCLUDE( dkong_config ) |
| 1298 | 1298 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1326 | 1326 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1327 | 1327 | |
| 1328 | 1328 | PORT_START("SENSE") /* Sense */ |
| 1329 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1329 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1330 | 1330 | |
| 1331 | 1331 | PORT_INCLUDE( dkong_config ) |
| 1332 | 1332 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1424 | 1424 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) |
| 1425 | 1425 | |
| 1426 | 1426 | PORT_START("SENSE") /* Sense */ |
| 1427 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1427 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1428 | 1428 | |
| 1429 | 1429 | PORT_INCLUDE( dkong_config ) |
| 1430 | 1430 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1457 | 1457 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:!8" ) |
| 1458 | 1458 | |
| 1459 | 1459 | PORT_START("SENSE") /* Sense */ |
| 1460 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1460 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1461 | 1461 | |
| 1462 | 1462 | PORT_INCLUDE( dkong_config ) |
| 1463 | 1463 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 179 | 179 | switch (bit_mask) |
| 180 | 180 | { |
| 181 | 181 | case 0x01: |
| 182 | return ((i | |
| 182 | return ((iop | |
| 183 | 183 | case 0x02: |
| 184 | return ((i | |
| 184 | return ((iop | |
| 185 | 185 | default: |
| 186 | 186 | logerror("sidewndr_payout_r : invalid %02X bit_mask\n",bit_mask); |
| 187 | 187 | return 0; |
| r15082 | r15083 | |
| 195 | 195 | switch (bit_mask) |
| 196 | 196 | { |
| 197 | 197 | case 0x01: |
| 198 | return ((i | |
| 198 | return ((iop | |
| 199 | 199 | case 0x02: |
| 200 | return ((i | |
| 200 | return ((iop | |
| 201 | 201 | case 0x04: |
| 202 | return ((i | |
| 202 | return ((iop | |
| 203 | 203 | case 0x08: |
| 204 | return ((i | |
| 204 | return ((iop | |
| 205 | 205 | default: |
| 206 | 206 | logerror("starspnr_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| 207 | 207 | return 0; |
| r15082 | r15083 | |
| 215 | 215 | switch (bit_mask) |
| 216 | 216 | { |
| 217 | 217 | case 0x01: |
| 218 | return ((i | |
| 218 | return ((iop | |
| 219 | 219 | case 0x02: |
| 220 | return ((i | |
| 220 | return ((iop | |
| 221 | 221 | case 0x04: |
| 222 | return ((i | |
| 222 | return ((iop | |
| 223 | 223 | default: |
| 224 | 224 | logerror("starspnr_payout_r : invalid %02X bit_mask\n",bit_mask); |
| 225 | 225 | return 0; |
| r15082 | r15083 | |
| 316 | 316 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Stop Nudge/Nudge Up or Down" ) |
| 317 | 317 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Gamble" ) |
| 318 | 318 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) /* "Cash in" */ |
| 319 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 319 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* active low or high?? */ | |
| 320 | 320 | PORT_BIT( 0xd8, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 321 | 321 | |
| 322 | 322 | PORT_START("IN1") // 1 |
| r15082 | r15083 | |
| 437 | 437 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 438 | 438 | /* tested at 0xef77 after IN5 bit 1 and before IN2 bit 2 - after coins are tested - table at 0xefa5 (3 bytes) */ |
| 439 | 439 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 440 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 440 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* active low or high?? */ | |
| 441 | 441 | |
| 442 | 442 | PORT_START("IN1") // 1 |
| 443 | 443 | /* tested at 0xe77c - call from 0x012c */ |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | UINT8 wheel[4] = |
| 52 | 52 | { |
| 53 | input_port_read(machine, "WHEEL1"), | |
| 54 | input_port_read(machine, "WHEEL2"), | |
| 55 | input_port_read(machine, "WHEEL3"), | |
| 56 | input_port_read(machine, "WHEEL4") | |
| 53 | state->ioport("WHEEL1")->read(), | |
| 54 | state->ioport("WHEEL2")->read(), | |
| 55 | state->ioport("WHEEL3")->read(), | |
| 56 | state->ioport("WHEEL4")->read() | |
| 57 | 57 | }; |
| 58 | 58 | UINT8 lever[4] = |
| 59 | 59 | { |
| 60 | input_port_read(machine, "LEVER1"), | |
| 61 | input_port_read(machine, "LEVER2"), | |
| 62 | input_port_read(machine, "LEVER3"), | |
| 63 | input_port_read(machine, "LEVER4") | |
| 60 | machine.root_device().ioport("LEVER1")->read(), | |
| 61 | machine.root_device().ioport("LEVER2")->read(), | |
| 62 | machine.root_device().ioport("LEVER3")->read(), | |
| 63 | machine.root_device().ioport("LEVER4")->read() | |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | 66 | int i; |
| r15082 | r15083 | |
| 99 | 99 | |
| 100 | 100 | /* NMI and watchdog are disabled during service mode */ |
| 101 | 101 | |
| 102 | machine.watchdog_enable(in | |
| 102 | machine.watchdog_enable(machine.root_device().ioport | |
| 103 | 103 | |
| 104 | if (in | |
| 104 | if (machine.root_device().ioport | |
| 105 | 105 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 106 | 106 | |
| 107 | 107 | machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(nmi_callback), scanline); |
| r15082 | r15083 | |
| 134 | 134 | |
| 135 | 135 | READ8_MEMBER(sprint4_state::sprint4_analog_r) |
| 136 | 136 | { |
| 137 | return (i | |
| 137 | return (iop | |
| 138 | 138 | } |
| 139 | 139 | READ8_MEMBER(sprint4_state::sprint4_coin_r) |
| 140 | 140 | { |
| 141 | return (i | |
| 141 | return (iop | |
| 142 | 142 | } |
| 143 | 143 | READ8_MEMBER(sprint4_state::sprint4_collision_r) |
| 144 | 144 | { |
| 145 | return (i | |
| 145 | return (iop | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | |
| 149 | 149 | READ8_MEMBER(sprint4_state::sprint4_options_r) |
| 150 | 150 | { |
| 151 | return (i | |
| 151 | return (iop | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | |
| r15082 | r15083 | |
| 259 | 259 | |
| 260 | 260 | PORT_START("IN0") |
| 261 | 261 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 262 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 262 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 263 | 263 | |
| 264 | 264 | PORT_START("IN1") |
| 265 | 265 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) |
| r15082 | r15083 | |
|---|---|---|
| 198 | 198 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 199 | 199 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // cpu2 will clr c040 on startup forever |
| 200 | 200 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, metlclsh_state,coin_inserted, 0) |
| 201 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 201 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 202 | 202 | INPUT_PORTS_END |
| 203 | 203 | |
| 204 | 204 |
| r15082 | r15083 | |
|---|---|---|
| 680 | 680 | |
| 681 | 681 | PORT_START("DSW3") |
| 682 | 682 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 683 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 684 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 685 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 686 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 687 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 688 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 689 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 690 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 683 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 684 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 685 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 686 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 687 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 688 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 689 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 690 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 691 | 691 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 692 | 692 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 693 | 693 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 694 | 694 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 695 | 695 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 696 | 696 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 697 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 698 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 699 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 700 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 701 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 702 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 703 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 704 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 697 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 698 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 699 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 700 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 701 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 702 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 703 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 704 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 705 | 705 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 706 | 706 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 707 | 707 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 842 | 842 | |
| 843 | 843 | PORT_START("DSW3") |
| 844 | 844 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 845 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 846 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 847 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 848 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 849 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 850 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 851 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 852 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 845 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 846 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 847 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 848 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 849 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 850 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 851 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 852 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 853 | 853 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 854 | 854 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 855 | 855 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 856 | 856 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 857 | 857 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 858 | 858 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 859 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 860 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 861 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 862 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 863 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 864 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 865 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 866 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 859 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 860 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 861 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 862 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 863 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 864 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 865 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 866 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 867 | 867 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 868 | 868 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 869 | 869 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1004 | 1004 | |
| 1005 | 1005 | PORT_START("DSW3") |
| 1006 | 1006 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 1007 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 1008 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1009 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1010 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1011 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 1012 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1013 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1014 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1007 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 1008 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1009 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1010 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1011 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 1012 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1013 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1014 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1015 | 1015 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 1016 | 1016 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1017 | 1017 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 1018 | 1018 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 1019 | 1019 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 1020 | 1020 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 1021 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 1022 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1023 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1024 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1025 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 1026 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1027 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1028 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1021 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 1022 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1023 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1024 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1025 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 1026 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1027 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1028 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1029 | 1029 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 1030 | 1030 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1031 | 1031 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1166 | 1166 | |
| 1167 | 1167 | PORT_START("DSW3") |
| 1168 | 1168 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 1169 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 1170 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1171 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1172 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1173 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 1174 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1175 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1176 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1169 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 1170 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1171 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1172 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1173 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 1174 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1175 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1176 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1177 | 1177 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 1178 | 1178 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1179 | 1179 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 1180 | 1180 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 1181 | 1181 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 1182 | 1182 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 1183 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 1184 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1185 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1186 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1187 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 1188 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1189 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1190 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1183 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 1184 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1185 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1186 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1187 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 1188 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1189 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1190 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1191 | 1191 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 1192 | 1192 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1193 | 1193 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1328 | 1328 | |
| 1329 | 1329 | PORT_START("DSW3") |
| 1330 | 1330 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 1331 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 1332 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1333 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1334 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1335 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 1336 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1337 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1338 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1331 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 1332 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1333 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1334 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1335 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 1336 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1337 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1338 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1339 | 1339 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 1340 | 1340 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1341 | 1341 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 1342 | 1342 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 1343 | 1343 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 1344 | 1344 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 1345 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 1346 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1347 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1348 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1349 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 1350 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1351 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1352 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1345 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 1346 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1347 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1348 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1349 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 1350 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1351 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1352 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1353 | 1353 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 1354 | 1354 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1355 | 1355 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1490 | 1490 | |
| 1491 | 1491 | PORT_START("DSW3") |
| 1492 | 1492 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 1493 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 1494 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1495 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1496 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1497 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 1498 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1499 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1500 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1493 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 1494 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1495 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1496 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1497 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 1498 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1499 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1500 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1501 | 1501 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 1502 | 1502 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1503 | 1503 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 1504 | 1504 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 1505 | 1505 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 1506 | 1506 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 1507 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 1508 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1509 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1510 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1511 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 1512 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1513 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1514 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1507 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 1508 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1509 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1510 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1511 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 1512 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1513 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1514 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1515 | 1515 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 1516 | 1516 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1517 | 1517 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1789 | 1789 | |
| 1790 | 1790 | PORT_START("DSW3") /* some of these could be wrong */ |
| 1791 | 1791 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") |
| 1792 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) // A-Type | |
| 1793 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1794 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1795 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1796 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) // B-Type | |
| 1797 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1798 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1799 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1792 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) // A-Type | |
| 1793 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1794 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1795 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1796 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) // B-Type | |
| 1797 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1798 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1799 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1800 | 1800 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") |
| 1801 | 1801 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) |
| 1802 | 1802 | PORT_DIPSETTING( 0x04, "1 Coin/20 Credits" ) |
| 1803 | 1803 | PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) |
| 1804 | 1804 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 1805 | 1805 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") |
| 1806 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) // C-Type | |
| 1807 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1808 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1809 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1810 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) // D-Type | |
| 1811 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1812 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1813 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1806 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) // C-Type | |
| 1807 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1808 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1809 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1810 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) // D-Type | |
| 1811 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1812 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1813 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1814 | 1814 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") |
| 1815 | 1815 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 1816 | 1816 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 1961 | 1961 | |
| 1962 | 1962 | PORT_START("DSW3") /* seems ok */ |
| 1963 | 1963 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 1964 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) // A-Type | |
| 1965 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1966 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1967 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 1968 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) // B-Type | |
| 1969 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1970 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1971 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 1964 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) // A-Type | |
| 1965 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1966 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1967 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 1968 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) // B-Type | |
| 1969 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1970 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1971 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 1972 | 1972 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 1973 | 1973 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) |
| 1974 | 1974 | PORT_DIPSETTING( 0x04, "1 Coin/20 Credits" ) |
| 1975 | 1975 | PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) |
| 1976 | 1976 | PORT_DIPSETTING( 0x0c, "1 Coin/100 Credits" ) |
| 1977 | 1977 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 1978 | PORT_DIPSETTING( 0x30, "5 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) // C-Type | |
| 1979 | PORT_DIPSETTING( 0x20, "2 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1980 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1981 | PORT_DIPSETTING( 0x00, "1 Coin/20 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 1982 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1983 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1984 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 200 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 1985 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 500 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) // D-Type | |
| 1978 | PORT_DIPSETTING( 0x30, "5 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) // C-Type | |
| 1979 | PORT_DIPSETTING( 0x20, "2 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1980 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1981 | PORT_DIPSETTING( 0x00, "1 Coin/20 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 1982 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1983 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1984 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 200 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 1985 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 500 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) // D-Type | |
| 1986 | 1986 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 1987 | 1987 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) |
| 1988 | 1988 | PORT_DIPSETTING( 0x40, "1 Coin/20 Credits" ) |
| r15082 | r15083 | |
| 2133 | 2133 | |
| 2134 | 2134 | PORT_START("DSW3") /* some of these are wrong */ |
| 2135 | 2135 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") |
| 2136 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) // A-Type | |
| 2137 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2138 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2139 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2140 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) // B-Type | |
| 2141 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2142 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2143 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2136 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) // A-Type | |
| 2137 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2138 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2139 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2140 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) // B-Type | |
| 2141 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2142 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2143 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2144 | 2144 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") |
| 2145 | 2145 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2146 | 2146 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 2147 | 2147 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 2148 | 2148 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 2149 | 2149 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") |
| 2150 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) // C-Type | |
| 2151 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2152 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2153 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2154 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) // D-Type | |
| 2155 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2156 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2157 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2150 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) // C-Type | |
| 2151 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2152 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2153 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2154 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) // D-Type | |
| 2155 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2156 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2157 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2158 | 2158 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") |
| 2159 | 2159 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2160 | 2160 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 2305 | 2305 | |
| 2306 | 2306 | PORT_START("DSW3") /* some of these are wrong */ |
| 2307 | 2307 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") |
| 2308 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) // A-Type | |
| 2309 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2310 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2311 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 2312 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) // B-Type | |
| 2313 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2314 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2315 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 2308 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) // A-Type | |
| 2309 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2310 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2311 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 2312 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) // B-Type | |
| 2313 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2314 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2315 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 2316 | 2316 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") |
| 2317 | 2317 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2318 | 2318 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 2319 | 2319 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 2320 | 2320 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 2321 | 2321 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") |
| 2322 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) // C-Type | |
| 2323 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2324 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2325 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 2326 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) // D-Type | |
| 2327 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2328 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2329 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 2322 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) // C-Type | |
| 2323 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2324 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2325 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 2326 | PORT_DIPSETTING( 0x30, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) // D-Type | |
| 2327 | PORT_DIPSETTING( 0x20, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2328 | PORT_DIPSETTING( 0x10, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2329 | PORT_DIPSETTING( 0x00, "1 Ticket/Coin / 100 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 2330 | 2330 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") |
| 2331 | 2331 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2332 | 2332 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
| 3759 | 3759 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 3760 | 3760 | /* DIP switches 2 to 5 work only for version 3.51 */ |
| 3761 | 3761 | PORT_DIPNAME( 0x02, 0x00, "Limit Score of Each Game to Max 10x Bet or $5.00" ) PORT_DIPLOCATION("DSW5:2") /* OK */ |
| 3762 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3763 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3764 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3765 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3762 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3763 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3764 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3765 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3766 | 3766 | PORT_DIPNAME( 0x04, 0x00, "Play Remaining Score when No Credit" ) PORT_DIPLOCATION("DSW5:3") /* OK */ |
| 3767 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3768 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3769 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3770 | PORT_DIPSETTING( 0x04, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3767 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3768 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3769 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3770 | PORT_DIPSETTING( 0x04, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3771 | 3771 | PORT_DIPNAME( 0x08, 0x00, "Reset Remaining Score to Zero" ) PORT_DIPLOCATION("DSW5:4") /* OK */ |
| 3772 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3773 | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3774 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3775 | PORT_DIPSETTING( 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3772 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3773 | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3774 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3775 | PORT_DIPSETTING( 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3776 | 3776 | PORT_DIPNAME( 0x10, 0x00, "Ticket Dispense from Score" ) PORT_DIPLOCATION("DSW5:5") /* OK */ |
| 3777 | PORT_DIPSETTING( 0x00, "Use TDDD" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3778 | PORT_DIPSETTING( 0x10, "Use Interface" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3779 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3780 | PORT_DIPSETTING( 0x10, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3777 | PORT_DIPSETTING( 0x00, "Use TDDD" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3778 | PORT_DIPSETTING( 0x10, "Use Interface" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3779 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3780 | PORT_DIPSETTING( 0x10, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3781 | 3781 | PORT_DIPNAME( 0x20, 0x20, "Reel Speed (ver 2.3)" ) PORT_DIPLOCATION("DSW5:6") /* OK (turn the machine off/on after change) */ |
| 3782 | 3782 | PORT_DIPSETTING( 0x20, "Slow" ) |
| 3783 | 3783 | PORT_DIPSETTING( 0x00, "Fast" ) |
| r15082 | r15083 | |
| 3831 | 3831 | PORT_DIPSETTING( 0x01, "Level 7" ) |
| 3832 | 3832 | PORT_DIPSETTING( 0x00, "Level 8" ) |
| 3833 | 3833 | PORT_DIPNAME( 0x38, 0x38, "Maximum Play" ) PORT_DIPLOCATION("DSW1:4,5,6") /* OK */ |
| 3834 | PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3835 | PORT_DIPSETTING( 0x08, "20" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3836 | PORT_DIPSETTING( 0x10, "30" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3837 | PORT_DIPSETTING( 0x18, "40" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3838 | PORT_DIPSETTING( 0x00, "8" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3839 | PORT_DIPSETTING( 0x08, "16" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3840 | PORT_DIPSETTING( 0x10, "24" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3841 | PORT_DIPSETTING( 0x18, "32" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3834 | PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3835 | PORT_DIPSETTING( 0x08, "20" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3836 | PORT_DIPSETTING( 0x10, "30" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3837 | PORT_DIPSETTING( 0x18, "40" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3838 | PORT_DIPSETTING( 0x00, "8" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3839 | PORT_DIPSETTING( 0x08, "16" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3840 | PORT_DIPSETTING( 0x10, "24" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3841 | PORT_DIPSETTING( 0x18, "32" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3842 | 3842 | PORT_DIPSETTING( 0x20, "40" ) |
| 3843 | 3843 | PORT_DIPSETTING( 0x28, "48" ) |
| 3844 | 3844 | PORT_DIPSETTING( 0x30, "64" ) |
| 3845 | 3845 | PORT_DIPSETTING( 0x38, "80" ) |
| 3846 | 3846 | PORT_DIPNAME( 0xc0, 0x80, "Minimum Play for Bonus" ) PORT_DIPLOCATION("DSW1:7,8") /* OK */ |
| 3847 | PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3848 | PORT_DIPSETTING( 0x40, "20" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3849 | PORT_DIPSETTING( 0x80, "30" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3850 | PORT_DIPSETTING( 0xc0, "40" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3851 | PORT_DIPSETTING( 0x00, "8" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3852 | PORT_DIPSETTING( 0x40, "16" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3853 | PORT_DIPSETTING( 0x80, "24" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3854 | PORT_DIPSETTING( 0xc0, "32" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3847 | PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3848 | PORT_DIPSETTING( 0x40, "20" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3849 | PORT_DIPSETTING( 0x80, "30" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3850 | PORT_DIPSETTING( 0xc0, "40" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3851 | PORT_DIPSETTING( 0x00, "8" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3852 | PORT_DIPSETTING( 0x40, "16" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3853 | PORT_DIPSETTING( 0x80, "24" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3854 | PORT_DIPSETTING( 0xc0, "32" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3855 | 3855 | |
| 3856 | 3856 | PORT_START("DSW2") |
| 3857 | 3857 | PORT_DIPNAME( 0x01, 0x01, "Double-Up Game" ) PORT_DIPLOCATION("DSW2:1") /* OK */ |
| r15082 | r15083 | |
| 3881 | 3881 | PORT_START("DSW3") |
| 3882 | 3882 | PORT_DIPNAME( 0x03, 0x02, "Minimum Play to Start" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 3883 | 3883 | PORT_DIPSETTING( 0x00, "1" ) |
| 3884 | PORT_DIPSETTING( 0x01, "10" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3885 | PORT_DIPSETTING( 0x02, "20" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3886 | PORT_DIPSETTING( 0x03, "30" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x00) | |
| 3887 | PORT_DIPSETTING( 0x01, "8" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3888 | PORT_DIPSETTING( 0x02, "16" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3889 | PORT_DIPSETTING( 0x03, "24" ) PORT_CONDITION("DSW5",0x10,PORTCOND_EQUALS,0x10) | |
| 3884 | PORT_DIPSETTING( 0x01, "10" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3885 | PORT_DIPSETTING( 0x02, "20" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3886 | PORT_DIPSETTING( 0x03, "30" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x00) | |
| 3887 | PORT_DIPSETTING( 0x01, "8" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3888 | PORT_DIPSETTING( 0x02, "16" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3889 | PORT_DIPSETTING( 0x03, "24" ) PORT_CONDITION("DSW5",0x10,EQUALS,0x10) | |
| 3890 | 3890 | PORT_DIPNAME( 0x0c, 0x08, "Max Coin In & Note In Point" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 3891 | 3891 | PORT_DIPSETTING( 0x00, "1000" ) |
| 3892 | 3892 | PORT_DIPSETTING( 0x04, "5000" ) |
| r15082 | r15083 | |
| 3941 | 3941 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3942 | 3942 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 3943 | 3943 | PORT_DIPNAME( 0x02, 0x00, "Limit Score of Each Game to Max 10x Bet or $5.00" ) PORT_DIPLOCATION("DSW5:2") /* OK */ |
| 3944 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3945 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3946 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3947 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3944 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3945 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3946 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3947 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3948 | 3948 | PORT_DIPNAME( 0x04, 0x00, "Use Printer" ) PORT_DIPLOCATION("DSW5:3") /* OK */ |
| 3949 | 3949 | PORT_DIPSETTING( 0x00, "No (Use TDDD)" ) |
| 3950 | 3950 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) |
| r15082 | r15083 | |
| 3955 | 3955 | PORT_DIPSETTING( 0x10, "Base 8" ) |
| 3956 | 3956 | PORT_DIPSETTING( 0x00, "Base 10" ) |
| 3957 | 3957 | PORT_DIPNAME( 0x20, 0x20, "Play Score when no point left" ) PORT_DIPLOCATION("DSW5:6") /* OK (turn the machine off/on after change) */ |
| 3958 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3959 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3960 | PORT_DIPSETTING( 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3961 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3958 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3959 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3960 | PORT_DIPSETTING( 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3961 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3962 | 3962 | PORT_DIPNAME( 0x40, 0x00, "Reset Remaining Score when Game Over" ) PORT_DIPLOCATION("DSW5:7") /* OK (turn the machine off/on after change) */ |
| 3963 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3964 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 3965 | PORT_DIPSETTING( 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3966 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 3963 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3964 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 3965 | PORT_DIPSETTING( 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3966 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 3967 | 3967 | PORT_DIPNAME( 0x80, 0x00, "Advanced Count Game" ) PORT_DIPLOCATION("DSW5:8") /* OK (turn the machine off/on after change) */ |
| 3968 | 3968 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 3969 | 3969 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| r15082 | r15083 | |
| 4111 | 4111 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 4112 | 4112 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 4113 | 4113 | PORT_DIPNAME( 0x02, 0x00, "Limit Score of Each Game to Max 10x Bet or $5.00" ) PORT_DIPLOCATION("DSW5:2") /* OK */ |
| 4114 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4115 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4116 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4117 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4114 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4115 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4116 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4117 | PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4118 | 4118 | PORT_DIPNAME( 0x04, 0x00, "Use Printer" ) PORT_DIPLOCATION("DSW5:3") /* OK */ |
| 4119 | 4119 | PORT_DIPSETTING( 0x00, "Interfase" ) |
| 4120 | 4120 | PORT_DIPSETTING( 0x04, "Direct Driver" ) |
| r15082 | r15083 | |
| 4125 | 4125 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 4126 | 4126 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 4127 | 4127 | PORT_DIPNAME( 0x20, 0x20, "Play Score when no point left" ) PORT_DIPLOCATION("DSW5:6") /* OK (turn the machine off/on after change) */ |
| 4128 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4129 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4130 | PORT_DIPSETTING( 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4131 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4128 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4129 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4130 | PORT_DIPSETTING( 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4131 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4132 | 4132 | PORT_DIPNAME( 0x40, 0x00, "Reset Remaining Score when Game Over" ) PORT_DIPLOCATION("DSW5:7") /* OK (turn the machine off/on after change) */ |
| 4133 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4134 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 4135 | PORT_DIPSETTING( 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4136 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 4133 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4134 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 4135 | PORT_DIPSETTING( 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4136 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 4137 | 4137 | PORT_DIPNAME( 0x80, 0x00, "Advanced Count Game" ) PORT_DIPLOCATION("DSW5:8") /* OK (turn the machine off/on after change) */ |
| 4138 | 4138 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 4139 | 4139 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | { |
| 86 | 86 | seicross_state *state = device->machine().driver_data<seicross_state>(); |
| 87 | 87 | |
| 88 | return (state->m_portb & 0x9f) | (i | |
| 88 | return (state->m_portb & 0x9f) | (state->iop | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | static WRITE8_DEVICE_HANDLER( friskyt_portB_w ) |
| r15082 | r15083 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | READ16_MEMBER(segas1x_bootleg_state::passht4b_service_r) |
| 205 | 205 | { |
| 206 | UINT16 val = i | |
| 206 | UINT16 val = iop | |
| 207 | 207 | |
| 208 | if(!(input_port_read(machine(), "P1") & 0x40)) val &= 0xef; | |
| 209 | if(!(input_port_read(machine(), "P2") & 0x40)) val &= 0xdf; | |
| 210 | if(!(input_port_read(machine(), "P3") & 0x40)) val &= 0xbf; | |
| 211 | if(!(input_port_read(machine(), "P4") & 0x40)) val &= 0x7f; | |
| 208 | if(!(ioport("P1")->read() & 0x40)) val &= 0xef; | |
| 209 | if(!(ioport("P2")->read() & 0x40)) val &= 0xdf; | |
| 210 | if(!(ioport("P3")->read() & 0x40)) val &= 0xbf; | |
| 211 | if(!(ioport("P4")->read() & 0x40)) val &= 0x7f; | |
| 212 | 212 | |
| 213 | m_passht4b_io3_val = (input_port_read(machine(), "P1") << 4) | (input_port_read(machine(), "P3") & 0xf); | |
| 214 | m_passht4b_io2_val = (input_port_read(machine(), "P2") << 4) | (input_port_read(machine(), "P4") & 0xf); | |
| 213 | m_passht4b_io3_val = (ioport("P1")->read() << 4) | (ioport("P3")->read() & 0xf); | |
| 214 | m_passht4b_io2_val = (ioport("P2")->read() << 4) | (ioport("P4")->read() & 0xf); | |
| 215 | 215 | |
| 216 | 216 | m_passht4b_io1_val = 0xff; |
| 217 | 217 | |
| 218 | 218 | // player 1 buttons |
| 219 | if(!(input_port_read(machine(), "P1") & 0x10)) m_passht4b_io1_val &= 0xfe; | |
| 220 | if(!(input_port_read(machine(), "P1") & 0x20)) m_passht4b_io1_val &= 0xfd; | |
| 221 | if(!(input_port_read(machine(), "P1") & 0x80)) m_passht4b_io1_val &= 0xfc; | |
| 219 | if(!(ioport("P1")->read() & 0x10)) m_passht4b_io1_val &= 0xfe; | |
| 220 | if(!(ioport("P1")->read() & 0x20)) m_passht4b_io1_val &= 0xfd; | |
| 221 | if(!(ioport("P1")->read() & 0x80)) m_passht4b_io1_val &= 0xfc; | |
| 222 | 222 | |
| 223 | 223 | // player 2 buttons |
| 224 | if(!(input_port_read(machine(), "P2") & 0x10)) m_passht4b_io1_val &= 0xfb; | |
| 225 | if(!(input_port_read(machine(), "P2") & 0x20)) m_passht4b_io1_val &= 0xf7; | |
| 226 | if(!(input_port_read(machine(), "P2") & 0x80)) m_passht4b_io1_val &= 0xf3; | |
| 224 | if(!(ioport("P2")->read() & 0x10)) m_passht4b_io1_val &= 0xfb; | |
| 225 | if(!(ioport("P2")->read() & 0x20)) m_passht4b_io1_val &= 0xf7; | |
| 226 | if(!(ioport("P2")->read() & 0x80)) m_passht4b_io1_val &= 0xf3; | |
| 227 | 227 | |
| 228 | 228 | // player 3 buttons |
| 229 | if(!(input_port_read(machine(), "P3") & 0x10)) m_passht4b_io1_val &= 0xef; | |
| 230 | if(!(input_port_read(machine(), "P3") & 0x20)) m_passht4b_io1_val &= 0xdf; | |
| 231 | if(!(input_port_read(machine(), "P3") & 0x80)) m_passht4b_io1_val &= 0xcf; | |
| 229 | if(!(ioport("P3")->read() & 0x10)) m_passht4b_io1_val &= 0xef; | |
| 230 | if(!(ioport("P3")->read() & 0x20)) m_passht4b_io1_val &= 0xdf; | |
| 231 | if(!(ioport("P3")->read() & 0x80)) m_passht4b_io1_val &= 0xcf; | |
| 232 | 232 | |
| 233 | 233 | // player 4 buttons |
| 234 | if(!(input_port_read(machine(), "P4") & 0x10)) m_passht4b_io1_val &= 0xbf; | |
| 235 | if(!(input_port_read(machine(), "P4") & 0x20)) m_passht4b_io1_val &= 0x7f; | |
| 236 | if(!(input_port_read(machine(), "P4") & 0x80)) m_passht4b_io1_val &= 0x3f; | |
| 234 | if(!(ioport("P4")->read() & 0x10)) m_passht4b_io1_val &= 0xbf; | |
| 235 | if(!(ioport("P4")->read() & 0x20)) m_passht4b_io1_val &= 0x7f; | |
| 236 | if(!(ioport("P4")->read() & 0x80)) m_passht4b_io1_val &= 0x3f; | |
| 237 | 237 | |
| 238 | 238 | return val; |
| 239 | 239 | } |
| r15082 | r15083 | |
| 1892 | 1892 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 1893 | 1893 | |
| 1894 | 1894 | PORT_MODIFY("COINAGE") |
| 1895 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") PORT_CONDITION("DSW1",0x20, | |
| 1895 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") PORT_CONDITION("DSW1",0x20, | |
| 1896 | 1896 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) |
| 1897 | 1897 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) |
| 1898 | 1898 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 3349 | 3349 | { |
| 3350 | 3350 | segas1x_bootleg_state *state = machine.driver_data<segas1x_bootleg_state>(); |
| 3351 | 3351 | int i; |
| 3352 | UINT8 *ROM = | |
| 3352 | UINT8 *ROM = sta | |
| 3353 | 3353 | UINT8 *KEY = state->memregion("decryption")->base(); |
| 3354 | 3354 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 3355 | 3355 | UINT8 data[0x1000]; |
| r15082 | r15083 | |
|---|---|---|
| 169 | 169 | /* update the different PIA pins from the input ports */ |
| 170 | 170 | |
| 171 | 171 | /* CA1 - copy of PA0 (COIN1) */ |
| 172 | state->m_pia1->ca1_w( | |
| 172 | state->m_pia1->ca1_w(s | |
| 173 | 173 | |
| 174 | 174 | /* CA2 - copy of PA1 (SERVICE1) */ |
| 175 | state->m_pia1->ca2_w( | |
| 175 | state->m_pia1->ca2_w(s | |
| 176 | 176 | |
| 177 | 177 | /* CB1 - (crosshatch) */ |
| 178 | state->m_pia1->cb1_w( | |
| 178 | state->m_pia1->cb1_w(s | |
| 179 | 179 | |
| 180 | 180 | /* CB2 - NOT CONNECTED */ |
| 181 | 181 | } |
| r15082 | r15083 | |
|---|---|---|
| 371 | 371 | limenko_state *state = machine.driver_data<limenko_state>(); |
| 372 | 372 | int i; |
| 373 | 373 | |
| 374 | UINT8 *base_gfx = | |
| 374 | UINT8 *base_gfx = sta | |
| 375 | 375 | UINT8 *gfx_max = base_gfx + state->memregion("gfx1")->bytes(); |
| 376 | 376 | |
| 377 | 377 | UINT8 *gfxdata; |
| r15082 | r15083 | |
| 1066 | 1066 | static DRIVER_INIT( spotty ) |
| 1067 | 1067 | { |
| 1068 | 1068 | limenko_state *state = machine.driver_data<limenko_state>(); |
| 1069 | UINT8 *dst = | |
| 1069 | UINT8 *dst = sta | |
| 1070 | 1070 | UINT8 *src = state->memregion("user2")->base(); |
| 1071 | 1071 | int x; |
| 1072 | 1072 |
| r15082 | r15083 | |
|---|---|---|
| 140 | 140 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:7") |
| 141 | 141 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 142 | 142 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 143 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 143 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 144 | 144 | INPUT_PORTS_END |
| 145 | 145 | |
| 146 | 146 | /******************************************************************************/ |
| r15082 | r15083 | |
|---|---|---|
| 8 | 8 | #include "cpu/m6809/m6809.h" |
| 9 | 9 | #include "video/tms9928a.h" |
| 10 | 10 | #include "machine/6821pia.h" |
| 11 | #include "sound/dac.h" | |
| 11 | 12 | |
| 12 | 13 | class by133_state : public driver_device |
| 13 | 14 | { |
| r15082 | r15083 | |
| 16 | 17 | : driver_device(mconfig, type, tag), |
| 17 | 18 | m_maincpu(*this, "maincpu"), |
| 18 | 19 | m_videocpu(*this, "videocpu"), |
| 19 | m_pia(*this, "pia") | |
| 20 | m_audiocpu(*this, "audiocpu"), | |
| 21 | m_videopia(*this, "videopia") | |
| 20 | 22 | { } |
| 21 | 23 | |
| 22 | ||
| 23 | 24 | // devices |
| 24 | 25 | required_device<cpu_device> m_maincpu; |
| 25 | 26 | required_device<cpu_device> m_videocpu; |
| 26 | required_device<pia6821_device> m_pia; | |
| 27 | required_device<cpu_device> m_audiocpu; | |
| 28 | required_device<pia6821_device> m_videopia; | |
| 27 | 29 | |
| 28 | DECLARE_INPUT_CHANGED_MEMBER(test_switch_press); | |
| 30 | DECLARE_READ8_MEMBER(m6803_port2_r); | |
| 31 | ||
| 32 | DECLARE_INPUT_CHANGED_MEMBER(video_test); | |
| 33 | DECLARE_INPUT_CHANGED_MEMBER(sound_test); | |
| 29 | 34 | // UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 35 | ||
| 30 | 36 | protected: |
| 31 | 37 | |
| 32 | 38 | // driver_device overrides |
| r15082 | r15083 | |
| 40 | 46 | } |
| 41 | 47 | #endif |
| 42 | 48 | |
| 43 | static ADDRESS_MAP_START( | |
| 49 | static ADDRESS_MAP_START( main | |
| 44 | 50 | AM_RANGE(0x0000, 0xffff) AM_NOP |
| 45 | 51 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) |
| 46 | 52 | AM_RANGE(0x1000, 0x7fff) AM_ROM |
| r15082 | r15083 | |
| 48 | 54 | |
| 49 | 55 | |
| 50 | 56 | |
| 51 | static ADDRESS_MAP_START( | |
| 57 | static ADDRESS_MAP_START( | |
| 52 | 58 | // AM_RANGE(0x0000, 0x1fff) communication with main CPU |
| 53 | AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("pia", pia6821_device, read, write) | |
| 54 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE( "tms9928a", tms9928a_device, vram_read, vram_write ) | |
| 55 | AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE( "tms9928a", tms9928a_device, register_read, register_write ) | |
| 59 | AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("videopia", pia6821_device, read, write) | |
| 60 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) | |
| 61 | AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) | |
| 56 | 62 | AM_RANGE(0x6000, 0x63ff) AM_RAM |
| 57 | 63 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 58 | 64 | ADDRESS_MAP_END |
| 59 | 65 | |
| 60 | INPUT_CHANGED_MEMBER(by133_state::test_switch_press) | |
| 66 | ||
| 67 | ||
| 68 | READ8_MEMBER(by133_state::m6803_port2_r) | |
| 61 | 69 | { |
| 70 | // TODO: port 2 to /reset pin (see schematics) | |
| 71 | UINT8 d0 = m_videopia->cb2_output() ? 1 : 0; | |
| 72 | return (m_videopia->b_output() << 1 & 0x1e) | d0; | |
| 73 | } | |
| 62 | 74 | |
| 75 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, by133_state ) | |
| 76 | AM_RANGE(0xc000, 0xffff) AM_ROM | |
| 77 | ADDRESS_MAP_END | |
| 78 | ||
| 79 | static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, by133_state ) | |
| 80 | AM_RANGE(M6801_PORT1, M6801_PORT1) AM_DEVWRITE_LEGACY("dac", dac_w) | |
| 81 | AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READ(m6803_port2_r) | |
| 82 | ADDRESS_MAP_END | |
| 83 | ||
| 84 | ||
| 85 | INPUT_CHANGED_MEMBER(by133_state::video_test) | |
| 86 | { | |
| 63 | 87 | if(newval) |
| 64 | 88 | device_set_input_line(m_videocpu, INPUT_LINE_NMI, PULSE_LINE); |
| 65 | 89 | } |
| 66 | 90 | |
| 91 | INPUT_CHANGED_MEMBER(by133_state::sound_test) | |
| 92 | { | |
| 93 | if(newval) | |
| 94 | device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 95 | } | |
| 96 | ||
| 67 | 97 | static INPUT_PORTS_START( by133 ) |
| 68 | /* | |
| 98 | /* test | |
| 69 | 99 | PORT_START("TEST") |
| 70 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by133_state,test_switch_press, 0) | |
| 100 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Video Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by133_state, video_test, 0) | |
| 101 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Sound Test") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by133_state, sound_test, 0) | |
| 71 | 102 | INPUT_PORTS_END |
| 72 | 103 | |
| 73 | 104 | void by133_state::machine_reset() |
| r15082 | r15083 | |
| 80 | 111 | |
| 81 | 112 | static WRITE_LINE_DEVICE_HANDLER(vdp_interrupt) |
| 82 | 113 | { |
| 83 | cputag_set_input_line(device->machine(), "videocpu", M6809_IRQ_LINE, | |
| 114 | cputag_set_input_line(device->machine(), "videocpu", M6809_IRQ_LINE, | |
| 84 | 115 | } |
| 85 | 116 | |
| 86 | 117 | static TMS9928A_INTERFACE(byvid_tms9928a_interface) |
| r15082 | r15083 | |
| 90 | 121 | DEVCB_LINE(vdp_interrupt) |
| 91 | 122 | }; |
| 92 | 123 | |
| 93 | static WRITE_LINE_DEVICE_HANDLER( | |
| 124 | static WRITE_LINE_DEVICE_HANDLER( | |
| 94 | 125 | { |
| 95 | cputag_set_input_line(device->machine(), "videocpu", M6809_FIRQ_LINE, (state ? ASSERT_LINE : CLEAR_LINE)); | |
| 126 | by133_state *drv_state = device->machine().driver_data<by133_state>(); | |
| 127 | device_set_input_line(drv_state->m_videocpu, M6809_FIRQ_LINE, (drv_state->m_videopia->irq_a_state() || drv_state->m_videopia->irq_b_state()) ? ASSERT_LINE : CLEAR_LINE); | |
| 96 | 128 | } |
| 97 | 129 | |
| 130 | static WRITE_LINE_DEVICE_HANDLER(by133_cb2) | |
| 131 | { | |
| 132 | // to M6803 port 2 d0 | |
| 133 | by133_state *drv_state = device->machine().driver_data<by133_state>(); | |
| 134 | device_set_input_line(drv_state->m_audiocpu, M6801_TIN_LINE, state ? ASSERT_LINE : CLEAR_LINE); | |
| 135 | } | |
| 136 | ||
| 98 | 137 | static READ8_DEVICE_HANDLER(by133_portb_r) |
| 99 | 138 | { |
| 100 | 139 | return 0; |
| 101 | 140 | } |
| 102 | 141 | |
| 103 | static const pia6821_interface pia_intf = | |
| 142 | static const pia6821_interface videopia_intf = | |
| 104 | 143 | { |
| 105 | 144 | DEVCB_NULL, /* port A in */ |
| 106 | 145 | DEVCB_HANDLER(by133_portb_r), /* port B in */ |
| r15082 | r15083 | |
| 111 | 150 | DEVCB_NULL, /* port A out */ |
| 112 | 151 | DEVCB_NULL, /* port B out */ |
| 113 | 152 | DEVCB_NULL, /* line CA2 out */ |
| 114 | DEVCB_ | |
| 153 | DEVCB_ | |
| 115 | 154 | DEVCB_LINE(by133_firq), /* IRQA */ |
| 116 | 155 | DEVCB_LINE(by133_firq) /* IRQB */ |
| 117 | 156 | }; |
| r15082 | r15083 | |
| 121 | 160 | /* basic machine hardware */ |
| 122 | 161 | MCFG_CPU_ADD("maincpu", M6800, 3580000/4) |
| 123 | 162 | MCFG_DEVICE_DISABLE() |
| 124 | MCFG_CPU_PROGRAM_MAP( | |
| 163 | MCFG_CPU_PROGRAM_MAP(main | |
| 125 | 164 | |
| 126 | 165 | MCFG_CPU_ADD("videocpu", M6809, 3580000/4) |
| 127 | MCFG_CPU_PROGRAM_MAP( | |
| 166 | MCFG_CPU_PROGRAM_MAP( | |
| 128 | 167 | |
| 129 | MCFG_PIA6821_ADD("pia", pia_intf) | |
| 168 | MCFG_CPU_ADD("audiocpu", M6803, XTAL_3_579545MHz) | |
| 169 | MCFG_CPU_PROGRAM_MAP(sound_map) | |
| 170 | MCFG_CPU_IO_MAP(sound_portmap) | |
| 130 | 171 | |
| 172 | MCFG_PIA6821_ADD("videopia", videopia_intf) | |
| 173 | ||
| 131 | 174 | /* video hardware */ |
| 132 | 175 | MCFG_TMS9928A_ADD( "tms9928a", TMS9928A, byvid_tms9928a_interface ) |
| 133 | 176 | MCFG_TMS9928A_SCREEN_ADD_NTSC( "screen" ) |
| 134 | 177 | MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update ) |
| 135 | 178 | |
| 136 | ||
| 137 | 179 | /* sound hardware */ |
| 138 | 180 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 139 | // MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/4) | |
| 140 | // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) | |
| 181 | ||
| 182 | MCFG_SOUND_ADD("dac", DAC, 0) | |
| 183 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 141 | 184 | MACHINE_CONFIG_END |
| 142 | 185 | |
| 143 | 186 | /*----------------------------------------------------- |
| r15082 | r15083 | |
| 149 | 192 | ROM_CONTINUE( 0x5000, 0x0800) |
| 150 | 193 | ROM_LOAD( "891-u6.732", 0x1800, 0x0800, CRC(6136d636) SHA1(c01a0a2fcad3bdabd649128e012ab558b1c90cd3) ) |
| 151 | 194 | ROM_CONTINUE( 0x5800, 0x0800) |
| 152 | ROM_RELOAD( 0x7000, 0x1000) | |
| 195 | ROM_RELOAD( 0x7000, 0x1000) | |
| 196 | ||
| 153 | 197 | ROM_REGION(0x10000, "videocpu", 0) |
| 154 | ROM_LOAD( "891-u9.764", 0x8000, 0x2000, CRC(7fa570f3) SHA1(423ad9266b1ded00fa52ce4180d518874142a203)) | |
| 155 | ROM_LOAD( "891-u10.764", 0xa000, 0x2000, CRC(28f4df8b) SHA1(bd6a3598c2c90b5a3a59327616d2f5b9940d98bc)) | |
| 156 | ROM_LOAD( "891-u11.764", 0xc000, 0x2000, CRC(0a5967a4) SHA1(26d56ddea3f39d41e382449007bf7ba113c0285f)) | |
| 157 | ROM_LOAD( "891-u12.764", 0xe000, 0x2000, CRC(58cfe542) SHA1(e024d14019866bd460d1da6b901f9b786a76a181)) | |
| 158 | ROM_REGION(0x10000, "soundcpu", 0) | |
| 159 | ROM_LOAD( "891-u29.764", 0xe000, 0x2000, CRC(0b57fd5d) SHA1(43a03e6d16c87c3305adb04722484f992f23a1bd)) | |
| 198 | ROM_LOAD( "891-16-u09.764", 0x8000, 0x2000, CRC(781e90e9) SHA1(940047cc875ae531a825af069bb650d59c9495a6)) | |
| 199 | ROM_LOAD( "891-11-u10.764", 0xa000, 0x2000, CRC(28f4df8b) SHA1(bd6a3598c2c90b5a3a59327616d2f5b9940d98bc)) | |
| 200 | ROM_LOAD( "891-05-u11.764", 0xc000, 0x2000, CRC(0a5967a4) SHA1(26d56ddea3f39d41e382449007bf7ba113c0285f)) | |
| 201 | ROM_LOAD( "891-06-u12.764", 0xe000, 0x2000, CRC(58cfe542) SHA1(e024d14019866bd460d1da6b901f9b786a76a181)) | |
| 202 | ||
| 203 | ROM_REGION(0x10000, "audiocpu", 0) | |
| 204 | ROM_LOAD( "891-12-u29.764", 0xe000, 0x2000, CRC(0b57fd5d) SHA1(43a03e6d16c87c3305adb04722484f992f23a1bd)) | |
| 160 | 205 | ROM_END |
| 161 | 206 | |
| 207 | ROM_START(babypac2) | |
| 208 | ROM_REGION(0x10000, "maincpu", 0) | |
| 209 | ROM_LOAD( "891-u2.732", 0x1000, 0x0800, CRC(7f7242d1) SHA1(213a697bb7fc69f93ea04621f0fcfdd796f35196)) | |
| 210 | ROM_CONTINUE( 0x5000, 0x0800) | |
| 211 | ROM_LOAD( "891-u6.732", 0x1800, 0x0800, CRC(6136d636) SHA1(c01a0a2fcad3bdabd649128e012ab558b1c90cd3) ) | |
| 212 | ROM_CONTINUE( 0x5800, 0x0800) | |
| 213 | ROM_RELOAD( 0x7000, 0x1000) | |
| 214 | ||
| 215 | ROM_REGION(0x10000, "videocpu", 0) | |
| 216 | ROM_LOAD( "891-13-u09.764", 0x8000, 0x2000, CRC(7fa570f3) SHA1(423ad9266b1ded00fa52ce4180d518874142a203)) | |
| 217 | ROM_LOAD( "891-11-u10.764", 0xa000, 0x2000, CRC(28f4df8b) SHA1(bd6a3598c2c90b5a3a59327616d2f5b9940d98bc)) | |
| 218 | ROM_LOAD( "891-05-u11.764", 0xc000, 0x2000, CRC(0a5967a4) SHA1(26d56ddea3f39d41e382449007bf7ba113c0285f)) | |
| 219 | ROM_LOAD( "891-06-u12.764", 0xe000, 0x2000, CRC(58cfe542) SHA1(e024d14019866bd460d1da6b901f9b786a76a181)) | |
| 220 | ||
| 221 | ROM_REGION(0x10000, "audiocpu", 0) | |
| 222 | ROM_LOAD( "891-12-u29.764", 0xe000, 0x2000, CRC(0b57fd5d) SHA1(43a03e6d16c87c3305adb04722484f992f23a1bd)) | |
| 223 | ROM_END | |
| 224 | ||
| 162 | 225 | /*----------------------------------------------------------------- |
| 163 | 226 | / Granny and the Gators (Video/Pinball Combo) - (BY35-???: 01/84) |
| 164 | 227 | /----------------------------------------------------------------*/ |
| r15082 | r15083 | |
| 168 | 231 | ROM_CONTINUE( 0x5000, 0x0800) |
| 169 | 232 | ROM_LOAD( "cpu_u6.532", 0x1800, 0x0800, CRC(306aa673) SHA1(422c3d9decf9214a18edb536c2077bf52b272e7d) ) |
| 170 | 233 | ROM_CONTINUE( 0x5800, 0x0800) |
| 171 | ROM_RELOAD( 0xf000, 0x1000) | |
| 234 | ROM_RELOAD( 0xf000, 0x1000) | |
| 235 | ||
| 172 | 236 | ROM_REGION(0x10000, "videocpu", 0) |
| 173 | 237 | ROM_LOAD( "vid_u4.764", 0x4000, 0x2000, CRC(3a3d4c6b) SHA1(a6c27eee178a4bde67004e11f6ddf3b6414571dd)) |
| 174 | 238 | ROM_LOAD( "vid_u5.764", 0x6000, 0x2000, CRC(78bcb0fb) SHA1(d9dc1cc1bef063d5fbdbf2d1daf793234a9c55a0)) |
| r15082 | r15083 | |
| 176 | 240 | ROM_LOAD( "vid_u7.764", 0xa000, 0x2000, CRC(aa71cf29) SHA1(b69cd4060f5d4d2a7f85d901552cdc987013fde2)) |
| 177 | 241 | ROM_LOAD( "vid_u8.764", 0xc000, 0x2000, CRC(a442bc01) SHA1(2c01123dc5799561ae9e7c5d6db588b82b5ae59c)) |
| 178 | 242 | ROM_LOAD( "vid_u9.764", 0xe000, 0x2000, CRC(6b67a1f7) SHA1(251c2b941898363bbd6ee1a94710e2b2938ec851)) |
| 179 | ROM_REGION(0x10000, "soundcpu", 0) | |
| 243 | ||
| 244 | ROM_REGION(0x10000, "audiocpu", 0) | |
| 180 | 245 | ROM_LOAD( "cs_u3.764", 0xe000, 0x2000, CRC(0a39a51d) SHA1(98342ba38e48578ce9870f2ee85b553d46c0e35f)) |
| 181 | 246 | ROM_END |
| 182 | 247 | |
| 183 | 248 | |
| 184 | GAME(1982, babypac, 0, by133, by133, by133, ROT90, "Bally", "Baby Pacman (Video/Pinball Combo)", GAME_IS_SKELETON_MECHANICAL) | |
| 185 | GAME(1984, granny, 0, by133, by133, by133, ROT0, "Bally", "Granny and the Gators (Video/Pinball Combo)", GAME_IS_SKELETON_MECHANICAL) | |
| 249 | GAME( 1982, babypac, 0, by133, by133, by133, ROT90, "Bally", "Baby Pac-Man (set 1)", GAME_IS_SKELETON_MECHANICAL) | |
| 250 | GAME( 1982, babypac2, babypac, by133, by133, by133, ROT90, "Bally", "Baby Pac-Man (set 2)", GAME_IS_SKELETON_MECHANICAL) | |
| 251 | GAME( 1984, granny, 0, by133, by133, by133, ROT0, "Bally", "Granny and the Gators", GAME_IS_SKELETON_MECHANICAL) |
| r15082 | r15083 | |
|---|---|---|
| 43 | 43 | { |
| 44 | 44 | switch (m_trio_control_select) |
| 45 | 45 | { |
| 46 | case 0: return input_port_read(machine(), "P1"); | |
| 47 | case 1: return input_port_read(machine(), "P2"); | |
| 48 | case 2: return input_port_read(machine(), "DSW1"); | |
| 49 | case 3: return input_port_read(machine(), "DSW2"); | |
| 50 | case 4: return input_port_read(machine(), "SYSTEM"); /* VBL */ | |
| 46 | case 0: return ioport("P1")->read(); | |
| 47 | case 1: return ioport("P2")->read(); | |
| 48 | case 2: return ioport("DSW1")->read(); | |
| 49 | case 3: return ioport("DSW2")->read(); | |
| 50 | case 4: return ioport("SYSTEM")->read(); /* VBL */ | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return 0xff; |
| r15082 | r15083 | |
| 154 | 154 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 155 | 155 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 156 | 156 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 157 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 157 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 158 | 158 | |
| 159 | 159 | PORT_START("DSW1") |
| 160 | 160 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 640 | 640 | static const char *const inputnames[] = { "IN0", "IN1", "IN2" }; |
| 641 | 641 | |
| 642 | 642 | if(offset < 0x8) |
| 643 | return i | |
| 643 | return iop | |
| 644 | 644 | |
| 645 | 645 | if(offset < 0x10) |
| 646 | 646 | { |
| 647 | 647 | offset -= 0x8; |
| 648 | 648 | if(offset < 3) |
| 649 | return i | |
| 649 | return iop | |
| 650 | 650 | return 0xff; |
| 651 | 651 | } |
| 652 | 652 |
| r15082 | r15083 | |
|---|---|---|
| 267 | 267 | |
| 268 | 268 | READ8_MEMBER(polepos_state::polepos_adc_r) |
| 269 | 269 | { |
| 270 | return i | |
| 270 | return iop | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | READ8_MEMBER(polepos_state::polepos_ready_r) |
| r15082 | r15083 | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
| 343 | CUSTOM_INPUT_MEMBER(polepos_state::high_port_r){ return input_port_read(field.machine(), (const char *)param) >> 4; } | |
| 344 | CUSTOM_INPUT_MEMBER(polepos_state::low_port_r){ return input_port_read(field.machine(), (const char *)param) & 0x0f; } | |
| 343 | CUSTOM_INPUT_MEMBER(polepos_state::high_port_r){ return field.machine().root_device().ioport((const char *)param)->read() >> 4; } | |
| 344 | CUSTOM_INPUT_MEMBER(polepos_state::low_port_r){ return field.machine().root_device().ioport((const char *)param)->read() & 0x0f; } | |
| 345 | 345 | CUSTOM_INPUT_MEMBER(polepos_state::auto_start_r) |
| 346 | 346 | { |
| 347 | 347 | return m_auto_start_mask; |
| r15082 | r15083 | |
| 409 | 409 | { |
| 410 | 410 | polepos_state *state = device->machine().driver_data<polepos_state>(); |
| 411 | 411 | /* read the current steering value and update our delta */ |
| 412 | UINT8 steer_new = | |
| 412 | UINT8 steer_new = s | |
| 413 | 413 | state->m_steer_accum += (INT8)(steer_new - state->m_steer_last) * 2; |
| 414 | 414 | state->m_steer_last = steer_new; |
| 415 | 415 |
| r15082 | r15083 | |
|---|---|---|
| 257 | 257 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "RC 8" ) |
| 258 | 258 | |
| 259 | 259 | PORT_START("VBLANK") |
| 260 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 260 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 261 | 261 | |
| 262 | 262 | PORT_START("CRASH") |
| 263 | 263 | PORT_ADJUSTER( 50, "Crash, Explosion Volume" ) |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | { |
| 42 | 42 | const char *tag1 = (const char *)param; |
| 43 | 43 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 44 | return i | |
| 44 | return iop | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | CUSTOM_INPUT_MEMBER(qdrmfgp_state::battery_sensor_r) |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | READ16_MEMBER(cps_state::cps1_dsw_r) |
| 248 | 248 | { |
| 249 | 249 | static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" }; |
| 250 | int in = i | |
| 250 | int in = iop | |
| 251 | 251 | return (in << 8) | 0xff; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | READ16_MEMBER(cps_state::cps1_hack_dsw_r) |
| 255 | 255 | { |
| 256 | 256 | static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" }; |
| 257 | int in = i | |
| 257 | int in = iop | |
| 258 | 258 | return (in << 8) | in; |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | READ16_MEMBER(cps_state::forgottn_dial_0_r) |
| 262 | 262 | { |
| 263 | return ((i | |
| 263 | return ((iop | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | READ16_MEMBER(cps_state::forgottn_dial_1_r) |
| 267 | 267 | { |
| 268 | return ((i | |
| 268 | return ((iop | |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | WRITE16_MEMBER(cps_state::forgottn_dial_0_reset_w) |
| 272 | 272 | { |
| 273 | m_dial[0] = i | |
| 273 | m_dial[0] = iop | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | WRITE16_MEMBER(cps_state::forgottn_dial_1_reset_w) |
| 277 | 277 | { |
| 278 | m_dial[1] = i | |
| 278 | m_dial[1] = iop | |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | |
| r15082 | r15083 | |
| 912 | 912 | |
| 913 | 913 | PORT_MODIFY("DSWB") |
| 914 | 914 | /* Standard Dip Switches */ |
| 915 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, | |
| 915 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, | |
| 916 | 916 | PORT_DIPSETTING( 0x04, "1 (Easiest)" ) |
| 917 | 917 | PORT_DIPSETTING( 0x05, "2" ) |
| 918 | 918 | PORT_DIPSETTING( 0x06, "3" ) |
| r15082 | r15083 | |
| 921 | 921 | PORT_DIPSETTING( 0x02, "6" ) |
| 922 | 922 | PORT_DIPSETTING( 0x01, "7" ) |
| 923 | 923 | PORT_DIPSETTING( 0x00, "8 (Hardest)" ) |
| 924 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 924 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 925 | 925 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 926 | 926 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 927 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_CONDITION("DSWC", 0x80, | |
| 927 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_CONDITION("DSWC", 0x80, | |
| 928 | 928 | PORT_DIPSETTING( 0x20, "10K, 30K and every 30K" ) |
| 929 | 929 | PORT_DIPSETTING( 0x10, "20K, 50K and every 70K" ) |
| 930 | 930 | PORT_DIPSETTING( 0x30, "30K, 60K and every 70K" ) |
| 931 | 931 | PORT_DIPSETTING( 0x00, "40K, 70K and every 80K" ) |
| 932 | 932 | /* Debug Dip Switches */ |
| 933 | PORT_DIPNAME( 0x07, 0x07, "Starting Weapon" ) PORT_CONDITION("DSWC", 0x80, | |
| 933 | PORT_DIPNAME( 0x07, 0x07, "Starting Weapon" ) PORT_CONDITION("DSWC", 0x80, | |
| 934 | 934 | PORT_DIPSETTING( 0x07, "Spear" ) |
| 935 | 935 | PORT_DIPSETTING( 0x06, "Knife" ) |
| 936 | 936 | PORT_DIPSETTING( 0x05, "Torch" ) |
| r15082 | r15083 | |
| 939 | 939 | PORT_DIPSETTING( 0x02, "Shield" ) |
| 940 | 940 | PORT_DIPSETTING( 0x01, "Super Weapon" ) |
| 941 | 941 | // PORT_DIPSETTING( 0x00, "INVALID !" ) |
| 942 | PORT_DIPNAME( 0x38, 0x30, "Armor on New Life" ) PORT_CONDITION("DSWC", 0x80, | |
| 942 | PORT_DIPNAME( 0x38, 0x30, "Armor on New Life" ) PORT_CONDITION("DSWC", 0x80, | |
| 943 | 943 | // PORT_DIPSETTING( 0x38, "Silver Armor" ) |
| 944 | 944 | PORT_DIPSETTING( 0x18, "Golden Armor" ) |
| 945 | 945 | PORT_DIPSETTING( 0x30, "Silver Armor" ) |
| r15082 | r15083 | |
| 956 | 956 | |
| 957 | 957 | PORT_MODIFY("DSWA") |
| 958 | 958 | /* Standard Dip Switches */ |
| 959 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, | |
| 959 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, | |
| 960 | 960 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 961 | 961 | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 962 | 962 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 965 | 965 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 966 | 966 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) |
| 967 | 967 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) ) |
| 968 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, | |
| 968 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, | |
| 969 | 969 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 970 | 970 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) |
| 971 | 971 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 975 | 975 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) |
| 976 | 976 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) ) |
| 977 | 977 | /* Debug Dip Switches */ |
| 978 | PORT_DIPNAME( 0x0f, 0x0f, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, | |
| 978 | PORT_DIPNAME( 0x0f, 0x0f, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, | |
| 979 | 979 | PORT_DIPSETTING( 0x0f, "Level 1 (1st half)" ) |
| 980 | 980 | PORT_DIPSETTING( 0x0e, "Level 1 (2nd half)" ) |
| 981 | 981 | PORT_DIPSETTING( 0x0d, "Level 2 (1st half)" ) |
| r15082 | r15083 | |
| 992 | 992 | // PORT_DIPSETTING( 0x02, "INVALID !" ) |
| 993 | 993 | // PORT_DIPSETTING( 0x01, "INVALID !" ) |
| 994 | 994 | // PORT_DIPSETTING( 0x00, "INVALID !" ) |
| 995 | PORT_DIPNAME( 0x10, 0x10, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, | |
| 995 | PORT_DIPNAME( 0x10, 0x10, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, | |
| 996 | 996 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 997 | 997 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 998 | PORT_DIPNAME( 0x20, 0x20, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, | |
| 998 | PORT_DIPNAME( 0x20, 0x20, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, | |
| 999 | 999 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1000 | 1000 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1001 | 1001 | |
| r15082 | r15083 | |
| 1139 | 1139 | |
| 1140 | 1140 | PORT_START("DSWC") |
| 1141 | 1141 | /* Standard Dip Switches */ |
| 1142 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1142 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1143 | 1143 | PORT_DIPSETTING( 0x02, "1" ) |
| 1144 | 1144 | PORT_DIPSETTING( 0x03, "2" ) |
| 1145 | 1145 | PORT_DIPSETTING( 0x01, "3" ) |
| 1146 | 1146 | PORT_DIPSETTING( 0x00, "4" ) |
| 1147 | PORT_DIPNAME( 0x0c, 0x0c, "Vitality" ) PORT_CONDITION("DSWC", 0x80, | |
| 1147 | PORT_DIPNAME( 0x0c, 0x0c, "Vitality" ) PORT_CONDITION("DSWC", 0x80, | |
| 1148 | 1148 | PORT_DIPSETTING( 0x00, "2" ) |
| 1149 | 1149 | PORT_DIPSETTING( 0x0c, "3" ) |
| 1150 | 1150 | PORT_DIPSETTING( 0x08, "4" ) |
| 1151 | 1151 | PORT_DIPSETTING( 0x04, "5" ) |
| 1152 | 1152 | /* Debug Dip Switches */ |
| 1153 | PORT_DIPNAME( 0x01, 0x01, "Turbo Mode" ) PORT_CONDITION("DSWC", 0x80, | |
| 1153 | PORT_DIPNAME( 0x01, 0x01, "Turbo Mode" ) PORT_CONDITION("DSWC", 0x80, | |
| 1154 | 1154 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1155 | 1155 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1156 | PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_CONDITION("DSWC", 0x80, | |
| 1156 | PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_CONDITION("DSWC", 0x80, | |
| 1157 | 1157 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1158 | 1158 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1159 | PORT_DIPNAME( 0x04, 0x04, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, | |
| 1159 | PORT_DIPNAME( 0x04, 0x04, "Slow Motion" ) PORT_CONDITION("DSWC", 0x80, | |
| 1160 | 1160 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1161 | 1161 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1162 | PORT_DIPNAME( 0x08, 0x08, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, | |
| 1162 | PORT_DIPNAME( 0x08, 0x08, "Invulnerability" ) PORT_CONDITION("DSWC", 0x80, | |
| 1163 | 1163 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1164 | 1164 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1165 | 1165 | |
| r15082 | r15083 | |
| 1168 | 1168 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1169 | 1169 | |
| 1170 | 1170 | /* Standard Dip Switches */ |
| 1171 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1171 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1172 | 1172 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1173 | 1173 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 1174 | 1174 | /* Debug Dip Switches */ |
| 1175 | PORT_DIPNAME( 0x20, 0x20, "Display Debug Infos" ) PORT_CONDITION("DSWC", 0x80, | |
| 1175 | PORT_DIPNAME( 0x20, 0x20, "Display Debug Infos" ) PORT_CONDITION("DSWC", 0x80, | |
| 1176 | 1176 | PORT_DIPSETTING( 0x20, DEF_STR( No ) ) |
| 1177 | 1177 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1178 | 1178 | |
| r15082 | r15083 | |
| 1185 | 1185 | |
| 1186 | 1186 | PORT_START("DSWB") |
| 1187 | 1187 | /* Standard Dip Switches */ |
| 1188 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1188 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1189 | 1189 | PORT_DIPSETTING( 0x04, "1 (Easiest)" ) |
| 1190 | 1190 | PORT_DIPSETTING( 0x05, "2" ) |
| 1191 | 1191 | PORT_DIPSETTING( 0x06, "3" ) |
| r15082 | r15083 | |
| 1194 | 1194 | PORT_DIPSETTING( 0x02, "6" ) |
| 1195 | 1195 | PORT_DIPSETTING( 0x01, "7" ) |
| 1196 | 1196 | PORT_DIPSETTING( 0x00, "8 (Hardest)" ) |
| 1197 | PORT_DIPNAME( 0x18, 0x18, "Nando Speed" ) PORT_CONDITION("DSWC", 0x80, | |
| 1197 | PORT_DIPNAME( 0x18, 0x18, "Nando Speed" ) PORT_CONDITION("DSWC", 0x80, | |
| 1198 | 1198 | PORT_DIPSETTING( 0x10, "Slow" ) |
| 1199 | 1199 | PORT_DIPSETTING( 0x18, DEF_STR( Normal ) ) |
| 1200 | 1200 | PORT_DIPSETTING( 0x08, "Fast" ) |
| 1201 | 1201 | PORT_DIPSETTING( 0x00, "Very Fast" ) |
| 1202 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1202 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1203 | 1203 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1204 | 1204 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1205 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1205 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1206 | 1206 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1207 | 1207 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1208 | PORT_DIPNAME( 0x80, 0x80, "Stage Magic Continue" ) PORT_CONDITION("DSWC", 0x80, | |
| 1208 | PORT_DIPNAME( 0x80, 0x80, "Stage Magic Continue" ) PORT_CONDITION("DSWC", 0x80, | |
| 1209 | 1209 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1210 | 1210 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1211 | 1211 | /* Debug Dip Switches */ |
| 1212 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1212 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1213 | 1213 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1214 | 1214 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1215 | PORT_DIPNAME( 0x1e, 0x1e, "Slow Motion Delay" ) PORT_CONDITION("DSWC", 0x80, | |
| 1215 | PORT_DIPNAME( 0x1e, 0x1e, "Slow Motion Delay" ) PORT_CONDITION("DSWC", 0x80, | |
| 1216 | 1216 | PORT_DIPSETTING( 0x1e, "2 Frames" ) |
| 1217 | 1217 | PORT_DIPSETTING( 0x1c, "3 Frames" ) |
| 1218 | 1218 | PORT_DIPSETTING( 0x1a, "4 Frames" ) |
| r15082 | r15083 | |
| 1229 | 1229 | PORT_DIPSETTING( 0x04, "15 Frames" ) |
| 1230 | 1230 | PORT_DIPSETTING( 0x02, "16 Frames" ) |
| 1231 | 1231 | PORT_DIPSETTING( 0x00, "17 Frames" ) |
| 1232 | PORT_DIPNAME( 0xe0, 0xe0, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, | |
| 1232 | PORT_DIPNAME( 0xe0, 0xe0, "Starting Level" ) PORT_CONDITION("DSWC", 0x80, | |
| 1233 | 1233 | PORT_DIPSETTING( 0xe0, "Level 1" ) |
| 1234 | 1234 | PORT_DIPSETTING( 0xc0, "Level 2" ) |
| 1235 | 1235 | PORT_DIPSETTING( 0xa0, "Level 3" ) |
| r15082 | r15083 | |
| 1241 | 1241 | |
| 1242 | 1242 | PORT_START("DSWA") |
| 1243 | 1243 | /* Standard Dip Switches */ |
| 1244 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1244 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1245 | 1245 | PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) |
| 1246 | 1246 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 1247 | 1247 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 1250 | 1250 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) |
| 1251 | 1251 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 1252 | 1252 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) |
| 1253 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1253 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1254 | 1254 | PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) ) |
| 1255 | 1255 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| 1256 | 1256 | PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) |
| r15082 | r15083 | |
| 1259 | 1259 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 1260 | 1260 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 1261 | 1261 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) |
| 1262 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1262 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1263 | 1263 | PORT_DIPSETTING( 0xc0, "Upright 1 Player" ) |
| 1264 | 1264 | PORT_DIPSETTING( 0x80, "Upright 2 Players" ) |
| 1265 | 1265 | // PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 1266 | 1266 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 1267 | 1267 | /* Debug Dip Switches */ |
| 1268 | PORT_DIPNAME( 0x3f, 0x3f, DEF_STR( Free_Play ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1268 | PORT_DIPNAME( 0x3f, 0x3f, DEF_STR( Free_Play ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1269 | 1269 | PORT_DIPSETTING( 0x3f, DEF_STR( Off ) ) |
| 1270 | 1270 | PORT_DIPSETTING( 0x38, DEF_STR( On ) ) |
| 1271 | 1271 | /* Other values don't give free play */ |
| 1272 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1272 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) ) PORT_CONDITION("DSWC", 0x80, | |
| 1273 | 1273 | PORT_DIPSETTING( 0x40, "Upright 1 Player" ) |
| 1274 | 1274 | PORT_DIPSETTING( 0x00, "Upright 2 Players" ) |
| 1275 | PORT_DIPNAME( 0x80, 0x80, "Maximum magic/sword power" ) PORT_CONDITION("DSWC", 0x80, | |
| 1275 | PORT_DIPNAME( 0x80, 0x80, "Maximum magic/sword power" ) PORT_CONDITION("DSWC", 0x80, | |
| 1276 | 1276 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1277 | 1277 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1278 | 1278 | INPUT_PORTS_END |
| r15082 | r15083 | |
| 1818 | 1818 | |
| 1819 | 1819 | PORT_START("DSWA") |
| 1820 | 1820 | CPS1_COINAGE_1( "SW(A)" ) |
| 1821 | PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_CONDITION("DSWA", 0x3f, | |
| 1821 | PORT_DIPNAME( 0x40, 0x40, "2 Coins to Start, 1 to Continue" ) PORT_CONDITION("DSWA", 0x3f, | |
| 1822 | 1822 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1823 | 1823 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1824 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_CONDITION("DSWA", 0x3f, | |
| 1824 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_CONDITION("DSWA", 0x3f, | |
| 1825 | 1825 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1826 | 1826 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1827 | 1827 | /* Free Play: ALL bits 0 to 7 must be ON ; 4C_1C, 4C_1C, 2 Coins to Start, 1 to Continue ON */ |
| r15082 | r15083 | |
|---|---|---|
| 268 | 268 | CUSTOM_INPUT_MEMBER(scobra_state::stratgyx_coinage_r) |
| 269 | 269 | { |
| 270 | 270 | int bit_mask = (FPTR)param; |
| 271 | return (i | |
| 271 | return (iop | |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | /* monitor motor under joystick control */ |
| 82 | 82 | if (*state->m_motor_on & 0x01) |
| 83 | 83 | { |
| 84 | int ip3 = input_port_read(machine, "IN3"); | |
| 85 | int ip4 = input_port_read(machine, "FAKE"); | |
| 84 | int ip3 = machine.root_device().ioport("IN3")->read(); | |
| 85 | int ip4 = machine.root_device().ioport("FAKE")->read(); | |
| 86 | 86 | |
| 87 | 87 | /* up */ |
| 88 | 88 | if (((ip4 & 0x01) == 0) && (state->m_vert_pos > -128)) |
| r15082 | r15083 | |
|---|---|---|
| 696 | 696 | switch( offset ) |
| 697 | 697 | { |
| 698 | 698 | case 0: |
| 699 | data = i | |
| 699 | data = iop | |
| 700 | 700 | break; |
| 701 | 701 | case 1: |
| 702 | data = ( i | |
| 702 | data = ( iop | |
| 703 | 703 | break; |
| 704 | 704 | case 2: |
| 705 | data = i | |
| 705 | data = iop | |
| 706 | 706 | break; |
| 707 | 707 | case 3: |
| 708 | data = ( i | |
| 708 | data = ( iop | |
| 709 | 709 | break; |
| 710 | 710 | } |
| 711 | 711 | verboselog( machine(), 2, "lightgun_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| r15082 | r15083 | |
| 750 | 750 | switch (offset) |
| 751 | 751 | { |
| 752 | 752 | case 0: |
| 753 | return i | |
| 753 | return iop | |
| 754 | 754 | |
| 755 | 755 | case 1: |
| 756 | return i | |
| 756 | return iop | |
| 757 | 757 | |
| 758 | 758 | case 2: |
| 759 | return i | |
| 759 | return iop | |
| 760 | 760 | |
| 761 | 761 | case 3: |
| 762 | return i | |
| 762 | return iop | |
| 763 | 763 | } |
| 764 | 764 | |
| 765 | 765 | return 0xff; |
| r15082 | r15083 | |
| 779 | 779 | |
| 780 | 780 | READ8_MEMBER(namcos11_state::dac7_r)// bit 7 |
| 781 | 781 | { |
| 782 | return i | |
| 782 | return iop | |
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | READ8_MEMBER(namcos11_state::dac6_r)// bit 3 |
| 786 | 786 | { |
| 787 | return (i | |
| 787 | return (iop | |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | 790 | READ8_MEMBER(namcos11_state::dac5_r)// bit 2 |
| 791 | 791 | { |
| 792 | return (i | |
| 792 | return (iop | |
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | READ8_MEMBER(namcos11_state::dac4_r)// bit 1 |
| 796 | 796 | { |
| 797 | return (i | |
| 797 | return (iop | |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | READ8_MEMBER(namcos11_state::dac3_r)// bit 0 |
| 801 | 801 | { |
| 802 | return (i | |
| 802 | return (iop | |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | 805 | READ8_MEMBER(namcos11_state::dac2_r)// bit 4 |
| 806 | 806 | { |
| 807 | return (i | |
| 807 | return (iop | |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | 810 | READ8_MEMBER(namcos11_state::dac1_r)// bit 5 |
| 811 | 811 | { |
| 812 | return (i | |
| 812 | return (iop | |
| 813 | 813 | } |
| 814 | 814 | |
| 815 | 815 | READ8_MEMBER(namcos11_state::dac0_r)// bit 6 |
| 816 | 816 | { |
| 817 | return (i | |
| 817 | return (iop | |
| 818 | 818 | } |
| 819 | 819 | |
| 820 | 820 | READ8_MEMBER(namcos11_state::pocketrc_gas_r) |
| 821 | 821 | { |
| 822 | return i | |
| 822 | return iop | |
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | READ8_MEMBER(namcos11_state::pocketrc_steer_r) |
| 826 | 826 | { |
| 827 | return i | |
| 827 | return iop | |
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | ADDRESS_MAP_START( c76_io_map, AS_IO, 8, namcos11_state ) |
| r15082 | r15083 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | CUSTOM_INPUT_MEMBER(lethalj_state::cclownz_paddle) |
| 163 | 163 | { |
| 164 | int value = i | |
| 164 | int value = iop | |
| 165 | 165 | return ((value << 4) & 0xf00) | (value & 0x00f); |
| 166 | 166 | } |
| 167 | 167 |
| r15082 | r15083 | |
|---|---|---|
| 1104 | 1104 | { |
| 1105 | 1105 | const char *tag1 = (const char *)param; |
| 1106 | 1106 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 1107 | return i | |
| 1107 | return iop | |
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | 1110 | static INPUT_PORTS_START( gtg ) |
| r15082 | r15083 | |
|---|---|---|
| 452 | 452 | galaxian_state *state = device->machine().driver_data<galaxian_state>(); |
| 453 | 453 | interrupt_gen(device); |
| 454 | 454 | |
| 455 | if ( | |
| 455 | if (s | |
| 456 | 456 | { |
| 457 | 457 | state->m_tenspot_current_game++; |
| 458 | 458 | state->m_tenspot_current_game%=10; |
| r15082 | r15083 | |
| 1103 | 1103 | const char *portname = (const char *)param; |
| 1104 | 1104 | if (m_gmgalax_selected_game != 0) |
| 1105 | 1105 | portname += strlen(portname) + 1; |
| 1106 | return i | |
| 1106 | return iop | |
| 1107 | 1107 | } |
| 1108 | 1108 | |
| 1109 | 1109 | |
| r15082 | r15083 | |
| 1154 | 1154 | |
| 1155 | 1155 | CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r) |
| 1156 | 1156 | { |
| 1157 | return (i | |
| 1157 | return (iop | |
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | 1160 | |
| r15082 | r15083 | |
| 1168 | 1168 | CUSTOM_INPUT_MEMBER(galaxian_state::kingball_muxbit_r) |
| 1169 | 1169 | { |
| 1170 | 1170 | /* multiplex the service mode switch with a speech DIP switch */ |
| 1171 | return (i | |
| 1171 | return (iop | |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | 1174 | |
| r15082 | r15083 | |
| 2810 | 2810 | |
| 2811 | 2811 | /* ROM is banked */ |
| 2812 | 2812 | space->install_read_bank(0x0000, 0x3fff, "bank1"); |
| 2813 | | |
| 2813 | sta | |
| 2814 | 2814 | |
| 2815 | 2815 | /* callback when the game select is toggled */ |
| 2816 | state->gmgalax_game_changed(*machine.ioport().first_port()->fi | |
| 2816 | state->gmgalax_game_changed(*machine.ioport().first_port()->fir | |
| 2817 | 2817 | state_save_register_global(machine, state->m_gmgalax_selected_game); |
| 2818 | 2818 | } |
| 2819 | 2819 | |
| r15082 | r15083 | |
| 2927 | 2927 | { |
| 2928 | 2928 | char tmp[64]; |
| 2929 | 2929 | sprintf(tmp,"IN2_GAME%d", m_tenspot_current_game); |
| 2930 | return i | |
| 2930 | return iop | |
| 2931 | 2931 | } |
| 2932 | 2932 | |
| 2933 | 2933 | |
| r15082 | r15083 | |
| 3026 | 3026 | /* make ROMs 2 & 3 swappable */ |
| 3027 | 3027 | space->install_read_bank(0x2000, 0x2fff, "bank1"); |
| 3028 | 3028 | space->install_read_bank(0x3000, 0x3fff, "bank2"); |
| 3029 | state->membank("bank1")->configure_entries(0, 2, machine.root_device().memregion("maincpu")->base() + 0x2000, 0x1000); | |
| 3030 | state->membank("bank2")->configure_entries(0, 2, machine.root_device().memregion("maincpu")->base() + 0x2000, 0x1000); | |
| 3029 | state->membank("bank1")->configure_entries(0, 2, state->memregion("maincpu")->base() + 0x2000, 0x1000); | |
| 3030 | state->membank("bank2")->configure_entries(0, 2, state->memregion("maincpu")->base() + 0x2000, 0x1000); | |
| 3031 | 3031 | |
| 3032 | 3032 | /* also re-install the fixed ROM area as a bank in order to inform the memory system that |
| 3033 | 3033 | the fixed area only extends to 0x1fff */ |
| r15082 | r15083 | |
| 3502 | 3502 | |
| 3503 | 3503 | /* extra ROM */ |
| 3504 | 3504 | space->install_read_bank(0x5800, 0x67ff, "bank1"); |
| 3505 | state->membank("bank1")->set_base( | |
| 3505 | state->membank("bank1")->set_base(sta | |
| 3506 | 3506 | |
| 3507 | 3507 | /* no background related */ |
| 3508 | 3508 | // space->nop_write(0x6803, 0x6803); |
| r15082 | r15083 | |
|---|---|---|
| 45 | 45 | : driver_device(mconfig, type, tag), |
| 46 | 46 | m_maincpu(*this, "maincpu") |
| 47 | 47 | { } |
| 48 | UINT32* m_cpuregion; | |
| 49 | UINT32* m_mainram; | |
| 48 | 50 | |
| 51 | DECLARE_READ32_MEMBER(mpu5_mem_r); | |
| 52 | DECLARE_WRITE32_MEMBER(mpu5_mem_w); | |
| 53 | ||
| 49 | 54 | protected: |
| 50 | 55 | |
| 51 | 56 | // devices |
| r15082 | r15083 | |
| 53 | 58 | }; |
| 54 | 59 | |
| 55 | 60 | |
| 61 | READ32_MEMBER(mpu5_state::mpu5_mem_r) | |
| 62 | { | |
| 63 | int pc = cpu_get_pc(&space.device()); | |
| 64 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 65 | ||
| 66 | switch ( cs ) | |
| 67 | { | |
| 68 | case 1: | |
| 69 | return m_cpuregion[offset]; | |
| 70 | ||
| 71 | case 4: | |
| 72 | offset &=0x3fff; | |
| 73 | return (m_mainram[offset]); | |
| 74 | ||
| 75 | default: | |
| 76 | logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 77 | ||
| 78 | } | |
| 79 | ||
| 80 | return 0x0000; | |
| 81 | } | |
| 82 | ||
| 83 | WRITE32_MEMBER(mpu5_state::mpu5_mem_w) | |
| 84 | { | |
| 85 | int pc = cpu_get_pc(&space.device()); | |
| 86 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 87 | ||
| 88 | switch ( cs ) | |
| 89 | { | |
| 90 | case 4: | |
| 91 | offset &=0x3fff; | |
| 92 | COMBINE_DATA(&m_mainram[offset]); | |
| 93 | break; | |
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | default: | |
| 98 | logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); | |
| 99 | ||
| 100 | } | |
| 101 | ||
| 102 | } | |
| 103 | ||
| 56 | 104 | static ADDRESS_MAP_START( mpu5_map, AS_PROGRAM, 32, mpu5_state ) |
| 57 | AM_RANGE(0x000000, 0x | |
| 105 | AM_RANGE(0x00000000, 0x | |
| 58 | 106 | ADDRESS_MAP_END |
| 59 | 107 | |
| 60 | 108 | static INPUT_PORTS_START( mpu5 ) |
| 61 | 109 | INPUT_PORTS_END |
| 62 | 110 | |
| 111 | ||
| 112 | static MACHINE_START( mpu5 ) | |
| 113 | { | |
| 114 | mpu5_state *state = machine.driver_data<mpu5_state>(); | |
| 115 | state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base(); | |
| 116 | state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 117 | ||
| 118 | } | |
| 119 | ||
| 120 | ||
| 63 | 121 | static MACHINE_CONFIG_START( mpu5, mpu5_state ) |
| 64 | 122 | MCFG_CPU_ADD("maincpu", M68340, 16000000) // ? |
| 65 | 123 | MCFG_CPU_PROGRAM_MAP(mpu5_map) |
| 66 | 124 | |
| 125 | MCFG_MACHINE_START( mpu5 ) | |
| 126 | ||
| 67 | 127 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 68 | 128 | /* unknown sound */ |
| 69 | 129 | MACHINE_CONFIG_END |
| r15082 | r15083 | |
|---|---|---|
| 104 | 104 | |
| 105 | 105 | static INPUT_PORTS_START( othldrby ) |
| 106 | 106 | PORT_START("VBLANK") |
| 107 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 107 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 108 | 108 | |
| 109 | 109 | PORT_START("DSW1") |
| 110 | 110 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) |
| r15082 | r15083 | |
|---|---|---|
| 269 | 269 | { |
| 270 | 270 | static const char *const port[] = { "GUNX1", "GUNY1", "GUNX2", "GUNY2", "GUNX3", "GUNY3" }; |
| 271 | 271 | |
| 272 | UINT16 retdata = i | |
| 272 | UINT16 retdata = iop | |
| 273 | 273 | |
| 274 | 274 | retdata >>=1; // by lowering the precision of the gun reading hardware the game seems to work better |
| 275 | 275 | |
| r15082 | r15083 | |
| 309 | 309 | { |
| 310 | 310 | int x, y; |
| 311 | 311 | |
| 312 | x = input_port_read(machine(), offset ? "GUNX2" : "GUNX1"); | |
| 313 | y = input_port_read(machine(), offset ? "GUNY2" : "GUNY1"); | |
| 312 | x = ioport(offset ? "GUNX2" : "GUNX1")->read(); | |
| 313 | y = ioport(offset ? "GUNY2" : "GUNY1")->read(); | |
| 314 | 314 | |
| 315 | 315 | /* Todo - does the hardware really clamp like this? */ |
| 316 | 316 | x += 0x18; |
| r15082 | r15083 | |
|---|---|---|
| 208 | 208 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 209 | 209 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 210 | 210 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 211 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 211 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 212 | 212 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 213 | 213 | |
| 214 | 214 | PORT_START("COIN") |
| r15082 | r15083 | |
| 268 | 268 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 269 | 269 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 270 | 270 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 271 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 271 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 272 | 272 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 273 | 273 | |
| 274 | 274 | PORT_START("COIN") |
| r15082 | r15083 | |
|---|---|---|
| 660 | 660 | static WRITE_LINE_DEVICE_HANDLER( tx_rx_clk ) |
| 661 | 661 | { |
| 662 | 662 | int trx_clk; |
| 663 | UINT8 dsw2 = | |
| 663 | UINT8 dsw2 = | |
| 664 | 664 | trx_clk = UART_CLOCK * dsw2 / 128; |
| 665 | 665 | acia6850_device *acia = downcast<acia6850_device *>(device); |
| 666 | 666 | acia->set_rx_clock(trx_clk); |
| r15082 | r15083 | |
| 673 | 673 | calomega_state *state = device->machine().driver_data<calomega_state>(); |
| 674 | 674 | switch( state->m_s903_mux_data & 0xf0 ) /* bits 4-7 */ |
| 675 | 675 | { |
| 676 | case 0x10: return input_port_read(device->machine(), "IN0-0"); | |
| 677 | case 0x20: return input_port_read(device->machine(), "IN0-1"); | |
| 678 | case 0x40: return input_port_read(device->machine(), "IN0-2"); | |
| 679 | case 0x80: return input_port_read(device->machine(), "IN0-3"); | |
| 676 | case 0x10: return state->ioport("IN0-0")->read(); | |
| 677 | case 0x20: return state->ioport("IN0-1")->read(); | |
| 678 | case 0x40: return state->ioport("IN0-2")->read(); | |
| 679 | case 0x80: return state->ioport("IN0-3")->read(); | |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | return | |
| 682 | return | |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | static WRITE8_DEVICE_HANDLER( s903_mux_w ) |
| r15082 | r15083 | |
| 695 | 695 | calomega_state *state = device->machine().driver_data<calomega_state>(); |
| 696 | 696 | switch( state->m_s905_mux_data & 0x0f ) /* bits 0-3 */ |
| 697 | 697 | { |
| 698 | case 0x01: return input_port_read(device->machine(), "IN0-0"); | |
| 699 | case 0x02: return input_port_read(device->machine(), "IN0-1"); | |
| 700 | case 0x04: return input_port_read(device->machine(), "IN0-2"); | |
| 701 | case 0x08: return input_port_read(device->machine(), "IN0-3"); | |
| 698 | case 0x01: return state->ioport("IN0-0")->read(); | |
| 699 | case 0x02: return state->ioport("IN0-1")->read(); | |
| 700 | case 0x04: return state->ioport("IN0-2")->read(); | |
| 701 | case 0x08: return state->ioport("IN0-3")->read(); | |
| 702 | 702 | } |
| 703 | 703 | |
| 704 | return | |
| 704 | return | |
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | static WRITE8_DEVICE_HANDLER( s905_mux_w ) |
| r15082 | r15083 | |
| 717 | 717 | { |
| 718 | 718 | /* Valid input port. Each polled value is stored at $0538 */ |
| 719 | 719 | logerror("PIA0: Port A in\n"); |
| 720 | return | |
| 720 | return | |
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | static READ8_DEVICE_HANDLER( pia0_bin_r ) |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | sfkick_state *state = device->machine().driver_data<sfkick_state>(); |
| 92 | 92 | switch(state->m_input_mux&0x0f) |
| 93 | 93 | { |
| 94 | case 0: return input_port_read(device->machine(), "IN0"); | |
| 95 | case 1: return input_port_read(device->machine(), "IN1"); | |
| 96 | case 2: return BITSWAP8(input_port_read(device->machine(), "DIAL"),4,5,6,7,3,2,1,0); | |
| 97 | case 3: return input_port_read(device->machine(), "DSW2"); | |
| 98 | case 4: return input_port_read(device->machine(), "DSW1"); | |
| 94 | case 0: return state->ioport("IN0")->read(); | |
| 95 | case 1: return state->ioport("IN1")->read(); | |
| 96 | case 2: return BITSWAP8(state->ioport("DIAL")->read(),4,5,6,7,3,2,1,0); | |
| 97 | case 3: return state->ioport("DSW2")->read(); | |
| 98 | case 4: return state->ioport("DSW1")->read(); | |
| 99 | 99 | } |
| 100 | 100 | return 0xff; |
| 101 | 101 | } |
| r15082 | r15083 | |
|---|---|---|
| 195 | 195 | { |
| 196 | 196 | /* burn a bunch of cycles because this is polled frequently during busy loops */ |
| 197 | 197 | device_eat_cycles(&space.device(), 100); |
| 198 | return i | |
| 198 | return iop | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | static ADDRESS_MAP_START( cpu_map, AS_PROGRAM, 32, dgpix_state ) |
| r15082 | r15083 | |
| 250 | 250 | |
| 251 | 251 | static INPUT_PORTS_START( dgpix ) |
| 252 | 252 | PORT_START("VBLANK") |
| 253 | PORT_BIT( 0x00000003, IP_ACTIVE_LOW, IPT_VBLANK | |
| 253 | PORT_BIT( 0x00000003, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") //value 2 is used by fmaniac3 | |
| 254 | 254 | PORT_BIT( 0xfffffffc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 255 | 255 | |
| 256 | 256 | PORT_START("INPUTS") |
| r15082 | r15083 | |
|---|---|---|
| 255 | 255 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 256 | 256 | PORT_DIPUNUSED_DIPLOC( 0x10, 0x00, "50H:!2" ) /* Listed As "SPARE2 (Unused)" */ |
| 257 | 257 | PORT_DIPUNUSED_DIPLOC( 0x20, 0x00, "50H:!1" ) /* Listed As "SPARE1 (Unused)" */ |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 259 | 259 | PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) |
| 260 | 260 | |
| 261 | 261 | PORT_START("IN1") |
| r15082 | r15083 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | static READ8_DEVICE_HANDLER(via_b_in) |
| 232 | 232 | { |
| 233 | return | |
| 233 | return | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | |
| r15082 | r15083 | |
| 444 | 444 | PORT_START("IN3") |
| 445 | 445 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) |
| 446 | 446 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 447 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 447 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 448 | 448 | |
| 449 | 449 | INPUT_PORTS_END |
| 450 | 450 | |
| r15082 | r15083 | |
| 453 | 453 | bmcbowl_state *state = device->machine().driver_data<bmcbowl_state>(); |
| 454 | 454 | switch(state->m_bmc_input) |
| 455 | 455 | { |
| 456 | case 0x00: return input_port_read(device->machine(), "IN1"); | |
| 457 | case 0x40: return input_port_read(device->machine(), "IN2"); | |
| 456 | case 0x00: return state->ioport("IN1")->read(); | |
| 457 | case 0x40: return state->ioport("IN2")->read(); | |
| 458 | 458 | } |
| 459 | 459 | logerror("%s:unknown input - %X\n",device->machine().describe_context(),state->m_bmc_input); |
| 460 | 460 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 311 | 311 | address_space *ramspace = device->memory().space(AS_PROGRAM); |
| 312 | 312 | UINT8 player = 0; |
| 313 | 313 | |
| 314 | if ((ramspace->read_byte(0xe00f) == 0x01) && (( | |
| 314 | if ((ramspace->read_byte(0xe00f) == 0x01) && ((s | |
| 315 | 315 | player = 1; |
| 316 | 316 | |
| 317 | int current_power= | |
| 317 | int current_power=s | |
| 318 | 318 | if(current_power != state->m_previous_power) |
| 319 | 319 | { |
| 320 | 320 | popmessage ("%d%%", (current_power * 100) / 0x3f); |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | PORT_START("IN3") /* 0x91 */ |
| 148 | 148 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 150 | 150 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 151 | 151 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 152 | 152 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 192 | 192 | |
| 193 | 193 | PORT_START("IN3") /* 0xD1 */ |
| 194 | 194 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 195 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 195 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 196 | 196 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 197 | 197 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 198 | 198 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 225 | 225 | |
| 226 | 226 | PORT_START("IN3") /* 0x91 */ |
| 227 | 227 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 228 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 228 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 229 | 229 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 230 | 230 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 231 | 231 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 264 | 264 | |
| 265 | 265 | PORT_START("IN3") /* 0xD1 */ |
| 266 | 266 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 267 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 267 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 268 | 268 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 269 | 269 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 270 | 270 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 300 | 300 | |
| 301 | 301 | PORT_START("IN3") /* 0xD1 */ |
| 302 | 302 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 303 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 303 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 304 | 304 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 305 | 305 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 306 | 306 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 335 | 335 | |
| 336 | 336 | PORT_START("IN3") /* 0x91 */ |
| 337 | 337 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 338 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 338 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 339 | 339 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 340 | 340 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 341 | 341 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 370 | 370 | |
| 371 | 371 | PORT_START("IN3") /* 0x51/D1 */ |
| 372 | 372 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 373 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 373 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 374 | 374 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 375 | 375 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 376 | 376 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 407 | 407 | |
| 408 | 408 | PORT_START("IN3") /* 0xD1 */ |
| 409 | 409 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 410 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 410 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 411 | 411 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 412 | 412 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 413 | 413 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 445 | 445 | |
| 446 | 446 | PORT_START("IN3") /* 0x91 */ |
| 447 | 447 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 448 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 448 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 449 | 449 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 450 | 450 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 451 | 451 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 487 | 487 | |
| 488 | 488 | PORT_START("IN3") /* 0x91 */ |
| 489 | 489 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 490 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 490 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 491 | 491 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 492 | 492 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 493 | 493 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 545 | 545 | |
| 546 | 546 | PORT_START("IN3") /* 0x91 */ |
| 547 | 547 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 548 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 548 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 549 | 549 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 550 | 550 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 551 | 551 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 600 | 600 | |
| 601 | 601 | PORT_START("IN3") /* 0xD1 */ |
| 602 | 602 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 603 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 603 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 604 | 604 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 605 | 605 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) |
| 606 | 606 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 660 | 660 | |
| 661 | 661 | PORT_START("IN3") /* 0x51 */ |
| 662 | 662 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 663 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 663 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 664 | 664 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) |
| 665 | 665 | PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 666 | 666 |
| r15082 | r15083 | |
|---|---|---|
| 290 | 290 | /* triggered by REDD,r opcode */ |
| 291 | 291 | READ8_MEMBER(lazercmd_state::lazercmd_data_port_r) |
| 292 | 292 | { |
| 293 | UINT8 data = i | |
| 293 | UINT8 data = iop | |
| 294 | 294 | return data; |
| 295 | 295 | } |
| 296 | 296 | |
| r15082 | r15083 | |
| 370 | 370 | switch (offset) |
| 371 | 371 | { |
| 372 | 372 | case 0: /* player 1 joysticks */ |
| 373 | data = i | |
| 373 | data = iop | |
| 374 | 374 | break; |
| 375 | 375 | case 1: /* player 2 joysticks */ |
| 376 | data = i | |
| 376 | data = iop | |
| 377 | 377 | break; |
| 378 | 378 | case 2: /* player 1 + 2 buttons */ |
| 379 | data = i | |
| 379 | data = iop | |
| 380 | 380 | break; |
| 381 | 381 | case 3: /* coin slot + start buttons */ |
| 382 | data = i | |
| 382 | data = iop | |
| 383 | 383 | break; |
| 384 | 384 | case 4: /* vertical scan counter */ |
| 385 | 385 | data = ((m_timer_count & 0x10) >> 1) | ((m_timer_count & 0x20) >> 3) |
| r15082 | r15083 | |
|---|---|---|
| 195 | 195 | case 0: /* 278 */ |
| 196 | 196 | return 0xff; |
| 197 | 197 | case 1: /* 279 */ |
| 198 | return i | |
| 198 | return iop | |
| 199 | 199 | case 7: /* 27f dips */ |
| 200 | 200 | return 0xff; |
| 201 | 201 | default: |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | blockade_state *state = device->machine().driver_data<blockade_state>(); |
| 64 | 64 | device_resume(device, SUSPEND_ANY_REASON); |
| 65 | 65 | |
| 66 | if (( | |
| 66 | if ((s | |
| 67 | 67 | { |
| 68 | 68 | state->m_just_been_reset = 1; |
| 69 | 69 | device_set_input_line(device, INPUT_LINE_RESET, PULSE_LINE); |
| r15082 | r15083 | |
| 79 | 79 | READ8_MEMBER(blockade_state::blockade_input_port_0_r) |
| 80 | 80 | { |
| 81 | 81 | /* coin latch is bit 7 */ |
| 82 | UINT8 temp = (i | |
| 82 | UINT8 temp = (iop | |
| 83 | 83 | |
| 84 | 84 | return (m_coin_latch << 7) | temp; |
| 85 | 85 | } |
| r15082 | r15083 | |
| 183 | 183 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 184 | 184 | |
| 185 | 185 | PORT_START("IN3") |
| 186 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 186 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 187 | 187 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 188 | 188 | INPUT_PORTS_END |
| 189 | 189 | |
| r15082 | r15083 | |
| 226 | 226 | |
| 227 | 227 | PORT_START("IN3") |
| 228 | 228 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 229 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 229 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 230 | 230 | INPUT_PORTS_END |
| 231 | 231 | |
| 232 | 232 | static INPUT_PORTS_START( blasto ) |
| r15082 | r15083 | |
| 271 | 271 | |
| 272 | 272 | PORT_START("IN3") |
| 273 | 273 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 274 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 274 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 275 | 275 | INPUT_PORTS_END |
| 276 | 276 | |
| 277 | 277 | static INPUT_PORTS_START( hustle ) |
| r15082 | r15083 | |
| 315 | 315 | |
| 316 | 316 | PORT_START("IN3") |
| 317 | 317 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 319 | 319 | INPUT_PORTS_END |
| 320 | 320 | |
| 321 | 321 | static INPUT_PORTS_START( mineswpr ) |
| r15082 | r15083 | |
| 357 | 357 | |
| 358 | 358 | PORT_START("IN3") |
| 359 | 359 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 360 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 360 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 361 | 361 | INPUT_PORTS_END |
| 362 | 362 | |
| 363 | 363 | static INPUT_PORTS_START( mineswpr4 ) |
| r15082 | r15083 | |
| 399 | 399 | |
| 400 | 400 | PORT_START("IN3") |
| 401 | 401 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 402 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 402 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 403 | 403 | INPUT_PORTS_END |
| 404 | 404 | |
| 405 | 405 |
| r15082 | r15083 | |
|---|---|---|
| 208 | 208 | lordgun_state *state = device->machine().driver_data<lordgun_state>(); |
| 209 | 209 | switch (state->m_aliencha_dip_sel & 0x70) |
| 210 | 210 | { |
| 211 | case 0x30: return input_port_read(device->machine(), "DIP1"); | |
| 212 | case 0x60: return input_port_read(device->machine(), "DIP2"); | |
| 213 | case 0x50: return input_port_read(device->machine(), "DIP3"); | |
| 211 | case 0x30: return state->ioport("DIP1")->read(); | |
| 212 | case 0x60: return state->ioport("DIP2")->read(); | |
| 213 | case 0x50: return state->ioport("DIP3")->read(); | |
| 214 | 214 | |
| 215 | 215 | default: |
| 216 | 216 | logerror("%s: dip_r with unknown dip_sel = %02X\n",device->machine().describe_context(),state->m_aliencha_dip_sel); |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | { |
| 37 | 37 | switch (offset) |
| 38 | 38 | { |
| 39 | case 0: return input_port_read(machine(), "AN0"); | |
| 40 | case 1: return input_port_read(machine(), "AN1"); | |
| 41 | case 4: return input_port_read(machine(), "AN2"); | |
| 42 | case 5: return input_port_read(machine(), "AN3"); | |
| 39 | case 0: return ioport("AN0")->read(); | |
| 40 | case 1: return ioport("AN1")->read(); | |
| 41 | case 4: return ioport("AN2")->read(); | |
| 42 | case 5: return ioport("AN3")->read(); | |
| 43 | 43 | } |
| 44 | 44 | return 0; |
| 45 | 45 | } |
| r15082 | r15083 | |
| 50 | 50 | switch (offset << 1) |
| 51 | 51 | { |
| 52 | 52 | case 0x41a: |
| 53 | return i | |
| 53 | return iop | |
| 54 | 54 | |
| 55 | 55 | case 0x320: |
| 56 | return i | |
| 56 | return iop | |
| 57 | 57 | |
| 58 | 58 | case 0x4e6: |
| 59 | return i | |
| 59 | return iop | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return 0; |
| r15082 | r15083 | |
| 143 | 143 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 144 | 144 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 145 | 145 | PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_LOW) |
| 146 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 146 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 147 | 147 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 148 | 148 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 149 | 149 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 188 | 188 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 189 | 189 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // Kick |
| 190 | 190 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // Jump |
| 191 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 191 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 192 | 192 | INPUT_PORTS_END |
| 193 | 193 | |
| 194 | 194 | static const gfx_layout sprites16x16_layout = |
| r15082 | r15083 | |
|---|---|---|
| 689 | 689 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 690 | 690 | |
| 691 | 691 | PORT_START("VBLANK") |
| 692 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 692 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 693 | 693 | PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 694 | 694 | INPUT_PORTS_END |
| 695 | 695 | |
| r15082 | r15083 | |
| 724 | 724 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) \ |
| 725 | 725 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) \ |
| 726 | 726 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) \ |
| 727 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 727 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 728 | 728 | |
| 729 | 729 | #define TOAPLAN1_VBLANK_INPUT \ |
| 730 | 730 | PORT_START("VBLANK") \ |
| 731 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 731 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") \ | |
| 732 | 732 | PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 733 | 733 | |
| 734 | 734 |
| r15082 | r15083 | |
|---|---|---|
| 214 | 214 | /* read as two bits from each of 4 ports. For this reason, the input */ |
| 215 | 215 | /* ports have been organized logically, and are demangled at runtime. */ |
| 216 | 216 | /* 4 input ports each provide 8 bits of information. */ |
| 217 | UINT8 d7d6 = input_port_read(machine(), "D7D6"); | |
| 218 | UINT8 d5d4 = input_port_read(machine(), "D5D4"); | |
| 219 | UINT8 d3d2 = input_port_read(machine(), "D3D2"); | |
| 220 | UINT8 d1d0 = input_port_read(machine(), "D1D0"); | |
| 217 | UINT8 d7d6 = ioport("D7D6")->read(); | |
| 218 | UINT8 d5d4 = ioport("D5D4")->read(); | |
| 219 | UINT8 d3d2 = ioport("D3D2")->read(); | |
| 220 | UINT8 d1d0 = ioport("D1D0")->read(); | |
| 221 | 221 | int shift = offset & 3; |
| 222 | 222 | return demangle(d7d6 >> shift, d5d4 >> shift, d3d2 >> shift, d1d0 >> shift); |
| 223 | 223 | } |
| r15082 | r15083 | |
| 229 | 229 | /* versus cocktail cabinets; we fix this here. The input ports are */ |
| 230 | 230 | /* coded for cocktail mode; for upright mode, we manually shuffle the */ |
| 231 | 231 | /* bits around. */ |
| 232 | UINT8 d7d6 = input_port_read(machine(), "D7D6"); | |
| 233 | UINT8 d5d4 = input_port_read(machine(), "D5D4"); | |
| 234 | UINT8 d3d2 = input_port_read(machine(), "D3D2"); | |
| 235 | UINT8 d1d0 = input_port_read(machine(), "D1D0"); | |
| 232 | UINT8 d7d6 = ioport("D7D6")->read(); | |
| 233 | UINT8 d5d4 = ioport("D5D4")->read(); | |
| 234 | UINT8 d3d2 = ioport("D3D2")->read(); | |
| 235 | UINT8 d1d0 = ioport("D1D0")->read(); | |
| 236 | 236 | int shift = offset & 3; |
| 237 | 237 | |
| 238 | 238 | /* tweak bits for the upright case */ |
| 239 | 239 | UINT8 upright = d3d2 & 0x04; |
| 240 | 240 | if (upright) |
| 241 | 241 | { |
| 242 | UINT8 fc = i | |
| 242 | UINT8 fc = iop | |
| 243 | 243 | d7d6 |= 0x60; |
| 244 | 244 | d5d4 = (d5d4 & ~0x1c) | |
| 245 | 245 | ((~fc & 0x20) >> 3) | /* IPT_BUTTON2 */ |
| r15082 | r15083 | |
| 253 | 253 | |
| 254 | 254 | READ8_MEMBER(segag80r_state::spaceod_port_fc_r) |
| 255 | 255 | { |
| 256 | UINT8 upright = input_port_read(machine(), "D3D2") & 0x04; | |
| 257 | UINT8 fc = input_port_read(machine(), "FC"); | |
| 256 | UINT8 upright = ioport("D3D2")->read() & 0x04; | |
| 257 | UINT8 fc = ioport("FC")->read(); | |
| 258 | 258 | |
| 259 | 259 | /* tweak bits for the upright case */ |
| 260 | 260 | if (upright) |
| r15082 | r15083 | |
|---|---|---|
| 427 | 427 | PORT_DIPSETTING( 0x0800, "Note A: 20 - Note B: 40 - Note C: 100 - Note D: 200" ) |
| 428 | 428 | PORT_DIPSETTING( 0x0400, "Note A: 50 - Note B: 100 - Note C: 500 - Note D: 1000" ) |
| 429 | 429 | PORT_DIPSETTING( 0x0c00, "Note A: 100 - Note B: 200 - Note C: 1000 - Note D: 2000" ) |
| 430 | PORT_DIPNAME( 0x3000, 0x3000, "Lots At" ) PORT_CONDITION("DSW", 0xc000, | |
| 430 | PORT_DIPNAME( 0x3000, 0x3000, "Lots At" ) PORT_CONDITION("DSW", 0xc000, | |
| 431 | 431 | PORT_DIPSETTING( 0x0000, "50 200 500 1000 2000" ) |
| 432 | 432 | PORT_DIPSETTING( 0x1000, "100 300 1000 3000 5000" ) |
| 433 | 433 | PORT_DIPSETTING( 0x2000, "200 500 2000 3000 5000" ) |
| 434 | 434 | PORT_DIPSETTING( 0x3000, "500 1000 2000 4000 8000" ) |
| 435 | PORT_DIPNAME( 0x3000, 0x3000, "1 Ticket Won" ) PORT_CONDITION("DSW", 0xc000, | |
| 435 | PORT_DIPNAME( 0x3000, 0x3000, "1 Ticket Won" ) PORT_CONDITION("DSW", 0xc000, | |
| 436 | 436 | // PORT_DIPSETTING( 0x0000, "Every 100 Score" ) |
| 437 | 437 | // PORT_DIPSETTING( 0x1000, "Every 100 Score" ) |
| 438 | 438 | // PORT_DIPSETTING( 0x2000, "Every 100 Score" ) |
| 439 | 439 | PORT_DIPSETTING( 0x3000, "Every 100 Score" ) |
| 440 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unused ) ) PORT_CONDITION("DSW", 0xc000, | |
| 440 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unused ) ) PORT_CONDITION("DSW", 0xc000, | |
| 441 | 441 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) |
| 442 | 442 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 443 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unused ) ) PORT_CONDITION("DSW", 0xc000, | |
| 443 | PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unused ) ) PORT_CONDITION("DSW", 0xc000, | |
| 444 | 444 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) |
| 445 | 445 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 446 | PORT_DIPNAME( 0x3000, 0x3000, "1 Play Won" ) PORT_CONDITION("DSW", 0xc000, | |
| 446 | PORT_DIPNAME( 0x3000, 0x3000, "1 Play Won" ) PORT_CONDITION("DSW", 0xc000, | |
| 447 | 447 | // PORT_DIPSETTING( 0x0000, "Every 10 Score" ) |
| 448 | 448 | // PORT_DIPSETTING( 0x1000, "Every 10 Score" ) |
| 449 | 449 | // PORT_DIPSETTING( 0x2000, "Every 10 Score" ) |
| r15082 | r15083 | |
|---|---|---|
| 434 | 434 | |
| 435 | 435 | /* bit 3 is service button */ |
| 436 | 436 | /* bit 6 is ??? VBLANK? OBJMPX? */ |
| 437 | res = i | |
| 437 | res = iop | |
| 438 | 438 | |
| 439 | 439 | m_toggle ^= 0x40; |
| 440 | 440 | return res ^ m_toggle; |
| r15082 | r15083 | |
| 448 | 448 | /* bit 1 is EEPROM ready */ |
| 449 | 449 | /* bit 2 is VBLANK (???) */ |
| 450 | 450 | /* bit 7 is service button */ |
| 451 | res = i | |
| 451 | res = iop | |
| 452 | 452 | |
| 453 | 453 | m_toggle ^= 0x04; |
| 454 | 454 | return res ^ m_toggle; |
| r15082 | r15083 | |
| 462 | 462 | /* bit 1 is EEPROM ready */ |
| 463 | 463 | /* bit 2 is VBLANK (???) */ |
| 464 | 464 | /* bit 3 is service button */ |
| 465 | res = i | |
| 465 | res = iop | |
| 466 | 466 | |
| 467 | 467 | m_toggle ^= 0x04; |
| 468 | 468 | return res ^ m_toggle; |
| r15082 | r15083 | |
| 475 | 475 | /* bit 0 is data */ |
| 476 | 476 | /* bit 1 is cs (active low) */ |
| 477 | 477 | /* bit 2 is clock (active high) */ |
| 478 | i | |
| 478 | iop | |
| 479 | 479 | } |
| 480 | 480 | } |
| 481 | 481 | |
| r15082 | r15083 | |
| 498 | 498 | /* bit 1 is EEPROM ready */ |
| 499 | 499 | /* bit 3 is VBLANK (???) */ |
| 500 | 500 | /* bit 7 is service button */ |
| 501 | res = i | |
| 501 | res = iop | |
| 502 | 502 | m_toggle ^= 0x0800; |
| 503 | 503 | return (res ^ m_toggle); |
| 504 | 504 | } |
| r15082 | r15083 | |
| 511 | 511 | /* bit 0 is data */ |
| 512 | 512 | /* bit 1 is cs (active low) */ |
| 513 | 513 | /* bit 2 is clock (active high) */ |
| 514 | i | |
| 514 | iop | |
| 515 | 515 | |
| 516 | 516 | /* bit 5 triggers IRQ on sound cpu */ |
| 517 | 517 | if (m_last == 0 && (data & 0x20) != 0) |
| r15082 | r15083 | |
| 535 | 535 | /* bit 8 is data */ |
| 536 | 536 | /* bit 9 is cs (active low) */ |
| 537 | 537 | /* bit 10 is clock (active high) */ |
| 538 | i | |
| 538 | iop | |
| 539 | 539 | } |
| 540 | 540 | } |
| 541 | 541 | |
| r15082 | r15083 | |
| 1790 | 1790 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 1791 | 1791 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 1792 | 1792 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| 1793 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1793 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* ?? TMNT2: NVBLK */ | |
| 1794 | 1794 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 1795 | 1795 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1796 | 1796 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 1828 | 1828 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 1829 | 1829 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 1830 | 1830 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| 1831 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1831 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* ?? TMNT2: NVBLK */ | |
| 1832 | 1832 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 1833 | 1833 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1834 | 1834 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 1868 | 1868 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 1869 | 1869 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 1870 | 1870 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| 1871 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1871 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* ?? TMNT2: NVBLK */ | |
| 1872 | 1872 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 1873 | 1873 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1874 | 1874 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 1957 | 1957 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 1958 | 1958 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 1959 | 1959 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| 1960 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1960 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* ?? TMNT2: NVBLK (needs to be ACTIVE_HIGH to avoid problems) */ | |
| 1961 | 1961 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 1962 | 1962 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1963 | 1963 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | { |
| 60 | 60 | if (ACCESSING_BITS_0_7) |
| 61 | 61 | { |
| 62 | UINT32 rv = i | |
| 62 | UINT32 rv = iop | |
| 63 | 63 | |
| 64 | 64 | return rv; // bit 0 freezes the game if 1 |
| 65 | 65 | } |
| r15082 | r15083 | |
| 71 | 71 | { |
| 72 | 72 | if (ACCESSING_BITS_8_15) |
| 73 | 73 | { |
| 74 | i | |
| 74 | iop | |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 |
| r15082 | r15083 | |
|---|---|---|
| 397 | 397 | { |
| 398 | 398 | if (ACCESSING_BITS_24_31) |
| 399 | 399 | { |
| 400 | r |= ((i | |
| 400 | r |= ((iop | |
| 401 | 401 | } |
| 402 | 402 | return r; |
| 403 | 403 | } |
| r15082 | r15083 | |
| 405 | 405 | { |
| 406 | 406 | if (ACCESSING_BITS_24_31) |
| 407 | 407 | { |
| 408 | r |= i | |
| 408 | r |= iop | |
| 409 | 409 | } |
| 410 | 410 | return r; |
| 411 | 411 | } |
| r15082 | r15083 | |
| 413 | 413 | { |
| 414 | 414 | if (ACCESSING_BITS_24_31) |
| 415 | 415 | { |
| 416 | r |= i | |
| 416 | r |= iop | |
| 417 | 417 | } |
| 418 | 418 | return r; |
| 419 | 419 | } |
| r15082 | r15083 | |
| 421 | 421 | { |
| 422 | 422 | if (ACCESSING_BITS_24_31) |
| 423 | 423 | { |
| 424 | r |= i | |
| 424 | r |= iop | |
| 425 | 425 | } |
| 426 | 426 | return r; |
| 427 | 427 | } |
| r15082 | r15083 | |
| 437 | 437 | { |
| 438 | 438 | if (ACCESSING_BITS_24_31) |
| 439 | 439 | { |
| 440 | r |= i | |
| 440 | r |= iop | |
| 441 | 441 | } |
| 442 | 442 | return r; |
| 443 | 443 | } |
| r15082 | r15083 | |
| 471 | 471 | { |
| 472 | 472 | if (ACCESSING_BITS_24_31) |
| 473 | 473 | { |
| 474 | i | |
| 474 | iop | |
| 475 | 475 | } |
| 476 | 476 | else |
| 477 | 477 | popmessage("jc_control_w: %08X, %08X, %08X\n", data, offset, mem_mask); |
| r15082 | r15083 | |
| 828 | 828 | else if(offset == 1 && ACCESSING_BITS_16_31) |
| 829 | 829 | m_brake_meter = taitojc_brake_table[(data >> 16) & 0xff]; |
| 830 | 830 | |
| 831 | if(i | |
| 831 | if(iop | |
| 832 | 832 | { |
| 833 | UINT8 mascon_lv = (i | |
| 833 | UINT8 mascon_lv = (iop | |
| 834 | 834 | |
| 835 | 835 | popmessage("%d %.02f km/h %.02f MPa",mascon_lv,m_speed_meter,m_brake_meter/10); |
| 836 | 836 | } |
| r15082 | r15083 | |
| 898 | 898 | static const char *const portnames[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", |
| 899 | 899 | "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" }; |
| 900 | 900 | |
| 901 | return i | |
| 901 | return iop | |
| 902 | 902 | } |
| 903 | 903 | |
| 904 | 904 | |
| r15082 | r15083 | |
| 1166 | 1166 | CUSTOM_INPUT_MEMBER(taitojc_state::mascon_state_r) |
| 1167 | 1167 | { |
| 1168 | 1168 | static const UINT8 mascon_table[6] = { 0x01, 0x10, 0x02, 0x20, 0x04, 0x40 }; |
| 1169 | UINT8 res = i | |
| 1169 | UINT8 res = iop | |
| 1170 | 1170 | int i; |
| 1171 | 1171 | |
| 1172 | 1172 | //popmessage("%02x",res); |
| r15082 | r15083 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 | /*coin/credit simulation*/ |
| 311 | 311 | /*$fe002 is used,might be for multiple coins for one credit settings.*/ |
| 312 | state->m_coin_input = (~( | |
| 312 | state->m_coin_input = (~( | |
| 313 | 313 | |
| 314 | 314 | if (state->m_coin_input & 0x01)//coin 1 |
| 315 | 315 | { |
| r15082 | r15083 | |
|---|---|---|
| 426 | 426 | int color; |
| 427 | 427 | double color_weights[2]; |
| 428 | 428 | |
| 429 | if (in | |
| 429 | if (machine.root_device().ioport | |
| 430 | 430 | compute_resistor_weights(0, 0xff, -1.0, |
| 431 | 431 | 2, resistances_wg, color_weights, 0, 270, |
| 432 | 432 | 2, resistances_wg, color_weights, 0, 270, |
| r15082 | r15083 | |
| 903 | 903 | // one difference is it lacks the strobe input (does it?), which if not active causes |
| 904 | 904 | // the dial input to go open bus. This is used in moon war 2 to switch between player 1 |
| 905 | 905 | // and player 2 dials, which share a single port. moonwarp uses separate ports for the dials. |
| 906 | signed char dialread = i | |
| 906 | signed char dialread = iop | |
| 907 | 907 | UINT8 ret; |
| 908 | UINT8 buttons = (i | |
| 908 | UINT8 buttons = (iop | |
| 909 | 909 | if (dialread < 0) m_p1_direction = 0; |
| 910 | 910 | else if (dialread > 0) m_p1_direction = 0x10; |
| 911 | 911 | m_p1_counter_74ls161 += abs(dialread); |
| r15082 | r15083 | |
| 918 | 918 | READ8_MEMBER(berzerk_state::moonwarp_p2_r) |
| 919 | 919 | { |
| 920 | 920 | // same as above, but for player 2 in cocktail mode |
| 921 | signed char dialread = i | |
| 921 | signed char dialread = iop | |
| 922 | 922 | UINT8 ret; |
| 923 | UINT8 buttons = (i | |
| 923 | UINT8 buttons = (iop | |
| 924 | 924 | if (dialread < 0) m_p2_direction = 0; |
| 925 | 925 | else if (dialread > 0) m_p2_direction = 0x10; |
| 926 | 926 | m_p2_counter_74ls161 += abs(dialread); |
| r15082 | r15083 | |
|---|---|---|
| 158 | 158 | READ8_MEMBER(vpoker_state::blitter_r) |
| 159 | 159 | { |
| 160 | 160 | if(offset == 6) |
| 161 | return i | |
| 161 | return iop | |
| 162 | 162 | |
| 163 | 163 | return 0; |
| 164 | 164 | } |
| r15082 | r15083 | |
|---|---|---|
| 147 | 147 | switch(offset) |
| 148 | 148 | { |
| 149 | 149 | case 1: |
| 150 | return i | |
| 150 | return iop | |
| 151 | 151 | default: |
| 152 | 152 | return 0; |
| 153 | 153 | } |
| r15082 | r15083 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | /* screen flip multiplexes controls */ |
| 232 | 232 | if (suprridr_is_screen_flipped(machine())) |
| 233 | ret = i | |
| 233 | ret = iop | |
| 234 | 234 | else |
| 235 | ret = i | |
| 235 | ret = iop | |
| 236 | 236 | |
| 237 | 237 | return ret; |
| 238 | 238 | } |
| r15082 | r15083 | |
|---|---|---|
| 434 | 434 | switch(m_igs_magic[0]) |
| 435 | 435 | { |
| 436 | 436 | case 0x00: |
| 437 | if ( !(m_igs_magic[1] & 0x01) ) return input_port_read(machine(), "DSW1"); | |
| 438 | if ( !(m_igs_magic[1] & 0x02) ) return input_port_read(machine(), "DSW2"); | |
| 439 | if ( !(m_igs_magic[1] & 0x04) ) return input_port_read(machine(), "DSW3"); | |
| 440 | if ( !(m_igs_magic[1] & 0x08) ) return input_port_read(machine(), "DSW4"); | |
| 441 | if ( !(m_igs_magic[1] & 0x10) ) return input_port_read(machine(), "DSW5"); | |
| 437 | if ( !(m_igs_magic[1] & 0x01) ) return ioport("DSW1")->read(); | |
| 438 | if ( !(m_igs_magic[1] & 0x02) ) return ioport("DSW2")->read(); | |
| 439 | if ( !(m_igs_magic[1] & 0x04) ) return ioport("DSW3")->read(); | |
| 440 | if ( !(m_igs_magic[1] & 0x08) ) return ioport("DSW4")->read(); | |
| 441 | if ( !(m_igs_magic[1] & 0x10) ) return ioport("DSW5")->read(); | |
| 442 | 442 | logerror("%06x: warning, reading dsw with igs_magic[1] = %02x\n", cpu_get_pc(&space.device()), m_igs_magic[1]); |
| 443 | 443 | break; |
| 444 | 444 |
| r15082 | r15083 | |
|---|---|---|
| 1156 | 1156 | READ16_MEMBER(blitz68k_state::hermit_track_r) |
| 1157 | 1157 | { |
| 1158 | 1158 | #ifdef MAME_DEBUG |
| 1159 | // popmessage("track %02x %02x", i | |
| 1159 | // popmessage("track %02x %02x", iop | |
| 1160 | 1160 | #endif |
| 1161 | 1161 | |
| 1162 | 1162 | return |
| 1163 | ((0xf - ((input_port_read(machine(), "TRACK_Y") + 0x7) & 0xf)) << 12) | | |
| 1164 | ((0xf - ((input_port_read(machine(), "TRACK_X") + 0x7) & 0xf)) << 8) ; | |
| 1163 | ((0xf - ((ioport("TRACK_Y")->read() + 0x7) & 0xf)) << 12) | | |
| 1164 | ((0xf - ((ioport("TRACK_X")->read() + 0x7) & 0xf)) << 8) ; | |
| 1165 | 1165 | } |
| 1166 | 1166 | |
| 1167 | 1167 | static ADDRESS_MAP_START( hermit_map, AS_PROGRAM, 16, blitz68k_state ) |
| r15082 | r15083 | |
| 1737 | 1737 | // for(i=0;i<8;i+=2) |
| 1738 | 1738 | // state->m_nvram[((0x8a0)+i)/2] = 0; |
| 1739 | 1739 | /*finally, read the inputs*/ |
| 1740 | state->m_nvram[0x89e/2] = input_port_read(timer.machine(), "MENU") & 0xffff; | |
| 1741 | state->m_nvram[0x8a0/2] = input_port_read(timer.machine(), "STAT") & 0xffff; | |
| 1742 | state->m_nvram[0x8a2/2] = input_port_read(timer.machine(), "BET_DEAL") & 0xffff; | |
| 1743 | state->m_nvram[0x8a4/2] = input_port_read(timer.machine(), "TAKE_DOUBLE") & 0xffff; | |
| 1744 | state->m_nvram[0x8a6/2] = input_port_read(timer.machine(), "SMALL_BIG") & 0xffff; | |
| 1745 | state->m_nvram[0x8a8/2] = input_port_read(timer.machine(), "CANCEL_HOLD1") & 0xffff; | |
| 1746 | state->m_nvram[0x8aa/2] = input_port_read(timer.machine(), "HOLD2_HOLD3") & 0xffff; | |
| 1747 | state->m_nvram[0x8ac/2] = input_port_read(timer.machine(), "HOLD4_HOLD5") & 0xffff; | |
| 1740 | state->m_nvram[0x89e/2] = timer.machine().root_device().ioport("MENU")->read() & 0xffff; | |
| 1741 | state->m_nvram[0x8a0/2] = timer.machine().root_device().ioport("STAT")->read() & 0xffff; | |
| 1742 | state->m_nvram[0x8a2/2] = timer.machine().root_device().ioport("BET_DEAL")->read() & 0xffff; | |
| 1743 | state->m_nvram[0x8a4/2] = timer.machine().root_device().ioport("TAKE_DOUBLE")->read() & 0xffff; | |
| 1744 | state->m_nvram[0x8a6/2] = timer.machine().root_device().ioport("SMALL_BIG")->read() & 0xffff; | |
| 1745 | state->m_nvram[0x8a8/2] = timer.machine().root_device().ioport("CANCEL_HOLD1")->read() & 0xffff; | |
| 1746 | state->m_nvram[0x8aa/2] = timer.machine().root_device().ioport("HOLD2_HOLD3")->read() & 0xffff; | |
| 1747 | state->m_nvram[0x8ac/2] = timer.machine().root_device().ioport("HOLD4_HOLD5")->read() & 0xffff; | |
| 1748 | 1748 | } |
| 1749 | 1749 | |
| 1750 | 1750 |
| r15082 | r15083 | |
|---|---|---|
| 124 | 124 | { |
| 125 | 125 | switch (offset) |
| 126 | 126 | { |
| 127 | case 0x0: return input_port_read(machine(), "P1_P2"); | |
| 128 | case 0x1: return input_port_read(machine(), "DSW"); | |
| 129 | case 0x2: return input_port_read(machine(), "COIN"); | |
| 127 | case 0x0: return ioport("P1_P2")->read(); | |
| 128 | case 0x1: return ioport("DSW")->read(); | |
| 129 | case 0x2: return ioport("COIN")->read(); | |
| 130 | 130 | default: logerror("PC %06X - Read input %02X !\n", cpu_get_pc(&space.device()), offset * 2); |
| 131 | 131 | return 0; |
| 132 | 132 | } |
| r15082 | r15083 | |
| 136 | 136 | { |
| 137 | 137 | switch (offset) |
| 138 | 138 | { |
| 139 | case 0x0: return input_port_read(machine(), "P1_P2"); | |
| 140 | case 0x1: return input_port_read(machine(), "DSW"); | |
| 139 | case 0x0: return ioport("P1_P2")->read(); | |
| 140 | case 0x1: return ioport("DSW")->read(); | |
| 141 | 141 | default: logerror("PC %06X - Read input %02X !\n", cpu_get_pc(&space.device()), offset * 2); |
| 142 | 142 | return 0; |
| 143 | 143 | } |
| r15082 | r15083 | |
| 288 | 288 | { |
| 289 | 289 | switch (offset) |
| 290 | 290 | { |
| 291 | case 0x0: return input_port_read(machine(), "P1_P2"); | |
| 292 | case 0x1: return (input_port_read(machine(), "DSW") & 0xffff000f) | s1945_mcu_r(space, offset - 1, mem_mask); | |
| 291 | case 0x0: return ioport("P1_P2")->read(); | |
| 292 | case 0x1: return (ioport("DSW")->read() & 0xffff000f) | s1945_mcu_r(space, offset - 1, mem_mask); | |
| 293 | 293 | case 0x2: return s1945_mcu_r(space, offset - 1, mem_mask); |
| 294 | 294 | default: logerror("PC %06X - Read input %02X !\n", cpu_get_pc(&space.device()), offset * 2); |
| 295 | 295 | return 0; |
| r15082 | r15083 | |
| 543 | 543 | PORT_INCLUDE(psikyo_common) |
| 544 | 544 | |
| 545 | 545 | PORT_START("COIN") |
| 546 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 546 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank | |
| 547 | 547 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused? |
| 548 | 548 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 549 | 549 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 670 | 670 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 671 | 671 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 672 | 672 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 673 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 673 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank ACTIVE_HIGH fixes slowdowns, but is it right? | |
| 674 | 674 | // This DSW is used for debugging the game |
| 675 | 675 | PORT_DIPNAME( 0x00000100, 0x00000100, "Unknown 3-0" ) // tested! |
| 676 | 676 | PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) ) |
| r15082 | r15083 | |
| 756 | 756 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 757 | 757 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 758 | 758 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 759 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 759 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank | |
| 760 | 760 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 761 | 761 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 762 | 762 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested! |
| r15082 | r15083 | |
| 826 | 826 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 827 | 827 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 828 | 828 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 829 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 829 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank | |
| 830 | 830 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 831 | 831 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 832 | 832 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested! |
| r15082 | r15083 | |
| 898 | 898 | |
| 899 | 899 | // I need to invert the Vblank on this to avoid excessive slowdown |
| 900 | 900 | PORT_MODIFY("DSW") /* c00004 -> c00007 */ |
| 901 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 901 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank | |
| 902 | 902 | INPUT_PORTS_END |
| 903 | 903 | |
| 904 | 904 | |
| r15082 | r15083 | |
| 942 | 942 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 943 | 943 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 944 | 944 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 945 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 945 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // vblank | |
| 946 | 946 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 947 | 947 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 948 | 948 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested! |
| r15082 | r15083 | |
| 1811 | 1811 | psikyo_state *state = machine.driver_data<psikyo_state>(); |
| 1812 | 1812 | |
| 1813 | 1813 | { |
| 1814 | UINT8 *RAM = | |
| 1814 | UINT8 *RAM = sta | |
| 1815 | 1815 | int len = state->memregion("ymsnd")->bytes(); |
| 1816 | 1816 | int i; |
| 1817 | 1817 |
| r15082 | r15083 | |
|---|---|---|
| 157 | 157 | { |
| 158 | 158 | switch( m_controls_mux ) |
| 159 | 159 | { |
| 160 | case 0x07: return input_port_read(machine(), "DSW1"); | |
| 161 | case 0x08: return input_port_read(machine(), "DSW2"); | |
| 162 | case 0x09: return input_port_read(machine(), "IN0"); | |
| 160 | case 0x07: return ioport("DSW1")->read(); | |
| 161 | case 0x08: return ioport("DSW2")->read(); | |
| 162 | case 0x09: return ioport("IN0")->read(); | |
| 163 | 163 | default: return 0xff; |
| 164 | 164 | } |
| 165 | 165 | } |
| r15082 | r15083 | |
|---|---|---|
| 125 | 125 | WRITE16_MEMBER(esd16_state::esd_eeprom_w) |
| 126 | 126 | { |
| 127 | 127 | if (ACCESSING_BITS_8_15) |
| 128 | i | |
| 128 | iop | |
| 129 | 129 | |
| 130 | 130 | // logerror("(0x%06x) Unk EEPROM write: %04x %04x\n", cpu_get_pc(&space.device()), data, mem_mask); |
| 131 | 131 | } |
| r15082 | r15083 | |
| 305 | 305 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) |
| 306 | 306 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 307 | 307 | PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 308 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 309 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 310 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 311 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 308 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 309 | PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 310 | PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 311 | PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 312 | 312 | PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) |
| 313 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 314 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 313 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 314 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 315 | 315 | PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 316 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, | |
| 316 | PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0002, | |
| 317 | 317 | PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) |
| 318 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 319 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0002) | |
| 320 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 321 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 322 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, PORTCOND_EQUALS, 0x0000) | |
| 318 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 319 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0002) | |
| 320 | PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 321 | PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 322 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW", 0x0002, EQUALS, 0x0000) | |
| 323 | 323 | |
| 324 | 324 | PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 325 | 325 | PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) |
| r15082 | r15083 | |
|---|---|---|
| 1277 | 1277 | state->m_sound_irq_enable = 0; |
| 1278 | 1278 | state->m_sound_timer->adjust(attotime::never); |
| 1279 | 1279 | |
| 1280 | state->membank("bank1")->set_base( | |
| 1280 | state->membank("bank1")->set_base(sta | |
| 1281 | 1281 | |
| 1282 | state->membank("bank4")->set_base(machine.root_device().memregion("samples")->base() + 0x200000); | |
| 1283 | state->membank("bank5")->set_base(machine.root_device().memregion("samples")->base() + 0x600000); | |
| 1282 | state->membank("bank4")->set_base(state->memregion("samples")->base() + 0x200000); | |
| 1283 | state->membank("bank5")->set_base(state->memregion("samples")->base() + 0x600000); | |
| 1284 | 1284 | |
| 1285 | 1285 | // copy the 68k vector table into RAM |
| 1286 | 1286 | memcpy(state->m_soundram, state->memregion("audiocpu")->base()+0x80000, 16); |
| r15082 | r15083 | |
| 1337 | 1337 | { |
| 1338 | 1338 | if(m_controls_bank & 0x1) |
| 1339 | 1339 | { |
| 1340 | return (i | |
| 1340 | return (iop | |
| 1341 | 1341 | } |
| 1342 | 1342 | else |
| 1343 | 1343 | { |
| 1344 | return (i | |
| 1344 | return (iop | |
| 1345 | 1345 | } |
| 1346 | 1346 | } |
| 1347 | 1347 | break; |
| r15082 | r15083 | |
| 1349 | 1349 | case 1: |
| 1350 | 1350 | if (ACCESSING_BITS_56_63) |
| 1351 | 1351 | { |
| 1352 | return (UINT64)i | |
| 1352 | return (UINT64)iop | |
| 1353 | 1353 | } |
| 1354 | 1354 | else if (ACCESSING_BITS_24_31) |
| 1355 | 1355 | { |
| 1356 | return i | |
| 1356 | return iop | |
| 1357 | 1357 | } |
| 1358 | 1358 | break; |
| 1359 | 1359 | |
| r15082 | r15083 | |
| 1388 | 1388 | if (ACCESSING_BITS_24_31) /* ADC Data read */ |
| 1389 | 1389 | { |
| 1390 | 1390 | static const char *const adcnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7" }; |
| 1391 | UINT8 adc_data = i | |
| 1391 | UINT8 adc_data = iop | |
| 1392 | 1392 | m_adc_channel++; |
| 1393 | 1393 | m_adc_channel &= 0x7; |
| 1394 | 1394 | return (UINT64)adc_data << 24; |
| r15082 | r15083 | |
| 1441 | 1441 | switch(m_lightgun_reg_sel) /* read lightrun register */ |
| 1442 | 1442 | { |
| 1443 | 1443 | case 0: /* player 1 gun X-position, lower 8-bits */ |
| 1444 | m_serial_fifo2 = i | |
| 1444 | m_serial_fifo2 = iop | |
| 1445 | 1445 | break; |
| 1446 | 1446 | case 1: /* player 1 gun X-position, upper 2-bits */ |
| 1447 | m_serial_fifo2 = (i | |
| 1447 | m_serial_fifo2 = (iop | |
| 1448 | 1448 | break; |
| 1449 | 1449 | case 2: /* player 1 gun Y-position, lower 8-bits */ |
| 1450 | m_serial_fifo2 = i | |
| 1450 | m_serial_fifo2 = iop | |
| 1451 | 1451 | break; |
| 1452 | 1452 | case 3: /* player 1 gun Y-position, upper 2-bits */ |
| 1453 | m_serial_fifo2 = (i | |
| 1453 | m_serial_fifo2 = (iop | |
| 1454 | 1454 | break; |
| 1455 | 1455 | case 4: /* player 2 gun X-position, lower 8-bits */ |
| 1456 | m_serial_fifo2 = i | |
| 1456 | m_serial_fifo2 = iop | |
| 1457 | 1457 | break; |
| 1458 | 1458 | case 5: /* player 2 gun X-position, upper 2-bits */ |
| 1459 | m_serial_fifo2 = (i | |
| 1459 | m_serial_fifo2 = (iop | |
| 1460 | 1460 | break; |
| 1461 | 1461 | case 6: /* player 2 gun Y-position, lower 8-bits */ |
| 1462 | m_serial_fifo2 = i | |
| 1462 | m_serial_fifo2 = iop | |
| 1463 | 1463 | break; |
| 1464 | 1464 | case 7: /* player 2 gun Y-position, upper 2-bits */ |
| 1465 | m_serial_fifo2 = (i | |
| 1465 | m_serial_fifo2 = (iop | |
| 1466 | 1466 | break; |
| 1467 | 1467 | case 8: /* gun offscreen (bit set = gun offscreen, bit clear = gun on screen) */ |
| 1468 | 1468 | m_serial_fifo2 = 0; /* bit 0 = player 1, bit 1 = player 2 */ |
| 1469 | if(i | |
| 1469 | if(iop | |
| 1470 | 1470 | m_serial_fifo2 |= 0x01; |
| 1471 | 1471 | } |
| 1472 | 1472 | break; |
| r15082 | r15083 | |
| 5302 | 5302 | model3_state *state = machine.driver_data<model3_state>(); |
| 5303 | 5303 | int start; |
| 5304 | 5304 | int i,j,x; |
| 5305 | UINT16 *vrom1 = (UINT16*)machine.root_device().memregion("user3")->base(); | |
| 5306 | UINT16 *vrom2 = (UINT16*)machine.root_device().memregion("user4")->base(); | |
| 5305 | UINT16 *vrom1 = (UINT16*)state->memregion("user3")->base(); | |
| 5306 | UINT16 *vrom2 = (UINT16*)state->memregion("user4")->base(); | |
| 5307 | 5307 | int vrom_length = state->memregion("user3")->bytes(); |
| 5308 | 5308 | UINT16 *vrom; |
| 5309 | 5309 |
| r15082 | r15083 | |
|---|---|---|
| 656 | 656 | |
| 657 | 657 | PORT_START("DSW3") |
| 658 | 658 | PORT_DIPNAME( 0x03, 0x03, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */ |
| 659 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) /* A-Type */ | |
| 660 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 661 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 662 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 663 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) /* B-Type */ | |
| 664 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 665 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 666 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 659 | PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) /* A-Type */ | |
| 660 | PORT_DIPSETTING( 0x01, "1 Coin/20 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 661 | PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 662 | PORT_DIPSETTING( 0x03, "1 Coin/100 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 663 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) /* B-Type */ | |
| 664 | PORT_DIPSETTING( 0x01, "1 Coin/10 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 665 | PORT_DIPSETTING( 0x02, "1 Coin/25 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 666 | PORT_DIPSETTING( 0x03, "1 Coin/50 Credits" ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 667 | 667 | PORT_DIPNAME( 0x0c, 0x0c, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */ |
| 668 | 668 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 669 | 669 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 670 | 670 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) |
| 671 | 671 | PORT_DIPSETTING( 0x0c, "1 Coin/10 Credits" ) |
| 672 | 672 | PORT_DIPNAME( 0x30, 0x30, "Coin D Rate" ) PORT_DIPLOCATION("DSW3:5,6") /* OK */ |
| 673 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) /* C-Type */ | |
| 674 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 675 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 676 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x10) | |
| 677 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) /* D-Type */ | |
| 678 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 679 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 680 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,PORTCOND_EQUALS,0x00) | |
| 673 | PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) /* C-Type */ | |
| 674 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 675 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 676 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10) | |
| 677 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) /* D-Type */ | |
| 678 | PORT_DIPSETTING( 0x10, "1 Coin/10 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 679 | PORT_DIPSETTING( 0x20, "1 Coin/25 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 680 | PORT_DIPSETTING( 0x30, "1 Coin/50 Credits" ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00) | |
| 681 | 681 | PORT_DIPNAME( 0xc0, 0xc0, "Coin C Rate" ) PORT_DIPLOCATION("DSW3:7,8") /* OK */ |
| 682 | 682 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 683 | 683 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 155 | 155 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 156 | 156 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 157 | 157 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 158 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 158 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 159 | 159 | |
| 160 | 160 | /* Dips seem inverted with respect to other Deco games */ |
| 161 | 161 | PORT_START("DSW") |
| r15082 | r15083 | |
|---|---|---|
| 183 | 183 | /* bit 5 is enable irq 6 */ |
| 184 | 184 | /* bit 6 is enable irq 5 */ |
| 185 | 185 | /* bit 11 is watchdog */ |
| 186 | i | |
| 186 | state->iop | |
| 187 | 187 | |
| 188 | 188 | /* bit 8 = enable sprite ROM reading */ |
| 189 | 189 | k053246_set_objcha_line(state->m_k053246, (state->m_cur_control2 & 0x0100) ? ASSERT_LINE : CLEAR_LINE); |
| r15082 | r15083 | |
| 684 | 684 | if (!strcmp(machine.system().name, "xexex")) |
| 685 | 685 | { |
| 686 | 686 | // Invulnerability |
| 687 | // *(UINT16 *)( | |
| 687 | // *(UINT16 *)(sta | |
| 688 | 688 | // *(UINT16 *)(state->memregion("maincpu")->base() + 0x00008) = 0x5500; |
| 689 | 689 | state->m_strip_0x1a = 1; |
| 690 | 690 | } |
| r15082 | r15083 | |
|---|---|---|
| 163 | 163 | //might need to be reversed for cocktail stuff |
| 164 | 164 | |
| 165 | 165 | /* x/y multiplexed */ |
| 166 | return i | |
| 166 | return iop | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | READ8_MEMBER(marinedt_state::marinedt_coll_r) |
| r15082 | r15083 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | READ16_MEMBER(skullxbo_state::special_port1_r) |
| 99 | 99 | { |
| 100 | int temp = i | |
| 100 | int temp = iop | |
| 101 | 101 | if (m_cpu_to_sound_ready) temp ^= 0x0040; |
| 102 | 102 | if (atarigen_get_hblank(*machine().primary_screen)) temp ^= 0x0010; |
| 103 | 103 | return temp; |
| r15082 | r15083 | |
| 179 | 179 | PORT_START("FF5802") |
| 180 | 180 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 181 | 181 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) /* HBLANK */ |
| 182 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 182 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 183 | 183 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* /AUDBUSY */ |
| 184 | 184 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 185 | 185 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| r15082 | r15083 | |
|---|---|---|
| 663 | 663 | { |
| 664 | 664 | cps3_state *state = machine.driver_data<cps3_state>(); |
| 665 | 665 | int i; |
| 666 | UINT32 *coderegion = (UINT32*) | |
| 666 | UINT32 *coderegion = (UINT32*)sta | |
| 667 | 667 | |
| 668 | 668 | state->m_decrypted_bios = (UINT32*)state->memregion("user1")->base(); |
| 669 | 669 | |
| r15082 | r15083 | |
| 701 | 701 | state->m_altEncryption = altEncryption; |
| 702 | 702 | |
| 703 | 703 | // cache pointers to regions |
| 704 | state->m_user4region = | |
| 704 | state->m_user4region = sta | |
| 705 | 705 | state->m_user5region = state->memregion("user5")->base(); |
| 706 | 706 | |
| 707 | 707 | if (!state->m_user4region) state->m_user4region = auto_alloc_array(machine, UINT8, USER4REGION_LENGTH); |
| r15082 | r15083 | |
|---|---|---|
| 275 | 275 | /* update the different PIA pins from the input ports */ |
| 276 | 276 | |
| 277 | 277 | /* CA1 - copy of PA1 (COIN1) */ |
| 278 | pia1->ca1_w( | |
| 278 | pia1->ca1_w( | |
| 279 | 279 | |
| 280 | 280 | /* CA2 - copy of PA0 (SERVICE1) */ |
| 281 | pia1->ca2_w( | |
| 281 | pia1->ca2_w( | |
| 282 | 282 | |
| 283 | 283 | /* CB1 - (crosshatch) */ |
| 284 | pia1->cb1_w( | |
| 284 | pia1->cb1_w( | |
| 285 | 285 | |
| 286 | 286 | /* CB2 - NOT CONNECTED */ |
| 287 | 287 | } |
| r15082 | r15083 | |
|---|---|---|
| 260 | 260 | |
| 261 | 261 | case 0x03: // DSW |
| 262 | 262 | { |
| 263 | state->m_mcu_ram[mcu_offset] = in | |
| 263 | state->m_mcu_ram[mcu_offset] = machine.root_device().ioport | |
| 264 | 264 | logerror("%s : MCU executed command: %04X %04X (read DSW)\n",machine.describe_context(),mcu_command,mcu_offset*2); |
| 265 | 265 | } |
| 266 | 266 | break; |
| r15082 | r15083 | |
| 447 | 447 | |
| 448 | 448 | switch(offset) |
| 449 | 449 | { |
| 450 | case 0/2: return input_port_read(machine(), "P1"); | |
| 451 | case 2/2: return input_port_read(machine(), "P2"); | |
| 452 | case 4/2: return input_port_read(machine(), "SYSTEM"); | |
| 453 | case 6/2: return input_port_read(machine(), "EXTRA"); | |
| 450 | case 0/2: return ioport("P1")->read(); | |
| 451 | case 2/2: return ioport("P2")->read(); | |
| 452 | case 4/2: return ioport("SYSTEM")->read(); | |
| 453 | case 6/2: return ioport("EXTRA")->read(); | |
| 454 | 454 | default: logerror("jchan_ctrl_r unknown!"); break; |
| 455 | 455 | } |
| 456 | 456 | return m_ctrl[offset]; |
| r15082 | r15083 | |
| 590 | 590 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 591 | 591 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 592 | 592 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 593 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 594 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 593 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 594 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 595 | 595 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 596 | 596 | |
| 597 | 597 | PORT_START("P2") /* $f00002.w (-> $2000b5.b) */ |
| r15082 | r15083 | |
| 601 | 601 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 602 | 602 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 603 | 603 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 604 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 605 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 604 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 605 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 606 | 606 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 607 | 607 | |
| 608 | 608 | PORT_START("SYSTEM") /* $f00004.b */ |
| r15082 | r15083 | |
| 616 | 616 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 617 | 617 | |
| 618 | 618 | PORT_START("EXTRA") /* $f00006.b */ |
| 619 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 620 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 621 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 622 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x8000) | |
| 623 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 624 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 625 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 626 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,PORTCOND_EQUALS,0x0000) | |
| 619 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 620 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 621 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 622 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW",0x8000,EQUALS,0x8000) | |
| 623 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 624 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 625 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 626 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW",0x8000,EQUALS,0x0000) | |
| 627 | 627 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* duplicated Player 1 Button 4 (whatever the layout is) */ |
| 628 | 628 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* duplicated Player 2 Button 4 (whatever the layout is) */ |
| 629 | 629 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 250 | 250 | */ |
| 251 | 251 | // multiplexed? or just overriden? |
| 252 | 252 | |
| 253 | int retval = (m_dma_active << 15) | (i | |
| 253 | int retval = (m_dma_active << 15) | (iop | |
| 254 | 254 | return retval; |
| 255 | 255 | } |
| 256 | 256 | |
| r15082 | r15083 | |
| 365 | 365 | |
| 366 | 366 | READ16_MEMBER(mlanding_state::ml_analog1_lsb_r) |
| 367 | 367 | { |
| 368 | return i | |
| 368 | return iop | |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | READ16_MEMBER(mlanding_state::ml_analog2_lsb_r) |
| 372 | 372 | { |
| 373 | return i | |
| 373 | return iop | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | READ16_MEMBER(mlanding_state::ml_analog3_lsb_r) |
| 377 | 377 | { |
| 378 | return (i | |
| 378 | return (iop | |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | /* |
| r15082 | r15083 | |
| 401 | 401 | /* high bits of analog inputs + "limiters"/ADC converters. */ |
| 402 | 402 | READ16_MEMBER(mlanding_state::ml_analog1_msb_r) |
| 403 | 403 | { |
| 404 | return ((i | |
| 404 | return ((iop | |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | READ16_MEMBER(mlanding_state::ml_analog2_msb_r) |
| r15082 | r15083 | |
| 409 | 409 | UINT8 res; |
| 410 | 410 | UINT16 y_adc,x_adc; |
| 411 | 411 | |
| 412 | y_adc = input_port_read(machine(), "STICKY"); | |
| 413 | x_adc = input_port_read(machine(), "STICKZ"); | |
| 412 | y_adc = ioport("STICKY")->read(); | |
| 413 | x_adc = ioport("STICKZ")->read(); | |
| 414 | 414 | |
| 415 | 415 | res = 0; |
| 416 | 416 | |
| r15082 | r15083 | |
| 426 | 426 | |
| 427 | 427 | // popmessage("%04x %04x",x_adc,y_adc); |
| 428 | 428 | |
| 429 | return ((i | |
| 429 | return ((iop | |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | READ16_MEMBER(mlanding_state::ml_analog3_msb_r) |
| r15082 | r15083 | |
| 434 | 434 | UINT8 z_adc,res; |
| 435 | 435 | UINT16 x_adc; |
| 436 | 436 | |
| 437 | z_adc = input_port_read(machine(), "STICKX"); | |
| 438 | x_adc = input_port_read(machine(), "STICKZ"); | |
| 437 | z_adc = ioport("STICKX")->read(); | |
| 438 | x_adc = ioport("STICKZ")->read(); | |
| 439 | 439 | |
| 440 | 440 | res = 0; |
| 441 | 441 | |
| r15082 | r15083 | |
| 449 | 449 | if(x_adc & 0x800 || x_adc == 0) |
| 450 | 450 | res|= 0x10; |
| 451 | 451 | |
| 452 | return ((i | |
| 452 | return ((iop | |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | WRITE16_MEMBER(mlanding_state::ml_nmi_to_sound_w) |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | { |
| 83 | 83 | switch(m_mux_data) |
| 84 | 84 | { |
| 85 | case 0x01: return input_port_read(machine(),"KEY0_PL1"); | |
| 86 | case 0x02: return input_port_read(machine(),"KEY1_PL1"); | |
| 87 | case 0x04: return input_port_read(machine(),"KEY2_PL1"); | |
| 88 | case 0x08: return input_port_read(machine(),"KEY3_PL1"); | |
| 89 | case 0x10: return input_port_read(machine(),"KEY4_PL1"); | |
| 85 | case 0x01: return ioport("KEY0_PL1")->read(); | |
| 86 | case 0x02: return ioport("KEY1_PL1")->read(); | |
| 87 | case 0x04: return ioport("KEY2_PL1")->read(); | |
| 88 | case 0x08: return ioport("KEY3_PL1")->read(); | |
| 89 | case 0x10: return ioport("KEY4_PL1")->read(); | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | return 0xff; |
| r15082 | r15083 | |
| 96 | 96 | { |
| 97 | 97 | switch(m_mux_data) |
| 98 | 98 | { |
| 99 | case 0x01: return input_port_read(machine(),"KEY0_PL2"); | |
| 100 | case 0x02: return input_port_read(machine(),"KEY1_PL2"); | |
| 101 | case 0x04: return input_port_read(machine(),"KEY2_PL2"); | |
| 102 | case 0x08: return input_port_read(machine(),"KEY3_PL2"); | |
| 103 | case 0x10: return input_port_read(machine(),"KEY4_PL2"); | |
| 99 | case 0x01: return ioport("KEY0_PL2")->read(); | |
| 100 | case 0x02: return ioport("KEY1_PL2")->read(); | |
| 101 | case 0x04: return ioport("KEY2_PL2")->read(); | |
| 102 | case 0x08: return ioport("KEY3_PL2")->read(); | |
| 103 | case 0x10: return ioport("KEY4_PL2")->read(); | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 1435 | 1435 | |
| 1436 | 1436 | if (data < 8 || data > 15) |
| 1437 | 1437 | logerror("%08X:Unexpected analog port select = %08X\n", cpu_get_pc(&space.device()), data); |
| 1438 | m_pending_analog_read = i | |
| 1438 | m_pending_analog_read = iop | |
| 1439 | 1439 | } |
| 1440 | 1440 | |
| 1441 | 1441 | |
| r15082 | r15083 | |
| 1453 | 1453 | switch (offset) |
| 1454 | 1454 | { |
| 1455 | 1455 | case 0: /* low 8 bits of X */ |
| 1456 | result = (i | |
| 1456 | result = (iop | |
| 1457 | 1457 | break; |
| 1458 | 1458 | |
| 1459 | 1459 | case 1: /* upper 4 bits of X */ |
| 1460 | result = (input_port_read(machine(), "LIGHT0_X") >> 4) & 0x0f; | |
| 1461 | result |= (input_port_read(machine(), "FAKE") & 0x03) << 4; | |
| 1460 | result = (ioport("LIGHT0_X")->read() >> 4) & 0x0f; | |
| 1461 | result |= (ioport("FAKE")->read() & 0x03) << 4; | |
| 1462 | 1462 | result |= 0x40; |
| 1463 | 1463 | break; |
| 1464 | 1464 | |
| 1465 | 1465 | case 2: /* low 8 bits of Y */ |
| 1466 | result = (i | |
| 1466 | result = (iop | |
| 1467 | 1467 | break; |
| 1468 | 1468 | |
| 1469 | 1469 | case 3: /* upper 4 bits of Y */ |
| 1470 | result = (i | |
| 1470 | result = (iop | |
| 1471 | 1471 | break; |
| 1472 | 1472 | |
| 1473 | 1473 | case 4: /* low 8 bits of X */ |
| 1474 | result = (i | |
| 1474 | result = (iop | |
| 1475 | 1475 | break; |
| 1476 | 1476 | |
| 1477 | 1477 | case 5: /* upper 4 bits of X */ |
| 1478 | result = (input_port_read(machine(), "LIGHT1_X") >> 4) & 0x0f; | |
| 1479 | result |= (input_port_read(machine(), "FAKE") & 0x30); | |
| 1478 | result = (ioport("LIGHT1_X")->read() >> 4) & 0x0f; | |
| 1479 | result |= (ioport("FAKE")->read() & 0x30); | |
| 1480 | 1480 | result |= 0x40; |
| 1481 | 1481 | break; |
| 1482 | 1482 | |
| 1483 | 1483 | case 6: /* low 8 bits of Y */ |
| 1484 | result = (i | |
| 1484 | result = (iop | |
| 1485 | 1485 | break; |
| 1486 | 1486 | |
| 1487 | 1487 | case 7: /* upper 4 bits of Y */ |
| 1488 | result = (i | |
| 1488 | result = (iop | |
| 1489 | 1489 | break; |
| 1490 | 1490 | } |
| 1491 | 1491 | return result; |
| r15082 | r15083 | |
|---|---|---|
| 150 | 150 | if (offset == 0x00) |
| 151 | 151 | { |
| 152 | 152 | if (ACCESSING_BITS_24_31) |
| 153 | return i | |
| 153 | return iop | |
| 154 | 154 | if (ACCESSING_BITS_16_23) |
| 155 | return i | |
| 155 | return iop | |
| 156 | 156 | } |
| 157 | 157 | return 0; |
| 158 | 158 | } |
| r15082 | r15083 | |
|---|---|---|
| 212 | 212 | |
| 213 | 213 | READ16_MEMBER(tetrisp2_state::tetrisp2_ip_1_word_r) |
| 214 | 214 | { |
| 215 | return ( i | |
| 215 | return ( iop | |
| 216 | 216 | ( machine().rand() & ~0xfcff ) | |
| 217 | 217 | ( 1 << (8 + (machine().rand()&1)) ); |
| 218 | 218 | } |
| r15082 | r15083 | |
| 540 | 540 | READ16_MEMBER(stepstag_state::stepstag_coins_r) |
| 541 | 541 | { |
| 542 | 542 | // bits 8 & 9? |
| 543 | return ( i | |
| 543 | return ( iop | |
| 544 | 544 | ( machine().rand() & ~0xfcff ) | |
| 545 | 545 | ( 1 << (8 + (machine().rand()&1)) ); |
| 546 | 546 | } |
| r15082 | r15083 | |
|---|---|---|
| 233 | 233 | |
| 234 | 234 | READ16_MEMBER(alpha68k_state::kyros_dip_r) |
| 235 | 235 | { |
| 236 | return i | |
| 236 | return iop | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | READ16_MEMBER(alpha68k_state::control_1_r) |
| 240 | 240 | { |
| 241 | 241 | |
| 242 | 242 | if (m_invert_controls) |
| 243 | return ~(i | |
| 243 | return ~(iop | |
| 244 | 244 | |
| 245 | return (i | |
| 245 | return (iop | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | READ16_MEMBER(alpha68k_state::control_2_r) |
| 249 | 249 | { |
| 250 | 250 | |
| 251 | 251 | if (m_invert_controls) |
| 252 | return ~(i | |
| 252 | return ~(iop | |
| 253 | 253 | |
| 254 | return input_port_read(machine(), "IN3") + /* Low byte of CN1 */ | |
| 255 | ((~(1 << input_port_read(machine(), "IN5"))) << 8); | |
| 254 | return ioport("IN3")->read() + /* Low byte of CN1 */ | |
| 255 | ((~(1 << ioport("IN5")->read())) << 8); | |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | READ16_MEMBER(alpha68k_state::control_2_V_r) |
| 259 | 259 | { |
| 260 | return i | |
| 260 | return iop | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | READ16_MEMBER(alpha68k_state::control_3_r) |
| 264 | 264 | { |
| 265 | 265 | |
| 266 | 266 | if (m_invert_controls) |
| 267 | return ~(((~(1 << i | |
| 267 | return ~(((~(1 << iop | |
| 268 | 268 | |
| 269 | return ((~(1 << i | |
| 269 | return ((~(1 << iop | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /* High 4 bits of CN1 & CN2 */ |
| r15082 | r15083 | |
| 274 | 274 | { |
| 275 | 275 | |
| 276 | 276 | if (m_invert_controls) |
| 277 | return ~((((~(1 << input_port_read(machine(), "IN6"))) << 4) & 0xf000) | |
| 278 | + (((~(1 << input_port_read(machine(), "IN5")))) & 0x0f00)); | |
| 277 | return ~((((~(1 << ioport("IN6")->read())) << 4) & 0xf000) | |
| 278 | + (((~(1 << ioport("IN5")->read()))) & 0x0f00)); | |
| 279 | 279 | |
| 280 | return (((~(1 << input_port_read(machine(), "IN6"))) << 4) & 0xf000) | |
| 281 | + (((~(1 << input_port_read(machine(), "IN5")))) & 0x0f00); | |
| 280 | return (((~(1 << ioport("IN6")->read())) << 4) & 0xf000) | |
| 281 | + (((~(1 << ioport("IN5")->read()))) & 0x0f00); | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | READ16_MEMBER(alpha68k_state::jongbou_inputs_r) |
| 285 | 285 | { |
| 286 | UINT8 inp1 = input_port_read(machine(), "IN3"); | |
| 287 | UINT8 inp2 = input_port_read(machine(), "IN4"); | |
| 286 | UINT8 inp1 = ioport("IN3")->read(); | |
| 287 | UINT8 inp2 = ioport("IN4")->read(); | |
| 288 | 288 | inp1 = ((inp1 & 0x01) << 3) + ((inp1 & 0x02) << 1) + ((inp1 & 0x04) >> 1) + ((inp1 & 0x08) >> 3); |
| 289 | 289 | inp2 = ((inp2 & 0x01) << 3) + ((inp2 & 0x02) << 1) + ((inp2 & 0x04) >> 1) + ((inp2 & 0x08) >> 3); |
| 290 | return i | |
| 290 | return iop | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | |
| r15082 | r15083 | |
| 353 | 353 | return 0; |
| 354 | 354 | case 0x29: /* Query microcontroller for coin insert */ |
| 355 | 355 | m_trigstate++; |
| 356 | if ((i | |
| 356 | if ((iop | |
| 357 | 357 | m_latch = 0; |
| 358 | if ((i | |
| 358 | if ((iop | |
| 359 | 359 | { |
| 360 | 360 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id & 0xff); // coinA |
| 361 | 361 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| 362 | 362 | m_latch = 1; |
| 363 | 363 | |
| 364 | m_coinvalue = (~i | |
| 364 | m_coinvalue = (~iop | |
| 365 | 365 | m_deposits1++; |
| 366 | 366 | if (m_deposits1 == coinage1[m_coinvalue][0]) |
| 367 | 367 | { |
| r15082 | r15083 | |
| 371 | 371 | else |
| 372 | 372 | m_credits = 0; |
| 373 | 373 | } |
| 374 | else if ((i | |
| 374 | else if ((iop | |
| 375 | 375 | { |
| 376 | 376 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id >> 8); // coinB |
| 377 | 377 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| 378 | 378 | m_latch = 1; |
| 379 | 379 | |
| 380 | m_coinvalue = (~i | |
| 380 | m_coinvalue = (~iop | |
| 381 | 381 | m_deposits2++; |
| 382 | 382 | if (m_deposits2 == coinage2[m_coinvalue][0]) |
| 383 | 383 | { |
| r15082 | r15083 | |
| 430 | 430 | switch (offset) |
| 431 | 431 | { |
| 432 | 432 | case 0: /* Dipswitch 2 */ |
| 433 | m_shared_ram[0] = (source & 0xff00) | i | |
| 433 | m_shared_ram[0] = (source & 0xff00) | iop | |
| 434 | 434 | return 0; |
| 435 | 435 | |
| 436 | 436 | case 0x22: /* Coin value */ |
| r15082 | r15083 | |
| 438 | 438 | return 0; |
| 439 | 439 | |
| 440 | 440 | case 0x29: /* Query microcontroller for coin insert */ |
| 441 | if ((i | |
| 441 | if ((iop | |
| 442 | 442 | m_latch = 0; |
| 443 | if ((i | |
| 443 | if ((iop | |
| 444 | 444 | { |
| 445 | 445 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id & 0xff); // coinA |
| 446 | 446 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 449 | 449 | if ((m_coin_id & 0xff) == 0x22) |
| 450 | 450 | { |
| 451 | 451 | if (m_game_id == ALPHA68K_BTLFIELDB) |
| 452 | m_coinvalue = (i | |
| 452 | m_coinvalue = (iop | |
| 453 | 453 | else |
| 454 | m_coinvalue = (~i | |
| 454 | m_coinvalue = (~iop | |
| 455 | 455 | |
| 456 | 456 | m_deposits1++; |
| 457 | 457 | if (m_deposits1 == coinage1[m_coinvalue][0]) |
| r15082 | r15083 | |
| 463 | 463 | m_credits = 0; |
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | else if ((i | |
| 466 | else if ((iop | |
| 467 | 467 | { |
| 468 | 468 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id >> 8); // coinB |
| 469 | 469 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 472 | 472 | if ((m_coin_id >> 8) == 0x22) |
| 473 | 473 | { |
| 474 | 474 | if (m_game_id == ALPHA68K_BTLFIELDB) |
| 475 | m_coinvalue = (i | |
| 475 | m_coinvalue = (iop | |
| 476 | 476 | else |
| 477 | m_coinvalue = (~i | |
| 477 | m_coinvalue = (~iop | |
| 478 | 478 | |
| 479 | 479 | m_deposits2++; |
| 480 | 480 | if (m_deposits2 == coinage2[m_coinvalue][0]) |
| r15082 | r15083 | |
| 524 | 524 | switch (offset) |
| 525 | 525 | { |
| 526 | 526 | case 0: /* Dipswitch 1 */ |
| 527 | m_shared_ram[0] = (source & 0xff00) | i | |
| 527 | m_shared_ram[0] = (source & 0xff00) | iop | |
| 528 | 528 | return 0; |
| 529 | 529 | case 0x22: /* Coin value */ |
| 530 | 530 | m_shared_ram[0x22] = (source & 0xff00) | (m_credits & 0x00ff); |
| 531 | 531 | return 0; |
| 532 | 532 | case 0x29: /* Query microcontroller for coin insert */ |
| 533 | if ((i | |
| 533 | if ((iop | |
| 534 | 534 | m_latch = 0; |
| 535 | if ((i | |
| 535 | if ((iop | |
| 536 | 536 | { |
| 537 | 537 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id & 0xff); // coinA |
| 538 | 538 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 540 | 540 | |
| 541 | 541 | if ((m_coin_id & 0xff) == 0x22) |
| 542 | 542 | { |
| 543 | m_coinvalue = (~i | |
| 543 | m_coinvalue = (~iop | |
| 544 | 544 | m_deposits1++; |
| 545 | 545 | if (m_deposits1 == coinage1[m_coinvalue][0]) |
| 546 | 546 | { |
| r15082 | r15083 | |
| 551 | 551 | m_credits = 0; |
| 552 | 552 | } |
| 553 | 553 | } |
| 554 | else if ((i | |
| 554 | else if ((iop | |
| 555 | 555 | { |
| 556 | 556 | m_shared_ram[0x29] = (source & 0xff00) | (m_coin_id>>8); // coinB |
| 557 | 557 | m_shared_ram[0x22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 559 | 559 | |
| 560 | 560 | if ((m_coin_id >> 8) == 0x22) |
| 561 | 561 | { |
| 562 | m_coinvalue = (~i | |
| 562 | m_coinvalue = (~iop | |
| 563 | 563 | m_deposits2++; |
| 564 | 564 | if (m_deposits2 == coinage2[m_coinvalue][0]) |
| 565 | 565 | { |
| r15082 | r15083 | |
| 585 | 585 | break; |
| 586 | 586 | |
| 587 | 587 | case 0x1f00: /* Dipswitch 1 */ |
| 588 | m_shared_ram[0x1f00] = (source & 0xff00) | i | |
| 588 | m_shared_ram[0x1f00] = (source & 0xff00) | iop | |
| 589 | 589 | return 0; |
| 590 | 590 | case 0x1f29: /* Query microcontroller for coin insert */ |
| 591 | if ((i | |
| 591 | if ((iop | |
| 592 | 592 | m_latch = 0; |
| 593 | if ((i | |
| 593 | if ((iop | |
| 594 | 594 | { |
| 595 | 595 | m_shared_ram[0x1f29] = (source & 0xff00) | (m_coin_id & 0xff); // coinA |
| 596 | 596 | m_shared_ram[0x1f22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 598 | 598 | |
| 599 | 599 | if ((m_coin_id & 0xff) == 0x22) |
| 600 | 600 | { |
| 601 | m_coinvalue = (~i | |
| 601 | m_coinvalue = (~iop | |
| 602 | 602 | m_deposits1++; |
| 603 | 603 | if (m_deposits1 == coinage1[m_coinvalue][0]) |
| 604 | 604 | { |
| r15082 | r15083 | |
| 609 | 609 | m_credits = 0; |
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | else if ((i | |
| 612 | else if ((iop | |
| 613 | 613 | { |
| 614 | 614 | m_shared_ram[0x1f29] = (source & 0xff00) | (m_coin_id >> 8); // coinB |
| 615 | 615 | m_shared_ram[0x1f22] = (source & 0xff00) | 0x0; |
| r15082 | r15083 | |
| 617 | 617 | |
| 618 | 618 | if ((m_coin_id >> 8) == 0x22) |
| 619 | 619 | { |
| 620 | m_coinvalue = (~i | |
| 620 | m_coinvalue = (~iop | |
| 621 | 621 | m_deposits2++; |
| 622 | 622 | if (m_deposits2 == coinage2[m_coinvalue][0]) |
| 623 | 623 | { |
| r15082 | r15083 | |
| 638 | 638 | the microcontroller supplies it (it does for all the other games, |
| 639 | 639 | but usually to 0x0 in RAM) when 0x21 is read (code at 0x009332) */ |
| 640 | 640 | source = m_shared_ram[0x0163]; |
| 641 | m_shared_ram[0x0163] = (source & 0x00ff) | (i | |
| 641 | m_shared_ram[0x0163] = (source & 0x00ff) | (iop | |
| 642 | 642 | |
| 643 | 643 | return 0; |
| 644 | 644 | case 0x1ffe: /* Custom ID check */ |
| r15082 | r15083 | |
| 1568 | 1568 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| 1569 | 1569 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 1570 | 1570 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1571 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") PORT_CONDITION("DSW2",0x08, | |
| 1571 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") PORT_CONDITION("DSW2",0x08, | |
| 1572 | 1572 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1573 | 1573 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 1574 | PORT_DIPNAME( 0x04, 0x04, "Game Mode" ) PORT_DIPLOCATION("SW2:3") PORT_CONDITION("DSW2",0x08, | |
| 1574 | PORT_DIPNAME( 0x04, 0x04, "Game Mode" ) PORT_DIPLOCATION("SW2:3") PORT_CONDITION("DSW2",0x08, | |
| 1575 | 1575 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 1576 | 1576 | PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)") |
| 1577 | 1577 | PORT_DIPNAME( 0x08, 0x08, "SW2:3 Demo Sound/Game Mode" ) PORT_DIPLOCATION("SW2:4") |
| r15082 | r15083 | |
|---|---|---|
| 517 | 517 | |
| 518 | 518 | READ16_MEMBER(tmaster_state::tmaster_coins_r) |
| 519 | 519 | { |
| 520 | return i | |
| 520 | return iop | |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | static ADDRESS_MAP_START( tmaster_map, AS_PROGRAM, 16, tmaster_state ) |
| r15082 | r15083 | |
| 1834 | 1834 | static DRIVER_INIT( galgames ) |
| 1835 | 1835 | { |
| 1836 | 1836 | tmaster_state *state = machine.driver_data<tmaster_state>(); |
| 1837 | UINT8 *ROM = | |
| 1837 | UINT8 *ROM = sta | |
| 1838 | 1838 | int cart; |
| 1839 | 1839 | |
| 1840 | 1840 | // RAM bank at 0x000000-0x03ffff and 0x200000-0x23ffff |
| r15082 | r15083 | |
| 1856 | 1856 | |
| 1857 | 1857 | for (cart = 1; cart <= 4; cart++) |
| 1858 | 1858 | { |
| 1859 | UINT8 *CART = | |
| 1859 | UINT8 *CART = sta | |
| 1860 | 1860 | |
| 1861 | 1861 | if (0x200000 * (cart+1) <= state->memregion("maincpu")->bytes()) |
| 1862 | 1862 | CART += 0x200000 * cart; |
| r15082 | r15083 | |
|---|---|---|
| 1183 | 1183 | static void |
| 1184 | 1184 | ReadAnalogDrivingPorts( running_machine &machine, UINT16 *gas, UINT16 *brake, UINT16 *steer ) |
| 1185 | 1185 | { |
| 1186 | *gas = input_port_read(machine, "GAS"); | |
| 1187 | *brake = input_port_read(machine, "BRAKE"); | |
| 1188 | *steer = input_port_read(machine, "STEER"); | |
| 1186 | *gas = machine.root_device().ioport("GAS")->read(); | |
| 1187 | *brake = machine.root_device().ioport("BRAKE")->read(); | |
| 1188 | *steer = machine.root_device().ioport("STEER")->read(); | |
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | /* TODO: REMOVE (THIS IS HANDLED BY "SUBCPU") */ |
| r15082 | r15083 | |
| 1193 | 1193 | AnalogAsDigital( running_machine &machine ) |
| 1194 | 1194 | { |
| 1195 | 1195 | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1196 | UINT16 inputs = input_port_read_safe(machine, "INPUTS", 0); | |
| 1197 | UINT16 gas = input_port_read_safe(machine, "GAS", 0); | |
| 1198 | UINT16 steer = input_port_read_safe(machine, "STEER", 0); | |
| 1196 | UINT16 inputs = state->ioport("INPUTS")->read_safe(0); | |
| 1197 | UINT16 gas = state->ioport("GAS")->read_safe(0); | |
| 1198 | UINT16 steer = state->ioport("STEER")->read_safe(0); | |
| 1199 | 1199 | UINT16 result = 0xffff; |
| 1200 | 1200 | |
| 1201 | 1201 | switch( state->m_gametype ) |
| r15082 | r15083 | |
| 1248 | 1248 | UINT16 *share16 = (UINT16 *)state->m_shareram.target(); |
| 1249 | 1249 | UINT32 coin_state; |
| 1250 | 1250 | |
| 1251 | coin_state = i | |
| 1251 | coin_state = state->iop | |
| 1252 | 1252 | |
| 1253 | 1253 | if (!(coin_state & 0x1000) && (state->m_old_coin_state & 0x1000)) |
| 1254 | 1254 | { |
| r15082 | r15083 | |
| 1277 | 1277 | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1278 | 1278 | if( nthbyte(state->m_system_controller, 0x18) != 0 ) |
| 1279 | 1279 | { |
| 1280 | UINT16 flags = i | |
| 1280 | UINT16 flags = state->iop | |
| 1281 | 1281 | UINT16 gas, brake, steer, coinram_address_is_odd = 0; |
| 1282 | 1282 | ReadAnalogDrivingPorts( machine, &gas, &brake, &steer ); |
| 1283 | 1283 | |
| r15082 | r15083 | |
| 1335 | 1335 | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1336 | 1336 | if( nthbyte(state->m_system_controller, 0x18) != 0 ) |
| 1337 | 1337 | { |
| 1338 | UINT16 flags = i | |
| 1338 | UINT16 flags = state->iop | |
| 1339 | 1339 | |
| 1340 | UINT16 volume0 = input_port_read(machine, "STICKY1") * 0x10; | |
| 1341 | UINT16 volume1 = input_port_read(machine, "STICKY2") * 0x10; | |
| 1342 | UINT16 volume2 = input_port_read(machine, "STICKX1") * 0x10; | |
| 1343 | UINT16 volume3 = input_port_read(machine, "STICKX2") * 0x10; | |
| 1340 | UINT16 volume0 = state->ioport("STICKY1")->read() * 0x10; | |
| 1341 | UINT16 volume1 = state->ioport("STICKY2")->read() * 0x10; | |
| 1342 | UINT16 volume2 = state->ioport("STICKX1")->read() * 0x10; | |
| 1343 | UINT16 volume3 = state->ioport("STICKX2")->read() * 0x10; | |
| 1344 | 1344 | |
| 1345 | 1345 | state->m_shareram[0x030/4] = (flags<<16) | volume0; |
| 1346 | 1346 | state->m_shareram[0x034/4] = (volume1<<16) | volume2; |
| r15082 | r15083 | |
| 2421 | 2421 | |
| 2422 | 2422 | READ32_MEMBER(namcos22_state::namcos22_dipswitch_r) |
| 2423 | 2423 | { |
| 2424 | return i | |
| 2424 | return iop | |
| 2425 | 2425 | } |
| 2426 | 2426 | |
| 2427 | 2427 | READ32_MEMBER(namcos22_state::namcos22_mcuram_r) |
| r15082 | r15083 | |
| 2436 | 2436 | |
| 2437 | 2437 | READ32_MEMBER(namcos22_state::namcos22_gun_r) |
| 2438 | 2438 | { |
| 2439 | int xpos = input_port_read_safe(machine(), "LIGHTX", 0) * 640 / 0xff; | |
| 2440 | int ypos = input_port_read_safe(machine(), "LIGHTY", 0) * 240 / 0xff + 0x10; | |
| 2439 | int xpos = ioport("LIGHTX")->read_safe(0) * 640 / 0xff; | |
| 2440 | int ypos = ioport("LIGHTY")->read_safe(0) * 240 / 0xff + 0x10; | |
| 2441 | 2441 | switch( offset ) |
| 2442 | 2442 | { |
| 2443 | 2443 | case 0: /* 430000 */ |
| r15082 | r15083 | |
| 2626 | 2626 | { |
| 2627 | 2627 | |
| 2628 | 2628 | if (m_p4 & 8) |
| 2629 | return i | |
| 2629 | return iop | |
| 2630 | 2630 | else |
| 2631 | return i | |
| 2631 | return iop | |
| 2632 | 2632 | } |
| 2633 | 2633 | |
| 2634 | 2634 | WRITE8_MEMBER(namcos22_state::mcu_port6_w) |
| r15082 | r15083 | |
| 2666 | 2666 | // H+L = horizontal, 1 H+L = vertical |
| 2667 | 2667 | UINT16 ddx, ddy; |
| 2668 | 2668 | |
| 2669 | ddx = i | |
| 2669 | ddx = iop | |
| 2670 | 2670 | if (ddx > 0) ddx -= 1; |
| 2671 | ddy = i | |
| 2671 | ddy = iop | |
| 2672 | 2672 | if (ddy > 0) ddy -= 1; |
| 2673 | 2673 | |
| 2674 | 2674 | ddx <<= 2; |
| r15082 | r15083 | |
| 2685 | 2685 | // and timer A3 is configured by the MCU program to cause an interrupt each time |
| 2686 | 2686 | // it's clocked. by counting the number of interrupts in a frame, we can determine |
| 2687 | 2687 | // how fast the user is pedaling. |
| 2688 | if( i | |
| 2688 | if( iop | |
| 2689 | 2689 | { |
| 2690 | 2690 | int i; |
| 2691 | 2691 | for (i = 0; i < 16; i++) |
| r15082 | r15083 | |
| 2739 | 2739 | READ8_MEMBER(namcos22_state::alpineracer_mcu_adc_r) |
| 2740 | 2740 | { |
| 2741 | 2741 | // 0 H+L = swing, 1 H+L = edge |
| 2742 | UINT16 swing = input_port_read(machine(), "SWING")<<2; | |
| 2743 | UINT16 edge = input_port_read(machine(), "EDGE" )<<2; | |
| 2742 | UINT16 swing = ioport("SWING")->read()<<2; | |
| 2743 | UINT16 edge = ioport("EDGE" )->read()<<2; | |
| 2744 | 2744 | |
| 2745 | 2745 | switch (offset) |
| 2746 | 2746 | { |
| r15082 | r15083 | |
| 2833 | 2833 | { |
| 2834 | 2834 | UINT16 gas, steer, ddy; |
| 2835 | 2835 | |
| 2836 | gas = input_port_read(machine(), "GAS") ^ 0x7f; | |
| 2837 | steer = input_port_read(machine(), "STEER") ^ 0xff; | |
| 2838 | ddy = input_port_read(machine(), "STICKY"); | |
| 2836 | gas = ioport("GAS")->read() ^ 0x7f; | |
| 2837 | steer = ioport("STEER")->read() ^ 0xff; | |
| 2838 | ddy = ioport("STICKY")->read(); | |
| 2839 | 2839 | if (ddy > 0) ddy -= 1; |
| 2840 | 2840 | |
| 2841 | 2841 | gas <<= 2; |
| r15082 | r15083 | |
| 2877 | 2877 | { |
| 2878 | 2878 | UINT16 pedal, x, y; |
| 2879 | 2879 | |
| 2880 | pedal = input_port_read(machine(), "PEDAL")<<2; | |
| 2881 | x = input_port_read(machine(), "STICKX")<<2; | |
| 2882 | y = input_port_read(machine(), "STICKY")<<2; | |
| 2880 | pedal = ioport("PEDAL")->read()<<2; | |
| 2881 | x = ioport("STICKX")->read()<<2; | |
| 2882 | y = ioport("STICKY")->read()<<2; | |
| 2883 | 2883 | |
| 2884 | 2884 | |
| 2885 | 2885 | switch (offset) |
| r15082 | r15083 | |
|---|---|---|
| 145 | 145 | |
| 146 | 146 | memset(potsense, 0, sizeof potsense); |
| 147 | 147 | |
| 148 | potsense[input_port_read(machine, "STICK1_Y")] |= 1; | |
| 149 | potsense[input_port_read(machine, "STICK1_X")] |= 2; | |
| 150 | potsense[input_port_read(machine, "STICK0_Y")] |= 4; | |
| 151 | potsense[input_port_read(machine, "STICK0_X")] |= 8; | |
| 148 | potsense[state->ioport("STICK1_Y")->read()] |= 1; | |
| 149 | potsense[state->ioport("STICK1_X")->read()] |= 2; | |
| 150 | potsense[state->ioport("STICK0_Y")->read()] |= 4; | |
| 151 | potsense[state->ioport("STICK0_X")->read()] |= 8; | |
| 152 | 152 | |
| 153 | 153 | for (i = 0; i < 64; i++) |
| 154 | 154 | if (potsense[i] != 0) |
| r15082 | r15083 | |
| 173 | 173 | /* two physical buttons (start game and stop runner) share the same port bit */ |
| 174 | 174 | READ8_MEMBER(flyball_state::flyball_input_r) |
| 175 | 175 | { |
| 176 | return i | |
| 176 | return iop | |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | READ8_MEMBER(flyball_state::flyball_scanline_r) |
| r15082 | r15083 | |
|---|---|---|
| 28 | 28 | --------------------------------------------------------------------- |
| 29 | 29 | |
| 30 | 30 | Pluto 5 Technical Notes.... |
| 31 | (why is this information here? it seems to be c+p straight from a tech manual | |
| 32 | and is completely unneccessary) | |
| 31 | 33 | |
| 32 | 34 | |
| 33 | 35 | * Clocks... |
| r15082 | r15083 | |
| 180 | 182 | { |
| 181 | 183 | public: |
| 182 | 184 | pluto5_state(const machine_config &mconfig, device_type type, const char *tag) |
| 183 | : driver_device(mconfig, type, tag) { } | |
| 185 | : driver_device(mconfig, type, tag), | |
| 186 | m_maincpu(*this, "maincpu") | |
| 187 | { } | |
| 184 | 188 | |
| 189 | UINT32* m_cpuregion; | |
| 190 | UINT32* m_mainram; | |
| 191 | ||
| 192 | DECLARE_READ32_MEMBER(pluto5_mem_r); | |
| 193 | DECLARE_WRITE32_MEMBER(pluto5_mem_w); | |
| 194 | ||
| 195 | protected: | |
| 196 | ||
| 197 | // devices | |
| 198 | required_device<cpu_device> m_maincpu; | |
| 199 | ||
| 185 | 200 | }; |
| 186 | 201 | |
| 202 | READ32_MEMBER(pluto5_state::pluto5_mem_r) | |
| 203 | { | |
| 204 | int pc = cpu_get_pc(&space.device()); | |
| 205 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 187 | 206 | |
| 207 | switch ( cs ) | |
| 208 | { | |
| 209 | case 1: | |
| 210 | return m_cpuregion[offset]; | |
| 211 | ||
| 212 | default: | |
| 213 | logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); | |
| 214 | ||
| 215 | } | |
| 216 | ||
| 217 | return 0x0000; | |
| 218 | } | |
| 219 | ||
| 220 | WRITE32_MEMBER(pluto5_state::pluto5_mem_w) | |
| 221 | { | |
| 222 | int pc = cpu_get_pc(&space.device()); | |
| 223 | int cs = m68340_get_cs(m_maincpu, offset * 4); | |
| 224 | ||
| 225 | switch ( cs ) | |
| 226 | { | |
| 227 | default: | |
| 228 | logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); | |
| 229 | ||
| 230 | } | |
| 231 | ||
| 232 | } | |
| 233 | ||
| 234 | ||
| 188 | 235 | static ADDRESS_MAP_START( pluto5_map, AS_PROGRAM, 32, pluto5_state ) |
| 189 | AM_RANGE(0x000000, 0x | |
| 236 | AM_RANGE(0x00000000, 0x | |
| 190 | 237 | ADDRESS_MAP_END |
| 191 | 238 | |
| 192 | 239 | static INPUT_PORTS_START( pluto5 ) |
| 193 | 240 | INPUT_PORTS_END |
| 194 | 241 | |
| 242 | static MACHINE_START( pluto5 ) | |
| 243 | { | |
| 244 | pluto5_state *state = machine.driver_data<pluto5_state>(); | |
| 245 | state->m_cpuregion = (UINT32*)state->memregion( "maincpu" )->base(); | |
| 246 | state->m_mainram = (UINT32*)auto_alloc_array_clear(machine, UINT32, 0x10000); | |
| 247 | ||
| 248 | } | |
| 249 | ||
| 195 | 250 | static MACHINE_CONFIG_START( pluto5, pluto5_state ) |
| 196 | 251 | MCFG_CPU_ADD("maincpu", M68340, 16000000) |
| 197 | 252 | MCFG_CPU_PROGRAM_MAP(pluto5_map) |
| 198 | 253 | |
| 254 | MCFG_MACHINE_START( pluto5 ) | |
| 255 | ||
| 256 | ||
| 199 | 257 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 200 | 258 | /* unknown sound */ |
| 201 | 259 | MACHINE_CONFIG_END |
| r15082 | r15083 | |
|---|---|---|
| 580 | 580 | ADDRESS_MAP_END |
| 581 | 581 | |
| 582 | 582 | READ8_MEMBER(galaxold_state::scramb2_protection_r){ return 0x25; } |
| 583 | READ8_MEMBER(galaxold_state::scramb2_port0_r){ return (input_port_read(machine(), "IN0") >> offset) & 0x1; } | |
| 584 | READ8_MEMBER(galaxold_state::scramb2_port1_r){ return (input_port_read(machine(), "IN1") >> offset) & 0x1; } | |
| 585 | READ8_MEMBER(galaxold_state::scramb2_port2_r){ return (input_port_read(machine(), "IN2") >> offset) & 0x1; } | |
| 583 | READ8_MEMBER(galaxold_state::scramb2_port0_r){ return (ioport("IN0")->read() >> offset) & 0x1; } | |
| 584 | READ8_MEMBER(galaxold_state::scramb2_port1_r){ return (ioport("IN1")->read() >> offset) & 0x1; } | |
| 585 | READ8_MEMBER(galaxold_state::scramb2_port2_r){ return (ioport("IN2")->read() >> offset) & 0x1; } | |
| 586 | 586 | |
| 587 | 587 | static ADDRESS_MAP_START( scramb2_map, AS_PROGRAM, 8, galaxold_state ) |
| 588 | 588 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| r15082 | r15083 | |
| 923 | 923 | switch (bit_mask) |
| 924 | 924 | { |
| 925 | 925 | case 0x40: /* vpool : IN1 (0xa800) bit 6 */ |
| 926 | return ((i | |
| 926 | return ((iop | |
| 927 | 927 | case 0x01: /* vpool : DSW (0xb000) bit 0 */ |
| 928 | return ((i | |
| 928 | return ((iop | |
| 929 | 929 | |
| 930 | 930 | default: |
| 931 | 931 | logerror("vpool_lives_r : invalid %02X bit_mask\n",bit_mask); |
| r15082 | r15083 | |
| 1070 | 1070 | switch (bit_mask) |
| 1071 | 1071 | { |
| 1072 | 1072 | case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */ |
| 1073 | return ((i | |
| 1073 | return ((iop | |
| 1074 | 1074 | case 0x40: /* ckongg : IN1 (0xc400) bit 6 */ |
| 1075 | return ((i | |
| 1075 | return ((iop | |
| 1076 | 1076 | |
| 1077 | 1077 | case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */ |
| 1078 | return ((i | |
| 1078 | return ((iop | |
| 1079 | 1079 | case 0x01: /* ckongmc : DSW (0xb000) bit 0 */ |
| 1080 | return ((i | |
| 1080 | return ((iop | |
| 1081 | 1081 | |
| 1082 | 1082 | default: |
| 1083 | 1083 | logerror("ckongg_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| r15082 | r15083 | |
| 1438 | 1438 | switch (bit_mask) |
| 1439 | 1439 | { |
| 1440 | 1440 | case 0xc0: /* dkongjrm : IN1 (0xa8??) bits 6 and 7 */ |
| 1441 | return ((i | |
| 1441 | return ((iop | |
| 1442 | 1442 | case 0x01: /* dkongjrm : DSW (0xb0??) bit 0 */ |
| 1443 | return ((i | |
| 1443 | return ((iop | |
| 1444 | 1444 | |
| 1445 | 1445 | default: |
| 1446 | 1446 | logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| r15082 | r15083 | |
| 1869 | 1869 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1870 | 1870 | |
| 1871 | 1871 | PORT_START("SENSE") |
| 1872 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1872 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1873 | 1873 | INPUT_PORTS_END |
| 1874 | 1874 | |
| 1875 | 1875 | |
| r15082 | r15083 | |
| 1933 | 1933 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1934 | 1934 | |
| 1935 | 1935 | PORT_START("SENSE") |
| 1936 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1936 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1937 | 1937 | INPUT_PORTS_END |
| 1938 | 1938 | |
| 1939 | 1939 | |
| r15082 | r15083 | |
| 1997 | 1997 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1998 | 1998 | |
| 1999 | 1999 | PORT_START("SENSE") |
| 2000 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 2000 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 2001 | 2001 | INPUT_PORTS_END |
| 2002 | 2002 | |
| 2003 | 2003 |
| r15082 | r15083 | |
|---|---|---|
| 268 | 268 | |
| 269 | 269 | /* digital joystick type */ |
| 270 | 270 | if (m_joystick_type == 1) |
| 271 | newval = (i | |
| 271 | newval = (iop | |
| 272 | 272 | |
| 273 | 273 | /* Hall-effect analog joystick */ |
| 274 | 274 | else if (m_joystick_type == 2) |
| 275 | newval = i | |
| 275 | newval = iop | |
| 276 | 276 | |
| 277 | 277 | /* Road Blasters gas pedal */ |
| 278 | 278 | else if (m_joystick_type == 3) |
| 279 | newval = i | |
| 279 | newval = iop | |
| 280 | 280 | |
| 281 | 281 | /* the A4 bit enables/disables joystick IRQs */ |
| 282 | 282 | m_joystick_int_enable = ((offset >> 3) & 1) ^ 1; |
| r15082 | r15083 | |
| 321 | 321 | |
| 322 | 322 | if (player == 0) |
| 323 | 323 | { |
| 324 | posx = (INT8)input_port_read(machine(), "IN0"); | |
| 325 | posy = (INT8)input_port_read(machine(), "IN1"); | |
| 324 | posx = (INT8)ioport("IN0")->read(); | |
| 325 | posy = (INT8)ioport("IN1")->read(); | |
| 326 | 326 | } |
| 327 | 327 | else |
| 328 | 328 | { |
| 329 | posx = (INT8)input_port_read(machine(), "IN2"); | |
| 330 | posy = (INT8)input_port_read(machine(), "IN3"); | |
| 329 | posx = (INT8)ioport("IN2")->read(); | |
| 330 | posy = (INT8)ioport("IN3")->read(); | |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | m_cur[player][0] = posx + posy; |
| r15082 | r15083 | |
| 339 | 339 | |
| 340 | 340 | /* Road Blasters steering wheel */ |
| 341 | 341 | else if (m_trackball_type == 2) |
| 342 | result = i | |
| 342 | result = iop | |
| 343 | 343 | |
| 344 | 344 | return result; |
| 345 | 345 | } |
| r15082 | r15083 | |
| 354 | 354 | |
| 355 | 355 | READ16_MEMBER(atarisy1_state::port4_r) |
| 356 | 356 | { |
| 357 | int temp = i | |
| 357 | int temp = iop | |
| 358 | 358 | if (m_cpu_to_sound_ready) temp ^= 0x0080; |
| 359 | 359 | return temp; |
| 360 | 360 | } |
| r15082 | r15083 | |
| 369 | 369 | |
| 370 | 370 | READ8_MEMBER(atarisy1_state::switch_6502_r) |
| 371 | 371 | { |
| 372 | int temp = i | |
| 372 | int temp = iop | |
| 373 | 373 | |
| 374 | 374 | if (m_cpu_to_sound_ready) temp ^= 0x08; |
| 375 | 375 | if (m_sound_to_cpu_ready) temp ^= 0x10; |
| 376 | if (!(i | |
| 376 | if (!(iop | |
| 377 | 377 | |
| 378 | 378 | return temp; |
| 379 | 379 | } |
| r15082 | r15083 | |
| 534 | 534 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) |
| 535 | 535 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 536 | 536 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 537 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 537 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 538 | 538 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 539 | 539 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 540 | 540 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r15082 | r15083 | |
| 573 | 573 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Right Throw/P2 Start") |
| 574 | 574 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Jump") |
| 575 | 575 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 576 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 576 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 577 | 577 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 578 | 578 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 579 | 579 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r15082 | r15083 | |
| 612 | 612 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Right Whip/P2 Start") |
| 613 | 613 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* freeze? */ |
| 614 | 614 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 615 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 615 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 616 | 616 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 617 | 617 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 618 | 618 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r15082 | r15083 | |
| 659 | 659 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Right Hop/P2 Start") |
| 660 | 660 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Unused Button 1") |
| 661 | 661 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Unused Button 2") |
| 662 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 662 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 663 | 663 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 664 | 664 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 665 | 665 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r15082 | r15083 | |
| 694 | 694 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Lasers") |
| 695 | 695 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 696 | 696 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 697 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 697 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 698 | 698 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 699 | 699 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 700 | 700 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| r15082 | r15083 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | switch (state->m_output >> 6 & 3) |
| 97 | 97 | { |
| 98 | case 0: return input_port_read(device->machine(), "IN0"); | |
| 99 | case 1: return input_port_read(device->machine(), "IN1"); | |
| 100 | case 2: return input_port_read(device->machine(), "IN2"); | |
| 98 | case 0: return state->ioport("IN0")->read(); | |
| 99 | case 1: return state->ioport("IN1")->read(); | |
| 100 | case 2: return state->ioport("IN2")->read(); | |
| 101 | 101 | default: break; |
| 102 | 102 | } |
| 103 | 103 |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | for (i = 0; i < 8; i++) |
| 34 | 34 | { |
| 35 | UINT8 val = | |
| 35 | UINT8 val = | |
| 36 | 36 | |
| 37 | 37 | signed char delta = (val - state->m_dial[i]) & 15; |
| 38 | 38 | |
| r15082 | r15083 | |
| 69 | 69 | READ8_MEMBER(sprint8_state::sprint8_input_r) |
| 70 | 70 | { |
| 71 | 71 | static const char *const portnames[] = { "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8" }; |
| 72 | UINT8 val = i | |
| 72 | UINT8 val = iop | |
| 73 | 73 | |
| 74 | 74 | if (m_steer_dir[offset]) |
| 75 | 75 | { |
| r15082 | r15083 | |
| 255 | 255 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) |
| 256 | 256 | |
| 257 | 257 | PORT_START("VBLANK") |
| 258 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 258 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 259 | 259 | |
| 260 | 260 | /* this is actually a variable resistor */ |
| 261 | 261 | PORT_START("R132") |
| r15082 | r15083 | |
| 383 | 383 | PORT_DIPSETTING( 0x01, "Tag" ) |
| 384 | 384 | |
| 385 | 385 | PORT_START("VBLANK") |
| 386 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 386 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 387 | 387 | |
| 388 | 388 | /* this is actually a variable resistor */ |
| 389 | 389 | PORT_START("R132") |
| r15082 | r15083 | |
|---|---|---|
| 337 | 337 | switch (offset<<1) |
| 338 | 338 | { |
| 339 | 339 | case 0: /* Dip Switches */ |
| 340 | return i | |
| 340 | return iop | |
| 341 | 341 | |
| 342 | 342 | case 2: /* Player 1 & Player 2 joysticks & fire buttons */ |
| 343 | return i | |
| 343 | return iop | |
| 344 | 344 | |
| 345 | 345 | case 4: /* Credits */ |
| 346 | return i | |
| 346 | return iop | |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | logerror("Unknown control read at 30c000 %d\n", offset); |
| r15082 | r15083 | |
| 693 | 693 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 694 | 694 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 695 | 695 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 696 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 696 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 697 | 697 | INPUT_PORTS_END |
| 698 | 698 | |
| 699 | 699 | static INPUT_PORTS_START( dec1 ) |
| r15082 | r15083 | |
| 719 | 719 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 720 | 720 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 721 | 721 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 722 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 722 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 723 | 723 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 724 | 724 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 725 | 725 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 977 | 977 | PORT_DIPUNUSED_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW2:8" ) // Always OFF |
| 978 | 978 | |
| 979 | 979 | PORT_START("VBLANK") |
| 980 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 980 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 981 | 981 | INPUT_PORTS_END |
| 982 | 982 | |
| 983 | 983 | static INPUT_PORTS_START( ffantasy ) |
| r15082 | r15083 | |
| 1121 | 1121 | PORT_INCLUDE( dec1 ) |
| 1122 | 1122 | |
| 1123 | 1123 | PORT_MODIFY("SYSTEM") |
| 1124 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1124 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* extremely slow palette fades with ACTIVE_HIGH */ | |
| 1125 | 1125 | |
| 1126 | 1126 | PORT_START("DSW") |
| 1127 | 1127 | /* Different Coinage. Just a few combinations from manual, the rest was figured out */ |
| r15082 | r15083 | |
|---|---|---|
| 459 | 459 | static const char *const gunnames[] = { "GUNX1", "GUNY1", "GUNX2", "GUNY2" }; |
| 460 | 460 | |
| 461 | 461 | eeprom_device *eeprom = downcast<eeprom_device *>(device); |
| 462 | return (((state->m_gdfs_lightgun_select & 1) ? 0 : 0xff) ^ | |
| 462 | return (((state->m_gdfs_lightgun_select & 1) ? 0 : 0xff) ^ | |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | static WRITE16_DEVICE_HANDLER( gdfs_eeprom_w ) |
| r15082 | r15083 | |
| 608 | 608 | { |
| 609 | 609 | UINT16 input_sel = *m_input_sel; |
| 610 | 610 | |
| 611 | if (input_sel & 0x0001) return input_port_read(machine(), "KEY0"); | |
| 612 | if (input_sel & 0x0002) return input_port_read(machine(), "KEY1"); | |
| 613 | if (input_sel & 0x0004) return input_port_read(machine(), "KEY2"); | |
| 614 | if (input_sel & 0x0008) return input_port_read(machine(), "KEY3"); | |
| 611 | if (input_sel & 0x0001) return ioport("KEY0")->read(); | |
| 612 | if (input_sel & 0x0002) return ioport("KEY1")->read(); | |
| 613 | if (input_sel & 0x0004) return ioport("KEY2")->read(); | |
| 614 | if (input_sel & 0x0008) return ioport("KEY3")->read(); | |
| 615 | 615 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",cpu_get_pc(&space.device()),input_sel); |
| 616 | 616 | return 0xffff; |
| 617 | 617 | } |
| r15082 | r15083 | |
| 733 | 733 | { |
| 734 | 734 | UINT16 input_sel = *m_input_sel; |
| 735 | 735 | |
| 736 | if (input_sel & 0x0002) return input_port_read(machine(), "KEY0"); | |
| 737 | if (input_sel & 0x0004) return input_port_read(machine(), "KEY1"); | |
| 738 | if (input_sel & 0x0008) return input_port_read(machine(), "KEY2"); | |
| 739 | if (input_sel & 0x0010) return input_port_read(machine(), "KEY3"); | |
| 736 | if (input_sel & 0x0002) return ioport("KEY0")->read(); | |
| 737 | if (input_sel & 0x0004) return ioport("KEY1")->read(); | |
| 738 | if (input_sel & 0x0008) return ioport("KEY2")->read(); | |
| 739 | if (input_sel & 0x0010) return ioport("KEY3")->read(); | |
| 740 | 740 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",cpu_get_pc(&space.device()),input_sel); |
| 741 | 741 | return 0xffff; |
| 742 | 742 | } |
| r15082 | r15083 | |
| 781 | 781 | { |
| 782 | 782 | UINT16 input_sel = *m_input_sel; |
| 783 | 783 | |
| 784 | if (input_sel & 0x0002) return input_port_read(machine(), "KEY0"); | |
| 785 | if (input_sel & 0x0004) return input_port_read(machine(), "KEY1"); | |
| 786 | if (input_sel & 0x0008) return input_port_read(machine(), "KEY2"); | |
| 787 | if (input_sel & 0x0010) return input_port_read(machine(), "KEY3"); | |
| 784 | if (input_sel & 0x0002) return ioport("KEY0")->read(); | |
| 785 | if (input_sel & 0x0004) return ioport("KEY1")->read(); | |
| 786 | if (input_sel & 0x0008) return ioport("KEY2")->read(); | |
| 787 | if (input_sel & 0x0010) return ioport("KEY3")->read(); | |
| 788 | 788 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",cpu_get_pc(&space.device()),input_sel); |
| 789 | 789 | return 0xffff; |
| 790 | 790 | } |
| r15082 | r15083 | |
| 827 | 827 | |
| 828 | 828 | READ16_MEMBER(ssv_state::sxyreact_ballswitch_r) |
| 829 | 829 | { |
| 830 | return i | |
| 830 | return iop | |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | 833 | READ16_MEMBER(ssv_state::sxyreact_dial_r) |
| r15082 | r15083 | |
| 843 | 843 | { |
| 844 | 844 | |
| 845 | 845 | if (data & 0x20) |
| 846 | m_sxyreact_serial = i | |
| 846 | m_sxyreact_serial = iop | |
| 847 | 847 | |
| 848 | 848 | if ( (m_sxyreact_dial & 0x40) && !(data & 0x40) ) // $40 -> $00 |
| 849 | 849 | m_sxyreact_serial <<= 1; // shift 1 bit |
| r15082 | r15083 | |
| 986 | 986 | |
| 987 | 987 | switch(m_trackball_select) |
| 988 | 988 | { |
| 989 | case 0x60: return (input_port_read(machine(), "TRACKX") >> 8) & 0xff; | |
| 990 | case 0x40: return (input_port_read(machine(), "TRACKX") >> 0) & 0xff; | |
| 989 | case 0x60: return (ioport("TRACKX")->read() >> 8) & 0xff; | |
| 990 | case 0x40: return (ioport("TRACKX")->read() >> 0) & 0xff; | |
| 991 | 991 | |
| 992 | case 0x70: return (input_port_read(machine(), "TRACKY") >> 8) & 0xff; | |
| 993 | case 0x50: return (input_port_read(machine(), "TRACKY") >> 0) & 0xff; | |
| 992 | case 0x70: return (ioport("TRACKY")->read() >> 8) & 0xff; | |
| 993 | case 0x50: return (ioport("TRACKY")->read() >> 0) & 0xff; | |
| 994 | 994 | } |
| 995 | 995 | return 0; |
| 996 | 996 | } |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | READ16_MEMBER(atarig42_state::special_port2_r) |
| 74 | 74 | { |
| 75 | int temp = i | |
| 75 | int temp = iop | |
| 76 | 76 | if (m_cpu_to_sound_ready) temp ^= 0x0020; |
| 77 | 77 | if (m_sound_to_cpu_ready) temp ^= 0x0010; |
| 78 | 78 | temp ^= 0x0008; /* A2D.EOC always high for now */ |
| r15082 | r15083 | |
| 84 | 84 | { |
| 85 | 85 | static const char *const portnames[] = { "A2D0", "A2D1" }; |
| 86 | 86 | |
| 87 | m_analog_data = i | |
| 87 | m_analog_data = iop | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
| r15082 | r15083 | |
| 386 | 386 | PORT_START("IN2") /* e00010 */ |
| 387 | 387 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 388 | 388 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 389 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 389 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 390 | 390 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 391 | 391 | |
| 392 | 392 | PORT_INCLUDE( atarijsa_iii ) /* audio board port */ |
| r15082 | r15083 | |
| 437 | 437 | PORT_START("IN2") /* e00010 */ |
| 438 | 438 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 439 | 439 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 440 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 440 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 441 | 441 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 442 | 442 | |
| 443 | 443 | PORT_INCLUDE( atarijsa_iii ) /* audio board port */ |
| r15082 | r15083 | |
|---|---|---|
| 65 | 65 | |
| 66 | 66 | READ16_MEMBER(vindictr_state::port1_r) |
| 67 | 67 | { |
| 68 | int result = i | |
| 68 | int result = iop | |
| 69 | 69 | if (m_sound_to_cpu_ready) result ^= 0x0004; |
| 70 | 70 | if (m_cpu_to_sound_ready) result ^= 0x0008; |
| 71 | 71 | result ^= 0x0010; |
| r15082 | r15083 | |
| 124 | 124 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_2WAY PORT_PLAYER(1) |
| 125 | 125 | |
| 126 | 126 | PORT_START("260010") |
| 127 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 127 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 128 | 128 | PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) |
| 129 | 129 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 130 | 130 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 98 | 98 | CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r) |
| 99 | 99 | { |
| 100 | 100 | int bit_mask = (FPTR)param; |
| 101 | return (i | |
| 101 | return (iop | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | WRITE8_MEMBER(cop01_state::cop01_irq_ack_w) |
| r15082 | r15083 | |
|---|---|---|
| 38 | 38 | switch (m_mux) |
| 39 | 39 | { |
| 40 | 40 | case 1: /* start buttons */ |
| 41 | buttons = i | |
| 41 | buttons = iop | |
| 42 | 42 | break; |
| 43 | 43 | case 2: /* player 1 buttons */ |
| 44 | buttons = i | |
| 44 | buttons = iop | |
| 45 | 45 | break; |
| 46 | 46 | case 4: /* player 2 buttons */ |
| 47 | buttons = i | |
| 47 | buttons = iop | |
| 48 | 48 | break; |
| 49 | 49 | } |
| 50 | 50 | |
| r15082 | r15083 | |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | return (i | |
| 63 | return (iop | |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | WRITE8_MEMBER(hanaawas_state::hanaawas_inputs_mux_w) |
| r15082 | r15083 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | READ32_MEMBER(midvunit_state::port0_r) |
| 91 | 91 | { |
| 92 | UINT16 val = i | |
| 92 | UINT16 val = iop | |
| 93 | 93 | UINT16 diff = val ^ m_last_port0; |
| 94 | 94 | |
| 95 | 95 | /* make sure the shift controls are mutually exclusive */ |
| r15082 | r15083 | |
| 143 | 143 | int which = (data >> m_adc_shift) - 4; |
| 144 | 144 | if (which < 0 || which > 2) |
| 145 | 145 | logerror("adc_w: unexpected which = %02X\n", which + 4); |
| 146 | m_adc_data = i | |
| 146 | m_adc_data = iop | |
| 147 | 147 | machine().scheduler().timer_set(attotime::from_msec(1), FUNC(adc_ready)); |
| 148 | 148 | } |
| 149 | 149 | else |
| r15082 | r15083 | |
| 296 | 296 | READ32_MEMBER(midvunit_state::crusnwld_serial_status_r) |
| 297 | 297 | { |
| 298 | 298 | int status = midway_serial_pic_status_r(); |
| 299 | return (i | |
| 299 | return (iop | |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | |
| r15082 | r15083 | |
| 359 | 359 | READ32_MEMBER(midvunit_state::offroadc_serial_status_r) |
| 360 | 360 | { |
| 361 | 361 | int status = midway_serial_pic2_status_r(&space); |
| 362 | return (i | |
| 362 | return (iop | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 |
| r15082 | r15083 | |
|---|---|---|
| 131 | 131 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 132 | 132 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 133 | 133 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) // +12 Volts? |
| 134 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 134 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 135 | 135 | |
| 136 | 136 | PORT_START("UNK1") |
| 137 | 137 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r15082 | r15083 | |
|---|---|---|
| 304 | 304 | READ16_MEMBER(opwolf_state::opwolf_in_r) |
| 305 | 305 | { |
| 306 | 306 | static const char *const inname[2] = { "IN0", "IN1" }; |
| 307 | return i | |
| 307 | return iop | |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | READ16_MEMBER(opwolf_state::opwolf_dsw_r) |
| 311 | 311 | { |
| 312 | 312 | static const char *const dswname[2] = { "DSWA", "DSWB" }; |
| 313 | return i | |
| 313 | return iop | |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | READ16_MEMBER(opwolf_state::opwolf_lightgun_r) |
| r15082 | r15083 | |
| 320 | 320 | switch (offset) |
| 321 | 321 | { |
| 322 | 322 | case 0x00: /* P1X - Have to remap 8 bit input value, into 0-319 visible range */ |
| 323 | scaled = (i | |
| 323 | scaled = (iop | |
| 324 | 324 | return (scaled + 0x15 + m_opwolf_gun_xoffs); |
| 325 | 325 | case 0x01: /* P1Y */ |
| 326 | return (i | |
| 326 | return (iop | |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | return 0xff; |
| r15082 | r15083 | |
| 331 | 331 | |
| 332 | 332 | READ8_MEMBER(opwolf_state::z80_input1_r) |
| 333 | 333 | { |
| 334 | return i | |
| 334 | return iop | |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | READ8_MEMBER(opwolf_state::z80_input2_r) |
| 338 | 338 | { |
| 339 | return i | |
| 339 | return iop | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
| r15082 | r15083 | |
| 979 | 979 | static DRIVER_INIT( opwolf ) |
| 980 | 980 | { |
| 981 | 981 | opwolf_state *state = machine.driver_data<opwolf_state>(); |
| 982 | UINT16* rom = (UINT16*) | |
| 982 | UINT16* rom = (UINT16*)sta | |
| 983 | 983 | |
| 984 | 984 | state->m_opwolf_region = rom[0x03fffe / 2] & 0xff; |
| 985 | 985 | |
| r15082 | r15083 | |
| 996 | 996 | static DRIVER_INIT( opwolfb ) |
| 997 | 997 | { |
| 998 | 998 | opwolf_state *state = machine.driver_data<opwolf_state>(); |
| 999 | UINT16* rom = (UINT16*) | |
| 999 | UINT16* rom = (UINT16*)sta | |
| 1000 | 1000 | |
| 1001 | 1001 | state->m_opwolf_region = rom[0x03fffe / 2] & 0xff; |
| 1002 | 1002 |
| r15082 | r15083 | |
|---|---|---|
| 241 | 241 | switch (offset) |
| 242 | 242 | { |
| 243 | 243 | case 0 : |
| 244 | data = (i | |
| 244 | data = (iop | |
| 245 | 245 | break; |
| 246 | 246 | case 1 : |
| 247 | data = (i | |
| 247 | data = (iop | |
| 248 | 248 | break; |
| 249 | 249 | case 2 : |
| 250 | data = (i | |
| 250 | data = (iop | |
| 251 | 251 | break; |
| 252 | 252 | case 3 : |
| 253 | data = (i | |
| 253 | data = (iop | |
| 254 | 254 | break; |
| 255 | 255 | } |
| 256 | 256 |
| r15082 | r15083 | |
|---|---|---|
| 727 | 727 | |
| 728 | 728 | if (ACCESSING_BITS_24_31) |
| 729 | 729 | { |
| 730 | r |= ( | |
| 730 | r |= ( | |
| 731 | 731 | } |
| 732 | 732 | if (ACCESSING_BITS_8_15) |
| 733 | 733 | { |
| 734 | r |= ( | |
| 734 | r |= ( | |
| 735 | 735 | } |
| 736 | 736 | if (ACCESSING_BITS_0_7) |
| 737 | 737 | { |
| 738 | r |= ( | |
| 738 | r |= ( | |
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | return r; |
| r15082 | r15083 | |
| 745 | 745 | { |
| 746 | 746 | if (offset == 0) |
| 747 | 747 | { |
| 748 | return | |
| 748 | return | |
| 749 | 749 | } |
| 750 | 750 | else |
| 751 | 751 | { |
| 752 | return | |
| 752 | return | |
| 753 | 753 | } |
| 754 | 754 | } |
| 755 | 755 | |
| r15082 | r15083 | |
| 1365 | 1365 | { |
| 1366 | 1366 | if (offset == 0) // Keyboard Wheel (P1) |
| 1367 | 1367 | { |
| 1368 | return | |
| 1368 | return | |
| 1369 | 1369 | } |
| 1370 | 1370 | else if (offset == 2) // Keyboard Wheel (P2) |
| 1371 | 1371 | { |
| 1372 | return | |
| 1372 | return | |
| 1373 | 1373 | } |
| 1374 | 1374 | |
| 1375 | 1375 | return 0; |
| r15082 | r15083 | |
| 1459 | 1459 | |
| 1460 | 1460 | for (keyboard=0; keyboard < 2; keyboard++) |
| 1461 | 1461 | { |
| 1462 | UINT32 kbstate = in | |
| 1462 | UINT32 kbstate = machine.root_device().ioport | |
| 1463 | 1463 | int uart_channel = kb_uart_channel[keyboard]; |
| 1464 | 1464 | |
| 1465 | 1465 | if (kbstate != state->m_keyboard_state[keyboard]) |
| r15082 | r15083 | |
|---|---|---|
| 54 | 54 | UINT8 ret = 0; |
| 55 | 55 | |
| 56 | 56 | /* read fake port and remap the buttons to 2 bits */ |
| 57 | UINT8 raw = in | |
| 57 | UINT8 raw = machine.root_device().ioport | |
| 58 | 58 | |
| 59 | 59 | if (raw & (1 << (bit + 1))) |
| 60 | 60 | ret = 0x03; /* expert */ |
| r15082 | r15083 | |
| 74 | 74 | |
| 75 | 75 | switch (state->m_input_port_select) |
| 76 | 76 | { |
| 77 | case 0x01: ret = input_port_read(device->machine(), "IN0"); break; | |
| 78 | case 0x02: ret = input_port_read(device->machine(), "IN1"); break; | |
| 79 | case 0x04: ret = (input_port_read(device->machine(), "IN2") & 0xf0) | difficulty_input_port_r(device->machine(), 0) | | |
| 77 | case 0x01: ret = state->ioport("IN0")->read(); break; | |
| 78 | case 0x02: ret = state->ioport("IN1")->read(); break; | |
| 79 | case 0x04: ret = (state->ioport("IN2")->read() & 0xf0) | difficulty_input_port_r(device->machine(), 0) | | |
| 80 | 80 | (difficulty_input_port_r(device->machine(), 3) << 2); break; |
| 81 | case 0x08: ret = | |
| 81 | case 0x08: ret = s | |
| 82 | 82 | case 0x10: |
| 83 | 83 | case 0x20: break; /* these two are not really used */ |
| 84 | 84 | default: logerror("Unexpected port read: %02X\n", state->m_input_port_select); |
| r15082 | r15083 | |
| 118 | 118 | |
| 119 | 119 | m_analog_port_val = 0xff; |
| 120 | 120 | |
| 121 | m_analog_timer_1->adjust(compute_duration(&space.device(), input_port_read(machine(), "AN1")), 0x02); | |
| 122 | m_analog_timer_2->adjust(compute_duration(&space.device(), input_port_read(machine(), "AN2")), 0x01); | |
| 121 | m_analog_timer_1->adjust(compute_duration(&space.device(), ioport("AN1")->read()), 0x02); | |
| 122 | m_analog_timer_2->adjust(compute_duration(&space.device(), ioport("AN2")->read()), 0x01); | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 |
| r15082 | r15083 | |
|---|---|---|
| 196 | 196 | { |
| 197 | 197 | static const char *const portx_name[2] = { "P1X", "P2X" }; |
| 198 | 198 | |
| 199 | return i | |
| 199 | return iop | |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | READ8_MEMBER(bigevglf_state::beg_trackball_y_r) |
| 203 | 203 | { |
| 204 | 204 | static const char *const porty_name[2] = { "P1Y", "P2Y" }; |
| 205 | 205 | |
| 206 | return i | |
| 206 | return iop | |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | WRITE8_MEMBER(bigevglf_state::beg_port08_w) |
| r15082 | r15083 | |
| 336 | 336 | |
| 337 | 337 | */ |
| 338 | 338 | m_mcu_coin_bit5 ^= 0x20; |
| 339 | return bigevglf_mcu_status_r(space, 0) | (i | |
| 339 | return bigevglf_mcu_status_r(space, 0) | (iop | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | static ADDRESS_MAP_START( bigevglf_sub_portmap, AS_IO, 8, bigevglf_state ) |
| r15082 | r15083 | |
|---|---|---|
| 379 | 379 | bagman_state *state = device->machine().driver_data<bagman_state>(); |
| 380 | 380 | UINT8 dial_val; |
| 381 | 381 | |
| 382 | dial_val = | |
| 382 | dial_val = s | |
| 383 | 383 | |
| 384 | 384 | if(state->m_p1_res != 0x60) |
| 385 | 385 | state->m_p1_res = 0x60; |
| r15082 | r15083 | |
| 392 | 392 | |
| 393 | 393 | state->m_p1_old_val = dial_val; |
| 394 | 394 | |
| 395 | return ( | |
| 395 | return (s | |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | static READ8_DEVICE_HANDLER( dial_input_p2_r ) |
| r15082 | r15083 | |
| 400 | 400 | bagman_state *state = device->machine().driver_data<bagman_state>(); |
| 401 | 401 | UINT8 dial_val; |
| 402 | 402 | |
| 403 | dial_val = | |
| 403 | dial_val = s | |
| 404 | 404 | |
| 405 | 405 | if(state->m_p2_res != 0x60) |
| 406 | 406 | state->m_p2_res = 0x60; |
| r15082 | r15083 | |
| 413 | 413 | |
| 414 | 414 | state->m_p2_old_val = dial_val; |
| 415 | 415 | |
| 416 | return ( | |
| 416 | return (s | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | static const ay8910_interface ay8910_dial_config = |
| r15082 | r15083 | |
|---|---|---|
| 84 | 84 | switch (offset << 1) |
| 85 | 85 | { |
| 86 | 86 | case 0: /* Player 1 & Player 2 joysticks & fire buttons */ |
| 87 | return i | |
| 87 | return iop | |
| 88 | 88 | |
| 89 | 89 | case 2: /* Dip Switches */ |
| 90 | return i | |
| 90 | return iop | |
| 91 | 91 | |
| 92 | 92 | case 4: /* Protection */ |
| 93 | 93 | logerror("%04x : protection control read at 30c000 %d\n", cpu_get_pc(&space.device()), offset); |
| 94 | 94 | return m_prot; |
| 95 | 95 | |
| 96 | 96 | case 6: /* Credits, VBL in byte 7 */ |
| 97 | return i | |
| 97 | return iop | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | return ~0; |
| r15082 | r15083 | |
| 164 | 164 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 165 | 165 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 166 | 166 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 167 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 167 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 168 | 168 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 169 | 169 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 170 | 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 432 | 432 | |
| 433 | 433 | READ8_MEMBER(dunhuang_state::dunhuang_service_r) |
| 434 | 434 | { |
| 435 | return i | |
| 435 | return iop | |
| 436 | 436 | | ((m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0x00 : 0x08) // bit 3: hopper sensor |
| 437 | 437 | | 0x80 // bit 7 low -> tiles block transferrer busy |
| 438 | 438 | ; |
| r15082 | r15083 | |
| 441 | 441 | static READ8_DEVICE_HANDLER( dunhuang_dsw_r ) |
| 442 | 442 | { |
| 443 | 443 | dunhuang_state *state = device->machine().driver_data<dunhuang_state>(); |
| 444 | if (!(state->m_input & 0x01)) return input_port_read(device->machine(), "DSW1"); | |
| 445 | if (!(state->m_input & 0x02)) return input_port_read(device->machine(), "DSW2"); | |
| 446 | if (!(state->m_input & 0x04)) return input_port_read(device->machine(), "DSW3"); | |
| 447 | if (!(state->m_input & 0x08)) return input_port_read(device->machine(), "DSW4"); | |
| 448 | if (!(state->m_input & 0x10)) return input_port_read(device->machine(), "DSW5"); | |
| 444 | if (!(state->m_input & 0x01)) return state->ioport("DSW1")->read(); | |
| 445 | if (!(state->m_input & 0x02)) return state->ioport("DSW2")->read(); | |
| 446 | if (!(state->m_input & 0x04)) return state->ioport("DSW3")->read(); | |
| 447 | if (!(state->m_input & 0x08)) return state->ioport("DSW4")->read(); | |
| 448 | if (!(state->m_input & 0x10)) return state->ioport("DSW5")->read(); | |
| 449 | 449 | logerror("%s: warning, unknown dsw bits read, input = %02x\n", device->machine().describe_context(), state->m_input); |
| 450 | 450 | return 0xff; |
| 451 | 451 | } |
| 452 | 452 | READ8_MEMBER(dunhuang_state::dunhuang_input_r) |
| 453 | 453 | { |
| 454 | if (!(m_input & 0x01)) return input_port_read(machine(), "IN0"); | |
| 455 | if (!(m_input & 0x02)) return input_port_read(machine(), "IN1"); | |
| 456 | if (!(m_input & 0x04)) return input_port_read(machine(), "IN2"); | |
| 457 | if (!(m_input & 0x08)) return input_port_read(machine(), "IN3"); | |
| 458 | if (!(m_input & 0x10)) return input_port_read(machine(), "IN4"); | |
| 454 | if (!(m_input & 0x01)) return ioport("IN0")->read(); | |
| 455 | if (!(m_input & 0x02)) return ioport("IN1")->read(); | |
| 456 | if (!(m_input & 0x04)) return ioport("IN2")->read(); | |
| 457 | if (!(m_input & 0x08)) return ioport("IN3")->read(); | |
| 458 | if (!(m_input & 0x10)) return ioport("IN4")->read(); | |
| 459 | 459 | logerror("%s: warning, unknown input bits read, input = %02x\n", machine().describe_context(), m_input); |
| 460 | 460 | return 0xff; |
| 461 | 461 | } |
| r15082 | r15083 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | switch (m_portselect) |
| 115 | 115 | { |
| 116 | case 0x01: ret = input_port_read(machine(), "KEY0"); break; | |
| 117 | case 0x02: ret = input_port_read(machine(), "KEY1"); break; | |
| 118 | case 0x04: ret = input_port_read(machine(), "KEY2"); break; | |
| 119 | case 0x08: ret = input_port_read(machine(), "KEY3"); break; | |
| 120 | case 0x10: ret = input_port_read(machine(), "KEY4"); break; | |
| 116 | case 0x01: ret = ioport("KEY0")->read(); break; | |
| 117 | case 0x02: ret = ioport("KEY1")->read(); break; | |
| 118 | case 0x04: ret = ioport("KEY2")->read(); break; | |
| 119 | case 0x08: ret = ioport("KEY3")->read(); break; | |
| 120 | case 0x10: ret = ioport("KEY4")->read(); break; | |
| 121 | 121 | case 0x20: ret = 0xff; break; |
| 122 | 122 | case 0x3f: ret = 0xff; |
| 123 | ret &= input_port_read(machine(), "KEY0"); | |
| 124 | ret &= input_port_read(machine(), "KEY1"); | |
| 125 | ret &= input_port_read(machine(), "KEY2"); | |
| 126 | ret &= input_port_read(machine(), "KEY3"); | |
| 127 | ret &= input_port_read(machine(), "KEY4"); | |
| 123 | ret &= ioport("KEY0")->read(); | |
| 124 | ret &= ioport("KEY1")->read(); | |
| 125 | ret &= ioport("KEY2")->read(); | |
| 126 | ret &= ioport("KEY3")->read(); | |
| 127 | ret &= ioport("KEY4")->read(); | |
| 128 | 128 | break; |
| 129 | 129 | default: ret = 0xff; |
| 130 | 130 | logerror("PC:%04X unknown %02X\n", cpu_get_pc(&space.device()), m_portselect); |
| r15082 | r15083 | |
| 147 | 147 | for (i = 0; i < 5; i++) |
| 148 | 148 | { |
| 149 | 149 | if (!BIT(m_portselect, i)) |
| 150 | ret |= i | |
| 150 | ret |= iop | |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | return (ret & 0x3f) | (i | |
| 153 | return (ret & 0x3f) | (iop | |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | static READ8_DEVICE_HANDLER( ojankohs_ay8910_0_r ) |
| 157 | 157 | { |
| 158 | 158 | // DIPSW 1 |
| 159 | return (((input_port_read(device->machine(), "DSW1") & 0x01) << 7) | ((input_port_read(device->machine(), "DSW1") & 0x02) << 5) | | |
| 160 | ((input_port_read(device->machine(), "DSW1") & 0x04) << 3) | ((input_port_read(device->machine(), "DSW1") & 0x08) << 1) | | |
| 161 | ((input_port_read(device->machine(), "DSW1") & 0x10) >> 1) | ((input_port_read(device->machine(), "DSW1") & 0x20) >> 3) | | |
| 162 | ((input_port_read(device->machine(), "DSW1") & 0x40) >> 5) | ((input_port_read(device->machine(), "DSW1") & 0x80) >> 7)); | |
| 159 | device_t &root = device->machine().root_device(); | |
| 160 | return (((root.ioport("DSW1")->read() & 0x01) << 7) | ((root.ioport("DSW1")->read() & 0x02) << 5) | | |
| 161 | ((root.ioport("DSW1")->read() & 0x04) << 3) | ((root.ioport("DSW1")->read() & 0x08) << 1) | | |
| 162 | ((root.ioport("DSW1")->read() & 0x10) >> 1) | ((root.ioport("DSW1")->read() & 0x20) >> 3) | | |
| 163 | ((root.ioport("DSW1")->read() & 0x40) >> 5) | ((root.ioport("DSW1")->read() & 0x80) >> 7)); | |
| 163 | 164 | } |
| 164 | 165 | |
| 165 | 166 | static READ8_DEVICE_HANDLER( ojankohs_ay8910_1_r ) |
| 166 | 167 | { |
| 167 | 168 | // DIPSW 1 |
| 168 | return (((input_port_read(device->machine(), "DSW2") & 0x01) << 7) | ((input_port_read(device->machine(), "DSW2") & 0x02) << 5) | | |
| 169 | ((input_port_read(device->machine(), "DSW2") & 0x04) << 3) | ((input_port_read(device->machine(), "DSW2") & 0x08) << 1) | | |
| 170 | ((input_port_read(device->machine(), "DSW2") & 0x10) >> 1) | ((input_port_read(device->machine(), "DSW2") & 0x20) >> 3) | | |
| 171 | ((input_port_read(device->machine(), "DSW2") & 0x40) >> 5) | ((input_port_read(device->machine(), "DSW2") & 0x80) >> 7)); | |
| 169 | device_t &root = device->machine().root_device(); | |
| 170 | return (((root.ioport("DSW2")->read() & 0x01) << 7) | ((root.ioport("DSW2")->read() & 0x02) << 5) | | |
| 171 | ((root.ioport("DSW2")->read() & 0x04) << 3) | ((root.ioport("DSW2")->read() & 0x08) << 1) | | |
| 172 | ((root.ioport("DSW2")->read() & 0x10) >> 1) | ((root.ioport("DSW2")->read() & 0x20) >> 3) | | |
| 173 | ((root.ioport("DSW2")->read() & 0x40) >> 5) | ((root.ioport("DSW2")->read() & 0x80) >> 7)); | |
| 172 | 174 | } |
| 173 | 175 | |
| 174 | 176 | READ8_MEMBER(ojankohs_state::ccasino_dipsw3_r) |
| 175 | 177 | { |
| 176 | return (i | |
| 178 | return (iop | |
| 177 | 179 | } |
| 178 | 180 | |
| 179 | 181 | READ8_MEMBER(ojankohs_state::ccasino_dipsw4_r) |
| 180 | 182 | { |
| 181 | return (i | |
| 183 | return (iop | |
| 182 | 184 | } |
| 183 | 185 | |
| 184 | 186 | WRITE8_MEMBER(ojankohs_state::ojankoy_coinctr_w) |
| r15082 | r15083 | |
|---|---|---|
| 135 | 135 | |
| 136 | 136 | state->m_maincpu = downcast<legacy_cpu_device*>( machine.device("maincpu") ); |
| 137 | 137 | |
| 138 | state->membank("bank2")->set_base( | |
| 138 | state->membank("bank2")->set_base(sta | |
| 139 | 139 | |
| 140 | 140 | /* configure overlay */ |
| 141 | 141 | state->membank("bank1")->configure_entry(0, state->m_dram); |
| r15082 | r15083 | |
|---|---|---|
| 98 | 98 | { |
| 99 | 99 | int curr[2][2]; |
| 100 | 100 | |
| 101 | curr[p][0] = input_port_read(machine, p ? "P2" : "P1") & 0x01; | |
| 102 | curr[p][1] = input_port_read(machine, p ? "P2" : "P1") & 0x02; | |
| 101 | curr[p][0] = state->ioport(p ? "P2" : "P1")->read() & 0x01; | |
| 102 | curr[p][1] = state->ioport(p ? "P2" : "P1")->read() & 0x02; | |
| 103 | 103 | |
| 104 | 104 | for (j = 0;j <= 1;j++) |
| 105 | 105 | { |
| r15082 | r15083 | |
| 133 | 133 | { |
| 134 | 134 | int curr[2]; |
| 135 | 135 | |
| 136 | curr[p] = in | |
| 136 | curr[p] = machine.root_device().ioport | |
| 137 | 137 | |
| 138 | 138 | if (state->m_jumped[p]) buttons[p] = 0; /* jump only momentarily flips the buttons */ |
| 139 | 139 | else buttons[p] = curr[p]; |
| r15082 | r15083 | |
| 144 | 144 | state->m_prev[p] = curr[p]; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | state->m_inputs[0] = input_port_read(machine, "P1") & 0xcf; | |
| 148 | state->m_inputs[1] = input_port_read(machine, "P2") & 0x0f; | |
| 147 | state->m_inputs[0] = machine.root_device().ioport("P1")->read() & 0xcf; | |
| 148 | state->m_inputs[1] = machine.root_device().ioport("P2")->read() & 0x0f; | |
| 149 | 149 | state->m_inputs[2] = state->m_running[0] | buttons[0]; |
| 150 | 150 | state->m_inputs[3] = state->m_running[1] | buttons[1]; |
| 151 | 151 | } |
| r15082 | r15083 | |
| 166 | 166 | |
| 167 | 167 | for (p=0; p<=1; p++) |
| 168 | 168 | { |
| 169 | curr_port[p] = i | |
| 169 | curr_port[p] = state->iop | |
| 170 | 170 | curr_dash[p] = 0; |
| 171 | 171 | |
| 172 | 172 | if (curr_port[p] & R) |
| r15082 | r15083 | |
| 221 | 221 | case 1: return m_inputs[1]; |
| 222 | 222 | case 2: return m_inputs[2]; |
| 223 | 223 | case 3: return m_inputs[3]; |
| 224 | case 4: return i | |
| 224 | case 4: return iop | |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
| r15082 | r15083 | |
| 235 | 235 | |
| 236 | 236 | READ8_MEMBER(spdodgeb_state::port_0_r) |
| 237 | 237 | { |
| 238 | int port = i | |
| 238 | int port = iop | |
| 239 | 239 | |
| 240 | 240 | m_toggle^=0x02; /* mcu63701_busy flag */ |
| 241 | 241 | |
| r15082 | r15083 | |
| 272 | 272 | |
| 273 | 273 | static INPUT_PORTS_START( spdodgeb ) |
| 274 | 274 | PORT_START("IN0") |
| 275 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 275 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 276 | 276 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* mcu63701_busy flag */ |
| 277 | 277 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 278 | 278 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r15082 | r15083 | |
|---|---|---|
| 286 | 286 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 287 | 287 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 288 | 288 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 289 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 289 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 290 | 290 | |
| 291 | 291 | PORT_START("IN1") |
| 292 | 292 | PORT_DIPNAME( 0x01, 0x00, "SYS1" ) |
| r15082 | r15083 | |
| 442 | 442 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 443 | 443 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 444 | 444 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 446 | 446 | |
| 447 | 447 | PORT_START("IN1") |
| 448 | 448 | PORT_DIPNAME( 0x01, 0x00, "SYS1" ) |
| r15082 | r15083 | |
|---|---|---|
| 490 | 490 | READ8_MEMBER(turbo_state::turbo_collision_r) |
| 491 | 491 | { |
| 492 | 492 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 493 | return i | |
| 493 | return iop | |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | |
| r15082 | r15083 | |
| 504 | 504 | static READ8_DEVICE_HANDLER( turbo_analog_r ) |
| 505 | 505 | { |
| 506 | 506 | turbo_state *state = device->machine().driver_data<turbo_state>(); |
| 507 | return | |
| 507 | return s | |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | |
| 511 | 511 | WRITE8_MEMBER(turbo_state::turbo_analog_reset_w) |
| 512 | 512 | { |
| 513 | m_turbo_last_analog = i | |
| 513 | m_turbo_last_analog = iop | |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | |
| r15082 | r15083 | |
| 548 | 548 | |
| 549 | 549 | READ8_MEMBER(turbo_state::buckrog_port_2_r) |
| 550 | 550 | { |
| 551 | int inp1 = input_port_read(machine(), "DSW1"); | |
| 552 | int inp2 = input_port_read(machine(), "DSW2"); | |
| 551 | int inp1 = ioport("DSW1")->read(); | |
| 552 | int inp2 = ioport("DSW2")->read(); | |
| 553 | 553 | |
| 554 | 554 | return (((inp2 >> 6) & 1) << 7) | |
| 555 | 555 | (((inp2 >> 4) & 1) << 6) | |
| r15082 | r15083 | |
| 564 | 564 | |
| 565 | 565 | READ8_MEMBER(turbo_state::buckrog_port_3_r) |
| 566 | 566 | { |
| 567 | int inp1 = input_port_read(machine(), "DSW1"); | |
| 568 | int inp2 = input_port_read(machine(), "DSW2"); | |
| 567 | int inp1 = ioport("DSW1")->read(); | |
| 568 | int inp2 = ioport("DSW2")->read(); | |
| 569 | 569 | |
| 570 | 570 | return (((inp2 >> 7) & 1) << 7) | |
| 571 | 571 | (((inp2 >> 5) & 1) << 6) | |
| r15082 | r15083 | |
|---|---|---|
| 261 | 261 | /* the lower 4 (or 3?) bits select the port to read */ |
| 262 | 262 | switch (offset & 0x0f) /* might be 0x07 */ |
| 263 | 263 | { |
| 264 | case 0x00: ret = input_port_read(machine(), "IN0"); break; | |
| 265 | case 0x02: ret = input_port_read(machine(), "IN1"); break; | |
| 266 | case 0x03: ret = input_port_read(machine(), "IN2"); break; | |
| 267 | case 0x04: ret = input_port_read(machine(), "IN3"); break; | |
| 268 | case 0x06: ret = input_port_read(machine(), "DSW3"); break; | |
| 269 | case 0x07: ret = input_port_read(machine(), "DSW2"); break; | |
| 264 | case 0x00: ret = ioport("IN0")->read(); break; | |
| 265 | case 0x02: ret = ioport("IN1")->read(); break; | |
| 266 | case 0x03: ret = ioport("IN2")->read(); break; | |
| 267 | case 0x04: ret = ioport("IN3")->read(); break; | |
| 268 | case 0x06: ret = ioport("DSW3")->read(); break; | |
| 269 | case 0x07: ret = ioport("DSW2")->read(); break; | |
| 270 | 270 | default: logerror("%04x : CVS: Reading unmapped input port 0x%02x\n", cpu_get_pc(&space.device()), offset & 0x0f); break; |
| 271 | 271 | } |
| 272 | 272 | |
| r15082 | r15083 | |
| 425 | 425 | static int speech_rom_read_bit( device_t *device ) |
| 426 | 426 | { |
| 427 | 427 | cvs_state *state = device->machine().driver_data<cvs_state>(); |
| 428 | running_machine &machine = device->machine(); | |
| 429 | UINT8 *ROM = machine.root_device().memregion("speechdata")->base(); | |
| 428 | UINT8 *ROM = state->memregion("speechdata")->base(); | |
| 430 | 429 | int bit; |
| 431 | 430 | |
| 432 | 431 | /* before reading the bit, clamp the address to the region length */ |
| r15082 | r15083 | |
| 612 | 611 | PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ |
| 613 | 612 | |
| 614 | 613 | PORT_START("SENSE") |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 616 | 615 | INPUT_PORTS_END |
| 617 | 616 | |
| 618 | 617 | static INPUT_PORTS_START( cvs_registration ) |
| r15082 | r15083 | |
|---|---|---|
| 680 | 680 | tnzs_state *state = device->machine().driver_data<tnzs_state>(); |
| 681 | 681 | int dsw, dsw1, dsw2; |
| 682 | 682 | |
| 683 | dsw1 = input_port_read(device->machine(), "DSWA"); | |
| 684 | dsw2 = input_port_read(device->machine(), "DSWB"); | |
| 683 | dsw1 = state->ioport("DSWA")->read(); | |
| 684 | dsw2 = state->ioport("DSWB")->read(); | |
| 685 | 685 | |
| 686 | 686 | switch (state->m_kageki_csport_sel) |
| 687 | 687 | { |
| r15082 | r15083 | |
|---|---|---|
| 298 | 298 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 299 | 299 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 300 | 300 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 301 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 301 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 302 | 302 | |
| 303 | 303 | PORT_START("DSW1_2") |
| 304 | 304 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
| 396 | 396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 397 | 397 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 398 | 398 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 399 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 399 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 400 | 400 | |
| 401 | 401 | PORT_START("DSW1_2") |
| 402 | 402 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
| 469 | 469 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 470 | 470 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 471 | 471 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 472 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 472 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 473 | 473 | |
| 474 | 474 | PORT_START("DSW1_2") |
| 475 | 475 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
| 553 | 553 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 554 | 554 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 555 | 555 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 556 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 556 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 557 | 557 | |
| 558 | 558 | PORT_START("DSW1_2") |
| 559 | 559 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
|---|---|---|
| 110 | 110 | } |
| 111 | 111 | else |
| 112 | 112 | { |
| 113 | UINT8 lowInputBits = input_port_read(device->machine(), "IN1"); | |
| 114 | UINT8 highInputBits = input_port_read(device->machine(), "IN0"); | |
| 113 | UINT8 lowInputBits = device->machine().root_device().ioport("IN1")->read(); | |
| 114 | UINT8 highInputBits = device->machine().root_device().ioport("IN0")->read(); | |
| 115 | 115 | return ((highInputBits << 24) | (lowInputBits << 16)); |
| 116 | 116 | } |
| 117 | 117 | |
| r15082 | r15083 | |
| 124 | 124 | { |
| 125 | 125 | if (ACCESSING_BITS_24_31) |
| 126 | 126 | { |
| 127 | i | |
| 127 | iop | |
| 128 | 128 | return; |
| 129 | 129 | } |
| 130 | 130 |
| r15082 | r15083 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | READ16_MEMBER(batman_state::special_port2_r) |
| 91 | 91 | { |
| 92 | int result = i | |
| 92 | int result = iop | |
| 93 | 93 | if (m_sound_to_cpu_ready) result ^= 0x0010; |
| 94 | 94 | if (m_cpu_to_sound_ready) result ^= 0x0020; |
| 95 | 95 | return result; |
| r15082 | r15083 | |
| 180 | 180 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */ |
| 181 | 181 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@260040) */ |
| 182 | 182 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 183 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 183 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 184 | 184 | |
| 185 | 185 | PORT_INCLUDE( atarijsa_iii ) /* audio board port */ |
| 186 | 186 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 198 | 198 | bit 12-15: accel |
| 199 | 199 | */ |
| 200 | 200 | |
| 201 | int data = input_port_read(machine(), "IN3"); | |
| 202 | int data2 = input_port_read(machine(), "PADDLE"); | |
| 201 | int data = ioport("IN3")->read(); | |
| 202 | int data2 = ioport("PADDLE")->read(); | |
| 203 | 203 | |
| 204 | 204 | int ret=0x0000; |
| 205 | 205 | |
| r15082 | r15083 | |
| 228 | 228 | |
| 229 | 229 | switch (m_selected_ip & 0xf) |
| 230 | 230 | { // From WEC Le Mans Schems: |
| 231 | case 0xc: return input_port_read(machine(), "ACCEL"); // Accel - Schems: Accelevr | |
| 232 | case 0: return input_port_read(machine(), "ACCEL"); | |
| 233 | case 0xd: return input_port_read(machine(), "WHEEL"); // Wheel - Schems: Handlevr | |
| 234 | case 1: return input_port_read(machine(), "WHEEL"); | |
| 231 | case 0xc: return ioport("ACCEL")->read(); // Accel - Schems: Accelevr | |
| 232 | case 0: return ioport("ACCEL")->read(); | |
| 233 | case 0xd: return ioport("WHEEL")->read(); // Wheel - Schems: Handlevr | |
| 234 | case 1: return ioport("WHEEL")->read(); | |
| 235 | 235 | |
| 236 | 236 | default: return ~0; |
| 237 | 237 | } |
| r15082 | r15083 | |
| 1281 | 1281 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1282 | 1282 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1283 | 1283 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1284 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x02) // only in WEC Le Mans 24 cabinets | |
| 1285 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x02) // player 2? | |
| 1284 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x02) // only in WEC Le Mans 24 cabinets | |
| 1285 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x02) // player 2? | |
| 1286 | 1286 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) |
| 1287 | 1287 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) // must be 0 otherwise game freezes when using WEC Le Mans 24 cabinet |
| 1288 | 1288 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1329 | 1329 | PORT_BIT( 0x7f, 0x40, IPT_PADDLE ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) |
| 1330 | 1330 | |
| 1331 | 1331 | PORT_START("IN3") |
| 1332 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) // only in Konami GT cabinet with brake | |
| 1333 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) | |
| 1332 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) // only in Konami GT cabinet with brake | |
| 1333 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) | |
| 1334 | 1334 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1335 | 1335 | // PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) |
| 1336 | 1336 |
| r15082 | r15083 | |
|---|---|---|
| 279 | 279 | static INPUT_PORTS_START( progolf ) |
| 280 | 280 | PORT_START("IN0") |
| 281 | 281 | PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 283 | 283 | |
| 284 | 284 | PORT_START("P1") |
| 285 | 285 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| r15082 | r15083 | |
| 311 | 311 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) |
| 312 | 312 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 313 | 313 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 314 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 315 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 314 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 315 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 316 | 316 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) ) |
| 317 | 317 | PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) ) |
| 318 | 318 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 319 | 319 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 320 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x00) | |
| 321 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,PORTCOND_EQUALS,0x40) | |
| 320 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) | |
| 321 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) | |
| 322 | 322 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) |
| 323 | 323 | PORT_DIPSETTING( 0x10, DEF_STR( Upright ) ) |
| 324 | 324 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 228 | 228 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 229 | 229 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 230 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 230 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 231 | 231 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 232 | 232 | |
| 233 | 233 | PORT_START("DSW1") |
| 234 | 234 | PORT_DIPNAME( 0x01, 0x01, "Coin Mode" ) |
| 235 | 235 | PORT_DIPSETTING( 0x01, "Mode 1" ) |
| 236 | 236 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| 237 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 238 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 239 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 240 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 241 | PORT_DIPSETTING( 0x1a, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 242 | PORT_DIPSETTING( 0x02, DEF_STR( 8C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 243 | PORT_DIPSETTING( 0x1c, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 244 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 245 | PORT_DIPSETTING( 0x06, DEF_STR( 3C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 246 | PORT_DIPSETTING( 0x1e, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 247 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 248 | PORT_DIPSETTING( 0x12, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 249 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 250 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 251 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 252 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 253 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) | |
| 254 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 255 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 256 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 257 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 258 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 259 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 260 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 261 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 262 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 263 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 237 | PORT_DIPNAME( 0x1e, 0x1e, "Coinage Mode 1" ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 238 | PORT_DIPSETTING( 0x14, DEF_STR( 6C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 239 | PORT_DIPSETTING( 0x16, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 240 | PORT_DIPSETTING( 0x18, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 241 | PORT_DIPSETTING( 0x1a, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 242 | PORT_DIPSETTING( 0x02, DEF_STR( 8C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 243 | PORT_DIPSETTING( 0x1c, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 244 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 245 | PORT_DIPSETTING( 0x06, DEF_STR( 3C_2C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 246 | PORT_DIPSETTING( 0x1e, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 247 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 248 | PORT_DIPSETTING( 0x12, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 249 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 250 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 251 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 252 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 253 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW1",0x01,EQUALS,0x01) | |
| 254 | PORT_DIPNAME( 0x06, 0x06, "Coin A Mode 2" ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 255 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 256 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 257 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 258 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 259 | PORT_DIPNAME( 0x18, 0x18, "Coin B Mode 2" ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 260 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 261 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 262 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 263 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,NOTEQUALS,0x01) | |
| 264 | 264 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 265 | 265 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 266 | 266 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r15082 | r15083 | |
| 324 | 324 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 325 | 325 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 326 | 326 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 328 | 328 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 329 | 329 | |
| 330 | 330 | PORT_START("DSW1") |
| r15082 | r15083 | |
|---|---|---|
| 29 | 29 | switch(offset) |
| 30 | 30 | { |
| 31 | 31 | case 0: |
| 32 | return i | |
| 32 | return iop | |
| 33 | 33 | case 1: |
| 34 | return i | |
| 34 | return iop | |
| 35 | 35 | case 2: |
| 36 | return i | |
| 36 | return iop | |
| 37 | 37 | case 3: |
| 38 | return i | |
| 38 | return iop | |
| 39 | 39 | case 7: |
| 40 | return i | |
| 40 | return iop | |
| 41 | 41 | |
| 42 | 42 | default: |
| 43 | 43 | logerror("reading unhandled goal92 inputs %04X %04X @ PC = %04X\n", offset, mem_mask,cpu_get_pc(&space.device())); |
| r15082 | r15083 | |
|---|---|---|
| 61 | 61 | { |
| 62 | 62 | const rectangle &visarea = screen.visible_area(); |
| 63 | 63 | |
| 64 | int xpos = input_port_read_safe(screen.machine(), (player == 0) ? "GUN1X" : "GUN2X", 0xffffffff); | |
| 65 | int ypos = input_port_read_safe(screen.machine(), (player == 0) ? "GUN1Y" : "GUN2Y", 0xffffffff); | |
| 64 | int xpos = screen.machine().root_device().ioport((player == 0) ? "GUN1X" : "GUN2X")->read_safe(0xffffffff); | |
| 65 | int ypos = screen.machine().root_device().ioport((player == 0) ? "GUN1Y" : "GUN2Y")->read_safe(0xffffffff); | |
| 66 | 66 | |
| 67 | 67 | if (xpos == -1 || ypos == -1) |
| 68 | 68 | return FALSE; |
| r15082 | r15083 | |
| 201 | 201 | { |
| 202 | 202 | |
| 203 | 203 | /* read the trigger control based on the input select */ |
| 204 | return (i | |
| 204 | return (iop | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
| r15082 | r15083 | |
| 209 | 209 | { |
| 210 | 210 | |
| 211 | 211 | /* read the holster control based on the input select */ |
| 212 | return (i | |
| 212 | return (iop | |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | |
| r15082 | r15083 | |
| 240 | 240 | |
| 241 | 241 | static READ8_DEVICE_HANDLER( alg_cia_0_porta_r ) |
| 242 | 242 | { |
| 243 | return | |
| 243 | return | |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 |
| r15082 | r15083 | |
|---|---|---|
| 104 | 104 | /* Light Gun - need to wiggle the input slightly otherwise fire doesn't work */ |
| 105 | 105 | READ16_MEMBER(unico_state::unico_gunx_0_msb_r) |
| 106 | 106 | { |
| 107 | int x=i | |
| 107 | int x=iop | |
| 108 | 108 | |
| 109 | 109 | x=x*384/256; /* On screen pixel X */ |
| 110 | 110 | if (x<0x160) x=0x30 + (x*0xd0/0x15f); |
| r15082 | r15083 | |
| 115 | 115 | |
| 116 | 116 | READ16_MEMBER(unico_state::unico_guny_0_msb_r) |
| 117 | 117 | { |
| 118 | int y=i | |
| 118 | int y=iop | |
| 119 | 119 | |
| 120 | 120 | y=0x18+((y*0xe0)/0xff); |
| 121 | 121 | |
| r15082 | r15083 | |
| 124 | 124 | |
| 125 | 125 | READ16_MEMBER(unico_state::unico_gunx_1_msb_r) |
| 126 | 126 | { |
| 127 | int x=i | |
| 127 | int x=iop | |
| 128 | 128 | |
| 129 | 129 | x=x*384/256; /* On screen pixel X */ |
| 130 | 130 | if (x<0x160) x=0x30 + (x*0xd0/0x15f); |
| r15082 | r15083 | |
| 135 | 135 | |
| 136 | 136 | READ16_MEMBER(unico_state::unico_guny_1_msb_r) |
| 137 | 137 | { |
| 138 | int y=i | |
| 138 | int y=iop | |
| 139 | 139 | |
| 140 | 140 | y=0x18+((y*0xe0)/0xff); |
| 141 | 141 |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | switch (offset) |
| 83 | 83 | { |
| 84 | 84 | case 0x80/2: |
| 85 | return i | |
| 85 | return iop | |
| 86 | 86 | |
| 87 | 87 | case 0x84/2: |
| 88 | return i | |
| 88 | return iop | |
| 89 | 89 | |
| 90 | 90 | case 0x86/2: |
| 91 | return i | |
| 91 | return iop | |
| 92 | 92 | |
| 93 | 93 | case 0x50: |
| 94 | 94 | case 0x51: |
| r15082 | r15083 | |
|---|---|---|
| 233 | 233 | /* read as two bits from each of 4 ports. For this reason, the input */ |
| 234 | 234 | /* ports have been organized logically, and are demangled at runtime. */ |
| 235 | 235 | /* 4 input ports each provide 8 bits of information. */ |
| 236 | UINT8 d7d6 = input_port_read(machine(), "D7D6"); | |
| 237 | UINT8 d5d4 = input_port_read(machine(), "D5D4"); | |
| 238 | UINT8 d3d2 = input_port_read(machine(), "D3D2"); | |
| 239 | UINT8 d1d0 = input_port_read(machine(), "D1D0"); | |
| 236 | UINT8 d7d6 = ioport("D7D6")->read(); | |
| 237 | UINT8 d5d4 = ioport("D5D4")->read(); | |
| 238 | UINT8 d3d2 = ioport("D3D2")->read(); | |
| 239 | UINT8 d1d0 = ioport("D1D0")->read(); | |
| 240 | 240 | int shift = offset & 3; |
| 241 | 241 | return demangle(d7d6 >> shift, d5d4 >> shift, d3d2 >> shift, d1d0 >> shift); |
| 242 | 242 | } |
| r15082 | r15083 | |
| 260 | 260 | INT8 delta; |
| 261 | 261 | |
| 262 | 262 | if (m_spinner_select & 1) |
| 263 | return i | |
| 263 | return iop | |
| 264 | 264 | |
| 265 | 265 | /* |
| 266 | 266 | * The values returned are always increasing. That is, regardless of whether |
| r15082 | r15083 | |
| 270 | 270 | */ |
| 271 | 271 | |
| 272 | 272 | /* I'm sure this can be further simplified ;-) BW */ |
| 273 | delta = i | |
| 273 | delta = iop | |
| 274 | 274 | if (delta != 0) |
| 275 | 275 | { |
| 276 | 276 | m_spinner_sign = (delta >> 7) & 1; |
| r15082 | r15083 | |
| 289 | 289 | |
| 290 | 290 | CUSTOM_INPUT_MEMBER(segag80v_state::elim4_joint_coin_r) |
| 291 | 291 | { |
| 292 | return (i | |
| 292 | return (iop | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | |
| r15082 | r15083 | |
| 305 | 305 | { |
| 306 | 306 | case 6: |
| 307 | 307 | /* player 3 & 4 controls */ |
| 308 | result = i | |
| 308 | result = iop | |
| 309 | 309 | break; |
| 310 | 310 | case 7: |
| 311 | 311 | /* the 4 coin inputs */ |
| 312 | result = i | |
| 312 | result = iop | |
| 313 | 313 | break; |
| 314 | 314 | } |
| 315 | 315 | } |
| r15082 | r15083 | |
|---|---|---|
| 248 | 248 | //c012 |
| 249 | 249 | |
| 250 | 250 | PORT_START("c014") /* VBLANK??? */ |
| 251 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 251 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 252 | 252 | |
| 253 | 253 | PORT_START("c015") /* coin input */ |
| 254 | 254 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r15082 | r15083 | |
|---|---|---|
| 256 | 256 | CUSTOM_INPUT_MEMBER(astrocde_state::ebases_trackball_r) |
| 257 | 257 | { |
| 258 | 258 | static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; |
| 259 | return i | |
| 259 | return iop | |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | |
| r15082 | r15083 | |
| 283 | 283 | { |
| 284 | 284 | coin_counter_w(machine(), 0, (offset >> 8) & 1); |
| 285 | 285 | coin_counter_w(machine(), 1, (offset >> 9) & 1); |
| 286 | return i | |
| 286 | return iop | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | |
| r15082 | r15083 | |
| 482 | 482 | CUSTOM_INPUT_MEMBER(astrocde_state::demndragn_joystick_r) |
| 483 | 483 | { |
| 484 | 484 | static const char *const names[] = { "MOVEX", "MOVEY" }; |
| 485 | return i | |
| 485 | return iop | |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | 488 |
| r15082 | r15083 | |
|---|---|---|
| 578 | 578 | static DRIVER_INIT( 40love ) |
| 579 | 579 | { |
| 580 | 580 | fortyl_state *state = machine.driver_data<fortyl_state>(); |
| 581 | UINT8 *ROM = | |
| 581 | UINT8 *ROM = sta | |
| 582 | 582 | state->membank("bank1")->configure_entries(0, 2, &ROM[0x10000], 0x2000); |
| 583 | 583 | |
| 584 | 584 | #if 0 |
| r15082 | r15083 | |
|---|---|---|
| 717 | 717 | { |
| 718 | 718 | int bit0,bit1; |
| 719 | 719 | |
| 720 | bit0 = (input_port_read(machine(), "DSWB") >> offset) & 1; | |
| 721 | bit1 = (input_port_read(machine(), "DSWA") >> offset) & 1; | |
| 720 | bit0 = (ioport("DSWB")->read() >> offset) & 1; | |
| 721 | bit1 = (ioport("DSWA")->read() >> offset) & 1; | |
| 722 | 722 | |
| 723 | 723 | return bit0 | (bit1 << 1); |
| 724 | 724 | } |
| r15082 | r15083 | |
| 777 | 777 | } |
| 778 | 778 | } |
| 779 | 779 | |
| 780 | CUSTOM_INPUT_MEMBER(digdug_state::shifted_port_r){ return i | |
| 780 | CUSTOM_INPUT_MEMBER(digdug_state::shifted_port_r){ return iop | |
| 781 | 781 | |
| 782 | 782 | static WRITE8_DEVICE_HANDLER( out_0 ) |
| 783 | 783 | { |
| r15082 | r15083 | |
| 1077 | 1077 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1078 | 1078 | /* bonus scores are different for 5 lives */ |
| 1079 | 1079 | PORT_DIPNAME( 0x38, 0x20, "Bonus Fighter" ) PORT_DIPLOCATION("SWA:4,5,6") |
| 1080 | PORT_DIPSETTING( 0x30, "15K and 50K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) /* Began with 1, 2 or 3 fighters */ | |
| 1081 | PORT_DIPSETTING( 0x38, "20K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1082 | PORT_DIPSETTING( 0x08, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1083 | PORT_DIPSETTING( 0x10, "15K, 50K, Every 50K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1084 | PORT_DIPSETTING( 0x18, "15K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1085 | PORT_DIPSETTING( 0x20, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) // factory default = "20K, 70K, Every70K" | |
| 1086 | PORT_DIPSETTING( 0x28, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1087 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1088 | PORT_DIPSETTING( 0x30, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) /* Began with 5 fighters */ | |
| 1089 | PORT_DIPSETTING( 0x38, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1090 | PORT_DIPSETTING( 0x08, "15K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1091 | PORT_DIPSETTING( 0x10, "20K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1092 | PORT_DIPSETTING( 0x18, "20K and 100K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1093 | PORT_DIPSETTING( 0x20, "30K and 120K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1094 | PORT_DIPSETTING( 0x28, "30K, 80K, Every 80K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1095 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1080 | PORT_DIPSETTING( 0x30, "15K and 50K Only" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) /* Began with 1, 2 or 3 fighters */ | |
| 1081 | PORT_DIPSETTING( 0x38, "20K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1082 | PORT_DIPSETTING( 0x08, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1083 | PORT_DIPSETTING( 0x10, "15K, 50K, Every 50K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1084 | PORT_DIPSETTING( 0x18, "15K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1085 | PORT_DIPSETTING( 0x20, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) // factory default = "20K, 70K, Every70K" | |
| 1086 | PORT_DIPSETTING( 0x28, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1087 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1088 | PORT_DIPSETTING( 0x30, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) /* Began with 5 fighters */ | |
| 1089 | PORT_DIPSETTING( 0x38, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1090 | PORT_DIPSETTING( 0x08, "15K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1091 | PORT_DIPSETTING( 0x10, "20K and 70K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1092 | PORT_DIPSETTING( 0x18, "20K and 100K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1093 | PORT_DIPSETTING( 0x20, "30K and 120K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1094 | PORT_DIPSETTING( 0x28, "30K, 80K, Every 80K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1095 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1096 | 1096 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:7,8") |
| 1097 | 1097 | PORT_DIPSETTING( 0x00, "1" ) |
| 1098 | 1098 | PORT_DIPSETTING( 0x40, "2" ) |
| r15082 | r15083 | |
| 1181 | 1181 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 1182 | 1182 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1183 | 1183 | PORT_DIPNAME( 0x38, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:4,5,6") |
| 1184 | PORT_DIPSETTING( 0x20, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) /* Began with 2, 3 or 4 fighters */ | |
| 1185 | PORT_DIPSETTING( 0x18, "20K and 60K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1186 | PORT_DIPSETTING( 0x10, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) // factory default = "20K, 70K, Every70K" | |
| 1187 | PORT_DIPSETTING( 0x30, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1188 | PORT_DIPSETTING( 0x38, "30K and 80K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1189 | PORT_DIPSETTING( 0x08, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1190 | PORT_DIPSETTING( 0x28, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1191 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1192 | PORT_DIPSETTING( 0x20, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) /* Began with 5 fighters */ | |
| 1193 | PORT_DIPSETTING( 0x18, "30K and 150K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1194 | PORT_DIPSETTING( 0x10, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1195 | PORT_DIPSETTING( 0x30, "30K, 150K, Every 150K" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1196 | PORT_DIPSETTING( 0x38, "30K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1197 | PORT_DIPSETTING( 0x08, "30K and 100K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1198 | PORT_DIPSETTING( 0x28, "30K and 120K Only" ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1199 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1184 | PORT_DIPSETTING( 0x20, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) /* Began with 2, 3 or 4 fighters */ | |
| 1185 | PORT_DIPSETTING( 0x18, "20K and 60K Only" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1186 | PORT_DIPSETTING( 0x10, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) // factory default = "20K, 70K, Every70K" | |
| 1187 | PORT_DIPSETTING( 0x30, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1188 | PORT_DIPSETTING( 0x38, "30K and 80K Only" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1189 | PORT_DIPSETTING( 0x08, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1190 | PORT_DIPSETTING( 0x28, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1191 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,NOTEQUALS,0xc0) | |
| 1192 | PORT_DIPSETTING( 0x20, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) /* Began with 5 fighters */ | |
| 1193 | PORT_DIPSETTING( 0x18, "30K and 150K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1194 | PORT_DIPSETTING( 0x10, "30K, 120K, Every 120K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1195 | PORT_DIPSETTING( 0x30, "30K, 150K, Every 150K" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1196 | PORT_DIPSETTING( 0x38, "30K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1197 | PORT_DIPSETTING( 0x08, "30K and 100K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1198 | PORT_DIPSETTING( 0x28, "30K and 120K Only" ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1199 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWB",0xc0,EQUALS,0xc0) | |
| 1200 | 1200 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:7,8") |
| 1201 | 1201 | PORT_DIPSETTING( 0x00, "2" ) |
| 1202 | 1202 | PORT_DIPSETTING( 0x80, "3" ) // factory default = "3" |
| r15082 | r15083 | |
| 1268 | 1268 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) |
| 1269 | 1269 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) |
| 1270 | 1270 | PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:3,4,5") |
| 1271 | PORT_DIPSETTING( 0x18, "10K, 40K, Every 40K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1272 | PORT_DIPSETTING( 0x14, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1273 | PORT_DIPSETTING( 0x10, "20K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1274 | PORT_DIPSETTING( 0x1c, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) // factory default = "20K, 60K, Every60K" | |
| 1275 | PORT_DIPSETTING( 0x0c, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1276 | PORT_DIPSETTING( 0x08, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1277 | PORT_DIPSETTING( 0x04, "20K and 60K Only" ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1278 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0x60,PORTCOND_NOTEQUALS,0x00) | |
| 1279 | PORT_DIPSETTING( 0x18, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1280 | PORT_DIPSETTING( 0x14, "20K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1281 | PORT_DIPSETTING( 0x10, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1282 | PORT_DIPSETTING( 0x1c, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1283 | PORT_DIPSETTING( 0x0c, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1284 | PORT_DIPSETTING( 0x08, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1285 | PORT_DIPSETTING( 0x04, "20K and 80K Only" ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1286 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0x60,PORTCOND_EQUALS,0x00) | |
| 1271 | PORT_DIPSETTING( 0x18, "10K, 40K, Every 40K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1272 | PORT_DIPSETTING( 0x14, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1273 | PORT_DIPSETTING( 0x10, "20K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1274 | PORT_DIPSETTING( 0x1c, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) // factory default = "20K, 60K, Every60K" | |
| 1275 | PORT_DIPSETTING( 0x0c, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1276 | PORT_DIPSETTING( 0x08, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1277 | PORT_DIPSETTING( 0x04, "20K and 60K Only" ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1278 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0x60,NOTEQUALS,0x00) | |
| 1279 | PORT_DIPSETTING( 0x18, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1280 | PORT_DIPSETTING( 0x14, "20K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1281 | PORT_DIPSETTING( 0x10, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1282 | PORT_DIPSETTING( 0x1c, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1283 | PORT_DIPSETTING( 0x0c, "20K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1284 | PORT_DIPSETTING( 0x08, "30K, 100K, Every 100K" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1285 | PORT_DIPSETTING( 0x04, "20K and 80K Only" ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1286 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0x60,EQUALS,0x00) | |
| 1287 | 1287 | PORT_DIPNAME( 0x60, 0x60, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:6,7") |
| 1288 | 1288 | PORT_DIPSETTING( 0x40, "1" ) |
| 1289 | 1289 | PORT_DIPSETTING( 0x20, "2" ) |
| r15082 | r15083 | |
| 1393 | 1393 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) |
| 1394 | 1394 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_7C ) ) |
| 1395 | 1395 | PORT_DIPNAME( 0x38, 0x18, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:4,5,6") |
| 1396 | PORT_DIPSETTING( 0x20, "10K, 40K, Every 40K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) // Atari factory default = "10K, 40K, Every40K" | |
| 1397 | PORT_DIPSETTING( 0x10, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1398 | PORT_DIPSETTING( 0x30, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1399 | PORT_DIPSETTING( 0x08, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1400 | PORT_DIPSETTING( 0x28, "10K and 40K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1401 | PORT_DIPSETTING( 0x18, "20K and 60K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) // Namco factory default = "20K, 60K" | |
| 1402 | PORT_DIPSETTING( 0x38, "10K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1403 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0xc0,PORTCOND_NOTEQUALS,0xc0) | |
| 1404 | PORT_DIPSETTING( 0x20, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1405 | PORT_DIPSETTING( 0x10, "30K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1406 | PORT_DIPSETTING( 0x30, "20K and 50K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1407 | PORT_DIPSETTING( 0x08, "20K and 60K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1408 | PORT_DIPSETTING( 0x28, "30K and 70K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1409 | PORT_DIPSETTING( 0x18, "20K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1410 | PORT_DIPSETTING( 0x38, "30K Only" ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1411 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0xc0,PORTCOND_EQUALS,0xc0) | |
| 1396 | PORT_DIPSETTING( 0x20, "10K, 40K, Every 40K" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) // Atari factory default = "10K, 40K, Every40K" | |
| 1397 | PORT_DIPSETTING( 0x10, "10K, 50K, Every 50K" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1398 | PORT_DIPSETTING( 0x30, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1399 | PORT_DIPSETTING( 0x08, "20K, 70K, Every 70K" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1400 | PORT_DIPSETTING( 0x28, "10K and 40K Only" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1401 | PORT_DIPSETTING( 0x18, "20K and 60K Only" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) // Namco factory default = "20K, 60K" | |
| 1402 | PORT_DIPSETTING( 0x38, "10K Only" ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1403 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0xc0,NOTEQUALS,0xc0) | |
| 1404 | PORT_DIPSETTING( 0x20, "20K, 60K, Every 60K" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1405 | PORT_DIPSETTING( 0x10, "30K, 80K, Every 80K" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1406 | PORT_DIPSETTING( 0x30, "20K and 50K Only" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1407 | PORT_DIPSETTING( 0x08, "20K and 60K Only" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1408 | PORT_DIPSETTING( 0x28, "30K and 70K Only" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1409 | PORT_DIPSETTING( 0x18, "20K Only" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1410 | PORT_DIPSETTING( 0x38, "30K Only" ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1411 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) PORT_CONDITION("DSWA",0xc0,EQUALS,0xc0) | |
| 1412 | 1412 | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:7,8") |
| 1413 | 1413 | PORT_DIPSETTING( 0x00, "1" ) |
| 1414 | 1414 | PORT_DIPSETTING( 0x40, "2" ) |
| r15082 | r15083 | |
|---|---|---|
| 110 | 110 | /*It's bit-wise*/ |
| 111 | 111 | switch(m_mux_data&0x0f) |
| 112 | 112 | { |
| 113 | case 0x00: return input_port_read(machine(), "IN0"); | |
| 114 | case 0x01: return input_port_read(machine(), "IN1"); | |
| 115 | case 0x02: return input_port_read(machine(), "IN2"); | |
| 116 | case 0x04: return input_port_read(machine(), "IN3"); | |
| 117 | case 0x08: return input_port_read(machine(), "IN4"); | |
| 113 | case 0x00: return ioport("IN0")->read(); | |
| 114 | case 0x01: return ioport("IN1")->read(); | |
| 115 | case 0x02: return ioport("IN2")->read(); | |
| 116 | case 0x04: return ioport("IN3")->read(); | |
| 117 | case 0x08: return ioport("IN4")->read(); | |
| 118 | 118 | default: |
| 119 | 119 | logerror("Unmapped mahjong panel mux data %02x\n",m_mux_data); |
| 120 | 120 | return 0xff; |
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | case 1: return input_port_read(machine(), "SYS0"); | |
| 124 | case 2: return input_port_read(machine(), "DSW0"); | |
| 125 | case 3: return input_port_read(machine(), "DSW1"); | |
| 126 | case 4: return input_port_read(machine(), "DSW2"); | |
| 127 | case 5: return input_port_read(machine(), "DSW3"); | |
| 128 | case 6: return input_port_read(machine(), "DSW4"); | |
| 129 | case 7: return input_port_read(machine(), "SYS1"); | |
| 123 | case 1: return ioport("SYS0")->read(); | |
| 124 | case 2: return ioport("DSW0")->read(); | |
| 125 | case 3: return ioport("DSW1")->read(); | |
| 126 | case 4: return ioport("DSW2")->read(); | |
| 127 | case 5: return ioport("DSW3")->read(); | |
| 128 | case 6: return ioport("DSW4")->read(); | |
| 129 | case 7: return ioport("SYS1")->read(); | |
| 130 | 130 | default: popmessage("Unmapped I/O read at PC = %06x offset = %02x",cpu_get_pc(&space.device()),offset+0xc0); |
| 131 | 131 | } |
| 132 | 132 | |
| r15082 | r15083 | |
| 676 | 676 | 730E: ED B0 ldir |
| 677 | 677 | ... |
| 678 | 678 | */ |
| 679 | memcpy(macs_ram1 + 0x0e9f, machine.root_device().memregion("user1")->base()+0x7327, 0xc7); | |
| 680 | memcpy(macs_ram1 + 0x1e9f, machine.root_device().memregion("user1")->base()+0x7327, 0xc7); | |
| 679 | memcpy(macs_ram1 + 0x0e9f, state->memregion("user1")->base()+0x7327, 0xc7); | |
| 680 | memcpy(macs_ram1 + 0x1e9f, state->memregion("user1")->base()+0x7327, 0xc7); | |
| 681 | 681 | |
| 682 | memcpy(macs_ram1 + 0x0800, | |
| 682 | memcpy(macs_ram1 + 0x0800, sta | |
| 683 | 683 | memcpy(macs_ram1 + 0x1800, state->memregion("user1")->base()+0x73fa, 0x507); |
| 684 | 684 | |
| 685 | 685 | #define MAKEJMP(n,m) macs_ram2[(n) - 0xe800 + 0]=0xc3;\ |
| r15082 | r15083 | |
|---|---|---|
| 216 | 216 | { |
| 217 | 217 | |
| 218 | 218 | if (m_sbw_system & 2) |
| 219 | return i | |
| 219 | return iop | |
| 220 | 220 | else |
| 221 | return i | |
| 221 | return iop | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, sbowling_state ) |
| r15082 | r15083 | |
|---|---|---|
| 1892 | 1892 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 1893 | 1893 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1894 | 1894 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1895 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1895 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1896 | 1896 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1897 | 1897 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1898 | 1898 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| r15082 | r15083 | |
| 1932 | 1932 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1933 | 1933 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) // must be off to boot |
| 1934 | 1934 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1935 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1935 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1936 | 1936 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1937 | 1937 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 1938 | 1938 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| r15082 | r15083 | |
|---|---|---|
| 372 | 372 | READ16_MEMBER(othunder_state::othunder_lightgun_r) |
| 373 | 373 | { |
| 374 | 374 | static const char *const portname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG }; |
| 375 | return i | |
| 375 | return iop | |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | WRITE16_MEMBER(othunder_state::othunder_lightgun_w) |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | switch (m_io_page) |
| 74 | 74 | { |
| 75 | case 0: ans = input_port_read(machine(), "IN0"); break; | |
| 76 | case 1: ans = input_port_read(machine(), "IN1"); break; | |
| 77 | case 2: ans = input_port_read(machine(), "DSW0"); break; | |
| 78 | case 3: ans = input_port_read(machine(), "DSW1"); break; | |
| 75 | case 0: ans = ioport("IN0")->read(); break; | |
| 76 | case 1: ans = ioport("IN1")->read(); break; | |
| 77 | case 2: ans = ioport("DSW0")->read(); break; | |
| 78 | case 3: ans = ioport("DSW1")->read(); break; | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | return ans; |
| r15082 | r15083 | |
| 99 | 99 | |
| 100 | 100 | READ8_MEMBER(quasar_state::quasar_sh_command_r) |
| 101 | 101 | { |
| 102 | return soundlatch_byte_r(space, 0) + (i | |
| 102 | return soundlatch_byte_r(space, 0) + (iop | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | READ8_MEMBER(quasar_state::audio_t1_r) |
| r15082 | r15083 | |
| 220 | 220 | PORT_DIPSETTING( 0x00, "Wrap Around" ) |
| 221 | 221 | |
| 222 | 222 | PORT_START("SENSE") |
| 223 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 223 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 224 | 224 | |
| 225 | 225 | PORT_START("DSW2") |
| 226 | 226 | #if 0 |
| r15082 | r15083 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | if (coin & 1) // Coin 2 ! |
| 45 | 45 | { |
| 46 | tmp = (i | |
| 46 | tmp = (state->iop | |
| 47 | 47 | state->m_coins++; |
| 48 | 48 | if (state->m_coins >= coinage_table[tmp][0]) |
| 49 | 49 | { |
| r15082 | r15083 | |
| 56 | 56 | |
| 57 | 57 | if (coin & 2) // Coin 1 ! |
| 58 | 58 | { |
| 59 | tmp = (in | |
| 59 | tmp = (machine.root_device().ioport | |
| 60 | 60 | state->m_coins++; |
| 61 | 61 | if (state->m_coins >= coinage_table[tmp][0]) |
| 62 | 62 | { |
| r15082 | r15083 | |
| 89 | 89 | switch (m_e0_data) |
| 90 | 90 | { |
| 91 | 91 | case 0x81 : |
| 92 | return i | |
| 92 | return iop | |
| 93 | 93 | case 0x82 : |
| 94 | return i | |
| 94 | return iop | |
| 95 | 95 | case 0x91: |
| 96 | 96 | /* check coin inputs */ |
| 97 | coin = ((i | |
| 97 | coin = ((iop | |
| 98 | 98 | if (coin ^ m_prev_coin && coin != 3) |
| 99 | 99 | { |
| 100 | 100 | if (m_credits < 9) handle_coins(machine(), coin); |
| r15082 | r15083 | |
| 102 | 102 | m_prev_coin = coin; |
| 103 | 103 | return m_credits; |
| 104 | 104 | case 0x92: |
| 105 | return ((i | |
| 105 | return ((iop | |
| 106 | 106 | case 0xe0: /* reset? */ |
| 107 | 107 | m_coins = 0; |
| 108 | 108 | m_credits = 0; |
| r15082 | r15083 | |
| 111 | 111 | m_credits--; |
| 112 | 112 | return 0xff; |
| 113 | 113 | case 0xfe: /* Dip Switches 1 to 4 */ |
| 114 | return i | |
| 114 | return iop | |
| 115 | 115 | case 0xff: /* Dip Switches 5 to 8 */ |
| 116 | return i | |
| 116 | return iop | |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 |
| r15082 | r15083 | |
|---|---|---|
| 198 | 198 | int shift = 4 * (offset & 1); |
| 199 | 199 | int port = offset & 2; |
| 200 | 200 | static const char *const portnames[] = { "DSWA", "DSWB", "IN0", "IN1" }; |
| 201 | int r = (input_port_read(machine(), portnames[port]) << shift) & 0xf0; | |
| 202 | r |= (input_port_read(machine(), portnames[port+1]) >> (4 - shift)) & 0x0f; | |
| 201 | int r = (ioport(portnames[port])->read() << shift) & 0xf0; | |
| 202 | r |= (ioport(portnames[port+1])->read() >> (4 - shift)) & 0x0f; | |
| 203 | 203 | |
| 204 | 204 | return r; |
| 205 | 205 | } |
| r15082 | r15083 | |
|---|---|---|
| 182 | 182 | { |
| 183 | 183 | if (ACCESSING_BITS_16_31) |
| 184 | 184 | { |
| 185 | return | |
| 185 | return | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | // logerror("Unk EEPROM read mask %x\n", mem_mask); |
| r15082 | r15083 | |
| 197 | 197 | |
| 198 | 198 | CUSTOM_INPUT_MEMBER(psikyo4_state::system_port_r) |
| 199 | 199 | { |
| 200 | return i | |
| 200 | return iop | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | CUSTOM_INPUT_MEMBER(psikyo4_state::mahjong_ctrl_r)/* used by hotgmck/hgkairak */ |
| r15082 | r15083 | |
| 206 | 206 | int sel = (m_io_select[0] & 0x0000ff00) >> 8; |
| 207 | 207 | int ret = 0xff; |
| 208 | 208 | |
| 209 | if (sel & 1) ret &= input_port_read(machine(), player ? "KEY4" : "KEY0" ); | |
| 210 | if (sel & 2) ret &= input_port_read(machine(), player ? "KEY5" : "KEY1" ); | |
| 211 | if (sel & 4) ret &= input_port_read(machine(), player ? "KEY6" : "KEY2" ); | |
| 212 | if (sel & 8) ret &= input_port_read(machine(), player ? "KEY7" : "KEY3" ); | |
| 209 | if (sel & 1) ret &= ioport(player ? "KEY4" : "KEY0" )->read(); | |
| 210 | if (sel & 2) ret &= ioport(player ? "KEY5" : "KEY1" )->read(); | |
| 211 | if (sel & 4) ret &= ioport(player ? "KEY6" : "KEY2" )->read(); | |
| 212 | if (sel & 8) ret &= ioport(player ? "KEY7" : "KEY3" )->read(); | |
| 213 | 213 | |
| 214 | 214 | return ret; |
| 215 | 215 | } |
| r15082 | r15083 | |
| 328 | 328 | static void set_hotgmck_pcm_bank( running_machine &machine, int n ) |
| 329 | 329 | { |
| 330 | 330 | psikyo4_state *state = machine.driver_data<psikyo4_state>(); |
| 331 | UINT8 *ymf_pcmbank = | |
| 331 | UINT8 *ymf_pcmbank = sta | |
| 332 | 332 | UINT8 *pcm_rom = state->memregion("ymfsource")->base(); |
| 333 | 333 | |
| 334 | 334 | memcpy(ymf_pcmbank + n * 0x100000, pcm_rom + PCM_BANK_NO_LEGACY(n) * 0x100000, 0x100000); |
| r15082 | r15083 | |
| 955 | 955 | static void install_hotgmck_pcm_bank(running_machine &machine) |
| 956 | 956 | { |
| 957 | 957 | psikyo4_state *state = machine.driver_data<psikyo4_state>(); |
| 958 | UINT8 *ymf_pcm = | |
| 958 | UINT8 *ymf_pcm = sta | |
| 959 | 959 | UINT8 *pcm_rom = state->memregion("ymfsource")->base(); |
| 960 | 960 | |
| 961 | 961 | memcpy(ymf_pcm, pcm_rom, 0x200000); |
| r15082 | r15083 | |
|---|---|---|
| 127 | 127 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 128 | 128 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) ) |
| 129 | 129 | |
| 130 | /* PORT_BIT( 0x40, IP_ACTIVE_HIGH , IPT_VBLANK | |
| 130 | /* PORT_BIT( 0x40, IP_ACTIVE_HIGH , IPT_CUSTOM ) PORT_VBLANK("screen") freezes frame, could be vblank ?*/ | |
| 131 | 131 | PORT_DIPNAME( 0x40, 0x00, "Freeze" ) |
| 132 | 132 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 133 | 133 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 111 | 111 | { |
| 112 | 112 | switch (m_mux_data & 0x1f) |
| 113 | 113 | { |
| 114 | case 0x01: return input_port_read(machine(), "KEY0"); | |
| 115 | case 0x02: return input_port_read(machine(), "KEY1"); | |
| 116 | case 0x04: return input_port_read(machine(), "KEY2"); | |
| 117 | case 0x08: return input_port_read(machine(), "KEY3"); | |
| 118 | case 0x10: return input_port_read(machine(), "KEY4"); | |
| 114 | case 0x01: return ioport("KEY0")->read(); | |
| 115 | case 0x02: return ioport("KEY1")->read(); | |
| 116 | case 0x04: return ioport("KEY2")->read(); | |
| 117 | case 0x08: return ioport("KEY3")->read(); | |
| 118 | case 0x10: return ioport("KEY4")->read(); | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return 0xffff; |
| r15082 | r15083 | |
| 166 | 166 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 167 | 167 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 168 | 168 | PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) |
| 169 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 169 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 170 | 170 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Flip_Screen ) ) |
| 171 | 171 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 172 | 172 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 126 | 126 | switch (offset) |
| 127 | 127 | { |
| 128 | 128 | // player inputs dsw1 dsw2 |
| 129 | case 0: data = input_port_read(machine(), "IN0") | ((input_port_read(machine(), "DSW1") & 0x02) << 5) | ((input_port_read(machine(), "DSW2") & 0x01) << 4); break; | |
| 130 | case 1: data = input_port_read(machine(), "IN1") | ((input_port_read(machine(), "DSW1") & 0x01) << 6) | ((input_port_read(machine(), "DSW2") & 0x02) << 3); break; | |
| 131 | case 2: data = input_port_read(machine(), "IN2") | ((input_port_read(machine(), "DSW1") & 0x08) << 3) | ((input_port_read(machine(), "DSW2") & 0x04) << 2); break; | |
| 132 | case 3: data = input_port_read(machine(), "IN3") | ((input_port_read(machine(), "DSW1") & 0x04) << 4) | ((input_port_read(machine(), "DSW2") & 0x08) << 1); break; | |
| 133 | case 4: data = ((input_port_read(machine(), "DSW1") & 0x20) << 2) | ((input_port_read(machine(), "DSW2") & 0x10) << 1); break; | |
| 134 | case 5: data = ((input_port_read(machine(), "DSW1") & 0x10) << 3) | ((input_port_read(machine(), "DSW2") & 0x20) << 0); break; | |
| 135 | case 6: data = ((input_port_read(machine(), "DSW1") & 0x80) << 0) | ((input_port_read(machine(), "DSW2") & 0x40) >> 1); break; | |
| 136 | case 7: data = ((input_port_read(machine(), "DSW1") & 0x40) << 1) | ((input_port_read(machine(), "DSW2") & 0x80) >> 2); break; | |
| 129 | case 0: data = ioport("IN0")->read() | ((ioport("DSW1")->read() & 0x02) << 5) | ((ioport("DSW2")->read() & 0x01) << 4); break; | |
| 130 | case 1: data = ioport("IN1")->read() | ((ioport("DSW1")->read() & 0x01) << 6) | ((ioport("DSW2")->read() & 0x02) << 3); break; | |
| 131 | case 2: data = ioport("IN2")->read() | ((ioport("DSW1")->read() & 0x08) << 3) | ((ioport("DSW2")->read() & 0x04) << 2); break; | |
| 132 | case 3: data = ioport("IN3")->read() | ((ioport("DSW1")->read() & 0x04) << 4) | ((ioport("DSW2")->read() & 0x08) << 1); break; | |
| 133 | case 4: data = ((ioport("DSW1")->read() & 0x20) << 2) | ((ioport("DSW2")->read() & 0x10) << 1); break; | |
| 134 | case 5: data = ((ioport("DSW1")->read() & 0x10) << 3) | ((ioport("DSW2")->read() & 0x20) << 0); break; | |
| 135 | case 6: data = ((ioport("DSW1")->read() & 0x80) << 0) | ((ioport("DSW2")->read() & 0x40) >> 1); break; | |
| 136 | case 7: data = ((ioport("DSW1")->read() & 0x40) << 1) | ((ioport("DSW2")->read() & 0x80) >> 2); break; | |
| 137 | 137 | } |
| 138 | 138 | return data; |
| 139 | 139 | } |
| r15082 | r15083 | |
|---|---|---|
| 340 | 340 | switch (offset) |
| 341 | 341 | { |
| 342 | 342 | case 0x00: |
| 343 | return i | |
| 343 | return iop | |
| 344 | 344 | case 0x01: |
| 345 | return (i | |
| 345 | return (iop | |
| 346 | 346 | case 0x02: |
| 347 | return i | |
| 347 | return iop | |
| 348 | 348 | case 0x03: |
| 349 | return (i | |
| 349 | return (iop | |
| 350 | 350 | default: |
| 351 | 351 | logerror("taitox unknown dsw read offset: %04x\n", offset); |
| 352 | 352 | return 0x00; |
| r15082 | r15083 | |
| 358 | 358 | switch (offset) |
| 359 | 359 | { |
| 360 | 360 | case 0x00: |
| 361 | return i | |
| 361 | return iop | |
| 362 | 362 | case 0x01: |
| 363 | return i | |
| 363 | return iop | |
| 364 | 364 | case 0x02: |
| 365 | return i | |
| 365 | return iop | |
| 366 | 366 | |
| 367 | 367 | default: |
| 368 | 368 | logerror("taitox unknown input read offset: %04x\n", offset); |
| r15082 | r15083 | |
|---|---|---|
| 347 | 347 | |
| 348 | 348 | switch ((m_beast_p0 >> 2) & 3) |
| 349 | 349 | { |
| 350 | case 0: return input_port_read(machine(), "IN1"); | |
| 351 | case 1: return input_port_read(machine(), "IN2"); | |
| 352 | case 2: return input_port_read(machine(), "IN0"); | |
| 350 | case 0: return ioport("IN1")->read(); | |
| 351 | case 1: return ioport("IN2")->read(); | |
| 352 | case 2: return ioport("IN0")->read(); | |
| 353 | 353 | default: return 0xff; |
| 354 | 354 | } |
| 355 | 355 | } |
| r15082 | r15083 | |
| 363 | 363 | { |
| 364 | 364 | |
| 365 | 365 | UINT8 dsw = 0; |
| 366 | UINT8 dsw1 = ~input_port_read(machine(), "DSW1"); | |
| 367 | UINT8 dsw2 = ~input_port_read(machine(), "DSW2"); | |
| 366 | UINT8 dsw1 = ~ioport("DSW1")->read(); | |
| 367 | UINT8 dsw2 = ~ioport("DSW2")->read(); | |
| 368 | 368 | |
| 369 | 369 | switch ((m_beast_p0 >> 5) & 3) |
| 370 | 370 | { |
| r15082 | r15083 | |
| 522 | 522 | static MACHINE_START( djboy ) |
| 523 | 523 | { |
| 524 | 524 | djboy_state *state = machine.driver_data<djboy_state>(); |
| 525 | UINT8 *MAIN = machine.root_device().memregion("maincpu")->base(); | |
| 526 | UINT8 *CPU1 = machine.root_device().memregion("cpu1")->base(); | |
| 525 | UINT8 *MAIN = state->memregion("maincpu")->base(); | |
| 526 | UINT8 *CPU1 = state->memregion("cpu1")->base(); | |
| 527 | 527 | UINT8 *CPU2 = state->memregion("cpu2")->base(); |
| 528 | 528 | |
| 529 | 529 | state->membank("bank1")->configure_entries(0, 4, &MAIN[0x00000], 0x2000); |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | res = 0; |
| 65 | 65 | for (i = 0;i < 8;i++) |
| 66 | res |= ((i | |
| 66 | res |= ((iop | |
| 67 | 67 | |
| 68 | 68 | return res; |
| 69 | 69 | } |
| r15082 | r15083 | |
| 260 | 260 | |
| 261 | 261 | PORT_START("DSW2") |
| 262 | 262 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 263 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 263 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") /* not sure, but likely */ | |
| 264 | 264 | INPUT_PORTS_END |
| 265 | 265 | |
| 266 | 266 | static INPUT_PORTS_START( turtship ) |
| r15082 | r15083 | |
| 534 | 534 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 535 | 535 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 536 | 536 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 537 | PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_VBLANK | |
| 537 | PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 538 | 538 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 539 | 539 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 540 | 540 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 89 | 89 | switch (offset << 1) |
| 90 | 90 | { |
| 91 | 91 | case 0: |
| 92 | return i | |
| 92 | return iop | |
| 93 | 93 | case 2: |
| 94 | return i | |
| 94 | return iop | |
| 95 | 95 | case 8: |
| 96 | return i | |
| 96 | return iop | |
| 97 | 97 | case 10: /* ? */ |
| 98 | 98 | case 12: |
| 99 | 99 | return 0; |
| r15082 | r15083 | |
| 164 | 164 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 165 | 165 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 166 | 166 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 167 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 167 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 168 | 168 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 169 | 169 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 170 | 170 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 51 | 51 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 52 | 52 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 53 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 53 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 54 | 54 | |
| 55 | 55 | PORT_START("IN1") |
| 56 | 56 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| r15082 | r15083 | |
|---|---|---|
| 301 | 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| 302 | 302 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) |
| 303 | 303 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Sound busy??? */ |
| 304 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_VBLANK | |
| 304 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 305 | 305 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 306 | 306 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 307 | 307 |
| r15082 | r15083 | |
|---|---|---|
| 276 | 276 | return m_cmos_ram[(m_cmos_ram_a10_3 << 3) | (m_cmos_ram_a2_0 & 3)]; |
| 277 | 277 | case 8: |
| 278 | 278 | { |
| 279 | int keypad = i | |
| 279 | int keypad = iop | |
| 280 | 280 | m_keypad_status = 0; |
| 281 | 281 | m_io_firq_status = 0; |
| 282 | 282 | return keypad; |
| 283 | 283 | } |
| 284 | 284 | case 9: |
| 285 | 285 | { |
| 286 | return i | |
| 286 | return iop | |
| 287 | 287 | } |
| 288 | 288 | case 0xa: |
| 289 | 289 | { |
| 290 | int coins = m_coin_latch | (i | |
| 290 | int coins = m_coin_latch | (iop | |
| 291 | 291 | m_coin_latch = 0; |
| 292 | 292 | m_io_firq_status = 0; |
| 293 | 293 | return coins; |
| 294 | 294 | } |
| 295 | 295 | case 0x10: |
| 296 | return i | |
| 296 | return iop | |
| 297 | 297 | case 0x11: |
| 298 | return i | |
| 298 | return iop | |
| 299 | 299 | case 0x12: |
| 300 | return i | |
| 300 | return iop | |
| 301 | 301 | case 0x16: |
| 302 | 302 | return m_io_firq_status; |
| 303 | 303 | case 0x18: |
| 304 | return i | |
| 304 | return iop | |
| 305 | 305 | /* Unused I/O */ |
| 306 | 306 | case 0x19: |
| 307 | 307 | case 0x1a: |
| r15082 | r15083 | |
| 417 | 417 | if (newval == 1) |
| 418 | 418 | { |
| 419 | 419 | m_io_firq_status |= 2; |
| 420 | m_coin_latch = i | |
| 420 | m_coin_latch = iop | |
| 421 | 421 | cputag_set_input_line(machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE); |
| 422 | 422 | } |
| 423 | 423 | } |
| r15082 | r15083 | |
|---|---|---|
| 290 | 290 | |
| 291 | 291 | static INTERRUPT_GEN( ettrivia_interrupt ) |
| 292 | 292 | { |
| 293 | if( | |
| 293 | if( | |
| 294 | 294 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 295 | 295 | else |
| 296 | 296 | device_set_input_line(device, 0, HOLD_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 698 | 698 | |
| 699 | 699 | |
| 700 | 700 | #define MCU_READ(tag, _bit_, _offset_, _retval_) \ |
| 701 | if((0xffff - in | |
| 701 | if((0xffff - machine.root_device().ioport(tag)->read( | |
| 702 | 702 | |
| 703 | 703 | /*Funky "DMA" / protection thing*/ |
| 704 | 704 | /*---- -x-- "DMA" execute.*/ |
| r15082 | r15083 | |
| 749 | 749 | |
| 750 | 750 | if(state->m_test_mode) //service_mode |
| 751 | 751 | { |
| 752 | jm_shared_ram[0x000/2] = input_port_read(machine, "KEY0"); | |
| 753 | jm_shared_ram[0x002/2] = input_port_read(machine, "KEY1"); | |
| 754 | jm_shared_ram[0x004/2] = input_port_read(machine, "KEY2"); | |
| 755 | jm_shared_ram[0x006/2] = input_port_read(machine, "KEY3"); | |
| 756 | jm_shared_ram[0x008/2] = input_port_read(machine, "KEY4"); | |
| 757 | jm_shared_ram[0x00a/2] = input_port_read(machine, "KEY5"); | |
| 752 | jm_shared_ram[0x000/2] = machine.root_device().ioport("KEY0")->read(); | |
| 753 | jm_shared_ram[0x002/2] = machine.root_device().ioport("KEY1")->read(); | |
| 754 | jm_shared_ram[0x004/2] = machine.root_device().ioport("KEY2")->read(); | |
| 755 | jm_shared_ram[0x006/2] = machine.root_device().ioport("KEY3")->read(); | |
| 756 | jm_shared_ram[0x008/2] = machine.root_device().ioport("KEY4")->read(); | |
| 757 | jm_shared_ram[0x00a/2] = machine.root_device().ioport("KEY5")->read(); | |
| 758 | 758 | } |
| 759 | 759 | else |
| 760 | 760 | { |
| r15082 | r15083 | |
| 793 | 793 | |
| 794 | 794 | if(state->m_test_mode) //service_mode |
| 795 | 795 | { |
| 796 | jm_shared_ram[0x000/2] = input_port_read(machine, "KEY0"); | |
| 797 | jm_shared_ram[0x002/2] = input_port_read(machine, "KEY1"); | |
| 798 | jm_shared_ram[0x004/2] = input_port_read(machine, "KEY2"); | |
| 799 | jm_shared_ram[0x006/2] = input_port_read(machine, "KEY3"); | |
| 800 | jm_shared_ram[0x008/2] = input_port_read(machine, "KEY4"); | |
| 801 | jm_shared_ram[0x00a/2] = input_port_read(machine, "KEY5"); | |
| 796 | jm_shared_ram[0x000/2] = state->ioport("KEY0")->read(); | |
| 797 | jm_shared_ram[0x002/2] = state->ioport("KEY1")->read(); | |
| 798 | jm_shared_ram[0x004/2] = state->ioport("KEY2")->read(); | |
| 799 | jm_shared_ram[0x006/2] = state->ioport("KEY3")->read(); | |
| 800 | jm_shared_ram[0x008/2] = state->ioport("KEY4")->read(); | |
| 801 | jm_shared_ram[0x00a/2] = state->ioport("KEY5")->read(); | |
| 802 | 802 | } |
| 803 | 803 | else |
| 804 | 804 | { |
| r15082 | r15083 | |
| 838 | 838 | |
| 839 | 839 | if(state->m_test_mode) //service_mode |
| 840 | 840 | { |
| 841 | jm_shared_ram[0x300/2] = input_port_read(machine, "KEY0"); | |
| 842 | jm_shared_ram[0x302/2] = input_port_read(machine, "KEY1"); | |
| 843 | jm_shared_ram[0x304/2] = input_port_read(machine, "KEY2"); | |
| 844 | jm_shared_ram[0x306/2] = input_port_read(machine, "KEY3"); | |
| 845 | jm_shared_ram[0x308/2] = input_port_read(machine, "KEY4"); | |
| 846 | jm_shared_ram[0x30a/2] = input_port_read(machine, "KEY5"); | |
| 841 | jm_shared_ram[0x300/2] = state->ioport("KEY0")->read(); | |
| 842 | jm_shared_ram[0x302/2] = state->ioport("KEY1")->read(); | |
| 843 | jm_shared_ram[0x304/2] = state->ioport("KEY2")->read(); | |
| 844 | jm_shared_ram[0x306/2] = state->ioport("KEY3")->read(); | |
| 845 | jm_shared_ram[0x308/2] = state->ioport("KEY4")->read(); | |
| 846 | jm_shared_ram[0x30a/2] = state->ioport("KEY5")->read(); | |
| 847 | 847 | } |
| 848 | 848 | else |
| 849 | 849 | { |
| r15082 | r15083 | |
| 882 | 882 | UINT16 *jm_shared_ram = state->m_jm_shared_ram; |
| 883 | 883 | if(state->m_test_mode) //service_mode |
| 884 | 884 | { |
| 885 | jm_shared_ram[0x200/2] = input_port_read(machine, "KEY0"); | |
| 886 | jm_shared_ram[0x202/2] = input_port_read(machine, "KEY1"); | |
| 887 | jm_shared_ram[0x204/2] = input_port_read(machine, "KEY2"); | |
| 885 | jm_shared_ram[0x200/2] = state->ioport("KEY0")->read(); | |
| 886 | jm_shared_ram[0x202/2] = state->ioport("KEY1")->read(); | |
| 887 | jm_shared_ram[0x204/2] = state->ioport("KEY2")->read(); | |
| 888 | 888 | } |
| 889 | 889 | else |
| 890 | 890 | { |
| r15082 | r15083 | |
| 1378 | 1378 | { |
| 1379 | 1379 | case MJZOOMIN_MCU: |
| 1380 | 1380 | case DAIREIKA_MCU: |
| 1381 | state->m_test_mode = (~(i | |
| 1381 | state->m_test_mode = (~(state->iop | |
| 1382 | 1382 | break; |
| 1383 | 1383 | case URASHIMA_MCU: |
| 1384 | state->m_test_mode = ((~(i | |
| 1384 | state->m_test_mode = ((~(state->iop | |
| 1385 | 1385 | break; |
| 1386 | 1386 | case KAKUMEI_MCU: |
| 1387 | 1387 | case KAKUMEI2_MCU: |
| 1388 | 1388 | case SUCHIPI_MCU: |
| 1389 | state->m_test_mode = (~(i | |
| 1389 | state->m_test_mode = (~(state->iop | |
| 1390 | 1390 | break; |
| 1391 | 1391 | } |
| 1392 | 1392 | } |
| r15082 | r15083 | |
|---|---|---|
| 241 | 241 | |
| 242 | 242 | PORT_START("DSW1") |
| 243 | 243 | PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0100, "SW1:1" ) /* Listed as "Unused" */ |
| 244 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW1",0x8000, | |
| 244 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW1",0x8000, | |
| 245 | 245 | PORT_DIPSETTING( 0x0a00, DEF_STR( 3C_1C ) ) |
| 246 | 246 | PORT_DIPSETTING( 0x0c00, DEF_STR( 2C_1C ) ) |
| 247 | 247 | PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 250 | 250 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 251 | 251 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_5C ) ) |
| 252 | 252 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 253 | PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW1",0x8000, | |
| 253 | PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW1",0x8000, | |
| 254 | 254 | PORT_DIPSETTING( 0x5000, DEF_STR( 3C_1C ) ) |
| 255 | 255 | PORT_DIPSETTING( 0x6000, DEF_STR( 2C_1C ) ) |
| 256 | 256 | PORT_DIPSETTING( 0x7000, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 259 | 259 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_4C ) ) |
| 260 | 260 | PORT_DIPSETTING( 0x1000, DEF_STR( 1C_5C ) ) |
| 261 | 261 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 262 | PORT_DIPNAME( 0x7e00, 0x7e00, DEF_STR( Coinage ) ) PORT_CONDITION("DSW1",0x8000, | |
| 262 | PORT_DIPNAME( 0x7e00, 0x7e00, DEF_STR( Coinage ) ) PORT_CONDITION("DSW1",0x8000, | |
| 263 | 263 | PORT_DIPSETTING( 0x7e00, "2 to Start, 1 to Continue" ) |
| 264 | 264 | PORT_DIPNAME( 0x8000, 0x8000, "Continue Coin" ) PORT_DIPLOCATION("SW1:8") |
| 265 | 265 | PORT_DIPSETTING( 0x8000, "Normal Coinage" ) |
| r15082 | r15083 | |
| 273 | 273 | PORT_DIPSETTING( 0x0004, DEF_STR( Single ) ) |
| 274 | 274 | PORT_DIPSETTING( 0x0000, "Multiple" ) |
| 275 | 275 | PORT_DIPNAME( 0x0008, 0x0008, "Multi Player Mode" ) PORT_DIPLOCATION("SW2:4") |
| 276 | PORT_DIPSETTING( 0x0008, "Single or Multi Player" ) PORT_CONDITION("DSW1",0x0004,PORTCOND_EQUALS,0x0000) | |
| 277 | PORT_DIPSETTING( 0x0000, "Multi Player Game Only" ) PORT_CONDITION("DSW1",0x0004,PORTCOND_EQUALS,0x0000) | |
| 278 | PORT_DIPSETTING( 0x0008, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,PORTCOND_NOTEQUALS,0x0000) | |
| 279 | PORT_DIPSETTING( 0x0000, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,PORTCOND_NOTEQUALS,0x0000) | |
| 276 | PORT_DIPSETTING( 0x0008, "Single or Multi Player" ) PORT_CONDITION("DSW1",0x0004,EQUALS,0x0000) | |
| 277 | PORT_DIPSETTING( 0x0000, "Multi Player Game Only" ) PORT_CONDITION("DSW1",0x0004,EQUALS,0x0000) | |
| 278 | PORT_DIPSETTING( 0x0008, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,NOTEQUALS,0x0000) | |
| 279 | PORT_DIPSETTING( 0x0000, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,NOTEQUALS,0x0000) | |
| 280 | 280 | PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW2:5" ) /* Listed as "Unused" */ |
| 281 | 281 | PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW2:6" ) /* Listed as "Unused" */ |
| 282 | 282 | PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW2:7" ) /* Listed as "Unused" */ |
| r15082 | r15083 | |
|---|---|---|
| 130 | 130 | |
| 131 | 131 | READ8_MEMBER(lvcards_state::payout_r) |
| 132 | 132 | { |
| 133 | m_result = i | |
| 133 | m_result = iop | |
| 134 | 134 | |
| 135 | 135 | if (m_payout) |
| 136 | 136 | { |
| r15082 | r15083 | |
|---|---|---|
| 381 | 381 | |
| 382 | 382 | READ16_MEMBER(tx1_state::dipswitches_r) |
| 383 | 383 | { |
| 384 | return (i | |
| 384 | return (iop | |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | /* |
| r15082 | r15083 | |
| 417 | 417 | |
| 418 | 418 | WRITE8_MEMBER(tx1_state::tx1_ppi_latch_w) |
| 419 | 419 | { |
| 420 | m_ppi_latch_a = ((input_port_read(machine(), "AN_BRAKE") & 0xf) << 4) | (input_port_read(machine(), "AN_ACCELERATOR") & 0xf); | |
| 421 | m_ppi_latch_b = input_port_read(machine(), "AN_STEERING"); | |
| 420 | m_ppi_latch_a = ((ioport("AN_BRAKE")->read() & 0xf) << 4) | (ioport("AN_ACCELERATOR")->read() & 0xf); | |
| 421 | m_ppi_latch_b = ioport("AN_STEERING")->read(); | |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | static READ8_DEVICE_HANDLER( tx1_ppi_porta_r ) |
| r15082 | r15083 | |
| 430 | 430 | static READ8_DEVICE_HANDLER( tx1_ppi_portb_r ) |
| 431 | 431 | { |
| 432 | 432 | tx1_state *state = device->machine().driver_data<tx1_state>(); |
| 433 | return | |
| 433 | return s | |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | |
| r15082 | r15083 | |
| 446 | 446 | READ8_MEMBER(tx1_state::bb_analog_r) |
| 447 | 447 | { |
| 448 | 448 | if (offset == 0) |
| 449 | return bit_reverse8(((i | |
| 449 | return bit_reverse8(((iop | |
| 450 | 450 | else |
| 451 | return bit_reverse8((i | |
| 451 | return bit_reverse8((iop | |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | READ8_MEMBER(tx1_state::bbjr_analog_r) |
| 455 | 455 | { |
| 456 | 456 | if (offset == 0) |
| 457 | return ((i | |
| 457 | return ((iop | |
| 458 | 458 | else |
| 459 | return (i | |
| 459 | return (iop | |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 |
| r15082 | r15083 | |
|---|---|---|
| 300 | 300 | |
| 301 | 301 | sprintf(port, "R%d", m_keylatch); |
| 302 | 302 | |
| 303 | data = BIT(i | |
| 303 | data = BIT(ioport(port)->read( | |
| 304 | 304 | |
| 305 | 305 | return data; |
| 306 | 306 | } |
| r15082 | r15083 | |
| 359 | 359 | |
| 360 | 360 | READ8_MEMBER(thayers_state::dsw_b_r) |
| 361 | 361 | { |
| 362 | return (i | |
| 362 | return (iop | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | READ8_MEMBER(thayers_state::laserdsc_data_r) |
| r15082 | r15083 | |
| 764 | 764 | state->m_cart_present = 0; |
| 765 | 765 | state->m_pr7820_enter = 0; |
| 766 | 766 | |
| 767 | // newtype = (i | |
| 767 | // newtype = (state->iop | |
| 768 | 768 | // laserdisc_set_type(state->m_laserdisc, newtype); |
| 769 | 769 | } |
| 770 | 770 |
| r15082 | r15083 | |
|---|---|---|
| 220 | 220 | UINT16 x = 0; |
| 221 | 221 | int rlen; |
| 222 | 222 | |
| 223 | gfx[0] = device->machine().root_device().memregion("gfx1")->base(); | |
| 224 | gfx[1] = device->machine().root_device().memregion("gfx2")->base(); | |
| 223 | gfx[0] = state->memregion("gfx1")->base(); | |
| 224 | gfx[1] = state->memregion("gfx2")->base(); | |
| 225 | 225 | rlen = state->memregion("gfx2")->bytes(); |
| 226 | 226 | |
| 227 | 227 | //ma = ma ^ 0x7ff; |
| r15082 | r15083 | |
|---|---|---|
| 598 | 598 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_bank(0x5700, 0x57ff, "bank8"); |
| 599 | 599 | |
| 600 | 600 | // setup default banks |
| 601 | state->membank("bank1")->set_base(machine.root_device().memregion("user1")->base() + 0x100*0 ); | |
| 602 | state->membank("bank2")->set_base(machine.root_device().memregion("user1")->base() + 0x100*1 ); | |
| 603 | state->membank("bank3")->set_base(machine.root_device().memregion("user1")->base() + 0x100*2 ); | |
| 604 | state->membank("bank4")->set_base(machine.root_device().memregion("user1")->base() + 0x100*3 ); | |
| 605 | state->membank("bank5")->set_base(machine.root_device().memregion("user1")->base() + 0x100*4 ); | |
| 606 | state->membank("bank6")->set_base(machine.root_device().memregion("user1")->base() + 0x100*5 ); | |
| 607 | state->membank("bank7")->set_base(machine.root_device().memregion("user1")->base() + 0x100*6 ); | |
| 601 | state->membank("bank1")->set_base(state->memregion("user1")->base() + 0x100*0 ); | |
| 602 | state->membank("bank2")->set_base(state->memregion("user1")->base() + 0x100*1 ); | |
| 603 | state->membank("bank3")->set_base(state->memregion("user1")->base() + 0x100*2 ); | |
| 604 | state->membank("bank4")->set_base(state->memregion("user1")->base() + 0x100*3 ); | |
| 605 | state->membank("bank5")->set_base(state->memregion("user1")->base() + 0x100*4 ); | |
| 606 | state->membank("bank6")->set_base(state->memregion("user1")->base() + 0x100*5 ); | |
| 607 | state->membank("bank7")->set_base(state->memregion("user1")->base() + 0x100*6 ); | |
| 608 | 608 | state->membank("bank8")->set_base(state->memregion("user1")->base() + 0x100*7 ); |
| 609 | 609 | } |
| 610 | 610 |
| r15082 | r15083 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | READ8_MEMBER(ssrj_state::ssrj_wheel_r) |
| 47 | 47 | { |
| 48 | int port = i | |
| 48 | int port = iop | |
| 49 | 49 | int retval = port - m_oldport; |
| 50 | 50 | |
| 51 | 51 | m_oldport = port; |
| r15082 | r15083 | |
|---|---|---|
| 74 | 74 | READ16_MEMBER(blstroid_state::inputs_r) |
| 75 | 75 | { |
| 76 | 76 | static const char *const iptnames[] = { "IN0", "IN1" }; |
| 77 | int temp = i | |
| 77 | int temp = iop | |
| 78 | 78 | |
| 79 | 79 | if (m_cpu_to_sound_ready) temp ^= 0x0040; |
| 80 | 80 | if (atarigen_get_hblank(*machine().primary_screen)) temp ^= 0x0010; |
| r15082 | r15083 | |
| 135 | 135 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 136 | 136 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 137 | 137 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 138 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 138 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 139 | 139 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 140 | 140 | PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) |
| 141 | 141 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 146 | 146 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 147 | 147 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 148 | 148 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 149 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 149 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 150 | 150 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 151 | 151 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 152 | 152 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 65 | 65 | READ8_MEMBER(cchance_state::input_1_r) |
| 66 | 66 | { |
| 67 | 67 | |
| 68 | return (m_hop_io) | (m_bell_io) | (i | |
| 68 | return (m_hop_io) | (m_bell_io) | (iop | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | WRITE8_MEMBER(cchance_state::output_1_w) |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | READ16_MEMBER(aztarac_state::joystick_r) |
| 65 | 65 | { |
| 66 | return (((input_port_read(machine(), "STICKZ") - 0xf) << 8) | | |
| 67 | ((input_port_read(machine(), "STICKY") - 0xf) & 0xff)); | |
| 66 | return (((ioport("STICKZ")->read() - 0xf) << 8) | | |
| 67 | ((ioport("STICKY")->read() - 0xf) & 0xff)); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 |
| r15082 | r15083 | |
|---|---|---|
| 686 | 686 | PORT_START("IN0") /* 600000 */ |
| 687 | 687 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) /* diagnostic switch */ |
| 688 | 688 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 689 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 689 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 690 | 690 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 691 | 691 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 692 | 692 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 742 | 742 | PORT_START("IN0") /* 600000 */ |
| 743 | 743 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) /* diagnostic switch */ |
| 744 | 744 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 745 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 745 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 746 | 746 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 747 | 747 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 748 | 748 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 798 | 798 | PORT_START("IN0") /* 60c000 */ |
| 799 | 799 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) /* diagnostic switch */ |
| 800 | 800 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 801 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 801 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 802 | 802 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 803 | 803 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 804 | 804 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 860 | 860 | PORT_START("IN0") /* 60c000 */ |
| 861 | 861 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 862 | 862 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 863 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 863 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 864 | 864 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 865 | 865 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 866 | 866 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 922 | 922 | PORT_START("IN0") /* 60c000 */ |
| 923 | 923 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 924 | 924 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 925 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 925 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 926 | 926 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 927 | 927 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 928 | 928 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 985 | 985 | PORT_START("IN0") /* 60c000 */ |
| 986 | 986 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 987 | 987 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 988 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 988 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 989 | 989 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 990 | 990 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 991 | 991 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
| 1048 | 1048 | PORT_START("IN0") /* 60c000 */ |
| 1049 | 1049 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1050 | 1050 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* HBLANK */ |
| 1051 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1051 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1052 | 1052 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 12-bit EOC */ |
| 1053 | 1053 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 8-bit EOC */ |
| 1054 | 1054 | PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) |
| r15082 | r15083 | |
|---|---|---|
| 201 | 201 | switch(m_igs_magic[0]) |
| 202 | 202 | { |
| 203 | 203 | case 0x00: |
| 204 | if ( !(m_igs_magic[1] & 0x01) ) return input_port_read(machine(), "DSW1"); | |
| 205 | if ( !(m_igs_magic[1] & 0x02) ) return input_port_read(machine(), "DSW2"); | |
| 206 | if ( !(m_igs_magic[1] & 0x04) ) return input_port_read(machine(), "DSW3"); | |
| 207 | if ( !(m_igs_magic[1] & 0x08) ) return input_port_read(machine(), "DSW4"); | |
| 208 | if ( !(m_igs_magic[1] & 0x10) ) return input_port_read(machine(), "DSW5"); | |
| 204 | if ( !(m_igs_magic[1] & 0x01) ) return ioport("DSW1")->read(); | |
| 205 | if ( !(m_igs_magic[1] & 0x02) ) return ioport("DSW2")->read(); | |
| 206 | if ( !(m_igs_magic[1] & 0x04) ) return ioport("DSW3")->read(); | |
| 207 | if ( !(m_igs_magic[1] & 0x08) ) return ioport("DSW4")->read(); | |
| 208 | if ( !(m_igs_magic[1] & 0x10) ) return ioport("DSW5")->read(); | |
| 209 | 209 | logerror("%06x: warning, reading dsw with igs_magic[1] = %02x\n", cpu_get_pc(&space.device()), m_igs_magic[1]); |
| 210 | 210 | break; |
| 211 | 211 |
| r15082 | r15083 | |
|---|---|---|
| 261 | 261 | |
| 262 | 262 | for (t = 0 ; t < 8 ; t ++) |
| 263 | 263 | { |
| 264 | if (!(in | |
| 264 | if (!(machine.root_device().ioport | |
| 265 | 265 | { |
| 266 | 266 | return (i + t) | (p_side ? 0x20 : 0x00); |
| 267 | 267 | } |
| r15082 | r15083 | |
| 313 | 313 | return iox_key_matrix_calc(machine(),(iox.mux == 2) ? 0 : 4); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | return i | |
| 316 | return iop | |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | READ8_MEMBER(srmp2_state::iox_status_r) |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | READ16_MEMBER(snk68_state::control_1_r) |
| 65 | 65 | { |
| 66 | return (i | |
| 66 | return (iop | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | READ16_MEMBER(snk68_state::control_2_r) |
| 70 | 70 | { |
| 71 | return i | |
| 71 | return iop | |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | READ16_MEMBER(snk68_state::rotary_1_r) |
| 75 | 75 | { |
| 76 | return (( ~(1 << i | |
| 76 | return (( ~(1 << iop | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | READ16_MEMBER(snk68_state::rotary_2_r) |
| 80 | 80 | { |
| 81 | return (( ~(1 << i | |
| 81 | return (( ~(1 << iop | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | READ16_MEMBER(snk68_state::rotary_lsb_r) |
| 85 | 85 | { |
| 86 | return ((( ~(1 << input_port_read(machine(), "ROT2")) ) <<4)&0xf000) | |
| 87 | + ((( ~(1 << input_port_read(machine(), "ROT1")) ) )&0x0f00); | |
| 86 | return ((( ~(1 << ioport("ROT2")->read()) ) <<4)&0xf000) | |
| 87 | + ((( ~(1 << ioport("ROT1")->read()) ) )&0x0f00); | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | READ16_MEMBER(snk68_state::protcontrols_r) |
| 91 | 91 | { |
| 92 | 92 | static const char *const portnames[] = { "P1", "P2", "SYSTEM" }; |
| 93 | 93 | |
| 94 | return i | |
| 94 | return iop | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | WRITE16_MEMBER(snk68_state::protection_w) |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | { |
| 228 | 228 | aeroboto_state *state = machine.driver_data<aeroboto_state>(); |
| 229 | 229 | |
| 230 | state->m_stars_rom = | |
| 230 | state->m_stars_rom = sta | |
| 231 | 231 | state->m_stars_length = state->memregion("gfx2")->bytes(); |
| 232 | 232 | |
| 233 | 233 | state->save_item(NAME(state->m_disable_irq)); |
| r15082 | r15083 | |
|---|---|---|
| 143 | 143 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet )) PORT_DIPLOCATION("SW:8") |
| 144 | 144 | PORT_DIPSETTING( 0x00, DEF_STR( Upright )) |
| 145 | 145 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail )) |
| 146 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 146 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 147 | 147 | |
| 148 | 148 | PORT_START("PLAYER2") |
| 149 | 149 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| r15082 | r15083 | |
|---|---|---|
| 503 | 503 | |
| 504 | 504 | for( axis = 0; axis < 2; axis++ ) |
| 505 | 505 | { |
| 506 | value = i | |
| 506 | value = iop | |
| 507 | 507 | diff = value - m_trackball_prev[ axis ]; |
| 508 | 508 | m_trackball_prev[ axis ] = value; |
| 509 | 509 | m_trackball_data[ axis ] = ( ( diff & 0xf00 ) << 16 ) | ( ( diff & 0xff ) << 8 ); |
| r15082 | r15083 | |
| 595 | 595 | |
| 596 | 596 | for( axis = 0; axis < 4; axis++ ) |
| 597 | 597 | { |
| 598 | value = i | |
| 598 | value = iop | |
| 599 | 599 | diff = value - m_btc_trackball_prev[ axis ]; |
| 600 | 600 | m_btc_trackball_prev[ axis ] = value; |
| 601 | 601 | m_btc_trackball_data[ axis ] = ( ( diff & 0xf00 ) << 16 ) | ( ( diff & 0xff ) << 8 ); |
| r15082 | r15083 | |
|---|---|---|
| 192 | 192 | /* the following only works in the bootleg version, which doesn't have an */ |
| 193 | 193 | /* 8751 - the real thing is much more complicated than that. */ |
| 194 | 194 | UINT8 coin = 0; |
| 195 | UINT8 port = i | |
| 195 | UINT8 port = iop | |
| 196 | 196 | |
| 197 | 197 | if (cpu_get_pc(&space.device()) == 0x1188) |
| 198 | 198 | return ~m_coin_command_pending; |
| r15082 | r15083 | |
| 454 | 454 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 455 | 455 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 456 | 456 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 457 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 457 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 458 | 458 | |
| 459 | 459 | PORT_START("DSW0") /* DSW0 */ |
| 460 | 460 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") |
| r15082 | r15083 | |
| 593 | 593 | static MACHINE_START( firetrap ) |
| 594 | 594 | { |
| 595 | 595 | firetrap_state *state = machine.driver_data<firetrap_state>(); |
| 596 | UINT8 *MAIN = | |
| 596 | UINT8 *MAIN = sta | |
| 597 | 597 | UINT8 *SOUND = state->memregion("audiocpu")->base(); |
| 598 | 598 | |
| 599 | 599 | state->m_maincpu = machine.device("maincpu"); |
| r15082 | r15083 | |
|---|---|---|
| 250 | 250 | { |
| 251 | 251 | UINT8 coin_mux; |
| 252 | 252 | |
| 253 | coin_mux = ((i | |
| 253 | coin_mux = ((iop | |
| 254 | 254 | |
| 255 | return (i | |
| 255 | return (iop | |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | static ADDRESS_MAP_START( mcu_io_map, AS_IO, 8, thedeep_state ) |
| r15082 | r15083 | |
| 416 | 416 | { |
| 417 | 417 | if (state->m_protection_command != 0x59) |
| 418 | 418 | { |
| 419 | int coins = | |
| 419 | int coins = | |
| 420 | 420 | if (coins & 1) state->m_protection_data = 1; |
| 421 | 421 | else if (coins & 2) state->m_protection_data = 2; |
| 422 | 422 | else if (coins & 4) state->m_protection_data = 3; |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | READ16_MEMBER(oneshot_state::oneshot_in0_word_r) |
| 43 | 43 | { |
| 44 | int data = i | |
| 44 | int data = iop | |
| 45 | 45 | |
| 46 | 46 | switch (data & 0x0c) |
| 47 | 47 | { |
| r15082 | r15083 | |
|---|---|---|
| 137 | 137 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 138 | 138 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 139 | 139 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 140 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK | |
| 140 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 141 | 141 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 142 | 142 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) /* eeprom */ |
| 143 | 143 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 295 | 295 | case 2: /* I/O port 2 */ |
| 296 | 296 | case 3: /* System Port 0 */ |
| 297 | 297 | case 4: /* System Port 1 */ |
| 298 | r = i | |
| 298 | r = iop | |
| 299 | 299 | break; |
| 300 | 300 | |
| 301 | 301 | case 5: /* Parallel data port */ |
| r15082 | r15083 | |
| 331 | 331 | 0x02 = EEPCLK |
| 332 | 332 | 0x01 = EEPDI |
| 333 | 333 | */ |
| 334 | i | |
| 334 | iop | |
| 335 | 335 | cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); |
| 336 | 336 | mame_printf_debug("System register 0 = %02X\n", data); |
| 337 | 337 | break; |
| r15082 | r15083 | |
| 352 | 352 | if (data & 0x40) /* CG Board 0 IRQ Ack */ |
| 353 | 353 | cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE); |
| 354 | 354 | set_cgboard_id((data >> 4) & 3); |
| 355 | i | |
| 355 | iop | |
| 356 | 356 | mame_printf_debug("System register 1 = %02X\n", data); |
| 357 | 357 | break; |
| 358 | 358 | |
| r15082 | r15083 | |
| 647 | 647 | switch (input) |
| 648 | 648 | { |
| 649 | 649 | case ADC083X_CH0: |
| 650 | return (double)(5 * | |
| 650 | return (double)(5 * | |
| 651 | 651 | case ADC083X_CH1: |
| 652 | return (double)(5 * | |
| 652 | return (double)(5 * | |
| 653 | 653 | case ADC083X_CH2: |
| 654 | return (double)(5 * | |
| 654 | return (double)(5 * | |
| 655 | 655 | case ADC083X_CH3: |
| 656 | 656 | return 0; |
| 657 | 657 | case ADC083X_COM: |
| r15082 | r15083 | |
| 838 | 838 | state->m_led_reg0 = state->m_led_reg1 = 0x7f; |
| 839 | 839 | state->m_ccu_vcth = state->m_ccu_vctl = 0; |
| 840 | 840 | |
| 841 | K001005_preprocess_texture_data( | |
| 841 | K001005_preprocess_texture_data(sta | |
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | static DRIVER_INIT(zr107) |
| r15082 | r15083 | |
|---|---|---|
| 597 | 597 | READ32_MEMBER(ksys573_state::jamma_r) |
| 598 | 598 | { |
| 599 | 599 | int security_cart_number = m_security_cart_number; |
| 600 | UINT32 data = i | |
| 600 | UINT32 data = iop | |
| 601 | 601 | data |= 0x000000c0; |
| 602 | 602 | |
| 603 | 603 | ds2401_device *ds2401 = machine().device<ds2401_device>(security_cart_number ? "game_id" : "install_id"); |
| r15082 | r15083 | |
| 1233 | 1233 | } |
| 1234 | 1234 | } |
| 1235 | 1235 | |
| 1236 | in | |
| 1236 | machine().root_device().ioport("OUT1")->write_safe( | |
| 1237 | 1237 | } |
| 1238 | 1238 | |
| 1239 | 1239 | READ32_MEMBER(ksys573_state::security_r) |
| r15082 | r15083 | |
| 1366 | 1366 | static void update_mode( running_machine &machine ) |
| 1367 | 1367 | { |
| 1368 | 1368 | ksys573_state *state = machine.driver_data<ksys573_state>(); |
| 1369 | int cart = input_port_read(machine, "CART"); | |
| 1370 | int cd = input_port_read( machine, "CD" ); | |
| 1369 | int cart = state->ioport("CART")->read(); | |
| 1370 | int cd = state->ioport( "CD" )->read(); | |
| 1371 | 1371 | SCSIInstance *new_cdrom; |
| 1372 | 1372 | |
| 1373 | 1373 | if( state->machine().device<device_secure_serial_flash>("game_eeprom") ) |
| r15082 | r15083 | |
| 1489 | 1489 | switch (offset) |
| 1490 | 1490 | { |
| 1491 | 1491 | case 0x26: |
| 1492 | upd4701_y_add(upd4701, 0, input_port_read_safe(machine(), "uPD4701_y", 0), 0xffff); | |
| 1493 | upd4701_switches_set(upd4701, 0, input_port_read_safe(machine(), "uPD4701_switches", 0)); | |
| 1492 | upd4701_y_add(upd4701, 0, ioport("uPD4701_y")->read_safe(0), 0xffff); | |
| 1493 | upd4701_switches_set(upd4701, 0, ioport("uPD4701_switches")->read_safe(0)); | |
| 1494 | 1494 | |
| 1495 | 1495 | upd4701_cs_w(upd4701, 0, 0); |
| 1496 | 1496 | upd4701_xy_w(upd4701, 0, 1); |
| r15082 | r15083 | |
| 1758 | 1758 | CUSTOM_INPUT_MEMBER(ksys573_state::gn845pwbb_read) |
| 1759 | 1759 | { |
| 1760 | 1760 | |
| 1761 | return i | |
| 1761 | return iop | |
| 1762 | 1762 | } |
| 1763 | 1763 | |
| 1764 | 1764 | static void gn845pwbb_output_callback( running_machine &machine, int offset, int data ) |
| r15082 | r15083 | |
| 2717 | 2717 | { |
| 2718 | 2718 | ksys573_state *state = device->machine().driver_data<ksys573_state>(); |
| 2719 | 2719 | double *pad_position = state->m_pad_position; |
| 2720 | int pads = | |
| 2720 | int pads = s | |
| 2721 | 2721 | for( int i = 0; i < 6; i++ ) |
| 2722 | 2722 | { |
| 2723 | 2723 | if( ( pads & ( 1 << i ) ) != 0 ) |
| r15082 | r15083 | |
| 3004 | 3004 | switch( offset ) |
| 3005 | 3005 | { |
| 3006 | 3006 | case 0x20: |
| 3007 | data = i | |
| 3007 | data = iop | |
| 3008 | 3008 | break; |
| 3009 | 3009 | |
| 3010 | 3010 | case 0x22: |
| 3011 | data = i | |
| 3011 | data = i | |
| 3012 | 3012 | break; |
| 3013 | 3013 | |
| 3014 | 3014 | case 0x34: |
| 3015 | data = i | |
| 3015 | data = iop | |
| 3016 | 3016 | popmessage( "encoder %04x", data ); |
| 3017 | 3017 | break; |
| 3018 | 3018 | } |
| r15082 | r15083 | |
| 3035 | 3035 | switch (input) |
| 3036 | 3036 | { |
| 3037 | 3037 | case ADC083X_CH0: |
| 3038 | return (double)( 5 * | |
| 3038 | return (double)( 5 * | |
| 3039 | 3039 | case ADC083X_CH1: |
| 3040 | return (double)( 5 * | |
| 3040 | return (double)( 5 * | |
| 3041 | 3041 | case ADC083X_CH2: |
| 3042 | return (double)( 5 * | |
| 3042 | return (double)( 5 * | |
| 3043 | 3043 | case ADC083X_CH3: |
| 3044 | return (double)( 5 * | |
| 3044 | return (double)( 5 * | |
| 3045 | 3045 | case ADC083X_AGND: |
| 3046 | 3046 | return 0; |
| 3047 | 3047 | case ADC083X_VREF: |
| r15082 | r15083 | |
|---|---|---|
| 142 | 142 | /* on the VBLANK, read the pot and schedule an interrupt time for it */ |
| 143 | 143 | if (scanline == machine.primary_screen->visible_area().max_y + 1) |
| 144 | 144 | { |
| 145 | UINT8 potvalue = i | |
| 145 | UINT8 potvalue = state->iop | |
| 146 | 146 | state->m_pot_timer->adjust(machine.primary_screen->time_until_pos(56 + (potvalue / 2), (potvalue % 2) * 128)); |
| 147 | 147 | } |
| 148 | 148 | |
| r15082 | r15083 | |
| 173 | 173 | |
| 174 | 174 | /* DIP switches are selected by ADR0+ADR1 if ADR3 == 0 */ |
| 175 | 175 | if ((offset & 0x0b) == 0x00) |
| 176 | result &= (i | |
| 176 | result &= (iop | |
| 177 | 177 | if ((offset & 0x0b) == 0x01) |
| 178 | result &= (i | |
| 178 | result &= (iop | |
| 179 | 179 | if ((offset & 0x0b) == 0x02) |
| 180 | result &= (i | |
| 180 | result &= (iop | |
| 181 | 181 | if ((offset & 0x0b) == 0x03) |
| 182 | result &= (i | |
| 182 | result &= (iop | |
| 183 | 183 | |
| 184 | 184 | /* other switches are selected by ADR0+ADR1+ADR2 if ADR4 == 0 */ |
| 185 | 185 | if ((offset & 0x17) == 0x00) |
| 186 | result &= (i | |
| 186 | result &= (iop | |
| 187 | 187 | if ((offset & 0x17) == 0x04) |
| 188 | 188 | result &= ((m_pot_trigger[0] & ~m_pot_mask[0]) << 7) | 0x7f; |
| 189 | 189 | if ((offset & 0x17) == 0x05) |
| 190 | 190 | result &= ((m_pot_trigger[1] & ~m_pot_mask[1]) << 7) | 0x7f; |
| 191 | 191 | if ((offset & 0x17) == 0x06) |
| 192 | result &= i | |
| 192 | result &= iop | |
| 193 | 193 | if ((offset & 0x17) == 0x07) |
| 194 | result &= (i | |
| 194 | result &= (iop | |
| 195 | 195 | |
| 196 | 196 | return result; |
| 197 | 197 | } |
| r15082 | r15083 | |
| 398 | 398 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 399 | 399 | PORT_DIPNAME( 0x70, 0x00, "Extended Play" ) |
| 400 | 400 | /* Progressive */ |
| 401 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 402 | PORT_DIPSETTING( 0x20, "400" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 403 | PORT_DIPSETTING( 0x30, "600" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 404 | PORT_DIPSETTING( 0x40, "900" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 405 | PORT_DIPSETTING( 0x50, "1200" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 406 | PORT_DIPSETTING( 0x60, "1600" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 407 | PORT_DIPSETTING( 0x70, "2000" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x00) | |
| 401 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 402 | PORT_DIPSETTING( 0x20, "400" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 403 | PORT_DIPSETTING( 0x30, "600" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 404 | PORT_DIPSETTING( 0x40, "900" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 405 | PORT_DIPSETTING( 0x50, "1200" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 406 | PORT_DIPSETTING( 0x60, "1600" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 407 | PORT_DIPSETTING( 0x70, "2000" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x00) | |
| 408 | 408 | /* Double */ |
| 409 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 410 | PORT_DIPSETTING( 0x20, "400" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 411 | PORT_DIPSETTING( 0x30, "600" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 412 | PORT_DIPSETTING( 0x40, "800" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 413 | PORT_DIPSETTING( 0x50, "1000" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 414 | PORT_DIPSETTING( 0x60, "1200" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 415 | PORT_DIPSETTING( 0x70, "1500" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x02) | |
| 409 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 410 | PORT_DIPSETTING( 0x20, "400" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 411 | PORT_DIPSETTING( 0x30, "600" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 412 | PORT_DIPSETTING( 0x40, "800" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 413 | PORT_DIPSETTING( 0x50, "1000" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 414 | PORT_DIPSETTING( 0x60, "1200" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 415 | PORT_DIPSETTING( 0x70, "1500" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) | |
| 416 | 416 | /* Cavity */ |
| 417 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 418 | PORT_DIPSETTING( 0x20, "300" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 419 | PORT_DIPSETTING( 0x30, "400" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 420 | PORT_DIPSETTING( 0x40, "700" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 421 | PORT_DIPSETTING( 0x50, "900" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 422 | PORT_DIPSETTING( 0x60, "1100" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 423 | PORT_DIPSETTING( 0x70, "1400" ) PORT_CONDITION("SELECT",0x03,PORTCOND_EQUALS,0x01) | |
| 417 | PORT_DIPSETTING( 0x10, "200" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 418 | PORT_DIPSETTING( 0x20, "300" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 419 | PORT_DIPSETTING( 0x30, "400" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 420 | PORT_DIPSETTING( 0x40, "700" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 421 | PORT_DIPSETTING( 0x50, "900" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 422 | PORT_DIPSETTING( 0x60, "1100" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 423 | PORT_DIPSETTING( 0x70, "1400" ) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) | |
| 424 | 424 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 425 | 425 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Lives ) ) |
| 426 | 426 | PORT_DIPSETTING( 0x80, "3" ) |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | static const char *const port[] = { "TRACKBALL_P1_1", "TRACKBALL_P1_2", "TRACKBALL_P2_1", "TRACKBALL_P1_2" }; |
| 60 | 60 | int curr, delta; |
| 61 | 61 | |
| 62 | curr = i | |
| 62 | curr = iop | |
| 63 | 63 | delta = (curr - m_last_track[offset]) & 0xff; |
| 64 | 64 | m_last_track[offset] = curr; |
| 65 | 65 |
| r15082 | r15083 | |
|---|---|---|
| 274 | 274 | int res2; |
| 275 | 275 | int res3; |
| 276 | 276 | |
| 277 | res1 = input_port_read(machine(), "IN3"); | |
| 278 | res2 = input_port_read(machine(), "IN4"); | |
| 279 | res3 = input_port_read_safe(machine(), "DSW2", 0); | |
| 277 | res1 = ioport("IN3")->read(); | |
| 278 | res2 = ioport("IN4")->read(); | |
| 279 | res3 = ioport("DSW2")->read_safe(0); | |
| 280 | 280 | res = 0x00; |
| 281 | 281 | |
| 282 | 282 | switch (offset & 0x07) |
| r15082 | r15083 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | static READ8_DEVICE_HANDLER (re_psg_portA_r) |
| 110 | 110 | { |
| 111 | if (( | |
| 111 | if (( | |
| 112 | 112 | { |
| 113 | 113 | output_set_lamp_value(0,1); // Operator Key ON |
| 114 | 114 | } |
| r15082 | r15083 | |
| 118 | 118 | output_set_lamp_value(0,0); // Operator Key OFF |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | return | |
| 121 | return | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | static READ8_DEVICE_HANDLER (re_psg_portB_r) |
| r15082 | r15083 | |
| 130 | 130 | |
| 131 | 131 | output_set_lamp_value(state->m_player,1); |
| 132 | 132 | |
| 133 | if ( | |
| 133 | if (s | |
| 134 | 134 | { |
| 135 | 135 | if (!state->m_stat_a) |
| 136 | 136 | { |
| r15082 | r15083 | |
| 161 | 161 | /* "INA": Unified port to share the player Keys among all players - Key In & Key Out have their own buttons on keyboard. */ |
| 162 | 162 | switch( state->m_mux_data ) |
| 163 | 163 | { |
| 164 | case 0x01: retval = (input_port_read(device->machine(), "IN6") | 0x80 ) - (( state->m_player == 6 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 6 */ | |
| 165 | case 0x02: retval = (input_port_read(device->machine(), "IN5") | 0x80 ) - (( state->m_player == 5 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 5 */ | |
| 166 | case 0x04: retval = (input_port_read(device->machine(), "IN4") | 0x80 ) - (( state->m_player == 4 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 4 */ | |
| 167 | case 0x08: retval = (input_port_read(device->machine(), "IN3") | 0x80 ) - (( state->m_player == 3 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 3 */ | |
| 168 | case 0x10: retval = (input_port_read(device->machine(), "IN2") | 0x80 ) - (( state->m_player == 2 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 2 */ | |
| 169 | case 0x20: retval = (input_port_read(device->machine(), "IN1") | 0x80 ) - (( state->m_player == 1 ) ? (input_port_read(device->machine(), "INA") | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 1 */ | |
| 164 | case 0x01: retval = (state->ioport("IN6")->read() | 0x80 ) - (( state->m_player == 6 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 6 */ | |
| 165 | case 0x02: retval = (state->ioport("IN5")->read() | 0x80 ) - (( state->m_player == 5 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 5 */ | |
| 166 | case 0x04: retval = (state->ioport("IN4")->read() | 0x80 ) - (( state->m_player == 4 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 4 */ | |
| 167 | case 0x08: retval = (state->ioport("IN3")->read() | 0x80 ) - (( state->m_player == 3 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 3 */ | |
| 168 | case 0x10: retval = (state->ioport("IN2")->read() | 0x80 ) - (( state->m_player == 2 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 2 */ | |
| 169 | case 0x20: retval = (state->ioport("IN1")->read() | 0x80 ) - (( state->m_player == 1 ) ? (state->ioport("INA")->read() | 0x80 ) ^ 0xff: 0x00 ); break; /* Player 1 */ | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | return retval; |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | READ8_DEVICE_HANDLER( zwackery_port_2_r ) |
| 71 | 71 | { |
| 72 | int result = input_port_read(device->machine(), "IN2"); | |
| 73 | int wheel = input_port_read(device->machine(), "IN5"); | |
| 72 | int result = device->machine().root_device().ioport("IN2")->read(); | |
| 73 | int wheel = device->machine().root_device().ioport("IN5")->read(); | |
| 74 | 74 | |
| 75 | 75 | return result | ((wheel >> 2) & 0x3e); |
| 76 | 76 | } |
| r15082 | r15083 | |
| 131 | 131 | READ16_MEMBER(mcr68_state::spyhunt2_port_0_r) |
| 132 | 132 | { |
| 133 | 133 | static const char *const portnames[] = { "AN1", "AN2", "AN3", "AN4" }; |
| 134 | int result = i | |
| 134 | int result = iop | |
| 135 | 135 | int which = (m_control_word >> 3) & 3; |
| 136 | int analog = i | |
| 136 | int analog = iop | |
| 137 | 137 | |
| 138 | 138 | return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8); |
| 139 | 139 | } |
| r15082 | r15083 | |
| 141 | 141 | |
| 142 | 142 | READ16_MEMBER(mcr68_state::spyhunt2_port_1_r) |
| 143 | 143 | { |
| 144 | int result = i | |
| 144 | int result = iop | |
| 145 | 145 | return result | ((m_turbo_chip_squeak->read(space, 0) & 1) << 7); |
| 146 | 146 | } |
| 147 | 147 | |
| r15082 | r15083 | |
| 194 | 194 | |
| 195 | 195 | READ16_MEMBER(mcr68_state::archrivl_port_1_r) |
| 196 | 196 | { |
| 197 | return (translate49[input_port_read(machine(), "49WAYY2") >> 4] << 12) | | |
| 198 | (translate49[input_port_read(machine(), "49WAYX2") >> 4] << 8) | | |
| 199 | (translate49[input_port_read(machine(), "49WAYY1") >> 4] << 4) | | |
| 200 | (translate49[input_port_read(machine(), "49WAYX1") >> 4] << 0); | |
| 197 | return (translate49[ioport("49WAYY2")->read() >> 4] << 12) | | |
| 198 | (translate49[ioport("49WAYX2")->read() >> 4] << 8) | | |
| 199 | (translate49[ioport("49WAYY1")->read() >> 4] << 4) | | |
| 200 | (translate49[ioport("49WAYX1")->read() >> 4] << 0); | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | |
| r15082 | r15083 | |
| 256 | 256 | READ16_MEMBER(mcr68_state::pigskin_port_1_r) |
| 257 | 257 | { |
| 258 | 258 | /* see archrivl_port_1_r for 49-way joystick description */ |
| 259 | return input_port_read(machine(), "IN1") | | |
| 260 | (translate49[input_port_read(machine(), "49WAYX1") >> 4] << 12) | | |
| 261 | (translate49[input_port_read(machine(), "49WAYY1") >> 4] << 8); | |
| 259 | return ioport("IN1")->read() | | |
| 260 | (translate49[ioport("49WAYX1")->read() >> 4] << 12) | | |
| 261 | (translate49[ioport("49WAYY1")->read() >> 4] << 8); | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | |
| 265 | 265 | READ16_MEMBER(mcr68_state::pigskin_port_2_r) |
| 266 | 266 | { |
| 267 | 267 | /* see archrivl_port_1_r for 49-way joystick description */ |
| 268 | return input_port_read(machine(), "DSW") | | |
| 269 | (translate49[input_port_read(machine(), "49WAYX2") >> 4] << 12) | | |
| 270 | (translate49[input_port_read(machine(), "49WAYY2") >> 4] << 8); | |
| 268 | return ioport("DSW")->read() | | |
| 269 | (translate49[ioport("49WAYX2")->read() >> 4] << 12) | | |
| 270 | (translate49[ioport("49WAYY2")->read() >> 4] << 8); | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | |
| r15082 | r15083 | |
| 280 | 280 | |
| 281 | 281 | READ16_MEMBER(mcr68_state::trisport_port_1_r) |
| 282 | 282 | { |
| 283 | int xaxis = (INT8)input_port_read(machine(), "AN1"); | |
| 284 | int yaxis = (INT8)input_port_read(machine(), "AN2"); | |
| 285 | int result = input_port_read(machine(), "IN1"); | |
| 283 | int xaxis = (INT8)ioport("AN1")->read(); | |
| 284 | int yaxis = (INT8)ioport("AN2")->read(); | |
| 285 | int result = ioport("IN1")->read(); | |
| 286 | 286 | |
| 287 | 287 | result |= (xaxis & 0x3c) << 6; |
| 288 | 288 | result |= (yaxis & 0x3c) << 10; |
| r15082 | r15083 | |
|---|---|---|
| 70 | 70 | /* bit 0 is data */ |
| 71 | 71 | /* bit 1 is clock (active high) */ |
| 72 | 72 | /* bit 2 is cs (active low) */ |
| 73 | i | |
| 73 | iop | |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 |
| r15082 | r15083 | |
|---|---|---|
| 97 | 97 | { |
| 98 | 98 | switch(offset*2) |
| 99 | 99 | { |
| 100 | case 0x00: return input_port_read(machine(),"COIN1"); | |
| 101 | case 0x04: return input_port_read(machine(),"UNK1"); | |
| 102 | case 0x06: return input_port_read(machine(),"UNK2"); | |
| 103 | case 0x08: return input_port_read(machine(),"SERVICE1"); | |
| 104 | case 0x0a: return input_port_read(machine(),"SERVICE2");//probably not a button, remote? | |
| 105 | case 0x0c: return input_port_read(machine(),"PAYOUT"); | |
| 106 | case 0x0e: return input_port_read(machine(),"START2"); | |
| 107 | case 0x10: return input_port_read(machine(),"HOLD3"); | |
| 108 | case 0x12: return input_port_read(machine(),"HOLD4"); | |
| 109 | case 0x14: return input_port_read(machine(),"HOLD2"); | |
| 110 | case 0x16: return input_port_read(machine(),"HOLD1"); | |
| 111 | case 0x18: return input_port_read(machine(),"HOLD5"); | |
| 112 | case 0x1a: return input_port_read(machine(),"START1"); | |
| 113 | case 0x1c: return input_port_read(machine(),"BET"); | |
| 100 | case 0x00: return ioport("COIN1")->read(); | |
| 101 | case 0x04: return ioport("UNK1")->read(); | |
| 102 | case 0x06: return ioport("UNK2")->read(); | |
| 103 | case 0x08: return ioport("SERVICE1")->read(); | |
| 104 | case 0x0a: return ioport("SERVICE2")->read();//probably not a button, remote? | |
| 105 | case 0x0c: return ioport("PAYOUT")->read(); | |
| 106 | case 0x0e: return ioport("START2")->read(); | |
| 107 | case 0x10: return ioport("HOLD3")->read(); | |
| 108 | case 0x12: return ioport("HOLD4")->read(); | |
| 109 | case 0x14: return ioport("HOLD2")->read(); | |
| 110 | case 0x16: return ioport("HOLD1")->read(); | |
| 111 | case 0x18: return ioport("HOLD5")->read(); | |
| 112 | case 0x1a: return ioport("START1")->read(); | |
| 113 | case 0x1c: return ioport("BET")->read(); | |
| 114 | 114 | case 0x1e: return 0xff; //ticket motor |
| 115 | 115 | case 0x20: return 0xff; //hopper motor |
| 116 | 116 | case 0x2c: return machine().device<eeprom_device>("eeprom")->read_bit(); |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) |
| 153 | 153 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 154 | 154 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 155 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 155 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 156 | 156 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL |
| 157 | 157 | INPUT_PORTS_END |
| 158 | 158 | |
| r15082 | r15083 | |
| 194 | 194 | |
| 195 | 195 | PORT_START("P2") |
| 196 | 196 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) |
| 197 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK | |
| 197 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 198 | 198 | INPUT_PORTS_END |
| 199 | 199 | |
| 200 | 200 |
| r15082 | r15083 | |
|---|---|---|
| 153 | 153 | static int gsword_coins_in(void) |
| 154 | 154 | { |
| 155 | 155 | /* emulate 8741 coin slot */ |
| 156 | if (in | |
| 156 | if (machine.root_device().ioport | |
| 157 | 157 | { |
| 158 | 158 | logerror("Coin In\n"); |
| 159 | 159 | return 0x80; |
| r15082 | r15083 | |
| 191 | 191 | switch (offset) |
| 192 | 192 | { |
| 193 | 193 | case 0x01: /* start button , coins */ |
| 194 | return | |
| 194 | return | |
| 195 | 195 | case 0x02: /* Player 1 Controller */ |
| 196 | return | |
| 196 | return | |
| 197 | 197 | case 0x04: /* Player 2 Controller */ |
| 198 | return | |
| 198 | return | |
| 199 | 199 | // default: |
| 200 | 200 | // logerror("8741-2 unknown read %d PC=%04x\n",offset,cpu_get_pc(&space->device())); |
| 201 | 201 | } |
| r15082 | r15083 | |
| 208 | 208 | switch (offset) |
| 209 | 209 | { |
| 210 | 210 | case 0x01: /* start button */ |
| 211 | return | |
| 211 | return | |
| 212 | 212 | case 0x02: /* Player 1 Controller? */ |
| 213 | return | |
| 213 | return | |
| 214 | 214 | case 0x04: /* Player 2 Controller? */ |
| 215 | return | |
| 215 | return | |
| 216 | 216 | } |
| 217 | 217 | /* unknown */ |
| 218 | 218 | // logerror("8741-3 unknown read %d PC=%04x\n",offset,cpu_get_pc(&space->device())); |
| r15082 | r15083 | |
|---|---|---|
| 418 | 418 | PORT_DIPSETTING( 0x0080, DEF_STR( Hard ) ) |
| 419 | 419 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) |
| 420 | 420 | PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:8,7") |
| 421 | PORT_DIPSETTING( 0x0200, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 422 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 423 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 424 | PORT_DIPSETTING( 0x0100, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 425 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 426 | PORT_DIPSETTING( 0x0100, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 427 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 428 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 421 | PORT_DIPSETTING( 0x0200, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 422 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 423 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 424 | PORT_DIPSETTING( 0x0100, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 425 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 426 | PORT_DIPSETTING( 0x0100, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 427 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 428 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 429 | 429 | PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:6,5") |
| 430 | PORT_DIPSETTING( 0x0800, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 431 | PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 432 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 433 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_NOTEQUALS,0x00) | |
| 434 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 435 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 436 | PORT_DIPSETTING( 0x0400, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 437 | PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,PORTCOND_EQUALS,0x00) | |
| 430 | PORT_DIPSETTING( 0x0800, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 431 | PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 432 | PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 433 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW",0x4000,NOTEQUALS,0x00) | |
| 434 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 435 | PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 436 | PORT_DIPSETTING( 0x0400, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 437 | PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW",0x4000,EQUALS,0x00) | |
| 438 | 438 | PORT_DIPUNUSED_DIPLOC( 0x1000, IP_ACTIVE_LOW, "SW2:4" ) // See notes |
| 439 | 439 | PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") |
| 440 | 440 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | #include "includes/nbmj8900.h" |
| 33 | 33 | |
| 34 | 34 | |
| 35 | #define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC | |
| 36 | #if SIGNED_DAC | |
| 37 | #define DAC_WRITE dac_signed_w | |
| 38 | #else | |
| 39 | #define DAC_WRITE dac_w | |
| 40 | #endif | |
| 41 | ||
| 42 | ||
| 43 | ||
| 44 | ||
| 45 | 35 | static DRIVER_INIT( ohpaipee ) |
| 46 | 36 | { |
| 47 | 37 | #if 0 |
| r15082 | r15083 | |
| 71 | 61 | #endif |
| 72 | 62 | |
| 73 | 63 | nb1413m3_type = NB1413M3_OHPAIPEE; |
| 74 | ||
| 75 | // init_nb1413m3(machine); | |
| 76 | 64 | } |
| 77 | 65 | |
| 78 | 66 | static DRIVER_INIT( togenkyo ) |
| r15082 | r15083 | |
| 103 | 91 | #endif |
| 104 | 92 | |
| 105 | 93 | nb1413m3_type = NB1413M3_TOGENKYO; |
| 106 | ||
| 107 | //S init_nb1413m3(machine); | |
| 108 | 94 | } |
| 109 | 95 | |
| 110 | 96 | |
| r15082 | r15083 | |
| 139 | 125 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 140 | 126 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| 141 | 127 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(nb1413m3_inputport3_r) |
| 142 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", | |
| 128 | AM_RANGE(0xd0, 0xd0) AM_DEVWRITE_LEGACY("dac", dac_w | |
| 143 | 129 | AM_RANGE(0xe0, 0xe0) AM_WRITE(nbmj8900_vramsel_w) |
| 144 | 130 | AM_RANGE(0xf0, 0xf0) AM_READ_LEGACY(nb1413m3_dipsw1_r) |
| 145 | 131 | AM_RANGE(0xf1, 0xf1) AM_READWRITE_LEGACY(nb1413m3_dipsw2_r, nb1413m3_outcoin_w) |
| r15082 | r15083 | |
| 341 | 327 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 342 | 328 | |
| 343 | 329 | MCFG_SOUND_ADD("ymsnd", YM3812, 2500000) |
| 344 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0. | |
| 330 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) | |
| 345 | 331 | |
| 346 | 332 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 347 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 333 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 348 | 334 | MACHINE_CONFIG_END |
| 349 | 335 | |
| 350 | ||
| 351 | 336 | static MACHINE_CONFIG_DERIVED( togenkyo, ohpaipee ) |
| 352 | 337 | |
| 353 | 338 | /* basic machine hardware */ |
| r15082 | r15083 | |
| 356 | 341 | MACHINE_CONFIG_END |
| 357 | 342 | |
| 358 | 343 | |
| 359 | ||
| 360 | 344 | ROM_START( ohpaipee ) |
| 361 | 345 | ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ |
| 362 | 346 | ROM_LOAD( "02.3h", 0x00000, 0x10000, CRC(2b6c9afc) SHA1(591a7016ebd99d4a2bfdef5e99da3a1ac9d30d75) ) |
| r15082 | r15083 | |
|---|---|---|
| 54 | 54 | /* bit 3 is clock (active high) */ |
| 55 | 55 | /* bit 4 is cs (active low) */ |
| 56 | 56 | /* bit 5 is enabled in IRQ3, disabled in IRQ5 (sprite DMA start?) */ |
| 57 | i | |
| 57 | iop | |
| 58 | 58 | } |
| 59 | 59 | if (ACCESSING_BITS_8_15) |
| 60 | 60 | { |
| r15082 | r15083 | |
|---|---|---|
| 240 | 240 | PORT_BIT ( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 241 | 241 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 242 | 242 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_TILT ) |
| 243 | PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 243 | PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 244 | 244 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 245 | 245 | |
| 246 | 246 | PORT_START("IN1") |
| r15082 | r15083 | |
| 310 | 310 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 311 | 311 | PORT_BIT ( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 312 | 312 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 313 | PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 313 | PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 314 | 314 | INPUT_PORTS_END |
| 315 | 315 | |
| 316 | 316 | |
| r15082 | r15083 | |
| 387 | 387 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused on schematics */ |
| 388 | 388 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_TILT ) |
| 389 | 389 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 390 | PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 390 | PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 391 | 391 | |
| 392 | 392 | PORT_START("DSW1") |
| 393 | 393 | PORT_DIPNAME( 0x07, 0x00, "Time per coin" ) PORT_DIPLOCATION("SW1:1,2,3") |
| r15082 | r15083 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | READ8_MEMBER(wink_state::analog_port_r) |
| 97 | 97 | { |
| 98 | return i | |
| 98 | return iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | READ8_MEMBER(wink_state::player_inputs_r) |
| 102 | 102 | { |
| 103 | return i | |
| 103 | return iop | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | WRITE8_MEMBER(wink_state::sound_irq_w) |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | static const char *const gunnames[] = { "LIGHT0_X", "LIGHT0_Y", "LIGHT1_X", "LIGHT1_Y" }; |
| 175 | 175 | |
| 176 | 176 | /* a = 1, 2 = player # */ |
| 177 | #define GUNX( a ) (( ( input_port_read(machine(), gunnames[2 * (a - 1)]) * 287 ) / 0xff ) + 16) | |
| 178 | #define GUNY( a ) (( ( input_port_read(machine(), gunnames[2 * (a - 1) + 1]) * 223 ) / 0xff ) + 10) | |
| 177 | #define GUNX( a ) (( ( ioport(gunnames[2 * (a - 1)])->read() * 287 ) / 0xff ) + 16) | |
| 178 | #define GUNY( a ) (( ( ioport(gunnames[2 * (a - 1) + 1])->read() * 223 ) / 0xff ) + 10) | |
| 179 | 179 | |
| 180 | 180 | static const eeprom_interface eeprom_intf = |
| 181 | 181 | { |
| r15082 | r15083 | |
| 200 | 200 | |
| 201 | 201 | m_cur_control2 = data; |
| 202 | 202 | |
| 203 | i | |
| 203 | iop | |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | static INTERRUPT_GEN(lethalen_interrupt) |
| r15082 | r15083 | |
|---|---|---|
| 238 | 238 | |
| 239 | 239 | READ8_MEMBER(exprraid_state::vblank_r) |
| 240 | 240 | { |
| 241 | return i | |
| 241 | return iop | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, exprraid_state ) |
| r15082 | r15083 | |
| 288 | 288 | |
| 289 | 289 | static INPUT_PORTS_START( exprraid ) |
| 290 | 290 | PORT_START("IN0") /* 0x3800 */ |
| 291 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 291 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 292 | 292 | |
| 293 | 293 | PORT_START("DSW0") /* 0x1800 */ |
| 294 | 294 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") |
| 295 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 296 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 297 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 298 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 299 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 300 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 301 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 302 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 295 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 296 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 297 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 298 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 299 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 300 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 301 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 302 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 303 | 303 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4") |
| 304 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 305 | PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 306 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 307 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 308 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 309 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x00) | |
| 310 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 311 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,PORTCOND_EQUALS,0x10) | |
| 304 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 305 | PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 306 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 307 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 308 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 309 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x00) | |
| 310 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 311 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW0",0x10,EQUALS,0x10) | |
| 312 | 312 | PORT_DIPNAME( 0x10, 0x10, "Coin Mode" ) PORT_DIPLOCATION("SW1:5") /* see notes */ |
| 313 | 313 | PORT_DIPSETTING( 0x10, "Mode 1" ) |
| 314 | 314 | PORT_DIPSETTING( 0x00, "Mode 2" ) |
| r15082 | r15083 | |
| 451 | 451 | { |
| 452 | 452 | exprraid_state *state = device->machine().driver_data<exprraid_state>(); |
| 453 | 453 | |
| 454 | if ((~ | |
| 454 | if ((~s | |
| 455 | 455 | { |
| 456 | 456 | if (state->m_coin == 0) |
| 457 | 457 | { |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | switch(offset) |
| 75 | 75 | { |
| 76 | case 0x0/2: return i | |
| 76 | case 0x0/2: return iop | |
| 77 | 77 | case 0x2/2: |
| 78 | 78 | { |
| 79 | int arm_pwr = i | |
| 79 | int arm_pwr = iop | |
| 80 | 80 | //popmessage("PC=%08x %02x",cpu_get_pc(&space.device()),arm_pwr); |
| 81 | 81 | |
| 82 | 82 | if(arm_pwr > 0xe0) return ~0x1800; |
| r15082 | r15083 | |
| 86 | 86 | else return ~0x0000; |
| 87 | 87 | } |
| 88 | 88 | case 0x4/2: return (m_defender_sensor) | (m_shutter_sensor); |
| 89 | case 0xe/2: return i | |
| 89 | case 0xe/2: return iop | |
| 90 | 90 | // default: printf("PC=%08x [%04x] -> %04x R\n", cpu_get_pc(&space.device()), offset * 2, m_iodata[offset]); |
| 91 | 91 | } |
| 92 | 92 |
| r15082 | r15083 | |
|---|---|---|
| 112 | 112 | |
| 113 | 113 | READ8_MEMBER(naughtyb_state::in0_port_r) |
| 114 | 114 | { |
| 115 | int in0 = i | |
| 115 | int in0 = iop | |
| 116 | 116 | |
| 117 | 117 | if ( m_cocktail ) |
| 118 | 118 | { |
| 119 | 119 | // cabinet == cocktail -AND- handling player 2 |
| 120 | 120 | |
| 121 | 121 | in0 = ( in0 & 0x03 ) | // start buttons |
| 122 | ( i | |
| 122 | ( iop | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return in0; |
| r15082 | r15083 | |
| 129 | 129 | { |
| 130 | 130 | // vblank replaces the cabinet dip |
| 131 | 131 | |
| 132 | return ( ( input_port_read(machine(), "DSW0") & 0x7F ) | // dsw0 | |
| 133 | ( input_port_read(machine(), "FAKE") & 0x80 ) ); // vblank | |
| 132 | return ( ( ioport("DSW0")->read() & 0x7F ) | // dsw0 | |
| 133 | ( ioport("FAKE")->read() & 0x80 ) ); // vblank | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /* Pop Flamer |
| r15082 | r15083 | |
| 331 | 331 | PORT_START( "FAKE" ) |
| 332 | 332 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, naughtyb_state,coin_inserted, 0) |
| 333 | 333 | // when reading DSW0, bit 7 doesn't read cabinet, but vblank |
| 334 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 334 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 335 | 335 | INPUT_PORTS_END |
| 336 | 336 | |
| 337 | 337 | static INPUT_PORTS_START( trvmstr ) |
| r15082 | r15083 | |
| 379 | 379 | PORT_START( "FAKE" ) |
| 380 | 380 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, naughtyb_state,coin_inserted, 0) |
| 381 | 381 | // when reading DSW0, bit 7 doesn't read cabinet, but vblank |
| 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 383 | 383 | INPUT_PORTS_END |
| 384 | 384 | |
| 385 | 385 |
| r15082 | r15083 | |
|---|---|---|
| 515 | 515 | { |
| 516 | 516 | switch( m_input_selector ) |
| 517 | 517 | { |
| 518 | case 0x01: return input_port_read(machine(), "IN0-1"); | |
| 519 | case 0x02: return input_port_read(machine(), "IN0-2"); | |
| 520 | case 0x04: return input_port_read(machine(), "IN0-3"); | |
| 521 | case 0x08: return input_port_read(machine(), "IN0-4"); | |
| 522 | case 0x10: return input_port_read(machine(), "IN0-5"); | |
| 523 | case 0x20: return input_port_read(machine(), "IN0-6"); | |
| 518 | case 0x01: return ioport("IN0-1")->read(); | |
| 519 | case 0x02: return ioport("IN0-2")->read(); | |
| 520 | case 0x04: return ioport("IN0-3")->read(); | |
| 521 | case 0x08: return ioport("IN0-4")->read(); | |
| 522 | case 0x10: return ioport("IN0-5")->read(); | |
| 523 | case 0x20: return ioport("IN0-6")->read(); | |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 754 | 754 | { |
| 755 | 755 | if( state->m_b_lastclock ) |
| 756 | 756 | { |
| 757 | int bit = ( ( i | |
| 757 | int bit = ( ( state->iop | |
| 758 | 758 | psx_sio_input( machine, 0, PSX_SIO_IN_DATA, bit * PSX_SIO_IN_DATA ); |
| 759 | 759 | state->m_n_dip_bit++; |
| 760 | 760 | state->m_n_dip_bit &= 7; |
| r15082 | r15083 | |
| 866 | 866 | |
| 867 | 867 | switch(m_mux_data) |
| 868 | 868 | { |
| 869 | case 0x04: return input_port_read(machine(), "KEY0"); | |
| 870 | case 0x08: return input_port_read(machine(), "KEY1"); | |
| 871 | case 0x40: return input_port_read(machine(), "KEY2"); | |
| 872 | case 0x80: return input_port_read(machine(), "KEY3"); | |
| 869 | case 0x04: return ioport("KEY0")->read(); | |
| 870 | case 0x08: return ioport("KEY1")->read(); | |
| 871 | case 0x40: return ioport("KEY2")->read(); | |
| 872 | case 0x80: return ioport("KEY3")->read(); | |
| 873 | 873 | } |
| 874 | 874 | |
| 875 | 875 | /* mux disabled */ |
| 876 | return i | |
| 876 | return iop | |
| 877 | 877 | } |
| 878 | 878 | |
| 879 | 879 | // Init and reset |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | |
| 175 | 175 | READ32_MEMBER(gunbustr_state::gunbustr_gun_r) |
| 176 | 176 | { |
| 177 | return ( input_port_read(machine(), "LIGHT0_X") << 24) | (input_port_read(machine(), "LIGHT0_Y") << 16) | | |
| 178 | ( input_port_read(machine(), "LIGHT1_X") << 8) | input_port_read(machine(), "LIGHT1_Y"); | |
| 177 | return ( ioport("LIGHT0_X")->read() << 24) | (ioport("LIGHT0_Y")->read() << 16) | | |
| 178 | ( ioport("LIGHT1_X")->read() << 8) | ioport("LIGHT1_Y")->read(); | |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | WRITE32_MEMBER(gunbustr_state::gunbustr_gun_w) |
| r15082 | r15083 | |
|---|---|---|
| 1046 | 1046 | x0000000 (unused) */ |
| 1047 | 1047 | |
| 1048 | 1048 | COMBINE_DATA(&m_eep_latch); |
| 1049 | i | |
| 1049 | iop | |
| 1050 | 1050 | break; |
| 1051 | 1051 | |
| 1052 | 1052 | default: |
| r15082 | r15083 | |
| 1065 | 1065 | |
| 1066 | 1066 | UINT8 port = tc0220ioc_port_r(m_tc0220ioc, 0); /* read port number */ |
| 1067 | 1067 | int steer = 0; |
| 1068 | int fake = i | |
| 1068 | int fake = iop | |
| 1069 | 1069 | |
| 1070 | 1070 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1071 | 1071 | { |
| 1072 | 1072 | /* center around zero and reduce span to 0xc0 */ |
| 1073 | steer = ((i | |
| 1073 | steer = ((iop | |
| 1074 | 1074 | |
| 1075 | 1075 | } |
| 1076 | 1076 | else /* Digital steer */ |
| r15082 | r15083 | |
| 1105 | 1105 | |
| 1106 | 1106 | UINT8 port = tc0220ioc_port_r(m_tc0220ioc, 0); /* read port number */ |
| 1107 | 1107 | int steer = 0; |
| 1108 | int fake = i | |
| 1108 | int fake = iop | |
| 1109 | 1109 | |
| 1110 | 1110 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1111 | 1111 | { |
| 1112 | 1112 | /* center around zero */ |
| 1113 | steer = i | |
| 1113 | steer = iop | |
| 1114 | 1114 | } |
| 1115 | 1115 | else /* Digital steer */ |
| 1116 | 1116 | { |
| r15082 | r15083 | |
| 1127 | 1127 | switch (port) |
| 1128 | 1128 | { |
| 1129 | 1129 | case 0x08: |
| 1130 | return i | |
| 1130 | return iop | |
| 1131 | 1131 | |
| 1132 | 1132 | case 0x09: |
| 1133 | return i | |
| 1133 | return iop | |
| 1134 | 1134 | |
| 1135 | 1135 | case 0x0a: |
| 1136 | return i | |
| 1136 | return iop | |
| 1137 | 1137 | |
| 1138 | 1138 | case 0x0b: |
| 1139 | return i | |
| 1139 | return iop | |
| 1140 | 1140 | |
| 1141 | 1141 | case 0x0c: |
| 1142 | 1142 | return steer & 0xff; |
| r15082 | r15083 | |
| 1155 | 1155 | switch (offset) |
| 1156 | 1156 | { |
| 1157 | 1157 | case 0x00: |
| 1158 | return i | |
| 1158 | return iop | |
| 1159 | 1159 | |
| 1160 | 1160 | case 0x01: |
| 1161 | return i | |
| 1161 | return iop | |
| 1162 | 1162 | |
| 1163 | 1163 | case 0x02: |
| 1164 | return i | |
| 1164 | return iop | |
| 1165 | 1165 | |
| 1166 | 1166 | case 0x03: |
| 1167 | return i | |
| 1167 | return iop | |
| 1168 | 1168 | } |
| 1169 | 1169 | |
| 1170 | 1170 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n", cpu_get_pc(&space.device()), offset); |
| r15082 | r15083 | |
| 1178 | 1178 | switch (offset) |
| 1179 | 1179 | { |
| 1180 | 1180 | case 0x00: |
| 1181 | return i | |
| 1181 | return iop | |
| 1182 | 1182 | |
| 1183 | 1183 | case 0x01: |
| 1184 | return i | |
| 1184 | return iop | |
| 1185 | 1185 | |
| 1186 | 1186 | case 0x02: |
| 1187 | return i | |
| 1187 | return iop | |
| 1188 | 1188 | |
| 1189 | 1189 | case 0x03: |
| 1190 | return i | |
| 1190 | return iop | |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | 1193 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n", cpu_get_pc(&space.device()), offset); |
| r15082 | r15083 | |
| 1210 | 1210 | READ16_MEMBER(taitoz_state::sci_steer_input_r) |
| 1211 | 1211 | { |
| 1212 | 1212 | int steer = 0; |
| 1213 | int fake = i | |
| 1213 | int fake = iop | |
| 1214 | 1214 | |
| 1215 | 1215 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1216 | 1216 | { |
| 1217 | 1217 | /* center around zero and reduce span to 0xc0 */ |
| 1218 | steer = ((i | |
| 1218 | steer = ((iop | |
| 1219 | 1219 | } |
| 1220 | 1220 | else /* Digital steer */ |
| 1221 | 1221 | { |
| r15082 | r15083 | |
| 1262 | 1262 | switch (offset) |
| 1263 | 1263 | { |
| 1264 | 1264 | case 0x00: |
| 1265 | return i | |
| 1265 | return iop | |
| 1266 | 1266 | |
| 1267 | 1267 | case 0x01: |
| 1268 | return i | |
| 1268 | return iop | |
| 1269 | 1269 | |
| 1270 | 1270 | case 0x02: |
| 1271 | return i | |
| 1271 | return iop | |
| 1272 | 1272 | |
| 1273 | 1273 | case 0x03: |
| 1274 | return i | |
| 1274 | return iop | |
| 1275 | 1275 | } |
| 1276 | 1276 | |
| 1277 | 1277 | return 0x00; |
| r15082 | r15083 | |
| 1300 | 1300 | READ16_MEMBER(taitoz_state::dblaxle_steer_input_r) |
| 1301 | 1301 | { |
| 1302 | 1302 | int steer = 0; |
| 1303 | int fake = i | |
| 1303 | int fake = iop | |
| 1304 | 1304 | |
| 1305 | 1305 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1306 | 1306 | { |
| 1307 | 1307 | /* center around zero and reduce span to 0x80 */ |
| 1308 | steer = ((i | |
| 1308 | steer = ((iop | |
| 1309 | 1309 | } |
| 1310 | 1310 | else /* Digital steer */ |
| 1311 | 1311 | { |
| r15082 | r15083 | |
|---|---|---|
| 116 | 116 | //6-down |
| 117 | 117 | //7-leftdwn |
| 118 | 118 | |
| 119 | UINT8 val= (i | |
| 119 | UINT8 val= (iop | |
| 120 | 120 | /* bit0 = left |
| 121 | 121 | bit1 = right |
| 122 | 122 | bit2 = down |
| r15082 | r15083 | |
|---|---|---|
| 426 | 426 | PORT_START("SW1") |
| 427 | 427 | PORT_DIPNAME( 0x3f, 0x09, "Prime Time Bonus" ) |
| 428 | 428 | // STANDARD TIME (no bonus) |
| 429 | PORT_DIPSETTING( 0x00, "0%" ) PORT_CONDITION("SW2", 0xc0, | |
| 429 | PORT_DIPSETTING( 0x00, "0%" ) PORT_CONDITION("SW2", 0xc0, | |
| 430 | 430 | // PRIME TIME (bonus) for 2 COINS |
| 431 | PORT_DIPSETTING( 0x07, "8%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 432 | PORT_DIPSETTING( 0x08, "17%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 433 | PORT_DIPSETTING( 0x09, "25%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 434 | PORT_DIPSETTING( 0x10, "33%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 435 | PORT_DIPSETTING( 0x11, "42%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 436 | PORT_DIPSETTING( 0x12, "50%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 437 | PORT_DIPSETTING( 0x13, "58%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 438 | PORT_DIPSETTING( 0x14, "67%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 439 | PORT_DIPSETTING( 0x15, "75%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 440 | PORT_DIPSETTING( 0x16, "83%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 441 | PORT_DIPSETTING( 0x17, "92%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 442 | PORT_DIPSETTING( 0x18, "100%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 431 | PORT_DIPSETTING( 0x07, "8%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 432 | PORT_DIPSETTING( 0x08, "17%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 433 | PORT_DIPSETTING( 0x09, "25%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 434 | PORT_DIPSETTING( 0x10, "33%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 435 | PORT_DIPSETTING( 0x11, "42%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 436 | PORT_DIPSETTING( 0x12, "50%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 437 | PORT_DIPSETTING( 0x13, "58%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 438 | PORT_DIPSETTING( 0x14, "67%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 439 | PORT_DIPSETTING( 0x15, "75%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 440 | PORT_DIPSETTING( 0x16, "83%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 441 | PORT_DIPSETTING( 0x17, "92%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 442 | PORT_DIPSETTING( 0x18, "100%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 443 | 443 | // PRIME TIME (bonus) for 4 COINS |
| 444 | PORT_DIPSETTING( 0x04, "8%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 445 | PORT_DIPSETTING( 0x05, "17%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 446 | PORT_DIPSETTING( 0x06, "25%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 447 | PORT_DIPSETTING( 0x07, "33%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 448 | PORT_DIPSETTING( 0x08, "42%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 449 | PORT_DIPSETTING( 0x09, "50%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 450 | PORT_DIPSETTING( 0x10, "58%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 451 | PORT_DIPSETTING( 0x11, "67%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 452 | PORT_DIPSETTING( 0x12, "75%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 453 | PORT_DIPSETTING( 0x13, "83%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 454 | PORT_DIPSETTING( 0x14, "92%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 455 | PORT_DIPSETTING( 0x15, "100%" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 444 | PORT_DIPSETTING( 0x04, "8%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 445 | PORT_DIPSETTING( 0x05, "17%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 446 | PORT_DIPSETTING( 0x06, "25%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 447 | PORT_DIPSETTING( 0x07, "33%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 448 | PORT_DIPSETTING( 0x08, "42%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 449 | PORT_DIPSETTING( 0x09, "50%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 450 | PORT_DIPSETTING( 0x10, "58%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 451 | PORT_DIPSETTING( 0x11, "67%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 452 | PORT_DIPSETTING( 0x12, "75%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 453 | PORT_DIPSETTING( 0x13, "83%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 454 | PORT_DIPSETTING( 0x14, "92%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 455 | PORT_DIPSETTING( 0x15, "100%" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 456 | 456 | |
| 457 | 457 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) |
| 458 | 458 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r15082 | r15083 | |
| 462 | 462 | PORT_START("SW2") |
| 463 | 463 | PORT_DIPNAME( 0x3f, 0x28, "Play Time/Coin" ) |
| 464 | 464 | // STANDARD TIME (no bonus) |
| 465 | PORT_DIPSETTING( 0x3f, DEF_STR( Free_Play ) ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 466 | PORT_DIPSETTING( 0x23, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 467 | PORT_DIPSETTING( 0x21, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 468 | PORT_DIPSETTING( 0x1f, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 469 | PORT_DIPSETTING( 0x1d, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 470 | PORT_DIPSETTING( 0x1b, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 471 | PORT_DIPSETTING( 0x19, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 472 | PORT_DIPSETTING( 0x17, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 473 | PORT_DIPSETTING( 0x15, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 474 | PORT_DIPSETTING( 0x13, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 475 | PORT_DIPSETTING( 0x11, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 476 | PORT_DIPSETTING( 0x0f, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 477 | PORT_DIPSETTING( 0x0d, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 478 | PORT_DIPSETTING( 0x0b, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 479 | PORT_DIPSETTING( 0x09, "4:10 (250)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 480 | PORT_DIPSETTING( 0x07, "4:20 (260)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 481 | PORT_DIPSETTING( 0x05, "4:30 (270)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 482 | PORT_DIPSETTING( 0x03, "4:40 (280)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 483 | PORT_DIPSETTING( 0x01, "4:50 (290)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0xc0 ) | |
| 465 | PORT_DIPSETTING( 0x3f, DEF_STR( Free_Play ) ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 466 | PORT_DIPSETTING( 0x23, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 467 | PORT_DIPSETTING( 0x21, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 468 | PORT_DIPSETTING( 0x1f, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 469 | PORT_DIPSETTING( 0x1d, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 470 | PORT_DIPSETTING( 0x1b, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 471 | PORT_DIPSETTING( 0x19, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 472 | PORT_DIPSETTING( 0x17, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 473 | PORT_DIPSETTING( 0x15, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 474 | PORT_DIPSETTING( 0x13, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 475 | PORT_DIPSETTING( 0x11, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 476 | PORT_DIPSETTING( 0x0f, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 477 | PORT_DIPSETTING( 0x0d, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 478 | PORT_DIPSETTING( 0x0b, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 479 | PORT_DIPSETTING( 0x09, "4:10 (250)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 480 | PORT_DIPSETTING( 0x07, "4:20 (260)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 481 | PORT_DIPSETTING( 0x05, "4:30 (270)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 482 | PORT_DIPSETTING( 0x03, "4:40 (280)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 483 | PORT_DIPSETTING( 0x01, "4:50 (290)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0xc0 ) | |
| 484 | 484 | // PRIME TIME (bonus) for 2 COINS |
| 485 | PORT_DIPSETTING( 0x1c, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 486 | PORT_DIPSETTING( 0x1e, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 487 | PORT_DIPSETTING( 0x20, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 488 | PORT_DIPSETTING( 0x22, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 489 | PORT_DIPSETTING( 0x24, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 490 | PORT_DIPSETTING( 0x26, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 491 | PORT_DIPSETTING( 0x28, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 492 | PORT_DIPSETTING( 0x2a, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 493 | PORT_DIPSETTING( 0x2c, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 494 | PORT_DIPSETTING( 0x2e, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 495 | PORT_DIPSETTING( 0x30, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 496 | PORT_DIPSETTING( 0x32, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 497 | PORT_DIPSETTING( 0x34, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x80 ) | |
| 485 | PORT_DIPSETTING( 0x1c, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 486 | PORT_DIPSETTING( 0x1e, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 487 | PORT_DIPSETTING( 0x20, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 488 | PORT_DIPSETTING( 0x22, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 489 | PORT_DIPSETTING( 0x24, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 490 | PORT_DIPSETTING( 0x26, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 491 | PORT_DIPSETTING( 0x28, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 492 | PORT_DIPSETTING( 0x2a, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 493 | PORT_DIPSETTING( 0x2c, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 494 | PORT_DIPSETTING( 0x2e, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 495 | PORT_DIPSETTING( 0x30, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 496 | PORT_DIPSETTING( 0x32, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 497 | PORT_DIPSETTING( 0x34, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x80 ) | |
| 498 | 498 | // PRIME TIME (bonus) for 4 COINS |
| 499 | PORT_DIPSETTING( 0x1c, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 500 | PORT_DIPSETTING( 0x1e, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 501 | PORT_DIPSETTING( 0x20, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 502 | PORT_DIPSETTING( 0x22, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 503 | PORT_DIPSETTING( 0x24, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 504 | PORT_DIPSETTING( 0x26, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 505 | PORT_DIPSETTING( 0x28, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 506 | PORT_DIPSETTING( 0x2a, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 507 | PORT_DIPSETTING( 0x2c, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 508 | PORT_DIPSETTING( 0x2e, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 509 | PORT_DIPSETTING( 0x30, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 510 | PORT_DIPSETTING( 0x32, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 511 | PORT_DIPSETTING( 0x34, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, PORTCOND_EQUALS, 0x00 ) | |
| 499 | PORT_DIPSETTING( 0x1c, "2:00 (120)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 500 | PORT_DIPSETTING( 0x1e, "2:10 (130)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 501 | PORT_DIPSETTING( 0x20, "2:20 (140)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 502 | PORT_DIPSETTING( 0x22, "2:30 (150)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 503 | PORT_DIPSETTING( 0x24, "2:40 (160)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 504 | PORT_DIPSETTING( 0x26, "2:50 (170)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 505 | PORT_DIPSETTING( 0x28, "3:00 (180)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 506 | PORT_DIPSETTING( 0x2a, "3:10 (190)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 507 | PORT_DIPSETTING( 0x2c, "3:20 (200)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 508 | PORT_DIPSETTING( 0x2e, "3:30 (210)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 509 | PORT_DIPSETTING( 0x30, "3:40 (220)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 510 | PORT_DIPSETTING( 0x32, "3:50 (230)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 511 | PORT_DIPSETTING( 0x34, "4:00 (240)" ) PORT_CONDITION("SW2", 0xc0, EQUALS, 0x00 ) | |
| 512 | 512 | |
| 513 | 513 | PORT_DIPNAME( 0xc0, 0x80, "Bonus" ) |
| 514 | 514 | PORT_DIPSETTING( 0xc0, "Standard Time" ) |
| r15082 | r15083 | |
|---|---|---|
| 1050 | 1050 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) |
| 1051 | 1051 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_7C ) ) |
| 1052 | 1052 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,5,6") |
| 1053 | PORT_DIPSETTING( 0x08, "30k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1054 | PORT_DIPSETTING( 0x30, "30k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1055 | PORT_DIPSETTING( 0x20, "30k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1056 | PORT_DIPSETTING( 0x38, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1057 | PORT_DIPSETTING( 0x18, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1058 | PORT_DIPSETTING( 0x28, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1059 | PORT_DIPSETTING( 0x10, "30k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1053 | PORT_DIPSETTING( 0x08, "30k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1054 | PORT_DIPSETTING( 0x30, "30k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1055 | PORT_DIPSETTING( 0x20, "30k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1056 | PORT_DIPSETTING( 0x38, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1057 | PORT_DIPSETTING( 0x18, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1058 | PORT_DIPSETTING( 0x28, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1059 | PORT_DIPSETTING( 0x10, "30k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x00) | |
| 1060 | 1060 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1061 | PORT_DIPSETTING( 0x10, "30k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) /* Manual shows 100k only, Test Mode shows 30k which is what we use */ | |
| 1062 | PORT_DIPSETTING( 0x38, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1063 | PORT_DIPSETTING( 0x20, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1064 | PORT_DIPSETTING( 0x30, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1065 | PORT_DIPSETTING( 0x08, "40k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1066 | PORT_DIPSETTING( 0x28, "40k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1067 | PORT_DIPSETTING( 0x18, "40k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x00) | |
| 1061 | PORT_DIPSETTING( 0x10, "30k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) /* Manual shows 100k only, Test Mode shows 30k which is what we use */ | |
| 1062 | PORT_DIPSETTING( 0x38, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1063 | PORT_DIPSETTING( 0x20, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1064 | PORT_DIPSETTING( 0x30, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1065 | PORT_DIPSETTING( 0x08, "40k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1066 | PORT_DIPSETTING( 0x28, "40k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1067 | PORT_DIPSETTING( 0x18, "40k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x00) | |
| 1068 | 1068 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7,8") |
| 1069 | 1069 | PORT_DIPSETTING( 0x80, "1" ) |
| 1070 | 1070 | PORT_DIPSETTING( 0x40, "2" ) |
| r15082 | r15083 | |
| 1089 | 1089 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) |
| 1090 | 1090 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_7C ) ) |
| 1091 | 1091 | PORT_DIPNAME( 0x38, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4,5,6") |
| 1092 | PORT_DIPSETTING( 0x20, "20k & 70k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1093 | PORT_DIPSETTING( 0x30, "20k, 70k & Every 70k" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1094 | PORT_DIPSETTING( 0x00, "30k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1095 | PORT_DIPSETTING( 0x18, "30k & 70k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1096 | PORT_DIPSETTING( 0x10, "30k & 80k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1097 | PORT_DIPSETTING( 0x28, "30k, 100k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1098 | PORT_DIPSETTING( 0x08, "30k & 100k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_NOTEQUALS,0x00) | |
| 1099 | PORT_DIPSETTING( 0x08, "30k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1100 | PORT_DIPSETTING( 0x00, "40k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1101 | PORT_DIPSETTING( 0x20, "30k & 80k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1102 | PORT_DIPSETTING( 0x30, "30k, 80k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1103 | PORT_DIPSETTING( 0x18, "30k & 100k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1104 | PORT_DIPSETTING( 0x10, "40k & 120k Only" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1105 | PORT_DIPSETTING( 0x28, "40k, 100k & Every 100k" ) PORT_CONDITION("DSW1",0xc0,PORTCOND_EQUALS,0x00) | |
| 1092 | PORT_DIPSETTING( 0x20, "20k & 70k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1093 | PORT_DIPSETTING( 0x30, "20k, 70k & Every 70k" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1094 | PORT_DIPSETTING( 0x00, "30k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1095 | PORT_DIPSETTING( 0x18, "30k & 70k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1096 | PORT_DIPSETTING( 0x10, "30k & 80k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1097 | PORT_DIPSETTING( 0x28, "30k, 100k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1098 | PORT_DIPSETTING( 0x08, "30k & 100k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) | |
| 1099 | PORT_DIPSETTING( 0x08, "30k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1100 | PORT_DIPSETTING( 0x00, "40k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1101 | PORT_DIPSETTING( 0x20, "30k & 80k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1102 | PORT_DIPSETTING( 0x30, "30k, 80k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1103 | PORT_DIPSETTING( 0x18, "30k & 100k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1104 | PORT_DIPSETTING( 0x10, "40k & 120k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1105 | PORT_DIPSETTING( 0x28, "40k, 100k & Every 100k" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) | |
| 1106 | 1106 | PORT_DIPSETTING( 0x38, DEF_STR( None ) ) |
| 1107 | 1107 | PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:7,8") |
| 1108 | 1108 | PORT_DIPSETTING( 0xc0, "1" ) |
| r15082 | r15083 | |
| 1228 | 1228 | PORT_DIPSETTING( 0x01, "4" ) |
| 1229 | 1229 | PORT_DIPSETTING( 0x00, "5" ) |
| 1230 | 1230 | PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3,4,5") |
| 1231 | PORT_DIPSETTING( 0x08, "20k & 80k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1232 | PORT_DIPSETTING( 0x10, "20k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1233 | PORT_DIPSETTING( 0x04, "30k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1234 | PORT_DIPSETTING( 0x18, "30k & 60k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1235 | PORT_DIPSETTING( 0x1c, "30k & 100k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1236 | // PORT_DIPSETTING( 0x14, "30k 100k" ) // repeated PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1237 | PORT_DIPSETTING( 0x0c, "30k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0x02,PORTCOND_NOTEQUALS,0x00) | |
| 1238 | PORT_DIPSETTING( 0x0c, "20k & 80k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1239 | PORT_DIPSETTING( 0x08, "30k" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1240 | PORT_DIPSETTING( 0x10, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1241 | PORT_DIPSETTING( 0x1c, "30k & 100k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1242 | // PORT_DIPSETTING( 0x14, "30k 100k" ) // repeated PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1243 | PORT_DIPSETTING( 0x18, "40k & 80k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1244 | PORT_DIPSETTING( 0x04, "100k Only" ) PORT_CONDITION("DSW2",0x02,PORTCOND_EQUALS,0x00) | |
| 1231 | PORT_DIPSETTING( 0x08, "20k & 80k Only" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1232 | PORT_DIPSETTING( 0x10, "20k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1233 | PORT_DIPSETTING( 0x04, "30k Only" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1234 | PORT_DIPSETTING( 0x18, "30k & 60k Only" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1235 | PORT_DIPSETTING( 0x1c, "30k & 100k Only" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1236 | // PORT_DIPSETTING( 0x14, "30k 100k" ) // repeated PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1237 | PORT_DIPSETTING( 0x0c, "30k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0x02,NOTEQUALS,0x00) | |
| 1238 | PORT_DIPSETTING( 0x0c, "20k & 80k Only" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1239 | PORT_DIPSETTING( 0x08, "30k" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1240 | PORT_DIPSETTING( 0x10, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1241 | PORT_DIPSETTING( 0x1c, "30k & 100k Only" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1242 | // PORT_DIPSETTING( 0x14, "30k 100k" ) // repeated PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1243 | PORT_DIPSETTING( 0x18, "40k & 80k Only" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1244 | PORT_DIPSETTING( 0x04, "100k Only" ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) | |
| 1245 | 1245 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1246 | 1246 | PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:6,7,8") |
| 1247 | 1247 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) |
| r15082 | r15083 | |
| 1308 | 1308 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 1309 | 1309 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) |
| 1310 | 1310 | PORT_DIPNAME( 0x38, 0x38, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,5,6") |
| 1311 | PORT_DIPSETTING( 0x18, "20k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1312 | PORT_DIPSETTING( 0x30, "20k & 60k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1313 | PORT_DIPSETTING( 0x38, "20k & 70k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1314 | PORT_DIPSETTING( 0x10, "20k, 70k & Every 70k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1315 | PORT_DIPSETTING( 0x28, "20k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1316 | PORT_DIPSETTING( 0x08, "20k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1317 | PORT_DIPSETTING( 0x20, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_NOTEQUALS,0x80) | |
| 1318 | PORT_DIPSETTING( 0x20, "30k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1319 | PORT_DIPSETTING( 0x38, "30k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1320 | PORT_DIPSETTING( 0x30, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1321 | PORT_DIPSETTING( 0x10, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1322 | PORT_DIPSETTING( 0x28, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1323 | PORT_DIPSETTING( 0x18, "40k Only" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1324 | PORT_DIPSETTING( 0x08, "40k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,PORTCOND_EQUALS,0x80) | |
| 1311 | PORT_DIPSETTING( 0x18, "20k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1312 | PORT_DIPSETTING( 0x30, "20k & 60k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1313 | PORT_DIPSETTING( 0x38, "20k & 70k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1314 | PORT_DIPSETTING( 0x10, "20k, 70k & Every 70k" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1315 | PORT_DIPSETTING( 0x28, "20k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1316 | PORT_DIPSETTING( 0x08, "20k, 80k & Every 80k" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1317 | PORT_DIPSETTING( 0x20, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,NOTEQUALS,0x80) | |
| 1318 | PORT_DIPSETTING( 0x20, "30k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1319 | PORT_DIPSETTING( 0x38, "30k & 80k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1320 | PORT_DIPSETTING( 0x30, "30k & 100k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1321 | PORT_DIPSETTING( 0x10, "30k, 100k & Every 100k" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1322 | PORT_DIPSETTING( 0x28, "30k & 120k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1323 | PORT_DIPSETTING( 0x18, "40k Only" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1324 | PORT_DIPSETTING( 0x08, "40k, 120k & Every 120k" ) PORT_CONDITION("DSW2",0xc0,EQUALS,0x80) | |
| 1325 | 1325 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 1326 | 1326 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7,8") |
| 1327 | 1327 | PORT_DIPSETTING( 0x40, "1" ) |
| r15082 | r15083 | |
| 1560 | 1560 | |
| 1561 | 1561 | ***************************************************************************/ |
| 1562 | 1562 | |
| 1563 | static READ8_DEVICE_HANDLER( dipA_l ) { return input_port_read(device->machine(), "DSW1"); } // dips A | |
| 1564 | static READ8_DEVICE_HANDLER( dipA_h ) { return input_port_read(device->machine(), "DSW1") >> 4; } // dips A | |
| 1563 | static READ8_DEVICE_HANDLER( dipA_l ) { return device->machine().root_device().ioport("DSW1")->read(); } // dips A | |
| 1564 | static READ8_DEVICE_HANDLER( dipA_h ) { return device->machine().root_device().ioport("DSW1")->read() >> 4; } // dips A | |
| 1565 | 1565 | |
| 1566 | 1566 | static READ8_DEVICE_HANDLER( dipB_mux ) // dips B |
| 1567 | 1567 | { |
| 1568 | 1568 | mappy_state *state = device->machine().driver_data<mappy_state>(); |
| 1569 | 1569 | |
| 1570 | return | |
| 1570 | return s | |
| 1571 | 1571 | } |
| 1572 | 1572 | |
| 1573 | 1573 | static READ8_DEVICE_HANDLER( dipB_muxi ) // dips B |
| r15082 | r15083 | |
| 1575 | 1575 | mappy_state *state = device->machine().driver_data<mappy_state>(); |
| 1576 | 1576 | |
| 1577 | 1577 | // bits are interleaved in Phozon |
| 1578 | return BITSWAP8( | |
| 1578 | return BITSWAP8(s | |
| 1579 | 1579 | } |
| 1580 | 1580 | |
| 1581 | 1581 | static WRITE8_DEVICE_HANDLER( out_mux ) |
| r15082 | r15083 | |
|---|---|---|
| 388 | 388 | PORT_DIPSETTING( 0x20, "5000" ) |
| 389 | 389 | PORT_DIPSETTING( 0x40, "7000" ) |
| 390 | 390 | PORT_DIPSETTING( 0x60, "9000" ) |
| 391 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 391 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 392 | 392 | INPUT_PORTS_END |
| 393 | 393 | |
| 394 | 394 |
| r15082 | r15083 | |
|---|---|---|
| 235 | 235 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 236 | 236 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 237 | 237 | PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW ) |
| 238 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_VBLANK | |
| 238 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 239 | 239 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 240 | 240 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 241 | 241 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) /* eeprom */ |
| r15082 | r15083 | |
|---|---|---|
| 170 | 170 | pntnpuzl_state *state = device->machine().driver_data<pntnpuzl_state>(); |
| 171 | 171 | /* bit 11 is EEPROM data */ |
| 172 | 172 | eeprom_device *eeprom = downcast<eeprom_device *>(device); |
| 173 | return (state->m_eeprom & 0xf4ff) | (eeprom->read_bit()<<11) | ( | |
| 173 | return (state->m_eeprom & 0xf4ff) | (eeprom->read_bit()<<11) | (s | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | static WRITE16_DEVICE_HANDLER( pntnpuzl_eeprom_w ) |
| r15082 | r15083 | |
| 241 | 241 | |
| 242 | 242 | if (m_serial_out == 0x11) |
| 243 | 243 | { |
| 244 | if (i | |
| 244 | if (iop | |
| 245 | 245 | { |
| 246 | 246 | m_touchscr[0] = 0x1b; |
| 247 | m_touchscr[2] = BITSWAP8(input_port_read(machine(), "TOUCHX"),0,1,2,3,4,5,6,7); | |
| 248 | m_touchscr[4] = BITSWAP8(input_port_read(machine(), "TOUCHY"),0,1,2,3,4,5,6,7); | |
| 247 | m_touchscr[2] = BITSWAP8(ioport("TOUCHX")->read(),0,1,2,3,4,5,6,7); | |
| 248 | m_touchscr[4] = BITSWAP8(ioport("TOUCHY")->read(),0,1,2,3,4,5,6,7); | |
| 249 | 249 | } |
| 250 | 250 | else |
| 251 | 251 | m_touchscr[0] = 0; |
| r15082 | r15083 | |
| 325 | 325 | |
| 326 | 326 | static INPUT_PORTS_START( pntnpuzl ) |
| 327 | 327 | PORT_START("IN0") /* fake inputs */ |
| 328 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 328 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 329 | 329 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 1) PORT_IMPULSE(1) |
| 330 | 330 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_HIGH )PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 2) PORT_IMPULSE(1) |
| 331 | 331 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 4) PORT_IMPULSE(1) |
| r15082 | r15083 | |
|---|---|---|
| 173 | 173 | { |
| 174 | 174 | UINT8 dsw_val; |
| 175 | 175 | |
| 176 | dsw_val = i | |
| 176 | dsw_val = iop | |
| 177 | 177 | |
| 178 | 178 | if ( BIT( offset, 7 ) == 0 ) |
| 179 | 179 | { |
| r15082 | r15083 | |
| 216 | 216 | uapce_state *state = machine.driver_data<uapce_state>(); |
| 217 | 217 | if ( state->m_jamma_if_control_latch & 0x10 ) |
| 218 | 218 | { |
| 219 | return i | |
| 219 | return state->iop | |
| 220 | 220 | } |
| 221 | 221 | else |
| 222 | 222 | { |
| 223 | return in | |
| 223 | return machine.root_device().ioport | |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 |
| r15082 | r15083 | |
|---|---|---|
| 555 | 555 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7", |
| 556 | 556 | "IN8", "IN9", "INA", "INB", "INC", "IND", "INE", "INF",}; |
| 557 | 557 | |
| 558 | return i | |
| 558 | return iop | |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | 561 | static ADDRESS_MAP_START(funkball_map, AS_PROGRAM, 32, funkball_state) |
| r15082 | r15083 | |
| 1118 | 1118 | static MACHINE_RESET( funkball ) |
| 1119 | 1119 | { |
| 1120 | 1120 | funkball_state *state = machine.driver_data<funkball_state>(); |
| 1121 | state->membank("bios_ext1")->set_base(machine.root_device().memregion("bios")->base() + 0x00000); | |
| 1122 | state->membank("bios_ext2")->set_base(machine.root_device().memregion("bios")->base() + 0x04000); | |
| 1123 | state->membank("bios_ext3")->set_base(machine.root_device().memregion("bios")->base() + 0x08000); | |
| 1124 | state->membank("bios_ext4")->set_base(machine.root_device().memregion("bios")->base() + 0x0c000); | |
| 1125 | state->membank("bios_bank1")->set_base(machine.root_device().memregion("bios")->base() + 0x10000); | |
| 1126 | state->membank("bios_bank2")->set_base(machine.root_device().memregion("bios")->base() + 0x14000); | |
| 1127 | state->membank("bios_bank3")->set_base(machine.root_device().memregion("bios")->base() + 0x18000); | |
| 1121 | state->membank("bios_ext1")->set_base(state->memregion("bios")->base() + 0x00000); | |
| 1122 | state->membank("bios_ext2")->set_base(state->memregion("bios")->base() + 0x04000); | |
| 1123 | state->membank("bios_ext3")->set_base(state->memregion("bios")->base() + 0x08000); | |
| 1124 | state->membank("bios_ext4")->set_base(state->memregion("bios")->base() + 0x0c000); | |
| 1125 | state->membank("bios_bank1")->set_base(state->memregion("bios")->base() + 0x10000); | |
| 1126 | state->membank("bios_bank2")->set_base(state->memregion("bios")->base() + 0x14000); | |
| 1127 | state->membank("bios_bank3")->set_base(state->memregion("bios")->base() + 0x18000); | |
| 1128 | 1128 | state->membank("bios_bank4")->set_base(state->memregion("bios")->base() + 0x1c000); |
| 1129 | 1129 | state->m_voodoo_pci_regs.base_addr = 0xff000000; |
| 1130 | 1130 | } |
| r15082 | r15083 | |
|---|---|---|
| 392 | 392 | |
| 393 | 393 | /* load the roms according to what the operator wants */ |
| 394 | 394 | { |
| 395 | UINT8 *ROM = | |
| 395 | UINT8 *ROM = sta | |
| 396 | 396 | UINT8 *PRG;// = state->memregion("prg_code")->base(); |
| 397 | 397 | int i; |
| 398 | 398 | UINT8 op_mode; |
| 399 | 399 | static const char *const rom_region[] = { "set_chip_4.04", "set_chip_4.4", "clear_chip", "game_prg" }; |
| 400 | 400 | |
| 401 | op_mode = in | |
| 401 | op_mode = machine.root_device().ioport | |
| 402 | 402 | |
| 403 | 403 | PRG = machine.root_device().memregion(rom_region[op_mode & 3])->base(); |
| 404 | 404 |
| r15082 | r15083 | |
|---|---|---|
| 300 | 300 | |
| 301 | 301 | static MACHINE_RESET( tmspoker ) |
| 302 | 302 | { |
| 303 | UINT8 seldsw = (in | |
| 303 | UINT8 seldsw = (machine.root_device().ioport | |
| 304 | 304 | |
| 305 | 305 | popmessage("ROM Bank: %02X", seldsw); |
| 306 | 306 |
| r15082 | r15083 | |
|---|---|---|
| 313 | 313 | int bit_p2 = mask_to_bit((m_input_sel & 0xff000000) >> 24); |
| 314 | 314 | static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 315 | 315 | |
| 316 | return (input_port_read(machine(), portnames[bit_p1]) & 0x00ffffff) | | |
| 317 | (input_port_read(machine(), portnames[bit_p2]) & 0xff000000) ; | |
| 316 | return (ioport(portnames[bit_p1])->read() & 0x00ffffff) | | |
| 317 | (ioport(portnames[bit_p2])->read() & 0xff000000) ; | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | WRITE32_MEMBER(darkhors_state::darkhors_unk1_w) |
| r15082 | r15083 | |
|---|---|---|
| 218 | 218 | if (data & 4) |
| 219 | 219 | { |
| 220 | 220 | if (LOG_IO) logerror("Internal register (%d) read\n", state->m_nvram_address_latch); |
| 221 | state->m_nvram_data_latch = (state->m_nvram_address_latch == 0) ? | |
| 221 | state->m_nvram_data_latch = (state->m_nvram_address_latch == 0) ? | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /* if SEL == 0, we read NVRAM */ |
| r15082 | r15083 | |
|---|---|---|
| 404 | 404 | static TIMER_CALLBACK( equites_frq_adjuster_callback ) |
| 405 | 405 | { |
| 406 | 406 | equites_state *state = machine.driver_data<equites_state>(); |
| 407 | UINT8 frq = i | |
| 407 | UINT8 frq = state->iop | |
| 408 | 408 | |
| 409 | 409 | msm5232_set_clock(state->m_msm, MSM5232_MIN_CLOCK + frq * (MSM5232_MAX_CLOCK - MSM5232_MIN_CLOCK) / 100); |
| 410 | 410 | //popmessage("8155: C %02x A %02x AY: A %02x B %02x Unk:%x", state->m_eq8155_port_c, state->m_eq8155_port_a, state->m_ay_port_a, state->m_ay_port_b, state->m_eq_cymbal_ctrl & 15); |
| r15082 | r15083 | |
| 647 | 647 | #if HVOLTAGE_DEBUG |
| 648 | 648 | READ16_MEMBER(equites_state::hvoltage_debug_r) |
| 649 | 649 | { |
| 650 | return(i | |
| 650 | return(iop | |
| 651 | 651 | } |
| 652 | 652 | #endif |
| 653 | 653 |
| r15082 | r15083 | |
|---|---|---|
| 535 | 535 | static DRIVER_INIT( mirax ) |
| 536 | 536 | { |
| 537 | 537 | mirax_state *state = machine.driver_data<mirax_state>(); |
| 538 | UINT8 *DATA = | |
| 538 | UINT8 *DATA = sta | |
| 539 | 539 | UINT8 *ROM = state->memregion("maincpu")->base(); |
| 540 | 540 | int i; |
| 541 | 541 |
| r15082 | r15083 | |
|---|---|---|
| 297 | 297 | |
| 298 | 298 | READ8_MEMBER(omegrace_state::omegrace_spinner1_r) |
| 299 | 299 | { |
| 300 | return (spinnerTable[i | |
| 300 | return (spinnerTable[iop | |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 |
| r15082 | r15083 | |
|---|---|---|
| 239 | 239 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7") |
| 240 | 240 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 241 | 241 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 242 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 242 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 243 | 243 | |
| 244 | 244 | PORT_START("DSW2") /* Start with all Unknown as each can change per game, except for Country Code */ |
| 245 | 245 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW2:1") /* Most Dipswitch Settings sheets show this as "Number of Players" (Lives) */ |
| r15082 | r15083 | |
| 1475 | 1475 | static DRIVER_INIT( decocrom ) |
| 1476 | 1476 | { |
| 1477 | 1477 | decocass_state *state = machine.driver_data<decocass_state>(); |
| 1478 | int romlength = machine.root_device().memregion("user3")->bytes(); | |
| 1479 | UINT8 *rom = machine.root_device().memregion("user3")->base(); | |
| 1478 | int romlength = state->memregion("user3")->bytes(); | |
| 1479 | UINT8 *rom = state->memregion("user3")->base(); | |
| 1480 | 1480 | int i; |
| 1481 | 1481 | |
| 1482 | 1482 | state->m_decrypted2 = auto_alloc_array(machine, UINT8, romlength); |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | { |
| 64 | 64 | if (ACCESSING_BITS_0_7) |
| 65 | 65 | { |
| 66 | return i | |
| 66 | return iop | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // logerror("msb access to eeprom port\n"); |
| r15082 | r15083 | |
| 75 | 75 | { |
| 76 | 76 | if (ACCESSING_BITS_8_15) |
| 77 | 77 | { |
| 78 | i | |
| 78 | iop | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | // logerror("unknown LSB write %x to eeprom\n", data); |
| r15082 | r15083 | |
| 86 | 86 | { |
| 87 | 87 | if (ACCESSING_BITS_8_15) |
| 88 | 88 | { |
| 89 | return i | |
| 89 | return iop | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | return i | |
| 92 | return iop | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | WRITE16_MEMBER(mystwarr_state::mmeeprom_w) |
| 96 | 96 | { |
| 97 | 97 | if (ACCESSING_BITS_0_7) |
| 98 | 98 | { |
| 99 | i | |
| 99 | iop | |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 |
| r15082 | r15083 | |
|---|---|---|
| 260 | 260 | /* determine the laserdisc player from the DIP switches */ |
| 261 | 261 | if (state->m_laserdisc_type == LASERDISC_TYPE_VARIABLE) |
| 262 | 262 | { |
| 263 | int newtype = (i | |
| 263 | int newtype = (state->iop | |
| 264 | 264 | laserdisc_set_type(state->m_laserdisc, newtype); |
| 265 | 265 | } |
| 266 | 266 | #endif |
| r15082 | r15083 | |
| 555 | 555 | PORT_DIPSETTING( 0x40, "PAYG3" ) |
| 556 | 556 | PORT_DIPSETTING( 0x60, "PAYG4" ) |
| 557 | 557 | PORT_DIPNAME( 0x90, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("B:8,5") |
| 558 | PORT_DIPSETTING( 0x00, "Increase after 5" ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 559 | PORT_DIPSETTING( 0x10, "Increase after 9" ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 560 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 561 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 562 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 563 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 564 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 565 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 558 | PORT_DIPSETTING( 0x00, "Increase after 5" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 559 | PORT_DIPSETTING( 0x10, "Increase after 9" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 560 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 561 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 562 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 563 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 564 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 565 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 566 | 566 | |
| 567 | 567 | PORT_START("CONTROLS") |
| 568 | 568 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| r15082 | r15083 | |
| 657 | 657 | PORT_DIPSETTING( 0x40, "PAYG3" ) |
| 658 | 658 | PORT_DIPSETTING( 0x60, "PAYG4" ) |
| 659 | 659 | PORT_DIPNAME( 0x90, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("B:8,5s") |
| 660 | PORT_DIPSETTING( 0x00, "Increase after 5" ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 661 | PORT_DIPSETTING( 0x10, "Increase after 9" ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 662 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 663 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x00) | |
| 664 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 665 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 666 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 667 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, PORTCOND_EQUALS, 0x04) | |
| 660 | PORT_DIPSETTING( 0x00, "Increase after 5" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 661 | PORT_DIPSETTING( 0x10, "Increase after 9" ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 662 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 663 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x00) | |
| 664 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 665 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 666 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 667 | PORT_DIPSETTING( 0x90, DEF_STR( Easy ) ) PORT_CONDITION("DSW1", 0x04, EQUALS, 0x04) | |
| 668 | 668 | INPUT_PORTS_END |
| 669 | 669 | |
| 670 | 670 |
| r15082 | r15083 | |
|---|---|---|
| 185 | 185 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 186 | 186 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* MB DONE */ |
| 187 | 187 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* EXT DONE */ |
| 188 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 188 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 189 | 189 | |
| 190 | 190 | PORT_START("DSW2") /* DSW2 - 5E*/ |
| 191 | 191 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW5E:1") |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | static void scanline_update(screen_device &screen, int scanline) |
| 42 | 42 | { |
| 43 | 43 | /* generate 32V signals */ |
| 44 | if ((scanline & 32) == 0 && !( | |
| 44 | if ((scanline & 32) == 0 && !( | |
| 45 | 45 | atarigen_scanline_int_gen(screen.machine().device("maincpu")); |
| 46 | 46 | } |
| 47 | 47 | |
| r15082 | r15083 | |
| 115 | 115 | PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 116 | 116 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 117 | 117 | PORT_BIT( 0x0600, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 118 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 118 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 119 | 119 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 120 | 120 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 121 | 121 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| r15082 | r15083 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | PORT_START("P1_P2") |
| 90 | 90 | /* "Standard" buttons layout */ |
| 91 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 92 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 93 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 94 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 95 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 96 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 97 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 98 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 99 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 100 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 101 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 102 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 103 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 104 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 105 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 106 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002) | |
| 91 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 92 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 93 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 94 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 95 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 96 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 97 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 98 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 99 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 100 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 101 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 102 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 103 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 104 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 105 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 106 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0002) | |
| 107 | 107 | /* "Alternate" buttons layout */ |
| 108 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 109 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 110 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 111 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 112 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 113 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 114 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 115 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 116 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 117 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 118 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 119 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 120 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 121 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 122 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 123 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000) | |
| 108 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 109 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 110 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 111 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 112 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 113 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 114 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 115 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 116 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 117 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 118 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 119 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 120 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 121 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 122 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 123 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,EQUALS,0x0000) | |
| 124 | 124 | |
| 125 | 125 | PORT_START("DSW1") |
| 126 | 126 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) /* guess, but check code at 0x004d9c and write to 0x100014 */ |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | res = 0; |
| 34 | 34 | for (i = 0; i < 8; i++) |
| 35 | res |= ((i | |
| 35 | res |= ((iop | |
| 36 | 36 | |
| 37 | 37 | return res; |
| 38 | 38 | } |
| r15082 | r15083 | |
|---|---|---|
| 393 | 393 | |
| 394 | 394 | if( m_iocr_hack) |
| 395 | 395 | { |
| 396 | return (i | |
| 396 | return (iop | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | return (i | |
| 399 | return (iop | |
| 400 | 400 | |
| 401 | 401 | case VIDCR: |
| 402 | 402 | return (m_PS7500_IO[offset] | 0x50) & 0xfffffff0; |
| r15082 | r15083 | |
| 613 | 613 | |
| 614 | 614 | static INPUT_PORTS_START( ssfindo ) |
| 615 | 615 | PORT_START("PS7500") |
| 616 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 616 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 617 | 617 | |
| 618 | 618 | PORT_START("IN0") |
| 619 | 619 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) // IPT_START2 ?? |
| r15082 | r15083 | |
| 663 | 663 | |
| 664 | 664 | static INPUT_PORTS_START( ppcar ) |
| 665 | 665 | PORT_START("PS7500") |
| 666 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 666 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 667 | 667 | |
| 668 | 668 | PORT_START("IN0") |
| 669 | 669 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r15082 | r15083 | |
| 680 | 680 | |
| 681 | 681 | static INPUT_PORTS_START( tetfight ) |
| 682 | 682 | PORT_START("PS7500") |
| 683 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 683 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 684 | 684 | |
| 685 | 685 | PORT_START("DSW") |
| 686 | 686 | PORT_DIPNAME( 0x01, 0x01, "DSW 0" ) |
| r15082 | r15083 | |
|---|---|---|
| 172 | 172 | |
| 173 | 173 | READ8_MEMBER(firetrk_state::firetrk_dip_r) |
| 174 | 174 | { |
| 175 | UINT8 val0 = input_port_read(machine(), "DIP_0"); | |
| 176 | UINT8 val1 = input_port_read(machine(), "DIP_1"); | |
| 175 | UINT8 val0 = ioport("DIP_0")->read(); | |
| 176 | UINT8 val1 = ioport("DIP_1")->read(); | |
| 177 | 177 | |
| 178 | 178 | if (val1 & (1 << (2 * offset + 0))) val0 |= 1; |
| 179 | 179 | if (val1 & (1 << (2 * offset + 1))) val0 |= 2; |
| r15082 | r15083 | |
| 184 | 184 | |
| 185 | 185 | READ8_MEMBER(firetrk_state::montecar_dip_r) |
| 186 | 186 | { |
| 187 | UINT8 val0 = input_port_read(machine(), "DIP_0"); | |
| 188 | UINT8 val1 = input_port_read(machine(), "DIP_1"); | |
| 187 | UINT8 val0 = ioport("DIP_0")->read(); | |
| 188 | UINT8 val1 = ioport("DIP_1")->read(); | |
| 189 | 189 | |
| 190 | 190 | if (val1 & (1 << (3 - offset))) val0 |= 1; |
| 191 | 191 | if (val1 & (1 << (7 - offset))) val0 |= 2; |
| r15082 | r15083 | |
| 247 | 247 | /* update steering wheels */ |
| 248 | 248 | for (i = 0; i < 2; i++) |
| 249 | 249 | { |
| 250 | UINT32 new_dial = i | |
| 250 | UINT32 new_dial = iop | |
| 251 | 251 | INT32 delta = new_dial - m_dial[i]; |
| 252 | 252 | |
| 253 | 253 | if (delta != 0) |
| r15082 | r15083 | |
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | return ((input_port_read_safe(machine(), "BIT_0", 0) & (1 << offset)) ? 0x01 : 0) | | |
| 263 | ((input_port_read_safe(machine(), "BIT_6", 0) & (1 << offset)) ? 0x40 : 0) | | |
| 264 | ((input_port_read_safe(machine(), "BIT_7", 0) & (1 << offset)) ? 0x80 : 0); | |
| 262 | return ((ioport("BIT_0")->read_safe(0) & (1 << offset)) ? 0x01 : 0) | | |
| 263 | ((ioport("BIT_6")->read_safe(0) & (1 << offset)) ? 0x40 : 0) | | |
| 264 | ((ioport("BIT_7")->read_safe(0) & (1 << offset)) ? 0x80 : 0); | |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | |
| r15082 | r15083 | |
| 447 | 447 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START3 ) PORT_NAME("Both Players Start") |
| 448 | 448 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) PORT_PLAYER(1) |
| 449 | 449 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 450 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_VBLANK | |
| 450 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 451 | 451 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet )) |
| 452 | 452 | PORT_DIPSETTING( 0x00, "Smokey Joe (1 Player)" ) |
| 453 | 453 | PORT_DIPSETTING( 0x40, "Fire Truck (2 Players)" ) |
| r15082 | r15083 | |
| 579 | 579 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)2) |
| 580 | 580 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) |
| 581 | 581 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") |
| 582 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 582 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 583 | 583 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0) |
| 584 | 584 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)1) |
| 585 | 585 |
| r15082 | r15083 | |
|---|---|---|
| 515 | 515 | switch(port) |
| 516 | 516 | { |
| 517 | 517 | case 0: |
| 518 | return i | |
| 518 | return iop | |
| 519 | 519 | case 1: |
| 520 | return i | |
| 520 | return iop | |
| 521 | 521 | case 2: |
| 522 | return i | |
| 522 | return iop | |
| 523 | 523 | case 3: |
| 524 | 524 | return 0xff; |
| 525 | 525 | case 4: |
| 526 | return i | |
| 526 | return iop | |
| 527 | 527 | case 5: // Dip switches |
| 528 | return i | |
| 528 | return iop | |
| 529 | 529 | case 6: |
| 530 | return i | |
| 530 | return iop | |
| 531 | 531 | case 7: // DAC |
| 532 | 532 | return 0xff; |
| 533 | 533 | } |
| r15082 | r15083 | |
| 541 | 541 | case 0: |
| 542 | 542 | { |
| 543 | 543 | static const UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 }; |
| 544 | return (i | |
| 544 | return (iop | |
| 545 | 545 | } |
| 546 | 546 | case 1: |
| 547 | return i | |
| 547 | return iop | |
| 548 | 548 | case 2: |
| 549 | 549 | return 0xff; |
| 550 | 550 | case 3: |
| 551 | 551 | return 0xff; |
| 552 | 552 | case 4: |
| 553 | return i | |
| 553 | return iop | |
| 554 | 554 | case 5: // Dip switches |
| 555 | return i | |
| 555 | return iop | |
| 556 | 556 | case 6: |
| 557 | return i | |
| 557 | return iop | |
| 558 | 558 | case 7: // DAC |
| 559 | 559 | return 0xff; |
| 560 | 560 | } |
| r15082 | r15083 | |
| 573 | 573 | case 1: |
| 574 | 574 | return 0xff; |
| 575 | 575 | case 2: |
| 576 | return i | |
| 576 | return iop | |
| 577 | 577 | case 3: |
| 578 | 578 | return 0xff; |
| 579 | 579 | case 4: |
| 580 | return i | |
| 580 | return iop | |
| 581 | 581 | case 5: // Dip switches |
| 582 | return i | |
| 582 | return iop | |
| 583 | 583 | case 6: |
| 584 | return i | |
| 584 | return iop | |
| 585 | 585 | case 7: // DAC |
| 586 | 586 | return 0xff; |
| 587 | 587 | } |
| r15082 | r15083 | |
| 626 | 626 | if(ACCESSING_BITS_0_7) |
| 627 | 627 | { |
| 628 | 628 | data &= 3; |
| 629 | hotrod_ctrl_cur = i | |
| 629 | hotrod_ctrl_cur = iop | |
| 630 | 630 | } |
| 631 | 631 | } |
| 632 | 632 | |
| r15082 | r15083 | |
| 638 | 638 | { |
| 639 | 639 | // Steering dials |
| 640 | 640 | case 0: |
| 641 | return i | |
| 641 | return iop | |
| 642 | 642 | case 1: |
| 643 | return i | |
| 643 | return iop | |
| 644 | 644 | case 2: |
| 645 | return i | |
| 645 | return iop | |
| 646 | 646 | case 3: |
| 647 | return i | |
| 647 | return iop | |
| 648 | 648 | case 4: |
| 649 | return i | |
| 649 | return iop | |
| 650 | 650 | case 5: |
| 651 | return i | |
| 651 | return iop | |
| 652 | 652 | case 6: |
| 653 | return i | |
| 653 | return iop | |
| 654 | 654 | case 7: |
| 655 | return i | |
| 655 | return iop | |
| 656 | 656 | |
| 657 | 657 | case 8: |
| 658 | 658 | { |
| r15082 | r15083 | |
| 1262 | 1262 | { |
| 1263 | 1263 | segas24_state *state = machine.driver_data<segas24_state>(); |
| 1264 | 1264 | if (state->track_size) |
| 1265 | machine.device<nvram_device>("floppy_nvram")->set_base( | |
| 1265 | machine.device<nvram_device>("floppy_nvram")->set_base(sta | |
| 1266 | 1266 | |
| 1267 | 1267 | UINT8 *usr1 = state->memregion("romboard")->base(); |
| 1268 | 1268 | if (usr1) |
| r15082 | r15083 | |
| 1771 | 1771 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 1772 | 1772 | |
| 1773 | 1773 | PORT_START("SERVICE") |
| 1774 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00) | |
| 1775 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00) | |
| 1774 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_CONDITION("DSW",0x08,EQUALS,0x00) | |
| 1775 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CONDITION("DSW",0x08,EQUALS,0x00) | |
| 1776 | 1776 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 1777 | 1777 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1778 | 1778 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1779 | 1779 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1780 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00) | |
| 1781 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00) | |
| 1780 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,EQUALS,0x00) | |
| 1781 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,EQUALS,0x00) | |
| 1782 | 1782 | /* alt coin mode */ |
| 1783 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08) | |
| 1784 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08) | |
| 1785 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08) | |
| 1786 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08) | |
| 1783 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,EQUALS,0x08) | |
| 1784 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,EQUALS,0x08) | |
| 1785 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,EQUALS,0x08) | |
| 1786 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,EQUALS,0x08) | |
| 1787 | 1787 | |
| 1788 | 1788 | |
| 1789 | 1789 | PORT_INCLUDE( system24_DSW ) |
| r15082 | r15083 | |
|---|---|---|
| 352 | 352 | |
| 353 | 353 | static void handle_lightpen( device_t *device ) |
| 354 | 354 | { |
| 355 | int x_val = input_port_read_safe(device->machine(), "TOUCH_X",0x00); | |
| 356 | int y_val = input_port_read_safe(device->machine(), "TOUCH_Y",0x00); | |
| 355 | int x_val = device->machine().root_device().ioport("TOUCH_X")->read_safe(0x00); | |
| 356 | int y_val = device->machine().root_device().ioport("TOUCH_Y")->read_safe(0x00); | |
| 357 | 357 | const rectangle &vis_area = device->machine().primary_screen->visible_area(); |
| 358 | 358 | int xt, yt; |
| 359 | 359 | |
| r15082 | r15083 | |
| 576 | 576 | sda = i2cmem_sda_read(device); |
| 577 | 577 | } |
| 578 | 578 | |
| 579 | if (( | |
| 579 | if ((s | |
| 580 | 580 | state->m_coin_state = 1; // Start Coin Cycle |
| 581 | 581 | state->m_last_cycles = device->machine().firstcpu->total_cycles(); |
| 582 | 582 | } else { |
| r15082 | r15083 | |
| 615 | 615 | door_wait = 12345; |
| 616 | 616 | |
| 617 | 617 | if (curr_cycles - state->m_last_door > door_wait) { |
| 618 | if ((i | |
| 618 | if ((state->iop | |
| 619 | 619 | state->m_door_open = (!state->m_door_open & 0x01); |
| 620 | 620 | } else { |
| 621 | 621 | state->m_door_open = 1; |
| r15082 | r15083 | |
| 818 | 818 | CUSTOM_INPUT_MEMBER(peplus_state::peplus_input_r) |
| 819 | 819 | { |
| 820 | 820 | UINT8 inp_ret = 0x00; |
| 821 | UINT8 inp_read = i | |
| 821 | UINT8 inp_read = iop | |
| 822 | 822 | |
| 823 | 823 | if (inp_read & 0x01) inp_ret = 0x01; |
| 824 | 824 | if (inp_read & 0x02) inp_ret = 0x02; |
| r15082 | r15083 | |
| 1035 | 1035 | state->m_autohold_addr = 0x5e7e; // AutoHold Address |
| 1036 | 1036 | |
| 1037 | 1037 | if (state->m_autohold_addr) |
| 1038 | state->m_program_ram[state->m_autohold_addr] = i | |
| 1038 | state->m_program_ram[state->m_autohold_addr] = state->iop | |
| 1039 | 1039 | #endif |
| 1040 | 1040 | } |
| 1041 | 1041 |
| r15082 | r15083 | |
|---|---|---|
| 463 | 463 | bit 0: eeprom data |
| 464 | 464 | */ |
| 465 | 465 | |
| 466 | i | |
| 466 | iop | |
| 467 | 467 | |
| 468 | 468 | konamigx_wrport1_0 = odata; |
| 469 | 469 | } |
| r15082 | r15083 | |
| 874 | 874 | switch (input) |
| 875 | 875 | { |
| 876 | 876 | case ADC083X_CH0: |
| 877 | return (double)(5 * | |
| 877 | return (double)(5 * | |
| 878 | 878 | case ADC083X_CH1: |
| 879 | return (double)(5 * | |
| 879 | return (double)(5 * | |
| 880 | 880 | case ADC083X_VREF: |
| 881 | 881 | return 5; |
| 882 | 882 | } |
| r15082 | r15083 | |
| 890 | 890 | |
| 891 | 891 | READ32_MEMBER(konamigx_state::le2_gun_H_r) |
| 892 | 892 | { |
| 893 | int p1x = input_port_read(machine(), "LIGHT0_X")*290/0xff+20; | |
| 894 | int p2x = input_port_read(machine(), "LIGHT1_X")*290/0xff+20; | |
| 893 | int p1x = ioport("LIGHT0_X")->read()*290/0xff+20; | |
| 894 | int p2x = ioport("LIGHT1_X")->read()*290/0xff+20; | |
| 895 | 895 | |
| 896 | 896 | return (p1x<<16)|p2x; |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | READ32_MEMBER(konamigx_state::le2_gun_V_r) |
| 900 | 900 | { |
| 901 | int p1y = input_port_read(machine(), "LIGHT0_Y")*224/0xff; | |
| 902 | int p2y = input_port_read(machine(), "LIGHT1_Y")*224/0xff; | |
| 901 | int p1y = ioport("LIGHT0_Y")->read()*224/0xff; | |
| 902 | int p2y = ioport("LIGHT1_Y")->read()*224/0xff; | |
| 903 | 903 | |
| 904 | 904 | // make "off the bottom" reload too |
| 905 | 905 | if (p1y >= 0xdf) p1y = 0; |
| r15082 | r15083 | |
|---|---|---|
| 70 | 70 | |
| 71 | 71 | READ16_MEMBER(thunderj_state::special_port2_r) |
| 72 | 72 | { |
| 73 | int result = i | |
| 73 | int result = iop | |
| 74 | 74 | |
| 75 | 75 | if (m_sound_to_cpu_ready) result ^= 0x0004; |
| 76 | 76 | if (m_cpu_to_sound_ready) result ^= 0x0008; |
| r15082 | r15083 | |
| 219 | 219 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 220 | 220 | |
| 221 | 221 | PORT_START("260012") |
| 222 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK | |
| 222 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 223 | 223 | PORT_SERVICE( 0x0002, IP_ACTIVE_LOW ) |
| 224 | 224 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* Input buffer full (@260030) */ |
| 225 | 225 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) /* Output buffer full (@360030) */ |
| r15082 | r15083 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | READ16_MEMBER(quantum_state::trackball_r) |
| 76 | 76 | { |
| 77 | return (i | |
| 77 | return (iop | |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | |
| 81 | 81 | static READ8_DEVICE_HANDLER( input_1_r ) |
| 82 | 82 | { |
| 83 | return ( | |
| 83 | return ( | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | static READ8_DEVICE_HANDLER( input_2_r ) |
| 88 | 88 | { |
| 89 | return ( | |
| 89 | return ( | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 |
| r15082 | r15083 | |
|---|---|---|
| 158 | 158 | { |
| 159 | 159 | static const char *const portnames[] = { "IN0", "IN1", "DSW1", "DSW2" }; |
| 160 | 160 | |
| 161 | return i | |
| 161 | return iop | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | WRITE8_MEMBER(combatsc_state::combatscb_priority_w) |
| r15082 | r15083 | |
| 279 | 279 | { |
| 280 | 280 | UINT8 curr; |
| 281 | 281 | |
| 282 | curr = i | |
| 282 | curr = iop | |
| 283 | 283 | |
| 284 | 284 | dir[i] = curr - m_pos[i]; |
| 285 | 285 | m_sign[i] = dir[i] & 0x80; |
| r15082 | r15083 | |
| 690 | 690 | static MACHINE_START( combatsc ) |
| 691 | 691 | { |
| 692 | 692 | combatsc_state *state = machine.driver_data<combatsc_state>(); |
| 693 | UINT8 *MEM = | |
| 693 | UINT8 *MEM = sta | |
| 694 | 694 | |
| 695 | 695 | state->m_io_ram = MEM + 0x0000; |
| 696 | 696 | state->m_page[0] = MEM + 0x4000; |
| r15082 | r15083 | |
|---|---|---|
| 118 | 118 | |
| 119 | 119 | /* determine how many sound banks */ |
| 120 | 120 | state->m_sound_banks = 0; |
| 121 | if ( | |
| 121 | if (sta | |
| 122 | 122 | state->m_sound_banks = state->memregion("upd")->bytes() / 0x20000; |
| 123 | 123 | |
| 124 | 124 | /* reset the protection */ |
| r15082 | r15083 | |
| 326 | 326 | |
| 327 | 327 | /* otherwise, return an input port */ |
| 328 | 328 | if (offset == 0x04/2 && state->m_sound_banks) |
| 329 | return (input_port_read(space->machine(), portnames[offset]) & 0xbf) | (upd7759_busy_r(space->machine().device("upd")) << 6); | |
| 330 | return input_port_read(space->machine(), portnames[offset]); | |
| 329 | return (space->machine().root_device().ioport(portnames[offset])->read() & 0xbf) | (upd7759_busy_r(space->machine().device("upd")) << 6); | |
| 330 | return space->machine().root_device().ioport(portnames[offset])->read(); | |
| 331 | 331 | |
| 332 | 332 | /* 'SEGA' protection */ |
| 333 | 333 | case 0x10/2: |
| r15082 | r15083 | |
|---|---|---|
| 395 | 395 | break; |
| 396 | 396 | case 0x01: // Bank 10 |
| 397 | 397 | // Test for Coin-In |
| 398 | if ((i | |
| 398 | if ((iop | |
| 399 | 399 | m_coin_state = 1; // Start Coin Cycle |
| 400 | 400 | m_last_cycles = machine().firstcpu->total_cycles(); |
| 401 | 401 | #if DEBUG_OUTPUT |
| r15082 | r15083 | |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | // Determine Door Optics |
| 441 | if ((i | |
| 441 | if ((iop | |
| 442 | 442 | door_optics = 0x08; |
| 443 | 443 | else |
| 444 | 444 | door_optics = (((m_bank20 >> 4) & 1) << 3); // Use Door Optics Transmitter |
| r15082 | r15083 | |
| 483 | 483 | val = val | door_optics; // Door Optics Receiver |
| 484 | 484 | val = val | coin_out; // Hopper Coin OutR |
| 485 | 485 | val = val | 0x00; // Hopper Full |
| 486 | val = val | (input_port_read_safe(machine(),"I10",0x40) & 0x40); // Handle/Spin Button | |
| 487 | val = val | (input_port_read_safe(machine(),"I10",0x80) & 0x80); // Jackpot Reset Key | |
| 486 | val = val | (ioport("I10")->read_safe(0x40) & 0x40); // Handle/Spin Button | |
| 487 | val = val | (ioport("I10")->read_safe(0x80) & 0x80); // Jackpot Reset Key | |
| 488 | 488 | break; |
| 489 | 489 | case 0x02: // Bank 20 |
| 490 | val = val | (input_port_read_safe(machine(),"I20",0x01) & 0x01); // Bet One Credit | |
| 491 | val = val | (input_port_read_safe(machine(),"I20",0x02) & 0x02); // Play Max Credits | |
| 492 | val = val | (input_port_read_safe(machine(),"I20",0x04) & 0x04); // Cash Out | |
| 493 | val = val | (input_port_read_safe(machine(),"I20",0x08) & 0x08); // Change Request | |
| 490 | val = val | (ioport("I20")->read_safe(0x01) & 0x01); // Bet One Credit | |
| 491 | val = val | (ioport("I20")->read_safe(0x02) & 0x02); // Play Max Credits | |
| 492 | val = val | (ioport("I20")->read_safe(0x04) & 0x04); // Cash Out | |
| 493 | val = val | (ioport("I20")->read_safe(0x08) & 0x08); // Change Request | |
| 494 | 494 | val = val | 0x00; // Reel Mechanism |
| 495 | val = val | (i | |
| 495 | val = val | (iop | |
| 496 | 496 | val = val | 0x40; // Card Cage |
| 497 | 497 | val = val | 0x80; // Bill Acceptor |
| 498 | 498 | break; |
| 499 | 499 | case 0x04: // Bank 30 |
| 500 | 500 | // Reserved |
| 501 | val = val | (i | |
| 501 | val = val | (iop | |
| 502 | 502 | // Jackpot to Credit Key |
| 503 | 503 | // Reserved |
| 504 | 504 | // Reserved |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | READ8_MEMBER(gpworld_state::pedal_in) |
| 248 | 248 | { |
| 249 | 249 | if (m_brake_gas) |
| 250 | return i | |
| 250 | return iop | |
| 251 | 251 | |
| 252 | return i | |
| 252 | return iop | |
| 253 | 253 | |
| 254 | 254 | } |
| 255 | 255 |
| r15082 | r15083 | |
|---|---|---|
| 157 | 157 | |
| 158 | 158 | CUSTOM_INPUT_MEMBER(exidy_state::teetert_input_r) |
| 159 | 159 | { |
| 160 | UINT8 dial = i | |
| 160 | UINT8 dial = iop | |
| 161 | 161 | int result = 0; |
| 162 | 162 | |
| 163 | 163 | result = (dial != m_last_dial) << 4; |
| r15082 | r15083 | |
| 379 | 379 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 380 | 380 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 381 | 381 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 383 | 383 | |
| 384 | 384 | PORT_START("IN2") |
| 385 | 385 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 404 | 404 | |
| 405 | 405 | PORT_MODIFY("DSW") |
| 406 | 406 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 408 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 409 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 410 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 411 | PORT_DIPSETTING( 0x00, "2C/1P, 50P Coin/3P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 412 | PORT_DIPSETTING( 0x01, "1C/1P, 50P Coin/6P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 413 | PORT_DIPSETTING( 0x02, "1C/2P, 50P Coin/12P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 414 | PORT_DIPSETTING( 0x03, "1C/3P, 50P Coin/18P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 408 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 409 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 410 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 411 | PORT_DIPSETTING( 0x00, "2C/1P, 50P Coin/3P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 412 | PORT_DIPSETTING( 0x01, "1C/1P, 50P Coin/6P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 413 | PORT_DIPSETTING( 0x02, "1C/2P, 50P Coin/12P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 414 | PORT_DIPSETTING( 0x03, "1C/3P, 50P Coin/18P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 415 | 415 | PORT_DIPNAME( 0x04, 0x00, "Top Score Award" ) PORT_DIPLOCATION("SW1:3") |
| 416 | 416 | PORT_DIPSETTING( 0x00, "Credit" ) |
| 417 | 417 | PORT_DIPSETTING( 0x04, "Extended Play" ) |
| r15082 | r15083 | |
| 445 | 445 | |
| 446 | 446 | PORT_MODIFY("DSW") |
| 447 | 447 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") |
| 448 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 449 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 450 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 451 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00) | |
| 452 | PORT_DIPSETTING( 0x00, "2F/1P, 5F Coin/3P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 453 | PORT_DIPSETTING( 0x01, "1F/1P, 5F Coin/6P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 454 | PORT_DIPSETTING( 0x02, "1F/2P, 5F Coin/12P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 455 | PORT_DIPSETTING( 0x03, "1F/3P, 5F Coin/18P" ) PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00) | |
| 448 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 449 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 450 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 451 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW", 0x80, EQUALS, 0x00) | |
| 452 | PORT_DIPSETTING( 0x00, "2F/1P, 5F Coin/3P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 453 | PORT_DIPSETTING( 0x01, "1F/1P, 5F Coin/6P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 454 | PORT_DIPSETTING( 0x02, "1F/2P, 5F Coin/12P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 455 | PORT_DIPSETTING( 0x03, "1F/3P, 5F Coin/18P" ) PORT_CONDITION("DSW", 0x80, NOTEQUALS, 0x00) | |
| 456 | 456 | INPUT_PORTS_END |
| 457 | 457 | |
| 458 | 458 | |
| r15082 | r15083 | |
| 507 | 507 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 508 | 508 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 509 | 509 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 510 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 510 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 511 | 511 | |
| 512 | 512 | PORT_START("IN2") |
| 513 | 513 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button") |
| r15082 | r15083 | |
| 569 | 569 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 570 | 570 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 571 | 571 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 572 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 572 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 573 | 573 | |
| 574 | 574 | PORT_START("IN2") |
| 575 | 575 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 625 | 625 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 626 | 626 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 627 | 627 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 628 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 628 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 629 | 629 | |
| 630 | 630 | PORT_START("IN2") |
| 631 | 631 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 685 | 685 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 686 | 686 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 687 | 687 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 688 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 688 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 689 | 689 | |
| 690 | 690 | PORT_START("IN2") |
| 691 | 691 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 737 | 737 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 738 | 738 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 739 | 739 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 740 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 740 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 741 | 741 | |
| 742 | 742 | PORT_START("IN2") |
| 743 | 743 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 257 | 257 | { |
| 258 | 258 | if (m_keyb & (1 << i)) |
| 259 | 259 | { |
| 260 | res = i | |
| 260 | res = iop | |
| 261 | 261 | break; |
| 262 | 262 | } |
| 263 | 263 | } |
| r15082 | r15083 | |
| 370 | 370 | |
| 371 | 371 | READ8_MEMBER(homedata_state::reikaids_io_r) |
| 372 | 372 | { |
| 373 | int res = i | |
| 373 | int res = iop | |
| 374 | 374 | |
| 375 | 375 | res |= BIT(m_upd7807_portc, 2) * 0x01; // bit 0 = upd7807 status |
| 376 | 376 | res |= BIT(m_upd7807_portc, 6) * 0x02; // bit 1 = upd7807 data |
| r15082 | r15083 | |
| 438 | 438 | READ8_MEMBER(homedata_state::pteacher_keyboard_r) |
| 439 | 439 | { |
| 440 | 440 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5" }; |
| 441 | int dips = i | |
| 441 | int dips = iop | |
| 442 | 442 | |
| 443 | 443 | // logerror("%04x: keyboard_r with port A = %02x\n",cpu_get_pc(&space.device()),upd7807_porta); |
| 444 | 444 | |
| r15082 | r15083 | |
| 446 | 446 | { |
| 447 | 447 | /* player 1 + dip switches */ |
| 448 | 448 | int row = (m_upd7807_porta & 0x07); |
| 449 | return i | |
| 449 | return iop | |
| 450 | 450 | } |
| 451 | 451 | if (m_upd7807_porta & 0x08) |
| 452 | 452 | { |
| r15082 | r15083 | |
| 1149 | 1149 | static MACHINE_START( reikaids ) |
| 1150 | 1150 | { |
| 1151 | 1151 | homedata_state *state = machine.driver_data<homedata_state>(); |
| 1152 | UINT8 *ROM = | |
| 1152 | UINT8 *ROM = sta | |
| 1153 | 1153 | |
| 1154 | 1154 | state->membank("bank1")->configure_entries(0, 8, &ROM[0xc000], 0x4000); |
| 1155 | 1155 | state->membank("bank2")->configure_entries(0, 4, state->memregion("audiocpu")->base(), 0x10000); |
| r15082 | r15083 | |
| 1166 | 1166 | static MACHINE_START( pteacher ) |
| 1167 | 1167 | { |
| 1168 | 1168 | homedata_state *state = machine.driver_data<homedata_state>(); |
| 1169 | UINT8 *ROM = | |
| 1169 | UINT8 *ROM = sta | |
| 1170 | 1170 | |
| 1171 | 1171 | state->membank("bank1")->configure_entries(0, 4, &ROM[0xc000], 0x4000); |
| 1172 | 1172 | state->membank("bank2")->configure_entries(0, 4, state->memregion("audiocpu")->base(), 0x10000); |
| r15082 | r15083 | |
|---|---|---|
| 141 | 141 | PORT_DIPSETTING( 0x30, "90 seconds" ) |
| 142 | 142 | |
| 143 | 143 | PORT_DIPNAME( 0x0c, 0x00, "Extended Time" ) PORT_DIPLOCATION("SW:3,4") |
| 144 | PORT_DIPSETTING( 0x00, "20 seconds at 4000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x00) // @ 60 seconds | |
| 145 | PORT_DIPSETTING( 0x04, "30 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x00) | |
| 146 | PORT_DIPSETTING( 0x08, "15 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x00) | |
| 147 | PORT_DIPSETTING( 0x0c, "30 seconds at 10000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x00) | |
| 148 | PORT_DIPSETTING( 0x00, "20 seconds at 6000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x10) // @ 70 seconds | |
| 149 | PORT_DIPSETTING( 0x04, "30 seconds at 9000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x10) | |
| 150 | PORT_DIPSETTING( 0x08, "20 seconds at 9000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x10) | |
| 151 | PORT_DIPSETTING( 0x0c, "30 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x10) | |
| 152 | PORT_DIPSETTING( 0x00, "20 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x20) // @ 80 seconds | |
| 153 | PORT_DIPSETTING( 0x04, "30 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x20) | |
| 154 | PORT_DIPSETTING( 0x08, "20 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x20) | |
| 155 | PORT_DIPSETTING( 0x0c, "30 seconds at 16000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x20) | |
| 156 | PORT_DIPSETTING( 0x00, "20 seconds at 10000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x30) // @ 90 seconds | |
| 157 | PORT_DIPSETTING( 0x04, "30 seconds at 15000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x30) | |
| 158 | PORT_DIPSETTING( 0x08, "20 seconds at 15000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x30) | |
| 159 | PORT_DIPSETTING( 0x0c, "30 seconds at 20000" ) PORT_CONDITION("DSW", 0x30, PORTCOND_EQUALS, 0x30) | |
| 144 | PORT_DIPSETTING( 0x00, "20 seconds at 4000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x00) // @ 60 seconds | |
| 145 | PORT_DIPSETTING( 0x04, "30 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x00) | |
| 146 | PORT_DIPSETTING( 0x08, "15 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x00) | |
| 147 | PORT_DIPSETTING( 0x0c, "30 seconds at 10000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x00) | |
| 148 | PORT_DIPSETTING( 0x00, "20 seconds at 6000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x10) // @ 70 seconds | |
| 149 | PORT_DIPSETTING( 0x04, "30 seconds at 9000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x10) | |
| 150 | PORT_DIPSETTING( 0x08, "20 seconds at 9000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x10) | |
| 151 | PORT_DIPSETTING( 0x0c, "30 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x10) | |
| 152 | PORT_DIPSETTING( 0x00, "20 seconds at 8000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x20) // @ 80 seconds | |
| 153 | PORT_DIPSETTING( 0x04, "30 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x20) | |
| 154 | PORT_DIPSETTING( 0x08, "20 seconds at 12000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x20) | |
| 155 | PORT_DIPSETTING( 0x0c, "30 seconds at 16000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x20) | |
| 156 | PORT_DIPSETTING( 0x00, "20 seconds at 10000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x30) // @ 90 seconds | |
| 157 | PORT_DIPSETTING( 0x04, "30 seconds at 15000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x30) | |
| 158 | PORT_DIPSETTING( 0x08, "20 seconds at 15000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x30) | |
| 159 | PORT_DIPSETTING( 0x0c, "30 seconds at 20000" ) PORT_CONDITION("DSW", 0x30, EQUALS, 0x30) | |
| 160 | 160 | |
| 161 | 161 | PORT_DIPNAME( 0x40, 0x40, "I/O Test" ) PORT_DIPLOCATION("SW:7") |
| 162 | 162 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| r15082 | r15083 | |
|---|---|---|
| 154 | 154 | switch (offset) |
| 155 | 155 | { |
| 156 | 156 | case 0 : |
| 157 | data = (i | |
| 157 | data = (iop | |
| 158 | 158 | break; |
| 159 | 159 | case 1 : |
| 160 | data = (i | |
| 160 | data = (iop | |
| 161 | 161 | break; |
| 162 | 162 | case 2 : |
| 163 | data = ((i | |
| 163 | data = ((iop | |
| 164 | 164 | break; |
| 165 | 165 | case 3 : |
| 166 | data = ((i | |
| 166 | data = ((iop | |
| 167 | 167 | break; |
| 168 | 168 | } |
| 169 | 169 |
| r15082 | r15083 | |
|---|---|---|
| 639 | 639 | switch (offset*4) |
| 640 | 640 | { |
| 641 | 641 | case 0x000: return 0x00000400; |
| 642 | case 0x004: return input_port_read(machine(), "SYSTEM"); | |
| 643 | case 0x008: return input_port_read(machine(), "P1_P2"); | |
| 642 | case 0x004: return ioport("SYSTEM")->read(); | |
| 643 | case 0x008: return ioport("P1_P2")->read(); | |
| 644 | 644 | case 0x600: return m_no_machine_error_code; |
| 645 | 645 | } |
| 646 | 646 | |
| r15082 | r15083 | |
| 668 | 668 | else |
| 669 | 669 | return 0x000; |
| 670 | 670 | } |
| 671 | case 0x004: return input_port_read(machine(), "SYSTEM"); | |
| 672 | case 0x008: return input_port_read(machine(), "P1_P2"); | |
| 671 | case 0x004: return ioport("SYSTEM")->read(); | |
| 672 | case 0x008: return ioport("P1_P2")->read(); | |
| 673 | 673 | case 0x600: return m_no_machine_error_code; |
| 674 | 674 | } |
| 675 | 675 | |
| r15082 | r15083 | |
| 696 | 696 | case 0x010: |
| 697 | 697 | { |
| 698 | 698 | /* Quick kludge for use the input test items */ |
| 699 | if(i | |
| 699 | if(iop | |
| 700 | 700 | m_p1_trig = machine().rand() & 0x01000000; |
| 701 | 701 | |
| 702 | return (i | |
| 702 | return (iop | |
| 703 | 703 | } |
| 704 | 704 | case 0x018: |
| 705 | 705 | { |
| 706 | 706 | UINT8 p1_x, p1_y, p2_x, p2_y; |
| 707 | p1_x = input_port_read(machine(), "LIGHT_P1_X") & 0xff; | |
| 708 | p1_y = input_port_read(machine(), "LIGHT_P1_Y") & 0xff; | |
| 709 | p2_x = input_port_read(machine(), "LIGHT_P2_X") & 0xff; | |
| 710 | p2_y = input_port_read(machine(), "LIGHT_P2_Y") & 0xff; | |
| 707 | p1_x = ioport("LIGHT_P1_X")->read() & 0xff; | |
| 708 | p1_y = ioport("LIGHT_P1_Y")->read() & 0xff; | |
| 709 | p2_x = ioport("LIGHT_P2_X")->read() & 0xff; | |
| 710 | p2_y = ioport("LIGHT_P2_Y")->read() & 0xff; | |
| 711 | 711 | |
| 712 | 712 | return p1_x<<24 | p1_y<<16 | p2_x<<8 | p2_y; |
| 713 | 713 | } |
| 714 | 714 | case 0x01c: |
| 715 | 715 | { |
| 716 | 716 | UINT8 p3_x, p3_y; |
| 717 | p3_x = input_port_read(machine(), "LIGHT_P3_X") & 0xff; | |
| 718 | p3_y = input_port_read(machine(), "LIGHT_P3_Y") & 0xff; | |
| 717 | p3_x = ioport("LIGHT_P3_X")->read() & 0xff; | |
| 718 | p3_y = ioport("LIGHT_P3_Y")->read() & 0xff; | |
| 719 | 719 | |
| 720 | 720 | return p3_x<<24 | p3_y<<16 | p3_x<<8 | p3_y; //FIXME: see what's the right bank here when the trigger works |
| 721 | 721 | } |
| r15082 | r15083 | |
| 741 | 741 | else |
| 742 | 742 | return 0x000; |
| 743 | 743 | } |
| 744 | case 0x004: return input_port_read(machine(), "SYSTEM"); | |
| 745 | case 0x008: return input_port_read(machine(), "P1_P2"); | |
| 744 | case 0x004: return ioport("SYSTEM")->read(); | |
| 745 | case 0x008: return ioport("P1_P2")->read(); | |
| 746 | 746 | case 0x600: return m_no_machine_error_code; |
| 747 | 747 | } |
| 748 | 748 | |
| r15082 | r15083 | |
| 929 | 929 | |
| 930 | 930 | //printf("Q1 R : %.8x %.8x\n", offset, hng64_tcram[offset]); |
| 931 | 931 | if(offset == 0x12) |
| 932 | return i | |
| 932 | return iop | |
| 933 | 933 | |
| 934 | 934 | return m_tcram[offset]; |
| 935 | 935 | } |
| r15082 | r15083 | |
| 1269 | 1269 | |
| 1270 | 1270 | static INPUT_PORTS_START( hng64 ) |
| 1271 | 1271 | PORT_START("VBLANK") |
| 1272 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1272 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1273 | 1273 | |
| 1274 | 1274 | PORT_START("IPT_TEST") |
| 1275 | 1275 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r15082 | r15083 | |
| 1345 | 1345 | |
| 1346 | 1346 | static INPUT_PORTS_START( bbust2 ) |
| 1347 | 1347 | PORT_START("VBLANK") |
| 1348 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1348 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1349 | 1349 | |
| 1350 | 1350 | PORT_START("D_IN") |
| 1351 | 1351 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r15082 | r15083 | |
|---|---|---|
| 202 | 202 | |
| 203 | 203 | static READ8_HANDLER( gladiator_dsw1_r ) |
| 204 | 204 | { |
| 205 | int orig = | |
| 205 | int orig = | |
| 206 | 206 | |
| 207 | 207 | return BITSWAP8(orig, 0,1,2,3,4,5,6,7); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | static READ8_HANDLER( gladiator_dsw2_r ) |
| 211 | 211 | { |
| 212 | int orig = | |
| 212 | int orig = | |
| 213 | 213 | |
| 214 | 214 | return BITSWAP8(orig, 2,3,4,5,6,7,1,0); |
| 215 | 215 | } |
| r15082 | r15083 | |
| 218 | 218 | { |
| 219 | 219 | int coins = 0; |
| 220 | 220 | |
| 221 | if( | |
| 221 | if( | |
| 222 | 222 | switch(offset) |
| 223 | 223 | { |
| 224 | 224 | case 0x01: /* start button , coins */ |
| 225 | return | |
| 225 | return | |
| 226 | 226 | case 0x02: /* Player 1 Controller , coins */ |
| 227 | return | |
| 227 | return | |
| 228 | 228 | case 0x04: /* Player 2 Controller , coins */ |
| 229 | return | |
| 229 | return | |
| 230 | 230 | } |
| 231 | 231 | /* unknown */ |
| 232 | 232 | return 0; |
| r15082 | r15083 | |
| 237 | 237 | switch(offset) |
| 238 | 238 | { |
| 239 | 239 | case 0x01: /* button 3 */ |
| 240 | return | |
| 240 | return | |
| 241 | 241 | } |
| 242 | 242 | /* unknown */ |
| 243 | 243 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 472 | 472 | imolagp_state *state = timer.machine().driver_data<imolagp_state>(); |
| 473 | 473 | |
| 474 | 474 | { |
| 475 | int newsteer = | |
| 475 | int newsteer = | |
| 476 | 476 | if (newsteer != state->m_oldsteer) |
| 477 | 477 | { |
| 478 | 478 | if (state->m_steerlatch == 0) |
| r15082 | r15083 | |
|---|---|---|
| 84 | 84 | static const char *const track_names[] = { "IN0", "IN1", "IN2", "IN3" }; |
| 85 | 85 | |
| 86 | 86 | for (i = 0; i < 4; i++) |
| 87 | m_last[i] = i | |
| 87 | m_last[i] = iop | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | READ16_MEMBER(cabal_state::track_r) |
| r15082 | r15083 | |
| 93 | 93 | switch (offset) |
| 94 | 94 | { |
| 95 | 95 | default: |
| 96 | case 0: return (( input_port_read(machine(), "IN0") - m_last[0]) & 0x00ff) | (((input_port_read(machine(), "IN2") - m_last[2]) & 0x00ff) << 8); /* X lo */ | |
| 97 | case 1: return (((input_port_read(machine(), "IN0") - m_last[0]) & 0xff00) >> 8) | (( input_port_read(machine(), "IN2") - m_last[2]) & 0xff00); /* X hi */ | |
| 98 | case 2: return (( input_port_read(machine(), "IN1") - m_last[1]) & 0x00ff) | (((input_port_read(machine(), "IN3") - m_last[3]) & 0x00ff) << 8); /* Y lo */ | |
| 99 | case 3: return (((input_port_read(machine(), "IN1") - m_last[1]) & 0xff00) >> 8) | (( input_port_read(machine(), "IN3") - m_last[3]) & 0xff00); /* Y hi */ | |
| 96 | case 0: return (( ioport("IN0")->read() - m_last[0]) & 0x00ff) | (((ioport("IN2")->read() - m_last[2]) & 0x00ff) << 8); /* X lo */ | |
| 97 | case 1: return (((ioport("IN0")->read() - m_last[0]) & 0xff00) >> 8) | (( ioport("IN2")->read() - m_last[2]) & 0xff00); /* X hi */ | |
| 98 | case 2: return (( ioport("IN1")->read() - m_last[1]) & 0x00ff) | (((ioport("IN3")->read() - m_last[3]) & 0x00ff) << 8); /* Y lo */ | |
| 99 | case 3: return (((ioport("IN1")->read() - m_last[1]) & 0xff00) >> 8) | (( ioport("IN3")->read() - m_last[3]) & 0xff00); /* Y hi */ | |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| r15082 | r15083 | |
| 246 | 246 | |
| 247 | 247 | static INPUT_PORTS_START( common ) |
| 248 | 248 | PORT_START("DSW") |
| 249 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_CONDITION("DSW", 0x0010, | |
| 249 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_CONDITION("DSW", 0x0010, | |
| 250 | 250 | PORT_DIPSETTING( 0x000a, DEF_STR( 6C_1C ) ) |
| 251 | 251 | PORT_DIPSETTING( 0x000b, DEF_STR( 5C_1C ) ) |
| 252 | 252 | PORT_DIPSETTING( 0x000c, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 263 | 263 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_5C ) ) |
| 264 | 264 | PORT_DIPSETTING( 0x0005, DEF_STR( 1C_6C ) ) |
| 265 | 265 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 266 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW1:1,2") PORT_CONDITION("DSW", 0x0010, | |
| 266 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_A )) PORT_DIPLOCATION("SW1:1,2") PORT_CONDITION("DSW", 0x0010, | |
| 267 | 267 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 268 | 268 | PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) |
| 269 | 269 | PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) ) |
| 270 | 270 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) |
| 271 | PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_B )) PORT_DIPLOCATION("SW1:3,4") PORT_CONDITION("DSW", 0x0010, | |
| 271 | PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_B )) PORT_DIPLOCATION("SW1:3,4") PORT_CONDITION("DSW", 0x0010, | |
| 272 | 272 | PORT_DIPSETTING( 0x000c, DEF_STR( 1C_2C ) ) |
| 273 | 273 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) ) |
| 274 | 274 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | return; |
| 135 | 135 | |
| 136 | 136 | /* EEPROM */ |
| 137 | i | |
| 137 | iop | |
| 138 | 138 | |
| 139 | 139 | m_irq_enabled = (data >> 6) & 1; |
| 140 | 140 | |
| r15082 | r15083 | |
| 322 | 322 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 323 | 323 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM ready */ |
| 324 | 324 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) |
| 325 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 325 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* not really vblank, object related. Its timed, otherwise sprites flicker */ | |
| 326 | 326 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 327 | 327 | |
| 328 | 328 | PORT_START( "EEPROMOUT" ) |
| r15082 | r15083 | |
| 378 | 378 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 379 | 379 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM ready */ |
| 380 | 380 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) |
| 381 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 381 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* not really vblank, object related. Its timed, otherwise sprites flicker */ | |
| 382 | 382 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 383 | 383 | |
| 384 | 384 | PORT_START( "EEPROMOUT" ) |
| r15082 | r15083 | |
|---|---|---|
| 1168 | 1168 | case 0x1000/2: |
| 1169 | 1169 | { |
| 1170 | 1170 | static const char *const sysports[] = { "SERVICE", "P1", "UNUSED", "P2" }; |
| 1171 | return | |
| 1171 | return | |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | 1174 | case 0x2000/2: |
| 1175 | return | |
| 1175 | return | |
| 1176 | 1176 | } |
| 1177 | 1177 | logerror("%06X:standard_io_r - unknown read access to address %04X\n", cpu_get_pc(&space->device()), offset * 2); |
| 1178 | 1178 | return segaic16_open_bus_r(space, 0, mem_mask); |
| r15082 | r15083 | |
| 1450 | 1450 | } |
| 1451 | 1451 | |
| 1452 | 1452 | /* read inputs */ |
| 1453 | workram[inputoffs] = ~in | |
| 1453 | workram[inputoffs] = ~machine.root_device().ioport | |
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | 1456 | static void altbeasj_i8751_sim(running_machine &machine) |
| r15082 | r15083 | |
| 1534 | 1534 | } |
| 1535 | 1535 | |
| 1536 | 1536 | /* read inputs */ |
| 1537 | workram[0x2cd0/2] = (input_port_read(machine, "P1") << 8) | input_port_read(machine, "P2"); | |
| 1538 | workram[0x2c96/2] = input_port_read(machine, "SERVICE") << 8; | |
| 1537 | workram[0x2cd0/2] = (state->ioport("P1")->read() << 8) | state->ioport("P2")->read(); | |
| 1538 | workram[0x2c96/2] = machine.root_device().ioport("SERVICE")->read() << 8; | |
| 1539 | 1539 | } |
| 1540 | 1540 | |
| 1541 | 1541 | |
| r15082 | r15083 | |
| 1557 | 1557 | } |
| 1558 | 1558 | |
| 1559 | 1559 | /* read inputs */ |
| 1560 | workram[0x01e6/2] = input_port_read(machine, "SERVICE") << 8; | |
| 1561 | workram[0x01e8/2] = input_port_read(machine, "P1") << 8; | |
| 1562 | workram[0x01ea/2] = input_port_read(machine, "P2") << 8; | |
| 1560 | workram[0x01e6/2] = machine.root_device().ioport("SERVICE")->read() << 8; | |
| 1561 | workram[0x01e8/2] = machine.root_device().ioport("P1")->read() << 8; | |
| 1562 | workram[0x01ea/2] = machine.root_device().ioport("P2")->read() << 8; | |
| 1563 | 1563 | } |
| 1564 | 1564 | |
| 1565 | 1565 | |
| r15082 | r15083 | |
| 1591 | 1591 | |
| 1592 | 1592 | static READ16_HANDLER( aceattac_custom_io_r ) |
| 1593 | 1593 | { |
| 1594 | segas1x_state *state = space->machine().driver_data<segas1x_state>(); | |
| 1594 | 1595 | switch (offset & (0x3000/2)) |
| 1595 | 1596 | { |
| 1596 | 1597 | case 0x1000/2: |
| 1597 | 1598 | switch (offset & 3) |
| 1598 | 1599 | { |
| 1599 | 1600 | case 0x01: |
| 1600 | return | |
| 1601 | return s | |
| 1601 | 1602 | |
| 1602 | 1603 | case 0x02: |
| 1603 | return | |
| 1604 | return s | |
| 1604 | 1605 | // low nibble: Sega 56pin Edge "16"-"19" // rotary switch 10positions 4bit-binary-pinout |
| 1605 | 1606 | // high nibble: Sega 56pin Edge "T"-"W" // ditto |
| 1606 | 1607 | |
| 1607 | 1608 | case 0x03: |
| 1608 | return | |
| 1609 | return s | |
| 1609 | 1610 | } |
| 1610 | 1611 | break; |
| 1611 | 1612 | case 0x3000/2: |
| 1612 | 1613 | switch (offset & 3) |
| 1613 | 1614 | { |
| 1614 | case 0: return input_port_read(space->machine(), "HANDX1"); | |
| 1615 | case 1: return input_port_read(space->machine(), "TRACKX1"); | |
| 1616 | case 2: return input_port_read(space->machine(), "TRACKY1"); | |
| 1617 | case 3: return input_port_read(space->machine(), "HANDY1"); | |
| 1618 | case 4: return input_port_read(space->machine(), "HANDX2"); | |
| 1619 | case 5: return input_port_read(space->machine(), "TRACKX2"); | |
| 1620 | case 6: return input_port_read(space->machine(), "TRACKY2"); | |
| 1621 | case 7: return input_port_read(space->machine(), "HANDY2"); | |
| 1615 | case 0: return state->ioport("HANDX1")->read(); | |
| 1616 | case 1: return state->ioport("TRACKX1")->read(); | |
| 1617 | case 2: return state->ioport("TRACKY1")->read(); | |
| 1618 | case 3: return state->ioport("HANDY1")->read(); | |
| 1619 | case 4: return state->ioport("HANDX2")->read(); | |
| 1620 | case 5: return state->ioport("TRACKX2")->read(); | |
| 1621 | case 6: return state->ioport("TRACKY2")->read(); | |
| 1622 | case 7: return state->ioport("HANDY2")->read(); | |
| 1622 | 1623 | } |
| 1623 | 1624 | break; |
| 1624 | 1625 | } |
| r15082 | r15083 | |
| 1656 | 1657 | |
| 1657 | 1658 | static READ16_HANDLER( dunkshot_custom_io_r ) |
| 1658 | 1659 | { |
| 1660 | segas1x_state *state = space->machine().driver_data<segas1x_state>(); | |
| 1659 | 1661 | switch (offset & (0x3000/2)) |
| 1660 | 1662 | { |
| 1661 | 1663 | case 0x3000/2: |
| 1662 | 1664 | switch ((offset/2) & 7) |
| 1663 | 1665 | { |
| 1664 | case 0: return (input_port_read(space->machine(), "ANALOGX1") << 4) >> (8 * (offset & 1)); | |
| 1665 | case 1: return (input_port_read(space->machine(), "ANALOGY1") << 4) >> (8 * (offset & 1)); | |
| 1666 | case 2: return (input_port_read(space->machine(), "ANALOGX2") << 4) >> (8 * (offset & 1)); | |
| 1667 | case 3: return (input_port_read(space->machine(), "ANALOGY2") << 4) >> (8 * (offset & 1)); | |
| 1668 | case 4: return (input_port_read(space->machine(), "ANALOGX3") << 4) >> (8 * (offset & 1)); | |
| 1669 | case 5: return (input_port_read(space->machine(), "ANALOGY3") << 4) >> (8 * (offset & 1)); | |
| 1670 | case 6: return (input_port_read(space->machine(), "ANALOGX4") << 4) >> (8 * (offset & 1)); | |
| 1671 | case 7: return (input_port_read(space->machine(), "ANALOGY4") << 4) >> (8 * (offset & 1)); | |
| 1666 | case 0: return (state->ioport("ANALOGX1")->read() << 4) >> (8 * (offset & 1)); | |
| 1667 | case 1: return (state->ioport("ANALOGY1")->read() << 4) >> (8 * (offset & 1)); | |
| 1668 | case 2: return (state->ioport("ANALOGX2")->read() << 4) >> (8 * (offset & 1)); | |
| 1669 | case 3: return (state->ioport("ANALOGY2")->read() << 4) >> (8 * (offset & 1)); | |
| 1670 | case 4: return (state->ioport("ANALOGX3")->read() << 4) >> (8 * (offset & 1)); | |
| 1671 | case 5: return (state->ioport("ANALOGY3")->read() << 4) >> (8 * (offset & 1)); | |
| 1672 | case 6: return (state->ioport("ANALOGX4")->read() << 4) >> (8 * (offset & 1)); | |
| 1673 | case 7: return (state->ioport("ANALOGY4")->read() << 4) >> (8 * (offset & 1)); | |
| 1672 | 1674 | } |
| 1673 | 1675 | break; |
| 1674 | 1676 | } |
| r15082 | r15083 | |
| 1714 | 1716 | switch (offset & 0x30/2) |
| 1715 | 1717 | { |
| 1716 | 1718 | case 0x20/2: |
| 1717 | state->m_hwc_input_value = | |
| 1719 | state->m_hwc_input_value = s | |
| 1718 | 1720 | break; |
| 1719 | 1721 | |
| 1720 | 1722 | case 0x30/2: |
| r15082 | r15083 | |
| 1741 | 1743 | |
| 1742 | 1744 | static READ16_HANDLER( passshtj_custom_io_r ) |
| 1743 | 1745 | { |
| 1746 | segas1x_state *state = space->machine().driver_data<segas1x_state>(); | |
| 1744 | 1747 | switch (offset & (0x3000/2)) |
| 1745 | 1748 | { |
| 1746 | 1749 | case 0x3000/2: |
| 1747 | 1750 | switch (offset & 3) |
| 1748 | 1751 | { |
| 1749 | case 0: return input_port_read(space->machine(), "P1"); | |
| 1750 | case 1: return input_port_read(space->machine(), "P2"); | |
| 1751 | case 2: return input_port_read(space->machine(), "P3"); | |
| 1752 | case 3: return input_port_read(space->machine(), "P4"); | |
| 1752 | case 0: return state->ioport("P1")->read(); | |
| 1753 | case 1: return state->ioport("P2")->read(); | |
| 1754 | case 2: return state->ioport("P3")->read(); | |
| 1755 | case 3: return state->ioport("P4")->read(); | |
| 1753 | 1756 | } |
| 1754 | 1757 | break; |
| 1755 | 1758 | } |
| r15082 | r15083 | |
| 1766 | 1769 | |
| 1767 | 1770 | static READ16_HANDLER( sdi_custom_io_r ) |
| 1768 | 1771 | { |
| 1772 | segas1x_state *state = space->machine().driver_data<segas1x_state>(); | |
| 1769 | 1773 | switch (offset & (0x3000/2)) |
| 1770 | 1774 | { |
| 1771 | 1775 | case 0x3000/2: |
| 1772 | 1776 | switch ((offset/2) & 3) |
| 1773 | 1777 | { |
| 1774 | case 0: return input_port_read(space->machine(), "ANALOGX1"); | |
| 1775 | case 1: return input_port_read(space->machine(), "ANALOGY1"); | |
| 1776 | case 2: return input_port_read(space->machine(), "ANALOGX2"); | |
| 1777 | case 3: return input_port_read(space->machine(), "ANALOGY2"); | |
| 1778 | case 0: return state->ioport("ANALOGX1")->read(); | |
| 1779 | case 1: return state->ioport("ANALOGY1")->read(); | |
| 1780 | case 2: return state->ioport("ANALOGX2")->read(); | |
| 1781 | case 3: return state->ioport("ANALOGY2")->read(); | |
| 1778 | 1782 | } |
| 1779 | 1783 | break; |
| 1780 | 1784 | } |
| r15082 | r15083 | |
| 1800 | 1804 | switch (offset & 3) |
| 1801 | 1805 | { |
| 1802 | 1806 | case 1: |
| 1803 | if ( | |
| 1807 | if (s | |
| 1804 | 1808 | return 0xff & ~(1 << state->m_mj_input_num); |
| 1805 | 1809 | return 0xff; |
| 1806 | 1810 | |
| 1807 | 1811 | case 2: |
| 1808 | return | |
| 1812 | return s | |
| 1809 | 1813 | } |
| 1810 | 1814 | break; |
| 1811 | 1815 | } |
| r15082 | r15083 | |
|---|---|---|
| 830 | 830 | } |
| 831 | 831 | |
| 832 | 832 | #define SATURN_PAD_P1(_mask_, _val_) \ |
| 833 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 834 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 835 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 836 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 837 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 838 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 839 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 C") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 840 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 841 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P1 R") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 842 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 843 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 844 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Z") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 845 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("P1 L") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 846 | PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) //read '1' when direct mode is polled | |
| 833 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 834 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 835 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 836 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 837 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 838 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 839 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 C") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 840 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 841 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P1 R") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 842 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 843 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 844 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Z") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 845 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("P1 L") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 846 | PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) //read '1' when direct mode is polled | |
| 847 | 847 | |
| 848 | 848 | #define SATURN_PAD_P2(_mask_, _val_) \ |
| 849 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 850 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 851 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 852 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 853 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 854 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 855 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 C") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 856 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 857 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P2 R") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 858 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 859 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 860 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Z") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 861 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("P2 L") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 862 | PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) //read '1' when direct mode is polled | |
| 849 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 850 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 851 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 852 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 853 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 854 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 855 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 C") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 856 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 857 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P2 R") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 858 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 859 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 860 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Z") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 861 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("P2 L") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 862 | PORT_BIT( 0x0007, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) //read '1' when direct mode is polled | |
| 863 | 863 | |
| 864 | 864 | #define MD_PAD_P1(_mask_, _val_) \ |
| 865 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 866 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 867 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 868 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 869 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 870 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 871 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 C") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 872 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 873 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P1 Mode") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 874 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 875 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 876 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Z") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 877 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) //read '1' when direct mode is polled | |
| 865 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 866 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 867 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 868 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 869 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 870 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 871 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 C") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 872 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 873 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P1 Mode") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 874 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 875 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 876 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Z") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 877 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) //read '1' when direct mode is polled | |
| 878 | 878 | |
| 879 | 879 | #define MD_PAD_P2(_mask_, _val_) \ |
| 880 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 881 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 882 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 883 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 884 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 885 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 886 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 C") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 887 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 888 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P2 Mode") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 889 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 890 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 891 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Z") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) \ | |
| 892 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, PORTCOND_EQUALS, _val_) //read '1' when direct mode is polled | |
| 880 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 881 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 882 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 883 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 884 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 885 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 886 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 C") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 887 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 888 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("P2 Mode") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 889 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 890 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 891 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Z") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) \ | |
| 892 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("INPUT_TYPE", _mask_, EQUALS, _val_) //read '1' when direct mode is polled | |
| 893 | 893 | |
| 894 | #define SATURN_KEYBOARD PORT_CONDITION("INPUT_TYPE", 0x0f, | |
| 894 | #define SATURN_KEYBOARD PORT_CONDITION("INPUT_TYPE", 0x0f, | |
| 895 | 895 | |
| 896 | 896 | INPUT_CHANGED_MEMBER(saturn_state::nmi_reset) |
| 897 | 897 | { |
| r15082 | r15083 | |
| 1098 | 1098 | PORT_BIT(0x08,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) /*PORT_CHAR('3')*/ PORT_CHANGED_MEMBER(DEVICE_SELF, saturn_state, key_stroke, 0x7b) PORT_PLAYER(1) SATURN_KEYBOARD |
| 1099 | 1099 | |
| 1100 | 1100 | PORT_START("MOUSEB1") |
| 1101 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pointer Left Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1102 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pointer Right Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1103 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Pointer Middle Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1104 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Pointer Start Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1105 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Mouse Left Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1106 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Mouse Right Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1107 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Mouse Middle Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1108 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Mouse Start Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1101 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pointer Left Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1102 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pointer Right Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1103 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Pointer Middle Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1104 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Pointer Start Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1105 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Mouse Left Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1106 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Mouse Right Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1107 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Mouse Middle Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1108 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Mouse Start Button") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1109 | 1109 | |
| 1110 | 1110 | PORT_START("MOUSEX1") |
| 1111 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P1 Pointer X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1112 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P1 Mouse X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1111 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P1 Pointer X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1112 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P1 Mouse X") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1113 | 1113 | |
| 1114 | 1114 | PORT_START("MOUSEY1") |
| 1115 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P1 Pointer Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 1116 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P1 Mouse Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x08) | |
| 1115 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P1 Pointer Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x04) | |
| 1116 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P1 Mouse Y") PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x08) | |
| 1117 | 1117 | |
| 1118 | 1118 | PORT_START("MOUSEB2") |
| 1119 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Pointer Left Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1120 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Pointer Right Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1121 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Pointer Middle Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1122 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P2 Pointer Start Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1123 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Mouse Left Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1124 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Mouse Right Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1125 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Mouse Middle Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1126 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P2 Mouse Start Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1119 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Pointer Left Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1120 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Pointer Right Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1121 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Pointer Middle Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1122 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P2 Pointer Start Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1123 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Mouse Left Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1124 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Mouse Right Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1125 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Mouse Middle Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1126 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P2 Mouse Start Button") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1127 | 1127 | |
| 1128 | 1128 | PORT_START("MOUSEX2") |
| 1129 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P2 Pointer X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1130 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P2 Mouse X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1129 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P2 Pointer X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1130 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_NAME("P2 Mouse X") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1131 | 1131 | |
| 1132 | 1132 | PORT_START("MOUSEY2") |
| 1133 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P2 Pointer Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 1134 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P2 Mouse Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x80) | |
| 1133 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P2 Pointer Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x40) | |
| 1134 | PORT_BIT(0xffff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_MINMAX(0x000, 0xffff) PORT_KEYDELTA(2) PORT_RESET PORT_REVERSE PORT_NAME("P2 Mouse Y") PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x80) | |
| 1135 | 1135 | |
| 1136 | 1136 | PORT_START("AN_JOY1") |
| 1137 | 1137 | SATURN_PAD_P1(0x0f, 0x01) // racing device |
| r15082 | r15083 | |
| 1142 | 1142 | SATURN_PAD_P2(0xf0, 0x20) // analog controller |
| 1143 | 1143 | |
| 1144 | 1144 | PORT_START("AN_X1") |
| 1145 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick X") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1146 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick X") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1145 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick X") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x01) | |
| 1146 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick X") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x02) | |
| 1147 | 1147 | |
| 1148 | 1148 | PORT_START("AN_Y1") |
| 1149 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick Y") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1150 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick Y") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1149 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick Y") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x01) | |
| 1150 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick Y") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x02) | |
| 1151 | 1151 | |
| 1152 | 1152 | PORT_START("AN_Z1") |
| 1153 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick Z") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1154 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick Z") PORT_CONDITION("INPUT_TYPE", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1153 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 Racing Stick Z") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x01) | |
| 1154 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(1) PORT_NAME("P1 AD Stick Z") PORT_CONDITION("INPUT_TYPE", 0x0f, EQUALS, 0x02) | |
| 1155 | 1155 | |
| 1156 | 1156 | PORT_START("AN_X2") |
| 1157 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick X") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1158 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick X") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1157 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick X") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x10) | |
| 1158 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick X") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x20) | |
| 1159 | 1159 | |
| 1160 | 1160 | PORT_START("AN_Y2") |
| 1161 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick Y") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1162 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick Y") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1161 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick Y") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x10) | |
| 1162 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick Y") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x20) | |
| 1163 | 1163 | |
| 1164 | 1164 | PORT_START("AN_Z2") |
| 1165 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick Z") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1166 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick Z") PORT_CONDITION("INPUT_TYPE", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1165 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 Racing Stick Z") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x10) | |
| 1166 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Z ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(200) PORT_PLAYER(2) PORT_NAME("P2 AD Stick Z") PORT_CONDITION("INPUT_TYPE", 0xf0, EQUALS, 0x20) | |
| 1167 | 1167 | |
| 1168 | 1168 | PORT_START("MD_JOY1") |
| 1169 | 1169 | MD_PAD_P1(0x0f, 0x06) // MD 3 buttons pad |
| r15082 | r15083 | |
| 1468 | 1468 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1469 | 1469 | |
| 1470 | 1470 | PORT_MODIFY("PORTC") |
| 1471 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1472 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1471 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1472 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1473 | 1473 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1474 | 1474 | |
| 1475 | 1475 | PORT_MODIFY("PORTE") |
| r15082 | r15083 | |
| 1479 | 1479 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1480 | 1480 | |
| 1481 | 1481 | PORT_START("P1_KEY0") |
| 1482 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1483 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1484 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1485 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1486 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1487 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1488 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1489 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1490 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1482 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1483 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1484 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1485 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1486 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1487 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1488 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1489 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1490 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1491 | 1491 | |
| 1492 | 1492 | PORT_START("P1_KEY1") |
| 1493 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1494 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1495 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1496 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1498 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1499 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1500 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1501 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1493 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1494 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1495 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1496 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1498 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1499 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1500 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1501 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1502 | 1502 | |
| 1503 | 1503 | PORT_START("P1_KEY2") |
| 1504 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1505 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1506 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1507 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1508 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1509 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1510 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1511 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1512 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1504 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1505 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1506 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1507 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1508 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1509 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1510 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1511 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1512 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1513 | 1513 | |
| 1514 | 1514 | PORT_START("P1_KEY3") |
| 1515 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1516 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1517 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1518 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1519 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1520 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1521 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1522 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x00) | |
| 1523 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1524 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1525 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1526 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1527 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1528 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1529 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1530 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, PORTCOND_EQUALS, 0x01) | |
| 1515 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1516 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1517 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1518 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1519 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1520 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1521 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1522 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x00) | |
| 1523 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1524 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1525 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1526 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1527 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1528 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1529 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1530 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("IO_TYPE", 0x01, EQUALS, 0x01) | |
| 1531 | 1531 | |
| 1532 | 1532 | PORT_START("P1_KEY4") |
| 1533 | 1533 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) /* F/F is there, but these two games are single player so it isn't connected */ |
| r15082 | r15083 | |
| 2055 | 2055 | |
| 2056 | 2056 | stvcd_reset( machine ); |
| 2057 | 2057 | |
| 2058 | state->m_cart_type = i | |
| 2058 | state->m_cart_type = state->iop | |
| 2059 | 2059 | |
| 2060 | 2060 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x02400000, 0x027fffff, FUNC(saturn_null_ram_r), FUNC(saturn_null_ram_w)); |
| 2061 | 2061 | machine.device("slave")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x02400000, 0x027fffff, FUNC(saturn_null_ram_r), FUNC(saturn_null_ram_w)); |
| r15082 | r15083 | |
|---|---|---|
| 162 | 162 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 163 | 163 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 164 | 164 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 165 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 165 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 166 | 166 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 167 | 167 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 168 | 168 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | READ32_MEMBER(atarigx2_state::special_port2_r) |
| 69 | 69 | { |
| 70 | int temp = i | |
| 70 | int temp = iop | |
| 71 | 71 | if (m_cpu_to_sound_ready) temp ^= 0x0020; |
| 72 | 72 | if (m_sound_to_cpu_ready) temp ^= 0x0010; |
| 73 | 73 | temp ^= 0x0008; /* A2D.EOC always high for now */ |
| r15082 | r15083 | |
| 77 | 77 | |
| 78 | 78 | READ32_MEMBER(atarigx2_state::special_port3_r) |
| 79 | 79 | { |
| 80 | int temp = i | |
| 80 | int temp = iop | |
| 81 | 81 | return (temp << 16) | temp; |
| 82 | 82 | } |
| 83 | 83 | |
| r15082 | r15083 | |
| 89 | 89 | switch (offset) |
| 90 | 90 | { |
| 91 | 91 | case 0: |
| 92 | return (i | |
| 92 | return (iop | |
| 93 | 93 | case 1: |
| 94 | return (i | |
| 94 | return (iop | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return 0; |
| r15082 | r15083 | |
| 1205 | 1205 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */ |
| 1206 | 1206 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDFULL */ |
| 1207 | 1207 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 1208 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1208 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1209 | 1209 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1210 | 1210 | |
| 1211 | 1211 | PORT_START("SPECIAL") /* 68.STATUS (A2=1) */ |
| r15082 | r15083 | |
| 1253 | 1253 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */ |
| 1254 | 1254 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDFULL */ |
| 1255 | 1255 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 1256 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1256 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1257 | 1257 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1258 | 1258 | |
| 1259 | 1259 | PORT_START("SPECIAL") /* 68.STATUS (A2=1) */ |
| r15082 | r15083 | |
| 1301 | 1301 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDIRQ */ |
| 1302 | 1302 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* /AUDFULL */ |
| 1303 | 1303 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 1304 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1304 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1305 | 1305 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1306 | 1306 | |
| 1307 | 1307 | PORT_START("SPECIAL") /* 68.STATUS (A2=1) */ |
| r15082 | r15083 | |
|---|---|---|
| 296 | 296 | { |
| 297 | 297 | if (ACCESSING_BITS_24_31) |
| 298 | 298 | { |
| 299 | r |= i | |
| 299 | r |= iop | |
| 300 | 300 | } |
| 301 | 301 | if (ACCESSING_BITS_16_23) |
| 302 | 302 | { |
| 303 | r |= i | |
| 303 | r |= iop | |
| 304 | 304 | } |
| 305 | 305 | if (ACCESSING_BITS_8_15) |
| 306 | 306 | { |
| 307 | r |= i | |
| 307 | r |= iop | |
| 308 | 308 | } |
| 309 | 309 | if (ACCESSING_BITS_0_7) |
| 310 | 310 | { |
| r15082 | r15083 | |
| 315 | 315 | { |
| 316 | 316 | if (ACCESSING_BITS_24_31) |
| 317 | 317 | { |
| 318 | r |= i | |
| 318 | r |= iop | |
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | return r; |
| r15082 | r15083 | |
| 625 | 625 | int value = 0; |
| 626 | 626 | switch (input) |
| 627 | 627 | { |
| 628 | case 0: value = input_port_read(device->machine(), "ANALOG1") - 0x800; break; | |
| 629 | case 1: value = input_port_read(device->machine(), "ANALOG2"); break; | |
| 630 | case 2: value = input_port_read(device->machine(), "ANALOG3"); break; | |
| 631 | case 3: value = input_port_read(device->machine(), "ANALOG4"); break; | |
| 632 | case 4: value = input_port_read(device->machine(), "ANALOG5"); break; | |
| 628 | case 0: value = device->machine().root_device().ioport("ANALOG1")->read() - 0x800; break; | |
| 629 | case 1: value = device->machine().root_device().ioport("ANALOG2")->read(); break; | |
| 630 | case 2: value = device->machine().root_device().ioport("ANALOG3")->read(); break; | |
| 631 | case 3: value = device->machine().root_device().ioport("ANALOG4")->read(); break; | |
| 632 | case 4: value = device->machine().root_device().ioport("ANALOG5")->read(); break; | |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | return (double)(value) / 2047.0; |
| r15082 | r15083 | |
|---|---|---|
| 54 | 54 | { |
| 55 | 55 | // also clears irq |
| 56 | 56 | cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE); |
| 57 | return i | |
| 57 | return iop | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | static ADDRESS_MAP_START( circus_map, AS_PROGRAM, 8, circus_state ) |
| r15082 | r15083 | |
| 96 | 96 | PORT_DIPSETTING( 0x00, "Single Line" ) |
| 97 | 97 | PORT_DIPSETTING( 0x20, "Super Bonus" ) |
| 98 | 98 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "14A:1" ) /* Not mentioned in the manual */ |
| 99 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 99 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 100 | 100 | |
| 101 | 101 | PORT_START("PADDLE") |
| 102 | 102 | PORT_BIT( 0xff, 115, IPT_PADDLE ) PORT_MINMAX(64,167) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) |
| r15082 | r15083 | |
| 130 | 130 | PORT_DIPSETTING( 0x20, "5 seconds" ) |
| 131 | 131 | PORT_DIPSETTING( 0x40, "7 seconds" ) |
| 132 | 132 | PORT_DIPSETTING( 0x60, "9 seconds" ) |
| 133 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 133 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 134 | 134 | |
| 135 | 135 | PORT_START("PADDLE") |
| 136 | 136 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED) |
| r15082 | r15083 | |
| 164 | 164 | PORT_DIPSETTING( 0x10, "Credit Awarded" ) |
| 165 | 165 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "14A:2" ) /* Not mentioned in the manual */ |
| 166 | 166 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "14A:1" ) /* Not mentioned in the manual */ |
| 167 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 167 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 168 | 168 | |
| 169 | 169 | PORT_START("PADDLE") |
| 170 | 170 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED) |
| r15082 | r15083 | |
| 204 | 204 | PORT_DIPSETTING( 0x00, "No Award" ) |
| 205 | 205 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "14A:2" ) /* Not mentioned in the manual */ |
| 206 | 206 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "14A:1" ) /* Not mentioned in the manual */ |
| 207 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 207 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 208 | 208 | |
| 209 | 209 | PORT_START("PADDLE") |
| 210 | 210 | PORT_BIT( 0xff, 115, IPT_PADDLE ) PORT_MINMAX(64,167) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 80 | 80 | |
| 81 | 81 | PORT_START("SENSE") |
| 82 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 82 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 83 | 83 | |
| 84 | 84 | PORT_START("1E85") |
| 85 | 85 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 147 | 147 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 148 | 148 | |
| 149 | 149 | PORT_START("SENSE") |
| 150 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 150 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 151 | 151 | |
| 152 | 152 | PORT_START("1E85") |
| 153 | 153 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| r15082 | r15083 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | READ16_MEMBER(relief_state::special_port2_r) |
| 97 | 97 | { |
| 98 | int result = i | |
| 98 | int result = iop | |
| 99 | 99 | if (m_cpu_to_sound_ready) result ^= 0x0020; |
| 100 | 100 | if (!(result & 0x0080) || atarigen_get_hblank(*machine().primary_screen)) result ^= 0x0001; |
| 101 | 101 | return result; |
| r15082 | r15083 | |
| 235 | 235 | PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 236 | 236 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* tested before writing to 260040 */ |
| 237 | 237 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) |
| 238 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_VBLANK | |
| 238 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 239 | 239 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 240 | 240 | |
| 241 | 241 | PORT_START("260012") /* 260012 */ |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | const char *tag = (const char *)param; |
| 47 | 47 | UINT32 ipt = 0; |
| 48 | 48 | |
| 49 | ipt = ((i | |
| 49 | ipt = ((iop | |
| 50 | 50 | |
| 51 | 51 | return ipt; |
| 52 | 52 | } |
| r15082 | r15083 | |
| 62 | 62 | static const char *const iptnames[] = { "IN0", "IN1", "AN0", "AN1", "IN2", "IN3" }; |
| 63 | 63 | |
| 64 | 64 | if (offset < 6) |
| 65 | return i | |
| 65 | return iop | |
| 66 | 66 | |
| 67 | 67 | logerror("CPU #0 PC %06x: warning - read unmapped control address %06x\n", cpu_get_pc(&space.device()), offset); |
| 68 | 68 | return 0xffffffff; |
| r15082 | r15083 | |
| 90 | 90 | case 0x04: /* Eeprom */ |
| 91 | 91 | if (ACCESSING_BITS_0_7) |
| 92 | 92 | { |
| 93 | i | |
| 93 | iop | |
| 94 | 94 | } |
| 95 | 95 | return; |
| 96 | 96 |
| r15082 | r15083 | |
|---|---|---|
| 257 | 257 | READ16_MEMBER(jpmsys5_state::coins_r) |
| 258 | 258 | { |
| 259 | 259 | if (offset == 2) |
| 260 | return i | |
| 260 | return iop | |
| 261 | 261 | else |
| 262 | 262 | return 0xffff; |
| 263 | 263 | } |
| r15082 | r15083 | |
| 280 | 280 | READ16_MEMBER(jpmsys5_state::mux_r) |
| 281 | 281 | { |
| 282 | 282 | if (offset == 0x81/2) |
| 283 | return i | |
| 283 | return iop | |
| 284 | 284 | |
| 285 | 285 | return 0xffff; |
| 286 | 286 | } |
| r15082 | r15083 | |
| 410 | 410 | |
| 411 | 411 | /* Each touch screen packet is 3 bytes */ |
| 412 | 412 | m_touch_data[0] = 0x2a; |
| 413 | m_touch_data[1] = 0x7 - (input_port_read(machine(), "TOUCH_Y") >> 5) + 0x30; | |
| 414 | m_touch_data[2] = (input_port_read(machine(), "TOUCH_X") >> 5) + 0x30; | |
| 413 | m_touch_data[1] = 0x7 - (ioport("TOUCH_Y")->read() >> 5) + 0x30; | |
| 414 | m_touch_data[2] = (ioport("TOUCH_X")->read() >> 5) + 0x30; | |
| 415 | 415 | |
| 416 | 416 | /* Start sending the data to the 68000 serially */ |
| 417 | 417 | m_touch_data_count = 0; |
| r15082 | r15083 | |
|---|---|---|
| 206 | 206 | BANG |
| 207 | 207 | ============================================================================*/ |
| 208 | 208 | |
| 209 | READ16_MEMBER(gaelco2_state::p1_gun_x){return (input_port_read(machine(), "LIGHT0_X") * 320 / 0x100) + 1;} | |
| 210 | READ16_MEMBER(gaelco2_state::p1_gun_y){return (input_port_read(machine(), "LIGHT0_Y") * 240 / 0x100) - 4;} | |
| 211 | READ16_MEMBER(gaelco2_state::p2_gun_x){return (input_port_read(machine(), "LIGHT1_X") * 320 / 0x100) + 1;} | |
| 212 | READ16_MEMBER(gaelco2_state::p2_gun_y){return (input_port_read(machine(), "LIGHT1_Y") * 240 / 0x100) - 4;} | |
| 209 | READ16_MEMBER(gaelco2_state::p1_gun_x){return (ioport("LIGHT0_X")->read() * 320 / 0x100) + 1;} | |
| 210 | READ16_MEMBER(gaelco2_state::p1_gun_y){return (ioport("LIGHT0_Y")->read() * 240 / 0x100) - 4;} | |
| 211 | READ16_MEMBER(gaelco2_state::p2_gun_x){return (ioport("LIGHT1_X")->read() * 320 / 0x100) + 1;} | |
| 212 | READ16_MEMBER(gaelco2_state::p2_gun_y){return (ioport("LIGHT1_Y")->read() * 240 / 0x100) - 4;} | |
| 213 | 213 | |
| 214 | 214 | static ADDRESS_MAP_START( bang_map, AS_PROGRAM, 16, gaelco2_state ) |
| 215 | 215 | AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */ |
| r15082 | r15083 | |
|---|---|---|
| 129 | 129 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Controls ) ) |
| 130 | 130 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 131 | 131 | PORT_DIPSETTING( 0x40, DEF_STR( Dual ) ) |
| 132 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 132 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 133 | 133 | INPUT_PORTS_END |
| 134 | 134 | |
| 135 | 135 |
| r15082 | r15083 | |
|---|---|---|
| 202 | 202 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 203 | 203 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 204 | 204 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 205 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 205 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") //this is sprite flag on Irem M92, if this is active low then Dream Soccer '94 is unplayably slow | |
| 206 | 206 | |
| 207 | 207 | /* DIP switch bank 3 */ |
| 208 | 208 | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| r15082 | r15083 | |
| 369 | 369 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 370 | 370 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 371 | 371 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 372 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 372 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") //this is sprite flag on Irem M92, if this is active low then Dream Soccer '94 is unplayably slow | |
| 373 | 373 | PORT_DIPNAME( 0x0100, 0x0000, "DSW3" ) |
| 374 | 374 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 375 | 375 | PORT_DIPSETTING( 0x0100, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 1643 | 1643 | static DRIVER_INIT( tetrsark ) |
| 1644 | 1644 | { |
| 1645 | 1645 | arkanoid_state *state = machine.driver_data<arkanoid_state>(); |
| 1646 | UINT8 *ROM = | |
| 1646 | UINT8 *ROM = sta | |
| 1647 | 1647 | int x; |
| 1648 | 1648 | |
| 1649 | 1649 | for (x = 0; x < 0x8000; x++) |
| r15082 | r15083 | |
|---|---|---|
| 176 | 176 | { |
| 177 | 177 | switch( offset ) |
| 178 | 178 | { |
| 179 | case 0x00: return input_port_read(machine(), "SYSTEM"); | |
| 180 | case 0x01: return input_port_read(machine(), "P1"); | |
| 181 | case 0x02: return input_port_read(machine(), "P2"); | |
| 182 | case 0x03: return input_port_read(machine(), "P3"); | |
| 183 | case 0x08: return input_port_read(machine(), "DSW2"); | |
| 184 | case 0x09: return input_port_read(machine(), "DSW1"); | |
| 185 | case 0x0c: return input_port_read(machine(), "DSW3"); | |
| 179 | case 0x00: return ioport("SYSTEM")->read(); | |
| 180 | case 0x01: return ioport("P1")->read(); | |
| 181 | case 0x02: return ioport("P2")->read(); | |
| 182 | case 0x03: return ioport("P3")->read(); | |
| 183 | case 0x08: return ioport("DSW2")->read(); | |
| 184 | case 0x09: return ioport("DSW1")->read(); | |
| 185 | case 0x0c: return ioport("DSW3")->read(); | |
| 186 | 186 | default: break; |
| 187 | 187 | } |
| 188 | 188 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 237 | 237 | |
| 238 | 238 | switch (i) |
| 239 | 239 | { |
| 240 | case 0 : return input_port_read(machine(), "SYSTEM"); | |
| 241 | case 1 : return input_port_read(machine(), "P1"); | |
| 242 | case 2 : return input_port_read(machine(), "P2"); | |
| 243 | case 3 : return input_port_read(machine(), "DSW1"); | |
| 244 | case 4 : return input_port_read(machine(), "DSW2"); | |
| 240 | case 0 : return ioport("SYSTEM")->read(); | |
| 241 | case 1 : return ioport("P1")->read(); | |
| 242 | case 2 : return ioport("P2")->read(); | |
| 243 | case 3 : return ioport("DSW1")->read(); | |
| 244 | case 4 : return ioport("DSW2")->read(); | |
| 245 | 245 | default : return 0x0006; |
| 246 | 246 | } |
| 247 | 247 | } |
| r15082 | r15083 | |
| 1367 | 1367 | switch (m_protection_val) |
| 1368 | 1368 | { |
| 1369 | 1369 | case 0x02: return 0x03; |
| 1370 | case 0x51: return input_port_read(machine(), "P1"); | |
| 1371 | case 0x52: return input_port_read(machine(), "P2"); | |
| 1370 | case 0x51: return ioport("P1")->read(); | |
| 1371 | case 0x52: return ioport("P2")->read(); | |
| 1372 | 1372 | default: return m_protection_val; |
| 1373 | 1373 | } |
| 1374 | 1374 | } |
| r15082 | r15083 | |
| 3801 | 3801 | case 0x04/2: |
| 3802 | 3802 | case 0x06/2: |
| 3803 | 3803 | case 0x08/2: |
| 3804 | case 0x0a/2: res = i | |
| 3804 | case 0x0a/2: res = iop | |
| 3805 | 3805 | } |
| 3806 | 3806 | |
| 3807 | 3807 | return res; |
| r15082 | r15083 | |
| 4017 | 4017 | case 0x04/2: |
| 4018 | 4018 | case 0x06/2: |
| 4019 | 4019 | case 0x08/2: |
| 4020 | case 0x0a/2: res = i | |
| 4020 | case 0x0a/2: res = iop | |
| 4021 | 4021 | } |
| 4022 | 4022 | |
| 4023 | 4023 | return res; |
| r15082 | r15083 | |
|---|---|---|
| 271 | 271 | PORT_DIPNAME( 0x0100, 0x0100, "Coin Slot" ) PORT_DIPLOCATION("SW1:1") |
| 272 | 272 | PORT_DIPSETTING( 0x0100, "Same" ) |
| 273 | 273 | PORT_DIPSETTING( 0x0000, "Individual" ) |
| 274 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3,4") PORT_CONDITION("DSW0", 0x0100, | |
| 274 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3,4") PORT_CONDITION("DSW0", 0x0100, | |
| 275 | 275 | PORT_DIPSETTING( 0x0a00, DEF_STR( 3C_1C ) ) |
| 276 | 276 | PORT_DIPSETTING( 0x0c00, DEF_STR( 2C_1C ) ) |
| 277 | 277 | PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 280 | 280 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 281 | 281 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_5C ) ) |
| 282 | 282 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 283 | PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7") PORT_CONDITION("DSW0", 0x0100, | |
| 283 | PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7") PORT_CONDITION("DSW0", 0x0100, | |
| 284 | 284 | PORT_DIPSETTING( 0x5000, DEF_STR( 3C_1C ) ) |
| 285 | 285 | PORT_DIPSETTING( 0x6000, DEF_STR( 2C_1C ) ) |
| 286 | 286 | PORT_DIPSETTING( 0x7000, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 289 | 289 | PORT_DIPSETTING( 0x2000, DEF_STR( 1C_4C ) ) |
| 290 | 290 | PORT_DIPSETTING( 0x1000, DEF_STR( 1C_5C ) ) |
| 291 | 291 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 292 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4") PORT_CONDITION("DSW0", 0x0100, | |
| 292 | PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4") PORT_CONDITION("DSW0", 0x0100, | |
| 293 | 293 | PORT_DIPSETTING( 0x0a00, DEF_STR( 3C_1C ) ) |
| 294 | 294 | PORT_DIPSETTING( 0x0c00, DEF_STR( 2C_1C ) ) |
| 295 | 295 | PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_1C ) ) |
| r15082 | r15083 | |
| 298 | 298 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) |
| 299 | 299 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_5C ) ) |
| 300 | 300 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 301 | PORT_DIPUNUSED_DIPLOC( 0x7000, 0x7000, "SW1:5,6,7") PORT_CONDITION("DSW0", 0x0100, | |
| 301 | PORT_DIPUNUSED_DIPLOC( 0x7000, 0x7000, "SW1:5,6,7") PORT_CONDITION("DSW0", 0x0100, | |
| 302 | 302 | PORT_DIPNAME( 0x8000, 0x8000, "2 to Start, 1 to Cont." ) PORT_DIPLOCATION("SW1:8") // Other desc. was too long ! |
| 303 | 303 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 304 | 304 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r15082 | r15083 | |
|---|---|---|
| 439 | 439 | PORT_DIPSETTING( 0x08, "Mode 1" ) // routine at 0x056d: 11 21 12 16 (bit 3 active) |
| 440 | 440 | PORT_DIPSETTING( 0x00, "Mode 2" ) // 11 21 13 14 (bit 3 not active) |
| 441 | 441 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") |
| 442 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 443 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 444 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 445 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 446 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 447 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 448 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 449 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 442 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 443 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 444 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 445 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 446 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 447 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 448 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 449 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 450 | 450 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") |
| 451 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 452 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 453 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 454 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_NOTEQUALS, 0x00) | |
| 455 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 456 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 457 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 458 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 451 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 452 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 453 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 454 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, NOTEQUALS, 0x00) | |
| 455 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 456 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 457 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 458 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 459 | 459 | |
| 460 | 460 | PORT_START("DSW2") |
| 461 | 461 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| r15082 | r15083 | |
| 571 | 571 | static MACHINE_START( airbustr ) |
| 572 | 572 | { |
| 573 | 573 | airbustr_state *state = machine.driver_data<airbustr_state>(); |
| 574 | UINT8 *MASTER = machine.root_device().memregion("master")->base(); | |
| 575 | UINT8 *SLAVE = machine.root_device().memregion("slave")->base(); | |
| 574 | UINT8 *MASTER = state->memregion("master")->base(); | |
| 575 | UINT8 *SLAVE = state->memregion("slave")->base(); | |
| 576 | 576 | UINT8 *AUDIO = state->memregion("audiocpu")->base(); |
| 577 | 577 | |
| 578 | 578 | state->membank("bank1")->configure_entries(0, 3, &MASTER[0x00000], 0x4000); |
| r15082 | r15083 | |
|---|---|---|
| 374 | 374 | static MACHINE_RESET( mschamp ) |
| 375 | 375 | { |
| 376 | 376 | UINT8 *rom = machine.root_device().memregion("maincpu")->base() + 0x10000; |
| 377 | int whichbank = in | |
| 377 | int whichbank = machine.root_device().ioport | |
| 378 | 378 | |
| 379 | 379 | machine.root_device().membank("bank1")->configure_entries(0, 2, &rom[0x0000], 0x8000); |
| 380 | 380 | machine.root_device().membank("bank2")->configure_entries(0, 2, &rom[0x4000], 0x8000); |
| r15082 | r15083 | |
| 541 | 541 | |
| 542 | 542 | READ8_MEMBER(pacman_state::maketrax_special_port2_r) |
| 543 | 543 | { |
| 544 | int data = i | |
| 544 | int data = iop | |
| 545 | 545 | int pc = cpu_get_previouspc(&space.device()); |
| 546 | 546 | |
| 547 | 547 | if ((pc == 0x1973) || (pc == 0x2389)) return data | 0x40; |
| r15082 | r15083 | |
| 584 | 584 | |
| 585 | 585 | READ8_MEMBER(pacman_state::korosuke_special_port2_r) |
| 586 | 586 | { |
| 587 | int data = i | |
| 587 | int data = iop | |
| 588 | 588 | int pc = cpu_get_previouspc(&space.device()); |
| 589 | 589 | |
| 590 | 590 | if ((pc == 0x196e) || (pc == 0x2387)) return data | 0x40; |
| r15082 | r15083 | |
| 2806 | 2806 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2807 | 2807 | |
| 2808 | 2808 | PORT_START("Sense") |
| 2809 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 2809 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 2810 | 2810 | INPUT_PORTS_END |
| 2811 | 2811 | |
| 2812 | 2812 | |
| r15082 | r15083 | |
| 2858 | 2858 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2859 | 2859 | |
| 2860 | 2860 | PORT_START("Sense") |
| 2861 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 2861 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 2862 | 2862 | INPUT_PORTS_END |
| 2863 | 2863 | |
| 2864 | 2864 | |
| r15082 | r15083 | |
| 2910 | 2910 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2911 | 2911 | |
| 2912 | 2912 | PORT_START("Sense") |
| 2913 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 2913 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 2914 | 2914 | INPUT_PORTS_END |
| 2915 | 2915 | |
| 2916 | 2916 |
| r15082 | r15083 | |
|---|---|---|
| 540 | 540 | |
| 541 | 541 | for (i = 0; i < NUM; i++) |
| 542 | 542 | if ((~m_igs_dips_sel) & (1 << i) ) |
| 543 | ret = i | |
| 543 | ret = iop | |
| 544 | 544 | /* 0x0100 is blitter busy */ |
| 545 | 545 | return (ret & 0xff) | 0x0000; |
| 546 | 546 | } |
| r15082 | r15083 | |
| 1373 | 1373 | { |
| 1374 | 1374 | switch(m_igs003_reg[0]) |
| 1375 | 1375 | { |
| 1376 | case 0x00: return input_port_read(machine(), "IN0"); | |
| 1377 | case 0x01: return input_port_read(machine(), "IN1"); | |
| 1378 | case 0x02: return input_port_read(machine(), "IN2"); | |
| 1376 | case 0x00: return ioport("IN0")->read(); | |
| 1377 | case 0x01: return ioport("IN1")->read(); | |
| 1378 | case 0x02: return ioport("IN2")->read(); | |
| 1379 | 1379 | |
| 1380 | 1380 | case 0x20: return 0x49; |
| 1381 | 1381 | case 0x21: return 0x47; |
| r15082 | r15083 | |
| 1431 | 1431 | case 0: return m_igs_input_sel; |
| 1432 | 1432 | |
| 1433 | 1433 | case 1: |
| 1434 | if (~m_igs_input_sel & 0x01) return input_port_read(machine(), "KEY0"); | |
| 1435 | if (~m_igs_input_sel & 0x02) return input_port_read(machine(), "KEY1"); | |
| 1436 | if (~m_igs_input_sel & 0x04) return input_port_read(machine(), "KEY2"); | |
| 1437 | if (~m_igs_input_sel & 0x08) return input_port_read(machine(), "KEY3"); | |
| 1438 | if (~m_igs_input_sel & 0x10) return input_port_read(machine(), "KEY4"); | |
| 1434 | if (~m_igs_input_sel & 0x01) return ioport("KEY0")->read(); | |
| 1435 | if (~m_igs_input_sel & 0x02) return ioport("KEY1")->read(); | |
| 1436 | if (~m_igs_input_sel & 0x04) return ioport("KEY2")->read(); | |
| 1437 | if (~m_igs_input_sel & 0x08) return ioport("KEY3")->read(); | |
| 1438 | if (~m_igs_input_sel & 0x10) return ioport("KEY4")->read(); | |
| 1439 | 1439 | |
| 1440 | 1440 | logerror("%06x: warning, reading with igs_input_sel = %02x\n", cpu_get_pc(&space.device()), m_igs_input_sel); |
| 1441 | 1441 | break; |
| r15082 | r15083 | |
| 1494 | 1494 | switch(m_igs003_reg[0]) |
| 1495 | 1495 | { |
| 1496 | 1496 | case 0x01: |
| 1497 | if (~m_igs_input_sel & 0x01) return input_port_read(machine(), "KEY0"); | |
| 1498 | if (~m_igs_input_sel & 0x02) return input_port_read(machine(), "KEY1"); | |
| 1499 | if (~m_igs_input_sel & 0x04) return input_port_read(machine(), "KEY2"); | |
| 1500 | if (~m_igs_input_sel & 0x08) return input_port_read(machine(), "KEY3"); | |
| 1501 | if (~m_igs_input_sel & 0x10) return input_port_read(machine(), "KEY4"); | |
| 1497 | if (~m_igs_input_sel & 0x01) return ioport("KEY0")->read(); | |
| 1498 | if (~m_igs_input_sel & 0x02) return ioport("KEY1")->read(); | |
| 1499 | if (~m_igs_input_sel & 0x04) return ioport("KEY2")->read(); | |
| 1500 | if (~m_igs_input_sel & 0x08) return ioport("KEY3")->read(); | |
| 1501 | if (~m_igs_input_sel & 0x10) return ioport("KEY4")->read(); | |
| 1502 | 1502 | /* fall through */ |
| 1503 | 1503 | default: |
| 1504 | 1504 | logerror("%06x: warning, reading with igs003_reg = %02x\n", cpu_get_pc(&space.device()), m_igs003_reg[0]); |
| r15082 | r15083 | |
| 1573 | 1573 | { |
| 1574 | 1574 | switch(m_igs003_reg[0]) |
| 1575 | 1575 | { |
| 1576 | case 0x00: return i | |
| 1576 | case 0x00: return iop | |
| 1577 | 1577 | |
| 1578 | 1578 | case 0x20: return 0x49; |
| 1579 | 1579 | case 0x21: return 0x47; |
| r15082 | r15083 | |
| 1639 | 1639 | { |
| 1640 | 1640 | switch(m_igs003_reg[0]) |
| 1641 | 1641 | { |
| 1642 | case 0x00: return i | |
| 1642 | case 0x00: return iop | |
| 1643 | 1643 | |
| 1644 | 1644 | case 0x02: |
| 1645 | if (~m_igs_input_sel & 0x01) return input_port_read(machine(), "KEY0"); | |
| 1646 | if (~m_igs_input_sel & 0x02) return input_port_read(machine(), "KEY1"); | |
| 1647 | if (~m_igs_input_sel & 0x04) return input_port_read(machine(), "KEY2"); | |
| 1648 | if (~m_igs_input_sel & 0x08) return input_port_read(machine(), "KEY3"); | |
| 1649 | if (~m_igs_input_sel & 0x10) return input_port_read(machine(), "KEY4"); | |
| 1645 | if (~m_igs_input_sel & 0x01) return ioport("KEY0")->read(); | |
| 1646 | if (~m_igs_input_sel & 0x02) return ioport("KEY1")->read(); | |
| 1647 | if (~m_igs_input_sel & 0x04) return ioport("KEY2")->read(); | |
| 1648 | if (~m_igs_input_sel & 0x08) return ioport("KEY3")->read(); | |
| 1649 | if (~m_igs_input_sel & 0x10) return ioport("KEY4")->read(); | |
| 1650 | 1650 | /* fall through */ |
| 1651 | 1651 | |
| 1652 | 1652 | case 0x20: return 0x49; |
| r15082 | r15083 | |
| 1711 | 1711 | { |
| 1712 | 1712 | switch(m_igs003_reg[0]) |
| 1713 | 1713 | { |
| 1714 | case 0x00: return input_port_read(machine(), "IN0"); | |
| 1715 | case 0x01: return input_port_read(machine(), "IN1"); | |
| 1714 | case 0x00: return ioport("IN0")->read(); | |
| 1715 | case 0x01: return ioport("IN1")->read(); | |
| 1716 | 1716 | |
| 1717 | 1717 | // case 0x03: |
| 1718 | 1718 | // return 0xff; // parametric bitswaps? |
| r15082 | r15083 | |
| 2408 | 2408 | { |
| 2409 | 2409 | igs011_state *state = screen.machine().driver_data<igs011_state>(); |
| 2410 | 2410 | state->m_vbowl_trackball[0] = state->m_vbowl_trackball[1]; |
| 2411 | state->m_vbowl_trackball[1] = (i | |
| 2411 | state->m_vbowl_trackball[1] = (state->iop | |
| 2412 | 2412 | } |
| 2413 | 2413 | } |
| 2414 | 2414 |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | READ8_MEMBER(bwing_state::bwp1_io_r) |
| 68 | 68 | { |
| 69 | 69 | |
| 70 | if (offset == 0) return(input_port_read(machine(), "DSW0")); | |
| 71 | if (offset == 1) return(input_port_read(machine(), "DSW1")); | |
| 72 | if (offset == 2) return(input_port_read(machine(), "IN0")); | |
| 73 | if (offset == 3) return(input_port_read(machine(), "IN1")); | |
| 74 | if (offset == 4) return(input_port_read(machine(), "IN2")); | |
| 70 | if (offset == 0) return(ioport("DSW0")->read()); | |
| 71 | if (offset == 1) return(ioport("DSW1")->read()); | |
| 72 | if (offset == 2) return(ioport("IN0")->read()); | |
| 73 | if (offset == 3) return(ioport("IN1")->read()); | |
| 74 | if (offset == 4) return(ioport("IN2")->read()); | |
| 75 | 75 | |
| 76 | 76 | return((m_bwp123_membase[0])[0x1b00 + offset]); |
| 77 | 77 | } |
| r15082 | r15083 | |
| 279 | 279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 280 | 280 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 281 | 281 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 283 | 283 | |
| 284 | 284 | PORT_START("IN3") |
| 285 | 285 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_TILT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bwing_state,tilt_pressed,0) |
| 286 | 286 | |
| 287 | 287 | PORT_START("VBLANK") |
| 288 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 288 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 289 | 289 | |
| 290 | 290 | PORT_START("EXTRA") // a matter of taste |
| 291 | 291 | PORT_DIPNAME( 0x07, 0x00, "RGB" ) |
| r15082 | r15083 | |
| 586 | 586 | { |
| 587 | 587 | bwing_state *state = machine.driver_data<bwing_state>(); |
| 588 | 588 | |
| 589 | state->m_bwp123_membase[0] = machine.root_device().memregion("maincpu")->base(); | |
| 590 | state->m_bwp123_membase[1] = machine.root_device().memregion("sub")->base(); | |
| 589 | state->m_bwp123_membase[0] = state->memregion("maincpu")->base(); | |
| 590 | state->m_bwp123_membase[1] = state->memregion("sub")->base(); | |
| 591 | 591 | state->m_bwp123_membase[2] = state->memregion("audiocpu")->base(); |
| 592 | 592 | |
| 593 | 593 | fix_bwp3(machine); |
| r15082 | r15083 | |
|---|---|---|
| 311 | 311 | { |
| 312 | 312 | |
| 313 | 313 | if (offset == 0) // DSW |
| 314 | return i | |
| 314 | return iop | |
| 315 | 315 | |
| 316 | 316 | switch (m_input_select) // inputs |
| 317 | 317 | { |
| 318 | case 1<<0: return input_port_read(machine(), "KEY0"); | |
| 319 | case 1<<1: return input_port_read(machine(), "KEY1"); | |
| 320 | case 1<<2: return input_port_read(machine(), "KEY2"); | |
| 321 | case 1<<3: return input_port_read(machine(), "KEY3"); | |
| 318 | case 1<<0: return ioport("KEY0")->read(); | |
| 319 | case 1<<1: return ioport("KEY1")->read(); | |
| 320 | case 1<<2: return ioport("KEY2")->read(); | |
| 321 | case 1<<3: return ioport("KEY3")->read(); | |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | READ16_MEMBER(sf_state::button1_r) |
| 164 | 164 | { |
| 165 | return (scale[i | |
| 165 | return (scale[iop | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | READ16_MEMBER(sf_state::button2_r) |
| 169 | 169 | { |
| 170 | return (scale[i | |
| 170 | return (scale[iop | |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 |
| r15082 | r15083 | |
|---|---|---|
| 859 | 859 | READ16_MEMBER(cave_state::sailormn_input0_r) |
| 860 | 860 | { |
| 861 | 861 | // watchdog_reset16_r(0, 0); // written too rarely for mame. |
| 862 | return i | |
| 862 | return iop | |
| 863 | 863 | } |
| 864 | 864 | |
| 865 | 865 | static ADDRESS_MAP_START( sailormn_map, AS_PROGRAM, 16, cave_state ) |
| r15082 | r15083 | |
| 1361 | 1361 | PORT_DIPSETTING( 0x0200, "4" ) |
| 1362 | 1362 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3") |
| 1363 | 1363 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1364 | PORT_DIPSETTING( 0x0400, "150k/300k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0xc000) | |
| 1365 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0xa000) | |
| 1366 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0xe000) | |
| 1367 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0x6000) | |
| 1368 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0x8000) | |
| 1369 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0x2000) | |
| 1370 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0x4000) | |
| 1371 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xe000, PORTCOND_EQUALS, 0x0000) | |
| 1364 | PORT_DIPSETTING( 0x0400, "150k/300k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0xc000) | |
| 1365 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0xa000) | |
| 1366 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0xe000) | |
| 1367 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0x6000) | |
| 1368 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0x8000) | |
| 1369 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0x2000) | |
| 1370 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0x4000) | |
| 1371 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xe000, EQUALS, 0x0000) | |
| 1372 | 1372 | PORT_DIPNAME( 0x1800, 0x1800, "Damage" ) PORT_DIPLOCATION("SW2:4,5") |
| 1373 | 1373 | PORT_DIPSETTING( 0x1800, "+0" ) |
| 1374 | 1374 | PORT_DIPSETTING( 0x1000, "+1" ) |
| r15082 | r15083 | |
| 1394 | 1394 | PORT_DIPSETTING( 0x0004, DEF_STR( Chinese ) ) |
| 1395 | 1395 | PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3") |
| 1396 | 1396 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1397 | PORT_DIPSETTING( 0x0400, "150k/300k" ) PORT_CONDITION("DSW", 0xc000, PORTCOND_EQUALS, 0x8000) | |
| 1398 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xc000, PORTCOND_EQUALS, 0xc000) | |
| 1399 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xc000, PORTCOND_EQUALS, 0x4000) | |
| 1400 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xc000, PORTCOND_EQUALS, 0x0000) | |
| 1397 | PORT_DIPSETTING( 0x0400, "150k/300k" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) | |
| 1398 | PORT_DIPSETTING( 0x0400, "150k/350k" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) | |
| 1399 | PORT_DIPSETTING( 0x0400, "150k/400k" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) | |
| 1400 | PORT_DIPSETTING( 0x0400, "200k/500k" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x0000) | |
| 1401 | 1401 | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW2:6" ) |
| 1402 | 1402 | PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") |
| 1403 | 1403 | PORT_DIPSETTING( 0x8000, DEF_STR( Very_Easy ) ) |
| r15082 | r15083 | |
| 4544 | 4544 | static DRIVER_INIT( hotdogst ) |
| 4545 | 4545 | { |
| 4546 | 4546 | cave_state *state = machine.driver_data<cave_state>(); |
| 4547 | UINT8 *ROM = | |
| 4547 | UINT8 *ROM = sta | |
| 4548 | 4548 | |
| 4549 | 4549 | init_cave(machine); |
| 4550 | 4550 | |
| r15082 | r15083 | |
| 4563 | 4563 | static DRIVER_INIT( mazinger ) |
| 4564 | 4564 | { |
| 4565 | 4565 | cave_state *state = machine.driver_data<cave_state>(); |
| 4566 | UINT8 *ROM = | |
| 4566 | UINT8 *ROM = sta | |
| 4567 | 4567 | UINT8 *buffer; |
| 4568 | UINT8 *src = machine.root_device().memregion("sprites")->base(); | |
| 4569 | int len = machine.root_device().memregion("sprites")->bytes(); | |
| 4568 | UINT8 *src = state->memregion("sprites")->base(); | |
| 4569 | int len = state->memregion("sprites")->bytes(); | |
| 4570 | 4570 | |
| 4571 | 4571 | init_cave(machine); |
| 4572 | 4572 | |
| r15082 | r15083 | |
| 4600 | 4600 | static DRIVER_INIT( metmqstr ) |
| 4601 | 4601 | { |
| 4602 | 4602 | cave_state *state = machine.driver_data<cave_state>(); |
| 4603 | UINT8 *ROM = | |
| 4603 | UINT8 *ROM = sta | |
| 4604 | 4604 | |
| 4605 | 4605 | init_cave(machine); |
| 4606 | 4606 | |
| 4607 | 4607 | state->membank("bank1")->configure_entries(0, 0x2, &ROM[0x00000], 0x4000); |
| 4608 | 4608 | state->membank("bank1")->configure_entries(2, 0xe, &ROM[0x10000], 0x4000); |
| 4609 | 4609 | |
| 4610 | ROM = | |
| 4610 | ROM = sta | |
| 4611 | 4611 | state->membank("bank3")->configure_entries(0, 8, &ROM[0x00000], 0x20000); |
| 4612 | 4612 | state->membank("bank4")->configure_entries(0, 8, &ROM[0x00000], 0x20000); |
| 4613 | 4613 | |
| r15082 | r15083 | |
| 4625 | 4625 | static DRIVER_INIT( pwrinst2j ) |
| 4626 | 4626 | { |
| 4627 | 4627 | cave_state *state = machine.driver_data<cave_state>(); |
| 4628 | UINT8 *ROM = | |
| 4628 | UINT8 *ROM = sta | |
| 4629 | 4629 | UINT8 *buffer; |
| 4630 | UINT8 *src = | |
| 4630 | UINT8 *src = sta | |
| 4631 | 4631 | int len = state->memregion("sprites")->bytes(); |
| 4632 | 4632 | int i, j; |
| 4633 | 4633 | |
| r15082 | r15083 | |
| 4674 | 4674 | static DRIVER_INIT( sailormn ) |
| 4675 | 4675 | { |
| 4676 | 4676 | cave_state *state = machine.driver_data<cave_state>(); |
| 4677 | UINT8 *ROM = | |
| 4677 | UINT8 *ROM = sta | |
| 4678 | 4678 | UINT8 *buffer; |
| 4679 | UINT8 *src = machine.root_device().memregion("sprites")->base(); | |
| 4680 | int len = machine.root_device().memregion("sprites")->bytes(); | |
| 4679 | UINT8 *src = state->memregion("sprites")->base(); | |
| 4680 | int len = state->memregion("sprites")->bytes(); | |
| 4681 | 4681 | |
| 4682 | 4682 | init_cave(machine); |
| 4683 | 4683 | |
| 4684 | 4684 | state->membank("bank1")->configure_entries(0, 0x02, &ROM[0x00000], 0x4000); |
| 4685 | 4685 | state->membank("bank1")->configure_entries(2, 0x1e, &ROM[0x10000], 0x4000); |
| 4686 | 4686 | |
| 4687 | ROM = | |
| 4687 | ROM = sta | |
| 4688 | 4688 | state->membank("bank3")->configure_entries(0, 0x10, &ROM[0x00000], 0x20000); |
| 4689 | 4689 | state->membank("bank4")->configure_entries(0, 0x10, &ROM[0x00000], 0x20000); |
| 4690 | 4690 |
| r15082 | r15083 | |
|---|---|---|
| 783 | 783 | PORT_DIPSETTING( 0x00, "2" ) |
| 784 | 784 | PORT_DIPSETTING( 0x01, "3") |
| 785 | 785 | PORT_DIPNAME( 0x02, 0x00, "Bonus At" ) |
| 786 | PORT_DIPSETTING( 0x00, "20k/40k" ) PORT_CONDITION("IN2",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 787 | PORT_DIPSETTING( 0x02, "30k/50k" ) PORT_CONDITION("IN2",0x01,PORTCOND_NOTEQUALS,0x01) | |
| 788 | PORT_DIPSETTING( 0x00, "30k/50k" ) PORT_CONDITION("IN2",0x01,PORTCOND_EQUALS,0x01) | |
| 789 | PORT_DIPSETTING( 0x02, "40k/70k" ) PORT_CONDITION("IN2",0x01,PORTCOND_EQUALS,0x01) | |
| 786 | PORT_DIPSETTING( 0x00, "20k/40k" ) PORT_CONDITION("IN2",0x01,NOTEQUALS,0x01) | |
| 787 | PORT_DIPSETTING( 0x02, "30k/50k" ) PORT_CONDITION("IN2",0x01,NOTEQUALS,0x01) | |
| 788 | PORT_DIPSETTING( 0x00, "30k/50k" ) PORT_CONDITION("IN2",0x01,EQUALS,0x01) | |
| 789 | PORT_DIPSETTING( 0x02, "40k/70k" ) PORT_CONDITION("IN2",0x01,EQUALS,0x01) | |
| 790 | 790 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown )) /* documented as unused */ |
| 791 | 791 | PORT_DIPSETTING( 0x04, DEF_STR( Off )) |
| 792 | 792 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| r15082 | r15083 | |
|---|---|---|
| 96 | 96 | |
| 97 | 97 | READ8_MEMBER(dec8_state::gondo_player_1_r) |
| 98 | 98 | { |
| 99 | int val = 1 << i | |
| 99 | int val = 1 << iop | |
| 100 | 100 | |
| 101 | 101 | switch (offset) |
| 102 | 102 | { |
| 103 | 103 | case 0: /* Rotary low byte */ |
| 104 | 104 | return ~(val & 0xff); |
| 105 | 105 | case 1: /* Joystick = bottom 4 bits, rotary = top 4 */ |
| 106 | return ((~val >> 4) & 0xf0) | (i | |
| 106 | return ((~val >> 4) & 0xf0) | (iop | |
| 107 | 107 | } |
| 108 | 108 | return 0xff; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | READ8_MEMBER(dec8_state::gondo_player_2_r) |
| 112 | 112 | { |
| 113 | int val = 1 << i | |
| 113 | int val = 1 << iop | |
| 114 | 114 | |
| 115 | 115 | switch (offset) |
| 116 | 116 | { |
| 117 | 117 | case 0: /* Rotary low byte */ |
| 118 | 118 | return ~(val & 0xff); |
| 119 | 119 | case 1: /* Joystick = bottom 4 bits, rotary = top 4 */ |
| 120 | return ((~val >> 4) & 0xf0) | (i | |
| 120 | return ((~val >> 4) & 0xf0) | (iop | |
| 121 | 121 | } |
| 122 | 122 | return 0xff; |
| 123 | 123 | } |
| r15082 | r15083 | |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /* Coins are controlled by the i8751 */ |
| 186 | if ((input_port_read(machine(), "IN2") & 3) == 3) m_latch = 1; | |
| 187 | if ((input_port_read(machine(), "IN2") & 1) != 1 && m_latch) | |
| 186 | if ((ioport("IN2")->read() & 3) == 3) m_latch = 1; | |
| 187 | if ((ioport("IN2")->read() & 1) != 1 && m_latch) | |
| 188 | 188 | { |
| 189 | 189 | m_coin1++; |
| 190 | 190 | m_latch = 0; |
| r15082 | r15083 | |
| 196 | 196 | m_credits+=m_cred1; |
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | if ((i | |
| 199 | if ((iop | |
| 200 | 200 | { |
| 201 | 201 | m_coin2++; |
| 202 | 202 | m_latch = 0; |
| r15082 | r15083 | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /* Coins are controlled by the i8751 */ |
| 249 | if (/*(input_port_read(machine(), "IN2") & 3) == 3*/!m_latch) { m_latch = 1; m_coin1 = m_coin2 = 0; } | |
| 250 | if ((input_port_read(machine(), "IN2") & 1) != 1 && m_latch) { m_coin1 = 1; m_latch = 0; } | |
| 251 | if ((input_port_read(machine(), "IN2") & 2) != 2 && m_latch) { m_coin2 = 1; m_latch = 0; } | |
| 249 | if (/*(ioport("IN2")->read() & 3) == 3*/!m_latch) { m_latch = 1; m_coin1 = m_coin2 = 0; } | |
| 250 | if ((ioport("IN2")->read() & 1) != 1 && m_latch) { m_coin1 = 1; m_latch = 0; } | |
| 251 | if ((ioport("IN2")->read() & 2) != 2 && m_latch) { m_coin2 = 1; m_latch = 0; } | |
| 252 | 252 | |
| 253 | 253 | if (m_i8751_value == 0x0102) m_i8751_return = 0; /* ??? */ |
| 254 | 254 | if (m_i8751_value == 0x0101) m_i8751_return = 0; /* ??? */ |
| r15082 | r15083 | |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /* Coins are controlled by the i8751 */ |
| 287 | if ((input_port_read(machine(), "IN2") & 3) == 3) m_latch = 1; | |
| 288 | if ((input_port_read(machine(), "IN2") & 1) != 1 && m_latch) | |
| 287 | if ((ioport("IN2")->read() & 3) == 3) m_latch = 1; | |
| 288 | if ((ioport("IN2")->read() & 1) != 1 && m_latch) | |
| 289 | 289 | { |
| 290 | 290 | m_coin1++; |
| 291 | 291 | m_latch = 0; |
| r15082 | r15083 | |
| 297 | 297 | m_credits+=m_cred1; |
| 298 | 298 | } |
| 299 | 299 | } |
| 300 | if ((i | |
| 300 | if ((iop | |
| 301 | 301 | { |
| 302 | 302 | m_coin2++; |
| 303 | 303 | m_latch = 0; |
| r15082 | r15083 | |
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | /* Coins are controlled by the i8751 */ |
| 354 | if ((input_port_read(machine(), "I8751") & 3) == 3) m_latch = 1; | |
| 355 | if ((input_port_read(machine(), "I8751") & 1) != 1 && m_latch) | |
| 354 | if ((ioport("I8751")->read() & 3) == 3) m_latch = 1; | |
| 355 | if ((ioport("I8751")->read() & 1) != 1 && m_latch) | |
| 356 | 356 | { |
| 357 | 357 | m_coin1++; |
| 358 | 358 | m_latch = 0; |
| r15082 | r15083 | |
| 362 | 362 | m_credits+=m_cred1; |
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | if ((i | |
| 365 | if ((iop | |
| 366 | 366 | { |
| 367 | 367 | m_coin2++; |
| 368 | 368 | m_latch = 0; |
| r15082 | r15083 | |
| 934 | 934 | case 2: |
| 935 | 935 | return 0xff; |
| 936 | 936 | case 3: |
| 937 | return i | |
| 937 | return iop | |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | 940 | return 0xff; //compile safe. |
| r15082 | r15083 | |
| 1005 | 1005 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1006 | 1006 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1007 | 1007 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1008 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1008 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1009 | 1009 | |
| 1010 | 1010 | PORT_START("DSW0") |
| 1011 | 1011 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
| 1095 | 1095 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1096 | 1096 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1097 | 1097 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1098 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1098 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1099 | 1099 | |
| 1100 | 1100 | PORT_START("DSW0") |
| 1101 | 1101 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| r15082 | r15083 | |
| 1189 | 1189 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1190 | 1190 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1191 | 1191 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1192 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1192 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1193 | 1193 | |
| 1194 | 1194 | PORT_START("I8751") /* hooked up on the i8751 */ |
| 1195 | 1195 | /* Low 4 bits not connected on schematics */ |
| r15082 | r15083 | |
| 1260 | 1260 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* shoot */ |
| 1261 | 1261 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* bomb */ |
| 1262 | 1262 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1263 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1263 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1264 | 1264 | |
| 1265 | 1265 | PORT_START("I8751") /* hooked up on the (fake) i8751 */ |
| 1266 | 1266 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r15082 | r15083 | |
| 1344 | 1344 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 1345 | 1345 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 1346 | 1346 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1347 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1347 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1348 | 1348 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) |
| 1349 | 1349 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) |
| 1350 | 1350 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r15082 | r15083 | |
| 1473 | 1473 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1474 | 1474 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1475 | 1475 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1476 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1476 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1477 | 1477 | |
| 1478 | 1478 | PORT_START("DSW0") |
| 1479 | 1479 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) |
| r15082 | r15083 | |
| 1560 | 1560 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1561 | 1561 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1562 | 1562 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1563 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1563 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1564 | 1564 | |
| 1565 | 1565 | PORT_START("DSW0") |
| 1566 | 1566 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) /* table at 0xf8e3 (4 * 2 bytes : coins then credits) */ |
| r15082 | r15083 | |
| 1649 | 1649 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1650 | 1650 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1651 | 1651 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1652 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 1652 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1653 | 1653 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1654 | 1654 | |
| 1655 | 1655 | PORT_START("I8751") /* Fake port for i8751 */ |
| r15082 | r15083 | |
| 1743 | 1743 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1744 | 1744 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1745 | 1745 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1746 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 1746 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1747 | 1747 | |
| 1748 | 1748 | PORT_START("DSW0") |
| 1749 | 1749 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) /* code at 0x88b7 in 'cobracom', 0x890e in 'cobracomj' */ |
| r15082 | r15083 | |
| 1966 | 1966 | static INTERRUPT_GEN( oscar_interrupt ) |
| 1967 | 1967 | { |
| 1968 | 1968 | dec8_state *state = device->machine().driver_data<dec8_state>(); |
| 1969 | if ((input_port_read(device->machine(), "IN2") & 0x7) == 0x7) state->m_latch = 1; | |
| 1970 | if (state->m_latch && (input_port_read(device->machine(), "IN2") & 0x7) != 0x7) | |
| 1969 | if ((state->ioport("IN2")->read() & 0x7) == 0x7) state->m_latch = 1; | |
| 1970 | if (state->m_latch && (state->ioport("IN2")->read() & 0x7) != 0x7) | |
| 1971 | 1971 | { |
| 1972 | 1972 | state->m_latch = 0; |
| 1973 | 1973 | device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 425 | 425 | PORT_DIPSETTING( 0x2000, "2C Start / 1C Continue" ) |
| 426 | 426 | // PORT_DIPSETTING( 0x7000, "Error!!" ) // Causes graphics issues - Service Mode shows "Error" |
| 427 | 427 | // PORT_DIPSETTING( 0x1000, DEF_STR( 2C_1C ) ) // Duplicate 2C_1C |
| 428 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW2",0x0f00,PORTCOND_NOTEQUALS,0x0000) | |
| 429 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW2",0x0f00,PORTCOND_EQUALS,0x0000) // Set both for Free Play | |
| 428 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW2",0x0f00,NOTEQUALS,0x0000) | |
| 429 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW2",0x0f00,EQUALS,0x0000) // Set both for Free Play | |
| 430 | 430 | PORT_DIPNAME( 0x0f00, 0x0f00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW4:5,6,7,8") /* Service Mode Shows Player 1 */ |
| 431 | 431 | PORT_DIPSETTING( 0x0800, DEF_STR( 8C_1C ) ) |
| 432 | 432 | PORT_DIPSETTING( 0x0900, DEF_STR( 7C_1C ) ) |
| r15082 | r15083 | |
| 443 | 443 | PORT_DIPSETTING( 0x0200, "2C Start / 1C Continue" ) |
| 444 | 444 | // PORT_DIPSETTING( 0x0700, "Error!!" ) // Causes graphics issues - Service Mode shows "Error" |
| 445 | 445 | // PORT_DIPSETTING( 0x0100, DEF_STR( 2C_1C ) ) // Duplicate 2C_1C |
| 446 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW2",0xf000,PORTCOND_NOTEQUALS,0x0000) | |
| 447 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW2",0xf000,PORTCOND_EQUALS,0x0000) // Set both for Free Play | |
| 446 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW2",0xf000,NOTEQUALS,0x0000) | |
| 447 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_CONDITION("DSW2",0xf000,EQUALS,0x0000) // Set both for Free Play | |
| 448 | 448 | INPUT_PORTS_END |
| 449 | 449 | |
| 450 | 450 | static INPUT_PORTS_START( asurabus ) |
| r15082 | r15083 | |
|---|---|---|
| 112 | 112 | UINT16 x = 0; |
| 113 | 113 | int rlen; |
| 114 | 114 | |
| 115 | gfx[0] = device->machine().root_device().memregion("gfx1")->base(); | |
| 116 | gfx[1] = device->machine().root_device().memregion("gfx2")->base(); | |
| 115 | gfx[0] = state->memregion("gfx1")->base(); | |
| 116 | gfx[1] = state->memregion("gfx2")->base(); | |
| 117 | 117 | rlen = state->memregion("gfx2")->bytes(); |
| 118 | 118 | |
| 119 | 119 | //ma = ma ^ 0x7ff; |
| r0 | r15083 | |
|---|---|---|
| 1 | /* | |
| 2 | ||
| 3 | Chance 32 - Poker Game by PAL Company | |
| 4 | ||
| 5 | 1x HD46505SP / HD6845SP | |
| 6 | 1x Z84C0008PEC | |
| 7 | ||
| 8 | XTAL: 12.000 Mhz | |
| 9 | ||
| 10 | ||
| 11 | todo, fix tilemaps, colours, inputs, hook up oki, add CRTC device | |
| 12 | ||
| 13 | */ | |
| 14 | ||
| 15 | #include "emu.h" | |
| 16 | #include "cpu/z80/z80.h" | |
| 17 | #include "sound/okim6295.h" | |
| 18 | #include "video/mc6845.h" | |
| 19 | ||
| 20 | ||
| 21 | ||
| 22 | class chance32_state : public driver_device | |
| 23 | { | |
| 24 | public: | |
| 25 | chance32_state(const machine_config &mconfig, device_type type, const char *tag) | |
| 26 | : driver_device(mconfig, type, tag), | |
| 27 | m_fgram(*this, "fgram"), | |
| 28 | m_bgram(*this, "bgram") | |
| 29 | ||
| 30 | { } | |
| 31 | ||
| 32 | DECLARE_WRITE8_MEMBER(chance32_fgram_w) | |
| 33 | { | |
| 34 | m_fgram[offset] = data; | |
| 35 | m_fg_tilemap->mark_tile_dirty(offset / 2); | |
| 36 | } | |
| 37 | ||
| 38 | DECLARE_WRITE8_MEMBER(chance32_bgram_w) | |
| 39 | { | |
| 40 | m_bgram[offset] = data; | |
| 41 | m_bg_tilemap->mark_tile_dirty(offset / 2); | |
| 42 | } | |
| 43 | ||
| 44 | DECLARE_WRITE8_MEMBER(mux_w); | |
| 45 | DECLARE_READ8_MEMBER(mux_r); | |
| 46 | ||
| 47 | tilemap_t *m_fg_tilemap; | |
| 48 | tilemap_t *m_bg_tilemap; | |
| 49 | ||
| 50 | required_shared_ptr<UINT8> m_fgram; | |
| 51 | required_shared_ptr<UINT8> m_bgram; | |
| 52 | ||
| 53 | UINT8 mux_data; | |
| 54 | }; | |
| 55 | ||
| 56 | static TILE_GET_INFO( get_fg_tile_info ) | |
| 57 | { | |
| 58 | chance32_state *state = machine.driver_data<chance32_state>(); | |
| 59 | int code = (state->m_fgram[tile_index * 2 + 1] << 8) | state->m_fgram[tile_index * 2]; | |
| 60 | int flip = (~code >> 12)&1; | |
| 61 | SET_TILE_INFO( | |
| 62 | 1, | |
| 63 | code & 0x0fff, | |
| 64 | code >> 13, | |
| 65 | TILE_FLIPYX(flip<<1)|flip); | |
| 66 | } | |
| 67 | ||
| 68 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 69 | { | |
| 70 | chance32_state *state = machine.driver_data<chance32_state>(); | |
| 71 | int code = (state->m_bgram[tile_index * 2 +1] << 8) | state->m_bgram[tile_index * 2]; | |
| 72 | int flip = (~code >> 12)&1; | |
| 73 | SET_TILE_INFO( | |
| 74 | 0, | |
| 75 | code & 0x0fff, | |
| 76 | code >> 13, | |
| 77 | TILE_FLIPYX(flip<<1|flip)); | |
| 78 | } | |
| 79 | ||
| 80 | ||
| 81 | VIDEO_START( chance32 ) | |
| 82 | { | |
| 83 | chance32_state *state = machine.driver_data<chance32_state>(); | |
| 84 | ||
| 85 | state->m_fg_tilemap = tilemap_create(machine, get_fg_tile_info, tilemap_scan_rows, 16, 8, 35, 29); | |
| 86 | state->m_fg_tilemap->set_transparent_pen(0); | |
| 87 | ||
| 88 | state->m_bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 16, 8, 35, 29); | |
| 89 | ||
| 90 | state->m_fg_tilemap->set_flip(TILE_FLIPX|TILE_FLIPY); | |
| 91 | state->m_bg_tilemap->set_flip(TILE_FLIPX|TILE_FLIPY); | |
| 92 | } | |
| 93 | ||
| 94 | SCREEN_UPDATE_IND16( chance32 ) | |
| 95 | { | |
| 96 | chance32_state *state = screen.machine().driver_data<chance32_state>(); | |
| 97 | ||
| 98 | /* TODO: wtf? */ | |
| 99 | state->m_bg_tilemap->set_scrollx(0, 352); | |
| 100 | state->m_bg_tilemap->set_scrolly(0, 160); | |
| 101 | state->m_fg_tilemap->set_scrollx(0, 352); | |
| 102 | state->m_fg_tilemap->set_scrolly(0, 160); | |
| 103 | ||
| 104 | state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); | |
| 105 | state->m_fg_tilemap->draw(bitmap, cliprect, 0, 0); | |
| 106 | ||
| 107 | return 0; | |
| 108 | } | |
| 109 | ||
| 110 | ||
| 111 | static ADDRESS_MAP_START( chance32_map, AS_PROGRAM, 8, chance32_state ) | |
| 112 | AM_RANGE(0x0000, 0xcfff) AM_ROM | |
| 113 | AM_RANGE(0xd800, 0xdfff) AM_RAM | |
| 114 | ||
| 115 | AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(paletteram_xGGGGGRRRRRBBBBB_byte_le_w) AM_SHARE("paletteram") | |
| 116 | ||
| 117 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(chance32_fgram_w) AM_SHARE("fgram") | |
| 118 | AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(chance32_bgram_w) AM_SHARE("bgram") | |
| 119 | ADDRESS_MAP_END | |
| 120 | ||
| 121 | WRITE8_MEMBER(chance32_state::mux_w) | |
| 122 | { | |
| 123 | mux_data = data; | |
| 124 | } | |
| 125 | ||
| 126 | READ8_MEMBER(chance32_state::mux_r) | |
| 127 | { | |
| 128 | UINT8 res,i; | |
| 129 | const char *const muxnames[4] = { "IN0", "IN1", "IN2", "IN3" }; | |
| 130 | res = 0; | |
| 131 | ||
| 132 | for(i=0;i<4;i++) | |
| 133 | { | |
| 134 | if(mux_data & 1 << i) | |
| 135 | res |= ioport(muxnames[i])->read(); | |
| 136 | } | |
| 137 | ||
| 138 | return res; | |
| 139 | } | |
| 140 | ||
| 141 | static ADDRESS_MAP_START( chance32_portmap, AS_IO, 8, chance32_state ) | |
| 142 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 143 | //AM_RANGE(0x10, 0x10) AM_WRITENOP // ? | |
| 144 | AM_RANGE(0x13, 0x13) AM_WRITE(mux_w) | |
| 145 | AM_RANGE(0x20, 0x20) AM_READ_PORT("DSW0") | |
| 146 | AM_RANGE(0x21, 0x21) AM_READ_PORT("DSW1") | |
| 147 | AM_RANGE(0x22, 0x22) AM_READ_PORT("DSW2") | |
| 148 | AM_RANGE(0x23, 0x23) AM_READ_PORT("DSW3") | |
| 149 | AM_RANGE(0x24, 0x24) AM_READ_PORT("DSW4") | |
| 150 | AM_RANGE(0x25, 0x25) AM_READ(mux_r) | |
| 151 | // AM_RANGE(0x26, 0x26) AM_READ_PORT("UNK") // vblank? | |
| 152 | AM_RANGE(0x30, 0x30) AM_DEVWRITE("crtc", mc6845_device, address_w) | |
| 153 | AM_RANGE(0x31, 0x31) AM_DEVWRITE("crtc", mc6845_device, register_w) | |
| 154 | AM_RANGE(0x50, 0x50) AM_DEVREADWRITE("oki", okim6295_device, read, write) | |
| 155 | // AM_RANGE(0x60, 0x60) AM_WRITENOP // lamps | |
| 156 | ||
| 157 | ADDRESS_MAP_END | |
| 158 | ||
| 159 | ||
| 160 | ||
| 161 | static INPUT_PORTS_START( chance32 ) | |
| 162 | PORT_START("UNK") | |
| 163 | ||
| 164 | PORT_START("DSW0") | |
| 165 | PORT_DIPNAME( 0x01, 0x00, "DSW0" ) | |
| 166 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 167 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 168 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 169 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 170 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 171 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 172 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 173 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 174 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 175 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 176 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 177 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 178 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 179 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 180 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 181 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 182 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 183 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 184 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 185 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 186 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 187 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 188 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 189 | ||
| 190 | PORT_START("DSW1") | |
| 191 | PORT_DIPNAME( 0x01, 0x00, "DSW1" ) | |
| 192 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 193 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 194 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 195 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 196 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 197 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 198 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 199 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 200 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 201 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 202 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 203 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 204 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 205 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 206 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 207 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 208 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 209 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 210 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 211 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 212 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 213 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 214 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 215 | ||
| 216 | PORT_START("DSW2") | |
| 217 | PORT_DIPNAME( 0x01, 0x00, "DSW2" ) | |
| 218 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 219 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 220 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 221 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 222 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 223 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 224 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 225 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 226 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 227 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 228 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 229 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 230 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 231 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 232 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 233 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 234 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 235 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 236 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 237 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 238 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 239 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 240 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 241 | ||
| 242 | PORT_START("DSW3") | |
| 243 | PORT_DIPNAME( 0x01, 0x00, "DSW3" ) | |
| 244 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 245 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 246 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 247 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 248 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 249 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 250 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 251 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 252 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 253 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 254 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 255 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 256 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 257 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 258 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 259 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 260 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 261 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 262 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 263 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 264 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 265 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 266 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 267 | ||
| 268 | PORT_START("DSW4") | |
| 269 | PORT_DIPNAME( 0x01, 0x00, "DSW4" ) | |
| 270 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 271 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 272 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 273 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 274 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 275 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 276 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 277 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 278 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 279 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 280 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 281 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 282 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 283 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 284 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 285 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 286 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 287 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 288 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 289 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 290 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 291 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 292 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 293 | ||
| 294 | PORT_START("IN0") | |
| 295 | PORT_DIPNAME( 0x01, 0x00, "0" ) | |
| 296 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 297 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 298 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 299 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 300 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 301 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 302 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 303 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 304 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 305 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 306 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 307 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 308 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 309 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 310 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 311 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 312 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 313 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 314 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 315 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 316 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 317 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 318 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 319 | ||
| 320 | PORT_START("IN1") | |
| 321 | PORT_DIPNAME( 0x01, 0x00, "1" ) | |
| 322 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 323 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 324 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 325 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 326 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 327 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 328 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 329 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 330 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 331 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 332 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 333 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 334 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 335 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 336 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 337 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 338 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 339 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 340 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 341 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 342 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 343 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 344 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 345 | ||
| 346 | PORT_START("IN2") | |
| 347 | PORT_DIPNAME( 0x01, 0x00, "2" ) | |
| 348 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 349 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 350 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 351 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 352 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 353 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 354 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 355 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 356 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 357 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 358 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 359 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 360 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 361 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 362 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 363 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 364 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 365 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 366 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 367 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 368 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 369 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 370 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 371 | ||
| 372 | PORT_START("IN3") | |
| 373 | PORT_DIPNAME( 0x01, 0x00, "3" ) | |
| 374 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 375 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 376 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 377 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 378 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 379 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 380 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 381 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 382 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 383 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 384 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 385 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 386 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 387 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 388 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 389 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 390 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 391 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 392 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 393 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 394 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 395 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 396 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 397 | INPUT_PORTS_END | |
| 398 | ||
| 399 | static const gfx_layout tiles8x8_layout = | |
| 400 | { | |
| 401 | 16,8, | |
| 402 | RGN_FRAC(1,1), | |
| 403 | 8, | |
| 404 | { 0, 1, 2, 3,4,5,6,7 }, | |
| 405 | { 15*8, 14*8, 13*8, 12*8, 11*8, 10*8, 9*8, 8*8, 7*8, 6*8, 5*8, 4*8, 3*8, 2*8, 1*8, 0*8 }, | |
| 406 | { 7*128, 6*128, 5*128, 4*128, 3*128, 2*128, 1*128, 0*128 }, | |
| 407 | 128*8 | |
| 408 | }; | |
| 409 | ||
| 410 | static GFXDECODE_START( chance32 ) | |
| 411 | GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 8 ) | |
| 412 | GFXDECODE_ENTRY( "gfx2", 0, tiles8x8_layout, 0, 8 ) | |
| 413 | GFXDECODE_END | |
| 414 | ||
| 415 | ||
| 416 | ||
| 417 | static MACHINE_START( chance32 ) | |
| 418 | { | |
| 419 | ||
| 420 | } | |
| 421 | ||
| 422 | static MACHINE_RESET( chance32 ) | |
| 423 | { | |
| 424 | ||
| 425 | } | |
| 426 | ||
| 427 | static const mc6845_interface mc6845_intf = | |
| 428 | { | |
| 429 | "screen", /* screen we are acting on */ | |
| 430 | 16, /* number of pixels per video memory address */ | |
| 431 | NULL, /* before pixel update callback */ | |
| 432 | NULL, /* row update callback */ | |
| 433 | NULL, /* after pixel update callback */ | |
| 434 | DEVCB_NULL, /* callback for display state changes */ | |
| 435 | DEVCB_NULL, /* callback for cursor state changes */ | |
| 436 | DEVCB_NULL, /* HSYNC callback */ | |
| 437 | DEVCB_NULL, /* VSYNC callback */ | |
| 438 | NULL /* update address callback */ | |
| 439 | }; | |
| 440 | ||
| 441 | ||
| 442 | static MACHINE_CONFIG_START( chance32, chance32_state ) | |
| 443 | ||
| 444 | /* basic machine hardware */ | |
| 445 | MCFG_CPU_ADD("maincpu", Z80,12000000/2) | |
| 446 | MCFG_CPU_PROGRAM_MAP(chance32_map) | |
| 447 | MCFG_CPU_IO_MAP(chance32_portmap) | |
| 448 | MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) | |
| 449 | ||
| 450 | MCFG_MACHINE_START(chance32) | |
| 451 | MCFG_MACHINE_RESET(chance32) | |
| 452 | ||
| 453 | /* video hardware */ | |
| 454 | MCFG_SCREEN_ADD("screen", RASTER) | |
| 455 | MCFG_SCREEN_REFRESH_RATE(60) | |
| 456 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 457 | MCFG_SCREEN_SIZE(40*16, 32*8) | |
| 458 | MCFG_SCREEN_VISIBLE_AREA(0, 35*16-1, 0, 29*8-1) | |
| 459 | MCFG_SCREEN_UPDATE_STATIC(chance32) | |
| 460 | ||
| 461 | MCFG_MC6845_ADD("crtc", H46505, 12000000/14, mc6845_intf) /* hand tuned to get ~60 fps */ | |
| 462 | ||
| 463 | MCFG_GFXDECODE(chance32) | |
| 464 | MCFG_PALETTE_LENGTH(0x800) | |
| 465 | ||
| 466 | MCFG_VIDEO_START(chance32) | |
| 467 | ||
| 468 | /* sound hardware */ | |
| 469 | MCFG_SPEAKER_STANDARD_MONO("mono") | |
| 470 | ||
| 471 | MCFG_OKIM6295_ADD("oki", 12000000/12, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified | |
| 472 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 473 | MACHINE_CONFIG_END | |
| 474 | ||
| 475 | ||
| 476 | ||
| 477 | ROM_START( chance32 ) | |
| 478 | ROM_REGION( 0x10000, "maincpu", 0 ) | |
| 479 | ROM_LOAD( "0.u52", 0x00000, 0x10000, CRC(331048b2) SHA1(deb4da570b3efe6e15deefb6351f925b642b4614) ) | |
| 480 | ||
| 481 | ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) | |
| 482 | ROM_LOAD16_BYTE( "4.u64", 0x00001, 0x20000, CRC(da80d9bd) SHA1(3b5235ab59fd55f0ec5584b3cf1aa5c8f36c76f6) ) | |
| 483 | ROM_LOAD16_BYTE( "5.u65", 0x00000, 0x20000, CRC(7528773b) SHA1(95c8e55cdec2c5c1dcdcc5a7edc6e590e3829f92) ) | |
| 484 | ROM_LOAD16_BYTE( "6.u66", 0x40001, 0x20000, CRC(cee2ffb0) SHA1(527c2072d39484317b0320afd975df1bbe244a01) ) | |
| 485 | ROM_LOAD16_BYTE( "7.u67", 0x40000, 0x20000, CRC(42dc4b69) SHA1(44c8f902db4c7ac235d5ea15d1b509f98663690a) ) | |
| 486 | ||
| 487 | ROM_REGION( 0x40000, "gfx2", ROMREGION_INVERT ) | |
| 488 | ROM_LOAD16_BYTE( "1.u71", 0x00001, 0x20000, CRC(f8e85873) SHA1(6ad24f7fcbc62a03180e168d70239df1ce662f0d) ) | |
| 489 | ROM_LOAD16_BYTE( "2.u72", 0x00000, 0x20000, CRC(860b534d) SHA1(44649ea93acdf173356bfcd7e81916253b52c378) ) | |
| 490 | ||
| 491 | ROM_REGION( 0x40000, "oki", 0 ) | |
| 492 | ROM_LOAD( "8.u21", 0x00000, 0x40000, CRC(161b35dd) SHA1(d20a75a4c4ed9cd9cfc12faee921122274840f06) ) | |
| 493 | ||
| 494 | ROM_REGION( 0x40000, "gals", 0 ) // no idea if these are any good | |
| 495 | ROM_LOAD( "gal20v8a.u53.jed.bin", 0x0000, 0x157, CRC(9f680800) SHA1(2fa41ead85136e851d465432a7b9d3ec848c7a22) ) | |
| 496 | ROM_LOAD( "gal20v8a.u54.jed.bin", 0x0000, 0x157, CRC(9f680800) SHA1(2fa41ead85136e851d465432a7b9d3ec848c7a22) ) | |
| 497 | ROM_LOAD( "gal20v8a.u55.jed.bin", 0x0000, 0x157, CRC(9f680800) SHA1(2fa41ead85136e851d465432a7b9d3ec848c7a22) ) | |
| 498 | ROM_LOAD( "gal20v8a.u56.jed.bin", 0x0000, 0x157, CRC(6bab01ad) SHA1(c69e4be41a989a52788af8062f48bbe26bc3dab8) ) | |
| 499 | ROM_LOAD( "gal20v8a.u57.jed.bin", 0x0000, 0x157, CRC(787c4159) SHA1(f4a869b317c6be1024f1ca21bcc4af478c8227c8) ) | |
| 500 | ROM_LOAD( "gal20v8a.u58.jed.bin", 0x0000, 0x157, CRC(7b16053b) SHA1(cdb289d4f27c7a1a918393943bb8db9712e2f52e) ) | |
| 501 | ||
| 502 | ROM_LOAD( "gal16v8a.u47.jed.bin", 0x0000, 0x117, CRC(a733f0de) SHA1(6eec26043cedb3cae4efe93faa84a07327be468b) ) | |
| 503 | ROM_LOAD( "gal16v8a.u48.jed.bin", 0x0000, 0x117, CRC(5f1360ef) SHA1(56e4ee0dbae5602d810b2f7c744a71eb1a1e08a8) ) | |
| 504 | ||
| 505 | ROM_LOAD( "gal16v8a.u32.jed.bin", 0x0000, 0x117, CRC(c0784cd1) SHA1(0ae2ce482d379e29c2a9f130fc0d9ed928faef98) ) | |
| 506 | ||
| 507 | ROM_LOAD( "gal16v8a.u24.jed.bin", 0x0000, 0x117, CRC(a733f0de) SHA1(6eec26043cedb3cae4efe93faa84a07327be468b) ) | |
| 508 | ROM_END | |
| 509 | ||
| 510 | ||
| 511 | ||
| 512 | ||
| 513 | ||
| 514 | GAME( 19??, chance32, 0, chance32, chance32, 0, ROT0, "Pal Company", "Chance Thirty Two", GAME_NOT_WORKING ) |
| r15082 | r15083 | |
|---|---|---|
| 137 | 137 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 138 | 138 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 139 | 139 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 140 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK | |
| 140 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 141 | 141 | |
| 142 | 142 | PORT_START("DSW1") |
| 143 | 143 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | READ32_MEMBER(atarigt_state::special_port2_r) |
| 101 | 101 | { |
| 102 | int temp = i | |
| 102 | int temp = iop | |
| 103 | 103 | temp ^= 0x0001; /* /A2DRDY always high for now */ |
| 104 | 104 | temp ^= 0x0008; /* A2D.EOC always high for now */ |
| 105 | 105 | return (temp << 16) | temp; |
| r15082 | r15083 | |
| 108 | 108 | |
| 109 | 109 | READ32_MEMBER(atarigt_state::special_port3_r) |
| 110 | 110 | { |
| 111 | int temp = i | |
| 111 | int temp = iop | |
| 112 | 112 | if (m_video_int_state) temp ^= 0x0001; |
| 113 | 113 | if (m_scanline_int_state) temp ^= 0x0002; |
| 114 | 114 | return (temp << 16) | temp; |
| r15082 | r15083 | |
| 118 | 118 | #if (HACK_TMEK_CONTROLS) |
| 119 | 119 | INLINE void compute_fake_pots(int *pots) |
| 120 | 120 | { |
| 121 | int fake = in | |
| 121 | int fake = machine.root_device().ioport | |
| 122 | 122 | |
| 123 | 123 | pots[0] = pots[1] = pots[2] = pots[3] = 0x80; |
| 124 | 124 | |
| r15082 | r15083 | |
| 155 | 155 | compute_fake_pots(pots); |
| 156 | 156 | return (pots[0] << 24) | (pots[3] << 8); |
| 157 | 157 | #else |
| 158 | return (i | |
| 158 | return (iop | |
| 159 | 159 | #endif |
| 160 | 160 | } |
| 161 | 161 | |
| r15082 | r15083 | |
| 167 | 167 | compute_fake_pots(pots); |
| 168 | 168 | return (pots[2] << 24) | (pots[1] << 8); |
| 169 | 169 | #else |
| 170 | return (i | |
| 170 | return (iop | |
| 171 | 171 | #endif |
| 172 | 172 | } |
| 173 | 173 | |
| r15082 | r15083 | |
| 658 | 658 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* A2D.EOC */ |
| 659 | 659 | PORT_BIT( 0x0030, IP_ACTIVE_LOW, IPT_UNUSED ) /* NC */ |
| 660 | 660 | PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) /* SELFTEST */ |
| 661 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 661 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* VBLANK */ | |
| 662 | 662 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 663 | 663 | |
| 664 | 664 | PORT_START("COIN") /* 68.STATUS (A2=1) */ |
| r15082 | r15083 | |
|---|---|---|
| 655 | 655 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 656 | 656 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 657 | 657 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:5,6") |
| 658 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 659 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 660 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 661 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 662 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 663 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 664 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 665 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 658 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 659 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 660 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 661 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 662 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 663 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 664 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 665 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 666 | 666 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:7,8") |
| 667 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 668 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 669 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 670 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) | |
| 671 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 672 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 673 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 674 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) | |
| 667 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 668 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 669 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 670 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x80) | |
| 671 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 672 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 673 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 674 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSWB",0x80,EQUALS,0x00) | |
| 675 | 675 | |
| 676 | 676 | /* 0x400002 -> 0x100984 */ |
| 677 | 677 | PORT_MODIFY("DSWB") |
| r15082 | r15083 | |
| 842 | 842 | state->m_tc0100scn = machine.device("tc0100scn"); |
| 843 | 843 | |
| 844 | 844 | /* configure the banks */ |
| 845 | state->membank("bank1")->configure_entry(0, | |
| 845 | state->membank("bank1")->configure_entry(0, sta | |
| 846 | 846 | state->membank("bank1")->configure_entries(1, 3, state->memregion("audiocpu")->base() + 0x10000, 0x04000); |
| 847 | 847 | |
| 848 | 848 | state->save_item(NAME(state->m_adpcm_pos)); |
| r15082 | r15083 | |
|---|---|---|
| 76 | 76 | discrete_sound_w(discrete, TRIPLHNT_LAMP_EN, state->m_misc_flags & 0x02); // Lamp is used to reset noise |
| 77 | 77 | discrete_sound_w(discrete, TRIPLHNT_BEAR_EN, state->m_misc_flags & 0x80); // bear |
| 78 | 78 | |
| 79 | is_witch_hunt = in | |
| 79 | is_witch_hunt = machine.root_device().ioport | |
| 80 | 80 | bit = ~state->m_misc_flags & 0x40; |
| 81 | 81 | |
| 82 | 82 | /* if we're not playing the sample yet, start it */ |
| r15082 | r15083 | |
| 108 | 108 | READ8_MEMBER(triplhnt_state::triplhnt_input_port_4_r) |
| 109 | 109 | { |
| 110 | 110 | watchdog_reset_w(space, 0, 0); |
| 111 | return i | |
| 111 | return iop | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | |
| 115 | 115 | READ8_MEMBER(triplhnt_state::triplhnt_misc_r) |
| 116 | 116 | { |
| 117 | 117 | triplhnt_update_misc(machine(), offset); |
| 118 | return i | |
| 118 | return iop | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | READ8_MEMBER(triplhnt_state::triplhnt_da_latch_r) |
| 123 | 123 | { |
| 124 | int cross_x = input_port_read(machine(), "STICKX"); | |
| 125 | int cross_y = input_port_read(machine(), "STICKY"); | |
| 124 | int cross_x = ioport("STICKX")->read(); | |
| 125 | int cross_y = ioport("STICKY")->read(); | |
| 126 | 126 | |
| 127 | 127 | m_da_latch = offset; |
| 128 | 128 | |
| r15082 | r15083 | |
| 196 | 196 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 197 | 197 | |
| 198 | 198 | PORT_START("VBLANK") |
| 199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 200 | 200 | |
| 201 | 201 | PORT_START("STICKX") |
| 202 | 202 | PORT_BIT( 0xfc, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xfc) PORT_CROSSHAIR(X, 62.0/64, 1.0/64, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) |
| r15082 | r15083 | |
|---|---|---|
| 369 | 369 | |
| 370 | 370 | switch ((m_mermaid_p[0] >> 2) & 3) |
| 371 | 371 | { |
| 372 | case 0: return input_port_read(machine(), "IN1"); | |
| 373 | case 1: return input_port_read(machine(), "IN2"); | |
| 374 | case 2: return input_port_read(machine(), "IN0"); | |
| 372 | case 0: return ioport("IN1")->read(); | |
| 373 | case 1: return ioport("IN2")->read(); | |
| 374 | case 2: return ioport("IN0")->read(); | |
| 375 | 375 | default: return 0xff; |
| 376 | 376 | } |
| 377 | 377 | } |
| r15082 | r15083 | |
| 386 | 386 | { |
| 387 | 387 | |
| 388 | 388 | UINT8 dsw = 0; |
| 389 | UINT8 dsw1 = input_port_read(machine(), "DSW1"); | |
| 390 | UINT8 dsw2 = input_port_read(machine(), "DSW2"); | |
| 389 | UINT8 dsw1 = ioport("DSW1")->read(); | |
| 390 | UINT8 dsw2 = ioport("DSW2")->read(); | |
| 391 | 391 | |
| 392 | 392 | switch ((m_mermaid_p[0] >> 5) & 3) |
| 393 | 393 | { |
| r15082 | r15083 | |
| 529 | 529 | PORT_DIPSETTING( 0x08, ( "Mode 1" ) ) |
| 530 | 530 | PORT_DIPSETTING( 0x00, ( "Mode 2" ) ) |
| 531 | 531 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6") |
| 532 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 533 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 534 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 535 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 536 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 537 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 538 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 539 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 532 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 533 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 534 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 535 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 536 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 537 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 538 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 539 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 540 | 540 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8") |
| 541 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 542 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 543 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 544 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x08) | |
| 545 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 546 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 547 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 548 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, PORTCOND_EQUALS, 0x00) | |
| 541 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 542 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 543 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 544 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x08) | |
| 545 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 546 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 547 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 548 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x08, EQUALS, 0x00) | |
| 549 | 549 | |
| 550 | 550 | PORT_START("DSW2") |
| 551 | 551 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2") |
| r15082 | r15083 | |
|---|---|---|
| 33 | 33 | CUSTOM_INPUT_MEMBER(wolfpack_state::wolfpack_dial_r) |
| 34 | 34 | { |
| 35 | 35 | int bit = (FPTR)param; |
| 36 | return ((i | |
| 36 | return ((iop | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 |
| r15082 | r15083 | |
|---|---|---|
| 71 | 71 | { |
| 72 | 72 | int val; |
| 73 | 73 | |
| 74 | val = i | |
| 74 | val = iop | |
| 75 | 75 | return ((val << (7 - offset)) & 0x80); |
| 76 | 76 | } |
| 77 | 77 | |
| r15082 | r15083 | |
| 79 | 79 | { |
| 80 | 80 | int val; |
| 81 | 81 | |
| 82 | val = i | |
| 82 | val = iop | |
| 83 | 83 | return ((val << (7 - offset)) & 0x80); |
| 84 | 84 | } |
| 85 | 85 | |
| r15082 | r15083 | |
| 87 | 87 | { |
| 88 | 88 | int val; |
| 89 | 89 | |
| 90 | val = i | |
| 90 | val = iop | |
| 91 | 91 | return ((val << (7 - offset)) & 0x80); |
| 92 | 92 | } |
| 93 | 93 |
| r15082 | r15083 | |
|---|---|---|
| 114 | 114 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 115 | 115 | PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 116 | 116 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 117 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_VBLANK | |
| 117 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 118 | 118 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 119 | 119 | PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW ) |
| 120 | 120 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r15082 | r15083 | |
|---|---|---|
| 326 | 326 | static READ8_DEVICE_HANDLER( royalmah_player_1_port_r ) |
| 327 | 327 | { |
| 328 | 328 | royalmah_state *state = device->machine().driver_data<royalmah_state>(); |
| 329 | int ret = ( | |
| 329 | int ret = (s | |
| 330 | 330 | |
| 331 | if ((state->m_input_port_select & 0x01) == 0) ret &= input_port_read(device->machine(), "KEY0"); | |
| 332 | if ((state->m_input_port_select & 0x02) == 0) ret &= input_port_read(device->machine(), "KEY1"); | |
| 333 | if ((state->m_input_port_select & 0x04) == 0) ret &= input_port_read(device->machine(), "KEY2"); | |
| 334 | if ((state->m_input_port_select & 0x08) == 0) ret &= input_port_read(device->machine(), "KEY3"); | |
| 335 | if ((state->m_input_port_select & 0x10) == 0) ret &= input_port_read(device->machine(), "KEY4"); | |
| 331 | if ((state->m_input_port_select & 0x01) == 0) ret &= state->ioport("KEY0")->read(); | |
| 332 | if ((state->m_input_port_select & 0x02) == 0) ret &= state->ioport("KEY1")->read(); | |
| 333 | if ((state->m_input_port_select & 0x04) == 0) ret &= state->ioport("KEY2")->read(); | |
| 334 | if ((state->m_input_port_select & 0x08) == 0) ret &= state->ioport("KEY3")->read(); | |
| 335 | if ((state->m_input_port_select & 0x10) == 0) ret &= state->ioport("KEY4")->read(); | |
| 336 | 336 | |
| 337 | 337 | return ret; |
| 338 | 338 | } |
| r15082 | r15083 | |
| 340 | 340 | static READ8_DEVICE_HANDLER( royalmah_player_2_port_r ) |
| 341 | 341 | { |
| 342 | 342 | royalmah_state *state = device->machine().driver_data<royalmah_state>(); |
| 343 | int ret = ( | |
| 343 | int ret = (s | |
| 344 | 344 | |
| 345 | if ((state->m_input_port_select & 0x01) == 0) ret &= input_port_read(device->machine(), "KEY5"); | |
| 346 | if ((state->m_input_port_select & 0x02) == 0) ret &= input_port_read(device->machine(), "KEY6"); | |
| 347 | if ((state->m_input_port_select & 0x04) == 0) ret &= input_port_read(device->machine(), "KEY7"); | |
| 348 | if ((state->m_input_port_select & 0x08) == 0) ret &= input_port_read(device->machine(), "KEY8"); | |
| 349 | if ((state->m_input_port_select & 0x10) == 0) ret &= input_port_read(device->machine(), "KEY9"); | |
| 345 | if ((state->m_input_port_select & 0x01) == 0) ret &= state->ioport("KEY5")->read(); | |
| 346 | if ((state->m_input_port_select & 0x02) == 0) ret &= state->ioport("KEY6")->read(); | |
| 347 | if ((state->m_input_port_select & 0x04) == 0) ret &= state->ioport("KEY7")->read(); | |
| 348 | if ((state->m_input_port_select & 0x08) == 0) ret &= state->ioport("KEY8")->read(); | |
| 349 | if ((state->m_input_port_select & 0x10) == 0) ret &= state->ioport("KEY9")->read(); | |
| 350 | 350 | |
| 351 | 351 | return ret; |
| 352 | 352 | } |
| r15082 | r15083 | |
| 357 | 357 | { |
| 358 | 358 | switch (m_dsw_select) |
| 359 | 359 | { |
| 360 | case 0x00: return input_port_read(machine(), "DSW3"); /* DSW3 */ | |
| 361 | case 0x20: return input_port_read(machine(), "DSW4"); /* DSW4 */ | |
| 362 | case 0x40: return input_port_read(machine(), "DSW2"); /* DSW2 */ | |
| 360 | case 0x00: return ioport("DSW3")->read(); /* DSW3 */ | |
| 361 | case 0x20: return ioport("DSW4")->read(); /* DSW4 */ | |
| 362 | case 0x40: return ioport("DSW2")->read(); /* DSW2 */ | |
| 363 | 363 | } |
| 364 | 364 | return 0; |
| 365 | 365 | } |
| r15082 | r15083 | |
| 376 | 376 | { |
| 377 | 377 | switch (m_suzume_bank) |
| 378 | 378 | { |
| 379 | case 0x08: return input_port_read(machine(), "DSW4"); /* DSW4 */ | |
| 380 | case 0x10: return input_port_read(machine(), "DSW3"); /* DSW3 */ | |
| 381 | case 0x18: return input_port_read(machine(), "DSW2"); /* DSW2 */ | |
| 379 | case 0x08: return ioport("DSW4")->read(); /* DSW4 */ | |
| 380 | case 0x10: return ioport("DSW3")->read(); /* DSW3 */ | |
| 381 | case 0x18: return ioport("DSW2")->read(); /* DSW2 */ | |
| 382 | 382 | } |
| 383 | 383 | return 0; |
| 384 | 384 | } |
| r15082 | r15083 | |
| 417 | 417 | |
| 418 | 418 | READ8_MEMBER(royalmah_state::mjapinky_dsw_r) |
| 419 | 419 | { |
| 420 | if (m_rombank == 0x0e) return i | |
| 420 | if (m_rombank == 0x0e) return iop | |
| 421 | 421 | else return *(machine().root_device().memregion("maincpu")->base() + 0x10000 + 0x8000 * m_rombank); |
| 422 | 422 | } |
| 423 | 423 | |
| r15082 | r15083 | |
| 459 | 459 | { |
| 460 | 460 | switch (m_dsw_select) |
| 461 | 461 | { |
| 462 | case 0x00: return input_port_read(machine(), "DSW4"); | |
| 463 | case 0x04: return input_port_read(machine(), "DSW1"); | |
| 464 | case 0x08: return input_port_read(machine(), "DSW2"); | |
| 465 | case 0x0c: return input_port_read(machine(), "DSW3"); | |
| 462 | case 0x00: return ioport("DSW4")->read(); | |
| 463 | case 0x04: return ioport("DSW1")->read(); | |
| 464 | case 0x08: return ioport("DSW2")->read(); | |
| 465 | case 0x0c: return ioport("DSW3")->read(); | |
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | return 0; |
| r15082 | r15083 | |
| 487 | 487 | { |
| 488 | 488 | switch (m_dsw_select) |
| 489 | 489 | { |
| 490 | // case 0x00: return input_port_read(machine(), "DSW4"); | |
| 491 | case 0x40: return input_port_read(machine(), "DSW2"); | |
| 492 | case 0x80: return input_port_read(machine(), "DSW3"); | |
| 493 | case 0xc0: return input_port_read(machine(), "DSW4"); | |
| 490 | // case 0x00: return ioport("DSW4")->read(); | |
| 491 | case 0x40: return ioport("DSW2")->read(); | |
| 492 | case 0x80: return ioport("DSW3")->read(); | |
| 493 | case 0xc0: return ioport("DSW4")->read(); | |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | return 0; |
| r15082 | r15083 | |
| 694 | 694 | { |
| 695 | 695 | switch (m_dsw_select & 7) |
| 696 | 696 | { |
| 697 | case 1: return input_port_read(machine(), "DSW1"); | |
| 698 | case 2: return input_port_read(machine(), "DSW2"); | |
| 699 | case 4: return input_port_read(machine(), "DSW3"); | |
| 697 | case 1: return ioport("DSW1")->read(); | |
| 698 | case 2: return ioport("DSW2")->read(); | |
| 699 | case 4: return ioport("DSW3")->read(); | |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | 702 | return 0xff; |
| r15082 | r15083 | |
| 818 | 818 | |
| 819 | 819 | READ8_MEMBER(royalmah_state::janptr96_dsw_r) |
| 820 | 820 | { |
| 821 | if (~m_dsw_select & 0x01) return input_port_read(machine(), "DSW4"); | |
| 822 | if (~m_dsw_select & 0x02) return input_port_read(machine(), "DSW3"); | |
| 823 | if (~m_dsw_select & 0x04) return input_port_read(machine(), "DSW2"); | |
| 824 | if (~m_dsw_select & 0x08) return input_port_read(machine(), "DSW1"); | |
| 825 | if (~m_dsw_select & 0x10) return input_port_read(machine(), "DSWTOP"); | |
| 821 | if (~m_dsw_select & 0x01) return ioport("DSW4")->read(); | |
| 822 | if (~m_dsw_select & 0x02) return ioport("DSW3")->read(); | |
| 823 | if (~m_dsw_select & 0x04) return ioport("DSW2")->read(); | |
| 824 | if (~m_dsw_select & 0x08) return ioport("DSW1")->read(); | |
| 825 | if (~m_dsw_select & 0x10) return ioport("DSWTOP")->read(); | |
| 826 | 826 | return 0xff; |
| 827 | 827 | } |
| 828 | 828 | |
| r15082 | r15083 | |
| 886 | 886 | |
| 887 | 887 | switch(offset) |
| 888 | 888 | { |
| 889 | case 0x8000: return input_port_read(machine(), "DSW4"); // dsw 4 | |
| 890 | case 0x8200: return input_port_read(machine(), "DSW3"); // dsw 3 | |
| 889 | case 0x8000: return ioport("DSW4")->read(); // dsw 4 | |
| 890 | case 0x8200: return ioport("DSW3")->read(); // dsw 3 | |
| 891 | 891 | case 0x9001: return ay8910_r(machine().device("aysnd"), 0); // inputs |
| 892 | case 0x9011: return i | |
| 892 | case 0x9011: return iop | |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | logerror("%04X: unmapped input read at %04X\n", cpu_get_pc(&space.device()), offset); |
| r15082 | r15083 | |
| 940 | 940 | |
| 941 | 941 | READ8_MEMBER(royalmah_state::mjifb_p3_r) |
| 942 | 942 | { |
| 943 | return i | |
| 943 | return iop | |
| 944 | 944 | } |
| 945 | 945 | READ8_MEMBER(royalmah_state::mjifb_p5_r) |
| 946 | 946 | { |
| 947 | return i | |
| 947 | return iop | |
| 948 | 948 | } |
| 949 | 949 | READ8_MEMBER(royalmah_state::mjifb_p6_r) |
| 950 | 950 | { |
| 951 | return i | |
| 951 | return iop | |
| 952 | 952 | } |
| 953 | 953 | READ8_MEMBER(royalmah_state::mjifb_p7_r) |
| 954 | 954 | { |
| 955 | return i | |
| 955 | return iop | |
| 956 | 956 | } |
| 957 | 957 | READ8_MEMBER(royalmah_state::mjifb_p8_r) |
| 958 | 958 | { |
| r15082 | r15083 | |
| 995 | 995 | |
| 996 | 996 | switch(offset) |
| 997 | 997 | { |
| 998 | case 0x8000: return input_port_read(machine(), "DSW2"); // dsw 2 | |
| 999 | case 0x8001: return input_port_read(machine(), "DSW1"); // dsw 1 | |
| 998 | case 0x8000: return ioport("DSW2")->read(); // dsw 2 | |
| 999 | case 0x8001: return ioport("DSW1")->read(); // dsw 1 | |
| 1000 | 1000 | case 0x9001: return ay8910_r(machine().device("aysnd"), 0); // inputs |
| 1001 | case 0x9011: return i | |
| 1001 | case 0x9011: return iop | |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | 1004 | logerror("%04X: unmapped input read at %04X\n", cpu_get_pc(&space.device()), offset); |
| r15082 | r15083 | |
| 1113 | 1113 | { |
| 1114 | 1114 | switch( m_dsw_select ) |
| 1115 | 1115 | { |
| 1116 | case 0x00: return input_port_read(machine(), "DSW1"); | |
| 1117 | case 0x01: return input_port_read(machine(), "DSW2"); | |
| 1118 | case 0x02: return input_port_read(machine(), "DSW3"); | |
| 1119 | case 0x03: return input_port_read(machine(), "DSW4"); | |
| 1120 | case 0x04: return input_port_read(machine(), "DSWTOP"); | |
| 1116 | case 0x00: return ioport("DSW1")->read(); | |
| 1117 | case 0x01: return ioport("DSW2")->read(); | |
| 1118 | case 0x02: return ioport("DSW3")->read(); | |
| 1119 | case 0x03: return ioport("DSW4")->read(); | |
| 1120 | case 0x04: return ioport("DSWTOP")->read(); | |
| 1121 | 1121 | } |
| 1122 | 1122 | logerror("%04X: unmapped dsw read %02X\n", cpu_get_pc(&space.device()), m_dsw_select); |
| 1123 | 1123 | return 0xff; |
| r15082 | r15083 | |
| 1891 | 1891 | PORT_DIPSETTING( 0x02, "B" ) |
| 1892 | 1892 | PORT_DIPSETTING( 0x01, "C" ) |
| 1893 | 1893 | PORT_DIPSETTING( 0x03, "D" ) |
| 1894 | PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x00) | |
| 1895 | PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x02) | |
| 1896 | PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (3renchan bonus)" ) PORT_DIPLOCATION("SW2:3,4") PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x01) | |
| 1894 | PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x00) | |
| 1895 | PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) | |
| 1896 | PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (3renchan bonus)" ) PORT_DIPLOCATION("SW2:3,4") PORT_CONDITION("DSW3", 0x03, EQUALS, 0x01) | |
| 1897 | 1897 | PORT_DIPSETTING( 0x00, "A (1 2 2 3 pts.)" ) |
| 1898 | 1898 | PORT_DIPSETTING( 0x04, "B (1 2 2 5 pts.)" ) |
| 1899 | 1899 | PORT_DIPSETTING( 0x08, "C (1 2 3 6 pts.)" ) |
| 1900 | 1900 | PORT_DIPSETTING( 0x0c, "D (1 2 6 10 pts.)" ) |
| 1901 | PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (5renchan bonus)" ) PORT_DIPLOCATION("SW2:3,4") PORT_CONDITION("DSW3", 0x03, | |
| 1901 | PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (5renchan bonus)" ) PORT_DIPLOCATION("SW2:3,4") PORT_CONDITION("DSW3", 0x03, | |
| 1902 | 1902 | PORT_DIPSETTING( 0x00, "A (5 pts.)" ) |
| 1903 | 1903 | PORT_DIPSETTING( 0x04, "B (10 pts.)" ) |
| 1904 | 1904 | PORT_DIPSETTING( 0x08, "C (15 pts.)" ) |
| r15082 | r15083 | |
|---|---|---|
| 107 | 107 | static READ16_HANDLER( coin_chip_r ) |
| 108 | 108 | { |
| 109 | 109 | if (offset == 1) |
| 110 | return | |
| 110 | return | |
| 111 | 111 | logerror("%06x:coin_chip_r(%02x) & %04x\n", cpu_get_pc(&space->device()), offset, mem_mask); |
| 112 | 112 | return 0xffff; |
| 113 | 113 | } |
| r15082 | r15083 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | READ8_MEMBER(shisen_state::sichuan2_dsw1_r) |
| 17 | 17 | { |
| 18 | int ret = i | |
| 18 | int ret = iop | |
| 19 | 19 | |
| 20 | 20 | /* Based on the coin mode fill in the upper bits */ |
| 21 | if (i | |
| 21 | if (iop | |
| 22 | 22 | { |
| 23 | 23 | /* Mode 1 */ |
| 24 | ret |= (i | |
| 24 | ret |= (iop | |
| 25 | 25 | } |
| 26 | 26 | else |
| 27 | 27 | { |
| 28 | 28 | /* Mode 2 */ |
| 29 | ret |= (i | |
| 29 | ret |= (iop | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return ret; |
| r15082 | r15083 | |
| 117 | 117 | PORT_DIPSETTING( 0x08, DEF_STR( Normal ) ) |
| 118 | 118 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 119 | 119 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 120 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04, | |
| 120 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04, | |
| 121 | 121 | PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) |
| 122 | 122 | PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) |
| 123 | 123 | PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) |
| r15082 | r15083 | |
| 134 | 134 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_5C ) ) |
| 135 | 135 | PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) |
| 136 | 136 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 137 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04, | |
| 137 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04, | |
| 138 | 138 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 139 | 139 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| 140 | 140 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 141 | 141 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 142 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04, | |
| 142 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04, | |
| 143 | 143 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) |
| 144 | 144 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) |
| 145 | 145 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) |
| r15082 | r15083 | |
|---|---|---|
| 257 | 257 | return res << 8; |
| 258 | 258 | } |
| 259 | 259 | else |
| 260 | return ~i | |
| 260 | return ~iop | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | WRITE16_MEMBER(nmk16_state::macross2_sound_reset_w) |
| r15082 | r15083 | |
| 750 | 750 | /*needed because of the uncompatibility of the dsw settings.*/ |
| 751 | 751 | if(dsw_setting) // Thunder Dragon |
| 752 | 752 | { |
| 753 | dsw[0] = (input_port_read(machine, "DSW2") & 0x7); | |
| 754 | dsw[1] = (input_port_read(machine, "DSW2") & 0x38) >> 3; | |
| 753 | dsw[0] = (machine.root_device().ioport("DSW2")->read() & 0x7); | |
| 754 | dsw[1] = (machine.root_device().ioport("DSW2")->read() & 0x38) >> 3; | |
| 755 | 755 | for(i=0;i<2;i++) |
| 756 | 756 | { |
| 757 | 757 | switch(dsw[i] & 7) |
| r15082 | r15083 | |
| 769 | 769 | } |
| 770 | 770 | else // Hacha Mecha Fighter |
| 771 | 771 | { |
| 772 | dsw[0] = (input_port_read(machine, "DSW1") & 0x0700) >> 8; | |
| 773 | dsw[1] = (input_port_read(machine, "DSW1") & 0x3800) >> 11; | |
| 772 | dsw[0] = (machine.root_device().ioport("DSW1")->read() & 0x0700) >> 8; | |
| 773 | dsw[1] = (machine.root_device().ioport("DSW1")->read() & 0x3800) >> 11; | |
| 774 | 774 | for(i=0;i<2;i++) |
| 775 | 775 | { |
| 776 | 776 | switch(dsw[i] & 7) |
| r15082 | r15083 | |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | 790 | /*read the coin port*/ |
| 791 | coin_input = (~(in | |
| 791 | coin_input = (~(machine.root_device().ioport | |
| 792 | 792 | |
| 793 | 793 | if(coin_input & 0x01)//coin 1 |
| 794 | 794 | { |
| r15082 | r15083 | |
|---|---|---|
| 251 | 251 | /* I have NO IDEA if this is correct or not */ |
| 252 | 252 | m_bottomline = ~data & 0x20; |
| 253 | 253 | |
| 254 | if (i | |
| 254 | if (iop | |
| 255 | 255 | m_flip = ~data & 0x10; |
| 256 | 256 | |
| 257 | if (!(i | |
| 257 | if (!(iop | |
| 258 | 258 | machine().sound().system_mute(data & 0x80); |
| 259 | 259 | |
| 260 | 260 | /* sound command in lower 4 bytes */ |
| r15082 | r15083 | |
| 326 | 326 | |
| 327 | 327 | m_bottomline = ~data & 0x20; |
| 328 | 328 | |
| 329 | if (i | |
| 329 | if (iop | |
| 330 | 330 | m_flip = ~data & 0x10; |
| 331 | 331 | |
| 332 | if (!(i | |
| 332 | if (!(iop | |
| 333 | 333 | machine().sound().system_mute(data & 0x80); |
| 334 | 334 | } |
| 335 | 335 | |
| r15082 | r15083 | |
| 355 | 355 | if (data & 0xf0) |
| 356 | 356 | popmessage("M15 ctrl: %02x",data); |
| 357 | 357 | #endif |
| 358 | if (i | |
| 358 | if (iop | |
| 359 | 359 | m_flip = ~data & 0x04; |
| 360 | if (!(i | |
| 360 | if (!(iop | |
| 361 | 361 | machine().sound().system_mute(data & 0x08); |
| 362 | 362 | } |
| 363 | 363 |
| r15082 | r15083 | |
|---|---|---|
| 1651 | 1651 | // loop over the defaults |
| 1652 | 1652 | for (entry = typelist.first(); entry != NULL; entry = entry->next()) |
| 1653 | 1653 | { |
| 1654 | switch (entry->type) | |
| 1654 | switch (entry->type()) | |
| 1655 | 1655 | { |
| 1656 | 1656 | // configurable UI mode switch |
| 1657 | 1657 | case IPT_UI_TOGGLE_UI: |
| r15082 | r15083 | |
| 1670 | 1670 | mameid_code = lookup_mame_code(fullmode); |
| 1671 | 1671 | } |
| 1672 | 1672 | ui_code = input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, input_item_id(mameid_code)); |
| 1673 | entry->defseq | |
| 1673 | entry->defseq(SEQ_TYPE_STANDARD).set(ui_code); | |
| 1674 | 1674 | break; |
| 1675 | 1675 | // alt-enter for fullscreen |
| 1676 | 1676 | case IPT_OSD_1: |
| 1677 | entry->token = "TOGGLE_FULLSCREEN"; | |
| 1678 | entry->name = "Toggle Fullscreen"; | |
| 1679 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_ENTER, KEYCODE_LALT); | |
| 1677 | entry->configure_osd("TOGGLE_FULLSCREEN", "Toggle Fullscreen"); | |
| 1678 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_ENTER, KEYCODE_LALT); | |
| 1680 | 1679 | break; |
| 1681 | 1680 | |
| 1682 | 1681 | // disable UI_SELECT when LALT is down, this stops selecting |
| 1683 | 1682 | // things in the menu when toggling fullscreen with LALT+ENTER |
| 1684 | 1683 | /* case IPT_UI_SELECT: |
| 1685 | entry->defseq | |
| 1684 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_ENTER, input_seq::not_code, KEYCODE_LALT); | |
| 1686 | 1685 | break;*/ |
| 1687 | 1686 | |
| 1688 | 1687 | // page down for fastforward (must be OSD_3 as per src/emu/ui.c) |
| 1689 | 1688 | case IPT_UI_FAST_FORWARD: |
| 1690 | entry->token = "FAST_FORWARD"; | |
| 1691 | entry->name = "Fast Forward"; | |
| 1692 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_PGDN); | |
| 1689 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_PGDN); | |
| 1693 | 1690 | break; |
| 1694 | 1691 | |
| 1695 | 1692 | // OSD hotkeys use LCTRL and start at F3, they start at |
| r15082 | r15083 | |
| 1699 | 1696 | |
| 1700 | 1697 | // LCTRL-F3 to toggle fullstretch |
| 1701 | 1698 | case IPT_OSD_2: |
| 1702 | entry->token = "TOGGLE_FULLSTRETCH"; | |
| 1703 | entry->name = "Toggle Uneven stretch"; | |
| 1704 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_F3, KEYCODE_LCONTROL); | |
| 1699 | entry->configure_osd("TOGGLE_FULLSTRETCH", "Toggle Uneven stretch"); | |
| 1700 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F3, KEYCODE_LCONTROL); | |
| 1705 | 1701 | break; |
| 1706 | 1702 | // add a Not lcrtl condition to the reset key |
| 1707 | 1703 | case IPT_UI_SOFT_RESET: |
| 1708 | entry->defseq | |
| 1704 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F3, input_seq::not_code, KEYCODE_LCONTROL, input_seq::not_code, KEYCODE_LSHIFT); | |
| 1709 | 1705 | break; |
| 1710 | 1706 | |
| 1711 | 1707 | // LCTRL-F4 to toggle keep aspect |
| 1712 | 1708 | case IPT_OSD_4: |
| 1713 | entry->token = "TOGGLE_KEEP_ASPECT"; | |
| 1714 | entry->name = "Toggle Keepaspect"; | |
| 1715 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_F4, KEYCODE_LCONTROL); | |
| 1709 | entry->configure_osd("TOGGLE_KEEP_ASPECT", "Toggle Keepaspect"); | |
| 1710 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F4, KEYCODE_LCONTROL); | |
| 1716 | 1711 | break; |
| 1717 | 1712 | // add a Not lcrtl condition to the show gfx key |
| 1718 | 1713 | case IPT_UI_SHOW_GFX: |
| 1719 | entry->defseq | |
| 1714 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F4, input_seq::not_code, KEYCODE_LCONTROL); | |
| 1720 | 1715 | break; |
| 1721 | 1716 | |
| 1722 | 1717 | // LCTRL-F5 to toggle OpenGL filtering |
| 1723 | 1718 | case IPT_OSD_5: |
| 1724 | entry->token = "TOGGLE_FILTER"; | |
| 1725 | entry->name = "Toggle Filter"; | |
| 1726 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_F5, KEYCODE_LCONTROL); | |
| 1719 | entry->configure_osd("TOGGLE_FILTER", "Toggle Filter"); | |
| 1720 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F5, KEYCODE_LCONTROL); | |
| 1727 | 1721 | break; |
| 1728 | 1722 | // add a Not lcrtl condition to the toggle debug key |
| 1729 | 1723 | case IPT_UI_TOGGLE_DEBUG: |
| 1730 | entry->defseq | |
| 1724 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F5, input_seq::not_code, KEYCODE_LCONTROL); | |
| 1731 | 1725 | break; |
| 1732 | 1726 | |
| 1733 | 1727 | // LCTRL-F6 to decrease OpenGL prescaling |
| 1734 | 1728 | case IPT_OSD_6: |
| 1735 | entry->token = "DECREASE_PRESCALE"; | |
| 1736 | entry->name = "Decrease Prescaling"; | |
| 1737 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_F6, KEYCODE_LCONTROL); | |
| 1729 | entry->configure_osd("DECREASE_PRESCALE", "Decrease Prescaling"); | |
| 1730 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F6, KEYCODE_LCONTROL); | |
| 1738 | 1731 | break; |
| 1739 | 1732 | // add a Not lcrtl condition to the toggle cheat key |
| 1740 | 1733 | case IPT_UI_TOGGLE_CHEAT: |
| 1741 | entry->defseq | |
| 1734 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F6, input_seq::not_code, KEYCODE_LCONTROL); | |
| 1742 | 1735 | break; |
| 1743 | 1736 | |
| 1744 | 1737 | // LCTRL-F7 to increase OpenGL prescaling |
| 1745 | 1738 | case IPT_OSD_7: |
| 1746 | entry->token = "INCREASE_PRESCALE"; | |
| 1747 | entry->name = "Increase Prescaling"; | |
| 1748 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_F7, KEYCODE_LCONTROL); | |
| 1739 | entry->configure_osd("INCREASE_PRESCALE", "Increase Prescaling"); | |
| 1740 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F7, KEYCODE_LCONTROL); | |
| 1749 | 1741 | break; |
| 1750 | 1742 | // add a Not lcrtl condition to the load state key |
| 1751 | 1743 | case IPT_UI_LOAD_STATE: |
| 1752 | entry->defseq | |
| 1744 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F7, input_seq::not_code, KEYCODE_LCONTROL, input_seq::not_code, KEYCODE_LSHIFT); | |
| 1753 | 1745 | break; |
| 1754 | 1746 | |
| 1755 | 1747 | // add a Not lcrtl condition to the throttle key |
| 1756 | 1748 | case IPT_UI_THROTTLE: |
| 1757 | entry->defseq | |
| 1749 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F10, input_seq::not_code, KEYCODE_LCONTROL); | |
| 1758 | 1750 | break; |
| 1759 | 1751 | |
| 1760 | 1752 | // disable the config menu if the ALT key is down |
| 1761 | 1753 | // (allows ALT-TAB to switch between apps) |
| 1762 | 1754 | case IPT_UI_CONFIGURE: |
| 1763 | entry->defseq | |
| 1755 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_TAB, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_RALT); | |
| 1764 | 1756 | break; |
| 1757 | ||
| 1758 | // leave everything else alone | |
| 1759 | default: | |
| 1760 | break; | |
| 1765 | 1761 | } |
| 1766 | 1762 | } |
| 1767 | 1763 | } |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | TEST_GCC = $(shell gcc --version) |
| 248 | 248 | ifeq ($(findstring 4.4,$(TEST_GCC)),) |
| 249 | 249 | #if we use new tools |
| 250 | LDFLAGS += -static | |
| 250 | LDFLAGS += -static | |
| 251 | 251 | endif |
| 252 | 252 | |
| 253 | 253 | # add the windows libraries |
| r15082 | r15083 | |
|---|---|---|
| 767 | 767 | |
| 768 | 768 | // loop over the defaults |
| 769 | 769 | for (entry = typelist.first(); entry != NULL; entry = entry->next()) |
| 770 | switch (entry->type) | |
| 770 | switch (entry->type()) | |
| 771 | 771 | { |
| 772 | 772 | // disable the config menu if the ALT key is down |
| 773 | 773 | // (allows ALT-TAB to switch between windows apps) |
| 774 | 774 | case IPT_UI_CONFIGURE: |
| 775 | entry->defseq | |
| 775 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_TAB, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_RALT); | |
| 776 | 776 | break; |
| 777 | 777 | |
| 778 | 778 | // alt-enter for fullscreen |
| 779 | 779 | case IPT_OSD_1: |
| 780 | entry->token = "TOGGLE_FULLSCREEN"; | |
| 781 | entry->name = "Toggle Fullscreen"; | |
| 782 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_LALT, KEYCODE_ENTER); | |
| 780 | entry->configure_osd("TOGGLE_FULLSCREEN", "Toggle Fullscreen"); | |
| 781 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_LALT, KEYCODE_ENTER); | |
| 783 | 782 | break; |
| 784 | 783 | |
| 785 | 784 | // alt-F12 for fullscreen snap |
| 786 | 785 | case IPT_OSD_2: |
| 787 | entry->token = "RENDER_SNAP"; | |
| 788 | entry->name = "Take Rendered Snapshot"; | |
| 789 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_LALT, KEYCODE_F12); | |
| 786 | entry->configure_osd("RENDER_SNAP", "Take Rendered Snapshot"); | |
| 787 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_LALT, KEYCODE_F12); | |
| 790 | 788 | break; |
| 791 | 789 | |
| 792 | 790 | // alt-F11 for fullscreen video |
| 793 | 791 | case IPT_OSD_3: |
| 794 | entry->token = "RENDER_AVI"; | |
| 795 | entry->name = "Record Rendered Video"; | |
| 796 | entry->defseq[SEQ_TYPE_STANDARD].set(KEYCODE_LALT, KEYCODE_F11); | |
| 792 | entry->configure_osd("RENDER_AVI", "Record Rendered Video"); | |
| 793 | entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_LALT, KEYCODE_F11); | |
| 797 | 794 | break; |
| 795 | ||
| 796 | // leave everything else alone | |
| 797 | default: | |
| 798 | break; | |
| 798 | 799 | } |
| 799 | 800 | } |
| 800 | 801 |
| r15082 | r15083 | |
|---|---|---|
| 335 | 335 | |
| 336 | 336 | static int debugwin_seq_pressed(running_machine &machine) |
| 337 | 337 | { |
| 338 | const input_seq &seq = inp | |
| 338 | const input_seq &seq = machine.ioport().type_seq( | |
| 339 | 339 | int result = FALSE; |
| 340 | 340 | int invert = FALSE; |
| 341 | 341 | int first = TRUE; |
| r15082 | r15083 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | void m68307_set_port_callbacks(device_t *device, m68307_porta_read_callback porta_r, m68307_porta_write_callback m_m68307_porta_w, m68307_portb_read_callback portb_r, m68307_portb_write_callback m_m68307_portb_w); |
| 144 | 144 | UINT16 m68307_get_cs(device_t *device, offs_t address); |
| 145 | UINT16 m68340_get_cs(device_t *device, offs_t address); | |
| 145 | 146 | void m68307_set_interrupt(device_t *device, int level, int vector); |
| 146 | 147 | void m68307_timer0_interrupt(legacy_cpu_device *cpudev); |
| 147 | 148 | void m68307_timer1_interrupt(legacy_cpu_device *cpudev); |
| r15082 | r15083 | |
|---|---|---|
| 1318 | 1318 | write32 = m68k_write32_delegate(FUNC(address_space::write_dword), &space); |
| 1319 | 1319 | } |
| 1320 | 1320 | |
| 1321 | /* todo: is it possible to calculate the address map based on CS when they change | |
| 1322 | and install handlers? Going through this logic for every memory access is | |
| 1323 | very slow */ | |
| 1324 | ||
| 1321 | 1325 | int m68307_calc_cs(m68ki_cpu_core *m68k, offs_t address) |
| 1322 | 1326 | { |
| 1323 | 1327 | m68307_sim* sim = m68k->m68307SIM; |
| r15082 | r15083 | |
| 1333 | 1337 | return 0; |
| 1334 | 1338 | } |
| 1335 | 1339 | |
| 1340 | /* see note above */ | |
| 1336 | 1341 | |
| 1342 | int m68340_calc_cs(m68ki_cpu_core *m68k, offs_t address) | |
| 1343 | { | |
| 1344 | m68340_sim* sim = m68k->m68340SIM; | |
| 1337 | 1345 | |
| 1346 | if ( !(sim->m_ba[0] & 1) ) return 1; | |
| 1347 | ||
| 1348 | for (int i=0;i<4;i++) | |
| 1349 | { | |
| 1350 | if (sim->m_ba[i] & 1) | |
| 1351 | { | |
| 1352 | int mask = ((sim->m_am[i]&0xffffff00) | 0xff); | |
| 1353 | int base = sim->m_ba[i] & 0xffffff00; | |
| 1354 | int fcmask = (sim->m_am[i] & 0xf0); | |
| 1355 | int fcbase = (sim->m_ba[i] & 0xf0) & ~(sim->m_am[i] & 0xf0); | |
| 1356 | int fc = m68k->mmu_tmp_fc; | |
| 1357 | ||
| 1358 | if ((address & ~mask) == base && ((fc << 4) & ~fcmask ) == fcbase ) return i+1; | |
| 1359 | } | |
| 1360 | } | |
| 1361 | ||
| 1362 | return 0; | |
| 1363 | } | |
| 1364 | ||
| 1365 | ||
| 1366 | ||
| 1367 | ||
| 1338 | 1368 | UINT16 m68k_memory_interface::simple_read_immediate_16_m68307(offs_t address) |
| 1339 | 1369 | { |
| 1340 | 1370 | // m_cpustate->m68307_currentcs = m68307_calc_cs(m_cpustate, address); |
| r15082 | r15083 | |
| 1820 | 1850 | return m68k->m68307_currentcs; |
| 1821 | 1851 | } |
| 1822 | 1852 | |
| 1853 | UINT16 m68340_get_cs(device_t *device, offs_t address) | |
| 1854 | { | |
| 1855 | m68ki_cpu_core *m68k = m68k_get_safe_token(device); | |
| 1856 | ||
| 1857 | m68k->m68307_currentcs = m68340_calc_cs(m68k, address); | |
| 1858 | ||
| 1859 | return m68k->m68307_currentcs; | |
| 1860 | } | |
| 1861 | ||
| 1823 | 1862 | /**************************************************************************** |
| 1824 | 1863 | * State definition |
| 1825 | 1864 | ****************************************************************************/ |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | class devcb_resolver |
| 64 | 64 | { |
| 65 | 65 | public: |
| 66 | static | |
| 66 | static | |
| 67 | 67 | static device_t *resolve_device(int index, const char *tag, device_t ¤t); |
| 68 | 68 | static device_execute_interface *resolve_execute_interface(const char *tag, device_t ¤t); |
| 69 | 69 | static address_space *resolve_space(int index, const char *tag, device_t ¤t); |
| r15082 | r15083 | |
| 80 | 80 | // based on the provided tag |
| 81 | 81 | //------------------------------------------------- |
| 82 | 82 | |
| 83 | ||
| 83 | ||
| 84 | 84 | { |
| 85 | 85 | astring fullname; |
| 86 | | |
| 86 | | |
| 87 | 87 | if (result == NULL) |
| 88 | 88 | throw emu_fatalerror("Unable to find input port '%s' (requested by %s '%s')", fullname.cstr(), current.name(), current.tag()); |
| 89 | 89 | return result; |
| r15082 | r15083 | |
| 221 | 221 | |
| 222 | 222 | int devcb_resolved_read_line::from_port() |
| 223 | 223 | { |
| 224 | return ( | |
| 224 | return ( | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
| r15082 | r15083 | |
| 325 | 325 | |
| 326 | 326 | void devcb_resolved_write_line::to_port(int state) |
| 327 | 327 | { |
| 328 | | |
| 328 | | |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | |
| r15082 | r15083 | |
| 419 | 419 | |
| 420 | 420 | UINT8 devcb_resolved_read8::from_port(offs_t offset) |
| 421 | 421 | { |
| 422 | return | |
| 422 | return | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
| r15082 | r15083 | |
| 522 | 522 | |
| 523 | 523 | void devcb_resolved_write8::to_port(offs_t offset, UINT8 data) |
| 524 | 524 | { |
| 525 | | |
| 525 | | |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | |
| r15082 | r15083 | |
| 616 | 616 | |
| 617 | 617 | UINT16 devcb_resolved_read16::from_port(offs_t offset, UINT16 mask) |
| 618 | 618 | { |
| 619 | return | |
| 619 | return | |
| 620 | 620 | } |
| 621 | 621 | |
| 622 | 622 | |
| r15082 | r15083 | |
| 719 | 719 | |
| 720 | 720 | void devcb_resolved_write16::to_port(offs_t offset, UINT16 data, UINT16 mask) |
| 721 | 721 | { |
| 722 | | |
| 722 | | |
| 723 | 723 | } |
| 724 | 724 | |
| 725 | 725 |
| r15082 | r15083 | |
|---|---|---|
| 138 | 138 | INPUT_PORTS_END |
| 139 | 139 | |
| 140 | 140 | /* Dipswitch for font selection */ |
| 141 | #define CGA_FONT ( | |
| 141 | #define CGA_FONT ( | |
| 142 | 142 | |
| 143 | 143 | /* Dipswitch for monitor selection */ |
| 144 | #define CGA_MONITOR ( | |
| 144 | #define CGA_MONITOR ( | |
| 145 | 145 | #define CGA_MONITOR_RGB 0x00 /* Colour RGB */ |
| 146 | 146 | #define CGA_MONITOR_MONO 0x04 /* Greyscale RGB */ |
| 147 | 147 | #define CGA_MONITOR_COMPOSITE 0x08 /* Colour composite */ |
| r15082 | r15083 | |
| 150 | 150 | |
| 151 | 151 | |
| 152 | 152 | /* Dipswitch for chipset selection */ |
| 153 | #define CGA_CHIPSET ( | |
| 153 | #define CGA_CHIPSET ( | |
| 154 | 154 | #define CGA_CHIPSET_IBM 0x00 /* Original IBM CGA */ |
| 155 | 155 | #define CGA_CHIPSET_PC1512 0x20 /* PC1512 CGA subset */ |
| 156 | 156 | #define CGA_CHIPSET_PC200 0x40 /* PC200 in CGA mode */ |
| r15082 | r15083 | |
| 242 | 242 | |
| 243 | 243 | UINT8 *chr_gen; |
| 244 | 244 | |
| 245 | | |
| 245 | | |
| 246 | 246 | |
| 247 | 247 | mc6845_update_row_func update_row; |
| 248 | 248 | UINT8 palette_lut_2bpp[4]; |
| r15082 | r15083 | |
|---|---|---|
| 203 | 203 | // resolving a devcb may produce one of the following object types |
| 204 | 204 | union devcb_resolved_objects |
| 205 | 205 | { |
| 206 | | |
| 206 | | |
| 207 | 207 | address_space * space; |
| 208 | 208 | device_t * device; |
| 209 | 209 | device_execute_interface * execute; |
| r15082 | r15083 | |
|---|---|---|
| 907 | 907 | |
| 908 | 908 | /* see if any other UI keys are pressed */ |
| 909 | 909 | if (menu_event.iptkey == IPT_INVALID) |
| 910 | for (code = __ | |
| 910 | for (code = IPT_UI_FIRST + 1 | |
| 911 | 911 | { |
| 912 | 912 | if (code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause)) |
| 913 | 913 | continue; |
| r15082 | r15083 | |
|---|---|---|
| 81 | 81 | class machine_config; |
| 82 | 82 | typedef device_t * (*machine_config_constructor)(machine_config &config, device_t *owner); |
| 83 | 83 | |
| 84 | // device_delegate is a delegate that wraps with a device tag and can be easily | |
| 85 | // late bound without replicating logic everywhere | |
| 86 | template<typename _Signature> | |
| 87 | class device_delegate : public delegate<_Signature> | |
| 88 | { | |
| 89 | typedef delegate<_Signature> basetype; | |
| 90 | ||
| 91 | public: | |
| 92 | // provide same set of constructors as the base class, with additional device name | |
| 93 | // parameter | |
| 94 | device_delegate() : basetype(), m_device_name(NULL) { } | |
| 95 | device_delegate(const basetype &src) : basetype(src), m_device_name(src.m_device_name) { } | |
| 96 | device_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), m_device_name(src.m_device_name) { } | |
| 97 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 98 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 99 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 100 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 101 | device_delegate(typename basetype::template traits<device_t>::static_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), m_device_name(NULL) { } | |
| 102 | device_delegate(typename basetype::template traits<device_t>::static_ref_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), m_device_name(NULL) { } | |
| 103 | device_delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; m_device_name = src.m_device_name; return *this; } | |
| 104 | ||
| 105 | // perform the binding | |
| 106 | void bind_relative_to(device_t &search_root); | |
| 107 | ||
| 108 | private: | |
| 109 | // internal state | |
| 110 | const char *m_device_name; | |
| 111 | }; | |
| 112 | ||
| 84 | 113 | // I/O |
| 85 | 114 | #include "input.h" |
| 86 | 115 | #include "ioport.h" |
| r15082 | r15083 | |
|---|---|---|
| 2208 | 2208 | // if configured to an input, fetch the input value |
| 2209 | 2209 | else if (m_input_tag[0] != 0) |
| 2210 | 2210 | { |
| 2211 | const input_field_config *field = input_field_by_tag_and_mask(m_element->machine(), m_input_tag, m_input_mask); | |
| 2212 | if (field != NULL) | |
| 2213 | state = ((input_port_read_safe(m_element->machine(), m_input_tag, 0) ^ field->defvalue) & m_input_mask) ? 1 : 0; | |
| 2211 | ioport_port *port = m_element->machine().root_device().ioport(m_input_tag); | |
| 2212 | if (port != NULL) | |
| 2213 | { | |
| 2214 | ioport_field *field = port->field(m_input_mask); | |
| 2215 | if (field != NULL) | |
| 2216 | state = ((port->read() ^ field->defvalue()) & m_input_mask) ? 1 : 0; | |
| 2217 | } | |
| 2214 | 2218 | } |
| 2215 | 2219 | return state; |
| 2216 | 2220 | } |
| r15082 | r15083 | |
|---|---|---|
| 284 | 284 | // allocate the gfx elements prior to device initialization |
| 285 | 285 | gfx_init(*this); |
| 286 | 286 | |
| 287 | // initialize natural keyboard support | |
| 288 | inputx_init(*this); | |
| 289 | ||
| 290 | 287 | // initialize image devices |
| 291 | 288 | image_init(*this); |
| 292 | 289 | m_tilemap = auto_alloc(*this, tilemap_manager(*this)); |
| r15082 | r15083 | |
|---|---|---|
| 149 | 149 | void step(void); |
| 150 | 150 | void reset(void); |
| 151 | 151 | private: |
| 152 | | |
| 152 | | |
| 153 | 153 | INT32 m_lastpval; |
| 154 | 154 | INT32 m_pmin; |
| 155 | 155 | double m_pscale; |
| r15082 | r15083 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | DISCRETE_STEP(dss_adjustment) |
| 57 | 57 | { |
| 58 | INT32 rawportval = | |
| 58 | INT32 rawportval = m | |
| 59 | 59 | |
| 60 | 60 | /* only recompute if the value changed from last time */ |
| 61 | 61 | if (UNEXPECTED(rawportval != m_lastpval)) |
| r15082 | r15083 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Input/output port handling. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | **************************************************************************** |
| 11 | 39 | |
| 12 | 40 | Theory of operation |
| r15082 | r15083 | |
| 103 | 131 | #include <ctype.h> |
| 104 | 132 | #include <time.h> |
| 105 | 133 | |
| 106 | /* temporary: set this to 1 to enable the originally defined behavior that | |
| 107 | a field specified via PORT_MODIFY which intersects a previously-defined | |
| 108 | field completely wipes out the previous definition */ | |
| 134 | // temporary: set this to 1 to enable the originally defined behavior that | |
| 135 | // a field specified via PORT_MODIFY which intersects a previously-defined | |
| 136 | // field completely wipes out the previous definition | |
| 109 | 137 | #define INPUT_PORT_OVERRIDE_FULLY_NUKES_PREVIOUS 1 |
| 110 | 138 | |
| 111 | 139 | |
| 112 | /*************************************************************************** | |
| 113 | CONSTANTS | |
| 114 | ***************************************************************************/ | |
| 140 | //************************************************************************** | |
| 141 | // DEBUGGING | |
| 142 | //************************************************************************** | |
| 115 | 143 | |
| 116 | /* these constants must match the order of the joystick directions in the IPT definition */ | |
| 117 | #define JOYDIR_UP 0 | |
| 118 | #define JOYDIR_DOWN 1 | |
| 119 | #define JOYDIR_LEFT 2 | |
| 120 | #define JOYDIR_RIGHT 3 | |
| 144 | #define LOG_NATURAL_KEYBOARD 0 | |
| 121 | 145 | |
| 122 | #define JOYDIR_UP_BIT (1 << JOYDIR_UP) | |
| 123 | #define JOYDIR_DOWN_BIT (1 << JOYDIR_DOWN) | |
| 124 | #define JOYDIR_LEFT_BIT (1 << JOYDIR_LEFT) | |
| 125 | #define JOYDIR_RIGHT_BIT (1 << JOYDIR_RIGHT) | |
| 126 | 146 | |
| 127 | #define LOG_INPUTX 0 | |
| 128 | #define SPACE_COUNT 3 | |
| 129 | #define INVALID_CHAR '?' | |
| 130 | #define IP_NAME_DEFAULT NULL | |
| 131 | 147 | |
| 148 | //************************************************************************** | |
| 149 | // CONSTANTS | |
| 150 | //************************************************************************** | |
| 132 | 151 | |
| 133 | /*************************************************************************** | |
| 134 | TYPE DEFINITIONS | |
| 135 | ***************************************************************************/ | |
| 152 | const int SPACE_COUNT = 3; | |
| 153 | const int KEY_BUFFER_SIZE = 4096; | |
| 154 | const unicode_char INVALID_CHAR = '?'; | |
| 136 | 155 | |
| 137 | /* live analog field information */ | |
| 138 | typedef struct _analog_field_state analog_field_state; | |
| 139 | struct _analog_field_state | |
| 156 | ||
| 157 | ||
| 158 | //************************************************************************** | |
| 159 | // TYPE DEFINITIONS | |
| 160 | //************************************************************************** | |
| 161 | ||
| 162 | // live analog field information | |
| 163 | class analog_field | |
| 140 | 164 | { |
| 141 | analog_field_state * next; /* link to the next analog state for this port */ | |
| 142 | const input_field_config * field; /* pointer to the input field referenced */ | |
| 165 | friend class simple_list<analog_field>; | |
| 166 | friend class ioport_manager; | |
| 167 | friend void ioport_field::set_user_settings(const ioport_field::user_settings &settings); | |
| 168 | ||
| 169 | public: | |
| 170 | // construction/destruction | |
| 171 | analog_field(ioport_field &field); | |
| 172 | ||
| 173 | // getters | |
| 174 | analog_field *next() const { return m_next; } | |
| 175 | ioport_manager &manager() const { return m_field.manager(); } | |
| 176 | ioport_field &field() const { return m_field; } | |
| 177 | INT32 sensitivity() const { return m_sensitivity; } | |
| 178 | bool reverse() const { return m_reverse; } | |
| 179 | INT32 delta() const { return m_delta; } | |
| 180 | INT32 centerdelta() const { return m_centerdelta; } | |
| 143 | 181 | |
| 144 | /* adjusted values (right-justified and tweaked) */ | |
| 145 | UINT8 shift; /* shift to align final value in the port */ | |
| 146 | INT32 adjdefvalue; /* adjusted default value from the config */ | |
| 147 | INT32 adjmin; /* adjusted minimum value from the config */ | |
| 148 | INT32 adjmax; /* adjusted maximum value from the config */ | |
| 182 | // helpers | |
| 183 | ioport_value apply_min_max(ioport_value value) const; | |
| 184 | ioport_value apply_settings(ioport_value value) const; | |
| 185 | ioport_value apply_sensitivity(ioport_value value) const; | |
| 186 | ioport_value apply_inverse_sensitivity(ioport_value value) const; | |
| 149 | 187 | |
| 150 | /* live values of configurable parameters */ | |
| 151 | INT32 sensitivity; /* current live sensitivity (100=normal) */ | |
| 152 | UINT8 reverse; /* current live reverse flag */ | |
| 153 | INT32 delta; /* current live delta to apply each frame a digital inc/dec key is pressed */ | |
| 154 | INT32 centerdelta; /* current live delta to apply each frame no digital inputs are pressed */ | |
| 188 | // readers | |
| 189 | void read(ioport_value &value); | |
| 190 | float crosshair_read(); | |
| 191 | void frame_update(running_machine &machine); | |
| 192 | ||
| 193 | private: | |
| 194 | // internal state | |
| 195 | analog_field * m_next; // link to the next analog state for this port | |
| 196 | ioport_field & m_field; // pointer to the input field referenced | |
| 155 | 197 | |
| 156 | /* live analog value tracking */ | |
| 157 | INT32 accum; /* accumulated value (including relative adjustments) */ | |
| 158 | INT32 previous; /* previous adjusted value */ | |
| 159 | INT32 previousanalog; /* previous analog value */ | |
| 198 | // adjusted values (right-justified and tweaked) | |
| 199 | UINT8 m_shift; // shift to align final value in the port | |
| 200 | INT32 m_adjdefvalue; // adjusted default value from the config | |
| 201 | INT32 m_adjmin; // adjusted minimum value from the config | |
| 202 | INT32 m_adjmax; // adjusted maximum value from the config | |
| 160 | 203 | |
| 161 | /* parameters for modifying live values */ | |
| 162 | INT32 minimum; /* minimum adjusted value */ | |
| 163 | INT32 maximum; /* maximum adjusted value */ | |
| 164 | INT32 center; /* center adjusted value for autocentering */ | |
| 165 | INT32 reverse_val; /* value where we subtract from to reverse directions */ | |
| 204 | // live values of configurable parameters | |
| 205 | INT32 m_sensitivity; // current live sensitivity (100=normal) | |
| 206 | bool m_reverse; // current live reverse flag | |
| 207 | INT32 m_delta; // current live delta to apply each frame a digital inc/dec key is pressed | |
| 208 | INT32 m_centerdelta; // current live delta to apply each frame no digital inputs are pressed | |
| 166 | 209 | |
| 167 | /* scaling factors */ | |
| 168 | INT64 scalepos; /* scale factor to apply to positive adjusted values */ | |
| 169 | INT64 scaleneg; /* scale factor to apply to negative adjusted values */ | |
| 170 | INT64 keyscalepos; /* scale factor to apply to the key delta field when pos */ | |
| 171 | INT64 keyscaleneg; /* scale factor to apply to the key delta field when neg */ | |
| 172 | INT64 positionalscale; /* scale factor to divide a joystick into positions */ | |
| 210 | // live analog value tracking | |
| 211 | INT32 m_accum; // accumulated value (including relative adjustments) | |
| 212 | INT32 m_previous; // previous adjusted value | |
| 213 | INT32 m_previousanalog; // previous analog value | |
| 173 | 214 | |
| 174 | /* misc flags */ | |
| 175 | UINT8 absolute; /* is this an absolute or relative input? */ | |
| 176 | UINT8 wraps; /* does the control wrap around? */ | |
| 177 | UINT8 autocenter; /* autocenter this input? */ | |
| 178 | UINT8 single_scale; /* scale joystick differently if default is between min/max */ | |
| 179 | UINT8 interpolate; /* should we do linear interpolation for mid-frame reads? */ | |
| 180 | UINT8 lastdigital; /* was the last modification caused by a digital form? */ | |
| 215 | // parameters for modifying live values | |
| 216 | INT32 m_minimum; // minimum adjusted value | |
| 217 | INT32 m_maximum; // maximum adjusted value | |
| 218 | INT32 m_center; // center adjusted value for autocentering | |
| 219 | INT32 m_reverse_val; // value where we subtract from to reverse directions | |
| 220 | ||
| 221 | // scaling factors | |
| 222 | INT64 m_scalepos; // scale factor to apply to positive adjusted values | |
| 223 | INT64 m_scaleneg; // scale factor to apply to negative adjusted values | |
| 224 | INT64 m_keyscalepos; // scale factor to apply to the key delta field when pos | |
| 225 | INT64 m_keyscaleneg; // scale factor to apply to the key delta field when neg | |
| 226 | INT64 m_positionalscale; // scale factor to divide a joystick into positions | |
| 227 | ||
| 228 | // misc flags | |
| 229 | bool m_absolute; // is this an absolute or relative input? | |
| 230 | bool m_wraps; // does the control wrap around? | |
| 231 | bool m_autocenter; // autocenter this input? | |
| 232 | bool m_single_scale; // scale joystick differently if default is between min/max | |
| 233 | bool m_interpolate; // should we do linear interpolation for mid-frame reads? | |
| 234 | bool m_lastdigital; // was the last modification caused by a digital form? | |
| 181 | 235 | }; |
| 182 | 236 | |
| 183 | 237 | |
| 184 | /* live device field information */ | |
| 185 | typedef struct _device_field_info device_field_info; | |
| 186 | struct _device_field_info | |
| 238 | // live device field information | |
| 239 | class dynamic_field | |
| 187 | 240 | { |
| 188 | device_field_info * next; /* linked list of info for this port */ | |
| 189 | const input_field_config * field; /* pointer to the input field referenced */ | |
| 190 | device_t * device; /* device */ | |
| 191 | UINT8 shift; /* shift to apply to the final result */ | |
| 192 | input_port_value oldval; /* last value */ | |
| 241 | friend class simple_list<dynamic_field>; | |
| 242 | ||
| 243 | public: | |
| 244 | // construction/destruction | |
| 245 | dynamic_field(ioport_field &field); | |
| 246 | ||
| 247 | // getters | |
| 248 | dynamic_field *next() const { return m_next; } | |
| 249 | ioport_field &field() const { return m_field; } | |
| 250 | ||
| 251 | // read/write | |
| 252 | void read(ioport_value &result); | |
| 253 | void write(ioport_value newval); | |
| 254 | ||
| 255 | private: | |
| 256 | // internal state | |
| 257 | dynamic_field * m_next; // linked list of info for this port | |
| 258 | ioport_field & m_field; // reference to the input field | |
| 259 | UINT8 m_shift; // shift to apply to the final result | |
| 260 | ioport_value m_oldval; // last value | |
| 193 | 261 | }; |
| 194 | 262 | |
| 195 | 263 | |
| 196 | /* internal live state of an input field */ | |
| 197 | struct _input_field_state | |
| 264 | // internal live state of an input field | |
| 265 | struct ioport_field_live | |
| 198 | 266 | { |
| 199 | analog_field_state * analog; /* pointer to live analog data if this is an analog field */ | |
| 200 | digital_joystick_state * joystick; /* pointer to digital joystick information */ | |
| 201 | input_seq seq[SEQ_TYPE_TOTAL];/* currently configured input sequences */ | |
| 202 | input_port_value value; /* current value of this port */ | |
| 203 | UINT8 impulse; /* counter for impulse controls */ | |
| 204 | UINT8 last; /* were we pressed last time? */ | |
| 205 | UINT8 joydir; /* digital joystick direction index */ | |
| 206 | char * name; /* overridden name */ | |
| 267 | // construction/destruction | |
| 268 | ioport_field_live(ioport_field &field, analog_field *analog); | |
| 269 | ||
| 270 | // public state | |
| 271 | analog_field * analog; // pointer to live analog data if this is an analog field | |
| 272 | digital_joystick * joystick; // pointer to digital joystick information | |
| 273 | input_seq seq[SEQ_TYPE_TOTAL];// currently configured input sequences | |
| 274 | ioport_value value; // current value of this port | |
| 275 | UINT8 impulse; // counter for impulse controls | |
| 276 | bool last; // were we pressed last time? | |
| 277 | digital_joystick::direction_t joydir; // digital joystick direction index | |
| 278 | astring name; // overridden name | |
| 207 | 279 | }; |
| 208 | 280 | |
| 209 | 281 | |
| 210 | /* internal live state of an input port */ | |
| 211 | struct _input_port_state | |
| 282 | // internal live state of an input port | |
| 283 | struct ioport_port_live | |
| 212 | 284 | { |
| 213 | analog_field_state * analoglist; /* pointer to list of analog port info */ | |
| 214 | device_field_info * readdevicelist; /* pointer to list of input device info */ | |
| 215 | device_field_info * writedevicelist; /* pointer to list of output device info */ | |
| 216 | input_port_value defvalue; /* combined default value across the port */ | |
| 217 | input_port_value digital; /* current value from all digital inputs */ | |
| 218 | input_port_value vblank; /* value of all IPT_VBLANK bits */ | |
| 219 | input_port_value outputvalue; /* current value for outputs */ | |
| 285 | // construction/destruction | |
| 286 | ioport_port_live(ioport_port &port); | |
| 287 | ||
| 288 | // public state | |
| 289 | simple_list<analog_field> analoglist; // list of analog port info | |
| 290 | simple_list<dynamic_field> readlist; // list of dynamic read fields | |
| 291 | simple_list<dynamic_field> writelist; // list of dynamic write fields | |
| 292 | ioport_value defvalue; // combined default value across the port | |
| 293 | ioport_value digital; // current value from all digital inputs | |
| 294 | ioport_value outputvalue; // current value for outputs | |
| 220 | 295 | }; |
| 221 | 296 | |
| 222 | 297 | |
| 223 | #define KEY_BUFFER_SIZE 4096 | |
| 224 | ||
| 225 | typedef struct _char_info char_info; | |
| 226 | struct _char_info | |
| 298 | // character information | |
| 299 | struct char_info | |
| 227 | 300 | { |
| 228 | 301 | unicode_char ch; |
| 229 | 302 | const char *name; |
| 230 | const char *alternate; /* alternative string, in UTF-8 */ | |
| 303 | const char *alternate; // alternative string, in UTF-8 | |
| 304 | ||
| 305 | static const char_info *find(unicode_char target); | |
| 231 | 306 | }; |
| 232 | 307 | |
| 233 | 308 | |
| 234 | /*************************************************************************** | |
| 235 | MACROS | |
| 236 | ***************************************************************************/ | |
| 237 | 309 | |
| 238 | #define APPLY_SENSITIVITY(x,s) (((INT64)(x) * (s)) / 100.0 + 0.5) | |
| 239 | #define APPLY_INVERSE_SENSITIVITY(x,s) (((INT64)(x) * 100) / (s)) | |
| 310 | //************************************************************************** | |
| 311 | // INLINE FUNCTIONS | |
| 312 | //************************************************************************** | |
| 240 | 313 | |
| 241 | #define COMPUTE_SCALE(num,den) (((INT64)(num) << 24) / (den)) | |
| 242 | #define RECIP_SCALE(s) (((INT64)1 << 48) / (s)) | |
| 243 | #define APPLY_SCALE(x,s) (((INT64)(x) * (s)) >> 24) | |
| 314 | //------------------------------------------------- | |
| 315 | // compute_scale -- compute an 8.24 scale value | |
| 316 | // from a numerator and a denominator | |
| 317 | //------------------------------------------------- | |
| 244 | 318 | |
| 319 | inline INT32 compute_scale(INT32 num, INT32 den) | |
| 320 | { | |
| 321 | return (INT64(num) << 24) / den; | |
| 322 | } | |
| 245 | 323 | |
| 246 | 324 | |
| 247 | /*************************************************************************** | |
| 248 | GLOBAL VARIABLES | |
| 249 | ***************************************************************************/ | |
| 325 | //------------------------------------------------- | |
| 326 | // recip_scale -- compute an 8.24 reciprocal of | |
| 327 | // an 8.24 scale value | |
| 328 | //------------------------------------------------- | |
| 250 | 329 | |
| 251 | /* XML attributes for the different types */ | |
| 252 | static const char *const seqtypestrings[] = { "standard", "increment", "decrement" }; | |
| 330 | inline INT32 recip_scale(INT32 scale) | |
| 331 | { | |
| 332 | return (INT64(1) << 48) / scale; | |
| 333 | } | |
| 253 | 334 | |
| 254 | 335 | |
| 336 | //------------------------------------------------- | |
| 337 | // apply_scale -- apply an 8.24 scale value to | |
| 338 | // a 32-bit value | |
| 339 | //------------------------------------------------- | |
| 340 | ||
| 341 | inline INT32 apply_scale(INT32 value, INT32 scale) | |
| 342 | { | |
| 343 | return (INT64(value) * scale) >> 24; | |
| 344 | } | |
| 345 | ||
| 346 | ||
| 347 | ||
| 348 | //************************************************************************** | |
| 349 | // GLOBAL VARIABLES | |
| 350 | //************************************************************************** | |
| 351 | ||
| 352 | // XML attributes for the different types | |
| 353 | static const char *const seqtypestrings[] = { "standard", "increment", "decrement" }; | |
| 354 | ||
| 355 | // master character info table | |
| 255 | 356 | static const char_info charinfo[] = |
| 256 | 357 | { |
| 257 | { 0x0008, "Backspace", NULL }, /* Backspace */ | |
| 258 | { 0x0009, "Tab", " " }, /* Tab */ | |
| 259 | { 0x000c, "Clear", NULL }, /* Clear */ | |
| 260 | { 0x000d, "Enter", NULL }, /* Enter */ | |
| 261 | { 0x001a, "Esc", NULL }, /* Esc */ | |
| 262 | { 0x0020, "Space", " " }, /* Space */ | |
| 263 | { 0x0061, NULL, "A" }, /* a */ | |
| 264 | { 0x0062, NULL, "B" }, /* b */ | |
| 265 | { 0x0063, NULL, "C" }, /* c */ | |
| 266 | { 0x0064, NULL, "D" }, /* d */ | |
| 267 | { 0x0065, NULL, "E" }, /* e */ | |
| 268 | { 0x0066, NULL, "F" }, /* f */ | |
| 269 | { 0x0067, NULL, "G" }, /* g */ | |
| 270 | { 0x0068, NULL, "H" }, /* h */ | |
| 271 | { 0x0069, NULL, "I" }, /* i */ | |
| 272 | { 0x006a, NULL, "J" }, /* j */ | |
| 273 | { 0x006b, NULL, "K" }, /* k */ | |
| 274 | { 0x006c, NULL, "L" }, /* l */ | |
| 275 | { 0x006d, NULL, "M" }, /* m */ | |
| 276 | { 0x006e, NULL, "N" }, /* n */ | |
| 277 | { 0x006f, NULL, "O" }, /* o */ | |
| 278 | { 0x0070, NULL, "P" }, /* p */ | |
| 279 | { 0x0071, NULL, "Q" }, /* q */ | |
| 280 | { 0x0072, NULL, "R" }, /* r */ | |
| 281 | { 0x0073, NULL, "S" }, /* s */ | |
| 282 | { 0x0074, NULL, "T" }, /* t */ | |
| 283 | { 0x0075, NULL, "U" }, /* u */ | |
| 284 | { 0x0076, NULL, "V" }, /* v */ | |
| 285 | { 0x0077, NULL, "W" }, /* w */ | |
| 286 | { 0x0078, NULL, "X" }, /* x */ | |
| 287 | { 0x0079, NULL, "Y" }, /* y */ | |
| 288 | { 0x007a, NULL, "Z" }, /* z */ | |
| 289 | { 0x00a0, NULL, " " }, /* non breaking space */ | |
| 290 | { 0x00a1, NULL, "!" }, /* inverted exclaimation mark */ | |
| 291 | { 0x00a6, NULL, "|" }, /* broken bar */ | |
| 292 | { 0x00a9, NULL, "(c)" }, /* copyright sign */ | |
| 293 | { 0x00ab, NULL, "<<" }, /* left pointing double angle */ | |
| 294 | { 0x00ae, NULL, "(r)" }, /* registered sign */ | |
| 295 | { 0x00bb, NULL, ">>" }, /* right pointing double angle */ | |
| 296 | { 0x00bc, NULL, "1/4" }, /* vulgar fraction one quarter */ | |
| 297 | { 0x00bd, NULL, "1/2" }, /* vulgar fraction one half */ | |
| 298 | { 0x00be, NULL, "3/4" }, /* vulgar fraction three quarters */ | |
| 299 | { 0x00bf, NULL, "?" }, /* inverted question mark */ | |
| 300 | { 0x00c0, NULL, "A" }, /* 'A' grave */ | |
| 301 | { 0x00c1, NULL, "A" }, /* 'A' acute */ | |
| 302 | { 0x00c2, NULL, "A" }, /* 'A' circumflex */ | |
| 303 | { 0x00c3, NULL, "A" }, /* 'A' tilde */ | |
| 304 | { 0x00c4, NULL, "A" }, /* 'A' diaeresis */ | |
| 305 | { 0x00c5, NULL, "A" }, /* 'A' ring above */ | |
| 306 | { 0x00c6, NULL, "AE" }, /* 'AE' ligature */ | |
| 307 | { 0x00c7, NULL, "C" }, /* 'C' cedilla */ | |
| 308 | { 0x00c8, NULL, "E" }, /* 'E' grave */ | |
| 309 | { 0x00c9, NULL, "E" }, /* 'E' acute */ | |
| 310 | { 0x00ca, NULL, "E" }, /* 'E' circumflex */ | |
| 311 | { 0x00cb, NULL, "E" }, /* 'E' diaeresis */ | |
| 312 | { 0x00cc, NULL, "I" }, /* 'I' grave */ | |
| 313 | { 0x00cd, NULL, "I" }, /* 'I' acute */ | |
| 314 | { 0x00ce, NULL, "I" }, /* 'I' circumflex */ | |
| 315 | { 0x00cf, NULL, "I" }, /* 'I' diaeresis */ | |
| 316 | { 0x00d0, NULL, "D" }, /* 'ETH' */ | |
| 317 | { 0x00d1, NULL, "N" }, /* 'N' tilde */ | |
| 318 | { 0x00d2, NULL, "O" }, /* 'O' grave */ | |
| 319 | { 0x00d3, NULL, "O" }, /* 'O' acute */ | |
| 320 | { 0x00d4, NULL, "O" }, /* 'O' circumflex */ | |
| 321 | { 0x00d5, NULL, "O" }, /* 'O' tilde */ | |
| 322 | { 0x00d6, NULL, "O" }, /* 'O' diaeresis */ | |
| 323 | { 0x00d7, NULL, "X" }, /* multiplication sign */ | |
| 324 | { 0x00d8, NULL, "O" }, /* 'O' stroke */ | |
| 325 | { 0x00d9, NULL, "U" }, /* 'U' grave */ | |
| 326 | { 0x00da, NULL, "U" }, /* 'U' acute */ | |
| 327 | { 0x00db, NULL, "U" }, /* 'U' circumflex */ | |
| 328 | { 0x00dc, NULL, "U" }, /* 'U' diaeresis */ | |
| 329 | { 0x00dd, NULL, "Y" }, /* 'Y' acute */ | |
| 330 | { 0x00df, NULL, "SS" }, /* sharp S */ | |
| 331 | { 0x00e0, NULL, "a" }, /* 'a' grave */ | |
| 332 | { 0x00e1, NULL, "a" }, /* 'a' acute */ | |
| 333 | { 0x00e2, NULL, "a" }, /* 'a' circumflex */ | |
| 334 | { 0x00e3, NULL, "a" }, /* 'a' tilde */ | |
| 335 | { 0x00e4, NULL, "a" }, /* 'a' diaeresis */ | |
| 336 | { 0x00e5, NULL, "a" }, /* 'a' ring above */ | |
| 337 | { 0x00e6, NULL, "ae" }, /* 'ae' ligature */ | |
| 338 | { 0x00e7, NULL, "c" }, /* 'c' cedilla */ | |
| 339 | { 0x00e8, NULL, "e" }, /* 'e' grave */ | |
| 340 | { 0x00e9, NULL, "e" }, /* 'e' acute */ | |
| 341 | { 0x00ea, NULL, "e" }, /* 'e' circumflex */ | |
| 342 | { 0x00eb, NULL, "e" }, /* 'e' diaeresis */ | |
| 343 | { 0x00ec, NULL, "i" }, /* 'i' grave */ | |
| 344 | { 0x00ed, NULL, "i" }, /* 'i' acute */ | |
| 345 | { 0x00ee, NULL, "i" }, /* 'i' circumflex */ | |
| 346 | { 0x00ef, NULL, "i" }, /* 'i' diaeresis */ | |
| 347 | { 0x00f0, NULL, "d" }, /* 'eth' */ | |
| 348 | { 0x00f1, NULL, "n" }, /* 'n' tilde */ | |
| 349 | { 0x00f2, NULL, "o" }, /* 'o' grave */ | |
| 350 | { 0x00f3, NULL, "o" }, /* 'o' acute */ | |
| 351 | { 0x00f4, NULL, "o" }, /* 'o' circumflex */ | |
| 352 | { 0x00f5, NULL, "o" }, /* 'o' tilde */ | |
| 353 | { 0x00f6, NULL, "o" }, /* 'o' diaeresis */ | |
| 354 | { 0x00f8, NULL, "o" }, /* 'o' stroke */ | |
| 355 | { 0x00f9, NULL, "u" }, /* 'u' grave */ | |
| 356 | { 0x00fa, NULL, "u" }, /* 'u' acute */ | |
| 357 | { 0x00fb, NULL, "u" }, /* 'u' circumflex */ | |
| 358 | { 0x00fc, NULL, "u" }, /* 'u' diaeresis */ | |
| 359 | { 0x00fd, NULL, "y" }, /* 'y' acute */ | |
| 360 | { 0x00ff, NULL, "y" }, /* 'y' diaeresis */ | |
| 361 | { 0x2010, NULL, "-" }, /* hyphen */ | |
| 362 | { 0x2011, NULL, "-" }, /* non-breaking hyphen */ | |
| 363 | { 0x2012, NULL, "-" }, /* figure dash */ | |
| 364 | { 0x2013, NULL, "-" }, /* en dash */ | |
| 365 | { 0x2014, NULL, "-" }, /* em dash */ | |
| 366 | { 0x2015, NULL, "-" }, /* horizontal dash */ | |
| 367 | { 0x2018, NULL, "\'" }, /* left single quotation mark */ | |
| 368 | { 0x2019, NULL, "\'" }, /* right single quotation mark */ | |
| 369 | { 0x201a, NULL, "\'" }, /* single low quotation mark */ | |
| 370 | { 0x201b, NULL, "\'" }, /* single high reversed quotation mark */ | |
| 371 | { 0x201c, NULL, "\"" }, /* left double quotation mark */ | |
| 372 | { 0x201d, NULL, "\"" }, /* right double quotation mark */ | |
| 373 | { 0x201e, NULL, "\"" }, /* double low quotation mark */ | |
| 374 | { 0x201f, NULL, "\"" }, /* double high reversed quotation mark */ | |
| 375 | { 0x2024, NULL, "." }, /* one dot leader */ | |
| 376 | { 0x2025, NULL, ".." }, /* two dot leader */ | |
| 377 | { 0x2026, NULL, "..." }, /* horizontal ellipsis */ | |
| 378 | { 0x2047, NULL, "??" }, /* double question mark */ | |
| 379 | { 0x2048, NULL, "?!" }, /* question exclamation mark */ | |
| 380 | { 0x2049, NULL, "!?" }, /* exclamation question mark */ | |
| 381 | { 0xff01, NULL, "!" }, /* fullwidth exclamation point */ | |
| 382 | { 0xff02, NULL, "\"" }, /* fullwidth quotation mark */ | |
| 383 | { 0xff03, NULL, "#" }, /* fullwidth number sign */ | |
| 384 | { 0xff04, NULL, "$" }, /* fullwidth dollar sign */ | |
| 385 | { 0xff05, NULL, "%" }, /* fullwidth percent sign */ | |
| 386 | { 0xff06, NULL, "&" }, /* fullwidth ampersand */ | |
| 387 | { 0xff07, NULL, "\'" }, /* fullwidth apostrophe */ | |
| 388 | { 0xff08, NULL, "(" }, /* fullwidth left parenthesis */ | |
| 389 | { 0xff09, NULL, ")" }, /* fullwidth right parenthesis */ | |
| 390 | { 0xff0a, NULL, "*" }, /* fullwidth asterisk */ | |
| 391 | { 0xff0b, NULL, "+" }, /* fullwidth plus */ | |
| 392 | { 0xff0c, NULL, "," }, /* fullwidth comma */ | |
| 393 | { 0xff0d, NULL, "-" }, /* fullwidth minus */ | |
| 394 | { 0xff0e, NULL, "." }, /* fullwidth period */ | |
| 395 | { 0xff0f, NULL, "/" }, /* fullwidth slash */ | |
| 396 | { 0xff10, NULL, "0" }, /* fullwidth zero */ | |
| 397 | { 0xff11, NULL, "1" }, /* fullwidth one */ | |
| 398 | { 0xff12, NULL, "2" }, /* fullwidth two */ | |
| 399 | { 0xff13, NULL, "3" }, /* fullwidth three */ | |
| 400 | { 0xff14, NULL, "4" }, /* fullwidth four */ | |
| 401 | { 0xff15, NULL, "5" }, /* fullwidth five */ | |
| 402 | { 0xff16, NULL, "6" }, /* fullwidth six */ | |
| 403 | { 0xff17, NULL, "7" }, /* fullwidth seven */ | |
| 404 | { 0xff18, NULL, "8" }, /* fullwidth eight */ | |
| 405 | { 0xff19, NULL, "9" }, /* fullwidth nine */ | |
| 406 | { 0xff1a, NULL, ":" }, /* fullwidth colon */ | |
| 407 | { 0xff1b, NULL, ";" }, /* fullwidth semicolon */ | |
| 408 | { 0xff1c, NULL, "<" }, /* fullwidth less than sign */ | |
| 409 | { 0xff1d, NULL, "=" }, /* fullwidth equals sign */ | |
| 410 | { 0xff1e, NULL, ">" }, /* fullwidth greater than sign */ | |
| 411 | { 0xff1f, NULL, "?" }, /* fullwidth question mark */ | |
| 412 | { 0xff20, NULL, "@" }, /* fullwidth at sign */ | |
| 413 | { 0xff21, NULL, "A" }, /* fullwidth 'A' */ | |
| 414 | { 0xff22, NULL, "B" }, /* fullwidth 'B' */ | |
| 415 | { 0xff23, NULL, "C" }, /* fullwidth 'C' */ | |
| 416 | { 0xff24, NULL, "D" }, /* fullwidth 'D' */ | |
| 417 | { 0xff25, NULL, "E" }, /* fullwidth 'E' */ | |
| 418 | { 0xff26, NULL, "F" }, /* fullwidth 'F' */ | |
| 419 | { 0xff27, NULL, "G" }, /* fullwidth 'G' */ | |
| 420 | { 0xff28, NULL, "H" }, /* fullwidth 'H' */ | |
| 421 | { 0xff29, NULL, "I" }, /* fullwidth 'I' */ | |
| 422 | { 0xff2a, NULL, "J" }, /* fullwidth 'J' */ | |
| 423 | { 0xff2b, NULL, "K" }, /* fullwidth 'K' */ | |
| 424 | { 0xff2c, NULL, "L" }, /* fullwidth 'L' */ | |
| 425 | { 0xff2d, NULL, "M" }, /* fullwidth 'M' */ | |
| 426 | { 0xff2e, NULL, "N" }, /* fullwidth 'N' */ | |
| 427 | { 0xff2f, NULL, "O" }, /* fullwidth 'O' */ | |
| 428 | { 0xff30, NULL, "P" }, /* fullwidth 'P' */ | |
| 429 | { 0xff31, NULL, "Q" }, /* fullwidth 'Q' */ | |
| 430 | { 0xff32, NULL, "R" }, /* fullwidth 'R' */ | |
| 431 | { 0xff33, NULL, "S" }, /* fullwidth 'S' */ | |
| 432 | { 0xff34, NULL, "T" }, /* fullwidth 'T' */ | |
| 433 | { 0xff35, NULL, "U" }, /* fullwidth 'U' */ | |
| 434 | { 0xff36, NULL, "V" }, /* fullwidth 'V' */ | |
| 435 | { 0xff37, NULL, "W" }, /* fullwidth 'W' */ | |
| 436 | { 0xff38, NULL, "X" }, /* fullwidth 'X' */ | |
| 437 | { 0xff39, NULL, "Y" }, /* fullwidth 'Y' */ | |
| 438 | { 0xff3a, NULL, "Z" }, /* fullwidth 'Z' */ | |
| 439 | { 0xff3b, NULL, "[" }, /* fullwidth left bracket */ | |
| 440 | { 0xff3c, NULL, "\\" }, /* fullwidth backslash */ | |
| 441 | { 0xff3d, NULL, "]" }, /* fullwidth right bracket */ | |
| 442 | { 0xff3e, NULL, "^" }, /* fullwidth caret */ | |
| 443 | { 0xff3f, NULL, "_" }, /* fullwidth underscore */ | |
| 444 | { 0xff40, NULL, "`" }, /* fullwidth backquote */ | |
| 445 | { 0xff41, NULL, "a" }, /* fullwidth 'a' */ | |
| 446 | { 0xff42, NULL, "b" }, /* fullwidth 'b' */ | |
| 447 | { 0xff43, NULL, "c" }, /* fullwidth 'c' */ | |
| 448 | { 0xff44, NULL, "d" }, /* fullwidth 'd' */ | |
| 449 | { 0xff45, NULL, "e" }, /* fullwidth 'e' */ | |
| 450 | { 0xff46, NULL, "f" }, /* fullwidth 'f' */ | |
| 451 | { 0xff47, NULL, "g" }, /* fullwidth 'g' */ | |
| 452 | { 0xff48, NULL, "h" }, /* fullwidth 'h' */ | |
| 453 | { 0xff49, NULL, "i" }, /* fullwidth 'i' */ | |
| 454 | { 0xff4a, NULL, "j" }, /* fullwidth 'j' */ | |
| 455 | { 0xff4b, NULL, "k" }, /* fullwidth 'k' */ | |
| 456 | { 0xff4c, NULL, "l" }, /* fullwidth 'l' */ | |
| 457 | { 0xff4d, NULL, "m" }, /* fullwidth 'm' */ | |
| 458 | { 0xff4e, NULL, "n" }, /* fullwidth 'n' */ | |
| 459 | { 0xff4f, NULL, "o" }, /* fullwidth 'o' */ | |
| 460 | { 0xff50, NULL, "p" }, /* fullwidth 'p' */ | |
| 461 | { 0xff51, NULL, "q" }, /* fullwidth 'q' */ | |
| 462 | { 0xff52, NULL, "r" }, /* fullwidth 'r' */ | |
| 463 | { 0xff53, NULL, "s" }, /* fullwidth 's' */ | |
| 464 | { 0xff54, NULL, "t" }, /* fullwidth 't' */ | |
| 465 | { 0xff55, NULL, "u" }, /* fullwidth 'u' */ | |
| 466 | { 0xff56, NULL, "v" }, /* fullwidth 'v' */ | |
| 467 | { 0xff57, NULL, "w" }, /* fullwidth 'w' */ | |
| 468 | { 0xff58, NULL, "x" }, /* fullwidth 'x' */ | |
| 469 | { 0xff59, NULL, "y" }, /* fullwidth 'y' */ | |
| 470 | { 0xff5a, NULL, "z" }, /* fullwidth 'z' */ | |
| 471 | { 0xff5b, NULL, "{" }, /* fullwidth left brace */ | |
| 472 | { 0xff5c, NULL, "|" }, /* fullwidth vertical bar */ | |
| 473 | { 0xff5d, NULL, "}" }, /* fullwidth right brace */ | |
| 474 | { 0xff5e, NULL, "~" }, /* fullwidth tilde */ | |
| 475 | { 0xff5f, NULL, "((" }, /* fullwidth double left parenthesis */ | |
| 476 | { 0xff60, NULL, "))" }, /* fullwidth double right parenthesis */ | |
| 477 | { 0xffe0, NULL, "\xC2\xA2" }, /* fullwidth cent sign */ | |
| 478 | { 0xffe1, NULL, "\xC2\xA3" }, /* fullwidth pound sign */ | |
| 479 | { 0xffe4, NULL, "\xC2\xA4" }, /* fullwidth broken bar */ | |
| 480 | { 0xffe5, NULL, "\xC2\xA5" }, /* fullwidth yen sign */ | |
| 481 | { 0xffe6, NULL, "\xE2\x82\xA9" }, /* fullwidth won sign */ | |
| 482 | { 0xffe9, NULL, "\xE2\x86\x90" }, /* fullwidth left arrow */ | |
| 483 | { 0xffea, NULL, "\xE2\x86\x91" }, /* fullwidth up arrow */ | |
| 484 | { 0xffeb, NULL, "\xE2\x86\x92" }, /* fullwidth right arrow */ | |
| 485 | { 0xffec, NULL, "\xE2\x86\x93" }, /* fullwidth down arrow */ | |
| 486 | { 0xffed, NULL, "\xE2\x96\xAA" }, /* fullwidth solid box */ | |
| 487 | { 0xffee, NULL, "\xE2\x97\xA6" }, /* fullwidth open circle */ | |
| 488 | { UCHAR_SHIFT_1, "Shift", NULL }, /* Shift key */ | |
| 489 | { UCHAR_SHIFT_2, "Ctrl", NULL }, /* Ctrl key */ | |
| 490 | { UCHAR_MAMEKEY(F1), "F1", NULL }, /* F1 function key */ | |
| 491 | { UCHAR_MAMEKEY(F2), "F2", NULL }, /* F2 function key */ | |
| 492 | { UCHAR_MAMEKEY(F3), "F3", NULL }, /* F3 function key */ | |
| 493 | { UCHAR_MAMEKEY(F4), "F4", NULL }, /* F4 function key */ | |
| 494 | { UCHAR_MAMEKEY(F5), "F5", NULL }, /* F5 function key */ | |
| 495 | { UCHAR_MAMEKEY(F6), "F6", NULL }, /* F6 function key */ | |
| 496 | { UCHAR_MAMEKEY(F7), "F7", NULL }, /* F7 function key */ | |
| 497 | { UCHAR_MAMEKEY(F8), "F8", NULL }, /* F8 function key */ | |
| 498 | { UCHAR_MAMEKEY(F9), "F9", NULL }, /* F9 function key */ | |
| 499 | { UCHAR_MAMEKEY(F10), "F10", NULL }, /* F10 function key */ | |
| 500 | { UCHAR_MAMEKEY(F11), "F11", NULL }, /* F11 function key */ | |
| 501 | { UCHAR_MAMEKEY(F12), "F12", NULL }, /* F12 function key */ | |
| 502 | { UCHAR_MAMEKEY(F13), "F13", NULL }, /* F13 function key */ | |
| 503 | { UCHAR_MAMEKEY(F14), "F14", NULL }, /* F14 function key */ | |
| 504 | { UCHAR_MAMEKEY(F15), "F15", NULL }, /* F15 function key */ | |
| 505 | { UCHAR_MAMEKEY(ESC), "Esc", "\033" }, /* Esc key */ | |
| 506 | { UCHAR_MAMEKEY(INSERT), "Insert", NULL }, /* Insert key */ | |
| 507 | { UCHAR_MAMEKEY(DEL), "Delete", "\010" }, /* Delete key */ | |
| 508 | { UCHAR_MAMEKEY(HOME), "Home", "\014" }, /* Home key */ | |
| 509 | { UCHAR_MAMEKEY(END), "End", NULL }, /* End key */ | |
| 510 | { UCHAR_MAMEKEY(PGUP), "Page Up", NULL }, /* Page Up key */ | |
| 511 | { UCHAR_MAMEKEY(PGDN), "Page Down", NULL }, /* Page Down key */ | |
| 512 | { UCHAR_MAMEKEY(LEFT), "Cursor Left", NULL }, /* Cursor Left */ | |
| 513 | { UCHAR_MAMEKEY(RIGHT), "Cursor Right", NULL }, /* Cursor Right */ | |
| 514 | { UCHAR_MAMEKEY(UP), "Cursor Up", NULL }, /* Cursor Up */ | |
| 515 | { UCHAR_MAMEKEY(DOWN), "Cursor Down", NULL }, /* Cursor Down */ | |
| 516 | { UCHAR_MAMEKEY(0_PAD), "Keypad 0", NULL }, /* 0 on the numeric keypad */ | |
| 517 | { UCHAR_MAMEKEY(1_PAD), "Keypad 1", NULL }, /* 1 on the numeric keypad */ | |
| 518 | { UCHAR_MAMEKEY(2_PAD), "Keypad 2", NULL }, /* 2 on the numeric keypad */ | |
| 519 | { UCHAR_MAMEKEY(3_PAD), "Keypad 3", NULL }, /* 3 on the numeric keypad */ | |
| 520 | { UCHAR_MAMEKEY(4_PAD), "Keypad 4", NULL }, /* 4 on the numeric keypad */ | |
| 521 | { UCHAR_MAMEKEY(5_PAD), "Keypad 5", NULL }, /* 5 on the numeric keypad */ | |
| 522 | { UCHAR_MAMEKEY(6_PAD), "Keypad 6", NULL }, /* 6 on the numeric keypad */ | |
| 523 | { UCHAR_MAMEKEY(7_PAD), "Keypad 7", NULL }, /* 7 on the numeric keypad */ | |
| 524 | { UCHAR_MAMEKEY(8_PAD), "Keypad 8", NULL }, /* 8 on the numeric keypad */ | |
| 525 | { UCHAR_MAMEKEY(9_PAD), "Keypad 9", NULL }, /* 9 on the numeric keypad */ | |
| 526 | { UCHAR_MAMEKEY(SLASH_PAD), "Keypad /", NULL }, /* / on the numeric keypad */ | |
| 527 | { UCHAR_MAMEKEY(ASTERISK), "Keypad *", NULL }, /* * on the numeric keypad */ | |
| 528 | { UCHAR_MAMEKEY(MINUS_PAD), "Keypad -", NULL }, /* - on the numeric Keypad */ | |
| 529 | { UCHAR_MAMEKEY(PLUS_PAD), "Keypad +", NULL }, /* + on the numeric Keypad */ | |
| 530 | { UCHAR_MAMEKEY(DEL_PAD), "Keypad .", NULL }, /* . on the numeric keypad */ | |
| 531 | { UCHAR_MAMEKEY(ENTER_PAD), "Keypad Enter", NULL }, /* Enter on the numeric keypad */ | |
| 532 | { UCHAR_MAMEKEY(PRTSCR), "Print Screen", NULL }, /* Print Screen key */ | |
| 533 | { UCHAR_MAMEKEY(PAUSE), "Pause", NULL }, /* Pause key */ | |
| 534 | { UCHAR_MAMEKEY(LSHIFT), "Left Shift", NULL }, /* Left Shift key */ | |
| 535 | { UCHAR_MAMEKEY(RSHIFT), "Right Shift", NULL }, /* Right Shift key */ | |
| 536 | { UCHAR_MAMEKEY(LCONTROL), "Left Ctrl", NULL }, /* Left Control key */ | |
| 537 | { UCHAR_MAMEKEY(RCONTROL), "Right Ctrl", NULL }, /* Right Control key */ | |
| 538 | { UCHAR_MAMEKEY(LALT), "Left Alt", NULL }, /* Left Alt key */ | |
| 539 | { UCHAR_MAMEKEY(RALT), "Right Alt", NULL }, /* Right Alt key */ | |
| 540 | { UCHAR_MAMEKEY(SCRLOCK), "Scroll Lock", NULL }, /* Scroll Lock key */ | |
| 541 | { UCHAR_MAMEKEY(NUMLOCK), "Num Lock", NULL }, /* Num Lock key */ | |
| 542 | { UCHAR_MAMEKEY(CAPSLOCK), "Caps Lock", NULL }, /* Caps Lock key */ | |
| 543 | { UCHAR_MAMEKEY(LWIN), "Left Win", NULL }, /* Left Win key */ | |
| 544 | { UCHAR_MAMEKEY(RWIN), "Right Win", NULL }, /* Right Win key */ | |
| 545 | { UCHAR_MAMEKEY(MENU), "Menu", NULL }, /* Menu key */ | |
| 546 | { UCHAR_MAMEKEY(CANCEL), "Break", NULL } /* Break/Pause key */ | |
| 358 | { 0x0008, "Backspace", NULL }, // Backspace | |
| 359 | { 0x0009, "Tab", " " }, // Tab | |
| 360 | { 0x000c, "Clear", NULL }, // Clear | |
| 361 | { 0x000d, "Enter", NULL }, // Enter | |
| 362 | { 0x001a, "Esc", NULL }, // Esc | |
| 363 | { 0x0020, "Space", " " }, // Space | |
| 364 | { 0x0061, NULL, "A" }, // a | |
| 365 | { 0x0062, NULL, "B" }, // b | |
| 366 | { 0x0063, NULL, "C" }, // c | |
| 367 | { 0x0064, NULL, "D" }, // d | |
| 368 | { 0x0065, NULL, "E" }, // e | |
| 369 | { 0x0066, NULL, "F" }, // f | |
| 370 | { 0x0067, NULL, "G" }, // g | |
| 371 | { 0x0068, NULL, "H" }, // h | |
| 372 | { 0x0069, NULL, "I" }, // i | |
| 373 | { 0x006a, NULL, "J" }, // j | |
| 374 | { 0x006b, NULL, "K" }, // k | |
| 375 | { 0x006c, NULL, "L" }, // l | |
| 376 | { 0x006d, NULL, "M" }, // m | |
| 377 | { 0x006e, NULL, "N" }, // n | |
| 378 | { 0x006f, NULL, "O" }, // o | |
| 379 | { 0x0070, NULL, "P" }, // p | |
| 380 | { 0x0071, NULL, "Q" }, // q | |
| 381 | { 0x0072, NULL, "R" }, // r | |
| 382 | { 0x0073, NULL, "S" }, // s | |
| 383 | { 0x0074, NULL, "T" }, // t | |
| 384 | { 0x0075, NULL, "U" }, // u | |
| 385 | { 0x0076, NULL, "V" }, // v | |
| 386 | { 0x0077, NULL, "W" }, // w | |
| 387 | { 0x0078, NULL, "X" }, // x | |
| 388 | { 0x0079, NULL, "Y" }, // y | |
| 389 | { 0x007a, NULL, "Z" }, // z | |
| 390 | { 0x00a0, NULL, " " }, // non breaking space | |
| 391 | { 0x00a1, NULL, "!" }, // inverted exclaimation mark | |
| 392 | { 0x00a6, NULL, "|" }, // broken bar | |
| 393 | { 0x00a9, NULL, "(c)" }, // copyright sign | |
| 394 | { 0x00ab, NULL, "<<" }, // left pointing double angle | |
| 395 | { 0x00ae, NULL, "(r)" }, // registered sign | |
| 396 | { 0x00bb, NULL, ">>" }, // right pointing double angle | |
| 397 | { 0x00bc, NULL, "1/4" }, // vulgar fraction one quarter | |
| 398 | { 0x00bd, NULL, "1/2" }, // vulgar fraction one half | |
| 399 | { 0x00be, NULL, "3/4" }, // vulgar fraction three quarters | |
| 400 | { 0x00bf, NULL, "?" }, // inverted question mark | |
| 401 | { 0x00c0, NULL, "A" }, // 'A' grave | |
| 402 | { 0x00c1, NULL, "A" }, // 'A' acute | |
| 403 | { 0x00c2, NULL, "A" }, // 'A' circumflex | |
| 404 | { 0x00c3, NULL, "A" }, // 'A' tilde | |
| 405 | { 0x00c4, NULL, "A" }, // 'A' diaeresis | |
| 406 | { 0x00c5, NULL, "A" }, // 'A' ring above | |
| 407 | { 0x00c6, NULL, "AE" }, // 'AE' ligature | |
| 408 | { 0x00c7, NULL, "C" }, // 'C' cedilla | |
| 409 | { 0x00c8, NULL, "E" }, // 'E' grave | |
| 410 | { 0x00c9, NULL, "E" }, // 'E' acute | |
| 411 | { 0x00ca, NULL, "E" }, // 'E' circumflex | |
| 412 | { 0x00cb, NULL, "E" }, // 'E' diaeresis | |
| 413 | { 0x00cc, NULL, "I" }, // 'I' grave | |
| 414 | { 0x00cd, NULL, "I" }, // 'I' acute | |
| 415 | { 0x00ce, NULL, "I" }, // 'I' circumflex | |
| 416 | { 0x00cf, NULL, "I" }, // 'I' diaeresis | |
| 417 | { 0x00d0, NULL, "D" }, // 'ETH' | |
| 418 | { 0x00d1, NULL, "N" }, // 'N' tilde | |
| 419 | { 0x00d2, NULL, "O" }, // 'O' grave | |
| 420 | { 0x00d3, NULL, "O" }, // 'O' acute | |
| 421 | { 0x00d4, NULL, "O" }, // 'O' circumflex | |
| 422 | { 0x00d5, NULL, "O" }, // 'O' tilde | |
| 423 | { 0x00d6, NULL, "O" }, // 'O' diaeresis | |
| 424 | { 0x00d7, NULL, "X" }, // multiplication sign | |
| 425 | { 0x00d8, NULL, "O" }, // 'O' stroke | |
| 426 | { 0x00d9, NULL, "U" }, // 'U' grave | |
| 427 | { 0x00da, NULL, "U" }, // 'U' acute | |
| 428 | { 0x00db, NULL, "U" }, // 'U' circumflex | |
| 429 | { 0x00dc, NULL, "U" }, // 'U' diaeresis | |
| 430 | { 0x00dd, NULL, "Y" }, // 'Y' acute | |
| 431 | { 0x00df, NULL, "SS" }, // sharp S | |
| 432 | { 0x00e0, NULL, "a" }, // 'a' grave | |
| 433 | { 0x00e1, NULL, "a" }, // 'a' acute | |
| 434 | { 0x00e2, NULL, "a" }, // 'a' circumflex | |
| 435 | { 0x00e3, NULL, "a" }, // 'a' tilde | |
| 436 | { 0x00e4, NULL, "a" }, // 'a' diaeresis | |
| 437 | { 0x00e5, NULL, "a" }, // 'a' ring above | |
| 438 | { 0x00e6, NULL, "ae" }, // 'ae' ligature | |
| 439 | { 0x00e7, NULL, "c" }, // 'c' cedilla | |
| 440 | { 0x00e8, NULL, "e" }, // 'e' grave | |
| 441 | { 0x00e9, NULL, "e" }, // 'e' acute | |
| 442 | { 0x00ea, NULL, "e" }, // 'e' circumflex | |
| 443 | { 0x00eb, NULL, "e" }, // 'e' diaeresis | |
| 444 | { 0x00ec, NULL, "i" }, // 'i' grave | |
| 445 | { 0x00ed, NULL, "i" }, // 'i' acute | |
| 446 | { 0x00ee, NULL, "i" }, // 'i' circumflex | |
| 447 | { 0x00ef, NULL, "i" }, // 'i' diaeresis | |
| 448 | { 0x00f0, NULL, "d" }, // 'eth' | |
| 449 | { 0x00f1, NULL, "n" }, // 'n' tilde | |
| 450 | { 0x00f2, NULL, "o" }, // 'o' grave | |
| 451 | { 0x00f3, NULL, "o" }, // 'o' acute | |
| 452 | { 0x00f4, NULL, "o" }, // 'o' circumflex | |
| 453 | { 0x00f5, NULL, "o" }, // 'o' tilde | |
| 454 | { 0x00f6, NULL, "o" }, // 'o' diaeresis | |
| 455 | { 0x00f8, NULL, "o" }, // 'o' stroke | |
| 456 | { 0x00f9, NULL, "u" }, // 'u' grave | |
| 457 | { 0x00fa, NULL, "u" }, // 'u' acute | |
| 458 | { 0x00fb, NULL, "u" }, // 'u' circumflex | |
| 459 | { 0x00fc, NULL, "u" }, // 'u' diaeresis | |
| 460 | { 0x00fd, NULL, "y" }, // 'y' acute | |
| 461 | { 0x00ff, NULL, "y" }, // 'y' diaeresis | |
| 462 | { 0x2010, NULL, "-" }, // hyphen | |
| 463 | { 0x2011, NULL, "-" }, // non-breaking hyphen | |
| 464 | { 0x2012, NULL, "-" }, // figure dash | |
| 465 | { 0x2013, NULL, "-" }, // en dash | |
| 466 | { 0x2014, NULL, "-" }, // em dash | |
| 467 | { 0x2015, NULL, "-" }, // horizontal dash | |
| 468 | { 0x2018, NULL, "\'" }, // left single quotation mark | |
| 469 | { 0x2019, NULL, "\'" }, // right single quotation mark | |
| 470 | { 0x201a, NULL, "\'" }, // single low quotation mark | |
| 471 | { 0x201b, NULL, "\'" }, // single high reversed quotation mark | |
| 472 | { 0x201c, NULL, "\"" }, // left double quotation mark | |
| 473 | { 0x201d, NULL, "\"" }, // right double quotation mark | |
| 474 | { 0x201e, NULL, "\"" }, // double low quotation mark | |
| 475 | { 0x201f, NULL, "\"" }, // double high reversed quotation mark | |
| 476 | { 0x2024, NULL, "." }, // one dot leader | |
| 477 | { 0x2025, NULL, ".." }, // two dot leader | |
| 478 | { 0x2026, NULL, "..." }, // horizontal ellipsis | |
| 479 | { 0x2047, NULL, "??" }, // double question mark | |
| 480 | { 0x2048, NULL, "?!" }, // question exclamation mark | |
| 481 | { 0x2049, NULL, "!?" }, // exclamation question mark | |
| 482 | { 0xff01, NULL, "!" }, // fullwidth exclamation point | |
| 483 | { 0xff02, NULL, "\"" }, // fullwidth quotation mark | |
| 484 | { 0xff03, NULL, "#" }, // fullwidth number sign | |
| 485 | { 0xff04, NULL, "$" }, // fullwidth dollar sign | |
| 486 | { 0xff05, NULL, "%" }, // fullwidth percent sign | |
| 487 | { 0xff06, NULL, "&" }, // fullwidth ampersand | |
| 488 | { 0xff07, NULL, "\'" }, // fullwidth apostrophe | |
| 489 | { 0xff08, NULL, "(" }, // fullwidth left parenthesis | |
| 490 | { 0xff09, NULL, ")" }, // fullwidth right parenthesis | |
| 491 | { 0xff0a, NULL, "*" }, // fullwidth asterisk | |
| 492 | { 0xff0b, NULL, "+" }, // fullwidth plus | |
| 493 | { 0xff0c, NULL, "," }, // fullwidth comma | |
| 494 | { 0xff0d, NULL, "-" }, // fullwidth minus | |
| 495 | { 0xff0e, NULL, "." }, // fullwidth period | |
| 496 | { 0xff0f, NULL, "/" }, // fullwidth slash | |
| 497 | { 0xff10, NULL, "0" }, // fullwidth zero | |
| 498 | { 0xff11, NULL, "1" }, // fullwidth one | |
| 499 | { 0xff12, NULL, "2" }, // fullwidth two | |
| 500 | { 0xff13, NULL, "3" }, // fullwidth three | |
| 501 | { 0xff14, NULL, "4" }, // fullwidth four | |
| 502 | { 0xff15, NULL, "5" }, // fullwidth five | |
| 503 | { 0xff16, NULL, "6" }, // fullwidth six | |
| 504 | { 0xff17, NULL, "7" }, // fullwidth seven | |
| 505 | { 0xff18, NULL, "8" }, // fullwidth eight | |
| 506 | { 0xff19, NULL, "9" }, // fullwidth nine | |
| 507 | { 0xff1a, NULL, ":" }, // fullwidth colon | |
| 508 | { 0xff1b, NULL, ";" }, // fullwidth semicolon | |
| 509 | { 0xff1c, NULL, "<" }, // fullwidth less than sign | |
| 510 | { 0xff1d, NULL, "=" }, // fullwidth equals sign | |
| 511 | { 0xff1e, NULL, ">" }, // fullwidth greater than sign | |
| 512 | { 0xff1f, NULL, "?" }, // fullwidth question mark | |
| 513 | { 0xff20, NULL, "@" }, // fullwidth at sign | |
| 514 | { 0xff21, NULL, "A" }, // fullwidth 'A' | |
| 515 | { 0xff22, NULL, "B" }, // fullwidth 'B' | |
| 516 | { 0xff23, NULL, "C" }, // fullwidth 'C' | |
| 517 | { 0xff24, NULL, "D" }, // fullwidth 'D' | |
| 518 | { 0xff25, NULL, "E" }, // fullwidth 'E' | |
| 519 | { 0xff26, NULL, "F" }, // fullwidth 'F' | |
| 520 | { 0xff27, NULL, "G" }, // fullwidth 'G' | |
| 521 | { 0xff28, NULL, "H" }, // fullwidth 'H' | |
| 522 | { 0xff29, NULL, "I" }, // fullwidth 'I' | |
| 523 | { 0xff2a, NULL, "J" }, // fullwidth 'J' | |
| 524 | { 0xff2b, NULL, "K" }, // fullwidth 'K' | |
| 525 | { 0xff2c, NULL, "L" }, // fullwidth 'L' | |
| 526 | { 0xff2d, NULL, "M" }, // fullwidth 'M' | |
| 527 | { 0xff2e, NULL, "N" }, // fullwidth 'N' | |
| 528 | { 0xff2f, NULL, "O" }, // fullwidth 'O' | |
| 529 | { 0xff30, NULL, "P" }, // fullwidth 'P' | |
| 530 | { 0xff31, NULL, "Q" }, // fullwidth 'Q' | |
| 531 | { 0xff32, NULL, "R" }, // fullwidth 'R' | |
| 532 | { 0xff33, NULL, "S" }, // fullwidth 'S' | |
| 533 | { 0xff34, NULL, "T" }, // fullwidth 'T' | |
| 534 | { 0xff35, NULL, "U" }, // fullwidth 'U' | |
| 535 | { 0xff36, NULL, "V" }, // fullwidth 'V' | |
| 536 | { 0xff37, NULL, "W" }, // fullwidth 'W' | |
| 537 | { 0xff38, NULL, "X" }, // fullwidth 'X' | |
| 538 | { 0xff39, NULL, "Y" }, // fullwidth 'Y' | |
| 539 | { 0xff3a, NULL, "Z" }, // fullwidth 'Z' | |
| 540 | { 0xff3b, NULL, "[" }, // fullwidth left bracket | |
| 541 | { 0xff3c, NULL, "\\" }, // fullwidth backslash | |
| 542 | { 0xff3d, NULL, "]" }, // fullwidth right bracket | |
| 543 | { 0xff3e, NULL, "^" }, // fullwidth caret | |
| 544 | { 0xff3f, NULL, "_" }, // fullwidth underscore | |
| 545 | { 0xff40, NULL, "`" }, // fullwidth backquote | |
| 546 | { 0xff41, NULL, "a" }, // fullwidth 'a' | |
| 547 | { 0xff42, NULL, "b" }, // fullwidth 'b' | |
| 548 | { 0xff43, NULL, "c" }, // fullwidth 'c' | |
| 549 | { 0xff44, NULL, "d" }, // fullwidth 'd' | |
| 550 | { 0xff45, NULL, "e" }, // fullwidth 'e' | |
| 551 | { 0xff46, NULL, "f" }, // fullwidth 'f' | |
| 552 | { 0xff47, NULL, "g" }, // fullwidth 'g' | |
| 553 | { 0xff48, NULL, "h" }, // fullwidth 'h' | |
| 554 | { 0xff49, NULL, "i" }, // fullwidth 'i' | |
| 555 | { 0xff4a, NULL, "j" }, // fullwidth 'j' | |
| 556 | { 0xff4b, NULL, "k" }, // fullwidth 'k' | |
| 557 | { 0xff4c, NULL, "l" }, // fullwidth 'l' | |
| 558 | { 0xff4d, NULL, "m" }, // fullwidth 'm' | |
| 559 | { 0xff4e, NULL, "n" }, // fullwidth 'n' | |
| 560 | { 0xff4f, NULL, "o" }, // fullwidth 'o' | |
| 561 | { 0xff50, NULL, "p" }, // fullwidth 'p' | |
| 562 | { 0xff51, NULL, "q" }, // fullwidth 'q' | |
| 563 | { 0xff52, NULL, "r" }, // fullwidth 'r' | |
| 564 | { 0xff53, NULL, "s" }, // fullwidth 's' | |
| 565 | { 0xff54, NULL, "t" }, // fullwidth 't' | |
| 566 | { 0xff55, NULL, "u" }, // fullwidth 'u' | |
| 567 | { 0xff56, NULL, "v" }, // fullwidth 'v' | |
| 568 | { 0xff57, NULL, "w" }, // fullwidth 'w' | |
| 569 | { 0xff58, NULL, "x" }, // fullwidth 'x' | |
| 570 | { 0xff59, NULL, "y" }, // fullwidth 'y' | |
| 571 | { 0xff5a, NULL, "z" }, // fullwidth 'z' | |
| 572 | { 0xff5b, NULL, "{" }, // fullwidth left brace | |
| 573 | { 0xff5c, NULL, "|" }, // fullwidth vertical bar | |
| 574 | { 0xff5d, NULL, "}" }, // fullwidth right brace | |
| 575 | { 0xff5e, NULL, "~" }, // fullwidth tilde | |
| 576 | { 0xff5f, NULL, "((" }, // fullwidth double left parenthesis | |
| 577 | { 0xff60, NULL, "))" }, // fullwidth double right parenthesis | |
| 578 | { 0xffe0, NULL, "\xC2\xA2" }, // fullwidth cent sign | |
| 579 | { 0xffe1, NULL, "\xC2\xA3" }, // fullwidth pound sign | |
| 580 | { 0xffe4, NULL, "\xC2\xA4" }, // fullwidth broken bar | |
| 581 | { 0xffe5, NULL, "\xC2\xA5" }, // fullwidth yen sign | |
| 582 | { 0xffe6, NULL, "\xE2\x82\xA9" }, // fullwidth won sign | |
| 583 | { 0xffe9, NULL, "\xE2\x86\x90" }, // fullwidth left arrow | |
| 584 | { 0xffea, NULL, "\xE2\x86\x91" }, // fullwidth up arrow | |
| 585 | { 0xffeb, NULL, "\xE2\x86\x92" }, // fullwidth right arrow | |
| 586 | { 0xffec, NULL, "\xE2\x86\x93" }, // fullwidth down arrow | |
| 587 | { 0xffed, NULL, "\xE2\x96\xAA" }, // fullwidth solid box | |
| 588 | { 0xffee, NULL, "\xE2\x97\xA6" }, // fullwidth open circle | |
| 589 | { UCHAR_SHIFT_1, "Shift", NULL }, // Shift key | |
| 590 | { UCHAR_SHIFT_2, "Ctrl", NULL }, // Ctrl key | |
| 591 | { UCHAR_MAMEKEY(F1), "F1", NULL }, // F1 function key | |
| 592 | { UCHAR_MAMEKEY(F2), "F2", NULL }, // F2 function key | |
| 593 | { UCHAR_MAMEKEY(F3), "F3", NULL }, // F3 function key | |
| 594 | { UCHAR_MAMEKEY(F4), "F4", NULL }, // F4 function key | |
| 595 | { UCHAR_MAMEKEY(F5), "F5", NULL }, // F5 function key | |
| 596 | { UCHAR_MAMEKEY(F6), "F6", NULL }, // F6 function key | |
| 597 | { UCHAR_MAMEKEY(F7), "F7", NULL }, // F7 function key | |
| 598 | { UCHAR_MAMEKEY(F8), "F8", NULL }, // F8 function key | |
| 599 | { UCHAR_MAMEKEY(F9), "F9", NULL }, // F9 function key | |
| 600 | { UCHAR_MAMEKEY(F10), "F10", NULL }, // F10 function key | |
| 601 | { UCHAR_MAMEKEY(F11), "F11", NULL }, // F11 function key | |
| 602 | { UCHAR_MAMEKEY(F12), "F12", NULL }, // F12 function key | |
| 603 | { UCHAR_MAMEKEY(F13), "F13", NULL }, // F13 function key | |
| 604 | { UCHAR_MAMEKEY(F14), "F14", NULL }, // F14 function key | |
| 605 | { UCHAR_MAMEKEY(F15), "F15", NULL }, // F15 function key | |
| 606 | { UCHAR_MAMEKEY(ESC), "Esc", "\033" }, // Esc key | |
| 607 | { UCHAR_MAMEKEY(INSERT), "Insert", NULL }, // Insert key | |
| 608 | { UCHAR_MAMEKEY(DEL), "Delete", "\010" }, // Delete key | |
| 609 | { UCHAR_MAMEKEY(HOME), "Home", "\014" }, // Home key | |
| 610 | { UCHAR_MAMEKEY(END), "End", NULL }, // End key | |
| 611 | { UCHAR_MAMEKEY(PGUP), "Page Up", NULL }, // Page Up key | |
| 612 | { UCHAR_MAMEKEY(PGDN), "Page Down", NULL }, // Page Down key | |
| 613 | { UCHAR_MAMEKEY(LEFT), "Cursor Left", NULL }, // Cursor Left | |
| 614 | { UCHAR_MAMEKEY(RIGHT), "Cursor Right", NULL }, // Cursor Right | |
| 615 | { UCHAR_MAMEKEY(UP), "Cursor Up", NULL }, // Cursor Up | |
| 616 | { UCHAR_MAMEKEY(DOWN), "Cursor Down", NULL }, // Cursor Down | |
| 617 | { UCHAR_MAMEKEY(0_PAD), "Keypad 0", NULL }, // 0 on the numeric keypad | |
| 618 | { UCHAR_MAMEKEY(1_PAD), "Keypad 1", NULL }, // 1 on the numeric keypad | |
| 619 | { UCHAR_MAMEKEY(2_PAD), "Keypad 2", NULL }, // 2 on the numeric keypad | |
| 620 | { UCHAR_MAMEKEY(3_PAD), "Keypad 3", NULL }, // 3 on the numeric keypad | |
| 621 | { UCHAR_MAMEKEY(4_PAD), "Keypad 4", NULL }, // 4 on the numeric keypad | |
| 622 | { UCHAR_MAMEKEY(5_PAD), "Keypad 5", NULL }, // 5 on the numeric keypad | |
| 623 | { UCHAR_MAMEKEY(6_PAD), "Keypad 6", NULL }, // 6 on the numeric keypad | |
| 624 | { UCHAR_MAMEKEY(7_PAD), "Keypad 7", NULL }, // 7 on the numeric keypad | |
| 625 | { UCHAR_MAMEKEY(8_PAD), "Keypad 8", NULL }, // 8 on the numeric keypad | |
| 626 | { UCHAR_MAMEKEY(9_PAD), "Keypad 9", NULL }, // 9 on the numeric keypad | |
| 627 | { UCHAR_MAMEKEY(SLASH_PAD), "Keypad /", NULL }, // / on the numeric keypad | |
| 628 | { UCHAR_MAMEKEY(ASTERISK), "Keypad *", NULL }, // * on the numeric keypad | |
| 629 | { UCHAR_MAMEKEY(MINUS_PAD), "Keypad -", NULL }, // - on the numeric Keypad | |
| 630 | { UCHAR_MAMEKEY(PLUS_PAD), "Keypad +", NULL }, // + on the numeric Keypad | |
| 631 | { UCHAR_MAMEKEY(DEL_PAD), "Keypad .", NULL }, // . on the numeric keypad | |
| 632 | { UCHAR_MAMEKEY(ENTER_PAD), "Keypad Enter", NULL }, // Enter on the numeric keypad | |
| 633 | { UCHAR_MAMEKEY(PRTSCR), "Print Screen", NULL }, // Print Screen key | |
| 634 | { UCHAR_MAMEKEY(PAUSE), "Pause", NULL }, // Pause key | |
| 635 | { UCHAR_MAMEKEY(LSHIFT), "Left Shift", NULL }, // Left Shift key | |
| 636 | { UCHAR_MAMEKEY(RSHIFT), "Right Shift", NULL }, // Right Shift key | |
| 637 | { UCHAR_MAMEKEY(LCONTROL), "Left Ctrl", NULL }, // Left Control key | |
| 638 | { UCHAR_MAMEKEY(RCONTROL), "Right Ctrl", NULL }, // Right Control key | |
| 639 | { UCHAR_MAMEKEY(LALT), "Left Alt", NULL }, // Left Alt key | |
| 640 | { UCHAR_MAMEKEY(RALT), "Right Alt", NULL }, // Right Alt key | |
| 641 | { UCHAR_MAMEKEY(SCRLOCK), "Scroll Lock", NULL }, // Scroll Lock key | |
| 642 | { UCHAR_MAMEKEY(NUMLOCK), "Num Lock", NULL }, // Num Lock key | |
| 643 | { UCHAR_MAMEKEY(CAPSLOCK), "Caps Lock", NULL }, // Caps Lock key | |
| 644 | { UCHAR_MAMEKEY(LWIN), "Left Win", NULL }, // Left Win key | |
| 645 | { UCHAR_MAMEKEY(RWIN), "Right Win", NULL }, // Right Win key | |
| 646 | { UCHAR_MAMEKEY(MENU), "Menu", NULL }, // Menu key | |
| 647 | { UCHAR_MAMEKEY(CANCEL), "Break", NULL } // Break/Pause key | |
| 547 | 648 | }; |
| 548 | 649 | |
| 549 | static TIMER_CALLBACK(inputx_timerproc); | |
| 550 | 650 | |
| 551 | 651 | |
| 552 | /* Debugging commands and handlers. */ | |
| 553 | static void execute_input(running_machine &machine, int ref, int params, const char *param[]); | |
| 554 | static void execute_dumpkbd(running_machine &machine, int ref, int params, const char *param[]); | |
| 652 | //************************************************************************** | |
| 653 | // COMMON SHARED STRINGS | |
| 654 | //************************************************************************** | |
| 555 | 655 | |
| 556 | /*************************************************************************** | |
| 557 | COMMON SHARED STRINGS | |
| 558 | ***************************************************************************/ | |
| 559 | ||
| 560 | 656 | static const struct |
| 561 | 657 | { |
| 562 | 658 | UINT32 id; |
| r15082 | r15083 | |
| 686 | 782 | |
| 687 | 783 | |
| 688 | 784 | |
| 689 | /*************************************************************************** | |
| 690 | BUILT-IN CORE MAPPINGS | |
| 691 | ***************************************************************************/ | |
| 785 | //************************************************************************** | |
| 786 | // BUILT-IN CORE MAPPINGS | |
| 787 | //************************************************************************** | |
| 692 | 788 | |
| 693 | 789 | #include "inpttype.h" |
| 694 | 790 | |
| 695 | 791 | |
| 696 | 792 | |
| 697 | /*************************************************************************** | |
| 698 | FUNCTION PROTOTYPES | |
| 699 | ***************************************************************************/ | |
| 793 | //************************************************************************** | |
| 794 | // PORT CONFIGURATIONS | |
| 795 | //************************************************************************** | |
| 700 | 796 | |
| 701 | /* core system management */ | |
| 702 | static void input_port_exit(running_machine &machine); | |
| 797 | //************************************************************************** | |
| 798 | // I/O PORT LIST | |
| 799 | //************************************************************************** | |
| 703 | 800 | |
| 704 | /* port reading */ | |
| 705 | static INT32 apply_analog_settings(INT32 current, analog_field_state *analog); | |
| 801 | //------------------------------------------------- | |
| 802 | // append - append the given device's input ports | |
| 803 | // to the current list | |
| 804 | //------------------------------------------------- | |
| 706 | 805 | |
| 707 | /* initialization helpers */ | |
| 708 | static void init_port_types(running_machine &machine); | |
| 709 | static void init_port_state(running_machine &machine); | |
| 710 | static void init_autoselect_devices(running_machine &machine, int type1, int type2, int type3, const char *option, const char *ananame); | |
| 711 | static device_field_info *init_field_device_info(const input_field_config *field,const char *device_name); | |
| 712 | static analog_field_state *init_field_analog_state(const input_field_config *field); | |
| 806 | void ioport_list::append(device_t &device, astring &errorbuf) | |
| 807 | { | |
| 808 | // no constructor, no list | |
| 809 | ioport_constructor constructor = device.input_ports(); | |
| 810 | if (constructor == NULL) | |
| 811 | return; | |
| 713 | 812 | |
| 714 | /* once-per-frame updates */ | |
| 715 | static void frame_update_callback(running_machine &machine); | |
| 716 | static void frame_update(running_machine &machine); | |
| 717 | static void frame_update_digital_joysticks(running_machine &machine); | |
| 718 | static void frame_update_analog_field(running_machine &machine, analog_field_state *analog); | |
| 719 | static int frame_get_digital_field_state(const input_field_config *field, int mouse_down); | |
| 813 | // reset error buffer | |
| 814 | errorbuf.reset(); | |
| 720 | 815 | |
| 721 | /* tokenization helpers */ | |
| 722 | static int token_to_input_field_type(running_machine &machine, const char *string, int *player); | |
| 723 | static const char *input_field_type_to_token(running_machine &machine, int type, int player); | |
| 724 | static int token_to_seq_type(const char *string); | |
| 816 | // detokenize into the list | |
| 817 | (*constructor)(device, *this, errorbuf); | |
| 725 | 818 | |
| 726 | /* settings load */ | |
| 727 | static void load_config_callback(running_machine &machine, int config_type, xml_data_node *parentnode); | |
| 728 | static void load_remap_table(running_machine &machine, xml_data_node *parentnode); | |
| 729 | static int load_default_config(running_machine &machine, xml_data_node *portnode, int type, int player, const input_seq *newseq); | |
| 730 | static int load_game_config(running_machine &machine, xml_data_node *portnode, int type, int player, const input_seq *newseq); | |
| 819 | // collapse fields and sort the list | |
| 820 | for (ioport_port *port = first(); port != NULL; port = port->next()) | |
| 821 | port->collapse_fields(errorbuf); | |
| 822 | } | |
| 731 | 823 | |
| 732 | /* settings save */ | |
| 733 | static void save_config_callback(running_machine &machine, int config_type, xml_data_node *parentnode); | |
| 734 | static void save_sequence(running_machine &machine, xml_data_node *parentnode, int type, int porttype, const input_seq &seq); | |
| 735 | static int save_this_input_field_type(int type); | |
| 736 | static void save_default_inputs(running_machine &machine, xml_data_node *parentnode); | |
| 737 | static void save_game_inputs(running_machine &machine, xml_data_node *parentnode); | |
| 738 | 824 | |
| 739 | /* input playback */ | |
| 740 | static time_t playback_init(running_machine &machine); | |
| 741 | static void playback_end(running_machine &machine, const char *message); | |
| 742 | static void playback_frame(running_machine &machine, attotime curtime); | |
| 743 | static void playback_port(const input_port_config *port); | |
| 744 | 825 | |
| 745 | /* input recording */ | |
| 746 | static void record_init(running_machine &machine); | |
| 747 | static void record_end(running_machine &machine, const char *message); | |
| 748 | static void record_frame(running_machine &machine, attotime curtime); | |
| 749 | static void record_port(const input_port_config *port); | |
| 826 | //************************************************************************** | |
| 827 | // INPUT TYPE ENTRY | |
| 828 | //************************************************************************** | |
| 750 | 829 | |
| 830 | //------------------------------------------------- | |
| 831 | // input_type_entry - constructors | |
| 832 | //------------------------------------------------- | |
| 751 | 833 | |
| 752 | ||
| 753 | /*************************************************************************** | |
| 754 | INLINE FUNCTIONS | |
| 755 | ***************************************************************************/ | |
| 756 | ||
| 757 | /*------------------------------------------------- | |
| 758 | apply_analog_min_max - clamp the given input | |
| 759 | value to the appropriate min/max for the | |
| 760 | analog control | |
| 761 | -------------------------------------------------*/ | |
| 762 | ||
| 763 | INLINE INT32 apply_analog_min_max(const analog_field_state *analog, INT32 value) | |
| 834 | input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard) | |
| 835 | : m_next(NULL), | |
| 836 | m_type(type), | |
| 837 | m_group(group), | |
| 838 | m_player(player), | |
| 839 | m_token(token), | |
| 840 | m_name(name) | |
| 764 | 841 | { |
| 765 | /* take the analog minimum and maximum values and apply the inverse of the */ | |
| 766 | /* sensitivity so that we can clamp against them before applying sensitivity */ | |
| 767 | INT32 adjmin = APPLY_INVERSE_SENSITIVITY(analog->minimum, analog->sensitivity); | |
| 768 | INT32 adjmax = APPLY_INVERSE_SENSITIVITY(analog->maximum, analog->sensitivity); | |
| 769 | ||
| 770 | /* for absolute devices, clamp to the bounds absolutely */ | |
| 771 | if (!analog->wraps) | |
| 772 | { | |
| 773 | if (value > adjmax) | |
| 774 | value = adjmax; | |
| 775 | else if (value < adjmin) | |
| 776 | value = adjmin; | |
| 777 | } | |
| 778 | ||
| 779 | /* for relative devices, wrap around when we go past the edge */ | |
| 780 | else | |
| 781 | { | |
| 782 | INT32 range = adjmax - adjmin; | |
| 783 | /* rolls to other end when 1 position past end. */ | |
| 784 | value = (value - adjmin) % range; | |
| 785 | if (value < 0) | |
| 786 | value += range; | |
| 787 | value += adjmin; | |
| 788 | } | |
| 789 | ||
| 790 | return value; | |
| 842 | m_defseq[SEQ_TYPE_STANDARD] = m_seq[SEQ_TYPE_STANDARD] = standard; | |
| 791 | 843 | } |
| 792 | 844 | |
| 793 | ||
| 794 | /*------------------------------------------------- | |
| 795 | get_port_tag - return a guaranteed tag for | |
| 796 | a port | |
| 797 | -------------------------------------------------*/ | |
| 798 | ||
| 799 | INLINE const char *get_port_tag(const input_port_config *port, char *tempbuffer) | |
| 845 | input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment) | |
| 846 | : m_next(NULL), | |
| 847 | m_type(type), | |
| 848 | m_group(group), | |
| 849 | m_player(player), | |
| 850 | m_token(token), | |
| 851 | m_name(name) | |
| 800 | 852 | { |
| 801 | return port->tag(); | |
| 853 | m_defseq[SEQ_TYPE_STANDARD] = m_seq[SEQ_TYPE_STANDARD] = standard; | |
| 854 | m_defseq[SEQ_TYPE_INCREMENT] = m_seq[SEQ_TYPE_INCREMENT] = increment; | |
| 855 | m_defseq[SEQ_TYPE_DECREMENT] = m_seq[SEQ_TYPE_DECREMENT] = decrement; | |
| 802 | 856 | } |
| 803 | 857 | |
| 804 | 858 | |
| 805 | /*------------------------------------------------- | |
| 806 | condition_equal - TRUE if two conditions are | |
| 807 | equivalent | |
| 808 | -------------------------------------------------*/ | |
| 859 | //------------------------------------------------- | |
| 860 | // configure_osd - set the token and name of an | |
| 861 | // OSD entry | |
| 862 | //------------------------------------------------- | |
| 809 | 863 | |
| 810 | ||
| 864 | void | |
| 811 | 865 | { |
| 812 | return (cond1->mask == cond2->mask && cond1->value == cond2->value && cond1->condition == cond2->condition && strcmp(cond1->tag, cond2->tag) == 0); | |
| 866 | assert(m_type >= IPT_OSD_1 && m_type <= IPT_OSD_16); | |
| 867 | m_token = token; | |
| 868 | m_name = name; | |
| 813 | 869 | } |
| 814 | 870 | |
| 815 | 871 | |
| 872 | //************************************************************************** | |
| 873 | // DIGITAL JOYSTICKS | |
| 874 | //************************************************************************** | |
| 816 | 875 | |
| 817 | /*************************************************************************** | |
| 818 | CORE SYSTEM MANAGEMENT | |
| 819 | ***************************************************************************/ | |
| 876 | //------------------------------------------------- | |
| 877 | // digital_joystick - constructor | |
| 878 | //------------------------------------------------- | |
| 820 | 879 | |
| 821 | /*------------------------------------------------- | |
| 822 | input_port_init - initialize the input port | |
| 823 | system | |
| 824 | -------------------------------------------------*/ | |
| 825 | ||
| 826 | ioport_manager::ioport_manager(running_machine &machine) | |
| 827 | : safe_to_read(false), | |
| 828 | last_frame_time(attotime::zero), | |
| 829 | last_delta_nsec(0), | |
| 830 | record_file(NULL), | |
| 831 | playback_file(NULL), | |
| 832 | playback_accumulated_speed(0), | |
| 833 | playback_accumulated_frames(0), | |
| 834 | codes(NULL), | |
| 835 | inputx_timer(NULL), | |
| 836 | queue_chars(NULL), | |
| 837 | accept_char(NULL), | |
| 838 | charqueue_empty(NULL), | |
| 839 | current_rate(attotime::zero), | |
| 840 | m_machine(machine) | |
| 880 | digital_joystick::digital_joystick(int player, int number) | |
| 881 | : m_player(player), | |
| 882 | m_number(number), | |
| 883 | m_current(0), | |
| 884 | m_current4way(0), | |
| 885 | m_previous(0) | |
| 841 | 886 | { |
| 842 | memset(type_to_entry, 0, sizeof(type_to_entry)); | |
| 843 | memset(joystick_info, 0, sizeof(joystick_info)); | |
| 887 | memset(m_field, 0, sizeof(m_field)); | |
| 844 | 888 | } |
| 845 | 889 | |
| 846 | time_t ioport_manager::initialize() | |
| 847 | { | |
| 848 | /* add an exit callback and a frame callback */ | |
| 849 | machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(input_port_exit), &machine())); | |
| 850 | machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(frame_update_callback), &machine())); | |
| 851 | 890 | |
| 852 | /* initialize the default port info from the OSD */ | |
| 853 | init_port_types(machine()); | |
| 891 | //------------------------------------------------- | |
| 892 | // set_axis - configure a single axis of a | |
| 893 | // digital joystick | |
| 894 | //------------------------------------------------- | |
| 854 | 895 | |
| 855 | /* if we have a token list, proceed */ | |
| 856 | device_iterator iter(machine().root_device()); | |
| 857 | for (device_t *device = iter.first(); device != NULL; device = iter.next()) | |
| 858 | { | |
| 859 | astring errors; | |
| 860 | input_port_list_init(*device, m_portlist, errors); | |
| 861 | if (errors) | |
| 862 | mame_printf_error("Input port errors:\n%s", errors.cstr()); | |
| 863 | } | |
| 864 | ||
| 865 | init_port_state(machine()); | |
| 866 | /* register callbacks for when we load configurations */ | |
| 867 | config_register(machine(), "input", config_saveload_delegate(FUNC(load_config_callback), &machine()), config_saveload_delegate(FUNC(save_config_callback), &machine())); | |
| 868 | ||
| 869 | /* open playback and record files if specified */ | |
| 870 | time_t basetime = playback_init(machine()); | |
| 871 | record_init(machine()); | |
| 872 | ||
| 873 | return basetime; | |
| 874 | } | |
| 875 | ||
| 876 | ||
| 877 | /*------------------------------------------------- | |
| 878 | input_port_exit - exit callback to ensure | |
| 879 | we clean up and close our files | |
| 880 | -------------------------------------------------*/ | |
| 881 | ||
| 882 | static void input_port_exit(running_machine &machine) | |
| 896 | digital_joystick::direction_t digital_joystick::set_axis(ioport_field &field) | |
| 883 | 897 | { |
| 884 | /* close any playback or recording files */ | |
| 885 | playback_end(machine, NULL); | |
| 886 | record_end(machine, NULL); | |
| 898 | direction_t direction = direction_t((field.type() - (IPT_DIGITAL_JOYSTICK_FIRST + 1)) % 4); | |
| 899 | m_field[direction] = &field; | |
| 900 | return direction; | |
| 887 | 901 | } |
| 888 | 902 | |
| 889 | 903 | |
| 904 | //------------------------------------------------- | |
| 905 | // frame_update - update the state of digital | |
| 906 | // joysticks prior to accumulating the results | |
| 907 | // in a port | |
| 908 | //------------------------------------------------- | |
| 890 | 909 | |
| 891 | /*************************************************************************** | |
| 892 | PORT CONFIGURATIONS | |
| 893 | ***************************************************************************/ | |
| 894 | ||
| 895 | /*------------------------------------------------- | |
| 896 | input_port_list_init - initialize an input | |
| 897 | port list structure and allocate ports | |
| 898 | according to the given tokens | |
| 899 | -------------------------------------------------*/ | |
| 900 | ||
| 901 | void input_port_list_init(device_t &device, ioport_list &portlist, astring &errorbuf) | |
| 910 | void digital_joystick::frame_update() | |
| 902 | 911 | { |
| 903 | /* no constructor, no list */ | |
| 904 | ioport_constructor constructor = device.input_ports(); | |
| 905 | if (constructor == NULL) | |
| 906 | return; | |
| 912 | // remember previous state and reset current state | |
| 913 | m_previous = m_current; | |
| 914 | m_current = 0; | |
| 907 | 915 | |
| 908 | /* reset error buffer */ | |
| 909 | errorbuf.reset(); | |
| 916 | // read all the associated ports | |
| 917 | running_machine *machine = NULL; | |
| 918 | for (direction_t direction = JOYDIR_UP; direction < JOYDIR_COUNT; direction++) | |
| 919 | if (m_field[direction] != NULL) | |
| 920 | { | |
| 921 | machine = &m_field[direction]->machine(); | |
| 922 | if (machine->input().seq_pressed(m_field[direction]->seq(SEQ_TYPE_STANDARD))) | |
| 923 | m_current |= 1 << direction; | |
| 924 | } | |
| 910 | 925 | |
| 911 | /* detokenize into the list */ | |
| 912 | (*constructor)(device, portlist, errorbuf); | |
| 926 | // lock out opposing directions (left + right or up + down) | |
| 927 | if ((m_current & (UP_BIT | DOWN_BIT)) == (UP_BIT | DOWN_BIT)) | |
| 928 | m_current &= ~(UP_BIT | DOWN_BIT); | |
| 929 | if ((m_current & (LEFT_BIT | RIGHT_BIT)) == (LEFT_BIT | RIGHT_BIT)) | |
| 930 | m_current &= ~(LEFT_BIT | RIGHT_BIT); | |
| 913 | 931 | |
| 914 | // collapse fields and sort the list | |
| 915 | for (input_port_config *port = portlist.first(); port != NULL; port = port->next()) | |
| 916 | port->collapse_fields(errorbuf); | |
| 917 | } | |
| 932 | // only update 4-way case if joystick has moved | |
| 933 | if (m_current != m_previous) | |
| 934 | { | |
| 935 | m_current4way = m_current; | |
| 918 | 936 | |
| 937 | // | |
| 938 | // If joystick is pointing at a diagonal, acknowledge that the player moved | |
| 939 | // the joystick by favoring a direction change. This minimizes frustration | |
| 940 | // when using a keyboard for input, and maximizes responsiveness. | |
| 941 | // | |
| 942 | // For example, if you are holding "left" then switch to "up" (where both left | |
| 943 | // and up are briefly pressed at the same time), we'll transition immediately | |
| 944 | // to "up." | |
| 945 | // | |
| 946 | // Zero any switches that didn't change from the previous to current state. | |
| 947 | // | |
| 948 | if ((m_current4way & (UP_BIT | DOWN_BIT)) && | |
| 949 | (m_current4way & (LEFT_BIT | RIGHT_BIT))) | |
| 950 | { | |
| 951 | m_current4way ^= m_current4way & m_previous; | |
| 952 | } | |
| 919 | 953 | |
| 920 | /*------------------------------------------------- | |
| 921 | input_field_by_tag_and_mask - return a pointer | |
| 922 | to the first field that intersects the given | |
| 923 | mask on the tagged port | |
| 924 | -------------------------------------------------*/ | |
| 925 | ||
| 926 | const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask) | |
| 927 | { | |
| 928 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 929 | ||
| 930 | /* if we got the port, look for the field */ | |
| 931 | if (port != NULL) | |
| 932 | for (const input_field_config *field = port->first_field(); field != NULL; field = field->next()) | |
| 933 | if ((field->mask & mask) != 0) | |
| 934 | return field; | |
| 935 | ||
| 936 | return NULL; | |
| 954 | // | |
| 955 | // If we are still pointing at a diagonal, we are in an indeterminant state. | |
| 956 | // | |
| 957 | // This could happen if the player moved the joystick from the idle position directly | |
| 958 | // to a diagonal, or from one diagonal directly to an extreme diagonal. | |
| 959 | // | |
| 960 | // The chances of this happening with a keyboard are slim, but we still need to | |
| 961 | // constrain this case. | |
| 962 | // | |
| 963 | // For now, just resolve randomly. | |
| 964 | // | |
| 965 | if ((m_current4way & (UP_BIT | DOWN_BIT)) && | |
| 966 | (m_current4way & (LEFT_BIT | RIGHT_BIT))) | |
| 967 | { | |
| 968 | if (machine->rand() & 1) | |
| 969 | m_current4way &= ~(LEFT_BIT | RIGHT_BIT); | |
| 970 | else | |
| 971 | m_current4way &= ~(UP_BIT | DOWN_BIT); | |
| 972 | } | |
| 973 | } | |
| 937 | 974 | } |
| 938 | 975 | |
| 939 | 976 | |
| 940 | 977 | |
| 941 | /*************************************************************************** | |
| 942 | ACCESSORS FOR INPUT FIELDS | |
| 943 | ***************************************************************************/ | |
| 978 | //************************************************************************** | |
| 979 | // NATURAL KEYBOARD | |
| 980 | //************************************************************************** | |
| 944 | 981 | |
| 945 | /*------------------------------------------------- | |
| 946 | input_field_name - return the field name for | |
| 947 | a given input field | |
| 948 | -------------------------------------------------*/ | |
| 982 | //------------------------------------------------- | |
| 983 | // natural_keyboard - constructor | |
| 984 | //------------------------------------------------- | |
| 949 | 985 | |
| 950 | const char *input_field_name(const input_field_config *field) | |
| 986 | natural_keyboard::natural_keyboard(running_machine &machine) | |
| 987 | : m_machine(machine), | |
| 988 | m_bufbegin(0), | |
| 989 | m_bufend(0), | |
| 990 | m_status_keydown(false), | |
| 991 | m_last_cr(false), | |
| 992 | m_timer(NULL), | |
| 993 | m_current_rate(attotime::zero) | |
| 951 | 994 | { |
| 952 | /* if we have a non-default name, use that */ | |
| 953 | if ((field->state != NULL) && (field->state->name != NULL)) | |
| 954 | return field->state->name; | |
| 955 | if (field->name != NULL) | |
| 956 | return field->name; | |
| 995 | // reigster debugger commands | |
| 996 | if (machine.debug_flags & DEBUG_FLAG_ENABLED) | |
| 997 | { | |
| 998 | debug_console_register_command(machine, "input", CMDFLAG_NONE, 0, 1, 1, execute_input); | |
| 999 | debug_console_register_command(machine, "dumpkbd", CMDFLAG_NONE, 0, 0, 1, execute_dumpkbd); | |
| 1000 | } | |
| 957 | 1001 | |
| 958 | /* otherwise, return the name associated with the type */ | |
| 959 | return input_type_name(field->machine(), field->type, field->player); | |
| 1002 | // posting keys directly only makes sense for a computer | |
| 1003 | if (machine.ioport().has_keyboard()) | |
| 1004 | { | |
| 1005 | m_buffer.resize(KEY_BUFFER_SIZE); | |
| 1006 | m_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(natural_keyboard::timer), this)); | |
| 1007 | build_codes(machine.ioport()); | |
| 1008 | } | |
| 960 | 1009 | } |
| 961 | 1010 | |
| 962 | 1011 | |
| 963 | /*------------------------------------------------- | |
| 964 | input_field_seq - return the input sequence | |
| 965 | for the given input field | |
| 966 | -------------------------------------------------*/ | |
| 1012 | //------------------------------------------------- | |
| 1013 | // configure - configure callbacks for full- | |
| 1014 | // featured keyboard support | |
| 1015 | //------------------------------------------------- | |
| 967 | 1016 | |
| 968 | ||
| 1017 | vo | |
| 969 | 1018 | { |
| 970 | /* if the field is disabled, return no key */ | |
| 971 | if (field->flags & FIELD_FLAG_UNUSED) | |
| 972 | return input_seq::empty_seq; | |
| 973 | ||
| 974 | /* select either the live or config state depending on whether we have live state */ | |
| 975 | const input_seq &portseq = (field->state == NULL) ? field->seq[seqtype] : field->state->seq[seqtype]; | |
| 976 | ||
| 977 | /* if the portseq is the special default code, return the expanded default value */ | |
| 978 | if (portseq.is_default()) | |
| 979 | return input_type_seq(field->machine(), field->type, field->player, seqtype); | |
| 980 | ||
| 981 | /* otherwise, return the sequence as-is */ | |
| 982 | return portseq; | |
| 1019 | // set the callbacks | |
| 1020 | m_queue_chars = queue_chars; | |
| 1021 | m_accept_char = accept_char; | |
| 1022 | m_charqueue_empty = charqueue_empty; | |
| 983 | 1023 | } |
| 984 | 1024 | |
| 985 | 1025 | |
| 986 | /*------------------------------------------------- | |
| 987 | input_field_get_user_settings - return the current | |
| 988 | settings for the given input field | |
| 989 | -------------------------------------------------*/ | |
| 1026 | //------------------------------------------------- | |
| 1027 | // post - post a single character | |
| 1028 | //------------------------------------------------- | |
| 990 | 1029 | |
| 991 | void | |
| 1030 | void | |
| 992 | 1031 | { |
| 993 | int seqtype; | |
| 994 | ||
| 995 | /* zap the entire structure */ | |
| 996 | memset(settings, 0, sizeof(*settings)); | |
| 997 | ||
| 998 | /* copy the basics */ | |
| 999 | for (seqtype = 0; seqtype < ARRAY_LENGTH(settings->seq); seqtype++) | |
| 1000 | settings->seq[seqtype] = field->state->seq[seqtype]; | |
| 1001 | ||
| 1002 | /* if there's a list of settings or we're an adjuster, copy the current value */ | |
| 1003 | if (field->settinglist().count() != 0 || field->type == IPT_ADJUSTER) | |
| 1004 | settings->value = field->state->value; | |
| 1005 | ||
| 1006 | /* if there's analog data, extract the analog settings */ | |
| 1007 | if (field->state->analog != NULL) | |
| 1032 | // ignore any \n that are preceded by \r | |
| 1033 | if (m_last_cr && ch == '\n') | |
| 1008 | 1034 | { |
| 1009 | settings->sensitivity = field->state->analog->sensitivity; | |
| 1010 | settings->delta = field->state->analog->delta; | |
| 1011 | settings->centerdelta = field->state->analog->centerdelta; | |
| 1012 | settings->reverse = field->state->analog->reverse; | |
| 1035 | m_last_cr = false; | |
| 1036 | return; | |
| 1013 | 1037 | } |
| 1014 | } | |
| 1015 | 1038 | |
| 1039 | // change all eolns to '\r' | |
| 1040 | if (ch == '\n') | |
| 1041 | ch = '\r'; | |
| 1042 | else | |
| 1043 | m_last_cr = (ch == '\r'); | |
| 1016 | 1044 | |
| 1017 | /*------------------------------------------------- | |
| 1018 | input_field_set_user_settings - modify the current | |
| 1019 | settings for the given input field | |
| 1020 | -------------------------------------------------*/ | |
| 1021 | ||
| 1022 | void input_field_set_user_settings(const input_field_config *field, const input_field_user_settings *settings) | |
| 1023 | { | |
| 1024 | int seqtype; | |
| 1025 | ||
| 1026 | /* copy the basics */ | |
| 1027 | for (seqtype = 0; seqtype < ARRAY_LENGTH(settings->seq); seqtype++) | |
| 1045 | // logging | |
| 1046 | if (LOG_NATURAL_KEYBOARD) | |
| 1028 | 1047 | { |
| 1029 | const input_seq &defseq = input_type_seq(field->machine(), field->type, field->player, (input_seq_type)seqtype); | |
| 1030 | if (defseq == settings->seq[seqtype]) | |
| 1031 | field->state->seq[seqtype].set_default(); | |
| 1032 | else | |
| 1033 | field->state->seq[seqtype] = settings->seq[seqtype]; | |
| 1048 | const keycode_map_entry *code = find_code(ch); | |
| 1049 | astring tempstr; | |
| 1050 | logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != NULL && code->field[0] != NULL) ? code->field[0]->name() : "<null>"); | |
| 1034 | 1051 | } |
| 1035 | 1052 | |
| 1036 | /* if there's a list of settings or we're an adjuster, copy the current value */ | |
| 1037 | if (field->settinglist().count() != 0 || field->type == IPT_ADJUSTER) | |
| 1038 | field->state->value = settings->value; | |
| 1053 | // can we post this key in the queue directly? | |
| 1054 | if (can_post_directly(ch)) | |
| 1055 | internal_post(ch); | |
| 1039 | 1056 | |
| 1040 | /* if there's analog data, extract the analog settings */ | |
| 1041 | if (field->state->analog != NULL) | |
| 1057 | // can we post this key with an alternate representation? | |
| 1058 | else if (can_post_alternate(ch)) | |
| 1042 | 1059 | { |
| 1043 | field->state->analog->sensitivity = settings->sensitivity; | |
| 1044 | field->state->analog->delta = settings->delta; | |
| 1045 | field->state->analog->centerdelta = settings->centerdelta; | |
| 1046 | field->state->analog->reverse = settings->reverse; | |
| 1060 | const char_info *info = char_info::find(ch); | |
| 1061 | assert(info != NULL && info->alternate != NULL); | |
| 1062 | const char *altstring = info->alternate; | |
| 1063 | while (*altstring != 0) | |
| 1064 | { | |
| 1065 | altstring += uchar_from_utf8(&ch, altstring, strlen(altstring)); | |
| 1066 | internal_post(ch); | |
| 1067 | } | |
| 1047 | 1068 | } |
| 1048 | 1069 | } |
| 1049 | 1070 | |
| 1050 | 1071 | |
| 1051 | /*------------------------------------------------- | |
| 1052 | input_field_setting_name - return the expanded | |
| 1053 | setting name for a field | |
| 1054 | -------------------------------------------------*/ | |
| 1072 | //------------------------------------------------- | |
| 1073 | // post - post a unicode encoded string | |
| 1074 | //------------------------------------------------- | |
| 1055 | 1075 | |
| 1056 | ||
| 1076 | vo | |
| 1057 | 1077 | { |
| 1058 | const input_setting_config *setting; | |
| 1078 | // set the fixed rate | |
| 1079 | m_current_rate = rate; | |
| 1080 | ||
| 1081 | // 0 length means strlen | |
| 1082 | if (length == 0) | |
| 1083 | for (const unicode_char *scan = text; *scan != 0; scan++) | |
| 1084 | length++; | |
| 1059 | 1085 | |
| 1060 | /* only makes sense if we have settings */ | |
| 1061 | assert(field->settinglist().count() != 0); | |
| 1062 | ||
| 1063 | /* scan the list of settings looking for a match on the current value */ | |
| 1064 | for (setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1065 | if (input_condition_true(field->machine(), &setting->condition, field->port().owner())) | |
| 1066 | if (setting->value == field->state->value) | |
| 1067 | return setting->name; | |
| 1068 | ||
| 1069 | return "INVALID"; | |
| 1086 | // iterate over characters or until the buffer is full up | |
| 1087 | while (length > 0 && !full()) | |
| 1088 | { | |
| 1089 | // fetch next character | |
| 1090 | post(*text++); | |
| 1091 | length--; | |
| 1092 | } | |
| 1070 | 1093 | } |
| 1071 | 1094 | |
| 1072 | 1095 | |
| 1073 | /*------------------------------------------------- | |
| 1074 | input_field_has_previous_setting - return TRUE | |
| 1075 | if the given field has a "previous" setting | |
| 1076 | -------------------------------------------------*/ | |
| 1096 | //------------------------------------------------- | |
| 1097 | // post_utf8 - post a UTF-8 encoded string | |
| 1098 | //------------------------------------------------- | |
| 1077 | 1099 | |
| 1078 | i | |
| 1100 | void | |
| 1079 | 1101 | { |
| 1080 | const input_setting_config *setting; | |
| 1102 | // set the fixed rate | |
| 1103 | m_current_rate = rate; | |
| 1104 | ||
| 1105 | // 0-length means strlen | |
| 1106 | if (length == 0) | |
| 1107 | length = strlen(text); | |
| 1081 | 1108 | |
| 1082 | /* only makes sense if we have settings */ | |
| 1083 | assert(field->settinglist().count() != 0); | |
| 1084 | ||
| 1085 | /* scan the list of settings looking for a match on the current value */ | |
| 1086 | for (setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1087 | if (input_condition_true(field->machine(), &setting->condition, field->port().owner())) | |
| 1088 | return (setting->value != field->state->value); | |
| 1089 | ||
| 1090 | return FALSE; | |
| 1109 | // iterate until out of characters | |
| 1110 | while (length > 0) | |
| 1111 | { | |
| 1112 | // decode the next character | |
| 1113 | unicode_char uc; | |
| 1114 | int count = uchar_from_utf8(&uc, text, length); | |
| 1115 | if (count < 0) | |
| 1116 | { | |
| 1117 | count = 1; | |
| 1118 | uc = INVALID_CHAR; | |
| 1119 | } | |
| 1120 | ||
| 1121 | // append to the buffer | |
| 1122 | post(uc); | |
| 1123 | text += count; | |
| 1124 | length -= count; | |
| 1125 | } | |
| 1091 | 1126 | } |
| 1092 | 1127 | |
| 1093 | 1128 | |
| 1094 | /*------------------------------------------------- | |
| 1095 | input_field_select_previous_setting - select | |
| 1096 | the previous item for a DIP switch or | |
| 1097 | configuration field | |
| 1098 | -------------------------------------------------*/ | |
| 1129 | //------------------------------------------------- | |
| 1130 | // post_coded - post a coded string | |
| 1131 | //------------------------------------------------- | |
| 1099 | 1132 | |
| 1100 | void | |
| 1133 | void | |
| 1101 | 1134 | { |
| 1102 | const input_setting_config *setting, *prevsetting; | |
| 1103 | int found_match = FALSE; | |
| 1135 | static const struct | |
| 1136 | { | |
| 1137 | const char *key; | |
| 1138 | unicode_char code; | |
| 1139 | } codes[] = | |
| 1140 | { | |
| 1141 | { "BACKSPACE", 8 }, | |
| 1142 | { "BS", 8 }, | |
| 1143 | { "BKSP", 8 }, | |
| 1144 | { "DEL", UCHAR_MAMEKEY(DEL) }, | |
| 1145 | { "DELETE", UCHAR_MAMEKEY(DEL) }, | |
| 1146 | { "END", UCHAR_MAMEKEY(END) }, | |
| 1147 | { "ENTER", 13 }, | |
| 1148 | { "ESC", '\033' }, | |
| 1149 | { "HOME", UCHAR_MAMEKEY(HOME) }, | |
| 1150 | { "INS", UCHAR_MAMEKEY(INSERT) }, | |
| 1151 | { "INSERT", UCHAR_MAMEKEY(INSERT) }, | |
| 1152 | { "PGDN", UCHAR_MAMEKEY(PGDN) }, | |
| 1153 | { "PGUP", UCHAR_MAMEKEY(PGUP) }, | |
| 1154 | { "SPACE", 32 }, | |
| 1155 | { "TAB", 9 }, | |
| 1156 | { "F1", UCHAR_MAMEKEY(F1) }, | |
| 1157 | { "F2", UCHAR_MAMEKEY(F2) }, | |
| 1158 | { "F3", UCHAR_MAMEKEY(F3) }, | |
| 1159 | { "F4", UCHAR_MAMEKEY(F4) }, | |
| 1160 | { "F5", UCHAR_MAMEKEY(F5) }, | |
| 1161 | { "F6", UCHAR_MAMEKEY(F6) }, | |
| 1162 | { "F7", UCHAR_MAMEKEY(F7) }, | |
| 1163 | { "F8", UCHAR_MAMEKEY(F8) }, | |
| 1164 | { "F9", UCHAR_MAMEKEY(F9) }, | |
| 1165 | { "F10", UCHAR_MAMEKEY(F10) }, | |
| 1166 | { "F11", UCHAR_MAMEKEY(F11) }, | |
| 1167 | { "F12", UCHAR_MAMEKEY(F12) }, | |
| 1168 | { "QUOTE", '\"' } | |
| 1169 | }; | |
| 1104 | 1170 | |
| 1105 | /* only makes sense if we have settings */ | |
| 1106 | assert(field->settinglist().count() != 0); | |
| 1171 | // set the fixed rate | |
| 1172 | m_current_rate = rate; | |
| 1173 | ||
| 1174 | // 0-length means strlen | |
| 1175 | if (length == 0) | |
| 1176 | length = strlen(text); | |
| 1107 | 1177 | |
| 1108 | /* scan the list of settings looking for a match on the current value */ | |
| 1109 | prevsetting = NULL; | |
| 1110 | for (setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1111 | if (input_condition_true(field->machine(), &setting->condition, field->port().owner())) | |
| 1112 | { | |
| 1113 | if (setting->value == field->state->value) | |
| 1178 | // iterate through the source string | |
| 1179 | size_t curpos = 0; | |
| 1180 | while (curpos < length) | |
| 1181 | { | |
| 1182 | // extract next character | |
| 1183 | unicode_char ch = text[curpos]; | |
| 1184 | size_t increment = 1; | |
| 1185 | ||
| 1186 | // look for escape characters | |
| 1187 | if (ch == '{') | |
| 1188 | for (int codenum = 0; codenum < ARRAY_LENGTH(codes); codenum++) | |
| 1114 | 1189 | { |
| 1115 | found_match = TRUE; | |
| 1116 | if (prevsetting != NULL) | |
| 1117 | break; | |
| 1190 | size_t keylen = strlen(codes[codenum].key); | |
| 1191 | if (curpos + keylen + 2 <= length) | |
| 1192 | if (core_strnicmp(codes[codenum].key, &text[curpos + 1], keylen) == 0 && text[curpos + keylen + 1] == '}') | |
| 1193 | { | |
| 1194 | ch = codes[codenum].code; | |
| 1195 | increment = keylen + 2; | |
| 1196 | } | |
| 1118 | 1197 | } |
| 1119 | prevsetting = setting; | |
| 1120 | } | |
| 1121 | 1198 | |
| 1122 | /* if we didn't find a matching value, select the first */ | |
| 1123 | if (!found_match) | |
| 1124 | { | |
| 1125 | for (prevsetting = field->settinglist().first(); prevsetting != NULL; prevsetting = prevsetting->next()) | |
| 1126 | if (input_condition_true(field->machine(), &prevsetting->condition, field->port().owner())) | |
| 1127 | break; | |
| 1199 | // if we got a code, post it | |
| 1200 | if (ch != 0) | |
| 1201 | post(ch); | |
| 1202 | curpos += increment; | |
| 1128 | 1203 | } |
| 1129 | ||
| 1130 | /* update the value to the previous one */ | |
| 1131 | if (prevsetting != NULL) | |
| 1132 | field->state->value = prevsetting->value; | |
| 1133 | 1204 | } |
| 1134 | 1205 | |
| 1135 | 1206 | |
| 1136 | /*------------------------------------------------- | |
| 1137 | input_field_has_next_setting - return TRUE | |
| 1138 | if the given field has a "next" setting | |
| 1139 | -------------------------------------------------*/ | |
| 1207 | //------------------------------------------------- | |
| 1208 | // build_codes - given an input port table, create | |
| 1209 | // an input code table useful for mapping unicode | |
| 1210 | // chars | |
| 1211 | //------------------------------------------------- | |
| 1140 | 1212 | |
| 1141 | i | |
| 1213 | void | |
| 1142 | 1214 | { |
| 1143 | const input_setting_config *setting; | |
| 1144 | int found = FALSE; | |
| 1215 | // iterate over shift keys | |
| 1216 | ioport_field *shift[UCHAR_SHIFT_END + 1 - UCHAR_SHIFT_BEGIN] = { 0 }; | |
| 1217 | for (int curshift = 0; curshift <= ARRAY_LENGTH(shift); curshift++) | |
| 1218 | if (curshift == 0 || shift[curshift - 1] != NULL) | |
| 1145 | 1219 | |
| 1146 | /* only makes sense if we have settings */ | |
| 1147 | assert(field->settinglist().count() != 0); | |
| 1220 | // iterate over ports and fields | |
| 1221 | for (ioport_port *port = manager.first_port(); port != NULL; port = port->next()) | |
| 1222 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 1223 | if (field->type() == IPT_KEYBOARD) | |
| 1224 | { | |
| 1225 | // fetch the code, ignoring 0 | |
| 1226 | unicode_char code = field->keyboard_code(curshift); | |
| 1227 | if (code == 0) | |
| 1228 | continue; | |
| 1148 | 1229 | |
| 1149 | /* scan the list of settings looking for a match on the current value */ | |
| 1150 | for (setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1151 | if (input_condition_true(field->machine(), &setting->condition, field->port().owner())) | |
| 1152 | { | |
| 1153 | if (found) | |
| 1154 | return TRUE; | |
| 1155 | if (setting->value == field->state->value) | |
| 1156 | found = TRUE; | |
| 1157 | } | |
| 1230 | // is this a shifter key? | |
| 1231 | if (code >= UCHAR_SHIFT_BEGIN && code <= UCHAR_SHIFT_END) | |
| 1232 | shift[code - UCHAR_SHIFT_BEGIN] = field; | |
| 1158 | 1233 | |
| 1159 | return FALSE; | |
| 1234 | // not a shifter key; record normally | |
| 1235 | else | |
| 1236 | { | |
| 1237 | keycode_map_entry newcode; | |
| 1238 | if (curshift == 0) | |
| 1239 | newcode.field[0] = field; | |
| 1240 | else | |
| 1241 | { | |
| 1242 | newcode.field[0] = shift[curshift - 1]; | |
| 1243 | newcode.field[1] = field; | |
| 1244 | } | |
| 1245 | newcode.ch = code; | |
| 1246 | m_keycode_map.append(newcode); | |
| 1247 | ||
| 1248 | if (LOG_NATURAL_KEYBOARD) | |
| 1249 | { | |
| 1250 | astring tempstr; | |
| 1251 | logerror("natural_keyboard: code=%i (%s) port=%p field->name='%s'\n", int(code), unicode_to_string(tempstr, code), port, field->name()); | |
| 1252 | } | |
| 1253 | } | |
| 1254 | } | |
| 1160 | 1255 | } |
| 1161 | 1256 | |
| 1162 | 1257 | |
| 1163 | /*------------------------------------------------- | |
| 1164 | input_field_select_next_setting - select the | |
| 1165 | next item for a DIP switch or | |
| 1166 | configuration field | |
| 1167 | -------------------------------------------------*/ | |
| 1258 | //------------------------------------------------- | |
| 1259 | // can_post_directly - determine if the given | |
| 1260 | // unicode character can be directly posted | |
| 1261 | //------------------------------------------------- | |
| 1168 | 1262 | |
| 1169 | ||
| 1263 | bool | |
| 1170 | 1264 | { |
| 1171 | const input_setting_config *setting, *nextsetting; | |
| 1265 | // if we have a queueing callback, then it depends on whether we can accept the character | |
| 1266 | if (!m_queue_chars.isnull()) | |
| 1267 | return m_accept_char.isnull() ? true : m_accept_char(ch); | |
| 1172 | 1268 | |
| 1173 | /* only makes sense if we have settings */ | |
| 1174 | assert(field->settinglist().count() != 0); | |
| 1175 | ||
| 1176 | /* scan the list of settings looking for a match on the current value */ | |
| 1177 | nextsetting = NULL; | |
| 1178 | for (setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1179 | if (input_condition_true(field->machine(), &setting->condition, field->port().owner())) | |
| 1180 | if (setting->value == field->state->value) | |
| 1181 | break; | |
| 1182 | ||
| 1183 | /* if we found one, scan forward for the next valid one */ | |
| 1184 | if (setting != NULL) | |
| 1185 | for (nextsetting = setting->next(); nextsetting != NULL; nextsetting = nextsetting->next()) | |
| 1186 | if (input_condition_true(field->machine(), &nextsetting->condition, field->port().owner())) | |
| 1187 | break; | |
| 1188 | ||
| 1189 | /* if we hit the end, search from the beginning */ | |
| 1190 | if (nextsetting == NULL) | |
| 1191 | for (nextsetting = field->settinglist().first(); nextsetting != NULL; nextsetting = nextsetting->next()) | |
| 1192 | if (input_condition_true(field->machine(), &nextsetting->condition, field->port().owner())) | |
| 1193 | break; | |
| 1194 | ||
| 1195 | /* update the value to the previous one */ | |
| 1196 | if (nextsetting != NULL) | |
| 1197 | field->state->value = nextsetting->value; | |
| 1269 | // otherwise, it depends on the input codes | |
| 1270 | const keycode_map_entry *code = find_code(ch); | |
| 1271 | return (code != NULL && code->field[0] != NULL); | |
| 1198 | 1272 | } |
| 1199 | 1273 | |
| 1200 | 1274 | |
| 1275 | //------------------------------------------------- | |
| 1276 | // can_post_alternate - determine if the given | |
| 1277 | // unicode character can be posted via translation | |
| 1278 | //------------------------------------------------- | |
| 1201 | 1279 | |
| 1202 | /*************************************************************************** | |
| 1203 | ACCESSORS FOR INPUT TYPES | |
| 1204 | ***************************************************************************/ | |
| 1205 | ||
| 1206 | /*------------------------------------------------- | |
| 1207 | input_type_is_analog - return TRUE if | |
| 1208 | the given type represents an analog control | |
| 1209 | -------------------------------------------------*/ | |
| 1210 | ||
| 1211 | int input_type_is_analog(int type) | |
| 1280 | bool natural_keyboard::can_post_alternate(unicode_char ch) | |
| 1212 | 1281 | { |
| 1213 | return (type >= __ipt_analog_start && type <= __ipt_analog_end); | |
| 1282 | const char_info *info = char_info::find(ch); | |
| 1283 | if (info == NULL) | |
| 1284 | return false; | |
| 1285 | ||
| 1286 | const char *altstring = info->alternate; | |
| 1287 | if (altstring == NULL) | |
| 1288 | return false; | |
| 1289 | ||
| 1290 | while (*altstring != 0) | |
| 1291 | { | |
| 1292 | unicode_char uchar; | |
| 1293 | int count = uchar_from_utf8(&uchar, altstring, strlen(altstring)); | |
| 1294 | if (count <= 0) | |
| 1295 | return false; | |
| 1296 | if (!can_post_directly(uchar)) | |
| 1297 | return false; | |
| 1298 | altstring += count; | |
| 1299 | } | |
| 1300 | return true; | |
| 1214 | 1301 | } |
| 1215 | 1302 | |
| 1216 | 1303 | |
| 1217 | /*------------------------------------------------- | |
| 1218 | input_type_name - return the name | |
| 1219 | for the given type/player | |
| 1220 | -------------------------------------------------*/ | |
| 1304 | //------------------------------------------------- | |
| 1305 | // choose_delay - determine the delay between | |
| 1306 | // posting keyboard events | |
| 1307 | //------------------------------------------------- | |
| 1221 | 1308 | |
| 1222 | ||
| 1309 | atto | |
| 1223 | 1310 | { |
| 1224 | /* if we have a machine, use the live state and quick lookup */ | |
| 1225 | ioport_manager &portdata = machine.ioport(); | |
| 1226 | input_type_entry *entry = portdata.type_to_entry[type][player]; | |
| 1227 | if (entry != NULL) | |
| 1228 | return entry->name; | |
| 1311 | // if we have a live rate, just use that | |
| 1312 | if (m_current_rate != attotime::zero) | |
| 1313 | return m_current_rate; | |
| 1229 | 1314 | |
| 1230 | /* if we find nothing, return an invalid group */ | |
| 1231 | return "???"; | |
| 1315 | // systems with queue_chars can afford a much smaller delay | |
| 1316 | if (!m_queue_chars.isnull()) | |
| 1317 | return attotime::from_msec(10); | |
| 1318 | ||
| 1319 | // otherwise, default to constant delay with a longer delay on CR | |
| 1320 | return attotime::from_msec((ch == '\r') ? 200 : 50); | |
| 1232 | 1321 | } |
| 1233 | 1322 | |
| 1234 | 1323 | |
| 1235 | /*------------------------------------------------- | |
| 1236 | input_type_group - return the group | |
| 1237 | for the given type/player | |
| 1238 | -------------------------------------------------*/ | |
| 1324 | //------------------------------------------------- | |
| 1325 | // internal_post - post a keyboard event | |
| 1326 | //------------------------------------------------- | |
| 1239 | 1327 | |
| 1240 | i | |
| 1328 | void | |
| 1241 | 1329 | { |
| 1242 | ioport_manager &portdata = machine.ioport(); | |
| 1243 | input_type_entry *entry = portdata.type_to_entry[type][player]; | |
| 1244 | if (entry != NULL) | |
| 1245 | return entry->group; | |
| 1330 | // need to start up the timer? | |
| 1331 | if (empty()) | |
| 1332 | { | |
| 1333 | m_timer->adjust(choose_delay(ch)); | |
| 1334 | m_status_keydown = 0; | |
| 1335 | } | |
| 1246 | 1336 | |
| 1247 | /* if we find nothing, return an invalid group */ | |
| 1248 | return IPG_INVALID; | |
| 1337 | // add to the buffer, resizing if necessary | |
| 1338 | m_buffer[m_bufend++] = ch; | |
| 1339 | if ((m_bufend + 1) % m_buffer.count() == m_bufbegin) | |
| 1340 | m_buffer.resize(m_buffer.count() + KEY_BUFFER_SIZE, true); | |
| 1341 | m_bufend %= m_buffer.count(); | |
| 1249 | 1342 | } |
| 1250 | 1343 | |
| 1251 | 1344 | |
| 1252 | /*------------------------------------------------- | |
| 1253 | input_type_seq - return the input | |
| 1254 | sequence for the given type/player | |
| 1255 | -------------------------------------------------*/ | |
| 1345 | //------------------------------------------------- | |
| 1346 | // timer - timer callback to keep things flowing | |
| 1347 | // when posting a string of characters | |
| 1348 | //------------------------------------------------- | |
| 1256 | 1349 | |
| 1257 | ||
| 1350 | vo | |
| 1258 | 1351 | { |
| 1259 | assert(type >= 0 && type < __ipt_max); | |
| 1260 | assert(player >= 0 && player < MAX_PLAYERS); | |
| 1352 | // the driver has a queue_chars handler | |
| 1353 | if (!m_queue_chars.isnull()) | |
| 1354 | { | |
| 1355 | while (!empty() && m_queue_chars(&m_buffer[m_bufbegin], 1)) | |
| 1356 | { | |
| 1357 | m_bufbegin = (m_bufbegin + 1) % m_buffer.count(); | |
| 1358 | if (m_current_rate != attotime::zero) | |
| 1359 | break; | |
| 1360 | } | |
| 1361 | } | |
| 1261 | 1362 | |
| 1262 | /* if we have a machine, use the live state and quick lookup */ | |
| 1263 | ioport_manager &portdata = machine.ioport(); | |
| 1264 | input_type_entry *entry = portdata.type_to_entry[type][player]; | |
| 1265 | if (entry != NULL) | |
| 1266 | return entry->seq[seqtype]; | |
| 1363 | // the driver does not have a queue_chars handler | |
| 1364 | else | |
| 1365 | { | |
| 1366 | if (m_status_keydown) | |
| 1367 | m_bufbegin = (m_bufbegin + 1) % m_buffer.count(); | |
| 1368 | m_status_keydown = !m_status_keydown; | |
| 1369 | } | |
| 1267 | 1370 | |
| 1268 | /* if we find nothing, return an empty sequence */ | |
| 1269 | return input_seq::empty_seq; | |
| 1371 | // need to make sure timerproc is called again if buffer not empty | |
| 1372 | if (!empty()) | |
| 1373 | m_timer->adjust(choose_delay(m_buffer[m_bufbegin])); | |
| 1270 | 1374 | } |
| 1271 | 1375 | |
| 1272 | 1376 | |
| 1273 | /*------------------------------------------------- | |
| 1274 | input_type_set_seq - change the input | |
| 1275 | sequence for the given type/player | |
| 1276 | -------------------------------------------------*/ | |
| 1377 | //------------------------------------------------- | |
| 1378 | // unicode_to_string - obtain a string | |
| 1379 | // representation of a given code; used for | |
| 1380 | // logging and debugging | |
| 1381 | //------------------------------------------------- | |
| 1277 | 1382 | |
| 1278 | ||
| 1383 | co | |
| 1279 | 1384 | { |
| 1280 | ioport_manager &portdata = machine.ioport(); | |
| 1281 | input_type_entry *entry = portdata.type_to_entry[type][player]; | |
| 1282 | if (entry != NULL) | |
| 1283 | entry->seq[seqtype] = *newseq; | |
| 1284 | } | |
| 1385 | buffer.reset(); | |
| 1386 | switch (ch) | |
| 1387 | { | |
| 1388 | // check some magic values | |
| 1389 | case '\0': buffer.cpy("\\0"); break; | |
| 1390 | case '\r': buffer.cpy("\\r"); break; | |
| 1391 | case '\n': buffer.cpy("\\n"); break; | |
| 1392 | case '\t': buffer.cpy("\\t"); break; | |
| 1285 | 1393 | |
| 1394 | default: | |
| 1395 | // seven bit ASCII is easy | |
| 1396 | if (ch >= 32 && ch < 128) | |
| 1397 | { | |
| 1398 | char temp[2] = { char(ch), 0 }; | |
| 1399 | buffer.cpy(temp); | |
| 1400 | } | |
| 1401 | else if (ch >= UCHAR_MAMEKEY_BEGIN) | |
| 1402 | { | |
| 1403 | // try to obtain a codename with code_name(); this can result in an empty string | |
| 1404 | input_code code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, input_item_id(ch - UCHAR_MAMEKEY_BEGIN)); | |
| 1405 | machine().input().code_name(buffer, code); | |
| 1406 | } | |
| 1286 | 1407 | |
| 1287 | /*------------------------------------------------- | |
| 1288 | input_type_pressed - return TRUE if | |
| 1289 | the sequence for the given input type/player | |
| 1290 | is pressed | |
| 1291 | -------------------------------------------------*/ | |
| 1292 | ||
| 1293 | int input_type_pressed(running_machine &machine, int type, int player) | |
| 1294 | { | |
| 1295 | return machine.input().seq_pressed(input_type_seq(machine, type, player, SEQ_TYPE_STANDARD)); | |
| 1408 | // did we fail to resolve? if so, we have a last resort | |
| 1409 | if (buffer.len() == 0) | |
| 1410 | buffer.format("U+%04X", unsigned(ch)); | |
| 1411 | break; | |
| 1412 | } | |
| 1413 | return buffer; | |
| 1296 | 1414 | } |
| 1297 | 1415 | |
| 1298 | 1416 | |
| 1299 | /*------------------------------------------------- | |
| 1300 | input_type_list - return the list of types | |
| 1301 | -------------------------------------------------*/ | |
| 1417 | //------------------------------------------------- | |
| 1418 | // find_code - find a code in our lookup table | |
| 1419 | //------------------------------------------------- | |
| 1302 | 1420 | |
| 1303 | const | |
| 1421 | const | |
| 1304 | 1422 | { |
| 1305 | ioport_manager &portdata = machine.ioport(); | |
| 1306 | return portdata.typelist; | |
| 1423 | for (int code = 0; m_keycode_map[code].ch != 0; code++) | |
| 1424 | if (m_keycode_map[code].ch == ch) | |
| 1425 | return &m_keycode_map[code]; | |
| 1426 | return NULL; | |
| 1307 | 1427 | } |
| 1308 | 1428 | |
| 1309 | 1429 | |
| 1430 | //------------------------------------------------- | |
| 1431 | // frame_update - once per frame update of the | |
| 1432 | // natural keyboard state | |
| 1433 | //------------------------------------------------- | |
| 1310 | 1434 | |
| 1311 | /*************************************************************************** | |
| 1312 | PORT CHECKING | |
| 1313 | ***************************************************************************/ | |
| 1314 | ||
| 1315 | ||
| 1316 | /*------------------------------------------------- | |
| 1317 | input_port_exists - return whether an input | |
| 1318 | port exists | |
| 1319 | -------------------------------------------------*/ | |
| 1320 | ||
| 1321 | bool input_port_exists(running_machine &machine, const char *tag) | |
| 1435 | void natural_keyboard::frame_update(ioport_port &port, ioport_value &digital) | |
| 1322 | 1436 | { |
| 1323 | return machine.root_device().ioport(tag) != 0; | |
| 1437 | // is there currently a key down? | |
| 1438 | if (m_status_keydown && !empty()) | |
| 1439 | { | |
| 1440 | // loop through this character's component codes | |
| 1441 | const keycode_map_entry *code = find_code(m_buffer[m_bufbegin]); | |
| 1442 | if (code != NULL) | |
| 1443 | for (int fieldnum = 0; fieldnum < ARRAY_LENGTH(code->field) && code->field[fieldnum] != NULL; fieldnum++) | |
| 1444 | if (&code->field[fieldnum]->port() == &port) | |
| 1445 | digital |= code->field[fieldnum]->mask(); | |
| 1446 | } | |
| 1324 | 1447 | } |
| 1325 | 1448 | |
| 1326 | 1449 | |
| 1327 | /*------------------------------------------------- | |
| 1328 | input_port_active - return a bitmask of which | |
| 1329 | bits of an input port are active (i.e. not | |
| 1330 | unused or unknown) | |
| 1331 | -------------------------------------------------*/ | |
| 1450 | //------------------------------------------------- | |
| 1451 | // key_name - returns the name of a specific key | |
| 1452 | //------------------------------------------------- | |
| 1332 | 1453 | |
| 1333 | ||
| 1454 | cons | |
| 1334 | 1455 | { |
| 1335 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1336 | if (port == NULL) | |
| 1337 | fatalerror("Unable to locate input port '%s'", tag); | |
| 1338 | return port->active; | |
| 1339 | } | |
| 1456 | // attempt to get the string from the character info table | |
| 1457 | const char_info *ci = char_info::find(ch); | |
| 1458 | const char *result = (ci != NULL) ? ci->name : NULL; | |
| 1459 | if (result != NULL) | |
| 1460 | string.cpy(result); | |
| 1340 | 1461 | |
| 1462 | // if that doesn't work, convert to UTF-8 | |
| 1463 | else if (ch > 0x7F || isprint(ch)) | |
| 1464 | { | |
| 1465 | char buf[10]; | |
| 1466 | int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch); | |
| 1467 | buf[count] = 0; | |
| 1468 | string.cpy(buf); | |
| 1469 | } | |
| 1341 | 1470 | |
| 1342 | /*------------------------------------------------- | |
| 1343 | input_port_active_safe - return a bitmask of | |
| 1344 | which bits of an input port are active (i.e. | |
| 1345 | not unused or unknown), or a default value if | |
| 1346 | the port does not exist | |
| 1347 | -------------------------------------------------*/ | |
| 1348 | ||
| 1349 | input_port_value input_port_active_safe(running_machine &machine, const char *tag, input_port_value defvalue) | |
| 1350 | { | |
| 1351 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1352 | return port == NULL ? defvalue : port->active; | |
| 1471 | // otherwise, opt for question marks | |
| 1472 | else | |
| 1473 | string.cpy("???"); | |
| 1474 | return string; | |
| 1353 | 1475 | } |
| 1354 | 1476 | |
| 1355 | 1477 | |
| 1478 | //------------------------------------------------- | |
| 1479 | // execute_input - debugger command to enter | |
| 1480 | // natural keyboard input | |
| 1481 | //------------------------------------------------- | |
| 1356 | 1482 | |
| 1357 | /*************************************************************************** | |
| 1358 | PORT READING | |
| 1359 | ***************************************************************************/ | |
| 1360 | ||
| 1361 | /*------------------------------------------------- | |
| 1362 | input_port_read_direct - return the value of | |
| 1363 | an input port | |
| 1364 | -------------------------------------------------*/ | |
| 1365 | ||
| 1366 | input_port_value input_port_read_direct(const input_port_config *port) | |
| 1483 | void natural_keyboard::execute_input(running_machine &machine, int ref, int params, const char *param[]) | |
| 1367 | 1484 | { |
| 1368 | assert(port != NULL); | |
| 1485 | machine.ioport().natkeyboard().post_coded(param[0]); | |
| 1486 | } | |
| 1369 | 1487 | |
| 1370 | ioport_manager &portdata = port->machine().ioport(); | |
| 1371 | analog_field_state *analog; | |
| 1372 | device_field_info *device_field; | |
| 1373 | input_port_value result; | |
| 1374 | 1488 | |
| 1375 | assert_always(portdata.safe_to_read, "Input ports cannot be read at init time!"); | |
| 1489 | //------------------------------------------------- | |
| 1490 | // execute_dumpkbd - debugger command to natural | |
| 1491 | // keyboard codes | |
| 1492 | //------------------------------------------------- | |
| 1376 | 1493 | |
| 1377 | /* start with the digital */ | |
| 1378 | result = port->state->digital; | |
| 1379 | ||
| 1380 | /* update read values */ | |
| 1381 | for (device_field = port->state->readdevicelist; device_field != NULL; device_field = device_field->next) | |
| 1382 | if (input_condition_true(port->machine(), &device_field->field->condition, port->owner())) | |
| 1494 | void natural_keyboard::execute_dumpkbd(running_machine &machine, int ref, int params, const char *param[]) | |
| 1495 | { | |
| 1496 | // was there a file specified? | |
| 1497 | const char *filename = (params > 0) ? param[0] : NULL; | |
| 1498 | FILE *file = NULL; | |
| 1499 | if (filename != NULL) | |
| 1500 | { | |
| 1501 | // if so, open it | |
| 1502 | file = fopen(filename, "w"); | |
| 1503 | if (file == NULL) | |
| 1383 | 1504 | { |
| 1384 | /* replace the bits with bits from the device */ | |
| 1385 | input_port_value newval = device_field->field->read(*device_field->field, device_field->field->read_param); | |
| 1386 | device_field->oldval = newval; | |
| 1387 | result = (result & ~device_field->field->mask) | ((newval << device_field->shift) & device_field->field->mask); | |
| 1505 | debug_console_printf(machine, "Cannot open \"%s\"\n", filename); | |
| 1506 | return; | |
| 1388 | 1507 | } |
| 1508 | } | |
| 1389 | 1509 | |
| 1390 | /* update VBLANK bits */ | |
| 1391 | if (port->state->vblank != 0) | |
| 1510 | // loop through all codes | |
| 1511 | natural_keyboard &natkeyboard = machine.ioport().natkeyboard(); | |
| 1512 | dynamic_array<keycode_map_entry> &keycode_map = natkeyboard.m_keycode_map; | |
| 1513 | astring buffer, tempstr; | |
| 1514 | const size_t left_column_width = 24; | |
| 1515 | for (int index = 0; index < keycode_map.count(); index++) | |
| 1392 | 1516 | { |
| 1393 | if (port->machine().primary_screen->vblank()) | |
| 1394 | result |= port->state->vblank; | |
| 1517 | // describe the character code | |
| 1518 | const keycode_map_entry &code = keycode_map[index]; | |
| 1519 | buffer.printf("%08X (%s) ", code.ch, natkeyboard.unicode_to_string(tempstr, code.ch)); | |
| 1520 | ||
| 1521 | // pad with spaces | |
| 1522 | while (buffer.len() < left_column_width) | |
| 1523 | buffer.cat(' '); | |
| 1524 | ||
| 1525 | // identify the keys used | |
| 1526 | for (int field = 0; field < ARRAY_LENGTH(code.field) && code.field[field] != 0; field++) | |
| 1527 | buffer.catprintf("%s'%s'", (field > 0) ? ", " : "", code.field[field]->name()); | |
| 1528 | ||
| 1529 | // and output it as appropriate | |
| 1530 | if (file != NULL) | |
| 1531 | fprintf(file, "%s\n", buffer.cstr()); | |
| 1395 | 1532 | else |
| 1396 | | |
| 1533 | debug_console_ | |
| 1397 | 1534 | } |
| 1398 | 1535 | |
| 1399 | /* apply active high/low state to digital, read, and VBLANK inputs */ | |
| 1400 | result ^= port->state->defvalue; | |
| 1536 | // cleanup | |
| 1537 | if (file != NULL) | |
| 1538 | fclose(file); | |
| 1539 | } | |
| 1401 | 1540 | |
| 1402 | /* merge in analog portions */ | |
| 1403 | for (analog = port->state->analoglist; analog != NULL; analog = analog->next) | |
| 1404 | if (input_condition_true(port->machine(), &analog->field->condition, port->owner())) | |
| 1405 | { | |
| 1406 | /* start with the raw value */ | |
| 1407 | INT32 value = analog->accum; | |
| 1408 | 1541 | |
| 1409 | /* interpolate if appropriate and if time has passed since the last update */ | |
| 1410 | if (analog->interpolate && !(analog->field->flags & ANALOG_FLAG_RESET) && portdata.last_delta_nsec != 0) | |
| 1411 | { | |
| 1412 | attoseconds_t nsec_since_last = (port->machine().time() - portdata.last_frame_time).as_attoseconds() / ATTOSECONDS_PER_NANOSECOND; | |
| 1413 | value = analog->previous + ((INT64)(analog->accum - analog->previous) * nsec_since_last / portdata.last_delta_nsec); | |
| 1414 | } | |
| 1415 | 1542 | |
| 1416 | /* apply standard analog settings */ | |
| 1417 | value = apply_analog_settings(value, analog); | |
| 1543 | //************************************************************************** | |
| 1544 | // I/O PORT CONDITION | |
| 1545 | //************************************************************************** | |
| 1418 | 1546 | |
| 1419 | /* remap the value if needed */ | |
| 1420 | if (analog->field->remap_table != NULL) | |
| 1421 | value = analog->field->remap_table[value]; | |
| 1547 | //------------------------------------------------- | |
| 1548 | // eval - evaluate condition | |
| 1549 | //------------------------------------------------- | |
| 1422 | 1550 | |
| 1423 | /* invert bits if needed */ | |
| 1424 | if (analog->field->flags & ANALOG_FLAG_INVERT) | |
| 1425 | value = ~value; | |
| 1551 | bool ioport_condition::eval(device_t &device) const | |
| 1552 | { | |
| 1553 | // always condition is always true | |
| 1554 | if (m_condition == ALWAYS) | |
| 1555 | return true; | |
| 1426 | 1556 | |
| 1427 | /* insert into the port */ | |
| 1428 | result = (result & ~analog->field->mask) | ((value << analog->shift) & analog->field->mask); | |
| 1429 | } | |
| 1430 | ||
| 1431 | return result; | |
| 1557 | // otherwise, read the referenced port and switch off the condition type | |
| 1558 | ioport_value condvalue = device.ioport(m_tag)->read(); | |
| 1559 | switch (m_condition) | |
| 1560 | { | |
| 1561 | case ALWAYS: return true; | |
| 1562 | case EQUALS: return ((condvalue & m_mask) == m_value); | |
| 1563 | case NOTEQUALS: return ((condvalue & m_mask) != m_value); | |
| 1564 | case GREATERTHAN: return ((condvalue & m_mask) > m_value); | |
| 1565 | case NOTGREATERTHAN: return ((condvalue & m_mask) <= m_value); | |
| 1566 | case LESSTHAN: return ((condvalue & m_mask) < m_value); | |
| 1567 | case NOTLESSTHAN: return ((condvalue & m_mask) >= m_value); | |
| 1568 | } | |
| 1569 | return true; | |
| 1432 | 1570 | } |
| 1433 | 1571 | |
| 1434 | 1572 | |
| 1435 | /*------------------------------------------------- | |
| 1436 | input_port_read - return the value of | |
| 1437 | an input port specified by tag | |
| 1438 | -------------------------------------------------*/ | |
| 1439 | 1573 | |
| 1440 | input_port_value input_port_read(running_machine &machine, const char *tag) | |
| 1441 | { | |
| 1442 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1443 | if (port == NULL) | |
| 1444 | fatalerror("Unable to locate input port '%s'", tag); | |
| 1445 | return input_port_read_direct(port); | |
| 1446 | } | |
| 1574 | //************************************************************************** | |
| 1575 | // I/O PORT SETTING | |
| 1576 | //************************************************************************** | |
| 1447 | 1577 | |
| 1578 | //------------------------------------------------- | |
| 1579 | // ioport_setting - constructor | |
| 1580 | //------------------------------------------------- | |
| 1448 | 1581 | |
| 1449 | /*------------------------------------------------- | |
| 1450 | input_port_read - return the value of | |
| 1451 | a device input port specified by tag | |
| 1452 | -------------------------------------------------*/ | |
| 1453 | ||
| 1454 | input_port_value input_port_read(device_t &device, const char *tag) | |
| 1582 | ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const char *_name) | |
| 1583 | : m_next(NULL), | |
| 1584 | m_field(field), | |
| 1585 | m_value(_value), | |
| 1586 | m_name(_name) | |
| 1455 | 1587 | { |
| 1456 | const input_port_config *port = device.ioport(tag); | |
| 1457 | if (port == NULL) | |
| 1458 | fatalerror("Unable to locate input port '%s'", tag); | |
| 1459 | return input_port_read_direct(port); | |
| 1460 | 1588 | } |
| 1461 | 1589 | |
| 1462 | 1590 | |
| 1463 | /*------------------------------------------------- | |
| 1464 | input_port_read_safe - return the value of | |
| 1465 | an input port specified by tag, or a default | |
| 1466 | value if the port does not exist | |
| 1467 | -------------------------------------------------*/ | |
| 1468 | 1591 | |
| 1469 | input_port_value input_port_read_safe(running_machine &machine, const char *tag, UINT32 defvalue) | |
| 1470 | { | |
| 1471 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1472 | return (port == NULL) ? defvalue : input_port_read_direct(port); | |
| 1473 | } | |
| 1592 | //************************************************************************** | |
| 1593 | // I/O PORT DIP LOCATION | |
| 1594 | //************************************************************************** | |
| 1474 | 1595 | |
| 1596 | //------------------------------------------------- | |
| 1597 | // ioport_diplocation - constructor | |
| 1598 | //------------------------------------------------- | |
| 1475 | 1599 | |
| 1476 | /*------------------------------------------------- | |
| 1477 | input_port_read_crosshair - return the | |
| 1478 | extracted crosshair values for the given | |
| 1479 | player | |
| 1480 | -------------------------------------------------*/ | |
| 1481 | ||
| 1482 | int input_port_get_crosshair_position(running_machine &machine, int player, float *x, float *y) | |
| 1600 | ioport_diplocation::ioport_diplocation(const char *name, UINT8 swnum, bool invert) | |
| 1601 | : m_next(NULL), | |
| 1602 | m_name(name), | |
| 1603 | m_number(swnum), | |
| 1604 | m_invert(invert) | |
| 1483 | 1605 | { |
| 1484 | const input_port_config *port; | |
| 1485 | const input_field_config *field; | |
| 1486 | int gotx = FALSE, goty = FALSE; | |
| 1606 | } | |
| 1487 | 1607 | |
| 1488 | /* read all the lightgun values */ | |
| 1489 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 1490 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1491 | if (field->player == player && field->crossaxis != CROSSHAIR_AXIS_NONE) | |
| 1492 | if (input_condition_true(machine, &field->condition, port->owner())) | |
| 1493 | { | |
| 1494 | analog_field_state *analog = field->state->analog; | |
| 1495 | INT32 rawvalue = apply_analog_settings(analog->accum, analog) & (analog->field->mask >> analog->shift); | |
| 1496 | float value = (float)(rawvalue - field->state->analog->adjmin) / (float)(field->state->analog->adjmax - field->state->analog->adjmin); | |
| 1497 | 1608 | |
| 1498 | /* apply the scale and offset */ | |
| 1499 | if (field->crossscale < 0) | |
| 1500 | value = -(1.0 - value) * field->crossscale; | |
| 1501 | else | |
| 1502 | value *= field->crossscale; | |
| 1503 | value += field->crossoffset; | |
| 1504 | 1609 | |
| 1505 | /* apply custom mapping if necessary */ | |
| 1506 | if (!field->crossmapper.isnull()) | |
| 1507 | value = field->crossmapper(*field, value); | |
| 1610 | //************************************************************************** | |
| 1611 | // I/O PORT FIELD | |
| 1612 | //************************************************************************** | |
| 1508 | 1613 | |
| 1509 | /* handle X axis */ | |
| 1510 | if (field->crossaxis == CROSSHAIR_AXIS_X) | |
| 1511 | { | |
| 1512 | *x = value; | |
| 1513 | gotx = TRUE; | |
| 1514 | if (field->crossaltaxis != 0) | |
| 1515 | { | |
| 1516 | *y = field->crossaltaxis; | |
| 1517 | goty = TRUE; | |
| 1518 | } | |
| 1519 | } | |
| 1614 | //------------------------------------------------- | |
| 1615 | // ioport_field - constructor | |
| 1616 | //------------------------------------------------- | |
| 1520 | 1617 | |
| 1521 | /* handle Y axis */ | |
| 1522 | else | |
| 1523 | { | |
| 1524 | *y = value; | |
| 1525 | goty = TRUE; | |
| 1526 | if (field->crossaltaxis != 0) | |
| 1527 | { | |
| 1528 | *x = field->crossaltaxis; | |
| 1529 | gotx = TRUE; | |
| 1530 | } | |
| 1531 | } | |
| 1532 | ||
| 1533 | /* if we got both, stop */ | |
| 1534 | if (gotx && goty) | |
| 1535 | break; | |
| 1536 | } | |
| 1537 | ||
| 1538 | return (gotx && goty); | |
| 1539 | } | |
| 1540 | ||
| 1541 | ||
| 1542 | /*------------------------------------------------- | |
| 1543 | input_port_update_defaults - force an update | |
| 1544 | to the input port values based on current | |
| 1545 | conditions | |
| 1546 | -------------------------------------------------*/ | |
| 1547 | ||
| 1548 | void input_port_update_defaults(running_machine &machine) | |
| 1618 | ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name) | |
| 1619 | : m_next(NULL), | |
| 1620 | m_port(port), | |
| 1621 | m_live(NULL), | |
| 1622 | m_modcount(port.modcount()), | |
| 1623 | m_mask(maskbits), | |
| 1624 | m_defvalue(defvalue & maskbits), | |
| 1625 | m_type(type), | |
| 1626 | m_player(0), | |
| 1627 | m_flags(0), | |
| 1628 | m_impulse(0), | |
| 1629 | m_name(name), | |
| 1630 | m_read_param(NULL), | |
| 1631 | m_write_param(NULL), | |
| 1632 | m_min(0), | |
| 1633 | m_max(maskbits), | |
| 1634 | m_sensitivity(0), | |
| 1635 | m_delta(0), | |
| 1636 | m_centerdelta(0), | |
| 1637 | m_crosshair_axis(CROSSHAIR_AXIS_NONE), | |
| 1638 | m_crosshair_scale(1.0), | |
| 1639 | m_crosshair_offset(0), | |
| 1640 | m_crosshair_altaxis(0), | |
| 1641 | m_full_turn_count(0), | |
| 1642 | m_remap_table(NULL), | |
| 1643 | m_way(0) | |
| 1549 | 1644 | { |
| 1550 | int loopnum; | |
| 1645 | // reset sequences and chars | |
| 1646 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 1647 | m_seq[seqtype].set_default(); | |
| 1648 | m_chars[0] = m_chars[1] = m_chars[2] = unicode_char(0); | |
| 1551 | 1649 | |
| 1552 | /* two passes to catch conditionals properly */ | |
| 1553 | for (loopnum = 0; loopnum < 2; loopnum++) | |
| 1650 | // for DIP switches and configs, look for a default value from the owner | |
| 1651 | if (type == IPT_DIPSWITCH || type == IPT_CONFIG) | |
| 1554 | 1652 | { |
| 1555 | const input_port_config *port; | |
| 1556 | ||
| 1557 | /* loop over all input ports */ | |
| 1558 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 1653 | const input_device_default *def = device().input_ports_defaults(); | |
| 1654 | if (def != NULL) | |
| 1559 | 1655 | { |
| 1560 | const input_field_config *field; | |
| 1561 | ||
| 1562 | /* only clear on the first pass */ | |
| 1563 | if (loopnum == 0) | |
| 1564 | port->state->defvalue = 0; | |
| 1565 | ||
| 1566 | /* first compute the default value for the entire port */ | |
| 1567 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1568 | if (input_condition_true(machine, &field->condition, port->owner())) | |
| 1569 | port->state->defvalue = (port->state->defvalue & ~field->mask) | (field->state->value & field->mask); | |
| 1656 | const char *fulltag = port.tag(); | |
| 1657 | astring fullpath; | |
| 1658 | for ( ; def->tag != NULL; def++) | |
| 1659 | if (device().subtag(fullpath, def->tag) == fulltag && def->mask == m_mask) | |
| 1660 | m_defvalue = def->defvalue & m_mask; | |
| 1570 | 1661 | } |
| 1571 | 1662 | } |
| 1572 | 1663 | } |
| 1573 | 1664 | |
| 1574 | 1665 | |
| 1575 | /*------------------------------------------------- | |
| 1576 | apply_analog_settings - return the value of | |
| 1577 | an input port | |
| 1578 | -------------------------------------------------*/ | |
| 1666 | //------------------------------------------------- | |
| 1667 | // ~ioport_field - destructor | |
| 1668 | //------------------------------------------------- | |
| 1579 | 1669 | |
| 1580 | ||
| 1670 | ||
| 1581 | 1671 | { |
| 1582 | /* apply the min/max and then the sensitivity */ | |
| 1583 | value = apply_analog_min_max(analog, value); | |
| 1584 | value = APPLY_SENSITIVITY(value, analog->sensitivity); | |
| 1585 | ||
| 1586 | /* apply reversal if needed */ | |
| 1587 | if (analog->reverse) | |
| 1588 | value = analog->reverse_val - value; | |
| 1589 | else if (analog->single_scale) | |
| 1590 | /* it's a pedal or the default value is equal to min/max */ | |
| 1591 | /* so we need to adjust the center to the minimum */ | |
| 1592 | value -= INPUT_ABSOLUTE_MIN; | |
| 1593 | ||
| 1594 | /* map differently for positive and negative values */ | |
| 1595 | if (value >= 0) | |
| 1596 | value = APPLY_SCALE(value, analog->scalepos); | |
| 1597 | else | |
| 1598 | value = APPLY_SCALE(value, analog->scaleneg); | |
| 1599 | value += analog->adjdefvalue; | |
| 1600 | ||
| 1601 | return value; | |
| 1672 | global_free(m_live); | |
| 1602 | 1673 | } |
| 1603 | 1674 | |
| 1604 | 1675 | |
| 1605 | /*************************************************************************** | |
| 1606 | PORT WRITING | |
| 1607 | ***************************************************************************/ | |
| 1676 | //------------------------------------------------- | |
| 1677 | // name - return the field name for a given input | |
| 1678 | // field | |
| 1679 | //------------------------------------------------- | |
| 1608 | 1680 | |
| 1609 | /*------------------------------------------------- | |
| 1610 | input_port_write_direct - write a value | |
| 1611 | to a port | |
| 1612 | -------------------------------------------------*/ | |
| 1613 | ||
| 1614 | void input_port_write_direct(const input_port_config *port, input_port_value data, input_port_value mem_mask) | |
| 1681 | const char *ioport_field::name() const | |
| 1615 | 1682 | { |
| 1616 | /* call device line write handlers */ | |
| 1617 | device_field_info *device_field; | |
| 1683 | // if we have a non-default name, use that | |
| 1684 | if (m_live != NULL && m_live->name) | |
| 1685 | return m_live->name; | |
| 1686 | if (m_name != NULL) | |
| 1687 | return m_name; | |
| 1618 | 1688 | |
| 1619 | COMBINE_DATA(&port->state->outputvalue); | |
| 1620 | ||
| 1621 | for (device_field = port->state->writedevicelist; device_field; device_field = device_field->next) | |
| 1622 | if (device_field->field->type == IPT_OUTPUT && input_condition_true(port->machine(), &device_field->field->condition, port->owner())) | |
| 1623 | { | |
| 1624 | input_port_value newval = ( (port->state->outputvalue ^ device_field->field->defvalue ) & device_field->field->mask) >> device_field->shift; | |
| 1625 | ||
| 1626 | /* if the bits have write, call the handler */ | |
| 1627 | if (device_field->oldval != newval) | |
| 1628 | { | |
| 1629 | device_field->field->write(*device_field->field, device_field->field->write_param, device_field->oldval, newval); | |
| 1630 | ||
| 1631 | device_field->oldval = newval; | |
| 1632 | } | |
| 1633 | } | |
| 1689 | // otherwise, return the name associated with the type | |
| 1690 | return machine().ioport().type_name(m_type, m_player); | |
| 1634 | 1691 | } |
| 1635 | 1692 | |
| 1636 | 1693 | |
| 1637 | /*------------------------------------------------- | |
| 1638 | input_port_write - write a value to a | |
| 1639 | port specified by tag | |
| 1640 | -------------------------------------------------*/ | |
| 1694 | //------------------------------------------------- | |
| 1695 | // seq - return the input sequence for the given | |
| 1696 | // input field | |
| 1697 | //------------------------------------------------- | |
| 1641 | 1698 | |
| 1642 | ||
| 1699 | const input_s | |
| 1643 | 1700 | { |
| 1644 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1645 | if (port == NULL) | |
| 1646 | fatalerror("Unable to locate input port '%s'", tag); | |
| 1647 | input_port_write_direct(port, value, mask); | |
| 1648 | } | |
| 1701 | // if the field is disabled, return no key | |
| 1702 | if (m_flags & FIELD_FLAG_UNUSED) | |
| 1703 | return input_seq::empty_seq; | |
| 1649 | 1704 | |
| 1705 | // select either the live or config state depending on whether we have live state | |
| 1706 | const input_seq &portseq = (m_live == NULL) ? m_seq[seqtype] : m_live->seq[seqtype]; | |
| 1650 | 1707 | |
| 1651 | /*------------------------------------------------- | |
| 1652 | input_port_write_safe - write a value to | |
| 1653 | a port, ignore if the port does not exist | |
| 1654 | -------------------------------------------------*/ | |
| 1708 | // if the portseq is the special default code, return the expanded default value | |
| 1709 | if (portseq.is_default()) | |
| 1710 | return machine().ioport().type_seq(m_type, m_player, seqtype); | |
| 1655 | 1711 | |
| 1656 | void input_port_write_safe(running_machine &machine, const char *tag, input_port_value value, input_port_value mask) | |
| 1657 | { | |
| 1658 | const input_port_config *port = machine.root_device().ioport(tag); | |
| 1659 | if (port != NULL) | |
| 1660 | input_port_write_direct(port, value, mask); | |
| 1712 | // otherwise, return the sequence as-is | |
| 1713 | return portseq; | |
| 1661 | 1714 | } |
| 1662 | 1715 | |
| 1663 | 1716 | |
| 1717 | //------------------------------------------------- | |
| 1718 | // type_class - return the type class for this | |
| 1719 | // field | |
| 1720 | //------------------------------------------------- | |
| 1664 | 1721 | |
| 1665 | /*************************************************************************** | |
| 1666 | MISC HELPER FUNCTIONS | |
| 1667 | ***************************************************************************/ | |
| 1668 | ||
| 1669 | /*------------------------------------------------- | |
| 1670 | input_condition_true - return the TRUE | |
| 1671 | if the given condition attached is true | |
| 1672 | -------------------------------------------------*/ | |
| 1673 | ||
| 1674 | int input_condition_true(running_machine &machine, const input_condition *condition, device_t &owner) | |
| 1722 | ioport_type_class ioport_field::type_class() const | |
| 1675 | 1723 | { |
| 1676 | i | |
| 1724 | iop | |
| 1677 | 1725 | |
| 1678 | /* always condition is always true */ | |
| 1679 | if (condition->condition == PORTCOND_ALWAYS) | |
| 1680 | return TRUE; | |
| 1681 | ||
| 1682 | /* otherwise, read the referenced port */ | |
| 1683 | astring conditiontag; | |
| 1684 | owner.subtag(conditiontag, condition->tag); | |
| 1685 | condvalue = input_port_read(machine, conditiontag.cstr()); | |
| 1686 | ||
| 1687 | /* based on the condition encoded, determine truth */ | |
| 1688 | switch (condition->condition) | |
| 1726 | switch (m_type) | |
| 1689 | 1727 | { |
| 1690 | case PORTCOND_EQUALS: | |
| 1691 | return ((condvalue & condition->mask) == condition->value); | |
| 1728 | case IPT_JOYSTICK_UP: | |
| 1729 | case IPT_JOYSTICK_DOWN: | |
| 1730 | case IPT_JOYSTICK_LEFT: | |
| 1731 | case IPT_JOYSTICK_RIGHT: | |
| 1732 | case IPT_JOYSTICKLEFT_UP: | |
| 1733 | case IPT_JOYSTICKLEFT_DOWN: | |
| 1734 | case IPT_JOYSTICKLEFT_LEFT: | |
| 1735 | case IPT_JOYSTICKLEFT_RIGHT: | |
| 1736 | case IPT_JOYSTICKRIGHT_UP: | |
| 1737 | case IPT_JOYSTICKRIGHT_DOWN: | |
| 1738 | case IPT_JOYSTICKRIGHT_LEFT: | |
| 1739 | case IPT_JOYSTICKRIGHT_RIGHT: | |
| 1740 | case IPT_BUTTON1: | |
| 1741 | case IPT_BUTTON2: | |
| 1742 | case IPT_BUTTON3: | |
| 1743 | case IPT_BUTTON4: | |
| 1744 | case IPT_BUTTON5: | |
| 1745 | case IPT_BUTTON6: | |
| 1746 | case IPT_BUTTON7: | |
| 1747 | case IPT_BUTTON8: | |
| 1748 | case IPT_BUTTON9: | |
| 1749 | case IPT_BUTTON10: | |
| 1750 | case IPT_AD_STICK_X: | |
| 1751 | case IPT_AD_STICK_Y: | |
| 1752 | case IPT_AD_STICK_Z: | |
| 1753 | case IPT_TRACKBALL_X: | |
| 1754 | case IPT_TRACKBALL_Y: | |
| 1755 | case IPT_LIGHTGUN_X: | |
| 1756 | case IPT_LIGHTGUN_Y: | |
| 1757 | case IPT_MOUSE_X: | |
| 1758 | case IPT_MOUSE_Y: | |
| 1759 | case IPT_START: | |
| 1760 | case IPT_SELECT: | |
| 1761 | result = INPUT_CLASS_CONTROLLER; | |
| 1762 | break; | |
| 1692 | 1763 | |
| 1693 | case PORTCOND_NOTEQUALS: | |
| 1694 | return ((condvalue & condition->mask) != condition->value); | |
| 1764 | case IPT_KEYPAD: | |
| 1765 | case IPT_KEYBOARD: | |
| 1766 | result = INPUT_CLASS_KEYBOARD; | |
| 1767 | break; | |
| 1695 | 1768 | |
| 1696 | case PORTCOND_GREATERTHAN: | |
| 1697 | return ((condvalue & condition->mask) > condition->value); | |
| 1769 | case IPT_CONFIG: | |
| 1770 | result = INPUT_CLASS_CONFIG; | |
| 1771 | break; | |
| 1698 | 1772 | |
| 1699 | case PORTCOND_NOTGREATERTHAN: | |
| 1700 | return ((condvalue & condition->mask) <= condition->value); | |
| 1773 | case IPT_DIPSWITCH: | |
| 1774 | result = INPUT_CLASS_DIPSWITCH; | |
| 1775 | break; | |
| 1701 | 1776 | |
| 1702 | case PORTCOND_LESSTHAN: | |
| 1703 | return ((condvalue & condition->mask) < condition->value); | |
| 1777 | case 0: | |
| 1778 | if (m_name != NULL && m_name != (const char *)-1) | |
| 1779 | result = INPUT_CLASS_MISC; | |
| 1780 | else | |
| 1781 | result = INPUT_CLASS_INTERNAL; | |
| 1782 | break; | |
| 1704 | 1783 | |
| 1705 | case PORTCOND_NOTLESSTHAN: | |
| 1706 | return ((condvalue & condition->mask) >= condition->value); | |
| 1784 | default: | |
| 1785 | result = INPUT_CLASS_INTERNAL; | |
| 1786 | break; | |
| 1707 | 1787 | } |
| 1708 | return | |
| 1788 | return result; | |
| 1709 | 1789 | } |
| 1710 | 1790 | |
| 1711 | 1791 | |
| 1712 | /*------------------------------------------------- | |
| 1713 | input_port_string_from_token - convert an | |
| 1714 | input_port_token to a default string | |
| 1715 | -------------------------------------------------*/ | |
| 1792 | //------------------------------------------------- | |
| 1793 | // keyboard_code - accesses a particular keyboard | |
| 1794 | // code | |
| 1795 | //------------------------------------------------- | |
| 1716 | 1796 | |
| 1717 | co | |
| 1797 | unicode_ | |
| 1718 | 1798 | { |
| 1719 | /* 0 is an invalid index */ | |
| 1720 | if (string == NULL) | |
| 1721 | return NULL; | |
| 1799 | unicode_char ch = m_chars[which]; | |
| 1722 | 1800 | |
| 1723 | /* if the index is greater than the count, assume it to be a pointer */ | |
| 1724 | if (FPTR(string) >= INPUT_STRING_COUNT) | |
| 1725 | return string; | |
| 1801 | // special hack to allow for PORT_CODE('\xA3') | |
| 1802 | if (ch >= 0xffffff80 && ch <= 0xffffffff) | |
| 1803 | ch &= 0xff; | |
| 1804 | return ch; | |
| 1805 | } | |
| 1726 | 1806 | |
| 1727 | #if FALSE // Set TRUE, If you want to take care missing-token or wrong-sorting | |
| 1728 | 1807 | |
| 1729 | /* otherwise, scan the list for a matching string and return it */ | |
| 1730 | { | |
| 1731 | int index; | |
| 1732 | for (index = 0; index < ARRAY_LENGTH(input_port_default_strings); index++) | |
| 1733 | if (input_port_default_strings[index].id == FPTR(string)) | |
| 1734 | return input_port_default_strings[index].string; | |
| 1735 | } | |
| 1736 | return "(Unknown Default)"; | |
| 1808 | //------------------------------------------------- | |
| 1809 | // get_user_settings - return the current | |
| 1810 | // settings for the given input field | |
| 1811 | //------------------------------------------------- | |
| 1737 | 1812 | |
| 1738 | #else | |
| 1813 | void ioport_field::get_user_settings(user_settings &settings) | |
| 1814 | { | |
| 1815 | // zap the entire structure | |
| 1816 | memset(&settings, 0, sizeof(settings)); | |
| 1739 | 1817 | |
| 1740 | return input_port_default_strings[FPTR(string)-1].string; | |
| 1818 | // copy the basics | |
| 1819 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 1820 | settings.seq[seqtype] = m_live->seq[seqtype]; | |
| 1741 | 1821 | |
| 1742 | #endif | |
| 1822 | // if there's a list of settings or we're an adjuster, copy the current value | |
| 1823 | if (first_setting() != NULL || m_type == IPT_ADJUSTER) | |
| 1824 | settings.value = m_live->value; | |
| 1825 | ||
| 1826 | // if there's analog data, extract the analog settings | |
| 1827 | if (m_live->analog != NULL) | |
| 1828 | { | |
| 1829 | settings.sensitivity = m_live->analog->sensitivity(); | |
| 1830 | settings.delta = m_live->analog->delta(); | |
| 1831 | settings.centerdelta = m_live->analog->centerdelta(); | |
| 1832 | settings.reverse = m_live->analog->reverse(); | |
| 1833 | } | |
| 1743 | 1834 | } |
| 1744 | 1835 | |
| 1745 | 1836 | |
| 1837 | //------------------------------------------------- | |
| 1838 | // set_user_settings - modify the current | |
| 1839 | // settings for the given input field | |
| 1840 | //------------------------------------------------- | |
| 1746 | 1841 | |
| 1747 | /*************************************************************************** | |
| 1748 | INITIALIZATION HELPERS | |
| 1749 | ***************************************************************************/ | |
| 1750 | ||
| 1751 | /*------------------------------------------------- | |
| 1752 | init_port_types - initialize the default | |
| 1753 | type list | |
| 1754 | -------------------------------------------------*/ | |
| 1755 | ||
| 1756 | static void init_port_types(running_machine &machine) | |
| 1842 | void ioport_field::set_user_settings(const user_settings &settings) | |
| 1757 | 1843 | { |
| 1758 | ioport_manager &portdata = machine.ioport(); | |
| 1844 | // copy the basics | |
| 1845 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 1846 | { | |
| 1847 | const input_seq &defseq = manager().type_seq(m_type, m_player, input_seq_type(seqtype)); | |
| 1848 | if (defseq == settings.seq[seqtype]) | |
| 1849 | m_live->seq[seqtype].set_default(); | |
| 1850 | else | |
| 1851 | m_live->seq[seqtype] = settings.seq[seqtype]; | |
| 1852 | } | |
| 1759 | 1853 | |
| 1760 | /* convert the array into a list of type states that can be modified */ | |
| 1761 | construct_core_types(portdata.typelist); | |
| 1854 | // if there's a list of settings or we're an adjuster, copy the current value | |
| 1855 | if (first_setting() != NULL || m_type == IPT_ADJUSTER) | |
| 1856 | m_live->value = settings.value; | |
| 1762 | 1857 | |
| 1763 | /* ask the OSD to customize the list */ | |
| 1764 | machine.osd().customize_input_type_list(portdata.typelist); | |
| 1765 | ||
| 1766 | /* now iterate over the OSD-modified types */ | |
| 1767 | for (input_type_entry *curtype = portdata.typelist.first(); curtype != NULL; curtype = curtype->next()) | |
| 1858 | // if there's analog data, extract the analog settings | |
| 1859 | if (m_live->analog != NULL) | |
| 1768 | 1860 | { |
| 1769 | /* first copy all the OSD-updated sequences into our current state */ | |
| 1770 | for (int seqtype = 0; seqtype < ARRAY_LENGTH(curtype->seq); seqtype++) | |
| 1771 | curtype->seq[seqtype] = curtype->defseq[seqtype]; | |
| 1772 | ||
| 1773 | /* also make a lookup table mapping type/player to the appropriate type list entry */ | |
| 1774 | portdata.type_to_entry[curtype->type][curtype->player] = curtype; | |
| 1861 | m_live->analog->m_sensitivity = settings.sensitivity; | |
| 1862 | m_live->analog->m_delta = settings.delta; | |
| 1863 | m_live->analog->m_centerdelta = settings.centerdelta; | |
| 1864 | m_live->analog->m_reverse = settings.reverse; | |
| 1775 | 1865 | } |
| 1776 | 1866 | } |
| 1777 | 1867 | |
| 1778 | 1868 | |
| 1779 | /*------------------------------------------------- | |
| 1780 | get_keyboard_code - accesses a particular | |
| 1781 | keyboard code | |
| 1782 | -------------------------------------------------*/ | |
| 1869 | //------------------------------------------------- | |
| 1870 | // setting_name - return the expanded setting | |
| 1871 | // name for a field | |
| 1872 | //------------------------------------------------- | |
| 1783 | 1873 | |
| 1784 | st | |
| 1874 | const | |
| 1785 | 1875 | { |
| 1786 | unicode_char ch = field->chars[i]; | |
| 1876 | // only makes sense if we have settings | |
| 1877 | assert(first_setting() != NULL); | |
| 1787 | 1878 | |
| 1788 | /* special hack to allow for PORT_CODE('\xA3') */ | |
| 1789 | if ((ch >= 0xFFFFFF80) && (ch <= 0xFFFFFFFF)) | |
| 1790 | ch &= 0xFF; | |
| 1791 | return ch; | |
| 1879 | // scan the list of settings looking for a match on the current value | |
| 1880 | for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next()) | |
| 1881 | if (setting->enabled()) | |
| 1882 | if (setting->value() == m_live->value) | |
| 1883 | return setting->name(); | |
| 1884 | ||
| 1885 | return "INVALID"; | |
| 1792 | 1886 | } |
| 1793 | 1887 | |
| 1794 | 1888 | |
| 1795 | /*************************************************************************** | |
| 1796 | MISCELLANEOUS | |
| 1797 | ***************************************************************************/ | |
| 1889 | //------------------------------------------------- | |
| 1890 | // has_previous_setting - return true if the | |
| 1891 | // given field has a "previous" setting | |
| 1892 | //------------------------------------------------- | |
| 1798 | 1893 | |
| 1799 | /*------------------------------------------------- | |
| 1800 | find_charinfo - looks up information about a | |
| 1801 | particular character | |
| 1802 | -------------------------------------------------*/ | |
| 1803 | ||
| 1804 | static const char_info *find_charinfo(unicode_char target_char) | |
| 1894 | bool ioport_field::has_previous_setting() const | |
| 1805 | 1895 | { |
| 1806 | int low = 0; | |
| 1807 | int high = ARRAY_LENGTH(charinfo); | |
| 1808 | int i; | |
| 1809 | unicode_char ch; | |
| 1896 | // only makes sense if we have settings | |
| 1897 | assert(first_setting() != NULL); | |
| 1810 | 1898 | |
| 1811 | /* perform a simple binary search to find the proper alternate */ | |
| 1812 | while(high > low) | |
| 1813 | { | |
| 1814 | i = (high + low) / 2; | |
| 1815 | ch = charinfo[i].ch; | |
| 1816 | if (ch < target_char) | |
| 1817 | low = i + 1; | |
| 1818 | else if (ch > target_char) | |
| 1819 | high = i; | |
| 1820 | else | |
| 1821 | return &charinfo[i]; | |
| 1822 | } | |
| 1823 | return NULL; | |
| 1899 | // scan the list of settings looking for a match on the current value | |
| 1900 | for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next()) | |
| 1901 | if (setting->enabled()) | |
| 1902 | return (setting->value() != m_live->value); | |
| 1903 | ||
| 1904 | return false; | |
| 1824 | 1905 | } |
| 1825 | 1906 | |
| 1826 | /*------------------------------------------------- | |
| 1827 | inputx_key_name - returns the name of a | |
| 1828 | specific key | |
| 1829 | -------------------------------------------------*/ | |
| 1830 | 1907 | |
| 1831 | static const char *inputx_key_name(unicode_char ch) | |
| 1908 | //------------------------------------------------- | |
| 1909 | // select_previous_setting - select the previous | |
| 1910 | // item for a DIP switch or configuration field | |
| 1911 | //------------------------------------------------- | |
| 1912 | ||
| 1913 | void ioport_field::select_previous_setting() | |
| 1832 | 1914 | { |
| 1833 | static char buf[UTF8_CHAR_MAX + 1]; | |
| 1834 | const char_info *ci; | |
| 1835 | const char *result; | |
| 1836 | int pos; | |
| 1915 | // only makes sense if we have settings | |
| 1916 | assert(first_setting() != NULL); | |
| 1837 | 1917 | |
| 1838 | ci = find_charinfo(ch); | |
| 1839 | result = ci ? ci->name : NULL; | |
| 1840 | ||
| 1841 | if (ci && ci->name) | |
| 1842 | { | |
| 1843 | result = ci->name; | |
| 1844 | } | |
| 1845 | else | |
| 1846 | { | |
| 1847 | if ((ch > 0x7F) || isprint(ch)) | |
| 1918 | // scan the list of settings looking for a match on the current value | |
| 1919 | ioport_setting *prevsetting = NULL; | |
| 1920 | bool found_match = false; | |
| 1921 | for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next()) | |
| 1922 | if (setting->enabled()) | |
| 1848 | 1923 | { |
| 1849 | pos = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch); | |
| 1850 | buf[pos] = '\0'; | |
| 1851 | result = buf; | |
| 1924 | if (setting->value() == m_live->value) | |
| 1925 | { | |
| 1926 | found_match = true; | |
| 1927 | if (prevsetting != NULL) | |
| 1928 | break; | |
| 1929 | } | |
| 1930 | prevsetting = setting; | |
| 1852 | 1931 | } |
| 1853 | else | |
| 1854 | result = "???"; | |
| 1855 | } | |
| 1856 | return result; | |
| 1857 | } | |
| 1858 | 1932 | |
| 1859 | /*------------------------------------------------- | |
| 1860 | get_keyboard_key_name - builds the name of | |
| 1861 | a key based on natural keyboard characters | |
| 1862 | -------------------------------------------------*/ | |
| 1863 | ||
| 1864 | static astring &get_keyboard_key_name(astring &name, const input_field_config *field) | |
| 1865 | { | |
| 1866 | int i; | |
| 1867 | unicode_char ch; | |
| 1868 | ||
| 1869 | name.reset(); | |
| 1870 | /* loop through each character on the field*/ | |
| 1871 | for (i = 0; i < ARRAY_LENGTH(field->chars) && (field->chars[i] != '\0'); i++) | |
| 1933 | // if we didn't find a matching value, select the first | |
| 1934 | if (!found_match) | |
| 1872 | 1935 | { |
| 1873 | ch = get_keyboard_code(field, i); | |
| 1874 | name.catprintf("%-*s ", MAX(SPACE_COUNT - 1, 0), inputx_key_name(ch)); | |
| 1936 | for (prevsetting = first_setting(); prevsetting != NULL; prevsetting = prevsetting->next()) | |
| 1937 | if (prevsetting->enabled()) | |
| 1938 | break; | |
| 1875 | 1939 | } |
| 1876 | 1940 | |
| 1877 | /* trim extra spaces */ | |
| 1878 | name.trimspace(); | |
| 1879 | ||
| 1880 | /* special case */ | |
| 1881 | if (name.len() == 0) | |
| 1882 | name.cpy("Unnamed Key"); | |
| 1883 | ||
| 1884 | return name; | |
| 1941 | // update the value to the previous one | |
| 1942 | if (prevsetting != NULL) | |
| 1943 | m_live->value = prevsetting->value(); | |
| 1885 | 1944 | } |
| 1886 | 1945 | |
| 1887 | /*------------------------------------------------- | |
| 1888 | init_port_state - initialize the live port | |
| 1889 | states based on the tokens | |
| 1890 | -------------------------------------------------*/ | |
| 1891 | 1946 | |
| 1892 | static void init_port_state(running_machine &machine) | |
| 1947 | //------------------------------------------------- | |
| 1948 | // has_next_setting - return true if the given | |
| 1949 | // field has a "next" setting | |
| 1950 | //------------------------------------------------- | |
| 1951 | ||
| 1952 | bool ioport_field::has_next_setting() const | |
| 1893 | 1953 | { |
| 1894 | const char *joystick_map_default = machine.options().joystick_map(); | |
| 1895 | ioport_manager &portdata = machine.ioport(); | |
| 1896 | input_field_config *field; | |
| 1897 | input_port_config *port; | |
| 1954 | // only makes sense if we have settings | |
| 1955 | assert(first_setting() != NULL); | |
| 1898 | 1956 | |
| 1899 | /* allocate live structures to mirror the configuration */ | |
| 1900 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 1901 | { | |
| 1902 | analog_field_state **analogstatetail; | |
| 1903 | device_field_info **readdevicetail; | |
| 1904 | device_field_info **writedevicetail; | |
| 1905 | input_port_state *portstate; | |
| 1906 | ||
| 1907 | /* allocate a new input_port_info structure */ | |
| 1908 | portstate = auto_alloc_clear(machine, input_port_state); | |
| 1909 | ((input_port_config *)port)->state = portstate; | |
| 1910 | ||
| 1911 | /* start with tail pointers to all the data */ | |
| 1912 | analogstatetail = &portstate->analoglist; | |
| 1913 | readdevicetail = &portstate->readdevicelist; | |
| 1914 | writedevicetail = &portstate->writedevicelist; | |
| 1915 | ||
| 1916 | /* iterate over fields */ | |
| 1917 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1957 | // scan the list of settings looking for a match on the current value | |
| 1958 | bool found = false; | |
| 1959 | for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next()) | |
| 1960 | if (setting->enabled()) | |
| 1918 | 1961 | { |
| 1919 | input_field_state *fieldstate; | |
| 1920 | int seqtype; | |
| 1962 | if (found) | |
| 1963 | return true; | |
| 1964 | if (setting->value() == m_live->value) | |
| 1965 | found = true; | |
| 1966 | } | |
| 1921 | 1967 | |
| 1922 | /* allocate a new input_field_info structure */ | |
| 1923 | fieldstate = auto_alloc_clear(machine, input_field_state); | |
| 1924 | ((input_field_config *)field)->state = fieldstate; | |
| 1968 | return false; | |
| 1969 | } | |
| 1925 | 1970 | |
| 1926 | /* fill in the basic values */ | |
| 1927 | for (seqtype = 0; seqtype < ARRAY_LENGTH(fieldstate->seq); seqtype++) | |
| 1928 | fieldstate->seq[seqtype] = field->seq[seqtype]; | |
| 1929 | fieldstate->value = field->defvalue; | |
| 1930 | 1971 | |
| 1931 | /* if this is an analog field, allocate memory for the analog data */ | |
| 1932 | if (field->type >= __ipt_analog_start && field->type <= __ipt_analog_end) | |
| 1933 | { | |
| 1934 | *analogstatetail = fieldstate->analog = init_field_analog_state(field); | |
| 1935 | analogstatetail = &(*analogstatetail)->next; | |
| 1936 | } | |
| 1972 | //------------------------------------------------- | |
| 1973 | // select_next_setting - select the next item for | |
| 1974 | // a DIP switch or configuration field | |
| 1975 | //------------------------------------------------- | |
| 1937 | 1976 | |
| 1938 | /* if this is a digital joystick field, make a note of it */ | |
| 1939 | if (field->type >= __ipt_digital_joystick_start && field->type <= __ipt_digital_joystick_end) | |
| 1940 | { | |
| 1941 | fieldstate->joystick = &portdata.joystick_info[field->player][(field->type - __ipt_digital_joystick_start) / 4]; | |
| 1942 | fieldstate->joydir = (field->type - __ipt_digital_joystick_start) % 4; | |
| 1943 | fieldstate->joystick->field[fieldstate->joydir] = field; | |
| 1944 | fieldstate->joystick->inuse = TRUE; | |
| 1945 | } | |
| 1977 | void ioport_field::select_next_setting() | |
| 1978 | { | |
| 1979 | // only makes sense if we have settings | |
| 1980 | assert(first_setting() != NULL); | |
| 1946 | 1981 | |
| 1947 | /* if this entry has device input, allocate memory for the tracking structure */ | |
| 1948 | astring devicetag; | |
| 1949 | if (!field->read.isnull()) | |
| 1950 | { | |
| 1951 | *readdevicetail = init_field_device_info(field, port->owner().subtag(devicetag, field->read_device)); | |
| 1952 | field->read.late_bind(*(*readdevicetail)->device); | |
| 1953 | if (!field->read.has_object()) | |
| 1954 | fatalerror("Input port %s, unable to find valid device with tag '%s'", port->tag(), devicetag.cstr()); | |
| 1955 | readdevicetail = &(*readdevicetail)->next; | |
| 1956 | } | |
| 1982 | // scan the list of settings looking for a match on the current value | |
| 1983 | ioport_setting *nextsetting = NULL; | |
| 1984 | ioport_setting *setting; | |
| 1985 | for (setting = first_setting(); setting != NULL; setting = setting->next()) | |
| 1986 | if (setting->enabled()) | |
| 1987 | if (setting->value() == m_live->value) | |
| 1988 | break; | |
| 1957 | 1989 | |
| 1958 | /* if this entry has device output, allocate memory for the tracking structure */ | |
| 1959 | if (!field->write.isnull()) | |
| 1960 | { | |
| 1961 | *writedevicetail = init_field_device_info(field, port->owner().subtag(devicetag, field->write_device)); | |
| 1962 | field->write.late_bind(*(*writedevicetail)->device); | |
| 1963 | if (!field->write.has_object()) | |
| 1964 | fatalerror("Input port %s, unable to find valid device with tag '%s'", port->tag(), devicetag.cstr()); | |
| 1965 | writedevicetail = &(*writedevicetail)->next; | |
| 1966 | } | |
| 1990 | // if we found one, scan forward for the next valid one | |
| 1991 | if (setting != NULL) | |
| 1992 | for (nextsetting = setting->next(); nextsetting != NULL; nextsetting = nextsetting->next()) | |
| 1993 | if (nextsetting->enabled()) | |
| 1994 | break; | |
| 1967 | 1995 | |
| 1968 | /* if this entry has device output, allocate memory for the tracking structure */ | |
| 1969 | if (!field->crossmapper.isnull()) | |
| 1970 | { | |
| 1971 | device_t *device = machine.device(port->owner().subtag(devicetag, field->crossmapper_device)); | |
| 1972 | field->crossmapper.late_bind(*device); | |
| 1973 | } | |
| 1996 | // if we hit the end, search from the beginning | |
| 1997 | if (nextsetting == NULL) | |
| 1998 | for (nextsetting = first_setting(); nextsetting != NULL; nextsetting = nextsetting->next()) | |
| 1999 | if (nextsetting->enabled()) | |
| 2000 | break; | |
| 1974 | 2001 | |
| 1975 | /* Name keyboard key names */ | |
| 1976 | if ((field->type == IPT_KEYBOARD || field->type == IPT_KEYPAD) && (field->name == NULL)) | |
| 1977 | { | |
| 1978 | astring name; | |
| 1979 | field->state->name = auto_strdup(machine, get_keyboard_key_name(name, field)); | |
| 1980 | } | |
| 1981 | } | |
| 1982 | } | |
| 1983 | ||
| 1984 | /* handle autoselection of devices */ | |
| 1985 | init_autoselect_devices(machine, IPT_AD_STICK_X, IPT_AD_STICK_Y, IPT_AD_STICK_Z, OPTION_ADSTICK_DEVICE, "analog joystick"); | |
| 1986 | init_autoselect_devices(machine, IPT_PADDLE, IPT_PADDLE_V, 0, OPTION_PADDLE_DEVICE, "paddle"); | |
| 1987 | init_autoselect_devices(machine, IPT_PEDAL, IPT_PEDAL2, IPT_PEDAL3, OPTION_PEDAL_DEVICE, "pedal"); | |
| 1988 | init_autoselect_devices(machine, IPT_LIGHTGUN_X, IPT_LIGHTGUN_Y, 0, OPTION_LIGHTGUN_DEVICE, "lightgun"); | |
| 1989 | init_autoselect_devices(machine, IPT_POSITIONAL, IPT_POSITIONAL_V, 0, OPTION_POSITIONAL_DEVICE, "positional"); | |
| 1990 | init_autoselect_devices(machine, IPT_DIAL, IPT_DIAL_V, 0, OPTION_DIAL_DEVICE, "dial"); | |
| 1991 | init_autoselect_devices(machine, IPT_TRACKBALL_X, IPT_TRACKBALL_Y, 0, OPTION_TRACKBALL_DEVICE, "trackball"); | |
| 1992 | init_autoselect_devices(machine, IPT_MOUSE_X, IPT_MOUSE_Y, 0, OPTION_MOUSE_DEVICE, "mouse"); | |
| 1993 | ||
| 1994 | /* look for 4-way joysticks and change the default map if we find any */ | |
| 1995 | if (joystick_map_default[0] == 0 || strcmp(joystick_map_default, "auto") == 0) | |
| 1996 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 1997 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1998 | if (field->state->joystick != NULL && field->way == 4) | |
| 1999 | { | |
| 2000 | machine.input().set_global_joystick_map((field->flags & FIELD_FLAG_ROTATED) ? joystick_map_4way_diagonal : joystick_map_4way_sticky); | |
| 2001 | break; | |
| 2002 | } | |
| 2002 | // update the value to the previous one | |
| 2003 | if (nextsetting != NULL) | |
| 2004 | m_live->value = nextsetting->value(); | |
| 2003 | 2005 | } |
| 2004 | 2006 | |
| 2005 | 2007 | |
| 2006 | /*------------------------------------------------- | |
| 2007 | init_autoselect_devices - autoselect a single | |
| 2008 | device based on the input port list passed | |
| 2009 | in and the corresponding option | |
| 2010 | -------------------------------------------------*/ | |
| 2008 | //------------------------------------------------- | |
| 2009 | // frame_update_digital - get the state of a | |
| 2010 | // digital field | |
| 2011 | //------------------------------------------------- | |
| 2011 | 2012 | |
| 2012 | ||
| 2013 | ||
| 2013 | 2014 | { |
| 2014 | const char *stemp = machine.options().value(option); | |
| 2015 | input_device_class autoenable = DEVICE_CLASS_KEYBOARD; | |
| 2016 | const char *autostring = "keyboard"; | |
| 2017 | const input_field_config *field; | |
| 2018 | const input_port_config *port; | |
| 2015 | // skip if not enabled | |
| 2016 | if (!enabled()) | |
| 2017 | return; | |
| 2019 | 2018 | |
| 2020 | /* if nothing specified, ignore the option */ | |
| 2021 | if (stemp[0] == 0) | |
| 2019 | // handle analog inputs first | |
| 2020 | if (m_live->analog != NULL) | |
| 2021 | { | |
| 2022 | m_live->analog->frame_update(machine()); | |
| 2022 | 2023 | return; |
| 2024 | } | |
| 2025 | ||
| 2026 | // if UI is active, ignore digital inputs | |
| 2027 | if (ui_is_menu_active()) | |
| 2028 | return; | |
| 2023 | 2029 | |
| 2024 | /* extract valid strings */ | |
| 2025 | if (strcmp(stemp, "mouse") == 0) | |
| 2030 | // if the state changed, look for switch down/switch up | |
| 2031 | bool curstate = mouse_down || machine().input().seq_pressed(seq()); | |
| 2032 | bool changed = false; | |
| 2033 | if (curstate != m_live->last) | |
| 2026 | 2034 | { |
| 2027 | autoenable = DEVICE_CLASS_MOUSE; | |
| 2028 | autostring = "mouse"; | |
| 2035 | m_live->last = curstate; | |
| 2036 | changed = true; | |
| 2029 | 2037 | } |
| 2030 | else if (strcmp(stemp, "joystick") == 0) | |
| 2038 | ||
| 2039 | // if we're a keyboard type and using natural keyboard, bail | |
| 2040 | if (m_type == IPT_KEYBOARD && ui_get_use_natural_keyboard(machine())) | |
| 2041 | return; | |
| 2042 | ||
| 2043 | // coin impulse option | |
| 2044 | int effective_impulse = m_impulse; | |
| 2045 | int impulse_option_val = machine().options().coin_impulse(); | |
| 2046 | if (impulse_option_val != 0) | |
| 2031 | 2047 | { |
| 2032 | autoenable = DEVICE_CLASS_JOYSTICK; | |
| 2033 | autostring = "joystick"; | |
| 2048 | if (impulse_option_val < 0) | |
| 2049 | effective_impulse = 0; | |
| 2050 | else if ((m_type >= IPT_COIN1 && m_type <= IPT_COIN12) || m_impulse != 0) | |
| 2051 | effective_impulse = impulse_option_val; | |
| 2034 | 2052 | } |
| 2035 | else if (strcmp(stemp, "lightgun") == 0) | |
| 2053 | ||
| 2054 | // if this is a switch-down event, handle impulse and toggle | |
| 2055 | if (changed && curstate) | |
| 2036 | 2056 | { |
| 2037 | autoenable = DEVICE_CLASS_LIGHTGUN; | |
| 2038 | autostring = "lightgun"; | |
| 2057 | // impluse controls: reset the impulse counter | |
| 2058 | if (effective_impulse != 0 && m_live->impulse == 0) | |
| 2059 | m_live->impulse = effective_impulse; | |
| 2060 | ||
| 2061 | // toggle controls: flip the toggle state or advance to the next setting | |
| 2062 | if (toggle()) | |
| 2063 | { | |
| 2064 | if (m_settinglist.count() == 0) | |
| 2065 | m_live->value ^= m_mask; | |
| 2066 | else | |
| 2067 | select_next_setting(); | |
| 2068 | } | |
| 2039 | 2069 | } |
| 2040 | else if (strcmp(stemp, "none") == 0) | |
| 2070 | ||
| 2071 | // update the current state with the impulse state | |
| 2072 | if (effective_impulse != 0) | |
| 2041 | 2073 | { |
| 2042 | /* nothing specified */ | |
| 2043 | return; | |
| 2074 | curstate = (m_live->impulse != 0); | |
| 2075 | if (curstate) | |
| 2076 | m_live->impulse--; | |
| 2044 | 2077 | } |
| 2045 | else if (strcmp(stemp, "keyboard") != 0) | |
| 2046 | mame_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp); | |
| 2047 | 2078 | |
| 2048 | /* only scan the list if we haven't already enabled this class of control */ | |
| 2049 | if (machine.ioport().first_port() != NULL && !machine.input().device_class(autoenable).enabled()) | |
| 2050 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 2051 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 2079 | // for toggle switches, the current value is folded into the port's default value | |
| 2080 | // so we always return FALSE here | |
| 2081 | if (toggle()) | |
| 2082 | curstate = false; | |
| 2052 | 2083 | |
| 2053 | /* if this port type is in use, apply the autoselect criteria */ | |
| 2054 | if ((type1 != 0 && field->type == type1) || | |
| 2055 | (type2 != 0 && field->type == type2) || | |
| 2056 | (type3 != 0 && field->type == type3)) | |
| 2057 | { | |
| 2058 | mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame); | |
| 2059 | machine.input().device_class(autoenable).enable(); | |
| 2060 | break; | |
| 2061 | } | |
| 2084 | // additional logic to restrict digital joysticks | |
| 2085 | if (curstate && !mouse_down && m_live->joystick != NULL && m_way != 16 && !machine().options().joystick_contradictory()) | |
| 2086 | { | |
| 2087 | UINT8 mask = (m_way == 4) ? m_live->joystick->current4way() : m_live->joystick->current(); | |
| 2088 | if (!(mask & (1 << m_live->joydir))) | |
| 2089 | curstate = false; | |
| 2090 | } | |
| 2091 | ||
| 2092 | // skip locked-out coin inputs | |
| 2093 | if (curstate && m_type >= IPT_COIN1 && m_type <= IPT_COIN12 && coin_lockout_get_state(machine(), m_type - IPT_COIN1)) | |
| 2094 | { | |
| 2095 | bool verbose = machine().options().verbose(); | |
| 2096 | #ifdef MAME_DEBUG | |
| 2097 | verbose = true; | |
| 2098 | #endif | |
| 2099 | if (machine().options().coin_lockout()) | |
| 2100 | { | |
| 2101 | if (verbose) | |
| 2102 | ui_popup_time(3, "Coinlock disabled %s.", name()); | |
| 2103 | curstate = false; | |
| 2104 | } | |
| 2105 | else | |
| 2106 | if (verbose) | |
| 2107 | ui_popup_time(3, "Coinlock disabled, but broken through %s.", name()); | |
| 2108 | } | |
| 2109 | ||
| 2110 | // if we're active, set the appropriate bits in the digital state | |
| 2111 | if (curstate) | |
| 2112 | result |= m_mask; | |
| 2062 | 2113 | } |
| 2063 | 2114 | |
| 2064 | 2115 | |
| 2065 | /*------------------------------------------------- | |
| 2066 | init_field_device_info - allocate and populate | |
| 2067 | information about a device callback | |
| 2068 | -------------------------------------------------*/ | |
| 2116 | //------------------------------------------------- | |
| 2117 | // crosshair_position - compute the crosshair | |
| 2118 | // position | |
| 2119 | //------------------------------------------------- | |
| 2069 | 2120 | |
| 2070 | ||
| 2121 | ||
| 2071 | 2122 | { |
| 2072 | device_field_info *info; | |
| 2073 | input_port_value mask; | |
| 2123 | float value = m_live->analog->crosshair_read(); | |
| 2074 | 2124 | |
| 2075 | /* allocate memory */ | |
| 2076 | info = auto_alloc_clear(field->machine(), device_field_info); | |
| 2125 | // apply the scale and offset | |
| 2126 | if (m_crosshair_scale < 0) | |
| 2127 | value = -(1.0 - value) * m_crosshair_scale; | |
| 2128 | else | |
| 2129 | value *= m_crosshair_scale; | |
| 2130 | value += m_crosshair_offset; | |
| 2077 | 2131 | |
| 2078 | /* fill in the data */ | |
| 2079 | info->field = field; | |
| 2080 | for (mask = field->mask; !(mask & 1); mask >>= 1) | |
| 2081 | info->shift++; | |
| 2132 | // apply custom mapping if necessary | |
| 2133 | if (!m_crosshair_mapper.isnull()) | |
| 2134 | value = m_crosshair_mapper(*this, value); | |
| 2082 | 2135 | |
| 2083 | info->device = (device_name != NULL) ? field->machine().device(device_name) : &field->port().owner(); | |
| 2136 | // handle X axis | |
| 2137 | if (m_crosshair_axis == CROSSHAIR_AXIS_X) | |
| 2138 | { | |
| 2139 | x = value; | |
| 2140 | gotx = true; | |
| 2141 | if (m_crosshair_altaxis != 0) | |
| 2142 | { | |
| 2143 | y = m_crosshair_altaxis; | |
| 2144 | goty = true; | |
| 2145 | } | |
| 2146 | } | |
| 2084 | 2147 | |
| 2085 | info->oldval = field->defvalue >> info->shift; | |
| 2086 | return info; | |
| 2148 | // handle Y axis | |
| 2149 | else | |
| 2150 | { | |
| 2151 | y = value; | |
| 2152 | goty = true; | |
| 2153 | if (m_crosshair_altaxis != 0) | |
| 2154 | { | |
| 2155 | x = m_crosshair_altaxis; | |
| 2156 | gotx = true; | |
| 2157 | } | |
| 2158 | } | |
| 2087 | 2159 | } |
| 2088 | 2160 | |
| 2089 | 2161 | |
| 2090 | /*------------------------------------------------- | |
| 2091 | init_field_analog_state - allocate and populate | |
| 2092 | information about an analog port | |
| 2093 | -------------------------------------------------*/ | |
| 2162 | //------------------------------------------------- | |
| 2163 | // expand_diplocation - expand a string-based | |
| 2164 | // DIP location into a linked list of | |
| 2165 | // descriptions | |
| 2166 | //------------------------------------------------- | |
| 2094 | 2167 | |
| 2095 | ||
| 2168 | v | |
| 2096 | 2169 | { |
| 2097 | analog_field_state *state; | |
| 2098 | input_port_value mask; | |
| 2170 | // if nothing present, bail | |
| 2171 | if (location == NULL) | |
| 2172 | return; | |
| 2099 | 2173 | |
| 2100 | /* allocate memory */ | |
| 2101 | state = auto_alloc_clear(field->machine(), analog_field_state); | |
| 2174 | m_diploclist.reset(); | |
| 2102 | 2175 | |
| 2103 | /* compute the shift amount and number of bits */ | |
| 2104 | for (mask = field->mask; !(mask & 1); mask >>= 1) | |
| 2105 | state->shift++; | |
| 2176 | // parse the string | |
| 2177 | astring name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside | |
| 2178 | const char *lastname = NULL; | |
| 2179 | const char *curentry = location; | |
| 2180 | int entries = 0; | |
| 2181 | while (*curentry != 0) | |
| 2182 | { | |
| 2183 | // find the end of this entry | |
| 2184 | const char *comma = strchr(curentry, ','); | |
| 2185 | if (comma == NULL) | |
| 2186 | comma = curentry + strlen(curentry); | |
| 2106 | 2187 | |
| 2107 | /* initialize core data */ | |
| 2108 | state->field = field; | |
| 2109 | state->adjdefvalue = (field->defvalue & field->mask) >> state->shift; | |
| 2110 | state->adjmin = (field->min & field->mask) >> state->shift; | |
| 2111 | state->adjmax = (field->max & field->mask) >> state->shift; | |
| 2112 | state->sensitivity = field->sensitivity; | |
| 2113 | state->reverse = ((field->flags & ANALOG_FLAG_REVERSE) != 0); | |
| 2114 | state->delta = field->delta; | |
| 2115 | state->centerdelta = field->centerdelta; | |
| 2116 | state->minimum = INPUT_ABSOLUTE_MIN; | |
| 2117 | state->maximum = INPUT_ABSOLUTE_MAX; | |
| 2188 | // extract it to tempbuf | |
| 2189 | astring tempstr; | |
| 2190 | tempstr.cpy(curentry, comma - curentry); | |
| 2118 | 2191 | |
| 2119 | /* set basic parameters based on the configured type */ | |
| 2120 | switch (field->type) | |
| 2121 | { | |
| 2122 | /* paddles and analog joysticks are absolute and autocenter */ | |
| 2123 | case IPT_AD_STICK_X: | |
| 2124 | case IPT_AD_STICK_Y: | |
| 2125 | case IPT_AD_STICK_Z: | |
| 2126 | case IPT_PADDLE: | |
| 2127 | case IPT_PADDLE_V: | |
| 2128 | state->absolute = TRUE; | |
| 2129 | state->autocenter = TRUE; | |
| 2130 | state->interpolate = TRUE; | |
| 2131 | break; | |
| 2192 | // first extract the switch name if present | |
| 2193 | const char *number = tempstr; | |
| 2194 | const char *colon = strchr(tempstr, ':'); | |
| 2132 | 2195 | |
| 2133 | /* pedals start at and autocenter to the min range */ | |
| 2134 | case IPT_PEDAL: | |
| 2135 | case IPT_PEDAL2: | |
| 2136 | case IPT_PEDAL3: | |
| 2137 | state->center = INPUT_ABSOLUTE_MIN; | |
| 2138 | state->accum = APPLY_INVERSE_SENSITIVITY(state->center, state->sensitivity); | |
| 2139 | state->absolute = TRUE; | |
| 2140 | state->autocenter = TRUE; | |
| 2141 | state->interpolate = TRUE; | |
| 2142 | break; | |
| 2196 | // allocate and copy the name if it is present | |
| 2197 | if (colon != NULL) | |
| 2198 | { | |
| 2199 | lastname = name.cpy(number, colon - number); | |
| 2200 | number = colon + 1; | |
| 2201 | } | |
| 2143 | 2202 | |
| 2144 | /* lightguns are absolute as well, but don't autocenter and don't interpolate their values */ | |
| 2145 | case IPT_LIGHTGUN_X: | |
| 2146 | case IPT_LIGHTGUN_Y: | |
| 2147 | state->absolute = TRUE; | |
| 2148 | state->autocenter = FALSE; | |
| 2149 | state->interpolate = FALSE; | |
| 2150 | break; | |
| 2203 | // otherwise, just copy the last name | |
| 2204 | else | |
| 2205 | { | |
| 2206 | if (lastname == NULL) | |
| 2207 | { | |
| 2208 | errorbuf.catprintf("Switch location '%s' missing switch name!\n", location); | |
| 2209 | lastname = (char *)"UNK"; | |
| 2210 | } | |
| 2211 | name.cpy(lastname); | |
| 2212 | } | |
| 2151 | 2213 | |
| 2152 | /* positional devices are absolute, but can also wrap like relative devices */ | |
| 2153 | /* set each position to be 512 units */ | |
| 2154 | case IPT_POSITIONAL: | |
| 2155 | case IPT_POSITIONAL_V: | |
| 2156 | state->positionalscale = COMPUTE_SCALE(field->max, INPUT_ABSOLUTE_MAX - INPUT_ABSOLUTE_MIN); | |
| 2157 | state->adjmin = 0; | |
| 2158 | state->adjmax = field->max - 1; | |
| 2159 | state->wraps = ((field->flags & ANALOG_FLAG_WRAPS) != 0); | |
| 2160 | state->autocenter = !state->wraps; | |
| 2161 | break; | |
| 2214 | // if the number is preceded by a '!' it's active high | |
| 2215 | bool invert = false; | |
| 2216 | if (*number == '!') | |
| 2217 | { | |
| 2218 | invert = true; | |
| 2219 | number++; | |
| 2220 | } | |
| 2162 | 2221 | |
| 2163 | /* dials, mice and trackballs are relative devices */ | |
| 2164 | /* these have fixed "min" and "max" values based on how many bits are in the port */ | |
| 2165 | /* in addition, we set the wrap around min/max values to 512 * the min/max values */ | |
| 2166 | /* this takes into account the mapping that one mouse unit ~= 512 analog units */ | |
| 2167 | case IPT_DIAL: | |
| 2168 | case IPT_DIAL_V: | |
| 2169 | case IPT_TRACKBALL_X: | |
| 2170 | case IPT_TRACKBALL_Y: | |
| 2171 | case IPT_MOUSE_X: | |
| 2172 | case IPT_MOUSE_Y: | |
| 2173 | state->absolute = FALSE; | |
| 2174 | state->wraps = TRUE; | |
| 2175 | state->interpolate = TRUE; | |
| 2176 | break; | |
| 2222 | // now scan the switch number | |
| 2223 | int swnum = -1; | |
| 2224 | if (sscanf(number, "%d", &swnum) != 1) | |
| 2225 | errorbuf.catprintf("Switch location '%s' has invalid format!\n", location); | |
| 2177 | 2226 | |
| 2178 | default: | |
| 2179 | fatalerror("Unknown analog port type -- don't know if it is absolute or not"); | |
| 2180 | break; | |
| 2227 | // allocate a new entry | |
| 2228 | m_diploclist.append(*global_alloc(ioport_diplocation(name, swnum, invert))); | |
| 2229 | entries++; | |
| 2230 | ||
| 2231 | // advance to the next item | |
| 2232 | curentry = comma; | |
| 2233 | if (*curentry != 0) | |
| 2234 | curentry++; | |
| 2181 | 2235 | } |
| 2182 | 2236 | |
| 2183 | /* further processing for absolute controls */ | |
| 2184 | if (state->absolute) | |
| 2185 | { | |
| 2186 | /* if the default value is pegged at the min or max, use a single scale value for the whole axis */ | |
| 2187 | state->single_scale = (state->adjdefvalue == state->adjmin) || (state->adjdefvalue == state->adjmax); | |
| 2237 | // then verify the number of bits in the mask matches | |
| 2238 | ioport_value temp; | |
| 2239 | int bits; | |
| 2240 | for (bits = 0, temp = m_mask; temp != 0 && bits < 32; bits++) | |
| 2241 | temp &= temp - 1; | |
| 2242 | if (bits != entries) | |
| 2243 | errorbuf.catprintf("Switch location '%s' does not describe enough bits for mask %X\n", location, m_mask); | |
| 2244 | } | |
| 2188 | 2245 | |
| 2189 | /* if not "single scale", compute separate scales for each side of the default */ | |
| 2190 | if (!state->single_scale) | |
| 2191 | { | |
| 2192 | /* unsigned */ | |
| 2193 | state->scalepos = COMPUTE_SCALE(state->adjmax - state->adjdefvalue, INPUT_ABSOLUTE_MAX - 0); | |
| 2194 | state->scaleneg = COMPUTE_SCALE(state->adjdefvalue - state->adjmin, 0 - INPUT_ABSOLUTE_MIN); | |
| 2195 | 2246 | |
| 2196 | if (state->adjmin > state->adjmax) | |
| 2197 | state->scaleneg = -state->scaleneg; | |
| 2247 | //------------------------------------------------- | |
| 2248 | // init_live_state - create live state structures | |
| 2249 | //------------------------------------------------- | |
| 2198 | 2250 | |
| 2199 | /* reverse point is at center */ | |
| 2200 | state->reverse_val = 0; | |
| 2201 | } | |
| 2202 | else | |
| 2203 | { | |
| 2204 | /* single axis that increases from default */ | |
| 2205 | state->scalepos = COMPUTE_SCALE(state->adjmax - state->adjmin, INPUT_ABSOLUTE_MAX - INPUT_ABSOLUTE_MIN); | |
| 2251 | void ioport_field::init_live_state(analog_field *analog) | |
| 2252 | { | |
| 2253 | // resolve callbacks | |
| 2254 | m_read.bind_relative_to(device()); | |
| 2255 | m_write.bind_relative_to(device()); | |
| 2256 | m_crosshair_mapper.bind_relative_to(device()); | |
| 2206 | 2257 | |
| 2207 | /* move from default */ | |
| 2208 | if (state->adjdefvalue == state->adjmax) | |
| 2209 | state->scalepos = -state->scalepos; | |
| 2258 | // allocate live state | |
| 2259 | m_live = global_alloc(ioport_field_live(*this, analog)); | |
| 2260 | } | |
| 2210 | 2261 | |
| 2211 | /* make the scaling the same for easier coding when we need to scale */ | |
| 2212 | state->scaleneg = state->scalepos; | |
| 2213 | 2262 | |
| 2214 | /* reverse point is at max */ | |
| 2215 | state->reverse_val = state->maximum; | |
| 2216 | } | |
| 2217 | } | |
| 2218 | 2263 | |
| 2219 | /* relative and positional controls all map directly with a 512x scale factor */ | |
| 2220 | else | |
| 2221 | { | |
| 2222 | /* The relative code is set up to allow specifing PORT_MINMAX and default values. */ | |
| 2223 | /* The validity checks are purposely set up to not allow you to use anything other */ | |
| 2224 | /* a default of 0 and PORT_MINMAX(0,mask). This is in case the need arises to use */ | |
| 2225 | /* this feature in the future. Keeping the code in does not hurt anything. */ | |
| 2226 | if (state->adjmin > state->adjmax) | |
| 2227 | /* adjust for signed */ | |
| 2228 | state->adjmin = -state->adjmin; | |
| 2264 | //************************************************************************** | |
| 2265 | // I/O PORT FIELD LIVE | |
| 2266 | //************************************************************************** | |
| 2229 | 2267 | |
| 2230 | if (state->wraps) | |
| 2231 | state->adjmax++; | |
| 2268 | //------------------------------------------------- | |
| 2269 | // ioport_field_live - constructor | |
| 2270 | //------------------------------------------------- | |
| 2232 | 2271 | |
| 2233 | state->minimum = (state->adjmin - state->adjdefvalue) * INPUT_RELATIVE_PER_PIXEL; | |
| 2234 | state->maximum = (state->adjmax - state->adjdefvalue) * INPUT_RELATIVE_PER_PIXEL; | |
| 2272 | ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog) | |
| 2273 | : analog(analog), | |
| 2274 | joystick(NULL), | |
| 2275 | value(field.defvalue()), | |
| 2276 | impulse(0), | |
| 2277 | last(0), | |
| 2278 | joydir(digital_joystick::JOYDIR_COUNT) | |
| 2279 | { | |
| 2280 | // fill in the basic values | |
| 2281 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 2282 | seq[seqtype] = field.seq(seqtype); | |
| 2235 | 2283 | |
| 2236 | /* make the scaling the same for easier coding when we need to scale */ | |
| 2237 | state->scaleneg = state->scalepos = COMPUTE_SCALE(1, INPUT_RELATIVE_PER_PIXEL); | |
| 2284 | // if this is a digital joystick field, make a note of it | |
| 2285 | if (field.is_digital_joystick()) | |
| 2286 | { | |
| 2287 | joystick = &field.manager().digjoystick(field.player(), (field.type() - (IPT_DIGITAL_JOYSTICK_FIRST + 1)) / 4); | |
| 2288 | joydir = joystick->set_axis(field); | |
| 2289 | } | |
| 2238 | 2290 | |
| 2239 | if (field->flags & ANALOG_FLAG_RESET) | |
| 2240 | /* delta values reverse from center */ | |
| 2241 | state->reverse_val = 0; | |
| 2242 | else | |
| 2291 | // Name keyboard key names | |
| 2292 | if (field.type_class() == INPUT_CLASS_KEYBOARD && field.specific_name() == NULL) | |
| 2293 | { | |
| 2294 | // loop through each character on the field | |
| 2295 | astring tempstr; | |
| 2296 | for (int which = 0; ; which++) | |
| 2243 | 2297 | { |
| 2244 | /* positional controls reverse from their max range */ | |
| 2245 | state->reverse_val = state->maximum + state->minimum; | |
| 2246 | ||
| 2247 | /* relative controls reverse from 1 past their max range */ | |
| 2248 | if (state->wraps) | |
| 2249 | state->reverse_val -= INPUT_RELATIVE_PER_PIXEL; | |
| 2298 | unicode_char ch = field.keyboard_code(which); | |
| 2299 | if (ch == 0) | |
| 2300 | break; | |
| 2301 | name.catprintf("%-*s ", MAX(SPACE_COUNT - 1, 0), field.manager().natkeyboard().key_name(tempstr, ch)); | |
| 2250 | 2302 | } |
| 2251 | } | |
| 2252 | 2303 | |
| 2253 | /* compute scale for keypresses */ | |
| 2254 | state->keyscalepos = RECIP_SCALE(state->scalepos); | |
| 2255 | state->keyscaleneg = RECIP_SCALE(state->scaleneg); | |
| 2304 | // trim extra spaces | |
| 2305 | name.trimspace(); | |
| 2256 | 2306 | |
| 2257 | return state; | |
| 2307 | // special case | |
| 2308 | if (name.len() == 0) | |
| 2309 | name.cpy("Unnamed Key"); | |
| 2310 | } | |
| 2258 | 2311 | } |
| 2259 | 2312 | |
| 2260 | 2313 | |
| 2261 | 2314 | |
| 2262 | /*************************************************************************** | |
| 2263 | ONCE-PER-FRAME UPDATES | |
| 2264 | ***************************************************************************/ | |
| 2315 | //************************************************************************** | |
| 2316 | // I/O PORT | |
| 2317 | //************************************************************************** | |
| 2265 | 2318 | |
| 2266 | /*------------------------------------------------- | |
| 2267 | frame_update_callback - system-wide callback to | |
| 2268 | update the input ports once per frame, but | |
| 2269 | only if we are not paused | |
| 2270 | -------------------------------------------------*/ | |
| 2319 | //------------------------------------------------- | |
| 2320 | // ioport_port - constructor | |
| 2321 | //------------------------------------------------- | |
| 2271 | 2322 | |
| 2272 | static void frame_update_callback(running_machine &machine) | |
| 2323 | ioport_port::ioport_port(device_t &owner, const char *tag) | |
| 2324 | : m_next(NULL), | |
| 2325 | m_device(owner), | |
| 2326 | m_tag(tag), | |
| 2327 | m_modcount(0), | |
| 2328 | m_active(0), | |
| 2329 | m_live(NULL) | |
| 2273 | 2330 | { |
| 2274 | /* if we're paused, don't do anything */ | |
| 2275 | if (machine.paused()) | |
| 2276 | return; | |
| 2277 | ||
| 2278 | /* otherwise, use the common code */ | |
| 2279 | frame_update(machine); | |
| 2280 | 2331 | } |
| 2281 | 2332 | |
| 2282 | static key_buffer *get_buffer(running_machine &machine) | |
| 2333 | ||
| 2334 | //------------------------------------------------- | |
| 2335 | // ~ioport_port - destructor | |
| 2336 | //------------------------------------------------- | |
| 2337 | ||
| 2338 | ioport_port::~ioport_port() | |
| 2283 | 2339 | { |
| 2284 | ioport_manager &portdata = machine.ioport(); | |
| 2285 | assert(inputx_can_post(machine)); | |
| 2286 | return (key_buffer *)&portdata.keybuffer; | |
| 2340 | global_free(m_live); | |
| 2287 | 2341 | } |
| 2288 | 2342 | |
| 2289 | 2343 | |
| 2344 | //------------------------------------------------- | |
| 2345 | // machine - return a reference to the running | |
| 2346 | // machine | |
| 2347 | //------------------------------------------------- | |
| 2290 | 2348 | |
| 2291 | ||
| 2349 | ru | |
| 2292 | 2350 | { |
| 2293 | int i; | |
| 2294 | ||
| 2295 | assert(codes); | |
| 2296 | for (i = 0; codes[i].ch; i++) | |
| 2297 | { | |
| 2298 | if (codes[i].ch == ch) | |
| 2299 | return &codes[i]; | |
| 2300 | } | |
| 2301 | return NULL; | |
| 2351 | return m_device.machine(); | |
| 2302 | 2352 | } |
| 2303 | 2353 | |
| 2304 | /*------------------------------------------------- | |
| 2305 | input_port_update_hook - hook function | |
| 2306 | called from core to allow for natural keyboard | |
| 2307 | -------------------------------------------------*/ | |
| 2308 | 2354 | |
| 2309 | static void input_port_update_hook(running_machine &machine, const input_port_config *port, input_port_value *digital) | |
| 2355 | //------------------------------------------------- | |
| 2356 | // manager - return a reference to the | |
| 2357 | // ioport_manager on the running machine | |
| 2358 | //------------------------------------------------- | |
| 2359 | ||
| 2360 | ioport_manager &ioport_port::manager() const | |
| 2310 | 2361 | { |
| 2311 | ioport_manager &portdata = machine.ioport(); | |
| 2312 | const key_buffer *keybuf; | |
| 2313 | const inputx_code *code; | |
| 2314 | unicode_char ch; | |
| 2315 | int i; | |
| 2316 | UINT32 value; | |
| 2362 | return machine().ioport(); | |
| 2363 | } | |
| 2317 | 2364 | |
| 2318 | if (inputx_can_post(machine)) | |
| 2319 | { | |
| 2320 | keybuf = get_buffer(machine); | |
| 2321 | 2365 | |
| 2322 | /* is the key down right now? */ | |
| 2323 | if (keybuf && keybuf->status_keydown && (keybuf->begin_pos != keybuf->end_pos)) | |
| 2324 | { | |
| 2325 | /* identify the character that is down right now, and its component codes */ | |
| 2326 | ch = keybuf->buffer[keybuf->begin_pos]; | |
| 2327 | code = find_code(portdata.codes, ch); | |
| 2366 | //------------------------------------------------- | |
| 2367 | // field - return a pointer to the first field | |
| 2368 | // that intersects the given mask | |
| 2369 | //------------------------------------------------- | |
| 2328 | 2370 | |
| 2329 | /* loop through this character's component codes */ | |
| 2330 | if (code != NULL) | |
| 2331 | { | |
| 2332 | for (i = 0; i < ARRAY_LENGTH(code->field) && (code->field[i] != NULL); i++) | |
| 2333 | { | |
| 2334 | if (&code->field[i]->port() == port) | |
| 2335 | { | |
| 2336 | value = code->field[i]->mask; | |
| 2337 | *digital |= value; | |
| 2338 | } | |
| 2339 | } | |
| 2340 | } | |
| 2341 | } | |
| 2342 | } | |
| 2371 | ioport_field *ioport_port::field(ioport_value mask) | |
| 2372 | { | |
| 2373 | // if we got the port, look for the field | |
| 2374 | for (ioport_field *field = first_field(); field != NULL; field = field->next()) | |
| 2375 | if ((field->mask() & mask) != 0) | |
| 2376 | return field; | |
| 2377 | return NULL; | |
| 2343 | 2378 | } |
| 2344 | 2379 | |
| 2345 | 2380 | |
| 2346 | /*------------------------------------------------- | |
| 2347 | frame_update - core logic for per-frame input | |
| 2348 | port updating | |
| 2349 | -------------------------------------------------*/ | |
| 2381 | //------------------------------------------------- | |
| 2382 | // read - return the value of an I/O port | |
| 2383 | //------------------------------------------------- | |
| 2350 | 2384 | |
| 2351 | ||
| 2385 | ||
| 2352 | 2386 | { |
| 2353 | ioport_manager &portdata = machine.ioport(); | |
| 2354 | const input_field_config *mouse_field = NULL; | |
| 2355 | int ui_visible = ui_is_menu_active(); | |
| 2356 | attotime curtime = machine.time(); | |
| 2357 | const input_port_config *port; | |
| 2358 | render_target *mouse_target; | |
| 2359 | INT32 mouse_target_x; | |
| 2360 | INT32 mouse_target_y; | |
| 2361 | int mouse_button; | |
| 2387 | assert_always(manager().safe_to_read(), "Input ports cannot be read at init time!"); | |
| 2362 | 2388 | |
| 2363 | g_profiler.start(PROFILER_INPUT); | |
| 2389 | // start with the digital state | |
| 2390 | ioport_value result = m_live->digital; | |
| 2364 | 2391 | |
| 2365 | /* record/playback information about the current frame */ | |
| 2366 | playback_frame(machine, curtime); | |
| 2367 | record_frame(machine, curtime); | |
| 2392 | // insert dynamic read values | |
| 2393 | for (dynamic_field *dynfield = m_live->readlist.first(); dynfield != NULL; dynfield = dynfield->next()) | |
| 2394 | dynfield->read(result); | |
| 2368 | 2395 | |
| 2369 | /* track the duration of the previous frame */ | |
| 2370 | portdata.last_delta_nsec = (curtime - portdata.last_frame_time).as_attoseconds() / ATTOSECONDS_PER_NANOSECOND; | |
| 2371 | portdata.last_frame_time = curtime; | |
| 2396 | // apply active high/low state to digital and dynamic read inputs | |
| 2397 | result ^= m_live->defvalue; | |
| 2372 | 2398 | |
| 2373 | /* update the digital joysticks */ | |
| 2374 | frame_update_digital_joysticks(machine); | |
| 2399 | // insert analog portions | |
| 2400 | for (analog_field *analog = m_live->analoglist.first(); analog != NULL; analog = analog->next()) | |
| 2401 | analog->read(result); | |
| 2375 | 2402 | |
| 2376 | /* compute default values for all the ports */ | |
| 2377 | input_port_update_defaults(machine); | |
| 2403 | return result; | |
| 2404 | } | |
| 2378 | 2405 | |
| 2379 | /* perform the mouse hit test */ | |
| 2380 | mouse_target = ui_input_find_mouse(machine, &mouse_target_x, &mouse_target_y, &mouse_button); | |
| 2381 | if (mouse_button && mouse_target) | |
| 2382 | { | |
| 2383 | const char *tag = NULL; | |
| 2384 | input_port_value mask; | |
| 2385 | float x, y; | |
| 2386 | if (mouse_target->map_point_input(mouse_target_x, mouse_target_y, tag, mask, x, y)) | |
| 2387 | mouse_field = input_field_by_tag_and_mask(machine, tag, mask); | |
| 2388 | } | |
| 2389 | 2406 | |
| 2390 | /* loop over all input ports */ | |
| 2391 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 2392 | { | |
| 2393 | const input_field_config *field; | |
| 2394 | device_field_info *device_field; | |
| 2395 | input_port_value newvalue; | |
| 2407 | //------------------------------------------------- | |
| 2408 | // write - write a value to a port | |
| 2409 | //------------------------------------------------- | |
| 2396 | 2410 | |
| 2397 | /* start with 0 values for the digital and VBLANK bits */ | |
| 2398 | port->state->digital = 0; | |
| 2399 | port->state->vblank = 0; | |
| 2411 | void ioport_port::write(ioport_value data, ioport_value mem_mask) | |
| 2412 | { | |
| 2413 | // call device line write handlers | |
| 2414 | COMBINE_DATA(&m_live->outputvalue); | |
| 2415 | for (dynamic_field *dynfield = m_live->writelist.first(); dynfield != NULL; dynfield = dynfield->next()) | |
| 2416 | if (dynfield->field().type() == IPT_OUTPUT) | |
| 2417 | dynfield->write(m_live->outputvalue); | |
| 2418 | } | |
| 2400 | 2419 | |
| 2401 | /* now loop back and modify based on the inputs */ | |
| 2402 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 2403 | if (input_condition_true(port->machine(), &field->condition, port->owner())) | |
| 2404 | { | |
| 2405 | /* accumulate VBLANK bits */ | |
| 2406 | if (field->type == IPT_VBLANK) | |
| 2407 | port->state->vblank ^= field->mask; | |
| 2408 | 2420 | |
| 2409 | /* handle analog inputs */ | |
| 2410 | else if (field->state->analog != NULL) | |
| 2411 | frame_update_analog_field(machine, field->state->analog); | |
| 2421 | //------------------------------------------------- | |
| 2422 | // frame_update - once/frame update | |
| 2423 | //------------------------------------------------- | |
| 2412 | 2424 | |
| 2413 | /* handle non-analog types, but only when the UI isn't visible */ | |
| 2414 | else if (!ui_visible && frame_get_digital_field_state(field, field == mouse_field)) | |
| 2415 | port->state->digital |= field->mask; | |
| 2416 | } | |
| 2425 | void ioport_port::frame_update(ioport_field *mouse_field) | |
| 2426 | { | |
| 2427 | // start with 0 values for the digital bits | |
| 2428 | m_live->digital = 0; | |
| 2417 | 2429 | |
| 2418 | /* hook for MESS's natural keyboard support */ | |
| 2419 | input_port_update_hook(machine, port, &port->state->digital); | |
| 2430 | // now loop back and modify based on the inputs | |
| 2431 | for (ioport_field *field = first_field(); field != NULL; field = field->next()) | |
| 2432 | field->frame_update(m_live->digital, field == mouse_field); | |
| 2420 | 2433 | |
| 2421 | /* handle playback/record */ | |
| 2422 | playback_port(port); | |
| 2423 | record_port(port); | |
| 2434 | // hook for MESS's natural keyboard support | |
| 2435 | manager().natkeyboard().frame_update(*this, m_live->digital); | |
| 2424 | 2436 | |
| 2425 | /* call device line write handlers */ | |
| 2426 | newvalue = input_port_read_direct(port); | |
| 2427 | for (device_field = port->state->writedevicelist; device_field; device_field = device_field->next) | |
| 2428 | if (device_field->field->type != IPT_OUTPUT && input_condition_true(port->machine(), &device_field->field->condition, port->owner())) | |
| 2429 | { | |
| 2430 | input_port_value newval = (newvalue & device_field->field->mask) >> device_field->shift; | |
| 2437 | // call device line write handlers | |
| 2438 | ioport_value newvalue = read(); | |
| 2439 | for (dynamic_field *dynfield = m_live->writelist.first(); dynfield != NULL; dynfield = dynfield->next()) | |
| 2440 | if (dynfield->field().type() != IPT_OUTPUT) | |
| 2441 | dynfield->write(newvalue); | |
| 2442 | } | |
| 2431 | 2443 | |
| 2432 | /* if the bits have write, call the handler */ | |
| 2433 | if (device_field->oldval != newval) | |
| 2434 | { | |
| 2435 | device_field->field->write(*device_field->field, device_field->field->write_param, device_field->oldval, newval); | |
| 2436 | 2444 | |
| 2437 | device_field->oldval = newval; | |
| 2438 | } | |
| 2439 | } | |
| 2440 | } | |
| 2445 | //------------------------------------------------- | |
| 2446 | // collapse_fields - remove any fields that are | |
| 2447 | // wholly overlapped by other fields | |
| 2448 | //------------------------------------------------- | |
| 2441 | 2449 | |
| 2442 | g_profiler.stop(); | |
| 2450 | void ioport_port::collapse_fields(astring &errorbuf) | |
| 2451 | { | |
| 2452 | ioport_value maskbits = 0; | |
| 2453 | int lastmodcount = -1; | |
| 2454 | ||
| 2455 | // remove the whole list and start from scratch | |
| 2456 | ioport_field *field = m_fieldlist.detach_all(); | |
| 2457 | while (field != NULL) | |
| 2458 | { | |
| 2459 | // if this modcount doesn't match, reset | |
| 2460 | if (field->modcount() != lastmodcount) | |
| 2461 | { | |
| 2462 | lastmodcount = field->modcount(); | |
| 2463 | maskbits = 0; | |
| 2464 | } | |
| 2465 | ||
| 2466 | // reinsert this field | |
| 2467 | ioport_field *current = field; | |
| 2468 | field = field->next(); | |
| 2469 | insert_field(*current, maskbits, errorbuf); | |
| 2470 | } | |
| 2443 | 2471 | } |
| 2444 | 2472 | |
| 2445 | 2473 | |
| 2446 | /*------------------------------------------------- | |
| 2447 | frame_update_digital_joysticks - update the | |
| 2448 | state of digital joysticks prior to | |
| 2449 | accumulating the results in a port | |
| 2450 | -------------------------------------------------*/ | |
| 2474 | //------------------------------------------------- | |
| 2475 | // insert_field - insert a new field, checking | |
| 2476 | // for errors | |
| 2477 | //------------------------------------------------- | |
| 2451 | 2478 | |
| 2452 | ||
| 2479 | ||
| 2453 | 2480 | { |
| 2454 | ioport_manager &portdata = machine.ioport(); | |
| 2455 | int player, joyindex; | |
| 2481 | // verify against the disallowed bits, but only if we are condition-free | |
| 2482 | if (newfield.condition().none()) | |
| 2483 | { | |
| 2484 | if ((newfield.mask() & disallowedbits) != 0) | |
| 2485 | errorbuf.catprintf("INPUT_TOKEN_FIELD specifies duplicate port bits (port=%s mask=%X)\n", tag(), newfield.mask()); | |
| 2486 | disallowedbits |= newfield.mask(); | |
| 2487 | } | |
| 2456 | 2488 | |
| 2457 | /* loop over all the joysticks */ | |
| 2458 | for (player = 0; player < MAX_PLAYERS; player++) | |
| 2459 | for (joyindex = 0; joyindex < DIGITAL_JOYSTICKS_PER_PLAYER; joyindex++) | |
| 2489 | // first modify/nuke any entries that intersect our maskbits | |
| 2490 | ioport_field *nextfield; | |
| 2491 | for (ioport_field *field = first_field(); field != NULL; field = nextfield) | |
| 2492 | { | |
| 2493 | nextfield = field->next(); | |
| 2494 | if ((field->mask() & newfield.mask()) != 0 && | |
| 2495 | (newfield.condition().none() || field->condition().none() || field->condition() == newfield.condition())) | |
| 2460 | 2496 | { |
| 2461 | digital_joystick_state *joystick = &portdata.joystick_info[player][joyindex]; | |
| 2462 | if (joystick->inuse) | |
| 2463 | { | |
| 2464 | joystick->previous = joystick->current; | |
| 2465 | joystick->current = 0; | |
| 2497 | // reduce the mask of the field we found | |
| 2498 | field->reduce_mask(newfield.mask()); | |
| 2466 | 2499 | |
| 2467 | /* read all the associated ports */ | |
| 2468 | if (joystick->field[JOYDIR_UP] != NULL && machine.input().seq_pressed(input_field_seq(joystick->field[JOYDIR_UP], SEQ_TYPE_STANDARD))) | |
| 2469 | joystick->current |= JOYDIR_UP_BIT; | |
| 2470 | if (joystick->field[JOYDIR_DOWN] != NULL && machine.input().seq_pressed(input_field_seq(joystick->field[JOYDIR_DOWN], SEQ_TYPE_STANDARD))) | |
| 2471 | joystick->current |= JOYDIR_DOWN_BIT; | |
| 2472 | if (joystick->field[JOYDIR_LEFT] != NULL && machine.input().seq_pressed(input_field_seq(joystick->field[JOYDIR_LEFT], SEQ_TYPE_STANDARD))) | |
| 2473 | joystick->current |= JOYDIR_LEFT_BIT; | |
| 2474 | if (joystick->field[JOYDIR_RIGHT] != NULL && machine.input().seq_pressed(input_field_seq(joystick->field[JOYDIR_RIGHT], SEQ_TYPE_STANDARD))) | |
| 2475 | joystick->current |= JOYDIR_RIGHT_BIT; | |
| 2500 | // if the new entry fully overrides the previous one, we nuke | |
| 2501 | if (INPUT_PORT_OVERRIDE_FULLY_NUKES_PREVIOUS || field->mask() == 0) | |
| 2502 | m_fieldlist.remove(*field); | |
| 2503 | } | |
| 2504 | } | |
| 2476 | 2505 | |
| 2477 | /* lock out opposing directions (left + right or up + down) */ | |
| 2478 | if ((joystick->current & (JOYDIR_UP_BIT | JOYDIR_DOWN_BIT)) == (JOYDIR_UP_BIT | JOYDIR_DOWN_BIT)) | |
| 2479 | joystick->current &= ~(JOYDIR_UP_BIT | JOYDIR_DOWN_BIT); | |
| 2480 | if ((joystick->current & (JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT)) == (JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT)) | |
| 2481 | joystick->current &= ~(JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT); | |
| 2506 | // make a mask of just the low bit | |
| 2507 | ioport_value lowbit = (newfield.mask() ^ (newfield.mask() - 1)) & newfield.mask(); | |
| 2482 | 2508 | |
| 2483 | /* only update 4-way case if joystick has moved */ | |
| 2484 | if (joystick->current != joystick->previous) | |
| 2485 | { | |
| 2486 | joystick->current4way = joystick->current; | |
| 2509 | // scan forward to find where to insert ourselves | |
| 2510 | ioport_field *field; | |
| 2511 | for (field = first_field(); field != NULL; field = field->next()) | |
| 2512 | if (field->mask() > lowbit) | |
| 2513 | break; | |
| 2487 | 2514 | |
| 2488 | /* | |
| 2489 | If joystick is pointing at a diagonal, acknowledge that the player moved | |
| 2490 | the joystick by favoring a direction change. This minimizes frustration | |
| 2491 | when using a keyboard for input, and maximizes responsiveness. | |
| 2515 | // insert it into the list | |
| 2516 | m_fieldlist.insert_before(newfield, field); | |
| 2517 | } | |
| 2492 | 2518 | |
| 2493 | For example, if you are holding "left" then switch to "up" (where both left | |
| 2494 | and up are briefly pressed at the same time), we'll transition immediately | |
| 2495 | to "up." | |
| 2496 | 2519 | |
| 2497 | Zero any switches that didn't change from the previous to current state. | |
| 2498 | */ | |
| 2499 | if ((joystick->current4way & (JOYDIR_UP_BIT | JOYDIR_DOWN_BIT)) && | |
| 2500 | (joystick->current4way & (JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT))) | |
| 2501 | { | |
| 2502 | joystick->current4way ^= joystick->current4way & joystick->previous; | |
| 2503 | } | |
| 2520 | //------------------------------------------------- | |
| 2521 | // init_live_state - create the live state | |
| 2522 | //------------------------------------------------- | |
| 2504 | 2523 | |
| 2505 | /* | |
| 2506 | If we are still pointing at a diagonal, we are in an indeterminant state. | |
| 2524 | void ioport_port::init_live_state() | |
| 2525 | { | |
| 2526 | m_live = global_alloc(ioport_port_live(*this)); | |
| 2527 | } | |
| 2507 | 2528 | |
| 2508 | This could happen if the player moved the joystick from the idle position directly | |
| 2509 | to a diagonal, or from one diagonal directly to an extreme diagonal. | |
| 2510 | 2529 | |
| 2511 | The chances of this happening with a keyboard are slim, but we still need to | |
| 2512 | constrain this case. | |
| 2513 | 2530 | |
| 2514 | For now, just resolve randomly. | |
| 2515 | */ | |
| 2516 | if ((joystick->current4way & (JOYDIR_UP_BIT | JOYDIR_DOWN_BIT)) && | |
| 2517 | (joystick->current4way & (JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT))) | |
| 2518 | { | |
| 2519 | if (machine.rand() & 1) | |
| 2520 | joystick->current4way &= ~(JOYDIR_LEFT_BIT | JOYDIR_RIGHT_BIT); | |
| 2521 | else | |
| 2522 | joystick->current4way &= ~(JOYDIR_UP_BIT | JOYDIR_DOWN_BIT); | |
| 2523 | } | |
| 2524 | } | |
| 2525 | } | |
| 2526 | } | |
| 2527 | } | |
| 2531 | //************************************************************************** | |
| 2532 | // I/O PORT LIVE STATE | |
| 2533 | //************************************************************************** | |
| 2528 | 2534 | |
| 2535 | //------------------------------------------------- | |
| 2536 | // ioport_port_live - constructor | |
| 2537 | //------------------------------------------------- | |
| 2529 | 2538 | |
| 2530 | /*------------------------------------------------- | |
| 2531 | frame_update_analog_field - update the | |
| 2532 | internals of a single analog field | |
| 2533 | -------------------------------------------------*/ | |
| 2534 | ||
| 2535 | static void frame_update_analog_field(running_machine &machine, analog_field_state *analog) | |
| 2539 | ioport_port_live::ioport_port_live(ioport_port &port) | |
| 2540 | : defvalue(0), | |
| 2541 | digital(0), | |
| 2542 | outputvalue(0) | |
| 2536 | 2543 | { |
| 2537 | input_item_class itemclass; | |
| 2538 | int keypressed = FALSE; | |
| 2539 | INT64 keyscale; | |
| 2540 | INT32 rawvalue; | |
| 2541 | INT32 delta = 0; | |
| 2544 | // iterate over fields | |
| 2545 | for (ioport_field *field = port.first_field(); field != NULL; field = field->next()) | |
| 2546 | { | |
| 2547 | // allocate analog state if it's analog | |
| 2548 | analog_field *analog = NULL; | |
| 2549 | if (field->is_analog()) | |
| 2550 | analog = &analoglist.append(*global_alloc(analog_field(*field))); | |
| 2551 | ||
| 2552 | // allocate a dynamic field for reading | |
| 2553 | if (field->has_dynamic_read()) | |
| 2554 | readlist.append(*global_alloc(dynamic_field(*field))); | |
| 2555 | ||
| 2556 | // allocate a dynamic field for writing | |
| 2557 | if (field->has_dynamic_write()) | |
| 2558 | writelist.append(*global_alloc(dynamic_field(*field))); | |
| 2559 | ||
| 2560 | // let the field initialize its live state | |
| 2561 | field->init_live_state(analog); | |
| 2562 | } | |
| 2563 | } | |
| 2542 | 2564 | |
| 2543 | /* clamp the previous value to the min/max range and remember it */ | |
| 2544 | analog->previous = analog->accum = apply_analog_min_max(analog, analog->accum); | |
| 2545 | 2565 | |
| 2546 | /* get the new raw analog value and its type */ | |
| 2547 | rawvalue = machine.input().seq_axis_value(input_field_seq(analog->field, SEQ_TYPE_STANDARD), itemclass); | |
| 2548 | 2566 | |
| 2549 | /* if we got an absolute input, it overrides everything else */ | |
| 2550 | if (itemclass == ITEM_CLASS_ABSOLUTE) | |
| 2551 | { | |
| 2552 | if (analog->previousanalog != rawvalue) | |
| 2553 | { | |
| 2554 | /* only update if analog value changed */ | |
| 2555 | analog->previousanalog = rawvalue; | |
| 2567 | //************************************************************************** | |
| 2568 | // I/O PORT MANAGER | |
| 2569 | //************************************************************************** | |
| 2556 | 2570 | |
| 2557 | /* apply the inverse of the sensitivity to the raw value so that */ | |
| 2558 | /* it will still cover the full min->max range requested after */ | |
| 2559 | /* we apply the sensitivity adjustment */ | |
| 2560 | if (analog->absolute || (analog->field->flags & ANALOG_FLAG_RESET)) | |
| 2561 | { | |
| 2562 | /* if port is absolute, then just return the absolute data supplied */ | |
| 2563 | analog->accum = APPLY_INVERSE_SENSITIVITY(rawvalue, analog->sensitivity); | |
| 2564 | } | |
| 2565 | else if (analog->positionalscale != 0) | |
| 2566 | { | |
| 2567 | /* if port is positional, we will take the full analog control and divide it */ | |
| 2568 | /* into positions, that way as the control is moved full scale, */ | |
| 2569 | /* it moves through all the positions */ | |
| 2570 | rawvalue = APPLY_SCALE(rawvalue - INPUT_ABSOLUTE_MIN, analog->positionalscale) * INPUT_RELATIVE_PER_PIXEL + analog->minimum; | |
| 2571 | //------------------------------------------------- | |
| 2572 | // ioport_manager - constructor | |
| 2573 | //------------------------------------------------- | |
| 2571 | 2574 | |
| 2572 | /* clamp the high value so it does not roll over */ | |
| 2573 | rawvalue = MIN(rawvalue, analog->maximum); | |
| 2574 | analog->accum = APPLY_INVERSE_SENSITIVITY(rawvalue, analog->sensitivity); | |
| 2575 | } | |
| 2576 | else | |
| 2577 | /* if port is relative, we use the value to simulate the speed of relative movement */ | |
| 2578 | /* sensitivity adjustment is allowed for this mode */ | |
| 2579 | analog->accum += rawvalue; | |
| 2575 | ioport_manager::ioport_manager(running_machine &machine) | |
| 2576 | : m_machine(machine), | |
| 2577 | m_safe_to_read(false), | |
| 2578 | m_natkeyboard(machine), | |
| 2579 | m_last_frame_time(attotime::zero), | |
| 2580 | m_last_delta_nsec(0), | |
| 2581 | m_record_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS), | |
| 2582 | m_playback_file(machine.options().input_directory(), OPEN_FLAG_READ), | |
| 2583 | m_playback_accumulated_speed(0), | |
| 2584 | m_playback_accumulated_frames(0) | |
| 2585 | { | |
| 2586 | memset(m_type_to_entry, 0, sizeof(m_type_to_entry)); | |
| 2587 | } | |
| 2580 | 2588 | |
| 2581 | analog->lastdigital = FALSE; | |
| 2582 | /* do not bother with other control types if the analog data is changing */ | |
| 2583 | return; | |
| 2584 | } | |
| 2585 | else | |
| 2586 | { | |
| 2587 | /* we still have to update fake relative from joystick control */ | |
| 2588 | if (!analog->absolute && analog->positionalscale == 0) | |
| 2589 | analog->accum += rawvalue; | |
| 2590 | } | |
| 2591 | } | |
| 2592 | 2589 | |
| 2593 | /* if we got it from a relative device, use that as the starting delta */ | |
| 2594 | /* also note that the last input was not a digital one */ | |
| 2595 | if (itemclass == ITEM_CLASS_RELATIVE && rawvalue != 0) | |
| 2596 | { | |
| 2597 | delta = rawvalue; | |
| 2598 | analog->lastdigital = FALSE; | |
| 2599 | } | |
| 2590 | //------------------------------------------------- | |
| 2591 | // initialize - walk the configured ports and | |
| 2592 | // create live state information | |
| 2593 | //------------------------------------------------- | |
| 2600 | 2594 | |
| 2601 | keyscale = (analog->accum >= 0) ? analog->keyscalepos : analog->keyscaleneg; | |
| 2595 | time_t ioport_manager::initialize() | |
| 2596 | { | |
| 2597 | // add an exit callback and a frame callback | |
| 2598 | machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ioport_manager::exit), this)); | |
| 2599 | machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update), this)); | |
| 2602 | 2600 | |
| 2603 | /* if the decrement code sequence is pressed, add the key delta to */ | |
| 2604 | /* the accumulated delta; also note that the last input was a digital one */ | |
| 2605 | if (machine.input().seq_pressed(input_field_seq(analog->field, SEQ_TYPE_DECREMENT))) | |
| 2606 | { | |
| 2607 | keypressed = TRUE; | |
| 2608 | if (analog->delta != 0) | |
| 2609 | delta -= APPLY_SCALE(analog->delta, keyscale); | |
| 2610 | else if (!analog->lastdigital) | |
| 2611 | /* decrement only once when first pressed */ | |
| 2612 | delta -= APPLY_SCALE(1, keyscale); | |
| 2613 | analog->lastdigital = TRUE; | |
| 2614 | } | |
| 2601 | // initialize the default port info from the OSD | |
| 2602 | init_port_types(); | |
| 2615 | 2603 | |
| 2616 | /* same for the increment code sequence */ | |
| 2617 | if (machine.input().seq_pressed(input_field_seq(analog->field, SEQ_TYPE_INCREMENT))) | |
| 2604 | // if we have a token list, proceed | |
| 2605 | device_iterator iter(machine().root_device()); | |
| 2606 | for (device_t *device = iter.first(); device != NULL; device = iter.next()) | |
| 2618 | 2607 | { |
| 2619 | keypressed = TRUE; | |
| 2620 | if (analog->delta) | |
| 2621 | delta += APPLY_SCALE(analog->delta, keyscale); | |
| 2622 | else if (!analog->lastdigital) | |
| 2623 | /* increment only once when first pressed */ | |
| 2624 | delta += APPLY_SCALE(1, keyscale); | |
| 2625 | analog->lastdigital = TRUE; | |
| 2608 | astring errors; | |
| 2609 | m_portlist.append(*device, errors); | |
| 2610 | if (errors) | |
| 2611 | mame_printf_error("Input port errors:\n%s", errors.cstr()); | |
| 2626 | 2612 | } |
| 2627 | 2613 | |
| 2628 | /* if resetting is requested, clear the accumulated position to 0 before */ | |
| 2629 | /* applying the deltas so that we only return this frame's delta */ | |
| 2630 | /* note that centering only works for relative controls */ | |
| 2631 | /* no need to check if absolute here because it is checked by the validity tests */ | |
| 2632 | if (analog->field->flags & ANALOG_FLAG_RESET) | |
| 2633 | analog->accum = 0; | |
| 2614 | // allocate live structures to mirror the configuration | |
| 2615 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2616 | port->init_live_state(); | |
| 2634 | 2617 | |
| 2635 | /* apply the delta to the accumulated value */ | |
| 2636 | analog->accum += delta; | |
| 2618 | // handle autoselection of devices | |
| 2619 | init_autoselect_devices(IPT_AD_STICK_X, IPT_AD_STICK_Y, IPT_AD_STICK_Z, OPTION_ADSTICK_DEVICE, "analog joystick"); | |
| 2620 | init_autoselect_devices(IPT_PADDLE, IPT_PADDLE_V, 0, OPTION_PADDLE_DEVICE, "paddle"); | |
| 2621 | init_autoselect_devices(IPT_PEDAL, IPT_PEDAL2, IPT_PEDAL3, OPTION_PEDAL_DEVICE, "pedal"); | |
| 2622 | init_autoselect_devices(IPT_LIGHTGUN_X, IPT_LIGHTGUN_Y, 0, OPTION_LIGHTGUN_DEVICE, "lightgun"); | |
| 2623 | init_autoselect_devices(IPT_POSITIONAL, IPT_POSITIONAL_V, 0, OPTION_POSITIONAL_DEVICE, "positional"); | |
| 2624 | init_autoselect_devices(IPT_DIAL, IPT_DIAL_V, 0, OPTION_DIAL_DEVICE, "dial"); | |
| 2625 | init_autoselect_devices(IPT_TRACKBALL_X, IPT_TRACKBALL_Y, 0, OPTION_TRACKBALL_DEVICE, "trackball"); | |
| 2626 | init_autoselect_devices(IPT_MOUSE_X, IPT_MOUSE_Y, 0, OPTION_MOUSE_DEVICE, "mouse"); | |
| 2637 | 2627 | |
| 2638 | /* if our last movement was due to a digital input, and if this control */ | |
| 2639 | /* type autocenters, and if neither the increment nor the decrement seq */ | |
| 2640 | /* was pressed, apply autocentering */ | |
| 2641 | if (analog->autocenter) | |
| 2642 | { | |
| 2643 | INT32 center = APPLY_INVERSE_SENSITIVITY(analog->center, analog->sensitivity); | |
| 2644 | if (analog->lastdigital && !keypressed) | |
| 2645 | { | |
| 2646 | /* autocenter from positive values */ | |
| 2647 | if (analog->accum >= center) | |
| 2648 | { | |
| 2649 | analog->accum -= APPLY_SCALE(analog->centerdelta, analog->keyscalepos); | |
| 2650 | if (analog->accum < center) | |
| 2628 | // look for 4-way joysticks and change the default map if we find any | |
| 2629 | const char *joystick_map_default = machine().options().joystick_map(); | |
| 2630 | if (joystick_map_default[0] == 0 || strcmp(joystick_map_default, "auto") == 0) | |
| 2631 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2632 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2633 | if (field->live().joystick != NULL && field->way() == 4) | |
| 2651 | 2634 | { |
| 2652 | analog->accum = center; | |
| 2653 | analog->lastdigital = FALSE; | |
| 2635 | machine().input().set_global_joystick_map(field->rotated() ? joystick_map_4way_diagonal : joystick_map_4way_sticky); | |
| 2636 | break; | |
| 2654 | 2637 | } |
| 2655 | } | |
| 2656 | 2638 | |
| 2657 | /* autocenter from negative values */ | |
| 2658 | else | |
| 2659 | { | |
| 2660 | analog->accum += APPLY_SCALE(analog->centerdelta, analog->keyscaleneg); | |
| 2661 | if (analog->accum > center) | |
| 2662 | { | |
| 2663 | analog->accum = center; | |
| 2664 | analog->lastdigital = FALSE; | |
| 2665 | } | |
| 2666 | } | |
| 2667 | } | |
| 2668 | } | |
| 2669 | else if (!keypressed) | |
| 2670 | analog->lastdigital = FALSE; | |
| 2639 | // register callbacks for when we load configurations | |
| 2640 | config_register(machine(), "input", config_saveload_delegate(FUNC(ioport_manager::load_config), this), config_saveload_delegate(FUNC(ioport_manager::save_config), this)); | |
| 2641 | ||
| 2642 | // open playback and record files if specified | |
| 2643 | time_t basetime = playback_init(); | |
| 2644 | record_init(); | |
| 2645 | return basetime; | |
| 2671 | 2646 | } |
| 2672 | 2647 | |
| 2673 | 2648 | |
| 2674 | /*------------------------------------------------- | |
| 2675 | frame_get_digital_field_state - get the state | |
| 2676 | of a digital field | |
| 2677 | -------------------------------------------------*/ | |
| 2649 | //------------------------------------------------- | |
| 2650 | // init_port_types - initialize the default | |
| 2651 | // type list | |
| 2652 | //------------------------------------------------- | |
| 2678 | 2653 | |
| 2679 | ||
| 2654 | vo | |
| 2680 | 2655 | { |
| 2681 | int curstate = mouse_down || field->machine().input().seq_pressed(input_field_seq(field, SEQ_TYPE_STANDARD)); | |
| 2682 | int changed = FALSE; | |
| 2683 | int temp_field_impulse; | |
| 2656 | // convert the array into a list of type states that can be modified | |
| 2657 | construct_core_types(m_typelist); | |
| 2684 | 2658 | |
| 2685 | /* if the state changed, look for switch down/switch up */ | |
| 2686 | if (curstate != field->state->last) | |
| 2659 | // ask the OSD to customize the list | |
| 2660 | machine().osd().customize_input_type_list(m_typelist); | |
| 2661 | ||
| 2662 | // now iterate over the OSD-modified types | |
| 2663 | for (input_type_entry *curtype = first_type(); curtype != NULL; curtype = curtype->next()) | |
| 2687 | 2664 | { |
| 2688 | field->state->last = curstate; | |
| 2689 | changed = TRUE; | |
| 2665 | // first copy all the OSD-updated sequences into our current state | |
| 2666 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 2667 | curtype->m_seq[seqtype] = curtype->defseq(seqtype); | |
| 2668 | ||
| 2669 | // also make a lookup table mapping type/player to the appropriate type list entry | |
| 2670 | m_type_to_entry[curtype->type()][curtype->player()] = curtype; | |
| 2690 | 2671 | } |
| 2672 | } | |
| 2691 | 2673 | |
| 2692 | if (field->type == IPT_KEYBOARD && ui_get_use_natural_keyboard(field->machine())) | |
| 2693 | return FALSE; | |
| 2694 | 2674 | |
| 2695 | /* coin impulse option */ | |
| 2696 | { | |
| 2697 | int temp_option_impulse = field->machine().options().coin_impulse(); | |
| 2698 | temp_field_impulse = field->impulse; | |
| 2699 | if ( temp_option_impulse != 0) | |
| 2700 | { | |
| 2701 | if (temp_option_impulse < 0) | |
| 2702 | temp_field_impulse = 0; | |
| 2703 | else if ((field->type >= IPT_COIN1 && field->type <= IPT_COIN12) || field->impulse != 0) | |
| 2704 | temp_field_impulse = temp_option_impulse; | |
| 2705 | } | |
| 2706 | } | |
| 2675 | //------------------------------------------------- | |
| 2676 | // init_autoselect_devices - autoselect a single | |
| 2677 | // device based on the input port list passed | |
| 2678 | // in and the corresponding option | |
| 2679 | //------------------------------------------------- | |
| 2707 | 2680 | |
| 2708 | /* if this is a switch-down event, handle impulse and toggle */ | |
| 2709 | if (changed && curstate) | |
| 2710 | { | |
| 2711 | /* impluse controls: reset the impulse counter */ | |
| 2712 | if (temp_field_impulse != 0 && field->state->impulse == 0) | |
| 2713 | field->state->impulse = temp_field_impulse; | |
| 2681 | void ioport_manager::init_autoselect_devices(int type1, int type2, int type3, const char *option, const char *ananame) | |
| 2682 | { | |
| 2683 | // if nothing specified, ignore the option | |
| 2684 | const char *stemp = machine().options().value(option); | |
| 2685 | if (stemp[0] == 0) | |
| 2686 | return; | |
| 2714 | 2687 | |
| 2715 | /* toggle controls: flip the toggle state or advance to the next setting */ | |
| 2716 | if (field->flags & FIELD_FLAG_TOGGLE) | |
| 2717 | { | |
| 2718 | if (field->settinglist().count() == 0) | |
| 2719 | field->state->value ^= field->mask; | |
| 2720 | else | |
| 2721 | input_field_select_next_setting(field); | |
| 2722 | } | |
| 2688 | // extract valid strings | |
| 2689 | const char *autostring = "keyboard"; | |
| 2690 | input_device_class autoenable = DEVICE_CLASS_KEYBOARD; | |
| 2691 | if (strcmp(stemp, "mouse") == 0) | |
| 2692 | { | |
| 2693 | autoenable = DEVICE_CLASS_MOUSE; | |
| 2694 | autostring = "mouse"; | |
| 2723 | 2695 | } |
| 2724 | ||
| 2725 | /* update the current state with the impulse state */ | |
| 2726 | if (temp_field_impulse != 0) | |
| 2696 | else if (strcmp(stemp, "joystick") == 0) | |
| 2727 | 2697 | { |
| 2728 | if (field->state->impulse != 0) | |
| 2729 | { | |
| 2730 | field->state->impulse--; | |
| 2731 | curstate = TRUE; | |
| 2732 | } | |
| 2733 | else | |
| 2734 | curstate = FALSE; | |
| 2698 | autoenable = DEVICE_CLASS_JOYSTICK; | |
| 2699 | autostring = "joystick"; | |
| 2735 | 2700 | } |
| 2736 | ||
| 2737 | /* for toggle switches, the current value is folded into the port's default value */ | |
| 2738 | /* so we always return FALSE here */ | |
| 2739 | if (field->flags & FIELD_FLAG_TOGGLE) | |
| 2740 | curstate = FALSE; | |
| 2741 | ||
| 2742 | /* additional logic to restrict digital joysticks */ | |
| 2743 | if (curstate && !mouse_down && field->state->joystick != NULL && field->way != 16 && !field->machine().options().joystick_contradictory()) | |
| 2701 | else if (strcmp(stemp, "lightgun") == 0) | |
| 2744 | 2702 | { |
| 2745 | UINT8 mask = (field->way == 4) ? field->state->joystick->current4way : field->state->joystick->current; | |
| 2746 | if (!(mask & (1 << field->state->joydir))) | |
| 2747 | curstate = FALSE; | |
| 2703 | autoenable = DEVICE_CLASS_LIGHTGUN; | |
| 2704 | autostring = "lightgun"; | |
| 2748 | 2705 | } |
| 2749 | ||
| 2750 | /* skip locked-out coin inputs */ | |
| 2751 | if (curstate && field->type >= IPT_COIN1 && field->type <= IPT_COIN12 && coin_lockout_get_state(field->machine(), field->type - IPT_COIN1)) | |
| 2706 | else if (strcmp(stemp, "none") == 0) | |
| 2752 | 2707 | { |
| 2753 | int verbose = field->machine().options().verbose(); | |
| 2754 | #ifdef MAME_DEBUG | |
| 2755 | verbose = 1; | |
| 2756 | #endif | |
| 2757 | if (field->machine().options().coin_lockout()) | |
| 2758 | { | |
| 2759 | if (verbose) | |
| 2760 | ui_popup_time(3, "Coinlock disabled %s.", input_field_name(field)); | |
| 2761 | return FALSE; /* curstate = FALSE; */ | |
| 2762 | } | |
| 2763 | else | |
| 2764 | if (verbose) | |
| 2765 | ui_popup_time(3, "Coinlock disabled, but broken through %s.", input_field_name(field)); | |
| 2708 | // nothing specified | |
| 2709 | return; | |
| 2766 | 2710 | } |
| 2711 | else if (strcmp(stemp, "keyboard") != 0) | |
| 2712 | mame_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp); | |
| 2767 | 2713 | |
| 2768 | return curstate; | |
| 2714 | // only scan the list if we haven't already enabled this class of control | |
| 2715 | if (first_port() != NULL && !machine().input().device_class(autoenable).enabled()) | |
| 2716 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2717 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2718 | ||
| 2719 | // if this port type is in use, apply the autoselect criteria | |
| 2720 | if ((type1 != 0 && field->type() == type1) || (type2 != 0 && field->type() == type2) || (type3 != 0 && field->type() == type3)) | |
| 2721 | { | |
| 2722 | mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame); | |
| 2723 | machine().input().device_class(autoenable).enable(); | |
| 2724 | break; | |
| 2725 | } | |
| 2769 | 2726 | } |
| 2770 | 2727 | |
| 2771 | 2728 | |
| 2729 | //------------------------------------------------- | |
| 2730 | // exit - exit callback to ensure we clean up | |
| 2731 | // and close our files | |
| 2732 | //------------------------------------------------- | |
| 2772 | 2733 | |
| 2773 | /*************************************************************************** | |
| 2774 | PORT CONFIGURATION HELPERS | |
| 2775 | ***************************************************************************/ | |
| 2776 | ||
| 2777 | /*------------------------------------------------- | |
| 2778 | port_default_value - updates default value | |
| 2779 | of port settings according to device settings | |
| 2780 | -------------------------------------------------*/ | |
| 2781 | ||
| 2782 | UINT32 port_default_value(const char *fulltag, UINT32 mask, UINT32 defval, device_t &owner) | |
| 2734 | void ioport_manager::exit() | |
| 2783 | 2735 | { |
| 2784 | const input_device_default *def = owner.input_ports_defaults(); | |
| 2785 | if (def != NULL) | |
| 2786 | { | |
| 2787 | astring fullpath; | |
| 2788 | for ( ; def->tag != NULL; def++) | |
| 2789 | if (owner.subtag(fullpath, def->tag) == fulltag && def->mask == mask) | |
| 2790 | return def->defvalue; | |
| 2791 | } | |
| 2792 | return defval; | |
| 2736 | // close any playback or recording files | |
| 2737 | playback_end(); | |
| 2738 | record_end(); | |
| 2793 | 2739 | } |
| 2794 | 2740 | |
| 2795 | 2741 | |
| 2796 | /*------------------------------------------------- | |
| 2797 | input_port_config - constructor for an | |
| 2798 | I/O port configuration object | |
| 2799 | -------------------------------------------------*/ | |
| 2742 | //------------------------------------------------- | |
| 2743 | // type_name - return the name for the given | |
| 2744 | // type/player | |
| 2745 | //------------------------------------------------- | |
| 2800 | 2746 | |
| 2801 | input_port_config::input_port_config(device_t &owner, const char *tag) | |
| 2802 | : state(NULL), | |
| 2803 | active(0), | |
| 2804 | m_next(NULL), | |
| 2805 | m_owner(owner), | |
| 2806 | m_tag(tag), | |
| 2807 | m_modcount(0) | |
| 2747 | const char *ioport_manager::type_name(ioport_type type, UINT8 player) | |
| 2808 | 2748 | { |
| 2749 | // if we have a machine, use the live state and quick lookup | |
| 2750 | input_type_entry *entry = m_type_to_entry[type][player]; | |
| 2751 | if (entry != NULL) | |
| 2752 | return entry->name(); | |
| 2753 | ||
| 2754 | // if we find nothing, return an invalid group | |
| 2755 | return "???"; | |
| 2809 | 2756 | } |
| 2810 | 2757 | |
| 2811 | 2758 | |
| 2812 | running_machine &input_port_config::machine() const | |
| 2759 | //------------------------------------------------- | |
| 2760 | // type_group - return the group for the given | |
| 2761 | // type/player | |
| 2762 | //------------------------------------------------- | |
| 2763 | ||
| 2764 | ioport_group ioport_manager::type_group(ioport_type type, int player) | |
| 2813 | 2765 | { |
| 2814 | return m_owner.machine(); | |
| 2766 | input_type_entry *entry = m_type_to_entry[type][player]; | |
| 2767 | if (entry != NULL) | |
| 2768 | return entry->group(); | |
| 2769 | ||
| 2770 | // if we find nothing, return an invalid group | |
| 2771 | return IPG_INVALID; | |
| 2815 | 2772 | } |
| 2816 | 2773 | |
| 2817 | 2774 | |
| 2818 | /*------------------------------------------------- | |
| 2819 | field_config_alloc - allocate a new input | |
| 2820 | port field config | |
| 2821 | -------------------------------------------------*/ | |
| 2775 | //------------------------------------------------- | |
| 2776 | // type_seq - return the input sequence for the | |
| 2777 | // given type/player | |
| 2778 | //------------------------------------------------- | |
| 2822 | 2779 | |
| 2823 | input_field_config::input_field_config(input_port_config &port, int _type, input_port_value _defvalue, input_port_value _maskbits, const char *_name) | |
| 2824 | : mask(_maskbits), | |
| 2825 | defvalue(_defvalue & _maskbits), | |
| 2826 | type(_type), | |
| 2827 | player(0), | |
| 2828 | flags(0), | |
| 2829 | impulse(0), | |
| 2830 | name(_name), | |
| 2831 | read_param(NULL), | |
| 2832 | read_device(DEVICE_SELF), | |
| 2833 | write_param(NULL), | |
| 2834 | write_device(DEVICE_SELF), | |
| 2835 | min(0), | |
| 2836 | max(_maskbits), | |
| 2837 | sensitivity(0), | |
| 2838 | delta(0), | |
| 2839 | centerdelta(0), | |
| 2840 | crossaxis(0), | |
| 2841 | crossscale(0), | |
| 2842 | crossoffset(0), | |
| 2843 | crossaltaxis(0), | |
| 2844 | crossmapper_device(DEVICE_SELF), | |
| 2845 | full_turn_count(0), | |
| 2846 | remap_table(NULL), | |
| 2847 | way(0), | |
| 2848 | state(NULL), | |
| 2849 | m_next(NULL), | |
| 2850 | m_port(port), | |
| 2851 | m_modcount(port.modcount()) | |
| 2780 | const input_seq &ioport_manager::type_seq(ioport_type type, int player, input_seq_type seqtype) | |
| 2852 | 2781 | { |
| 2853 | memset(&condition, 0, sizeof(condition)); | |
| 2854 | for (int seqtype = 0; seqtype < ARRAY_LENGTH(seq); seqtype++) | |
| 2855 | seq[seqtype].set_default(); | |
| 2856 | chars[0] = chars[1] = chars[2] = (unicode_char) 0; | |
| 2782 | assert(type >= 0 && type < IPT_COUNT); | |
| 2783 | assert(player >= 0 && player < MAX_PLAYERS); | |
| 2784 | ||
| 2785 | // if we have a machine, use the live state and quick lookup | |
| 2786 | input_type_entry *entry = m_type_to_entry[type][player]; | |
| 2787 | if (entry != NULL) | |
| 2788 | return entry->seq(seqtype); | |
| 2789 | ||
| 2790 | // if we find nothing, return an empty sequence | |
| 2791 | return input_seq::empty_seq; | |
| 2857 | 2792 | } |
| 2858 | 2793 | |
| 2859 | 2794 | |
| 2860 | input_setting_config::input_setting_config(input_field_config &field, input_port_value _value, const char *_name) | |
| 2861 | : value(_value), | |
| 2862 | name(_name), | |
| 2863 | m_field(field), | |
| 2864 | m_next(NULL) | |
| 2795 | //------------------------------------------------- | |
| 2796 | // set_type_seq - change the input sequence for | |
| 2797 | // the given type/player | |
| 2798 | //------------------------------------------------- | |
| 2799 | ||
| 2800 | void ioport_manager::set_type_seq(ioport_type type, int player, input_seq_type seqtype, const input_seq &newseq) | |
| 2865 | 2801 | { |
| 2866 | memset(&condition, 0, sizeof(condition)); | |
| 2802 | input_type_entry *entry = m_type_to_entry[type][player]; | |
| 2803 | if (entry != NULL) | |
| 2804 | entry->m_seq[seqtype] = newseq; | |
| 2867 | 2805 | } |
| 2868 | 2806 | |
| 2869 | input_field_diplocation::input_field_diplocation(const char *string, UINT8 _swnum, bool _invert) | |
| 2870 | : swname(string), | |
| 2871 | swnum(_swnum), | |
| 2872 | invert(_invert) | |
| 2807 | ||
| 2808 | //------------------------------------------------- | |
| 2809 | // type_pressed - return true if the sequence for | |
| 2810 | // the given input type/player is pressed | |
| 2811 | //------------------------------------------------- | |
| 2812 | ||
| 2813 | bool ioport_manager::type_pressed(ioport_type type, int player) | |
| 2873 | 2814 | { |
| 2815 | return machine().input().seq_pressed(type_seq(type, player)); | |
| 2874 | 2816 | } |
| 2875 | 2817 | |
| 2876 | /*------------------------------------------------- | |
| 2877 | field_config_insert - insert an allocated | |
| 2878 | input port field config, replacing any | |
| 2879 | intersecting fields already present and | |
| 2880 | inserting at the correct sorted location | |
| 2881 | -------------------------------------------------*/ | |
| 2882 | 2818 | |
| 2883 | void input_port_config::collapse_fields(astring &errorbuf) | |
| 2819 | //------------------------------------------------- | |
| 2820 | // type_class_present - return true if the given | |
| 2821 | // ioport_type_class exists in at least one port | |
| 2822 | //------------------------------------------------- | |
| 2823 | ||
| 2824 | bool ioport_manager::type_class_present(ioport_type_class inputclass) | |
| 2884 | 2825 | { |
| 2885 | input_field_config *list = m_fieldlist.detach_all(); | |
| 2886 | input_port_value maskbits = 0; | |
| 2887 | int lastmodcount = -1; | |
| 2888 | while (list != NULL) | |
| 2889 | { | |
| 2890 | if (list->modcount() != lastmodcount) | |
| 2891 | { | |
| 2892 | lastmodcount = list->modcount(); | |
| 2893 | maskbits = 0; | |
| 2894 | } | |
| 2895 | input_field_config *current = list; | |
| 2896 | list = list->next(); | |
| 2897 | field_config_insert(*current, maskbits, errorbuf); | |
| 2898 | } | |
| 2826 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2827 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2828 | if (field->type_class() == inputclass) | |
| 2829 | return true; | |
| 2830 | return false; | |
| 2899 | 2831 | } |
| 2900 | 2832 | |
| 2901 | void field_config_insert(input_field_config &newfield, input_port_value &disallowedbits, astring &errorbuf) | |
| 2902 | { | |
| 2903 | input_port_value lowbit; | |
| 2904 | 2833 | |
| 2905 | /* verify against the disallowed bits, but only if we are condition-free */ | |
| 2906 | if (newfield.condition.condition == PORTCOND_ALWAYS) | |
| 2907 | { | |
| 2908 | if ((newfield.mask & disallowedbits) != 0) | |
| 2909 | errorbuf.catprintf("INPUT_TOKEN_FIELD specifies duplicate port bits (port=%s mask=%X)\n", newfield.port().tag(), newfield.mask); | |
| 2910 | disallowedbits |= newfield.mask; | |
| 2911 | } | |
| 2834 | //------------------------------------------------- | |
| 2835 | // has_keyboard - determine if there is a | |
| 2836 | // keyboard present in the control list | |
| 2837 | //------------------------------------------------- | |
| 2912 | 2838 | |
| 2913 | /* first modify/nuke any entries that intersect our maskbits */ | |
| 2914 | input_field_config *nextfield; | |
| 2915 | for (input_field_config *field = newfield.port().fieldlist().first(); field != NULL; field = nextfield) | |
| 2916 | { | |
| 2917 | nextfield = field->next(); | |
| 2918 | if ((field->mask & newfield.mask) != 0 && (newfield.condition.condition == PORTCOND_ALWAYS || | |
| 2919 | field->condition.condition == PORTCOND_ALWAYS || | |
| 2920 | condition_equal(&field->condition, &newfield.condition))) | |
| 2839 | bool ioport_manager::has_keyboard() const | |
| 2840 | { | |
| 2841 | // iterate over ports and fields | |
| 2842 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2843 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2921 | 2844 | { |
| 2922 | /* reduce the mask of the field we found */ | |
| 2923 | field->mask &= ~newfield.mask; | |
| 2845 | // if we are at init, check IPT_KEYBOARD | |
| 2846 | if (!m_safe_to_read && field->type() == IPT_KEYBOARD) | |
| 2847 | return true; | |
| 2924 | 2848 | |
| 2925 | /* if the new entry fully overrides the previous one, we nuke */ | |
| 2926 | if (INPUT_PORT_OVERRIDE_FULLY_NUKES_PREVIOUS || field->mask == 0) | |
| 2927 | newfield.port().fieldlist().remove(*field); | |
| 2849 | // else, check if there is a keyboard and if such a keyboard is enabled | |
| 2850 | if (field->type() == IPT_KEYBOARD && field->enabled()) | |
| 2851 | return true; | |
| 2928 | 2852 | } |
| 2929 | } | |
| 2930 | 2853 | |
| 2931 | /* make a mask of just the low bit */ | |
| 2932 | lowbit = (newfield.mask ^ (newfield.mask - 1)) & newfield.mask; | |
| 2854 | return false; | |
| 2855 | } | |
| 2933 | 2856 | |
| 2934 | /* scan forward to find where to insert ourselves */ | |
| 2935 | input_field_config *field; | |
| 2936 | for (field = newfield.port().fieldlist().first(); field != NULL; field = field->next()) | |
| 2937 | if (field->mask > lowbit) | |
| 2938 | break; | |
| 2857 | //------------------------------------------------- | |
| 2858 | // count_players - counts the number of active | |
| 2859 | // players | |
| 2860 | //------------------------------------------------- | |
| 2939 | 2861 | |
| 2940 | /* insert it into the list */ | |
| 2941 | newfield.port().fieldlist().insert_before(newfield, field); | |
| 2862 | int ioport_manager::count_players() const | |
| 2863 | { | |
| 2864 | int max_player = 0; | |
| 2865 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2866 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2867 | if (field->type_class() == INPUT_CLASS_CONTROLLER && max_player <= field->player() + 1) | |
| 2868 | max_player = field->player() + 1; | |
| 2869 | ||
| 2870 | return max_player; | |
| 2942 | 2871 | } |
| 2943 | 2872 | |
| 2944 | 2873 | |
| 2945 | /*------------------------------------------------- | |
| 2946 | diplocation_expand - expand a string-based | |
| 2947 | DIP location into a linked list of | |
| 2948 | descriptions | |
| 2949 | -------------------------------------------------*/ | |
| 2874 | //------------------------------------------------- | |
| 2875 | // crosshair_position - return the extracted | |
| 2876 | // crosshair values for the given player | |
| 2877 | //------------------------------------------------- | |
| 2950 | 2878 | |
| 2951 | ||
| 2879 | bool | |
| 2952 | 2880 | { |
| 2953 | /* if nothing present, bail */ | |
| 2954 | if (location == NULL) | |
| 2955 | return; | |
| 2881 | // read all the lightgun values | |
| 2882 | bool gotx = false, goty = false; | |
| 2883 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2884 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2885 | if (field->player() == player && field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->enabled()) | |
| 2886 | { | |
| 2887 | field->crosshair_position(x, y, gotx, goty); | |
| 2956 | 2888 | |
| 2957 | field.diploclist().reset(); | |
| 2889 | // if we got both, stop | |
| 2890 | if (gotx && goty) | |
| 2891 | break; | |
| 2892 | } | |
| 2958 | 2893 | |
| 2959 | /* parse the string */ | |
| 2960 | astring name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside | |
| 2961 | const char *lastname = NULL; | |
| 2962 | const char *curentry = location; | |
| 2963 | int entries = 0; | |
| 2964 | while (*curentry != 0) | |
| 2965 | { | |
| 2966 | /* find the end of this entry */ | |
| 2967 | const char *comma = strchr(curentry, ','); | |
| 2968 | if (comma == NULL) | |
| 2969 | comma = curentry + strlen(curentry); | |
| 2894 | return (gotx && goty); | |
| 2895 | } | |
| 2970 | 2896 | |
| 2971 | /* extract it to tempbuf */ | |
| 2972 | astring tempstr; | |
| 2973 | tempstr.cpy(curentry, comma - curentry); | |
| 2974 | 2897 | |
| 2975 | /* first extract the switch name if present */ | |
| 2976 | const char *number = tempstr; | |
| 2977 | const char *colon = strchr(tempstr, ':'); | |
| 2898 | //------------------------------------------------- | |
| 2899 | // update_defaults - force an update to the input | |
| 2900 | // port values based on current conditions | |
| 2901 | //------------------------------------------------- | |
| 2978 | 2902 | |
| 2979 | /* allocate and copy the name if it is present */ | |
| 2980 | if (colon != NULL) | |
| 2903 | void ioport_manager::update_defaults() | |
| 2904 | { | |
| 2905 | // two passes to catch conditionals properly | |
| 2906 | for (int loopnum = 0; loopnum < 2; loopnum++) | |
| 2907 | { | |
| 2908 | // loop over all input ports | |
| 2909 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2981 | 2910 | { |
| 2982 | lastname = name.cpy(number, colon - number); | |
| 2983 | number = colon + 1; | |
| 2984 | } | |
| 2911 | // only clear on the first pass | |
| 2912 | if (loopnum == 0) | |
| 2913 | port->live().defvalue = 0; | |
| 2985 | 2914 | |
| 2986 | /* otherwise, just copy the last name */ | |
| 2987 | else | |
| 2988 | { | |
| 2989 | if (lastname == NULL) | |
| 2990 | { | |
| 2991 | errorbuf.catprintf("Switch location '%s' missing switch name!\n", location); | |
| 2992 | lastname = (char *)"UNK"; | |
| 2993 | } | |
| 2994 | name.cpy(lastname); | |
| 2915 | // first compute the default value for the entire port | |
| 2916 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 2917 | if (field->enabled()) | |
| 2918 | port->live().defvalue = (port->live().defvalue & ~field->mask()) | (field->live().value & field->mask()); | |
| 2995 | 2919 | } |
| 2920 | } | |
| 2921 | } | |
| 2996 | 2922 | |
| 2997 | /* if the number is preceded by a '!' it's active high */ | |
| 2998 | bool invert = false; | |
| 2999 | if (*number == '!') | |
| 3000 | { | |
| 3001 | invert = true; | |
| 3002 | number++; | |
| 3003 | } | |
| 3004 | 2923 | |
| 3005 | /* now scan the switch number */ | |
| 3006 | int swnum = -1; | |
| 3007 | if (sscanf(number, "%d", &swnum) != 1) | |
| 3008 | errorbuf.catprintf("Switch location '%s' has invalid format!\n", location); | |
| 2924 | //------------------------------------------------- | |
| 2925 | // frame_update - core logic for per-frame input | |
| 2926 | // port updating | |
| 2927 | //------------------------------------------------- | |
| 3009 | 2928 | |
| 3010 | /* allocate a new entry */ | |
| 3011 | field.diploclist().append(*global_alloc(input_field_diplocation(name, swnum, invert))); | |
| 3012 | entries++; | |
| 2929 | digital_joystick &ioport_manager::digjoystick(int player, int number) | |
| 2930 | { | |
| 2931 | // find it in the list | |
| 2932 | for (digital_joystick *joystick = m_joystick_list.first(); joystick != NULL; joystick = joystick->next()) | |
| 2933 | if (joystick->player() == player && joystick->number() == number) | |
| 2934 | return *joystick; | |
| 2935 | ||
| 2936 | // create a new one | |
| 2937 | return m_joystick_list.append(*global_alloc(digital_joystick(player, number))); | |
| 2938 | } | |
| 3013 | 2939 | |
| 3014 | /* advance to the next item */ | |
| 3015 | curentry = comma; | |
| 3016 | if (*curentry != 0) | |
| 3017 | curentry++; | |
| 3018 | } | |
| 3019 | 2940 | |
| 3020 | /* then verify the number of bits in the mask matches */ | |
| 3021 | input_port_value temp; | |
| 3022 | int bits; | |
| 3023 | for (bits = 0, temp = field.mask; temp != 0 && bits < 32; bits++) | |
| 3024 | temp &= temp - 1; | |
| 3025 | if (bits != entries) | |
| 3026 | errorbuf.catprintf("Switch location '%s' does not describe enough bits for mask %X\n", location, field.mask); | |
| 3027 | } | |
| 2941 | //------------------------------------------------- | |
| 2942 | // frame_update - core logic for per-frame input | |
| 2943 | // port updating | |
| 2944 | //------------------------------------------------- | |
| 3028 | 2945 | |
| 2946 | void ioport_manager::frame_update() | |
| 2947 | { | |
| 2948 | // if we're paused, don't do anything | |
| 2949 | if (machine().paused()) | |
| 2950 | return; | |
| 3029 | 2951 | |
| 2952 | g_profiler.start(PROFILER_INPUT); | |
| 3030 | 2953 | |
| 3031 | /*************************************************************************** | |
| 3032 | TOKENIZATION HELPERS | |
| 3033 | ***************************************************************************/ | |
| 2954 | // record/playback information about the current frame | |
| 2955 | attotime curtime = machine().time(); | |
| 2956 | playback_frame(curtime); | |
| 2957 | record_frame(curtime); | |
| 3034 | 2958 | |
| 3035 | /*------------------------------------------------- | |
| 3036 | token_to_input_field_type - convert a string | |
| 3037 | token to an input field type and player | |
| 3038 | -------------------------------------------------*/ | |
| 2959 | // track the duration of the previous frame | |
| 2960 | m_last_delta_nsec = (curtime - m_last_frame_time).as_attoseconds() / ATTOSECONDS_PER_NANOSECOND; | |
| 2961 | m_last_frame_time = curtime; | |
| 3039 | 2962 | |
| 3040 | static int token_to_input_field_type(running_machine &machine, const char *string, int *player) | |
| 3041 | { | |
| 3042 | ioport_manager &portdata = machine.ioport(); | |
| 3043 | int ipnum; | |
| 2963 | // update the digital joysticks | |
| 2964 | for (digital_joystick *joystick = m_joystick_list.first(); joystick != NULL; joystick = joystick->next()) | |
| 2965 | joystick->frame_update(); | |
| 3044 | 2966 | |
| 3045 | /* check for our failsafe case first */ | |
| 3046 | if (sscanf(string, "TYPE_OTHER(%d,%d)", &ipnum, player) == 2) | |
| 3047 | return ipnum; | |
| 2967 | // compute default values for all the ports | |
| 2968 | update_defaults(); | |
| 3048 | 2969 | |
| 3049 | /* find the token in the list */ | |
| 3050 | for (input_type_entry *entry = portdata.typelist.first(); entry != NULL; entry = entry->next()) | |
| 3051 | if (entry->token != NULL && !strcmp(entry->token, string)) | |
| 2970 | // perform mouse hit testing | |
| 2971 | INT32 mouse_target_x, mouse_target_y; | |
| 2972 | int mouse_button; | |
| 2973 | render_target *mouse_target = ui_input_find_mouse(machine(), &mouse_target_x, &mouse_target_y, &mouse_button); | |
| 2974 | ||
| 2975 | // if the button is pressed, map the point and determine what was hit | |
| 2976 | ioport_field *mouse_field = NULL; | |
| 2977 | if (mouse_button && mouse_target != NULL) | |
| 2978 | { | |
| 2979 | const char *tag = NULL; | |
| 2980 | ioport_value mask; | |
| 2981 | float x, y; | |
| 2982 | if (mouse_target->map_point_input(mouse_target_x, mouse_target_y, tag, mask, x, y)) | |
| 3052 | 2983 | { |
| 3053 | *player = entry->player; | |
| 3054 | return entry->type; | |
| 2984 | ioport_port *port = machine().root_device().ioport(tag); | |
| 2985 | if (port != NULL) | |
| 2986 | mouse_field = port->field(mask); | |
| 3055 | 2987 | } |
| 2988 | } | |
| 3056 | 2989 | |
| 3057 | /* if we fail, return IPT_UNKNOWN */ | |
| 3058 | *player = 0; | |
| 3059 | return IPT_UNKNOWN; | |
| 3060 | } | |
| 2990 | // loop over all input ports | |
| 2991 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 2992 | { | |
| 2993 | port->frame_update(mouse_field); | |
| 3061 | 2994 | |
| 2995 | // handle playback/record | |
| 2996 | playback_port(*port); | |
| 2997 | record_port(*port); | |
| 2998 | } | |
| 3062 | 2999 | |
| 3063 | /*------------------------------------------------- | |
| 3064 | input_field_type_to_token - convert an input | |
| 3065 | field type and player to a string token | |
| 3066 | -------------------------------------------------*/ | |
| 3067 | ||
| 3068 | static const char *input_field_type_to_token(running_machine &machine, int type, int player) | |
| 3069 | { | |
| 3070 | ioport_manager &portdata = machine.ioport(); | |
| 3071 | static char tempbuf[32]; | |
| 3072 | ||
| 3073 | /* look up the port and return the token */ | |
| 3074 | input_type_entry *entry = portdata.type_to_entry[type][player]; | |
| 3075 | if (entry != NULL) | |
| 3076 | return entry->token; | |
| 3077 | ||
| 3078 | /* if that fails, carry on */ | |
| 3079 | sprintf(tempbuf, "TYPE_OTHER(%d,%d)", type, player); | |
| 3080 | return tempbuf; | |
| 3000 | g_profiler.stop(); | |
| 3081 | 3001 | } |
| 3082 | 3002 | |
| 3083 | 3003 | |
| 3084 | /*------------------------------------------------- | |
| 3085 | token_to_seq_type - convert a string to | |
| 3086 | a sequence type | |
| 3087 | -------------------------------------------------*/ | |
| 3004 | //------------------------------------------------- | |
| 3005 | // frame_interpolate - interpolate between two | |
| 3006 | // values based on the time between frames | |
| 3007 | //------------------------------------------------- | |
| 3088 | 3008 | |
| 3089 | ||
| 3009 | ioport_value i | |
| 3090 | 3010 | { |
| 3091 | int seqindex; | |
| 3011 | // if no last delta, just use new value | |
| 3012 | if (m_last_delta_nsec == 0) | |
| 3013 | return newval; | |
| 3092 | 3014 | |
| 3093 | /* look up the string in the table of possible sequence types and return the index */ | |
| 3094 | for (seqindex = 0; seqindex < ARRAY_LENGTH(seqtypestrings); seqindex++) | |
| 3095 | if (!mame_stricmp(string, seqtypestrings[seqindex])) | |
| 3096 | return seqindex; | |
| 3097 | ||
| 3098 | return -1; | |
| 3015 | // otherwise, interpolate | |
| 3016 | attoseconds_t nsec_since_last = (machine().time() - m_last_frame_time).as_attoseconds() / ATTOSECONDS_PER_NANOSECOND; | |
| 3017 | return oldval + (INT64(newval - oldval) * nsec_since_last / m_last_delta_nsec); | |
| 3099 | 3018 | } |
| 3100 | 3019 | |
| 3101 | 3020 | |
| 3021 | //------------------------------------------------- | |
| 3022 | // load_config - callback to extract configuration | |
| 3023 | // data from the XML nodes | |
| 3024 | //------------------------------------------------- | |
| 3102 | 3025 | |
| 3103 | /*************************************************************************** | |
| 3104 | SETTINGS LOAD | |
| 3105 | ***************************************************************************/ | |
| 3106 | ||
| 3107 | /*------------------------------------------------- | |
| 3108 | load_config_callback - callback to extract | |
| 3109 | configuration data from the XML nodes | |
| 3110 | -------------------------------------------------*/ | |
| 3111 | ||
| 3112 | static void load_config_callback(running_machine &machine, int config_type, xml_data_node *parentnode) | |
| 3026 | void ioport_manager::load_config(int config_type, xml_data_node *parentnode) | |
| 3113 | 3027 | { |
| 3114 | ioport_manager &portdata = machine.ioport(); | |
| 3115 | xml_data_node *portnode; | |
| 3116 | int seqtype; | |
| 3117 | ||
| 3118 | /* in the completion phase, we finish the initialization with the final ports */ | |
| 3028 | // in the completion phase, we finish the initialization with the final ports | |
| 3119 | 3029 | if (config_type == CONFIG_TYPE_FINAL) |
| 3120 | 3030 | { |
| 3121 | portdata.safe_to_read = TRUE; | |
| 3122 | frame_update(machine); | |
| 3031 | m_safe_to_read = true; | |
| 3032 | frame_update(); | |
| 3123 | 3033 | } |
| 3124 | 3034 | |
| 3125 | / | |
| 3035 | // early exit if no data to parse | |
| 3126 | 3036 | if (parentnode == NULL) |
| 3127 | 3037 | return; |
| 3128 | 3038 | |
| 3129 | / | |
| 3039 | // iterate over all the remap nodes for controller configs only | |
| 3130 | 3040 | if (config_type == CONFIG_TYPE_CONTROLLER) |
| 3131 | load_remap_table( | |
| 3041 | load_remap_table( | |
| 3132 | 3042 | |
| 3133 | /* iterate over all the port nodes */ | |
| 3134 | for (portnode = xml_get_sibling(parentnode->child, "port"); portnode; portnode = xml_get_sibling(portnode->next, "port")) | |
| 3043 | // iterate over all the port nodes | |
| 3044 | for (xml_data_node *portnode = xml_get_sibling(parentnode->child, "port"); portnode; portnode = xml_get_sibling(portnode->next, "port")) | |
| 3135 | 3045 | { |
| 3136 | input_seq newseq[SEQ_TYPE_TOTAL], tempseq; | |
| 3137 | xml_data_node *seqnode; | |
| 3138 | int type, player; | |
| 3046 | // get the basic port info from the attributes | |
| 3047 | int player; | |
| 3048 | int type = token_to_input_type(xml_get_attribute_string(portnode, "type", ""), player); | |
| 3139 | 3049 | |
| 3140 | /* get the basic port info from the attributes */ | |
| 3141 | type = token_to_input_field_type(machine, xml_get_attribute_string(portnode, "type", ""), &player); | |
| 3142 | ||
| 3143 | /* initialize sequences to invalid defaults */ | |
| 3144 | for (seqtype = 0; seqtype < ARRAY_LENGTH(newseq); seqtype++) | |
| 3050 | // initialize sequences to invalid defaults | |
| 3051 | input_seq newseq[SEQ_TYPE_TOTAL]; | |
| 3052 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3145 | 3053 | newseq[seqtype].set(INPUT_CODE_INVALID); |
| 3146 | 3054 | |
| 3147 | /* loop over new sequences */ | |
| 3148 | for (seqnode = xml_get_sibling(portnode->child, "newseq"); seqnode; seqnode = xml_get_sibling(seqnode->next, "newseq")) | |
| 3055 | // loop over new sequences | |
| 3056 | for (xml_data_node *seqnode = xml_get_sibling(portnode->child, "newseq"); seqnode; seqnode = xml_get_sibling(seqnode->next, "newseq")) | |
| 3149 | 3057 | { |
| 3150 | /* with a valid type, parse out the new sequence */ | |
| 3151 | seqtype = token_to_seq_type(xml_get_attribute_string(seqnode, "type", "")); | |
| 3058 | // with a valid type, parse out the new sequence | |
| 3059 | input_seq_type seqtype = token_to_seq_type(xml_get_attribute_string(seqnode, "type", "")); | |
| 3152 | 3060 | if (seqtype != -1 && seqnode->value != NULL) |
| 3153 | 3061 | { |
| 3154 | 3062 | if (strcmp(seqnode->value, "NONE") == 0) |
| 3155 | 3063 | newseq[seqtype].set(); |
| 3156 | 3064 | else |
| 3157 | machine.input().seq_from_tokens(newseq[seqtype], seqnode->value); | |
| 3065 | machine().input().seq_from_tokens(newseq[seqtype], seqnode->value); | |
| 3158 | 3066 | } |
| 3159 | 3067 | } |
| 3160 | 3068 | |
| 3161 | / | |
| 3069 | // if we're loading default ports, apply to the defaults | |
| 3162 | 3070 | if (config_type != CONFIG_TYPE_GAME) |
| 3163 | load_default_config( | |
| 3071 | load_default_config( | |
| 3164 | 3072 | else |
| 3165 | load_game_config( | |
| 3073 | load_game_config( | |
| 3166 | 3074 | } |
| 3167 | 3075 | |
| 3168 | /* after applying the controller config, push that back into the backup, since that is */ | |
| 3169 | /* what we will diff against */ | |
| 3076 | // after applying the controller config, push that back into the backup, since that is | |
| 3077 | // what we will diff against | |
| 3170 | 3078 | if (config_type == CONFIG_TYPE_CONTROLLER) |
| 3171 | for (input_type_entry *entry = portdata.typelist.first(); entry != NULL; entry = entry->next()) | |
| 3172 | for (seqtype = 0; seqtype < ARRAY_LENGTH(entry->seq); seqtype++) | |
| 3173 | entry->defseq[seqtype] = entry->seq[seqtype]; | |
| 3079 | for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next()) | |
| 3080 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3081 | entry->defseq(seqtype) = entry->seq(seqtype); | |
| 3174 | 3082 | } |
| 3175 | 3083 | |
| 3176 | 3084 | |
| 3177 | /*------------------------------------------------- | |
| 3178 | load_remap_table - extract and apply the | |
| 3179 | global remapping table | |
| 3180 | -------------------------------------------------*/ | |
| 3085 | //------------------------------------------------- | |
| 3086 | // load_remap_table - extract and apply the | |
| 3087 | // global remapping table | |
| 3088 | //------------------------------------------------- | |
| 3181 | 3089 | |
| 3182 | ||
| 3090 | ||
| 3183 | 3091 | { |
| 3184 | ioport_manager &portdata = machine.ioport(); | |
| 3185 | input_code *oldtable, *newtable; | |
| 3186 | xml_data_node *remapnode; | |
| 3187 | int count; | |
| 3188 | ||
| 3189 | /* count items first so we can allocate */ | |
| 3190 | count = 0; | |
| 3191 | for (remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap")) | |
| 3092 | // count items first so we can allocate | |
| 3093 | int count = 0; | |
| 3094 | for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap")) | |
| 3192 | 3095 | count++; |
| 3193 | 3096 | |
| 3194 | / | |
| 3097 | // if we have some, deal with them | |
| 3195 | 3098 | if (count > 0) |
| 3196 | 3099 | { |
| 3197 | int remapnum; | |
| 3100 | // allocate tables | |
| 3101 | dynamic_array<input_code> oldtable(count); | |
| 3102 | dynamic_array<input_code> newtable(count); | |
| 3198 | 3103 | |
| 3199 | /* allocate tables */ | |
| 3200 | oldtable = global_alloc_array(input_code, count); | |
| 3201 | newtable = global_alloc_array(input_code, count); | |
| 3202 | ||
| 3203 | /* build up the remap table */ | |
| 3104 | // build up the remap table | |
| 3204 | 3105 | count = 0; |
| 3205 | for (remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap")) | |
| 3106 | for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap")) | |
| 3206 | 3107 | { |
| 3207 | input_code origcode = machine.input().code_from_token(xml_get_attribute_string(remapnode, "origcode", "")); | |
| 3208 | input_code newcode = machine.input().code_from_token(xml_get_attribute_string(remapnode, "newcode", "")); | |
| 3108 | input_code origcode = machine().input().code_from_token(xml_get_attribute_string(remapnode, "origcode", "")); | |
| 3109 | input_code newcode = machine().input().code_from_token(xml_get_attribute_string(remapnode, "newcode", "")); | |
| 3209 | 3110 | if (origcode != INPUT_CODE_INVALID && newcode != INPUT_CODE_INVALID) |
| 3210 | 3111 | { |
| 3211 | 3112 | oldtable[count] = origcode; |
| r15082 | r15083 | |
| 3214 | 3115 | } |
| 3215 | 3116 | } |
| 3216 | 3117 | |
| 3217 | /* loop over the remapping table, operating only if something was specified */ | |
| 3218 | for (remapnum = 0; remapnum < count; remapnum++) | |
| 3219 | { | |
| 3220 | input_code oldcode = oldtable[remapnum]; | |
| 3221 | input_code newcode = newtable[remapnum]; | |
| 3222 | ||
| 3223 | /* loop over all default ports, remapping the requested keys */ | |
| 3224 | for (input_type_entry *entry = portdata.typelist.first(); entry != NULL; entry = entry->next()) | |
| 3225 | { | |
| 3226 | /* remap anything in the default sequences */ | |
| 3227 | for (int seqtype = 0; seqtype < ARRAY_LENGTH(entry->seq); seqtype++) | |
| 3228 | entry->seq[seqtype].replace(oldcode, newcode); | |
| 3229 | } | |
| 3230 | } | |
| 3231 | ||
| 3232 | /* release the tables */ | |
| 3233 | global_free(oldtable); | |
| 3234 | global_free(newtable); | |
| 3118 | // loop over the remapping table, then over default ports, replacing old with new | |
| 3119 | for (int remapnum = 0; remapnum < count; remapnum++) | |
| 3120 | for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next()) | |
| 3121 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3122 | entry->m_seq[seqtype].replace(oldtable[remapnum], newtable[remapnum]); | |
| 3235 | 3123 | } |
| 3236 | 3124 | } |
| 3237 | 3125 | |
| 3238 | 3126 | |
| 3239 | /*------------------------------------------------- | |
| 3240 | load_default_config - apply configuration | |
| 3241 | data to the default mappings | |
| 3242 | -------------------------------------------------*/ | |
| 3127 | //------------------------------------------------- | |
| 3128 | // load_default_config - apply configuration | |
| 3129 | // data to the default mappings | |
| 3130 | //------------------------------------------------- | |
| 3243 | 3131 | |
| 3244 | ||
| 3132 | bool | |
| 3245 | 3133 | { |
| 3246 | ioport_manager &portdata = machine.ioport(); | |
| 3247 | ||
| 3248 | /* find a matching port in the list */ | |
| 3249 | for (input_type_entry *entry = portdata.typelist.first(); entry != NULL; entry = entry->next()) | |
| 3250 | if (entry->type == type && entry->player == player) | |
| 3134 | // find a matching port in the list | |
| 3135 | for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next()) | |
| 3136 | if (entry->type() == type && entry->player() == player) | |
| 3251 | 3137 | { |
| 3252 | for (int seqtype = | |
| 3138 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ | |
| 3253 | 3139 | if (newseq[seqtype][0] != INPUT_CODE_INVALID) |
| 3254 | entry->seq[seqtype] = newseq[seqtype]; | |
| 3255 | return TRUE; | |
| 3140 | entry->m_seq[seqtype] = newseq[seqtype]; | |
| 3141 | return true; | |
| 3256 | 3142 | } |
| 3257 | 3143 | |
| 3258 | return | |
| 3144 | return false; | |
| 3259 | 3145 | } |
| 3260 | 3146 | |
| 3261 | 3147 | |
| 3262 | /*------------------------------------------------- | |
| 3263 | load_game_config - apply configuration | |
| 3264 | data to the current set of input ports | |
| 3265 | -------------------------------------------------*/ | |
| 3148 | //------------------------------------------------- | |
| 3149 | // load_game_config - apply configuration | |
| 3150 | // data to the current set of input ports | |
| 3151 | //------------------------------------------------- | |
| 3266 | 3152 | |
| 3267 | ||
| 3153 | bool | |
| 3268 | 3154 | { |
| 3269 | input_port_value mask, defvalue; | |
| 3270 | const input_field_config *field; | |
| 3271 | const input_port_config *port; | |
| 3272 | char tempbuffer[20]; | |
| 3273 | const char *tag; | |
| 3155 | // read the mask, index, and defvalue attributes | |
| 3156 | const char *tag = xml_get_attribute_string(portnode, "tag", NULL); | |
| 3157 | ioport_value mask = xml_get_attribute_int(portnode, "mask", 0); | |
| 3158 | ioport_value defvalue = xml_get_attribute_int(portnode, "defvalue", 0); | |
| 3274 | 3159 | |
| 3275 | /* read the mask, index, and defvalue attributes */ | |
| 3276 | tag = xml_get_attribute_string(portnode, "tag", NULL); | |
| 3277 | mask = xml_get_attribute_int(portnode, "mask", 0); | |
| 3278 | defvalue = xml_get_attribute_int(portnode, "defvalue", 0); | |
| 3160 | // find the port we want; if no tag, search them all | |
| 3161 | for (ioport_port *port = first_port(); port != NULL; port = port->next()) | |
| 3162 | if (tag == NULL || strcmp(port->tag(), tag) == 0) | |
| 3163 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 3279 | 3164 | |
| 3280 | /* find the port we want; if no tag, search them all */ | |
| 3281 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 3282 | if (tag == NULL || strcmp(get_port_tag(port, tempbuffer), tag) == 0) | |
| 3283 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 3284 | ||
| 3285 | /* find the matching mask and defvalue */ | |
| 3286 | if (field->type == type && field->player == player && | |
| 3287 | field->mask == mask && (field->defvalue & mask) == (defvalue & mask)) | |
| 3165 | // find the matching mask and defvalue | |
| 3166 | if (field->type() == type && field->player() == player && | |
| 3167 | field->mask() == mask && (field->defvalue() & mask) == (defvalue & mask)) | |
| 3288 | 3168 | { |
| 3289 | const char *revstring; | |
| 3290 | int seqtype; | |
| 3291 | ||
| 3292 | /* if a sequence was specified, copy it in */ | |
| 3293 | for (seqtype = 0; seqtype < ARRAY_LENGTH(field->state->seq); seqtype++) | |
| 3169 | // if a sequence was specified, copy it in | |
| 3170 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3294 | 3171 | if (newseq[seqtype][0] != INPUT_CODE_INVALID) |
| 3295 | field-> | |
| 3172 | field->liv | |
| 3296 | 3173 | |
| 3297 | /* for non-analog fields, fetch the value */ | |
| 3298 | if (field->state->analog == NULL) | |
| 3299 | field->state->value = xml_get_attribute_int(portnode, "value", field->defvalue); | |
| 3174 | // for non-analog fields, fetch the value | |
| 3175 | if (field->live().analog == NULL) | |
| 3176 | field->live().value = xml_get_attribute_int(portnode, "value", field->defvalue()); | |
| 3300 | 3177 | |
| 3301 | / | |
| 3178 | // for analog fields, fetch configurable analog attributes | |
| 3302 | 3179 | else |
| 3303 | 3180 | { |
| 3304 | /* get base attributes */ | |
| 3305 | field->state->analog->delta = xml_get_attribute_int(portnode, "keydelta", field->delta); | |
| 3306 | field->state->analog->centerdelta = xml_get_attribute_int(portnode, "centerdelta", field->centerdelta); | |
| 3307 | field->state->analog->sensitivity = xml_get_attribute_int(portnode, "sensitivity", field->sensitivity); | |
| 3181 | // get base attributes | |
| 3182 | field->live().analog->m_delta = xml_get_attribute_int(portnode, "keydelta", field->delta()); | |
| 3183 | field->live().analog->m_centerdelta = xml_get_attribute_int(portnode, "centerdelta", field->centerdelta()); | |
| 3184 | field->live().analog->m_sensitivity = xml_get_attribute_int(portnode, "sensitivity", field->sensitivity()); | |
| 3308 | 3185 | |
| 3309 | /* fetch yes/no for reverse setting */ | |
| 3310 | revstring = xml_get_attribute_string(portnode, "reverse", NULL); | |
| 3186 | // fetch yes/no for reverse setting | |
| 3187 | const char *revstring = xml_get_attribute_string(portnode, "reverse", NULL); | |
| 3311 | 3188 | if (revstring != NULL) |
| 3312 | field-> | |
| 3189 | field->liv | |
| 3313 | 3190 | } |
| 3314 | return | |
| 3191 | return true; | |
| 3315 | 3192 | } |
| 3316 | 3193 | |
| 3317 | return | |
| 3194 | return false; | |
| 3318 | 3195 | } |
| 3319 | 3196 | |
| 3320 | 3197 | |
| 3321 | 3198 | |
| 3322 | /*************************************************************************** | |
| 3323 | SETTINGS SAVE | |
| 3324 | ***************************************************************************/ | |
| 3199 | //************************************************************************** | |
| 3200 | // SETTINGS SAVE | |
| 3201 | //************************************************************************** | |
| 3325 | 3202 | |
| 3326 | /*------------------------------------------------- | |
| 3327 | save_config_callback - config callback for | |
| 3328 | saving input port configuration | |
| 3329 | -------------------------------------------------*/ | |
| 3203 | //------------------------------------------------- | |
| 3204 | // save_config - config callback for saving input | |
| 3205 | // port configuration | |
| 3206 | //------------------------------------------------- | |
| 3330 | 3207 | |
| 3331 | ||
| 3208 | ||
| 3332 | 3209 | { |
| 3333 | / | |
| 3210 | // if no parentnode, ignore | |
| 3334 | 3211 | if (parentnode == NULL) |
| 3335 | 3212 | return; |
| 3336 | 3213 | |
| 3337 | / | |
| 3214 | // default ports save differently | |
| 3338 | 3215 | if (config_type == CONFIG_TYPE_DEFAULT) |
| 3339 | save_default_inputs( | |
| 3216 | save_default_inputs( | |
| 3340 | 3217 | else |
| 3341 | save_game_inputs( | |
| 3218 | save_game_inputs( | |
| 3342 | 3219 | } |
| 3343 | 3220 | |
| 3344 | 3221 | |
| 3345 | /*------------------------------------------------- | |
| 3346 | save_sequence - add a node for an input | |
| 3347 | sequence | |
| 3348 | -------------------------------------------------*/ | |
| 3222 | //------------------------------------------------- | |
| 3223 | // save_sequence - add a node for an input | |
| 3224 | // sequence | |
| 3225 | //------------------------------------------------- | |
| 3349 | 3226 | |
| 3350 | ||
| 3227 | ||
| 3351 | 3228 | { |
| 3229 | // get the string for the sequence | |
| 3352 | 3230 | astring seqstring; |
| 3353 | xml_data_node *seqnode; | |
| 3354 | ||
| 3355 | /* get the string for the sequence */ | |
| 3356 | 3231 | if (seq.length() == 0) |
| 3357 | 3232 | seqstring.cpy("NONE"); |
| 3358 | 3233 | else |
| 3359 | machine.input().seq_to_tokens(seqstring, seq); | |
| 3234 | machine().input().seq_to_tokens(seqstring, seq); | |
| 3360 | 3235 | |
| 3361 | /* add the new node */ | |
| 3362 | seqnode = xml_add_child(parentnode, "newseq", seqstring); | |
| 3236 | // add the new node | |
| 3237 | xml_data_node *seqnode = xml_add_child(parentnode, "newseq", seqstring); | |
| 3363 | 3238 | if (seqnode != NULL) |
| 3364 | 3239 | xml_set_attribute(seqnode, "type", seqtypestrings[type]); |
| 3365 | 3240 | } |
| 3366 | 3241 | |
| 3367 | 3242 | |
| 3368 | /*------------------------------------------------- | |
| 3369 | save_this_input_field_type - determine if the given | |
| 3370 | port type is worth saving | |
| 3371 | -------------------------------------------------*/ | |
| 3243 | //------------------------------------------------- | |
| 3244 | // save_this_input_field_type - determine if the | |
| 3245 | // given port type is worth saving | |
| 3246 | //------------------------------------------------- | |
| 3372 | 3247 | |
| 3373 | ||
| 3248 | bool | |
| 3374 | 3249 | { |
| 3375 | 3250 | switch (type) |
| 3376 | 3251 | { |
| 3377 | 3252 | case IPT_UNUSED: |
| 3378 | 3253 | case IPT_END: |
| 3379 | 3254 | case IPT_PORT: |
| 3380 | case IPT_VBLANK: | |
| 3381 | 3255 | case IPT_UNKNOWN: |
| 3382 | return FALSE; | |
| 3256 | return false; | |
| 3257 | ||
| 3258 | default: | |
| 3259 | break; | |
| 3383 | 3260 | } |
| 3384 | return | |
| 3261 | return true; | |
| 3385 | 3262 | } |
| 3386 | 3263 | |
| 3387 | 3264 | |
| 3388 | /*------------------------------------------------- | |
| 3389 | save_default_inputs - add nodes for any default | |
| 3390 | mappings that have changed | |
| 3391 | -------------------------------------------------*/ | |
| 3265 | //------------------------------------------------- | |
| 3266 | // save_default_inputs - add nodes for any default | |
| 3267 | // mappings that have changed | |
| 3268 | //------------------------------------------------- | |
| 3392 | 3269 | |
| 3393 | ||
| 3270 | ||
| 3394 | 3271 | { |
| 3395 | ioport_manager &portdata = machine.ioport(); | |
| 3396 | input_type_entry *entry; | |
| 3397 | ||
| 3398 | /* iterate over ports */ | |
| 3399 | for (entry = portdata.typelist.first(); entry != NULL; entry = entry->next()) | |
| 3272 | // iterate over ports | |
| 3273 | for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next()) | |
| 3400 | 3274 | { |
| 3401 | /* only save if this port is a type we save */ | |
| 3402 | if (save_this_input_field_type(entry->type)) | |
| 3275 | // only save if this port is a type we save | |
| 3276 | if (save_this_input_field_type(entry->type())) | |
| 3403 | 3277 | { |
| 3404 | int seqtype; | |
| 3405 | ||
| 3406 | /* see if any of the sequences have changed */ | |
| 3407 | for (seqtype = 0; seqtype < ARRAY_LENGTH(entry->seq); seqtype++) | |
| 3408 | if (entry->seq[seqtype] != entry->defseq[seqtype]) | |
| 3278 | // see if any of the sequences have changed | |
| 3279 | input_seq_type seqtype; | |
| 3280 | for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3281 | if (entry->seq(seqtype) != entry->defseq(seqtype)) | |
| 3409 | 3282 | break; |
| 3410 | 3283 | |
| 3411 | /* if so, we need to add a node */ | |
| 3412 | if (seqtype < ARRAY_LENGTH(entry->seq)) | |
| 3284 | // if so, we need to add a node | |
| 3285 | if (seqtype < SEQ_TYPE_TOTAL) | |
| 3413 | 3286 | { |
| 3414 | / | |
| 3287 | // add a new port node | |
| 3415 | 3288 | xml_data_node *portnode = xml_add_child(parentnode, "port", NULL); |
| 3416 | 3289 | if (portnode != NULL) |
| 3417 | 3290 | { |
| 3418 | /* add the port information and attributes */ | |
| 3419 | xml_set_attribute(portnode, "type", input_field_type_to_token(machine, entry->type, entry->player)); | |
| 3291 | // add the port information and attributes | |
| 3292 | astring tempstr; | |
| 3293 | xml_set_attribute(portnode, "type", input_type_to_token(tempstr, entry->type(), entry->player())); | |
| 3420 | 3294 | |
| 3421 | /* add only the sequences that have changed from the defaults */ | |
| 3422 | for (seqtype = 0; seqtype < ARRAY_LENGTH(entry->seq); seqtype++) | |
| 3423 | if (entry->seq[seqtype] != entry->defseq[seqtype]) | |
| 3424 | save_sequence(machine, portnode, seqtype, entry->type, entry->seq[seqtype]); | |
| 3295 | // add only the sequences that have changed from the defaults | |
| 3296 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3297 | if (entry->seq(seqtype) != entry->defseq(seqtype)) | |
| 3298 | save_sequence(portnode, seqtype, entry->type(), entry->seq(seqtype)); | |
| 3425 | 3299 | } |
| 3426 | 3300 | } |
| 3427 | 3301 | } |
| r15082 | r15083 | |
| 3429 | 3303 | } |
| 3430 | 3304 | |
| 3431 | 3305 | |
| 3432 | /*------------------------------------------------- | |
| 3433 | save_game_inputs - add nodes for any game | |
| 3434 | mappings that have changed | |
| 3435 | -------------------------------------------------*/ | |
| 3306 | //------------------------------------------------- | |
| 3307 | // save_game_inputs - add nodes for any game | |
| 3308 | // mappings that have changed | |
| 3309 | //------------------------------------------------- | |
| 3436 | 3310 | |
| 3437 | ||
| 3311 | ||
| 3438 | 3312 | { |
| 3439 | const input_field_config *field; | |
| 3440 | const input_port_config *port; | |
| 3441 | ||
| 3442 | /* iterate over ports */ | |
| 3443 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 3444 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 3445 | if (save_this_input_field_type(field->type)) | |
| 3313 | // iterate over ports | |
| 3314 | for (ioport_port *port = machine().ioport().first_port(); port != NULL; port = port->next()) | |
| 3315 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 3316 | if (save_this_input_field_type(field->type())) | |
| 3446 | 3317 | { |
| 3318 | // determine if we changed | |
| 3447 | 3319 | bool changed = false; |
| 3448 | int seqtype; | |
| 3320 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3321 | changed |= (field->live().seq[seqtype] != field->seq(seqtype)); | |
| 3449 | 3322 | |
| 3450 | /* determine if we changed */ | |
| 3451 | for (seqtype = 0; seqtype < ARRAY_LENGTH(field->state->seq); seqtype++) | |
| 3452 | changed |= (field->state->seq[seqtype] != field->seq[seqtype]); | |
| 3323 | // non-analog changes | |
| 3324 | if (field->live().analog == NULL) | |
| 3325 | changed |= ((field->live().value & field->mask()) != (field->defvalue() & field->mask())); | |
| 3453 | 3326 | |
| 3454 | /* non-analog changes */ | |
| 3455 | if (field->state->analog == NULL) | |
| 3456 | changed |= ((field->state->value & field->mask) != (field->defvalue & field->mask)); | |
| 3457 | ||
| 3458 | /* analog changes */ | |
| 3327 | // analog changes | |
| 3459 | 3328 | else |
| 3460 | 3329 | { |
| 3461 | changed |= (field->state->analog->delta != field->delta); | |
| 3462 | changed |= (field->state->analog->centerdelta != field->centerdelta); | |
| 3463 | changed |= (field->state->analog->sensitivity != field->sensitivity); | |
| 3464 | changed |= (field->state->analog->reverse != ((field->flags & ANALOG_FLAG_REVERSE) != 0)); | |
| 3330 | changed |= (field->live().analog->m_delta != field->delta()); | |
| 3331 | changed |= (field->live().analog->m_centerdelta != field->centerdelta()); | |
| 3332 | changed |= (field->live().analog->m_sensitivity != field->sensitivity()); | |
| 3333 | changed |= (field->live().analog->m_reverse != field->analog_reverse()); | |
| 3465 | 3334 | } |
| 3466 | 3335 | |
| 3467 | / | |
| 3336 | // if we did change, add a new node | |
| 3468 | 3337 | if (changed) |
| 3469 | 3338 | { |
| 3470 | / | |
| 3339 | // add a new port node | |
| 3471 | 3340 | xml_data_node *portnode = xml_add_child(parentnode, "port", NULL); |
| 3472 | 3341 | if (portnode != NULL) |
| 3473 | 3342 | { |
| 3474 | char tempbuffer[20]; | |
| 3343 | // add the identifying information and attributes | |
| 3344 | astring tempstr; | |
| 3345 | xml_set_attribute(portnode, "tag", port->tag()); | |
| 3346 | xml_set_attribute(portnode, "type", input_type_to_token(tempstr, field->type(), field->player())); | |
| 3347 | xml_set_attribute_int(portnode, "mask", field->mask()); | |
| 3348 | xml_set_attribute_int(portnode, "defvalue", field->defvalue() & field->mask()); | |
| 3475 | 3349 | |
| 3476 | /* add the identifying information and attributes */ | |
| 3477 | xml_set_attribute(portnode, "tag", get_port_tag(port, tempbuffer)); | |
| 3478 | xml_set_attribute(portnode, "type", input_field_type_to_token(machine, field->type, field->player)); | |
| 3479 | xml_set_attribute_int(portnode, "mask", field->mask); | |
| 3480 | xml_set_attribute_int(portnode, "defvalue", field->defvalue & field->mask); | |
| 3350 | // add sequences if changed | |
| 3351 | for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) | |
| 3352 | if (field->live().seq[seqtype] != field->seq(seqtype)) | |
| 3353 | save_sequence(portnode, seqtype, field->type(), field->live().seq[seqtype]); | |
| 3481 | 3354 | |
| 3482 | /* add sequences if changed */ | |
| 3483 | for (seqtype = 0; seqtype < ARRAY_LENGTH(field->state->seq); seqtype++) | |
| 3484 | if (field->state->seq[seqtype] != field->seq[seqtype]) | |
| 3485 | save_sequence(machine, portnode, seqtype, field->type, field->state->seq[seqtype]); | |
| 3486 | ||
| 3487 | /* write out non-analog changes */ | |
| 3488 | if (field->state->analog == NULL) | |
| 3355 | // write out non-analog changes | |
| 3356 | if (field->live().analog == NULL) | |
| 3489 | 3357 | { |
| 3490 | if ((field->state->value & field->mask) != (field->defvalue & field->mask)) | |
| 3491 | xml_set_attribute_int(portnode, "value", field->state->value & field->mask); | |
| 3358 | if ((field->live().value & field->mask()) != (field->defvalue() & field->mask())) | |
| 3359 | xml_set_attribute_int(portnode, "value", field->live().value & field->mask()); | |
| 3492 | 3360 | } |
| 3493 | 3361 | |
| 3494 | / | |
| 3362 | // write out analog changes | |
| 3495 | 3363 | else |
| 3496 | 3364 | { |
| 3497 | if (field->state->analog->delta != field->delta) | |
| 3498 | xml_set_attribute_int(portnode, "keydelta", field->state->analog->delta); | |
| 3499 | if (field->state->analog->centerdelta != field->centerdelta) | |
| 3500 | xml_set_attribute_int(portnode, "centerdelta", field->state->analog->centerdelta); | |
| 3501 | if (field->state->analog->sensitivity != field->sensitivity) | |
| 3502 | xml_set_attribute_int(portnode, "sensitivity", field->state->analog->sensitivity); | |
| 3503 | if (field->state->analog->reverse != ((field->flags & ANALOG_FLAG_REVERSE) != 0)) | |
| 3504 | xml_set_attribute(portnode, "reverse", field->state->analog->reverse ? "yes" : "no"); | |
| 3365 | if (field->live().analog->m_delta != field->delta()) | |
| 3366 | xml_set_attribute_int(portnode, "keydelta", field->live().analog->m_delta); | |
| 3367 | if (field->live().analog->m_centerdelta != field->centerdelta()) | |
| 3368 | xml_set_attribute_int(portnode, "centerdelta", field->live().analog->m_centerdelta); | |
| 3369 | if (field->live().analog->m_sensitivity != field->sensitivity()) | |
| 3370 | xml_set_attribute_int(portnode, "sensitivity", field->live().analog->m_sensitivity); | |
| 3371 | if (field->live().analog->m_reverse != field->analog_reverse()) | |
| 3372 | xml_set_attribute(portnode, "reverse", field->live().analog->m_reverse ? "yes" : "no"); | |
| 3505 | 3373 | } |
| 3506 | 3374 | } |
| 3507 | 3375 | } |
| r15082 | r15083 | |
| 3510 | 3378 | |
| 3511 | 3379 | |
| 3512 | 3380 | |
| 3513 | /*************************************************************************** | |
| 3514 | INPUT PLAYBACK | |
| 3515 | ***************************************************************************/ | |
| 3381 | //************************************************************************** | |
| 3382 | // INPUT PLAYBACK | |
| 3383 | //************************************************************************** | |
| 3516 | 3384 | |
| 3517 | /*------------------------------------------------- | |
| 3518 | playback_read_uint8 - read an 8-bit value | |
| 3519 | from the playback file | |
| 3520 | -------------------------------------------------*/ | |
| 3385 | //------------------------------------------------- | |
| 3386 | // playback_read - read a value from the playback | |
| 3387 | // file | |
| 3388 | //------------------------------------------------- | |
| 3521 | 3389 | |
| 3522 | static UINT8 playback_read_uint8(running_machine &machine) | |
| 3390 | template<typename _Type> | |
| 3391 | _Type ioport_manager::playback_read(_Type &result) | |
| 3523 | 3392 | { |
| 3524 | ioport_manager &portdata = machine.ioport(); | |
| 3525 | UINT8 result; | |
| 3393 | // protect against NULL handles if previous reads fail | |
| 3394 | if (!m_playback_file.is_open()) | |
| 3395 | result = 0; | |
| 3526 | 3396 | |
| 3527 | /* protect against NULL handles if previous reads fail */ | |
| 3528 | if (portdata.playback_file == NULL) | |
| 3529 | return 0; | |
| 3530 | ||
| 3531 | /* read the value; if we fail, end playback */ | |
| 3532 | if (portdata.playback_file->read(&result, sizeof(result)) != sizeof(result)) | |
| 3397 | // read the value; if we fail, end playback | |
| 3398 | else if (m_playback_file.read(&result, sizeof(result)) != sizeof(result)) | |
| 3533 | 3399 | { |
| 3534 | playback_end(machine, "End of file"); | |
| 3535 | return 0; | |
| 3400 | playback_end("End of file"); | |
| 3401 | result = 0; | |
| 3536 | 3402 | } |
| 3537 | 3403 | |
| 3538 | /* return the appropriate value */ | |
| 3404 | // return the appropriate value | |
| 3405 | else if (sizeof(result) == 8) | |
| 3406 | result = LITTLE_ENDIANIZE_INT64(result); | |
| 3407 | else if (sizeof(result) == 4) | |
| 3408 | result = LITTLE_ENDIANIZE_INT32(result); | |
| 3409 | else if (sizeof(result) == 2) | |
| 3410 | result = LITTLE_ENDIANIZE_INT16(result); | |
| 3539 | 3411 | return result; |
| 3540 | 3412 | } |
| 3541 | 3413 | |
| 3542 | ||
| 3543 | /*------------------------------------------------- | |
| 3544 | playback_read_uint32 - read a 32-bit value | |
| 3545 | from the playback file | |
| 3546 | -------------------------------------------------*/ | |
| 3547 | ||
| 3548 | static UINT32 playback_read_uint32(running_machine &machine) | |
| 3414 | template<> | |
| 3415 | bool ioport_manager::playback_read<bool>(bool &result) | |
| 3549 | 3416 | { |
| 3550 | ioport_manager &portdata = machine.ioport(); | |
| 3551 | UINT32 result; | |
| 3552 | ||
| 3553 | /* protect against NULL handles if previous reads fail */ | |
| 3554 | if (portdata.playback_file == NULL) | |
| 3555 | return 0; | |
| 3556 | ||
| 3557 | /* read the value; if we fail, end playback */ | |
| 3558 | if (portdata.playback_file->read(&result, sizeof(result)) != sizeof(result)) | |
| 3559 | { | |
| 3560 | playback_end(machine, "End of file"); | |
| 3561 | return 0; | |
| 3562 | } | |
| 3563 | ||
| 3564 | /* return the appropriate value */ | |
| 3565 | return LITTLE_ENDIANIZE_INT32(result); | |
| 3417 | UINT8 temp; | |
| 3418 | playback_read(temp); | |
| 3419 | return result = bool(temp); | |
| 3566 | 3420 | } |
| 3567 | 3421 | |
| 3568 | 3422 | |
| 3569 | /*------------------------------------------------- | |
| 3570 | playback_read_uint64 - read a 64-bit value | |
| 3571 | from the playback file | |
| 3572 | -------------------------------------------------*/ | |
| 3423 | //------------------------------------------------- | |
| 3424 | // playback_init - initialize INP playback | |
| 3425 | //------------------------------------------------- | |
| 3573 | 3426 | |
| 3574 | ||
| 3427 | ||
| 3575 | 3428 | { |
| 3576 | ioport_manager &portdata = machine.ioport(); | |
| 3577 | UINT64 result; | |
| 3578 | ||
| 3579 | /* protect against NULL handles if previous reads fail */ | |
| 3580 | if (portdata.playback_file == NULL) | |
| 3581 | return 0; | |
| 3582 | ||
| 3583 | /* read the value; if we fail, end playback */ | |
| 3584 | if (portdata.playback_file->read(&result, sizeof(result)) != sizeof(result)) | |
| 3585 | { | |
| 3586 | playback_end(machine, "End of file"); | |
| 3587 | return 0; | |
| 3588 | } | |
| 3589 | ||
| 3590 | /* return the appropriate value */ | |
| 3591 | return LITTLE_ENDIANIZE_INT64(result); | |
| 3592 | } | |
| 3593 | ||
| 3594 | ||
| 3595 | /*------------------------------------------------- | |
| 3596 | playback_init - initialize INP playback | |
| 3597 | -------------------------------------------------*/ | |
| 3598 | ||
| 3599 | static time_t playback_init(running_machine &machine) | |
| 3600 | { | |
| 3601 | const char *filename = machine.options().playback(); | |
| 3602 | ioport_manager &portdata = machine.ioport(); | |
| 3603 | UINT8 header[INP_HEADER_SIZE]; | |
| 3604 | time_t basetime; | |
| 3605 | ||
| 3606 | /* if no file, nothing to do */ | |
| 3429 | // if no file, nothing to do | |
| 3430 | const char *filename = machine().options().playback(); | |
| 3607 | 3431 | if (filename[0] == 0) |
| 3608 | 3432 | return 0; |
| 3609 | 3433 | |
| 3610 | /* open the playback file */ | |
| 3611 | portdata.playback_file = auto_alloc(machine, emu_file(machine.options().input_directory(), OPEN_FLAG_READ)); | |
| 3612 | file_error filerr = portdata.playback_file->open(filename); | |
| 3434 | // open the playback file | |
| 3435 | file_error filerr = m_playback_file.open(filename); | |
| 3613 | 3436 | assert_always(filerr == FILERR_NONE, "Failed to open file for playback"); |
| 3614 | 3437 | |
| 3615 | /* read the header and verify that it is a modern version; if not, print an error */ | |
| 3616 | if (portdata.playback_file->read(header, sizeof(header)) != sizeof(header)) | |
| 3438 | // read the header and verify that it is a modern version; if not, print an error | |
| 3439 | UINT8 header[INP_HEADER_SIZE]; | |
| 3440 | if (m_playback_file.read(header, sizeof(header)) != sizeof(header)) | |
| 3617 | 3441 | fatalerror("Input file is corrupt or invalid (missing header)"); |
| 3618 | 3442 | if (memcmp(header, "MAMEINP\0", 8) != 0) |
| 3619 | 3443 | fatalerror("Input file invalid or in an older, unsupported format"); |
| 3620 | 3444 | if (header[0x10] != INP_HEADER_MAJVERSION) |
| 3621 | 3445 | fatalerror("Input file format version mismatch"); |
| 3622 | 3446 | |
| 3623 | / | |
| 3447 | // output info to console | |
| 3624 | 3448 | mame_printf_info("Input file: %s\n", filename); |
| 3625 | 3449 | mame_printf_info("INP version %d.%d\n", header[0x10], header[0x11]); |
| 3626 | basetime = header[0x08] | (header[0x09] << 8) | (header[0x0a] << 16) | (header[0x0b] << 24) | | |
| 3627 | ((UINT64)header[0x0c] << 32) | ((UINT64)header[0x0d] << 40) | ((UINT64)header[0x0e] << 48) | ((UINT64)header[0x0f] << 56); | |
| 3450 | time_t basetime = header[0x08] | (header[0x09] << 8) | (header[0x0a] << 16) | (header[0x0b] << 24) | | |
| 3451 | ((UINT64)header[0x0c] << 32) | ((UINT64)header[0x0d] << 40) | ((UINT64)header[0x0e] << 48) | ((UINT64)header[0x0f] << 56); | |
| 3628 | 3452 | mame_printf_info("Created %s", ctime(&basetime)); |
| 3629 | 3453 | mame_printf_info("Recorded using %s\n", header + 0x20); |
| 3630 | 3454 | |
| 3631 | /* verify the header against the current game */ | |
| 3632 | if (memcmp(machine.system().name, header + 0x14, strlen(machine.system().name) + 1) != 0) | |
| 3633 | mame_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine.system().name); | |
| 3455 | // verify the header against the current game | |
| 3456 | if (memcmp(machine().system().name, header + 0x14, strlen(machine().system().name) + 1) != 0) | |
| 3457 | mame_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine().system().name); | |
| 3634 | 3458 | |
| 3635 | /* enable compression */ | |
| 3636 | portdata.playback_file->compress(FCOMPRESS_MEDIUM); | |
| 3637 | ||
| 3459 | // enable compression | |
| 3460 | m_playback_file.compress(FCOMPRESS_MEDIUM); | |
| 3638 | 3461 | return basetime; |
| 3639 | 3462 | } |
| 3640 | 3463 | |
| 3641 | 3464 | |
| 3642 | /*------------------------------------------------- | |
| 3643 | playback_end - end INP playback | |
| 3644 | -------------------------------------------------*/ | |
| 3465 | //------------------------------------------------- | |
| 3466 | // playback_end - end INP playback | |
| 3467 | //------------------------------------------------- | |
| 3645 | 3468 | |
| 3646 | ||
| 3469 | ||
| 3647 | 3470 | { |
| 3648 | ioport_manager &portdata = machine.ioport(); | |
| 3649 | ||
| 3650 | /* only applies if we have a live file */ | |
| 3651 | if (portdata.playback_file != NULL) | |
| 3471 | // only applies if we have a live file | |
| 3472 | if (m_playback_file.is_open()) | |
| 3652 | 3473 | { |
| 3653 | /* close the file */ | |
| 3654 | auto_free(machine, portdata.playback_file); | |
| 3655 | portdata.playback_file = NULL; | |
| 3474 | // close the file | |
| 3475 | m_playback_file.close(); | |
| 3656 | 3476 | |
| 3657 | / | |
| 3477 | // pop a message | |
| 3658 | 3478 | if (message != NULL) |
| 3659 | 3479 | popmessage("Playback Ended\nReason: %s", message); |
| 3660 | 3480 | |
| 3661 | /* display speed stats */ | |
| 3662 | portdata.playback_accumulated_speed /= portdata.playback_accumulated_frames; | |
| 3663 | mame_printf_info("Total playback frames: %d\n", (UINT32)portdata.playback_accumulated_frames); | |
| 3664 | mame_printf_info("Average recorded speed: %d%%\n", (UINT32)((portdata.playback_accumulated_speed * 200 + 1) >> 21)); | |
| 3481 | // display speed stats | |
| 3482 | m_playback_accumulated_speed /= m_playback_accumulated_frames; | |
| 3483 | mame_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames)); | |
| 3484 | mame_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21)); | |
| 3665 | 3485 | } |
| 3666 | 3486 | } |
| 3667 | 3487 | |
| 3668 | 3488 | |
| 3669 | /*------------------------------------------------- | |
| 3670 | playback_frame - start of frame callback for | |
| 3671 | playback | |
| 3672 | -------------------------------------------------*/ | |
| 3489 | //------------------------------------------------- | |
| 3490 | // playback_frame - start of frame callback for | |
| 3491 | // playback | |
| 3492 | //------------------------------------------------- | |
| 3673 | 3493 | |
| 3674 | ||
| 3494 | ||
| 3675 | 3495 | { |
| 3676 | ioport_manager &portdata = machine.ioport(); | |
| 3677 | ||
| 3678 | /* if playing back, fetch the information and verify */ | |
| 3679 | if (portdata.playback_file != NULL) | |
| 3496 | // if playing back, fetch the information and verify | |
| 3497 | if (m_playback_file.is_open()) | |
| 3680 | 3498 | { |
| 3499 | // first the absolute time | |
| 3681 | 3500 | attotime readtime; |
| 3682 | ||
| 3683 | /* first the absolute time */ | |
| 3684 | readtime.seconds = playback_read_uint32(machine); | |
| 3685 | readtime.attoseconds = playback_read_uint64(machine); | |
| 3501 | playback_read(readtime.seconds); | |
| 3502 | playback_read(readtime.attoseconds); | |
| 3686 | 3503 | if (readtime != curtime) |
| 3687 | playback_end( | |
| 3504 | playback_end( | |
| 3688 | 3505 | |
| 3689 | /* then the speed */ | |
| 3690 | portdata.playback_accumulated_speed += playback_read_uint32(machine); | |
| 3691 | portdata.playback_accumulated_frames++; | |
| 3506 | // then the speed | |
| 3507 | UINT32 curspeed; | |
| 3508 | m_playback_accumulated_speed += playback_read(curspeed); | |
| 3509 | m_playback_accumulated_frames++; | |
| 3692 | 3510 | } |
| 3693 | 3511 | } |
| 3694 | 3512 | |
| 3695 | 3513 | |
| 3696 | /*------------------------------------------------- | |
| 3697 | playback_port - per-port callback for playback | |
| 3698 | -------------------------------------------------*/ | |
| 3514 | //------------------------------------------------- | |
| 3515 | // playback_port - per-port callback for playback | |
| 3516 | //------------------------------------------------- | |
| 3699 | 3517 | |
| 3700 | ||
| 3518 | ||
| 3701 | 3519 | { |
| 3702 | ioport_manager &portdata = port->machine().ioport(); | |
| 3703 | ||
| 3704 | /* if playing back, fetch information about this port */ | |
| 3705 | if (portdata.playback_file != NULL) | |
| 3520 | // if playing back, fetch information about this port | |
| 3521 | if (m_playback_file.is_open()) | |
| 3706 | 3522 | { |
| 3707 | analog_field_state *analog; | |
| 3523 | // read the default value and the digital state | |
| 3524 | playback_read(port.live().defvalue); | |
| 3525 | playback_read(port.live().digital); | |
| 3708 | 3526 | |
| 3709 | /* read the default value and the digital state */ | |
| 3710 | port->state->defvalue = playback_read_uint32(port->machine()); | |
| 3711 | port->state->digital = playback_read_uint32(port->machine()); | |
| 3712 | ||
| 3713 | /* loop over analog ports and save their data */ | |
| 3714 | for (analog = port->state->analoglist; analog != NULL; analog = analog->next) | |
| 3527 | // loop over analog ports and save their data | |
| 3528 | for (analog_field *analog = port.live().analoglist.first(); analog != NULL; analog = analog->next()) | |
| 3715 | 3529 | { |
| 3716 | /* read current and previous values */ | |
| 3717 | analog->accum = playback_read_uint32(port->machine()); | |
| 3718 | analog->previous = playback_read_uint32(port->machine()); | |
| 3530 | // read current and previous values | |
| 3531 | playback_read(analog->m_accum); | |
| 3532 | playback_read(analog->m_previous); | |
| 3719 | 3533 | |
| 3720 | /* read configuration information */ | |
| 3721 | analog->sensitivity = playback_read_uint32(port->machine()); | |
| 3722 | analog->reverse = playback_read_uint8(port->machine()); | |
| 3534 | // read configuration information | |
| 3535 | playback_read(analog->m_sensitivity); | |
| 3536 | playback_read(analog->m_reverse); | |
| 3723 | 3537 | } |
| 3724 | 3538 | } |
| 3725 | 3539 | } |
| 3726 | 3540 | |
| 3727 | 3541 | |
| 3542 | //------------------------------------------------- | |
| 3543 | // record_write - write a value to the record file | |
| 3544 | //------------------------------------------------- | |
| 3728 | 3545 | |
| 3729 | /*************************************************************************** | |
| 3730 | INPUT RECORDING | |
| 3731 | ***************************************************************************/ | |
| 3732 | ||
| 3733 | /*------------------------------------------------- | |
| 3734 | record_write_uint8 - write an 8-bit value | |
| 3735 | to the record file | |
| 3736 | -------------------------------------------------*/ | |
| 3737 | ||
| 3738 | static void record_write_uint8(running_machine &machine, UINT8 data) | |
| 3546 | template<typename _Type> | |
| 3547 | void ioport_manager::record_write(_Type value) | |
| 3739 | 3548 | { |
| 3740 | ioport_manager &portdata = machine.ioport(); | |
| 3741 | UINT8 result = data; | |
| 3742 | ||
| 3743 | /* protect against NULL handles if previous reads fail */ | |
| 3744 | if (portdata.record_file == NULL) | |
| 3549 | // protect against NULL handles if previous reads fail | |
| 3550 | if (!m_record_file.is_open()) | |
| 3745 | 3551 | return; |
| 3746 | 3552 | |
| 3747 | /* read the value; if we fail, end playback */ | |
| 3748 | if (portdata.record_file->write(&result, sizeof(result)) != sizeof(result)) | |
| 3749 | record_end(machine, "Out of space"); | |
| 3553 | // read the value; if we fail, end playback | |
| 3554 | if (m_record_file.write(&value, sizeof(value)) != sizeof(value)) | |
| 3555 | record_end("Out of space"); | |
| 3750 | 3556 | } |
| 3751 | 3557 | |
| 3752 | ||
| 3753 | /*------------------------------------------------- | |
| 3754 | record_write_uint32 - write a 32-bit value | |
| 3755 | to the record file | |
| 3756 | -------------------------------------------------*/ | |
| 3757 | ||
| 3758 | static void record_write_uint32(running_machine &machine, UINT32 data) | |
| 3558 | template<> | |
| 3559 | void ioport_manager::record_write<bool>(bool value) | |
| 3759 | 3560 | { |
| 3760 | ioport_manager &portdata = machine.ioport(); | |
| 3761 | UINT32 result = LITTLE_ENDIANIZE_INT32(data); | |
| 3762 | ||
| 3763 | /* protect against NULL handles if previous reads fail */ | |
| 3764 | if (portdata.record_file == NULL) | |
| 3765 | return; | |
| 3766 | ||
| 3767 | /* read the value; if we fail, end playback */ | |
| 3768 | if (portdata.record_file->write(&result, sizeof(result)) != sizeof(result)) | |
| 3769 | record_end(machine, "Out of space"); | |
| 3561 | UINT8 byte = UINT8(value); | |
| 3562 | record_write(byte); | |
| 3770 | 3563 | } |
| 3771 | 3564 | |
| 3772 | 3565 | |
| 3773 | /*------------------------------------------------- | |
| 3774 | record_write_uint64 - write a 64-bit value | |
| 3775 | to the record file | |
| 3776 | -------------------------------------------------*/ | |
| 3566 | //------------------------------------------------- | |
| 3567 | // record_init - initialize INP recording | |
| 3568 | //------------------------------------------------- | |
| 3777 | 3569 | |
| 3778 | ||
| 3570 | ||
| 3779 | 3571 | { |
| 3780 | ioport_manager &portdata = machine.ioport(); | |
| 3781 | UINT64 result = LITTLE_ENDIANIZE_INT64(data); | |
| 3782 | ||
| 3783 | /* protect against NULL handles if previous reads fail */ | |
| 3784 | if (portdata.record_file == NULL) | |
| 3785 | return; | |
| 3786 | ||
| 3787 | /* read the value; if we fail, end playback */ | |
| 3788 | if (portdata.record_file->write(&result, sizeof(result)) != sizeof(result)) | |
| 3789 | record_end(machine, "Out of space"); | |
| 3790 | } | |
| 3791 | ||
| 3792 | ||
| 3793 | /*------------------------------------------------- | |
| 3794 | record_init - initialize INP recording | |
| 3795 | -------------------------------------------------*/ | |
| 3796 | ||
| 3797 | static void record_init(running_machine &machine) | |
| 3798 | { | |
| 3799 | const char *filename = machine.options().record(); | |
| 3800 | ioport_manager &portdata = machine.ioport(); | |
| 3801 | UINT8 header[INP_HEADER_SIZE]; | |
| 3802 | system_time systime; | |
| 3803 | ||
| 3804 | /* if no file, nothing to do */ | |
| 3572 | // if no file, nothing to do | |
| 3573 | const char *filename = machine().options().record(); | |
| 3805 | 3574 | if (filename[0] == 0) |
| 3806 | 3575 | return; |
| 3807 | 3576 | |
| 3808 | /* open the record file */ | |
| 3809 | portdata.record_file = auto_alloc(machine, emu_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS)); | |
| 3810 | file_error filerr = portdata.record_file->open(filename); | |
| 3577 | // open the record file | |
| 3578 | file_error filerr = m_record_file.open(filename); | |
| 3811 | 3579 | assert_always(filerr == FILERR_NONE, "Failed to open file for recording"); |
| 3812 | 3580 | |
| 3813 | /* get the base time */ | |
| 3814 | machine.base_datetime(systime); | |
| 3581 | // get the base time | |
| 3582 | system_time systime; | |
| 3583 | machine().base_datetime(systime); | |
| 3815 | 3584 | |
| 3816 | /* fill in the header */ | |
| 3817 | memset(header, 0, sizeof(header)); | |
| 3585 | // fill in the header | |
| 3586 | UINT8 header[INP_HEADER_SIZE] = { 0 }; | |
| 3818 | 3587 | memcpy(header, "MAMEINP\0", 8); |
| 3819 | 3588 | header[0x08] = systime.time >> 0; |
| 3820 | 3589 | header[0x09] = systime.time >> 8; |
| r15082 | r15083 | |
| 3826 | 3595 | header[0x0f] = systime.time >> 56; |
| 3827 | 3596 | header[0x10] = INP_HEADER_MAJVERSION; |
| 3828 | 3597 | header[0x11] = INP_HEADER_MINVERSION; |
| 3829 | strcpy((char *)header + 0x14, machine.system().name); | |
| 3598 | strcpy((char *)header + 0x14, machine().system().name); | |
| 3830 | 3599 | sprintf((char *)header + 0x20, "%s %s", emulator_info::get_appname(), build_version); |
| 3831 | 3600 | |
| 3832 | /* write it */ | |
| 3833 | portdata.record_file->write(header, sizeof(header)); | |
| 3601 | // write it | |
| 3602 | m_record_file.write(header, sizeof(header)); | |
| 3834 | 3603 | |
| 3835 | /* enable compression */ | |
| 3836 | portdata.record_file->compress(FCOMPRESS_MEDIUM); | |
| 3604 | // enable compression | |
| 3605 | m_record_file.compress(FCOMPRESS_MEDIUM); | |
| 3837 | 3606 | } |
| 3838 | 3607 | |
| 3839 | 3608 | |
| 3840 | /*------------------------------------------------- | |
| 3841 | record_end - end INP recording | |
| 3842 | -------------------------------------------------*/ | |
| 3609 | //------------------------------------------------- | |
| 3610 | // record_end - end INP recording | |
| 3611 | //------------------------------------------------- | |
| 3843 | 3612 | |
| 3844 | ||
| 3613 | ||
| 3845 | 3614 | { |
| 3846 | ioport_manager &portdata = machine.ioport(); | |
| 3847 | ||
| 3848 | /* only applies if we have a live file */ | |
| 3849 | if (portdata.record_file != NULL) | |
| 3615 | // only applies if we have a live file | |
| 3616 | if (m_record_file.is_open()) | |
| 3850 | 3617 | { |
| 3851 | /* close the file */ | |
| 3852 | auto_free(machine, portdata.record_file); | |
| 3853 | portdata.record_file = NULL; | |
| 3618 | // close the file | |
| 3619 | m_record_file.close(); | |
| 3854 | 3620 | |
| 3855 | / | |
| 3621 | // pop a message | |
| 3856 | 3622 | if (message != NULL) |
| 3857 | 3623 | popmessage("Recording Ended\nReason: %s", message); |
| 3858 | 3624 | } |
| 3859 | 3625 | } |
| 3860 | 3626 | |
| 3861 | 3627 | |
| 3862 | /*------------------------------------------------- | |
| 3863 | record_frame - start of frame callback for | |
| 3864 | recording | |
| 3865 | -------------------------------------------------*/ | |
| 3628 | //------------------------------------------------- | |
| 3629 | // record_frame - start of frame callback for | |
| 3630 | // recording | |
| 3631 | //------------------------------------------------- | |
| 3866 | 3632 | |
| 3867 | ||
| 3633 | ||
| 3868 | 3634 | { |
| 3869 | ioport_manager &portdata = machine.ioport(); | |
| 3870 | ||
| 3871 | /* if recording, record information about the current frame */ | |
| 3872 | if (portdata.record_file != NULL) | |
| 3635 | // if recording, record information about the current frame | |
| 3636 | if (m_record_file.is_open()) | |
| 3873 | 3637 | { |
| 3874 | /* first the absolute time */ | |
| 3875 | record_write_uint32(machine, curtime.seconds); | |
| 3876 | record_write_uint64(machine, curtime.attoseconds); | |
| 3638 | // first the absolute time | |
| 3639 | record_write(curtime.seconds); | |
| 3640 | record_write(curtime.attoseconds); | |
| 3877 | 3641 | |
| 3878 | /* then the current speed */ | |
| 3879 | record_write_uint32(machine, machine.video().speed_percent() * (double)(1 << 20)); | |
| 3642 | // then the current speed | |
| 3643 | record_write(UINT32(machine().video().speed_percent() * double(1 << 20))); | |
| 3880 | 3644 | } |
| 3881 | 3645 | } |
| 3882 | 3646 | |
| 3883 | 3647 | |
| 3884 | /*------------------------------------------------- | |
| 3885 | record_port - per-port callback for record | |
| 3886 | -------------------------------------------------*/ | |
| 3648 | //------------------------------------------------- | |
| 3649 | // record_port - per-port callback for record | |
| 3650 | //------------------------------------------------- | |
| 3887 | 3651 | |
| 3888 | ||
| 3652 | ||
| 3889 | 3653 | { |
| 3890 | ioport_manager &portdata = port->machine().ioport(); | |
| 3891 | ||
| 3892 | /* if recording, store information about this port */ | |
| 3893 | if (portdata.record_file != NULL) | |
| 3654 | // if recording, store information about this port | |
| 3655 | if (m_record_file.is_open()) | |
| 3894 | 3656 | { |
| 3895 | analog_field_state *analog; | |
| 3657 | // store the default value and digital state | |
| 3658 | record_write(port.live().defvalue); | |
| 3659 | record_write(port.live().digital); | |
| 3896 | 3660 | |
| 3897 | /* store the default value and digital state */ | |
| 3898 | record_write_uint32(port->machine(), port->state->defvalue); | |
| 3899 | record_write_uint32(port->machine(), port->state->digital); | |
| 3900 | ||
| 3901 | /* loop over analog ports and save their data */ | |
| 3902 | for (analog = port->state->analoglist; analog != NULL; analog = analog->next) | |
| 3661 | // loop over analog ports and save their data | |
| 3662 | for (analog_field *analog = port.live().analoglist.first(); analog != NULL; analog = analog->next()) | |
| 3903 | 3663 | { |
| 3904 | /* store current and previous values */ | |
| 3905 | record_write_uint32(port->machine(), analog->accum); | |
| 3906 | record_write_uint32(port->machine(), analog->previous); | |
| 3664 | // store current and previous values | |
| 3665 | record_write(analog->m_accum); | |
| 3666 | record_write(analog->m_previous); | |
| 3907 | 3667 | |
| 3908 | /* store configuration information */ | |
| 3909 | record_write_uint32(port->machine(), analog->sensitivity); | |
| 3910 | record_write_uint8(port->machine(), analog->reverse); | |
| 3668 | // store configuration information | |
| 3669 | record_write(analog->m_sensitivity); | |
| 3670 | record_write(analog->m_reverse); | |
| 3911 | 3671 | } |
| 3912 | 3672 | } |
| 3913 | 3673 | } |
| 3914 | 3674 | |
| 3915 | int input_machine_has_keyboard(running_machine &machine) | |
| 3916 | { | |
| 3917 | int have_keyboard = FALSE; | |
| 3918 | const input_field_config *field; | |
| 3919 | const input_port_config *port; | |
| 3920 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 3921 | { | |
| 3922 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 3923 | { | |
| 3924 | // if we are at init, check IPT_KEYBOARD for inputx_init | |
| 3925 | if (!port->machine().ioport().safe_to_read && field->type == IPT_KEYBOARD) | |
| 3926 | { | |
| 3927 | have_keyboard = TRUE; | |
| 3928 | break; | |
| 3929 | } | |
| 3930 | 3675 | |
| 3931 | // else, check if there is a keyboard and if such a keyboard is enabled | |
| 3932 | if (field->type == IPT_KEYBOARD && input_condition_true(field->machine(), &field->condition, field->port().owner())) | |
| 3933 | { | |
| 3934 | have_keyboard = TRUE; | |
| 3935 | break; | |
| 3936 | } | |
| 3937 | } | |
| 3938 | } | |
| 3939 | return have_keyboard; | |
| 3676 | ||
| 3677 | //************************************************************************** | |
| 3678 | // I/O PORT CONFIGURER | |
| 3679 | //************************************************************************** | |
| 3680 | ||
| 3681 | //------------------------------------------------- | |
| 3682 | // ioport_configurer - constructor | |
| 3683 | //------------------------------------------------- | |
| 3684 | ||
| 3685 | ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, astring &errorbuf) | |
| 3686 | : m_owner(owner), | |
| 3687 | m_portlist(portlist), | |
| 3688 | m_errorbuf(errorbuf), | |
| 3689 | m_curport(NULL), | |
| 3690 | m_curfield(NULL), | |
| 3691 | m_cursetting(NULL) | |
| 3692 | { | |
| 3940 | 3693 | } |
| 3941 | 3694 | |
| 3942 | /*************************************************************************** | |
| 3943 | CODE ASSEMBLING | |
| 3944 | ***************************************************************************/ | |
| 3945 | 3695 | |
| 3946 | /*------------------------------------------------- | |
| 3947 | code_point_string - obtain a string representation of a | |
| 3948 | given code; used for logging and debugging | |
| 3949 | -------------------------------------------------*/ | |
| 3696 | //------------------------------------------------- | |
| 3697 | // string_from_token - convert an | |
| 3698 | // ioport_token to a default string | |
| 3699 | //------------------------------------------------- | |
| 3950 | 3700 | |
| 3951 | ||
| 3701 | ||
| 3952 | 3702 | { |
| 3953 | static char buf[16]; | |
| 3954 | const char *result = buf; | |
| 3703 | // 0 is an invalid index | |
| 3704 | if (string == NULL) | |
| 3705 | return NULL; | |
| 3955 | 3706 | |
| 3956 | switch(ch) | |
| 3957 | { | |
| 3958 | /* check some magic values */ | |
| 3959 | case '\0': strcpy(buf, "\\0"); break; | |
| 3960 | case '\r': strcpy(buf, "\\r"); break; | |
| 3961 | case '\n': strcpy(buf, "\\n"); break; | |
| 3962 | case '\t': strcpy(buf, "\\t"); break; | |
| 3707 | // if the index is greater than the count, assume it to be a pointer | |
| 3708 | if (FPTR(string) >= INPUT_STRING_COUNT) | |
| 3709 | return string; | |
| 3963 | 3710 | |
| 3964 | default: | |
| 3965 | if ((ch >= 32) && (ch < 128)) | |
| 3966 | { | |
| 3967 | /* seven bit ASCII is easy */ | |
| 3968 | buf[0] = (char) ch; | |
| 3969 | buf[1] = '\0'; | |
| 3970 | } | |
| 3971 | else if (ch >= UCHAR_MAMEKEY_BEGIN) | |
| 3972 | { | |
| 3973 | /* try to obtain a codename with code_name(); this can result in an empty string */ | |
| 3974 | input_code code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, input_item_id(ch - UCHAR_MAMEKEY_BEGIN)); | |
| 3975 | astring tempstr; | |
| 3976 | snprintf(buf, ARRAY_LENGTH(buf), "%s", machine.input().code_name(tempstr, code)); | |
| 3977 | } | |
| 3978 | else | |
| 3979 | { | |
| 3980 | /* empty string; resolve later */ | |
| 3981 | buf[0] = '\0'; | |
| 3982 | } | |
| 3711 | #if FALSE // Set TRUE, If you want to take care missing-token or wrong-sorting | |
| 3983 | 3712 | |
| 3984 | /* did we fail to resolve? if so, we have a last resort */ | |
| 3985 | if (buf[0] == '\0') | |
| 3986 | snprintf(buf, ARRAY_LENGTH(buf), "U+%04X", (unsigned) ch); | |
| 3987 | break; | |
| 3713 | // otherwise, scan the list for a matching string and return it | |
| 3714 | { | |
| 3715 | int index; | |
| 3716 | for (index = 0; index < ARRAY_LENGTH(input_port_default_strings); index++) | |
| 3717 | if (input_port_default_strings[index].id == FPTR(string)) | |
| 3718 | return input_port_default_strings[index].string; | |
| 3988 | 3719 | } |
| 3989 | return result; | |
| 3720 | return "(Unknown Default)"; | |
| 3721 | ||
| 3722 | #else | |
| 3723 | ||
| 3724 | return input_port_default_strings[FPTR(string)-1].string; | |
| 3725 | ||
| 3726 | #endif | |
| 3990 | 3727 | } |
| 3991 | 3728 | |
| 3992 | 3729 | |
| 3993 | /*------------------------------------------------- | |
| 3994 | scan_keys - scans through input ports and | |
| 3995 | sets up natural keyboard input mapping | |
| 3996 | -------------------------------------------------*/ | |
| 3730 | //------------------------------------------------- | |
| 3731 | // port_alloc - allocate a new port | |
| 3732 | //------------------------------------------------- | |
| 3997 | 3733 | |
| 3998 | ||
| 3734 | vo | |
| 3999 | 3735 | { |
| 4000 | int code_count = 0; | |
| 4001 | const input_port_config *port; | |
| 4002 | const input_field_config *field; | |
| 4003 | unicode_char code; | |
| 3736 | // create the full tag | |
| 3737 | astring fulltag; | |
| 3738 | m_owner.subtag(fulltag, tag); | |
| 3739 | ||
| 3740 | // add it to the list, and reset current field/setting | |
| 3741 | m_curport = &m_portlist.append(fulltag, *global_alloc(ioport_port(m_owner, fulltag))); | |
| 3742 | m_curfield = NULL; | |
| 3743 | m_cursetting = NULL; | |
| 3744 | } | |
| 4004 | 3745 | |
| 4005 | assert(keys < NUM_SIMUL_KEYS); | |
| 4006 | 3746 | |
| 4007 | for (port = portconfig; port != NULL; port = port->next()) | |
| 4008 | { | |
| 4009 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 4010 | { | |
| 4011 | if (field->type == IPT_KEYBOARD) | |
| 4012 | { | |
| 4013 | code = get_keyboard_code(field, shift); | |
| 4014 | if (code != 0) | |
| 4015 | { | |
| 4016 | /* is this a shifter key? */ | |
| 4017 | if ((code >= UCHAR_SHIFT_BEGIN) && (code <= UCHAR_SHIFT_END)) | |
| 4018 | { | |
| 4019 | shift_ports[keys] = field; | |
| 4020 | code_count += scan_keys(machine, | |
| 4021 | portconfig, | |
| 4022 | codes ? &codes[code_count] : NULL, | |
| 4023 | ports, | |
| 4024 | shift_ports, | |
| 4025 | keys+1, | |
| 4026 | code - UCHAR_SHIFT_1 + 1); | |
| 4027 | } | |
| 4028 | else | |
| 4029 | { | |
| 4030 | /* not a shifter key; record normally */ | |
| 4031 | if (codes) | |
| 4032 | { | |
| 4033 | /* if we have a destination, record the codes used here */ | |
| 4034 | memcpy((void *) codes[code_count].field, shift_ports, sizeof(shift_ports[0]) * keys); | |
| 4035 | codes[code_count].ch = code; | |
| 4036 | codes[code_count].field[keys] = field; | |
| 4037 | } | |
| 3747 | //------------------------------------------------- | |
| 3748 | // port_modify - find an existing port and | |
| 3749 | // modify it | |
| 3750 | //------------------------------------------------- | |
| 4038 | 3751 | |
| 4039 | /* increment the count */ | |
| 4040 | code_count++; | |
| 3752 | void ioport_configurer::port_modify(const char *tag) | |
| 3753 | { | |
| 3754 | // create the full tag | |
| 3755 | astring fulltag; | |
| 3756 | m_owner.subtag(fulltag, tag); | |
| 4041 | 3757 | |
| 4042 | if (LOG_INPUTX) | |
| 4043 | logerror("inputx: code=%i (%s) port=%p field->name='%s'\n", (int) code, code_point_string(machine, code), port, field->name); | |
| 4044 | } | |
| 4045 | } | |
| 4046 | } | |
| 4047 | } | |
| 4048 | } | |
| 4049 | return code_count; | |
| 3758 | // find the existing port | |
| 3759 | m_curport = m_portlist.find(fulltag.cstr()); | |
| 3760 | if (m_curport == NULL) | |
| 3761 | throw emu_fatalerror("Requested to modify nonexistent port '%s'", fulltag.cstr()); | |
| 3762 | ||
| 3763 | // bump the modification count, and reset current field/setting | |
| 3764 | m_curport->m_modcount++; | |
| 3765 | m_curfield = NULL; | |
| 3766 | m_cursetting = NULL; | |
| 4050 | 3767 | } |
| 4051 | 3768 | |
| 4052 | 3769 | |
| 3770 | //------------------------------------------------- | |
| 3771 | // field_alloc - allocate a new field | |
| 3772 | //------------------------------------------------- | |
| 4053 | 3773 | |
| 4054 | /*------------------------------------------------- | |
| 4055 | build_codes - given an input port table, create | |
| 4056 | a input code table useful for mapping unicode | |
| 4057 | chars | |
| 4058 | -------------------------------------------------*/ | |
| 4059 | ||
| 4060 | static inputx_code *build_codes(running_machine &machine, const input_port_config *portconfig) | |
| 3774 | void ioport_configurer::field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name) | |
| 4061 | 3775 | { |
| 4062 | inputx_code *codes = NULL; | |
| 4063 | const input_port_config *ports[NUM_SIMUL_KEYS]; | |
| 4064 | const input_field_config *fields[NUM_SIMUL_KEYS]; | |
| 4065 | int code_count; | |
| 3776 | // make sure we have a port | |
| 3777 | if (m_curport == NULL) | |
| 3778 | throw emu_fatalerror("alloc_field called with no active port (mask=%X defval=%X)\n", mask, defval); \ | |
| 4066 | 3779 | |
| 4067 | /* first count the number of codes */ | |
| 4068 | code_count = scan_keys(machine, portconfig, NULL, ports, fields, 0, 0); | |
| 4069 | if (code_count > 0) | |
| 4070 | { | |
| 4071 | /* allocate the codes */ | |
| 4072 | codes = auto_alloc_array_clear(machine, inputx_code, code_count + 1); | |
| 3780 | // append the field | |
| 3781 | if (type != IPT_UNKNOWN && type != IPT_UNUSED) | |
| 3782 | m_curport->m_active |= mask; | |
| 3783 | m_curfield = &m_curport->m_fieldlist.append(*global_alloc(ioport_field(*m_curport, type, defval, mask, string_from_token(name)))); | |
| 4073 | 3784 | |
| 4074 | /* and populate them */ | |
| 4075 | scan_keys(machine, portconfig, codes, ports, fields, 0, 0); | |
| 4076 | } | |
| 4077 | return codes; | |
| 3785 | // reset the current setting | |
| 3786 | m_cursetting = NULL; | |
| 4078 | 3787 | } |
| 4079 | 3788 | |
| 4080 | 3789 | |
| 3790 | //------------------------------------------------- | |
| 3791 | // field_add_char - add a character to a field | |
| 3792 | //------------------------------------------------- | |
| 4081 | 3793 | |
| 4082 | /*************************************************************************** | |
| 4083 | VALIDITY CHECKS | |
| 4084 | ***************************************************************************/ | |
| 4085 | ||
| 4086 | /*------------------------------------------------- | |
| 4087 | validate_natural_keyboard_statics - | |
| 4088 | validates natural keyboard static data | |
| 4089 | -------------------------------------------------*/ | |
| 4090 | ||
| 4091 | int validate_natural_keyboard_statics(void) | |
| 3794 | void ioport_configurer::field_add_char(unicode_char ch) | |
| 4092 | 3795 | { |
| 4093 | int i; | |
| 4094 | int error = FALSE; | |
| 4095 | unicode_char last_char = 0; | |
| 4096 | const char_info *ci; | |
| 4097 | ||
| 4098 | /* check to make sure that charinfo is in order */ | |
| 4099 | for (i = 0; i < ARRAY_LENGTH(charinfo); i++) | |
| 4100 | { | |
| 4101 | if (last_char >= charinfo[i].ch) | |
| 3796 | for (int index = 0; index < ARRAY_LENGTH(m_curfield->m_chars); index++) | |
| 3797 | if (m_curfield->m_chars[index] == 0) | |
| 4102 | 3798 | { |
| 4103 | mame_printf_error("inputx: charinfo is out of order; 0x%08x should be higher than 0x%08x\n", charinfo[i].ch, last_char); | |
| 4104 | error = TRUE; | |
| 3799 | m_curfield->m_chars[index] = ch; | |
| 3800 | break; | |
| 4105 | 3801 | } |
| 4106 | last_char = charinfo[i].ch; | |
| 4107 | } | |
| 4108 | ||
| 4109 | /* check to make sure that I can look up everything on alternate_charmap */ | |
| 4110 | for (i = 0; i < ARRAY_LENGTH(charinfo); i++) | |
| 4111 | { | |
| 4112 | ci = find_charinfo(charinfo[i].ch); | |
| 4113 | if (ci != &charinfo[i]) | |
| 4114 | { | |
| 4115 | mame_printf_error("inputx: expected find_charinfo(0x%08x) to work properly\n", charinfo[i].ch); | |
| 4116 | error = TRUE; | |
| 4117 | } | |
| 4118 | } | |
| 4119 | return error; | |
| 4120 | 3802 | } |
| 4121 | 3803 | |
| 4122 | 3804 | |
| 3805 | //------------------------------------------------- | |
| 3806 | // field_add_code - add a character to a field | |
| 3807 | //------------------------------------------------- | |
| 4123 | 3808 | |
| 4124 | /*************************************************************************** | |
| 4125 | CORE IMPLEMENTATION | |
| 4126 | ***************************************************************************/ | |
| 3809 | void ioport_configurer::field_add_code(input_seq_type which, input_code code) | |
| 3810 | { | |
| 3811 | m_curfield->m_seq[which] |= code; | |
| 3812 | } | |
| 4127 | 3813 | |
| 4128 | static void clear_keybuffer(running_machine &machine) | |
| 3814 | ||
| 3815 | //------------------------------------------------- | |
| 3816 | // setting_alloc - allocate a new setting | |
| 3817 | //------------------------------------------------- | |
| 3818 | ||
| 3819 | void ioport_configurer::setting_alloc(ioport_value value, const char *name) | |
| 4129 | 3820 | { |
| 4130 | ioport_manager &portdata = machine.ioport(); | |
| 4131 | portdata.keybuffer.buffer = NULL; | |
| 4132 | portdata.queue_chars = NULL; | |
| 4133 | portdata.codes = NULL; | |
| 3821 | // make sure we have a field | |
| 3822 | if (m_curfield == NULL) | |
| 3823 | throw emu_fatalerror("alloc_setting called with no active field (value=%X name=%s)\n", value, name); | |
| 3824 | ||
| 3825 | // append a new setting | |
| 3826 | m_curfield->m_settinglist.append(*global_alloc(ioport_setting(*m_curfield, value & m_curfield->mask(), string_from_token(name)))); | |
| 4134 | 3827 | } |
| 4135 | 3828 | |
| 4136 | 3829 | |
| 3830 | //------------------------------------------------- | |
| 3831 | // set_condition - set the condition for either | |
| 3832 | // the current setting or field | |
| 3833 | //------------------------------------------------- | |
| 4137 | 3834 | |
| 4138 | ||
| 3835 | ||
| 4139 | 3836 | { |
| 4140 | ioport_manager &portdata = machine.ioport(); | |
| 4141 | portdata.inputx_timer = machine.scheduler().timer_alloc(FUNC(inputx_timerproc)); | |
| 4142 | portdata.keybuffer.begin_pos = 0; | |
| 4143 | portdata.keybuffer.end_pos = 0; | |
| 4144 | portdata.keybuffer.status_keydown = 0; | |
| 4145 | portdata.keybuffer.size = KEY_BUFFER_SIZE; | |
| 4146 | portdata.keybuffer.buffer = auto_alloc_array(machine, unicode_char, portdata.keybuffer.size); | |
| 4147 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(clear_keybuffer), &machine)); | |
| 3837 | ioport_condition &target = (m_cursetting != NULL) ? m_cursetting->condition() : m_curfield->condition(); | |
| 3838 | target.set(condition, tag, mask, value); | |
| 4148 | 3839 | } |
| 4149 | 3840 | |
| 4150 | 3841 | |
| 3842 | //------------------------------------------------- | |
| 3843 | // onoff_alloc - allocate an on/off DIP switch | |
| 3844 | //------------------------------------------------- | |
| 4151 | 3845 | |
| 4152 | void i | |
| 3846 | void ioport | |
| 4153 | 3847 | { |
| 4154 | ioport_manager &portdata = machine.ioport(); | |
| 4155 | portdata.inputx_timer = NULL; | |
| 4156 | portdata.accept_char = NULL; | |
| 4157 | portdata.charqueue_empty = NULL; | |
| 4158 | clear_keybuffer(machine); | |
| 3848 | // allocate a field normally | |
| 3849 | field_alloc(IPT_DIPSWITCH, defval, mask, name); | |
| 4159 | 3850 | |
| 4160 | if (machine.debug_flags & DEBUG_FLAG_ENABLED) | |
| 3851 | // special case service mode | |
| 3852 | if (name == DEF_STR(Service_Mode)) | |
| 4161 | 3853 | { |
| 4162 | debug_console_register_command(machine, "input", CMDFLAG_NONE, 0, 1, 1, execute_input); | |
| 4163 | debug_console_register_command(machine, "dumpkbd", CMDFLAG_NONE, 0, 0, 1, execute_dumpkbd); | |
| 3854 | field_set_toggle(); | |
| 3855 | m_curfield->m_seq[SEQ_TYPE_STANDARD].set(KEYCODE_F2); | |
| 4164 | 3856 | } |
| 3857 | ||
| 3858 | // expand the diplocation | |
| 3859 | if (diplocation != NULL) | |
| 3860 | field_set_diplocation(diplocation); | |
| 4165 | 3861 | |
| 4166 | /* posting keys directly only makes sense for a computer */ | |
| 4167 | if (input_machine_has_keyboard(machine)) | |
| 3862 | // allocate settings | |
| 3863 | setting_alloc(defval & mask, DEF_STR(Off)); | |
| 3864 | setting_alloc(~defval & mask, DEF_STR(On)); | |
| 3865 | } | |
| 3866 | ||
| 3867 | ||
| 3868 | ||
| 3869 | /*************************************************************************** | |
| 3870 | MISCELLANEOUS | |
| 3871 | ***************************************************************************/ | |
| 3872 | ||
| 3873 | //------------------------------------------------- | |
| 3874 | // find - look up information about a particular | |
| 3875 | // character | |
| 3876 | //------------------------------------------------- | |
| 3877 | ||
| 3878 | const char_info *char_info::find(unicode_char target) | |
| 3879 | { | |
| 3880 | // perform a simple binary search to find the proper alternate | |
| 3881 | int low = 0; | |
| 3882 | int high = ARRAY_LENGTH(charinfo); | |
| 3883 | while (high > low) | |
| 4168 | 3884 | { |
| 4169 | portdata.codes = build_codes(machine, machine.ioport().first_port()); | |
| 4170 | setup_keybuffer(machine); | |
| 3885 | int middle = (high + low) / 2; | |
| 3886 | unicode_char ch = charinfo[middle].ch; | |
| 3887 | if (ch < target) | |
| 3888 | low = middle + 1; | |
| 3889 | else if (ch > target) | |
| 3890 | high = middle; | |
| 3891 | else | |
| 3892 | return &charinfo[middle]; | |
| 4171 | 3893 | } |
| 3894 | return NULL; | |
| 4172 | 3895 | } |
| 4173 | 3896 | |
| 4174 | 3897 | |
| 3898 | //------------------------------------------------- | |
| 3899 | // dynamic_field - constructor | |
| 3900 | //------------------------------------------------- | |
| 4175 | 3901 | |
| 4176 | void inputx_setup_natural_keyboard( | |
| 4177 | running_machine &machine, | |
| 4178 | int (*queue_chars)(running_machine &machine, const unicode_char *text, size_t text_len), | |
| 4179 | int (*accept_char)(running_machine &machine, unicode_char ch), | |
| 4180 | int (*charqueue_empty)(running_machine &machine)) | |
| 3902 | dynamic_field::dynamic_field(ioport_field &field) | |
| 3903 | : m_next(NULL), | |
| 3904 | m_field(field), | |
| 3905 | m_shift(0), | |
| 3906 | m_oldval(field.defvalue()) | |
| 4181 | 3907 | { |
| 4182 | ioport_manager &portdata = machine.ioport(); | |
| 4183 | portdata.queue_chars = queue_chars; | |
| 4184 | portdata.accept_char = accept_char; | |
| 4185 | portdata.charqueue_empty = charqueue_empty; | |
| 3908 | // fill in the data | |
| 3909 | for (ioport_value mask = field.mask(); !(mask & 1); mask >>= 1) | |
| 3910 | m_shift++; | |
| 3911 | m_oldval >>= m_shift; | |
| 4186 | 3912 | } |
| 4187 | 3913 | |
| 4188 | int inputx_can_post(running_machine &machine) | |
| 3914 | ||
| 3915 | //------------------------------------------------- | |
| 3916 | // read - read the updated value and merge it | |
| 3917 | // into the target | |
| 3918 | //------------------------------------------------- | |
| 3919 | ||
| 3920 | void dynamic_field::read(ioport_value &result) | |
| 4189 | 3921 | { |
| 4190 | ioport_manager &portdata = machine.ioport(); | |
| 4191 | return portdata.queue_chars || portdata.codes; | |
| 3922 | // skip if not enabled | |
| 3923 | if (!m_field.enabled()) | |
| 3924 | return; | |
| 3925 | ||
| 3926 | // call the callback to read a new value | |
| 3927 | ioport_value newval = m_field.m_read(m_field, m_field.m_read_param); | |
| 3928 | m_oldval = newval; | |
| 3929 | ||
| 3930 | // merge in the bits (don't invert yet, as all digitals are inverted together) | |
| 3931 | result = (result & ~m_field.mask()) | ((newval << m_shift) & m_field.mask()); | |
| 4192 | 3932 | } |
| 4193 | 3933 | |
| 4194 | 3934 | |
| 4195 | static int can_post_key_directly(running_machine &machine, unicode_char ch) | |
| 3935 | //------------------------------------------------- | |
| 3936 | // write - track a change to a value and call | |
| 3937 | // the write callback if there's something new | |
| 3938 | //------------------------------------------------- | |
| 3939 | ||
| 3940 | void dynamic_field::write(ioport_value newval) | |
| 4196 | 3941 | { |
| 4197 | ioport_manager &portdata = machine.ioport(); | |
| 4198 | int rc = FALSE; | |
| 4199 | const inputx_code *code; | |
| 3942 | // skip if not enabled | |
| 3943 | if (!m_field.enabled()) | |
| 3944 | return; | |
| 4200 | 3945 | |
| 4201 | if (portdata.queue_chars) | |
| 3946 | // if the bits have changed, call the handler | |
| 3947 | newval = ((newval ^ m_field.defvalue()) & m_field.mask()) >> m_shift; | |
| 3948 | if (m_oldval != newval) | |
| 4202 | 3949 | { |
| 4203 | rc = portdata.accept_char ? (*portdata.accept_char)(machine, ch) : TRUE; | |
| 3950 | m_field.m_write(m_field, m_field.m_write_param, m_oldval, newval); | |
| 3951 | m_oldval = newval; | |
| 4204 | 3952 | } |
| 4205 | else | |
| 4206 | { | |
| 4207 | code = find_code(portdata.codes, ch); | |
| 4208 | if (code) | |
| 4209 | rc = code->field[0] != NULL; | |
| 4210 | } | |
| 4211 | return rc; | |
| 4212 | 3953 | } |
| 4213 | 3954 | |
| 4214 | 3955 | |
| 3956 | //------------------------------------------------- | |
| 3957 | // analog_field - constructor | |
| 3958 | //------------------------------------------------- | |
| 4215 | 3959 | |
| 4216 | static int can_post_key_alternate(running_machine &machine, unicode_char ch) | |
| 3960 | analog_field::analog_field(ioport_field &field) | |
| 3961 | : m_next(NULL), | |
| 3962 | m_field(field), | |
| 3963 | m_shift(0), | |
| 3964 | m_adjdefvalue(field.defvalue() & field.mask()), | |
| 3965 | m_adjmin(field.minval() & field.mask()), | |
| 3966 | m_adjmax(field.maxval() & field.mask()), | |
| 3967 | m_sensitivity(field.sensitivity()), | |
| 3968 | m_reverse(field.analog_reverse()), | |
| 3969 | m_delta(field.delta()), | |
| 3970 | m_centerdelta(field.centerdelta()), | |
| 3971 | m_accum(0), | |
| 3972 | m_previous(0), | |
| 3973 | m_previousanalog(0), | |
| 3974 | m_minimum(INPUT_ABSOLUTE_MIN), | |
| 3975 | m_maximum(INPUT_ABSOLUTE_MAX), | |
| 3976 | m_center(0), | |
| 3977 | m_reverse_val(0), | |
| 3978 | m_scalepos(0), | |
| 3979 | m_scaleneg(0), | |
| 3980 | m_keyscalepos(0), | |
| 3981 | m_keyscaleneg(0), | |
| 3982 | m_positionalscale(0), | |
| 3983 | m_absolute(false), | |
| 3984 | m_wraps(false), | |
| 3985 | m_autocenter(false), | |
| 3986 | m_single_scale(false), | |
| 3987 | m_interpolate(false), | |
| 3988 | m_lastdigital(false) | |
| 4217 | 3989 | { |
| 4218 | const char *s; | |
| 4219 | const char_info *ci; | |
| 4220 | unicode_char uchar; | |
| 4221 | int rc; | |
| 3990 | // compute the shift amount and number of bits | |
| 3991 | for (ioport_value mask = field.mask(); !(mask & 1); mask >>= 1) | |
| 3992 | m_shift++; | |
| 4222 | 3993 | |
| 4223 | ci = find_charinfo(ch); | |
| 4224 | s = ci ? ci->alternate : NULL; | |
| 4225 | if (!s) | |
| 4226 | return 0; | |
| 3994 | // initialize core data | |
| 3995 | m_adjdefvalue >>= m_shift; | |
| 3996 | m_adjmin >>= m_shift; | |
| 3997 | m_adjmax >>= m_shift; | |
| 4227 | 3998 | |
| 4228 | while(*s) | |
| 3999 | // set basic parameters based on the configured type | |
| 4000 | switch (field.type()) | |
| 4229 | 4001 | { |
| 4230 | rc = uchar_from_utf8(&uchar, s, strlen(s)); | |
| 4231 | if (rc <= 0) | |
| 4232 | return 0; | |
| 4233 | if (!can_post_key_directly(machine, uchar)) | |
| 4234 | return 0; | |
| 4235 | s += rc; | |
| 4236 | } | |
| 4237 | return 1; | |
| 4238 | } | |
| 4002 | // paddles and analog joysticks are absolute and autocenter | |
| 4003 | case IPT_AD_STICK_X: | |
| 4004 | case IPT_AD_STICK_Y: | |
| 4005 | case IPT_AD_STICK_Z: | |
| 4006 | case IPT_PADDLE: | |
| 4007 | case IPT_PADDLE_V: | |
| 4008 | m_absolute = true; | |
| 4009 | m_autocenter = true; | |
| 4010 | m_interpolate = !field.analog_reset(); | |
| 4011 | break; | |
| 4239 | 4012 | |
| 4240 | static attotime choose_delay(ioport_manager &portdata, unicode_char ch) | |
| 4241 | { | |
| 4242 | if (portdata.current_rate != attotime::zero) | |
| 4243 | return portdata.current_rate; | |
| 4013 | // pedals start at and autocenter to the min range | |
| 4014 | case IPT_PEDAL: | |
| 4015 | case IPT_PEDAL2: | |
| 4016 | case IPT_PEDAL3: | |
| 4017 | m_center = INPUT_ABSOLUTE_MIN; | |
| 4018 | m_accum = apply_inverse_sensitivity(m_center); | |
| 4019 | m_absolute = true; | |
| 4020 | m_autocenter = true; | |
| 4021 | m_interpolate = !field.analog_reset(); | |
| 4022 | break; | |
| 4244 | 4023 | |
| 4245 | attotime delay = attotime::zero; | |
| 4246 | if (portdata.queue_chars) | |
| 4024 | // lightguns are absolute as well, but don't autocenter and don't interpolate their values | |
| 4025 | case IPT_LIGHTGUN_X: | |
| 4026 | case IPT_LIGHTGUN_Y: | |
| 4027 | m_absolute = true; | |
| 4028 | m_autocenter = false; | |
| 4029 | m_interpolate = false; | |
| 4030 | break; | |
| 4031 | ||
| 4032 | // positional devices are absolute, but can also wrap like relative devices | |
| 4033 | // set each position to be 512 units | |
| 4034 | case IPT_POSITIONAL: | |
| 4035 | case IPT_POSITIONAL_V: | |
| 4036 | m_positionalscale = compute_scale(field.maxval(), INPUT_ABSOLUTE_MAX - INPUT_ABSOLUTE_MIN); | |
| 4037 | m_adjmin = 0; | |
| 4038 | m_adjmax = field.maxval() - 1; | |
| 4039 | m_wraps = field.analog_wraps(); | |
| 4040 | m_autocenter = !m_wraps; | |
| 4041 | break; | |
| 4042 | ||
| 4043 | // dials, mice and trackballs are relative devices | |
| 4044 | // these have fixed "min" and "max" values based on how many bits are in the port | |
| 4045 | // in addition, we set the wrap around min/max values to 512 * the min/max values | |
| 4046 | // this takes into account the mapping that one mouse unit ~= 512 analog units | |
| 4047 | case IPT_DIAL: | |
| 4048 | case IPT_DIAL_V: | |
| 4049 | case IPT_TRACKBALL_X: | |
| 4050 | case IPT_TRACKBALL_Y: | |
| 4051 | case IPT_MOUSE_X: | |
| 4052 | case IPT_MOUSE_Y: | |
| 4053 | m_absolute = false; | |
| 4054 | m_wraps = true; | |
| 4055 | m_interpolate = !field.analog_reset(); | |
| 4056 | break; | |
| 4057 | ||
| 4058 | default: | |
| 4059 | fatalerror("Unknown analog port type -- don't know if it is absolute or not"); | |
| 4060 | break; | |
| 4061 | } | |
| 4062 | ||
| 4063 | // further processing for absolute controls | |
| 4064 | if (m_absolute) | |
| 4247 | 4065 | { |
| 4248 | /* systems with queue_chars can afford a much smaller delay */ | |
| 4249 | delay = attotime::from_msec(10); | |
| 4066 | // if the default value is pegged at the min or max, use a single scale value for the whole axis | |
| 4067 | m_single_scale = (m_adjdefvalue == m_adjmin) || (m_adjdefvalue == m_adjmax); | |
| 4068 | ||
| 4069 | // if not "single scale", compute separate scales for each side of the default | |
| 4070 | if (!m_single_scale) | |
| 4071 | { | |
| 4072 | // unsigned | |
| 4073 | m_scalepos = compute_scale(m_adjmax - m_adjdefvalue, INPUT_ABSOLUTE_MAX - 0); | |
| 4074 | m_scaleneg = compute_scale(m_adjdefvalue - m_adjmin, 0 - INPUT_ABSOLUTE_MIN); | |
| 4075 | ||
| 4076 | if (m_adjmin > m_adjmax) | |
| 4077 | m_scaleneg = -m_scaleneg; | |
| 4078 | ||
| 4079 | // reverse point is at center | |
| 4080 | m_reverse_val = 0; | |
| 4081 | } | |
| 4082 | else | |
| 4083 | { | |
| 4084 | // single axis that increases from default | |
| 4085 | m_scalepos = compute_scale(m_adjmax - m_adjmin, INPUT_ABSOLUTE_MAX - INPUT_ABSOLUTE_MIN); | |
| 4086 | ||
| 4087 | // move from default | |
| 4088 | if (m_adjdefvalue == m_adjmax) | |
| 4089 | m_scalepos = -m_scalepos; | |
| 4090 | ||
| 4091 | // make the scaling the same for easier coding when we need to scale | |
| 4092 | m_scaleneg = m_scalepos; | |
| 4093 | ||
| 4094 | // reverse point is at max | |
| 4095 | m_reverse_val = m_maximum; | |
| 4096 | } | |
| 4250 | 4097 | } |
| 4098 | ||
| 4099 | // relative and positional controls all map directly with a 512x scale factor | |
| 4251 | 4100 | else |
| 4252 | 4101 | { |
| 4253 | switch(ch) { | |
| 4254 | case '\r': | |
| 4255 | delay = attotime::from_msec(200); | |
| 4256 | break; | |
| 4102 | // The relative code is set up to allow specifing PORT_MINMAX and default values. | |
| 4103 | // The validity checks are purposely set up to not allow you to use anything other | |
| 4104 | // a default of 0 and PORT_MINMAX(0,mask). This is in case the need arises to use | |
| 4105 | // this feature in the future. Keeping the code in does not hurt anything. | |
| 4106 | if (m_adjmin > m_adjmax) | |
| 4107 | // adjust for signed | |
| 4108 | m_adjmin = -m_adjmin; | |
| 4257 | 4109 | |
| 4258 | default: | |
| 4259 | delay = attotime::from_msec(50); | |
| 4260 | break; | |
| 4110 | if (m_wraps) | |
| 4111 | m_adjmax++; | |
| 4112 | ||
| 4113 | m_minimum = (m_adjmin - m_adjdefvalue) * INPUT_RELATIVE_PER_PIXEL; | |
| 4114 | m_maximum = (m_adjmax - m_adjdefvalue) * INPUT_RELATIVE_PER_PIXEL; | |
| 4115 | ||
| 4116 | // make the scaling the same for easier coding when we need to scale | |
| 4117 | m_scaleneg = m_scalepos = compute_scale(1, INPUT_RELATIVE_PER_PIXEL); | |
| 4118 | ||
| 4119 | if (m_field.analog_reset()) | |
| 4120 | // delta values reverse from center | |
| 4121 | m_reverse_val = 0; | |
| 4122 | else | |
| 4123 | { | |
| 4124 | // positional controls reverse from their max range | |
| 4125 | m_reverse_val = m_maximum + m_minimum; | |
| 4126 | ||
| 4127 | // relative controls reverse from 1 past their max range | |
| 4128 | if (m_wraps) | |
| 4129 | m_reverse_val -= INPUT_RELATIVE_PER_PIXEL; | |
| 4261 | 4130 | } |
| 4262 | 4131 | } |
| 4263 | return delay; | |
| 4132 | ||
| 4133 | // compute scale for keypresses | |
| 4134 | m_keyscalepos = recip_scale(m_scalepos); | |
| 4135 | m_keyscaleneg = recip_scale(m_scaleneg); | |
| 4264 | 4136 | } |
| 4265 | 4137 | |
| 4266 | 4138 | |
| 4139 | //------------------------------------------------- | |
| 4140 | // apply_min_max - clamp the given input value to | |
| 4141 | // the appropriate min/max for the analog control | |
| 4142 | //------------------------------------------------- | |
| 4267 | 4143 | |
| 4268 | ||
| 4144 | ||
| 4269 | 4145 | { |
| 4270 | ioport_manager &portdata = machine.ioport(); | |
| 4271 | key_buffer *keybuf; | |
| 4146 | // take the analog minimum and maximum values and apply the inverse of the | |
| 4147 | // sensitivity so that we can clamp against them before applying sensitivity | |
| 4148 | INT32 adjmin = apply_inverse_sensitivity(m_minimum); | |
| 4149 | INT32 adjmax = apply_inverse_sensitivity(m_maximum); | |
| 4272 | 4150 | |
| 4273 | keybuf = get_buffer(machine); | |
| 4274 | ||
| 4275 | /* need to start up the timer? */ | |
| 4276 | if (keybuf->begin_pos == keybuf->end_pos) | |
| 4151 | // for absolute devices, clamp to the bounds absolutely | |
| 4152 | if (!m_wraps) | |
| 4277 | 4153 | { |
| 4278 | portdata.inputx_timer->adjust(choose_delay(portdata, ch)); | |
| 4279 | keybuf->status_keydown = 0; | |
| 4154 | if (value > adjmax) | |
| 4155 | value = adjmax; | |
| 4156 | else if (value < adjmin) | |
| 4157 | value = adjmin; | |
| 4280 | 4158 | } |
| 4281 | 4159 | |
| 4282 | keybuf->buffer[keybuf->end_pos++] = ch; | |
| 4283 | if ((keybuf->end_pos+1) % keybuf->size == keybuf->begin_pos) | |
| 4160 | // for relative devices, wrap around when we go past the edge | |
| 4161 | else | |
| 4284 | 4162 | { |
| 4285 | // Buffer full | |
| 4286 | unicode_char *old_buffer = keybuf->buffer; | |
| 4287 | keybuf->size = keybuf->size + KEY_BUFFER_SIZE; | |
| 4288 | keybuf->buffer = auto_alloc_array(machine, unicode_char, keybuf->size); | |
| 4289 | for( int i = keybuf->begin_pos; i <= keybuf->end_pos; i++ ) | |
| 4290 | { | |
| 4291 | keybuf->buffer[i] = old_buffer[i]; | |
| 4292 | } | |
| 4293 | auto_free(machine, old_buffer); | |
| 4163 | INT32 range = adjmax - adjmin; | |
| 4164 | // rolls to other end when 1 position past end. | |
| 4165 | value = (value - adjmin) % range; | |
| 4166 | if (value < 0) | |
| 4167 | value += range; | |
| 4168 | value += adjmin; | |
| 4294 | 4169 | } |
| 4295 | keybuf->end_pos %= keybuf->size; | |
| 4170 | ||
| 4171 | return value; | |
| 4296 | 4172 | } |
| 4297 | 4173 | |
| 4298 | 4174 | |
| 4175 | //------------------------------------------------- | |
| 4176 | // apply_sensitivity - apply a sensitivity | |
| 4177 | // adjustment for a current value | |
| 4178 | //------------------------------------------------- | |
| 4299 | 4179 | |
| 4300 | ||
| 4180 | ||
| 4301 | 4181 | { |
| 4302 | key_buffer *keybuf; | |
| 4303 | keybuf = get_buffer(machine); | |
| 4304 | return ((keybuf->end_pos + 1) % keybuf->size) == keybuf->begin_pos; | |
| 4182 | return INT32((INT64(value) * m_sensitivity) / 100.0 + 0.5); | |
| 4305 | 4183 | } |
| 4306 | 4184 | |
| 4307 | 4185 | |
| 4186 | //------------------------------------------------- | |
| 4187 | // apply_inverse_sensitivity - reverse-apply the | |
| 4188 | // sensitivity adjustment for a current value | |
| 4189 | //------------------------------------------------- | |
| 4308 | 4190 | |
| 4309 | ||
| 4191 | ||
| 4310 | 4192 | { |
| 4311 | ioport_manager &portdata = machine.ioport(); | |
| 4312 | int last_cr = 0; | |
| 4313 | unicode_char ch; | |
| 4314 | const char *s; | |
| 4315 | const char_info *ci; | |
| 4316 | const inputx_code *code; | |
| 4193 | return INT32((INT64(value) * 100) / m_sensitivity); | |
| 4194 | } | |
| 4317 | 4195 | |
| 4318 | portdata.current_rate = rate; | |
| 4319 | 4196 | |
| 4320 | if (inputx_can_post(machine)) | |
| 4321 | { | |
| 4322 | while((text_len > 0) && !buffer_full(machine)) | |
| 4323 | { | |
| 4324 | ch = *(text++); | |
| 4325 | text_len--; | |
| 4197 | //------------------------------------------------- | |
| 4198 | // apply_settings - return the value of an | |
| 4199 | // analog input | |
| 4200 | //------------------------------------------------- | |
| 4326 | 4201 | |
| 4327 | /* change all eolns to '\r' */ | |
| 4328 | if ((ch != '\n') || !last_cr) | |
| 4329 | { | |
| 4330 | if (ch == '\n') | |
| 4331 | ch = '\r'; | |
| 4332 | else | |
| 4333 | last_cr = (ch == '\r'); | |
| 4202 | ioport_value analog_field::apply_settings(ioport_value value) const | |
| 4203 | { | |
| 4204 | // apply the min/max and then the sensitivity | |
| 4205 | value = apply_min_max(value); | |
| 4206 | value = apply_sensitivity(value); | |
| 4334 | 4207 | |
| 4335 | if (LOG_INPUTX) | |
| 4336 | { | |
| 4337 | code = find_code(portdata.codes, ch); | |
| 4338 | logerror("inputx_postn(): code=%i (%s) field->name='%s'\n", (int) ch, code_point_string(machine, ch), (code && code->field[0]) ? code->field[0]->name : "<null>"); | |
| 4339 | } | |
| 4208 | // apply reversal if needed | |
| 4209 | if (m_reverse) | |
| 4210 | value = m_reverse_val - value; | |
| 4211 | else if (m_single_scale) | |
| 4212 | // it's a pedal or the default value is equal to min/max | |
| 4213 | // so we need to adjust the center to the minimum | |
| 4214 | value -= INPUT_ABSOLUTE_MIN; | |
| 4340 | 4215 | |
| 4341 | if (can_post_key_directly(machine, ch)) | |
| 4342 | { | |
| 4343 | /* we can post this key in the queue directly */ | |
| 4344 | internal_post_key(machine, ch); | |
| 4345 | } | |
| 4346 | else if (can_post_key_alternate(machine, ch)) | |
| 4347 | { | |
| 4348 | /* we can post this key with an alternate representation */ | |
| 4349 | ci = find_charinfo(ch); | |
| 4350 | assert(ci && ci->alternate); | |
| 4351 | s = ci->alternate; | |
| 4352 | while(*s) | |
| 4353 | { | |
| 4354 | s += uchar_from_utf8(&ch, s, strlen(s)); | |
| 4355 | internal_post_key(machine, ch); | |
| 4356 | } | |
| 4357 | } | |
| 4358 | } | |
| 4359 | else | |
| 4360 | { | |
| 4361 | last_cr = 0; | |
| 4362 | } | |
| 4363 | } | |
| 4364 | } | |
| 4216 | // map differently for positive and negative values | |
| 4217 | if (value >= 0) | |
| 4218 | value = apply_scale(value, m_scalepos); | |
| 4219 | else | |
| 4220 | value = apply_scale(value, m_scaleneg); | |
| 4221 | value += m_adjdefvalue; | |
| 4222 | ||
| 4223 | return value; | |
| 4365 | 4224 | } |
| 4366 | 4225 | |
| 4367 | 4226 | |
| 4227 | //------------------------------------------------- | |
| 4228 | // frame_update - update the internals of a | |
| 4229 | // single analog field periodically | |
| 4230 | //------------------------------------------------- | |
| 4368 | 4231 | |
| 4369 | ||
| 4232 | vo | |
| 4370 | 4233 | { |
| 4371 | ioport_manager &portdata = machine.ioport(); | |
| 4372 | key_buffer *keybuf; | |
| 4373 | attotime delay; | |
| 4234 | // clamp the previous value to the min/max range and remember it | |
| 4235 | m_previous = m_accum = apply_min_max(m_accum); | |
| 4374 | 4236 | |
| 4375 | keybuf = get_buffer(machine); | |
| 4237 | // get the new raw analog value and its type | |
| 4238 | input_item_class itemclass; | |
| 4239 | INT32 rawvalue = machine.input().seq_axis_value(m_field.seq(SEQ_TYPE_STANDARD), itemclass); | |
| 4376 | 4240 | |
| 4377 | if (portdata.queue_chars) | |
| 4241 | // if we got an absolute input, it overrides everything else | |
| 4242 | if (itemclass == ITEM_CLASS_ABSOLUTE) | |
| 4378 | 4243 | { |
| 4379 | /* the driver has a queue_chars handler */ | |
| 4380 | while((keybuf->begin_pos != keybuf->end_pos) && (*portdata.queue_chars)(machine, &keybuf->buffer[keybuf->begin_pos], 1)) | |
| 4244 | if (m_previousanalog != rawvalue) | |
| 4381 | 4245 | { |
| 4382 | keybuf->begin_pos++; | |
| 4383 | keybuf->begin_pos %= keybuf->size; | |
| 4246 | // only update if analog value changed | |
| 4247 | m_previousanalog = rawvalue; | |
| 4384 | 4248 | |
| 4385 | if (portdata.current_rate != attotime::zero) | |
| 4386 | break; | |
| 4249 | // apply the inverse of the sensitivity to the raw value so that | |
| 4250 | // it will still cover the full min->max range requested after | |
| 4251 | // we apply the sensitivity adjustment | |
| 4252 | if (m_absolute || m_field.analog_reset()) | |
| 4253 | { | |
| 4254 | // if port is absolute, then just return the absolute data supplied | |
| 4255 | m_accum = apply_inverse_sensitivity(rawvalue); | |
| 4256 | } | |
| 4257 | else if (m_positionalscale != 0) | |
| 4258 | { | |
| 4259 | // if port is positional, we will take the full analog control and divide it | |
| 4260 | // into positions, that way as the control is moved full scale, | |
| 4261 | // it moves through all the positions | |
| 4262 | rawvalue = apply_scale(rawvalue - INPUT_ABSOLUTE_MIN, m_positionalscale) * INPUT_RELATIVE_PER_PIXEL + m_minimum; | |
| 4263 | ||
| 4264 | // clamp the high value so it does not roll over | |
| 4265 | rawvalue = MIN(rawvalue, m_maximum); | |
| 4266 | m_accum = apply_inverse_sensitivity(rawvalue); | |
| 4267 | } | |
| 4268 | else | |
| 4269 | // if port is relative, we use the value to simulate the speed of relative movement | |
| 4270 | // sensitivity adjustment is allowed for this mode | |
| 4271 | m_accum += rawvalue; | |
| 4272 | ||
| 4273 | m_lastdigital = false; | |
| 4274 | // do not bother with other control types if the analog data is changing | |
| 4275 | return; | |
| 4387 | 4276 | } |
| 4388 | } | |
| 4389 | else | |
| 4390 | { | |
| 4391 | /* the driver does not have a queue_chars handler */ | |
| 4392 | if (keybuf->status_keydown) | |
| 4393 | { | |
| 4394 | keybuf->status_keydown = FALSE; | |
| 4395 | keybuf->begin_pos++; | |
| 4396 | keybuf->begin_pos %= keybuf->size; | |
| 4397 | } | |
| 4398 | 4277 | else |
| 4399 | 4278 | { |
| 4400 | keybuf->status_keydown = TRUE; | |
| 4279 | // we still have to update fake relative from joystick control | |
| 4280 | if (!m_absolute && m_positionalscale == 0) | |
| 4281 | m_accum += rawvalue; | |
| 4401 | 4282 | } |
| 4402 | 4283 | } |
| 4403 | 4284 | |
| 4404 | /* need to make sure timerproc is called again if buffer not empty */ | |
| 4405 | if (keybuf->begin_pos != keybuf->end_pos) | |
| 4285 | // if we got it from a relative device, use that as the starting delta | |
| 4286 | // also note that the last input was not a digital one | |
| 4287 | INT32 delta = 0; | |
| 4288 | if (itemclass == ITEM_CLASS_RELATIVE && rawvalue != 0) | |
| 4406 | 4289 | { |
| 4407 | delay = choose_delay(portdata, keybuf->buffer[keybuf->begin_pos]); | |
| 4408 | portdata.inputx_timer->adjust(delay); | |
| 4290 | delta = rawvalue; | |
| 4291 | m_lastdigital = false; | |
| 4409 | 4292 | } |
| 4410 | } | |
| 4411 | 4293 | |
| 4412 | int inputx_is_posting(running_machine &machine) | |
| 4413 | { | |
| 4414 | ioport_manager &portdata = machine.ioport(); | |
| 4415 | const key_buffer *keybuf; | |
| 4416 | keybuf = get_buffer(machine); | |
| 4417 | return (keybuf->begin_pos != keybuf->end_pos) || (portdata.charqueue_empty && !(*portdata.charqueue_empty)(machine)); | |
| 4418 | } | |
| 4294 | INT64 keyscale = (m_accum >= 0) ? m_keyscalepos : m_keyscaleneg; | |
| 4419 | 4295 | |
| 4420 | /*************************************************************************** | |
| 4296 | // if the decrement code sequence is pressed, add the key delta to | |
| 4297 | // the accumulated delta; also note that the last input was a digital one | |
| 4298 | bool keypressed = false; | |
| 4299 | if (machine.input().seq_pressed(m_field.seq(SEQ_TYPE_DECREMENT))) | |
| 4300 | { | |
| 4301 | keypressed = true; | |
| 4302 | if (m_delta != 0) | |
| 4303 | delta -= apply_scale(m_delta, keyscale); | |
| 4304 | else if (!m_lastdigital) | |
| 4305 | // decrement only once when first pressed | |
| 4306 | delta -= apply_scale(1, keyscale); | |
| 4307 | m_lastdigital = true; | |
| 4308 | } | |
| 4421 | 4309 | |
| 4422 | Coded input | |
| 4310 | // same for the increment code sequence | |
| 4311 | if (machine.input().seq_pressed(m_field.seq(SEQ_TYPE_INCREMENT))) | |
| 4312 | { | |
| 4313 | keypressed = true; | |
| 4314 | if (m_delta) | |
| 4315 | delta += apply_scale(m_delta, keyscale); | |
| 4316 | else if (!m_lastdigital) | |
| 4317 | // increment only once when first pressed | |
| 4318 | delta += apply_scale(1, keyscale); | |
| 4319 | m_lastdigital = true; | |
| 4320 | } | |
| 4423 | 4321 | |
| 4424 | ***************************************************************************/ | |
| 4425 | static void inputx_postc_rate(running_machine &machine, unicode_char ch, attotime rate); | |
| 4322 | // if resetting is requested, clear the accumulated position to 0 before | |
| 4323 | // applying the deltas so that we only return this frame's delta | |
| 4324 | // note that centering only works for relative controls | |
| 4325 | // no need to check if absolute here because it is checked by the validity tests | |
| 4326 | if (m_field.analog_reset()) | |
| 4327 | m_accum = 0; | |
| 4426 | 4328 | |
| 4427 | static void inputx_postn_coded_rate(running_machine &machine, const char *text, size_t text_len, attotime rate) | |
| 4428 | { | |
| 4429 | size_t i, j, key_len, increment; | |
| 4430 | unicode_char ch; | |
| 4329 | // apply the delta to the accumulated value | |
| 4330 | m_accum += delta; | |
| 4431 | 4331 | |
| 4432 | static const struct | |
| 4332 | // if our last movement was due to a digital input, and if this control | |
| 4333 | // type autocenters, and if neither the increment nor the decrement seq | |
| 4334 | // was pressed, apply autocentering | |
| 4335 | if (m_autocenter) | |
| 4433 | 4336 | { |
| 4434 | const char *key; | |
| 4435 | unicode_char code; | |
| 4436 | } codes[] = | |
| 4437 | { | |
| 4438 | { "BACKSPACE", 8 }, | |
| 4439 | { "BS", 8 }, | |
| 4440 | { "BKSP", 8 }, | |
| 4441 | { "DEL", UCHAR_MAMEKEY(DEL) }, | |
| 4442 | { "DELETE", UCHAR_MAMEKEY(DEL) }, | |
| 4443 | { "END", UCHAR_MAMEKEY(END) }, | |
| 4444 | { "ENTER", 13 }, | |
| 4445 | { "ESC", '\033' }, | |
| 4446 | { "HOME", UCHAR_MAMEKEY(HOME) }, | |
| 4447 | { "INS", UCHAR_MAMEKEY(INSERT) }, | |
| 4448 | { "INSERT", UCHAR_MAMEKEY(INSERT) }, | |
| 4449 | { "PGDN", UCHAR_MAMEKEY(PGDN) }, | |
| 4450 | { "PGUP", UCHAR_MAMEKEY(PGUP) }, | |
| 4451 | { "SPACE", 32 }, | |
| 4452 | { "TAB", 9 }, | |
| 4453 | { "F1", UCHAR_MAMEKEY(F1) }, | |
| 4454 | { "F2", UCHAR_MAMEKEY(F2) }, | |
| 4455 | { "F3", UCHAR_MAMEKEY(F3) }, | |
| 4456 | { "F4", UCHAR_MAMEKEY(F4) }, | |
| 4457 | { "F5", UCHAR_MAMEKEY(F5) }, | |
| 4458 | { "F6", UCHAR_MAMEKEY(F6) }, | |
| 4459 | { "F7", UCHAR_MAMEKEY(F7) }, | |
| 4460 | { "F8", UCHAR_MAMEKEY(F8) }, | |
| 4461 | { "F9", UCHAR_MAMEKEY(F9) }, | |
| 4462 | { "F10", UCHAR_MAMEKEY(F10) }, | |
| 4463 | { "F11", UCHAR_MAMEKEY(F11) }, | |
| 4464 | { "F12", UCHAR_MAMEKEY(F12) }, | |
| 4465 | { "QUOTE", '\"' } | |
| 4466 | }; | |
| 4467 | ||
| 4468 | i = 0; | |
| 4469 | while(i < text_len) | |
| 4470 | { | |
| 4471 | ch = text[i]; | |
| 4472 | increment = 1; | |
| 4473 | ||
| 4474 | if (ch == '{') | |
| 4337 | INT32 center = apply_inverse_sensitivity(m_center); | |
| 4338 | if (m_lastdigital && !keypressed) | |
| 4475 | 4339 | { |
| 4476 | for (j = 0; j < ARRAY_LENGTH(codes); j++) | |
| 4340 | // autocenter from positive values | |
| 4341 | if (m_accum >= center) | |
| 4477 | 4342 | { |
| 4478 | key_len = strlen(codes[j].key); | |
| 4479 | if (i + key_len + 2 <= text_len) | |
| 4343 | m_accum -= apply_scale(m_centerdelta, m_keyscalepos); | |
| 4344 | if (m_accum < center) | |
| 4480 | 4345 | { |
| 4481 | if (!core_strnicmp(codes[j].key, &text[i + 1], key_len) && (text[i + key_len + 1] == '}')) | |
| 4482 | { | |
| 4483 | ch = codes[j].code; | |
| 4484 | increment = key_len + 2; | |
| 4485 | } | |
| 4346 | m_accum = center; | |
| 4347 | m_lastdigital = false; | |
| 4486 | 4348 | } |
| 4487 | 4349 | } |
| 4488 | } | |
| 4489 | 4350 | |
| 4490 | if (ch) | |
| 4491 | inputx_postc_rate(machine, ch, rate); | |
| 4492 | i += increment; | |
| 4493 | } | |
| 4494 | } | |
| 4495 | ||
| 4496 | ||
| 4497 | ||
| 4498 | /*************************************************************************** | |
| 4499 | ||
| 4500 | Alternative calls | |
| 4501 | ||
| 4502 | ***************************************************************************/ | |
| 4503 | ||
| 4504 | static void inputx_postc_rate(running_machine &machine, unicode_char ch, attotime rate) | |
| 4505 | { | |
| 4506 | inputx_postn_rate(machine, &ch, 1, rate); | |
| 4507 | } | |
| 4508 | ||
| 4509 | void inputx_postc(running_machine &machine, unicode_char ch) | |
| 4510 | { | |
| 4511 | inputx_postc_rate(machine, ch, attotime::zero); | |
| 4512 | } | |
| 4513 | ||
| 4514 | static void inputx_postn_utf8_rate(running_machine &machine, const char *text, size_t text_len, attotime rate) | |
| 4515 | { | |
| 4516 | size_t len = 0; | |
| 4517 | unicode_char buf[256]; | |
| 4518 | unicode_char c; | |
| 4519 | int rc; | |
| 4520 | ||
| 4521 | while(text_len > 0) | |
| 4522 | { | |
| 4523 | if (len == ARRAY_LENGTH(buf)) | |
| 4524 | { | |
| 4525 | inputx_postn_rate(machine, buf, len, attotime::zero); | |
| 4526 | len = 0; | |
| 4351 | // autocenter from negative values | |
| 4352 | else | |
| 4353 | { | |
| 4354 | m_accum += apply_scale(m_centerdelta, m_keyscaleneg); | |
| 4355 | if (m_accum > center) | |
| 4356 | { | |
| 4357 | m_accum = center; | |
| 4358 | m_lastdigital = false; | |
| 4359 | } | |
| 4360 | } | |
| 4527 | 4361 | } |
| 4528 | ||
| 4529 | rc = uchar_from_utf8(&c, text, text_len); | |
| 4530 | if (rc < 0) | |
| 4531 | { | |
| 4532 | rc = 1; | |
| 4533 | c = INVALID_CHAR; | |
| 4534 | } | |
| 4535 | text += rc; | |
| 4536 | text_len -= rc; | |
| 4537 | buf[len++] = c; | |
| 4538 | 4362 | } |
| 4539 | inputx_postn_rate(machine, buf, len, rate); | |
| 4363 | else if (!keypressed) | |
| 4364 | m_lastdigital = false; | |
| 4540 | 4365 | } |
| 4541 | 4366 | |
| 4542 | void inputx_post_utf8(running_machine &machine, const char *text) | |
| 4543 | { | |
| 4544 | inputx_postn_utf8_rate(machine, text, strlen(text), attotime::zero); | |
| 4545 | } | |
| 4546 | 4367 | |
| 4547 | void inputx_post_utf8_rate(running_machine &machine, const char *text, attotime rate) | |
| 4548 | { | |
| 4549 | inputx_postn_utf8_rate(machine, text, strlen(text), rate); | |
| 4550 | } | |
| 4368 | //------------------------------------------------- | |
| 4369 | // read - read the current value and insert into | |
| 4370 | // the provided ioport_value | |
| 4371 | //------------------------------------------------- | |
| 4551 | 4372 | |
| 4552 | /*************************************************************************** | |
| 4553 | ||
| 4554 | Other stuff | |
| 4555 | ||
| 4556 | This stuff is here more out of convienience than anything else | |
| 4557 | ***************************************************************************/ | |
| 4558 | ||
| 4559 | int input_classify_port(const input_field_config *field) | |
| 4373 | void analog_field::read(ioport_value &result) | |
| 4560 | 4374 | { |
| 4561 | int result; | |
| 4375 | // do nothing if we're not enabled | |
| 4376 | if (!m_field.enabled()) | |
| 4377 | return; | |
| 4562 | 4378 | |
| 4563 | switch(field->type) | |
| 4564 | { | |
| 4565 | case IPT_JOYSTICK_UP: | |
| 4566 | case IPT_JOYSTICK_DOWN: | |
| 4567 | case IPT_JOYSTICK_LEFT: | |
| 4568 | case IPT_JOYSTICK_RIGHT: | |
| 4569 | case IPT_JOYSTICKLEFT_UP: | |
| 4570 | case IPT_JOYSTICKLEFT_DOWN: | |
| 4571 | case IPT_JOYSTICKLEFT_LEFT: | |
| 4572 | case IPT_JOYSTICKLEFT_RIGHT: | |
| 4573 | case IPT_JOYSTICKRIGHT_UP: | |
| 4574 | case IPT_JOYSTICKRIGHT_DOWN: | |
| 4575 | case IPT_JOYSTICKRIGHT_LEFT: | |
| 4576 | case IPT_JOYSTICKRIGHT_RIGHT: | |
| 4577 | case IPT_BUTTON1: | |
| 4578 | case IPT_BUTTON2: | |
| 4579 | case IPT_BUTTON3: | |
| 4580 | case IPT_BUTTON4: | |
| 4581 | case IPT_BUTTON5: | |
| 4582 | case IPT_BUTTON6: | |
| 4583 | case IPT_BUTTON7: | |
| 4584 | case IPT_BUTTON8: | |
| 4585 | case IPT_BUTTON9: | |
| 4586 | case IPT_BUTTON10: | |
| 4587 | case IPT_AD_STICK_X: | |
| 4588 | case IPT_AD_STICK_Y: | |
| 4589 | case IPT_AD_STICK_Z: | |
| 4590 | case IPT_TRACKBALL_X: | |
| 4591 | case IPT_TRACKBALL_Y: | |
| 4592 | case IPT_LIGHTGUN_X: | |
| 4593 | case IPT_LIGHTGUN_Y: | |
| 4594 | case IPT_MOUSE_X: | |
| 4595 | case IPT_MOUSE_Y: | |
| 4596 | case IPT_START: | |
| 4597 | case IPT_SELECT: | |
| 4598 | result = INPUT_CLASS_CONTROLLER; | |
| 4599 | break; | |
| 4379 | // start with the raw value | |
| 4380 | INT32 value = m_accum; | |
| 4600 | 4381 | |
| 4601 | case IPT_KEYPAD: | |
| 4602 | case IPT_KEYBOARD: | |
| 4603 | result = INPUT_CLASS_KEYBOARD; | |
| 4604 | break; | |
| 4382 | // interpolate if appropriate and if time has passed since the last update | |
| 4383 | if (m_interpolate) | |
| 4384 | value = manager().frame_interpolate(m_previous, m_accum); | |
| 4605 | 4385 | |
| 4606 | case IPT_CONFIG: | |
| 4607 | result = INPUT_CLASS_CONFIG; | |
| 4608 | break; | |
| 4386 | // apply standard analog settings | |
| 4387 | value = apply_settings(value); | |
| 4609 | 4388 | |
| 4610 | case IPT_DIPSWITCH: | |
| 4611 | result = INPUT_CLASS_DIPSWITCH; | |
| 4612 | break; | |
| 4389 | // remap the value if needed | |
| 4390 | if (m_field.remap_table() != NULL) | |
| 4391 | value = m_field.remap_table()[value]; | |
| 4613 | 4392 | |
| 4614 | case 0: | |
| 4615 | if (field->name && (field->name != (const char *) -1)) | |
| 4616 | result = INPUT_CLASS_MISC; | |
| 4617 | else | |
| 4618 | result = INPUT_CLASS_INTERNAL; | |
| 4619 | break; | |
| 4393 | // invert bits if needed | |
| 4394 | if (m_field.analog_invert()) | |
| 4395 | value = ~value; | |
| 4620 | 4396 | |
| 4621 | default: | |
| 4622 | result = INPUT_CLASS_INTERNAL; | |
| 4623 | break; | |
| 4624 | } | |
| 4625 | return result; | |
| 4397 | // insert into the port | |
| 4398 | result = (result & ~m_field.mask()) | ((value << m_shift) & m_field.mask()); | |
| 4626 | 4399 | } |
| 4627 | 4400 | |
| 4628 | 4401 | |
| 4402 | //------------------------------------------------- | |
| 4403 | // crosshair_read - read a value for crosshairs, | |
| 4404 | // scaled between 0 and 1 | |
| 4405 | //------------------------------------------------- | |
| 4629 | 4406 | |
| 4630 | ||
| 4407 | f | |
| 4631 | 4408 | { |
| 4632 | return port->player; | |
| 4409 | INT32 rawvalue = apply_settings(m_accum) & (m_field.mask() >> m_shift); | |
| 4410 | return float(rawvalue - m_adjmin) / float(m_adjmax - m_adjmin); | |
| 4633 | 4411 | } |
| 4634 | 4412 | |
| 4635 | 4413 | |
| 4636 | 4414 | |
| 4637 | /*------------------------------------------------- | |
| 4638 | input_has_input_class - checks to see if a | |
| 4639 | particular input class is present | |
| 4640 | -------------------------------------------------*/ | |
| 4415 | /*************************************************************************** | |
| 4416 | TOKENIZATION HELPERS | |
| 4417 | ***************************************************************************/ | |
| 4641 | 4418 | |
| 4642 | int input_has_input_class(running_machine &machine, int inputclass) | |
| 4419 | //------------------------------------------------- | |
| 4420 | // token_to_input_type - convert a string token | |
| 4421 | // to an input field type and player | |
| 4422 | //------------------------------------------------- | |
| 4423 | ||
| 4424 | ioport_type ioport_manager::token_to_input_type(const char *string, int &player) const | |
| 4643 | 4425 | { |
| 4644 | const input_port_config *port; | |
| 4645 | const input_field_config *field; | |
| 4426 | // check for our failsafe case first | |
| 4427 | int ipnum; | |
| 4428 | if (sscanf(string, "TYPE_OTHER(%d,%d)", &ipnum, &player) == 2) | |
| 4429 | return ioport_type(ipnum); | |
| 4646 | 4430 | |
| 4647 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 4648 | { | |
| 4649 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 4431 | // find the token in the list | |
| 4432 | for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next()) | |
| 4433 | if (entry->token() != NULL && !strcmp(entry->token(), string)) | |
| 4650 | 4434 | { |
| 4651 | if (input_classify_port(field) == inputclass) | |
| 4652 | return TRUE; | |
| 4435 | player = entry->player(); | |
| 4436 | return entry->type(); | |
| 4653 | 4437 | } |
| 4654 | } | |
| 4655 | return FALSE; | |
| 4438 | ||
| 4439 | // if we fail, return IPT_UNKNOWN | |
| 4440 | player = 0; | |
| 4441 | return IPT_UNKNOWN; | |
| 4656 | 4442 | } |
| 4657 | 4443 | |
| 4658 | 4444 | |
| 4445 | //------------------------------------------------- | |
| 4446 | // input_type_to_token - convert an input field | |
| 4447 | // type and player to a string token | |
| 4448 | //------------------------------------------------- | |
| 4659 | 4449 | |
| 4660 | /*------------------------------------------------- | |
| 4661 | input_count_players - counts the number of | |
| 4662 | active players | |
| 4663 | -------------------------------------------------*/ | |
| 4664 | ||
| 4665 | int input_count_players(running_machine &machine) | |
| 4450 | const char *ioport_manager::input_type_to_token(astring &string, ioport_type type, int player) | |
| 4666 | 4451 | { |
| 4667 | const input_port_config *port; | |
| 4668 | const input_field_config *field; | |
| 4669 | int joystick_count; | |
| 4452 | // look up the port and return the token | |
| 4453 | input_type_entry *entry = m_type_to_entry[type][player]; | |
| 4454 | if (entry != NULL) | |
| 4455 | return string.cpy(entry->token()); | |
| 4670 | 4456 | |
| 4671 | joystick_count = 0; | |
| 4672 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 4673 | { | |
| 4674 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 4675 | { | |
| 4676 | if (input_classify_port(field) == INPUT_CLASS_CONTROLLER) | |
| 4677 | { | |
| 4678 | if (joystick_count <= field->player + 1) | |
| 4679 | joystick_count = field->player + 1; | |
| 4680 | } | |
| 4681 | } | |
| 4682 | } | |
| 4683 | return joystick_count; | |
| 4457 | // if that fails, carry on | |
| 4458 | return string.format("TYPE_OTHER(%d,%d)", type, player); | |
| 4684 | 4459 | } |
| 4685 | 4460 | |
| 4686 | 4461 | |
| 4462 | //------------------------------------------------- | |
| 4463 | // token_to_seq_type - convert a string to | |
| 4464 | // a sequence type | |
| 4465 | //------------------------------------------------- | |
| 4687 | 4466 | |
| 4688 | /*************************************************************************** | |
| 4689 | DEBUGGER SUPPORT | |
| 4690 | ***************************************************************************/ | |
| 4691 | ||
| 4692 | /*------------------------------------------------- | |
| 4693 | execute_input - debugger command to enter | |
| 4694 | natural keyboard input | |
| 4695 | -------------------------------------------------*/ | |
| 4696 | ||
| 4697 | static void execute_input(running_machine &machine, int ref, int params, const char *param[]) | |
| 4467 | input_seq_type ioport_manager::token_to_seq_type(const char *string) | |
| 4698 | 4468 | { |
| 4699 | inputx_postn_coded_rate(machine, param[0], strlen(param[0]), attotime::zero); | |
| 4469 | // look up the string in the table of possible sequence types and return the index | |
| 4470 | for (int seqindex = 0; seqindex < ARRAY_LENGTH(seqtypestrings); seqindex++) | |
| 4471 | if (!mame_stricmp(string, seqtypestrings[seqindex])) | |
| 4472 | return input_seq_type(seqindex); | |
| 4473 | return SEQ_TYPE_INVALID; | |
| 4700 | 4474 | } |
| 4701 | 4475 | |
| 4702 | 4476 | |
| 4703 | 4477 | |
| 4704 | /*------------------------------------------------- | |
| 4705 | execute_dumpkbd - debugger command to natural | |
| 4706 | keyboard codes | |
| 4707 | -------------------------------------------------*/ | |
| 4478 | //------------------------------------------------- | |
| 4479 | // validate_natural_keyboard_statics - | |
| 4480 | // validates natural keyboard static data | |
| 4481 | //------------------------------------------------- | |
| 4708 | 4482 | |
| 4709 | static void execute_dumpkbd(running_machine &machine, int ref, int params, const char *param[]) | |
| 4483 | /* | |
| 4484 | int validate_natural_keyboard_statics(void) | |
| 4710 | 4485 | { |
| 4711 | inputx_code *codes = machine.ioport().codes; | |
| 4712 | const char *filename; | |
| 4713 | FILE *file = NULL; | |
| 4714 | const inputx_code *code; | |
| 4715 | char buffer[512]; | |
| 4716 | size_t pos; | |
| 4717 | int i, j; | |
| 4718 | size_t left_column_width = 24; | |
| 4486 | int i; | |
| 4487 | int error = FALSE; | |
| 4488 | unicode_char last_char = 0; | |
| 4489 | const char_info *ci; | |
| 4719 | 4490 | |
| 4720 | /* was there a file specified? */ | |
| 4721 | filename = (params > 0) ? param[0] : NULL; | |
| 4722 | if (filename != NULL) | |
| 4491 | // check to make sure that charinfo is in order | |
| 4492 | for (i = 0; i < ARRAY_LENGTH(charinfo); i++) | |
| 4723 | 4493 | { |
| 4724 | /* if so, open it */ | |
| 4725 | file = fopen(filename, "w"); | |
| 4726 | if (file == NULL) | |
| 4494 | if (last_char >= charinfo[i].ch) | |
| 4727 | 4495 | { |
| 4728 | debug_console_printf(machine, "Cannot open \"%s\"\n", filename); | |
| 4729 | return; | |
| 4496 | mame_printf_error("inputx: charinfo is out of order; 0x%08x should be higher than 0x%08x\n", charinfo[i].ch, last_char); | |
| 4497 | error = TRUE; | |
| 4730 | 4498 | } |
| 4499 | last_char = charinfo[i].ch; | |
| 4731 | 4500 | } |
| 4732 | 4501 | |
| 4733 | if ((codes != NULL) && (codes[0].ch != 0)) | |
| 4502 | // check to make sure that I can look up everything on alternate_charmap | |
| 4503 | for (i = 0; i < ARRAY_LENGTH(charinfo); i++) | |
| 4734 | 4504 | { |
| 4735 | /* loop through all codes */ | |
| 4736 | for (i = 0; codes[i].ch; i++) | |
| 4505 | ci = char_info::find(charinfo[i].ch); | |
| 4506 | if (ci != &charinfo[i]) | |
| 4737 | 4507 | { |
| 4738 | code = &codes[i]; | |
| 4739 | pos = 0; | |
| 4740 | ||
| 4741 | /* describe the character code */ | |
| 4742 | pos += snprintf(&buffer[pos], ARRAY_LENGTH(buffer) - pos, "%08X (%s) ", | |
| 4743 | code->ch, | |
| 4744 | code_point_string(machine, code->ch)); | |
| 4745 | ||
| 4746 | /* pad with spaces */ | |
| 4747 | while(pos < left_column_width) | |
| 4748 | buffer[pos++] = ' '; | |
| 4749 | buffer[pos] = '\0'; | |
| 4750 | ||
| 4751 | /* identify the keys used */ | |
| 4752 | for (j = 0; j < ARRAY_LENGTH(code->field) && (code->field[j] != NULL); j++) | |
| 4753 | { | |
| 4754 | pos += snprintf(&buffer[pos], ARRAY_LENGTH(buffer) - pos, "%s'%s'", | |
| 4755 | (j > 0) ? ", " : "", | |
| 4756 | code->field[j]->name); | |
| 4757 | } | |
| 4758 | ||
| 4759 | /* and output it as appropriate */ | |
| 4760 | if (file != NULL) | |
| 4761 | fprintf(file, "%s\n", buffer); | |
| 4762 | else | |
| 4763 | debug_console_printf(machine, "%s\n", buffer); | |
| 4508 | mame_printf_error("ioport: expected char_info::find(0x%08x) to work properly\n", charinfo[i].ch); | |
| 4509 | error = TRUE; | |
| 4764 | 4510 | } |
| 4765 | 4511 | } |
| 4766 | else | |
| 4767 | { | |
| 4768 | debug_console_printf(machine, "No natural keyboard support\n"); | |
| 4769 | } | |
| 4770 | ||
| 4771 | /* cleanup */ | |
| 4772 | if (file != NULL) | |
| 4773 | fclose(file); | |
| 4774 | ||
| 4512 | return error; | |
| 4775 | 4513 | } |
| 4514 | */ | |
| 4776 | 4515 | |
| 4777 | 4516 | |
| 4778 | ||
| 4779 | input_port_config *ioconfig_alloc_port(ioport_list &portlist, device_t &device, const char *tag) | |
| 4780 | { | |
| 4781 | astring fulltag; | |
| 4782 | device.subtag(fulltag, tag); | |
| 4783 | return &portlist.append(fulltag, *global_alloc(input_port_config(device, fulltag))); | |
| 4784 | } | |
| 4785 | ||
| 4786 | input_port_config *ioconfig_modify_port(ioport_list &portlist, device_t &device, const char *tag) | |
| 4787 | { | |
| 4788 | astring fulltag; | |
| 4789 | device.subtag(fulltag, tag); | |
| 4790 | input_port_config *port = portlist.find(fulltag.cstr()); | |
| 4791 | if (port == NULL) | |
| 4792 | throw emu_fatalerror("Requested to modify nonexistent port '%s'", fulltag.cstr()); | |
| 4793 | port->bump_modcount(); | |
| 4794 | return port; | |
| 4795 | } | |
| 4796 | ||
| 4797 | input_field_config *ioconfig_alloc_field(input_port_config &port, int type, input_port_value defval, input_port_value mask, const char *name) | |
| 4798 | { | |
| 4799 | if (&port == NULL) | |
| 4800 | throw emu_fatalerror("INPUT_TOKEN_FIELD encountered with no active port (mask=%X defval=%X)\n", mask, defval); \ | |
| 4801 | if (type != IPT_UNKNOWN && type != IPT_UNUSED) | |
| 4802 | port.active |= mask; | |
| 4803 | if (type == IPT_DIPSWITCH || type == IPT_CONFIG) | |
| 4804 | defval = port_default_value(port.tag(), mask, defval, port.owner()); | |
| 4805 | return &port.fieldlist().append(*global_alloc(input_field_config(port, type, defval, mask, input_port_string_from_token(name)))); | |
| 4806 | } | |
| 4807 | ||
| 4808 | input_field_config *ioconfig_alloc_onoff(input_port_config &port, const char *name, input_port_value defval, input_port_value mask, const char *diplocation, astring &errorbuf) | |
| 4809 | { | |
| 4810 | input_field_config *curfield = ioconfig_alloc_field(port, IPT_DIPSWITCH, defval, mask, name); | |
| 4811 | if (name == DEF_STR(Service_Mode)) | |
| 4812 | { | |
| 4813 | curfield->flags |= FIELD_FLAG_TOGGLE; | |
| 4814 | curfield->seq[SEQ_TYPE_STANDARD].set(KEYCODE_F2); | |
| 4815 | } | |
| 4816 | if (diplocation != NULL) | |
| 4817 | diplocation_list_alloc(*curfield, diplocation, errorbuf); | |
| 4818 | ioconfig_alloc_setting(*curfield, defval & mask, DEF_STR(Off)); | |
| 4819 | ioconfig_alloc_setting(*curfield, ~defval & mask, DEF_STR(On)); | |
| 4820 | return curfield; | |
| 4821 | } | |
| 4822 | ||
| 4823 | input_setting_config *ioconfig_alloc_setting(input_field_config &field, input_port_value value, const char *name) | |
| 4824 | { | |
| 4825 | return &field.settinglist().append(*global_alloc(input_setting_config(field, value, input_port_string_from_token(name)))); | |
| 4826 | } | |
| 4827 | ||
| 4828 | void ioconfig_field_add_char(input_field_config &field, unicode_char ch, astring &errorbuf) | |
| 4829 | { | |
| 4830 | for (int index = 0; index < ARRAY_LENGTH(field.chars); index++) | |
| 4831 | if (field.chars[index] == 0) | |
| 4832 | { | |
| 4833 | field.chars[index] = ch; | |
| 4834 | break; | |
| 4835 | } | |
| 4836 | } | |
| 4837 | ||
| 4838 | void ioconfig_add_code(input_field_config &field, int which, input_code code) | |
| 4839 | { | |
| 4840 | field.seq[which] |= code; | |
| 4841 | } | |
| 4842 | ||
| 4843 | ||
| 4844 | ||
| 4845 | input_type_entry::input_type_entry(UINT32 _type, ioport_group _group, int _player, const char *_token, const char *_name, input_seq standard) | |
| 4846 | : type(_type), | |
| 4847 | group(_group), | |
| 4848 | player(_player), | |
| 4849 | token(_token), | |
| 4850 | name(_name), | |
| 4851 | m_next(NULL) | |
| 4852 | { | |
| 4853 | defseq[SEQ_TYPE_STANDARD] = seq[SEQ_TYPE_STANDARD] = standard; | |
| 4854 | } | |
| 4855 | ||
| 4856 | input_type_entry::input_type_entry(UINT32 _type, ioport_group _group, int _player, const char *_token, const char *_name, input_seq standard, input_seq decrement, input_seq increment) | |
| 4857 | : type(_type), | |
| 4858 | group(_group), | |
| 4859 | player(_player), | |
| 4860 | token(_token), | |
| 4861 | name(_name), | |
| 4862 | m_next(NULL) | |
| 4863 | { | |
| 4864 | defseq[SEQ_TYPE_STANDARD] = seq[SEQ_TYPE_STANDARD] = standard; | |
| 4865 | defseq[SEQ_TYPE_INCREMENT] = seq[SEQ_TYPE_INCREMENT] = increment; | |
| 4866 | defseq[SEQ_TYPE_DECREMENT] = seq[SEQ_TYPE_DECREMENT] = decrement; | |
| 4867 | } |
| r15082 | r15083 | |
|---|---|---|
| 935 | 935 | string.cat(" have not been correctly dumped.\n"); |
| 936 | 936 | } |
| 937 | 937 | /* add one line per warning flag */ |
| 938 | if ( | |
| 938 | if ( | |
| 939 | 939 | string.cat("The keyboard emulation may not be 100% accurate.\n"); |
| 940 | 940 | if (machine.system().flags & GAME_IMPERFECT_COLORS) |
| 941 | 941 | string.cat("The colors aren't 100% accurate.\n"); |
| r15082 | r15083 | |
| 1213 | 1213 | { |
| 1214 | 1214 | /* if this was a UI_EVENT_CHAR event, post it */ |
| 1215 | 1215 | if (event.event_type == UI_EVENT_CHAR) |
| 1216 | inp | |
| 1216 | machine.ioport().natkeyboard().post | |
| 1217 | 1217 | } |
| 1218 | 1218 | |
| 1219 | 1219 | /* process natural keyboard keys that don't get UI_EVENT_CHARs */ |
| r15082 | r15083 | |
| 1236 | 1236 | *key_down_ptr |= key_down_mask; |
| 1237 | 1237 | |
| 1238 | 1238 | /* post the key */ |
| 1239 | inp | |
| 1239 | machine.ioport().natkeyboard().post | |
| 1240 | 1240 | } |
| 1241 | 1241 | else if (!pressed && (*key_down_ptr & key_down_mask)) |
| 1242 | 1242 | { |
| r15082 | r15083 | |
| 1259 | 1259 | if (text != NULL) |
| 1260 | 1260 | { |
| 1261 | 1261 | /* post the text */ |
| 1262 | inp | |
| 1262 | machine.ioport().natkeyboard().post_utf8( | |
| 1263 | 1263 | |
| 1264 | 1264 | /* free the string */ |
| 1265 | 1265 | osd_free(text); |
| r15082 | r15083 | |
| 1317 | 1317 | } |
| 1318 | 1318 | |
| 1319 | 1319 | /* determine if we should disable the rest of the UI */ |
| 1320 | int ui_disabled = ( | |
| 1320 | int ui_disabled = ( | |
| 1321 | 1321 | |
| 1322 | 1322 | /* is ScrLk UI toggling applicable here? */ |
| 1323 | if ( | |
| 1323 | if ( | |
| 1324 | 1324 | { |
| 1325 | 1325 | /* are we toggling the UI with ScrLk? */ |
| 1326 | 1326 | if (ui_input_pressed(machine, IPT_UI_TOGGLE_UI)) |
| r15082 | r15083 | |
| 1488 | 1488 | machine.video().set_throttled(!machine.video().throttled()); |
| 1489 | 1489 | |
| 1490 | 1490 | /* check for fast forward */ |
| 1491 | if (inp | |
| 1491 | if (machine.ioport().type_pressed( | |
| 1492 | 1492 | { |
| 1493 | 1493 | machine.video().set_fastforward(true); |
| 1494 | 1494 | ui_show_fps_temp(0.5); |
| r15082 | r15083 | |
| 1640 | 1640 | |
| 1641 | 1641 | static slider_state *slider_init(running_machine &machine) |
| 1642 | 1642 | { |
| 1643 | input_field_config *field; | |
| 1644 | input_port_config *port; | |
| 1643 | ioport_field *field; | |
| 1644 | ioport_port *port; | |
| 1645 | 1645 | slider_state *listhead = NULL; |
| 1646 | 1646 | slider_state **tailptr = &listhead; |
| 1647 | 1647 | astring string; |
| r15082 | r15083 | |
| 1666 | 1666 | |
| 1667 | 1667 | /* add analog adjusters */ |
| 1668 | 1668 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) |
| 1669 | for (field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1670 | if (field->type == IPT_ADJUSTER) | |
| 1669 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1670 | if (field->type() == IPT_ADJUSTER) | |
| 1671 | 1671 | { |
| 1672 | 1672 | void *param = (void *)field; |
| 1673 | *tailptr = slider_alloc(machine, field->name, 0, field->defvalue, 100, 1, slider_adjuster, param); | |
| 1673 | *tailptr = slider_alloc(machine, field->name(), 0, field->defvalue(), 100, 1, slider_adjuster, param); | |
| 1674 | 1674 | tailptr = &(*tailptr)->next; |
| 1675 | 1675 | } |
| 1676 | 1676 | |
| r15082 | r15083 | |
| 1772 | 1772 | #ifdef MAME_DEBUG |
| 1773 | 1773 | /* add crosshair adjusters */ |
| 1774 | 1774 | for (port = machine.ioport().first_port(); port != NULL; port = port->next()) |
| 1775 | for (field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1776 | if (field->crossaxis != CROSSHAIR_AXIS_NONE && field->player == 0) | |
| 1775 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1776 | if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->player() == 0) | |
| 1777 | 1777 | { |
| 1778 | 1778 | void *param = (void *)field; |
| 1779 | string.printf("Crosshair Scale %s", (field->crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1779 | string.printf("Crosshair Scale %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1780 | 1780 | *tailptr = slider_alloc(machine, string, -3000, 1000, 3000, 100, slider_crossscale, param); |
| 1781 | 1781 | tailptr = &(*tailptr)->next; |
| 1782 | string.printf("Crosshair Offset %s", (field->crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1782 | string.printf("Crosshair Offset %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); | |
| 1783 | 1783 | *tailptr = slider_alloc(machine, string, -3000, 0, 3000, 100, slider_crossoffset, param); |
| 1784 | 1784 | tailptr = &(*tailptr)->next; |
| 1785 | 1785 | } |
| r15082 | r15083 | |
| 1832 | 1832 | |
| 1833 | 1833 | static INT32 slider_adjuster(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 1834 | 1834 | { |
| 1835 | const input_field_config *field = (const input_field_config *)arg; | |
| 1836 | input_field_user_settings settings; | |
| 1835 | ioport_field *field = (ioport_field *)arg; | |
| 1836 | ioport_field::user_settings settings; | |
| 1837 | 1837 | |
| 1838 | | |
| 1838 | | |
| 1839 | 1839 | if (newval != SLIDER_NOCHANGE) |
| 1840 | 1840 | { |
| 1841 | 1841 | settings.value = newval; |
| 1842 | | |
| 1842 | | |
| 1843 | 1843 | } |
| 1844 | 1844 | if (string != NULL) |
| 1845 | 1845 | string->printf("%d%%", settings.value); |
| r15082 | r15083 | |
| 2185 | 2185 | #ifdef MAME_DEBUG |
| 2186 | 2186 | static INT32 slider_crossscale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 2187 | 2187 | { |
| 2188 | i | |
| 2188 | ioport_field | |
| 2189 | 2189 | |
| 2190 | 2190 | if (newval != SLIDER_NOCHANGE) |
| 2191 | field->crossscale | |
| 2191 | field->set_crosshair_scale | |
| 2192 | 2192 | if (string != NULL) |
| 2193 | string->printf("%s %s %1.3f", "Crosshair Scale", (field->crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f); | |
| 2194 | return floor(field->crossscale * 1000.0f + 0.5f); | |
| 2193 | string->printf("%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); | |
| 2194 | return floor(field->crosshair_scale() * 1000.0f + 0.5f); | |
| 2195 | 2195 | } |
| 2196 | 2196 | #endif |
| 2197 | 2197 | |
| r15082 | r15083 | |
| 2204 | 2204 | #ifdef MAME_DEBUG |
| 2205 | 2205 | static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 2206 | 2206 | { |
| 2207 | i | |
| 2207 | ioport_field | |
| 2208 | 2208 | |
| 2209 | 2209 | if (newval != SLIDER_NOCHANGE) |
| 2210 | field->crossoffset | |
| 2210 | field->set_crosshair_offset | |
| 2211 | 2211 | if (string != NULL) |
| 2212 | string->printf("%s %s %1.3f", "Crosshair Offset", (field->crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f); | |
| 2213 | return field->crossoffset; | |
| 2212 | string->printf("%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); | |
| 2213 | return field->crosshair_offset(); | |
| 2214 | 2214 | } |
| 2215 | 2215 | #endif |
| 2216 | 2216 |
| r15082 | r15083 | |
|---|---|---|
| 221 | 221 | global.auto_time = CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT; |
| 222 | 222 | |
| 223 | 223 | /* determine who needs crosshairs */ |
| 224 | for (input_port_config *port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 225 | for (input_field_config *field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 226 | if (field->crossaxis != CROSSHAIR_AXIS_NONE) | |
| 224 | for (ioport_port *port = machine.ioport().first_port(); port != NULL; port = port->next()) | |
| 225 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 226 | if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE) | |
| 227 | 227 | { |
| 228 | int player = field->player; | |
| 228 | int player = field->player(); | |
| 229 | 229 | |
| 230 | 230 | assert(player < MAX_PLAYERS); |
| 231 | 231 | |
| r15082 | r15083 | |
| 347 | 347 | { |
| 348 | 348 | /* read all the lightgun values */ |
| 349 | 349 | if (global.used[player]) |
| 350 | inp | |
| 350 | device.machine().iop | |
| 351 | 351 | |
| 352 | 352 | /* auto visibility */ |
| 353 | 353 | if (global.mode[player] == CROSSHAIR_VISIBILITY_AUTO) |
| r15082 | r15083 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Input/output port handling. |
| 6 | 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | **************************************************************************** | |
| 9 | 8 | |
| 9 | Copyright Aaron Giles | |
| 10 | All rights reserved. | |
| 11 | ||
| 12 | Redistribution and use in source and binary forms, with or without | |
| 13 | modification, are permitted provided that the following conditions are | |
| 14 | met: | |
| 15 | ||
| 16 | * Redistributions of source code must retain the above copyright | |
| 17 | notice, this list of conditions and the following disclaimer. | |
| 18 | * Redistributions in binary form must reproduce the above copyright | |
| 19 | notice, this list of conditions and the following disclaimer in | |
| 20 | the documentation and/or other materials provided with the | |
| 21 | distribution. | |
| 22 | * Neither the name 'MAME' nor the names of its contributors may be | |
| 23 | used to endorse or promote products derived from this software | |
| 24 | without specific prior written permission. | |
| 25 | ||
| 26 | THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR | |
| 27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 29 | DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, | |
| 30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 33 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
| 34 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
| 35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 36 | POSSIBILITY OF SUCH DAMAGE. | |
| 37 | ||
| 10 | 38 | ***************************************************************************/ |
| 11 | 39 | |
| 12 | 40 | #pragma once |
| r15082 | r15083 | |
| 21 | 49 | #include <time.h> |
| 22 | 50 | |
| 23 | 51 | |
| 52 | //************************************************************************** | |
| 53 | // CONSTANTS | |
| 54 | //************************************************************************** | |
| 24 | 55 | |
| 25 | /*************************************************************************** | |
| 26 | CONSTANTS | |
| 27 | ***************************************************************************/ | |
| 56 | // input ports support up to 32 bits each | |
| 57 | typedef UINT32 ioport_value; | |
| 28 | 58 | |
| 29 | #define MAX_PLAYERS 8 | |
| 59 | // active high/low values for input ports | |
| 60 | const ioport_value IP_ACTIVE_HIGH = 0x00000000; | |
| 61 | const ioport_value IP_ACTIVE_LOW = 0xffffffff; | |
| 30 | 62 | |
| 31 | #define IP_ACTIVE_HIGH 0x00000000 | |
| 32 | #define IP_ACTIVE_LOW 0xffffffff | |
| 63 | // maximum number of players supported | |
| 64 | const int MAX_PLAYERS = 8; | |
| 33 | 65 | |
| 66 | // INP file parameters | |
| 67 | const UINT32 INP_HEADER_SIZE = 64; | |
| 68 | const UINT32 INP_HEADER_MAJVERSION = 3; | |
| 69 | const UINT32 INP_HEADER_MINVERSION = 0; | |
| 34 | 70 | |
| 35 | /* flags for input_field_configs */ | |
| 36 | #define FIELD_FLAG_UNUSED 0x01 /* set if this field is unused but relevant to other games on the same hw */ | |
| 37 | #define FIELD_FLAG_COCKTAIL 0x02 /* set if this field is relevant only for cocktail cabinets */ | |
| 38 | #define FIELD_FLAG_TOGGLE 0x04 /* set if this field should behave as a toggle */ | |
| 39 | #define FIELD_FLAG_ROTATED 0x08 /* set if this field represents a rotated control */ | |
| 40 | #define ANALOG_FLAG_REVERSE 0x10 /* analog only: reverse the sense of the axis */ | |
| 41 | #define ANALOG_FLAG_RESET 0x20 /* analog only: always preload in->default for relative axes, returning only deltas */ | |
| 42 | #define ANALOG_FLAG_WRAPS 0x40 /* analog only: positional count wraps around */ | |
| 43 | #define ANALOG_FLAG_INVERT 0x80 /* analog only: bitwise invert bits */ | |
| 71 | // unicode constants | |
| 72 | const unicode_char UCHAR_PRIVATE = 0x100000; | |
| 73 | const unicode_char UCHAR_SHIFT_1 = UCHAR_PRIVATE + 0; | |
| 74 | const unicode_char UCHAR_SHIFT_2 = UCHAR_PRIVATE + 1; | |
| 75 | const unicode_char UCHAR_SHIFT_BEGIN = UCHAR_SHIFT_1; | |
| 76 | const unicode_char UCHAR_SHIFT_END = UCHAR_SHIFT_2; | |
| 77 | const unicode_char UCHAR_MAMEKEY_BEGIN = UCHAR_PRIVATE + 2; | |
| 44 | 78 | |
| 45 | 79 | |
| 46 | /* INP file information */ | |
| 47 | #define INP_HEADER_SIZE 64 | |
| 48 | #define INP_HEADER_MAJVERSION 3 | |
| 49 | #define INP_HEADER_MINVERSION 0 | |
| 50 | ||
| 51 | ||
| 52 | /* sequence types for input_port_seq() call */ | |
| 53 | enum _input_seq_type | |
| 80 | // sequence types for input_port_seq() call | |
| 81 | enum input_seq_type | |
| 54 | 82 | { |
| 83 | SEQ_TYPE_INVALID = -1, | |
| 55 | 84 | SEQ_TYPE_STANDARD = 0, |
| 56 | 85 | SEQ_TYPE_INCREMENT, |
| 57 | 86 | SEQ_TYPE_DECREMENT, |
| 58 | 87 | SEQ_TYPE_TOTAL |
| 59 | 88 | }; |
| 60 | typedef enum _input_seq_type input_seq_type; | |
| 61 | 89 | DECLARE_ENUM_OPERATORS(input_seq_type) |
| 62 | 90 | |
| 63 | 91 | |
| 64 | /* conditions for DIP switches */ | |
| 65 | enum | |
| 92 | // crosshair types | |
| 93 | enum crosshair_axis_t | |
| 66 | 94 | { |
| 67 | PORTCOND_ALWAYS = 0, | |
| 68 | PORTCOND_EQUALS, | |
| 69 | PORTCOND_NOTEQUALS, | |
| 70 | PORTCOND_GREATERTHAN, | |
| 71 | PORTCOND_NOTGREATERTHAN, | |
| 72 | PORTCOND_LESSTHAN, | |
| 73 | PORTCOND_NOTLESSTHAN | |
| 74 | }; | |
| 75 | ||
| 76 | ||
| 77 | /* crosshair types */ | |
| 78 | enum | |
| 79 | { | |
| 80 | 95 | CROSSHAIR_AXIS_NONE = 0, |
| 81 | 96 | CROSSHAIR_AXIS_X, |
| 82 | 97 | CROSSHAIR_AXIS_Y |
| 83 | 98 | }; |
| 84 | 99 | |
| 85 | 100 | |
| 86 | / | |
| 101 | // groups for input ports | |
| 87 | 102 | enum ioport_group |
| 88 | 103 | { |
| 89 | 104 | IPG_UI = 0, |
| r15082 | r15083 | |
| 101 | 116 | }; |
| 102 | 117 | |
| 103 | 118 | |
| 104 | /* various input port types */ | |
| 105 | enum | |
| 119 | // various input port types | |
| 120 | enum ioport_type | |
| 106 | 121 | { |
| 107 | / | |
| 122 | // pseudo-port types | |
| 108 | 123 | IPT_INVALID = 0, |
| 109 | 124 | IPT_UNUSED, |
| 110 | 125 | IPT_END, |
| 111 | 126 | IPT_UNKNOWN, |
| 112 | 127 | IPT_PORT, |
| 113 | 128 | IPT_DIPSWITCH, |
| 114 | IPT_VBLANK, | |
| 115 | 129 | IPT_CONFIG, |
| 116 | 130 | |
| 117 | / | |
| 131 | // start buttons | |
| 118 | 132 | IPT_START1, |
| 119 | 133 | IPT_START2, |
| 120 | 134 | IPT_START3, |
| r15082 | r15083 | |
| 124 | 138 | IPT_START7, |
| 125 | 139 | IPT_START8, |
| 126 | 140 | |
| 127 | / | |
| 141 | // coin slots | |
| 128 | 142 | IPT_COIN1, |
| 129 | 143 | IPT_COIN2, |
| 130 | 144 | IPT_COIN3, |
| r15082 | r15083 | |
| 139 | 153 | IPT_COIN12, |
| 140 | 154 | IPT_BILL1, |
| 141 | 155 | |
| 142 | / | |
| 156 | // service coin | |
| 143 | 157 | IPT_SERVICE1, |
| 144 | 158 | IPT_SERVICE2, |
| 145 | 159 | IPT_SERVICE3, |
| 146 | 160 | IPT_SERVICE4, |
| 147 | 161 | |
| 148 | / | |
| 162 | // tilt inputs | |
| 149 | 163 | IPT_TILT1, |
| 150 | 164 | IPT_TILT2, |
| 151 | 165 | IPT_TILT3, |
| 152 | 166 | IPT_TILT4, |
| 153 | 167 | |
| 154 | / | |
| 168 | // misc other digital inputs | |
| 155 | 169 | IPT_SERVICE, |
| 156 | 170 | IPT_TILT, |
| 157 | 171 | IPT_INTERLOCK, |
| 158 | 172 | IPT_VOLUME_UP, |
| 159 | 173 | IPT_VOLUME_DOWN, |
| 160 | IPT_START, /* MESS only */ | |
| 161 | IPT_SELECT, /* MESS only */ | |
| 162 | IPT_KEYPAD, /* MESS only */ | |
| 163 | IPT_KEYBOARD, /* MESS only */ | |
| 174 | IPT_START, // MESS only | |
| 175 | IPT_SELECT, // MESS only | |
| 176 | IPT_KEYPAD, // MESS only | |
| 177 | IPT_KEYBOARD, // MESS only | |
| 164 | 178 | |
| 165 | #define __ipt_digital_joystick_start IPT_JOYSTICK_UP | |
| 166 | /* use IPT_JOYSTICK for panels where the player has one single joystick */ | |
| 167 | IPT_JOYSTICK_UP, | |
| 168 | IPT_JOYSTICK_DOWN, | |
| 169 | IPT_JOYSTICK_LEFT, | |
| 170 | IPT_JOYSTICK_RIGHT, | |
| 179 | // digital joystick inputs | |
| 180 | IPT_DIGITAL_JOYSTICK_FIRST, | |
| 171 | 181 | |
| 172 | /* use IPT_JOYSTICKLEFT and IPT_JOYSTICKRIGHT for dual joystick panels */ | |
| 173 | IPT_JOYSTICKRIGHT_UP, | |
| 174 | IPT_JOYSTICKRIGHT_DOWN, | |
| 175 | IPT_JOYSTICKRIGHT_LEFT, | |
| 176 | IPT_JOYSTICKRIGHT_RIGHT, | |
| 177 | IPT_JOYSTICKLEFT_UP, | |
| 178 | IPT_JOYSTICKLEFT_DOWN, | |
| 179 | IPT_JOYSTICKLEFT_LEFT, | |
| 180 | IPT_JOYSTICKLEFT_RIGHT, | |
| 181 | #define __ipt_digital_joystick_end IPT_JOYSTICKLEFT_RIGHT | |
| 182 | // use IPT_JOYSTICK for panels where the player has one single joystick | |
| 183 | IPT_JOYSTICK_UP = IPT_DIGITAL_JOYSTICK_FIRST, | |
| 184 | IPT_JOYSTICK_DOWN, | |
| 185 | IPT_JOYSTICK_LEFT, | |
| 186 | IPT_JOYSTICK_RIGHT, | |
| 182 | 187 | |
| 183 | /* action buttons */ | |
| 188 | // use IPT_JOYSTICKLEFT and IPT_JOYSTICKRIGHT for dual joystick panels | |
| 189 | IPT_JOYSTICKRIGHT_UP, | |
| 190 | IPT_JOYSTICKRIGHT_DOWN, | |
| 191 | IPT_JOYSTICKRIGHT_LEFT, | |
| 192 | IPT_JOYSTICKRIGHT_RIGHT, | |
| 193 | IPT_JOYSTICKLEFT_UP, | |
| 194 | IPT_JOYSTICKLEFT_DOWN, | |
| 195 | IPT_JOYSTICKLEFT_LEFT, | |
| 196 | IPT_JOYSTICKLEFT_RIGHT, | |
| 197 | ||
| 198 | IPT_DIGITAL_JOYSTICK_LAST, | |
| 199 | ||
| 200 | // action buttons | |
| 184 | 201 | IPT_BUTTON1, |
| 185 | 202 | IPT_BUTTON2, |
| 186 | 203 | IPT_BUTTON3, |
| r15082 | r15083 | |
| 198 | 215 | IPT_BUTTON15, |
| 199 | 216 | IPT_BUTTON16, |
| 200 | 217 | |
| 201 | /* mahjong inputs */ | |
| 202 | #define __ipt_mahjong_start IPT_MAHJONG_A | |
| 203 | IPT_MAHJONG_A, | |
| 204 | IPT_MAHJONG_B, | |
| 205 | IPT_MAHJONG_C, | |
| 206 | IPT_MAHJONG_D, | |
| 207 | IPT_MAHJONG_E, | |
| 208 | IPT_MAHJONG_F, | |
| 209 | IPT_MAHJONG_G, | |
| 210 | IPT_MAHJONG_H, | |
| 211 | IPT_MAHJONG_I, | |
| 212 | IPT_MAHJONG_J, | |
| 213 | IPT_MAHJONG_K, | |
| 214 | IPT_MAHJONG_L, | |
| 215 | IPT_MAHJONG_M, | |
| 216 | IPT_MAHJONG_N, | |
| 217 | IPT_MAHJONG_O, | |
| 218 | IPT_MAHJONG_P, | |
| 219 | IPT_MAHJONG_Q, | |
| 220 | IPT_MAHJONG_KAN, | |
| 221 | IPT_MAHJONG_PON, | |
| 222 | IPT_MAHJONG_CHI, | |
| 223 | IPT_MAHJONG_REACH, //IPT_MAHJONG_RIICHI, // REACH is Japanglish | |
| 224 | IPT_MAHJONG_RON, | |
| 225 | IPT_MAHJONG_BET, | |
| 226 | IPT_MAHJONG_LAST_CHANCE, | |
| 227 | IPT_MAHJONG_SCORE, | |
| 228 | IPT_MAHJONG_DOUBLE_UP, | |
| 229 | IPT_MAHJONG_FLIP_FLOP, | |
| 230 | IPT_MAHJONG_BIG, | |
| 231 | IPT_MAHJONG_SMALL, | |
| 232 | #define __ipt_mahjong_end IPT_MAHJONG_SMALL | |
| 218 | // mahjong inputs | |
| 219 | IPT_MAHJONG_FIRST, | |
| 220 | ||
| 221 | IPT_MAHJONG_A, | |
| 222 | IPT_MAHJONG_B, | |
| 223 | IPT_MAHJONG_C, | |
| 224 | IPT_MAHJONG_D, | |
| 225 | IPT_MAHJONG_E, | |
| 226 | IPT_MAHJONG_F, | |
| 227 | IPT_MAHJONG_G, | |
| 228 | IPT_MAHJONG_H, | |
| 229 | IPT_MAHJONG_I, | |
| 230 | IPT_MAHJONG_J, | |
| 231 | IPT_MAHJONG_K, | |
| 232 | IPT_MAHJONG_L, | |
| 233 | IPT_MAHJONG_M, | |
| 234 | IPT_MAHJONG_N, | |
| 235 | IPT_MAHJONG_O, | |
| 236 | IPT_MAHJONG_P, | |
| 237 | IPT_MAHJONG_Q, | |
| 238 | IPT_MAHJONG_KAN, | |
| 239 | IPT_MAHJONG_PON, | |
| 240 | IPT_MAHJONG_CHI, | |
| 241 | IPT_MAHJONG_REACH, //IPT_MAHJONG_RIICHI, // REACH is Japanglish | |
| 242 | IPT_MAHJONG_RON, | |
| 243 | IPT_MAHJONG_BET, | |
| 244 | IPT_MAHJONG_LAST_CHANCE, | |
| 245 | IPT_MAHJONG_SCORE, | |
| 246 | IPT_MAHJONG_DOUBLE_UP, | |
| 247 | IPT_MAHJONG_FLIP_FLOP, | |
| 248 | IPT_MAHJONG_BIG, | |
| 249 | IPT_MAHJONG_SMALL, | |
| 250 | ||
| 251 | IPT_MAHJONG_LAST, | |
| 233 | 252 | |
| 234 | /* hanafuda inputs */ | |
| 235 | #define __ipt_hanafuda_start IPT_HANAFUDA_A | |
| 236 | IPT_HANAFUDA_A, | |
| 237 | IPT_HANAFUDA_B, | |
| 238 | IPT_HANAFUDA_C, | |
| 239 | IPT_HANAFUDA_D, | |
| 240 | IPT_HANAFUDA_E, | |
| 241 | IPT_HANAFUDA_F, | |
| 242 | IPT_HANAFUDA_G, | |
| 243 | IPT_HANAFUDA_H, | |
| 244 | IPT_HANAFUDA_YES, | |
| 245 | IPT_HANAFUDA_NO, | |
| 246 | #define __ipt_hanafuda_end IPT_HANAFUDA_NO | |
| 253 | // hanafuda inputs | |
| 254 | IPT_HANAFUDA_FIRST, | |
| 247 | 255 | |
| 248 | #define __ipt_gambling_start IPT_GAMBLE_KEYIN | |
| 256 | IPT_HANAFUDA_A, | |
| 257 | IPT_HANAFUDA_B, | |
| 258 | IPT_HANAFUDA_C, | |
| 259 | IPT_HANAFUDA_D, | |
| 260 | IPT_HANAFUDA_E, | |
| 261 | IPT_HANAFUDA_F, | |
| 262 | IPT_HANAFUDA_G, | |
| 263 | IPT_HANAFUDA_H, | |
| 264 | IPT_HANAFUDA_YES, | |
| 265 | IPT_HANAFUDA_NO, | |
| 266 | ||
| 267 | IPT_HANAFUDA_LAST, | |
| 249 | 268 | |
| 250 | /* gambling inputs */ | |
| 251 | IPT_GAMBLE_KEYIN, // attendant | |
| 252 | IPT_GAMBLE_KEYOUT, // attendant | |
| 253 | IPT_GAMBLE_SERVICE, // attendant | |
| 254 | IPT_GAMBLE_BOOK, // attendant | |
| 255 | IPT_GAMBLE_DOOR, // attendant | |
| 256 | // IPT_GAMBLE_DOOR2, // many gambling games have several doors. | |
| 257 | // IPT_GAMBLE_DOOR3, | |
| 258 | // IPT_GAMBLE_DOOR4, | |
| 259 | // IPT_GAMBLE_DOOR5, | |
| 269 | // gambling inputs | |
| 270 | IPT_GAMBLING_FIRST, | |
| 260 | 271 | |
| 261 | IPT_GAMBLE_HIGH, // player | |
| 262 | IPT_GAMBLE_LOW, // player | |
| 263 | IPT_GAMBLE_HALF, // player | |
| 264 | IPT_GAMBLE_DEAL, // player | |
| 265 | IPT_GAMBLE_D_UP, // player | |
| 266 | IPT_GAMBLE_TAKE, // player | |
| 267 | IPT_GAMBLE_STAND, // player | |
| 268 | IPT_GAMBLE_BET, // player | |
| 269 | IPT_GAMBLE_PAYOUT, // player | |
| 270 | // IPT_GAMBLE_BUTTON1, // player | |
| 271 | // IPT_GAMBLE_BUTTON2, // many many gambling games have multi-games and/or multi-function-buttons | |
| 272 | // IPT_GAMBLE_BUTTON3, // I suggest to eliminate specific names | |
| 273 | // IPT_GAMBLE_BUTTON4, | |
| 274 | // IPT_GAMBLE_BUTTON5, | |
| 275 | // IPT_GAMBLE_BUTTON6, | |
| 276 | // IPT_GAMBLE_BUTTON7, | |
| 277 | // IPT_GAMBLE_BUTTON8, | |
| 278 | // IPT_GAMBLE_BUTTON9, | |
| 279 | // IPT_GAMBLE_BUTTON10, | |
| 280 | // IPT_GAMBLE_BUTTON11, | |
| 281 | // IPT_GAMBLE_BUTTON12, | |
| 282 | // IPT_GAMBLE_BUTTON13, | |
| 283 | // IPT_GAMBLE_BUTTON14, | |
| 284 | // IPT_GAMBLE_BUTTON15, | |
| 285 | // IPT_GAMBLE_BUTTON16, | |
| 272 | IPT_GAMBLE_KEYIN, // attendant | |
| 273 | IPT_GAMBLE_KEYOUT, // attendant | |
| 274 | IPT_GAMBLE_SERVICE, // attendant | |
| 275 | IPT_GAMBLE_BOOK, // attendant | |
| 276 | IPT_GAMBLE_DOOR, // attendant | |
| 277 | // IPT_GAMBLE_DOOR2, // many gambling games have several doors. | |
| 278 | // IPT_GAMBLE_DOOR3, | |
| 279 | // IPT_GAMBLE_DOOR4, | |
| 280 | // IPT_GAMBLE_DOOR5, | |
| 286 | 281 | |
| 287 | /* poker-specific inputs */ | |
| 288 | IPT_POKER_HOLD1, | |
| 289 | IPT_POKER_HOLD2, | |
| 290 | IPT_POKER_HOLD3, | |
| 291 | IPT_POKER_HOLD4, | |
| 292 | IPT_POKER_HOLD5, | |
| 293 | IPT_POKER_CANCEL, | |
| 294 | IPT_POKER_BET, | |
| 282 | IPT_GAMBLE_HIGH, // player | |
| 283 | IPT_GAMBLE_LOW, // player | |
| 284 | IPT_GAMBLE_HALF, // player | |
| 285 | IPT_GAMBLE_DEAL, // player | |
| 286 | IPT_GAMBLE_D_UP, // player | |
| 287 | IPT_GAMBLE_TAKE, // player | |
| 288 | IPT_GAMBLE_STAND, // player | |
| 289 | IPT_GAMBLE_BET, // player | |
| 290 | IPT_GAMBLE_PAYOUT, // player | |
| 291 | // IPT_GAMBLE_BUTTON1, // player | |
| 292 | // IPT_GAMBLE_BUTTON2, // many many gambling games have multi-games and/or multi-function-buttons | |
| 293 | // IPT_GAMBLE_BUTTON3, // I suggest to eliminate specific names | |
| 294 | // IPT_GAMBLE_BUTTON4, | |
| 295 | // IPT_GAMBLE_BUTTON5, | |
| 296 | // IPT_GAMBLE_BUTTON6, | |
| 297 | // IPT_GAMBLE_BUTTON7, | |
| 298 | // IPT_GAMBLE_BUTTON8, | |
| 299 | // IPT_GAMBLE_BUTTON9, | |
| 300 | // IPT_GAMBLE_BUTTON10, | |
| 301 | // IPT_GAMBLE_BUTTON11, | |
| 302 | // IPT_GAMBLE_BUTTON12, | |
| 303 | // IPT_GAMBLE_BUTTON13, | |
| 304 | // IPT_GAMBLE_BUTTON14, | |
| 305 | // IPT_GAMBLE_BUTTON15, | |
| 306 | // IPT_GAMBLE_BUTTON16, | |
| 295 | 307 | |
| 296 | /* slot-specific inputs */ | |
| 297 | IPT_SLOT_STOP1, | |
| 298 | IPT_SLOT_STOP2, | |
| 299 | IPT_SLOT_STOP3, | |
| 300 | IPT_SLOT_STOP4, | |
| 301 | IPT_SLOT_STOP_ALL, | |
| 308 | // poker-specific inputs | |
| 309 | IPT_POKER_HOLD1, | |
| 310 | IPT_POKER_HOLD2, | |
| 311 | IPT_POKER_HOLD3, | |
| 312 | IPT_POKER_HOLD4, | |
| 313 | IPT_POKER_HOLD5, | |
| 314 | IPT_POKER_CANCEL, | |
| 315 | IPT_POKER_BET, | |
| 302 | 316 | |
| 303 | #define __ipt_gambling_end IPT_SLOT_STOP_ALL | |
| 317 | // slot-specific inputs | |
| 318 | IPT_SLOT_STOP1, | |
| 319 | IPT_SLOT_STOP2, | |
| 320 | IPT_SLOT_STOP3, | |
| 321 | IPT_SLOT_STOP4, | |
| 322 | IPT_SLOT_STOP_ALL, | |
| 304 | 323 | |
| 305 | /* analog inputs */ | |
| 306 | #define __ipt_analog_start IPT_AD_STICK_X | |
| 307 | #define __ipt_analog_absolute_start IPT_AD_STICK_X | |
| 308 | IPT_AD_STICK_X, // absolute // autocenter | |
| 309 | IPT_AD_STICK_Y, // absolute // autocenter | |
| 310 | IPT_AD_STICK_Z, // absolute // autocenter | |
| 311 | IPT_PADDLE, // absolute // autocenter | |
| 312 | IPT_PADDLE_V, // absolute // autocenter | |
| 313 | IPT_PEDAL, // absolute // autocenter | |
| 314 | IPT_PEDAL2, // absolute // autocenter | |
| 315 | IPT_PEDAL3, // absolute // autocenter | |
| 316 | IPT_LIGHTGUN_X, // absolute | |
| 317 | IPT_LIGHTGUN_Y, // absolute | |
| 318 | IPT_POSITIONAL, // absolute // autocenter if not wraps | |
| 319 | IPT_POSITIONAL_V, // absolute // autocenter if not wraps | |
| 320 | #define __ipt_analog_absolute_end IPT_POSITIONAL_V | |
| 324 | IPT_GAMBLING_LAST, | |
| 321 | 325 | |
| 322 | IPT_DIAL, // relative | |
| 323 | IPT_DIAL_V, // relative | |
| 324 | IPT_TRACKBALL_X, // relative | |
| 325 | IPT_TRACKBALL_Y, // relative | |
| 326 | IPT_MOUSE_X, // relative | |
| 327 | IPT_MOUSE_Y, // relative | |
| 328 | #define __ipt_analog_end IPT_MOUSE_Y | |
| 326 | // analog inputs | |
| 327 | IPT_ANALOG_FIRST, | |
| 328 | ||
| 329 | IPT_ANALOG_ABSOLUTE_FIRST, | |
| 329 | 330 | |
| 330 | /* analog adjuster support */ | |
| 331 | IPT_AD_STICK_X, // absolute // autocenter | |
| 332 | IPT_AD_STICK_Y, // absolute // autocenter | |
| 333 | IPT_AD_STICK_Z, // absolute // autocenter | |
| 334 | IPT_PADDLE, // absolute // autocenter | |
| 335 | IPT_PADDLE_V, // absolute // autocenter | |
| 336 | IPT_PEDAL, // absolute // autocenter | |
| 337 | IPT_PEDAL2, // absolute // autocenter | |
| 338 | IPT_PEDAL3, // absolute // autocenter | |
| 339 | IPT_LIGHTGUN_X, // absolute | |
| 340 | IPT_LIGHTGUN_Y, // absolute | |
| 341 | IPT_POSITIONAL, // absolute // autocenter if not wraps | |
| 342 | IPT_POSITIONAL_V, // absolute // autocenter if not wraps | |
| 343 | ||
| 344 | IPT_ANALOG_ABSOLUTE_LAST, | |
| 345 | ||
| 346 | IPT_DIAL, // relative | |
| 347 | IPT_DIAL_V, // relative | |
| 348 | IPT_TRACKBALL_X, // relative | |
| 349 | IPT_TRACKBALL_Y, // relative | |
| 350 | IPT_MOUSE_X, // relative | |
| 351 | IPT_MOUSE_Y, // relative | |
| 352 | ||
| 353 | IPT_ANALOG_LAST, | |
| 354 | ||
| 355 | // analog adjuster support | |
| 331 | 356 | IPT_ADJUSTER, |
| 332 | 357 | |
| 333 | /* the following are special codes for user interface handling - not to be used by drivers! */ | |
| 334 | #define __ipt_ui_start IPT_UI_CONFIGURE | |
| 335 | IPT_UI_CONFIGURE, | |
| 336 | IPT_UI_ON_SCREEN_DISPLAY, | |
| 337 | IPT_UI_DEBUG_BREAK, | |
| 338 | IPT_UI_PAUSE, | |
| 339 | IPT_UI_RESET_MACHINE, | |
| 340 | IPT_UI_SOFT_RESET, | |
| 341 | IPT_UI_SHOW_GFX, | |
| 342 | IPT_UI_FRAMESKIP_DEC, | |
| 343 | IPT_UI_FRAMESKIP_INC, | |
| 344 | IPT_UI_THROTTLE, | |
| 345 | IPT_UI_FAST_FORWARD, | |
| 346 | IPT_UI_SHOW_FPS, | |
| 347 | IPT_UI_SNAPSHOT, | |
| 348 | IPT_UI_RECORD_MOVIE, | |
| 349 | IPT_UI_TOGGLE_CHEAT, | |
| 350 | IPT_UI_UP, | |
| 351 | IPT_UI_DOWN, | |
| 352 | IPT_UI_LEFT, | |
| 353 | IPT_UI_RIGHT, | |
| 354 | IPT_UI_HOME, | |
| 355 | IPT_UI_END, | |
| 356 | IPT_UI_PAGE_UP, | |
| 357 | IPT_UI_PAGE_DOWN, | |
| 358 | IPT_UI_SELECT, | |
| 359 | IPT_UI_CANCEL, | |
| 360 | IPT_UI_DISPLAY_COMMENT, | |
| 361 | IPT_UI_CLEAR, | |
| 362 | IPT_UI_ZOOM_IN, | |
| 363 | IPT_UI_ZOOM_OUT, | |
| 364 | IPT_UI_PREV_GROUP, | |
| 365 | IPT_UI_NEXT_GROUP, | |
| 366 | IPT_UI_ROTATE, | |
| 367 | IPT_UI_SHOW_PROFILER, | |
| 368 | IPT_UI_TOGGLE_UI, | |
| 369 | IPT_UI_TOGGLE_DEBUG, | |
| 370 | IPT_UI_PASTE, | |
| 371 | IPT_UI_SAVE_STATE, | |
| 372 | IPT_UI_LOAD_STATE, | |
| 358 | // the following are special codes for user interface handling - not to be used by drivers! | |
| 359 | IPT_UI_FIRST, | |
| 373 | 360 | |
| 374 | /* additional OSD-specified UI port types (up to 16) */ | |
| 375 | IPT_OSD_1, | |
| 376 | IPT_OSD_2, | |
| 377 | IPT_OSD_3, | |
| 378 | IPT_OSD_4, | |
| 379 | IPT_OSD_5, | |
| 380 | IPT_OSD_6, | |
| 381 | IPT_OSD_7, | |
| 382 | IPT_OSD_8, | |
| 383 | IPT_OSD_9, | |
| 384 | IPT_OSD_10, | |
| 385 | IPT_OSD_11, | |
| 386 | IPT_OSD_12, | |
| 387 | IPT_OSD_13, | |
| 388 | IPT_OSD_14, | |
| 389 | IPT_OSD_15, | |
| 390 | IPT_OSD_16, | |
| 391 | #define __ipt_ui_end IPT_OSD_16 | |
| 361 | IPT_UI_CONFIGURE, | |
| 362 | IPT_UI_ON_SCREEN_DISPLAY, | |
| 363 | IPT_UI_DEBUG_BREAK, | |
| 364 | IPT_UI_PAUSE, | |
| 365 | IPT_UI_RESET_MACHINE, | |
| 366 | IPT_UI_SOFT_RESET, | |
| 367 | IPT_UI_SHOW_GFX, | |
| 368 | IPT_UI_FRAMESKIP_DEC, | |
| 369 | IPT_UI_FRAMESKIP_INC, | |
| 370 | IPT_UI_THROTTLE, | |
| 371 | IPT_UI_FAST_FORWARD, | |
| 372 | IPT_UI_SHOW_FPS, | |
| 373 | IPT_UI_SNAPSHOT, | |
| 374 | IPT_UI_RECORD_MOVIE, | |
| 375 | IPT_UI_TOGGLE_CHEAT, | |
| 376 | IPT_UI_UP, | |
| 377 | IPT_UI_DOWN, | |
| 378 | IPT_UI_LEFT, | |
| 379 | IPT_UI_RIGHT, | |
| 380 | IPT_UI_HOME, | |
| 381 | IPT_UI_END, | |
| 382 | IPT_UI_PAGE_UP, | |
| 383 | IPT_UI_PAGE_DOWN, | |
| 384 | IPT_UI_SELECT, | |
| 385 | IPT_UI_CANCEL, | |
| 386 | IPT_UI_DISPLAY_COMMENT, | |
| 387 | IPT_UI_CLEAR, | |
| 388 | IPT_UI_ZOOM_IN, | |
| 389 | IPT_UI_ZOOM_OUT, | |
| 390 | IPT_UI_PREV_GROUP, | |
| 391 | IPT_UI_NEXT_GROUP, | |
| 392 | IPT_UI_ROTATE, | |
| 393 | IPT_UI_SHOW_PROFILER, | |
| 394 | IPT_UI_TOGGLE_UI, | |
| 395 | IPT_UI_TOGGLE_DEBUG, | |
| 396 | IPT_UI_PASTE, | |
| 397 | IPT_UI_SAVE_STATE, | |
| 398 | IPT_UI_LOAD_STATE, | |
| 392 | 399 | |
| 393 | /* other meaning not mapped to standard defaults */ | |
| 400 | // additional OSD-specified UI port types (up to 16) | |
| 401 | IPT_OSD_1, | |
| 402 | IPT_OSD_2, | |
| 403 | IPT_OSD_3, | |
| 404 | IPT_OSD_4, | |
| 405 | IPT_OSD_5, | |
| 406 | IPT_OSD_6, | |
| 407 | IPT_OSD_7, | |
| 408 | IPT_OSD_8, | |
| 409 | IPT_OSD_9, | |
| 410 | IPT_OSD_10, | |
| 411 | IPT_OSD_11, | |
| 412 | IPT_OSD_12, | |
| 413 | IPT_OSD_13, | |
| 414 | IPT_OSD_14, | |
| 415 | IPT_OSD_15, | |
| 416 | IPT_OSD_16, | |
| 417 | ||
| 418 | IPT_UI_LAST, | |
| 419 | ||
| 420 | // other meaning not mapped to standard defaults | |
| 394 | 421 | IPT_OTHER, |
| 395 | 422 | |
| 396 | / | |
| 423 | // special meaning handled by custom code | |
| 397 | 424 | IPT_SPECIAL, |
| 425 | IPT_CUSTOM, | |
| 398 | 426 | IPT_OUTPUT, |
| 399 | 427 | |
| 400 | _ | |
| 428 | IPT_COUNT | |
| 401 | 429 | }; |
| 430 | DECLARE_ENUM_OPERATORS(ioport_type) | |
| 402 | 431 | |
| 403 | 432 | |
| 404 | /* default strings used in port definitions */ | |
| 433 | // input type classes | |
| 434 | enum ioport_type_class | |
| 435 | { | |
| 436 | INPUT_CLASS_INTERNAL, | |
| 437 | INPUT_CLASS_KEYBOARD, | |
| 438 | INPUT_CLASS_CONTROLLER, | |
| 439 | INPUT_CLASS_CONFIG, | |
| 440 | INPUT_CLASS_DIPSWITCH, | |
| 441 | INPUT_CLASS_MISC | |
| 442 | }; | |
| 443 | ||
| 444 | ||
| 445 | // default strings used in port definitions | |
| 405 | 446 | enum |
| 406 | 447 | { |
| 407 | 448 | INPUT_STRING_Off = 1, |
| r15082 | r15083 | |
| 627 | 668 | }; |
| 628 | 669 | |
| 629 | 670 | |
| 630 | /* input classes */ | |
| 631 | enum | |
| 632 | { | |
| 633 | INPUT_CLASS_INTERNAL, | |
| 634 | INPUT_CLASS_KEYBOARD, | |
| 635 | INPUT_CLASS_CONTROLLER, | |
| 636 | INPUT_CLASS_CONFIG, | |
| 637 | INPUT_CLASS_DIPSWITCH, | |
| 638 | INPUT_CLASS_MISC | |
| 639 | }; | |
| 640 | 671 | |
| 641 | #define UCHAR_PRIVATE (0x100000) | |
| 642 | #define UCHAR_SHIFT_1 (UCHAR_PRIVATE + 0) | |
| 643 | #define UCHAR_SHIFT_2 (UCHAR_PRIVATE + 1) | |
| 644 | #define UCHAR_MAMEKEY_BEGIN (UCHAR_PRIVATE + 2) | |
| 645 | #define UCHAR_MAMEKEY(code) (UCHAR_MAMEKEY_BEGIN + ITEM_ID_##code) | |
| 672 | //************************************************************************** | |
| 673 | // TYPE DEFINITIONS | |
| 674 | //************************************************************************** | |
| 646 | 675 | |
| 647 | #define UCHAR_SHIFT_BEGIN (UCHAR_SHIFT_1) | |
| 648 | #define UCHAR_SHIFT_END (UCHAR_SHIFT_2) | |
| 676 | // opaque types pointing to live state | |
| 677 | struct input_port_state; | |
| 678 | struct input_field_state; | |
| 649 | 679 | |
| 680 | // forward declarations | |
| 681 | class ioport_list; | |
| 682 | class ioport_port; | |
| 683 | struct ioport_port_live; | |
| 684 | class ioport_field; | |
| 685 | struct ioport_field_live; | |
| 686 | class ioport_manager; | |
| 687 | class emu_timer; | |
| 688 | typedef struct _xml_data_node xml_data_node; | |
| 689 | class analog_field; | |
| 650 | 690 | |
| 651 | /*************************************************************************** | |
| 652 | TYPE DEFINITIONS | |
| 653 | ***************************************************************************/ | |
| 691 | // constructor function pointer | |
| 692 | typedef void (*ioport_constructor)(device_t &owner, ioport_list &portlist, astring &errorbuf); | |
| 654 | 693 | |
| 655 | /* input ports support up to 32 bits each */ | |
| 656 | typedef UINT32 input_port_value; | |
| 694 | // I/O port callback function delegates | |
| 695 | typedef device_delegate<ioport_value (ioport_field &, void *)> ioport_field_read_delegate; | |
| 696 | typedef device_delegate<void (ioport_field &, void *, ioport_value, ioport_value)> ioport_field_write_delegate; | |
| 697 | typedef device_delegate<float (ioport_field &, float)> ioport_field_crossmap_delegate; | |
| 657 | 698 | |
| 699 | // keyboard helper function delegates | |
| 700 | typedef delegate<int (const unicode_char *, size_t)> ioport_queue_chars_delegate; | |
| 701 | typedef delegate<bool (unicode_char)> ioport_accept_char_delegate; | |
| 702 | typedef delegate<bool ()> ioport_charqueue_empty_delegate; | |
| 658 | 703 | |
| 659 | /* opaque types pointing to live state */ | |
| 660 | typedef struct _input_port_state input_port_state; | |
| 661 | typedef struct _input_field_state input_field_state; | |
| 662 | 704 | |
| 705 | // ======================> inp_header | |
| 663 | 706 | |
| 664 | /* forward declarations */ | |
| 665 | class input_port_config; | |
| 666 | class input_field_config; | |
| 667 | class emu_timer; | |
| 707 | // header at the front of INP files | |
| 708 | struct inp_header | |
| 709 | { | |
| 710 | char header[8]; // +00: 8 byte header - must be "MAMEINP\0" | |
| 711 | UINT64 basetime; // +08: base time of recording | |
| 712 | UINT8 majversion; // +10: major INP version | |
| 713 | UINT8 minversion; // +11: minor INP version | |
| 714 | UINT8 reserved[2]; // +12: must be zero | |
| 715 | char gamename[12]; // +14: game name string, NULL-terminated | |
| 716 | char version[32]; // +20: system version string, NULL-terminated | |
| 717 | }; | |
| 668 | 718 | |
| 669 | /* template specializations */ | |
| 670 | typedef tagged_list<input_port_config> ioport_list; | |
| 671 | 719 | |
| 720 | // ======================> input_device_default | |
| 672 | 721 | |
| 673 | /* read input port callback function */ | |
| 674 | typedef delegate<UINT32 (const input_field_config &, void *)> input_field_read_delegate; | |
| 722 | // device defined default input settings | |
| 723 | struct input_device_default | |
| 724 | { | |
| 725 | const char * tag; // tag of port to update | |
| 726 | ioport_value mask; // mask to apply to the port | |
| 727 | ioport_value defvalue; // new default value | |
| 728 | }; | |
| 675 | 729 | |
| 676 | /* input port write callback function */ | |
| 677 | typedef delegate<void (const input_field_config &, void *, input_port_value, input_port_value)> input_field_write_delegate; | |
| 678 | 730 | |
| 679 | /* crosshair mapping function */ | |
| 680 | typedef delegate<float (const input_field_config &, float)> input_field_crossmap_delegate; | |
| 731 | // ======================> input_type_entry | |
| 681 | 732 | |
| 733 | // describes a fundamental input type, including default input sequences | |
| 734 | class input_type_entry | |
| 735 | { | |
| 736 | friend class simple_list<input_type_entry>; | |
| 737 | friend class ioport_manager; | |
| 682 | 738 | |
| 683 | /* encapsulates a condition on a port field or setting */ | |
| 684 | typedef struct _input_condition input_condition; | |
| 685 | struct _input_condition | |
| 686 | { | |
| 687 | const char * tag; /* tag of port whose condition is to be tested */ | |
| 688 | input_port_value mask; /* mask to apply to the port */ | |
| 689 | input_port_value value; /* value to compare against */ | |
| 690 | UINT8 condition; /* condition to use */ | |
| 739 | public: | |
| 740 | // construction/destruction | |
| 741 | input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard); | |
| 742 | input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment); | |
| 743 | ||
| 744 | // getters | |
| 745 | input_type_entry *next() const { return m_next; } | |
| 746 | ioport_type type() const { return m_type; } | |
| 747 | ioport_group group() const { return m_group; } | |
| 748 | UINT8 player() const { return m_player; } | |
| 749 | const char *token() const { return m_token; } | |
| 750 | const char *name() const { return m_name; } | |
| 751 | input_seq &defseq(input_seq_type seqtype = SEQ_TYPE_STANDARD) { return m_defseq[seqtype]; } | |
| 752 | const input_seq &seq(input_seq_type seqtype = SEQ_TYPE_STANDARD) const { return m_seq[seqtype]; } | |
| 753 | ||
| 754 | // setters | |
| 755 | void configure_osd(const char *token, const char *name); | |
| 756 | ||
| 757 | private: | |
| 758 | // internal state | |
| 759 | input_type_entry * m_next; // next description in the list | |
| 760 | ioport_type m_type; // IPT_* for this entry | |
| 761 | ioport_group m_group; // which group the port belongs to | |
| 762 | UINT8 m_player; // player number (0 is player 1) | |
| 763 | const char * m_token; // token used to store settings | |
| 764 | const char * m_name; // user-friendly name | |
| 765 | input_seq m_defseq[SEQ_TYPE_TOTAL];// default input sequence | |
| 766 | input_seq m_seq[SEQ_TYPE_TOTAL];// currently configured sequences | |
| 691 | 767 | }; |
| 692 | 768 | |
| 693 | 769 | |
| 694 | /* a single setting for a configuration or DIP switch */ | |
| 695 | class input_setting_config | |
| 770 | // ======================> digital_joystick | |
| 771 | ||
| 772 | // tracking information about a digital joystick input | |
| 773 | class digital_joystick | |
| 696 | 774 | { |
| 697 | DISABLE_COPYING(input_setting_config); | |
| 698 | friend class simple_list<input_setting_config>; | |
| 775 | DISABLE_COPYING(digital_joystick); | |
| 776 | friend class simple_list<digital_joystick>; | |
| 699 | 777 | |
| 700 | 778 | public: |
| 701 | input_setting_config(input_field_config &field, input_port_value value, const char *name); | |
| 702 | input_setting_config *next() const { return m_next; } | |
| 779 | // directions | |
| 780 | enum direction_t | |
| 781 | { | |
| 782 | JOYDIR_UP, | |
| 783 | JOYDIR_DOWN, | |
| 784 | JOYDIR_LEFT, | |
| 785 | JOYDIR_RIGHT, | |
| 786 | JOYDIR_COUNT | |
| 787 | }; | |
| 788 | ||
| 789 | // bit constants | |
| 790 | static const UINT8 UP_BIT = 1 << JOYDIR_UP; | |
| 791 | static const UINT8 DOWN_BIT = 1 << JOYDIR_DOWN; | |
| 792 | static const UINT8 LEFT_BIT = 1 << JOYDIR_LEFT; | |
| 793 | static const UINT8 RIGHT_BIT = 1 << JOYDIR_RIGHT; | |
| 703 | 794 | |
| 704 | input_port_value value; /* value of the bits in this setting */ | |
| 705 | input_condition condition; /* condition under which this setting is valid */ | |
| 706 | const char * name; /* user-friendly name to display */ | |
| 795 | // construction/destruction | |
| 796 | digital_joystick(int player, int number); | |
| 797 | ||
| 798 | // getters | |
| 799 | digital_joystick *next() const { return m_next; } | |
| 800 | int player() const { return m_player; } | |
| 801 | int number() const { return m_number; } | |
| 802 | UINT8 current() const { return m_current; } | |
| 803 | UINT8 current4way() const { return m_current4way; } | |
| 804 | ||
| 805 | // configuration | |
| 806 | direction_t set_axis(ioport_field &field); | |
| 707 | 807 | |
| 808 | // updates | |
| 809 | void frame_update(); | |
| 810 | ||
| 708 | 811 | private: |
| 709 | input_field_config & m_field; /* pointer back to the field that owns us */ | |
| 710 | input_setting_config * m_next; /* pointer to next setting in sequence */ | |
| 812 | // internal state | |
| 813 | digital_joystick * m_next; // next joystick in the list | |
| 814 | int m_player; // player number represented | |
| 815 | int m_number; // joystick number represented | |
| 816 | ioport_field * m_field[JOYDIR_COUNT]; // input field for each direction | |
| 817 | UINT8 m_current; // current value | |
| 818 | UINT8 m_current4way; // current 4-way value | |
| 819 | UINT8 m_previous; // previous value | |
| 711 | 820 | }; |
| 821 | DECLARE_ENUM_OPERATORS(digital_joystick::direction_t) | |
| 712 | 822 | |
| 713 | 823 | |
| 714 | /* a mapping from a bit to a physical DIP switch description */ | |
| 715 | class input_field_diplocation | |
| 824 | // ======================> natural_keyboard | |
| 825 | ||
| 826 | // buffer to handle copy/paste/insert of keys | |
| 827 | class natural_keyboard | |
| 716 | 828 | { |
| 717 | DISABLE_COPYING(input_field_diplocation); | |
| 718 | friend class simple_list<input_field_diplocation>; | |
| 829 | DISABLE_COPYING(natural_keyboard); | |
| 719 | 830 | |
| 720 | 831 | public: |
| 721 | input_field_diplocation(const char *string, UINT8 swnum, bool invert); | |
| 722 | input_field_diplocation *next() const { return m_next; } | |
| 832 | // construction/destruction | |
| 833 | natural_keyboard(running_machine &machine); | |
| 834 | ||
| 835 | // getters and queries | |
| 836 | running_machine &machine() const { return m_machine; } | |
| 837 | bool empty() const { return (m_bufbegin == m_bufend); } | |
| 838 | bool full() const { return ((m_bufend + 1) % m_buffer.count()) == m_bufbegin; } | |
| 839 | bool can_post() const { return (!m_queue_chars.isnull() || m_keycode_map.count() == 0); } | |
| 840 | bool is_posting() const { return (!empty() || (!m_charqueue_empty.isnull() && !m_charqueue_empty())); } | |
| 723 | 841 | |
| 724 | astring swname; /* name of the physical DIP switch */ | |
| 725 | UINT8 swnum; /* physical switch number */ | |
| 726 | bool invert; /* is this an active-high DIP? */ | |
| 842 | // configuration | |
| 843 | void configure(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty); | |
| 727 | 844 | |
| 845 | // posting | |
| 846 | void post(unicode_char ch); | |
| 847 | void post(const unicode_char *text, size_t length = 0, attotime rate = attotime::zero); | |
| 848 | void post_utf8(const char *text, size_t length = 0, attotime rate = attotime::zero); | |
| 849 | void post_coded(const char *text, size_t length = 0, attotime rate = attotime::zero); | |
| 850 | ||
| 851 | void frame_update(ioport_port &port, ioport_value &digital); | |
| 852 | const char *key_name(astring &string, unicode_char ch); | |
| 853 | ||
| 728 | 854 | private: |
| 729 | input_field_diplocation * m_next; /* pointer to the next bit */ | |
| 855 | // internal keyboard code information | |
| 856 | struct keycode_map_entry | |
| 857 | { | |
| 858 | unicode_char ch; | |
| 859 | ioport_field * field[UCHAR_SHIFT_END + 1 - UCHAR_SHIFT_BEGIN]; | |
| 860 | }; | |
| 861 | ||
| 862 | // internal helpers | |
| 863 | void build_codes(ioport_manager &manager); | |
| 864 | bool can_post_directly(unicode_char ch); | |
| 865 | bool can_post_alternate(unicode_char ch); | |
| 866 | attotime choose_delay(unicode_char ch); | |
| 867 | void internal_post(unicode_char ch); | |
| 868 | void timer(void *ptr, int param); | |
| 869 | const char *unicode_to_string(astring &buffer, unicode_char ch); | |
| 870 | const keycode_map_entry *find_code(unicode_char ch) const; | |
| 871 | ||
| 872 | // debugger helpers | |
| 873 | static void execute_input(running_machine &machine, int ref, int params, const char *param[]); | |
| 874 | static void execute_dumpkbd(running_machine &machine, int ref, int params, const char *param[]); | |
| 875 | ||
| 876 | // internal state | |
| 877 | running_machine & m_machine; // reference to our machine | |
| 878 | UINT32 m_bufbegin; // index of starting character | |
| 879 | UINT32 m_bufend; // index of ending character | |
| 880 | dynamic_array<unicode_char> m_buffer; // actual buffer | |
| 881 | bool m_status_keydown; // current keydown status | |
| 882 | bool m_last_cr; // was the last char a CR? | |
| 883 | emu_timer * m_timer; // timer for posting characters | |
| 884 | attotime m_current_rate; // current rate for posting | |
| 885 | ioport_queue_chars_delegate m_queue_chars; // queue characters callback | |
| 886 | ioport_accept_char_delegate m_accept_char; // accept character callback | |
| 887 | ioport_charqueue_empty_delegate m_charqueue_empty; // character queue empty callback | |
| 888 | dynamic_array<keycode_map_entry> m_keycode_map; // keycode map | |
| 730 | 889 | }; |
| 731 | 890 | |
| 732 | 891 | |
| 733 | /* a single bitfield within an input port */ | |
| 734 | class input_field_config | |
| 892 | // ======================> ioport_condition | |
| 893 | ||
| 894 | // encapsulates a condition on a port field or setting | |
| 895 | class ioport_condition | |
| 735 | 896 | { |
| 736 | DISABLE_COPYING(input_field_config); | |
| 737 | friend class simple_list<input_field_config>; | |
| 738 | ||
| 739 | 897 | public: |
| 740 | input_field_config(input_port_config &port, int type, input_port_value defvalue, input_port_value maskbits, const char *name = NULL); | |
| 898 | // condition types | |
| 899 | enum condition_t | |
| 900 | { | |
| 901 | ALWAYS = 0, | |
| 902 | EQUALS, | |
| 903 | NOTEQUALS, | |
| 904 | GREATERTHAN, | |
| 905 | NOTGREATERTHAN, | |
| 906 | LESSTHAN, | |
| 907 | NOTLESSTHAN | |
| 908 | }; | |
| 741 | 909 | |
| 742 | input_field_config *next() const { return m_next; } | |
| 743 | input_port_config &port() const { return m_port; } | |
| 744 | running_machine &machine() const; | |
| 745 | simple_list<input_setting_config> &settinglist() { return m_settinglist; } | |
| 746 | const simple_list<input_setting_config> &settinglist() const { return m_settinglist; } | |
| 747 | simple_list<input_field_diplocation> &diploclist() { return m_diploclist; } | |
| 748 | int modcount() const { return m_modcount; } | |
| 910 | // construction/destruction | |
| 911 | ioport_condition() { reset(); } | |
| 912 | ioport_condition(condition_t condition, const char *tag, ioport_value mask, ioport_value value) { set(condition, tag, mask, value); } | |
| 749 | 913 | |
| 750 | /* generally-applicable data */ | |
| 751 | input_port_value mask; /* mask of bits belonging to the field */ | |
| 752 | input_port_value defvalue; /* default value of these bits */ | |
| 753 | input_condition condition; /* condition under which this field is relevant */ | |
| 754 | UINT32 type; /* IPT_* type for this port */ | |
| 755 | UINT8 player; /* player number (0-based) */ | |
| 756 | UINT32 flags; /* combination of FIELD_FLAG_* and ANALOG_FLAG_* above */ | |
| 757 | UINT8 impulse; /* number of frames before reverting to defvalue */ | |
| 758 | const char * name; /* user-friendly name to display */ | |
| 759 | input_seq seq[SEQ_TYPE_TOTAL];/* sequences of all types */ | |
| 760 | input_field_read_delegate read; /* read callback routine */ | |
| 761 | void * read_param; /* parameter for read callback routine */ | |
| 762 | const char * read_device; /* parameter for read callback routine */ | |
| 763 | input_field_write_delegate write; /* write callback routine */ | |
| 764 | void * write_param; /* parameter for write callback routine */ | |
| 765 | const char * write_device; /* parameter for write callback routine */ | |
| 914 | // getters | |
| 915 | const char *tag() const { return m_tag; } | |
| 916 | ||
| 917 | // operators | |
| 918 | bool operator==(const ioport_condition &rhs) const { return (m_mask == rhs.m_mask && m_value == rhs.m_value && m_condition == rhs.m_condition && strcmp(m_tag, rhs.m_tag) == 0); } | |
| 919 | bool eval(device_t &device) const; | |
| 920 | bool none() const { return (m_condition == ALWAYS); } | |
| 766 | 921 | |
| 767 | /* data relevant to analog control types */ | |
| 768 | INT32 min; /* minimum value for absolute axes */ | |
| 769 | INT32 max; /* maximum value for absolute axes */ | |
| 770 | INT32 sensitivity; /* sensitivity (100=normal) */ | |
| 771 | INT32 delta; /* delta to apply each frame a digital inc/dec key is pressed */ | |
| 772 | INT32 centerdelta; /* delta to apply each frame no digital inputs are pressed */ | |
| 773 | UINT8 crossaxis; /* crosshair axis */ | |
| 774 | double crossscale; /* crosshair scale */ | |
| 775 | double crossoffset; /* crosshair offset */ | |
| 776 | double crossaltaxis; /* crosshair alternate axis value */ | |
| 777 | input_field_crossmap_delegate crossmapper; /* crosshair mapping function */ | |
| 778 | const char * crossmapper_device; /* parameter for write callback routine */ | |
| 779 | UINT16 full_turn_count;/* number of optical counts for 1 full turn of the original control */ | |
| 780 | const input_port_value * remap_table; /* pointer to an array that remaps the port value */ | |
| 922 | // configuration | |
| 923 | void reset() { set(ALWAYS, NULL, 0, 0); } | |
| 924 | void set(condition_t condition, const char *tag, ioport_value mask, ioport_value value) | |
| 925 | { | |
| 926 | m_condition = condition; | |
| 927 | m_tag = tag; | |
| 928 | m_mask = mask; | |
| 929 | m_value = value; | |
| 930 | } | |
| 781 | 931 | |
| 782 | /* data relevant to other specific types */ | |
| 783 | UINT8 way; /* digital joystick 2/4/8-way descriptions */ | |
| 784 | unicode_char chars[3]; /* (MESS-specific) unicode key data */ | |
| 932 | private: | |
| 933 | // internal state | |
| 934 | condition_t m_condition; // condition to use | |
| 935 | const char * m_tag; // tag of port whose condition is to be tested | |
| 936 | ioport_value m_mask; // mask to apply to the port | |
| 937 | ioport_value m_value; // value to compare against | |
| 938 | }; | |
| 785 | 939 | |
| 786 | /* this field is only valid if the device is live */ | |
| 787 | input_field_state * state; /* live state of field (NULL if not live) */ | |
| 788 | 940 | |
| 941 | // ======================> ioport_setting | |
| 942 | ||
| 943 | // a single setting for a configuration or DIP switch | |
| 944 | class ioport_setting | |
| 945 | { | |
| 946 | DISABLE_COPYING(ioport_setting); | |
| 947 | friend class simple_list<ioport_setting>; | |
| 948 | ||
| 949 | public: | |
| 950 | // construction/destruction | |
| 951 | ioport_setting(ioport_field &field, ioport_value value, const char *name); | |
| 952 | ||
| 953 | // getters | |
| 954 | ioport_setting *next() const { return m_next; } | |
| 955 | ioport_field &field() const { return m_field; } | |
| 956 | device_t &device() const; | |
| 957 | running_machine &machine() const; | |
| 958 | ioport_value value() const { return m_value; } | |
| 959 | ioport_condition &condition() { return m_condition; } | |
| 960 | const char *name() const { return m_name; } | |
| 961 | ||
| 962 | // helpers | |
| 963 | bool enabled() { return m_condition.eval(device()); } | |
| 964 | ||
| 789 | 965 | private: |
| 790 | input_field_config * m_next; /* pointer to next field in sequence */ | |
| 791 | input_port_config & m_port; /* pointer back to the port that owns us */ | |
| 792 | int m_modcount; | |
| 793 | simple_list<input_setting_config> m_settinglist; /* list of input_setting_configs */ | |
| 794 | simple_list<input_field_diplocation> m_diploclist; /* list of locations for various bits */ | |
| 966 | // internal state | |
| 967 | ioport_setting * m_next; // pointer to next setting in sequence | |
| 968 | ioport_field & m_field; // pointer back to the field that owns us | |
| 969 | ioport_value m_value; // value of the bits in this setting | |
| 970 | const char * m_name; // user-friendly name to display | |
| 971 | ioport_condition m_condition; // condition under which this setting is valid | |
| 795 | 972 | }; |
| 796 | 973 | |
| 797 | 974 | |
| 798 | /* user-controllable settings for a field */ | |
| 799 | typedef struct _input_field_user_settings input_field_user_settings; | |
| 800 | struct _input_field_user_settings | |
| 975 | // ======================> ioport_diplocation | |
| 976 | ||
| 977 | // a mapping from a bit to a physical DIP switch description | |
| 978 | class ioport_diplocation | |
| 801 | 979 | { |
| 802 | input_port_value value; /* for DIP switches */ | |
| 803 | input_seq seq[SEQ_TYPE_TOTAL];/* sequences of all types */ | |
| 804 | INT32 sensitivity; /* for analog controls */ | |
| 805 | INT32 delta; /* for analog controls */ | |
| 806 | INT32 centerdelta; /* for analog controls */ | |
| 807 | UINT8 reverse; /* for analog controls */ | |
| 808 | }; | |
| 980 | DISABLE_COPYING(ioport_diplocation); | |
| 981 | friend class simple_list<ioport_diplocation>; | |
| 809 | 982 | |
| 810 | /* device defined default input settings */ | |
| 811 | typedef struct _input_device_default input_device_default; | |
| 812 | struct _input_device_default | |
| 813 | { | |
| 814 | const char * tag; /* tag of port to update */ | |
| 815 | input_port_value mask; /* mask to apply to the port */ | |
| 816 | input_port_value defvalue; /* new default value */ | |
| 983 | public: | |
| 984 | // construction/destruction | |
| 985 | ioport_diplocation(const char *name, UINT8 swnum, bool invert); | |
| 986 | ||
| 987 | // getters | |
| 988 | ioport_diplocation *next() const { return m_next; } | |
| 989 | const char *name() const { return m_name; } | |
| 990 | UINT8 number() const { return m_number; } | |
| 991 | bool inverted() const { return m_invert; } | |
| 992 | ||
| 993 | private: | |
| 994 | ioport_diplocation * m_next; // pointer to the next bit | |
| 995 | astring m_name; // name of the physical DIP switch | |
| 996 | UINT8 m_number; // physical switch number | |
| 997 | bool m_invert; // is this an active-high DIP? | |
| 817 | 998 | }; |
| 818 | 999 | |
| 819 | /* a single input port configuration */ | |
| 820 | class input_port_config | |
| 1000 | ||
| 1001 | // ======================> ioport_field | |
| 1002 | ||
| 1003 | // a single bitfield within an input port | |
| 1004 | class ioport_field | |
| 821 | 1005 | { |
| 822 | DISABLE_COPYING(input_port_config); | |
| 823 | friend class simple_list<input_port_config>; | |
| 1006 | DISABLE_COPYING(ioport_field); | |
| 1007 | friend class simple_list<ioport_field>; | |
| 1008 | friend class ioport_configurer; | |
| 1009 | friend class dynamic_field; | |
| 824 | 1010 | |
| 1011 | // flags for ioport_fields | |
| 1012 | static const int FIELD_FLAG_UNUSED = 0x01; // set if this field is unused but relevant to other games on the same hw | |
| 1013 | static const int FIELD_FLAG_COCKTAIL = 0x02; // set if this field is relevant only for cocktail cabinets | |
| 1014 | static const int FIELD_FLAG_TOGGLE = 0x04; // set if this field should behave as a toggle | |
| 1015 | static const int FIELD_FLAG_ROTATED = 0x08; // set if this field represents a rotated control | |
| 1016 | static const int ANALOG_FLAG_REVERSE = 0x10; // analog only: reverse the sense of the axis | |
| 1017 | static const int ANALOG_FLAG_RESET = 0x20; // analog only: always preload in->default for relative axes, returning only deltas | |
| 1018 | static const int ANALOG_FLAG_WRAPS = 0x40; // analog only: positional count wraps around | |
| 1019 | static const int ANALOG_FLAG_INVERT = 0x80; // analog only: bitwise invert bits | |
| 1020 | ||
| 825 | 1021 | public: |
| 826 | 1022 | // construction/destruction |
| 827 | input_port_config(device_t &owner, const char *tag); | |
| 1023 | ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name = NULL); | |
| 1024 | ~ioport_field(); | |
| 828 | 1025 | |
| 829 | 1026 | // getters |
| 830 | input_port_config *next() const { return m_next; } | |
| 831 | device_t &owner() const { return m_owner; } | |
| 1027 | ioport_field *next() const { return m_next; } | |
| 1028 | ioport_port &port() const { return m_port; } | |
| 1029 | device_t &device() const; | |
| 1030 | ioport_manager &manager() const; | |
| 832 | 1031 | running_machine &machine() const; |
| 833 | input_field_config *first_field() const { return m_fieldlist.first(); } | |
| 834 | simple_list<input_field_config> &fieldlist() { return m_fieldlist; } | |
| 835 | const char *tag() const { return m_tag; } | |
| 836 | 1032 | int modcount() const { return m_modcount; } |
| 1033 | ioport_setting *first_setting() const { return m_settinglist.first(); } | |
| 1034 | ioport_diplocation *first_diplocation() const { return m_diploclist.first(); } | |
| 837 | 1035 | |
| 838 | void bump_modcount() { m_modcount++; } | |
| 1036 | ioport_value mask() const { return m_mask; } | |
| 1037 | ioport_value defvalue() const { return m_defvalue; } | |
| 1038 | ioport_condition &condition() { return m_condition; } | |
| 1039 | ioport_type type() const { return m_type; } | |
| 1040 | UINT8 player() const { return m_player + 1; } | |
| 839 | 1041 | |
| 840 | void collapse_fields(astring &errorbuf); | |
| 1042 | bool unused() const { return ((m_flags & FIELD_FLAG_UNUSED) != 0); } | |
| 1043 | bool cocktail() const { return ((m_flags & FIELD_FLAG_COCKTAIL) != 0); } | |
| 1044 | bool toggle() const { return ((m_flags & FIELD_FLAG_TOGGLE) != 0); } | |
| 1045 | bool rotated() const { return ((m_flags & FIELD_FLAG_ROTATED) != 0); } | |
| 1046 | bool analog_reverse() const { return ((m_flags & ANALOG_FLAG_REVERSE) != 0); } | |
| 1047 | bool analog_reset() const { return ((m_flags & ANALOG_FLAG_RESET) != 0); } | |
| 1048 | bool analog_wraps() const { return ((m_flags & ANALOG_FLAG_WRAPS) != 0); } | |
| 1049 | bool analog_invert() const { return ((m_flags & ANALOG_FLAG_INVERT) != 0); } | |
| 841 | 1050 | |
| 842 | /* these fields are only valid if the port is live */ | |
| 843 | input_port_state * state; /* live state of port (NULL if not live) */ | |
| 844 | input_port_value active; /* mask of active bits in the port */ | |
| 1051 | UINT8 impulse() const { return m_impulse; } | |
| 1052 | const char *name() const; | |
| 1053 | const char *specific_name() const { return m_name; } | |
| 1054 | const input_seq &seq(input_seq_type seqtype = SEQ_TYPE_STANDARD) const; | |
| 1055 | bool has_dynamic_read() const { return !m_read.isnull(); } | |
| 1056 | bool has_dynamic_write() const { return !m_write.isnull(); } | |
| 1057 | ||
| 1058 | ioport_value minval() const { return m_min; } | |
| 1059 | ioport_value maxval() const { return m_max; } | |
| 1060 | INT32 sensitivity() const { return m_sensitivity; } | |
| 1061 | INT32 delta() const { return m_delta; } | |
| 1062 | INT32 centerdelta() const { return m_centerdelta; } | |
| 1063 | crosshair_axis_t crosshair_axis() const { return m_crosshair_axis; } | |
| 1064 | double crosshair_scale() const { return m_crosshair_scale; } | |
| 1065 | double crosshair_offset() const { return m_crosshair_offset; } | |
| 1066 | UINT16 full_turn_count() const { return m_full_turn_count; } | |
| 1067 | const ioport_value *remap_table() const { return m_remap_table; } | |
| 1068 | ||
| 1069 | UINT8 way() const { return m_way; } | |
| 1070 | unicode_char keyboard_code(int which) const; | |
| 1071 | ioport_field_live &live() const { assert(m_live != NULL); return *m_live; } | |
| 1072 | ||
| 1073 | // setters | |
| 1074 | void set_crosshair_scale(double scale) { m_crosshair_scale = scale; } | |
| 1075 | void set_crosshair_offset(double offset) { m_crosshair_offset = offset; } | |
| 845 | 1076 | |
| 846 | private: | |
| 847 | input_port_config * m_next; /* pointer to next port */ | |
| 848 | device_t & m_owner; /* associated device, when appropriate */ | |
| 849 | simple_list<input_field_config> m_fieldlist; /* list of input_field_configs */ | |
| 850 | astring m_tag; /* pointer to this port's tag */ | |
| 851 | int m_modcount; | |
| 852 | }; | |
| 1077 | // derived getters | |
| 1078 | ioport_type_class type_class() const; | |
| 1079 | bool is_analog() const { return (m_type > IPT_ANALOG_FIRST && m_type < IPT_ANALOG_LAST); } | |
| 1080 | bool is_digital_joystick() const { return (m_type > IPT_DIGITAL_JOYSTICK_FIRST && m_type < IPT_DIGITAL_JOYSTICK_LAST); } | |
| 853 | 1081 | |
| 1082 | // additional operations | |
| 1083 | bool enabled() const { return m_condition.eval(device()); } | |
| 1084 | const char *setting_name() const; | |
| 1085 | bool has_previous_setting() const; | |
| 1086 | void select_previous_setting(); | |
| 1087 | bool has_next_setting() const; | |
| 1088 | void select_next_setting(); | |
| 1089 | void crosshair_position(float &x, float &y, bool &gotx, bool &goty); | |
| 1090 | void init_live_state(analog_field *analog); | |
| 1091 | void frame_update(ioport_value &result, bool mouse_down); | |
| 1092 | void reduce_mask(ioport_value bits_to_remove) { m_mask &= ~bits_to_remove; } | |
| 854 | 1093 | |
| 855 | /* describes a fundamental input type, including default input sequences */ | |
| 856 | class input_type_entry | |
| 857 | { | |
| 858 | friend class simple_list<input_type_entry>; | |
| 1094 | // user-controllable settings for a field | |
| 1095 | struct user_settings | |
| 1096 | { | |
| 1097 | ioport_value value; // for DIP switches | |
| 1098 | input_seq seq[SEQ_TYPE_TOTAL]; // sequences of all types | |
| 1099 | INT32 sensitivity; // for analog controls | |
| 1100 | INT32 delta; // for analog controls | |
| 1101 | INT32 centerdelta; // for analog controls | |
| 1102 | bool reverse; // for analog controls | |
| 1103 | }; | |
| 1104 | void get_user_settings(user_settings &settings); | |
| 1105 | void set_user_settings(const user_settings &settings); | |
| 859 | 1106 | |
| 860 | public: | |
| 861 | input_type_entry(UINT32 type, ioport_group group, int player, const char *token, const char *name, input_seq standard); | |
| 862 | input_type_entry(UINT32 type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment); | |
| 1107 | private: | |
| 1108 | void expand_diplocation(const char *location, astring &errorbuf); | |
| 863 | 1109 | |
| 864 | input_type_entry *next() const { return m_next; } | |
| 1110 | // internal state | |
| 1111 | ioport_field * m_next; // pointer to next field in sequence | |
| 1112 | ioport_port & m_port; // reference to the port that owns us | |
| 1113 | ioport_field_live * m_live; // live state of field (NULL if not live) | |
| 1114 | int m_modcount; // modification count | |
| 1115 | simple_list<ioport_setting> m_settinglist; // list of input_setting_configs | |
| 1116 | simple_list<ioport_diplocation> m_diploclist; // list of locations for various bits | |
| 865 | 1117 | |
| 866 | UINT32 type; /* IPT_* for this entry */ | |
| 867 | ioport_group group; /* which group the port belongs to */ | |
| 868 | UINT8 player; /* player number (0 is player 1) */ | |
| 869 | const char * token; /* token used to store settings */ | |
| 870 | const char * name; /* user-friendly name */ | |
| 871 | input_seq defseq[SEQ_TYPE_TOTAL];/* default input sequence */ | |
| 872 | input_seq seq[SEQ_TYPE_TOTAL];/* currently configured sequences */ | |
| 1118 | // generally-applicable data | |
| 1119 | ioport_value m_mask; // mask of bits belonging to the field | |
| 1120 | ioport_value m_defvalue; // default value of these bits | |
| 1121 | ioport_condition m_condition; // condition under which this field is relevant | |
| 1122 | ioport_type m_type; // IPT_* type for this port | |
| 1123 | UINT8 m_player; // player number (0-based) | |
| 1124 | UINT32 m_flags; // combination of FIELD_FLAG_* and ANALOG_FLAG_* above | |
| 1125 | UINT8 m_impulse; // number of frames before reverting to defvalue | |
| 1126 | const char * m_name; // user-friendly name to display | |
| 1127 | input_seq m_seq[SEQ_TYPE_TOTAL];// sequences of all types | |
| 1128 | ioport_field_read_delegate m_read; // read callback routine | |
| 1129 | void * m_read_param; // parameter for read callback routine | |
| 1130 | ioport_field_write_delegate m_write; // write callback routine | |
| 1131 | void * m_write_param; // parameter for write callback routine | |
| 873 | 1132 | |
| 874 | private: | |
| 875 | input_type_entry * m_next; /* next description in the list */ | |
| 1133 | // data relevant to analog control types | |
| 1134 | ioport_value m_min; // minimum value for absolute axes | |
| 1135 | ioport_value m_max; // maximum value for absolute axes | |
| 1136 | INT32 m_sensitivity; // sensitivity (100=normal) | |
| 1137 | INT32 m_delta; // delta to apply each frame a digital inc/dec key is pressed | |
| 1138 | INT32 m_centerdelta; // delta to apply each frame no digital inputs are pressed | |
| 1139 | crosshair_axis_t m_crosshair_axis; // crosshair axis | |
| 1140 | double m_crosshair_scale; // crosshair scale | |
| 1141 | double m_crosshair_offset; // crosshair offset | |
| 1142 | double m_crosshair_altaxis;// crosshair alternate axis value | |
| 1143 | ioport_field_crossmap_delegate m_crosshair_mapper; // crosshair mapping function | |
| 1144 | UINT16 m_full_turn_count; // number of optical counts for 1 full turn of the original control | |
| 1145 | const ioport_value * m_remap_table; // pointer to an array that remaps the port value | |
| 1146 | ||
| 1147 | // data relevant to other specific types | |
| 1148 | UINT8 m_way; // digital joystick 2/4/8-way descriptions | |
| 1149 | unicode_char m_chars[4]; // unicode key data | |
| 876 | 1150 | }; |
| 877 | 1151 | |
| 878 | 1152 | |
| 879 | /* header at the front of INP files */ | |
| 880 | typedef struct _inp_header inp_header; | |
| 881 | struct _inp_header | |
| 1153 | // ======================> ioport_list | |
| 1154 | ||
| 1155 | // class that holds a list of I/O ports | |
| 1156 | class ioport_list : public tagged_list<ioport_port> | |
| 882 | 1157 | { |
| 883 | char header[8]; /* +00: 8 byte header - must be "MAMEINP\0" */ | |
| 884 | UINT64 basetime; /* +08: base time of recording */ | |
| 885 | UINT8 majversion; /* +10: major INP version */ | |
| 886 | UINT8 minversion; /* +11: minor INP version */ | |
| 887 | UINT8 reserved[2]; /* +12: must be zero */ | |
| 888 | char gamename[12]; /* +14: game name string, NULL-terminated */ | |
| 889 | char version[32]; /* +20: system version string, NULL-terminated */ | |
| 890 | }; | |
| 1158 | DISABLE_COPYING(ioport_list); | |
| 891 | 1159 | |
| 1160 | public: | |
| 1161 | // construction/destruction | |
| 1162 | ioport_list(resource_pool &pool = global_resource_pool()) | |
| 1163 | : tagged_list<ioport_port>(pool) { } | |
| 892 | 1164 | |
| 893 | struct digital_joystick_state | |
| 894 | { | |
| 895 | const input_field_config * field[4]; /* input field for up, down, left, right respectively */ | |
| 896 | UINT8 inuse; /* is this joystick used? */ | |
| 897 | UINT8 current; /* current value */ | |
| 898 | UINT8 current4way; /* current 4-way value */ | |
| 899 | UINT8 previous; /* previous value */ | |
| 1165 | using tagged_list<ioport_port>::append; | |
| 1166 | void append(device_t &device, astring &errorbuf); | |
| 900 | 1167 | }; |
| 901 | 1168 | |
| 902 | #define DIGITAL_JOYSTICKS_PER_PLAYER 3 | |
| 903 | 1169 | |
| 904 | #define NUM_SIMUL_KEYS (UCHAR_SHIFT_END - UCHAR_SHIFT_BEGIN + 1) | |
| 905 | struct inputx_code | |
| 1170 | // ======================> ioport_port | |
| 1171 | ||
| 1172 | // a single input port configuration | |
| 1173 | class ioport_port | |
| 906 | 1174 | { |
| 907 | unicode_char ch; | |
| 908 | const input_field_config * field[NUM_SIMUL_KEYS]; | |
| 909 | }; | |
| 1175 | DISABLE_COPYING(ioport_port); | |
| 1176 | friend class simple_list<ioport_port>; | |
| 1177 | friend class ioport_configurer; | |
| 910 | 1178 | |
| 911 | struct key_buffer | |
| 912 | { | |
| 913 | int begin_pos; | |
| 914 | int end_pos; | |
| 915 | unsigned int status_keydown : 1; | |
| 916 | int size; | |
| 917 | unicode_char *buffer; | |
| 1179 | public: | |
| 1180 | // construction/destruction | |
| 1181 | ioport_port(device_t &owner, const char *tag); | |
| 1182 | ~ioport_port(); | |
| 1183 | ||
| 1184 | // getters | |
| 1185 | ioport_port *next() const { return m_next; } | |
| 1186 | ioport_manager &manager() const; | |
| 1187 | device_t &device() const { return m_device; } | |
| 1188 | running_machine &machine() const; | |
| 1189 | ioport_field *first_field() const { return m_fieldlist.first(); } | |
| 1190 | const char *tag() const { return m_tag; } | |
| 1191 | int modcount() const { return m_modcount; } | |
| 1192 | ioport_value active() const { return m_active; } | |
| 1193 | ioport_value active_safe(ioport_value defval) const { return (this == NULL) ? defval : active(); } | |
| 1194 | ioport_port_live &live() const { assert(m_live != NULL); return *m_live; } | |
| 1195 | ||
| 1196 | // read/write to the port | |
| 1197 | ioport_value read(); | |
| 1198 | ioport_value read_safe(ioport_value defval) { return (this == NULL) ? defval : read(); } | |
| 1199 | void write(ioport_value value, ioport_value mask = ~0); | |
| 1200 | void write_safe(ioport_value value, ioport_value mask = ~0) { if (this != NULL) write(value, mask); } | |
| 1201 | ||
| 1202 | // other operations | |
| 1203 | ioport_field *field(ioport_value mask); | |
| 1204 | void collapse_fields(astring &errorbuf); | |
| 1205 | void frame_update(ioport_field *mouse_field); | |
| 1206 | void init_live_state(); | |
| 1207 | ||
| 1208 | private: | |
| 1209 | void insert_field(ioport_field &newfield, ioport_value &disallowedbits, astring &errorbuf); | |
| 1210 | ||
| 1211 | // internal state | |
| 1212 | ioport_port * m_next; // pointer to next port | |
| 1213 | device_t & m_device; // associated device | |
| 1214 | simple_list<ioport_field> m_fieldlist; // list of ioport_fields | |
| 1215 | astring m_tag; // copy of this port's tag | |
| 1216 | int m_modcount; // modification count | |
| 1217 | ioport_value m_active; // mask of active bits in the port | |
| 1218 | ioport_port_live * m_live; // live state of port (NULL if not live) | |
| 918 | 1219 | }; |
| 919 | 1220 | |
| 920 | /* private input port state */ | |
| 1221 | ||
| 1222 | // ======================> ioport_manager | |
| 1223 | ||
| 1224 | // private input port state | |
| 921 | 1225 | class ioport_manager |
| 922 | 1226 | { |
| 1227 | DISABLE_COPYING(ioport_manager); | |
| 923 | 1228 | friend class device_t; |
| 1229 | friend class ioport_configurer; | |
| 924 | 1230 | |
| 925 | 1231 | public: |
| 926 | 1232 | // construction/destruction |
| r15082 | r15083 | |
| 929 | 1235 | |
| 930 | 1236 | // getters |
| 931 | 1237 | running_machine &machine() const { return m_machine; } |
| 932 | input_port_config *first_port() const { return m_portlist.first(); } | |
| 1238 | ioport_port *first_port() const { return m_portlist.first(); } | |
| 1239 | bool safe_to_read() const { return m_safe_to_read; } | |
| 1240 | natural_keyboard &natkeyboard() { return m_natkeyboard; } | |
| 933 | 1241 | |
| 934 | /* global state */ | |
| 935 | UINT8 safe_to_read; /* clear at start; set after state is loaded */ | |
| 1242 | // type helpers | |
| 1243 | input_type_entry *first_type() const { return m_typelist.first(); } | |
| 1244 | bool type_pressed(ioport_type type, int player = 0); | |
| 1245 | const char *type_name(ioport_type type, UINT8 player); | |
| 1246 | ioport_group type_group(ioport_type type, int player); | |
| 1247 | const input_seq &type_seq(ioport_type type, int player = 0, input_seq_type seqtype = SEQ_TYPE_STANDARD); | |
| 1248 | void set_type_seq(ioport_type type, int player, input_seq_type seqtype, const input_seq &newseq); | |
| 1249 | static bool type_is_analog(ioport_type type) { return (type > IPT_ANALOG_FIRST && type < IPT_ANALOG_LAST); } | |
| 1250 | bool type_class_present(ioport_type_class inputclass); | |
| 936 | 1251 | |
| 937 | /* types */ | |
| 938 | simple_list<input_type_entry> typelist; /* list of live type states */ | |
| 939 | input_type_entry * type_to_entry[__ipt_max][MAX_PLAYERS]; /* map from type/player to type state */ | |
| 1252 | // other helpers | |
| 1253 | digital_joystick &digjoystick(int player, int joysticknum); | |
| 1254 | int count_players() const; | |
| 1255 | bool crosshair_position(int player, float &x, float &y); | |
| 1256 | bool has_keyboard() const; | |
| 1257 | void setup_natural_keyboard(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty); | |
| 1258 | ioport_value frame_interpolate(ioport_value oldval, ioport_value newval); | |
| 1259 | ioport_type token_to_input_type(const char *string, int &player) const; | |
| 1260 | const char *input_type_to_token(astring &string, ioport_type type, int player); | |
| 1261 | void frame_update(); | |
| 940 | 1262 | |
| 941 | /* specific special global input states */ | |
| 942 | digital_joystick_state joystick_info[MAX_PLAYERS][DIGITAL_JOYSTICKS_PER_PLAYER]; /* joystick states */ | |
| 1263 | private: | |
| 1264 | // internal helpers | |
| 1265 | void init_port_types(); | |
| 1266 | void init_autoselect_devices(int type1, int type2, int type3, const char *option, const char *ananame); | |
| 943 | 1267 | |
| 944 | /* frame time tracking */ | |
| 945 | attotime last_frame_time; /* time of the last frame callback */ | |
| 946 | attoseconds_t last_delta_nsec; /* nanoseconds that passed since the previous callback */ | |
| 1268 | ioport_port *port(const char *tag) const { return m_portlist.find(tag); } | |
| 1269 | void exit(); | |
| 1270 | input_seq_type token_to_seq_type(const char *string); | |
| 1271 | void update_defaults(); | |
| 947 | 1272 | |
| 948 | /* playback/record information */ | |
| 949 | emu_file * record_file; /* recording file (NULL if not recording) */ | |
| 950 | emu_file * playback_file; /* playback file (NULL if not recording) */ | |
| 951 | UINT64 playback_accumulated_speed;/* accumulated speed during playback */ | |
| 952 | UINT32 playback_accumulated_frames;/* accumulated frames during playback */ | |
| 1273 | void load_config(int config_type, xml_data_node *parentnode); | |
| 1274 | void load_remap_table(xml_data_node *parentnode); | |
| 1275 | bool load_default_config(xml_data_node *portnode, int type, int player, const input_seq *newseq); | |
| 1276 | bool load_game_config(xml_data_node *portnode, int type, int player, const input_seq *newseq); | |
| 953 | 1277 | |
| 954 | /* inputx */ | |
| 955 | inputx_code *codes; | |
| 956 | key_buffer keybuffer; | |
| 957 | emu_timer *inputx_timer; | |
| 958 | int (*queue_chars)(running_machine &machine, const unicode_char *text, size_t text_len); | |
| 959 | int (*accept_char)(running_machine &machine, unicode_char ch); | |
| 960 | int (*charqueue_empty)(running_machine &machine); | |
| 961 | attotime current_rate; | |
| 1278 | void save_config(int config_type, xml_data_node *parentnode); | |
| 1279 | void save_sequence(xml_data_node *parentnode, input_seq_type type, ioport_type porttype, const input_seq &seq); | |
| 1280 | bool save_this_input_field_type(ioport_type type); | |
| 1281 | void save_default_inputs(xml_data_node *parentnode); | |
| 1282 | void save_game_inputs(xml_data_node *parentnode); | |
| 962 | 1283 | |
| 963 | private: | |
| 964 | input_port_config *port(const char *tag) const { return m_portlist.find(tag); } | |
| 1284 | template<typename _Type> _Type playback_read(_Type &result); | |
| 1285 | time_t playback_init(); | |
| 1286 | void playback_end(const char *message = NULL); | |
| 1287 | void playback_frame(attotime curtime); | |
| 1288 | void playback_port(ioport_port &port); | |
| 965 | 1289 | |
| 966 | // internals | |
| 967 | ioport_list m_portlist; // points to a list of input port configurations | |
| 1290 | template<typename _Type> void record_write(_Type value); | |
| 1291 | void record_init(); | |
| 1292 | void record_end(const char *message = NULL); | |
| 1293 | void record_frame(attotime curtime); | |
| 1294 | void record_port(ioport_port &port); | |
| 968 | 1295 | |
| 969 | 1296 | // internal state |
| 970 | running_machine & m_machine; | |
| 1297 | running_machine & m_machine; // reference to owning machine | |
| 1298 | bool m_safe_to_read; // clear at start; set after state is loaded | |
| 1299 | ioport_list m_portlist; // list of input port configurations | |
| 1300 | ||
| 1301 | // types | |
| 1302 | simple_list<input_type_entry> m_typelist; // list of live type states | |
| 1303 | input_type_entry * m_type_to_entry[IPT_COUNT][MAX_PLAYERS]; // map from type/player to type state | |
| 1304 | ||
| 1305 | // specific special global input states | |
| 1306 | simple_list<digital_joystick> m_joystick_list; // list of digital joysticks | |
| 1307 | natural_keyboard m_natkeyboard; // natural keyboard support | |
| 1308 | ||
| 1309 | // frame time tracking | |
| 1310 | attotime m_last_frame_time; // time of the last frame callback | |
| 1311 | attoseconds_t m_last_delta_nsec; // nanoseconds that passed since the previous callback | |
| 1312 | ||
| 1313 | // playback/record information | |
| 1314 | emu_file m_record_file; // recording file (NULL if not recording) | |
| 1315 | emu_file m_playback_file; // playback file (NULL if not recording) | |
| 1316 | UINT64 m_playback_accumulated_speed; // accumulated speed during playback | |
| 1317 | UINT32 m_playback_accumulated_frames; // accumulated frames during playback | |
| 971 | 1318 | }; |
| 972 | 1319 | |
| 973 | 1320 | |
| 974 | /*************************************************************************** | |
| 975 | MACROS | |
| 976 | ***************************************************************************/ | |
| 1321 | // ======================> ioport_configurer | |
| 977 | 1322 | |
| 978 | /* macro for a read callback function (PORT_CUSTOM) */ | |
| 979 | #define CUSTOM_INPUT(name) input_port_value name(device_t &device, const input_field_config &field, void *param) | |
| 980 | #define CUSTOM_INPUT_MEMBER(name) input_port_value name(const input_field_config &field, void *param) | |
| 981 | #define DECLARE_CUSTOM_INPUT_MEMBER(name) input_port_value name(const input_field_config &field, void *param) | |
| 1323 | // class to wrap helper functions | |
| 1324 | class ioport_configurer | |
| 1325 | { | |
| 1326 | public: | |
| 1327 | // construction/destruction | |
| 1328 | ioport_configurer(device_t &owner, ioport_list &portlist, astring &errorbuf); | |
| 982 | 1329 | |
| 983 | /* macro for port write callback functions (PORT_CHANGED) */ | |
| 984 | #define INPUT_CHANGED(name) void name(device_t &device, const input_field_config &field, void *param, input_port_value oldval, input_port_value newval) | |
| 985 | #define INPUT_CHANGED_MEMBER(name) void name(const input_field_config &field, void *param, input_port_value oldval, input_port_value newval) | |
| 986 | #define DECLARE_INPUT_CHANGED_MEMBER(name) void name(const input_field_config &field, void *param, input_port_value oldval, input_port_value newval) | |
| 1330 | // static helpers | |
| 1331 | static const char *string_from_token(const char *string); | |
| 987 | 1332 | |
| 988 | /* macro for port changed callback functions (PORT_CROSSHAIR_MAPPER) */ | |
| 989 | #define CROSSHAIR_MAPPER(name) float name(device_t &device, const input_field_config &field, float linear_value) | |
| 990 | #define CROSSHAIR_MAPPER_MEMBER(name) float name(const input_field_config &field, float linear_value) | |
| 991 | #define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(const input_field_config &field, float linear_value) | |
| 1333 | // port helpers | |
| 1334 | void port_alloc(const char *tag); | |
| 1335 | void port_modify(const char *tag); | |
| 992 | 1336 | |
| 993 | /* macro for wrapping a default string */ | |
| 994 | #define DEF_STR(str_num) ((const char *)INPUT_STRING_##str_num) | |
| 1337 | // field helpers | |
| 1338 | void field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name = NULL); | |
| 1339 | void field_add_char(unicode_char ch); | |
| 1340 | void field_add_code(input_seq_type which, input_code code); | |
| 1341 | void field_set_way(int way) const { m_curfield->m_way = way; } | |
| 1342 | void field_set_rotated() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_ROTATED; } | |
| 1343 | void field_set_name(const char *name) const { m_curfield->m_name = string_from_token(name); } | |
| 1344 | void field_set_player(int player) const { m_curfield->m_player = player - 1; } | |
| 1345 | void field_set_cocktail() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_COCKTAIL; field_set_player(2); } | |
| 1346 | void field_set_toggle() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_TOGGLE; } | |
| 1347 | void field_set_impulse(UINT8 impulse) const { m_curfield->m_impulse = impulse; } | |
| 1348 | void field_set_analog_reverse() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_REVERSE; } | |
| 1349 | void field_set_analog_reset() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_RESET; } | |
| 1350 | void field_set_unused() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_UNUSED; } | |
| 1351 | void field_set_min_max(ioport_value minval, ioport_value maxval) const { m_curfield->m_min = minval; m_curfield->m_max = maxval; } | |
| 1352 | void field_set_sensitivity(INT32 sensitivity) const { m_curfield->m_sensitivity = sensitivity; } | |
| 1353 | void field_set_delta(INT32 delta) const { m_curfield->m_centerdelta = m_curfield->m_delta = delta; } | |
| 1354 | void field_set_centerdelta(INT32 delta) const { m_curfield->m_centerdelta = delta; } | |
| 1355 | void field_set_crosshair(crosshair_axis_t axis, double altaxis, double scale, double offset) const { m_curfield->m_crosshair_axis = axis; m_curfield->m_crosshair_altaxis = altaxis; m_curfield->m_crosshair_scale = scale; m_curfield->m_crosshair_offset = offset; } | |
| 1356 | void field_set_crossmapper(ioport_field_crossmap_delegate callback) const { m_curfield->m_crosshair_mapper = callback; } | |
| 1357 | void field_set_full_turn_count(UINT16 count) const { m_curfield->m_full_turn_count = count; } | |
| 1358 | void field_set_analog_wraps() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_WRAPS; } | |
| 1359 | void field_set_remap_table(const ioport_value *table) { m_curfield->m_remap_table = table; } | |
| 1360 | void field_set_analog_invert() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_INVERT; } | |
| 1361 | void field_set_dynamic_read(ioport_field_read_delegate delegate, void *param = NULL) const { m_curfield->m_read = delegate; m_curfield->m_read_param = param; } | |
| 1362 | void field_set_dynamic_write(ioport_field_write_delegate delegate, void *param = NULL) const { m_curfield->m_write = delegate; m_curfield->m_write_param = param; } | |
| 1363 | void field_set_diplocation(const char *location) const { m_curfield->expand_diplocation(location, m_errorbuf); } | |
| 995 | 1364 | |
| 1365 | // setting helpers | |
| 1366 | void setting_alloc(ioport_value value, const char *name); | |
| 996 | 1367 | |
| 997 | template<int (*_FunctionPointer)(device_t *)> | |
| 998 | input_port_value ioport_read_line_wrapper(device_t &device, const input_field_config &field, void *param) | |
| 999 | { | |
| 1000 | return (*_FunctionPointer)(&device); | |
| 1001 | } | |
| 1368 | // misc helpers | |
| 1369 | void set_condition(ioport_condition::condition_t condition, const char *tag, ioport_value mask, ioport_value value); | |
| 1370 | void onoff_alloc(const char *name, ioport_value defval, ioport_value mask, const char *diplocation); | |
| 1002 | 1371 | |
| 1003 | template<class _FunctionClass, int (_FunctionClass::*_FunctionPointer)()> | |
| 1004 | input_port_value ioport_read_line_wrapper(_FunctionClass &device, const input_field_config &field, void *param) | |
| 1005 | { | |
| 1006 | return (device.*_FunctionPointer)(); | |
| 1007 | } | |
| 1372 | private: | |
| 1373 | // internal state | |
| 1374 | device_t & m_owner; | |
| 1375 | ioport_list & m_portlist; | |
| 1376 | astring & m_errorbuf; | |
| 1377 | ||
| 1378 | ioport_port * m_curport; | |
| 1379 | ioport_field * m_curfield; | |
| 1380 | ioport_setting * m_cursetting; | |
| 1381 | }; | |
| 1008 | 1382 | |
| 1009 | template<void (*_FunctionPointer)(device_t *, int)> | |
| 1010 | void ioport_write_line_wrapper(device_t &device, const input_field_config &field, void *param, input_port_value oldval, input_port_value newval) | |
| 1011 | { | |
| 1012 | return (*_FunctionPointer)(&device, newval); | |
| 1013 | } | |
| 1014 | 1383 | |
| 1015 | template<class _FunctionClass, void (_FunctionClass::*_FunctionPointer)(int)> | |
| 1016 | void ioport_write_line_wrapper(_FunctionClass &device, const input_field_config &field, void *param, input_port_value oldval, input_port_value newval) | |
| 1017 | { | |
| 1018 | return (device.*_FunctionPointer)(newval); | |
| 1019 | } | |
| 1020 | 1384 | |
| 1385 | //************************************************************************** | |
| 1386 | // MACROS | |
| 1387 | //************************************************************************** | |
| 1021 | 1388 | |
| 1389 | #define UCHAR_MAMEKEY(code) (UCHAR_MAMEKEY_BEGIN + ITEM_ID_##code) | |
| 1022 | 1390 | |
| 1023 | /*************************************************************************** | |
| 1024 | MACROS FOR BUILDING INPUT PORTS | |
| 1025 | ***************************************************************************/ | |
| 1391 | // macro for a read callback function (PORT_CUSTOM) | |
| 1392 | #define CUSTOM_INPUT(name) ioport_value name(device_t &device, ioport_field &field, void *param) | |
| 1393 | #define CUSTOM_INPUT_MEMBER(name) ioport_value name(ioport_field &field, void *param) | |
| 1394 | #define DECLARE_CUSTOM_INPUT_MEMBER(name) ioport_value name(ioport_field &field, void *param) | |
| 1026 | 1395 | |
| 1027 | typedef void (*ioport_constructor)(device_t &owner, ioport_list &portlist, astring &errorbuf); | |
| 1396 | // macro for port write callback functions (PORT_CHANGED) | |
| 1397 | #define INPUT_CHANGED(name) void name(device_t &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) | |
| 1398 | #define INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, void *param, ioport_value oldval, ioport_value newval) | |
| 1399 | #define DECLARE_INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, void *param, ioport_value oldval, ioport_value newval) | |
| 1028 | 1400 | |
| 1029 | /* so that "0" can be used for unneeded input ports */ | |
| 1401 | // macro for port changed callback functions (PORT_CROSSHAIR_MAPPER) | |
| 1402 | #define CROSSHAIR_MAPPER(name) float name(device_t &device, ioport_field &field, float linear_value) | |
| 1403 | #define CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value) | |
| 1404 | #define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value) | |
| 1405 | ||
| 1406 | // macro for wrapping a default string | |
| 1407 | #define DEF_STR(str_num) ((const char *)INPUT_STRING_##str_num) | |
| 1408 | ||
| 1409 | ||
| 1410 | ||
| 1411 | //************************************************************************** | |
| 1412 | // MACROS FOR BUILDING INPUT PORTS | |
| 1413 | //************************************************************************** | |
| 1414 | ||
| 1415 | // so that "0" can be used for unneeded input ports | |
| 1030 | 1416 | #define construct_ioport_0 NULL |
| 1031 | 1417 | |
| 1032 | / | |
| 1418 | // name of table | |
| 1033 | 1419 | #define INPUT_PORTS_NAME(_name) construct_ioport_##_name |
| 1034 | 1420 | |
| 1035 | / | |
| 1421 | // start of table | |
| 1036 | 1422 | #define INPUT_PORTS_START(_name) \ |
| 1037 | 1423 | ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, astring &errorbuf) \ |
| 1038 | 1424 | { \ |
| 1039 | astring fulltag; \ | |
| 1040 | input_setting_config *cursetting = NULL; \ | |
| 1041 | input_field_config *curfield = NULL; \ | |
| 1042 | input_port_config *curport = NULL; \ | |
| 1043 | input_port_value maskbits = 0; \ | |
| 1044 | (void)cursetting; (void)curfield; (void)curport; (void)maskbits; \ | |
| 1425 | ioport_configurer configurer(owner, portlist, errorbuf); \ | |
| 1045 | 1426 | |
| 1046 | / | |
| 1427 | // end of table | |
| 1047 | 1428 | #define INPUT_PORTS_END \ |
| 1048 | 1429 | } |
| 1049 | 1430 | |
| 1050 | / | |
| 1431 | // aliasing | |
| 1051 | 1432 | #define INPUT_PORTS_EXTERN(_name) \ |
| 1052 | 1433 | extern void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, astring &errorbuf) |
| 1053 | 1434 | |
| 1054 | / | |
| 1435 | // including | |
| 1055 | 1436 | #define PORT_INCLUDE(_name) \ |
| 1056 | 1437 | INPUT_PORTS_NAME(_name)(owner, portlist, errorbuf); \ |
| 1057 | 1438 | |
| 1058 | / | |
| 1439 | // start of a new input port (with included tag) | |
| 1059 | 1440 | #define PORT_START(_tag) \ |
| 1060 | curport = ioconfig_alloc_port(portlist, owner, _tag); \ | |
| 1061 | curfield = NULL; \ | |
| 1062 | cursetting = NULL; \ | |
| 1063 | maskbits = 0; \ | |
| 1441 | configurer.port_alloc(_tag); \ | |
| 1064 | 1442 | |
| 1065 | / | |
| 1443 | // modify an existing port | |
| 1066 | 1444 | #define PORT_MODIFY(_tag) \ |
| 1067 | curport = ioconfig_modify_port(portlist, owner, _tag); \ | |
| 1068 | curfield = NULL; \ | |
| 1069 | cursetting = NULL; \ | |
| 1070 | maskbits = 0; \ | |
| 1445 | configurer.port_modify(_tag); \ | |
| 1071 | 1446 | |
| 1072 | / | |
| 1447 | // input bit definition | |
| 1073 | 1448 | #define PORT_BIT(_mask, _default, _type) \ |
| 1074 | curfield = ioconfig_alloc_field(*curport, (_type), (_default), (_mask)); \ | |
| 1075 | cursetting = NULL; | |
| 1449 | configurer.field_alloc((_type), (_default), (_mask)); \ | |
| 1076 | 1450 | |
| 1077 | #define PORT_SPECIAL_ONOFF(_mask, _default, _strindex) PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, NULL) | |
| 1451 | #define PORT_SPECIAL_ONOFF(_mask, _default, _strindex) \ | |
| 1452 | PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, NULL) | |
| 1078 | 1453 | |
| 1079 | 1454 | #define PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, _strindex, _diploc) \ |
| 1080 | curfield = ioconfig_alloc_onoff(*curport, DEF_STR(_strindex), _default, _mask, _diploc, errorbuf); \ | |
| 1081 | cursetting = NULL; | |
| 1455 | configurer.onoff_alloc(DEF_STR(_strindex), _default, _mask, _diploc); \ | |
| 1082 | 1456 | |
| 1083 | / | |
| 1457 | // append a code | |
| 1084 | 1458 | #define PORT_CODE(_code) \ |
| 1085 | | |
| 1459 | | |
| 1086 | 1460 | |
| 1087 | 1461 | #define PORT_CODE_DEC(_code) \ |
| 1088 | | |
| 1462 | | |
| 1089 | 1463 | |
| 1090 | 1464 | #define PORT_CODE_INC(_code) \ |
| 1091 | | |
| 1465 | | |
| 1092 | 1466 | |
| 1093 | / | |
| 1467 | // joystick flags | |
| 1094 | 1468 | #define PORT_2WAY \ |
| 1095 | curfield | |
| 1469 | configurer.field_set_way( | |
| 1096 | 1470 | |
| 1097 | 1471 | #define PORT_4WAY \ |
| 1098 | curfield | |
| 1472 | configurer.field_set_way( | |
| 1099 | 1473 | |
| 1100 | 1474 | #define PORT_8WAY \ |
| 1101 | curfield | |
| 1475 | configurer.field_set_way( | |
| 1102 | 1476 | |
| 1103 | 1477 | #define PORT_16WAY \ |
| 1104 | curfield | |
| 1478 | configurer.field_set_way( | |
| 1105 | 1479 | |
| 1106 | 1480 | #define PORT_ROTATED \ |
| 1107 | curfield | |
| 1481 | configurer.field_ | |
| 1108 | 1482 | |
| 1109 | / | |
| 1483 | // general flags | |
| 1110 | 1484 | #define PORT_NAME(_name) \ |
| 1111 | curfield | |
| 1485 | configurer.field | |
| 1112 | 1486 | |
| 1113 | 1487 | #define PORT_PLAYER(_player) \ |
| 1114 | curfield | |
| 1488 | configurer.field_set_player | |
| 1115 | 1489 | |
| 1116 | 1490 | #define PORT_COCKTAIL \ |
| 1117 | curfield->flags |= FIELD_FLAG_COCKTAIL; \ | |
| 1118 | curfield->player = 1; | |
| 1491 | configurer.field_set_cocktail(); | |
| 1119 | 1492 | |
| 1120 | 1493 | #define PORT_TOGGLE \ |
| 1121 | curfield | |
| 1494 | configurer.field_ | |
| 1122 | 1495 | |
| 1123 | 1496 | #define PORT_IMPULSE(_duration) \ |
| 1124 | curfield | |
| 1497 | configurer.field_set_impulse( | |
| 1125 | 1498 | |
| 1126 | 1499 | #define PORT_REVERSE \ |
| 1127 | curfield | |
| 1500 | configurer.field_set_analog | |
| 1128 | 1501 | |
| 1129 | 1502 | #define PORT_RESET \ |
| 1130 | curfield | |
| 1503 | configurer.field_set_analog | |
| 1131 | 1504 | |
| 1132 | 1505 | #define PORT_UNUSED \ |
| 1133 | curfield | |
| 1506 | configurer.field_ | |
| 1134 | 1507 | |
| 1135 | /* analog settings */ | |
| 1136 | /* if this macro is not used, the minimum defaluts to 0 and maximum defaults to the mask value */ | |
| 1508 | // analog settings | |
| 1509 | // if this macro is not used, the minimum defaluts to 0 and maximum defaults to the mask value | |
| 1137 | 1510 | #define PORT_MINMAX(_min, _max) \ |
| 1138 | curfield->min = _min; \ | |
| 1139 | curfield->max = _max; | |
| 1511 | configurer.field_set_min_max(_min, _max); | |
| 1140 | 1512 | |
| 1141 | 1513 | #define PORT_SENSITIVITY(_sensitivity) \ |
| 1142 | curfield | |
| 1514 | configurer.field_ | |
| 1143 | 1515 | |
| 1144 | 1516 | #define PORT_KEYDELTA(_delta) \ |
| 1145 | c | |
| 1517 | config | |
| 1146 | 1518 | |
| 1147 | / | |
| 1519 | // note that PORT_CENTERDELTA must appear after PORT_KEYDELTA | |
| 1148 | 1520 | #define PORT_CENTERDELTA(_delta) \ |
| 1149 | curfield | |
| 1521 | configurer.field_set_centerdelta( | |
| 1150 | 1522 | |
| 1151 | 1523 | #define PORT_CROSSHAIR(axis, scale, offset, altaxis) \ |
| 1152 | curfield->crossaxis = CROSSHAIR_AXIS_##axis; \ | |
| 1153 | curfield->crossaltaxis = altaxis; \ | |
| 1154 | curfield->crossscale = scale; \ | |
| 1155 | curfield->crossoffset = offset; | |
| 1524 | configurer.field_set_crosshair(CROSSHAIR_AXIS_##axis, altaxis, scale, offset); | |
| 1156 | 1525 | |
| 1157 | 1526 | #define PORT_CROSSHAIR_MAPPER(_callback) \ |
| 1158 | curfield->crossmapper = input_field_crossmap_delegate(_callback, #_callback, (device_t *)NULL); \ | |
| 1159 | curfield->crossmapper_device = DEVICE_SELF; | |
| 1527 | configurer.field_set_crossmapper(ioport_field_crossmap_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)NULL)); | |
| 1160 | 1528 | |
| 1161 | 1529 | #define PORT_CROSSHAIR_MAPPER_MEMBER(_device, _class, _member) \ |
| 1162 | curfield->crossmapper = input_field_crossmap_delegate(&_class::_member, #_class "::" #_member, (_class *)NULL); \ | |
| 1163 | curfield->crossmapper_device = _device; | |
| 1530 | configurer.field_set_crossmapper(ioport_field_crossmap_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL)); | |
| 1164 | 1531 | |
| 1165 | / | |
| 1532 | // how many optical counts for 1 full turn of the control | |
| 1166 | 1533 | #define PORT_FULL_TURN_COUNT(_count) \ |
| 1167 | curfield | |
| 1534 | configurer.field_set_full_turn_count( | |
| 1168 | 1535 | |
| 1169 | /* positional controls can be binary or 1 of X */ | |
| 1170 | /* 1 of X not completed yet */ | |
| 1171 | /* if it is specified as PORT_REMAP_TABLE then it is binary, but remapped */ | |
| 1172 | /* otherwise it is binary */ | |
| 1536 | // positional controls can be binary or 1 of X | |
| 1537 | // 1 of X not completed yet | |
| 1538 | // if it is specified as PORT_REMAP_TABLE then it is binary, but remapped | |
| 1539 | // otherwise it is binary | |
| 1173 | 1540 | #define PORT_POSITIONS(_positions) \ |
| 1174 | curfield | |
| 1541 | configurer.field_set_min_max(0, | |
| 1175 | 1542 | |
| 1176 | / | |
| 1543 | // positional control wraps at min/max | |
| 1177 | 1544 | #define PORT_WRAPS \ |
| 1178 | curfield | |
| 1545 | configurer.field_set_analog | |
| 1179 | 1546 | |
| 1180 | / | |
| 1547 | // positional control uses this remap table | |
| 1181 | 1548 | #define PORT_REMAP_TABLE(_table) \ |
| 1182 | curfield | |
| 1549 | configurer.field_set_remap_table( | |
| 1183 | 1550 | |
| 1184 | / | |
| 1551 | // positional control bits are active low | |
| 1185 | 1552 | #define PORT_INVERT \ |
| 1186 | curfield | |
| 1553 | configurer.field_set_analog | |
| 1187 | 1554 | |
| 1188 | / | |
| 1555 | // read callbacks | |
| 1189 | 1556 | #define PORT_CUSTOM(_callback, _param) \ |
| 1190 | curfield->read = input_field_read_delegate(_callback, #_callback, (device_t *)NULL); \ | |
| 1191 | curfield->read_param = (void *)(_param); \ | |
| 1192 | curfield->read_device = DEVICE_SELF; | |
| 1557 | configurer.field_set_dynamic_read(ioport_field_read_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)NULL), (void *)(_param)); | |
| 1193 | 1558 | |
| 1194 | 1559 | #define PORT_CUSTOM_MEMBER(_device, _class, _member, _param) \ |
| 1195 | curfield->read = input_field_read_delegate(&_class::_member, #_class "::" #_member, (_class *)NULL); \ | |
| 1196 | curfield->read_param = (void *)(_param); \ | |
| 1197 | curfield->read_device = (_device); | |
| 1560 | configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param)); | |
| 1198 | 1561 | |
| 1199 | / | |
| 1562 | // write callbacks | |
| 1200 | 1563 | #define PORT_CHANGED(_callback, _param) \ |
| 1201 | curfield->write = input_field_write_delegate(_callback, #_callback, (device_t *)NULL); \ | |
| 1202 | curfield->write_param = (void *)(_param); \ | |
| 1203 | curfield->write_device = DEVICE_SELF; | |
| 1564 | configurer.field_set_dynamic_write(ioport_field_write_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)NULL), (void *)(_param)); | |
| 1204 | 1565 | |
| 1205 | 1566 | #define PORT_CHANGED_MEMBER(_device, _class, _member, _param) \ |
| 1206 | curfield->write = input_field_write_delegate(&_class::_member, #_class "::" #_member, (_class *)NULL); \ | |
| 1207 | curfield->write_param = (void *)(_param); \ | |
| 1208 | curfield->write_device = (_device); | |
| 1567 | configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param)); | |
| 1209 | 1568 | |
| 1210 | / | |
| 1569 | // input device handler | |
| 1211 | 1570 | #define PORT_READ_LINE_DEVICE(_device, _read_line_device) \ |
| 1212 | curfield->read = input_field_read_delegate(&ioport_read_line_wrapper<_read_line_device>, #_read_line_device, (device_t *)NULL); \ | |
| 1213 | curfield->read_param = NULL; \ | |
| 1214 | curfield->read_device = _device; | |
| 1571 | configurer.field_set_dynamic_read(ioport_field_read_delegate(&ioport_read_line_wrapper<_read_line_device>, #_read_line_device, _device, (device_t *)NULL)); | |
| 1215 | 1572 | |
| 1216 | 1573 | #define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \ |
| 1217 | curfield->read = input_field_read_delegate(&ioport_read_line_wrapper<_class, &_class::_member>, #_class "::" #_member, (_class *)NULL); \ | |
| 1218 | curfield->read_param = NULL; \ | |
| 1219 | curfield->read_device = _device; | |
| 1574 | configurer.field_set_dynamic_read(ioport_field_read_delegate(&ioport_read_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); | |
| 1220 | 1575 | |
| 1221 | / | |
| 1576 | // output device handler | |
| 1222 | 1577 | #define PORT_WRITE_LINE_DEVICE(_device, _write_line_device) \ |
| 1223 | curfield->write = input_field_write_delegate(&ioport_write_line_wrapper<_write_line_device>, #_write_line_device, (device_t *)NULL); \ | |
| 1224 | curfield->write_param = NULL; \ | |
| 1225 | curfield->write_device = _device; | |
| 1578 | configurer.field_set_dynamic_write(ioport_field_write_delegate(&ioport_write_line_wrapper<_write_line_device>, #_write_line_device, _device, (device_t *)NULL)); | |
| 1226 | 1579 | |
| 1227 | 1580 | #define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \ |
| 1228 | curfield->write = input_field_write_delegate(&ioport_write_line_wrapper<_class, &_class::_member>, #_class "::" #_member, (_class *)NULL); \ | |
| 1229 | curfield->write_param = NULL; \ | |
| 1230 | curfield->write_device = _device; | |
| 1581 | configurer.field_set_dynamic_write(ioport_field_write_delegate(&ioport_write_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); | |
| 1231 | 1582 | |
| 1232 | / | |
| 1583 | // dip switch definition | |
| 1233 | 1584 | #define PORT_DIPNAME(_mask, _default, _name) \ |
| 1234 | curfield = ioconfig_alloc_field(*curport, IPT_DIPSWITCH, (_default), (_mask), (_name)); \ | |
| 1235 | cursetting = NULL; | |
| 1585 | configurer.field_alloc(IPT_DIPSWITCH, (_default), (_mask), (_name)); \ | |
| 1236 | 1586 | |
| 1237 | 1587 | #define PORT_DIPSETTING(_default, _name) \ |
| 1238 | cursetting | |
| 1588 | configurer.setting | |
| 1239 | 1589 | |
| 1240 | /* physical location, of the form: name:[!]sw,[name:][!]sw,... */ | |
| 1241 | /* note that these are specified LSB-first */ | |
| 1590 | // physical location, of the form: name:[!]sw,[name:][!]sw,... | |
| 1591 | // note that these are specified LSB-first | |
| 1242 | 1592 | #define PORT_DIPLOCATION(_location) \ |
| 1243 | | |
| 1593 | | |
| 1244 | 1594 | |
| 1245 | / | |
| 1595 | // conditionals for dip switch settings | |
| 1246 | 1596 | #define PORT_CONDITION(_tag, _mask, _condition, _value) \ |
| 1247 | { \ | |
| 1248 | input_condition &condition = (cursetting != NULL) ? cursetting->condition : curfield->condition; \ | |
| 1249 | condition.tag = (_tag); \ | |
| 1250 | condition.mask = (_mask); \ | |
| 1251 | condition.condition = (_condition); \ | |
| 1252 | condition.value = (_value); \ | |
| 1253 | } | |
| 1597 | configurer.set_condition(ioport_condition::_condition, _tag, _mask, _value); \ | |
| 1254 | 1598 | |
| 1255 | / | |
| 1599 | // analog adjuster definition | |
| 1256 | 1600 | #define PORT_ADJUSTER(_default, _name) \ |
| 1257 | curfield = ioconfig_alloc_field(*curport, IPT_ADJUSTER, (_default), 0xff, (_name)); \ | |
| 1258 | cursetting = NULL; \ | |
| 1601 | configurer.field_alloc(IPT_ADJUSTER, (_default), 0xff, (_name)); \ | |
| 1259 | 1602 | |
| 1260 | / | |
| 1603 | // config definition | |
| 1261 | 1604 | #define PORT_CONFNAME(_mask, _default, _name) \ |
| 1262 | curfield = ioconfig_alloc_field(*curport, IPT_CONFIG, (_default), (_mask), (_name)); \ | |
| 1263 | cursetting = NULL; \ | |
| 1605 | configurer.field_alloc(IPT_CONFIG, (_default), (_mask), (_name)); \ | |
| 1264 | 1606 | |
| 1265 | 1607 | #define PORT_CONFSETTING(_default, _name) \ |
| 1266 | cursetting | |
| 1608 | configurer.setting | |
| 1267 | 1609 | |
| 1268 | / | |
| 1610 | // keyboard chars | |
| 1269 | 1611 | #define PORT_CHAR(_ch) \ |
| 1270 | | |
| 1612 | | |
| 1271 | 1613 | |
| 1272 | 1614 | |
| 1273 | / | |
| 1615 | // name of table | |
| 1274 | 1616 | #define DEVICE_INPUT_DEFAULTS_NAME(_name) device_iptdef_##_name |
| 1275 | 1617 | |
| 1276 | 1618 | #define device_iptdef_0 NULL |
| 1277 | 1619 | #define device_iptdef___null NULL |
| 1278 | 1620 | |
| 1279 | / | |
| 1621 | // start of table | |
| 1280 | 1622 | #define DEVICE_INPUT_DEFAULTS_START(_name) \ |
| 1281 | 1623 | const input_device_default DEVICE_INPUT_DEFAULTS_NAME(_name)[] = { |
| 1282 | 1624 | |
| 1283 | / | |
| 1625 | // end of table | |
| 1284 | 1626 | #define DEVICE_INPUT_DEFAULTS(_tag,_mask,_defval) \ |
| 1285 | 1627 | { _tag ,_mask, _defval }, \ |
| 1286 | 1628 | |
| 1287 | / | |
| 1629 | // end of table | |
| 1288 | 1630 | #define DEVICE_INPUT_DEFAULTS_END \ |
| 1289 | 1631 | {NULL,0,0} }; |
| 1290 | 1632 | |
| 1291 | /*************************************************************************** | |
| 1292 | HELPER MACROS | |
| 1293 | ***************************************************************************/ | |
| 1294 | 1633 | |
| 1634 | ||
| 1635 | //************************************************************************** | |
| 1636 | // HELPER MACROS | |
| 1637 | //************************************************************************** | |
| 1638 | ||
| 1295 | 1639 | #define PORT_DIPUNUSED_DIPLOC(_mask, _default, _diploc) \ |
| 1296 | 1640 | PORT_SPECIAL_ONOFF_DIPLOC(_mask, _default, Unused, _diploc) |
| 1297 | 1641 | |
| r15082 | r15083 | |
| 1313 | 1657 | #define PORT_SERVICE_NO_TOGGLE(_mask, _default) \ |
| 1314 | 1658 | PORT_BIT( _mask, _mask & _default, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) |
| 1315 | 1659 | |
| 1660 | #define PORT_VBLANK(_screen) \ | |
| 1661 | PORT_READ_LINE_DEVICE_MEMBER(_screen, screen_device, vblank_port_read) | |
| 1316 | 1662 | |
| 1317 | 1663 | |
| 1318 | /*************************************************************************** | |
| 1319 | FUNCTION PROTOTYPES | |
| 1320 | ***************************************************************************/ | |
| 1321 | 1664 | |
| 1665 | //************************************************************************** | |
| 1666 | // INLINE TEMPLATES | |
| 1667 | //************************************************************************** | |
| 1322 | 1668 | |
| 1323 | /* ----- port configurations ----- */ | |
| 1669 | template<int (*_FunctionPointer)(device_t *)> | |
| 1670 | ioport_value ioport_read_line_wrapper(device_t &device, ioport_field &field, void *param) | |
| 1671 | { | |
| 1672 | return (*_FunctionPointer)(&device); | |
| 1673 | } | |
| 1324 | 1674 | |
| 1325 | /* initialize an input port list structure and allocate ports according to the given tokens */ | |
| 1326 | void input_port_list_init(device_t &device, ioport_list &portlist, astring &errorbuf); | |
| 1675 | template<class _FunctionClass, int (_FunctionClass::*_FunctionPointer)()> | |
| 1676 | ioport_value ioport_read_line_wrapper(_FunctionClass &device, ioport_field &field, void *param) | |
| 1677 | { | |
| 1678 | return (device.*_FunctionPointer)(); | |
| 1679 | } | |
| 1327 | 1680 | |
| 1328 | /* return the field that matches the given tag and mask */ | |
| 1329 | const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask); | |
| 1681 | template<void (*_FunctionPointer)(device_t *, int)> | |
| 1682 | void ioport_write_line_wrapper(device_t &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) | |
| 1683 | { | |
| 1684 | return (*_FunctionPointer)(&device, newval); | |
| 1685 | } | |
| 1330 | 1686 | |
| 1687 | template<class _FunctionClass, void (_FunctionClass::*_FunctionPointer)(int)> | |
| 1688 | void ioport_write_line_wrapper(_FunctionClass &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) | |
| 1689 | { | |
| 1690 | return (device.*_FunctionPointer)(newval); | |
| 1691 | } | |
| 1331 | 1692 | |
| 1332 | 1693 | |
| 1333 | /* ----- accessors for input types ----- */ | |
| 1334 | 1694 | |
| 1335 | /* return TRUE if the given type represents an analog control */ | |
| 1336 | int input_type_is_analog(int type); | |
| 1695 | //************************************************************************** | |
| 1696 | // INLINE FUNCITONS | |
| 1697 | //************************************************************************** | |
| 1337 | 1698 | |
| 1338 | /* return the name for the given type/player */ | |
| 1339 | const char *input_type_name(running_machine &machine, int type, int player); | |
| 1699 | inline ioport_manager &ioport_field::manager() const { return m_port.manager(); } | |
| 1700 | inline device_t &ioport_field::device() const { return m_port.device(); } | |
| 1701 | inline running_machine &ioport_field::machine() const { return m_port.machine(); } | |
| 1340 | 1702 | |
| 1341 | /* return the group for the given type/player */ | |
| 1342 | int input_type_group(running_machine &machine, int type, int player); | |
| 1703 | inline device_t &ioport_setting::device() const { return m_field.device(); } | |
| 1704 | inline running_machine &ioport_setting::machine() const { return m_field.machine(); } | |
| 1343 | 1705 | |
| 1344 | /* return the global input mapping sequence for the given type/player */ | |
| 1345 | const input_seq &input_type_seq(running_machine &machine, int type, int player, input_seq_type seqtype); | |
| 1346 | 1706 | |
| 1347 | /* change the global input sequence for the given type/player */ | |
| 1348 | void input_type_set_seq(running_machine &machine, int type, int player, input_seq_type seqtype, const input_seq *newseq); | |
| 1349 | ||
| 1350 | /* return TRUE if the sequence for the given input type/player is pressed */ | |
| 1351 | int input_type_pressed(running_machine &machine, int type, int player); | |
| 1352 | ||
| 1353 | /* return the list of default mappings */ | |
| 1354 | const simple_list<input_type_entry> &input_type_list(running_machine &machine); | |
| 1355 | ||
| 1356 | ||
| 1357 | ||
| 1358 | /* ----- accessors for input fields ----- */ | |
| 1359 | ||
| 1360 | /* return the expanded string name of the field */ | |
| 1361 | const char *input_field_name(const input_field_config *field); | |
| 1362 | ||
| 1363 | /* return the input sequence for the given input field */ | |
| 1364 | const input_seq &input_field_seq(const input_field_config *field, input_seq_type seqtype); | |
| 1365 | ||
| 1366 | /* return the current settings for the given input field */ | |
| 1367 | void input_field_get_user_settings(const input_field_config *field, input_field_user_settings *settings); | |
| 1368 | ||
| 1369 | /* modify the current settings for the given input field */ | |
| 1370 | void input_field_set_user_settings(const input_field_config *field, const input_field_user_settings *settings); | |
| 1371 | ||
| 1372 | /* return the expanded setting name for a field */ | |
| 1373 | const char *input_field_setting_name(const input_field_config *field); | |
| 1374 | ||
| 1375 | /* return TRUE if the given field has a "previous" setting */ | |
| 1376 | int input_field_has_previous_setting(const input_field_config *field); | |
| 1377 | ||
| 1378 | /* select the previous item for a DIP switch or configuration field */ | |
| 1379 | void input_field_select_previous_setting(const input_field_config *field); | |
| 1380 | ||
| 1381 | /* return TRUE if the given field has a "next" setting */ | |
| 1382 | int input_field_has_next_setting(const input_field_config *field); | |
| 1383 | ||
| 1384 | /* select the next item for a DIP switch or configuration field */ | |
| 1385 | void input_field_select_next_setting(const input_field_config *field); | |
| 1386 | ||
| 1387 | ||
| 1388 | /* ----- port checking ----- */ | |
| 1389 | ||
| 1390 | /* return whether an input port exists */ | |
| 1391 | bool input_port_exists(running_machine &machine, const char *tag); | |
| 1392 | ||
| 1393 | /* return a bitmask of which bits of an input port are active (i.e. not unused or unknown) */ | |
| 1394 | input_port_value input_port_active(running_machine &machine, const char *tag); | |
| 1395 | ||
| 1396 | /* return a bitmask of which bits of an input port are active (i.e. not unused or unknown), or a default value if the port does not exist */ | |
| 1397 | input_port_value input_port_active_safe(running_machine &machine, const char *tag, input_port_value defvalue); | |
| 1398 | ||
| 1399 | ||
| 1400 | /* ----- port reading ----- */ | |
| 1401 | ||
| 1402 | /* return the value of an input port */ | |
| 1403 | input_port_value input_port_read_direct(const input_port_config *port); | |
| 1404 | ||
| 1405 | /* return the value of an input port specified by tag */ | |
| 1406 | input_port_value input_port_read(running_machine &machine, const char *tag); | |
| 1407 | ||
| 1408 | /* return the value of a device input port specified by tag */ | |
| 1409 | input_port_value input_port_read(device_t &device, const char *tag); | |
| 1410 | ||
| 1411 | /* return the value of an input port specified by tag, or a default value if the port does not exist */ | |
| 1412 | input_port_value input_port_read_safe(running_machine &machine, const char *tag, input_port_value defvalue); | |
| 1413 | ||
| 1414 | /* return the extracted crosshair values for the given player */ | |
| 1415 | int input_port_get_crosshair_position(running_machine &machine, int player, float *x, float *y); | |
| 1416 | ||
| 1417 | /* force an update to the input port values based on current conditions */ | |
| 1418 | void input_port_update_defaults(running_machine &machine); | |
| 1419 | ||
| 1420 | ||
| 1421 | ||
| 1422 | /* ----- port writing ----- */ | |
| 1423 | ||
| 1424 | /* write a value to a port */ | |
| 1425 | void input_port_write_direct(const input_port_config *port, input_port_value value, input_port_value mask); | |
| 1426 | ||
| 1427 | /* write a value to a port specified by tag */ | |
| 1428 | void input_port_write(running_machine &machine, const char *tag, input_port_value value, input_port_value mask); | |
| 1429 | ||
| 1430 | /* write a value to a port, ignore if the port does not exist */ | |
| 1431 | void input_port_write_safe(running_machine &machine, const char *tag, input_port_value value, input_port_value mask); | |
| 1432 | ||
| 1433 | ||
| 1434 | ||
| 1435 | /* ----- misc helper functions ----- */ | |
| 1436 | ||
| 1437 | /* return the TRUE if the given condition attached is true */ | |
| 1438 | int input_condition_true(running_machine &machine, const input_condition *condition,device_t &owner); | |
| 1439 | ||
| 1440 | /* convert an input_port_token to a default string */ | |
| 1441 | const char *input_port_string_from_token(const char *token); | |
| 1442 | ||
| 1443 | /* return TRUE if machine use full keyboard emulation */ | |
| 1444 | int input_machine_has_keyboard(running_machine &machine); | |
| 1445 | ||
| 1446 | /* these are called by the core; they should not be called from FEs */ | |
| 1447 | void inputx_init(running_machine &machine); | |
| 1448 | ||
| 1449 | /* called by drivers to setup natural keyboard support */ | |
| 1450 | void inputx_setup_natural_keyboard(running_machine &machine, | |
| 1451 | int (*queue_chars)(running_machine &machine, const unicode_char *text, size_t text_len), | |
| 1452 | int (*accept_char)(running_machine &machine, unicode_char ch), | |
| 1453 | int (*charqueue_empty)(running_machine &machine)); | |
| 1454 | ||
| 1455 | /* validity checks */ | |
| 1456 | int validate_natural_keyboard_statics(void); | |
| 1457 | ||
| 1458 | /* these can be called from FEs */ | |
| 1459 | int inputx_can_post(running_machine &machine); | |
| 1460 | ||
| 1461 | /* various posting functions; can be called from FEs */ | |
| 1462 | void inputx_postc(running_machine &machine, unicode_char ch); | |
| 1463 | void inputx_post_utf8(running_machine &machine, const char *text); | |
| 1464 | void inputx_post_utf8_rate(running_machine &machine, const char *text, attotime rate); | |
| 1465 | int inputx_is_posting(running_machine &machine); | |
| 1466 | ||
| 1467 | /* miscellaneous functions */ | |
| 1468 | int input_classify_port(const input_field_config *field); | |
| 1469 | int input_has_input_class(running_machine &machine, int inputclass); | |
| 1470 | int input_player_number(const input_field_config *field); | |
| 1471 | int input_count_players(running_machine &machine); | |
| 1472 | ||
| 1473 | ||
| 1474 | inline running_machine &input_field_config::machine() const | |
| 1475 | { | |
| 1476 | return m_port.machine(); | |
| 1477 | } | |
| 1478 | ||
| 1479 | ||
| 1480 | // temporary construction helpers | |
| 1481 | void field_config_insert(input_field_config &newfield, input_port_value &disallowedbits, astring &errorbuf); | |
| 1482 | void diplocation_list_alloc(input_field_config &field, const char *location, astring &errorbuf); | |
| 1483 | ||
| 1484 | ||
| 1485 | input_port_config *ioconfig_alloc_port(ioport_list &portlist, device_t &device, const char *tag); | |
| 1486 | input_port_config *ioconfig_modify_port(ioport_list &portlist, device_t &device, const char *tag); | |
| 1487 | input_field_config *ioconfig_alloc_field(input_port_config &port, int type, input_port_value defval, input_port_value mask, const char *name = NULL); | |
| 1488 | input_field_config *ioconfig_alloc_onoff(input_port_config &port, const char *name, input_port_value defval, input_port_value mask, const char *diplocation, astring &errorbuf); | |
| 1489 | input_setting_config *ioconfig_alloc_setting(input_field_config &field, input_port_value value, const char *name); | |
| 1490 | void ioconfig_field_add_char(input_field_config &field, unicode_char ch, astring &errorbuf); | |
| 1491 | void ioconfig_add_code(input_field_config &field, int which, input_code code); | |
| 1492 | ||
| 1493 | #endif /* __INPTPORT_H__ */ | |
| 1707 | #endif // __INPTPORT_H__ */ |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | |
| 110 | 110 | void ui_menu_main::populate() |
| 111 | 111 | { |
| 112 | input_field_config *field; | |
| 113 | input_port_config *port; | |
| 112 | ioport_field *field; | |
| 113 | ioport_port *port; | |
| 114 | 114 | int has_configs = false; |
| 115 | 115 | int has_analog = false; |
| 116 | 116 | int has_dips = false; |
| r15082 | r15083 | |
| 118 | 118 | astring menu_text; |
| 119 | 119 | /* scan the input port array to see what options we need to enable */ |
| 120 | 120 | for (port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 121 | for (field = port->fi | |
| 121 | for (field = port->fir | |
| 122 | 122 | { |
| 123 | if (field->type == IPT_DIPSWITCH) | |
| 123 | if (field->type() == IPT_DIPSWITCH) | |
| 124 | 124 | has_dips = true; |
| 125 | if (field->type == IPT_CONFIG) | |
| 125 | if (field->type() == IPT_CONFIG) | |
| 126 | 126 | has_configs = true; |
| 127 | if (i | |
| 127 | if (fi | |
| 128 | 128 | has_analog = true; |
| 129 | 129 | } |
| 130 | 130 | device_iterator deviter(machine().root_device()); |
| r15082 | r15083 | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /* add keyboard mode menu */ |
| 195 | if ( | |
| 195 | if ( | |
| 196 | 196 | item_append("Keyboard Mode", NULL, 0, (void *)KEYBOARD_MODE); |
| 197 | 197 | |
| 198 | 198 | /* add sliders menu */ |
| r15082 | r15083 | |
| 671 | 671 | suborder[SEQ_TYPE_INCREMENT] = 2; |
| 672 | 672 | |
| 673 | 673 | /* iterate over the input ports and add menu items */ |
| 674 | for (input_type_entry *entry = | |
| 674 | for (input_type_entry *entry = | |
| 675 | 675 | |
| 676 | 676 | /* add if we match the group and we have a valid name */ |
| 677 | if (entry->group == group && entry->name != NULL && entry->name[0] != 0) | |
| 677 | if (entry->group() == group && entry->name() != NULL && entry->name()[0] != 0) | |
| 678 | 678 | { |
| 679 | 679 | input_seq_type seqtype; |
| 680 | 680 | |
| r15082 | r15083 | |
| 689 | 689 | if(pollingitem && pollingref == entry && pollingseq == seqtype) |
| 690 | 690 | pollingitem = item; |
| 691 | 691 | item->seqtype = seqtype; |
| 692 | item->seq = input_type_seq(machine(), entry->type, entry->player, seqtype); | |
| 693 | item->defseq = &entry->defseq[seqtype]; | |
| 692 | item->seq = machine().ioport().type_seq(entry->type(), entry->player(), seqtype); | |
| 693 | item->defseq = &entry->defseq(seqtype); | |
| 694 | 694 | item->sortorder = sortorder * 4 + suborder[seqtype]; |
| 695 | item->type = input_type_is_analog(entry->type) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL; | |
| 696 | item->name = entry->name; | |
| 695 | item->type = ioport_manager::type_is_analog(entry->type()) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL; | |
| 696 | item->name = entry->name(); | |
| 697 | 697 | item->next = itemlist; |
| 698 | 698 | itemlist = item; |
| 699 | 699 | |
| r15082 | r15083 | |
| 723 | 723 | void ui_menu_input_specific::populate() |
| 724 | 724 | { |
| 725 | 725 | input_item_data *itemlist = NULL; |
| 726 | input_field_config *field; | |
| 727 | input_port_config *port; | |
| 726 | ioport_field *field; | |
| 727 | ioport_port *port; | |
| 728 | 728 | int suborder[SEQ_TYPE_TOTAL]; |
| 729 | 729 | astring tempstring; |
| 730 | 730 | |
| r15082 | r15083 | |
| 735 | 735 | |
| 736 | 736 | /* iterate over the input ports and add menu items */ |
| 737 | 737 | for (port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 738 | for (field = port->fi | |
| 738 | for (field = port->fir | |
| 739 | 739 | { |
| 740 | const char *name = | |
| 740 | const char *name = | |
| 741 | 741 | |
| 742 | 742 | /* add if we match the group and we have a valid name */ |
| 743 | if (name != NULL && input_condition_true(machine(), &field->condition, port->owner()) && | |
| 744 | ((field->type == IPT_OTHER && field->name != NULL) || input_type_group(machine(), field->type, field->player) != IPG_INVALID)) | |
| 743 | if (name != NULL && field->enabled() && | |
| 744 | ((field->type() == IPT_OTHER && field->name() != NULL) || machine().ioport().type_group(field->type(), field->player()) != IPG_INVALID)) | |
| 745 | 745 | { |
| 746 | 746 | input_seq_type seqtype; |
| 747 | 747 | UINT16 sortorder; |
| 748 | 748 | |
| 749 | 749 | /* determine the sorting order */ |
| 750 | if (field->type >= IPT_START1 && field->type <= __ipt_analog_end) | |
| 751 | sortorder = (field->type << 2) | (field->player << 12); | |
| 750 | if (field->type() >= IPT_START1 && field->type() < IPT_ANALOG_LAST) | |
| 751 | sortorder = (field->type() << 2) | (field->player() << 12); | |
| 752 | 752 | else |
| 753 | sortorder = field->type | 0xf000; | |
| 753 | sortorder = field->type() | 0xf000; | |
| 754 | 754 | |
| 755 | 755 | /* loop over all sequence types */ |
| 756 | 756 | for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) |
| r15082 | r15083 | |
| 762 | 762 | item->seqtype = seqtype; |
| 763 | 763 | if(pollingitem && pollingref == field && pollingseq == seqtype) |
| 764 | 764 | pollingitem = item; |
| 765 | item->seq = | |
| 765 | item->seq = | |
| 766 | 766 | item->defseq = &get_field_default_seq(field, seqtype); |
| 767 | 767 | item->sortorder = sortorder + suborder[seqtype]; |
| 768 | item->type = i | |
| 768 | item->type = fi | |
| 769 | 769 | item->name = name; |
| 770 | 770 | item->next = itemlist; |
| 771 | 771 | itemlist = item; |
| r15082 | r15083 | |
| 820 | 820 | to the default sequence for the given field |
| 821 | 821 | -------------------------------------------------*/ |
| 822 | 822 | |
| 823 | const input_seq &ui_menu_input::get_field_default_seq(i | |
| 823 | const input_seq &ui_menu_input::get_field_default_seq(ioport_field | |
| 824 | 824 | { |
| 825 | if (field->seq[seqtype].is_default()) | |
| 826 | return input_type_seq(field->machine(), field->type, field->player, seqtype); | |
| 825 | if (field->seq(seqtype).is_default()) | |
| 826 | return field->machine().ioport().type_seq(field->type(), field->player(), seqtype); | |
| 827 | 827 | else |
| 828 | return field->seq | |
| 828 | return field->seq(seqtype); | |
| 829 | 829 | } |
| 830 | 830 | |
| 831 | 831 | void ui_menu_input::handle() |
| r15082 | r15083 | |
| 916 | 916 | void ui_menu_input_general::update_input(struct input_item_data *seqchangeditem) |
| 917 | 917 | { |
| 918 | 918 | const input_type_entry *entry = (const input_type_entry *)seqchangeditem->ref; |
| 919 | inp | |
| 919 | machine().ioport().set_type_se | |
| 920 | 920 | } |
| 921 | 921 | |
| 922 | 922 | void ui_menu_input_specific::update_input(struct input_item_data *seqchangeditem) |
| 923 | 923 | { |
| 924 | i | |
| 924 | ioport_field::user_settings settings; | |
| 925 | 925 | |
| 926 | | |
| 926 | | |
| 927 | 927 | settings.seq[seqchangeditem->seqtype] = seqchangeditem->seq; |
| 928 | | |
| 928 | | |
| 929 | 929 | } |
| 930 | 930 | |
| 931 | 931 | |
| r15082 | r15083 | |
| 1047 | 1047 | /* handle events */ |
| 1048 | 1048 | if (menu_event != NULL && menu_event->itemref != NULL) |
| 1049 | 1049 | { |
| 1050 | input_field_config *field = (input_field_config *)menu_event->itemref; | |
| 1051 | input_field_user_settings settings; | |
| 1050 | ioport_field *field = (ioport_field *)menu_event->itemref; | |
| 1051 | ioport_field::user_settings settings; | |
| 1052 | 1052 | int changed = false; |
| 1053 | 1053 | |
| 1054 | 1054 | switch (menu_event->iptkey) |
| 1055 | 1055 | { |
| 1056 | 1056 | /* if selected, reset to default value */ |
| 1057 | 1057 | case IPT_UI_SELECT: |
| 1058 | input_field_get_user_settings(field, &settings); | |
| 1059 | settings.value = field->defvalue; | |
| 1060 | input_field_set_user_settings(field, &settings); | |
| 1058 | field->get_user_settings(settings); | |
| 1059 | settings.value = field->defvalue(); | |
| 1060 | field->set_user_settings(settings); | |
| 1061 | 1061 | changed = true; |
| 1062 | 1062 | break; |
| 1063 | 1063 | |
| 1064 | 1064 | /* left goes to previous setting */ |
| 1065 | 1065 | case IPT_UI_LEFT: |
| 1066 | | |
| 1066 | | |
| 1067 | 1067 | changed = true; |
| 1068 | 1068 | break; |
| 1069 | 1069 | |
| 1070 | 1070 | /* right goes to next setting */ |
| 1071 | 1071 | case IPT_UI_RIGHT: |
| 1072 | | |
| 1072 | | |
| 1073 | 1073 | changed = true; |
| 1074 | 1074 | break; |
| 1075 | 1075 | } |
| r15082 | r15083 | |
| 1093 | 1093 | |
| 1094 | 1094 | void ui_menu_settings::populate() |
| 1095 | 1095 | { |
| 1096 | input_field_config *field; | |
| 1097 | input_port_config *port; | |
| 1096 | ioport_field *field; | |
| 1097 | ioport_port *port; | |
| 1098 | 1098 | dip_descriptor **diplist_tailptr; |
| 1099 | 1099 | |
| 1100 | 1100 | /* reset the dip switch tracking */ |
| r15082 | r15083 | |
| 1104 | 1104 | |
| 1105 | 1105 | /* loop over input ports and set up the current values */ |
| 1106 | 1106 | for (port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 1107 | for (field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1108 | if (field->type == type && input_condition_true(machine(), &field->condition, port->owner())) | |
| 1107 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1108 | if (field->type() == type && field->enabled()) | |
| 1109 | 1109 | { |
| 1110 | 1110 | UINT32 flags = 0; |
| 1111 | 1111 | |
| 1112 | 1112 | /* set the left/right flags appropriately */ |
| 1113 | if ( | |
| 1113 | if ( | |
| 1114 | 1114 | flags |= MENU_FLAG_LEFT_ARROW; |
| 1115 | if ( | |
| 1115 | if ( | |
| 1116 | 1116 | flags |= MENU_FLAG_RIGHT_ARROW; |
| 1117 | 1117 | |
| 1118 | 1118 | /* add the menu item */ |
| 1119 | item_append( | |
| 1119 | item_append( | |
| 1120 | 1120 | |
| 1121 | 1121 | /* for DIP switches, build up the model */ |
| 1122 | if (type == IPT_DIPSWITCH && field->diploc | |
| 1122 | if (type == IPT_DIPSWITCH && field->first_diploca | |
| 1123 | 1123 | { |
| 1124 | const input_field_diplocation *diploc; | |
| 1125 | input_field_user_settings settings; | |
| 1126 | UINT32 accummask = field->mask; | |
| 1124 | const ioport_diplocation *diploc; | |
| 1125 | ioport_field::user_settings settings; | |
| 1126 | UINT32 accummask = field->mask(); | |
| 1127 | 1127 | |
| 1128 | 1128 | /* get current settings */ |
| 1129 | | |
| 1129 | | |
| 1130 | 1130 | |
| 1131 | 1131 | /* iterate over each bit in the field */ |
| 1132 | for (diploc = field->diploc | |
| 1132 | for (diploc = field->first_diploca | |
| 1133 | 1133 | { |
| 1134 | 1134 | UINT32 mask = accummask & ~(accummask - 1); |
| 1135 | 1135 | dip_descriptor *dip; |
| 1136 | 1136 | |
| 1137 | 1137 | /* find the matching switch name */ |
| 1138 | 1138 | for (dip = diplist; dip != NULL; dip = dip->next) |
| 1139 | if (strcmp(dip->name, diploc-> | |
| 1139 | if (strcmp(dip->name, diploc-> | |
| 1140 | 1140 | break; |
| 1141 | 1141 | |
| 1142 | 1142 | /* allocate new if none */ |
| r15082 | r15083 | |
| 1144 | 1144 | { |
| 1145 | 1145 | dip = (dip_descriptor *)m_pool_alloc(sizeof(*dip)); |
| 1146 | 1146 | dip->next = NULL; |
| 1147 | dip->name = diploc-> | |
| 1147 | dip->name = diploc-> | |
| 1148 | 1148 | dip->mask = dip->state = 0; |
| 1149 | 1149 | *diplist_tailptr = dip; |
| 1150 | 1150 | diplist_tailptr = &dip->next; |
| r15082 | r15083 | |
| 1153 | 1153 | } |
| 1154 | 1154 | |
| 1155 | 1155 | /* apply the bits */ |
| 1156 | dip->mask |= 1 << (diploc->swnum - 1); | |
| 1157 | if (((settings.value & mask) != 0 && !diploc->invert) || ((settings.value & mask) == 0 && diploc->invert)) | |
| 1158 | dip->state |= 1 << (diploc->swnum - 1); | |
| 1156 | dip->mask |= 1 << (diploc->number() - 1); | |
| 1157 | if (((settings.value & mask) != 0 && !diploc->inverted()) || ((settings.value & mask) == 0 && diploc->inverted())) | |
| 1158 | dip->state |= 1 << (diploc->number() - 1); | |
| 1159 | 1159 | |
| 1160 | 1160 | /* clear the relevant bit in the accumulated mask */ |
| 1161 | 1161 | accummask &= ~mask; |
| r15082 | r15083 | |
| 1177 | 1177 | |
| 1178 | 1178 | void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top, float bottom, float x1, float y1, float x2, float y2) |
| 1179 | 1179 | { |
| 1180 | i | |
| 1180 | ioport_field | |
| 1181 | 1181 | dip_descriptor *dip; |
| 1182 | 1182 | |
| 1183 | 1183 | /* add borders */ |
| r15082 | r15083 | |
| 1193 | 1193 | { |
| 1194 | 1194 | if (mame_stricmp(dip->name, "FAKE") != 0) |
| 1195 | 1195 | { |
| 1196 | const i | |
| 1196 | const ioport | |
| 1197 | 1197 | UINT32 selectedmask = 0; |
| 1198 | 1198 | |
| 1199 | 1199 | /* determine the mask of selected bits */ |
| 1200 | 1200 | if (field != NULL) |
| 1201 | for (diploc = field->diploclist().first(); diploc != NULL; diploc = diploc->next()) | |
| 1202 | if (strcmp(dip->name, diploc->swname) == 0) | |
| 1203 | selectedmask |= 1 << (diploc->swnum - 1); | |
| 1201 | for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next()) | |
| 1202 | if (strcmp(dip->name, diploc->name()) == 0) | |
| 1203 | selectedmask |= 1 << (diploc->number() - 1); | |
| 1204 | 1204 | |
| 1205 | 1205 | /* draw one switch */ |
| 1206 | 1206 | custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask); |
| r15082 | r15083 | |
| 1322 | 1322 | /* if things changed, update */ |
| 1323 | 1323 | if (newval != data->cur) |
| 1324 | 1324 | { |
| 1325 | i | |
| 1325 | ioport_field::user_settings settings; | |
| 1326 | 1326 | |
| 1327 | 1327 | /* get the settings and set the new value */ |
| 1328 | | |
| 1328 | da | |
| 1329 | 1329 | switch (data->type) |
| 1330 | 1330 | { |
| 1331 | 1331 | case ANALOG_ITEM_KEYSPEED: settings.delta = newval; break; |
| r15082 | r15083 | |
| 1333 | 1333 | case ANALOG_ITEM_REVERSE: settings.reverse = newval; break; |
| 1334 | 1334 | case ANALOG_ITEM_SENSITIVITY: settings.sensitivity = newval; break; |
| 1335 | 1335 | } |
| 1336 | | |
| 1336 | da | |
| 1337 | 1337 | |
| 1338 | 1338 | /* rebuild the menu */ |
| 1339 | 1339 | reset(UI_MENU_RESET_REMEMBER_POSITION); |
| r15082 | r15083 | |
| 1353 | 1353 | |
| 1354 | 1354 | void ui_menu_analog::populate() |
| 1355 | 1355 | { |
| 1356 | input_field_config *field; | |
| 1357 | input_port_config *port; | |
| 1356 | ioport_field *field; | |
| 1357 | ioport_port *port; | |
| 1358 | 1358 | astring subtext; |
| 1359 | 1359 | astring text; |
| 1360 | 1360 | |
| 1361 | 1361 | /* loop over input ports and add the items */ |
| 1362 | 1362 | for (port = machine().ioport().first_port(); port != NULL; port = port->next()) |
| 1363 | for (field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1364 | if (input_type_is_analog(field->type) && input_condition_true(machine(), &field->condition, port->owner())) | |
| 1363 | for (field = port->first_field(); field != NULL; field = field->next()) | |
| 1364 | if (field->is_analog() && field->enabled()) | |
| 1365 | 1365 | { |
| 1366 | i | |
| 1366 | ioport_field::user_settings settings; | |
| 1367 | 1367 | int use_autocenter = false; |
| 1368 | 1368 | int type; |
| 1369 | 1369 | |
| 1370 | 1370 | /* based on the type, determine if we enable autocenter */ |
| 1371 | switch (field->type) | |
| 1371 | switch (field->type()) | |
| 1372 | 1372 | { |
| 1373 | 1373 | case IPT_POSITIONAL: |
| 1374 | 1374 | case IPT_POSITIONAL_V: |
| 1375 | if (field-> | |
| 1375 | if (field-> | |
| 1376 | 1376 | break; |
| 1377 | 1377 | |
| 1378 | 1378 | case IPT_AD_STICK_X: |
| r15082 | r15083 | |
| 1385 | 1385 | case IPT_PEDAL3: |
| 1386 | 1386 | use_autocenter = true; |
| 1387 | 1387 | break; |
| 1388 | ||
| 1389 | default: | |
| 1390 | break; | |
| 1388 | 1391 | } |
| 1389 | 1392 | |
| 1390 | 1393 | /* get the user settings */ |
| 1391 | | |
| 1394 | | |
| 1392 | 1395 | |
| 1393 | 1396 | /* iterate over types */ |
| 1394 | 1397 | for (type = 0; type < ANALOG_ITEM_COUNT; type++) |
| r15082 | r15083 | |
| 1407 | 1410 | { |
| 1408 | 1411 | default: |
| 1409 | 1412 | case ANALOG_ITEM_KEYSPEED: |
| 1410 | text.printf("%s Digital Speed", | |
| 1413 | text.printf("%s Digital Speed", | |
| 1411 | 1414 | subtext.printf("%d", settings.delta); |
| 1412 | 1415 | data->min = 0; |
| 1413 | 1416 | data->max = 255; |
| 1414 | 1417 | data->cur = settings.delta; |
| 1415 | data->defvalue = field->delta; | |
| 1418 | data->defvalue = field->delta(); | |
| 1416 | 1419 | break; |
| 1417 | 1420 | |
| 1418 | 1421 | case ANALOG_ITEM_CENTERSPEED: |
| 1419 | text.printf("%s Autocenter Speed", | |
| 1422 | text.printf("%s Autocenter Speed", | |
| 1420 | 1423 | subtext.printf("%d", settings.centerdelta); |
| 1421 | 1424 | data->min = 0; |
| 1422 | 1425 | data->max = 255; |
| 1423 | 1426 | data->cur = settings.centerdelta; |
| 1424 | data->defvalue = field->centerdelta; | |
| 1427 | data->defvalue = field->centerdelta(); | |
| 1425 | 1428 | break; |
| 1426 | 1429 | |
| 1427 | 1430 | case ANALOG_ITEM_REVERSE: |
| 1428 | text.printf("%s Reverse", | |
| 1431 | text.printf("%s Reverse", | |
| 1429 | 1432 | subtext.cpy(settings.reverse ? "On" : "Off"); |
| 1430 | 1433 | data->min = 0; |
| 1431 | 1434 | data->max = 1; |
| 1432 | 1435 | data->cur = settings.reverse; |
| 1433 | data->defvalue = | |
| 1436 | data->defvalue = | |
| 1434 | 1437 | break; |
| 1435 | 1438 | |
| 1436 | 1439 | case ANALOG_ITEM_SENSITIVITY: |
| 1437 | text.printf("%s Sensitivity", | |
| 1440 | text.printf("%s Sensitivity", | |
| 1438 | 1441 | subtext.printf("%d", settings.sensitivity); |
| 1439 | 1442 | data->min = 1; |
| 1440 | 1443 | data->max = 255; |
| 1441 | 1444 | data->cur = settings.sensitivity; |
| 1442 | data->defvalue = field->sensitivity; | |
| 1445 | data->defvalue = field->sensitivity(); | |
| 1443 | 1446 | break; |
| 1444 | 1447 | } |
| 1445 | 1448 |
| r15082 | r15083 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | inline const char *validity_checker::ioport_string_from_index(UINT32 index) |
| 73 | 73 | { |
| 74 | return i | |
| 74 | return iop | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
| r15082 | r15083 | |
| 808 | 808 | // analog input field |
| 809 | 809 | //------------------------------------------------- |
| 810 | 810 | |
| 811 | void validity_checker::validate_analog_input_field(i | |
| 811 | void validity_checker::validate_analog_input_field(ioport_field | |
| 812 | 812 | { |
| 813 | 813 | // analog ports must have a valid sensitivity |
| 814 | if (field.sensitivity == 0) | |
| 814 | if (field.sensitivity() == 0) | |
| 815 | 815 | mame_printf_error("Analog port with zero sensitivity\n"); |
| 816 | 816 | |
| 817 | 817 | // check that the default falls in the bitmask range |
| 818 | if (field.defvalue & ~field.mask) | |
| 819 | mame_printf_error("Analog port with a default value (%X) out of the bitmask range (%X)\n", field.defvalue, field.mask); | |
| 818 | if (field.defvalue() & ~field.mask()) | |
| 819 | mame_printf_error("Analog port with a default value (%X) out of the bitmask range (%X)\n", field.defvalue(), field.mask()); | |
| 820 | 820 | |
| 821 | 821 | // tests for positional devices |
| 822 | if (field.type == IPT_POSITIONAL || field.type == IPT_POSITIONAL_V) | |
| 822 | if (field.type() == IPT_POSITIONAL || field.type() == IPT_POSITIONAL_V) | |
| 823 | 823 | { |
| 824 | 824 | int shift; |
| 825 | for (shift = 0; shift <= 31 && (~field.mask & (1 << shift)) != 0; shift++) ; | |
| 825 | for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) ; | |
| 826 | 826 | |
| 827 | 827 | // convert the positional max value to be in the bitmask for testing |
| 828 | INT32 analog_max = field.max; | |
| 828 | INT32 analog_max = field.maxval(); | |
| 829 | 829 | analog_max = (analog_max - 1) << shift; |
| 830 | 830 | |
| 831 | 831 | // positional port size must fit in bits used |
| 832 | if ((field.mask >> shift) + 1 < field.max) | |
| 832 | if ((field.mask() >> shift) + 1 < field.maxval()) | |
| 833 | 833 | mame_printf_error("Analog port with a positional port size bigger then the mask size\n"); |
| 834 | 834 | } |
| 835 | 835 | |
| 836 | 836 | // tests for absolute devices |
| 837 | else if (field.type > | |
| 837 | else if (field.type() > | |
| 838 | 838 | { |
| 839 | 839 | // adjust for signed values |
| 840 | INT32 default_value = field.defvalue; | |
| 841 | INT32 analog_min = field.min; | |
| 842 | INT32 analog_max = field.max; | |
| 840 | INT32 default_value = field.defvalue(); | |
| 841 | INT32 analog_min = field.minval(); | |
| 842 | INT32 analog_max = field.maxval(); | |
| 843 | 843 | if (analog_min > analog_max) |
| 844 | 844 | { |
| 845 | 845 | analog_min = -analog_min; |
| r15082 | r15083 | |
| 849 | 849 | |
| 850 | 850 | // check that the default falls in the MINMAX range |
| 851 | 851 | if (default_value < analog_min || default_value > analog_max) |
| 852 | mame_printf_error("Analog port with a default value (%X) out of PORT_MINMAX range (%X-%X)\n", field.defvalue, field.min, field.max); | |
| 852 | mame_printf_error("Analog port with a default value (%X) out of PORT_MINMAX range (%X-%X)\n", field.defvalue(), field.minval(), field.maxval()); | |
| 853 | 853 | |
| 854 | 854 | // check that the MINMAX falls in the bitmask range |
| 855 | 855 | // we use the unadjusted min for testing |
| 856 | if (field.min & ~field.mask || analog_max & ~field.mask) | |
| 857 | mame_printf_error("Analog port with a PORT_MINMAX (%X-%X) value out of the bitmask range (%X)\n", field.min, field.max, field.mask); | |
| 856 | if (field.minval() & ~field.mask() || analog_max & ~field.mask()) | |
| 857 | mame_printf_error("Analog port with a PORT_MINMAX (%X-%X) value out of the bitmask range (%X)\n", field.minval(), field.maxval(), field.mask()); | |
| 858 | 858 | |
| 859 | 859 | // absolute analog ports do not use PORT_RESET |
| 860 | if (field. | |
| 860 | if (field. | |
| 861 | 861 | mame_printf_error("Absolute analog port using PORT_RESET\n"); |
| 862 | 862 | |
| 863 | 863 | // absolute analog ports do not use PORT_WRAPS |
| 864 | if (field. | |
| 864 | if (field. | |
| 865 | 865 | mame_printf_error("Absolute analog port using PORT_WRAPS\n"); |
| 866 | 866 | } |
| 867 | 867 | |
| r15082 | r15083 | |
| 869 | 869 | else |
| 870 | 870 | { |
| 871 | 871 | // relative devices do not use PORT_MINMAX |
| 872 | if (field.min != 0 || field.max != field.mask) | |
| 872 | if (field.minval() != 0 || field.maxval() != field.mask()) | |
| 873 | 873 | mame_printf_error("Relative port using PORT_MINMAX\n"); |
| 874 | 874 | |
| 875 | 875 | // relative devices do not use a default value |
| 876 | 876 | // the counter is at 0 on power up |
| 877 | if (field.defvalue != 0) | |
| 877 | if (field.defvalue() != 0) | |
| 878 | 878 | mame_printf_error("Relative port using non-0 default value\n"); |
| 879 | 879 | |
| 880 | 880 | // relative analog ports do not use PORT_WRAPS |
| 881 | if (field. | |
| 881 | if (field. | |
| 882 | 882 | mame_printf_error("Absolute analog port using PORT_WRAPS\n"); |
| 883 | 883 | } |
| 884 | 884 | } |
| r15082 | r15083 | |
| 889 | 889 | // setting |
| 890 | 890 | //------------------------------------------------- |
| 891 | 891 | |
| 892 | void validity_checker::validate_dip_settings(i | |
| 892 | void validity_checker::validate_dip_settings(ioport_field | |
| 893 | 893 | { |
| 894 | 894 | const char *demo_sounds = ioport_string_from_index(INPUT_STRING_Demo_Sounds); |
| 895 | 895 | const char *flipscreen = ioport_string_from_index(INPUT_STRING_Flip_Screen); |
| r15082 | r15083 | |
| 897 | 897 | bool coin_error = false; |
| 898 | 898 | |
| 899 | 899 | // iterate through the settings |
| 900 | for ( | |
| 900 | for ( | |
| 901 | 901 | { |
| 902 | 902 | // note any coinage strings |
| 903 | int strindex = get_defstr_index(setting->name); | |
| 903 | int strindex = get_defstr_index(setting->name()); | |
| 904 | 904 | if (strindex >= __input_string_coinage_start && strindex <= __input_string_coinage_end) |
| 905 | 905 | coin_list[strindex - __input_string_coinage_start] = 1; |
| 906 | 906 | |
| 907 | 907 | // make sure demo sounds default to on |
| 908 | if (field.name == demo_sounds && strindex == INPUT_STRING_On && field.defvalue != setting->value) | |
| 908 | if (field.name() == demo_sounds && strindex == INPUT_STRING_On && field.defvalue() != setting->value()) | |
| 909 | 909 | mame_printf_error("Demo Sounds must default to On\n"); |
| 910 | 910 | |
| 911 | 911 | // check for bad demo sounds options |
| 912 | if (field.name == demo_sounds && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No)) | |
| 913 | mame_printf_error("Demo Sounds option must be Off/On, not %s\n", setting->name); | |
| 912 | if (field.name() == demo_sounds && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No)) | |
| 913 | mame_printf_error("Demo Sounds option must be Off/On, not %s\n", setting->name()); | |
| 914 | 914 | |
| 915 | 915 | // check for bad flip screen options |
| 916 | if (field.name == flipscreen && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No)) | |
| 917 | mame_printf_error("Flip Screen option must be Off/On, not %s\n", setting->name); | |
| 916 | if (field.name() == flipscreen && (strindex == INPUT_STRING_Yes || strindex == INPUT_STRING_No)) | |
| 917 | mame_printf_error("Flip Screen option must be Off/On, not %s\n", setting->name()); | |
| 918 | 918 | |
| 919 | 919 | // if we have a neighbor, compare ourselves to him |
| 920 | 920 | if (setting->next() != NULL) |
| 921 | 921 | { |
| 922 | 922 | // check for inverted off/on dispswitch order |
| 923 | int next_strindex = get_defstr_index(setting->next()->name, true); | |
| 923 | int next_strindex = get_defstr_index(setting->next()->name(), true); | |
| 924 | 924 | if (strindex == INPUT_STRING_On && next_strindex == INPUT_STRING_Off) |
| 925 | mame_printf_error("%s option must have Off/On options in the order: Off, On\n", field.name); | |
| 925 | mame_printf_error("%s option must have Off/On options in the order: Off, On\n", field.name()); | |
| 926 | 926 | |
| 927 | 927 | // check for inverted yes/no dispswitch order |
| 928 | 928 | else if (strindex == INPUT_STRING_Yes && next_strindex == INPUT_STRING_No) |
| 929 | mame_printf_error("%s option must have Yes/No options in the order: No, Yes\n", field.name); | |
| 929 | mame_printf_error("%s option must have Yes/No options in the order: No, Yes\n", field.name()); | |
| 930 | 930 | |
| 931 | 931 | // check for inverted upright/cocktail dispswitch order |
| 932 | 932 | else if (strindex == INPUT_STRING_Cocktail && next_strindex == INPUT_STRING_Upright) |
| 933 | mame_printf_error("%s option must have Upright/Cocktail options in the order: Upright, Cocktail\n", field.name); | |
| 933 | mame_printf_error("%s option must have Upright/Cocktail options in the order: Upright, Cocktail\n", field.name()); | |
| 934 | 934 | |
| 935 | 935 | // check for proper coin ordering |
| 936 | 936 | else if (strindex >= __input_string_coinage_start && strindex <= __input_string_coinage_end && next_strindex >= __input_string_coinage_start && next_strindex <= __input_string_coinage_end && |
| 937 | strindex >= next_strindex && | |
| 937 | strindex >= next_strindex && | |
| 938 | 938 | { |
| 939 | mame_printf_error("%s option has unsorted coinage %s > %s\n", field.name, setting->name, setting->next()->name); | |
| 939 | mame_printf_error("%s option has unsorted coinage %s > %s\n", field.name(), setting->name(), setting->next()->name()); | |
| 940 | 940 | coin_error = true; |
| 941 | 941 | } |
| 942 | 942 | } |
| r15082 | r15083 | |
| 958 | 958 | // stored within an ioport field or setting |
| 959 | 959 | //------------------------------------------------- |
| 960 | 960 | |
| 961 | void validity_checker::validate_condition(i | |
| 961 | void validity_checker::validate_condition(ioport_condition &condition, device_t &device, int_map &port_map) | |
| 962 | 962 | { |
| 963 | 963 | // resolve the tag |
| 964 | 964 | astring porttag; |
| 965 | device.subtag(porttag, condition.tag); | |
| 965 | device.subtag(porttag, condition.tag()); | |
| 966 | 966 | |
| 967 | 967 | // then find a matching port |
| 968 | 968 | if (port_map.find(porttag) == 0) |
| 969 | mame_printf_error("Condition referencing non-existent ioport tag '%s'\n", condition.tag); | |
| 969 | mame_printf_error("Condition referencing non-existent ioport tag '%s'\n", condition.tag()); | |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | |
| r15082 | r15083 | |
| 992 | 992 | // allocate the input ports |
| 993 | 993 | ioport_list portlist; |
| 994 | 994 | astring errorbuf; |
| 995 | | |
| 995 | | |
| 996 | 996 | |
| 997 | 997 | // report any errors during construction |
| 998 | 998 | if (errorbuf) |
| 999 | 999 | mame_printf_error("I/O port error during construction:\n%s\n", errorbuf.cstr()); |
| 1000 | 1000 | |
| 1001 | 1001 | // do a first pass over ports to add their names and find duplicates |
| 1002 | for (i | |
| 1002 | for (ioport_port | |
| 1003 | 1003 | if (port_map.add(port->tag(), 1, false) == TMERR_DUPLICATE) |
| 1004 | 1004 | mame_printf_error("Multiple I/O ports with the same tag '%s' defined\n", port->tag()); |
| 1005 | 1005 | |
| 1006 | 1006 | // iterate over ports |
| 1007 | for (i | |
| 1007 | for (ioport_port | |
| 1008 | 1008 | { |
| 1009 | 1009 | m_current_ioport = port->tag(); |
| 1010 | 1010 | |
| 1011 | 1011 | // iterate through the fields on this port |
| 1012 | for (i | |
| 1012 | for (ioport_field | |
| 1013 | 1013 | { |
| 1014 | 1014 | // verify analog inputs |
| 1015 | if (i | |
| 1015 | if (fi | |
| 1016 | 1016 | validate_analog_input_field(*field); |
| 1017 | 1017 | |
| 1018 | 1018 | // look for invalid (0) types which should be mapped to IPT_OTHER |
| 1019 | if (field->type == IPT_INVALID) | |
| 1019 | if (field->type() == IPT_INVALID) | |
| 1020 | 1020 | mame_printf_error("Field has an invalid type (0); use IPT_OTHER instead\n"); |
| 1021 | 1021 | |
| 1022 | 1022 | // verify dip switches |
| 1023 | if (field->type == IPT_DIPSWITCH) | |
| 1023 | if (field->type() == IPT_DIPSWITCH) | |
| 1024 | 1024 | { |
| 1025 | 1025 | // dip switch fields must have a name |
| 1026 | if (field->name == NULL) | |
| 1026 | if (field->name() == NULL) | |
| 1027 | 1027 | mame_printf_error("DIP switch has a NULL name\n"); |
| 1028 | 1028 | |
| 1029 | 1029 | // verify the settings list |
| r15082 | r15083 | |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | 1033 | // verify names |
| 1034 | if (field->name != NULL) | |
| 1034 | const char *name = field->specific_name(); | |
| 1035 | if (name != NULL) | |
| 1035 | 1036 | { |
| 1036 | 1037 | // check for empty string |
| 1037 | if ( | |
| 1038 | if ( | |
| 1038 | 1039 | mame_printf_error("Field name is an empty string\n"); |
| 1039 | 1040 | |
| 1040 | 1041 | // check for trailing spaces |
| 1041 | if (field->name[0] != 0 && field->name[strlen(field->name) - 1] == ' ') | |
| 1042 | mame_printf_error("Field '%s' has trailing spaces\n", field->name); | |
| 1042 | if (name[0] != 0 && name[strlen(name) - 1] == ' ') | |
| 1043 | mame_printf_error("Field '%s' has trailing spaces\n", name); | |
| 1043 | 1044 | |
| 1044 | 1045 | // check for invalid UTF-8 |
| 1045 | if (!utf8_is_valid_string(field->name)) | |
| 1046 | mame_printf_error("Field '%s' has invalid characters\n", field->name); | |
| 1046 | if (!utf8_is_valid_string(name)) | |
| 1047 | mame_printf_error("Field '%s' has invalid characters\n", name); | |
| 1047 | 1048 | |
| 1048 | 1049 | // look up the string and print an error if default strings are not used |
| 1049 | /*strindex =get_defstr_index(defstr_map, | |
| 1050 | /*strindex =get_defstr_index(defstr_map, | |
| 1050 | 1051 | } |
| 1051 | 1052 | |
| 1052 | 1053 | // verify conditions on the field |
| 1053 | if (field->condition.tag != NULL) | |
| 1054 | validate_condition(field->condition, *device, port_map); | |
| 1054 | if (!field->condition().none()) | |
| 1055 | validate_condition(field->condition(), *device, port_map); | |
| 1055 | 1056 | |
| 1056 | 1057 | // verify conditions on the settings |
| 1057 | for (input_setting_config *setting = field->settinglist().first(); setting != NULL; setting = setting->next()) | |
| 1058 | if (setting->condition.tag != NULL) | |
| 1059 | validate_condition(setting->condition, *device, port_map); | |
| 1058 | for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next()) | |
| 1059 | if (!setting->condition().none()) | |
| 1060 | validate_condition(setting->condition(), *device, port_map); | |
| 1060 | 1061 | } |
| 1061 | 1062 | |
| 1062 | 1063 | // done with this port |
| r15082 | r15083 | |
|---|---|---|
| 121 | 121 | void populate_and_sort(struct input_item_data *itemlist); |
| 122 | 122 | virtual void update_input(struct input_item_data *seqchangeditem) = 0; |
| 123 | 123 | void toggle_none_default(input_seq &selected_seq, input_seq &original_seq, const input_seq &selected_defseq); |
| 124 | const input_seq &get_field_default_seq(i | |
| 124 | const input_seq &get_field_default_seq(ioport_field | |
| 125 | 125 | |
| 126 | 126 | protected: |
| 127 | 127 | const void * pollingref; |
| r15082 | r15083 | |
| 212 | 212 | |
| 213 | 213 | /* internal analog menu item data */ |
| 214 | 214 | struct analog_item_data { |
| 215 | i | |
| 215 | ioport_field | |
| 216 | 216 | int type; |
| 217 | 217 | int min, max; |
| 218 | 218 | int cur; |
| r15082 | r15083 | |
|---|---|---|
| 93 | 93 | void validate_roms(); |
| 94 | 94 | void validate_display(); |
| 95 | 95 | void validate_gfx(); |
| 96 | void validate_analog_input_field(input_field_config &field); | |
| 97 | void validate_dip_settings(input_field_config &field); | |
| 98 | void validate_condition(input_condition &condition, device_t &device, int_map &port_map); | |
| 96 | void validate_analog_input_field(ioport_field &field); | |
| 97 | void validate_dip_settings(ioport_field &field); | |
| 98 | void validate_condition(ioport_condition &condition, device_t &device, int_map &port_map); | |
| 99 | 99 | void validate_inputs(); |
| 100 | 100 | void validate_devices(); |
| 101 | 101 |
| r15082 | r15083 | |
|---|---|---|
| 267 | 267 | astring errors; |
| 268 | 268 | device_iterator iter(config.root_device()); |
| 269 | 269 | for (device_t *device = iter.first(); device != NULL; device = iter.next()) |
| 270 | | |
| 270 | | |
| 271 | 271 | |
| 272 | 272 | // print the header and the game name |
| 273 | 273 | fprintf(m_output, "\t<%s",emulator_info::get_xml_top()); |
| r15082 | r15083 | |
| 352 | 352 | astring errors; |
| 353 | 353 | device_iterator iptiter(device); |
| 354 | 354 | for (device_t *dev = iptiter.first(); dev != NULL; dev = iptiter.next()) |
| 355 | | |
| 355 | | |
| 356 | 356 | // check if the device adds player inputs (other than dsw and configs) to the system |
| 357 | for (input_port_config *port = portlist.first(); port != NULL; port = port->next()) | |
| 358 | for (input_field_config *field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 359 | if (field->type >= IPT_START1 && field->type < __ipt_ui_start) | |
| 357 | for (ioport_port *port = portlist.first(); port != NULL; port = port->next()) | |
| 358 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 359 | if (field->type() >= IPT_START1 && field->type() < IPT_UI_FIRST) | |
| 360 | 360 | { |
| 361 | 361 | has_input = TRUE; |
| 362 | 362 | break; |
| r15082 | r15083 | |
| 830 | 830 | bool gambling = false; |
| 831 | 831 | |
| 832 | 832 | // iterate over the ports |
| 833 | for (input_port_config *port = portlist.first(); port != NULL; port = port->next()) | |
| 834 | for (input_field_config *field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 833 | for (ioport_port *port = portlist.first(); port != NULL; port = port->next()) | |
| 834 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 835 | 835 | { |
| 836 | 836 | int analogtype = -1; |
| 837 | 837 | |
| 838 | 838 | // track the highest player number |
| 839 | if (nplayer < field->player + 1) | |
| 840 | nplayer = field->player + 1; | |
| 839 | if (nplayer < field->player() + 1) | |
| 840 | nplayer = field->player() + 1; | |
| 841 | 841 | |
| 842 | 842 | // switch off of the type |
| 843 | switch (field->type) | |
| 843 | switch (field->type()) | |
| 844 | 844 | { |
| 845 | 845 | // map which joystick directions are present |
| 846 | case IPT_JOYSTICK_UP: joytype[0] |= DIR_UP | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 847 | case IPT_JOYSTICK_DOWN: joytype[0] |= DIR_DOWN | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 848 | case IPT_JOYSTICK_LEFT: joytype[0] |= DIR_LEFT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 849 | case IPT_JOYSTICK_RIGHT: joytype[0] |= DIR_RIGHT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 846 | case IPT_JOYSTICK_UP: joytype[0] |= DIR_UP | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 847 | case IPT_JOYSTICK_DOWN: joytype[0] |= DIR_DOWN | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 848 | case IPT_JOYSTICK_LEFT: joytype[0] |= DIR_LEFT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 849 | case IPT_JOYSTICK_RIGHT: joytype[0] |= DIR_RIGHT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 850 | 850 | |
| 851 | case IPT_JOYSTICKLEFT_UP: joytype[1] |= DIR_UP | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 852 | case IPT_JOYSTICKLEFT_DOWN: joytype[1] |= DIR_DOWN | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 853 | case IPT_JOYSTICKLEFT_LEFT: joytype[1] |= DIR_LEFT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 854 | case IPT_JOYSTICKLEFT_RIGHT: joytype[1] |= DIR_RIGHT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 851 | case IPT_JOYSTICKLEFT_UP: joytype[1] |= DIR_UP | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 852 | case IPT_JOYSTICKLEFT_DOWN: joytype[1] |= DIR_DOWN | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 853 | case IPT_JOYSTICKLEFT_LEFT: joytype[1] |= DIR_LEFT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 854 | case IPT_JOYSTICKLEFT_RIGHT: joytype[1] |= DIR_RIGHT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 855 | 855 | |
| 856 | case IPT_JOYSTICKRIGHT_UP: joytype[2] |= DIR_UP | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 857 | case IPT_JOYSTICKRIGHT_DOWN: joytype[2] |= DIR_DOWN | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 858 | case IPT_JOYSTICKRIGHT_LEFT: joytype[2] |= DIR_LEFT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 859 | case IPT_JOYSTICKRIGHT_RIGHT: joytype[2] |= DIR_RIGHT | ((field->way == 4) ? DIR_4WAY : 0); break; | |
| 856 | case IPT_JOYSTICKRIGHT_UP: joytype[2] |= DIR_UP | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 857 | case IPT_JOYSTICKRIGHT_DOWN: joytype[2] |= DIR_DOWN | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 858 | case IPT_JOYSTICKRIGHT_LEFT: joytype[2] |= DIR_LEFT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 859 | case IPT_JOYSTICKRIGHT_RIGHT: joytype[2] |= DIR_RIGHT | ((field->way() == 4) ? DIR_4WAY : 0); break; | |
| 860 | 860 | |
| 861 | 861 | // mark as an analog input, and get analog stats after switch |
| 862 | 862 | case IPT_AD_STICK_X: |
| r15082 | r15083 | |
| 918 | 918 | case IPT_BUTTON14: |
| 919 | 919 | case IPT_BUTTON15: |
| 920 | 920 | case IPT_BUTTON16: |
| 921 | nbutton = MAX(nbutton, field->type - IPT_BUTTON1 + 1); | |
| 921 | nbutton = MAX(nbutton, field->type() - IPT_BUTTON1 + 1); | |
| 922 | 922 | break; |
| 923 | 923 | |
| 924 | 924 | // track maximum coin index |
| r15082 | r15083 | |
| 930 | 930 | case IPT_COIN6: |
| 931 | 931 | case IPT_COIN7: |
| 932 | 932 | case IPT_COIN8: |
| 933 | ncoin = MAX(ncoin, field->type - IPT_COIN1 + 1); | |
| 933 | ncoin = MAX(ncoin, field->type() - IPT_COIN1 + 1); | |
| 934 | 934 | break; |
| 935 | 935 | |
| 936 | 936 | // track presence of these guys |
| r15082 | r15083 | |
| 952 | 952 | break; |
| 953 | 953 | |
| 954 | 954 | default: |
| 955 | if (field->type > | |
| 955 | if (field->type() > | |
| 956 | 956 | mahjong = true; |
| 957 | else if (field->type > | |
| 957 | else if (field->type() > | |
| 958 | 958 | hanafuda = true; |
| 959 | else if (field->type > | |
| 959 | else if (field->type() > | |
| 960 | 960 | gambling = true; |
| 961 | 961 | break; |
| 962 | 962 | } |
| r15082 | r15083 | |
| 964 | 964 | // get the analog stats |
| 965 | 965 | if (analogtype != -1) |
| 966 | 966 | { |
| 967 | if (field->min != 0) | |
| 968 | control_info[analogtype].min = field->min; | |
| 969 | if (field->max != 0) | |
| 970 | control_info[analogtype].max = field->max; | |
| 971 | if (field->sensitivity != 0) | |
| 972 | control_info[analogtype].sensitivity = field->sensitivity; | |
| 973 | if (field->delta != 0) | |
| 974 | control_info[analogtype].keydelta = field->delta; | |
| 975 | if ((field->flags & ANALOG_FLAG_REVERSE) != 0) | |
| 967 | if (field->minval() != 0) | |
| 968 | control_info[analogtype].min = field->minval(); | |
| 969 | if (field->maxval() != 0) | |
| 970 | control_info[analogtype].max = field->maxval(); | |
| 971 | if (field->sensitivity() != 0) | |
| 972 | control_info[analogtype].sensitivity = field->sensitivity(); | |
| 973 | if (field->delta() != 0) | |
| 974 | control_info[analogtype].keydelta = field->delta(); | |
| 975 | if (field->analog_reverse() != 0) | |
| 976 | 976 | control_info[analogtype].reverse = true; |
| 977 | 977 | } |
| 978 | 978 | } |
| r15082 | r15083 | |
| 1080 | 1080 | void info_xml_creator::output_switches(const ioport_list &portlist, const char *root_tag, int type, const char *outertag, const char *innertag) |
| 1081 | 1081 | { |
| 1082 | 1082 | // iterate looking for DIP switches |
| 1083 | for (input_port_config *port = portlist.first(); port != NULL; port = port->next()) | |
| 1084 | for (input_field_config *field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1085 | if (field->type == type) | |
| 1083 | for (ioport_port *port = portlist.first(); port != NULL; port = port->next()) | |
| 1084 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 1085 | if (field->type() == type) | |
| 1086 | 1086 | { |
| 1087 | astring newtag( | |
| 1087 | astring newtag( | |
| 1088 | 1088 | newtag.substr(newtag.find(oldtag.cat(root_tag)) + oldtag.len()); |
| 1089 | 1089 | |
| 1090 | 1090 | // output the switch name information |
| 1091 | fprintf(m_output, "\t\t<%s name=\"%s\"", outertag, xml_normalize_string( | |
| 1091 | fprintf(m_output, "\t\t<%s name=\"%s\"", outertag, xml_normalize_string( | |
| 1092 | 1092 | fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag)); |
| 1093 | fprintf(m_output, " mask=\"%u\"", field->mask); | |
| 1093 | fprintf(m_output, " mask=\"%u\"", field->mask()); | |
| 1094 | 1094 | fprintf(m_output, ">\n"); |
| 1095 | 1095 | |
| 1096 | 1096 | // loop over settings |
| 1097 | for (i | |
| 1097 | for (ioport_setting | |
| 1098 | 1098 | { |
| 1099 | fprintf(m_output, "\t\t\t<%s name=\"%s\"", innertag, xml_normalize_string(setting->name)); | |
| 1100 | fprintf(m_output, " value=\"%u\"", setting->value); | |
| 1101 | if (setting->value == field->defvalue) | |
| 1099 | fprintf(m_output, "\t\t\t<%s name=\"%s\"", innertag, xml_normalize_string(setting->name())); | |
| 1100 | fprintf(m_output, " value=\"%u\"", setting->value()); | |
| 1101 | if (setting->value() == field->defvalue()) | |
| 1102 | 1102 | fprintf(m_output, " default=\"yes\""); |
| 1103 | 1103 | fprintf(m_output, "/>\n"); |
| 1104 | 1104 | } |
| r15082 | r15083 | |
| 1117 | 1117 | void info_xml_creator::output_adjusters(const ioport_list &portlist) |
| 1118 | 1118 | { |
| 1119 | 1119 | // iterate looking for Adjusters |
| 1120 | for (input_port_config *port = portlist.first(); port != NULL; port = port->next()) | |
| 1121 | for (input_field_config *field = port->fieldlist().first(); field != NULL; field = field->next()) | |
| 1122 | if (field->type == IPT_ADJUSTER) | |
| 1123 | fprintf(m_output, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", xml_normalize_string(input_field_name(field)), field->defvalue); | |
| 1120 | for (ioport_port *port = portlist.first(); port != NULL; port = port->next()) | |
| 1121 | for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) | |
| 1122 | if (field->type() == IPT_ADJUSTER) | |
| 1123 | fprintf(m_output, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", xml_normalize_string(field->name()), field->defvalue()); | |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | 1126 |
| r15082 | r15083 | |
|---|---|---|
| 37 | 37 | struct _ui_input_private |
| 38 | 38 | { |
| 39 | 39 | /* pressed states; retrieved with ui_input_pressed() */ |
| 40 | osd_ticks_t next_repeat[__ipt_max]; | |
| 41 | UINT8 seqpressed[__ipt_max]; | |
| 40 | osd_ticks_t next_repeat[IPT_COUNT]; | |
| 41 | UINT8 seqpressed[IPT_COUNT]; | |
| 42 | 42 | |
| 43 | 43 | /* mouse position/info */ |
| 44 | 44 | render_target * current_mouse_target; |
| r15082 | r15083 | |
| 97 | 97 | void ui_input_frame_update(running_machine &machine) |
| 98 | 98 | { |
| 99 | 99 | ui_input_private *uidata = machine.ui_input_data; |
| 100 | int code; | |
| 101 | 100 | |
| 102 | 101 | /* update the state of all the UI keys */ |
| 103 | for (code = | |
| 102 | for (ioport_type code = | |
| 104 | 103 | { |
| 105 | | |
| 104 | bool pressed = machine.ioport().type | |
| 106 | 105 | if (!pressed || uidata->seqpressed[code] != SEQ_PRESSED_RESET) |
| 107 | 106 | uidata->seqpressed[code] = pressed; |
| 108 | 107 | } |
| r15082 | r15083 | |
| 199 | 198 | |
| 200 | 199 | uidata->events_start = 0; |
| 201 | 200 | uidata->events_end = 0; |
| 202 | for (code = __ | |
| 201 | for (code = IPT_UI_FIRST + 1 | |
| 203 | 202 | { |
| 204 | 203 | uidata->seqpressed[code] = SEQ_PRESSED_RESET; |
| 205 | 204 | uidata->next_repeat[code] = 0; |
| r15082 | r15083 | |
|---|---|---|
| 239 | 239 | // object for a given port name |
| 240 | 240 | //------------------------------------------------- |
| 241 | 241 | |
| 242 | i | |
| 242 | ioport_port | |
| 243 | 243 | { |
| 244 | 244 | // safety first |
| 245 | 245 | if (this == NULL) |
| r15082 | r15083 | |
|---|---|---|
| 95 | 95 | struct rom_entry; |
| 96 | 96 | class machine_config; |
| 97 | 97 | class emu_timer; |
| 98 | ||
| 98 | ||
| 99 | 99 | |
| 100 | 100 | |
| 101 | 101 | |
| r15082 | r15083 | |
| 188 | 188 | memory_region *memregion(const char *tag) const; |
| 189 | 189 | memory_share *memshare(const char *tag) const; |
| 190 | 190 | memory_bank *membank(const char *tag) const; |
| 191 | i | |
| 191 | ioport_port | |
| 192 | 192 | device_t *subdevice(const char *tag) const; |
| 193 | 193 | device_t *siblingdevice(const char *tag) const; |
| 194 | 194 | template<class _DeviceClass> inline _DeviceClass *subdevice(const char *tag) const { return downcast<_DeviceClass *>(subdevice(tag)); } |
| r15082 | r15083 | |
| 506 | 506 | |
| 507 | 507 | // device finder template |
| 508 | 508 | template<bool _Required> |
| 509 | class device_t::ioport_finder : public device_t::object_finder_base<i | |
| 509 | class device_t::ioport_finder : public device_t::object_finder_base<ioport_port | |
| 510 | 510 | { |
| 511 | 511 | public: |
| 512 | 512 | // construction/destruction |
| 513 | 513 | ioport_finder(device_t &base, const char *tag) |
| 514 | : object_finder_base<i | |
| 514 | : object_finder_base<ioport_port | |
| 515 | 515 | |
| 516 | 516 | // finder |
| 517 | 517 | virtual bool findit() |
| r15082 | r15083 | |
| 927 | 927 | }; |
| 928 | 928 | |
| 929 | 929 | |
| 930 | // ======================> device_delegate | |
| 931 | 930 | |
| 932 | // device_delegate is a delegate that wraps with a device tag and can be easily | |
| 933 | // late bound without replicating logic everywhere | |
| 934 | template<typename _Signature> | |
| 935 | class device_delegate : public delegate<_Signature> | |
| 936 | { | |
| 937 | typedef delegate<_Signature> basetype; | |
| 938 | ||
| 939 | public: | |
| 940 | // provide same set of constructors as the base class, with additional device name | |
| 941 | // parameter | |
| 942 | device_delegate() : basetype(), m_device_name(NULL) { } | |
| 943 | device_delegate(const basetype &src) : basetype(src), m_device_name(src.m_device_name) { } | |
| 944 | device_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), m_device_name(src.m_device_name) { } | |
| 945 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 946 | template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), m_device_name(devname) { } | |
| 947 | device_delegate(typename basetype::template traits<device_t>::static_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), m_device_name(NULL) { } | |
| 948 | device_delegate(typename basetype::template traits<device_t>::static_ref_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), m_device_name(NULL) { } | |
| 949 | device_delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; m_device_name = src.m_device_name; return *this; } | |
| 950 | ||
| 951 | // perform the binding | |
| 952 | void bind_relative_to(device_t &search_root); | |
| 953 | ||
| 954 | private: | |
| 955 | // internal state | |
| 956 | const char *m_device_name; | |
| 957 | }; | |
| 958 | ||
| 959 | ||
| 960 | ||
| 961 | 931 | //************************************************************************** |
| 962 | 932 | // INLINE FUNCTIONS |
| 963 | 933 | //************************************************************************** |
| r15082 | r15083 | |
|---|---|---|
| 397 | 397 | void set_legacy_func(device_t &device, read64_device_func func, const char *name, UINT64 mask = 0); |
| 398 | 398 | |
| 399 | 399 | // configure I/O port access |
| 400 | void set_ioport( | |
| 400 | void set_ioport( | |
| 401 | 401 | |
| 402 | 402 | // read via the underlying delegates |
| 403 | 403 | UINT8 read8(address_space &space, offs_t offset, UINT8 mask) const { return m_read.r8(space, offset, mask); } |
| r15082 | r15083 | |
| 419 | 419 | |
| 420 | 420 | // stubs for reading I/O ports |
| 421 | 421 | template<typename _UintType> |
| 422 | _UintType read_stub_ioport(address_space &space, offs_t offset, _UintType mask) { return i | |
| 422 | _UintType read_stub_ioport(address_space &space, offs_t offset, _UintType mask) { return m_iop | |
| 423 | 423 | |
| 424 | 424 | // internal helper |
| 425 | 425 | virtual void remove_subunit(int entry); |
| r15082 | r15083 | |
| 427 | 427 | // internal state |
| 428 | 428 | access_handler m_read; |
| 429 | 429 | access_handler m_subread[8]; |
| 430 | | |
| 430 | | |
| 431 | 431 | |
| 432 | 432 | bool m_sub_is_legacy[8]; |
| 433 | 433 | legacy_info m_legacy_info; |
| r15082 | r15083 | |
| 504 | 504 | void set_legacy_func(device_t &device, write64_device_func func, const char *name, UINT64 mask = 0); |
| 505 | 505 | |
| 506 | 506 | // configure I/O port access |
| 507 | void set_ioport( | |
| 507 | void set_ioport( | |
| 508 | 508 | |
| 509 | 509 | // write via the underlying delegates |
| 510 | 510 | void write8(address_space &space, offs_t offset, UINT8 data, UINT8 mask) const { m_write.w8(space, offset, data, mask); } |
| r15082 | r15083 | |
| 526 | 526 | |
| 527 | 527 | // stubs for writing I/O ports |
| 528 | 528 | template<typename _UintType> |
| 529 | void write_stub_ioport(address_space &space, offs_t offset, _UintType data, _UintType mask) { i | |
| 529 | void write_stub_ioport(address_space &space, offs_t offset, _UintType data, _UintType mask) { m_iop | |
| 530 | 530 | |
| 531 | 531 | // internal helper |
| 532 | 532 | virtual void remove_subunit(int entry); |
| r15082 | r15083 | |
| 534 | 534 | // internal state |
| 535 | 535 | access_handler m_write; |
| 536 | 536 | access_handler m_subwrite[8]; |
| 537 | | |
| 537 | | |
| 538 | 538 | |
| 539 | 539 | bool m_sub_is_legacy[8]; |
| 540 | 540 | legacy_info m_legacy_info; |
| r15082 | r15083 | |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | // forward I/O port access configuration |
| 574 | void set_ioport( | |
| 574 | void set_ioport( | |
| 575 | 575 | for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); i++) |
| 576 | 576 | (*i)->set_ioport(ioport); |
| 577 | 577 | } |
| r15082 | r15083 | |
| 2323 | 2323 | { |
| 2324 | 2324 | // find the port |
| 2325 | 2325 | astring fulltag; |
| 2326 | i | |
| 2326 | ioport_port | |
| 2327 | 2327 | if (port == NULL) |
| 2328 | 2328 | throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_name, m_device.tag()); |
| 2329 | 2329 | |
| r15082 | r15083 | |
| 2335 | 2335 | { |
| 2336 | 2336 | // find the port |
| 2337 | 2337 | astring fulltag; |
| 2338 | i | |
| 2338 | ioport_port | |
| 2339 | 2339 | if (port == NULL) |
| 2340 | 2340 | fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_name, m_device.tag()); |
| 2341 | 2341 | |
| r15082 | r15083 | |
| 4958 | 4958 | // of the appropriate size |
| 4959 | 4959 | //------------------------------------------------- |
| 4960 | 4960 | |
| 4961 | void handler_entry_read::set_ioport( | |
| 4961 | void handler_entry_read::set_ioport( | |
| 4962 | 4962 | { |
| 4963 | 4963 | m_ioport = &ioport; |
| 4964 | 4964 | if (m_datawidth == 8) |
| r15082 | r15083 | |
| 5413 | 5413 | // of the appropriate size |
| 5414 | 5414 | //------------------------------------------------- |
| 5415 | 5415 | |
| 5416 | void handler_entry_write::set_ioport( | |
| 5416 | void handler_entry_write::set_ioport( | |
| 5417 | 5417 | { |
| 5418 | 5418 | m_ioport = &ioport; |
| 5419 | 5419 | if (m_datawidth == 8) |
| r15082 | r15083 | |
|---|---|---|
| 528 | 528 | CUSTOM_INPUT_MEMBER( driver_device::custom_port_read ) |
| 529 | 529 | { |
| 530 | 530 | const char *tag = (const char *)param; |
| 531 | return i | |
| 531 | return iop | |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 |
| r15082 | r15083 | |
|---|---|---|
| 249 | 249 | case 2: jvs_outputs ^= m; break; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | in | |
| 252 | machine().root_device().ioport(tag)->write_safe( | |
| 253 | 253 | } |
| 254 | 254 |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | void microtouch_device::send_touch_packet() |
| 84 | 84 | { |
| 85 | int tx = input_port_read(*this, "TOUCH_X"); | |
| 86 | int ty = input_port_read(*this, "TOUCH_Y"); | |
| 85 | int tx = ioport("TOUCH_X")->read(); | |
| 86 | int ty = ioport("TOUCH_Y")->read(); | |
| 87 | 87 | |
| 88 | 88 | if ( m_out_touch_cb == NULL || |
| 89 | 89 | m_out_touch_cb( &tx, &ty ) != 0 ) |
| r15082 | r15083 | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // send format tablet packet |
| 130 | if ( i | |
| 130 | if ( iop | |
| 131 | 131 | { |
| 132 | 132 | send_touch_packet(); |
| 133 | 133 | } |
| r15082 | r15083 | |
|---|---|---|
| 159 | 159 | { |
| 160 | 160 | UINT8 data = 0; |
| 161 | 161 | |
| 162 | switch (port) | |
| 162 | switch (get_port_mode(port)) | |
| 163 | 163 | { |
| 164 | case PORT_A: | |
| 165 | case PORT_B: | |
| 166 | switch (get_port_mode(port)) | |
| 167 | { | |
| 168 | case PORT_MODE_INPUT: | |
| 169 | data = m_in_port_func[port](0); | |
| 170 | break; | |
| 164 | case PORT_MODE_INPUT: | |
| 165 | data = m_in_port_func[port](0); | |
| 166 | break; | |
| 171 | 167 | |
| 172 | case PORT_MODE_OUTPUT: | |
| 173 | data = m_output[port]; | |
| 174 | break; | |
| 175 | } | |
| 168 | case PORT_MODE_OUTPUT: | |
| 169 | data = m_output[port]; | |
| 176 | 170 | break; |
| 177 | 171 | |
| 178 | case PORT_C: | |
| 179 | switch (get_port_mode(PORT_C)) | |
| 180 | { | |
| 181 | case PORT_MODE_INPUT: | |
| 182 | data = m_in_port_func[port](0) & 0x3f; | |
| 183 | break; | |
| 184 | ||
| 185 | case PORT_MODE_OUTPUT: | |
| 186 | data = m_output[port] & 0x3f; | |
| 187 | break; | |
| 188 | ||
| 189 | default: | |
| 190 | logerror("8155 '%s' Unsupported Port C mode!\n", tag()); | |
| 191 | } | |
| 172 | default: | |
| 173 | // strobed mode not implemented yet | |
| 174 | logerror("8155 '%s' Unsupported Port C mode!\n", tag()); | |
| 192 | 175 | break; |
| 193 | 176 | } |
| 194 | 177 | |
| r15082 | r15083 | |
| 386 | 369 | { |
| 387 | 370 | UINT8 data = 0; |
| 388 | 371 | |
| 389 | switch (offset & 0x0 | |
| 372 | switch (offset & 0x07) | |
| 390 | 373 | { |
| 391 | 374 | case REGISTER_STATUS: |
| 392 | 375 | data = m_status; |
| r15082 | r15083 | |
| 404 | 387 | break; |
| 405 | 388 | |
| 406 | 389 | case REGISTER_PORT_C: |
| 407 | data = read_port(PORT_C); | |
| 390 | data = read_port(PORT_C) | 0xc0; | |
| 408 | 391 | break; |
| 392 | ||
| 393 | case REGISTER_TIMER_LOW: | |
| 394 | data = m_counter & 0xff; | |
| 395 | break; | |
| 396 | ||
| 397 | case REGISTER_TIMER_HIGH: | |
| 398 | data = (m_counter >> 8 & 0x3f) | get_timer_mode(); | |
| 399 | break; | |
| 409 | 400 | } |
| 410 | 401 | |
| 411 | 402 | return data; |
| r15082 | r15083 | |
| 477 | 468 | else |
| 478 | 469 | { |
| 479 | 470 | // load mode and CNT length and start immediately after loading (if timer is not running) |
| 480 | m_counter = m_count_length; | |
| 471 | m_counter = m_count_length & 0x3fff; | |
| 481 | 472 | m_timer->adjust(attotime::zero, 0, attotime::from_hz(clock())); |
| 482 | 473 | } |
| 483 | 474 | break; |
| r15082 | r15083 | |
| 493 | 484 | break; |
| 494 | 485 | |
| 495 | 486 | case REGISTER_PORT_C: |
| 496 | write_port(PORT_C, data); | |
| 487 | write_port(PORT_C, data & 0x3f); | |
| 497 | 488 | break; |
| 498 | 489 | |
| 499 | 490 | case REGISTER_TIMER_LOW: |
| r15082 | r15083 | |
|---|---|---|
| 782 | 782 | |
| 783 | 783 | |
| 784 | 784 | //------------------------------------------------- |
| 785 | // vblank_port_read - custom port handler to | |
| 786 | // return a VBLANK state | |
| 787 | //------------------------------------------------- | |
| 788 | ||
| 789 | int screen_device::vblank_port_read() | |
| 790 | { | |
| 791 | return vblank(); | |
| 792 | } | |
| 793 | ||
| 794 | ||
| 795 | //------------------------------------------------- | |
| 785 | 796 | // vblank_begin - call any external callbacks to |
| 786 | 797 | // signal the VBLANK period has begun |
| 787 | 798 | //------------------------------------------------- |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | // additional helpers |
| 228 | 228 | void register_vblank_callback(vblank_state_delegate vblank_callback); |
| 229 | 229 | void register_screen_bitmap(bitmap_t &bitmap); |
| 230 | int vblank_port_read(); | |
| 230 | 231 | |
| 231 | 232 | // internal to the video system |
| 232 | 233 | bool update_quads(); |
| r15082 | r15083 | |
|---|---|---|
| 712 | 712 | WRITE32_MEMBER( driver_device::paletteram_xRRRRRGGGGGBBBBB_dword_be_w ) { palette_16bit_dword_be_w<5,5,5, 10,5,0>(space, offset, data, mem_mask); } |
| 713 | 713 | WRITE32_MEMBER( driver_device::paletteram_xRRRRRGGGGGBBBBB_dword_le_w ) { palette_16bit_dword_le_w<5,5,5, 10,5,0>(space, offset, data, mem_mask); } |
| 714 | 714 | |
| 715 | WRITE8_MEMBER( driver_device::paletteram_xGGGGGRRRRRBBBBB_byte_le_w ) { palette_16bit_byte_le_w<5,5,5, 5,10,0>(space, offset, data, mem_mask); } | |
| 716 | ||
| 715 | 717 | WRITE16_MEMBER( driver_device::paletteram_xGGGGGRRRRRBBBBB_word_w ) { palette_16bit_word_w<5,5,5, 5,10,0>(space, offset, data, mem_mask); } |
| 716 | 718 | WRITE16_MEMBER( driver_device::paletteram_xGGGGGBBBBBRRRRR_word_w ) { palette_16bit_word_w<5,5,5, 0,10,5>(space, offset, data, mem_mask); } |
| 717 | 719 | WRITE16_MEMBER( driver_device::paletteram_RRRRRGGGGGBBBBBx_word_w ) { palette_16bit_word_w<5,5,5, 11,6,1>(space, offset, data, mem_mask); } |
| r15082 | r15083 | |
|---|---|---|
| 339 | 339 | DECLARE_WRITE32_MEMBER( paletteram_xRRRRRGGGGGBBBBB_dword_be_w ); |
| 340 | 340 | DECLARE_WRITE32_MEMBER( paletteram_xRRRRRGGGGGBBBBB_dword_le_w ); |
| 341 | 341 | |
| 342 | DECLARE_WRITE8_MEMBER( paletteram_xGGGGGRRRRRBBBBB_byte_le_w ); | |
| 343 | ||
| 342 | 344 | DECLARE_WRITE16_MEMBER( paletteram_xGGGGGRRRRRBBBBB_word_w ); |
| 343 | 345 | DECLARE_WRITE16_MEMBER( paletteram_xGGGGGBBBBBRRRRR_word_w ); |
| 344 | 346 | DECLARE_WRITE16_MEMBER( paletteram_RRRRRGGGGGBBBBBx_word_w ); |
| r15082 | r15083 | |
|---|---|---|
| 66 | 66 | UINT8 code; |
| 67 | 67 | UINT8 key_code = 0; |
| 68 | 68 | UINT8 retVal = 0; |
| 69 | UINT8 shift = BIT(input_port_read(*this, "TERM_LINEC"), 1); | |
| 70 | UINT8 caps = BIT(input_port_read(*this, "TERM_LINEC"), 2); | |
| 71 | UINT8 ctrl = BIT(input_port_read(*this, "TERM_LINEC"), 0); | |
| 69 | UINT8 shift = BIT(ioport("TERM_LINEC")->read(), 1); | |
| 70 | UINT8 caps = BIT(ioport("TERM_LINEC")->read(), 2); | |
| 71 | UINT8 ctrl = BIT(ioport("TERM_LINEC")->read(), 0); | |
| 72 | 72 | i = *scan_line; |
| 73 | 73 | { |
| 74 | code = i | |
| 74 | code = iop | |
| 75 | 75 | if (code != 0) |
| 76 | 76 | { |
| 77 | 77 | if (i==0 && shift==0) { |
| r15082 | r15083 | |
|---|---|---|
| 586 | 586 | { |
| 587 | 587 | for(Idx=0; Idx<NoKeyrows; Idx++) |
| 588 | 588 | { |
| 589 | state->m_Keyboard[Idx] = | |
| 589 | state->m_Keyboard[Idx] = | |
| 590 | 590 | |
| 591 | 591 | if(state->m_Keyboard[Idx] != 0x7F) |
| 592 | 592 | state->m_KAny_next = 1; |
| r15082 | r15083 | |
| 1005 | 1005 | for(Idx=0; Idx<NoKeyrows; Idx++) |
| 1006 | 1006 | { |
| 1007 | 1007 | if (Idx < 10) |
| 1008 | Row = in | |
| 1008 | Row = machine.root_device().ioport | |
| 1009 | 1009 | |
| 1010 | 1010 | else |
| 1011 | 1011 | Row = 0x7f; |
| r15082 | r15083 | |
|---|---|---|
| 329 | 329 | |
| 330 | 330 | UINT8 s100_wunderbus_device::s100_sinp_r(offs_t offset) |
| 331 | 331 | { |
| 332 | UINT8 address = (i | |
| 332 | UINT8 address = (iop | |
| 333 | 333 | if ((offset & 0xf8) != address) return 0; |
| 334 | 334 | |
| 335 | 335 | UINT8 data = 0; |
| r15082 | r15083 | |
| 374 | 374 | |
| 375 | 375 | */ |
| 376 | 376 | |
| 377 | data = BITSWAP8(i | |
| 377 | data = BITSWAP8(iop | |
| 378 | 378 | break; |
| 379 | 379 | |
| 380 | 380 | case 2: // R.T. Clock IN/RESET CLK. Int. |
| r15082 | r15083 | |
| 438 | 438 | |
| 439 | 439 | void s100_wunderbus_device::s100_sout_w(offs_t offset, UINT8 data) |
| 440 | 440 | { |
| 441 | UINT8 address = (i | |
| 441 | UINT8 address = (iop | |
| 442 | 442 | if ((offset & 0xf8) != address) return; |
| 443 | 443 | |
| 444 | 444 | if ((offset & 0x07) == 7) |
| r15082 | r15083 | |
|---|---|---|
| 57 | 57 | for (i = 0; i < 8; i++) |
| 58 | 58 | { |
| 59 | 59 | if (state->m_keyboard_scan_mask & (1 << i)) |
| 60 | data |= | |
| 60 | data |= | |
| 61 | 61 | } |
| 62 | 62 | return data; |
| 63 | 63 | } |
| r15082 | r15083 | |
| 139 | 139 | static TIMER_CALLBACK( dai_timer ) |
| 140 | 140 | { |
| 141 | 141 | dai_state *state = machine.driver_data<dai_state>(); |
| 142 | tms5501_set_pio_bit_7 (state->m_tms5501, (in | |
| 142 | tms5501_set_pio_bit_7 (state->m_tms5501, (machine.root_device().ioport | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | MACHINE_START( dai ) |
| r15082 | r15083 | |
| 194 | 194 | |
| 195 | 195 | switch(offset & 0x000f) { |
| 196 | 196 | case 0x00: |
| 197 | data = i | |
| 197 | data = iop | |
| 198 | 198 | data |= 0x08; // serial ready |
| 199 | 199 | if (machine().rand()&0x01) |
| 200 | 200 | data |= 0x40; // random number generator |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | cbmb_state *state = device->machine().driver_data<cbmb_state>(); |
| 153 | 153 | int data = 0; |
| 154 | 154 | if (!(state->m_keyline_c & 0x01)) |
| 155 | data |= | |
| 155 | data |= | |
| 156 | 156 | |
| 157 | 157 | if (!(state->m_keyline_c & 0x02)) |
| 158 | data |= | |
| 158 | data |= | |
| 159 | 159 | |
| 160 | 160 | if (!(state->m_keyline_c & 0x04)) |
| 161 | data |= | |
| 161 | data |= | |
| 162 | 162 | |
| 163 | 163 | if (!(state->m_keyline_c & 0x08)) |
| 164 | data |= | |
| 164 | data |= | |
| 165 | 165 | |
| 166 | 166 | if (!(state->m_keyline_c & 0x10)) |
| 167 | data |= | |
| 167 | data |= | |
| 168 | 168 | |
| 169 | 169 | if (!(state->m_keyline_c & 0x20)) |
| 170 | data |= | |
| 170 | data |= s | |
| 171 | 171 | |
| 172 | 172 | return data ^0xff; |
| 173 | 173 | } |
| r15082 | r15083 | |
| 177 | 177 | cbmb_state *state = device->machine().driver_data<cbmb_state>(); |
| 178 | 178 | int data = 0; |
| 179 | 179 | if (!(state->m_keyline_c & 0x01)) |
| 180 | data |= | |
| 180 | data |= | |
| 181 | 181 | |
| 182 | 182 | if (!(state->m_keyline_c & 0x02)) |
| 183 | data |= | |
| 183 | data |= | |
| 184 | 184 | |
| 185 | 185 | if (!(state->m_keyline_c & 0x04)) |
| 186 | data |= | |
| 186 | data |= | |
| 187 | 187 | |
| 188 | 188 | if (!(state->m_keyline_c & 0x08)) |
| 189 | data |= | |
| 189 | data |= | |
| 190 | 190 | |
| 191 | 191 | if (!(state->m_keyline_c & 0x10)) |
| 192 | data |= | |
| 192 | data |= | |
| 193 | 193 | |
| 194 | 194 | if (!(state->m_keyline_c & 0x20)) |
| 195 | data |= | |
| 195 | data |= s | |
| 196 | 196 | |
| 197 | 197 | return data ^0xff; |
| 198 | 198 | } |
| r15082 | r15083 | |
| 201 | 201 | { |
| 202 | 202 | int data = 0; |
| 203 | 203 | cbmb_state *state = device->machine().driver_data<cbmb_state>(); |
| 204 | if ((input_port_read(device->machine(), "ROW0") & ~state->m_keyline_a) || | |
| 205 | (input_port_read(device->machine(), "ROW1") & ~state->m_keyline_b)) | |
| 204 | if ((device->machine().root_device().ioport("ROW0")->read() & ~state->m_keyline_a) || | |
| 205 | (device->machine().root_device().ioport("ROW1")->read() & ~state->m_keyline_b)) | |
| 206 | 206 | data |= 0x01; |
| 207 | 207 | |
| 208 | if ((input_port_read(device->machine(), "ROW2") & ~state->m_keyline_a) || | |
| 209 | (input_port_read(device->machine(), "ROW3") & ~state->m_keyline_b)) | |
| 208 | if ((device->machine().root_device().ioport("ROW2")->read() & ~state->m_keyline_a) || | |
| 209 | (device->machine().root_device().ioport("ROW3")->read() & ~state->m_keyline_b)) | |
| 210 | 210 | data |= 0x02; |
| 211 | 211 | |
| 212 | if ((input_port_read(device->machine(), "ROW4") & ~state->m_keyline_a) || | |
| 213 | (input_port_read(device->machine(), "ROW5") & ~state->m_keyline_b)) | |
| 212 | if ((device->machine().root_device().ioport("ROW4")->read() & ~state->m_keyline_a) || | |
| 213 | (device->machine().root_device().ioport("ROW5")->read() & ~state->m_keyline_b)) | |
| 214 | 214 | data |= 0x04; |
| 215 | 215 | |
| 216 | if ((input_port_read(device->machine(), "ROW6") & ~state->m_keyline_a) || | |
| 217 | (input_port_read(device->machine(), "ROW7") & ~state->m_keyline_b)) | |
| 216 | if ((device->machine().root_device().ioport("ROW6")->read() & ~state->m_keyline_a) || | |
| 217 | (device->machine().root_device().ioport("ROW7")->read() & ~state->m_keyline_b)) | |
| 218 | 218 | data |= 0x08; |
| 219 | 219 | |
| 220 | if ((input_port_read(device->machine(), "ROW8") & ~state->m_keyline_a) || | |
| 221 | ((input_port_read(device->machine(), "ROW9") | ((input_port_read(device->machine(), "SPECIAL") & 0x04) ? 1 : 0)) & ~state->m_keyline_b)) | |
| 220 | if ((device->machine().root_device().ioport("ROW8")->read() & ~state->m_keyline_a) || | |
| 221 | ((device->machine().root_device().ioport("ROW9")->read() | ((device->machine().root_device().ioport("SPECIAL")->read() & 0x04) ? 1 : 0)) & ~state->m_keyline_b)) | |
| 222 | 222 | data |= 0x10; |
| 223 | 223 | |
| 224 | if ((input_port_read(device->machine(), "ROW10") & ~state->m_keyline_a) || | |
| 225 | (input_port_read(device->machine(), "ROW11") & ~state->m_keyline_b)) | |
| 224 | if ((device->machine().root_device().ioport("ROW10")->read() & ~state->m_keyline_a) || | |
| 225 | (state->ioport("ROW11")->read() & ~state->m_keyline_b)) | |
| 226 | 226 | data |= 0x20; |
| 227 | 227 | |
| 228 | 228 | if (!state->m_p500) |
| r15082 | r15083 | |
| 341 | 341 | |
| 342 | 342 | static TIMER_CALLBACK( p500_lightpen_tick ) |
| 343 | 343 | { |
| 344 | if ((in | |
| 344 | if ((machine. | |
| 345 | 345 | { |
| 346 | 346 | /* enable lightpen crosshair */ |
| 347 | 347 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 359 | 359 | device_t *tpi_0 = machine.device("tpi6525_0"); |
| 360 | 360 | |
| 361 | 361 | #if 0 |
| 362 | int controller1 = input_port_read(machine, "CTRLSEL") & 0x07; | |
| 363 | int controller2 = input_port_read(machine, "CTRLSEL") & 0x70; | |
| 362 | int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07; | |
| 363 | int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70; | |
| 364 | 364 | #endif |
| 365 | 365 | |
| 366 | 366 | tpi6525_i0_w(tpi_0, state->m_irq_level); |
| r15082 | r15083 | |
| 372 | 372 | switch (controller1) |
| 373 | 373 | { |
| 374 | 374 | case 0x00: |
| 375 | value &= ~in | |
| 375 | value &= ~machine.root_device().ioport | |
| 376 | 376 | break; |
| 377 | 377 | |
| 378 | 378 | case 0x01: |
| 379 | if (in | |
| 379 | if (machine.root_device().ioport | |
| 380 | 380 | value &= ~0x08; |
| 381 | if (in | |
| 381 | if (machine.root_device().ioport | |
| 382 | 382 | value &= ~0x04; |
| 383 | 383 | break; |
| 384 | 384 | |
| 385 | 385 | case 0x02: |
| 386 | if (in | |
| 386 | if (machine.root_device().ioport | |
| 387 | 387 | value &= ~0x10; |
| 388 | if (in | |
| 388 | if (machine.root_device().ioport | |
| 389 | 389 | value &= ~0x01; |
| 390 | 390 | break; |
| 391 | 391 | |
| 392 | 392 | case 0x03: |
| 393 | value &= ~(in | |
| 393 | value &= ~(machine.root_device().ioport | |
| 394 | 394 | break; |
| 395 | 395 | |
| 396 | 396 | case 0x04: |
| 397 | 397 | /* was there any input on the lightpen? where is it mapped? */ |
| 398 | // if (in | |
| 398 | // if (machine.root_device().ioport | |
| 399 | 399 | // value &= ?? ; |
| 400 | 400 | break; |
| 401 | 401 | |
| r15082 | r15083 | |
| 414 | 414 | switch (controller2) |
| 415 | 415 | { |
| 416 | 416 | case 0x00: |
| 417 | value &= ~in | |
| 417 | value &= ~machine.root_device().ioport | |
| 418 | 418 | break; |
| 419 | 419 | |
| 420 | 420 | case 0x10: |
| 421 | if (in | |
| 421 | if (machine.root_device().ioport | |
| 422 | 422 | value &= ~0x08; |
| 423 | if (in | |
| 423 | if (machine.root_device().ioport | |
| 424 | 424 | value &= ~0x04; |
| 425 | 425 | break; |
| 426 | 426 | |
| 427 | 427 | case 0x20: |
| 428 | if (in | |
| 428 | if (machine.root_device().ioport | |
| 429 | 429 | value &= ~0x10; |
| 430 | if (in | |
| 430 | if (machine.root_device().ioport | |
| 431 | 431 | value &= ~0x01; |
| 432 | 432 | break; |
| 433 | 433 | |
| 434 | 434 | case 0x30: |
| 435 | value &= ~(in | |
| 435 | value &= ~(machine.root_device().ioport | |
| 436 | 436 | break; |
| 437 | 437 | |
| 438 | 438 | case 0x40: |
| 439 | 439 | /* was there any input on the lightpen? where is it mapped? */ |
| 440 | // if (in | |
| 440 | // if (machine.root_device().ioport | |
| 441 | 441 | // value &= ?? ; |
| 442 | 442 | break; |
| 443 | 443 | |
| r15082 | r15083 | |
| 458 | 458 | /* for p500, check if lightpen has been chosen as input: if so, enable crosshair (but c64-like inputs for p500 are not working atm) */ |
| 459 | 459 | machine.scheduler().timer_set(attotime::zero, FUNC(p500_lightpen_tick)); |
| 460 | 460 | |
| 461 | set_led_status(machine, 1, in | |
| 461 | set_led_status(machine, 1, machine.root_device().ioport | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | for (i = 0; i < 15; i++) |
| 153 | 153 | { |
| 154 | 154 | sprintf(kbdrow,"X%d",i); |
| 155 | pressed[i] = (in | |
| 155 | pressed[i] = (machine.root_device().ioport | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /* find what has changed */ |
| r15082 | r15083 | |
| 772 | 772 | device_t *cpu = image.device().machine().device("maincpu"); |
| 773 | 773 | address_space *space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 774 | 774 | UINT16 i, j; |
| 775 | UINT8 data, sw = i | |
| 775 | UINT8 data, sw = i | |
| 776 | 776 | |
| 777 | 777 | if (!mame_stricmp(image.filetype(), "mwb")) |
| 778 | 778 | { |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | int t = pc1350_keyboard_line_r(machine); |
| 33 | 33 | |
| 34 | 34 | if (t & 0x01) |
| 35 | data |= in | |
| 35 | data |= machine.root_device().ioport | |
| 36 | 36 | |
| 37 | 37 | if (t & 0x02) |
| 38 | data |= in | |
| 38 | data |= machine.root_device().ioport | |
| 39 | 39 | |
| 40 | 40 | if (t & 0x04) |
| 41 | data |= in | |
| 41 | data |= machine.root_device().ioport | |
| 42 | 42 | |
| 43 | 43 | if (t & 0x08) |
| 44 | data |= in | |
| 44 | data |= machine.root_device().ioport | |
| 45 | 45 | |
| 46 | 46 | if (t & 0x10) |
| 47 | data |= in | |
| 47 | data |= machine.root_device().ioport | |
| 48 | 48 | |
| 49 | 49 | if (t & 0x20) |
| 50 | data |= in | |
| 50 | data |= machine.root_device().ioport | |
| 51 | 51 | |
| 52 | 52 | if (state->m_outa & 0x01) |
| 53 | data |= in | |
| 53 | data |= machine.root_device().ioport | |
| 54 | 54 | |
| 55 | 55 | if (state->m_outa & 0x02) |
| 56 | data |= in | |
| 56 | data |= machine.root_device().ioport | |
| 57 | 57 | |
| 58 | 58 | if (state->m_outa & 0x04) |
| 59 | 59 | { |
| 60 | data |= in | |
| 60 | data |= machine.root_device().ioport | |
| 61 | 61 | |
| 62 | 62 | /* At Power Up we fake a 'CLS' pressure */ |
| 63 | 63 | if (state->m_power) |
| r15082 | r15083 | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if (state->m_outa & 0x08) |
| 68 | data |= in | |
| 68 | data |= machine.root_device().ioport | |
| 69 | 69 | |
| 70 | 70 | if (state->m_outa & 0x10) |
| 71 | data |= in | |
| 71 | data |= machine.root_device().ioport | |
| 72 | 72 | |
| 73 | 73 | if (state->m_outa & 0xc0) |
| 74 | data |= in | |
| 74 | data |= machine.root_device().ioport | |
| 75 | 75 | |
| 76 | 76 | // missing lshift |
| 77 | 77 | |
| r15082 | r15083 | |
| 87 | 87 | |
| 88 | 88 | int pc1350_brk(device_t *device) |
| 89 | 89 | { |
| 90 | return ( | |
| 90 | return ( | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | static TIMER_CALLBACK(pc1350_power_up) |
| r15082 | r15083 | |
|---|---|---|
| 1354 | 1354 | |
| 1355 | 1355 | switch( offset ) |
| 1356 | 1356 | { |
| 1357 | case 0x52: return | |
| 1357 | case 0x52: return s | |
| 1358 | 1358 | case 0x61: |
| 1359 | 1359 | if ( ! ( state->m_pm_reg[0x60] & 0x04 ) ) |
| 1360 | 1360 | { |
| r15082 | r15083 | |
| 1551 | 1551 | } |
| 1552 | 1552 | |
| 1553 | 1553 | /* Set possible input irqs */ |
| 1554 | state->m_pm_reg[0x29] |= ~ in | |
| 1554 | state->m_pm_reg[0x29] |= ~ machine.root_device().ioport | |
| 1555 | 1555 | } |
| 1556 | 1556 | } |
| 1557 | 1557 |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | if ( column == 0 ) |
| 50 | 50 | { |
| 51 | if ( !BIT( i | |
| 51 | if ( !BIT( iop | |
| 52 | 52 | { |
| 53 | m_stylus_x = input_port_read(machine(), "STYX") >> 4; | |
| 54 | m_stylus_y = input_port_read(machine(), "STYY") >> 4; | |
| 53 | m_stylus_x = ioport("STYX")->read() >> 4; | |
| 54 | m_stylus_y = ioport("STYY")->read() >> 4; | |
| 55 | 55 | } |
| 56 | 56 | else |
| 57 | 57 | { |
| r15082 | r15083 | |
| 140 | 140 | /* P0 bit 7 cleared => 8B (button A) */ |
| 141 | 141 | /* P1 bit 0 cleared => 8C (button B) */ |
| 142 | 142 | /* P1 bit 1 cleared => 8D (button C) */ |
| 143 | m_p_ram[SM8521_P0] = input_port_read(machine(), "IN0"); | |
| 144 | m_p_ram[SM8521_P1] = (m_p_ram[SM8521_P1] & 0xFC) | ( input_port_read(machine(), "IN1") & 3 ); | |
| 143 | m_p_ram[SM8521_P0] = ioport("IN0")->read(); | |
| 144 | m_p_ram[SM8521_P1] = (m_p_ram[SM8521_P1] & 0xFC) | ( ioport("IN1")->read() & 3 ); | |
| 145 | 145 | break; |
| 146 | 146 | case 0xFFFF: /* keys #2 */ |
| 147 | 147 | /* P0 bit 0 cleared => 88 (power) */ |
| r15082 | r15083 | |
| 154 | 154 | /* P0 bit 7 cleared => A0 */ |
| 155 | 155 | /* P1 bit 0 cleared => A0 */ |
| 156 | 156 | /* P1 bit 1 cleared => A0 */ |
| 157 | m_p_ram[SM8521_P0] = (m_p_ram[SM8521_P0] & 0xFC) | ( i | |
| 157 | m_p_ram[SM8521_P0] = (m_p_ram[SM8521_P0] & 0xFC) | ( iop | |
| 158 | 158 | m_p_ram[SM8521_P1] = 0xFF; |
| 159 | 159 | break; |
| 160 | 160 | } |
| r15082 | r15083 | |
| 345 | 345 | void gamecom_handle_dma( device_t *device, int cycles ) |
| 346 | 346 | { |
| 347 | 347 | gamecom_state *state = device->machine().driver_data<gamecom_state>(); |
| 348 | UINT8 * RAM = | |
| 348 | UINT8 * RAM = st | |
| 349 | 349 | UINT8 data = RAM[SM8521_DMC]; |
| 350 | 350 | state->m_dma.overwrite_mode = data & 0x01; |
| 351 | 351 | state->m_dma.transfer_mode = data & 0x06; |
| r15082 | r15083 | |
|---|---|---|
| 98 | 98 | if (m_cart->exists()) { |
| 99 | 99 | cococart_line_value cart_line; |
| 100 | 100 | |
| 101 | cart_line = i | |
| 101 | cart_line = iop | |
| 102 | 102 | ? COCOCART_LINE_VALUE_Q |
| 103 | 103 | : COCOCART_LINE_VALUE_CLEAR; |
| 104 | 104 |
| r15082 | r15083 | |
|---|---|---|
| 251 | 251 | "KEY8", "KEY9", "KEY10", "KEY11", "KEY12", "KEY13", "KEY14", "KEY15" |
| 252 | 252 | }; |
| 253 | 253 | |
| 254 | return | |
| 254 | return | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | static READ8_DEVICE_HANDLER ( pmd85_ppi_0_portc_r ) |
| r15082 | r15083 | |
| 297 | 297 | for (i = 0; i < 8; i++) |
| 298 | 298 | { |
| 299 | 299 | if (!BIT(state->m_ppi_port_outputs[0][0], i)) |
| 300 | data &= | |
| 300 | data &= | |
| 301 | 301 | } |
| 302 | 302 | return data; |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | static READ8_DEVICE_HANDLER ( mato_ppi_0_portc_r ) |
| 306 | 306 | { |
| 307 | return | |
| 307 | return | |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | static WRITE8_DEVICE_HANDLER ( mato_ppi_0_portc_w ) |
| r15082 | r15083 | |
| 459 | 459 | static READ8_DEVICE_HANDLER ( pmd85_ppi_3_porta_r ) |
| 460 | 460 | { |
| 461 | 461 | pmd85_state *state = device->machine().driver_data<pmd85_state>(); |
| 462 | if ( | |
| 462 | if (st | |
| 463 | 463 | return state->memregion("user1")->base()[state->m_ppi_port_outputs[3][1] | (state->m_ppi_port_outputs[3][2] << 8)]; |
| 464 | 464 | else |
| 465 | 465 | return 0; |
| r15082 | r15083 | |
| 796 | 796 | int data; |
| 797 | 797 | int current_level; |
| 798 | 798 | |
| 799 | if (!(in | |
| 799 | if (!(machine.root_device().ioport | |
| 800 | 800 | { |
| 801 | 801 | /* tape reading */ |
| 802 | 802 | if (machine.device<cassette_image_device>(CASSETTE_TAG)->get_state()&CASSETTE_PLAY) |
| r15082 | r15083 | |
| 864 | 864 | |
| 865 | 865 | DIRECT_UPDATE_MEMBER(pmd85_state::pmd85_opbaseoverride) |
| 866 | 866 | { |
| 867 | if (i | |
| 867 | if (iop | |
| 868 | 868 | machine().scheduler().timer_set(attotime::from_usec(10), FUNC(pmd_reset)); |
| 869 | 869 | return address; |
| 870 | 870 | } |
| r15082 | r15083 | |
| 949 | 949 | case PMD85_2A: |
| 950 | 950 | case PMD85_3: |
| 951 | 951 | case C2717: |
| 952 | state->m_rom_module_present = (in | |
| 952 | state->m_rom_module_present = (machine.root_device().ioport | |
| 953 | 953 | break; |
| 954 | 954 | case ALFA: |
| 955 | 955 | case MATO: |
| r15082 | r15083 | |
|---|---|---|
| 22 | 22 | kramermc_state *state = device->machine().driver_data<kramermc_state>(); |
| 23 | 23 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7" }; |
| 24 | 24 | |
| 25 | return | |
| 25 | return | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | static WRITE8_DEVICE_HANDLER (kramermc_port_a_w) |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | UINT8 c64_4ksa_device::c64_pb_r(address_space &space, offs_t offset) |
| 87 | 87 | { |
| 88 | return i | |
| 88 | return iop | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| r15082 | r15083 | |
| 95 | 95 | |
| 96 | 96 | int c64_4ksa_device::c64_pa2_r() |
| 97 | 97 | { |
| 98 | return BIT(i | |
| 98 | return BIT(iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 |
| r15082 | r15083 | |
|---|---|---|
| 39 | 39 | static TIMER_CALLBACK(AY3600_poll); |
| 40 | 40 | |
| 41 | 41 | static int AY3600_keyboard_queue_chars(running_machine &machine, const unicode_char *text, size_t text_len); |
| 42 | static int AY3600_keyboard_accept_char(running_machine &machine, unicode_char ch); | |
| 43 | ||
| 42 | static bool AY3600_keyboard_accept_char(running_machine &machine, unicode_char ch); | |
| 43 | static bool AY3600_keyboard_charqueue_empty(running_machine &machine); | |
| 44 | 44 | static const unsigned char ay3600_key_remap_2[9*8][4] = |
| 45 | 45 | { |
| 46 | 46 | /* norm ctrl shft both */ |
| r15082 | r15083 | |
| 303 | 303 | INLINE int a2_no_ctrl_reset(running_machine &machine) |
| 304 | 304 | { |
| 305 | 305 | return ((a2_has_repeat(machine) && !a2_has_reset_dip(machine)) || |
| 306 | (a2_has_reset_dip(machine) && !in | |
| 306 | (a2_has_reset_dip(machine) && !machine.root_device().ioport | |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | |
| r15082 | r15083 | |
| 333 | 333 | state->m_last_key_unmodified = 0xff; /* necessary for special repeat key behaviour */ |
| 334 | 334 | state->m_time_until_repeat = MAGIC_KEY_REPEAT_NUMBER; |
| 335 | 335 | |
| 336 | inputx_setup_natural_keyboard(machine, | |
| 337 | AY3600_keyboard_queue_chars, | |
| 338 | AY3600_keyboard_accept_char, | |
| 339 | NULL); | |
| 336 | machine.ioport().natkeyboard().configure( | |
| 337 | ioport_queue_chars_delegate(FUNC(AY3600_keyboard_queue_chars), &machine), | |
| 338 | ioport_accept_char_delegate(FUNC(AY3600_keyboard_accept_char), &machine), | |
| 339 | ioport_charqueue_empty_delegate(FUNC(AY3600_keyboard_charqueue_empty), &machine)); | |
| 340 | 340 | |
| 341 | 341 | return 0; |
| 342 | 342 | } |
| r15082 | r15083 | |
| 367 | 367 | |
| 368 | 368 | /* only repeat keys on a 2/2+ if special REPT key is pressed */ |
| 369 | 369 | if (a2_has_repeat(machine)) |
| 370 | state->m_time_until_repeat = in | |
| 370 | state->m_time_until_repeat = machine.root_device().ioport | |
| 371 | 371 | |
| 372 | 372 | /* check caps lock and set LED here */ |
| 373 | 373 | if (apple2_pressed_specialkey(machine, SPECIALKEY_CAPSLOCK)) |
| r15082 | r15083 | |
| 453 | 453 | |
| 454 | 454 | for (port = 0; port < num_ports; port++) |
| 455 | 455 | { |
| 456 | data = in | |
| 456 | data = machine.root_device().ioport | |
| 457 | 457 | |
| 458 | 458 | for (bit = 0; bit < 8; bit++) |
| 459 | 459 | { |
| r15082 | r15083 | |
| 615 | 615 | |
| 616 | 616 | |
| 617 | 617 | |
| 618 | static | |
| 618 | static bool AY3600_keyboard_accept_char(running_machine &machine, unicode_char ch) | |
| 619 | 619 | { |
| 620 | 620 | return AY3600_get_keycode(ch) != 0; |
| 621 | 621 | } |
| 622 | 622 | |
| 623 | static bool AY3600_keyboard_charqueue_empty(running_machine &machine) | |
| 624 | { | |
| 625 | return true; | |
| 626 | } | |
| 627 | ||
| 628 | ||
| 629 |
| r15082 | r15083 | |
|---|---|---|
| 49 | 49 | if (m_port_101f & P2000M_101F_KEYINT) |
| 50 | 50 | { |
| 51 | 51 | return ( |
| 52 | input_port_read(machine(), "KEY0") & input_port_read(machine(), "KEY1") & | |
| 53 | input_port_read(machine(), "KEY2") & input_port_read(machine(), "KEY3") & | |
| 54 | input_port_read(machine(), "KEY4") & input_port_read(machine(), "KEY5") & | |
| 55 | input_port_read(machine(), "KEY6") & input_port_read(machine(), "KEY7") & | |
| 56 | input_port_read(machine(), "KEY8") & input_port_read(machine(), "KEY9")); | |
| 52 | ioport("KEY0")->read() & ioport("KEY1")->read() & | |
| 53 | ioport("KEY2")->read() & ioport("KEY3")->read() & | |
| 54 | ioport("KEY4")->read() & ioport("KEY5")->read() & | |
| 55 | ioport("KEY6")->read() & ioport("KEY7")->read() & | |
| 56 | ioport("KEY8")->read() & ioport("KEY9")->read()); | |
| 57 | 57 | } |
| 58 | 58 | else |
| 59 | 59 | if (offset < 10) |
| 60 | 60 | { |
| 61 | return (i | |
| 61 | return (iop | |
| 62 | 62 | } |
| 63 | 63 | else |
| 64 | 64 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 515 | 515 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 516 | 516 | c16_state *state = space->machine().driver_data<c16_state>(); |
| 517 | 517 | |
| 518 | if (in | |
| 518 | if (machine.root_device().ioport("SID")->read_safe( | |
| 519 | 519 | { |
| 520 | 520 | if (state->m_pal) |
| 521 | 521 | space->install_legacy_write_handler(0xd400, 0xd41f, FUNC(c16_sidcart_16k)); |
| r15082 | r15083 | |
| 534 | 534 | c16_state *state = machine.driver_data<c16_state>(); |
| 535 | 535 | address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); |
| 536 | 536 | |
| 537 | if (in | |
| 537 | if (machine.root_device().ioport("SID")->read_safe( | |
| 538 | 538 | space->install_legacy_readwrite_handler(*state->m_sid, 0xfe80, 0xfe9f, FUNC(sid6581_r), FUNC(sid6581_w)); |
| 539 | 539 | else |
| 540 | 540 | space->install_legacy_readwrite_handler(*state->m_sid, 0xfd40, 0xfd5f, FUNC(sid6581_r), FUNC(sid6581_w)); |
| r15082 | r15083 | |
| 550 | 550 | for (i = 0; i < 8; i++) |
| 551 | 551 | { |
| 552 | 552 | value = 0xff; |
| 553 | value &= ~ | |
| 553 | value &= ~ | |
| 554 | 554 | |
| 555 | 555 | /* Shift Lock is mapped on Left/Right Shift */ |
| 556 | if ((i == 1) && ( | |
| 556 | if ((i == 1) && ( | |
| 557 | 557 | value &= ~0x80; |
| 558 | 558 | |
| 559 | 559 | state->m_keyline[i] = value; |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | if ( | |
| 562 | if ( | |
| 563 | 563 | { |
| 564 | 564 | value = 0xff; |
| 565 | if ( | |
| 565 | if ( | |
| 566 | 566 | { |
| 567 | if ( | |
| 567 | if ( | |
| 568 | 568 | value &= ~0x80; |
| 569 | 569 | else |
| 570 | 570 | value &= ~0x40; |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | value &= ~( | |
| 573 | value &= ~( | |
| 574 | 574 | |
| 575 | if ( | |
| 575 | if ( | |
| 576 | 576 | state->m_keyline[9] = value; |
| 577 | 577 | else |
| 578 | 578 | state->m_keyline[8] = value; |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | if ( | |
| 581 | if ( | |
| 582 | 582 | { |
| 583 | 583 | value = 0xff; |
| 584 | if ( | |
| 584 | if ( | |
| 585 | 585 | { |
| 586 | if ( | |
| 586 | if ( | |
| 587 | 587 | value &= ~0x40; |
| 588 | 588 | else |
| 589 | 589 | value &= ~0x80; |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | value &= ~( | |
| 592 | value &= ~( | |
| 593 | 593 | |
| 594 | if ( | |
| 594 | if ( | |
| 595 | 595 | state->m_keyline[8] = value; |
| 596 | 596 | else |
| 597 | 597 | state->m_keyline[9] = value; |
| r15082 | r15083 | |
| 609 | 609 | #endif |
| 610 | 610 | } |
| 611 | 611 | |
| 612 | set_led_status(device->machine(), 1, input_port_read(device->machine(), "SPECIAL") & 0x80 ? 1 : 0); /* Shift Lock */ | |
| 613 | set_led_status(device->machine(), 0, input_port_read(device->machine(), "SPECIAL") & 0x40 ? 1 : 0); /* Joystick Swap */ | |
| 612 | set_led_status(device->machine(), 1, device->machine().root_device().ioport("SPECIAL")->read() & 0x80 ? 1 : 0); /* Shift Lock */ | |
| 613 | set_led_status(device->machine(), 0, device->machine().root_device().ioport("SPECIAL")->read() & 0x40 ? 1 : 0); /* Joystick Swap */ | |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | 616 |
| r15082 | r15083 | |
|---|---|---|
| 311 | 311 | |
| 312 | 312 | switch (m_y) |
| 313 | 313 | { |
| 314 | case 0: data &= input_port_read(*this, "X0"); break; | |
| 315 | case 1: data &= input_port_read(*this, "X1"); break; | |
| 316 | case 2: data &= input_port_read(*this, "X2"); break; | |
| 317 | case 3: data &= input_port_read(*this, "X3"); break; | |
| 318 | case 4: data &= input_port_read(*this, "X4"); break; | |
| 319 | case 5: data &= input_port_read(*this, "X5"); break; | |
| 320 | case 6: data &= input_port_read(*this, "X6"); break; | |
| 321 | case 7: data &= input_port_read(*this, "X7"); break; | |
| 322 | case 8: data &= input_port_read(*this, "X8"); break; | |
| 323 | case 9: data &= input_port_read(*this, "X9"); break; | |
| 324 | case 0xa: data &= input_port_read(*this, "XA"); break; | |
| 325 | case 0xb: data &= input_port_read(*this, "XB"); break; | |
| 314 | case 0: data &= ioport("X0")->read(); break; | |
| 315 | case 1: data &= ioport("X1")->read(); break; | |
| 316 | case 2: data &= ioport("X2")->read(); break; | |
| 317 | case 3: data &= ioport("X3")->read(); break; | |
| 318 | case 4: data &= ioport("X4")->read(); break; | |
| 319 | case 5: data &= ioport("X5")->read(); break; | |
| 320 | case 6: data &= ioport("X6")->read(); break; | |
| 321 | case 7: data &= ioport("X7")->read(); break; | |
| 322 | case 8: data &= ioport("X8")->read(); break; | |
| 323 | case 9: data &= ioport("X9")->read(); break; | |
| 324 | case 0xa: data &= ioport("XA")->read(); break; | |
| 325 | case 0xb: data &= ioport("XB")->read(); break; | |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 245 | 245 | { |
| 246 | 246 | switch (offset & 0x07) |
| 247 | 247 | { |
| 248 | case 0: data |= input_port_read(*this, "KB0"); break; | |
| 249 | case 1: data |= input_port_read(*this, "KB1"); break; | |
| 250 | case 2: data |= input_port_read(*this, "KB2"); break; | |
| 251 | case 3: data |= input_port_read(*this, "KB3"); break; | |
| 252 | case 4: data |= input_port_read(*this, "KB4"); break; | |
| 253 | case 5: data |= input_port_read(*this, "KB5"); break; | |
| 254 | case 6: data |= input_port_read(*this, "KB6"); break; | |
| 255 | case 7: data |= input_port_read(*this, "KB7"); break; | |
| 248 | case 0: data |= ioport("KB0")->read(); break; | |
| 249 | case 1: data |= ioport("KB1")->read(); break; | |
| 250 | case 2: data |= ioport("KB2")->read(); break; | |
| 251 | case 3: data |= ioport("KB3")->read(); break; | |
| 252 | case 4: data |= ioport("KB4")->read(); break; | |
| 253 | case 5: data |= ioport("KB5")->read(); break; | |
| 254 | case 6: data |= ioport("KB6")->read(); break; | |
| 255 | case 7: data |= ioport("KB7")->read(); break; | |
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | 258 | else if (BIT(offset, 5)) |
| r15082 | r15083 | |
|---|---|---|
| 127 | 127 | for( i = 0; i < 14; i++ ) |
| 128 | 128 | { |
| 129 | 129 | if( !(offset & 1) ) |
| 130 | data |= i | |
| 130 | data |= iop | |
| 131 | 131 | |
| 132 | 132 | offset = offset >> 1; |
| 133 | 133 | } |
| r15082 | r15083 | |
|---|---|---|
| 178 | 178 | PORT_CONFSETTING( 0x07, "Off" ) |
| 179 | 179 | |
| 180 | 180 | PORT_START("JOY1_1B") |
| 181 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 182 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 183 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 184 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 185 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 181 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 182 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 183 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 184 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 185 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 186 | 186 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 187 | 187 | |
| 188 | 188 | PORT_START("JOY2_1B") |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 191 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 192 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 193 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 191 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 192 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 193 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 194 | 194 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 195 | 195 | |
| 196 | 196 | /* Mouse Commodore 1350 was basically working as a Joystick */ |
| 197 | 197 | PORT_START("JOY1_2B") |
| 198 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Up") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 199 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Down") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 200 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Left") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 201 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Right") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 202 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 1") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 203 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 2") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 198 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Up") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 199 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Down") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 200 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Left") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 201 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Right") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 202 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 1") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 203 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 2") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 204 | 204 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 205 | 205 | |
| 206 | 206 | /* Still to verify how many mices you were able to plug into a c64 */ |
| r15082 | r15083 | |
| 208 | 208 | PORT_START("JOY2_2B") |
| 209 | 209 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 210 | 210 | /* PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) |
| 211 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 212 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 213 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 214 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 215 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_PGUP) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 211 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 212 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 213 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 214 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 215 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_PGUP) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 216 | 216 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 217 | 217 | */ |
| 218 | 218 | PORT_START("PADDLE1") |
| 219 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 219 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 220 | 220 | |
| 221 | 221 | PORT_START("PADDLE2") |
| 222 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_DOWN) PORT_CODE_INC(KEYCODE_UP) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 222 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_DOWN) PORT_CODE_INC(KEYCODE_UP) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 223 | 223 | |
| 224 | 224 | PORT_START("PADDLE3") |
| 225 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_PGUP) PORT_PLAYER(3) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 225 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_PGUP) PORT_PLAYER(3) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 226 | 226 | |
| 227 | 227 | PORT_START("PADDLE4") |
| 228 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(4) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 228 | PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(4) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 229 | 229 | |
| 230 | 230 | PORT_START("TRACKX") |
| 231 | PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 231 | PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 232 | 232 | |
| 233 | 233 | PORT_START("TRACKY") |
| 234 | PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 234 | PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, | |
| 235 | 235 | |
| 236 | 236 | PORT_START("LIGHTX") |
| 237 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_NAME("Lightpen X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 237 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_NAME("Lightpen X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 238 | 238 | |
| 239 | 239 | PORT_START("LIGHTY") |
| 240 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_NAME("Lightpen Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 240 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_NAME("Lightpen Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 241 | 241 | |
| 242 | 242 | PORT_START("OTHER") |
| 243 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Paddle 1 Button") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 244 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Paddle 2 Button") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 245 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Paddle 3 Button") PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 246 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Paddle 4 Button") PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 247 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightpen Signal") PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 248 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button Left") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 249 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Button Right") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 243 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Paddle 1 Button") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 244 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Paddle 2 Button") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 245 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Paddle 3 Button") PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 246 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Paddle 4 Button") PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 247 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightpen Signal") PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04) | |
| 248 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button Left") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 249 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Button Right") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 250 | 250 | INPUT_PORTS_END |
| 251 | 251 | |
| 252 | 252 | |
| r15082 | r15083 | |
| 346 | 346 | PORT_CONFSETTING( 0x10, "No Device Connected" ) |
| 347 | 347 | |
| 348 | 348 | PORT_START("JOY0") |
| 349 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_NAME("P1 Up") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 350 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_NAME("P1 Down") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 351 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("P1 Left") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 352 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("P1 Right") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 353 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P1 Button") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 349 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_NAME("P1 Up") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 350 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_NAME("P1 Down") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 351 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("P1 Left") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 352 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("P1 Right") PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 353 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P1 Button") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 354 | 354 | |
| 355 | 355 | PORT_START("JOY1") |
| 356 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_NAME("P2 Up") PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 357 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_NAME("P2 Down") PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 358 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("P2 Left") PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 359 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("P2 Right") PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 360 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P2 Button") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 356 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_NAME("P2 Up") PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 357 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_NAME("P2 Down") PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 358 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_NAME("P2 Left") PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 359 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_NAME("P2 Right") PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 360 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P2 Button") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 361 | 361 | INPUT_PORTS_END |
| 362 | 362 | |
| 363 | 363 | |
| r15082 | r15083 | |
| 1056 | 1056 | int bit_mask = (FPTR)param; |
| 1057 | 1057 | UINT8 port = 0; |
| 1058 | 1058 | |
| 1059 | if ((input_port_read(field.machine(), "CTRLSEL") & 0xf0) == 0x10) | |
| 1060 | port |= (input_port_read(field.machine(), "FAKE0") & bit_mask) ? 1 : 0; | |
| 1059 | if ((field.machine().root_device().ioport("CTRLSEL")->read() & 0xf0) == 0x10) | |
| 1060 | port |= (field.machine().root_device().ioport("FAKE0")->read() & bit_mask) ? 1 : 0; | |
| 1061 | 1061 | |
| 1062 | if ((input_port_read(field.machine(), "CTRLSEL") & 0xf0) == 0x00) | |
| 1063 | port |= (input_port_read(field.machine(), "FAKE1") & bit_mask) ? 1 : 0; | |
| 1062 | if ((field.machine().root_device().ioport("CTRLSEL")->read() & 0xf0) == 0x00) | |
| 1063 | port |= (field.machine().root_device().ioport("FAKE1")->read() & bit_mask) ? 1 : 0; | |
| 1064 | 1064 | |
| 1065 | 1065 | return port; |
| 1066 | 1066 | } |
| r15082 | r15083 | |
| 1074 | 1074 | |
| 1075 | 1075 | PORT_START( "JOY" ) |
| 1076 | 1076 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vic_custom_inputs, (void *)0x02) |
| 1077 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Lightpen Signal") PORT_CODE(KEYCODE_LALT) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1077 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Lightpen Signal") PORT_CODE(KEYCODE_LALT) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1078 | 1078 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vic_custom_inputs, (void *)0x01) |
| 1079 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 1080 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 1081 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 1079 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 1080 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 1081 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 1082 | 1082 | |
| 1083 | 1083 | PORT_START( "FAKE0" ) |
| 1084 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Paddle 2 Button") PORT_CODE(KEYCODE_DEL) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1085 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Paddle 1 Button") PORT_CODE(KEYCODE_INSERT) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1084 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Paddle 2 Button") PORT_CODE(KEYCODE_DEL) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1085 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Paddle 1 Button") PORT_CODE(KEYCODE_INSERT) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1086 | 1086 | |
| 1087 | 1087 | PORT_START( "FAKE1" ) |
| 1088 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 1089 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 1088 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 1089 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 1090 | 1090 | |
| 1091 | 1091 | PORT_START( "PADDLE0" ) |
| 1092 | PORT_BIT( 0xff,128,IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_PGUP) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1092 | PORT_BIT( 0xff,128,IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_PGUP) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1093 | 1093 | |
| 1094 | 1094 | PORT_START( "PADDLE1" ) |
| 1095 | PORT_BIT( 0xff,128,IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1095 | PORT_BIT( 0xff,128,IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, | |
| 1096 | 1096 | INPUT_PORTS_END |
| 1097 | 1097 | |
| 1098 | 1098 | SLOT_INTERFACE_START( cbm_iec_devices ) |
| r15082 | r15083 | |
|---|---|---|
| 70 | 70 | { |
| 71 | 71 | UINT8 keycode; |
| 72 | 72 | if (m_keyboard_cnt!=0 && m_keyboard_cnt<11) { |
| 73 | keycode = i | |
| 73 | keycode = iop | |
| 74 | 74 | } else { |
| 75 | 75 | keycode = 0xff; |
| 76 | 76 | } |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | UINT8 c64_4dxh_device::c64_pb_r(address_space &space, offs_t offset) |
| 87 | 87 | { |
| 88 | return i | |
| 88 | return iop | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| r15082 | r15083 | |
| 95 | 95 | |
| 96 | 96 | int c64_4dxh_device::c64_pa2_r() |
| 97 | 97 | { |
| 98 | return BIT(i | |
| 98 | return BIT(iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 |
| r15082 | r15083 | |
|---|---|---|
| 391 | 391 | |
| 392 | 392 | UINT8 data = 0xff; |
| 393 | 393 | |
| 394 | if (!BIT(m_kb_y, 0)) data &= input_port_read(*this, "Y1"); | |
| 395 | if (!BIT(m_kb_y, 1)) data &= input_port_read(*this, "Y2"); | |
| 396 | if (!BIT(m_kb_y, 2)) data &= input_port_read(*this, "Y3"); | |
| 397 | if (!BIT(m_kb_y, 3)) data &= input_port_read(*this, "Y4"); | |
| 398 | if (!BIT(m_kb_y, 4)) data &= input_port_read(*this, "Y5"); | |
| 399 | if (!BIT(m_kb_y, 5)) data &= input_port_read(*this, "Y6"); | |
| 400 | if (!BIT(m_kb_y, 6)) data &= input_port_read(*this, "Y7"); | |
| 401 | if (!BIT(m_kb_y, 7)) data &= input_port_read(*this, "Y8"); | |
| 402 | if (!BIT(m_kb_y, 8)) data &= input_port_read(*this, "Y9"); | |
| 403 | if (!BIT(m_kb_y, 9)) data &= input_port_read(*this, "Y10"); | |
| 404 | if (!BIT(m_kb_y, 10)) data &= input_port_read(*this, "Y11"); | |
| 405 | if (!m_joy_com) data &= input_port_read(*this, "COM"); | |
| 394 | if (!BIT(m_kb_y, 0)) data &= ioport("Y1")->read(); | |
| 395 | if (!BIT(m_kb_y, 1)) data &= ioport("Y2")->read(); | |
| 396 | if (!BIT(m_kb_y, 2)) data &= ioport("Y3")->read(); | |
| 397 | if (!BIT(m_kb_y, 3)) data &= ioport("Y4")->read(); | |
| 398 | if (!BIT(m_kb_y, 4)) data &= ioport("Y5")->read(); | |
| 399 | if (!BIT(m_kb_y, 5)) data &= ioport("Y6")->read(); | |
| 400 | if (!BIT(m_kb_y, 6)) data &= ioport("Y7")->read(); | |
| 401 | if (!BIT(m_kb_y, 7)) data &= ioport("Y8")->read(); | |
| 402 | if (!BIT(m_kb_y, 8)) data &= ioport("Y9")->read(); | |
| 403 | if (!BIT(m_kb_y, 9)) data &= ioport("Y10")->read(); | |
| 404 | if (!BIT(m_kb_y, 10)) data &= ioport("Y11")->read(); | |
| 405 | if (!m_joy_com) data &= ioport("COM")->read(); | |
| 406 | 406 | |
| 407 | 407 | return data; |
| 408 | 408 | } |
| r15082 | r15083 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | static READ8_DEVICE_HANDLER( riot_joystick_r ) |
| 42 | 42 | { |
| 43 | return | |
| 43 | return | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | static READ8_DEVICE_HANDLER( riot_console_button_r ) |
| 47 | 47 | { |
| 48 | return | |
| 48 | return | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | static WRITE8_DEVICE_HANDLER( riot_button_pullup_w ) |
| r15082 | r15083 | |
| 482 | 482 | still return a reasonable value */ |
| 483 | 483 | return 0x00; |
| 484 | 484 | case 0x08: |
| 485 | return((i | |
| 485 | return((iop | |
| 486 | 486 | case 0x09: |
| 487 | return((i | |
| 487 | return((iop | |
| 488 | 488 | case 0x0A: |
| 489 | return((i | |
| 489 | return((iop | |
| 490 | 490 | case 0x0B: |
| 491 | return((i | |
| 491 | return((iop | |
| 492 | 492 | case 0x0c: |
| 493 | if(((i | |
| 493 | if(((iop | |
| 494 | 494 | return 0x00; |
| 495 | 495 | else |
| 496 | 496 | return 0x80; |
| 497 | 497 | case 0x0d: |
| 498 | if(((i | |
| 498 | if(((iop | |
| 499 | 499 | return 0x00; |
| 500 | 500 | else |
| 501 | 501 | return 0x80; |
| r15082 | r15083 | |
|---|---|---|
| 62 | 62 | static INPUT_CHANGED( kbd_update ) |
| 63 | 63 | { |
| 64 | 64 | int index = (int)(FPTR)param, i; |
| 65 | UINT32 oldvalue = oldval * field.mask, newvalue = newval * field.mask; | |
| 65 | UINT32 oldvalue = oldval * field.mask(), newvalue = newval * field.mask(); | |
| 66 | 66 | UINT32 delta = oldvalue ^ newvalue; |
| 67 | 67 | |
| 68 | 68 | /* Special case Page UP, which we will use as Action Replay button */ |
| r15082 | r15083 | |
|---|---|---|
| 104 | 104 | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", "KEY8" }; |
| 105 | 105 | |
| 106 | 106 | if (m_portstat.stat_count < 9) |
| 107 | return (i | |
| 107 | return (iop | |
| 108 | 108 | |
| 109 | 109 | return (0xff); |
| 110 | 110 | } |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | { |
| 135 | 135 | case MACHINE_PHASE_RESET: |
| 136 | 136 | case MACHINE_PHASE_RUNNING: |
| 137 | result = in | |
| 137 | result = machine.root_device().ioport | |
| 138 | 138 | break; |
| 139 | 139 | |
| 140 | 140 | default: |
| r15082 | r15083 | |
| 163 | 163 | **************************************************************/ |
| 164 | 164 | static READ8_DEVICE_HANDLER (via_0_in_a ) |
| 165 | 165 | { |
| 166 | int data = | |
| 166 | int data = | |
| 167 | 167 | LOG(("microtan_via_0_in_a %02X\n", data)); |
| 168 | 168 | return data; |
| 169 | 169 | } |
| r15082 | r15083 | |
| 439 | 439 | |
| 440 | 440 | |
| 441 | 441 | row = 9; |
| 442 | newvar = | |
| 442 | newvar = | |
| 443 | 443 | chg = state->m_keyrows[--row] ^ newvar; |
| 444 | 444 | |
| 445 | 445 | while ( !chg && row > 0) |
| 446 | 446 | { |
| 447 | newvar = | |
| 447 | newvar = | |
| 448 | 448 | chg = state->m_keyrows[--row] ^ newvar; |
| 449 | 449 | } |
| 450 | 450 | if (!chg) |
| r15082 | r15083 | |
| 579 | 579 | |
| 580 | 580 | for (i = 1; i < 10; i++) |
| 581 | 581 | { |
| 582 | state->m_keyrows[i] = in | |
| 582 | state->m_keyrows[i] = machine.root_device().ioport | |
| 583 | 583 | } |
| 584 | 584 | set_led_status(machine, 1, (state->m_keyrows[3] & 0x80) ? 0 : 1); |
| 585 | 585 | } |
| r15082 | r15083 | |
|---|---|---|
| 47 | 47 | int i; |
| 48 | 48 | UINT8 code; |
| 49 | 49 | UINT8 key_code = 0; |
| 50 | UINT8 shift = input_port_read(machine, "LINEC") & 0x02 ? 1 : 0; | |
| 51 | UINT8 ctrl = input_port_read(machine, "LINEC") & 0x01 ? 1 : 0; | |
| 50 | UINT8 shift = machine.root_device().ioport("LINEC")->read() & 0x02 ? 1 : 0; | |
| 51 | UINT8 ctrl = machine.root_device().ioport("LINEC")->read() & 0x01 ? 1 : 0; | |
| 52 | 52 | |
| 53 | 53 | for(i = 0; i < 7; i++) |
| 54 | 54 | { |
| 55 | 55 | |
| 56 | code = in | |
| 56 | code = machine.root_device().ioport | |
| 57 | 57 | if (code != 0) |
| 58 | 58 | { |
| 59 | 59 | if (i==0 && shift==0) { |
| r15082 | r15083 | |
| 139 | 139 | i8251_device *uart = machine.device<i8251_device>("uart"); |
| 140 | 140 | serial_source_device *ser = machine.device<serial_source_device>("sercas"); |
| 141 | 141 | |
| 142 | // if (!(in | |
| 142 | // if (!(machine.root_device().ioport | |
| 143 | 143 | //{ |
| 144 | 144 | /* tape reading */ |
| 145 | 145 | if (machine.device<cassette_image_device>(CASSETTE_TAG)->get_state()&CASSETTE_PLAY) |
| r15082 | r15083 | |
|---|---|---|
| 196 | 196 | if (state->m_mouse_index == 2) |
| 197 | 197 | { |
| 198 | 198 | /* update values */ |
| 199 | int mouse_x = input_port_read(machine, "mouse_x"); | |
| 200 | int mouse_y = input_port_read(machine, "mouse_y"); | |
| 199 | int mouse_x = machine.root_device().ioport("mouse_x")->read(); | |
| 200 | int mouse_y = machine.root_device().ioport("mouse_y")->read(); | |
| 201 | 201 | |
| 202 | 202 | int mouse_dx = state->m_mouse_x - mouse_x; |
| 203 | 203 | int mouse_dy = state->m_mouse_y - mouse_y; |
| r15082 | r15083 | |
| 206 | 206 | state->m_mouse_y = mouse_y; |
| 207 | 207 | |
| 208 | 208 | /* button state */ |
| 209 | state->m_mouse_data[2] = in | |
| 209 | state->m_mouse_data[2] = machine.root_device().ioport | |
| 210 | 210 | |
| 211 | 211 | /* y-axis */ |
| 212 | 212 | state->m_mouse_data[3] = (mouse_dy & 0xf00) >> 8; |
| r15082 | r15083 | |
| 261 | 261 | state->m_mouse_data[0] = 0xff; |
| 262 | 262 | state->m_mouse_data[1] = 0xff; |
| 263 | 263 | |
| 264 | if (in | |
| 264 | if (machine.root_device().ioport | |
| 265 | 265 | { |
| 266 | 266 | /* install RTC */ |
| 267 | 267 | device_t *rtc = machine.device("sambus_clock"); |
| r15082 | r15083 | |
|---|---|---|
| 703 | 703 | READ8_MEMBER( trs80_state::trs80_wd179x_r ) |
| 704 | 704 | { |
| 705 | 705 | UINT8 data = 0xff; |
| 706 | if (BIT(i | |
| 706 | if (BIT(iop | |
| 707 | 707 | data = wd17xx_status_r(m_fdc, offset); |
| 708 | 708 | |
| 709 | 709 | return data; |
| r15082 | r15083 | |
| 823 | 823 | UINT8 result = 0; |
| 824 | 824 | |
| 825 | 825 | if (offset & 1) |
| 826 | result |= i | |
| 826 | result |= iop | |
| 827 | 827 | if (offset & 2) |
| 828 | result |= i | |
| 828 | result |= iop | |
| 829 | 829 | if (offset & 4) |
| 830 | result |= i | |
| 830 | result |= iop | |
| 831 | 831 | if (offset & 8) |
| 832 | result |= i | |
| 832 | result |= iop | |
| 833 | 833 | if (offset & 16) |
| 834 | result |= i | |
| 834 | result |= iop | |
| 835 | 835 | if (offset & 32) |
| 836 | result |= i | |
| 836 | result |= iop | |
| 837 | 837 | if (offset & 64) |
| 838 | result |= i | |
| 838 | result |= iop | |
| 839 | 839 | if (offset & 128) |
| 840 | result |= i | |
| 840 | result |= iop | |
| 841 | 841 | |
| 842 | 842 | return result; |
| 843 | 843 | } |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | data |= ((machine().device<cassette_image_device>(CASSETTE_TAG))->input() < 0.1) ? 0x04 : 0x00; |
| 95 | 95 | |
| 96 | 96 | // bit 1 - reset button |
| 97 | data |= (i | |
| 97 | data |= (iop | |
| 98 | 98 | |
| 99 | 99 | // bit 0 - keyboard |
| 100 | data |= (i | |
| 100 | data |= (iop | |
| 101 | 101 | |
| 102 | 102 | return data; |
| 103 | 103 | } |
| r15082 | r15083 | |
| 195 | 195 | |
| 196 | 196 | WRITE8_MEMBER(primo_state::primo_FD_w) |
| 197 | 197 | { |
| 198 | if (!i | |
| 198 | if (!iop | |
| 199 | 199 | { |
| 200 | 200 | m_port_FD = data; |
| 201 | 201 | primo_update_memory(machine()); |
| r15082 | r15083 | |
| 243 | 243 | static void primo_common_machine_init (running_machine &machine) |
| 244 | 244 | { |
| 245 | 245 | primo_state *state = machine.driver_data<primo_state>(); |
| 246 | if (in | |
| 246 | if (machine.root_device().ioport | |
| 247 | 247 | state->m_port_FD = 0x00; |
| 248 | 248 | primo_update_memory(machine); |
| 249 | machine.device("maincpu")->set_clock_scale(in | |
| 249 | machine.device("maincpu")->set_clock_scale(machine.root_device().ioport | |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | MACHINE_RESET( primoa ) |
| r15082 | r15083 | |
|---|---|---|
| 83 | 83 | t.cat(":multiface"); |
| 84 | 84 | if (m_multiface_ram!=NULL) |
| 85 | 85 | { |
| 86 | if ((i | |
| 86 | if ((iop | |
| 87 | 87 | { |
| 88 | 88 | return 1; |
| 89 | 89 | } |
| r15082 | r15083 | |
| 135 | 135 | return; |
| 136 | 136 | t.cat(":multiface"); |
| 137 | 137 | // TODO: reset button |
| 138 | if (i | |
| 138 | if (iop | |
| 139 | 139 | { |
| 140 | 140 | multiface_stop(); |
| 141 | 141 | } |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | data |= 0x80; |
| 153 | 153 | if (!svi318_cassette_present(device->machine(), 0)) |
| 154 | 154 | data |= 0x40; |
| 155 | data |= | |
| 155 | data |= | |
| 156 | 156 | |
| 157 | 157 | return data; |
| 158 | 158 | } |
| r15082 | r15083 | |
| 181 | 181 | |
| 182 | 182 | row = state->m_svi.keyboard_row; |
| 183 | 183 | if (row <= 10) |
| 184 | return | |
| 184 | return | |
| 185 | 185 | |
| 186 | 186 | return 0xff; |
| 187 | 187 | } |
| r15082 | r15083 | |
| 258 | 258 | |
| 259 | 259 | READ8_MEMBER(svi318_state::svi318_psg_port_a_r) |
| 260 | 260 | { |
| 261 | return i | |
| 261 | return iop | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /* |
| r15082 | r15083 | |
|---|---|---|
| 205 | 205 | UINT8 data = pc_lpt_r(lpt, offset); |
| 206 | 206 | |
| 207 | 207 | if (offset == 1) |
| 208 | data = (data & ~7) | ( | |
| 208 | data = (data & ~7) | ( | |
| 209 | 209 | if (offset == 2) |
| 210 | data = (data & ~0xe0) | ( | |
| 210 | data = (data & ~0xe0) | ( | |
| 211 | 211 | |
| 212 | 212 | return data; |
| 213 | 213 | } |
| r15082 | r15083 | |
| 218 | 218 | UINT8 data = pc_lpt_r(lpt, offset); |
| 219 | 219 | |
| 220 | 220 | if (offset == 1) |
| 221 | data = (data & ~7) | ( | |
| 221 | data = (data & ~7) | ( | |
| 222 | 222 | if (offset == 2) |
| 223 | data = (data & ~0xe0) | ( | |
| 223 | data = (data & ~0xe0) | ( | |
| 224 | 224 | |
| 225 | 225 | return data; |
| 226 | 226 | } |
| r15082 | r15083 | |
| 232 | 232 | UINT8 data = pc_lpt_r(lpt, offset); |
| 233 | 233 | |
| 234 | 234 | if (offset == 1) |
| 235 | data=(data & ~7) | ( | |
| 235 | data=(data & ~7) | ( | |
| 236 | 236 | if (offset == 2) |
| 237 | 237 | { |
| 238 | 238 | switch (pc1640.dipstate) |
| 239 | 239 | { |
| 240 | 240 | case 0: |
| 241 | data = (data&~0xe0) | ( | |
| 241 | data = (data&~0xe0) | ( | |
| 242 | 242 | break; |
| 243 | 243 | case 1: |
| 244 | data = (data&~0xe0) | (( | |
| 244 | data = (data&~0xe0) | (( | |
| 245 | 245 | break; |
| 246 | 246 | case 2: |
| 247 | data = (data&~0xe0) | (( | |
| 247 | data = (data&~0xe0) | (( | |
| 248 | 248 | break; |
| 249 | 249 | |
| 250 | 250 | } |
| r15082 | r15083 | |
| 274 | 274 | |
| 275 | 275 | static READ8_HANDLER( pc1640_mouse_x_r ) |
| 276 | 276 | { |
| 277 | return pc1640.mouse.x - | |
| 277 | return pc1640.mouse.x - | |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | static READ8_HANDLER( pc1640_mouse_y_r ) |
| 281 | 281 | { |
| 282 | return pc1640.mouse.y - | |
| 282 | return pc1640.mouse.y - | |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | static WRITE8_HANDLER( pc1640_mouse_x_w ) |
| 286 | 286 | { |
| 287 | pc1640.mouse.x = data + | |
| 287 | pc1640.mouse.x = data + | |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | static WRITE8_HANDLER( pc1640_mouse_y_w ) |
| 291 | 291 | { |
| 292 | pc1640.mouse.y = data + | |
| 292 | pc1640.mouse.y = data + | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | READ16_HANDLER( pc1640_16le_mouse_x_r ) { return read16le_with_read8_handler(pc1640_mouse_x_r, space, offset, mem_mask); } |
| r15082 | r15083 | |
|---|---|---|
| 957 | 957 | switch( data ) |
| 958 | 958 | { |
| 959 | 959 | case 0x10: /* Read Y cursors: Y1 - Y2 - Y3 - Y4 */ |
| 960 | input = i | |
| 960 | input = iop | |
| 961 | 961 | if (state->m_rotate) // reorient controls if the console is rotated |
| 962 | 962 | { |
| 963 | 963 | if (input & 0x01) data |= 0x02; |
| r15082 | r15083 | |
| 969 | 969 | data = data | input; |
| 970 | 970 | break; |
| 971 | 971 | case 0x20: /* Read X cursors: X1 - X2 - X3 - X4 */ |
| 972 | input = i | |
| 972 | input = iop | |
| 973 | 973 | if (state->m_rotate) // reorient controls if the console is rotated |
| 974 | 974 | { |
| 975 | 975 | if (input & 0x01) data |= 0x02; |
| r15082 | r15083 | |
| 981 | 981 | data = data | input; |
| 982 | 982 | break; |
| 983 | 983 | case 0x40: /* Read buttons: START - A - B */ |
| 984 | data = data | i | |
| 984 | data = data | iop | |
| 985 | 985 | break; |
| 986 | 986 | } |
| 987 | 987 | break; |
| r15082 | r15083 | |
|---|---|---|
| 27 | 27 | |
| 28 | 28 | static TIMER_CALLBACK( lightpen_tick ) |
| 29 | 29 | { |
| 30 | if (((in | |
| 30 | if (((machine.root_device().ioport | |
| 31 | 31 | { |
| 32 | 32 | /* enable lightpen crosshair */ |
| 33 | 33 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 42 | 42 | void cbm_common_interrupt( device_t *device ) |
| 43 | 43 | { |
| 44 | 44 | int value, i; |
| 45 | int controller1 = input_port_read(device->machine(), "CTRLSEL") & 0x07; | |
| 46 | int controller2 = input_port_read(device->machine(), "CTRLSEL") & 0x70; | |
| 45 | int controller1 = device->machine().root_device().ioport("CTRLSEL")->read() & 0x07; | |
| 46 | int controller2 = device->machine().root_device().ioport("CTRLSEL")->read() & 0x70; | |
| 47 | 47 | static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" }; |
| 48 | 48 | |
| 49 | 49 | /* Lines 0-7 : common keyboard */ |
| 50 | 50 | for (i = 0; i < 8; i++) |
| 51 | 51 | { |
| 52 | 52 | value = 0xff; |
| 53 | value &= ~ | |
| 53 | value &= ~ | |
| 54 | 54 | |
| 55 | 55 | /* Shift Lock is mapped on Left Shift */ |
| 56 | if ((i == 1) && ( | |
| 56 | if ((i == 1) && ( | |
| 57 | 57 | value &= ~0x80; |
| 58 | 58 | |
| 59 | 59 | c64_keyline[i] = value; |
| r15082 | r15083 | |
| 64 | 64 | switch(controller1) |
| 65 | 65 | { |
| 66 | 66 | case 0x00: |
| 67 | value &= ~ | |
| 67 | value &= ~ | |
| 68 | 68 | break; |
| 69 | 69 | |
| 70 | 70 | case 0x01: |
| 71 | if ( | |
| 71 | if ( | |
| 72 | 72 | value &= ~0x08; |
| 73 | if ( | |
| 73 | if ( | |
| 74 | 74 | value &= ~0x04; |
| 75 | 75 | break; |
| 76 | 76 | |
| 77 | 77 | case 0x02: |
| 78 | if ( | |
| 78 | if ( | |
| 79 | 79 | value &= ~0x10; |
| 80 | if ( | |
| 80 | if ( | |
| 81 | 81 | value &= ~0x01; |
| 82 | 82 | break; |
| 83 | 83 | |
| 84 | 84 | case 0x03: |
| 85 | value &= ~( | |
| 85 | value &= ~( | |
| 86 | 86 | break; |
| 87 | 87 | |
| 88 | 88 | case 0x04: |
| 89 | 89 | /* was there any input on the lightpen? where is it mapped? */ |
| 90 | // if ( | |
| 90 | // if ( | |
| 91 | 91 | // value &= ?? ; |
| 92 | 92 | break; |
| 93 | 93 | |
| r15082 | r15083 | |
| 106 | 106 | switch(controller2) |
| 107 | 107 | { |
| 108 | 108 | case 0x00: |
| 109 | value &= ~ | |
| 109 | value &= ~ | |
| 110 | 110 | break; |
| 111 | 111 | |
| 112 | 112 | case 0x10: |
| 113 | if ( | |
| 113 | if ( | |
| 114 | 114 | value &= ~0x08; |
| 115 | if ( | |
| 115 | if ( | |
| 116 | 116 | value &= ~0x04; |
| 117 | 117 | break; |
| 118 | 118 | |
| 119 | 119 | case 0x20: |
| 120 | if ( | |
| 120 | if ( | |
| 121 | 121 | value &= ~0x10; |
| 122 | if ( | |
| 122 | if ( | |
| 123 | 123 | value &= ~0x01; |
| 124 | 124 | break; |
| 125 | 125 | |
| 126 | 126 | case 0x30: |
| 127 | value &= ~( | |
| 127 | value &= ~( | |
| 128 | 128 | break; |
| 129 | 129 | |
| 130 | 130 | case 0x40: |
| 131 | 131 | /* was there any input on the lightpen? where is it mapped? */ |
| 132 | // if ( | |
| 132 | // if ( | |
| 133 | 133 | // value &= ?? ; |
| 134 | 134 | break; |
| 135 | 135 | |
| r15082 | r15083 | |
| 149 | 149 | /* check if lightpen has been chosen as input: if so, enable crosshair */ |
| 150 | 150 | device->machine().scheduler().timer_set(attotime::zero, FUNC(lightpen_tick)); |
| 151 | 151 | |
| 152 | set_led_status (device->machine(), 1, input_port_read(device->machine(), "SPECIAL") & 0x40 ? 1 : 0); /* Shift Lock */ | |
| 153 | set_led_status (device->machine(), 0, input_port_read(device->machine(), "CTRLSEL") & 0x80 ? 1 : 0); /* Joystick Swap */ | |
| 152 | set_led_status (device->machine(), 1, device->machine().root_device().ioport("SPECIAL")->read() & 0x40 ? 1 : 0); /* Shift Lock */ | |
| 153 | set_led_status (device->machine(), 0, device->machine().root_device().ioport("CTRLSEL")->read() & 0x80 ? 1 : 0); /* Joystick Swap */ | |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | |
| r15082 | r15083 | |
| 297 | 297 | value &= t; |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | if ( | |
| 300 | if ( | |
| 301 | 301 | value &= c64_keyline[8]; |
| 302 | 302 | else |
| 303 | 303 | value &= c64_keyline[9]; |
| r15082 | r15083 | |
| 318 | 318 | if (!(output_a & 0x02)) value &= c64_keyline[1]; |
| 319 | 319 | if (!(output_a & 0x01)) value &= c64_keyline[0]; |
| 320 | 320 | |
| 321 | if ( | |
| 321 | if ( | |
| 322 | 322 | value &= c64_keyline[9]; |
| 323 | 323 | else |
| 324 | 324 | value &= c64_keyline[8]; |
| r15082 | r15083 | |
|---|---|---|
| 149 | 149 | if ( --state->m_lx383_downsampler == 0 ) |
| 150 | 150 | { |
| 151 | 151 | state->m_lx383_downsampler = LX383_DOWNSAMPLING; |
| 152 | key_bits = (input_port_read(machine, "ROW1") << 8) | input_port_read(machine, "ROW0"); | |
| 153 | // rst = input_port_read(machine, "RST"); | |
| 154 | ctrl = input_port_read(machine, "CTRL"); | |
| 152 | key_bits = (machine.root_device().ioport("ROW1")->read() << 8) | machine.root_device().ioport("ROW0")->read(); | |
| 153 | // rst = machine.root_device().ioport("RST")->read(); | |
| 154 | ctrl = machine.root_device().ioport("CTRL")->read(); | |
| 155 | 155 | |
| 156 | 156 | for ( i = 0; i<LX383_KEYS; i++) |
| 157 | 157 | { |
| r15082 | r15083 | |
| 232 | 232 | address_space *space = machine.device("z80ne")->memory().space(AS_PROGRAM); |
| 233 | 233 | state->m_reset_delay_counter = 0; |
| 234 | 234 | |
| 235 | switch (in | |
| 235 | switch (machine.root_device().ioport | |
| 236 | 236 | case 0x01: /* EP382 Hex Monitor */ |
| 237 | 237 | if (VERBOSE) |
| 238 | 238 | logerror("reset_lx390_banking: banking ep382\n"); |
| r15082 | r15083 | |
| 301 | 301 | state->m_lx383_downsampler = LX383_DOWNSAMPLING; |
| 302 | 302 | |
| 303 | 303 | /* Initialize cassette interface */ |
| 304 | switch(in | |
| 304 | switch(machine.root_device().ioport | |
| 305 | 305 | { |
| 306 | 306 | case 0x01: |
| 307 | 307 | state->m_cass_data.speed = TAPE_300BPS; |
| r15082 | r15083 | |
| 333 | 333 | ay31015_set_input_pin( state->m_ay31015, AY31015_NB2, 1 ); |
| 334 | 334 | ay31015_set_input_pin( state->m_ay31015, AY31015_TSB, 1 ); |
| 335 | 335 | ay31015_set_input_pin( state->m_ay31015, AY31015_EPS, 1 ); |
| 336 | ay31015_set_input_pin( state->m_ay31015, AY31015_NP, in | |
| 336 | ay31015_set_input_pin( state->m_ay31015, AY31015_NP, machine.root_device().ioport | |
| 337 | 337 | ay31015_set_input_pin( state->m_ay31015, AY31015_CS, 1 ); |
| 338 | 338 | ay31015_set_receiver_clock( state->m_ay31015, state->m_cass_data.speed * 16.0); |
| 339 | 339 | ay31015_set_transmitter_clock( state->m_ay31015, state->m_cass_data.speed * 16.0); |
| r15082 | r15083 | |
| 375 | 375 | INPUT_CHANGED( z80ne_reset ) |
| 376 | 376 | { |
| 377 | 377 | UINT8 rst; |
| 378 | rst = | |
| 378 | rst = | |
| 379 | 379 | |
| 380 | 380 | if ( ! BIT(rst, 0)) |
| 381 | 381 | { |
| r15082 | r15083 | |
| 387 | 387 | INPUT_CHANGED( z80ne_nmi ) |
| 388 | 388 | { |
| 389 | 389 | UINT8 nmi; |
| 390 | nmi = | |
| 390 | nmi = | |
| 391 | 391 | |
| 392 | 392 | if ( ! BIT(nmi, 0)) |
| 393 | 393 | { |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | } |
| 248 | 248 | else |
| 249 | 249 | { |
| 250 | int b = input_port_read(m_device->machine(), "mouse1"); | |
| 251 | int x = input_port_read(m_device->machine(), "mouse2"); | |
| 252 | int y = input_port_read(m_device->machine(), "mouse3"); | |
| 250 | int b = m_device->machine().root_device().ioport("mouse1")->read(); | |
| 251 | int x = m_device->machine().root_device().ioport("mouse2")->read(); | |
| 252 | int y = m_device->machine().root_device().ioport("mouse3")->read(); | |
| 253 | 253 | |
| 254 | 254 | if (m_last_b < 0) |
| 255 | 255 | { |
| r15082 | r15083 | |
| 686 | 686 | { |
| 687 | 687 | int n_chars = 0; |
| 688 | 688 | UINT16 key_code = 0; |
| 689 | UINT8 caps = BIT(input_port_read(machine(), "keyboard4"),0); | |
| 690 | UINT8 shift = BIT(input_port_read(machine(), "keyboard4"),1) | BIT(input_port_read(machine(), "keyboard4"),5); | |
| 691 | UINT8 ctrl = BIT(input_port_read(machine(), "keyboard4"),2); | |
| 692 | UINT8 numlock = BIT(input_port_read(machine(), "keyboard4"),6); | |
| 689 | UINT8 caps = BIT(ioport("keyboard4")->read(),0); | |
| 690 | UINT8 shift = BIT(ioport("keyboard4")->read(),1) | BIT(ioport("keyboard4")->read(),5); | |
| 691 | UINT8 ctrl = BIT(ioport("keyboard4")->read(),2); | |
| 692 | UINT8 numlock = BIT(ioport("keyboard4")->read(),6); | |
| 693 | 693 | UINT16 index; |
| 694 | 694 | |
| 695 | 695 | if (keyboard_is_german()) |
| r15082 | r15083 | |
| 803 | 803 | |
| 804 | 804 | for (x = 0; x < 0x80; x++) |
| 805 | 805 | { |
| 806 | if (!(i | |
| 806 | if (!(iop | |
| 807 | 807 | { |
| 808 | 808 | // no key pressed |
| 809 | 809 | if (m_keyon[x] != 0) |
| r15082 | r15083 | |
|---|---|---|
| 694 | 694 | /* read mouse values */ |
| 695 | 695 | if ((state->m_adb_kmstatus & 0x80) == 0x00) |
| 696 | 696 | { |
| 697 | new_mouse_x = input_port_read(machine, "adb_mouse_x"); | |
| 698 | new_mouse_y = input_port_read(machine, "adb_mouse_y"); | |
| 697 | new_mouse_x = machine.root_device().ioport("adb_mouse_x")->read(); | |
| 698 | new_mouse_y = machine.root_device().ioport("adb_mouse_y")->read(); | |
| 699 | 699 | |
| 700 | 700 | if ((state->m_mouse_x != new_mouse_x) || (state->m_mouse_y != new_mouse_y)) |
| 701 | 701 | { |
| r15082 | r15083 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | void luxor_4105_device::abc1600bus_cs(UINT8 data) |
| 227 | 227 | { |
| 228 | m_cs = (data == i | |
| 228 | m_cs = (data == iop | |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | |
| r15082 | r15083 | |
| 296 | 296 | { |
| 297 | 297 | if (scsi_bsy_r(m_sasibus)) |
| 298 | 298 | { |
| 299 | i | |
| 299 | iop | |
| 300 | 300 | } |
| 301 | 301 | else |
| 302 | 302 | { |
| r15082 | r15083 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | static READ8_DEVICE_HANDLER (ac1_port_a_r) |
| 28 | 28 | { |
| 29 | UINT8 line0 = input_port_read(device->machine(), "LINE0"); | |
| 30 | UINT8 line1 = input_port_read(device->machine(), "LINE1"); | |
| 31 | UINT8 line2 = input_port_read(device->machine(), "LINE2"); | |
| 32 | UINT8 line3 = input_port_read(device->machine(), "LINE3"); | |
| 33 | UINT8 line4 = input_port_read(device->machine(), "LINE4"); | |
| 34 | UINT8 line5 = input_port_read(device->machine(), "LINE5"); | |
| 35 | UINT8 line6 = input_port_read(device->machine(), "LINE6"); | |
| 29 | UINT8 line0 = device->machine().root_device().ioport("LINE0")->read(); | |
| 30 | UINT8 line1 = device->machine().root_device().ioport("LINE1")->read(); | |
| 31 | UINT8 line2 = device->machine().root_device().ioport("LINE2")->read(); | |
| 32 | UINT8 line3 = device->machine().root_device().ioport("LINE3")->read(); | |
| 33 | UINT8 line4 = device->machine().root_device().ioport("LINE4")->read(); | |
| 34 | UINT8 line5 = device->machine().root_device().ioport("LINE5")->read(); | |
| 35 | UINT8 line6 = device->machine().root_device().ioport("LINE6")->read(); | |
| 36 | 36 | |
| 37 | 37 | UINT8 SH = BNOT(BIT(line6,0)); |
| 38 | 38 | UINT8 CTRL = BNOT(BIT(line6,1)); |
| r15082 | r15083 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | for (i = 0; i < 6; i++) |
| 42 | 42 | { |
| 43 | keybuf = i | |
| 43 | keybuf = iop | |
| 44 | 44 | |
| 45 | 45 | // any changes in this row? |
| 46 | 46 | if ((keybuf != m_key_matrix[i]) && (report < 2)) |
| r15082 | r15083 | |
| 168 | 168 | return 0; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | NewButton = input_port_read(machine(), "MOUSE0") & 0x01; | |
| 172 | NewX = input_port_read(machine(), "MOUSE2"); | |
| 173 | NewY = input_port_read(machine(), "MOUSE1"); | |
| 171 | NewButton = ioport("MOUSE0")->read() & 0x01; | |
| 172 | NewX = ioport("MOUSE2")->read(); | |
| 173 | NewY = ioport("MOUSE1")->read(); | |
| 174 | 174 | |
| 175 | 175 | if ((NewX != m_adb_lastmousex) || (NewY != m_adb_lastmousey) || (NewButton != m_adb_lastbutton)) |
| 176 | 176 | { |
| r15082 | r15083 | |
| 185 | 185 | int MouseCountX = 0, MouseCountY = 0; |
| 186 | 186 | int NewX, NewY; |
| 187 | 187 | |
| 188 | NewX = input_port_read(machine(), "MOUSE2"); | |
| 189 | NewY = input_port_read(machine(), "MOUSE1"); | |
| 188 | NewX = ioport("MOUSE2")->read(); | |
| 189 | NewY = ioport("MOUSE1")->read(); | |
| 190 | 190 | |
| 191 | 191 | /* see if it moved in the x coord */ |
| 192 | 192 | if (NewX != m_adb_lastmousex) |
| r15082 | r15083 | |
| 218 | 218 | m_adb_lastmousey = NewY; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | m_adb_lastbutton = i | |
| 221 | m_adb_lastbutton = iop | |
| 222 | 222 | |
| 223 | 223 | *MouseX = (UINT8)MouseCountX; |
| 224 | 224 | *MouseY = (UINT8)MouseCountY; |
| r15082 | r15083 | |
|---|---|---|
| 333 | 333 | |
| 334 | 334 | READ8_MEMBER(nes_state::nes_IN0_r) |
| 335 | 335 | { |
| 336 | int cfg = i | |
| 336 | int cfg = iop | |
| 337 | 337 | int ret; |
| 338 | 338 | |
| 339 | 339 | if ((cfg & 0x000f) >= 0x07) // for now we treat the FC keyboard separately from other inputs! |
| r15082 | r15083 | |
| 388 | 388 | static UINT8 nes_read_fc_keyboard_line( running_machine &machine, UINT8 scan, UINT8 mode ) |
| 389 | 389 | { |
| 390 | 390 | static const char *const fc_keyport_names[] = { "FCKEY0", "FCKEY1", "FCKEY2", "FCKEY3", "FCKEY4", "FCKEY5", "FCKEY6", "FCKEY7", "FCKEY8" }; |
| 391 | return ((in | |
| 391 | return ((machine.root_device().ioport | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | static UINT8 nes_read_subor_keyboard_line( running_machine &machine, UINT8 scan, UINT8 mode ) |
| 395 | 395 | { |
| 396 | 396 | static const char *const sub_keyport_names[] = { "SUBKEY0", "SUBKEY1", "SUBKEY2", "SUBKEY3", "SUBKEY4", |
| 397 | 397 | "SUBKEY5", "SUBKEY6", "SUBKEY7", "SUBKEY8", "SUBKEY9", "SUBKEY10", "SUBKEY11", "SUBKEY12" }; |
| 398 | return ((in | |
| 398 | return ((machine.root_device().ioport | |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | READ8_MEMBER(nes_state::nes_IN1_r) |
| 402 | 402 | { |
| 403 | int cfg = i | |
| 403 | int cfg = iop | |
| 404 | 404 | int ret; |
| 405 | 405 | |
| 406 | 406 | if ((cfg & 0x000f) == 0x07) // for now we treat the FC keyboard separately from other inputs! |
| r15082 | r15083 | |
| 489 | 489 | { |
| 490 | 490 | case 0x01: /* gamepad */ |
| 491 | 491 | if (pad_port >= 0) |
| 492 | vals->i0 = in | |
| 492 | vals->i0 = machine.root_device().ioport | |
| 493 | 493 | break; |
| 494 | 494 | |
| 495 | 495 | case 0x02: /* zapper 1 */ |
| 496 | 496 | if (supports_zapper) |
| 497 | 497 | { |
| 498 | vals->i0 = input_port_read(machine, "ZAPPER1_T"); | |
| 499 | vals->i1 = input_port_read(machine, "ZAPPER1_X"); | |
| 500 | vals->i2 = input_port_read(machine, "ZAPPER1_Y"); | |
| 498 | vals->i0 = machine.root_device().ioport("ZAPPER1_T")->read(); | |
| 499 | vals->i1 = machine.root_device().ioport("ZAPPER1_X")->read(); | |
| 500 | vals->i2 = machine.root_device().ioport("ZAPPER1_Y")->read(); | |
| 501 | 501 | } |
| 502 | 502 | break; |
| 503 | 503 | |
| 504 | 504 | case 0x03: /* zapper 2 */ |
| 505 | 505 | if (supports_zapper) |
| 506 | 506 | { |
| 507 | vals->i0 = input_port_read(machine, "ZAPPER2_T"); | |
| 508 | vals->i1 = input_port_read(machine, "ZAPPER2_X"); | |
| 509 | vals->i2 = input_port_read(machine, "ZAPPER2_Y"); | |
| 507 | vals->i0 = machine.root_device().ioport("ZAPPER2_T")->read(); | |
| 508 | vals->i1 = machine.root_device().ioport("ZAPPER2_X")->read(); | |
| 509 | vals->i2 = machine.root_device().ioport("ZAPPER2_Y")->read(); | |
| 510 | 510 | } |
| 511 | 511 | break; |
| 512 | 512 | |
| 513 | 513 | case 0x04: /* arkanoid paddle */ |
| 514 | 514 | if (pad_port == 1) |
| 515 | vals->i0 = (UINT8) ((UINT8) in | |
| 515 | vals->i0 = (UINT8) ((UINT8) machine.root_device().ioport | |
| 516 | 516 | break; |
| 517 | 517 | |
| 518 | 518 | case 0x06: /* crazy climber controller */ |
| 519 | 519 | if (pad_port == 0) |
| 520 | 520 | { |
| 521 | state->m_in_0.i0 = input_port_read(machine, padnames[4]); | |
| 522 | state->m_in_1.i0 = input_port_read(machine, padnames[5]); | |
| 521 | state->m_in_0.i0 = machine.root_device().ioport(padnames[4])->read(); | |
| 522 | state->m_in_1.i0 = machine.root_device().ioport(padnames[5])->read(); | |
| 523 | 523 | } |
| 524 | 524 | break; |
| 525 | 525 | } |
| r15082 | r15083 | |
| 528 | 528 | |
| 529 | 529 | static TIMER_CALLBACK( lightgun_tick ) |
| 530 | 530 | { |
| 531 | if ((in | |
| 531 | if ((machine.root_device().ioport | |
| 532 | 532 | { |
| 533 | 533 | /* enable lightpen crosshair */ |
| 534 | 534 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 539 | 539 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE); |
| 540 | 540 | } |
| 541 | 541 | |
| 542 | if ((in | |
| 542 | if ((machine.root_device().ioport | |
| 543 | 543 | { |
| 544 | 544 | /* enable lightpen crosshair */ |
| 545 | 545 | crosshair_set_screen(machine, 1, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 553 | 553 | |
| 554 | 554 | WRITE8_MEMBER(nes_state::nes_IN0_w) |
| 555 | 555 | { |
| 556 | int cfg = i | |
| 556 | int cfg = iop | |
| 557 | 557 | |
| 558 | 558 | /* Check if lightgun has been chosen as input: if so, enable crosshair */ |
| 559 | 559 | machine().scheduler().timer_set(attotime::zero, FUNC(lightgun_tick)); |
| r15082 | r15083 | |
|---|---|---|
| 276 | 276 | INPUT_PORTS_START( luxor_55_21046 ) |
| 277 | 277 | PORT_START("SW1") |
| 278 | 278 | // ABC 838 |
| 279 | PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2e) | |
| 280 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2e) | |
| 279 | PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2e) | |
| 280 | PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2e) | |
| 281 | 281 | // ABC 830 |
| 282 | PORT_DIPNAME( 0x01, 0x00, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("SW3", 0x7f, | |
| 282 | PORT_DIPNAME( 0x01, 0x00, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("SW3", 0x7f, | |
| 283 | 283 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 284 | 284 | PORT_DIPSETTING( 0x01, "Double" ) |
| 285 | PORT_DIPNAME( 0x02, 0x00, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("SW3", 0x7f, | |
| 285 | PORT_DIPNAME( 0x02, 0x00, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("SW3", 0x7f, | |
| 286 | 286 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 287 | 287 | PORT_DIPSETTING( 0x02, "Double" ) |
| 288 | PORT_DIPNAME( 0x04, 0x00, "Drive 0 Density" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("SW3", 0x7f, | |
| 288 | PORT_DIPNAME( 0x04, 0x00, "Drive 0 Density" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("SW3", 0x7f, | |
| 289 | 289 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 290 | 290 | PORT_DIPSETTING( 0x04, "Double" ) |
| 291 | PORT_DIPNAME( 0x08, 0x00, "Drive 1 Density" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("SW3", 0x7f, | |
| 291 | PORT_DIPNAME( 0x08, 0x00, "Drive 1 Density" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("SW3", 0x7f, | |
| 292 | 292 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 293 | 293 | PORT_DIPSETTING( 0x08, "Double" ) |
| 294 | 294 | // ABC 832/834/850 |
| 295 | PORT_DIPNAME( 0x01, 0x01, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("SW3", 0x7f, | |
| 295 | PORT_DIPNAME( 0x01, 0x01, "Drive 0 Sided" ) PORT_DIPLOCATION("SW1:1") PORT_CONDITION("SW3", 0x7f, | |
| 296 | 296 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 297 | 297 | PORT_DIPSETTING( 0x01, "Double" ) |
| 298 | PORT_DIPNAME( 0x02, 0x02, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("SW3", 0x7f, | |
| 298 | PORT_DIPNAME( 0x02, 0x02, "Drive 1 Sided" ) PORT_DIPLOCATION("SW1:2") PORT_CONDITION("SW3", 0x7f, | |
| 299 | 299 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 300 | 300 | PORT_DIPSETTING( 0x02, "Double" ) |
| 301 | PORT_DIPNAME( 0x04, 0x00, "Drive 0 Tracks" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("SW3", 0x7f, | |
| 301 | PORT_DIPNAME( 0x04, 0x00, "Drive 0 Tracks" ) PORT_DIPLOCATION("SW1:3") PORT_CONDITION("SW3", 0x7f, | |
| 302 | 302 | PORT_DIPSETTING( 0x00, "80" ) |
| 303 | 303 | PORT_DIPSETTING( 0x04, "40" ) |
| 304 | PORT_DIPNAME( 0x08, 0x00, "Drive 1 Tracks" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("SW3", 0x7f, | |
| 304 | PORT_DIPNAME( 0x08, 0x00, "Drive 1 Tracks" ) PORT_DIPLOCATION("SW1:4") PORT_CONDITION("SW3", 0x7f, | |
| 305 | 305 | PORT_DIPSETTING( 0x00, "80" ) |
| 306 | 306 | PORT_DIPSETTING( 0x08, "40" ) |
| 307 | 307 | |
| 308 | 308 | PORT_START("SW2") |
| 309 | 309 | PORT_DIPNAME( 0x0f, 0x01, "Drive Type" ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 310 | PORT_DIPSETTING( 0x01, "TEAC FD55F (ABC 834)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 7802-01 | |
| 311 | PORT_DIPSETTING( 0x02, "BASF 6138 (ABC 850)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 230 8440-15 | |
| 312 | PORT_DIPSETTING( 0x03, "Micropolis 1015F (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-15 | |
| 313 | PORT_DIPSETTING( 0x04, "BASF 6118 (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-16 | |
| 314 | PORT_DIPSETTING( 0x05, "Micropolis 1115F (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2c) // 190 9711-17 | |
| 315 | PORT_DIPSETTING( 0x08, "BASF 6106/08 (ABC 830)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 | |
| 316 | PORT_DIPSETTING( 0x09, "MPI 51 (ABC 830)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2d) // 190 9206-16 | |
| 317 | PORT_DIPSETTING( 0x0e, "BASF 6105 (ABC 838)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2e) | |
| 318 | PORT_DIPSETTING( 0x0f, "BASF 6106 (ABC 838)" ) PORT_CONDITION("SW3", 0x7f, PORTCOND_EQUALS, 0x2e) // 230 8838-15 | |
| 310 | PORT_DIPSETTING( 0x01, "TEAC FD55F (ABC 834)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2c) // 230 7802-01 | |
| 311 | PORT_DIPSETTING( 0x02, "BASF 6138 (ABC 850)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2c) // 230 8440-15 | |
| 312 | PORT_DIPSETTING( 0x03, "Micropolis 1015F (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2c) // 190 9711-15 | |
| 313 | PORT_DIPSETTING( 0x04, "BASF 6118 (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2c) // 190 9711-16 | |
| 314 | PORT_DIPSETTING( 0x05, "Micropolis 1115F (ABC 832)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2c) // 190 9711-17 | |
| 315 | PORT_DIPSETTING( 0x08, "BASF 6106/08 (ABC 830)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2d) // 190 9206-16 | |
| 316 | PORT_DIPSETTING( 0x09, "MPI 51 (ABC 830)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2d) // 190 9206-16 | |
| 317 | PORT_DIPSETTING( 0x0e, "BASF 6105 (ABC 838)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2e) | |
| 318 | PORT_DIPSETTING( 0x0f, "BASF 6106 (ABC 838)" ) PORT_CONDITION("SW3", 0x7f, EQUALS, 0x2e) // 230 8838-15 | |
| 319 | 319 | |
| 320 | 320 | PORT_START("SW3") |
| 321 | 321 | PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7") |
| r15082 | r15083 | |
| 428 | 428 | |
| 429 | 429 | void luxor_55_21046_device::abcbus_cs(UINT8 data) |
| 430 | 430 | { |
| 431 | m_cs = (data == i | |
| 431 | m_cs = (data == iop | |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | |
| r15082 | r15083 | |
| 685 | 685 | data |= m_busy; |
| 686 | 686 | |
| 687 | 687 | // SW1 |
| 688 | UINT8 sw1 = i | |
| 688 | UINT8 sw1 = iop | |
| 689 | 689 | |
| 690 | 690 | data |= sw1 << 4; |
| 691 | 691 | |
| 692 | 692 | // SW2 |
| 693 | UINT8 sw2 = i | |
| 693 | UINT8 sw2 = iop | |
| 694 | 694 | |
| 695 | 695 | // TTL inputs float high so DIP switch in off position equals 1 |
| 696 | 696 | int sw2_1 = BIT(sw2, 0) ? 1 : BIT(offset, 8); |
| r15082 | r15083 | |
|---|---|---|
| 544 | 544 | // scan all lines (excluding shift) |
| 545 | 545 | for (int i=0; i<8; i++) |
| 546 | 546 | { |
| 547 | UINT8 keyboard_line_data = i | |
| 547 | UINT8 keyboard_line_data = iop | |
| 548 | 548 | |
| 549 | 549 | // scan through each bit |
| 550 | 550 | for (int b=0; b<8; b++) |
| r15082 | r15083 | |
| 615 | 615 | add_pulse_to_transmit_buffer(1); |
| 616 | 616 | |
| 617 | 617 | // state of shift key |
| 618 | add_bit((i | |
| 618 | add_bit((iop | |
| 619 | 619 | |
| 620 | 620 | for (int i=0; i<6; i++) |
| 621 | 621 | { |
| r15082 | r15083 | |
|---|---|---|
| 19 | 19 | UINT8 data = 0xf; |
| 20 | 20 | int delta; |
| 21 | 21 | attotime new_time = space->machine().time(); |
| 22 | | |
| 22 | | |
| 23 | 23 | delta = ((new_time - JOY_time) * 256 * 1000).seconds; |
| 24 | 24 | |
| 25 | 25 | if (joystick_port != NULL) |
| 26 | 26 | { |
| 27 | data = | |
| 27 | data = | |
| 28 | 28 | |
| 29 | 29 | /* timer overflow? Nope, otherwise some HWs can't verify the port properly */ |
| 30 | 30 | //if ((new_time - JOY_time) > attotime::from_msec(10)) |
| r15082 | r15083 | |
| 33 | 33 | //} |
| 34 | 34 | //else |
| 35 | 35 | { |
| 36 | if (input_port_read(space->machine(), "pc_joy_1") < delta) data &= ~0x01; | |
| 37 | if (input_port_read(space->machine(), "pc_joy_2") < delta) data &= ~0x02; | |
| 38 | if (input_port_read(space->machine(), "pc_joy_3") < delta) data &= ~0x04; | |
| 39 | if (input_port_read(space->machine(), "pc_joy_4") < delta) data &= ~0x08; | |
| 36 | if (space->machine().root_device().ioport("pc_joy_1")->read() < delta) data &= ~0x01; | |
| 37 | if (space->machine().root_device().ioport("pc_joy_2")->read() < delta) data &= ~0x02; | |
| 38 | if (space->machine().root_device().ioport("pc_joy_3")->read() < delta) data &= ~0x04; | |
| 39 | if (space->machine().root_device().ioport("pc_joy_4")->read() < delta) data &= ~0x08; | |
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | else |
| r15082 | r15083 | |
|---|---|---|
| 143 | 143 | { |
| 144 | 144 | DLOG1(("reset apollo_config")); |
| 145 | 145 | // load configuration |
| 146 | config = | |
| 146 | config = | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /*------------------------------------------------- |
| r15082 | r15083 | |
|---|---|---|
| 86 | 86 | int data = 0x7f; |
| 87 | 87 | |
| 88 | 88 | /* scan keypad rows */ |
| 89 | if (!(state->m_riot_port_a & 0x80)) data &= input_port_read(device->machine(), "ROW-0"); | |
| 90 | if (!(state->m_riot_port_b & 0x01)) data &= input_port_read(device->machine(), "ROW-1"); | |
| 91 | if (!(state->m_riot_port_b & 0x02)) data &= input_port_read(device->machine(), "ROW-2"); | |
| 92 | if (!(state->m_riot_port_b & 0x04)) data &= input_port_read(device->machine(), "ROW-3"); | |
| 89 | if (!(state->m_riot_port_a & 0x80)) data &= device->machine().root_device().ioport("ROW-0")->read(); | |
| 90 | if (!(state->m_riot_port_b & 0x01)) data &= device->machine().root_device().ioport("ROW-1")->read(); | |
| 91 | if (!(state->m_riot_port_b & 0x02)) data &= device->machine().root_device().ioport("ROW-2")->read(); | |
| 92 | if (!(state->m_riot_port_b & 0x04)) data &= device->machine().root_device().ioport("ROW-3")->read(); | |
| 93 | 93 | |
| 94 | 94 | /* determine column */ |
| 95 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 95 | if ( ((state->m_riot_port_a ^ 0xff) & (s | |
| 96 | 96 | data &= ~0x80; |
| 97 | 97 | |
| 98 | 98 | return data; |
| r15082 | r15083 | |
| 105 | 105 | int data = 0xff; |
| 106 | 106 | |
| 107 | 107 | /* determine column */ |
| 108 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 108 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 109 | 109 | data &= ~0x01; |
| 110 | 110 | |
| 111 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 111 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 112 | 112 | data &= ~0x02; |
| 113 | 113 | |
| 114 | if ( ((state->m_riot_port_a ^ 0xff) & ( | |
| 114 | if ( ((state->m_riot_port_a ^ 0xff) & (s | |
| 115 | 115 | data &= ~0x04; |
| 116 | 116 | |
| 117 | 117 | data &= ~0x80; // else hangs 8b02 |
| r15082 | r15083 | |
| 201 | 201 | |
| 202 | 202 | logerror("SYM1 VIA2 W 0x%02x\n", data); |
| 203 | 203 | |
| 204 | if (( | |
| 204 | if (( | |
| 205 | 205 | cpu0space->nop_write(0xa600, 0xa67f); |
| 206 | 206 | } else { |
| 207 | 207 | cpu0space->install_write_bank(0xa600, 0xa67f, "bank5"); |
| 208 | 208 | } |
| 209 | if (( | |
| 209 | if (( | |
| 210 | 210 | cpu0space->nop_write(0x0400, 0x07ff); |
| 211 | 211 | } else { |
| 212 | 212 | cpu0space->install_write_bank(0x0400, 0x07ff, "bank2"); |
| 213 | 213 | } |
| 214 | if (( | |
| 214 | if (( | |
| 215 | 215 | cpu0space->nop_write(0x0800, 0x0bff); |
| 216 | 216 | } else { |
| 217 | 217 | cpu0space->install_write_bank(0x0800, 0x0bff, "bank3"); |
| 218 | 218 | } |
| 219 | if (( | |
| 219 | if (( | |
| 220 | 220 | cpu0space->nop_write(0x0c00, 0x0fff); |
| 221 | 221 | } else { |
| 222 | 222 | cpu0space->install_write_bank(0x0c00, 0x0fff, "bank4"); |
| r15082 | r15083 | |
|---|---|---|
| 153 | 153 | case 0: case 1: case 2: { |
| 154 | 154 | int index; |
| 155 | 155 | for(index=0; index < 32; index++) |
| 156 | if(field.mask & (1 << index)) | |
| 156 | if(field.mask() & (1 << index)) | |
| 157 | 157 | break; |
| 158 | 158 | assert(index != 32); |
| 159 | 159 | index += bank*32; |
| r15082 | r15083 | |
| 174 | 174 | |
| 175 | 175 | case 3: |
| 176 | 176 | if(newval) |
| 177 | modifiers_state |= field.mask; | |
| 177 | modifiers_state |= field.mask(); | |
| 178 | 178 | else |
| 179 | modifiers_state &= ~field.mask; | |
| 179 | modifiers_state &= ~field.mask(); | |
| 180 | 180 | fifo_push(modifiers_state | (1<<28)); |
| 181 | 181 | send(); |
| 182 | 182 | break; |
| 183 | 183 | |
| 184 | 184 | case 4: |
| 185 | if(field.mask & 1) | |
| 185 | if(field.mask() & 1) | |
| 186 | 186 | int_power_cb(newval & 1); |
| 187 | 187 | break; |
| 188 | 188 | } |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | if (ondra_keyboard_line > 9) { |
| 33 | 33 | retVal |= 0x1f; |
| 34 | 34 | } else { |
| 35 | retVal |= i | |
| 35 | retVal |= iop | |
| 36 | 36 | } |
| 37 | 37 | return retVal; |
| 38 | 38 | } |
| r15082 | r15083 | |
| 77 | 77 | |
| 78 | 78 | static TIMER_CALLBACK(nmi_check_callback) |
| 79 | 79 | { |
| 80 | if ((in | |
| 80 | if ((machine.root_device().ioport | |
| 81 | 81 | { |
| 82 | 82 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 83 | 83 | } |
| r15082 | r15083 | |
|---|---|---|
| 400 | 400 | attotime new_time = machine().time(); |
| 401 | 401 | |
| 402 | 402 | { |
| 403 | data = i | |
| 403 | data = iop | |
| 404 | 404 | |
| 405 | 405 | { |
| 406 | 406 | delta = ((new_time - m_joy_time) * 256 * 1000).seconds; |
| 407 | 407 | |
| 408 | if (input_port_read(*this, "pc_joy_1") < delta) data &= ~0x01; | |
| 409 | if (input_port_read(*this, "pc_joy_2") < delta) data &= ~0x02; | |
| 408 | if (ioport("pc_joy_1")->read() < delta) data &= ~0x01; | |
| 409 | if (ioport("pc_joy_2")->read() < delta) data &= ~0x02; | |
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 |
| r15082 | r15083 | |
|---|---|---|
| 293 | 293 | { |
| 294 | 294 | UINT8 data = 0xff; |
| 295 | 295 | |
| 296 | if (!BIT(m_kb_y, 0)) data &= input_port_read(machine(), "Y0"); | |
| 297 | if (!BIT(m_kb_y, 1)) data &= input_port_read(machine(), "Y1"); | |
| 298 | if (!BIT(m_kb_y, 2)) data &= input_port_read(machine(), "Y2"); | |
| 299 | if (!BIT(m_kb_y, 3)) data &= input_port_read(machine(), "Y3"); | |
| 300 | if (!BIT(m_kb_y, 4)) data &= input_port_read(machine(), "Y4"); | |
| 301 | if (!BIT(m_kb_y, 5)) data &= input_port_read(machine(), "Y5"); | |
| 302 | if (!BIT(m_kb_y, 6)) data &= input_port_read(machine(), "Y6"); | |
| 303 | if (!BIT(m_kb_y, 7)) data &= input_port_read(machine(), "Y7"); | |
| 304 | if (!BIT(m_kb_y, 8)) data &= input_port_read(machine(), "Y8"); | |
| 305 | if (!BIT(m_kb_y, 9)) data &= input_port_read(machine(), "Y9"); | |
| 306 | if (!BIT(m_kb_y, 10)) data &= input_port_read(machine(), "YA"); | |
| 307 | if (!BIT(m_kb_y, 11)) data &= input_port_read(machine(), "YB"); | |
| 308 | if (!BIT(m_kb_y, 12)) data &= input_port_read(machine(), "YC"); | |
| 296 | if (!BIT(m_kb_y, 0)) data &= ioport("Y0")->read(); | |
| 297 | if (!BIT(m_kb_y, 1)) data &= ioport("Y1")->read(); | |
| 298 | if (!BIT(m_kb_y, 2)) data &= ioport("Y2")->read(); | |
| 299 | if (!BIT(m_kb_y, 3)) data &= ioport("Y3")->read(); | |
| 300 | if (!BIT(m_kb_y, 4)) data &= ioport("Y4")->read(); | |
| 301 | if (!BIT(m_kb_y, 5)) data &= ioport("Y5")->read(); | |
| 302 | if (!BIT(m_kb_y, 6)) data &= ioport("Y6")->read(); | |
| 303 | if (!BIT(m_kb_y, 7)) data &= ioport("Y7")->read(); | |
| 304 | if (!BIT(m_kb_y, 8)) data &= ioport("Y8")->read(); | |
| 305 | if (!BIT(m_kb_y, 9)) data &= ioport("Y9")->read(); | |
| 306 | if (!BIT(m_kb_y, 10)) data &= ioport("YA")->read(); | |
| 307 | if (!BIT(m_kb_y, 11)) data &= ioport("YB")->read(); | |
| 308 | if (!BIT(m_kb_y, 12)) data &= ioport("YC")->read(); | |
| 309 | 309 | |
| 310 | 310 | return data; |
| 311 | 311 | } |
| r15082 | r15083 | |
| 347 | 347 | |
| 348 | 348 | */ |
| 349 | 349 | |
| 350 | UINT8 modifiers = i | |
| 350 | UINT8 modifiers = iop | |
| 351 | 351 | |
| 352 | 352 | return modifiers << 1; |
| 353 | 353 | } |
| r15082 | r15083 | |
|---|---|---|
| 322 | 322 | |
| 323 | 323 | UINT8 data = 0xff; |
| 324 | 324 | |
| 325 | if (!BIT(m_keylatch, 0)) data &= input_port_read(machine(), "Y0"); | |
| 326 | if (!BIT(m_keylatch, 1)) data &= input_port_read(machine(), "Y1"); | |
| 327 | if (!BIT(m_keylatch, 2)) data &= input_port_read(machine(), "Y2"); | |
| 328 | if (!BIT(m_keylatch, 3)) data &= input_port_read(machine(), "Y3"); | |
| 329 | if (!BIT(m_keylatch, 4)) data &= input_port_read(machine(), "Y4"); | |
| 330 | if (!BIT(m_keylatch, 5)) data &= input_port_read(machine(), "Y5"); | |
| 331 | if (!BIT(m_keylatch, 6)) data &= input_port_read(machine(), "Y6"); | |
| 332 | if (!BIT(m_keylatch, 7)) data &= input_port_read(machine(), "Y7"); | |
| 333 | if (!BIT(m_keylatch, 8)) data &= input_port_read(machine(), "Y8"); | |
| 334 | if (!BIT(m_keylatch, 9)) data &= input_port_read(machine(), "Y9"); | |
| 335 | if (!BIT(m_keylatch, 10)) data &= input_port_read(machine(), "Y10"); | |
| 336 | if (!BIT(m_keylatch, 11)) data &= input_port_read(machine(), "Y11"); | |
| 325 | if (!BIT(m_keylatch, 0)) data &= ioport("Y0")->read(); | |
| 326 | if (!BIT(m_keylatch, 1)) data &= ioport("Y1")->read(); | |
| 327 | if (!BIT(m_keylatch, 2)) data &= ioport("Y2")->read(); | |
| 328 | if (!BIT(m_keylatch, 3)) data &= ioport("Y3")->read(); | |
| 329 | if (!BIT(m_keylatch, 4)) data &= ioport("Y4")->read(); | |
| 330 | if (!BIT(m_keylatch, 5)) data &= ioport("Y5")->read(); | |
| 331 | if (!BIT(m_keylatch, 6)) data &= ioport("Y6")->read(); | |
| 332 | if (!BIT(m_keylatch, 7)) data &= ioport("Y7")->read(); | |
| 333 | if (!BIT(m_keylatch, 8)) data &= ioport("Y8")->read(); | |
| 334 | if (!BIT(m_keylatch, 9)) data &= ioport("Y9")->read(); | |
| 335 | if (!BIT(m_keylatch, 10)) data &= ioport("Y10")->read(); | |
| 336 | if (!BIT(m_keylatch, 11)) data &= ioport("Y11")->read(); | |
| 337 | 337 | |
| 338 | 338 | return ~data; |
| 339 | 339 | } |
| r15082 | r15083 | |
|---|---|---|
| 333 | 333 | |
| 334 | 334 | void isa8_lpt_device::device_reset() |
| 335 | 335 | { |
| 336 | m_is_primary = (i | |
| 336 | m_is_primary = (iop | |
| 337 | 337 | if (m_is_primary) { |
| 338 | 338 | m_isa->install_device(subdevice("lpt"), 0x0378, 0x037b, 0, 0, FUNC(pc_lpt_r), FUNC(pc_lpt_w) ); |
| 339 | 339 | } else { |
| r15082 | r15083 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | UINT8 coleco_scan_paddles(running_machine &machine, UINT8 *joy_status0, UINT8 *joy_status1) |
| 5 | 5 | { |
| 6 | UINT8 ctrl_sel = in | |
| 6 | UINT8 ctrl_sel = machine. | |
| 7 | 7 | |
| 8 | 8 | /* which controller shall we read? */ |
| 9 | 9 | if ((ctrl_sel & 0x07) == 0x02) // Super Action Controller P1 |
| 10 | *joy_status0 = in | |
| 10 | *joy_status0 = machine. | |
| 11 | 11 | else if ((ctrl_sel & 0x07) == 0x03) // Driving Controller P1 |
| 12 | *joy_status0 = in | |
| 12 | *joy_status0 = machine. | |
| 13 | 13 | |
| 14 | 14 | if ((ctrl_sel & 0x70) == 0x20) // Super Action Controller P2 |
| 15 | *joy_status1 = in | |
| 15 | *joy_status1 = machine. | |
| 16 | 16 | else if ((ctrl_sel & 0x70) == 0x30) // Driving Controller P2 |
| 17 | *joy_status1 = in | |
| 17 | *joy_status1 = machine. | |
| 18 | 18 | |
| 19 | 19 | /* In principle, even if not supported by any game, I guess we could have two Super |
| 20 | 20 | Action Controllers plugged into the Roller controller ports. Since I found no info |
| r15082 | r15083 | |
| 22 | 22 | the Roller trackball inputs and actually use the latter ones, when both are selected. */ |
| 23 | 23 | if (ctrl_sel & 0x80) // Roller controller |
| 24 | 24 | { |
| 25 | *joy_status0 = input_port_read_safe(machine, "ROLLER_X", 0); | |
| 26 | *joy_status1 = input_port_read_safe(machine, "ROLLER_Y", 0); | |
| 25 | *joy_status0 = machine.root_device().ioport("ROLLER_X")->read_safe(0); | |
| 26 | *joy_status1 = machine.root_device().ioport("ROLLER_Y")->read_safe(0); | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | return *joy_status0 | *joy_status1; |
| r15082 | r15083 | |
| 32 | 32 | |
| 33 | 33 | UINT8 coleco_paddle_read(running_machine &machine, int port, int joy_mode, UINT8 joy_status) |
| 34 | 34 | { |
| 35 | UINT8 ctrl_sel = in | |
| 35 | UINT8 ctrl_sel = machine. | |
| 36 | 36 | UINT8 ctrl_extra = ctrl_sel & 0x80; |
| 37 | 37 | ctrl_sel = ctrl_sel >> (port*4) & 7; |
| 38 | 38 | |
| r15082 | r15083 | |
| 44 | 44 | UINT16 ipt = 0xffff; |
| 45 | 45 | |
| 46 | 46 | if (ctrl_sel == 0) // ColecoVision Controller |
| 47 | ipt = in | |
| 47 | ipt = machine.root_device().ioport | |
| 48 | 48 | else if (ctrl_sel == 2) // Super Action Controller |
| 49 | ipt = in | |
| 49 | ipt = machine.root_device().ioport | |
| 50 | 50 | |
| 51 | 51 | /* Numeric pad buttons are not independent on a real ColecoVision, if you push more |
| 52 | 52 | than one, a real ColecoVision think that it is a third button, so we are going to emulate |
| r15082 | r15083 | |
| 75 | 75 | UINT8 data = 0x7f; |
| 76 | 76 | |
| 77 | 77 | if (ctrl_sel == 0) // ColecoVision Controller |
| 78 | data = in | |
| 78 | data = machine.root_device().ioport | |
| 79 | 79 | else if (ctrl_sel == 2) // Super Action Controller |
| 80 | data = in | |
| 80 | data = machine.root_device().ioport | |
| 81 | 81 | else if (ctrl_sel == 3) // Driving Controller |
| 82 | data = in | |
| 82 | data = machine.root_device().ioport | |
| 83 | 83 | |
| 84 | 84 | /* If any extra analog contoller enabled */ |
| 85 | 85 | if (ctrl_extra || ctrl_sel == 2 || ctrl_sel == 3) |
| r15082 | r15083 | |
| 96 | 96 | // ColecoVision Controller |
| 97 | 97 | static INPUT_PORTS_START( ctrl1 ) |
| 98 | 98 | PORT_START("STD_KEYPAD1") |
| 99 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (pad 1)") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 100 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (pad 1)") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 101 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (pad 1)") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 102 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (pad 1)") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 103 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (pad 1)") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 104 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (pad 1)") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 105 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (pad 1)") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 106 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (pad 1)") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 107 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (pad 1)") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 108 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (pad 1)") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 109 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (pad 1)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 110 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (pad 1)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 111 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 112 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 99 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (pad 1)") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 100 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (pad 1)") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 101 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (pad 1)") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 102 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (pad 1)") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 103 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (pad 1)") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 104 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (pad 1)") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 105 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (pad 1)") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 106 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (pad 1)") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 107 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (pad 1)") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 108 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (pad 1)") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 109 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (pad 1)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 110 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (pad 1)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 111 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 112 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 113 | 113 | |
| 114 | 114 | PORT_START("STD_JOY1") |
| 115 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 116 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 117 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 118 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 119 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 120 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x00) | |
| 115 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 116 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 117 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 118 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 119 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 120 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x00) | |
| 121 | 121 | INPUT_PORTS_END |
| 122 | 122 | |
| 123 | 123 | static INPUT_PORTS_START( ctrl2 ) |
| 124 | 124 | PORT_START("STD_KEYPAD2") |
| 125 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 126 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 127 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 128 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 129 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 130 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 131 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 132 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 133 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 134 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 135 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 136 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 137 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 138 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 125 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 126 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 127 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 128 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 129 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 130 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 131 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 132 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 133 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 134 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 135 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 136 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 137 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 138 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 139 | 139 | |
| 140 | 140 | PORT_START("STD_JOY2") |
| 141 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 142 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 143 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 144 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 145 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 146 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x00) | |
| 141 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 142 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 143 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 144 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 145 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 146 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x00) | |
| 147 | 147 | INPUT_PORTS_END |
| 148 | 148 | |
| 149 | 149 | |
| 150 | 150 | // Super Action Controller |
| 151 | 151 | static INPUT_PORTS_START( sac1 ) |
| 152 | 152 | PORT_START("SAC_KEYPAD1") |
| 153 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (SAC pad 1)") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 154 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (SAC pad 1)") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 155 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (SAC pad 1)") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 156 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (SAC pad 1)") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 157 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (SAC pad 1)") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 158 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (SAC pad 1)") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 159 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (SAC pad 1)") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 160 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (SAC pad 1)") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 161 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (SAC pad 1)") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 162 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (SAC pad 1)") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 163 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (SAC pad 1)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 164 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (SAC pad 1)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 165 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 166 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Purple Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 167 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 168 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 153 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (SAC pad 1)") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 154 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (SAC pad 1)") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 155 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (SAC pad 1)") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 156 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (SAC pad 1)") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 157 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (SAC pad 1)") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 158 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (SAC pad 1)") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 159 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (SAC pad 1)") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 160 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (SAC pad 1)") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 161 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (SAC pad 1)") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 162 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (SAC pad 1)") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 163 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (SAC pad 1)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 164 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (SAC pad 1)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 165 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 166 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Purple Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 167 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 168 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 169 | 169 | |
| 170 | 170 | PORT_START("SAC_JOY1") |
| 171 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 172 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 173 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 174 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 176 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x02) | |
| 171 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 172 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 173 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 174 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P1") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 176 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x02) | |
| 177 | 177 | |
| 178 | 178 | PORT_START("SAC_SLIDE1") // SAC P1 slider |
| 179 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, | |
| 179 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, | |
| 180 | 180 | INPUT_PORTS_END |
| 181 | 181 | |
| 182 | 182 | static INPUT_PORTS_START( sac2 ) |
| 183 | 183 | PORT_START("SAC_KEYPAD2") |
| 184 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 185 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 186 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 187 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 188 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 189 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 190 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 191 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 192 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 193 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 194 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 195 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 196 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 197 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Purple Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 198 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 199 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 184 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("0 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 185 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("1 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 186 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 187 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("3 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 188 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("4 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 189 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 190 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("6 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 191 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("7 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 192 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("8 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 193 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("9 (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 194 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("# (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 195 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME(". (SAC pad 2)") PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 196 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 197 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Purple Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 198 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 199 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 200 | 200 | |
| 201 | 201 | PORT_START("SAC_JOY2") |
| 202 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 203 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 204 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 205 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 206 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 207 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x20) | |
| 202 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 203 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 204 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 205 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 206 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P2") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 207 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x20) | |
| 208 | 208 | |
| 209 | 209 | PORT_START("SAC_SLIDE2") // SAC P2 slider |
| 210 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, | |
| 210 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, | |
| 211 | 211 | INPUT_PORTS_END |
| 212 | 212 | |
| 213 | 213 | |
| 214 | 214 | // Driving Controller |
| 215 | 215 | static INPUT_PORTS_START( driv1 ) |
| 216 | 216 | PORT_START("DRIV_WHEEL1") |
| 217 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, | |
| 217 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, | |
| 218 | 218 | |
| 219 | 219 | PORT_START("DRIV_PEDAL1") |
| 220 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x03) | |
| 221 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x07, PORTCOND_EQUALS, 0x03) | |
| 220 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x03) | |
| 221 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x07, EQUALS, 0x03) | |
| 222 | 222 | INPUT_PORTS_END |
| 223 | 223 | |
| 224 | 224 | static INPUT_PORTS_START( driv2 ) |
| 225 | 225 | PORT_START("DRIV_WHEEL2") |
| 226 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, | |
| 226 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, | |
| 227 | 227 | |
| 228 | 228 | PORT_START("DRIV_PEDAL2") |
| 229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x30) | |
| 230 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x70, PORTCOND_EQUALS, 0x30) | |
| 229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x30) | |
| 230 | PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x70, EQUALS, 0x30) | |
| 231 | 231 | INPUT_PORTS_END |
| 232 | 232 | |
| 233 | 233 | |
| 234 | 234 | // Roller Controller |
| 235 | 235 | static INPUT_PORTS_START( roller ) |
| 236 | 236 | PORT_START("ROLLER_X") // Roller Controller X Axis |
| 237 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_CONDITION("CTRLSEL", 0x80, | |
| 237 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_REVERSE PORT_RESET PORT_CONDITION("CTRLSEL", 0x80, | |
| 238 | 238 | |
| 239 | 239 | PORT_START("ROLLER_Y") // Roller Controller Y Axis |
| 240 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_CONDITION("CTRLSEL", 0x80, | |
| 240 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_CONDITION("CTRLSEL", 0x80, | |
| 241 | 241 | INPUT_PORTS_END |
| 242 | 242 | |
| 243 | 243 |
| r15082 | r15083 | |
|---|---|---|
| 179 | 179 | switch (offset) |
| 180 | 180 | { |
| 181 | 181 | case 1: |
| 182 | return | |
| 182 | return | |
| 183 | 183 | case 2: |
| 184 | return | |
| 184 | return | |
| 185 | 185 | |
| 186 | 186 | case 8: |
| 187 | 187 | case 9: |
| r15082 | r15083 | |
|---|---|---|
| 242 | 242 | if (offset ==7) /* Only when joy reading*/ |
| 243 | 243 | { |
| 244 | 244 | /* Read special key for analog joystick emulation only (button and pot are analog signal!) and the reset */ |
| 245 | data=i | |
| 245 | data=iop | |
| 246 | 246 | |
| 247 | 247 | if (data & 0x01) /* Reset machine ! (on ESC key)*/ |
| 248 | 248 | { |
| r15082 | r15083 | |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /* in all case return the request value*/ |
| 304 | return i | |
| 304 | return iop | |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | WRITE8_MEMBER(hec2hrp_state::hector_sn_2000_w) |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | switch (offset) |
| 49 | 49 | { |
| 50 | 50 | case 0x000: |
| 51 | rv = i | |
| 51 | rv = iop | |
| 52 | 52 | logerror("TAPE: Read %02x from 0x40%02x - XOR Data?\n",rv,offset); |
| 53 | 53 | break; |
| 54 | 54 | case 0x001: |
| 55 | rv = (i | |
| 55 | rv = (iop | |
| 56 | 56 | logerror("TAPE: Read %02x from 0x40%02x - Sense 1?\n",rv,offset); |
| 57 | 57 | break; |
| 58 | 58 | case 0x002: |
| 59 | rv = (i | |
| 59 | rv = (iop | |
| 60 | 60 | logerror("TAPE: Read %02x from 0x40%02x - Sense 2?\n",rv,offset); |
| 61 | 61 | break; |
| 62 | 62 | case 0x003: |
| 63 | rv = (i | |
| 63 | rv = (iop | |
| 64 | 64 | logerror("TAPE: Read %02x from 0x40%02x - Tape Present\n",rv,offset); |
| 65 | 65 | break; |
| 66 | 66 | case 0x004: |
| 67 | rv = (i | |
| 67 | rv = (iop | |
| 68 | 68 | logerror("TAPE: Read %02x from 0x40%02x - Comp (339/1)\n",rv,offset); |
| 69 | 69 | break; |
| 70 | 70 | case 0x005: |
| 71 | rv = (i | |
| 71 | rv = (iop | |
| 72 | 72 | logerror("TAPE: Read %02x from 0x40%02x - Clocked Comp (339/13)\n",rv,offset); |
| 73 | 73 | break; |
| 74 | 74 | case 0x006: |
| r15082 | r15083 | |
| 88 | 88 | case 0x060: /* Keyboard Read */ |
| 89 | 89 | rv = 0xff; |
| 90 | 90 | if (m_intvkbd_keyboard_col == 0) |
| 91 | rv = i | |
| 91 | rv = iop | |
| 92 | 92 | if (m_intvkbd_keyboard_col == 1) |
| 93 | rv = i | |
| 93 | rv = iop | |
| 94 | 94 | if (m_intvkbd_keyboard_col == 2) |
| 95 | rv = i | |
| 95 | rv = iop | |
| 96 | 96 | if (m_intvkbd_keyboard_col == 3) |
| 97 | rv = i | |
| 97 | rv = iop | |
| 98 | 98 | if (m_intvkbd_keyboard_col == 4) |
| 99 | rv = i | |
| 99 | rv = iop | |
| 100 | 100 | if (m_intvkbd_keyboard_col == 5) |
| 101 | rv = i | |
| 101 | rv = iop | |
| 102 | 102 | if (m_intvkbd_keyboard_col == 6) |
| 103 | rv = i | |
| 103 | rv = iop | |
| 104 | 104 | if (m_intvkbd_keyboard_col == 7) |
| 105 | rv = i | |
| 105 | rv = iop | |
| 106 | 106 | if (m_intvkbd_keyboard_col == 8) |
| 107 | rv = i | |
| 107 | rv = iop | |
| 108 | 108 | if (m_intvkbd_keyboard_col == 9) |
| 109 | rv = i | |
| 109 | rv = iop | |
| 110 | 110 | break; |
| 111 | 111 | case 0x80: |
| 112 | 112 | rv = 0x00; |
| r15082 | r15083 | |
| 729 | 729 | UINT8 rv = 0xFF; |
| 730 | 730 | |
| 731 | 731 | /* keypad */ |
| 732 | x = | |
| 732 | x = | |
| 733 | 733 | for (y = 0; y < 16; y++) |
| 734 | 734 | { |
| 735 | 735 | if (x & (1 << y)) |
| r15082 | r15083 | |
| 738 | 738 | } |
| 739 | 739 | } |
| 740 | 740 | |
| 741 | switch (( | |
| 741 | switch (( | |
| 742 | 742 | { |
| 743 | 743 | case 0: /* disc == digital */ |
| 744 | 744 | default: |
| 745 | 745 | |
| 746 | x = | |
| 746 | x = | |
| 747 | 747 | for (y = 0; y < 16; y++) |
| 748 | 748 | { |
| 749 | 749 | if (x & (1 << y)) |
| r15082 | r15083 | |
| 755 | 755 | |
| 756 | 756 | case 1: /* disc == _fake_ analog */ |
| 757 | 757 | |
| 758 | x = input_port_read(space->machine(), discx_name[hand]); | |
| 759 | y = input_port_read(space->machine(), discy_name[hand]); | |
| 758 | x = space->machine().root_device().ioport(discx_name[hand])->read(); | |
| 759 | y = space->machine().root_device().ioport(discy_name[hand])->read(); | |
| 760 | 760 | rv &= discyx_table[y / 32][x / 32]; |
| 761 | 761 | } |
| 762 | 762 | |
| r15082 | r15083 | |
| 775 | 775 | |
| 776 | 776 | READ8_MEMBER( intv_state::intv_ecs_porta_r ) |
| 777 | 777 | { |
| 778 | if (i | |
| 778 | if (iop | |
| 779 | 779 | return intv_control_r(&space, 2); |
| 780 | 780 | else |
| 781 | 781 | return 0xff; // not sure what to return here, maybe it should be last output? |
| r15082 | r15083 | |
| 783 | 783 | |
| 784 | 784 | READ8_MEMBER( intv_state::intv_ecs_portb_r ) |
| 785 | 785 | { |
| 786 | switch (i | |
| 786 | switch (iop | |
| 787 | 787 | { |
| 788 | 788 | case 0x00: // hand controller |
| 789 | 789 | { |
| r15082 | r15083 | |
| 797 | 797 | for (int i=0; i<7; i++) |
| 798 | 798 | { |
| 799 | 799 | if (m_ecs_psg_porta & (1<<i)) |
| 800 | rv &= i | |
| 800 | rv &= iop | |
| 801 | 801 | } |
| 802 | 802 | return rv; |
| 803 | 803 | } |
| r15082 | r15083 | |
| 809 | 809 | for (int i=0; i<7; i++) |
| 810 | 810 | { |
| 811 | 811 | if (m_ecs_psg_porta & (1<<i)) |
| 812 | rv &= i | |
| 812 | rv &= iop | |
| 813 | 813 | } |
| 814 | 814 | return rv; |
| 815 | 815 | } |
| r15082 | r15083 | |
|---|---|---|
| 133 | 133 | |
| 134 | 134 | m_enable = 1; |
| 135 | 135 | |
| 136 | m_wp = i | |
| 136 | m_wp = iop | |
| 137 | 137 | m_game = !m_wp; |
| 138 | 138 | m_exrom = !m_wp; |
| 139 | 139 | } |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | if (offset == 2) |
| 96 | 96 | { |
| 97 | data = i | |
| 97 | data = iop | |
| 98 | 98 | } |
| 99 | 99 | else if (offset == 4) |
| 100 | 100 | { |
| 101 | data = i | |
| 101 | data = iop | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 35 | 35 | READ8_MEMBER(mikro80_state::mikro80_8255_portb_r) |
| 36 | 36 | { |
| 37 | 37 | UINT8 key = 0xff; |
| 38 | if ((m_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine(),"LINE0"); } | |
| 39 | if ((m_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine(),"LINE1"); } | |
| 40 | if ((m_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine(),"LINE2"); } | |
| 41 | if ((m_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine(),"LINE3"); } | |
| 42 | if ((m_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine(),"LINE4"); } | |
| 43 | if ((m_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine(),"LINE5"); } | |
| 44 | if ((m_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine(),"LINE6"); } | |
| 45 | if ((m_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine(),"LINE7"); } | |
| 38 | if ((m_keyboard_mask & 0x01)!=0) { key &= ioport("LINE0")->read(); } | |
| 39 | if ((m_keyboard_mask & 0x02)!=0) { key &= ioport("LINE1")->read(); } | |
| 40 | if ((m_keyboard_mask & 0x04)!=0) { key &= ioport("LINE2")->read(); } | |
| 41 | if ((m_keyboard_mask & 0x08)!=0) { key &= ioport("LINE3")->read(); } | |
| 42 | if ((m_keyboard_mask & 0x10)!=0) { key &= ioport("LINE4")->read(); } | |
| 43 | if ((m_keyboard_mask & 0x20)!=0) { key &= ioport("LINE5")->read(); } | |
| 44 | if ((m_keyboard_mask & 0x40)!=0) { key &= ioport("LINE6")->read(); } | |
| 45 | if ((m_keyboard_mask & 0x80)!=0) { key &= ioport("LINE7")->read(); } | |
| 46 | 46 | return key & m_key_mask; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | READ8_MEMBER(mikro80_state::mikro80_8255_portc_r) |
| 50 | 50 | { |
| 51 | return i | |
| 51 | return iop | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | WRITE8_MEMBER(mikro80_state::mikro80_8255_porta_w) |
| r15082 | r15083 | |
|---|---|---|
| 31 | 31 | if (m_mz80k_keyboard_line > 9) |
| 32 | 32 | return 0xff; |
| 33 | 33 | else |
| 34 | return i | |
| 34 | return iop | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | READ8_MEMBER( mz80_state::mz80k_8255_portc_r ) |
| r15082 | r15083 | |
|---|---|---|
| 323 | 323 | PORT_DIPNAME( 0x04, 0x04, "External Encoding PROM" ) // @ Z14 |
| 324 | 324 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 325 | 325 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 326 | PORT_DIPNAME( 0x18, 0x18, "Keyboard Language" ) PORT_CONDITION("DSW", 0x04, | |
| 326 | PORT_DIPNAME( 0x18, 0x18, "Keyboard Language" ) PORT_CONDITION("DSW", 0x04, | |
| 327 | 327 | PORT_DIPSETTING( 0x00, "Danish" ) |
| 328 | 328 | PORT_DIPSETTING( 0x10, DEF_STR( French ) ) |
| 329 | 329 | PORT_DIPSETTING( 0x08, DEF_STR( German ) ) |
| r15082 | r15083 | |
| 438 | 438 | void abc77_device::device_reset() |
| 439 | 439 | { |
| 440 | 440 | int t = 1.1 * RES_K(100) * CAP_N(100) * 1000; // t = 1.1 * R1 * C1 |
| 441 | int ea = BIT(i | |
| 441 | int ea = BIT(iop | |
| 442 | 442 | |
| 443 | 443 | // trigger reset |
| 444 | 444 | device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE); |
| r15082 | r15083 | |
| 493 | 493 | |
| 494 | 494 | if (m_stb && m_keylatch < 12) |
| 495 | 495 | { |
| 496 | data = i | |
| 496 | data = iop | |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 35 | 35 | if (BIT(m_keyboard_mask, i)) |
| 36 | 36 | { |
| 37 | 37 | sprintf(kbdrow,"LINE%d", i); |
| 38 | data &= i | |
| 38 | data &= iop | |
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | return data; |
| r15082 | r15083 | |
| 43 | 43 | |
| 44 | 44 | READ8_MEMBER( ut88_state::ut88_8255_portc_r ) |
| 45 | 45 | { |
| 46 | return i | |
| 46 | return iop | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | WRITE8_MEMBER( ut88_state::ut88_8255_porta_w ) |
| r15082 | r15083 | |
| 106 | 106 | UINT8 *keyrom1 = memregion("proms")->base(); |
| 107 | 107 | UINT8 *keyrom2 = memregion("proms")->base()+100; |
| 108 | 108 | |
| 109 | UINT8 key = keyrom2[i | |
| 109 | UINT8 key = keyrom2[iop | |
| 110 | 110 | |
| 111 | 111 | // if keyboard 2nd part returned 0 on 4th bit, output from |
| 112 | 112 | // first part is used |
| 113 | 113 | |
| 114 | 114 | if (!BIT(key, 3)) |
| 115 | key = keyrom1[i | |
| 115 | key = keyrom1[iop | |
| 116 | 116 | |
| 117 | 117 | // for delete key there is special key producing code 0x80 |
| 118 | 118 | |
| 119 | key = (BIT(i | |
| 119 | key = (BIT(iop | |
| 120 | 120 | |
| 121 | 121 | // If key 0 is pressed its value is 0x10 this is done by additional |
| 122 | 122 | // discrete logic |
| 123 | 123 | |
| 124 | key = (BIT(i | |
| 124 | key = (BIT(iop | |
| 125 | 125 | return key; |
| 126 | 126 | } |
| 127 | 127 |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | { |
| 86 | 86 | logerror("%s: tf20_dip_r\n", space->machine().describe_context()); |
| 87 | 87 | |
| 88 | return | |
| 88 | return | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | static TIMER_CALLBACK( tf20_upd765_tc_reset ) |
| r15082 | r15083 | |
|---|---|---|
| 53 | 53 | device_t *cia_1 = machine.device("cia_1"); |
| 54 | 54 | int cia1irq = mos6526_irq_r(cia_1); |
| 55 | 55 | |
| 56 | if (state->m_nmilevel != (in | |
| 56 | if (state->m_nmilevel != (machine.root_device().ioport | |
| 57 | 57 | { |
| 58 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (in | |
| 58 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (machine.root_device().ioport | |
| 59 | 59 | |
| 60 | state->m_nmilevel = (in | |
| 60 | state->m_nmilevel = (machine.root_device().ioport | |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| r15082 | r15083 | |
| 309 | 309 | else if (offset < 0xd00) |
| 310 | 310 | { |
| 311 | 311 | if (offset & 1) |
| 312 | cia_set_port_mask_value(cia_0, 1, | |
| 312 | cia_set_port_mask_value(cia_0, 1, | |
| 313 | 313 | else |
| 314 | cia_set_port_mask_value(cia_0, 0, | |
| 314 | cia_set_port_mask_value(cia_0, 0, s | |
| 315 | 315 | |
| 316 | 316 | return mos6526_r(cia_0, offset); |
| 317 | 317 | } |
| r15082 | r15083 | |
| 620 | 620 | running_machine &machine = device->machine(); |
| 621 | 621 | int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp; |
| 622 | 622 | UINT8 cia0porta = mos6526_pa_r(machine.device("cia_0"), 0); |
| 623 | int controller1 = input_port_read(machine, "CTRLSEL") & 0x07; | |
| 624 | int controller2 = input_port_read(machine, "CTRLSEL") & 0x70; | |
| 623 | int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07; | |
| 624 | int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70; | |
| 625 | 625 | /* Notice that only a single input is defined for Mouse & Lightpen in both ports */ |
| 626 | 626 | switch (controller1) |
| 627 | 627 | { |
| 628 | 628 | case 0x01: |
| 629 | 629 | if (which) |
| 630 | pot2 = in | |
| 630 | pot2 = machine.root_device().ioport | |
| 631 | 631 | else |
| 632 | pot1 = in | |
| 632 | pot1 = machine.root_device().ioport | |
| 633 | 633 | break; |
| 634 | 634 | |
| 635 | 635 | case 0x02: |
| 636 | 636 | if (which) |
| 637 | pot2 = in | |
| 637 | pot2 = machine.root_device().ioport | |
| 638 | 638 | else |
| 639 | pot1 = in | |
| 639 | pot1 = machine.root_device().ioport | |
| 640 | 640 | break; |
| 641 | 641 | |
| 642 | 642 | case 0x03: |
| 643 | if (which && (in | |
| 643 | if (which && (machine.root_device().ioport | |
| 644 | 644 | pot1 = 0x00; |
| 645 | 645 | break; |
| 646 | 646 | |
| 647 | 647 | case 0x04: |
| 648 | 648 | if (which) |
| 649 | pot2 = in | |
| 649 | pot2 = machine.root_device().ioport | |
| 650 | 650 | else |
| 651 | pot1 = in | |
| 651 | pot1 = machine.root_device().ioport | |
| 652 | 652 | break; |
| 653 | 653 | |
| 654 | 654 | case 0x06: |
| 655 | if (which && (in | |
| 655 | if (which && (machine.root_device().ioport | |
| 656 | 656 | pot2 = 0x00; |
| 657 | 657 | break; |
| 658 | 658 | |
| r15082 | r15083 | |
| 669 | 669 | { |
| 670 | 670 | case 0x10: |
| 671 | 671 | if (which) |
| 672 | pot4 = in | |
| 672 | pot4 = machine.root_device().ioport | |
| 673 | 673 | else |
| 674 | pot3 = in | |
| 674 | pot3 = machine.root_device().ioport | |
| 675 | 675 | break; |
| 676 | 676 | |
| 677 | 677 | case 0x20: |
| 678 | 678 | if (which) |
| 679 | pot4 = in | |
| 679 | pot4 = machine.root_device().ioport | |
| 680 | 680 | else |
| 681 | pot3 = in | |
| 681 | pot3 = machine.root_device().ioport | |
| 682 | 682 | break; |
| 683 | 683 | |
| 684 | 684 | case 0x30: |
| 685 | if (which && (in | |
| 685 | if (which && (machine.root_device().ioport | |
| 686 | 686 | pot4 = 0x00; |
| 687 | 687 | break; |
| 688 | 688 | |
| 689 | 689 | case 0x40: |
| 690 | 690 | if (which) |
| 691 | pot4 = in | |
| 691 | pot4 = machine.root_device().ioport | |
| 692 | 692 | else |
| 693 | pot3 = in | |
| 693 | pot3 = machine.root_device().ioport | |
| 694 | 694 | break; |
| 695 | 695 | |
| 696 | 696 | case 0x60: |
| 697 | if (which && (in | |
| 697 | if (which && (machine.root_device().ioport | |
| 698 | 698 | pot4 = 0x00; |
| 699 | 699 | break; |
| 700 | 700 | |
| r15082 | r15083 | |
| 707 | 707 | break; |
| 708 | 708 | } |
| 709 | 709 | |
| 710 | if (in | |
| 710 | if (machine.root_device().ioport | |
| 711 | 711 | { |
| 712 | 712 | temp = pot1; pot1 = pot3; pot3 = temp; |
| 713 | 713 | temp = pot2; pot2 = pot4; pot4 = temp; |
| r15082 | r15083 | |
|---|---|---|
| 679 | 679 | * 01 - color 40x25 |
| 680 | 680 | * 6-7 The number of floppy disk drives |
| 681 | 681 | */ |
| 682 | data = | |
| 682 | data = | |
| 683 | 683 | } |
| 684 | 684 | else |
| 685 | 685 | { |
| r15082 | r15083 | |
| 704 | 704 | if (st->m_ppi_portc_switch_high) |
| 705 | 705 | { |
| 706 | 706 | /* read hi nibble of S2 */ |
| 707 | data = (data & 0xf0) | (( | |
| 707 | data = (data & 0xf0) | (( | |
| 708 | 708 | PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); |
| 709 | 709 | } |
| 710 | 710 | else |
| 711 | 711 | { |
| 712 | 712 | /* read lo nibble of S2 */ |
| 713 | data = (data & 0xf0) | ( | |
| 713 | data = (data & 0xf0) | ( | |
| 714 | 714 | PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); |
| 715 | 715 | } |
| 716 | 716 | |
| r15082 | r15083 | |
| 779 | 779 | * 01 - color 40x25 |
| 780 | 780 | * 6-7 The number of floppy disk drives |
| 781 | 781 | */ |
| 782 | data = | |
| 782 | data = | |
| 783 | 783 | } |
| 784 | 784 | else |
| 785 | 785 | { |
| r15082 | r15083 | |
| 1089 | 1089 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pcjr_set_keyb_int, pc_set_irq_line); |
| 1090 | 1090 | } |
| 1091 | 1091 | |
| 1092 | static READ8_HANDLER( input_port_0_r ) { return | |
| 1092 | static READ8_HANDLER( input_port_0_r ) { return | |
| 1093 | 1093 | |
| 1094 | 1094 | DRIVER_INIT( pc1640 ) |
| 1095 | 1095 | { |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | UINT16 addr = cpu_get_reg(machine().device(CDP1802_TAG), COSMAC_R0 + cpu_get_reg(machine().device(CDP1802_TAG), COSMAC_X)); |
| 110 | 110 | /* just in case somone is reading non existing ports */ |
| 111 | 111 | if (addr<0x7cca || addr>0x7ce3) return 0; |
| 112 | return i | |
| 112 | return iop | |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /* CDP1802 Interface */ |
| r15082 | r15083 | |
| 123 | 123 | |
| 124 | 124 | static READ_LINE_DEVICE_HANDLER( ef2_r ) |
| 125 | 125 | { |
| 126 | int shift = BIT( | |
| 126 | int shift = BIT( | |
| 127 | 127 | double cas = dynamic_cast<cassette_image_device *>(device)->input(); |
| 128 | 128 | |
| 129 | 129 | return (cas > 0.0) | shift; |
| r15082 | r15083 | |
| 134 | 134 | { |
| 135 | 135 | int flags = 0x0f; |
| 136 | 136 | double valcas = (cassette_device_image(device->machine()));->input() |
| 137 | UINT8 val = | |
| 137 | UINT8 val = | |
| 138 | 138 | |
| 139 | 139 | if ((val & 0x04)==0x04 && pecom_prev_caps_state==0) |
| 140 | 140 | { |
| r15082 | r15083 | |
|---|---|---|
| 295 | 295 | |
| 296 | 296 | /* Note: Arcade Card BIOS contents are the same as System 3, only internal HW differs. |
| 297 | 297 | We use a category to select between modes (some games can be run in either S-CD or A-CD modes) */ |
| 298 | state->m_acard = in | |
| 298 | state->m_acard = machine.root_device().ioport | |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /* todo: how many input ports does the PCE have? */ |
| 302 | 302 | WRITE8_MEMBER(pce_state::mess_pce_joystick_w) |
| 303 | 303 | { |
| 304 | 304 | int joy_i; |
| 305 | UINT8 joy_type = i | |
| 305 | UINT8 joy_type = iop | |
| 306 | 306 | |
| 307 | 307 | h6280io_set_buffer(&space.device(), data); |
| 308 | 308 | |
| r15082 | r15083 | |
| 336 | 336 | { "JOY6B_P1", "JOY6B_P2", "JOY6B_P3", "JOY6B_P4", "JOY6B_P5" }, |
| 337 | 337 | { } |
| 338 | 338 | }; |
| 339 | UINT8 joy_type = i | |
| 339 | UINT8 joy_type = iop | |
| 340 | 340 | UINT8 ret, data; |
| 341 | 341 | |
| 342 | 342 | if (m_joystick_port_select <= 4) |
| r15082 | r15083 | |
| 344 | 344 | switch((joy_type >> (m_joystick_port_select*2)) & 3) |
| 345 | 345 | { |
| 346 | 346 | case 0: //2-buttons pad |
| 347 | data = i | |
| 347 | data = iop | |
| 348 | 348 | break; |
| 349 | 349 | case 2: //6-buttons pad |
| 350 | 350 | /* |
| r15082 | r15083 | |
| 354 | 354 | Note that six buttons pad just doesn't work with (almost?) every single 2-button-only games, it's really just an after-thought and it is like this |
| 355 | 355 | on real HW. |
| 356 | 356 | */ |
| 357 | data = i | |
| 357 | data = iop | |
| 358 | 358 | break; |
| 359 | 359 | default: |
| 360 | 360 | data = 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 91 | 91 | UINT8 vic1110_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3) |
| 92 | 92 | { |
| 93 | 93 | UINT8 data = 0; |
| 94 | UINT8 sw = i | |
| 94 | UINT8 sw = iop | |
| 95 | 95 | |
| 96 | 96 | if ((!blk1 && (sw == BLK1)) || (!blk2 && (sw == BLK2)) || (!blk3 && (sw == BLK3)) || (!blk5 && (sw == BLK5))) |
| 97 | 97 | { |
| r15082 | r15083 | |
| 108 | 108 | |
| 109 | 109 | void vic1110_device::vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3) |
| 110 | 110 | { |
| 111 | UINT8 sw = i | |
| 111 | UINT8 sw = iop | |
| 112 | 112 | |
| 113 | 113 | if ((!blk1 && (sw == BLK1)) || (!blk2 && (sw == BLK2)) || (!blk3 && (sw == BLK3)) || (!blk5 && (sw == BLK5))) |
| 114 | 114 | { |
| r15082 | r15083 | |
|---|---|---|
| 751 | 751 | /* KBD IC4 8 input NAND gate */ |
| 752 | 752 | /* set the value of via_system ca2, by checking for any keys |
| 753 | 753 | being pressed on the selected state->m_column */ |
| 754 | if (( | |
| 754 | if (( | |
| 755 | 755 | { |
| 756 | 756 | via_0->write_ca2(1); |
| 757 | 757 | } |
| r15082 | r15083 | |
| 792 | 792 | /* KBD IC4 8 input NAND gate */ |
| 793 | 793 | /* set the value of via_system ca2, by checking for any keys |
| 794 | 794 | being pressed on the selected state->m_column */ |
| 795 | if (( | |
| 795 | if (( | |
| 796 | 796 | { |
| 797 | 797 | via_0->write_ca2(1); |
| 798 | 798 | } |
| r15082 | r15083 | |
| 830 | 830 | |
| 831 | 831 | if (state->m_column < 10) |
| 832 | 832 | { |
| 833 | res = | |
| 833 | res = | |
| 834 | 834 | } |
| 835 | 835 | else |
| 836 | 836 | { |
| r15082 | r15083 | |
| 1147 | 1147 | { |
| 1148 | 1148 | TMSint=(!status)&1; |
| 1149 | 1149 | TMSrdy=(!tms5220_readyq_r())&1; |
| 1150 | via_0_portb_w(0,(0xf | in | |
| 1150 | via_0_portb_w(0,(0xf | machine.root_device().ioport | |
| 1151 | 1151 | } |
| 1152 | 1152 | #endif |
| 1153 | 1153 | |
| r15082 | r15083 | |
| 1159 | 1159 | |
| 1160 | 1160 | //logerror("SYSTEM read portb %d\n",0xf | input_port(machine, "IN0")|(TMSint<<6)|(TMSrdy<<7)); |
| 1161 | 1161 | |
| 1162 | return (0xf | | |
| 1162 | return (0xf | | |
| 1163 | 1163 | } |
| 1164 | 1164 | |
| 1165 | 1165 | |
| r15082 | r15083 | |
| 1273 | 1273 | switch(channel_number) |
| 1274 | 1274 | { |
| 1275 | 1275 | case 0: |
| 1276 | return ((0xff- | |
| 1276 | return ((0xff- | |
| 1277 | 1277 | case 1: |
| 1278 | return ((0xff- | |
| 1278 | return ((0xff- | |
| 1279 | 1279 | case 2: |
| 1280 | return ((0xff- | |
| 1280 | return ((0xff- | |
| 1281 | 1281 | case 3: |
| 1282 | return ((0xff- | |
| 1282 | return ((0xff- | |
| 1283 | 1283 | } |
| 1284 | 1284 | |
| 1285 | 1285 | return 0; |
| r15082 | r15083 | |
| 2020 | 2020 | state->m_mc6850_clock = 0; |
| 2021 | 2021 | //removed from here because MACHINE_START can no longer read DIP swiches. |
| 2022 | 2022 | //put in MACHINE_RESET instead. |
| 2023 | //state->m_DFSType= (input_port_read(machine, "BBCCONFIG")>>0)&0x07; | |
| 2024 | //state->m_SWRAMtype=(input_port_read(machine, "BBCCONFIG")>>3)&0x03; | |
| 2025 | //state->m_RAMSize= (input_port_read(machine, "BBCCONFIG")>>5)&0x01; | |
| 2023 | //state->m_DFSType= (machine.root_device().ioport("BBCCONFIG")->read()>>0)&0x07; | |
| 2024 | //state->m_SWRAMtype=(machine.root_device().ioport("BBCCONFIG")->read()>>3)&0x03; | |
| 2025 | //state->m_RAMSize= (machine.root_device().ioport("BBCCONFIG")->read()>>5)&0x01; | |
| 2026 | 2026 | |
| 2027 | 2027 | /*set up the required disc controller*/ |
| 2028 | 2028 | //switch (state->m_DFSType) { |
| r15082 | r15083 | |
| 2039 | 2039 | { |
| 2040 | 2040 | bbc_state *state = machine.driver_data<bbc_state>(); |
| 2041 | 2041 | UINT8 *ram = state->memregion("maincpu")->base(); |
| 2042 | state->m_DFSType= (input_port_read(machine, "BBCCONFIG") >> 0) & 0x07; | |
| 2043 | state->m_SWRAMtype = (input_port_read(machine, "BBCCONFIG") >> 3) & 0x03; | |
| 2044 | state->m_RAMSize= (input_port_read(machine, "BBCCONFIG") >> 5) & 0x01; | |
| 2042 | state->m_DFSType= (machine.root_device().ioport("BBCCONFIG")->read() >> 0) & 0x07; | |
| 2043 | state->m_SWRAMtype = (machine.root_device().ioport("BBCCONFIG")->read() >> 3) & 0x03; | |
| 2044 | state->m_RAMSize= (machine.root_device().ioport("BBCCONFIG")->read() >> 5) & 0x01; | |
| 2045 | 2045 | |
| 2046 | 2046 | state->membank("bank1")->set_base(ram); |
| 2047 | 2047 | if (state->m_RAMSize) |
| r15082 | r15083 | |
|---|---|---|
| 163 | 163 | |
| 164 | 164 | static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7" }; |
| 165 | 165 | |
| 166 | if ( | |
| 166 | if ( | |
| 167 | 167 | { |
| 168 | kr2376->modifiers = | |
| 168 | kr2376->modifiers = | |
| 169 | 169 | |
| 170 | 170 | kr2376->strobe = 1; |
| 171 | 171 | /* strobe 0->1 transition, encode char and update parity */ |
| r15082 | r15083 | |
|---|---|---|
| 241 | 241 | else |
| 242 | 242 | { |
| 243 | 243 | // read data from font ROM |
| 244 | int font_rom = (i | |
| 244 | int font_rom = (iop | |
| 245 | 245 | |
| 246 | 246 | m_plotter_data = memregion("gfx2")->base()[font_rom | m_font_addr]; |
| 247 | 247 | } |
| r15082 | r15083 | |
| 255 | 255 | if (BIT(data, 7)) |
| 256 | 256 | { |
| 257 | 257 | // read switches |
| 258 | m_plotter_data = i | |
| 258 | m_plotter_data = iop | |
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 |
| r15082 | r15083 | |
|---|---|---|
| 261 | 261 | int in = 0; |
| 262 | 262 | |
| 263 | 263 | /* regular keys */ |
| 264 | if ( (state->m_out >> 0) & 1 ) in |= input_port_read( machine, "LINE0" ); | |
| 265 | if ( (state->m_out >> 1) & 1 ) in |= input_port_read( machine, "LINE1" ); | |
| 266 | if ( (state->m_out >> 2) & 1 ) in |= input_port_read( machine, "LINE2" ); | |
| 267 | if ( (state->m_out >> 3) & 1 ) in |= input_port_read( machine, "LINE3" ); | |
| 268 | if ( (state->m_out >> 4) & 1 ) in |= input_port_read( machine, "LINE4" ); | |
| 269 | if ( (state->m_out >> 5) & 1 ) in |= input_port_read( machine, "LINE5" ); | |
| 270 | if ( (state->m_out >> 6) & 1 ) in |= input_port_read( machine, "LINE6" ); | |
| 271 | if ( (state->m_out >> 7) & 1 ) in |= input_port_read( machine, "LINE7" ); | |
| 272 | if ( (state->m_out >> 8) & 1 ) in |= input_port_read( machine, "LINE8" ); | |
| 264 | if ( (state->m_out >> 0) & 1 ) in |= machine.root_device().ioport( "LINE0" )->read(); | |
| 265 | if ( (state->m_out >> 1) & 1 ) in |= machine.root_device().ioport( "LINE1" )->read(); | |
| 266 | if ( (state->m_out >> 2) & 1 ) in |= machine.root_device().ioport( "LINE2" )->read(); | |
| 267 | if ( (state->m_out >> 3) & 1 ) in |= machine.root_device().ioport( "LINE3" )->read(); | |
| 268 | if ( (state->m_out >> 4) & 1 ) in |= machine.root_device().ioport( "LINE4" )->read(); | |
| 269 | if ( (state->m_out >> 5) & 1 ) in |= machine.root_device().ioport( "LINE5" )->read(); | |
| 270 | if ( (state->m_out >> 6) & 1 ) in |= machine.root_device().ioport( "LINE6" )->read(); | |
| 271 | if ( (state->m_out >> 7) & 1 ) in |= machine.root_device().ioport( "LINE7" )->read(); | |
| 272 | if ( (state->m_out >> 8) & 1 ) in |= machine.root_device().ioport( "LINE8" )->read(); | |
| 273 | 273 | |
| 274 | 274 | /* on key */ |
| 275 | in |= in | |
| 275 | in |= machine.root_device().ioport | |
| 276 | 276 | |
| 277 | 277 | return in; |
| 278 | 278 | } |
| r15082 | r15083 | |
| 309 | 309 | { |
| 310 | 310 | hp48_state *state = machine.driver_data<hp48_state>(); |
| 311 | 311 | /* NMI for ON key */ |
| 312 | if ( in | |
| 312 | if ( machine.root_device().ioport | |
| 313 | 313 | { |
| 314 | 314 | LOG(( "%f hp48_kbd_cb: keyboard interrupt, on key\n", |
| 315 | 315 | machine.time().as_double() )); |
| r15082 | r15083 | |
| 504 | 504 | bit 3: battery in port 2 |
| 505 | 505 | bit 2: battery in port 1 |
| 506 | 506 | */ |
| 507 | switch ( | |
| 507 | switch ( s | |
| 508 | 508 | { |
| 509 | 509 | case 1: data = 2; break; /* low */ |
| 510 | 510 | case 2: data = 3; break; /* low | critical */ |
| r15082 | r15083 | |
|---|---|---|
| 453 | 453 | |
| 454 | 454 | switch (m_y & 0x0f) |
| 455 | 455 | { |
| 456 | case 0: data &= input_port_read(*this, "Y0"); break; | |
| 457 | case 1: data &= input_port_read(*this, "Y1"); break; | |
| 458 | case 2: data &= input_port_read(*this, "Y2"); break; | |
| 459 | case 3: data &= input_port_read(*this, "Y3"); break; | |
| 460 | case 4: data &= input_port_read(*this, "Y4"); break; | |
| 461 | case 5: data &= input_port_read(*this, "Y5"); break; | |
| 462 | case 6: data &= input_port_read(*this, "Y6"); break; | |
| 463 | case 7: data &= input_port_read(*this, "Y7"); break; | |
| 464 | case 8: data &= input_port_read(*this, "Y8"); break; | |
| 465 | case 9: data &= input_port_read(*this, "Y9"); break; | |
| 466 | case 0xa: data &= input_port_read(*this, "YA"); break; | |
| 467 | case 0xb: data &= input_port_read(*this, "YB"); break; | |
| 468 | case 0xc: data &= input_port_read(*this, "YC"); break; | |
| 469 | case 0xd: data &= input_port_read(*this, "YD"); break; | |
| 470 | case 0xe: data &= input_port_read(*this, "YE"); break; // SW1? | |
| 471 | case 0xf: data &= input_port_read(*this, "YF"); break; // SW2? | |
| 456 | case 0: data &= ioport("Y0")->read(); break; | |
| 457 | case 1: data &= ioport("Y1")->read(); break; | |
| 458 | case 2: data &= ioport("Y2")->read(); break; | |
| 459 | case 3: data &= ioport("Y3")->read(); break; | |
| 460 | case 4: data &= ioport("Y4")->read(); break; | |
| 461 | case 5: data &= ioport("Y5")->read(); break; | |
| 462 | case 6: data &= ioport("Y6")->read(); break; | |
| 463 | case 7: data &= ioport("Y7")->read(); break; | |
| 464 | case 8: data &= ioport("Y8")->read(); break; | |
| 465 | case 9: data &= ioport("Y9")->read(); break; | |
| 466 | case 0xa: data &= ioport("YA")->read(); break; | |
| 467 | case 0xb: data &= ioport("YB")->read(); break; | |
| 468 | case 0xc: data &= ioport("YC")->read(); break; | |
| 469 | case 0xd: data &= ioport("YD")->read(); break; | |
| 470 | case 0xe: data &= ioport("YE")->read(); break; // SW1? | |
| 471 | case 0xf: data &= ioport("YF")->read(); break; // SW2? | |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 45 | 45 | device_t *cia_1 = machine.device("cia_1"); |
| 46 | 46 | int cia1irq = mos6526_irq_r(cia_1); |
| 47 | 47 | |
| 48 | if (state->m_nmilevel != (in | |
| 48 | if (state->m_nmilevel != (machine.root_device().ioport | |
| 49 | 49 | { |
| 50 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (in | |
| 50 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (machine.root_device().ioport | |
| 51 | 51 | |
| 52 | state->m_nmilevel = (in | |
| 52 | state->m_nmilevel = (machine.root_device().ioport | |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| r15082 | r15083 | |
| 412 | 412 | |
| 413 | 413 | if (offset == 7) |
| 414 | 414 | { |
| 415 | if (in | |
| 415 | if (machine.root_device().ioport | |
| 416 | 416 | data &= ~1; |
| 417 | 417 | } |
| 418 | 418 | DBG_LOG(machine, 2, "r6511 read", ("%.2x\n", offset)); |
| r15082 | r15083 | |
| 1065 | 1065 | /* c65 specific: function keys input ports */ |
| 1066 | 1066 | value = 0xff; |
| 1067 | 1067 | |
| 1068 | value &= ~ | |
| 1068 | value &= ~s | |
| 1069 | 1069 | state->m_keyline = value; |
| 1070 | 1070 | } |
| r15082 | r15083 | |
|---|---|---|
| 96 | 96 | |
| 97 | 97 | void isa16_ide_device::device_reset() |
| 98 | 98 | { |
| 99 | m_is_primary = (i | |
| 99 | m_is_primary = (iop | |
| 100 | 100 | if (m_is_primary) { |
| 101 | 101 | m_isa->install16_device(subdevice("ide"), 0x01f0, 0x01f7, 0, 0, FUNC(ide16_r), FUNC(ide16_w) ); |
| 102 | 102 | } else { |
| r15082 | r15083 | |
|---|---|---|
| 470 | 470 | astring tempstring; |
| 471 | 471 | if (m_inserted_cdrom) SCSIDeleteInstance(m_inserted_cdrom); |
| 472 | 472 | SCSIAllocInstance( machine(), &SCSIClassCr589, &m_inserted_cdrom, subtag(tempstring, "cdrom")); |
| 473 | m_is_primary = (i | |
| 473 | m_is_primary = (iop | |
| 474 | 474 | if (m_is_primary) { |
| 475 | 475 | m_isa->install16_device(0x01f0, 0x01f7, 0, 0, read16_delegate(FUNC(isa16_ide_cd_device::atapi_r), this), write16_delegate(FUNC(isa16_ide_cd_device::atapi_w), this)); |
| 476 | 476 | //m_isa->install16_device(0x03f0, 0x03f7, 0, 0, read16_delegate(FUNC(isa16_ide_cd_device::atapi_status_r), this), write16_delegate(FUNC(isa16_ide_cd_device::atapi_cmd_w), this)); |
| r15082 | r15083 | |
|---|---|---|
| 961 | 961 | if (m_type==PCB_GKRACKER) |
| 962 | 962 | { |
| 963 | 963 | cartridge_pcb_gramkracker_device* pcb = static_cast<cartridge_pcb_gramkracker_device*>(m_pcb); |
| 964 | pcb->m_gk_switch[1] = input_port_read(*owner(), GKSWITCH1_TAG); | |
| 965 | pcb->m_gk_switch[2] = input_port_read(*owner(), GKSWITCH2_TAG); | |
| 966 | pcb->m_gk_switch[3] = input_port_read(*owner(), GKSWITCH3_TAG); | |
| 967 | pcb->m_gk_switch[4] = input_port_read(*owner(), GKSWITCH4_TAG); | |
| 968 | pcb->m_gk_switch[5] = input_port_read(*owner(), GKSWITCH5_TAG); | |
| 964 | pcb->m_gk_switch[1] = owner()->ioport(GKSWITCH1_TAG)->read(); | |
| 965 | pcb->m_gk_switch[2] = owner()->ioport(GKSWITCH2_TAG)->read(); | |
| 966 | pcb->m_gk_switch[3] = owner()->ioport(GKSWITCH3_TAG)->read(); | |
| 967 | pcb->m_gk_switch[4] = owner()->ioport(GKSWITCH4_TAG)->read(); | |
| 968 | pcb->m_gk_switch[5] = owner()->ioport(GKSWITCH5_TAG)->read(); | |
| 969 | 969 | } |
| 970 | 970 | } |
| 971 | 971 | |
| r15082 | r15083 | |
| 1430 | 1430 | // source of confusion when the GRAMKracker is plugged in, but the switch |
| 1431 | 1431 | // is not set. |
| 1432 | 1432 | // The check for the presence of the GK using the index is safer. |
| 1433 | if ((m_gk_slot != -1) /*&& (i | |
| 1433 | if ((m_gk_slot != -1) /*&& (iop | |
| 1434 | 1434 | { |
| 1435 | 1435 | m_cartridge[m_gk_slot]->readz(space, offset, value, mem_mask); |
| 1436 | 1436 | return; |
| r15082 | r15083 | |
| 1468 | 1468 | WRITE8_MEMBER(gromport_device::write) |
| 1469 | 1469 | { |
| 1470 | 1470 | // GRAMKracker support |
| 1471 | if ((m_gk_slot != -1) /*&& (i | |
| 1471 | if ((m_gk_slot != -1) /*&& (iop | |
| 1472 | 1472 | { |
| 1473 | 1473 | m_cartridge[m_gk_slot]->write(space, offset, data, mem_mask); |
| 1474 | 1474 | return; |
| r15082 | r15083 | |
| 1512 | 1512 | void gromport_device::crureadz(offs_t offset, UINT8 *value) |
| 1513 | 1513 | { |
| 1514 | 1514 | // GRAMKracker support |
| 1515 | if ((m_gk_slot != -1) /* && (i | |
| 1515 | if ((m_gk_slot != -1) /* && (iop | |
| 1516 | 1516 | { |
| 1517 | 1517 | m_cartridge[m_gk_slot]->crureadz(offset, value); |
| 1518 | 1518 | return; |
| r15082 | r15083 | |
| 1533 | 1533 | void gromport_device::cruwrite(offs_t offset, UINT8 data) |
| 1534 | 1534 | { |
| 1535 | 1535 | // GRAMKracker support |
| 1536 | if ((m_gk_slot != -1) /*&& (i | |
| 1536 | if ((m_gk_slot != -1) /*&& (iop | |
| 1537 | 1537 | { |
| 1538 | 1538 | m_cartridge[m_gk_slot]->cruwrite(offset, data); |
| 1539 | 1539 | return; |
| r15082 | r15083 | |
| 1586 | 1586 | void gromport_device::device_reset(void) |
| 1587 | 1587 | { |
| 1588 | 1588 | m_active_slot = 0; |
| 1589 | m_fixed_slot = i | |
| 1589 | m_fixed_slot = iop | |
| 1590 | 1590 | } |
| 1591 | 1591 | |
| 1592 | 1592 | INPUT_CHANGED_MEMBER( gromport_device::gk_changed ) |
| r15082 | r15083 | |
| 1609 | 1609 | PORT_DIPSETTING( 0x0f, "GRAM Kracker" ) |
| 1610 | 1610 | |
| 1611 | 1611 | PORT_START( GKSWITCH1_TAG ) |
| 1612 | PORT_DIPNAME( 0x01, 0x01, "GK switch 1" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1612 | PORT_DIPNAME( 0x01, 0x01, "GK switch 1" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1613 | 1613 | PORT_DIPSETTING( 0x00, "GK Off" ) |
| 1614 | 1614 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 1615 | 1615 | |
| 1616 | 1616 | PORT_START( GKSWITCH2_TAG ) |
| 1617 | PORT_DIPNAME( 0x01, 0x01, "GK switch 2" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1617 | PORT_DIPNAME( 0x01, 0x01, "GK switch 2" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1618 | 1618 | PORT_DIPSETTING( 0x00, "GRAM 0" ) |
| 1619 | 1619 | PORT_DIPSETTING( 0x01, "Op Sys" ) |
| 1620 | 1620 | |
| 1621 | 1621 | PORT_START( GKSWITCH3_TAG ) |
| 1622 | PORT_DIPNAME( 0x01, 0x01, "GK switch 3" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1622 | PORT_DIPNAME( 0x01, 0x01, "GK switch 3" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1623 | 1623 | PORT_DIPSETTING( 0x00, "GRAM 1-2" ) |
| 1624 | 1624 | PORT_DIPSETTING( 0x01, "TI BASIC" ) |
| 1625 | 1625 | |
| 1626 | 1626 | PORT_START( GKSWITCH4_TAG ) |
| 1627 | PORT_DIPNAME( 0x03, 0x01, "GK switch 4" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1627 | PORT_DIPNAME( 0x03, 0x01, "GK switch 4" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1628 | 1628 | PORT_DIPSETTING( 0x00, "Bank 1" ) |
| 1629 | 1629 | PORT_DIPSETTING( 0x01, "W/P" ) |
| 1630 | 1630 | PORT_DIPSETTING( 0x02, "Bank 2" ) |
| 1631 | 1631 | |
| 1632 | 1632 | PORT_START( GKSWITCH5_TAG ) |
| 1633 | PORT_DIPNAME( 0x01, 0x00, "GK switch 5" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1633 | PORT_DIPNAME( 0x01, 0x00, "GK switch 5" ) PORT_CONDITION( "CARTSLOT", 0x0f, | |
| 1634 | 1634 | PORT_DIPSETTING( 0x00, "Loader On" ) |
| 1635 | 1635 | PORT_DIPSETTING( 0x01, "Loader Off" ) |
| 1636 | 1636 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 576 | 576 | m_led_on = false; |
| 577 | 577 | m_mbx_enabled = false; |
| 578 | 578 | m_ram_enabled = false; |
| 579 | m_flash_mode = (i | |
| 579 | m_flash_mode = (iop | |
| 580 | 580 | |
| 581 | 581 | m_current_grom_port = 0; |
| 582 | 582 | m_current_bank = 0; |
| r15082 | r15083 | |
|---|---|---|
| 851 | 851 | |
| 852 | 852 | m_genmod = false; |
| 853 | 853 | |
| 854 | if (i | |
| 854 | if (iop | |
| 855 | 855 | { |
| 856 | switch (i | |
| 856 | switch (iop | |
| 857 | 857 | { |
| 858 | 858 | case GENEVE_098: |
| 859 | 859 | if (VERBOSE>0) LOG("geneve: Using 0.98 boot eprom\n"); |
| r15082 | r15083 | |
| 874 | 874 | fatalerror("genboard: GenMod boot rom missing.\n"); |
| 875 | 875 | } |
| 876 | 876 | m_genmod = true; |
| 877 | m_turbo = ((input_port_read(machine(), "GENMODDIPS") & GM_TURBO)!=0); | |
| 878 | m_timode = ((input_port_read(machine(), "GENMODDIPS") & GM_TIM)!=0); | |
| 877 | m_turbo = ((ioport("GENMODDIPS")->read() & GM_TURBO)!=0); | |
| 878 | m_timode = ((ioport("GENMODDIPS")->read() & GM_TIM)!=0); | |
| 879 | 879 | } |
| 880 | 880 | |
| 881 | switch (i | |
| 881 | switch (iop | |
| 882 | 882 | { |
| 883 | 883 | /* 1 100. .... .... .... .... on-board sram (128K) -+ |
| 884 | 884 | 1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion |
| r15082 | r15083 | |
| 968 | 968 | /* Poll keyboard */ |
| 969 | 969 | for (i = 0; (i < 4) && (m_key_queue_length <= (KEYQUEUESIZE-MAXKEYMSGLENGTH)); i++) |
| 970 | 970 | { |
| 971 | keystate = i | |
| 971 | keystate = iop | |
| 972 | 972 | key_transitions = keystate ^ m_key_state_save[i]; |
| 973 | 973 | if (key_transitions) |
| 974 | 974 | { |
| r15082 | r15083 | |
| 1401 | 1401 | |
| 1402 | 1402 | line_state geneve_mouse_device::left_button() |
| 1403 | 1403 | { |
| 1404 | return ((i | |
| 1404 | return ((iop | |
| 1405 | 1405 | } |
| 1406 | 1406 | |
| 1407 | 1407 | void geneve_mouse_device::poll() |
| r15082 | r15083 | |
| 1409 | 1409 | int new_mx, new_my; |
| 1410 | 1410 | int delta_x, delta_y, buttons; |
| 1411 | 1411 | |
| 1412 | buttons = input_port_read(*this, "MOUSE0"); | |
| 1413 | new_mx = input_port_read(*this, "MOUSEX"); | |
| 1414 | new_my = input_port_read(*this, "MOUSEY"); | |
| 1412 | buttons = ioport("MOUSE0")->read(); | |
| 1413 | new_mx = ioport("MOUSEX")->read(); | |
| 1414 | new_my = ioport("MOUSEY")->read(); | |
| 1415 | 1415 | |
| 1416 | 1416 | /* compute x delta */ |
| 1417 | 1417 | delta_x = new_mx - m_last_mx; |
| r15082 | r15083 | |
|---|---|---|
| 266 | 266 | m_bank_select = 1; |
| 267 | 267 | m_selected = false; |
| 268 | 268 | |
| 269 | m_switch = i | |
| 269 | m_switch = iop | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | void ti_pcode_card_device::device_config_complete() |
| r15082 | r15083 | |
|---|---|---|
| 291 | 291 | } |
| 292 | 292 | m_selected = false; |
| 293 | 293 | |
| 294 | m_cru_base = i | |
| 294 | m_cru_base = iop | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | ROM_START( tn_usbsm ) |
| r15082 | r15083 | |
|---|---|---|
| 242 | 242 | { |
| 243 | 243 | if ((offset & 0x00f0)==0) // offset 0 delivers bits 0-7 (address 00-0f) |
| 244 | 244 | { |
| 245 | *value = ~(input_port_read(*this, "EVPC-SW1") | (input_port_read(*this, "EVPC-SW3")<<2) | |
| 246 | | (input_port_read(*this, "EVPC-SW4")<<3) | (input_port_read(*this, "EVPC-SW8")<<7)); | |
| 245 | *value = ~(ioport("EVPC-SW1")->read() | (ioport("EVPC-SW3")->read()<<2) | |
| 246 | | (ioport("EVPC-SW4")->read()<<3) | (ioport("EVPC-SW8")->read()<<7)); | |
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | } |
| r15082 | r15083 | |
| 334 | 334 | */ |
| 335 | 335 | INPUT_PORTS_START( ti99_evpc ) |
| 336 | 336 | PORT_START( "EVPC-SW1" ) |
| 337 | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 337 | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 338 | 338 | PORT_DIPSETTING( 0x00, "PAL" ) |
| 339 | 339 | PORT_DIPSETTING( 0x01, "NTSC" ) |
| 340 | 340 | |
| 341 | 341 | PORT_START( "EVPC-SW3" ) |
| 342 | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 342 | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 343 | 343 | PORT_DIPSETTING( 0x00, DEF_STR( International )) |
| 344 | 344 | PORT_DIPSETTING( 0x01, DEF_STR( German )) |
| 345 | 345 | |
| 346 | 346 | PORT_START( "EVPC-SW4" ) |
| 347 | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 347 | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, | |
| 348 | 348 | PORT_DIPSETTING( 0x00, "shifted" ) |
| 349 | 349 | PORT_DIPSETTING( 0x01, "not shifted" ) |
| 350 | 350 |
| r15082 | r15083 | |
|---|---|---|
| 323 | 323 | } |
| 324 | 324 | m_selected = false; |
| 325 | 325 | |
| 326 | m_cru_base = i | |
| 326 | m_cru_base = iop | |
| 327 | 327 | m_clk_irq = false; |
| 328 | 328 | |
| 329 | 329 | m_tms9995_mode = false; // (device->type()==TMS9995); |
| r15082 | r15083 | |
|---|---|---|
| 254 | 254 | m_space = m_cpu->memory().space(AS_PROGRAM); |
| 255 | 255 | |
| 256 | 256 | m_devices.reset(); // clear the list |
| 257 | m_use32k = (i | |
| 257 | m_use32k = (iop | |
| 258 | 258 | |
| 259 | 259 | // better use a region? |
| 260 | 260 | if (m_ram16b==NULL) m_ram16b = (UINT16*)malloc(32768); |
| r15082 | r15083 | |
| 278 | 278 | bool active_device = true; |
| 279 | 279 | if (list[i].setting!=NULL) |
| 280 | 280 | { |
| 281 | set = i | |
| 281 | set = iop | |
| 282 | 282 | active_device = ((set & list[i].set)==list[i].set) && ((set & list[i].unset)==0); |
| 283 | 283 | } |
| 284 | 284 | if (active_device) |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | // MZ: 00 should not be used since there is a bug in the |
| 175 | 175 | // DSR of the HFDC which causes problems with SD disks |
| 176 | 176 | // (controller tries DD and then fails to fall back to SD) */ |
| 177 | reply = ~(i | |
| 177 | reply = ~(iop | |
| 178 | 178 | } |
| 179 | 179 | else |
| 180 | 180 | { |
| r15082 | r15083 | |
| 520 | 520 | m_select_value = 0x74000; |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | m_cru_base = i | |
| 523 | m_cru_base = iop | |
| 524 | 524 | |
| 525 | 525 | // Resetting values |
| 526 | 526 | m_rom_page = 0; |
| r15082 | r15083 | |
| 545 | 545 | m_harddisk_unit[1] = m_slot->get_drive(MFMHD_1); |
| 546 | 546 | m_harddisk_unit[2] = m_slot->get_drive(MFMHD_2); |
| 547 | 547 | |
| 548 | if (i | |
| 548 | if (iop | |
| 549 | 549 | ti99_set_80_track_drives(TRUE); |
| 550 | 550 | else |
| 551 | 551 | ti99_set_80_track_drives(FALSE); |
| 552 | 552 | |
| 553 | m_hdc9234->set_timing(i | |
| 553 | m_hdc9234->set_timing(iop | |
| 554 | 554 | |
| 555 | 555 | floppy_type_t floptype = FLOPPY_STANDARD_5_25_DSHD; |
| 556 | 556 | // Again, need to re-adjust the floppy geometries |
| r15082 | r15083 | |
|---|---|---|
| 517 | 517 | UINT8 ti_rs232_pio_device::map_lines_out(int uartind, UINT8 value) |
| 518 | 518 | { |
| 519 | 519 | UINT8 ret = 0; |
| 520 | int mapping = i | |
| 520 | int mapping = iop | |
| 521 | 521 | |
| 522 | 522 | // 00ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f |
| 523 | 523 | |
| r15082 | r15083 | |
| 589 | 589 | UINT8 ti_rs232_pio_device::map_lines_in(int uartind, UINT8 value) |
| 590 | 590 | { |
| 591 | 591 | UINT8 ret = 0; |
| 592 | int mapping = i | |
| 592 | int mapping = iop | |
| 593 | 593 | |
| 594 | 594 | // 00ab cdef = setting line RTS=a, CTS=b, DSR=c, DCD=d, DTR=e, RI=f |
| 595 | 595 | |
| r15082 | r15083 | |
| 1062 | 1062 | m_space = machine().device("maincpu")->memory().space(AS_IO); |
| 1063 | 1063 | m_selected = false; |
| 1064 | 1064 | |
| 1065 | m_cru_base = (i | |
| 1065 | m_cru_base = (iop | |
| 1066 | 1066 | |
| 1067 | 1067 | m_time_hold[0] = m_time_hold[1] = 0.0; |
| 1068 | 1068 | |
| r15082 | r15083 | |
| 1070 | 1070 | // All peripheral cards need to be manually modified to properly decode |
| 1071 | 1071 | // the wider address. The next lines perform this soldering job |
| 1072 | 1072 | // automagically. |
| 1073 | /* if ( | |
| 1073 | /* if ( | |
| 1074 | 1074 | { |
| 1075 | 1075 | // GenMod card modification |
| 1076 | 1076 | card->select_mask = 0x1fe000; |
| r15082 | r15083 | |
|---|---|---|
| 189 | 189 | void myarc_memory_expansion_device::device_reset() |
| 190 | 190 | { |
| 191 | 191 | if (VERBOSE>5) LOG("myarc memexp: reset\n"); |
| 192 | m_size = i | |
| 192 | m_size = iop | |
| 193 | 193 | |
| 194 | 194 | // Resetting values |
| 195 | 195 | m_bank = 0; |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | void geneve_memex_device::device_reset() |
| 122 | 122 | { |
| 123 | UINT8 dips = i | |
| 123 | UINT8 dips = iop | |
| 124 | 124 | if (VERBOSE>5) LOG("geneve: memex dips = %02x\n", dips); |
| 125 | 125 | for (int i=0; i < 8; i++) |
| 126 | 126 | { |
| r15082 | r15083 | |
|---|---|---|
| 107 | 107 | int new_mx, new_my; |
| 108 | 108 | int delta_x, delta_y; |
| 109 | 109 | |
| 110 | new_mx = input_port_read(machine(), "MOUSEX"); | |
| 111 | new_my = input_port_read(machine(), "MOUSEY"); | |
| 110 | new_mx = ioport("MOUSEX")->read(); | |
| 111 | new_my = ioport("MOUSEY")->read(); | |
| 112 | 112 | |
| 113 | 113 | /* compute x delta */ |
| 114 | 114 | delta_x = new_mx - m_last_mx; |
| r15082 | r15083 | |
| 145 | 145 | int mecmouse_device::get_values() |
| 146 | 146 | { |
| 147 | 147 | int answer; |
| 148 | int buttons = i | |
| 148 | int buttons = iop | |
| 149 | 149 | answer = (m_read_y ? m_y_buf : m_x_buf) << 4; |
| 150 | 150 | |
| 151 | 151 | if ((buttons & 1)==0) |
| r15082 | r15083 | |
| 163 | 163 | int mecmouse_device::get_values8(int mode) |
| 164 | 164 | { |
| 165 | 165 | int answer; |
| 166 | int buttons = i | |
| 166 | int buttons = iop | |
| 167 | 167 | |
| 168 | 168 | if (mode == 0) |
| 169 | 169 | { |
| r15082 | r15083 | |
|---|---|---|
| 417 | 417 | m_rtc_enabled = false; |
| 418 | 418 | m_selected = false; |
| 419 | 419 | |
| 420 | m_dip1 = input_port_read(*this, "BWGDIP1"); | |
| 421 | m_dip2 = input_port_read(*this, "BWGDIP2"); | |
| 422 | m_dip34 = input_port_read(*this, "BWGDIP34"); | |
| 420 | m_dip1 = ioport("BWGDIP1")->read(); | |
| 421 | m_dip2 = ioport("BWGDIP2")->read(); | |
| 422 | m_dip34 = ioport("BWGDIP34")->read(); | |
| 423 | 423 | |
| 424 | 424 | m_rom_page = 0; |
| 425 | 425 | m_ram_page = 0; |
| r15082 | r15083 | |
|---|---|---|
| 132 | 132 | int i; |
| 133 | 133 | |
| 134 | 134 | /* read current key state */ |
| 135 | key_buf = (i | |
| 135 | key_buf = (iop | |
| 136 | 136 | |
| 137 | 137 | // If a key was previously pressed, this key was not shift, and this key is |
| 138 | 138 | // still down, then don't change the current key press. |
| r15082 | r15083 | |
| 203 | 203 | int current_joy_x, current_joy_y; |
| 204 | 204 | int message; |
| 205 | 205 | /* read joystick position */ |
| 206 | current_joy_x = input_port_read(machine(), joynames[0][num]); | |
| 207 | current_joy_y = input_port_read(machine(), joynames[1][num]); | |
| 206 | current_joy_x = ioport(joynames[0][num])->read(); | |
| 207 | current_joy_y = ioport(joynames[1][num])->read(); | |
| 208 | 208 | |
| 209 | 209 | /* compare with last saved position */ |
| 210 | 210 | current_joy = current_joy_x | (current_joy_y << 4); |
| r15082 | r15083 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | int horizon_ramdisk_device::get_size() |
| 78 | 78 | { |
| 79 | int size = 8192 + 2097152*(1 << i | |
| 79 | int size = 8192 + 2097152*(1 << iop | |
| 80 | 80 | if (VERBOSE>2) LOG("horizon: size = %d\n", size); |
| 81 | 81 | return size; |
| 82 | 82 | } |
| r15082 | r15083 | |
| 263 | 263 | |
| 264 | 264 | void horizon_ramdisk_device::cruwrite(offs_t offset, UINT8 data) |
| 265 | 265 | { |
| 266 | int size = i | |
| 266 | int size = iop | |
| 267 | 267 | int split_bit = size + 10; |
| 268 | 268 | int splitpagebit = 0x0200 << size; |
| 269 | 269 | |
| r15082 | r15083 | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | m_ros = m_nvram + get_size()-8192; |
| 359 | m_cru_horizon = input_port_read(*this, "CRUHOR"); | |
| 360 | m_cru_phoenix = input_port_read(*this, "CRUPHOE"); | |
| 359 | m_cru_horizon = ioport("CRUHOR")->read(); | |
| 360 | m_cru_phoenix = ioport("CRUPHOE")->read(); | |
| 361 | 361 | |
| 362 | m_32k_installed = (i | |
| 362 | m_32k_installed = (iop | |
| 363 | 363 | |
| 364 | m_split_mode = (input_port_read(*this, "HORIZONDUAL")!=0); | |
| 365 | m_timode = (input_port_read(*this, "HORIZONDUAL")==1); | |
| 364 | m_split_mode = (ioport("HORIZONDUAL")->read()!=0); | |
| 365 | m_timode = (ioport("HORIZONDUAL")->read()==1); | |
| 366 | 366 | |
| 367 | 367 | m_rambo_mode = false; |
| 368 | m_killswitch = (i | |
| 368 | m_killswitch = (iop | |
| 369 | 369 | |
| 370 | m_use_rambo = (i | |
| 370 | m_use_rambo = (iop | |
| 371 | 371 | |
| 372 | 372 | m_page = 0; |
| 373 | 373 | } |
| r15082 | r15083 | |
|---|---|---|
| 721 | 721 | { |
| 722 | 722 | assert((index == 0) || (index == 1)); |
| 723 | 723 | return (m_joystick_type_control != NULL) |
| 724 | ? (joystick_type_t) (( | |
| 724 | ? (joystick_type_t) (( | |
| 725 | 725 | : JOYSTICK_NONE; |
| 726 | 726 | } |
| 727 | 727 | |
| r15082 | r15083 | |
| 734 | 734 | coco_state::hires_type_t coco_state::hires_interface_type(void) |
| 735 | 735 | { |
| 736 | 736 | return (m_joystick_hires_control != NULL) |
| 737 | ? (hires_type_t) | |
| 737 | ? (hires_type_t) | |
| 738 | 738 | : HIRES_NONE; |
| 739 | 739 | } |
| 740 | 740 | |
| r15082 | r15083 | |
| 865 | 865 | /* poll the keyboard, and update PA6-PA0 accordingly*/ |
| 866 | 866 | for (int i = 0; i < sizeof(m_keyboard) / sizeof(m_keyboard[0]); i++) |
| 867 | 867 | { |
| 868 | in | |
| 868 | in | |
| 869 | 869 | if ((value | pia0_pb) != 0xFF) |
| 870 | 870 | { |
| 871 | 871 | pia0_pa &= ~(0x01 << i); |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | { |
| 83 | 83 | if (state) m_s100->rdy_w(CLEAR_LINE); |
| 84 | 84 | |
| 85 | switch (i | |
| 85 | switch (iop | |
| 86 | 86 | { |
| 87 | 87 | case 0: m_s100->vi0_w(state); break; |
| 88 | 88 | case 1: m_s100->vi1_w(state); break; |
| r15082 | r15083 | |
| 137 | 137 | |
| 138 | 138 | static INPUT_PORTS_START( dj2db ) |
| 139 | 139 | PORT_START("SW1") |
| 140 | PORT_DIPNAME( 0xf8, 0xf8, "Power-On Jump Address" ) PORT_DIPLOCATION("SW1:1,2,3,4,5") PORT_CONDITION("SW1", 0x01, | |
| 140 | PORT_DIPNAME( 0xf8, 0xf8, "Power-On Jump Address" ) PORT_DIPLOCATION("SW1:1,2,3,4,5") PORT_CONDITION("SW1", 0x01, | |
| 141 | 141 | PORT_DIPSETTING( 0xf8, "F800H" ) |
| 142 | 142 | PORT_DIPSETTING( 0xf0, "F000H" ) |
| 143 | 143 | PORT_DIPSETTING( 0xe8, "E800H" ) |
| r15082 | r15083 | |
| 192 | 192 | PORT_DIPNAME( 0x20, 0x20, "Stop Bit Count" ) PORT_DIPLOCATION("SW2:6") |
| 193 | 193 | PORT_DIPSETTING( 0x20, "2 Stop Bits" ) |
| 194 | 194 | PORT_DIPSETTING( 0x00, "1 Stop Bit" ) |
| 195 | PORT_DIPNAME( 0x40, 0x40, "Parity" ) PORT_DIPLOCATION("SW2:7") PORT_CONDITION("SW2", 0x80, | |
| 195 | PORT_DIPNAME( 0x40, 0x40, "Parity" ) PORT_DIPLOCATION("SW2:7") PORT_CONDITION("SW2", 0x80, | |
| 196 | 196 | PORT_DIPSETTING( 0x40, "Even Parity" ) |
| 197 | 197 | PORT_DIPSETTING( 0x00, "Odd Parity" ) |
| 198 | 198 | PORT_DIPNAME( 0x80, 0x80, "Parity" ) PORT_DIPLOCATION("SW2:8") |
| r15082 | r15083 | |
| 296 | 296 | |
| 297 | 297 | void s100_dj2db_device::device_reset() |
| 298 | 298 | { |
| 299 | m_board_enbl = i | |
| 299 | m_board_enbl = iop | |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | |
| r15082 | r15083 | |
| 486 | 486 | { |
| 487 | 487 | if (offset == 0x41) |
| 488 | 488 | { |
| 489 | m_board_enbl = (data & i | |
| 489 | m_board_enbl = (data & iop | |
| 490 | 490 | } |
| 491 | 491 | } |
| 492 | 492 | |
| r15082 | r15083 | |
| 497 | 497 | |
| 498 | 498 | void s100_dj2db_device::s100_phantom_w(int state) |
| 499 | 499 | { |
| 500 | if (!BIT(i | |
| 500 | if (!BIT(iop | |
| 501 | 501 | { |
| 502 | 502 | m_phantom = state; |
| 503 | 503 | } |
| r15082 | r15083 | |
|---|---|---|
| 789 | 789 | case 0x00: /* JOYP - Joypad */ |
| 790 | 790 | JOYPAD = 0xCF | data; |
| 791 | 791 | if (!(data & 0x20)) |
| 792 | JOYPAD &= (i | |
| 792 | JOYPAD &= (iop | |
| 793 | 793 | if (!(data & 0x10)) |
| 794 | JOYPAD &= i | |
| 794 | JOYPAD &= iop | |
| 795 | 795 | return; |
| 796 | 796 | case 0x01: /* SB - Serial transfer data */ |
| 797 | 797 | break; |
| r15082 | r15083 | |
| 914 | 914 | m_sgb_bitcount = 0; |
| 915 | 915 | m_sgb_start = 1; |
| 916 | 916 | m_sgb_rest = 0; |
| 917 | JOYPAD = 0x0F & ((i | |
| 917 | JOYPAD = 0x0F & ((iop | |
| 918 | 918 | break; |
| 919 | 919 | case 0x10: /* data true */ |
| 920 | 920 | if (m_sgb_rest) |
| r15082 | r15083 | |
| 938 | 938 | } |
| 939 | 939 | m_sgb_rest = 0; |
| 940 | 940 | } |
| 941 | JOYPAD = 0x1F & ((i | |
| 941 | JOYPAD = 0x1F & ((iop | |
| 942 | 942 | break; |
| 943 | 943 | case 0x20: /* data false */ |
| 944 | 944 | if (m_sgb_rest) |
| r15082 | r15083 | |
| 1365 | 1365 | } |
| 1366 | 1366 | m_sgb_rest = 0; |
| 1367 | 1367 | } |
| 1368 | JOYPAD = 0x2F & (i | |
| 1368 | JOYPAD = 0x2F & (iop | |
| 1369 | 1369 | break; |
| 1370 | 1370 | case 0x30: /* rest condition */ |
| 1371 | 1371 | if (m_sgb_start) |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | void c64_switchable_8k_cartridge_device::device_reset() |
| 96 | 96 | { |
| 97 | m_bank = i | |
| 97 | m_bank = iop | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 |
| r15082 | r15083 | |
|---|---|---|
| 47 | 47 | { |
| 48 | 48 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 49 | 49 | UINT8 key = 0xff; |
| 50 | if ((state->m_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine(),"LINE0"); } | |
| 51 | if ((state->m_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine(),"LINE1"); } | |
| 52 | if ((state->m_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine(),"LINE2"); } | |
| 53 | if ((state->m_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine(),"LINE3"); } | |
| 54 | if ((state->m_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine(),"LINE4"); } | |
| 55 | if ((state->m_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine(),"LINE5"); } | |
| 56 | if ((state->m_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine(),"LINE6"); } | |
| 57 | if ((state->m_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine(),"LINE7"); } | |
| 50 | if ((state->m_keyboard_mask & 0x01)!=0) { key &= state->ioport("LINE0")->read(); } | |
| 51 | if ((state->m_keyboard_mask & 0x02)!=0) { key &= device->machine().root_device().ioport("LINE1")->read(); } | |
| 52 | if ((state->m_keyboard_mask & 0x04)!=0) { key &= device->machine().root_device().ioport("LINE2")->read(); } | |
| 53 | if ((state->m_keyboard_mask & 0x08)!=0) { key &= device->machine().root_device().ioport("LINE3")->read(); } | |
| 54 | if ((state->m_keyboard_mask & 0x10)!=0) { key &= device->machine().root_device().ioport("LINE4")->read(); } | |
| 55 | if ((state->m_keyboard_mask & 0x20)!=0) { key &= device->machine().root_device().ioport("LINE5")->read(); } | |
| 56 | if ((state->m_keyboard_mask & 0x40)!=0) { key &= device->machine().root_device().ioport("LINE6")->read(); } | |
| 57 | if ((state->m_keyboard_mask & 0x80)!=0) { key &= device->machine().root_device().ioport("LINE7")->read(); } | |
| 58 | 58 | return key; |
| 59 | 59 | } |
| 60 | 60 | |
| r15082 | r15083 | |
| 62 | 62 | { |
| 63 | 63 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 64 | 64 | double level = (device->machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| 65 | UINT8 dat = | |
| 65 | UINT8 dat = s | |
| 66 | 66 | if (level < 0) { |
| 67 | 67 | dat ^= state->m_tape_value; |
| 68 | 68 | } |
| r15082 | r15083 | |
| 108 | 108 | radio86_state *state = device->machine().driver_data<radio86_state>(); |
| 109 | 109 | double level = (device->machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| 110 | 110 | UINT8 key = 0xff; |
| 111 | if ((state->m_keyboard_mask & 0x01)!=0) { key &= input_port_read(device->machine(),"CLINE0"); } | |
| 112 | if ((state->m_keyboard_mask & 0x02)!=0) { key &= input_port_read(device->machine(),"CLINE1"); } | |
| 113 | if ((state->m_keyboard_mask & 0x04)!=0) { key &= input_port_read(device->machine(),"CLINE2"); } | |
| 114 | if ((state->m_keyboard_mask & 0x08)!=0) { key &= input_port_read(device->machine(),"CLINE3"); } | |
| 115 | if ((state->m_keyboard_mask & 0x10)!=0) { key &= input_port_read(device->machine(),"CLINE4"); } | |
| 116 | if ((state->m_keyboard_mask & 0x20)!=0) { key &= input_port_read(device->machine(),"CLINE5"); } | |
| 117 | if ((state->m_keyboard_mask & 0x40)!=0) { key &= input_port_read(device->machine(),"CLINE6"); } | |
| 118 | if ((state->m_keyboard_mask & 0x80)!=0) { key &= input_port_read(device->machine(),"CLINE7"); } | |
| 111 | if ((state->m_keyboard_mask & 0x01)!=0) { key &= state->ioport("CLINE0")->read(); } | |
| 112 | if ((state->m_keyboard_mask & 0x02)!=0) { key &= device->machine().root_device().ioport("CLINE1")->read(); } | |
| 113 | if ((state->m_keyboard_mask & 0x04)!=0) { key &= device->machine().root_device().ioport("CLINE2")->read(); } | |
| 114 | if ((state->m_keyboard_mask & 0x08)!=0) { key &= device->machine().root_device().ioport("CLINE3")->read(); } | |
| 115 | if ((state->m_keyboard_mask & 0x10)!=0) { key &= device->machine().root_device().ioport("CLINE4")->read(); } | |
| 116 | if ((state->m_keyboard_mask & 0x20)!=0) { key &= device->machine().root_device().ioport("CLINE5")->read(); } | |
| 117 | if ((state->m_keyboard_mask & 0x40)!=0) { key &= device->machine().root_device().ioport("CLINE6")->read(); } | |
| 118 | if ((state->m_keyboard_mask & 0x80)!=0) { key &= device->machine().root_device().ioport("CLINE7")->read(); } | |
| 119 | 119 | key &= 0xe0; |
| 120 | 120 | if (level < 0) { |
| 121 | 121 | key ^= state->m_tape_value; |
| r15082 | r15083 | |
|---|---|---|
| 163 | 163 | READ8_MEMBER( advision_state::controller_r ) |
| 164 | 164 | { |
| 165 | 165 | // Get joystick switches |
| 166 | UINT8 in = i | |
| 166 | UINT8 in = iop | |
| 167 | 167 | UINT8 data = in | 0x0f; |
| 168 | 168 | |
| 169 | 169 | // Get buttons |
| r15082 | r15083 | |
|---|---|---|
| 23 | 23 | { |
| 24 | 24 | UINT8 key = 0x00; |
| 25 | 25 | if (offset < 0x100) { |
| 26 | if ((offset & 0x01)!=0) { key |= input_port_read(machine(),"LINE0"); } | |
| 27 | if ((offset & 0x02)!=0) { key |= input_port_read(machine(),"LINE1"); } | |
| 28 | if ((offset & 0x04)!=0) { key |= input_port_read(machine(),"LINE2"); } | |
| 29 | if ((offset & 0x08)!=0) { key |= input_port_read(machine(),"LINE3"); } | |
| 30 | if ((offset & 0x10)!=0) { key |= input_port_read(machine(),"LINE4"); } | |
| 31 | if ((offset & 0x20)!=0) { key |= input_port_read(machine(),"LINE5"); } | |
| 32 | if ((offset & 0x40)!=0) { key |= input_port_read(machine(),"LINE6"); } | |
| 33 | if ((offset & 0x80)!=0) { key |= input_port_read(machine(),"LINE7"); } | |
| 26 | if ((offset & 0x01)!=0) { key |= ioport("LINE0")->read(); } | |
| 27 | if ((offset & 0x02)!=0) { key |= ioport("LINE1")->read(); } | |
| 28 | if ((offset & 0x04)!=0) { key |= ioport("LINE2")->read(); } | |
| 29 | if ((offset & 0x08)!=0) { key |= ioport("LINE3")->read(); } | |
| 30 | if ((offset & 0x10)!=0) { key |= ioport("LINE4")->read(); } | |
| 31 | if ((offset & 0x20)!=0) { key |= ioport("LINE5")->read(); } | |
| 32 | if ((offset & 0x40)!=0) { key |= ioport("LINE6")->read(); } | |
| 33 | if ((offset & 0x80)!=0) { key |= ioport("LINE7")->read(); } | |
| 34 | 34 | } else { |
| 35 | if ((offset & 0x01)!=0) { key |= input_port_read(machine(),"LINE8"); } | |
| 36 | if ((offset & 0x02)!=0) { key |= input_port_read(machine(),"LINE9"); } | |
| 37 | if ((offset & 0x04)!=0) { key |= input_port_read(machine(),"LINE10"); } | |
| 35 | if ((offset & 0x01)!=0) { key |= ioport("LINE8")->read(); } | |
| 36 | if ((offset & 0x02)!=0) { key |= ioport("LINE9")->read(); } | |
| 37 | if ((offset & 0x04)!=0) { key |= ioport("LINE10")->read(); } | |
| 38 | 38 | } |
| 39 | 39 | return key; |
| 40 | 40 | } |
| r15082 | r15083 | |
| 294 | 294 | |
| 295 | 295 | m_b2m_color[offset & 3] = data; |
| 296 | 296 | |
| 297 | if (i | |
| 297 | if (iop | |
| 298 | 298 | palette_set_color_rgb(machine(),offset, r, g, b); |
| 299 | 299 | } else { |
| 300 | 300 | palette_set_color_rgb(machine(),offset, bw, bw, bw); |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | for (row = 0; row < 8; row++) |
| 121 | 121 | { |
| 122 | 122 | if (!BIT(m_riot_port_a, row)) |
| 123 | data &= i | |
| 123 | data &= iop | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | return data; |
| r15082 | r15083 | |
| 212 | 212 | d3 = kb/tty switch |
| 213 | 213 | */ |
| 214 | 214 | |
| 215 | UINT8 data = i | |
| 215 | UINT8 data = iop | |
| 216 | 216 | data |= (m_cass1->input() > +0.03) ? 0x80 : 0; |
| 217 | 217 | data |= 0x40; // TTY must be H if not used. |
| 218 | 218 | data |= m_pb_save & 0x37; |
| r15082 | r15083 | |
|---|---|---|
| 165 | 165 | { |
| 166 | 166 | UINT8 slot_id = (offset>>8) & 0xff; |
| 167 | 167 | |
| 168 | if ((slot_id & 0xf0) == i | |
| 168 | if ((slot_id & 0xf0) == iop | |
| 169 | 169 | data = m_expansions[(slot_id>>2) & 3]->module_id_r(); |
| 170 | 170 | else |
| 171 | 171 | m_expansions[4]->io_read(offset, data); |
| r15082 | r15083 | |
| 187 | 187 | { |
| 188 | 188 | UINT8 slot_id = (offset>>8) & 0xff; |
| 189 | 189 | |
| 190 | if ((slot_id & 0xf0) == i | |
| 190 | if ((slot_id & 0xf0) == iop | |
| 191 | 191 | m_expansions[(slot_id>>2) & 3]->control_w(data); |
| 192 | 192 | else |
| 193 | 193 | m_expansions[4]->io_write(offset, data); |
| r15082 | r15083 | |
|---|---|---|
| 519 | 519 | |
| 520 | 520 | static READ8_DEVICE_HANDLER ( to7_timer_port_in ) |
| 521 | 521 | { |
| 522 | int lightpen = ( | |
| 522 | int lightpen = ( | |
| 523 | 523 | int cass = to7_get_cassette(device->machine()) ? 0x80 : 0; |
| 524 | 524 | return lightpen | cass; |
| 525 | 525 | } |
| r15082 | r15083 | |
| 626 | 626 | for ( i = 0; i < 8; i++ ) |
| 627 | 627 | { |
| 628 | 628 | if ( ! (keyline & (1 << i)) ) |
| 629 | val &= | |
| 629 | val &= | |
| 630 | 630 | } |
| 631 | 631 | return val; |
| 632 | 632 | } |
| r15082 | r15083 | |
| 932 | 932 | |
| 933 | 933 | READ8_HANDLER ( to7_modem_mea8000_r ) |
| 934 | 934 | { |
| 935 | if ( | |
| 935 | if ( | |
| 936 | 936 | { |
| 937 | 937 | device_t* device = space->machine().device("mea8000" ); |
| 938 | 938 | return mea8000_r( device, offset ); |
| r15082 | r15083 | |
| 952 | 952 | |
| 953 | 953 | WRITE8_HANDLER ( to7_modem_mea8000_w ) |
| 954 | 954 | { |
| 955 | if ( | |
| 955 | if ( | |
| 956 | 956 | { |
| 957 | 957 | device_t* device = space->machine().device("mea8000" ); |
| 958 | 958 | mea8000_w( device, offset, data ); |
| r15082 | r15083 | |
| 1004 | 1004 | static UINT8 to7_get_mouse_signal( running_machine &machine ) |
| 1005 | 1005 | { |
| 1006 | 1006 | UINT8 xa, xb, ya, yb; |
| 1007 | UINT16 dx = input_port_read(machine, "mouse_x"); /* x axis */ | |
| 1008 | UINT16 dy = input_port_read(machine, "mouse_y"); /* y axis */ | |
| 1007 | UINT16 dx = machine.root_device().ioport("mouse_x")->read(); /* x axis */ | |
| 1008 | UINT16 dy = machine.root_device().ioport("mouse_y")->read(); /* y axis */ | |
| 1009 | 1009 | xa = ((dx + 1) & 3) <= 1; |
| 1010 | 1010 | xb = (dx & 3) <= 1; |
| 1011 | 1011 | ya = ((dy + 1) & 3) <= 1; |
| r15082 | r15083 | |
| 1025 | 1025 | static READ8_DEVICE_HANDLER ( to7_game_porta_in ) |
| 1026 | 1026 | { |
| 1027 | 1027 | UINT8 data; |
| 1028 | if ( | |
| 1028 | if ( | |
| 1029 | 1029 | { |
| 1030 | 1030 | /* mouse */ |
| 1031 | 1031 | data = to7_get_mouse_signal(device->machine()) & 0x0c; /* XB, YB */ |
| 1032 | data |= | |
| 1032 | data |= | |
| 1033 | 1033 | } |
| 1034 | 1034 | else |
| 1035 | 1035 | { |
| 1036 | 1036 | /* joystick */ |
| 1037 | data = | |
| 1037 | data = | |
| 1038 | 1038 | /* bit 0=0 => P1 up bit 4=0 => P2 up |
| 1039 | 1039 | bit 1=0 => P1 down bit 5=0 => P2 down |
| 1040 | 1040 | bit 2=0 => P1 left bit 6=0 => P2 left |
| r15082 | r15083 | |
| 1066 | 1066 | static READ8_DEVICE_HANDLER ( to7_game_portb_in ) |
| 1067 | 1067 | { |
| 1068 | 1068 | UINT8 data; |
| 1069 | if ( | |
| 1069 | if ( | |
| 1070 | 1070 | { |
| 1071 | 1071 | /* mouse */ |
| 1072 | 1072 | UINT8 mouse = to7_get_mouse_signal(device->machine()); |
| r15082 | r15083 | |
| 1083 | 1083 | /* bits 2-3: action buttons B (0=pressed) */ |
| 1084 | 1084 | /* bits 4-5: unused (ouput) */ |
| 1085 | 1085 | /* bits 0-1: unknown! */ |
| 1086 | data = | |
| 1086 | data = | |
| 1087 | 1087 | } |
| 1088 | 1088 | return data; |
| 1089 | 1089 | } |
| r15082 | r15083 | |
| 1130 | 1130 | { |
| 1131 | 1131 | pia6821_device *game_pia = machine.device<pia6821_device>(THOM_PIA_GAME); |
| 1132 | 1132 | |
| 1133 | if ( in | |
| 1133 | if ( machine.root_device().ioport | |
| 1134 | 1134 | { |
| 1135 | 1135 | /* mouse */ |
| 1136 | 1136 | UINT8 mouse = to7_get_mouse_signal(machine); |
| r15082 | r15083 | |
| 1140 | 1140 | else |
| 1141 | 1141 | { |
| 1142 | 1142 | /* joystick */ |
| 1143 | UINT8 in = in | |
| 1143 | UINT8 in = machine.root_device().ioport | |
| 1144 | 1144 | game_pia->cb2_w( (in & 0x80) ? 1 : 0 ); /* P2 action A */ |
| 1145 | 1145 | game_pia->ca2_w( (in & 0x40) ? 1 : 0 ); /* P1 action A */ |
| 1146 | 1146 | game_pia->cb1_w( (in & 0x08) ? 1 : 0 ); /* P2 action B */ |
| r15082 | r15083 | |
| 1545 | 1545 | }; |
| 1546 | 1546 | int keyline = downcast<pia6821_device *>(device)->b_output() & 7; |
| 1547 | 1547 | |
| 1548 | return | |
| 1548 | return | |
| 1549 | 1549 | } |
| 1550 | 1550 | |
| 1551 | 1551 | |
| r15082 | r15083 | |
| 1835 | 1835 | { |
| 1836 | 1836 | return |
| 1837 | 1837 | (mo5_get_cassette(device->machine()) ? 0x80 : 0) | /* bit 7: cassette input */ |
| 1838 | (( | |
| 1838 | (( | |
| 1839 | 1839 | /* bit 5: lightpen button */; |
| 1840 | 1840 | } |
| 1841 | 1841 | |
| r15082 | r15083 | |
| 1858 | 1858 | "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7" |
| 1859 | 1859 | }; |
| 1860 | 1860 | |
| 1861 | return ( | |
| 1861 | return ( | |
| 1862 | 1862 | } |
| 1863 | 1863 | |
| 1864 | 1864 | |
| r15082 | r15083 | |
| 2533 | 2533 | |
| 2534 | 2534 | for ( line = 0; line < 10; line++ ) |
| 2535 | 2535 | { |
| 2536 | port = in | |
| 2536 | port = machine.root_device().ioport | |
| 2537 | 2537 | |
| 2538 | 2538 | if ( line == 7 || line == 9 ) |
| 2539 | 2539 | port |= 1; /* shift & control */ |
| r15082 | r15083 | |
| 2758 | 2758 | /* returns the ASCII code for the key, or 0 for no key */ |
| 2759 | 2759 | static int to9_kbd_get_key( running_machine &machine ) |
| 2760 | 2760 | { |
| 2761 | int control = ! (input_port_read(machine, "keyboard_7") & 1); | |
| 2762 | int shift = ! (input_port_read(machine, "keyboard_9") & 1); | |
| 2761 | int control = ! (machine.root_device().ioport("keyboard_7")->read() & 1); | |
| 2762 | int shift = ! (machine.root_device().ioport("keyboard_9")->read() & 1); | |
| 2763 | 2763 | int key = -1, line, bit; |
| 2764 | 2764 | UINT8 port; |
| 2765 | 2765 | static const char *const keynames[] = { |
| r15082 | r15083 | |
| 2769 | 2769 | |
| 2770 | 2770 | for ( line = 0; line < 10; line++ ) |
| 2771 | 2771 | { |
| 2772 | port = in | |
| 2772 | port = machine.root_device().ioport | |
| 2773 | 2773 | |
| 2774 | 2774 | if ( line == 7 || line == 9 ) |
| 2775 | 2775 | port |= 1; /* shift & control */ |
| r15082 | r15083 | |
| 2860 | 2860 | |
| 2861 | 2861 | case 1: /* x axis */ |
| 2862 | 2862 | { |
| 2863 | int newx = in | |
| 2863 | int newx = machine.root_device().ioport | |
| 2864 | 2864 | UINT8 data = ( (newx - to9_mouse_x) & 0xf ) - 8; |
| 2865 | 2865 | to9_kbd_send( machine, data, 1 ); |
| 2866 | 2866 | to9_mouse_x = newx; |
| r15082 | r15083 | |
| 2869 | 2869 | |
| 2870 | 2870 | case 2: /* y axis */ |
| 2871 | 2871 | { |
| 2872 | int newy = in | |
| 2872 | int newy = machine.root_device().ioport | |
| 2873 | 2873 | UINT8 data = ( (newy - to9_mouse_y) & 0xf ) - 8; |
| 2874 | 2874 | to9_kbd_send( machine, data, 1 ); |
| 2875 | 2875 | to9_mouse_y = newy; |
| r15082 | r15083 | |
| 2878 | 2878 | |
| 2879 | 2879 | case 3: /* axis overflow & buttons */ |
| 2880 | 2880 | { |
| 2881 | int b = in | |
| 2881 | int b = machine.root_device().ioport | |
| 2882 | 2882 | UINT8 data = 0; |
| 2883 | 2883 | if ( b & 1 ) data |= 1; |
| 2884 | 2884 | if ( b & 2 ) data |= 4; |
| r15082 | r15083 | |
| 3169 | 3169 | "keyboard_5", "keyboard_6", "keyboard_7", "keyboard_8", "keyboard_9" |
| 3170 | 3170 | }; |
| 3171 | 3171 | |
| 3172 | if ( in | |
| 3172 | if ( machine.root_device().ioport | |
| 3173 | 3173 | return 0; /* disabled */ |
| 3174 | 3174 | |
| 3175 | 3175 | for ( line = 0; line < 10; line++ ) |
| 3176 | 3176 | { |
| 3177 | port = in | |
| 3177 | port = machine.root_device().ioport | |
| 3178 | 3178 | |
| 3179 | 3179 | if ( line == 7 || line == 9 ) |
| 3180 | 3180 | port |= 1; /* shift & control */ |
| r15082 | r15083 | |
| 3194 | 3194 | /* keyboard scan & return keycode (or -1) */ |
| 3195 | 3195 | static int to8_kbd_get_key( running_machine &machine ) |
| 3196 | 3196 | { |
| 3197 | int control = (input_port_read(machine, "keyboard_7") & 1) ? 0 : 0x100; | |
| 3198 | int shift = (input_port_read(machine, "keyboard_9") & 1) ? 0 : 0x080; | |
| 3197 | int control = (machine.root_device().ioport("keyboard_7")->read() & 1) ? 0 : 0x100; | |
| 3198 | int shift = (machine.root_device().ioport("keyboard_9")->read() & 1) ? 0 : 0x080; | |
| 3199 | 3199 | int key = -1, line, bit; |
| 3200 | 3200 | UINT8 port; |
| 3201 | 3201 | static const char *const keynames[] = { |
| r15082 | r15083 | |
| 3203 | 3203 | "keyboard_5", "keyboard_6", "keyboard_7", "keyboard_8", "keyboard_9" |
| 3204 | 3204 | }; |
| 3205 | 3205 | |
| 3206 | if ( in | |
| 3206 | if ( machine.root_device().ioport | |
| 3207 | 3207 | return -1; /* disabled */ |
| 3208 | 3208 | |
| 3209 | 3209 | for ( line = 0; line < 10; line++ ) |
| 3210 | 3210 | { |
| 3211 | port = in | |
| 3211 | port = machine.root_device().ioport | |
| 3212 | 3212 | |
| 3213 | 3213 | if ( line == 7 || line == 9 ) |
| 3214 | 3214 | port |= 1; /* shift & control */ |
| r15082 | r15083 | |
| 3948 | 3948 | static READ8_DEVICE_HANDLER ( to8_timer_port_in ) |
| 3949 | 3949 | { |
| 3950 | 3950 | centronics_device *printer = device->machine().device<centronics_device>("centronics"); |
| 3951 | int lightpen = ( | |
| 3951 | int lightpen = ( | |
| 3952 | 3952 | int cass = to7_get_cassette(device->machine()) ? 0x80 : 0; |
| 3953 | 3953 | int dtr = printer->busy_r() << 6; |
| 3954 | 3954 | int lock = to8_kbd_caps ? 0 : 8; /* undocumented! */ |
| r15082 | r15083 | |
| 4148 | 4148 | static READ8_DEVICE_HANDLER ( to9p_timer_port_in ) |
| 4149 | 4149 | { |
| 4150 | 4150 | centronics_device *printer = device->machine().device<centronics_device>("centronics"); |
| 4151 | int lightpen = ( | |
| 4151 | int lightpen = ( | |
| 4152 | 4152 | int cass = to7_get_cassette(device->machine()) ? 0x80 : 0; |
| 4153 | 4153 | int dtr = printer->busy_r() << 6; |
| 4154 | 4154 | return lightpen | cass | dtr; |
| r15082 | r15083 | |
| 4512 | 4512 | pia6821_device *game_pia = machine.device<pia6821_device>(THOM_PIA_GAME); |
| 4513 | 4513 | |
| 4514 | 4514 | /* unlike the TO8, CB1 & CB2 are not connected to buttons */ |
| 4515 | if ( in | |
| 4515 | if ( machine.root_device().ioport | |
| 4516 | 4516 | { |
| 4517 | 4517 | UINT8 mouse = to7_get_mouse_signal(machine); |
| 4518 | 4518 | game_pia->ca1_w( BIT(mouse, 0) ); /* XA */ |
| r15082 | r15083 | |
| 4521 | 4521 | else |
| 4522 | 4522 | { |
| 4523 | 4523 | /* joystick */ |
| 4524 | UINT8 in = in | |
| 4524 | UINT8 in = machine.root_device().ioport | |
| 4525 | 4525 | game_pia->ca1_w( BIT(in, 2) ); /* P1 action B */ |
| 4526 | 4526 | game_pia->ca2_w( BIT(in, 6) ); /* P1 action A */ |
| 4527 | 4527 | } |
| r15082 | r15083 | |
| 4561 | 4561 | return |
| 4562 | 4562 | (mo5_get_cassette(device->machine()) ? 0x80 : 0) | /* bit 7: cassette input */ |
| 4563 | 4563 | 8 | /* bit 3: kbd-line float up to 1 */ |
| 4564 | (( | |
| 4564 | (( | |
| 4565 | 4565 | /* bit 1: lightpen button */; |
| 4566 | 4566 | } |
| 4567 | 4567 | |
| r15082 | r15083 | |
| 4583 | 4583 | lin = 8; /* A bit 3: 9-th kbd line select */ |
| 4584 | 4584 | |
| 4585 | 4585 | return |
| 4586 | ( | |
| 4586 | ( | |
| 4587 | 4587 | /* bit 7: key up */ |
| 4588 | 4588 | } |
| 4589 | 4589 | |
| r15082 | r15083 | |
| 4982 | 4982 | "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7" |
| 4983 | 4983 | }; |
| 4984 | 4984 | |
| 4985 | return ( | |
| 4985 | return ( | |
| 4986 | 4986 | /* bit 7: key up */ |
| 4987 | 4987 | } |
| 4988 | 4988 |
| r15082 | r15083 | |
|---|---|---|
| 116 | 116 | |
| 117 | 117 | coco_rtc_type_t coco_fdc_device::real_time_clock() |
| 118 | 118 | { |
| 119 | coco_rtc_type_t result = (coco_rtc_type_t) i | |
| 119 | coco_rtc_type_t result = (coco_rtc_type_t) iop | |
| 120 | 120 | |
| 121 | 121 | /* check to make sure we don't have any invalid values */ |
| 122 | 122 | if (((result == RTC_DISTO) && (m_disto_msm6242 == NULL)) |
| r15082 | r15083 | |
|---|---|---|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | row = 9; |
| 325 | newval = | |
| 325 | newval = | |
| 326 | 326 | chg = keyrows[row] ^ newval; |
| 327 | 327 | |
| 328 | if (!chg) { newval = input_port_read(device->machine(), "ROW8"); chg = keyrows[--row] ^ newval; } | |
| 329 | if (!chg) { newval = input_port_read(device->machine(), "ROW7"); chg = keyrows[--row] ^ newval; } | |
| 330 | if (!chg) { newval = input_port_read(device->machine(), "ROW6"); chg = keyrows[--row] ^ newval; } | |
| 331 | if (!chg) { newval = input_port_read(device->machine(), "ROW5"); chg = keyrows[--row] ^ newval; } | |
| 332 | if (!chg) { newval = input_port_read(device->machine(), "ROW4"); chg = keyrows[--row] ^ newval; } | |
| 333 | if (!chg) { newval = input_port_read(device->machine(), "ROW3"); chg = keyrows[--row] ^ newval; } | |
| 334 | if (!chg) { newval = input_port_read(device->machine(), "ROW2"); chg = keyrows[--row] ^ newval; } | |
| 335 | if (!chg) { newval = input_port_read(device->machine(), "ROW1"); chg = keyrows[--row] ^ newval; } | |
| 336 | if (!chg) { newval = input_port_read(device->machine(), "ROW0"); chg = keyrows[--row] ^ newval; } | |
| 328 | if (!chg) { newval = device->machine().root_device().ioport("ROW8")->read(); chg = keyrows[--row] ^ newval; } | |
| 329 | if (!chg) { newval = device->machine().root_device().ioport("ROW7")->read(); chg = keyrows[--row] ^ newval; } | |
| 330 | if (!chg) { newval = device->machine().root_device().ioport("ROW6")->read(); chg = keyrows[--row] ^ newval; } | |
| 331 | if (!chg) { newval = device->machine().root_device().ioport("ROW5")->read(); chg = keyrows[--row] ^ newval; } | |
| 332 | if (!chg) { newval = device->machine().root_device().ioport("ROW4")->read(); chg = keyrows[--row] ^ newval; } | |
| 333 | if (!chg) { newval = device->machine().root_device().ioport("ROW3")->read(); chg = keyrows[--row] ^ newval; } | |
| 334 | if (!chg) { newval = device->machine().root_device().ioport("ROW2")->read(); chg = keyrows[--row] ^ newval; } | |
| 335 | if (!chg) { newval = device->machine().root_device().ioport("ROW1")->read(); chg = keyrows[--row] ^ newval; } | |
| 336 | if (!chg) { newval = device->machine().root_device().ioport("ROW0")->read(); chg = keyrows[--row] ^ newval; } | |
| 337 | 337 | if (!chg) --row; |
| 338 | 338 | |
| 339 | 339 | if (row >= 0) |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | device_t *cia_1 = machine.device("cia_1"); |
| 95 | 95 | int cia1irq = mos6526_irq_r(cia_1); |
| 96 | 96 | |
| 97 | if (state->m_nmilevel != (in | |
| 97 | if (state->m_nmilevel != (machine.root_device().ioport | |
| 98 | 98 | { |
| 99 | 99 | if (1) // this was never valid, there is no active CPU during a timer firing! cpu_getactivecpu() == 0) |
| 100 | 100 | { |
| 101 | 101 | /* z80 */ |
| 102 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (in | |
| 102 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, (machine.root_device().ioport | |
| 103 | 103 | } |
| 104 | 104 | else |
| 105 | 105 | { |
| 106 | cputag_set_input_line(machine, "m8502", INPUT_LINE_NMI, (in | |
| 106 | cputag_set_input_line(machine, "m8502", INPUT_LINE_NMI, (machine.root_device().ioport | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | state->m_nmilevel = (in | |
| 109 | state->m_nmilevel = (machine.root_device().ioport | |
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| r15082 | r15083 | |
| 460 | 460 | return state->m_colorram[offset & 0x3ff]; |
| 461 | 461 | else if (offset == 0xc00) |
| 462 | 462 | { |
| 463 | cia_set_port_mask_value(cia_0, 0, | |
| 463 | cia_set_port_mask_value(cia_0, 0, s | |
| 464 | 464 | return mos6526_r(cia_0, offset); |
| 465 | 465 | } |
| 466 | 466 | else if (offset == 0xc01) |
| 467 | 467 | { |
| 468 | cia_set_port_mask_value(cia_0, 1, | |
| 468 | cia_set_port_mask_value(cia_0, 1, | |
| 469 | 469 | return mos6526_r(cia_0, offset); |
| 470 | 470 | } |
| 471 | 471 | else if (offset < 0xd00) |
| r15082 | r15083 | |
| 558 | 558 | #if 1 |
| 559 | 559 | state->membank("bank10")->set_base(state->m_z80); |
| 560 | 560 | state->membank("bank11")->set_base(state->m_ram + 0x1000); |
| 561 | if ( (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 562 | || (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 561 | if ( (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 562 | || (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 563 | 563 | state->m_ram = NULL; |
| 564 | 564 | #else |
| 565 | 565 | if (MMU_BOTTOM) |
| r15082 | r15083 | |
| 609 | 609 | else |
| 610 | 610 | state->membank("bank9")->set_base(state->m_memory + 0xff05); |
| 611 | 611 | |
| 612 | if ( (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 613 | || (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 612 | if ( (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 613 | || (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 614 | 614 | state->m_ram = NULL; |
| 615 | 615 | #endif |
| 616 | 616 | } |
| r15082 | r15083 | |
| 775 | 775 | state->membank("bank16")->set_base(state->m_external_function + 0x3f05); |
| 776 | 776 | } |
| 777 | 777 | |
| 778 | if ( (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 779 | || (( (input_port_read(machine, "SPECIAL") & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 778 | if ( (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x02 ) && (MMU_RAM_ADDR >= 0x40000)) | |
| 779 | || (( (machine.root_device().ioport("SPECIAL")->read() & 0x06) == 0x00) && (MMU_RAM_ADDR >= 0x20000)) ) | |
| 780 | 780 | state->m_ram = NULL; |
| 781 | 781 | } |
| 782 | 782 | } |
| r15082 | r15083 | |
| 902 | 902 | data &= ~0x10; |
| 903 | 903 | if (!state->m_exrom) |
| 904 | 904 | data &= ~0x20; |
| 905 | if ( | |
| 905 | if ( | |
| 906 | 906 | data &= ~0x80; |
| 907 | 907 | break; |
| 908 | 908 | case 0xb: |
| 909 | 909 | /* hinybble number of 64 kb memory blocks */ |
| 910 | if (( | |
| 910 | if (( | |
| 911 | 911 | data = 0x4f; |
| 912 | else if (( | |
| 912 | else if ((s | |
| 913 | 913 | data = 0xf; |
| 914 | 914 | else |
| 915 | 915 | data = 0x2f; |
| r15082 | r15083 | |
| 1128 | 1128 | else |
| 1129 | 1129 | data |= 0x10; |
| 1130 | 1130 | |
| 1131 | if ( | |
| 1131 | if (s | |
| 1132 | 1132 | data &= ~0x40; |
| 1133 | 1133 | else |
| 1134 | 1134 | data |= 0x40; |
| r15082 | r15083 | |
| 1259 | 1259 | |
| 1260 | 1260 | c128_nmi(device->machine()); |
| 1261 | 1261 | |
| 1262 | if (( | |
| 1262 | if (( | |
| 1263 | 1263 | { |
| 1264 | if ( | |
| 1264 | if ( | |
| 1265 | 1265 | { |
| 1266 | 1266 | vic2_set_rastering(vic2e, 0); |
| 1267 | 1267 | vdc8563_set_rastering(vdc8563, 1); |
| r15082 | r15083 | |
| 1276 | 1276 | else |
| 1277 | 1277 | device->machine().primary_screen->set_visible_area(0, VIC6567_VISIBLECOLUMNS - 1, 0, VIC6567_VISIBLELINES - 1); |
| 1278 | 1278 | } |
| 1279 | state->m_monitor = | |
| 1279 | state->m_monitor = | |
| 1280 | 1280 | } |
| 1281 | 1281 | |
| 1282 | 1282 | |
| r15082 | r15083 | |
| 1285 | 1285 | |
| 1286 | 1286 | /* Fix Me! Currently, neither left Shift nor Shift Lock work in c128, but reading the correspondent input produces a bug! |
| 1287 | 1287 | Hence, we overwrite the actual reading as it never happens */ |
| 1288 | if (( | |
| 1288 | if (( | |
| 1289 | 1289 | c64_keyline[1] |= 0x80; |
| 1290 | 1290 | |
| 1291 | 1291 | /* c128 specific: keypad input ports */ |
| 1292 | 1292 | for (i = 0; i < 3; i++) |
| 1293 | 1293 | { |
| 1294 | 1294 | value = 0xff; |
| 1295 | value &= ~ | |
| 1295 | value &= ~ | |
| 1296 | 1296 | state->m_keyline[i] = value; |
| 1297 | 1297 | } |
| 1298 | 1298 | } |
| r15082 | r15083 | |
|---|---|---|
| 1716 | 1716 | if ( offset == 8 ) |
| 1717 | 1717 | { |
| 1718 | 1718 | /* network ID of the computer */ |
| 1719 | UINT8 id = | |
| 1719 | UINT8 id = | |
| 1720 | 1720 | VLOG(( "%f $%04x to7_network_r: read id $%02X\n", space->machine().time().as_double(), cpu_get_previouspc(space->machine().device("maincpu")), id )); |
| 1721 | 1721 | return id; |
| 1722 | 1722 | } |
| r15082 | r15083 | |
| 1774 | 1774 | |
| 1775 | 1775 | void to7_floppy_reset ( running_machine &machine ) |
| 1776 | 1776 | { |
| 1777 | to7_controller_type = (in | |
| 1777 | to7_controller_type = (machine.root_device().ioport | |
| 1778 | 1778 | |
| 1779 | 1779 | switch ( to7_controller_type ) |
| 1780 | 1780 | { |
| r15082 | r15083 | |
|---|---|---|
| 132 | 132 | |
| 133 | 133 | if (state->m_keyline_select < 10) |
| 134 | 134 | { |
| 135 | data = | |
| 135 | data = | |
| 136 | 136 | /* Check for left-shift lock */ |
| 137 | if ((state->m_keyline_select == 8) && ( | |
| 137 | if ((state->m_keyline_select == 8) && ( | |
| 138 | 138 | data &= 0xfe; |
| 139 | 139 | } |
| 140 | 140 | return data; |
| r15082 | r15083 | |
| 152 | 152 | |
| 153 | 153 | if (state->m_keyline_select < 10) |
| 154 | 154 | { |
| 155 | data = | |
| 155 | data = | |
| 156 | 156 | /* Check for left-shift lock */ |
| 157 | 157 | /* 2008-05 FP: For some reason, superpet read it in the opposite way!! */ |
| 158 | 158 | /* While waiting for confirmation from docs, we add a workaround here. */ |
| 159 | 159 | if (state->m_superpet) |
| 160 | 160 | { |
| 161 | if ((state->m_keyline_select == 6) && !( | |
| 161 | if ((state->m_keyline_select == 6) && !( | |
| 162 | 162 | data &= 0xfe; |
| 163 | 163 | } |
| 164 | 164 | else |
| 165 | 165 | { |
| 166 | if ((state->m_keyline_select == 6) && ( | |
| 166 | if ((state->m_keyline_select == 6) && ( | |
| 167 | 167 | data &= 0xfe; |
| 168 | 168 | } |
| 169 | 169 | } |
| r15082 | r15083 | |
| 730 | 730 | if (state->m_superpet) |
| 731 | 731 | { |
| 732 | 732 | state->m_spet.rom = 0; |
| 733 | if (in | |
| 733 | if (machine.root_device().ioport | |
| 734 | 734 | { |
| 735 | 735 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, 1); |
| 736 | 736 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_HALT, 0); |
| r15082 | r15083 | |
| 746 | 746 | |
| 747 | 747 | if (state->m_cbm8096) |
| 748 | 748 | { |
| 749 | if (in | |
| 749 | if (machine.root_device().ioport | |
| 750 | 750 | { |
| 751 | 751 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff0, 0xfff0, FUNC(cbm8096_w)); |
| 752 | 752 | } |
| r15082 | r15083 | |
| 757 | 757 | cbm8096_w(machine.device("maincpu")->memory().space(AS_PROGRAM), 0, 0); |
| 758 | 758 | } |
| 759 | 759 | |
| 760 | //removed cbm_drive_0_config (input_port_read(machine, "CFG") & 2 ? IEEE : 0, 8); | |
| 761 | //removed cbm_drive_1_config (input_port_read(machine, "CFG") & 1 ? IEEE : 0, 9); | |
| 760 | //removed cbm_drive_0_config (machine.root_device().ioport("CFG")->read() & 2 ? IEEE : 0, 8); | |
| 761 | //removed cbm_drive_1_config (machine.root_device().ioport("CFG")->read() & 1 ? IEEE : 0, 9); | |
| 762 | 762 | machine.device("maincpu")->reset(); |
| 763 | 763 | |
| 764 | 764 | state->m_ieee->ren_w(0); |
| r15082 | r15083 | |
| 772 | 772 | pet_state *state = device->machine().driver_data<pet_state>(); |
| 773 | 773 | if (state->m_superpet) |
| 774 | 774 | { |
| 775 | if ( | |
| 775 | if (s | |
| 776 | 776 | { |
| 777 | 777 | device_set_input_line(device, INPUT_LINE_HALT, 1); |
| 778 | 778 | device_set_input_line(device, INPUT_LINE_HALT, 0); |
| r15082 | r15083 | |
| 786 | 786 | } |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | set_led_status (device->machine(),1, | |
| 789 | set_led_status (device->machine(),1, | |
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | /* oric 1 or oric atmos */ |
| 59 | 59 | |
| 60 | 60 | /* if floppy disc hardware is disabled, do not allow interrupts from it */ |
| 61 | if ((in | |
| 61 | if ((machine.root_device().ioport | |
| 62 | 62 | state->m_irqs &=~(1<<1); |
| 63 | 63 | } |
| 64 | 64 | |
| r15082 | r15083 | |
| 93 | 93 | int input_port_data; |
| 94 | 94 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" }; |
| 95 | 95 | |
| 96 | input_port_data = in | |
| 96 | input_port_data = machine.root_device().ioport | |
| 97 | 97 | |
| 98 | 98 | /* go through all bits in line */ |
| 99 | 99 | for (i=0; i<8; i++) |
| r15082 | r15083 | |
| 271 | 271 | to the via cb1 input. Interrupts can be generated from the vertical |
| 272 | 272 | sync, and flicker free games can be produced */ |
| 273 | 273 | |
| 274 | input_port_9 = in | |
| 274 | input_port_9 = machine.root_device().ioport | |
| 275 | 275 | /* cable is enabled? */ |
| 276 | 276 | if ((input_port_9 & 0x08)!=0) |
| 277 | 277 | { |
| r15082 | r15083 | |
| 1002 | 1002 | |
| 1003 | 1003 | static WRITE_LINE_DEVICE_HANDLER( oric_wd179x_intrq_w ) |
| 1004 | 1004 | { |
| 1005 | if (( | |
| 1005 | if (( | |
| 1006 | 1006 | oric_microdisc_wd179x_intrq_w(device, state); |
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | 1009 | static WRITE_LINE_DEVICE_HANDLER( oric_wd179x_drq_w ) |
| 1010 | 1010 | { |
| 1011 | switch ( | |
| 1011 | switch ( | |
| 1012 | 1012 | { |
| 1013 | 1013 | default: |
| 1014 | 1014 | case ORIC_FLOPPY_INTERFACE_NONE: |
| r15082 | r15083 | |
| 1066 | 1066 | MACHINE_RESET( oric ) |
| 1067 | 1067 | { |
| 1068 | 1068 | oric_state *state = machine.driver_data<oric_state>(); |
| 1069 | int disc_interface_id = in | |
| 1069 | int disc_interface_id = machine.root_device().ioport | |
| 1070 | 1070 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 1071 | 1071 | if (state->m_is_telestrat) |
| 1072 | 1072 | return; |
| r15082 | r15083 | |
| 1130 | 1130 | READ8_MEMBER(oric_state::oric_IO_r) |
| 1131 | 1131 | { |
| 1132 | 1132 | via6522_device *via_0 = machine().device<via6522_device>("via6522_0"); |
| 1133 | switch (i | |
| 1133 | switch (iop | |
| 1134 | 1134 | { |
| 1135 | 1135 | default: |
| 1136 | 1136 | case ORIC_FLOPPY_INTERFACE_NONE: |
| r15082 | r15083 | |
| 1162 | 1162 | WRITE8_MEMBER(oric_state::oric_IO_w) |
| 1163 | 1163 | { |
| 1164 | 1164 | via6522_device *via_0 = machine().device<via6522_device>("via6522_0"); |
| 1165 | switch (i | |
| 1165 | switch (iop | |
| 1166 | 1166 | { |
| 1167 | 1167 | default: |
| 1168 | 1168 | case ORIC_FLOPPY_INTERFACE_NONE: |
| r15082 | r15083 | |
| 1312 | 1312 | /* left joystick selected? */ |
| 1313 | 1313 | if (state->m_telestrat_via2_port_b_data & (1<<6)) |
| 1314 | 1314 | { |
| 1315 | data &= | |
| 1315 | data &= s | |
| 1316 | 1316 | } |
| 1317 | 1317 | |
| 1318 | 1318 | /* right joystick selected? */ |
| 1319 | 1319 | if (state->m_telestrat_via2_port_b_data & (1<<7)) |
| 1320 | 1320 | { |
| 1321 | data &= | |
| 1321 | data &= | |
| 1322 | 1322 | } |
| 1323 | 1323 | |
| 1324 | 1324 | data |= state->m_telestrat_via2_port_b_data & ((1<<7) | (1<<6) | (1<<5)); |
| r15082 | r15083 | |
|---|---|---|
| 340 | 340 | * 01 - color 40x25 |
| 341 | 341 | * 6-7 The number of floppy disk drives |
| 342 | 342 | */ |
| 343 | data = i | |
| 343 | data = iop | |
| 344 | 344 | } |
| 345 | 345 | else |
| 346 | 346 | { |
| r15082 | r15083 | |
| 362 | 362 | if (m_ppi_portc_switch_high) |
| 363 | 363 | { |
| 364 | 364 | /* read hi nibble of S2 */ |
| 365 | data = (data & 0xf0) | ((i | |
| 365 | data = (data & 0xf0) | ((iop | |
| 366 | 366 | PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); |
| 367 | 367 | } |
| 368 | 368 | else |
| 369 | 369 | { |
| 370 | 370 | /* read lo nibble of S2 */ |
| 371 | data = (data & 0xf0) | (i | |
| 371 | data = (data & 0xf0) | (iop | |
| 372 | 372 | PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); |
| 373 | 373 | } |
| 374 | 374 | |
| r15082 | r15083 | |
| 745 | 745 | * 01 - color 40x25 |
| 746 | 746 | * 6-7 The number of floppy disk drives |
| 747 | 747 | */ |
| 748 | data = i | |
| 748 | data = iop | |
| 749 | 749 | switch ( machine().device<ram_device>(RAM_TAG)->size() ) |
| 750 | 750 | { |
| 751 | 751 | case 16 * 1024: |
| r15082 | r15083 | |
| 810 | 810 | else |
| 811 | 811 | { |
| 812 | 812 | /* read lo nibble of S2 */ |
| 813 | data = (data & 0xf0) | (i | |
| 813 | data = (data & 0xf0) | (iop | |
| 814 | 814 | PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); |
| 815 | 815 | } |
| 816 | 816 |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | switch(offset) { |
| 38 | 38 | /* Keyboard*/ |
| 39 | case 0x07FC : return input_port_read(machine(), "LINE0"); | |
| 40 | case 0x07FD : return input_port_read(machine(), "LINE1"); | |
| 41 | case 0x07FA : return input_port_read(machine(), "LINE2"); | |
| 42 | case 0x07FB : return input_port_read(machine(), "LINE3"); | |
| 43 | case 0x07F6 : return input_port_read(machine(), "LINE4"); | |
| 44 | case 0x07F7 : return input_port_read(machine(), "LINE5"); | |
| 45 | case 0x07EE : return input_port_read(machine(), "LINE6"); | |
| 46 | case 0x07EF : return input_port_read(machine(), "LINE7"); | |
| 47 | case 0x07DE : return input_port_read(machine(), "LINE8"); | |
| 48 | case 0x07DF : return input_port_read(machine(), "LINE9"); | |
| 49 | case 0x07BE : return input_port_read(machine(), "LINE10"); | |
| 50 | case 0x07BF : return input_port_read(machine(), "LINE11"); | |
| 51 | case 0x077E : return input_port_read(machine(), "LINE12"); | |
| 52 | case 0x077F : return input_port_read(machine(), "LINE13"); | |
| 53 | case 0x06FE : return input_port_read(machine(), "LINE14"); | |
| 54 | case 0x06FF : return input_port_read(machine(), "LINE15"); | |
| 55 | case 0x05FE : return input_port_read(machine(), "LINE16"); | |
| 56 | case 0x05FF : return input_port_read(machine(), "LINE17"); | |
| 57 | case 0x03FE : return input_port_read(machine(), "LINE18"); | |
| 58 | case 0x03FF : return input_port_read(machine(), "LINE19"); | |
| 39 | case 0x07FC : return ioport("LINE0")->read(); | |
| 40 | case 0x07FD : return ioport("LINE1")->read(); | |
| 41 | case 0x07FA : return ioport("LINE2")->read(); | |
| 42 | case 0x07FB : return ioport("LINE3")->read(); | |
| 43 | case 0x07F6 : return ioport("LINE4")->read(); | |
| 44 | case 0x07F7 : return ioport("LINE5")->read(); | |
| 45 | case 0x07EE : return ioport("LINE6")->read(); | |
| 46 | case 0x07EF : return ioport("LINE7")->read(); | |
| 47 | case 0x07DE : return ioport("LINE8")->read(); | |
| 48 | case 0x07DF : return ioport("LINE9")->read(); | |
| 49 | case 0x07BE : return ioport("LINE10")->read(); | |
| 50 | case 0x07BF : return ioport("LINE11")->read(); | |
| 51 | case 0x077E : return ioport("LINE12")->read(); | |
| 52 | case 0x077F : return ioport("LINE13")->read(); | |
| 53 | case 0x06FE : return ioport("LINE14")->read(); | |
| 54 | case 0x06FF : return ioport("LINE15")->read(); | |
| 55 | case 0x05FE : return ioport("LINE16")->read(); | |
| 56 | case 0x05FF : return ioport("LINE17")->read(); | |
| 57 | case 0x03FE : return ioport("LINE18")->read(); | |
| 58 | case 0x03FF : return ioport("LINE19")->read(); | |
| 59 | 59 | /* Tape */ |
| 60 | 60 | case 0x07FF : |
| 61 | 61 | level = (machine().device<cassette_image_device>(CASSETTE_TAG)->input()); |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | UINT8 c64_4tba_device::c64_pb_r(address_space &space, offs_t offset) |
| 87 | 87 | { |
| 88 | return i | |
| 88 | return iop | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| r15082 | r15083 | |
| 95 | 95 | |
| 96 | 96 | int c64_4tba_device::c64_pa2_r() |
| 97 | 97 | { |
| 98 | return BIT(i | |
| 98 | return BIT(iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 |
| r15082 | r15083 | |
|---|---|---|
| 13 | 13 | READ8_MEMBER( vector06_state::vector06_8255_portb_r ) |
| 14 | 14 | { |
| 15 | 15 | UINT8 key = 0xff; |
| 16 | if (BIT(m_keyboard_mask, 0)) key &= input_port_read(machine(),"LINE0"); | |
| 17 | if (BIT(m_keyboard_mask, 1)) key &= input_port_read(machine(),"LINE1"); | |
| 18 | if (BIT(m_keyboard_mask, 2)) key &= input_port_read(machine(),"LINE2"); | |
| 19 | if (BIT(m_keyboard_mask, 3)) key &= input_port_read(machine(),"LINE3"); | |
| 20 | if (BIT(m_keyboard_mask, 4)) key &= input_port_read(machine(),"LINE4"); | |
| 21 | if (BIT(m_keyboard_mask, 5)) key &= input_port_read(machine(),"LINE5"); | |
| 22 | if (BIT(m_keyboard_mask, 6)) key &= input_port_read(machine(),"LINE6"); | |
| 23 | if (BIT(m_keyboard_mask, 7)) key &= input_port_read(machine(),"LINE7"); | |
| 16 | if (BIT(m_keyboard_mask, 0)) key &= ioport("LINE0")->read(); | |
| 17 | if (BIT(m_keyboard_mask, 1)) key &= ioport("LINE1")->read(); | |
| 18 | if (BIT(m_keyboard_mask, 2)) key &= ioport("LINE2")->read(); | |
| 19 | if (BIT(m_keyboard_mask, 3)) key &= ioport("LINE3")->read(); | |
| 20 | if (BIT(m_keyboard_mask, 4)) key &= ioport("LINE4")->read(); | |
| 21 | if (BIT(m_keyboard_mask, 5)) key &= ioport("LINE5")->read(); | |
| 22 | if (BIT(m_keyboard_mask, 6)) key &= ioport("LINE6")->read(); | |
| 23 | if (BIT(m_keyboard_mask, 7)) key &= ioport("LINE7")->read(); | |
| 24 | 24 | return key; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | READ8_MEMBER( vector06_state::vector06_8255_portc_r ) |
| 28 | 28 | { |
| 29 | UINT8 ret = i | |
| 29 | UINT8 ret = iop | |
| 30 | 30 | |
| 31 | 31 | if (m_cass->input() > 0) |
| 32 | 32 | ret |= 0x10; |
| r15082 | r15083 | |
| 140 | 140 | static TIMER_CALLBACK( reset_check_callback ) |
| 141 | 141 | { |
| 142 | 142 | vector06_state *state = machine.driver_data<vector06_state>(); |
| 143 | UINT8 val = in | |
| 143 | UINT8 val = machine.root_device().ioport | |
| 144 | 144 | |
| 145 | 145 | if (BIT(val, 0)) |
| 146 | 146 | { |
| r15082 | r15083 | |
|---|---|---|
| 176 | 176 | m_serial_timer->adjust(attotime::zero); |
| 177 | 177 | #endif |
| 178 | 178 | |
| 179 | UINT8 sound = i | |
| 179 | UINT8 sound = iop | |
| 180 | 180 | |
| 181 | 181 | m_cass1->change_state( |
| 182 | 182 | ((BIT(data,4)) && (sound)) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER); |
| r15082 | r15083 | |
| 216 | 216 | WRITE8_MEMBER(sorcerer_state::sorcerer_ff_w) |
| 217 | 217 | { |
| 218 | 218 | /* reading the config switch */ |
| 219 | switch (i | |
| 219 | switch (iop | |
| 220 | 220 | { |
| 221 | 221 | case 0: /* speaker */ |
| 222 | 222 | dac_data_w(m_dac, data); |
| r15082 | r15083 | |
| 275 | 275 | }; |
| 276 | 276 | |
| 277 | 277 | /* bit 5 - vsync (inverted) */ |
| 278 | data |= (((~i | |
| 278 | data |= (((~iop | |
| 279 | 279 | |
| 280 | 280 | /* bits 4..0 - keyboard data */ |
| 281 | data |= (i | |
| 281 | data |= (iop | |
| 282 | 282 | |
| 283 | 283 | return data; |
| 284 | 284 | } |
| r15082 | r15083 | |
|---|---|---|
| 472 | 472 | case 0x0e: |
| 473 | 473 | break; |
| 474 | 474 | case 0x0f: |
| 475 | keytronic->p1_data = | |
| 475 | keytronic->p1_data = | |
| 476 | 476 | break; |
| 477 | 477 | case 0x30: |
| 478 | keytronic->p1_data = | |
| 478 | keytronic->p1_data = | |
| 479 | 479 | break; |
| 480 | 480 | case 0x31: |
| 481 | keytronic->p1_data = | |
| 481 | keytronic->p1_data = | |
| 482 | 482 | break; |
| 483 | 483 | case 0x32: |
| 484 | keytronic->p1_data = | |
| 484 | keytronic->p1_data = | |
| 485 | 485 | break; |
| 486 | 486 | case 0x33: |
| 487 | keytronic->p1_data = | |
| 487 | keytronic->p1_data = | |
| 488 | 488 | break; |
| 489 | 489 | case 0x34: |
| 490 | keytronic->p1_data = | |
| 490 | keytronic->p1_data = | |
| 491 | 491 | break; |
| 492 | 492 | case 0x35: |
| 493 | keytronic->p1_data = | |
| 493 | keytronic->p1_data = | |
| 494 | 494 | break; |
| 495 | 495 | case 0x36: |
| 496 | keytronic->p1_data = | |
| 496 | keytronic->p1_data = | |
| 497 | 497 | break; |
| 498 | 498 | case 0x37: |
| 499 | keytronic->p1_data = | |
| 499 | keytronic->p1_data = | |
| 500 | 500 | break; |
| 501 | 501 | case 0x38: |
| 502 | keytronic->p1_data = | |
| 502 | keytronic->p1_data = | |
| 503 | 503 | break; |
| 504 | 504 | case 0x39: |
| 505 | keytronic->p1_data = | |
| 505 | keytronic->p1_data = | |
| 506 | 506 | break; |
| 507 | 507 | case 0x3a: |
| 508 | keytronic->p1_data = | |
| 508 | keytronic->p1_data = | |
| 509 | 509 | break; |
| 510 | 510 | case 0x3b: |
| 511 | keytronic->p1_data = | |
| 511 | keytronic->p1_data = | |
| 512 | 512 | break; |
| 513 | 513 | } |
| 514 | 514 | } |
| r15082 | r15083 | |
| 519 | 519 | switch (keytronic->p1) |
| 520 | 520 | { |
| 521 | 521 | case 0x0b: |
| 522 | keytronic->p1_data = | |
| 522 | keytronic->p1_data = | |
| 523 | 523 | break; |
| 524 | 524 | case 0x30: |
| 525 | keytronic->p1_data = | |
| 525 | keytronic->p1_data = | |
| 526 | 526 | break; |
| 527 | 527 | case 0x31: |
| 528 | keytronic->p1_data = | |
| 528 | keytronic->p1_data = | |
| 529 | 529 | break; |
| 530 | 530 | case 0x32: |
| 531 | keytronic->p1_data = | |
| 531 | keytronic->p1_data = | |
| 532 | 532 | break; |
| 533 | 533 | case 0x33: |
| 534 | keytronic->p1_data = | |
| 534 | keytronic->p1_data = | |
| 535 | 535 | break; |
| 536 | 536 | case 0x34: |
| 537 | keytronic->p1_data = | |
| 537 | keytronic->p1_data = | |
| 538 | 538 | break; |
| 539 | 539 | case 0x35: |
| 540 | keytronic->p1_data = | |
| 540 | keytronic->p1_data = | |
| 541 | 541 | break; |
| 542 | 542 | case 0x36: |
| 543 | keytronic->p1_data = | |
| 543 | keytronic->p1_data = | |
| 544 | 544 | break; |
| 545 | 545 | case 0x37: |
| 546 | keytronic->p1_data = | |
| 546 | keytronic->p1_data = | |
| 547 | 547 | break; |
| 548 | 548 | case 0x38: |
| 549 | 549 | keytronic->p1_data = 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | for(i = 1; i < 12; i++) |
| 26 | 26 | { |
| 27 | code = in | |
| 27 | code = machine.root_device().ioport | |
| 28 | 28 | if (code != 0) |
| 29 | 29 | { |
| 30 | 30 | for(j = 0; j < 8; j++) |
| r15082 | r15083 | |
| 35 | 35 | break; |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | if ((in | |
| 38 | if ((machine.root_device().ioport | |
| 39 | 39 | { |
| 40 | 40 | if (i==6 || i==7) |
| 41 | 41 | { |
| r15082 | r15083 | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | } |
| 46 | if ((in | |
| 46 | if ((machine.root_device().ioport | |
| 47 | 47 | { |
| 48 | 48 | if (i>=8 && i<=11) |
| 49 | 49 | { |
| r15082 | r15083 | |
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | state->m_key_pressed = 0x40; |
| 54 | if ((in | |
| 54 | if ((machine.root_device().ioport | |
| 55 | 55 | { |
| 56 | 56 | state->m_key_irq_vector = 0x30; |
| 57 | 57 | } |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | /* Do not get deltas or send packets if queue is not empty (Prevents drifting) */ |
| 78 | 78 | if (m_head==m_tail) |
| 79 | 79 | { |
| 80 | nx = i | |
| 80 | nx = iop | |
| 81 | 81 | |
| 82 | 82 | dx = nx - ox; |
| 83 | 83 | if (dx<=-0x800) dx = nx + 0x1000 - ox; /* Prevent jumping */ |
| 84 | 84 | if (dx>=0x800) dx = nx - 0x1000 - ox; |
| 85 | 85 | ox = nx; |
| 86 | 86 | |
| 87 | ny = i | |
| 87 | ny = iop | |
| 88 | 88 | |
| 89 | 89 | dy = ny - oy; |
| 90 | 90 | if (dy<=-0x800) dy = ny + 0x1000 - oy; |
| 91 | 91 | if (dy>=0x800) dy = ny - 0x1000 - oy; |
| 92 | 92 | oy = ny; |
| 93 | 93 | |
| 94 | nb = i | |
| 94 | nb = iop | |
| 95 | 95 | mbc = nb^m_mb; |
| 96 | 96 | m_mb = nb; |
| 97 | 97 |
| r15082 | r15083 | |
|---|---|---|
| 224 | 224 | ***************************************************************************/ |
| 225 | 225 | UINT32 generic_terminal_device::update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 226 | 226 | { |
| 227 | UINT8 options = i | |
| 227 | UINT8 options = iop | |
| 228 | 228 | UINT16 cursor = m_y_pos * TERMINAL_WIDTH + m_x_pos; |
| 229 | 229 | UINT8 y,ra,chr,gfx; |
| 230 | 230 | UINT16 sy=0,ma=0,x; |
| r15082 | r15083 | |
| 307 | 307 | UINT8 code; |
| 308 | 308 | UINT8 key_code = 0; |
| 309 | 309 | UINT8 retVal = 0; |
| 310 | UINT8 shift = BIT(input_port_read(*this, "TERM_LINEC"), 1); | |
| 311 | UINT8 caps = BIT(input_port_read(*this, "TERM_LINEC"), 2); | |
| 312 | UINT8 ctrl = BIT(input_port_read(*this, "TERM_LINEC"), 0); | |
| 310 | UINT8 shift = BIT(ioport("TERM_LINEC")->read(), 1); | |
| 311 | UINT8 caps = BIT(ioport("TERM_LINEC")->read(), 2); | |
| 312 | UINT8 ctrl = BIT(ioport("TERM_LINEC")->read(), 0); | |
| 313 | 313 | i = *scan_line; |
| 314 | 314 | { |
| 315 | code = i | |
| 315 | code = iop | |
| 316 | 316 | if (code != 0) |
| 317 | 317 | { |
| 318 | 318 | if (i==0 && shift==0) { |
| r15082 | r15083 | |
|---|---|---|
| 27 | 27 | READ8_MEMBER( sapi1_state::sapi1_keyboard_r ) |
| 28 | 28 | { |
| 29 | 29 | UINT8 key = 0xff; |
| 30 | if (BIT(m_keyboard_mask, 0)) { key &= input_port_read(machine(),"LINE0"); } | |
| 31 | if (BIT(m_keyboard_mask, 1)) { key &= input_port_read(machine(),"LINE1"); } | |
| 32 | if (BIT(m_keyboard_mask, 2)) { key &= input_port_read(machine(),"LINE2"); } | |
| 33 | if (BIT(m_keyboard_mask, 3)) { key &= input_port_read(machine(),"LINE3"); } | |
| 34 | if (BIT(m_keyboard_mask, 4)) { key &= input_port_read(machine(),"LINE4"); } | |
| 30 | if (BIT(m_keyboard_mask, 0)) { key &= ioport("LINE0")->read(); } | |
| 31 | if (BIT(m_keyboard_mask, 1)) { key &= ioport("LINE1")->read(); } | |
| 32 | if (BIT(m_keyboard_mask, 2)) { key &= ioport("LINE2")->read(); } | |
| 33 | if (BIT(m_keyboard_mask, 3)) { key &= ioport("LINE3")->read(); } | |
| 34 | if (BIT(m_keyboard_mask, 4)) { key &= ioport("LINE4")->read(); } | |
| 35 | 35 | return key; |
| 36 | 36 | } |
| 37 | 37 |
| r15082 | r15083 | |
|---|---|---|
| 51 | 51 | break; |
| 52 | 52 | case 0x200: /* Keyboard */ |
| 53 | 53 | /* Row 0 */ |
| 54 | if ( offset & 0x01 ) data &= i | |
| 54 | if ( offset & 0x01 ) data &= iop | |
| 55 | 55 | /* Row 1 */ |
| 56 | if ( offset & 0x02 ) data &= i | |
| 56 | if ( offset & 0x02 ) data &= iop | |
| 57 | 57 | /* Row 2 */ |
| 58 | if ( offset & 0x04 ) data &= i | |
| 58 | if ( offset & 0x04 ) data &= iop | |
| 59 | 59 | /* Row 3 */ |
| 60 | if ( offset & 0x08 ) data &= i | |
| 60 | if ( offset & 0x08 ) data &= iop | |
| 61 | 61 | /* Row 4 */ |
| 62 | if ( offset & 0x10 ) data &= i | |
| 62 | if ( offset & 0x10 ) data &= iop | |
| 63 | 63 | /* Row 5 */ |
| 64 | if ( offset & 0x20 ) data &= i | |
| 64 | if ( offset & 0x20 ) data &= iop | |
| 65 | 65 | /* Row 6 */ |
| 66 | if ( offset & 0x40 ) data &= i | |
| 66 | if ( offset & 0x40 ) data &= iop | |
| 67 | 67 | /* Row 7 */ |
| 68 | if ( offset & 0x80 ) data &= i | |
| 68 | if ( offset & 0x80 ) data &= iop | |
| 69 | 69 | break; |
| 70 | 70 | case 0x900: /* IEEE488 PIA */ |
| 71 | 71 | data = m_pia0->read(space, offset & 0x03 ); |
| r15082 | r15083 | |
|---|---|---|
| 1517 | 1517 | // Analogue ports |
| 1518 | 1518 | if(offset == 0x0808) |
| 1519 | 1519 | { |
| 1520 | return (i | |
| 1520 | return (iop | |
| 1521 | 1521 | } |
| 1522 | 1522 | if(offset == 0x0809) |
| 1523 | 1523 | { |
| 1524 | return (i | |
| 1524 | return (iop | |
| 1525 | 1525 | } |
| 1526 | 1526 | if(offset == 0x080a) |
| 1527 | 1527 | { |
| 1528 | return (i | |
| 1528 | return (iop | |
| 1529 | 1529 | } |
| 1530 | 1530 | if(offset == 0x080b) |
| 1531 | 1531 | { |
| 1532 | return (i | |
| 1532 | return (iop | |
| 1533 | 1533 | } |
| 1534 | 1534 | if(offset == 0x080c || offset == 0x080e) |
| 1535 | 1535 | { |
| r15082 | r15083 | |
| 1845 | 1845 | // m6845_personality_t crtc_type; |
| 1846 | 1846 | int page; |
| 1847 | 1847 | |
| 1848 | // crtc_type = i | |
| 1848 | // crtc_type = iop | |
| 1849 | 1849 | // m6845_set_personality(crtc_type); |
| 1850 | 1850 | |
| 1851 | 1851 | if(m_aleste_mode & 0x04) |
| r15082 | r15083 | |
| 2296 | 2296 | amstrad_GateArray_write(machine, 0x0c0); |
| 2297 | 2297 | |
| 2298 | 2298 | // Get manufacturer name and TV refresh rate from PCB link (dipswitch for mess emulation) |
| 2299 | state->m_ppi_port_inputs[amstrad_ppi_PortB] = (((in | |
| 2299 | state->m_ppi_port_inputs[amstrad_ppi_PortB] = (((machine.root_device().ioport | |
| 2300 | 2300 | |
| 2301 | 2301 | if ( state->m_system_type == SYSTEM_PLUS || state->m_system_type == SYSTEM_GX4000 ) |
| 2302 | 2302 | memset(state->m_asic.ram,0,16384); // clear ASIC RAM |
| r15082 | r15083 | |
| 2645 | 2645 | if(m_aleste_mode == 0x08 && ( m_ppi_port_outputs[amstrad_ppi_PortC] & 0x0F ) == 10) |
| 2646 | 2646 | return 0xff; |
| 2647 | 2647 | |
| 2648 | return in | |
| 2648 | return machine(). | |
| 2649 | 2649 | } |
| 2650 | 2650 | } |
| 2651 | 2651 | |
| r15082 | r15083 | |
| 2891 | 2891 | attoseconds_t refresh; |
| 2892 | 2892 | int height; |
| 2893 | 2893 | |
| 2894 | if ( in | |
| 2894 | if ( machine.root_device().ioport | |
| 2895 | 2895 | { |
| 2896 | 2896 | /* PAL */ |
| 2897 | 2897 | visarea.set(0, 64 + 640 + 64 - 1, 34, 34 + 15 + 242 + 15 - 1); |
| r15082 | r15083 | |
|---|---|---|
| 235 | 235 | |
| 236 | 236 | int c64_easyflash_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram) |
| 237 | 237 | { |
| 238 | return !(BIT(m_mode, 0) | !(BIT(m_mode, 2) | | |
| 238 | return !(BIT(m_mode, 0) | !(BIT(m_mode, 2) | | |
| 239 | 239 | } |
| r15082 | r15083 | |
|---|---|---|
| 239 | 239 | switch (offset) |
| 240 | 240 | { |
| 241 | 241 | case 0: |
| 242 | switch (i | |
| 242 | switch (iop | |
| 243 | 243 | { |
| 244 | 244 | case 0x04: /* Sports Pad */ |
| 245 | 245 | if (data != m_sports_pad_last_data_1) |
| r15082 | r15083 | |
| 250 | 250 | if (cpu_cycles - m_last_sports_pad_time_1 > 512) |
| 251 | 251 | { |
| 252 | 252 | m_sports_pad_state_1 = 3; |
| 253 | m_sports_pad_1_x = input_port_read(machine(), "SPORT0"); | |
| 254 | m_sports_pad_1_y = input_port_read(machine(), "SPORT1"); | |
| 253 | m_sports_pad_1_x = ioport("SPORT0")->read(); | |
| 254 | m_sports_pad_1_y = ioport("SPORT1")->read(); | |
| 255 | 255 | } |
| 256 | 256 | m_last_sports_pad_time_1 = cpu_cycles; |
| 257 | 257 | m_sports_pad_state_1 = (m_sports_pad_state_1 + 1) & 3; |
| r15082 | r15083 | |
| 261 | 261 | break; |
| 262 | 262 | |
| 263 | 263 | case 1: |
| 264 | switch (i | |
| 264 | switch (iop | |
| 265 | 265 | { |
| 266 | 266 | case 0x40: /* Sports Pad */ |
| 267 | 267 | if (data != m_sports_pad_last_data_2) |
| r15082 | r15083 | |
| 272 | 272 | if (cpu_cycles - m_last_sports_pad_time_2 > 2048) |
| 273 | 273 | { |
| 274 | 274 | m_sports_pad_state_2 = 3; |
| 275 | m_sports_pad_2_x = input_port_read(machine(), "SPORT2"); | |
| 276 | m_sports_pad_2_y = input_port_read(machine(), "SPORT3"); | |
| 275 | m_sports_pad_2_x = ioport("SPORT2")->read(); | |
| 276 | m_sports_pad_2_y = ioport("SPORT3")->read(); | |
| 277 | 277 | } |
| 278 | 278 | m_last_sports_pad_time_2 = cpu_cycles; |
| 279 | 279 | m_sports_pad_state_2 = (m_sports_pad_state_2 + 1) & 3; |
| r15082 | r15083 | |
| 455 | 455 | static void lphaser1_sensor_check( running_machine &machine ) |
| 456 | 456 | { |
| 457 | 457 | sms_state *state = machine.driver_data<sms_state>(); |
| 458 | const int x = screen_hpos_nonscaled(*machine.first_screen(), input_port_read(machine, "LPHASER0")); | |
| 459 | const int y = screen_vpos_nonscaled(*machine.first_screen(), input_port_read(machine, "LPHASER1")); | |
| 458 | const int x = screen_hpos_nonscaled(*machine.first_screen(), machine.root_device().ioport("LPHASER0")->read()); | |
| 459 | const int y = screen_vpos_nonscaled(*machine.first_screen(), machine.root_device().ioport("LPHASER1")->read()); | |
| 460 | 460 | |
| 461 | 461 | if (lgun_bright_aim_area(machine, state->m_lphaser_1_timer, x, y)) |
| 462 | 462 | { |
| r15082 | r15083 | |
| 471 | 471 | static void lphaser2_sensor_check( running_machine &machine ) |
| 472 | 472 | { |
| 473 | 473 | sms_state *state = machine.driver_data<sms_state>(); |
| 474 | const int x = screen_hpos_nonscaled(*machine.first_screen(), input_port_read(machine, "LPHASER2")); | |
| 475 | const int y = screen_vpos_nonscaled(*machine.first_screen(), input_port_read(machine, "LPHASER3")); | |
| 474 | const int x = screen_hpos_nonscaled(*machine.first_screen(), machine.root_device().ioport("LPHASER2")->read()); | |
| 475 | const int y = screen_vpos_nonscaled(*machine.first_screen(), machine.root_device().ioport("LPHASER3")->read()); | |
| 476 | 476 | |
| 477 | 477 | if (lgun_bright_aim_area(machine, state->m_lphaser_2_timer, x, y)) |
| 478 | 478 | { |
| r15082 | r15083 | |
| 491 | 491 | { |
| 492 | 492 | sms_state *state = machine.driver_data<sms_state>(); |
| 493 | 493 | |
| 494 | if ((i | |
| 494 | if ((state->iop | |
| 495 | 495 | { |
| 496 | 496 | /* enable crosshair */ |
| 497 | 497 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 505 | 505 | state->m_lphaser_1_timer->enable(0); |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | if ((i | |
| 508 | if ((state->iop | |
| 509 | 509 | { |
| 510 | 510 | /* enable crosshair */ |
| 511 | 511 | crosshair_set_screen(machine, 1, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 537 | 537 | { |
| 538 | 538 | sms_state *state = field.machine().driver_data<sms_state>(); |
| 539 | 539 | if (!state->m_lphaser_1_timer || |
| 540 | ( | |
| 540 | ( | |
| 541 | 541 | return; |
| 542 | 542 | |
| 543 | 543 | if (newval != oldval) |
| r15082 | r15083 | |
| 548 | 548 | { |
| 549 | 549 | sms_state *state = field.machine().driver_data<sms_state>(); |
| 550 | 550 | if (!state->m_lphaser_2_timer || |
| 551 | ( | |
| 551 | ( | |
| 552 | 552 | return; |
| 553 | 553 | |
| 554 | 554 | if (newval != oldval) |
| r15082 | r15083 | |
| 576 | 576 | machine.scheduler().timer_set(attotime::zero, FUNC(lightgun_tick)); |
| 577 | 577 | |
| 578 | 578 | /* Player 1 */ |
| 579 | switch (in | |
| 579 | switch (machine. | |
| 580 | 580 | { |
| 581 | 581 | case 0x00: /* Joystick */ |
| 582 | data = in | |
| 582 | data = machine.root_device().ioport | |
| 583 | 583 | /* Check Rapid Fire setting for Button A */ |
| 584 | if (!(data & 0x10) && (in | |
| 584 | if (!(data & 0x10) && (machine.root_device().ioport | |
| 585 | 585 | data |= state->m_rapid_fire_state_1 & 0x10; |
| 586 | 586 | |
| 587 | 587 | /* Check Rapid Fire setting for Button B */ |
| 588 | if (!(data & 0x20) && (in | |
| 588 | if (!(data & 0x20) && (machine.root_device().ioport | |
| 589 | 589 | data |= state->m_rapid_fire_state_1 & 0x20; |
| 590 | 590 | |
| 591 | 591 | state->m_input_port0 = (state->m_input_port0 & 0xc0) | (data & 0x3f); |
| 592 | 592 | break; |
| 593 | 593 | |
| 594 | 594 | case 0x01: /* Light Phaser */ |
| 595 | data = (in | |
| 595 | data = (machine.root_device().ioport | |
| 596 | 596 | if (!(data & 0x10)) |
| 597 | 597 | { |
| 598 | if (in | |
| 598 | if (machine.root_device().ioport | |
| 599 | 599 | data |= state->m_rapid_fire_state_1 & 0x10; |
| 600 | 600 | } |
| 601 | 601 | /* just consider the button (trigger) bit */ |
| r15082 | r15083 | |
| 605 | 605 | |
| 606 | 606 | case 0x02: /* Paddle Control */ |
| 607 | 607 | /* Get button A state */ |
| 608 | data = in | |
| 608 | data = machine.root_device().ioport | |
| 609 | 609 | |
| 610 | 610 | if (state->m_paddle_read_state) |
| 611 | 611 | data = data >> 4; |
| 612 | 612 | |
| 613 | 613 | state->m_input_port0 = (state->m_input_port0 & 0xc0) | (data & 0x0f) | (state->m_paddle_read_state & 0x20) |
| 614 | | ((in | |
| 614 | | ((machine.root_device().ioport | |
| 615 | 615 | break; |
| 616 | 616 | |
| 617 | 617 | case 0x04: /* Sega Sports Pad */ |
| r15082 | r15083 | |
| 630 | 630 | data = state->m_sports_pad_1_y & 0x0f; |
| 631 | 631 | break; |
| 632 | 632 | } |
| 633 | state->m_input_port0 = (state->m_input_port0 & 0xc0) | data | ((in | |
| 633 | state->m_input_port0 = (state->m_input_port0 & 0xc0) | data | ((machine.root_device().ioport | |
| 634 | 634 | break; |
| 635 | 635 | } |
| 636 | 636 | |
| 637 | 637 | /* Player 2 */ |
| 638 | switch (in | |
| 638 | switch (machine. | |
| 639 | 639 | { |
| 640 | 640 | case 0x00: /* Joystick */ |
| 641 | data = in | |
| 641 | data = machine.root_device().ioport | |
| 642 | 642 | state->m_input_port0 = (state->m_input_port0 & 0x3f) | (data & 0xc0); |
| 643 | 643 | |
| 644 | data = in | |
| 644 | data = machine.root_device().ioport | |
| 645 | 645 | /* Check Rapid Fire setting for Button A */ |
| 646 | if (!(data & 0x04) && (in | |
| 646 | if (!(data & 0x04) && (machine.root_device().ioport | |
| 647 | 647 | data |= state->m_rapid_fire_state_2 & 0x04; |
| 648 | 648 | |
| 649 | 649 | /* Check Rapid Fire setting for Button B */ |
| 650 | if (!(data & 0x08) && (in | |
| 650 | if (!(data & 0x08) && (machine.root_device().ioport | |
| 651 | 651 | data |= state->m_rapid_fire_state_2 & 0x08; |
| 652 | 652 | |
| 653 | 653 | state->m_input_port1 = (state->m_input_port1 & 0xf0) | (data & 0x0f); |
| 654 | 654 | break; |
| 655 | 655 | |
| 656 | 656 | case 0x10: /* Light Phaser */ |
| 657 | data = (in | |
| 657 | data = (machine.root_device().ioport | |
| 658 | 658 | if (!(data & 0x04)) |
| 659 | 659 | { |
| 660 | if (in | |
| 660 | if (machine.root_device().ioport | |
| 661 | 661 | data |= state->m_rapid_fire_state_2 & 0x04; |
| 662 | 662 | } |
| 663 | 663 | /* just consider the button (trigger) bit */ |
| r15082 | r15083 | |
| 667 | 667 | |
| 668 | 668 | case 0x20: /* Paddle Control */ |
| 669 | 669 | /* Get button A state */ |
| 670 | data = in | |
| 670 | data = machine.root_device().ioport | |
| 671 | 671 | if (state->m_paddle_read_state) |
| 672 | 672 | data = data >> 4; |
| 673 | 673 | |
| 674 | 674 | state->m_input_port0 = (state->m_input_port0 & 0x3f) | ((data & 0x03) << 6); |
| 675 | 675 | state->m_input_port1 = (state->m_input_port1 & 0xf0) | ((data & 0x0c) >> 2) | (state->m_paddle_read_state & 0x08) |
| 676 | | ((in | |
| 676 | | ((machine.root_device().ioport | |
| 677 | 677 | break; |
| 678 | 678 | |
| 679 | 679 | case 0x40: /* Sega Sports Pad */ |
| r15082 | r15083 | |
| 693 | 693 | break; |
| 694 | 694 | } |
| 695 | 695 | state->m_input_port0 = (state->m_input_port0 & 0x3f) | ((data & 0x03) << 6); |
| 696 | state->m_input_port1 = (state->m_input_port1 & 0xf0) | (data >> 2) | ((in | |
| 696 | state->m_input_port1 = (state->m_input_port1 & 0xf0) | (data >> 2) | ((machine.root_device().ioport | |
| 697 | 697 | break; |
| 698 | 698 | } |
| 699 | 699 | } |
| r15082 | r15083 | |
| 781 | 781 | if (driver_state->m_is_gamegear && !(driver_state->m_cartridge[driver_state->m_current_cartridge].features & CF_GG_SMS_MODE)) |
| 782 | 782 | return; |
| 783 | 783 | |
| 784 | if (!(i | |
| 784 | if (!(drive | |
| 785 | 785 | { |
| 786 | 786 | if (!driver_state->m_paused) |
| 787 | 787 | { |
| r15082 | r15083 | |
| 823 | 823 | sms_get_inputs(&space); |
| 824 | 824 | |
| 825 | 825 | /* Reset Button */ |
| 826 | m_input_port1 = (m_input_port1 & 0xef) | (i | |
| 826 | m_input_port1 = (m_input_port1 & 0xef) | (iop | |
| 827 | 827 | |
| 828 | 828 | /* Do region detection if TH of ports A and B are set to output (0) */ |
| 829 | 829 | if (!(m_ctrl_reg & 0x0a)) |
| r15082 | r15083 | |
| 877 | 877 | READ8_MEMBER(sms_state::gg_input_port_2_r) |
| 878 | 878 | { |
| 879 | 879 | |
| 880 | //logerror("joy 2 read, val: %02x, pc: %04x\n", ((m_is_region_japan ? 0x00 : 0x40) | (input_port_read(machine, "START") & 0x80)), activecpu_get_pc()); | |
| 881 | return ((m_is_region_japan ? 0x00 : 0x40) | (input_port_read(machine(), "START") & 0x80)); | |
| 880 | //logerror("joy 2 read, val: %02x, pc: %04x\n", ((m_is_region_japan ? 0x00 : 0x40) | (machine.root_device().ioport("START")->read() & 0x80)), activecpu_get_pc()); | |
| 881 | return ((m_is_region_japan ? 0x00 : 0x40) | (ioport("START")->read() & 0x80)); | |
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | |
| r15082 | r15083 | |
| 903 | 903 | /* The following code comes from sg1000.c. We should eventually merge these TV Draw implementations */ |
| 904 | 904 | WRITE8_MEMBER(sms_state::sms_tvdraw_axis_w) |
| 905 | 905 | { |
| 906 | UINT8 tvboard_on = i | |
| 906 | UINT8 tvboard_on = iop | |
| 907 | 907 | |
| 908 | 908 | if (data & 0x01) |
| 909 | 909 | { |
| 910 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? i | |
| 910 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? iop | |
| 911 | 911 | |
| 912 | 912 | if (m_cartridge[m_current_cartridge].m_tvdraw_data < 4) m_cartridge[m_current_cartridge].m_tvdraw_data = 4; |
| 913 | 913 | if (m_cartridge[m_current_cartridge].m_tvdraw_data > 251) m_cartridge[m_current_cartridge].m_tvdraw_data = 251; |
| 914 | 914 | } |
| 915 | 915 | else |
| 916 | 916 | { |
| 917 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? i | |
| 917 | m_cartridge[m_current_cartridge].m_tvdraw_data = tvboard_on ? iop | |
| 918 | 918 | } |
| 919 | 919 | } |
| 920 | 920 | |
| 921 | 921 | READ8_MEMBER(sms_state::sms_tvdraw_status_r) |
| 922 | 922 | { |
| 923 | UINT8 tvboard_on = input_port_read_safe(machine(), "TVDRAW", 0x00); | |
| 924 | return tvboard_on ? input_port_read(machine(), "TVDRAW_PEN") : 0x01; | |
| 923 | UINT8 tvboard_on = ioport("TVDRAW")->read_safe(0x00); | |
| 924 | return tvboard_on ? ioport("TVDRAW_PEN")->read() : 0x01; | |
| 925 | 925 | } |
| 926 | 926 | |
| 927 | 927 | READ8_MEMBER(sms_state::sms_tvdraw_data_r) |
| r15082 | r15083 | |
| 2202 | 2202 | |
| 2203 | 2203 | if (&screen != state->m_main_scr) |
| 2204 | 2204 | { |
| 2205 | sscope = | |
| 2205 | sscope = | |
| 2206 | 2206 | if (!sscope) |
| 2207 | 2207 | { |
| 2208 | 2208 | occluded_view = 1; |
| r15082 | r15083 | |
| 2229 | 2229 | // save a copy of current bitmap for the binocular hack |
| 2230 | 2230 | if (sscope) |
| 2231 | 2231 | { |
| 2232 | sscope_binocular_hack = | |
| 2232 | sscope_binocular_hack = | |
| 2233 | 2233 | |
| 2234 | 2234 | if (&screen == state->m_left_lcd) |
| 2235 | 2235 | { |
| r15082 | r15083 | |
| 2249 | 2249 | // use the copied bitmap for the binocular hack |
| 2250 | 2250 | if (sscope) |
| 2251 | 2251 | { |
| 2252 | sscope_binocular_hack = | |
| 2252 | sscope_binocular_hack = | |
| 2253 | 2253 | |
| 2254 | 2254 | if (&screen == state->m_left_lcd) |
| 2255 | 2255 | { |
| r15082 | r15083 | |
|---|---|---|
| 10927 | 10927 | { |
| 10928 | 10928 | nes_state *state = space->machine().driver_data<nes_state>(); |
| 10929 | 10929 | LOG_MMC(("bmc_vt5201_r, offset: %04x\n", offset)); |
| 10930 | // state->m_mmc_dipsetting = | |
| 10930 | // state->m_mmc_dipsetting = s | |
| 10931 | 10931 | |
| 10932 | 10932 | if (state->m_mmc_latch1) |
| 10933 | 10933 | return state->m_mmc_dipsetting; // cart mode, depending on the Dip Switches (always zero atm, given we have no way to add cart-based DIPs) |
| r15082 | r15083 | |
| 10962 | 10962 | nes_state *state = space->machine().driver_data<nes_state>(); |
| 10963 | 10963 | UINT8 bs5_helper = (offset & 0xc00) >> 10; |
| 10964 | 10964 | LOG_MMC(("bmc_bs5_w, offset: %04x, data: %02x\n", offset, data)); |
| 10965 | // state->m_mmc_dipsetting = | |
| 10965 | // state->m_mmc_dipsetting = s | |
| 10966 | 10966 | |
| 10967 | 10967 | switch (offset & 0x7000) |
| 10968 | 10968 | { |
| r15082 | r15083 | |
| 11072 | 11072 | { |
| 11073 | 11073 | nes_state *state = space->machine().driver_data<nes_state>(); |
| 11074 | 11074 | LOG_MMC(("bmc_gb63_r, offset: %04x\n", offset)); |
| 11075 | // state->m_mmc_dipsetting = | |
| 11075 | // state->m_mmc_dipsetting = s | |
| 11076 | 11076 | |
| 11077 | 11077 | if (state->m_mmc_latch1 == 1) |
| 11078 | 11078 | return 0xff; // open bus |
| r15082 | r15083 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | for(i = 0; i < 12; i++) |
| 77 | 77 | { |
| 78 | c = in | |
| 78 | c = machine.root_device().ioport | |
| 79 | 79 | if (c != 0) |
| 80 | 80 | { |
| 81 | 81 | for(j = 0; j < 8; j++) |
| r15082 | r15083 | |
| 181 | 181 | { |
| 182 | 182 | UINT8 *k7659 = device->machine().root_device().memregion("k7659")->base(); |
| 183 | 183 | UINT8 retVal = 0; |
| 184 | UINT8 a1 = input_port_read(device->machine(), "A1"); | |
| 185 | UINT8 a2 = input_port_read(device->machine(), "A2"); | |
| 186 | UINT8 a3 = input_port_read(device->machine(), "A3"); | |
| 187 | UINT8 a4 = input_port_read(device->machine(), "A4"); | |
| 188 | UINT8 a5 = input_port_read(device->machine(), "A5"); | |
| 189 | UINT8 a6 = input_port_read(device->machine(), "A6"); | |
| 190 | UINT8 a7 = input_port_read(device->machine(), "A7"); | |
| 191 | UINT8 a8 = input_port_read(device->machine(), "A8"); | |
| 192 | UINT8 a9 = input_port_read(device->machine(), "A9"); | |
| 193 | UINT8 a10 = input_port_read(device->machine(), "A10"); | |
| 194 | UINT8 a11 = input_port_read(device->machine(), "A11"); | |
| 195 | UINT8 a12 = input_port_read(device->machine(), "A12"); | |
| 184 | UINT8 a1 = device->machine().root_device().ioport("A1")->read(); | |
| 185 | UINT8 a2 = device->machine().root_device().ioport("A2")->read(); | |
| 186 | UINT8 a3 = device->machine().root_device().ioport("A3")->read(); | |
| 187 | UINT8 a4 = device->machine().root_device().ioport("A4")->read(); | |
| 188 | UINT8 a5 = device->machine().root_device().ioport("A5")->read(); | |
| 189 | UINT8 a6 = device->machine().root_device().ioport("A6")->read(); | |
| 190 | UINT8 a7 = device->machine().root_device().ioport("A7")->read(); | |
| 191 | UINT8 a8 = device->machine().root_device().ioport("A8")->read(); | |
| 192 | UINT8 a9 = device->machine().root_device().ioport("A9")->read(); | |
| 193 | UINT8 a10 = device->machine().root_device().ioport("A10")->read(); | |
| 194 | UINT8 a11 = device->machine().root_device().ioport("A11")->read(); | |
| 195 | UINT8 a12 = device->machine().root_device().ioport("A12")->read(); | |
| 196 | 196 | UINT16 code = 0; |
| 197 | 197 | if (a1!=0) { |
| 198 | 198 | code = 0x10 + key_pos(a1); |
| r15082 | r15083 | |
|---|---|---|
| 170 | 170 | { |
| 171 | 171 | if ((m_p2 & P2_KEYBOARD_SELECT_MASK) <= 5) /* read keyboard */ |
| 172 | 172 | { |
| 173 | h &= i | |
| 173 | h &= iop | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | for (i= 0x80, j = 0; i > 0; i >>= 1, j++) |
| r15082 | r15083 | |
| 207 | 207 | UINT8 data = 0xff; |
| 208 | 208 | |
| 209 | 209 | if ((m_p2 & P2_KEYBOARD_SELECT_MASK) == 1) |
| 210 | data &= i | |
| 210 | data &= iop | |
| 211 | 211 | |
| 212 | 212 | if ((m_p2 & P2_KEYBOARD_SELECT_MASK) == 0) |
| 213 | data &= i | |
| 213 | data &= iop | |
| 214 | 214 | |
| 215 | 215 | logerror("%.6f bus read %.2x\n", machine().time().as_double(), data); |
| 216 | 216 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 18 | 18 | static TIMER_CALLBACK(ti85_timer_callback) |
| 19 | 19 | { |
| 20 | 20 | ti85_state *state = machine.driver_data<ti85_state>(); |
| 21 | if (in | |
| 21 | if (machine.root_device().ioport | |
| 22 | 22 | { |
| 23 | 23 | if (state->m_ON_interrupt_mask && !state->m_ON_pressed) |
| 24 | 24 | { |
| r15082 | r15083 | |
| 246 | 246 | { |
| 247 | 247 | for (port = 0; port < 8; port++) |
| 248 | 248 | { |
| 249 | data ^= i | |
| 249 | data ^= iop | |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | } |
| r15082 | r15083 | |
|---|---|---|
| 118 | 118 | PORT_DIPSETTING( 0x00, "Bank Select" ) |
| 119 | 119 | |
| 120 | 120 | PORT_START("1C") |
| 121 | PORT_DIPNAME( 0xff, 0x00, "Extended Addressing" ) PORT_CONDITION("J3", 0x01, | |
| 121 | PORT_DIPNAME( 0xff, 0x00, "Extended Addressing" ) PORT_CONDITION("J3", 0x01, | |
| 122 | 122 | PORT_DIPSETTING( 0x00, "000000H" ) |
| 123 | 123 | // ... |
| 124 | 124 | PORT_DIPSETTING( 0xff, "FF0000H" ) |
| 125 | PORT_DIPNAME( 0xff, 0x40, "Bank Select Port" ) PORT_CONDITION("J3", 0x01, | |
| 125 | PORT_DIPNAME( 0xff, 0x40, "Bank Select Port" ) PORT_CONDITION("J3", 0x01, | |
| 126 | 126 | PORT_DIPSETTING( 0x00, "00H" ) |
| 127 | 127 | // ... |
| 128 | 128 | PORT_DIPSETTING( 0x40, "40H" ) |
| r15082 | r15083 | |
| 130 | 130 | PORT_DIPSETTING( 0xff, "FFH" ) |
| 131 | 131 | |
| 132 | 132 | PORT_START("A0A7") |
| 133 | PORT_DIPNAME( 0x01, 0x01, "Bank Select Data Bit A0" ) PORT_CONDITION("J3", 0x01, | |
| 133 | PORT_DIPNAME( 0x01, 0x01, "Bank Select Data Bit A0" ) PORT_CONDITION("J3", 0x01, | |
| 134 | 134 | PORT_DIPSETTING( 0x00, "0" ) |
| 135 | 135 | PORT_DIPSETTING( 0x01, "1" ) |
| 136 | PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit A1" ) PORT_CONDITION("J3", 0x01, | |
| 136 | PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit A1" ) PORT_CONDITION("J3", 0x01, | |
| 137 | 137 | PORT_DIPSETTING( 0x00, "0" ) |
| 138 | 138 | PORT_DIPSETTING( 0x02, "1" ) |
| 139 | PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit A2" ) PORT_CONDITION("J3", 0x01, | |
| 139 | PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit A2" ) PORT_CONDITION("J3", 0x01, | |
| 140 | 140 | PORT_DIPSETTING( 0x00, "0" ) |
| 141 | 141 | PORT_DIPSETTING( 0x04, "1" ) |
| 142 | PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit A3" ) PORT_CONDITION("J3", 0x01, | |
| 142 | PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit A3" ) PORT_CONDITION("J3", 0x01, | |
| 143 | 143 | PORT_DIPSETTING( 0x00, "0" ) |
| 144 | 144 | PORT_DIPSETTING( 0x08, "1" ) |
| 145 | PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit A4" ) PORT_CONDITION("J3", 0x01, | |
| 145 | PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit A4" ) PORT_CONDITION("J3", 0x01, | |
| 146 | 146 | PORT_DIPSETTING( 0x00, "0" ) |
| 147 | 147 | PORT_DIPSETTING( 0x10, "1" ) |
| 148 | PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit A5" ) PORT_CONDITION("J3", 0x01, | |
| 148 | PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit A5" ) PORT_CONDITION("J3", 0x01, | |
| 149 | 149 | PORT_DIPSETTING( 0x00, "0" ) |
| 150 | 150 | PORT_DIPSETTING( 0x20, "1" ) |
| 151 | PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit A6" ) PORT_CONDITION("J3", 0x01, | |
| 151 | PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit A6" ) PORT_CONDITION("J3", 0x01, | |
| 152 | 152 | PORT_DIPSETTING( 0x00, "0" ) |
| 153 | 153 | PORT_DIPSETTING( 0x40, "1" ) |
| 154 | PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit A7" ) PORT_CONDITION("J3", 0x01, | |
| 154 | PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit A7" ) PORT_CONDITION("J3", 0x01, | |
| 155 | 155 | PORT_DIPSETTING( 0x00, "0" ) |
| 156 | 156 | PORT_DIPSETTING( 0x80, "1" ) |
| 157 | 157 | |
| 158 | 158 | PORT_START("0B7B") |
| 159 | PORT_DIPNAME( 0x01, 0x00, "Bank Select Data Bit 0B" ) PORT_CONDITION("J3", 0x01, | |
| 159 | PORT_DIPNAME( 0x01, 0x00, "Bank Select Data Bit 0B" ) PORT_CONDITION("J3", 0x01, | |
| 160 | 160 | PORT_DIPSETTING( 0x00, "0" ) |
| 161 | 161 | PORT_DIPSETTING( 0x01, "1" ) |
| 162 | PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit 1B" ) PORT_CONDITION("J3", 0x01, | |
| 162 | PORT_DIPNAME( 0x02, 0x00, "Bank Select Data Bit 1B" ) PORT_CONDITION("J3", 0x01, | |
| 163 | 163 | PORT_DIPSETTING( 0x00, "0" ) |
| 164 | 164 | PORT_DIPSETTING( 0x02, "1" ) |
| 165 | PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit 2B" ) PORT_CONDITION("J3", 0x01, | |
| 165 | PORT_DIPNAME( 0x04, 0x00, "Bank Select Data Bit 2B" ) PORT_CONDITION("J3", 0x01, | |
| 166 | 166 | PORT_DIPSETTING( 0x00, "0" ) |
| 167 | 167 | PORT_DIPSETTING( 0x04, "1" ) |
| 168 | PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit 3B" ) PORT_CONDITION("J3", 0x01, | |
| 168 | PORT_DIPNAME( 0x08, 0x00, "Bank Select Data Bit 3B" ) PORT_CONDITION("J3", 0x01, | |
| 169 | 169 | PORT_DIPSETTING( 0x00, "0" ) |
| 170 | 170 | PORT_DIPSETTING( 0x08, "1" ) |
| 171 | PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit 4B" ) PORT_CONDITION("J3", 0x01, | |
| 171 | PORT_DIPNAME( 0x10, 0x00, "Bank Select Data Bit 4B" ) PORT_CONDITION("J3", 0x01, | |
| 172 | 172 | PORT_DIPSETTING( 0x00, "0" ) |
| 173 | 173 | PORT_DIPSETTING( 0x10, "1" ) |
| 174 | PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit 5B" ) PORT_CONDITION("J3", 0x01, | |
| 174 | PORT_DIPNAME( 0x20, 0x00, "Bank Select Data Bit 5B" ) PORT_CONDITION("J3", 0x01, | |
| 175 | 175 | PORT_DIPSETTING( 0x00, "0" ) |
| 176 | 176 | PORT_DIPSETTING( 0x20, "1" ) |
| 177 | PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit 6B" ) PORT_CONDITION("J3", 0x01, | |
| 177 | PORT_DIPNAME( 0x40, 0x00, "Bank Select Data Bit 6B" ) PORT_CONDITION("J3", 0x01, | |
| 178 | 178 | PORT_DIPSETTING( 0x00, "0" ) |
| 179 | 179 | PORT_DIPSETTING( 0x40, "1" ) |
| 180 | PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit 7B" ) PORT_CONDITION("J3", 0x01, | |
| 180 | PORT_DIPNAME( 0x80, 0x00, "Bank Select Data Bit 7B" ) PORT_CONDITION("J3", 0x01, | |
| 181 | 181 | PORT_DIPSETTING( 0x00, "0" ) |
| 182 | 182 | PORT_DIPSETTING( 0x80, "1" ) |
| 183 | 183 | INPUT_PORTS_END |
| r15082 | r15083 | |
|---|---|---|
| 28 | 28 | } |
| 29 | 29 | else |
| 30 | 30 | { |
| 31 | return i | |
| 31 | return iop | |
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
| r15082 | r15083 | |
| 176 | 176 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 177 | 177 | |
| 178 | 178 | /* ROM 2 enable/disable */ |
| 179 | if (in | |
| 179 | if (machine.root_device().ioport | |
| 180 | 180 | space->install_read_bank(0x1000, 0x1fff, "bank10"); |
| 181 | 181 | } else { |
| 182 | 182 | space->nop_read(0x1000, 0x1fff); |
| 183 | 183 | } |
| 184 | 184 | space->nop_write(0x1000, 0x1fff); |
| 185 | 185 | |
| 186 | if (in | |
| 186 | if (machine.root_device().ioport | |
| 187 | 187 | state->membank("bank10")->set_base(machine.root_device().memregion("maincpu")->base() + 0x1000); |
| 188 | 188 | |
| 189 | 189 | device_set_irq_callback(machine.device("maincpu"), galaxy_irq_callback); |
| r15082 | r15083 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | if ( m_port_a & 0x80 ) |
| 121 | 121 | { |
| 122 | data &= i | |
| 122 | data &= iop | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if ( m_port_a & 0x40 ) |
| 126 | 126 | { |
| 127 | data &= i | |
| 127 | data &= iop | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 303 | 303 | |
| 304 | 304 | switch (m_y) |
| 305 | 305 | { |
| 306 | case 0: data &= input_port_read(*this, "X0"); break; | |
| 307 | case 1: data &= input_port_read(*this, "X1"); break; | |
| 308 | case 2: data &= input_port_read(*this, "X2"); break; | |
| 309 | case 3: data &= input_port_read(*this, "X3"); break; | |
| 310 | case 4: data &= input_port_read(*this, "X4"); break; | |
| 311 | case 5: data &= input_port_read(*this, "X5"); break; | |
| 312 | case 6: data &= input_port_read(*this, "X6"); break; | |
| 313 | case 7: data &= input_port_read(*this, "X7"); break; | |
| 314 | case 8: data &= input_port_read(*this, "X8"); break; | |
| 315 | case 9: data &= input_port_read(*this, "X9"); break; | |
| 316 | case 0xa: data &= input_port_read(*this, "XA"); break; | |
| 317 | case 0xb: data &= input_port_read(*this, "XB"); break; | |
| 306 | case 0: data &= ioport("X0")->read(); break; | |
| 307 | case 1: data &= ioport("X1")->read(); break; | |
| 308 | case 2: data &= ioport("X2")->read(); break; | |
| 309 | case 3: data &= ioport("X3")->read(); break; | |
| 310 | case 4: data &= ioport("X4")->read(); break; | |
| 311 | case 5: data &= ioport("X5")->read(); break; | |
| 312 | case 6: data &= ioport("X6")->read(); break; | |
| 313 | case 7: data &= ioport("X7")->read(); break; | |
| 314 | case 8: data &= ioport("X8")->read(); break; | |
| 315 | case 9: data &= ioport("X9")->read(); break; | |
| 316 | case 0xa: data &= ioport("XA")->read(); break; | |
| 317 | case 0xb: data &= ioport("XB")->read(); break; | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | for (irow = 0; irow < 6; irow++) |
| 109 | 109 | { |
| 110 | data = in | |
| 110 | data = machine.root_device().ioport | |
| 111 | 111 | if (data != 0) |
| 112 | 112 | { |
| 113 | 113 | ibit = 1; |
| r15082 | r15083 | |
| 171 | 171 | void compis_state::compis_fdc_tc(int state) |
| 172 | 172 | { |
| 173 | 173 | /* Terminal count if iSBX-218A has DMA enabled */ |
| 174 | if (i | |
| 174 | if (iop | |
| 175 | 175 | { |
| 176 | 176 | upd765_tc_w(m_fdc, state); |
| 177 | 177 | } |
| r15082 | r15083 | |
| 180 | 180 | WRITE_LINE_MEMBER( compis_state::compis_fdc_int ) |
| 181 | 181 | { |
| 182 | 182 | /* No interrupt requests if iSBX-218A has DMA enabled */ |
| 183 | if (!i | |
| 183 | if (!iop | |
| 184 | 184 | { |
| 185 | 185 | if (m_8259m) |
| 186 | 186 | { |
| r15082 | r15083 | |
| 193 | 193 | WRITE_LINE_MEMBER( compis_state::compis_fdc_dma_drq ) |
| 194 | 194 | { |
| 195 | 195 | /* DMA requst if iSBX-218A has DMA enabled */ |
| 196 | if (i | |
| 196 | if (iop | |
| 197 | 197 | { |
| 198 | 198 | //compis_dma_drq(state, read); |
| 199 | 199 | } |
| r15082 | r15083 | |
| 213 | 213 | UINT16 data; |
| 214 | 214 | data = 0xffff; |
| 215 | 215 | /* DMA acknowledge if iSBX-218A has DMA enabled */ |
| 216 | if (i | |
| 216 | if (iop | |
| 217 | 217 | { |
| 218 | 218 | data = upd765_dack_r(m_fdc, 0); |
| 219 | 219 | } |
| r15082 | r15083 | |
| 271 | 271 | UINT8 data; |
| 272 | 272 | |
| 273 | 273 | /* DIP switch - Test mode */ |
| 274 | data = i | |
| 274 | data = iop | |
| 275 | 275 | |
| 276 | 276 | /* Centronics busy */ |
| 277 | 277 | data |= m_centronics->busy_r() << 5; |
| r15082 | r15083 | |
|---|---|---|
| 211 | 211 | { |
| 212 | 212 | if( (offs & 0x0300) == 0x0000 ) /* keyboard row A */ |
| 213 | 213 | { |
| 214 | if( in | |
| 214 | if( machine.root_device().ioport | |
| 215 | 215 | { |
| 216 | state->m_row_a = in | |
| 216 | state->m_row_a = machine.root_device().ioport | |
| 217 | 217 | data &= state->m_row_a; |
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | if( (offs & 0x0300) == 0x0100 ) /* keyboard row B */ |
| 221 | 221 | { |
| 222 | if( in | |
| 222 | if( machine.root_device().ioport | |
| 223 | 223 | { |
| 224 | state->m_row_b = in | |
| 224 | state->m_row_b = machine.root_device().ioport | |
| 225 | 225 | data &= state->m_row_b; |
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | if( (offs & 0x0300) == 0x0200 ) /* keyboard row C */ |
| 229 | 229 | { |
| 230 | if( in | |
| 230 | if( machine.root_device().ioport | |
| 231 | 231 | { |
| 232 | state->m_row_c = in | |
| 232 | state->m_row_c = machine.root_device().ioport | |
| 233 | 233 | data &= state->m_row_c; |
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | if( (offs & 0x0300) == 0x0300 ) /* keyboard row D */ |
| 237 | 237 | { |
| 238 | if( in | |
| 238 | if( machine.root_device().ioport | |
| 239 | 239 | { |
| 240 | state->m_row_d = in | |
| 240 | state->m_row_d = machine.root_device().ioport | |
| 241 | 241 | data &= state->m_row_d; |
| 242 | 242 | } |
| 243 | 243 | } |
| r15082 | r15083 | |
| 246 | 246 | { |
| 247 | 247 | /* All Lasers keyboard rows 0 through 7 */ |
| 248 | 248 | if( !(offs & 0x01) ) |
| 249 | data &= in | |
| 249 | data &= machine.root_device().ioport | |
| 250 | 250 | if( !(offs & 0x02) ) |
| 251 | data &= in | |
| 251 | data &= machine.root_device().ioport | |
| 252 | 252 | if( !(offs & 0x04) ) |
| 253 | data &= in | |
| 253 | data &= machine.root_device().ioport | |
| 254 | 254 | if( !(offs & 0x08) ) |
| 255 | data &= in | |
| 255 | data &= machine.root_device().ioport | |
| 256 | 256 | if( !(offs & 0x10) ) |
| 257 | data &= in | |
| 257 | data &= machine.root_device().ioport | |
| 258 | 258 | if( !(offs & 0x20) ) |
| 259 | data &= in | |
| 259 | data &= machine.root_device().ioport | |
| 260 | 260 | if( !(offs & 0x40) ) |
| 261 | data &= in | |
| 261 | data &= machine.root_device().ioport | |
| 262 | 262 | if( !(offs & 0x80) ) |
| 263 | data &= in | |
| 263 | data &= machine.root_device().ioport | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /* what's bit 7 good for? tape input maybe? */ |
| r15082 | r15083 | |
|---|---|---|
| 111 | 111 | if (offs == 0xfe) |
| 112 | 112 | { |
| 113 | 113 | if ((offset & 0x0100) == 0) |
| 114 | data &= i | |
| 114 | data &= iop | |
| 115 | 115 | if ((offset & 0x0200) == 0) |
| 116 | data &= i | |
| 116 | data &= iop | |
| 117 | 117 | if ((offset & 0x0400) == 0) |
| 118 | data &= i | |
| 118 | data &= iop | |
| 119 | 119 | if ((offset & 0x0800) == 0) |
| 120 | data &= i | |
| 120 | data &= iop | |
| 121 | 121 | if ((offset & 0x1000) == 0) |
| 122 | data &= i | |
| 122 | data &= iop | |
| 123 | 123 | if ((offset & 0x2000) == 0) |
| 124 | data &= i | |
| 124 | data &= iop | |
| 125 | 125 | if ((offset & 0x4000) == 0) |
| 126 | data &= i | |
| 126 | data &= iop | |
| 127 | 127 | if ((offset & 0x8000) == 0) |
| 128 | data &= i | |
| 128 | data &= iop | |
| 129 | 129 | |
| 130 | if (!i | |
| 130 | if (!iop | |
| 131 | 131 | data &= ~0x40; |
| 132 | 132 | |
| 133 | 133 | machine().device<cassette_image_device>(CASSETTE_TAG)->output(+1.0); |
| r15082 | r15083 | |
| 168 | 168 | if (offs == 0xfe) |
| 169 | 169 | { |
| 170 | 170 | if ((offset & 0x0100) == 0) |
| 171 | data &= i | |
| 171 | data &= iop | |
| 172 | 172 | if ((offset & 0x0200) == 0) |
| 173 | data &= i | |
| 173 | data &= iop | |
| 174 | 174 | if ((offset & 0x0400) == 0) |
| 175 | data &= i | |
| 175 | data &= iop | |
| 176 | 176 | if ((offset & 0x0800) == 0) |
| 177 | data &= i | |
| 177 | data &= iop | |
| 178 | 178 | if ((offset & 0x1000) == 0) |
| 179 | data &= i | |
| 179 | data &= iop | |
| 180 | 180 | if ((offset & 0x2000) == 0) |
| 181 | data &= i | |
| 181 | data &= iop | |
| 182 | 182 | if ((offset & 0x4000) == 0) |
| 183 | data &= i | |
| 183 | data &= iop | |
| 184 | 184 | if ((offset & 0x8000) == 0) |
| 185 | data &= i | |
| 185 | data &= iop | |
| 186 | 186 | |
| 187 | if (!i | |
| 187 | if (!iop | |
| 188 | 188 | data &= ~0x40; |
| 189 | 189 | |
| 190 | 190 | machine().device<cassette_image_device>(CASSETTE_TAG)->output(+1.0); |
| r15082 | r15083 | |
| 235 | 235 | if (offs == 0xfe) |
| 236 | 236 | { |
| 237 | 237 | if ((offset & 0x0100) == 0) |
| 238 | data &= i | |
| 238 | data &= iop | |
| 239 | 239 | if ((offset & 0x0200) == 0) |
| 240 | data &= i | |
| 240 | data &= iop | |
| 241 | 241 | if ((offset & 0x0400) == 0) |
| 242 | data &= i | |
| 242 | data &= iop | |
| 243 | 243 | if ((offset & 0x0800) == 0) |
| 244 | data &= i | |
| 244 | data &= iop | |
| 245 | 245 | if ((offset & 0x1000) == 0) |
| 246 | data &= i | |
| 246 | data &= iop | |
| 247 | 247 | if ((offset & 0x2000) == 0) |
| 248 | data &= i | |
| 248 | data &= iop | |
| 249 | 249 | if ((offset & 0x4000) == 0) |
| 250 | data &= i | |
| 250 | data &= iop | |
| 251 | 251 | if ((offset & 0x8000) == 0) |
| 252 | data &= i | |
| 252 | data &= iop | |
| 253 | 253 | |
| 254 | 254 | machine().device<cassette_image_device>(CASSETTE_TAG)->output(+1.0); |
| 255 | 255 | |
| r15082 | r15083 | |
| 292 | 292 | |
| 293 | 293 | if (offs == 0x7e) |
| 294 | 294 | { |
| 295 | data = (i | |
| 295 | data = (iop | |
| 296 | 296 | } |
| 297 | 297 | else |
| 298 | 298 | if (offs == 0xf5) |
| r15082 | r15083 | |
| 304 | 304 | if (offs == 0xfe) |
| 305 | 305 | { |
| 306 | 306 | if ((offset & 0x0100) == 0) |
| 307 | data &= i | |
| 307 | data &= iop | |
| 308 | 308 | if ((offset & 0x0200) == 0) |
| 309 | data &= i | |
| 309 | data &= iop | |
| 310 | 310 | if ((offset & 0x0400) == 0) |
| 311 | data &= i | |
| 311 | data &= iop | |
| 312 | 312 | if ((offset & 0x0800) == 0) |
| 313 | data &= i | |
| 313 | data &= iop | |
| 314 | 314 | if ((offset & 0x1000) == 0) |
| 315 | data &= i | |
| 315 | data &= iop | |
| 316 | 316 | if ((offset & 0x2000) == 0) |
| 317 | data &= i | |
| 317 | data &= iop | |
| 318 | 318 | if ((offset & 0x4000) == 0) |
| 319 | data &= i | |
| 319 | data &= iop | |
| 320 | 320 | if ((offset & 0x8000) == 0) |
| 321 | data &= i | |
| 321 | data &= iop | |
| 322 | 322 | |
| 323 | 323 | machine().device<cassette_image_device>(CASSETTE_TAG)->output(+1.0); |
| 324 | 324 |
| r15082 | r15083 | |
|---|---|---|
| 693 | 693 | |
| 694 | 694 | */ |
| 695 | 695 | |
| 696 | UINT8 data = i | |
| 696 | UINT8 data = iop | |
| 697 | 697 | |
| 698 | 698 | return data; |
| 699 | 699 | } |
| r15082 | r15083 | |
| 743 | 743 | UINT8 data = 0; |
| 744 | 744 | |
| 745 | 745 | // mouse buttons |
| 746 | data |= (i | |
| 746 | data |= (iop | |
| 747 | 747 | |
| 748 | 748 | // serial input |
| 749 | 749 | data |= m_si << 7; |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | int data = state->m_outa; |
| 47 | 47 | |
| 48 | 48 | if (state->m_outb & 0x01) |
| 49 | data |= | |
| 49 | data |= | |
| 50 | 50 | |
| 51 | 51 | if (state->m_outb & 0x02) |
| 52 | data |= | |
| 52 | data |= | |
| 53 | 53 | |
| 54 | 54 | if (state->m_outb & 0x04) |
| 55 | data |= | |
| 55 | data |= | |
| 56 | 56 | |
| 57 | 57 | if (state->m_outb & 0x08) |
| 58 | data |= | |
| 58 | data |= | |
| 59 | 59 | |
| 60 | 60 | if (state->m_outb & 0x10) |
| 61 | data |= | |
| 61 | data |= | |
| 62 | 62 | |
| 63 | 63 | if (state->m_outb & 0x20) |
| 64 | 64 | { |
| 65 | data |= | |
| 65 | data |= s | |
| 66 | 66 | |
| 67 | 67 | /* At Power Up we fake a 'C-CE' pressure */ |
| 68 | 68 | if (state->m_power) |
| r15082 | r15083 | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | if (state->m_outa & 0x01) |
| 73 | data |= | |
| 73 | data |= | |
| 74 | 74 | |
| 75 | 75 | if (state->m_outa & 0x02) |
| 76 | data |= | |
| 76 | data |= | |
| 77 | 77 | |
| 78 | 78 | if (state->m_outa & 0x04) |
| 79 | data |= | |
| 79 | data |= | |
| 80 | 80 | |
| 81 | 81 | if (state->m_outa & 0x08) |
| 82 | data |= | |
| 82 | data |= | |
| 83 | 83 | |
| 84 | 84 | if (state->m_outa & 0x10) |
| 85 | data |= | |
| 85 | data |= | |
| 86 | 86 | |
| 87 | 87 | if (state->m_outa & 0x20) |
| 88 | data |= | |
| 88 | data |= | |
| 89 | 89 | |
| 90 | 90 | if (state->m_outa & 0x40) |
| 91 | data |= | |
| 91 | data |= | |
| 92 | 92 | |
| 93 | 93 | return data; |
| 94 | 94 | } |
| r15082 | r15083 | |
| 98 | 98 | pc1401_state *state = device->machine().driver_data<pc1401_state>(); |
| 99 | 99 | int data=state->m_outb; |
| 100 | 100 | |
| 101 | if ( | |
| 101 | if (s | |
| 102 | 102 | data |= 0x01; |
| 103 | 103 | |
| 104 | 104 | return data; |
| r15082 | r15083 | |
| 106 | 106 | |
| 107 | 107 | int pc1401_brk(device_t *device) |
| 108 | 108 | { |
| 109 | return ( | |
| 109 | return ( | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | int pc1401_reset(device_t *device) |
| 113 | 113 | { |
| 114 | return ( | |
| 114 | return ( | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | MACHINE_START( pc1401 ) |
| r15082 | r15083 | |
|---|---|---|
| 1428 | 1428 | attotime new_time = machine().time(); |
| 1429 | 1429 | |
| 1430 | 1430 | { |
| 1431 | data = i | |
| 1431 | data = iop | |
| 1432 | 1432 | |
| 1433 | 1433 | { |
| 1434 | 1434 | delta = ((new_time - m_joy_time) * 256 * 1000).seconds; |
| 1435 | 1435 | |
| 1436 | if (input_port_read(*this, "gus_joy_1") < delta) data &= ~0x01; | |
| 1437 | if (input_port_read(*this, "gus_joy_2") < delta) data &= ~0x02; | |
| 1436 | if (ioport("gus_joy_1")->read() < delta) data &= ~0x01; | |
| 1437 | if (ioport("gus_joy_2")->read() < delta) data &= ~0x02; | |
| 1438 | 1438 | } |
| 1439 | 1439 | } |
| 1440 | 1440 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 585 | 585 | |
| 586 | 586 | for (i=0; i<7; i++) |
| 587 | 587 | { |
| 588 | keybuf = in | |
| 588 | keybuf = machine.root_device().ioport | |
| 589 | 589 | |
| 590 | 590 | if (keybuf != mac->m_key_matrix[i]) |
| 591 | 591 | { |
| r15082 | r15083 | |
| 856 | 856 | int x_needs_update = 0, y_needs_update = 0; |
| 857 | 857 | mac_state *mac = machine().driver_data<mac_state>(); |
| 858 | 858 | |
| 859 | new_mx = input_port_read(machine(), "MOUSE1"); | |
| 860 | new_my = input_port_read(machine(), "MOUSE2"); | |
| 859 | new_mx = ioport("MOUSE1")->read(); | |
| 860 | new_my = ioport("MOUSE2")->read(); | |
| 861 | 861 | |
| 862 | 862 | /* see if it moved in the x coord */ |
| 863 | 863 | if (new_mx != last_mx) |
| r15082 | r15083 | |
| 1380 | 1380 | val |= 0x20; |
| 1381 | 1381 | if (mac->m_mouse_bit_x) /* Mouse X2 */ |
| 1382 | 1382 | val |= 0x10; |
| 1383 | if (( | |
| 1383 | if (( | |
| 1384 | 1384 | val |= 0x08; |
| 1385 | 1385 | } |
| 1386 | 1386 | if (mac->m_rtc_data_out) |
| r15082 | r15083 | |
|---|---|---|
| 444 | 444 | |
| 445 | 445 | if (m_stb && m_row < 12) |
| 446 | 446 | { |
| 447 | data = i | |
| 447 | data = iop | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 156 | 156 | |
| 157 | 157 | for(i = 0; (i < /*4*/3) && (state->m_KeyQueueLen <= (KeyQueueSize-MaxKeyMessageLen)); i++) |
| 158 | 158 | { |
| 159 | keystate = in | |
| 159 | keystate = machine.root_device().ioport | |
| 160 | 160 | key_transitions = keystate ^ state->m_KeyStateSave[i]; |
| 161 | 161 | if(key_transitions) |
| 162 | 162 | { |
| r15082 | r15083 | |
| 229 | 229 | { |
| 230 | 230 | UINT8 status; |
| 231 | 231 | |
| 232 | status = (( | |
| 232 | status = (( | |
| 233 | 233 | LOG(("via_in_b: VIA port B (DIP switches, Video, Comm Rate) - status: 0x%2.2x\n", status)); |
| 234 | 234 | return status; |
| 235 | 235 | } |
| r15082 | r15083 | |
|---|---|---|
| 315 | 315 | |
| 316 | 316 | /* check click on border pieces */ |
| 317 | 317 | i=0; |
| 318 | port_input=in | |
| 318 | port_input=machine.root_device().ioport | |
| 319 | 319 | if (port_input) |
| 320 | 320 | { |
| 321 | 321 | i=get_first_bit(port_input)+6; |
| 322 | 322 | click_on_border_piece=TRUE; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | port_input=in | |
| 325 | port_input=machine.root_device().ioport | |
| 326 | 326 | if (port_input) |
| 327 | 327 | { |
| 328 | 328 | i=get_first_bit(port_input); |
| r15082 | r15083 | |
| 359 | 359 | |
| 360 | 360 | |
| 361 | 361 | /* check click on board */ |
| 362 | data = in | |
| 362 | data = machine. | |
| 363 | 363 | |
| 364 | 364 | if ((data != 0xff) && (!mouse_down) ) |
| 365 | 365 | { |
| r15082 | r15083 | |
| 406 | 406 | mouse_down = 0; |
| 407 | 407 | |
| 408 | 408 | /* check click on border - remove selected piece*/ |
| 409 | if (in | |
| 409 | if (machine.root_device().ioport("LINE10")->read_safe( | |
| 410 | 410 | { |
| 411 | 411 | if (mouse_hold.piece) |
| 412 | 412 | { |
| r15082 | r15083 | |
| 427 | 427 | if (data == 0xff) |
| 428 | 428 | { |
| 429 | 429 | |
| 430 | port_input=in | |
| 430 | port_input=machine.root_device().ioport | |
| 431 | 431 | if (port_input==0x01) |
| 432 | 432 | { |
| 433 | 433 | clear_board(); |
| r15082 | r15083 | |
|---|---|---|
| 530 | 530 | TIMER_DEVICE_CALLBACK( msx2_interrupt ) |
| 531 | 531 | { |
| 532 | 532 | msx_state *state = timer.machine().driver_data<msx_state>(); |
| 533 | state->m_v9938->set_sprite_limit(input_port_read(timer.machine(), "DSW") & 0x20); | |
| 534 | state->m_v9938->set_resolution(input_port_read(timer.machine(), "DSW") & 0x03); | |
| 533 | state->m_v9938->set_sprite_limit(timer.machine().root_device().ioport("DSW")->read() & 0x20); | |
| 534 | state->m_v9938->set_resolution(timer.machine().root_device().ioport("DSW")->read() & 0x03); | |
| 535 | 535 | state->m_v9938->interrupt(); |
| 536 | 536 | } |
| 537 | 537 | |
| r15082 | r15083 | |
| 542 | 542 | |
| 543 | 543 | for (i=0; i<2; i++) |
| 544 | 544 | { |
| 545 | state->m_mouse[i] = | |
| 545 | state->m_mouse[i] = s | |
| 546 | 546 | state->m_mouse_stat[i] = -1; |
| 547 | 547 | } |
| 548 | 548 | } |
| r15082 | r15083 | |
| 558 | 558 | |
| 559 | 559 | data = (m_cass->input() > 0.0038 ? 0x80 : 0); |
| 560 | 560 | |
| 561 | if ( (m_psg_b ^ i | |
| 561 | if ( (m_psg_b ^ iop | |
| 562 | 562 | { |
| 563 | 563 | /* game port 2 */ |
| 564 | UINT8 inp = i | |
| 564 | UINT8 inp = iop | |
| 565 | 565 | if ( !(inp & 0x80) ) |
| 566 | 566 | { |
| 567 | 567 | /* joystick */ |
| r15082 | r15083 | |
| 580 | 580 | else |
| 581 | 581 | { |
| 582 | 582 | /* game port 1 */ |
| 583 | UINT8 inp = i | |
| 583 | UINT8 inp = iop | |
| 584 | 584 | if ( !(inp & 0x80) ) |
| 585 | 585 | { |
| 586 | 586 | /* joystick */ |
| r15082 | r15083 | |
| 634 | 634 | |
| 635 | 635 | WRITE8_DEVICE_HANDLER( msx_printer_data_w ) |
| 636 | 636 | { |
| 637 | if ( | |
| 637 | if ( | |
| 638 | 638 | /* SIMPL emulation */ |
| 639 | 639 | dac_signed_data_w(device->machine().device("dac"), data); |
| 640 | 640 | else |
| r15082 | r15083 | |
| 645 | 645 | { |
| 646 | 646 | UINT8 result = 0xfd; |
| 647 | 647 | |
| 648 | if ( | |
| 648 | if ( | |
| 649 | 649 | return 0xff; |
| 650 | 650 | |
| 651 | 651 | result |= device->machine().device<centronics_device>("centronics")->busy_r() << 1; |
| r15082 | r15083 | |
| 798 | 798 | row = keylatch; |
| 799 | 799 | if (row <= 10) |
| 800 | 800 | { |
| 801 | data = i | |
| 801 | data = iop | |
| 802 | 802 | |
| 803 | 803 | if (BIT(row, 0)) |
| 804 | 804 | data >>= 8; |
| r15082 | r15083 | |
|---|---|---|
| 127 | 127 | UINT8 data = 0; |
| 128 | 128 | |
| 129 | 129 | data |= m_other_timer; |
| 130 | data |= i | |
| 130 | data |= iop | |
| 131 | 131 | data |= machine().primary_screen->hblank() << 7; |
| 132 | 132 | |
| 133 | 133 | LOG(1, "mz700_e008_r", ("%02X\n", data), machine()); |
| r15082 | r15083 | |
| 443 | 443 | |
| 444 | 444 | switch (key_line) |
| 445 | 445 | { |
| 446 | case 1 << 0: return input_port_read(device->machine(), "ROW0"); | |
| 447 | case 1 << 1: return input_port_read(device->machine(), "ROW1"); | |
| 448 | case 1 << 2: return input_port_read(device->machine(), "ROW2"); | |
| 449 | case 1 << 3: return input_port_read(device->machine(), "ROW3"); | |
| 450 | case 1 << 4: return input_port_read(device->machine(), "ROW4"); | |
| 451 | case 1 << 5: return input_port_read(device->machine(), "ROW5"); | |
| 452 | case 1 << 6: return input_port_read(device->machine(), "ROW6"); | |
| 453 | case 1 << 7: return input_port_read(device->machine(), "ROW7"); | |
| 454 | case 1 << 8: return input_port_read(device->machine(), "ROW8"); | |
| 455 | case 1 << 9: return input_port_read(device->machine(), "ROW9"); | |
| 446 | case 1 << 0: return device->machine().root_device().ioport("ROW0")->read(); | |
| 447 | case 1 << 1: return device->machine().root_device().ioport("ROW1")->read(); | |
| 448 | case 1 << 2: return device->machine().root_device().ioport("ROW2")->read(); | |
| 449 | case 1 << 3: return device->machine().root_device().ioport("ROW3")->read(); | |
| 450 | case 1 << 4: return device->machine().root_device().ioport("ROW4")->read(); | |
| 451 | case 1 << 5: return device->machine().root_device().ioport("ROW5")->read(); | |
| 452 | case 1 << 6: return device->machine().root_device().ioport("ROW6")->read(); | |
| 453 | case 1 << 7: return device->machine().root_device().ioport("ROW7")->read(); | |
| 454 | case 1 << 8: return device->machine().root_device().ioport("ROW8")->read(); | |
| 455 | case 1 << 9: return device->machine().root_device().ioport("ROW9")->read(); | |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | /* should never reach this */ |
| r15082 | r15083 | |
|---|---|---|
| 315 | 315 | if (! state->m_COPS_force_unplug) |
| 316 | 316 | for (i=0; i<8; i++) |
| 317 | 317 | { |
| 318 | keybuf = in | |
| 318 | keybuf = machine.root_device().ioport | |
| 319 | 319 | |
| 320 | 320 | if (keybuf != state->m_key_matrix[i]) |
| 321 | 321 | { /* if state has changed, find first bit which has changed */ |
| r15082 | r15083 | |
| 361 | 361 | return; /* ???? */ |
| 362 | 362 | #endif |
| 363 | 363 | |
| 364 | new_mx = input_port_read(machine, "MOUSE_X"); | |
| 365 | new_my = input_port_read(machine, "MOUSE_Y"); | |
| 364 | new_mx = machine.root_device().ioport("MOUSE_X")->read(); | |
| 365 | new_my = machine.root_device().ioport("MOUSE_Y")->read(); | |
| 366 | 366 | |
| 367 | 367 | /* see if it moved in the x coord */ |
| 368 | 368 | if (new_mx != state->m_last_mx) |
| r15082 | r15083 | |
|---|---|---|
| 1004 | 1004 | value |= 0x01; |
| 1005 | 1005 | break; |
| 1006 | 1006 | case JOYSTICK: |
| 1007 | input = i | |
| 1007 | input = iop | |
| 1008 | 1008 | switch (m_rotate) |
| 1009 | 1009 | { |
| 1010 | 1010 | case 1: |
| r15082 | r15083 | |
| 1036 | 1036 | value = input; |
| 1037 | 1037 | break; |
| 1038 | 1038 | case SWITCHES: |
| 1039 | value = i | |
| 1039 | value = iop | |
| 1040 | 1040 | break; |
| 1041 | 1041 | case RCART: |
| 1042 | 1042 | value = *(machine().root_device().memregion("user1")->base() + (m_suzy.high * m_granularity) + m_suzy.low); |
| r15082 | r15083 | |
|---|---|---|
| 71 | 71 | /* wipe out font RAM */ |
| 72 | 72 | memset(&ROM[0x0f400], 0xff, 0x0400); |
| 73 | 73 | |
| 74 | if( in | |
| 74 | if( machine.root_device().ioport | |
| 75 | 75 | { |
| 76 | 76 | logerror("cgenie floppy discs enabled\n"); |
| 77 | 77 | } |
| r15082 | r15083 | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /* copy DOS ROM, if enabled or wipe out that memory area */ |
| 84 | if( in | |
| 84 | if( machine.root_device().ioport | |
| 85 | 85 | { |
| 86 | if ( in | |
| 86 | if ( machine.root_device().ioport | |
| 87 | 87 | { |
| 88 | 88 | space->install_read_bank(0xc000, 0xdfff, "bank10"); |
| 89 | 89 | space->nop_write(0xc000, 0xdfff); |
| r15082 | r15083 | |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /* copy EXT ROM, if enabled or wipe out that memory area */ |
| 108 | if( in | |
| 108 | if( machine.root_device().ioport | |
| 109 | 109 | { |
| 110 | 110 | space->install_rom(0xe000, 0xefff, 0); // mess 0135u3 need to check |
| 111 | 111 | logerror("cgenie EXT enabled\n"); |
| r15082 | r15083 | |
| 282 | 282 | /* comparator value */ |
| 283 | 283 | state->m_psg_b_inp = 0x00; |
| 284 | 284 | |
| 285 | if( | |
| 285 | if( | |
| 286 | 286 | state->m_psg_b_inp |= 0x80; |
| 287 | 287 | |
| 288 | if( | |
| 288 | if( | |
| 289 | 289 | state->m_psg_b_inp |= 0x40; |
| 290 | 290 | |
| 291 | if( | |
| 291 | if( | |
| 292 | 292 | state->m_psg_b_inp |= 0x20; |
| 293 | 293 | |
| 294 | if( | |
| 294 | if( s | |
| 295 | 295 | state->m_psg_b_inp |= 0x10; |
| 296 | 296 | } |
| 297 | 297 | else |
| r15082 | r15083 | |
| 300 | 300 | state->m_psg_b_inp = 0xFF; |
| 301 | 301 | |
| 302 | 302 | if( !(state->m_psg_a_out & 0x01) ) |
| 303 | state->m_psg_b_inp &= ~ | |
| 303 | state->m_psg_b_inp &= ~ | |
| 304 | 304 | |
| 305 | 305 | if( !(state->m_psg_a_out & 0x02) ) |
| 306 | state->m_psg_b_inp &= ~ | |
| 306 | state->m_psg_b_inp &= ~ | |
| 307 | 307 | |
| 308 | 308 | if( !(state->m_psg_a_out & 0x04) ) |
| 309 | state->m_psg_b_inp &= ~ | |
| 309 | state->m_psg_b_inp &= ~ | |
| 310 | 310 | |
| 311 | 311 | if( !(state->m_psg_a_out & 0x08) ) |
| 312 | state->m_psg_b_inp &= ~ | |
| 312 | state->m_psg_b_inp &= ~ | |
| 313 | 313 | |
| 314 | 314 | if( !(state->m_psg_a_out & 0x10) ) |
| 315 | state->m_psg_b_inp &= ~ | |
| 315 | state->m_psg_b_inp &= ~ | |
| 316 | 316 | |
| 317 | 317 | if( !(state->m_psg_a_out & 0x20) ) |
| 318 | state->m_psg_b_inp &= ~ | |
| 318 | state->m_psg_b_inp &= ~ | |
| 319 | 319 | } |
| 320 | 320 | return state->m_psg_b_inp; |
| 321 | 321 | } |
| r15082 | r15083 | |
| 336 | 336 | { |
| 337 | 337 | device_t *fdc = space->machine().device("wd179x"); |
| 338 | 338 | /* If the floppy isn't emulated, return 0 */ |
| 339 | if( ( | |
| 339 | if( ( | |
| 340 | 340 | return 0; |
| 341 | 341 | return wd17xx_status_r(fdc, offset); |
| 342 | 342 | } |
| r15082 | r15083 | |
| 345 | 345 | { |
| 346 | 346 | device_t *fdc = space->machine().device("wd179x"); |
| 347 | 347 | /* If the floppy isn't emulated, return 0xff */ |
| 348 | if( ( | |
| 348 | if( ( | |
| 349 | 349 | return 0xff; |
| 350 | 350 | return wd17xx_track_r(fdc, offset); |
| 351 | 351 | } |
| r15082 | r15083 | |
| 354 | 354 | { |
| 355 | 355 | device_t *fdc = space->machine().device("wd179x"); |
| 356 | 356 | /* If the floppy isn't emulated, return 0xff */ |
| 357 | if( ( | |
| 357 | if( ( | |
| 358 | 358 | return 0xff; |
| 359 | 359 | return wd17xx_sector_r(fdc, offset); |
| 360 | 360 | } |
| r15082 | r15083 | |
| 363 | 363 | { |
| 364 | 364 | device_t *fdc = space->machine().device("wd179x"); |
| 365 | 365 | /* If the floppy isn't emulated, return 0xff */ |
| 366 | if( ( | |
| 366 | if( ( | |
| 367 | 367 | return 0xff; |
| 368 | 368 | return wd17xx_data_r(fdc, offset); |
| 369 | 369 | } |
| r15082 | r15083 | |
| 372 | 372 | { |
| 373 | 373 | device_t *fdc = space->machine().device("wd179x"); |
| 374 | 374 | /* If the floppy isn't emulated, return immediately */ |
| 375 | if( ( | |
| 375 | if( ( | |
| 376 | 376 | return; |
| 377 | 377 | wd17xx_command_w(fdc, offset, data); |
| 378 | 378 | } |
| r15082 | r15083 | |
| 381 | 381 | { |
| 382 | 382 | device_t *fdc = space->machine().device("wd179x"); |
| 383 | 383 | /* If the floppy isn't emulated, ignore the write */ |
| 384 | if( ( | |
| 384 | if( ( | |
| 385 | 385 | return; |
| 386 | 386 | wd17xx_track_w(fdc, offset, data); |
| 387 | 387 | } |
| r15082 | r15083 | |
| 390 | 390 | { |
| 391 | 391 | device_t *fdc = space->machine().device("wd179x"); |
| 392 | 392 | /* If the floppy isn't emulated, ignore the write */ |
| 393 | if( ( | |
| 393 | if( ( | |
| 394 | 394 | return; |
| 395 | 395 | wd17xx_sector_w(fdc, offset, data); |
| 396 | 396 | } |
| r15082 | r15083 | |
| 399 | 399 | { |
| 400 | 400 | device_t *fdc = space->machine().device("wd179x"); |
| 401 | 401 | /* If the floppy isn't emulated, ignore the write */ |
| 402 | if( ( | |
| 402 | if( ( | |
| 403 | 403 | return; |
| 404 | 404 | wd17xx_data_w(fdc, offset, data); |
| 405 | 405 | } |
| r15082 | r15083 | |
| 427 | 427 | { |
| 428 | 428 | cgenie_state *drvstate = device->machine().driver_data<cgenie_state>(); |
| 429 | 429 | /* if disc hardware is not enabled, do not cause an int */ |
| 430 | if (!( | |
| 430 | if (!( d | |
| 431 | 431 | return; |
| 432 | 432 | |
| 433 | 433 | if (state) |
| r15082 | r15083 | |
| 490 | 490 | int result = 0; |
| 491 | 491 | |
| 492 | 492 | if( offset & 0x01 ) |
| 493 | result |= | |
| 493 | result |= | |
| 494 | 494 | |
| 495 | 495 | if( offset & 0x02 ) |
| 496 | result |= | |
| 496 | result |= | |
| 497 | 497 | |
| 498 | 498 | if( offset & 0x04 ) |
| 499 | result |= | |
| 499 | result |= | |
| 500 | 500 | |
| 501 | 501 | if( offset & 0x08 ) |
| 502 | result |= | |
| 502 | result |= | |
| 503 | 503 | |
| 504 | 504 | if( offset & 0x10 ) |
| 505 | result |= | |
| 505 | result |= | |
| 506 | 506 | |
| 507 | 507 | if( offset & 0x20 ) |
| 508 | result |= | |
| 508 | result |= | |
| 509 | 509 | |
| 510 | 510 | if( offset & 0x40 ) |
| 511 | result |= | |
| 511 | result |= | |
| 512 | 512 | |
| 513 | 513 | if( offset & 0x80 ) |
| 514 | result |= | |
| 514 | result |= | |
| 515 | 515 | |
| 516 | 516 | return result; |
| 517 | 517 | } |
| r15082 | r15083 | |
| 596 | 596 | INTERRUPT_GEN( cgenie_frame_interrupt ) |
| 597 | 597 | { |
| 598 | 598 | cgenie_state *state = device->machine().driver_data<cgenie_state>(); |
| 599 | if( state->m_tv_mode != ( | |
| 599 | if( state->m_tv_mode != ( | |
| 600 | 600 | { |
| 601 | state->m_tv_mode = | |
| 601 | state->m_tv_mode = s | |
| 602 | 602 | /* force setting of background color */ |
| 603 | 603 | state->m_port_ff ^= FF_BGD0; |
| 604 | 604 | cgenie_port_ff_w(device->machine().device("maincpu")->memory().space(AS_PROGRAM), 0, state->m_port_ff ^ FF_BGD0); |
| r15082 | r15083 | |
|---|---|---|
| 22 | 22 | for (i = 0; i < 8; i++) |
| 23 | 23 | { |
| 24 | 24 | sprintf(kbdrow,"X%d",i); |
| 25 | if (!BIT(state->m_keylatch, i)) data &= | |
| 25 | if (!BIT(state->m_keylatch, i)) data &= s | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | return data; |
| r15082 | r15083 | |
| 51 | 51 | state->m_cass->change_state(CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR); |
| 52 | 52 | |
| 53 | 53 | /* does user want to hear the sound? */ |
| 54 | if BIT(in | |
| 54 | if BIT(machine.root_device().ioport | |
| 55 | 55 | state->m_cass->change_state(CASSETTE_SPEAKER_ENABLED,CASSETTE_MASK_SPEAKER); |
| 56 | 56 | else |
| 57 | 57 | state->m_cass->change_state(CASSETTE_SPEAKER_MUTED,CASSETTE_MASK_SPEAKER); |
| r15082 | r15083 | |
| 108 | 108 | { |
| 109 | 109 | UINT8 go_fast = 0; |
| 110 | 110 | super80_state *state = machine.driver_data<super80_state>(); |
| 111 | if ( (!BIT(state->m_shared, 2)) | (!BIT(in | |
| 111 | if ( (!BIT(state->m_shared, 2)) | (!BIT(machine.root_device().ioport | |
| 112 | 112 | go_fast++; |
| 113 | 113 | |
| 114 | 114 | /* code to slow down computer to 1 MHz by halting cpu on every second frame */ |
| r15082 | r15083 | |
| 160 | 160 | |
| 161 | 161 | READ8_MEMBER( super80_state::super80_f2_r ) |
| 162 | 162 | { |
| 163 | UINT8 data = i | |
| 163 | UINT8 data = iop | |
| 164 | 164 | data |= m_cass_data[2]; // bit 0 = output of U1, bit 1 = MDS cass state, bit 2 = current wave_state |
| 165 | 165 | data |= 0x08; // bit 3 - not used |
| 166 | 166 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 27 | 27 | struct pc_turbo_info *ti = (struct pc_turbo_info *) ptr; |
| 28 | 28 | int val; |
| 29 | 29 | |
| 30 | val = in | |
| 30 | val = machine.root_device().ioport | |
| 31 | 31 | |
| 32 | 32 | if (val != ti->cur_val) |
| 33 | 33 | { |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | DIRECT_UPDATE_MEMBER(lviv_state::lviv_directoverride) |
| 50 | 50 | { |
| 51 | if (i | |
| 51 | if (iop | |
| 52 | 52 | machine().scheduler().timer_set(attotime::from_usec(10), FUNC(lviv_reset)); |
| 53 | 53 | return address; |
| 54 | 54 | } |
| r15082 | r15083 | |
| 69 | 69 | UINT8 data = state->m_ppi_port_outputs[0][2] & 0x0f; |
| 70 | 70 | if (device->machine().device<cassette_image_device>(CASSETTE_TAG)->input() > 0.038) |
| 71 | 71 | data |= 0x10; |
| 72 | if (state->m_ppi_port_outputs[0][0] & | |
| 72 | if (state->m_ppi_port_outputs[0][0] & s | |
| 73 | 73 | data |= 0x80; |
| 74 | 74 | return data; |
| 75 | 75 | } |
| r15082 | r15083 | |
| 106 | 106 | static READ8_DEVICE_HANDLER ( lviv_ppi_1_portb_r ) /* keyboard reading */ |
| 107 | 107 | { |
| 108 | 108 | lviv_state *state = device->machine().driver_data<lviv_state>(); |
| 109 | return ((state->m_ppi_port_outputs[1][0] & 0x01) ? 0xff : input_port_read(device->machine(), "KEY0")) & | |
| 110 | ((state->m_ppi_port_outputs[1][0] & 0x02) ? 0xff : input_port_read(device->machine(), "KEY1")) & | |
| 111 | ((state->m_ppi_port_outputs[1][0] & 0x04) ? 0xff : input_port_read(device->machine(), "KEY2")) & | |
| 112 | ((state->m_ppi_port_outputs[1][0] & 0x08) ? 0xff : input_port_read(device->machine(), "KEY3")) & | |
| 113 | ((state->m_ppi_port_outputs[1][0] & 0x10) ? 0xff : input_port_read(device->machine(), "KEY4")) & | |
| 114 | ((state->m_ppi_port_outputs[1][0] & 0x20) ? 0xff : input_port_read(device->machine(), "KEY5")) & | |
| 115 | ((state->m_ppi_port_outputs[1][0] & 0x40) ? 0xff : input_port_read(device->machine(), "KEY6")) & | |
| 116 | ((state->m_ppi_port_outputs[1][0] & 0x80) ? 0xff : input_port_read(device->machine(), "KEY7")); | |
| 109 | return ((state->m_ppi_port_outputs[1][0] & 0x01) ? 0xff : device->machine().root_device().ioport("KEY0")->read()) & | |
| 110 | ((state->m_ppi_port_outputs[1][0] & 0x02) ? 0xff : device->machine().root_device().ioport("KEY1")->read()) & | |
| 111 | ((state->m_ppi_port_outputs[1][0] & 0x04) ? 0xff : device->machine().root_device().ioport("KEY2")->read()) & | |
| 112 | ((state->m_ppi_port_outputs[1][0] & 0x08) ? 0xff : device->machine().root_device().ioport("KEY3")->read()) & | |
| 113 | ((state->m_ppi_port_outputs[1][0] & 0x10) ? 0xff : device->machine().root_device().ioport("KEY4")->read()) & | |
| 114 | ((state->m_ppi_port_outputs[1][0] & 0x20) ? 0xff : device->machine().root_device().ioport("KEY5")->read()) & | |
| 115 | ((state->m_ppi_port_outputs[1][0] & 0x40) ? 0xff : device->machine().root_device().ioport("KEY6")->read()) & | |
| 116 | ((state->m_ppi_port_outputs[1][0] & 0x80) ? 0xff : state->ioport("KEY7")->read()); | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | static READ8_DEVICE_HANDLER ( lviv_ppi_1_portc_r ) /* keyboard reading */ |
| 120 | 120 | { |
| 121 | 121 | lviv_state *state = device->machine().driver_data<lviv_state>(); |
| 122 | return ((state->m_ppi_port_outputs[1][2] & 0x01) ? 0xff : input_port_read(device->machine(), "KEY8")) & | |
| 123 | ((state->m_ppi_port_outputs[1][2] & 0x02) ? 0xff : input_port_read(device->machine(), "KEY9" )) & | |
| 124 | ((state->m_ppi_port_outputs[1][2] & 0x04) ? 0xff : input_port_read(device->machine(), "KEY10")) & | |
| 125 | ((state->m_ppi_port_outputs[1][2] & 0x08) ? 0xff : input_port_read(device->machine(), "KEY11")); | |
| 122 | return ((state->m_ppi_port_outputs[1][2] & 0x01) ? 0xff : device->machine().root_device().ioport("KEY8")->read()) & | |
| 123 | ((state->m_ppi_port_outputs[1][2] & 0x02) ? 0xff : device->machine().root_device().ioport("KEY9" )->read()) & | |
| 124 | ((state->m_ppi_port_outputs[1][2] & 0x04) ? 0xff : device->machine().root_device().ioport("KEY10")->read()) & | |
| 125 | ((state->m_ppi_port_outputs[1][2] & 0x08) ? 0xff : state->ioport("KEY11")->read()); | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | static WRITE8_DEVICE_HANDLER ( lviv_ppi_1_porta_w ) /* kayboard scaning */ |
| r15082 | r15083 | |
|---|---|---|
| 261 | 261 | |
| 262 | 262 | // First read shift, control and graph |
| 263 | 263 | |
| 264 | state->m_keyboard.key_special = in | |
| 264 | state->m_keyboard.key_special = machine.root_device().ioport | |
| 265 | 265 | |
| 266 | 266 | for(row=0; row<MBC55X_KEYROWS; row++) |
| 267 | 267 | { |
| 268 | keyrow = in | |
| 268 | keyrow = machine.root_device().ioport | |
| 269 | 269 | |
| 270 | 270 | for(mask=0x80, bitno=7;mask>0;mask=mask>>1, bitno-=1) |
| 271 | 271 | { |
| r15082 | r15083 | |
|---|---|---|
| 61 | 61 | UINT8 data=state->m_outa; |
| 62 | 62 | |
| 63 | 63 | if (state->m_asic[3] & 0x01) |
| 64 | data |= | |
| 64 | data |= | |
| 65 | 65 | |
| 66 | 66 | if (state->m_asic[3] & 0x02) |
| 67 | data |= | |
| 67 | data |= | |
| 68 | 68 | |
| 69 | 69 | if (state->m_asic[3] & 0x04) |
| 70 | data |= | |
| 70 | data |= | |
| 71 | 71 | |
| 72 | 72 | if (state->m_asic[3] & 0x08) |
| 73 | data |= | |
| 73 | data |= | |
| 74 | 74 | |
| 75 | 75 | if (state->m_asic[3] & 0x10) |
| 76 | data |= | |
| 76 | data |= | |
| 77 | 77 | |
| 78 | 78 | if (state->m_asic[3] & 0x20) |
| 79 | data |= | |
| 79 | data |= | |
| 80 | 80 | |
| 81 | 81 | if (state->m_asic[3] & 0x40) |
| 82 | data |= | |
| 82 | data |= | |
| 83 | 83 | |
| 84 | 84 | if (state->m_outa & 0x01) |
| 85 | 85 | { |
| 86 | data |= | |
| 86 | data |= s | |
| 87 | 87 | |
| 88 | 88 | /* At Power Up we fake a 'C-CE' pressure */ |
| 89 | 89 | if (state->m_power) |
| r15082 | r15083 | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (state->m_outa & 0x02) |
| 94 | data |= | |
| 94 | data |= | |
| 95 | 95 | |
| 96 | 96 | if (state->m_outa & 0x04) |
| 97 | data |= | |
| 97 | data |= | |
| 98 | 98 | |
| 99 | 99 | if (state->m_outa & 0x08) |
| 100 | data |= | |
| 100 | data |= | |
| 101 | 101 | |
| 102 | 102 | if (state->m_outa & 0x10) |
| 103 | data |= | |
| 103 | data |= | |
| 104 | 104 | |
| 105 | 105 | if (state->m_outa & 0x20) |
| 106 | data |= | |
| 106 | data |= | |
| 107 | 107 | |
| 108 | 108 | if (state->m_outa & 0x40) |
| 109 | data |= | |
| 109 | data |= | |
| 110 | 110 | |
| 111 | 111 | return data; |
| 112 | 112 | } |
| r15082 | r15083 | |
| 117 | 117 | pc1403_state *state = machine.driver_data<pc140_state>(); |
| 118 | 118 | int data = state->m_outb; |
| 119 | 119 | |
| 120 | if (in | |
| 120 | if (machine.root_device().ioport | |
| 121 | 121 | data |= 1; |
| 122 | 122 | |
| 123 | 123 | return data; |
| r15082 | r15083 | |
| 134 | 134 | |
| 135 | 135 | int pc1403_brk(device_t *device) |
| 136 | 136 | { |
| 137 | return ( | |
| 137 | return ( | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | int pc1403_reset(device_t *device) |
| 141 | 141 | { |
| 142 | return ( | |
| 142 | return ( | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | MACHINE_START( pc1403 ) |
| r15082 | r15083 | |
|---|---|---|
| 293 | 293 | /* First we check the RESET and CLEAR SCREEN pushbutton switches. */ |
| 294 | 294 | |
| 295 | 295 | /* The RESET switch resets the CPU and the 6820 PIA. */ |
| 296 | if (in | |
| 296 | if (machine.root_device().ioport | |
| 297 | 297 | { |
| 298 | 298 | if (!state->m_reset_flag) { |
| 299 | 299 | state->m_reset_flag = 1; |
| r15082 | r15083 | |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /* The CLEAR SCREEN switch clears the video hardware. */ |
| 312 | if (in | |
| 312 | if (machine.root_device().ioport | |
| 313 | 313 | { |
| 314 | 314 | if (!state->m_vh_clrscrn_pressed) |
| 315 | 315 | { |
| r15082 | r15083 | |
| 334 | 334 | /* The keyboard strobe line should always be low when a scan starts. */ |
| 335 | 335 | pia->ca1_w(0); |
| 336 | 336 | |
| 337 | shiftkeys = input_port_read(machine, "KEY4") & 0x0003; | |
| 338 | ctrlkeys = input_port_read(machine, "KEY4") & 0x000c; | |
| 337 | shiftkeys = machine.root_device().ioport("KEY4")->read() & 0x0003; | |
| 338 | ctrlkeys = machine.root_device().ioport("KEY4")->read() & 0x000c; | |
| 339 | 339 | |
| 340 | 340 | for (port = 0; port < 4; port++) |
| 341 | 341 | { |
| 342 | 342 | UINT32 portval, newkeys; |
| 343 | 343 | |
| 344 | portval = in | |
| 344 | portval = machine.root_device().ioport | |
| 345 | 345 | newkeys = portval & ~(state->m_kbd_last_scan[port]); |
| 346 | 346 | |
| 347 | 347 | if (newkeys) |
| r15082 | r15083 | |
|---|---|---|
| 204 | 204 | |
| 205 | 205 | UINT8 data = 0xff; |
| 206 | 206 | |
| 207 | if (!(m_key_sense & 0x01)) data &= input_port_read(machine(), "ROW0"); | |
| 208 | if (!(m_key_sense & 0x02)) data &= input_port_read(machine(), "ROW1"); | |
| 209 | if (!(m_key_sense & 0x04)) data &= input_port_read(machine(), "ROW2"); | |
| 210 | if (!(m_key_sense & 0x08)) data &= input_port_read(machine(), "ROW3"); | |
| 211 | if (!(m_key_sense & 0x10)) data &= input_port_read(machine(), "ROW4"); | |
| 212 | if (!(m_key_sense & 0x20)) data &= input_port_read(machine(), "ROW5"); | |
| 213 | if (!(m_key_sense & 0x40)) data &= input_port_read(machine(), "ROW6"); | |
| 214 | if (!(m_key_sense & 0x80)) data &= input_port_read(machine(), "ROW7"); | |
| 207 | if (!(m_key_sense & 0x01)) data &= ioport("ROW0")->read(); | |
| 208 | if (!(m_key_sense & 0x02)) data &= ioport("ROW1")->read(); | |
| 209 | if (!(m_key_sense & 0x04)) data &= ioport("ROW2")->read(); | |
| 210 | if (!(m_key_sense & 0x08)) data &= ioport("ROW3")->read(); | |
| 211 | if (!(m_key_sense & 0x10)) data &= ioport("ROW4")->read(); | |
| 212 | if (!(m_key_sense & 0x20)) data &= ioport("ROW5")->read(); | |
| 213 | if (!(m_key_sense & 0x40)) data &= ioport("ROW6")->read(); | |
| 214 | if (!(m_key_sense & 0x80)) data &= ioport("ROW7")->read(); | |
| 215 | 215 | |
| 216 | 216 | return data; |
| 217 | 217 | } |
| r15082 | r15083 | |
| 223 | 223 | READ8_MEMBER(mtx_state::mtx_key_hi_r) |
| 224 | 224 | { |
| 225 | 225 | |
| 226 | UINT8 data = i | |
| 226 | UINT8 data = iop | |
| 227 | 227 | |
| 228 | if (!(m_key_sense & 0x01)) data &= input_port_read(machine(), "ROW0") >> 8; | |
| 229 | if (!(m_key_sense & 0x02)) data &= input_port_read(machine(), "ROW1") >> 8; | |
| 230 | if (!(m_key_sense & 0x04)) data &= input_port_read(machine(), "ROW2") >> 8; | |
| 231 | if (!(m_key_sense & 0x08)) data &= input_port_read(machine(), "ROW3") >> 8; | |
| 232 | if (!(m_key_sense & 0x10)) data &= input_port_read(machine(), "ROW4") >> 8; | |
| 233 | if (!(m_key_sense & 0x20)) data &= input_port_read(machine(), "ROW5") >> 8; | |
| 234 | if (!(m_key_sense & 0x40)) data &= input_port_read(machine(), "ROW6") >> 8; | |
| 235 | if (!(m_key_sense & 0x80)) data &= input_port_read(machine(), "ROW7") >> 8; | |
| 228 | if (!(m_key_sense & 0x01)) data &= ioport("ROW0")->read() >> 8; | |
| 229 | if (!(m_key_sense & 0x02)) data &= ioport("ROW1")->read() >> 8; | |
| 230 | if (!(m_key_sense & 0x04)) data &= ioport("ROW2")->read() >> 8; | |
| 231 | if (!(m_key_sense & 0x08)) data &= ioport("ROW3")->read() >> 8; | |
| 232 | if (!(m_key_sense & 0x10)) data &= ioport("ROW4")->read() >> 8; | |
| 233 | if (!(m_key_sense & 0x20)) data &= ioport("ROW5")->read() >> 8; | |
| 234 | if (!(m_key_sense & 0x40)) data &= ioport("ROW6")->read() >> 8; | |
| 235 | if (!(m_key_sense & 0x80)) data &= ioport("ROW7")->read() >> 8; | |
| 236 | 236 | |
| 237 | 237 | return data; |
| 238 | 238 | } |
| r15082 | r15083 | |
|---|---|---|
| 221 | 221 | UINT8 data = 0x04; |
| 222 | 222 | |
| 223 | 223 | // single/double sided drive |
| 224 | UINT8 sw1 = i | |
| 224 | UINT8 sw1 = iop | |
| 225 | 225 | int ds0 = m_sel0 ? BIT(sw1, 0) : 1; |
| 226 | 226 | int ds1 = m_sel1 ? BIT(sw1, 1) : 1; |
| 227 | 227 | data |= !(ds0 & ds1); |
| r15082 | r15083 | |
| 460 | 460 | |
| 461 | 461 | void luxor_55_10828_device::abcbus_cs(UINT8 data) |
| 462 | 462 | { |
| 463 | UINT8 address = 0x2c | BIT(i | |
| 463 | UINT8 address = 0x2c | BIT(iop | |
| 464 | 464 | |
| 465 | 465 | m_cs = (data == address); |
| 466 | 466 | } |
| r15082 | r15083 | |
|---|---|---|
| 303 | 303 | |
| 304 | 304 | switch (m_y) |
| 305 | 305 | { |
| 306 | case 0: data &= input_port_read(*this, "Y0"); break; | |
| 307 | case 1: data &= input_port_read(*this, "Y1"); break; | |
| 308 | case 2: data &= input_port_read(*this, "Y2"); break; | |
| 309 | case 3: data &= input_port_read(*this, "Y3"); break; | |
| 310 | case 4: data &= input_port_read(*this, "Y4"); break; | |
| 311 | case 5: data &= input_port_read(*this, "Y5"); break; | |
| 312 | case 6: data &= input_port_read(*this, "Y6"); break; | |
| 313 | case 7: data &= input_port_read(*this, "Y7"); break; | |
| 314 | case 8: data &= input_port_read(*this, "Y8"); break; | |
| 315 | case 9: data &= input_port_read(*this, "Y9"); break; | |
| 316 | case 0xa: data &= input_port_read(*this, "YA"); break; | |
| 317 | case 0xb: data &= input_port_read(*this, "YB"); break; | |
| 318 | case 0xc: data &= input_port_read(*this, "YC"); break; | |
| 306 | case 0: data &= ioport("Y0")->read(); break; | |
| 307 | case 1: data &= ioport("Y1")->read(); break; | |
| 308 | case 2: data &= ioport("Y2")->read(); break; | |
| 309 | case 3: data &= ioport("Y3")->read(); break; | |
| 310 | case 4: data &= ioport("Y4")->read(); break; | |
| 311 | case 5: data &= ioport("Y5")->read(); break; | |
| 312 | case 6: data &= ioport("Y6")->read(); break; | |
| 313 | case 7: data &= ioport("Y7")->read(); break; | |
| 314 | case 8: data &= ioport("Y8")->read(); break; | |
| 315 | case 9: data &= ioport("Y9")->read(); break; | |
| 316 | case 0xa: data &= ioport("YA")->read(); break; | |
| 317 | case 0xb: data &= ioport("YB")->read(); break; | |
| 318 | case 0xc: data &= ioport("YC")->read(); break; | |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | READ8_MEMBER( special_state::specialist_8255_porta_r ) |
| 27 | 27 | { |
| 28 | if (input_port_read(machine(), "LINE0")!=0xff) return 0xfe; | |
| 29 | if (input_port_read(machine(), "LINE1")!=0xff) return 0xfd; | |
| 30 | if (input_port_read(machine(), "LINE2")!=0xff) return 0xfb; | |
| 31 | if (input_port_read(machine(), "LINE3")!=0xff) return 0xf7; | |
| 32 | if (input_port_read(machine(), "LINE4")!=0xff) return 0xef; | |
| 33 | if (input_port_read(machine(), "LINE5")!=0xff) return 0xdf; | |
| 34 | if (input_port_read(machine(), "LINE6")!=0xff) return 0xbf; | |
| 35 | if (input_port_read(machine(), "LINE7")!=0xff) return 0x7f; | |
| 28 | if (ioport("LINE0")->read()!=0xff) return 0xfe; | |
| 29 | if (ioport("LINE1")->read()!=0xff) return 0xfd; | |
| 30 | if (ioport("LINE2")->read()!=0xff) return 0xfb; | |
| 31 | if (ioport("LINE3")->read()!=0xff) return 0xf7; | |
| 32 | if (ioport("LINE4")->read()!=0xff) return 0xef; | |
| 33 | if (ioport("LINE5")->read()!=0xff) return 0xdf; | |
| 34 | if (ioport("LINE6")->read()!=0xff) return 0xbf; | |
| 35 | if (ioport("LINE7")->read()!=0xff) return 0x7f; | |
| 36 | 36 | return 0xff; |
| 37 | 37 | } |
| 38 | 38 | |
| r15082 | r15083 | |
| 41 | 41 | UINT8 dat = 0; |
| 42 | 42 | double level; |
| 43 | 43 | |
| 44 | if ((m_specialist_8255_porta & 0x01)==0) dat ^= (input_port_read(machine(), "LINE0") ^ 0xff); | |
| 45 | if ((m_specialist_8255_porta & 0x02)==0) dat ^= (input_port_read(machine(), "LINE1") ^ 0xff); | |
| 46 | if ((m_specialist_8255_porta & 0x04)==0) dat ^= (input_port_read(machine(), "LINE2") ^ 0xff); | |
| 47 | if ((m_specialist_8255_porta & 0x08)==0) dat ^= (input_port_read(machine(), "LINE3") ^ 0xff); | |
| 48 | if ((m_specialist_8255_porta & 0x10)==0) dat ^= (input_port_read(machine(), "LINE4") ^ 0xff); | |
| 49 | if ((m_specialist_8255_porta & 0x20)==0) dat ^= (input_port_read(machine(), "LINE5") ^ 0xff); | |
| 50 | if ((m_specialist_8255_porta & 0x40)==0) dat ^= (input_port_read(machine(), "LINE6") ^ 0xff); | |
| 51 | if ((m_specialist_8255_porta & 0x80)==0) dat ^= (input_port_read(machine(), "LINE7") ^ 0xff); | |
| 52 | if ((m_specialist_8255_portc & 0x01)==0) dat ^= (input_port_read(machine(), "LINE8") ^ 0xff); | |
| 53 | if ((m_specialist_8255_portc & 0x02)==0) dat ^= (input_port_read(machine(), "LINE9") ^ 0xff); | |
| 54 | if ((m_specialist_8255_portc & 0x04)==0) dat ^= (input_port_read(machine(), "LINE10") ^ 0xff); | |
| 55 | if ((m_specialist_8255_portc & 0x08)==0) dat ^= (input_port_read(machine(), "LINE11") ^ 0xff); | |
| 44 | if ((m_specialist_8255_porta & 0x01)==0) dat ^= (ioport("LINE0")->read() ^ 0xff); | |
| 45 | if ((m_specialist_8255_porta & 0x02)==0) dat ^= (ioport("LINE1")->read() ^ 0xff); | |
| 46 | if ((m_specialist_8255_porta & 0x04)==0) dat ^= (ioport("LINE2")->read() ^ 0xff); | |
| 47 | if ((m_specialist_8255_porta & 0x08)==0) dat ^= (ioport("LINE3")->read() ^ 0xff); | |
| 48 | if ((m_specialist_8255_porta & 0x10)==0) dat ^= (ioport("LINE4")->read() ^ 0xff); | |
| 49 | if ((m_specialist_8255_porta & 0x20)==0) dat ^= (ioport("LINE5")->read() ^ 0xff); | |
| 50 | if ((m_specialist_8255_porta & 0x40)==0) dat ^= (ioport("LINE6")->read() ^ 0xff); | |
| 51 | if ((m_specialist_8255_porta & 0x80)==0) dat ^= (ioport("LINE7")->read() ^ 0xff); | |
| 52 | if ((m_specialist_8255_portc & 0x01)==0) dat ^= (ioport("LINE8")->read() ^ 0xff); | |
| 53 | if ((m_specialist_8255_portc & 0x02)==0) dat ^= (ioport("LINE9")->read() ^ 0xff); | |
| 54 | if ((m_specialist_8255_portc & 0x04)==0) dat ^= (ioport("LINE10")->read() ^ 0xff); | |
| 55 | if ((m_specialist_8255_portc & 0x08)==0) dat ^= (ioport("LINE11")->read() ^ 0xff); | |
| 56 | 56 | |
| 57 | 57 | dat = (dat << 2) ^0xff; |
| 58 | if (i | |
| 58 | if (iop | |
| 59 | 59 | |
| 60 | 60 | level = m_cass->input(); |
| 61 | 61 | if (level >= 0) |
| r15082 | r15083 | |
| 66 | 66 | |
| 67 | 67 | READ8_MEMBER( special_state::specialist_8255_portc_r ) |
| 68 | 68 | { |
| 69 | if (input_port_read(machine(), "LINE8")!=0xff) return 0x0e; | |
| 70 | if (input_port_read(machine(), "LINE9")!=0xff) return 0x0d; | |
| 71 | if (input_port_read(machine(), "LINE10")!=0xff) return 0x0b; | |
| 72 | if (input_port_read(machine(), "LINE11")!=0xff) return 0x07; | |
| 69 | if (ioport("LINE8")->read()!=0xff) return 0x0e; | |
| 70 | if (ioport("LINE9")->read()!=0xff) return 0x0d; | |
| 71 | if (ioport("LINE10")->read()!=0xff) return 0x0b; | |
| 72 | if (ioport("LINE11")->read()!=0xff) return 0x07; | |
| 73 | 73 | return 0x0f; |
| 74 | 74 | } |
| 75 | 75 |
| r15082 | r15083 | |
|---|---|---|
| 35 | 35 | unsigned char jupiter_repeat, jupiter_byte, loop; |
| 36 | 36 | int done=0, jupiter_index=0x2000; |
| 37 | 37 | |
| 38 | if ( | |
| 38 | if ( | |
| 39 | 39 | { |
| 40 | 40 | image.seterror(IMAGE_ERROR_INVALIDIMAGE, "At least 16KB RAM expansion required"); |
| 41 | 41 | image.message("At least 16KB RAM expansion required"); |
| r15082 | r15083 | |
|---|---|---|
| 2162 | 2162 | |
| 2163 | 2163 | for(row=0;row<NIMBUS_KEYROWS;row++) |
| 2164 | 2164 | { |
| 2165 | keyrow=in | |
| 2165 | keyrow=machine.root_device().ioport | |
| 2166 | 2166 | |
| 2167 | 2167 | for(mask=0x80, bitno=7;mask>0;mask=mask>>1, bitno-=1) |
| 2168 | 2168 | { |
| r15082 | r15083 | |
| 2846 | 2846 | _mouse_joy_state *state = &drvstate->m_nimbus_mouse; |
| 2847 | 2847 | |
| 2848 | 2848 | |
| 2849 | state->m_reg0a4 = input_port_read(machine, MOUSE_BUTTON_TAG) | 0xC0; | |
| 2850 | x = input_port_read(machine, MOUSEX_TAG); | |
| 2851 | y = input_port_read(machine, MOUSEY_TAG); | |
| 2849 | state->m_reg0a4 = machine.root_device().ioport(MOUSE_BUTTON_TAG)->read() | 0xC0; | |
| 2850 | x = machine.root_device().ioport(MOUSEX_TAG)->read(); | |
| 2851 | y = machine.root_device().ioport(MOUSEY_TAG)->read(); | |
| 2852 | 2852 | |
| 2853 | 2853 | UINT8 mxa; |
| 2854 | 2854 | UINT8 mxb; |
| r15082 | r15083 | |
| 2985 | 2985 | //int pc=cpu_get_pc(machine().device(MAINCPU_TAG)); |
| 2986 | 2986 | _mouse_joy_state *state = &m_nimbus_mouse; |
| 2987 | 2987 | |
| 2988 | if (i | |
| 2988 | if (iop | |
| 2989 | 2989 | { |
| 2990 | 2990 | result=state->m_reg0a4; |
| 2991 | 2991 | //logerror("mouse_js_r: pc=%05X, result=%02X\n",pc,result); |
| 2992 | 2992 | } |
| 2993 | 2993 | else |
| 2994 | 2994 | { |
| 2995 | result=i | |
| 2995 | result=iop | |
| 2996 | 2996 | } |
| 2997 | 2997 | |
| 2998 | 2998 | return result; |
| r15082 | r15083 | |
|---|---|---|
| 387 | 387 | for (UINT8 i = 0; i < 15; i++) |
| 388 | 388 | { |
| 389 | 389 | if (!BIT(offset, i)) |
| 390 | data &= ~i | |
| 390 | data &= ~iop | |
| 391 | 391 | } |
| 392 | 392 | if (data != 0xFFFF) |
| 393 | 393 | { |
| r15082 | r15083 | |
| 423 | 423 | // keyboard |
| 424 | 424 | case H8S_IO_PORT1 : |
| 425 | 425 | { |
| 426 | if (!BIT(i | |
| 426 | if (!BIT(iop | |
| 427 | 427 | data |= (1 << 3); // "esc" key |
| 428 | 428 | } |
| 429 | 429 | break; |
| r15082 | r15083 | |
| 469 | 469 | // keyboard |
| 470 | 470 | case H8S_IO_PORT1 : |
| 471 | 471 | { |
| 472 | if (!BIT(i | |
| 472 | if (!BIT(iop | |
| 473 | 473 | data |= (1 << 3); // "esc" key |
| 474 | 474 | } |
| 475 | 475 | break; |
| r15082 | r15083 | |
|---|---|---|
| 205 | 205 | "LINE8", "LINE9", "LINEA", "LINEB", "LINEC", "LINED", "LINEE", "LINEF" |
| 206 | 206 | }; |
| 207 | 207 | |
| 208 | return ( | |
| 208 | return ( | |
| 209 | 209 | } |
| 210 | 210 | static WRITE8_DEVICE_HANDLER (pp01_8255_portb_w ) |
| 211 | 211 | { |
| r15082 | r15083 | |
|---|---|---|
| 1565 | 1565 | |
| 1566 | 1566 | if (offset == 0) |
| 1567 | 1567 | { |
| 1568 | m_joystick_x1_time = space.machine().time().as_double() + x_calibration * input_port_read(space.machine(), "joystick_1_x"); | |
| 1569 | m_joystick_y1_time = space.machine().time().as_double() + y_calibration * input_port_read(space.machine(), "joystick_1_y"); | |
| 1570 | m_joystick_x2_time = space.machine().time().as_double() + x_calibration * input_port_read(space.machine(), "joystick_2_x"); | |
| 1571 | m_joystick_y2_time = space.machine().time().as_double() + y_calibration * input_port_read(space.machine(), "joystick_2_y"); | |
| 1568 | m_joystick_x1_time = space.machine().time().as_double() + x_calibration * space.machine().root_device().ioport("joystick_1_x")->read(); | |
| 1569 | m_joystick_y1_time = space.machine().time().as_double() + y_calibration * space.machine().root_device().ioport("joystick_1_y")->read(); | |
| 1570 | m_joystick_x2_time = space.machine().time().as_double() + x_calibration * space.machine().root_device().ioport("joystick_2_x")->read(); | |
| 1571 | m_joystick_y2_time = space.machine().time().as_double() + y_calibration * space.machine().root_device().ioport("joystick_2_y")->read(); | |
| 1572 | 1572 | } |
| 1573 | 1573 | } |
| 1574 | 1574 | return 0; |
| r15082 | r15083 | |
| 1832 | 1832 | |
| 1833 | 1833 | int apple2_pressed_specialkey(running_machine &machine, UINT8 key) |
| 1834 | 1834 | { |
| 1835 | return (input_port_read(machine, "keyb_special") & key) | |
| 1836 | || (input_port_read_safe(machine, "joystick_buttons", 0x00) & key); | |
| 1835 | return (machine.root_device().ioport("keyb_special")->read() & key) | |
| 1836 | || (machine.root_device().ioport("joystick_buttons")->read_safe(0x00) & key); | |
| 1837 | 1837 | } |
| r15082 | r15083 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | UINT8 c64_4cga_device::c64_pb_r(address_space &space, offs_t offset) |
| 89 | 89 | { |
| 90 | UINT8 data = i | |
| 90 | UINT8 data = iop | |
| 91 | 91 | |
| 92 | 92 | if (m_port) |
| 93 | 93 | { |
| 94 | data &= i | |
| 94 | data &= iop | |
| 95 | 95 | } |
| 96 | 96 | else |
| 97 | 97 | { |
| 98 | data &= i | |
| 98 | data &= iop | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 787 | 787 | |
| 788 | 788 | void grip_device::device_reset() |
| 789 | 789 | { |
| 790 | m_base = i | |
| 790 | m_base = iop | |
| 791 | 791 | } |
| 792 | 792 | |
| 793 | 793 | |
| r15082 | r15083 | |
| 871 | 871 | int js0 = 0, js1 = 0; |
| 872 | 872 | |
| 873 | 873 | // JS0 |
| 874 | switch (i | |
| 874 | switch (iop | |
| 875 | 875 | { |
| 876 | 876 | case 0: js0 = 0; break; |
| 877 | 877 | case 1: js0 = 1; break; |
| r15082 | r15083 | |
| 883 | 883 | data |= js0 << 4; |
| 884 | 884 | |
| 885 | 885 | // JS1 |
| 886 | switch (i | |
| 886 | switch (iop | |
| 887 | 887 | { |
| 888 | 888 | case 0: js1 = 0; break; |
| 889 | 889 | case 1: js1 = 1; break; |
| r15082 | r15083 | |
| 1084 | 1084 | int table = 0, row, col; |
| 1085 | 1085 | int keydata = -1; |
| 1086 | 1086 | |
| 1087 | if (i | |
| 1087 | if (iop | |
| 1088 | 1088 | { |
| 1089 | 1089 | // shift, upper case |
| 1090 | 1090 | table = 1; |
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | if (i | |
| 1093 | if (iop | |
| 1094 | 1094 | { |
| 1095 | 1095 | // ctrl |
| 1096 | 1096 | table = 2; |
| r15082 | r15083 | |
| 1099 | 1099 | // scan keyboard |
| 1100 | 1100 | for (row = 0; row < 9; row++) |
| 1101 | 1101 | { |
| 1102 | UINT8 data = i | |
| 1102 | UINT8 data = iop | |
| 1103 | 1103 | |
| 1104 | 1104 | for (col = 0; col < 8; col++) |
| 1105 | 1105 | { |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | if (state->m_outb & 0x01) |
| 34 | 34 | { |
| 35 | data |= in | |
| 35 | data |= machine.root_device().ioport | |
| 36 | 36 | |
| 37 | 37 | /* At Power Up we fake a 'CL' pressure */ |
| 38 | 38 | if (state->m_power) |
| r15082 | r15083 | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | if (state->m_outb & 0x02) |
| 43 | data |= in | |
| 43 | data |= machine.root_device().ioport | |
| 44 | 44 | |
| 45 | 45 | if (state->m_outb & 0x04) |
| 46 | data |= in | |
| 46 | data |= machine.root_device().ioport | |
| 47 | 47 | |
| 48 | 48 | if (state->m_outa & 0x01) |
| 49 | data |= in | |
| 49 | data |= machine.root_device().ioport | |
| 50 | 50 | |
| 51 | 51 | if (state->m_outa & 0x02) |
| 52 | data |= in | |
| 52 | data |= machine.root_device().ioport | |
| 53 | 53 | |
| 54 | 54 | if (state->m_outa & 0x04) |
| 55 | data |= in | |
| 55 | data |= machine.root_device().ioport | |
| 56 | 56 | |
| 57 | 57 | if (state->m_outa & 0x08) |
| 58 | data |= in | |
| 58 | data |= machine.root_device().ioport | |
| 59 | 59 | |
| 60 | 60 | if (state->m_outa & 0x10) |
| 61 | data |= in | |
| 61 | data |= machine.root_device().ioport | |
| 62 | 62 | |
| 63 | 63 | if (state->m_outa & 0x20) |
| 64 | data |= in | |
| 64 | data |= machine.root_device().ioport | |
| 65 | 65 | |
| 66 | 66 | if (state->m_outa & 0x40) |
| 67 | data |= in | |
| 67 | data |= machine.root_device().ioport | |
| 68 | 68 | |
| 69 | 69 | return data; |
| 70 | 70 | } |
| r15082 | r15083 | |
| 75 | 75 | int data = state->m_outb; |
| 76 | 76 | |
| 77 | 77 | if (state->m_outb & 0x08) |
| 78 | data |= ( | |
| 78 | data |= (s | |
| 79 | 79 | |
| 80 | 80 | return data; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | int pc1251_brk(device_t *device) |
| 84 | 84 | { |
| 85 | return ( | |
| 85 | return ( | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | int pc1251_reset(device_t *device) |
| 89 | 89 | { |
| 90 | return ( | |
| 90 | return ( | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | MACHINE_START( pc1251 ) |
| r15082 | r15083 | |
|---|---|---|
| 28 | 28 | UINT8 line = 0; |
| 29 | 29 | if (offset & 0x100) line=8; |
| 30 | 30 | |
| 31 | if (offset & 0x0001) retVal|=i | |
| 31 | if (offset & 0x0001) retVal|=iop | |
| 32 | 32 | line++; |
| 33 | if (offset & 0x0002) retVal|=i | |
| 33 | if (offset & 0x0002) retVal|=iop | |
| 34 | 34 | line++; |
| 35 | if (offset & 0x0004) retVal|=i | |
| 35 | if (offset & 0x0004) retVal|=iop | |
| 36 | 36 | line++; |
| 37 | if (offset & 0x0008) retVal|=i | |
| 37 | if (offset & 0x0008) retVal|=iop | |
| 38 | 38 | line++; |
| 39 | if (offset & 0x0010) retVal|=i | |
| 39 | if (offset & 0x0010) retVal|=iop | |
| 40 | 40 | line++; |
| 41 | if (offset & 0x0020) retVal|=i | |
| 41 | if (offset & 0x0020) retVal|=iop | |
| 42 | 42 | line++; |
| 43 | if (offset & 0x0040) retVal|=i | |
| 43 | if (offset & 0x0040) retVal|=iop | |
| 44 | 44 | line++; |
| 45 | if (offset & 0x0080) retVal|=i | |
| 45 | if (offset & 0x0080) retVal|=iop | |
| 46 | 46 | line++; |
| 47 | 47 | |
| 48 | 48 | return retVal; |
| r15082 | r15083 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "machine/nvram.h" |
| 13 | 13 | |
| 14 | #define CONTRAST (in | |
| 14 | #define CONTRAST (machine.root_device().ioport | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | class pc1401_state : public driver_device |
| r15082 | r15083 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "machine/nvram.h" |
| 13 | 13 | |
| 14 | #define PC1350_CONTRAST (in | |
| 14 | #define PC1350_CONTRAST (machine.root_device().ioport | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | class pc1350_state : public driver_device |
| r15082 | r15083 | |
|---|---|---|
| 191 | 191 | |
| 192 | 192 | typedef struct |
| 193 | 193 | { |
| 194 | const input_port_config *m_input[2][2]; | |
| 195 | const input_port_config *m_buttons; | |
| 194 | ioport_port *m_input[2][2]; | |
| 195 | ioport_port *m_buttons; | |
| 196 | 196 | |
| 197 | UINT8 input(int joystick, int axis) const { return m_input[joystick][axis] ? input_port_read_direct(m_input[joystick][axis]) : 0x00; } | |
| 198 | UINT8 buttons(void) const { return m_buttons ? input_port_read_direct(m_buttons) : 0x00; } | |
| 197 | UINT8 input(int joystick, int axis) const { return m_input[joystick][axis] ? m_input[joystick][axis]->read() : 0x00; } | |
| 198 | UINT8 buttons(void) const { return m_buttons ? m_buttons->read() : 0x00; } | |
| 199 | 199 | } analog_input_t; |
| 200 | 200 | |
| 201 | 201 | void analog_port_start(analog_input_t *analog, const char *rx_tag, const char *ry_tag, const char *lx_tag, const char *ly_tag, const char *buttons_tag); |
| r15082 | r15083 | |
| 233 | 233 | static offs_t dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options); |
| 234 | 234 | |
| 235 | 235 | /* input ports */ |
| 236 | const input_port_config *m_keyboard[7]; | |
| 237 | const input_port_config *m_joystick_type_control; | |
| 238 | const input_port_config *m_joystick_hires_control; | |
| 236 | ioport_port *m_keyboard[7]; | |
| 237 | ioport_port *m_joystick_type_control; | |
| 238 | ioport_port *m_joystick_hires_control; | |
| 239 | 239 | analog_input_t m_joystick; |
| 240 | 240 | analog_input_t m_rat_mouse; |
| 241 | 241 | analog_input_t m_diecom_lightgun; |
| r15082 | r15083 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "machine/nvram.h" |
| 13 | 13 | |
| 14 | #define CONTRAST (in | |
| 14 | #define CONTRAST (machine.root_device().ioport | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | class pc1403_state : public driver_device |
| r15082 | r15083 | |
|---|---|---|
| 8 | 8 | #define AMSTR_PC_H_ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | #define PC200_MODE (in | |
| 11 | #define PC200_MODE (machine.root_device().ioport | |
| 12 | 12 | #define PC200_MDA 0x30 |
| 13 | 13 | |
| 14 | 14 |
| r15082 | r15083 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #include "machine/nvram.h" |
| 13 | 13 | |
| 14 | #define PC1251_CONTRAST (in | |
| 14 | #define PC1251_CONTRAST (machine.root_device().ioport | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | class pc1251_state : public driver_device |
| r15082 | r15083 | |
|---|---|---|
| 591 | 591 | /* read current key state */ |
| 592 | 592 | for (i = 0; i < 6; i++) |
| 593 | 593 | { |
| 594 | key_buf[i] = | |
| 594 | key_buf[i] = | |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | /* parse modifier keys */ |
| r15082 | r15083 | |
|---|---|---|
| 251 | 251 | visarea.min_x = 0; |
| 252 | 252 | visarea.min_y = 0; |
| 253 | 253 | view = 0; |
| 254 | mac->m_rbv_montype = in | |
| 254 | mac->m_rbv_montype = machine. | |
| 255 | 255 | switch (mac->m_rbv_montype) |
| 256 | 256 | { |
| 257 | 257 | case 1: // 15" portrait display |
| r15082 | r15083 | |
| 308 | 308 | visarea.min_x = 0; |
| 309 | 309 | visarea.min_y = 0; |
| 310 | 310 | |
| 311 | mac->m_rbv_montype = in | |
| 311 | mac->m_rbv_montype = machine. | |
| 312 | 312 | switch (mac->m_rbv_montype) |
| 313 | 313 | { |
| 314 | 314 | case 1: // 15" portrait display |
| r15082 | r15083 | |
|---|---|---|
| 215 | 215 | UINT8 port = (offs >> 7) & 7; |
| 216 | 216 | UINT8 bit = (offs >> 4) & 7; |
| 217 | 217 | sprintf(kbdrow,"X%d",port); |
| 218 | UINT8 data = (i | |
| 218 | UINT8 data = (iop | |
| 219 | 219 | |
| 220 | 220 | if ((data | m_is_premium) == 0) |
| 221 | 221 | { |
| 222 | UINT8 extra = i | |
| 222 | UINT8 extra = iop | |
| 223 | 223 | |
| 224 | 224 | if( extra & 0x01 ) /* extra: cursor up */ |
| 225 | 225 | { |
| r15082 | r15083 | |
|---|---|---|
| 400 | 400 | |
| 401 | 401 | offs_t pc1512_state::get_char_rom_offset() |
| 402 | 402 | { |
| 403 | return ((i | |
| 403 | return ((iop | |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | void pc1512_state::draw_alpha(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | //------------------------------------------------- |
| 59 | 59 | // device_start - device-specific startup |
| 60 | 60 | //------------------------------------------------- |
| 61 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 61 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 62 | 62 | |
| 63 | 63 | void isa8_svga_cirrus_device::device_start() |
| 64 | 64 | { |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | if (state->m_disk_expansion && state->m_pcb_id == NO_BOARD) |
| 51 | 51 | { |
| 52 | 52 | // latch this input so it doesn't go at warp speed |
| 53 | if (( | |
| 53 | if (( | |
| 54 | 54 | { |
| 55 | 55 | state->m_last_frame_flip = 1; |
| 56 | 56 | state->m_fds_current_side++; |
| r15082 | r15083 | |
| 63 | 63 | popmessage("Disk set to side %d", state->m_fds_current_side); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | if (!( | |
| 66 | if (!( | |
| 67 | 67 | state->m_last_frame_flip = 0; |
| 68 | 68 | } |
| 69 | 69 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 144 | 144 | |
| 145 | 145 | |
| 146 | 146 | /* Dipswitch for font selection */ |
| 147 | #define CGA_FONT (i | |
| 147 | #define CGA_FONT (iop | |
| 148 | 148 | |
| 149 | 149 | /* Dipswitch for monitor selection */ |
| 150 | #define CGA_MONITOR (i | |
| 150 | #define CGA_MONITOR (iop | |
| 151 | 151 | #define CGA_MONITOR_RGB 0x00 /* Colour RGB */ |
| 152 | 152 | #define CGA_MONITOR_MONO 0x04 /* Greyscale RGB */ |
| 153 | 153 | #define CGA_MONITOR_COMPOSITE 0x08 /* Colour composite */ |
| r15082 | r15083 | |
| 157 | 157 | |
| 158 | 158 | /* Dipswitch for chipset selection */ |
| 159 | 159 | /* TODO: Get rid of this; these should be handled by separate classes */ |
| 160 | #define CGA_CHIPSET (i | |
| 160 | #define CGA_CHIPSET (iop | |
| 161 | 161 | #define CGA_CHIPSET_IBM 0x00 /* Original IBM CGA */ |
| 162 | 162 | #define CGA_CHIPSET_PC1512 0x20 /* PC1512 CGA subset */ |
| 163 | 163 | #define CGA_CHIPSET_PC200 0x40 /* PC200 in CGA mode */ |
| r15082 | r15083 | |
|---|---|---|
| 980 | 980 | /* Feature Read */ |
| 981 | 981 | case 2: |
| 982 | 982 | { |
| 983 | UINT8 dips = i | |
| 983 | UINT8 dips = iop | |
| 984 | 984 | |
| 985 | 985 | data = ( data & 0x0f ); |
| 986 | 986 | data |= ( ( m_feature_control & 0x03 ) << 5 ); |
| r15082 | r15083 | |
|---|---|---|
| 128 | 128 | */ |
| 129 | 129 | |
| 130 | 130 | // switch sense |
| 131 | data |= BIT(i | |
| 131 | data |= BIT(iop | |
| 132 | 132 | break; |
| 133 | 133 | |
| 134 | 134 | case 0x15: // Sequencer Data Register |
| r15082 | r15083 | |
|---|---|---|
| 316 | 316 | switch (offset) |
| 317 | 317 | { |
| 318 | 318 | case 0xff: data=m_charline|0xf0;break; |
| 319 | case 0x100: data=input_port_read(machine(), "controller1_col1");break; | |
| 320 | case 0x101: data=input_port_read(machine(), "controller1_col2");break; | |
| 321 | case 0x102: data=input_port_read(machine(), "controller1_col3");break; | |
| 322 | case 0x103: data=input_port_read(machine(), "controller1_extra");break; | |
| 323 | case 0x104: data=input_port_read(machine(), "controller2_col1");break; | |
| 324 | case 0x105: data=input_port_read(machine(), "controller2_col2");break; | |
| 325 | case 0x106: data=input_port_read(machine(), "controller2_col3");break; | |
| 326 | case 0x107: data=input_port_read(machine(), "controller2_extra");break; | |
| 327 | case 0x108: data=input_port_read(machine(), "panel");break; | |
| 319 | case 0x100: data=ioport("controller1_col1")->read();break; | |
| 320 | case 0x101: data=ioport("controller1_col2")->read();break; | |
| 321 | case 0x102: data=ioport("controller1_col3")->read();break; | |
| 322 | case 0x103: data=ioport("controller1_extra")->read();break; | |
| 323 | case 0x104: data=ioport("controller2_col1")->read();break; | |
| 324 | case 0x105: data=ioport("controller2_col2")->read();break; | |
| 325 | case 0x106: data=ioport("controller2_col3")->read();break; | |
| 326 | case 0x107: data=ioport("controller2_extra")->read();break; | |
| 327 | case 0x108: data=ioport("panel")->read();break; | |
| 328 | 328 | #if 0 |
| 329 | 329 | case 0x1fe: |
| 330 | 330 | if (m_ad_select) |
| 331 | data=i | |
| 331 | data=iop | |
| 332 | 332 | else |
| 333 | data=i | |
| 333 | data=iop | |
| 334 | 334 | break; |
| 335 | 335 | case 0x1ff: |
| 336 | 336 | if (m_ad_select) |
| 337 | data=i | |
| 337 | data=iop | |
| 338 | 338 | else |
| 339 | data=i | |
| 339 | data=iop | |
| 340 | 340 | break; |
| 341 | 341 | #else |
| 342 | 342 | case 0x1fe: |
| 343 | 343 | data = 0x80; |
| 344 | 344 | if (m_ad_select) |
| 345 | 345 | { |
| 346 | if (input_port_read(machine(), "joysticks")&0x10) data=0; | |
| 347 | if (input_port_read(machine(), "joysticks")&0x20) data=0xff; | |
| 346 | if (ioport("joysticks")->read()&0x10) data=0; | |
| 347 | if (ioport("joysticks")->read()&0x20) data=0xff; | |
| 348 | 348 | } |
| 349 | 349 | else |
| 350 | 350 | { |
| 351 | if (input_port_read(machine(), "joysticks")&0x40) data=0xff; | |
| 352 | if (input_port_read(machine(), "joysticks")&0x80) data=0; | |
| 351 | if (ioport("joysticks")->read()&0x40) data=0xff; | |
| 352 | if (ioport("joysticks")->read()&0x80) data=0; | |
| 353 | 353 | } |
| 354 | 354 | break; |
| 355 | 355 | case 0x1ff: |
| 356 | 356 | data = 0x6f; // 0x7f too big for alien invaders (move right) |
| 357 | 357 | if (m_ad_select) |
| 358 | 358 | { |
| 359 | if (input_port_read(machine(), "joysticks")&0x1) data=0; | |
| 360 | if (input_port_read(machine(), "joysticks")&0x2) data=0xff; | |
| 359 | if (ioport("joysticks")->read()&0x1) data=0; | |
| 360 | if (ioport("joysticks")->read()&0x2) data=0xff; | |
| 361 | 361 | } |
| 362 | 362 | else |
| 363 | 363 | { |
| 364 | if (input_port_read(machine(), "joysticks")&0x4) data=0xff; | |
| 365 | if (input_port_read(machine(), "joysticks")&0x8) data=0; | |
| 364 | if (ioport("joysticks")->read()&0x4) data=0xff; | |
| 365 | if (ioport("joysticks")->read()&0x8) data=0; | |
| 366 | 366 | } |
| 367 | 367 | break; |
| 368 | 368 | #endif |
| r15082 | r15083 | |
|---|---|---|
| 54 | 54 | { |
| 55 | 55 | screen_device *screen = machine.first_screen(); |
| 56 | 56 | const rectangle &visarea = screen->visible_area(); |
| 57 | UINT8 p = in | |
| 57 | UINT8 p = machine.root_device().ioport | |
| 58 | 58 | int new_w, new_h, changed = 0; |
| 59 | 59 | |
| 60 | 60 | switch ( p & 3 ) |
| r15082 | r15083 | |
| 135 | 135 | |
| 136 | 136 | static void thom_get_lightpen_pos( running_machine &machine, int*x, int* y ) |
| 137 | 137 | { |
| 138 | *x = input_port_read(machine, "lightpen_x"); | |
| 139 | *y = input_port_read(machine, "lightpen_y"); | |
| 138 | *x = machine.root_device().ioport("lightpen_x")->read(); | |
| 139 | *y = machine.root_device().ioport("lightpen_y")->read(); | |
| 140 | 140 | |
| 141 | 141 | if ( *x < 0 ) |
| 142 | 142 | *x = 0; |
| r15082 | r15083 | |
|---|---|---|
| 57 | 57 | //------------------------------------------------- |
| 58 | 58 | // device_start - device-specific startup |
| 59 | 59 | //------------------------------------------------- |
| 60 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 60 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 61 | 61 | |
| 62 | 62 | void isa8_svga_et4k_device::device_start() |
| 63 | 63 | { |
| r15082 | r15083 | |
|---|---|---|
| 195 | 195 | state->m_scanline_timer->adjust(hsync_time); |
| 196 | 196 | if(scan != 0) |
| 197 | 197 | { |
| 198 | if((in | |
| 198 | if((machine.root_device().ioport | |
| 199 | 199 | { |
| 200 | 200 | machine.primary_screen->update_partial(scan); |
| 201 | 201 | } |
| r15082 | r15083 | |
| 210 | 210 | state->m_scanline_timer->adjust(hsync_time); |
| 211 | 211 | if(scan != 0) |
| 212 | 212 | { |
| 213 | if((in | |
| 213 | if((machine.root_device().ioport | |
| 214 | 214 | { |
| 215 | 215 | machine.primary_screen->update_partial(scan); |
| 216 | 216 | } |
| r15082 | r15083 | |
| 249 | 249 | state->m_scanline_timer->adjust(hsync_time); |
| 250 | 250 | if(scan != 0) |
| 251 | 251 | { |
| 252 | if((in | |
| 252 | if((machine.root_device().ioport | |
| 253 | 253 | { |
| 254 | 254 | machine.primary_screen->update_partial(scan); |
| 255 | 255 | } |
| r15082 | r15083 | |
|---|---|---|
| 77 | 77 | { |
| 78 | 78 | super80_state *state = screen.machine().driver_data<super80_state>(); |
| 79 | 79 | /* if we chose another palette or colour mode, enable it */ |
| 80 | UINT8 chosen_palette = ( | |
| 80 | UINT8 chosen_palette = ( | |
| 81 | 81 | |
| 82 | 82 | if (chosen_palette != state->m_current_palette) // any changes? |
| 83 | 83 | { |
| r15082 | r15083 | |
| 99 | 99 | |
| 100 | 100 | output_set_value("cass_led",(state->m_shared & 0x20) ? 1 : 0); |
| 101 | 101 | |
| 102 | if ((state->m_shared & 4) || (!( | |
| 102 | if ((state->m_shared & 4) || (!( | |
| 103 | 103 | screen_on++; |
| 104 | 104 | |
| 105 | 105 | for (y = 0; y < 16; y++) |
| r15082 | r15083 | |
| 141 | 141 | |
| 142 | 142 | output_set_value("cass_led",(state->m_shared & 0x20) ? 1 : 0); |
| 143 | 143 | |
| 144 | if ((state->m_shared & 4) || (!( | |
| 144 | if ((state->m_shared & 4) || (!( | |
| 145 | 145 | screen_on++; |
| 146 | 146 | |
| 147 | 147 | for (y = 0; y < 16; y++) |
| r15082 | r15083 | |
| 183 | 183 | |
| 184 | 184 | output_set_value("cass_led",(state->m_shared & 0x20) ? 1 : 0); |
| 185 | 185 | |
| 186 | if ((state->m_shared & 4) || (!( | |
| 186 | if ((state->m_shared & 4) || (!( | |
| 187 | 187 | screen_on++; |
| 188 | 188 | |
| 189 | 189 | for (y = 0; y < 16; y++) |
| r15082 | r15083 | |
| 221 | 221 | super80_state *state = screen.machine().driver_data<super80_state>(); |
| 222 | 222 | UINT8 y,ra,chr=32,gfx,screen_on=0; |
| 223 | 223 | UINT16 sy=0,ma=state->m_vidpg,x; |
| 224 | UINT8 col, bg=0, fg=0, options= | |
| 224 | UINT8 col, bg=0, fg=0, options= | |
| 225 | 225 | UINT8 *RAM = state->memregion("maincpu")->base(); |
| 226 | 226 | |
| 227 | 227 | /* get selected character generator */ |
| r15082 | r15083 | |
| 392 | 392 | state->m_framecnt++; |
| 393 | 393 | state->m_speed = state->m_mc6845_reg[10]&0x20, state->m_flash = state->m_mc6845_reg[10]&0x40; // cursor modes |
| 394 | 394 | state->m_cursor = (state->m_mc6845_reg[14]<<8) | state->m_mc6845_reg[15]; // get cursor position |
| 395 | state->m_s_options= | |
| 395 | state->m_s_options= | |
| 396 | 396 | output_set_value("cass_led",(state->m_shared & 0x20) ? 1 : 0); |
| 397 | 397 | state->m_6845->screen_update(screen, bitmap, cliprect); |
| 398 | 398 | return 0; |
| r15082 | r15083 | |
|---|---|---|
| 212 | 212 | |
| 213 | 213 | // artifacting config |
| 214 | 214 | void setup_config(device_t *device); |
| 215 | void poll_config(void) { m_artifacting = m_config ? | |
| 215 | void poll_config(void) { m_artifacting = (m_config!=NULL) ? | |
| 216 | 216 | |
| 217 | 217 | // artifacting application |
| 218 | 218 | template<int xscale> |
| r15082 | r15083 | |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | private: |
| 255 | const input_port_config *m_config; | |
| 256 | input_port_value m_artifacting; | |
| 257 | input_port_value m_saved_artifacting; | |
| 255 | ioport_port *m_config; | |
| 256 | ioport_value m_artifacting; | |
| 257 | ioport_value m_saved_artifacting; | |
| 258 | 258 | pixel_t m_saved_c0, m_saved_c1; |
| 259 | 259 | pixel_t m_expanded_colors[128]; |
| 260 | 260 |
| r15082 | r15083 | |
|---|---|---|
| 13 | 13 | #include "video/cgapal.h" |
| 14 | 14 | |
| 15 | 15 | |
| 16 | #define CGA_MONITOR ( | |
| 16 | #define CGA_MONITOR ( | |
| 17 | 17 | #define CGA_MONITOR_RGB 0x00 /* Colour RGB */ |
| 18 | 18 | #define CGA_MONITOR_MONO 0x04 /* Greyscale RGB */ |
| 19 | 19 | #define CGA_MONITOR_COMPOSITE 0x08 /* Colour composite */ |
| r15082 | r15083 | |
| 507 | 507 | data = mc6845->register_r(*space, offset); |
| 508 | 508 | break; |
| 509 | 509 | case 10: |
| 510 | data = ( | |
| 510 | data = ( | |
| 511 | 511 | aga.mda_status ^= 0x01; |
| 512 | 512 | break; |
| 513 | 513 | /* 12, 13, 14 are the LPT1 ports */ |
| r15082 | r15083 | |
| 884 | 884 | case 0xe: |
| 885 | 885 | // 0x20 low cga |
| 886 | 886 | // 0x10 low special |
| 887 | result = | |
| 887 | result = | |
| 888 | 888 | break; |
| 889 | 889 | |
| 890 | 890 | default: |
| r15082 | r15083 | |
|---|---|---|
| 206 | 206 | ssystem3_draw_led(bitmap, state->m_lcd.data[3]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3'); |
| 207 | 207 | ssystem3_draw_led(bitmap, state->m_lcd.data[4]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4'); |
| 208 | 208 | |
| 209 | if ( | |
| 209 | if ( | |
| 210 | 210 | static const int lcd_signs_on[]={ |
| 211 | 211 | 0, // empty |
| 212 | 212 | 1, // bauer |
| r15082 | r15083 | |
|---|---|---|
| 58 | 58 | //------------------------------------------------- |
| 59 | 59 | // device_start - device-specific startup |
| 60 | 60 | //------------------------------------------------- |
| 61 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 61 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return | |
| 62 | 62 | |
| 63 | 63 | void isa8_svga_s3_device::device_start() |
| 64 | 64 | { |
| r15082 | r15083 | |
|---|---|---|
| 116 | 116 | |
| 117 | 117 | #ifndef ANALOG_HACK |
| 118 | 118 | case 0xcc: |
| 119 | if (!activecpu_get_reg(S2650_FO)) data=input_port_read(machine(), "JOY1_X"); | |
| 120 | else data=input_port_read(machine(), "JOY1_Y"); | |
| 119 | if (!activecpu_get_reg(S2650_FO)) data=ioport("JOY1_X")->read(); | |
| 120 | else data=ioport("JOY1_Y")->read(); | |
| 121 | 121 | break; |
| 122 | 122 | case 0xcd: |
| 123 | if (!activecpu_get_reg(S2650_FO)) data=input_port_read(machine(), "JOY2_X"); | |
| 124 | else data=input_port_read(machine(), "JOY2_Y"); | |
| 123 | if (!activecpu_get_reg(S2650_FO)) data=ioport("JOY2_X")->read(); | |
| 124 | else data=ioport("JOY2_Y")->read(); | |
| 125 | 125 | break; |
| 126 | 126 | #else |
| 127 | 127 | |
| 128 | 128 | case 0xcc: /* left joystick */ |
| 129 | if (i | |
| 129 | if (iop | |
| 130 | 130 | { /* paddle */ |
| 131 | 131 | if (!cpu_get_reg(machine().device("maincpu"), S2650_FO)) |
| 132 | 132 | { |
| 133 | data = i | |
| 133 | data = iop | |
| 134 | 134 | switch (data) |
| 135 | 135 | { |
| 136 | 136 | case 0x01: |
| r15082 | r15083 | |
| 148 | 148 | } |
| 149 | 149 | else |
| 150 | 150 | { |
| 151 | data = i | |
| 151 | data = iop | |
| 152 | 152 | switch (data) |
| 153 | 153 | { |
| 154 | 154 | case 0x08: |
| r15082 | r15083 | |
| 169 | 169 | { /* buttons */ |
| 170 | 170 | if (!cpu_get_reg(machine().device("maincpu"), S2650_FO)) |
| 171 | 171 | { |
| 172 | data = i | |
| 172 | data = iop | |
| 173 | 173 | switch (data) |
| 174 | 174 | { |
| 175 | 175 | case 0x01: |
| r15082 | r15083 | |
| 185 | 185 | } |
| 186 | 186 | else |
| 187 | 187 | { |
| 188 | data = i | |
| 188 | data = iop | |
| 189 | 189 | switch (data) |
| 190 | 190 | { |
| 191 | 191 | case 0x08: |
| r15082 | r15083 | |
| 203 | 203 | break; |
| 204 | 204 | |
| 205 | 205 | case 0xcd: /* right joystick */ |
| 206 | if (i | |
| 206 | if (iop | |
| 207 | 207 | { |
| 208 | 208 | if (!cpu_get_reg(machine().device("maincpu"), S2650_FO)) |
| 209 | 209 | { |
| 210 | data = i | |
| 210 | data = iop | |
| 211 | 211 | switch (data) |
| 212 | 212 | { |
| 213 | 213 | case 0x10: |
| r15082 | r15083 | |
| 225 | 225 | } |
| 226 | 226 | else |
| 227 | 227 | { |
| 228 | data = i | |
| 228 | data = iop | |
| 229 | 229 | switch (data) |
| 230 | 230 | { |
| 231 | 231 | case 0x80: |
| r15082 | r15083 | |
| 246 | 246 | { |
| 247 | 247 | if (!cpu_get_reg(machine().device("maincpu"), S2650_FO)) |
| 248 | 248 | { |
| 249 | data = i | |
| 249 | data = iop | |
| 250 | 250 | switch (data) |
| 251 | 251 | { |
| 252 | 252 | case 0x10: |
| r15082 | r15083 | |
| 262 | 262 | } |
| 263 | 263 | else |
| 264 | 264 | { |
| 265 | data = i | |
| 265 | data = iop | |
| 266 | 266 | switch (data) |
| 267 | 267 | { |
| 268 | 268 | case 0x80: |
| r15082 | r15083 | |
|---|---|---|
| 664 | 664 | /* for (i = 0; i < 6; i++) */ |
| 665 | 665 | for (i = 0; i < 4; i++) |
| 666 | 666 | { |
| 667 | key_buf[i] = | |
| 667 | key_buf[i] = | |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | 670 | /* process key modifiers */ |
| r15082 | r15083 | |
|---|---|---|
| 93 | 93 | if (exec_addr != 0xffff) |
| 94 | 94 | { |
| 95 | 95 | /* check to see if autorun is on (I hate how this works) */ |
| 96 | autorun = i | |
| 96 | autorun = i | |
| 97 | 97 | |
| 98 | 98 | if (autorun) |
| 99 | 99 | cpu_set_reg(image.device().machine().device("maincpu"), STATE_GENPC, exec_addr); |
| r15082 | r15083 | |
| 119 | 119 | if (execute_address != 0xffff) |
| 120 | 120 | { |
| 121 | 121 | /* check to see if autorun is on (I hate how this works) */ |
| 122 | autorun = i | |
| 122 | autorun = i | |
| 123 | 123 | |
| 124 | 124 | device_t *cpu = image.device().machine().device("maincpu"); |
| 125 | 125 | address_space *space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); |
| r15082 | r15083 | |
| 156 | 156 | if (execute_address != 0xffff) |
| 157 | 157 | { |
| 158 | 158 | /* check to see if autorun is on (I hate how this works) */ |
| 159 | autorun = i | |
| 159 | autorun = i | |
| 160 | 160 | |
| 161 | 161 | address_space *space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 162 | 162 |
| r15082 | r15083 | |
|---|---|---|
| 438 | 438 | |
| 439 | 439 | UINT32 vip_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 440 | 440 | { |
| 441 | switch (i | |
| 441 | switch (iop | |
| 442 | 442 | { |
| 443 | 443 | case VIDEO_CDP1861: |
| 444 | 444 | m_vdc->screen_update(screen, bitmap, cliprect); |
| r15082 | r15083 | |
| 456 | 456 | |
| 457 | 457 | READ_LINE_MEMBER( vip_state::clear_r ) |
| 458 | 458 | { |
| 459 | return BIT(i | |
| 459 | return BIT(iop | |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | READ_LINE_MEMBER( vip_state::ef2_r ) |
| r15082 | r15083 | |
| 468 | 468 | |
| 469 | 469 | READ_LINE_MEMBER( vip_state::ef3_r ) |
| 470 | 470 | { |
| 471 | return BIT(i | |
| 471 | return BIT(iop | |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | READ_LINE_MEMBER( vip_state::ef4_r ) |
| 475 | 475 | { |
| 476 | switch (i | |
| 476 | switch (iop | |
| 477 | 477 | { |
| 478 | 478 | case KEYBOARD_VP580: |
| 479 | return BIT(i | |
| 479 | return BIT(iop | |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | return 0; |
| r15082 | r15083 | |
| 486 | 486 | { |
| 487 | 487 | vip_state *state = device->machine().driver_data<vip_state>(); |
| 488 | 488 | |
| 489 | switch ( | |
| 489 | switch (s | |
| 490 | 490 | { |
| 491 | 491 | case SOUND_VP550: |
| 492 | 492 | state->m_vp550->sc1_w(BIT(sc, 1)); |
| r15082 | r15083 | |
| 501 | 501 | WRITE_LINE_MEMBER( vip_state::q_w ) |
| 502 | 502 | { |
| 503 | 503 | // sound output |
| 504 | switch (i | |
| 504 | switch (iop | |
| 505 | 505 | { |
| 506 | 506 | case SOUND_SPEAKER: |
| 507 | 507 | discrete_sound_w(m_beeper, NODE_01, state); |
| r15082 | r15083 | |
| 532 | 532 | |
| 533 | 533 | WRITE8_MEMBER( vip_state::dma_w ) |
| 534 | 534 | { |
| 535 | switch (i | |
| 535 | switch (iop | |
| 536 | 536 | { |
| 537 | 537 | case VIDEO_CDP1861: |
| 538 | 538 | m_vdc->dma_w(space, offset, data); |
| r15082 | r15083 | |
| 617 | 617 | m_vp551->reset(); |
| 618 | 618 | |
| 619 | 619 | /* configure video */ |
| 620 | switch (i | |
| 620 | switch (iop | |
| 621 | 621 | { |
| 622 | 622 | case VIDEO_CDP1861: |
| 623 | 623 | io->unmap_write(0x05, 0x05); |
| r15082 | r15083 | |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | /* configure audio */ |
| 634 | switch (i | |
| 634 | switch (iop | |
| 635 | 635 | { |
| 636 | 636 | case SOUND_SPEAKER: |
| 637 | 637 | m_vp595->install_write_handlers(io, false); |
| r15082 | r15083 | |
|---|---|---|
| 53 | 53 | UINT8 data = 0xff; |
| 54 | 54 | |
| 55 | 55 | if (m_kbd_row == 0xfe) |
| 56 | data = i | |
| 56 | data = iop | |
| 57 | 57 | else |
| 58 | 58 | if (m_kbd_row == 0xfd) |
| 59 | data = i | |
| 59 | data = iop | |
| 60 | 60 | else |
| 61 | 61 | if (m_kbd_row == 0xfb) |
| 62 | data = i | |
| 62 | data = iop | |
| 63 | 63 | else |
| 64 | 64 | if (m_kbd_row == 0xf7) |
| 65 | data = i | |
| 65 | data = iop | |
| 66 | 66 | else |
| 67 | 67 | if (m_kbd_row == 0xef) |
| 68 | data = i | |
| 68 | data = iop | |
| 69 | 69 | |
| 70 | 70 | return data; |
| 71 | 71 | } |
| r15082 | r15083 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | UINT16 pb1000_state::read_touchscreen(running_machine &machine, UINT8 line) |
| 338 | 338 | { |
| 339 | UINT8 x = input_port_read(machine, "POSX")/0x40; | |
| 340 | UINT8 y = input_port_read(machine, "POSY")/0x40; | |
| 339 | UINT8 x = machine.root_device().ioport("POSX")->read()/0x40; | |
| 340 | UINT8 y = machine.root_device().ioport("POSY")->read()/0x40; | |
| 341 | 341 | |
| 342 | if (in | |
| 342 | if (machine.root_device().ioport | |
| 343 | 343 | { |
| 344 | 344 | if (x == line-7) |
| 345 | 345 | return (0x1000<<y); |
| r15082 | r15083 | |
| 359 | 359 | //Read all the input lines |
| 360 | 360 | for (int line = 1; line <= 12; line++) |
| 361 | 361 | { |
| 362 | data |= in | |
| 362 | data |= machine.root_device().ioport | |
| 363 | 363 | data |= read_touchscreen(machine, line); |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | } |
| 367 | 367 | else |
| 368 | 368 | { |
| 369 | data = in | |
| 369 | data = machine.root_device().ioport | |
| 370 | 370 | data |= read_touchscreen(machine, m_kb_matrix & 0x0f); |
| 371 | 371 | } |
| 372 | 372 | |
| r15082 | r15083 | |
| 383 | 383 | //Read all the input lines |
| 384 | 384 | for (int line = 1; line <= 12; line++) |
| 385 | 385 | { |
| 386 | data |= in | |
| 386 | data |= machine.root_device().ioport | |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | } |
| 390 | 390 | else |
| 391 | 391 | { |
| 392 | data = in | |
| 392 | data = machine.root_device().ioport | |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 495 | 495 | pdp1_state *state = machine.driver_data<pdp1_state>(); |
| 496 | 496 | int cfg; |
| 497 | 497 | |
| 498 | cfg = in | |
| 498 | cfg = machine.root_device().ioport | |
| 499 | 499 | pdp1_reset_param.extend_support = (cfg >> pdp1_config_extend_bit) & pdp1_config_extend_mask; |
| 500 | 500 | pdp1_reset_param.hw_mul_div = (cfg >> pdp1_config_hw_mul_div_bit) & pdp1_config_hw_mul_div_mask; |
| 501 | 501 | pdp1_reset_param.type_20_sbs = (cfg >> pdp1_config_type_20_sbs_bit) & pdp1_config_type_20_sbs_mask; |
| r15082 | r15083 | |
| 1633 | 1633 | */ |
| 1634 | 1634 | static void iot_011(device_t *device, int op2, int nac, int mb, int *io, int ac) |
| 1635 | 1635 | { |
| 1636 | int key_state = | |
| 1636 | int key_state = | |
| 1637 | 1637 | int reply; |
| 1638 | 1638 | |
| 1639 | 1639 | |
| r15082 | r15083 | |
| 1722 | 1722 | |
| 1723 | 1723 | for (i=0; i<4; i++) |
| 1724 | 1724 | { |
| 1725 | typewriter_keys[i] = in | |
| 1725 | typewriter_keys[i] = machine.root_device().ioport | |
| 1726 | 1726 | } |
| 1727 | 1727 | |
| 1728 | 1728 | for (i=0; i<4; i++) |
| r15082 | r15083 | |
| 1753 | 1753 | int x_delta, y_delta; |
| 1754 | 1754 | int current_state; |
| 1755 | 1755 | |
| 1756 | state->m_lightpen.active = (in | |
| 1756 | state->m_lightpen.active = (machine.root_device().ioport | |
| 1757 | 1757 | |
| 1758 | current_state = in | |
| 1758 | current_state = machine.root_device().ioport | |
| 1759 | 1759 | |
| 1760 | 1760 | /* update pen down state */ |
| 1761 | 1761 | state->m_lightpen.down = state->m_lightpen.active && (current_state & pdp1_lightpen_down); |
| r15082 | r15083 | |
| 1777 | 1777 | state->m_old_lightpen = current_state; |
| 1778 | 1778 | |
| 1779 | 1779 | /* update pen position */ |
| 1780 | x_delta = input_port_read(machine, "LIGHTX"); | |
| 1781 | y_delta = input_port_read(machine, "LIGHTY"); | |
| 1780 | x_delta = machine.root_device().ioport("LIGHTX")->read(); | |
| 1781 | y_delta = machine.root_device().ioport("LIGHTY")->read(); | |
| 1782 | 1782 | |
| 1783 | 1783 | if (x_delta >= 0x80) |
| 1784 | 1784 | x_delta -= 0x100; |
| r15082 | r15083 | |
| 1816 | 1816 | int ta_transitions; |
| 1817 | 1817 | |
| 1818 | 1818 | |
| 1819 | cpu_set_reg(device, PDP1_SS, | |
| 1819 | cpu_set_reg(device, PDP1_SS, | |
| 1820 | 1820 | |
| 1821 | 1821 | /* read new state of control keys */ |
| 1822 | control_keys = | |
| 1822 | control_keys = s | |
| 1823 | 1823 | |
| 1824 | 1824 | if (control_keys & pdp1_control) |
| 1825 | 1825 | { |
| r15082 | r15083 | |
| 1911 | 1911 | |
| 1912 | 1912 | |
| 1913 | 1913 | /* handle test word keys */ |
| 1914 | tw_keys = (in | |
| 1914 | tw_keys = (machine.root_device().ioport | |
| 1915 | 1915 | |
| 1916 | 1916 | /* compute transitions */ |
| 1917 | 1917 | tw_transitions = tw_keys & (~ state->m_old_tw_keys); |
| r15082 | r15083 | |
| 1924 | 1924 | |
| 1925 | 1925 | |
| 1926 | 1926 | /* handle address keys */ |
| 1927 | ta_keys = in | |
| 1927 | ta_keys = machine.root_device().ioport | |
| 1928 | 1928 | |
| 1929 | 1929 | /* compute transitions */ |
| 1930 | 1930 | ta_transitions = ta_keys & (~ state->m_old_ta_keys); |
| r15082 | r15083 | |
|---|---|---|
| 16 | 16 | #include "elf2.lh" |
| 17 | 17 | |
| 18 | 18 | #define RUN \ |
| 19 | BIT(i | |
| 19 | BIT(iop | |
| 20 | 20 | |
| 21 | 21 | #define LOAD \ |
| 22 | BIT(i | |
| 22 | BIT(iop | |
| 23 | 23 | |
| 24 | 24 | #define MEMORY_PROTECT \ |
| 25 | BIT(i | |
| 25 | BIT(iop | |
| 26 | 26 | |
| 27 | 27 | #define INPUT \ |
| 28 | BIT(i | |
| 28 | BIT(iop | |
| 29 | 29 | |
| 30 | 30 | /* Read/Write Handlers */ |
| 31 | 31 |
| r15082 | r15083 | |
|---|---|---|
| 208 | 208 | dectalk_state *state = device->machine().driver_data<dectalk_state>(); |
| 209 | 209 | UINT8 data = 0; |
| 210 | 210 | data |= state->m_duart_inport&0xF; |
| 211 | data |= (input_port_read(device->machine(), "duart_in")&0xF0); | |
| 212 | if ((state->m_hack_self_test == 1) && (input_port_read(device->machine(), "hacks")&0x01)) data |= 0x10; // hack to prevent hang if selftest disable bit is kept low past the first read; i suppose the proper use of this bit was an incremental switch, or perhaps its expecting an interrupt later from serial in or tone in? added a dipswitch to disable the hack for testing | |
| 211 | data |= (device->machine().root_device().ioport("duart_in")->read()&0xF0); | |
| 212 | if ((state->m_hack_self_test == 1) && (state->ioport("hacks")->read()&0x01)) data |= 0x10; // hack to prevent hang if selftest disable bit is kept low past the first read; i suppose the proper use of this bit was an incremental switch, or perhaps its expecting an interrupt later from serial in or tone in? added a dipswitch to disable the hack for testing | |
| 213 | 213 | state->m_hack_self_test = 1; |
| 214 | 214 | return data; |
| 215 | 215 | } |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | if (!BIT(offset, i)) |
| 60 | 60 | { |
| 61 | 61 | sprintf(kbdrow,"LINE%d", i); |
| 62 | data &= i | |
| 62 | data &= iop | |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 |
| r15082 | r15083 | |
|---|---|---|
| 37 | 37 | READ8_MEMBER(bob85_state::bob85_keyboard_r) |
| 38 | 38 | { |
| 39 | 39 | UINT8 retVal = 0; |
| 40 | UINT8 line0 = input_port_read(machine(), "LINE0"); | |
| 41 | UINT8 line1 = input_port_read(machine(), "LINE1"); | |
| 42 | UINT8 line2 = input_port_read(machine(), "LINE2"); | |
| 40 | UINT8 line0 = ioport("LINE0")->read(); | |
| 41 | UINT8 line1 = ioport("LINE1")->read(); | |
| 42 | UINT8 line2 = ioport("LINE2")->read(); | |
| 43 | 43 | |
| 44 | 44 | if (line0) |
| 45 | 45 | { |
| r15082 | r15083 | |
|---|---|---|
| 42 | 42 | /* scan keyboard */ |
| 43 | 43 | for (row = 0; row < 10; row++) |
| 44 | 44 | { |
| 45 | UINT8 data = i | |
| 45 | UINT8 data = iop | |
| 46 | 46 | |
| 47 | 47 | if (data != 0xff) |
| 48 | 48 | { |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | READ8_MEMBER( pc100_state::pc100_key_r ) |
| 153 | 153 | { |
| 154 | 154 | if(offset) |
| 155 | return i | |
| 155 | return iop | |
| 156 | 156 | |
| 157 | 157 | return 0; |
| 158 | 158 | } |
| r15082 | r15083 | |
|---|---|---|
| 2204 | 2204 | * |
| 2205 | 2205 | ****************************************/ |
| 2206 | 2206 | |
| 2207 | static READ8_DEVICE_HANDLER( ppi_sys_porta_r ) { return input_port_read(device->machine(),"DSW2"); } | |
| 2208 | static READ8_DEVICE_HANDLER( ppi_sys_portb_r ) { return input_port_read(device->machine(),"DSW1") & 0xff; } | |
| 2209 | static READ8_DEVICE_HANDLER( ppi_prn_portb_r ) { return input_port_read(device->machine(),"DSW1") >> 8; } | |
| 2207 | static READ8_DEVICE_HANDLER( ppi_sys_porta_r ) { return device->machine().root_device().ioport("DSW2")->read(); } | |
| 2208 | static READ8_DEVICE_HANDLER( ppi_sys_portb_r ) { return device->machine().root_device().ioport("DSW1")->read() & 0xff; } | |
| 2209 | static READ8_DEVICE_HANDLER( ppi_prn_portb_r ) { return device->machine().root_device().ioport("DSW1")->read() >> 8; } | |
| 2210 | 2210 | |
| 2211 | 2211 | static WRITE8_DEVICE_HANDLER( ppi_sys_portc_w ) |
| 2212 | 2212 | { |
| r15082 | r15083 | |
| 2440 | 2440 | int i; |
| 2441 | 2441 | |
| 2442 | 2442 | ROM = machine.root_device().memregion("fdc_bios_2dd")->base(); |
| 2443 | op_mode = (in | |
| 2443 | op_mode = (machine.root_device().ioport | |
| 2444 | 2444 | |
| 2445 | 2445 | for(i=0;i<0x1000;i++) |
| 2446 | 2446 | ROM[i] = PRG[i+op_mode*0x8000]; |
| 2447 | 2447 | |
| 2448 | 2448 | ROM = machine.root_device().memregion("fdc_bios_2hd")->base(); |
| 2449 | op_mode = in | |
| 2449 | op_mode = machine.root_device().ioport | |
| 2450 | 2450 | |
| 2451 | 2451 | for(i=0;i<0x1000;i++) |
| 2452 | 2452 | ROM[i] = PRG[i+op_mode*0x8000+0x10000]; |
| r15082 | r15083 | |
|---|---|---|
| 483 | 483 | static const char *const bitnames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", |
| 484 | 484 | "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" }; |
| 485 | 485 | |
| 486 | return (m_matrix > 0x00) ? i | |
| 486 | return (m_matrix > 0x00) ? iop | |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | |
| r15082 | r15083 | |
| 501 | 501 | static INPUT_CHANGED( trigger_irq ) |
| 502 | 502 | { |
| 503 | 503 | nakajies_state *state = field.machine().driver_data<nakajies_state>(); |
| 504 | UINT8 irqs = | |
| 504 | UINT8 irqs = | |
| 505 | 505 | |
| 506 | 506 | state->m_irq_active |= irqs; |
| 507 | 507 | state->nakajies_update_irqs(field.machine()); |
| r15082 | r15083 | |
|---|---|---|
| 507 | 507 | beep_set_frequency(machine.device(BEEPER_TAG),4096); |
| 508 | 508 | beep_set_state(machine.device(BEEPER_TAG),0); |
| 509 | 509 | |
| 510 | state->m_color_mode = input_port_read(machine,"CONFIG") & 1; | |
| 511 | state->m_has_fdc = (input_port_read(machine,"CONFIG") & 2) >> 1; | |
| 512 | state->m_hi_mode = (input_port_read(machine,"CONFIG") & 4) >> 2; | |
| 510 | state->m_color_mode = machine.root_device().ioport("CONFIG")->read() & 1; | |
| 511 | state->m_has_fdc = (machine.root_device().ioport("CONFIG")->read() & 2) >> 1; | |
| 512 | state->m_hi_mode = (machine.root_device().ioport("CONFIG")->read() & 4) >> 2; | |
| 513 | 513 | |
| 514 | 514 | { |
| 515 | 515 | int i; |
| r15082 | r15083 | |
| 672 | 672 | |
| 673 | 673 | res = 0xff; |
| 674 | 674 | for(i=0;i<0xe;i++) |
| 675 | res &= | |
| 675 | res &= | |
| 676 | 676 | |
| 677 | 677 | state->m_pio_latchb = res; |
| 678 | 678 | |
| 679 | 679 | return res; |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | state->m_pio_latchb = | |
| 682 | state->m_pio_latchb = | |
| 683 | 683 | |
| 684 | return | |
| 684 | return | |
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | static Z80PIO_INTERFACE( mz2000_pio1_intf ) |
| r15082 | r15083 | |
|---|---|---|
| 156 | 156 | UINT8 data = 0xFF; |
| 157 | 157 | |
| 158 | 158 | if ( offset & 0x0100 ) |
| 159 | data &= i | |
| 159 | data &= iop | |
| 160 | 160 | |
| 161 | 161 | if ( offset & 0x0200 ) |
| 162 | data &= i | |
| 162 | data &= iop | |
| 163 | 163 | |
| 164 | 164 | if ( offset & 0x0400 ) |
| 165 | data &= i | |
| 165 | data &= iop | |
| 166 | 166 | |
| 167 | 167 | if ( offset & 0x0800 ) |
| 168 | data &= i | |
| 168 | data &= iop | |
| 169 | 169 | |
| 170 | 170 | if ( offset & 0x1000 ) |
| 171 | data &= i | |
| 171 | data &= iop | |
| 172 | 172 | |
| 173 | 173 | if ( offset & 0x2000 ) |
| 174 | data &= i | |
| 174 | data &= iop | |
| 175 | 175 | |
| 176 | 176 | if ( offset & 0x4000 ) |
| 177 | data &= i | |
| 177 | data &= iop | |
| 178 | 178 | |
| 179 | 179 | if ( offset & 0x8000 ) |
| 180 | data &= i | |
| 180 | data &= iop | |
| 181 | 181 | |
| 182 | 182 | return data; |
| 183 | 183 | } |
| r15082 | r15083 | |
|---|---|---|
| 758 | 758 | //z100_state *state = machine.driver_data<z100_state>(); |
| 759 | 759 | int i; |
| 760 | 760 | |
| 761 | if(in | |
| 761 | if(machine.root_device().ioport | |
| 762 | 762 | { |
| 763 | 763 | for(i=0;i<8;i++) |
| 764 | 764 | palette_set_color_rgb(machine, i,pal1bit(i >> 1),pal1bit(i >> 2),pal1bit(i >> 0)); |
| r15082 | r15083 | |
|---|---|---|
| 189 | 189 | READ8_MEMBER( tec1_state::tec1_kbd_r ) |
| 190 | 190 | { |
| 191 | 191 | cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, CLEAR_LINE); |
| 192 | return m_kbd | i | |
| 192 | return m_kbd | iop | |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | UINT8 tec1_state::tec1_convert_col_to_bin( UINT8 col, UINT8 row ) |
| r15082 | r15083 | |
| 239 | 239 | |
| 240 | 240 | // 74C923 4 by 5 key encoder. |
| 241 | 241 | // if previous key is still held, bail out |
| 242 | if (input_port_read(machine, keynames[state->m_kbd_row])) | |
| 243 | if (state->tec1_convert_col_to_bin(input_port_read(machine, keynames[state->m_kbd_row]), state->m_kbd_row) == state->m_kbd) | |
| 242 | if (machine.root_device().ioport(keynames[state->m_kbd_row])->read()) | |
| 243 | if (state->tec1_convert_col_to_bin(machine.root_device().ioport(keynames[state->m_kbd_row])->read(), state->m_kbd_row) == state->m_kbd) | |
| 244 | 244 | return; |
| 245 | 245 | |
| 246 | 246 | state->m_kbd_row++; |
| 247 | 247 | state->m_kbd_row &= 3; |
| 248 | 248 | |
| 249 | 249 | /* see if a key pressed */ |
| 250 | if (in | |
| 250 | if (machine.root_device().ioport | |
| 251 | 251 | { |
| 252 | state->m_kbd = state->tec1_convert_col_to_bin(in | |
| 252 | state->m_kbd = state->tec1_convert_col_to_bin(machine.root_device().ioport | |
| 253 | 253 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, HOLD_LINE); |
| 254 | 254 | state->m_key_pressed = TRUE; |
| 255 | 255 | } |
| r15082 | r15083 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | static UINT8 c65_lightpen_x_cb( running_machine &machine ) |
| 223 | 223 | { |
| 224 | return in | |
| 224 | return machine.root_device().ioport | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | static UINT8 c65_lightpen_y_cb( running_machine &machine ) |
| 228 | 228 | { |
| 229 | return in | |
| 229 | return machine.root_device().ioport | |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | static UINT8 c65_lightpen_button_cb( running_machine &machine ) |
| 233 | 233 | { |
| 234 | return in | |
| 234 | return machine.root_device().ioport | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | static UINT8 c65_c64_mem_r( running_machine &machine, int offset ) |
| r15082 | r15083 | |
|---|---|---|
| 162 | 162 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 163 | 163 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 164 | 164 | PORT_START("IN8") /* [8] */ |
| 165 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 165 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 166 | 166 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 167 | 167 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) |
| 168 | 168 | PORT_BIT(0xcb, IP_ACTIVE_HIGH, IPT_UNUSED) |
| r15082 | r15083 | |
|---|---|---|
| 210 | 210 | // keyboard has a keydown and a keyup code. Keyup = last keydown + bit 7 set |
| 211 | 211 | READ8_MEMBER( mmd1_state::mmd1_keyboard_r ) |
| 212 | 212 | { |
| 213 | UINT8 line1 = input_port_read(machine(),"LINE1"); | |
| 214 | UINT8 line2 = input_port_read(machine(),"LINE2"); | |
| 213 | UINT8 line1 = ioport("LINE1")->read(); | |
| 214 | UINT8 line2 = ioport("LINE2")->read(); | |
| 215 | 215 | UINT8 i, data = 0xff; |
| 216 | 216 | |
| 217 | 217 | |
| r15082 | r15083 | |
| 375 | 375 | { |
| 376 | 376 | // need to add cassin, ttyin bits |
| 377 | 377 | UINT8 data = 0x87; |
| 378 | data |= i | |
| 378 | data |= iop | |
| 379 | 379 | return data; |
| 380 | 380 | } |
| 381 | 381 | |
| r15082 | r15083 | |
| 398 | 398 | { |
| 399 | 399 | char kbdrow[6]; |
| 400 | 400 | sprintf(kbdrow,"X%X",m_digit); |
| 401 | data = i | |
| 401 | data = iop | |
| 402 | 402 | } |
| 403 | 403 | return data; |
| 404 | 404 | } |
| r15082 | r15083 | |
|---|---|---|
| 287 | 287 | |
| 288 | 288 | if (!BIT(m_keylatch, 0)) |
| 289 | 289 | { |
| 290 | data &= input_port_read(machine(), "ROW0"); | |
| 291 | if (input_port_read(machine(), "JOYBKEYMAP")) data &= input_port_read(machine(), "JOYB"); | |
| 290 | data &= ioport("ROW0")->read(); | |
| 291 | if (ioport("JOYBKEYMAP")->read()) data &= ioport("JOYB")->read(); | |
| 292 | 292 | } |
| 293 | 293 | if (!BIT(m_keylatch, 1)) |
| 294 | 294 | { |
| 295 | data &= input_port_read(machine(), "ROW1"); | |
| 296 | if (input_port_read(machine(), "JOYAKEYMAP")) data &= input_port_read(machine(), "JOYA"); | |
| 295 | data &= ioport("ROW1")->read(); | |
| 296 | if (ioport("JOYAKEYMAP")->read()) data &= ioport("JOYA")->read(); | |
| 297 | 297 | } |
| 298 | if (!BIT(m_keylatch, 2)) data &= input_port_read(machine(), "ROW2"); | |
| 299 | if (!BIT(m_keylatch, 3)) data &= input_port_read(machine(), "ROW3"); | |
| 300 | if (!BIT(m_keylatch, 4)) data &= input_port_read(machine(), "ROW4"); | |
| 301 | if (!BIT(m_keylatch, 5)) data &= input_port_read(machine(), "ROW5"); | |
| 302 | if (!BIT(m_keylatch, 6)) data &= input_port_read(machine(), "ROW6"); | |
| 303 | if (!BIT(m_keylatch, 7)) data &= input_port_read(machine(), "ROW7"); | |
| 298 | if (!BIT(m_keylatch, 2)) data &= ioport("ROW2")->read(); | |
| 299 | if (!BIT(m_keylatch, 3)) data &= ioport("ROW3")->read(); | |
| 300 | if (!BIT(m_keylatch, 4)) data &= ioport("ROW4")->read(); | |
| 301 | if (!BIT(m_keylatch, 5)) data &= ioport("ROW5")->read(); | |
| 302 | if (!BIT(m_keylatch, 6)) data &= ioport("ROW6")->read(); | |
| 303 | if (!BIT(m_keylatch, 7)) data &= ioport("ROW7")->read(); | |
| 304 | 304 | |
| 305 | data = (i | |
| 305 | data = (iop | |
| 306 | 306 | |
| 307 | 307 | if (m_cassette->input() < +0.0) data &= 0x7f; |
| 308 | 308 |
| r15082 | r15083 | |
|---|---|---|
| 605 | 605 | |
| 606 | 606 | UINT8 data = 0xff; |
| 607 | 607 | |
| 608 | if (!BIT(m_key_y, 0)) data &= input_port_read(machine(), "Y0"); | |
| 609 | if (!BIT(m_key_y, 1)) data &= input_port_read(machine(), "Y1"); | |
| 610 | if (!BIT(m_key_y, 2)) data &= input_port_read(machine(), "Y2"); | |
| 611 | if (!BIT(m_key_y, 3)) data &= input_port_read(machine(), "Y3"); | |
| 612 | if (!BIT(m_key_y, 4)) data &= input_port_read(machine(), "Y4"); | |
| 613 | if (!BIT(m_key_y, 5)) data &= input_port_read(machine(), "Y5"); | |
| 614 | if (!BIT(m_key_y, 6)) data &= input_port_read(machine(), "Y6"); | |
| 615 | if (!BIT(m_key_y, 7)) data &= input_port_read(machine(), "Y7"); | |
| 616 | if (!BIT(m_key_y, 8)) data &= input_port_read(machine(), "Y8"); | |
| 617 | if (!BIT(m_key_y, 9)) data &= input_port_read(machine(), "Y9"); | |
| 618 | if (!BIT(m_key_y, 10)) data &= input_port_read(machine(), "Y10"); | |
| 619 | if (!BIT(m_key_y, 11)) data &= input_port_read(machine(), "Y11"); | |
| 620 | if (!BIT(m_key_y, 12)) data &= input_port_read(machine(), "Y12"); | |
| 608 | if (!BIT(m_key_y, 0)) data &= ioport("Y0")->read(); | |
| 609 | if (!BIT(m_key_y, 1)) data &= ioport("Y1")->read(); | |
| 610 | if (!BIT(m_key_y, 2)) data &= ioport("Y2")->read(); | |
| 611 | if (!BIT(m_key_y, 3)) data &= ioport("Y3")->read(); | |
| 612 | if (!BIT(m_key_y, 4)) data &= ioport("Y4")->read(); | |
| 613 | if (!BIT(m_key_y, 5)) data &= ioport("Y5")->read(); | |
| 614 | if (!BIT(m_key_y, 6)) data &= ioport("Y6")->read(); | |
| 615 | if (!BIT(m_key_y, 7)) data &= ioport("Y7")->read(); | |
| 616 | if (!BIT(m_key_y, 8)) data &= ioport("Y8")->read(); | |
| 617 | if (!BIT(m_key_y, 9)) data &= ioport("Y9")->read(); | |
| 618 | if (!BIT(m_key_y, 10)) data &= ioport("Y10")->read(); | |
| 619 | if (!BIT(m_key_y, 11)) data &= ioport("Y11")->read(); | |
| 620 | if (!BIT(m_key_y, 12)) data &= ioport("Y12")->read(); | |
| 621 | 621 | |
| 622 | 622 | return data; |
| 623 | 623 | } |
| r15082 | r15083 | |
|---|---|---|
| 346 | 346 | |
| 347 | 347 | READ8_MEMBER( cbmb_state::vic_lightpen_x_cb ) |
| 348 | 348 | { |
| 349 | return i | |
| 349 | return iop | |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | READ8_MEMBER( cbmb_state::vic_lightpen_y_cb ) |
| 353 | 353 | { |
| 354 | return i | |
| 354 | return iop | |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | READ8_MEMBER( cbmb_state::vic_lightpen_button_cb ) |
| 358 | 358 | { |
| 359 | return i | |
| 359 | return iop | |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | READ8_MEMBER( cbmb_state::vic_dma_read ) |
| r15082 | r15083 | |
| 374 | 374 | |
| 375 | 375 | READ8_MEMBER( cbmb_state::vic_rdy_cb ) |
| 376 | 376 | { |
| 377 | return i | |
| 377 | return iop | |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | if (BIT(m_ko, i)) |
| 73 | 73 | { |
| 74 | 74 | sprintf(kbdrow,"KO%d", i+1); |
| 75 | data |= i | |
| 75 | data |= iop | |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | UINT32 data = 0; |
| 147 | 147 | switch (offset) |
| 148 | 148 | { |
| 149 | case 2 + 0 : data = input_port_read( device->machine(), "PENX"); break; | |
| 150 | case 2 + 1 : data = 915 - input_port_read( device->machine(), "PENY") + 90; break; | |
| 149 | case 2 + 0 : data = device->machine().root_device().ioport( "PENX")->read(); break; | |
| 150 | case 2 + 1 : data = 915 - device->machine().root_device().ioport( "PENY")->read() + 90; break; | |
| 151 | 151 | } |
| 152 | 152 | verboselog( device->machine(), 5, "s3c2440_adc_data_r %08X\n", data); |
| 153 | 153 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 136 | 136 | for (i = 1; i < 8; i++) |
| 137 | 137 | { |
| 138 | 138 | sprintf(kbdrow,"X%X", i); |
| 139 | mem->write_word(0xd20+i, | |
| 139 | mem->write_word(0xd20+i, | |
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 |
| r15082 | r15083 | |
|---|---|---|
| 857 | 857 | UINT8 vrtc,sw1; |
| 858 | 858 | vrtc = (machine().primary_screen->vpos() < 200) ? 0x20 : 0x00; // vblank |
| 859 | 859 | |
| 860 | sw1 = (i | |
| 860 | sw1 = (iop | |
| 861 | 861 | |
| 862 | 862 | return vrtc | sw1 | 0xc0; |
| 863 | 863 | } |
| r15082 | r15083 | |
| 913 | 913 | "KEY8", "KEY9", "KEYA", "KEYB", |
| 914 | 914 | "KEYC", "KEYD", "KEYE", "KEYF" }; |
| 915 | 915 | |
| 916 | return i | |
| 916 | return iop | |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | WRITE16_MEMBER(pc88va_state::backupram_wp_1_w) |
| r15082 | r15083 | |
| 1015 | 1015 | { |
| 1016 | 1016 | UINT8 sys_op; |
| 1017 | 1017 | |
| 1018 | sys_op = i | |
| 1018 | sys_op = iop | |
| 1019 | 1019 | |
| 1020 | 1020 | return 0xfffc | sys_op; // docs says all the other bits are high |
| 1021 | 1021 | } |
| r15082 | r15083 | |
| 1440 | 1440 | { |
| 1441 | 1441 | UINT8 sw5, sw4, sw3, sw2,speed_sw; |
| 1442 | 1442 | |
| 1443 | speed_sw = (input_port_read(device->machine(), "SPEED_SW") & 1) ? 0x20 : 0x00; | |
| 1444 | sw5 = (input_port_read(device->machine(), "DSW") & 0x10); | |
| 1445 | sw4 = (input_port_read(device->machine(), "DSW") & 0x08); | |
| 1446 | sw3 = (input_port_read(device->machine(), "DSW") & 0x04); | |
| 1447 | sw2 = (input_port_read(device->machine(), "DSW") & 0x02); | |
| 1443 | speed_sw = (device->machine().root_device().ioport("SPEED_SW")->read() & 1) ? 0x20 : 0x00; | |
| 1444 | sw5 = (device->machine().root_device().ioport("DSW")->read() & 0x10); | |
| 1445 | sw4 = (device->machine().root_device().ioport("DSW")->read() & 0x08); | |
| 1446 | sw3 = (device->machine().root_device().ioport("DSW")->read() & 0x04); | |
| 1447 | sw2 = (device->machine().root_device().ioport("DSW")->read() & 0x02); | |
| 1448 | 1448 | |
| 1449 | 1449 | return 0xc1 | sw5 | sw4 | sw3 | sw2 | speed_sw; |
| 1450 | 1450 | } |
| r15082 | r15083 | |
| 1453 | 1453 | { |
| 1454 | 1454 | UINT8 xsw1; |
| 1455 | 1455 | |
| 1456 | xsw1 = ( | |
| 1456 | xsw1 = ( | |
| 1457 | 1457 | |
| 1458 | 1458 | return 0xf7 | xsw1; |
| 1459 | 1459 | } |
| r15082 | r15083 | |
|---|---|---|
| 265 | 265 | { 0, 5, 2, 7 }, //Pink / Green |
| 266 | 266 | { 0, 2, 5, 7 }, //Green / Pink |
| 267 | 267 | }; |
| 268 | col_setting = in | |
| 268 | col_setting = machine.root_device().ioport | |
| 269 | 269 | |
| 270 | 270 | for(y=0;y<192;y++) |
| 271 | 271 | { |
| r15082 | r15083 | |
| 1908 | 1908 | UINT8 shift_pressed,caps_lock; |
| 1909 | 1909 | scancode = 0; |
| 1910 | 1910 | |
| 1911 | shift_pressed = (input_port_read(machine,"key_modifiers") & 2)>>1; | |
| 1912 | caps_lock = (input_port_read(machine,"key_modifiers") & 8)>>3; | |
| 1911 | shift_pressed = (machine.root_device().ioport("key_modifiers")->read() & 2)>>1; | |
| 1912 | caps_lock = (machine.root_device().ioport("key_modifiers")->read() & 8)>>3; | |
| 1913 | 1913 | |
| 1914 | 1914 | for(port_i=0;port_i<3;port_i++) |
| 1915 | 1915 | { |
| 1916 | 1916 | for(i=0;i<32;i++) |
| 1917 | 1917 | { |
| 1918 | if((in | |
| 1918 | if((machine.root_device().ioport | |
| 1919 | 1919 | { |
| 1920 | 1920 | if((shift_pressed != caps_lock) && scancode >= 0x41 && scancode <= 0x5f) |
| 1921 | 1921 | scancode+=0x20; |
| r15082 | r15083 | |
| 1943 | 1943 | |
| 1944 | 1944 | static UINT8 check_joy_press(running_machine &machine) |
| 1945 | 1945 | { |
| 1946 | UINT8 p1_key = input_port_read(machine,"P1") ^ 0xff; | |
| 1947 | UINT8 shift_key = input_port_read(machine,"key_modifiers") & 0x02; | |
| 1948 | UINT8 space_key = input_port_read(machine,"key2") & 0x01; | |
| 1946 | UINT8 p1_key = machine.root_device().ioport("P1")->read() ^ 0xff; | |
| 1947 | UINT8 shift_key = machine.root_device().ioport("key_modifiers")->read() & 0x02; | |
| 1948 | UINT8 space_key = machine.root_device().ioport("key2")->read() & 0x01; | |
| 1949 | 1949 | UINT8 joy_press; |
| 1950 | 1950 | |
| 1951 | 1951 | /* |
| r15082 | r15083 | |
| 2028 | 2028 | { |
| 2029 | 2029 | pc6001_state *state = timer.machine().driver_data<pc6001_state>(); |
| 2030 | 2030 | address_space *space = timer.machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 2031 | UINT32 key1 = input_port_read(timer.machine(),"key1"); | |
| 2032 | UINT32 key2 = input_port_read(timer.machine(),"key2"); | |
| 2033 | UINT32 key3 = input_port_read(timer.machine(),"key3"); | |
| 2034 | // UINT8 p1_key = input_port_read(timer.machine(), "P1"); | |
| 2031 | UINT32 key1 = timer.machine().root_device().ioport("key1")->read(); | |
| 2032 | UINT32 key2 = timer.machine().root_device().ioport("key2")->read(); | |
| 2033 | UINT32 key3 = timer.machine().root_device().ioport("key3")->read(); | |
| 2034 | // UINT8 p1_key = timer.machine().root_device().ioport("P1")->read(); | |
| 2035 | 2035 | |
| 2036 | 2036 | if(state->m_cas_switch == 0) |
| 2037 | 2037 | { |
| r15082 | r15083 | |
|---|---|---|
| 319 | 319 | |
| 320 | 320 | */ |
| 321 | 321 | |
| 322 | data |= i | |
| 322 | data |= iop | |
| 323 | 323 | |
| 324 | 324 | data |= m_centronics->fault_r() << 3; |
| 325 | 325 | data |= m_centronics->vcc_r() << 4; |
| r15082 | r15083 | |
| 404 | 404 | */ |
| 405 | 405 | data = m_printer_control; |
| 406 | 406 | data |= m_opt << 5; |
| 407 | data |= (i | |
| 407 | data |= (iop | |
| 408 | 408 | break; |
| 409 | 409 | |
| 410 | 410 | default: |
| r15082 | r15083 | |
| 571 | 571 | } |
| 572 | 572 | else if (!BIT(offset, 7)) |
| 573 | 573 | { |
| 574 | UINT16 sw = i | |
| 574 | UINT16 sw = iop | |
| 575 | 575 | |
| 576 | 576 | if (!BIT(offset, 14)) |
| 577 | 577 | { |
| r15082 | r15083 | |
| 781 | 781 | PORT_DIPSETTING( 0x00, "Diagnostic Mode" ) |
| 782 | 782 | |
| 783 | 783 | PORT_START("SW") |
| 784 | PORT_DIPNAME( 0x0f, 0x09, "Initial Display Mode" ) PORT_DIPLOCATION("SW:1,2,3,4") PORT_CONDITION("SW", 0x200, | |
| 784 | PORT_DIPNAME( 0x0f, 0x09, "Initial Display Mode" ) PORT_DIPLOCATION("SW:1,2,3,4") PORT_CONDITION("SW", 0x200, | |
| 785 | 785 | PORT_DIPSETTING( 0x0b, "Internal MD, External CGA80" ) |
| 786 | 786 | PORT_DIPSETTING( 0x0a, "Internal MD, External CGA40" ) |
| 787 | 787 | PORT_DIPSETTING( 0x09, "Internal ECD350, External MDA/HERC" ) |
| r15082 | r15083 | |
| 794 | 794 | PORT_DIPSETTING( 0x02, "External MDA/HERC, Internal ECD200" ) |
| 795 | 795 | PORT_DIPSETTING( 0x01, "External MDA/HERC, Internal CD80" ) |
| 796 | 796 | PORT_DIPSETTING( 0x00, "External MDA/HERC, Internal CD40" ) |
| 797 | PORT_DIPNAME( 0x10, 0x10, "MC6845 Mode" ) PORT_DIPLOCATION("SW:5") PORT_CONDITION("SW", 0x200, | |
| 797 | PORT_DIPNAME( 0x10, 0x10, "MC6845 Mode" ) PORT_DIPLOCATION("SW:5") PORT_CONDITION("SW", 0x200, | |
| 798 | 798 | PORT_DIPSETTING( 0x10, "EGA" ) |
| 799 | 799 | PORT_DIPSETTING( 0x00, "CGA/MDA/HERC" ) |
| 800 | PORT_DIPNAME( 0x60, 0x00, "Font" ) PORT_DIPLOCATION("SW:6,7") PORT_CONDITION("SW", 0x300, | |
| 800 | PORT_DIPNAME( 0x60, 0x00, "Font" ) PORT_DIPLOCATION("SW:6,7") PORT_CONDITION("SW", 0x300, | |
| 801 | 801 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 802 | 802 | PORT_DIPSETTING( 0x60, "Danish" ) |
| 803 | 803 | PORT_DIPSETTING( 0x40, "Portuguese" ) |
| 804 | 804 | PORT_DIPSETTING( 0x20, "Greek" ) |
| 805 | PORT_DIPNAME( 0x60, 0x60, "Default Display Mode" ) PORT_DIPLOCATION("SW:6,7") PORT_CONDITION("SW", 0x200, | |
| 805 | PORT_DIPNAME( 0x60, 0x60, "Default Display Mode" ) PORT_DIPLOCATION("SW:6,7") PORT_CONDITION("SW", 0x200, | |
| 806 | 806 | PORT_DIPSETTING( 0x60, "External EGA" ) |
| 807 | 807 | PORT_DIPSETTING( 0x40, "External CGA in 40 Column Mode" ) |
| 808 | 808 | PORT_DIPSETTING( 0x20, "External CGA in 80 Column Mode" ) |
| 809 | 809 | PORT_DIPSETTING( 0x00, "External Monochrome Adapter" ) |
| 810 | PORT_DIPNAME( 0x80, 0x00, "Monitor" ) PORT_DIPLOCATION("SW:8") PORT_CONDITION("SW", 0x200, | |
| 810 | PORT_DIPNAME( 0x80, 0x00, "Monitor" ) PORT_DIPLOCATION("SW:8") PORT_CONDITION("SW", 0x200, | |
| 811 | 811 | PORT_DIPSETTING( 0x80, "CD (Standard RGB)" ) |
| 812 | 812 | PORT_DIPSETTING( 0x00, "ECD (Enhanced RGB)" ) |
| 813 | PORT_DIPNAME( 0x100, 0x100, "Foreign Fonts" ) PORT_DIPLOCATION("SW:9") PORT_CONDITION("SW", 0x200, | |
| 813 | PORT_DIPNAME( 0x100, 0x100, "Foreign Fonts" ) PORT_DIPLOCATION("SW:9") PORT_CONDITION("SW", 0x200, | |
| 814 | 814 | PORT_DIPSETTING( 0x100, "Enabled" ) |
| 815 | 815 | PORT_DIPSETTING( 0x000, "Disabled" ) |
| 816 | 816 | PORT_DIPNAME( 0x200, 0x200, "Internal Graphics Adapter" ) PORT_DIPLOCATION("SW:10") |
| r15082 | r15083 | |
|---|---|---|
| 499 | 499 | UINT8 x, y, scancode = 0; |
| 500 | 500 | UINT16 pressed[9]; |
| 501 | 501 | char kbdrow[3]; |
| 502 | UINT8 modifiers = | |
| 502 | UINT8 modifiers = | |
| 503 | 503 | UINT8 shift_pressed = (modifiers & 2) >> 1; |
| 504 | 504 | state->m_keyb_press_flag = 0; |
| 505 | 505 | |
| r15082 | r15083 | |
| 507 | 507 | for (x = 0; x < 9; x++) |
| 508 | 508 | { |
| 509 | 509 | sprintf(kbdrow,"X%d",x); |
| 510 | pressed[x] = ( | |
| 510 | pressed[x] = ( | |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | /* find what has changed */ |
| r15082 | r15083 | |
|---|---|---|
| 506 | 506 | } |
| 507 | 507 | else |
| 508 | 508 | { |
| 509 | answer = (i | |
| 509 | answer = (iop | |
| 510 | 510 | } |
| 511 | 511 | break; |
| 512 | 512 | |
| r15082 | r15083 | |
| 523 | 523 | } |
| 524 | 524 | else |
| 525 | 525 | { |
| 526 | answer = (i | |
| 526 | answer = (iop | |
| 527 | 527 | } |
| 528 | 528 | break; |
| 529 | 529 | |
| r15082 | r15083 | |
| 806 | 806 | { |
| 807 | 807 | ti99_8 *driver = machine.driver_data<ti99_8>(); |
| 808 | 808 | |
| 809 | if (in | |
| 809 | if (machine.root_device().ioport | |
| 810 | 810 | driver->m_mecmouse = static_cast<mecmouse_device*>(machine.device(MECMOUSE_TAG)); |
| 811 | 811 | else |
| 812 | 812 | driver->m_mecmouse = NULL; |
| r15082 | r15083 | |
|---|---|---|
| 94 | 94 | "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", |
| 95 | 95 | "LINE5", "LINE6", "LINE7", "LINE8", "LINE9" |
| 96 | 96 | }; |
| 97 | return i | |
| 97 | return iop | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | static WRITE8_DEVICE_HANDLER(spc1000_gmode_w) |
| r15082 | r15083 | |
|---|---|---|
| 97 | 97 | UINT8 data = 0; |
| 98 | 98 | |
| 99 | 99 | if (m_matrix & 0x01) |
| 100 | data |= i | |
| 100 | data |= iop | |
| 101 | 101 | if (m_matrix & 0x02) |
| 102 | data |= i | |
| 102 | data |= iop | |
| 103 | 103 | if (m_matrix & 0x04) |
| 104 | data |= i | |
| 104 | data |= iop | |
| 105 | 105 | if (m_matrix & 0x08) |
| 106 | data |= i | |
| 106 | data |= iop | |
| 107 | 107 | if (m_matrix & 0x10) |
| 108 | data |= i | |
| 108 | data |= iop | |
| 109 | 109 | if (m_matrix & 0x20) |
| 110 | data |= i | |
| 110 | data |= iop | |
| 111 | 111 | if (m_matrix & 0x40) |
| 112 | data |= i | |
| 112 | data |= iop | |
| 113 | 113 | if (m_matrix & 0x80) |
| 114 | data |= i | |
| 114 | data |= iop | |
| 115 | 115 | |
| 116 | 116 | return data; |
| 117 | 117 | } |
| r15082 | r15083 | |
|---|---|---|
| 583 | 583 | { |
| 584 | 584 | if(index == 0) |
| 585 | 585 | { |
| 586 | UINT16 temp = i | |
| 586 | UINT16 temp = iop | |
| 587 | 587 | what |= (temp & 0x0001) ? 0x8000 : 0; |
| 588 | 588 | what |= (temp & 0x0002) ? 0x4000 : 0; |
| 589 | 589 | what |= (temp & 0x0004) ? 0x2000 : 0; |
| r15082 | r15083 | |
| 1023 | 1023 | UINT32 z = device->machine().rand() & 0x3ff; |
| 1024 | 1024 | |
| 1025 | 1025 | |
| 1026 | state->m_controller_input[0] = | |
| 1026 | state->m_controller_input[0] = s | |
| 1027 | 1027 | state->m_controller_input[1] = (UINT8)x; |
| 1028 | 1028 | state->m_controller_input[2] = (UINT8)y; |
| 1029 | 1029 | state->m_controller_input[3] = (UINT8)z; |
| r15082 | r15083 | |
|---|---|---|
| 568 | 568 | { |
| 569 | 569 | static const char *const portnames[3] = { "key1","key2","key3" }; |
| 570 | 570 | int i,port_i,scancode; |
| 571 | UINT8 keymod = input_port_read(machine(),"key_modifiers") & 0x1f; | |
| 572 | UINT32 pad = input_port_read(machine(),"tenkey"); | |
| 573 | UINT32 f_key = input_port_read(machine(), "f_keys"); | |
| 571 | UINT8 keymod = ioport("key_modifiers")->read() & 0x1f; | |
| 572 | UINT32 pad = ioport("tenkey")->read(); | |
| 573 | UINT32 f_key = ioport("f_keys")->read(); | |
| 574 | 574 | scancode = 0; |
| 575 | 575 | |
| 576 | 576 | for(port_i=0;port_i<3;port_i++) |
| 577 | 577 | { |
| 578 | 578 | for(i=0;i<32;i++) |
| 579 | 579 | { |
| 580 | if((i | |
| 580 | if((iop | |
| 581 | 581 | { |
| 582 | 582 | //key_flag = 1; |
| 583 | 583 | if(keymod & 0x02) // shift not pressed |
| r15082 | r15083 | |
| 643 | 643 | ---- ---x CTRL ON |
| 644 | 644 | */ |
| 645 | 645 | |
| 646 | val |= i | |
| 646 | val |= iop | |
| 647 | 647 | |
| 648 | 648 | if(check_keyboard_press() != 0) |
| 649 | 649 | val &= ~0x40; |
| r15082 | r15083 | |
| 666 | 666 | |
| 667 | 667 | if (port == 0) |
| 668 | 668 | { |
| 669 | UINT32 key3 = i | |
| 669 | UINT32 key3 = iop | |
| 670 | 670 | if(key3 & 0x00020000) ret |= 0x80; // Q |
| 671 | 671 | if(key3 & 0x00800000) ret |= 0x40; // W |
| 672 | 672 | if(key3 & 0x00000020) ret |= 0x20; // E |
| r15082 | r15083 | |
| 679 | 679 | else |
| 680 | 680 | if (port == 1) |
| 681 | 681 | { |
| 682 | UINT32 pad = i | |
| 682 | UINT32 pad = iop | |
| 683 | 683 | if(pad & 0x00000080) ret |= 0x80; // Tenkey 7 |
| 684 | 684 | if(pad & 0x00000010) ret |= 0x40; // Tenkey 4 |
| 685 | 685 | if(pad & 0x00000002) ret |= 0x20; // Tenkey 1 |
| r15082 | r15083 | |
| 692 | 692 | else |
| 693 | 693 | if (port == 2) |
| 694 | 694 | { |
| 695 | UINT32 key1 = input_port_read(machine(), "key1"); | |
| 696 | UINT32 key2 = input_port_read(machine(), "key2"); | |
| 697 | UINT32 pad = input_port_read(machine(), "tenkey"); | |
| 695 | UINT32 key1 = ioport("key1")->read(); | |
| 696 | UINT32 key2 = ioport("key2")->read(); | |
| 697 | UINT32 pad = ioport("tenkey")->read(); | |
| 698 | 698 | if(key1 & 0x08000000) ret |= 0x80; // ESC |
| 699 | 699 | if(key2 & 0x00020000) ret |= 0x40; // 1 |
| 700 | 700 | if(pad & 0x00000400) ret |= 0x20; // Tenkey - |
| r15082 | r15083 | |
| 1685 | 1685 | m_io_bank_mode = 0; //any read disables the extended mode. |
| 1686 | 1686 | |
| 1687 | 1687 | // a * at the end states devices used on plain X1 too |
| 1688 | if(offset == 0x0700) { return (ym2151_r(machine().device("ym"), offset-0x0700) & 0x7f) | (i | |
| 1688 | if(offset == 0x0700) { return (ym2151_r(machine().device("ym"), offset-0x0700) & 0x7f) | (iop | |
| 1689 | 1689 | else if(offset == 0x0701) { return ym2151_r(machine().device("ym"), offset-0x0700); } |
| 1690 | 1690 | //0x704 is FM sound detection port on X1 turboZ |
| 1691 | 1691 | else if(offset >= 0x0704 && offset <= 0x0707) { return z80ctc_r(m_ctc, offset-0x0704); } |
| r15082 | r15083 | |
| 1715 | 1715 | else if(offset == 0x1fc5) { return x1turbo_gfxpal_r(space,0); } // Z only! |
| 1716 | 1716 | // else if(offset >= 0x1fd0 && offset <= 0x1fdf) { return x1_scrn_r(space,offset-0x1fd0); } //Z only |
| 1717 | 1717 | else if(offset == 0x1fe0) { return x1turboz_blackclip_r(space,0); } |
| 1718 | else if(offset == 0x1ff0) { return i | |
| 1718 | else if(offset == 0x1ff0) { return iop | |
| 1719 | 1719 | else if(offset >= 0x2000 && offset <= 0x2fff) { return m_avram[offset & 0x7ff]; } |
| 1720 | 1720 | else if(offset >= 0x3000 && offset <= 0x37ff) { return m_tvram[offset & 0x7ff]; } |
| 1721 | 1721 | else if(offset >= 0x3800 && offset <= 0x3fff) { return m_kvram[offset & 0x7ff]; } |
| r15082 | r15083 | |
| 2410 | 2410 | { |
| 2411 | 2411 | x1_state *state = timer.machine().driver_data<x1_state>(); |
| 2412 | 2412 | address_space *space = timer.machine().device("x1_cpu")->memory().space(AS_PROGRAM); |
| 2413 | UINT32 key1 = input_port_read(timer.machine(),"key1"); | |
| 2414 | UINT32 key2 = input_port_read(timer.machine(),"key2"); | |
| 2415 | UINT32 key3 = input_port_read(timer.machine(),"key3"); | |
| 2416 | UINT32 key4 = input_port_read(timer.machine(),"tenkey"); | |
| 2417 | UINT32 f_key = input_port_read(timer.machine(), "f_keys"); | |
| 2413 | UINT32 key1 = timer.machine().root_device().ioport("key1")->read(); | |
| 2414 | UINT32 key2 = timer.machine().root_device().ioport("key2")->read(); | |
| 2415 | UINT32 key3 = timer.machine().root_device().ioport("key3")->read(); | |
| 2416 | UINT32 key4 = timer.machine().root_device().ioport("tenkey")->read(); | |
| 2417 | UINT32 f_key = timer.machine().root_device().ioport("f_keys")->read(); | |
| 2418 | 2418 | |
| 2419 | 2419 | if(state->m_key_irq_vector) |
| 2420 | 2420 | { |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | if ( offset == 0 ) |
| 69 | 69 | { |
| 70 | if (BIT(data, 0)) data |= input_port_read(machine(), "LINE1"); | |
| 71 | if (BIT(data, 1)) data |= input_port_read(machine(), "LINE2"); | |
| 72 | if (BIT(data, 2)) data |= input_port_read(machine(), "LINE3"); | |
| 73 | if (BIT(data, 3)) data |= input_port_read(machine(), "LINE4"); | |
| 70 | if (BIT(data, 0)) data |= ioport("LINE1")->read(); | |
| 71 | if (BIT(data, 1)) data |= ioport("LINE2")->read(); | |
| 72 | if (BIT(data, 2)) data |= ioport("LINE3")->read(); | |
| 73 | if (BIT(data, 3)) data |= ioport("LINE4")->read(); | |
| 74 | 74 | |
| 75 | 75 | for (i = 4; i < 8; i++) |
| 76 | 76 | { |
| 77 | 77 | if (BIT(data, i)) |
| 78 | 78 | { |
| 79 | if (BIT(input_port_read(machine(), "LINE1"), i)) data |= 1; | |
| 80 | if (BIT(input_port_read(machine(), "LINE2"), i)) data |= 2; | |
| 81 | if (BIT(input_port_read(machine(), "LINE3"), i)) data |= 4; | |
| 82 | if (BIT(input_port_read(machine(), "LINE4"), i)) data |= 8; | |
| 79 | if (BIT(ioport("LINE1")->read(), i)) data |= 1; | |
| 80 | if (BIT(ioport("LINE2")->read(), i)) data |= 2; | |
| 81 | if (BIT(ioport("LINE3")->read(), i)) data |= 4; | |
| 82 | if (BIT(ioport("LINE4")->read(), i)) data |= 8; | |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | } |
| r15082 | r15083 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | static INPUT_CHANGED( pen_check ) |
| 54 | 54 | { |
| 55 | UINT8 button = | |
| 55 | UINT8 button = | |
| 56 | 56 | palm_state *state = field.machine().driver_data<palm_state>(); |
| 57 | 57 | |
| 58 | 58 | if(button) |
| r15082 | r15083 | |
| 63 | 63 | |
| 64 | 64 | static INPUT_CHANGED( button_check ) |
| 65 | 65 | { |
| 66 | UINT8 button_state = | |
| 66 | UINT8 button_state = | |
| 67 | 67 | palm_state *state = field.machine().driver_data<palm_state>(); |
| 68 | 68 | |
| 69 | 69 | mc68328_set_port_d_lines(state->m_lsi, button_state, (int)(FPTR)param); |
| r15082 | r15083 | |
| 101 | 101 | static void palm_spim_exchange( device_t *device ) |
| 102 | 102 | { |
| 103 | 103 | palm_state *state = device->machine().driver_data<palm_state>(); |
| 104 | UINT8 x = input_port_read(device->machine(), "PENX"); | |
| 105 | UINT8 y = input_port_read(device->machine(), "PENY"); | |
| 104 | UINT8 x = device->machine().root_device().ioport("PENX")->read(); | |
| 105 | UINT8 y = state->ioport("PENY")->read(); | |
| 106 | 106 | |
| 107 | 107 | switch( state->m_port_f_latch & 0x0f ) |
| 108 | 108 | { |
| r15082 | r15083 | |
|---|---|---|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | if (m_matrix & 0x100) |
| 228 | data |= i | |
| 228 | data |= iop | |
| 229 | 229 | |
| 230 | 230 | return data; |
| 231 | 231 | } |
| r15082 | r15083 | |
|---|---|---|
| 80 | 80 | { |
| 81 | 81 | UINT8 keyin, i, data = 0xff; |
| 82 | 82 | |
| 83 | keyin = i | |
| 83 | keyin = iop | |
| 84 | 84 | if (keyin != 0xff) |
| 85 | 85 | for (i = 0; i < 8; i++) |
| 86 | 86 | if BIT(~keyin, i) |
| r15082 | r15083 | |
| 89 | 89 | break; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | keyin = i | |
| 92 | keyin = iop | |
| 93 | 93 | if (keyin != 0xff) |
| 94 | 94 | for (i = 0; i < 8; i++) |
| 95 | 95 | if BIT(~keyin, i) |
| r15082 | r15083 | |
| 98 | 98 | break; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | data &= i | |
| 101 | data &= iop | |
| 102 | 102 | |
| 103 | 103 | return data; |
| 104 | 104 | } |
| r15082 | r15083 | |
|---|---|---|
| 197 | 197 | switch( ( m_u2_port_b >> 1 ) & 0x0f ) |
| 198 | 198 | { |
| 199 | 199 | case 0: |
| 200 | data = i | |
| 200 | data = iop | |
| 201 | 201 | break; |
| 202 | 202 | case 1: |
| 203 | data = i | |
| 203 | data = iop | |
| 204 | 204 | break; |
| 205 | 205 | case 2: |
| 206 | data = i | |
| 206 | data = iop | |
| 207 | 207 | break; |
| 208 | 208 | } |
| 209 | 209 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 164 | 164 | |
| 165 | 165 | READ_LINE_MEMBER( d6800_state::d6800_keydown_r ) |
| 166 | 166 | { |
| 167 | UINT8 data = input_port_read(machine(), "LINE0") | |
| 168 | & input_port_read(machine(), "LINE1") | |
| 169 | & input_port_read(machine(), "LINE2") | |
| 170 | & input_port_read(machine(), "LINE3"); | |
| 167 | UINT8 data = ioport("LINE0")->read() | |
| 168 | & ioport("LINE1")->read() | |
| 169 | & ioport("LINE2")->read() | |
| 170 | & ioport("LINE3")->read(); | |
| 171 | 171 | |
| 172 | 172 | return (data==0xff) ? 0 : 1; |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | READ_LINE_MEMBER( d6800_state::d6800_fn_key_r ) |
| 176 | 176 | { |
| 177 | return i | |
| 177 | return iop | |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | WRITE_LINE_MEMBER( d6800_state::d6800_screen_w ) |
| r15082 | r15083 | |
| 209 | 209 | { |
| 210 | 210 | UINT8 data = 15; |
| 211 | 211 | |
| 212 | if (!BIT(m_keylatch, 4)) data &= input_port_read(machine(), "LINE0"); | |
| 213 | if (!BIT(m_keylatch, 5)) data &= input_port_read(machine(), "LINE1"); | |
| 214 | if (!BIT(m_keylatch, 6)) data &= input_port_read(machine(), "LINE2"); | |
| 215 | if (!BIT(m_keylatch, 7)) data &= input_port_read(machine(), "LINE3"); | |
| 212 | if (!BIT(m_keylatch, 4)) data &= ioport("LINE0")->read(); | |
| 213 | if (!BIT(m_keylatch, 5)) data &= ioport("LINE1")->read(); | |
| 214 | if (!BIT(m_keylatch, 6)) data &= ioport("LINE2")->read(); | |
| 215 | if (!BIT(m_keylatch, 7)) data &= ioport("LINE3")->read(); | |
| 216 | 216 | |
| 217 | 217 | return data | m_keylatch; |
| 218 | 218 | } |
| r15082 | r15083 | |
|---|---|---|
| 119 | 119 | /* See if any keys pressed */ |
| 120 | 120 | data = 3; |
| 121 | 121 | |
| 122 | if (mboard_key_select == i | |
| 122 | if (mboard_key_select == iop | |
| 123 | 123 | data &= 1; |
| 124 | 124 | |
| 125 | if (mboard_key_select == i | |
| 125 | if (mboard_key_select == iop | |
| 126 | 126 | data &= 2; |
| 127 | 127 | |
| 128 | 128 | return data << 8; |
| r15082 | r15083 | |
| 181 | 181 | UINT16 data; |
| 182 | 182 | |
| 183 | 183 | if (mboard_key_selector == 0) |
| 184 | data = i | |
| 184 | data = iop | |
| 185 | 185 | else |
| 186 | data = i | |
| 186 | data = iop | |
| 187 | 187 | |
| 188 | 188 | logerror("read Keyboard Offset = %x Data = %x Select = %x \n", offset, data, mboard_key_selector); |
| 189 | 189 | data <<= 8; |
| r15082 | r15083 | |
| 244 | 244 | UINT32 data; |
| 245 | 245 | |
| 246 | 246 | if (mboard_key_selector == 0) |
| 247 | data = i | |
| 247 | data = iop | |
| 248 | 248 | else |
| 249 | data = input_port_read(machine(), "LINE1"); | |
| 250 | //if (mboard_key_selector == 1) data = input_port_read(machine, "LINE0"); else data = 0; | |
| 249 | data = ioport("LINE1")->read(); | |
| 250 | //if (mboard_key_selector == 1) data = machine.root_device().ioport("LINE0")->read(); else data = 0; | |
| 251 | 251 | if(data) |
| 252 | 252 | logerror("read Keyboard Offset = %x Data = %x\n", offset, data); |
| 253 | 253 | data <<= 24; |
| r15082 | r15083 | |
|---|---|---|
| 361 | 361 | |
| 362 | 362 | for(i=0;i<8;i++) |
| 363 | 363 | { |
| 364 | slot_type = (in | |
| 364 | slot_type = (machine.root_device().ioport | |
| 365 | 365 | state->m_slot[i].id = id_type[slot_type]; |
| 366 | 366 | } |
| 367 | 367 | } |
| r15082 | r15083 | |
|---|---|---|
| 50 | 50 | { |
| 51 | 51 | char kbdrow[6]; |
| 52 | 52 | sprintf(kbdrow,"X%d", m_keyline&15); |
| 53 | return i | |
| 53 | return iop | |
| 54 | 54 | } |
| 55 | 55 | else |
| 56 | 56 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 196 | 196 | |
| 197 | 197 | READ_LINE_MEMBER( tmc600_state::clear_r ) |
| 198 | 198 | { |
| 199 | return BIT(i | |
| 199 | return BIT(iop | |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | READ_LINE_MEMBER( tmc600_state::ef2_r ) |
| r15082 | r15083 | |
| 207 | 207 | READ_LINE_MEMBER( tmc600_state::ef3_r ) |
| 208 | 208 | { |
| 209 | 209 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 210 | UINT8 data = ~i | |
| 210 | UINT8 data = ~iop | |
| 211 | 211 | |
| 212 | 212 | return BIT(data, m_keylatch % 8); |
| 213 | 213 | } |
| r15082 | r15083 | |
|---|---|---|
| 446 | 446 | data |= m_iec->data_r() << 1; |
| 447 | 447 | |
| 448 | 448 | // joystick |
| 449 | data &= ~(i | |
| 449 | data &= ~(iop | |
| 450 | 450 | |
| 451 | 451 | // cassette switch |
| 452 | 452 | if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) |
| r15082 | r15083 | |
| 571 | 571 | |
| 572 | 572 | UINT8 data = 0xff; |
| 573 | 573 | |
| 574 | if (!BIT(m_key_col, 0)) data &= input_port_read(machine(), "ROW0"); | |
| 575 | if (!BIT(m_key_col, 1)) data &= input_port_read(machine(), "ROW1"); | |
| 576 | if (!BIT(m_key_col, 2)) data &= input_port_read(machine(), "ROW2"); | |
| 577 | if (!BIT(m_key_col, 3)) data &= input_port_read(machine(), "ROW3"); | |
| 578 | if (!BIT(m_key_col, 4)) data &= input_port_read(machine(), "ROW4"); | |
| 579 | if (!BIT(m_key_col, 5)) data &= input_port_read(machine(), "ROW5"); | |
| 580 | if (!BIT(m_key_col, 6)) data &= input_port_read(machine(), "ROW6"); | |
| 581 | if (!BIT(m_key_col, 7)) data &= input_port_read(machine(), "ROW7"); | |
| 574 | if (!BIT(m_key_col, 0)) data &= ioport("ROW0")->read(); | |
| 575 | if (!BIT(m_key_col, 1)) data &= ioport("ROW1")->read(); | |
| 576 | if (!BIT(m_key_col, 2)) data &= ioport("ROW2")->read(); | |
| 577 | if (!BIT(m_key_col, 3)) data &= ioport("ROW3")->read(); | |
| 578 | if (!BIT(m_key_col, 4)) data &= ioport("ROW4")->read(); | |
| 579 | if (!BIT(m_key_col, 5)) data &= ioport("ROW5")->read(); | |
| 580 | if (!BIT(m_key_col, 6)) data &= ioport("ROW6")->read(); | |
| 581 | if (!BIT(m_key_col, 7)) data &= ioport("ROW7")->read(); | |
| 582 | 582 | |
| 583 | 583 | return data; |
| 584 | 584 | } |
| r15082 | r15083 | |
| 603 | 603 | UINT8 data = 0xff; |
| 604 | 604 | |
| 605 | 605 | // joystick |
| 606 | data &= ~(i | |
| 606 | data &= ~(iop | |
| 607 | 607 | |
| 608 | 608 | return data; |
| 609 | 609 | } |
| r15082 | r15083 | |
| 714 | 714 | |
| 715 | 715 | static UINT8 vic20_lightx_cb( running_machine &machine ) |
| 716 | 716 | { |
| 717 | return (in | |
| 717 | return (machine.root_device().ioport("LIGHTX")->read_safe( | |
| 718 | 718 | } |
| 719 | 719 | |
| 720 | 720 | static UINT8 vic20_lighty_cb( running_machine &machine ) |
| 721 | 721 | { |
| 722 | return (in | |
| 722 | return (machine.root_device().ioport("LIGHTY")->read_safe( | |
| 723 | 723 | } |
| 724 | 724 | |
| 725 | 725 | static UINT8 vic20_lightbut_cb( running_machine &machine ) |
| 726 | 726 | { |
| 727 | return (((in | |
| 727 | return (((machine.root_device().ioport | |
| 728 | 728 | } |
| 729 | 729 | |
| 730 | 730 | static UINT8 vic20_paddle0_cb( running_machine &machine ) |
| 731 | 731 | { |
| 732 | return in | |
| 732 | return machine.root_device().ioport | |
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | static UINT8 vic20_paddle1_cb( running_machine &machine ) |
| 736 | 736 | { |
| 737 | return in | |
| 737 | return machine.root_device().ioport | |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | 740 | static const mos6560_interface vic_ntsc_intf = |
| r15082 | r15083 | |
|---|---|---|
| 310 | 310 | |
| 311 | 311 | /* keyboard read */ |
| 312 | 312 | if (m_digitsel < 9) |
| 313 | data |= i | |
| 313 | data |= iop | |
| 314 | 314 | |
| 315 | 315 | /* tape input */ |
| 316 | 316 | if (m_cass->input() > 0.0) |
| r15082 | r15083 | |
| 606 | 606 | |
| 607 | 607 | READ8_MEMBER( tm990189_state::video_joy_r ) |
| 608 | 608 | { |
| 609 | UINT8 data = i | |
| 609 | UINT8 data = iop | |
| 610 | 610 | |
| 611 | 611 | if (m_joy1x_timer->remaining() < attotime::zero) |
| 612 | 612 | data |= 0x01; |
| r15082 | r15083 | |
| 625 | 625 | |
| 626 | 626 | WRITE8_MEMBER( tm990189_state::video_joy_w ) |
| 627 | 627 | { |
| 628 | m_joy1x_timer->reset(attotime::from_usec(input_port_read(machine(), "JOY1_X")*28+28)); | |
| 629 | m_joy1y_timer->reset(attotime::from_usec(input_port_read(machine(), "JOY1_Y")*28+28)); | |
| 630 | m_joy2x_timer->reset(attotime::from_usec(input_port_read(machine(), "JOY2_X")*28+28)); | |
| 631 | m_joy2y_timer->reset(attotime::from_usec(input_port_read(machine(), "JOY2_Y")*28+28)); | |
| 628 | m_joy1x_timer->reset(attotime::from_usec(ioport("JOY1_X")->read()*28+28)); | |
| 629 | m_joy1y_timer->reset(attotime::from_usec(ioport("JOY1_Y")->read()*28+28)); | |
| 630 | m_joy2x_timer->reset(attotime::from_usec(ioport("JOY2_X")->read()*28+28)); | |
| 631 | m_joy2y_timer->reset(attotime::from_usec(ioport("JOY2_Y")->read()*28+28)); | |
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | /* user tms9901 setup */ |
| r15082 | r15083 | |
|---|---|---|
| 128 | 128 | { |
| 129 | 129 | char kbdrow[6]; |
| 130 | 130 | sprintf(kbdrow,"X%X",m_digit); |
| 131 | data = i | |
| 131 | data = iop | |
| 132 | 132 | } |
| 133 | 133 | return data; |
| 134 | 134 | } |
| r15082 | r15083 | |
|---|---|---|
| 75 | 75 | if (BIT(offset, i)==0) |
| 76 | 76 | { |
| 77 | 77 | sprintf(kbdrow,"LINE%d", i); |
| 78 | data &= i | |
| 78 | data &= iop | |
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 |
| r15082 | r15083 | |
|---|---|---|
| 508 | 508 | READ8_MEMBER(smc777_state::smc777_joystick_r) |
| 509 | 509 | { |
| 510 | 510 | |
| 511 | return i | |
| 511 | return iop | |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | 514 | WRITE8_MEMBER(smc777_state::smc777_color_mode_w) |
| r15082 | r15083 | |
| 927 | 927 | smc777_state *state = timer.machine().driver_data<smc777_state>(); |
| 928 | 928 | static const char *const portnames[11] = { "key0","key1","key2","key3","key4","key5","key6","key7", "key8", "key9", "keya" }; |
| 929 | 929 | int i,port_i,scancode; |
| 930 | UINT8 shift_mod = input_port_read(timer.machine(),"key_mod") & 1; | |
| 931 | UINT8 kana_mod = input_port_read(timer.machine(),"key_mod") & 0x10; | |
| 930 | UINT8 shift_mod = timer.machine().root_device().ioport("key_mod")->read() & 1; | |
| 931 | UINT8 kana_mod = timer.machine().root_device().ioport("key_mod")->read() & 0x10; | |
| 932 | 932 | scancode = 0; |
| 933 | 933 | |
| 934 | 934 | for(port_i=0;port_i<11;port_i++) |
| 935 | 935 | { |
| 936 | 936 | for(i=0;i<8;i++) |
| 937 | 937 | { |
| 938 | if(( | |
| 938 | if(( | |
| 939 | 939 | { |
| 940 | 940 | state->m_keyb_press = smc777_keytable[shift_mod & 1][scancode]; |
| 941 | 941 | if(kana_mod) { state->m_keyb_press|=0x80; } |
| r15082 | r15083 | |
|---|---|---|
| 70 | 70 | { |
| 71 | 71 | UINT8 data = 0xff; |
| 72 | 72 | |
| 73 | if (!BIT(offset, 8)) data &= input_port_read(machine(), "A8"); | |
| 74 | if (!BIT(offset, 9)) data &= input_port_read(machine(), "A9"); | |
| 75 | if (!BIT(offset, 10)) data &= input_port_read(machine(), "A10"); | |
| 76 | if (!BIT(offset, 11)) data &= input_port_read(machine(), "A11"); | |
| 77 | if (!BIT(offset, 12)) data &= input_port_read(machine(), "A12"); | |
| 78 | if (!BIT(offset, 13)) data &= input_port_read(machine(), "A13"); | |
| 79 | if (!BIT(offset, 14)) data &= input_port_read(machine(), "A14"); | |
| 73 | if (!BIT(offset, 8)) data &= ioport("A8")->read(); | |
| 74 | if (!BIT(offset, 9)) data &= ioport("A9")->read(); | |
| 75 | if (!BIT(offset, 10)) data &= ioport("A10")->read(); | |
| 76 | if (!BIT(offset, 11)) data &= ioport("A11")->read(); | |
| 77 | if (!BIT(offset, 12)) data &= ioport("A12")->read(); | |
| 78 | if (!BIT(offset, 13)) data &= ioport("A13")->read(); | |
| 79 | if (!BIT(offset, 14)) data &= ioport("A14")->read(); | |
| 80 | 80 | |
| 81 | 81 | if (!BIT(offset, 15)) |
| 82 | 82 | { |
| 83 | data &= i | |
| 83 | data &= iop | |
| 84 | 84 | |
| 85 | 85 | m_cassette->output(-1); |
| 86 | 86 | speaker_level_w(m_speaker, 0); |
| r15082 | r15083 | |
|---|---|---|
| 41 | 41 | UINT8 data = 0; |
| 42 | 42 | |
| 43 | 43 | if (~offset & 0x01) |
| 44 | data |= i | |
| 44 | data |= iop | |
| 45 | 45 | if (~offset & 0x02) |
| 46 | data |= i | |
| 46 | data |= iop | |
| 47 | 47 | if (~offset & 0x04) |
| 48 | data |= i | |
| 48 | data |= iop | |
| 49 | 49 | if (~offset & 0x08) |
| 50 | data |= i | |
| 50 | data |= iop | |
| 51 | 51 | if (~offset & 0x10) |
| 52 | data |= i | |
| 52 | data |= iop | |
| 53 | 53 | if (~offset & 0x20) |
| 54 | data |= i | |
| 54 | data |= iop | |
| 55 | 55 | if (~offset & 0x40) |
| 56 | data |= i | |
| 56 | data |= iop | |
| 57 | 57 | if (~offset & 0x80) |
| 58 | data |= i | |
| 58 | data |= iop | |
| 59 | 59 | if (~offset & 0x100) |
| 60 | data |= i | |
| 60 | data |= iop | |
| 61 | 61 | |
| 62 | 62 | return data; |
| 63 | 63 | } |
| r15082 | r15083 | |
|---|---|---|
| 273 | 273 | { |
| 274 | 274 | spectrum_state *state = timer.machine().driver_data<spectrum_state>(); |
| 275 | 275 | |
| 276 | if (( | |
| 276 | if (( | |
| 277 | 277 | { |
| 278 | 278 | state->m_port_1ffd_data |= 0x02; |
| 279 | 279 | scorpion_update_memory(timer.machine()); |
| r15082 | r15083 | |
|---|---|---|
| 274 | 274 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6" }; |
| 275 | 275 | int table = 0, row, col; |
| 276 | 276 | |
| 277 | if (in | |
| 277 | if (machine.root_device().ioport | |
| 278 | 278 | { |
| 279 | 279 | /* shift, upper case */ |
| 280 | 280 | table |= 0x01; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | if (in | |
| 283 | if (machine.root_device().ioport | |
| 284 | 284 | { |
| 285 | 285 | /* ctrl */ |
| 286 | 286 | table |= 0x02; |
| r15082 | r15083 | |
| 292 | 292 | /* scan keyboard */ |
| 293 | 293 | for (row = 0; row < 7; row++) |
| 294 | 294 | { |
| 295 | UINT8 data = in | |
| 295 | UINT8 data = machine.root_device().ioport | |
| 296 | 296 | |
| 297 | 297 | for (col = 0; col < 8; col++) |
| 298 | 298 | { |
| r15082 | r15083 | |
|---|---|---|
| 340 | 340 | int lines = offset >> 8; |
| 341 | 341 | int data = 0xff; |
| 342 | 342 | |
| 343 | int cs_extra1 = input_port_read_safe(machine(), "PLUS0", 0xff) & 0x1f; | |
| 344 | int cs_extra2 = input_port_read_safe(machine(), "PLUS1", 0xff) & 0x1f; | |
| 345 | int cs_extra3 = input_port_read_safe(machine(), "PLUS2", 0xff) & 0x1f; | |
| 346 | int ss_extra1 = input_port_read_safe(machine(), "PLUS3", 0xff) & 0x1f; | |
| 347 | int ss_extra2 = input_port_read_safe(machine(), "PLUS4", 0xff) & 0x1f; | |
| 343 | int cs_extra1 = ioport("PLUS0")->read_safe(0xff) & 0x1f; | |
| 344 | int cs_extra2 = ioport("PLUS1")->read_safe(0xff) & 0x1f; | |
| 345 | int cs_extra3 = ioport("PLUS2")->read_safe(0xff) & 0x1f; | |
| 346 | int ss_extra1 = ioport("PLUS3")->read_safe(0xff) & 0x1f; | |
| 347 | int ss_extra2 = ioport("PLUS4")->read_safe(0xff) & 0x1f; | |
| 348 | 348 | |
| 349 | 349 | /* Caps - V */ |
| 350 | 350 | if ((lines & 1) == 0) |
| 351 | 351 | { |
| 352 | data &= i | |
| 352 | data &= iop | |
| 353 | 353 | /* CAPS for extra keys */ |
| 354 | 354 | if (cs_extra1 != 0x1f || cs_extra2 != 0x1f || cs_extra3 != 0x1f) |
| 355 | 355 | data &= ~0x01; |
| r15082 | r15083 | |
| 357 | 357 | |
| 358 | 358 | /* A - G */ |
| 359 | 359 | if ((lines & 2) == 0) |
| 360 | data &= i | |
| 360 | data &= iop | |
| 361 | 361 | |
| 362 | 362 | /* Q - T */ |
| 363 | 363 | if ((lines & 4) == 0) |
| 364 | data &= i | |
| 364 | data &= iop | |
| 365 | 365 | |
| 366 | 366 | /* 1 - 5 */ |
| 367 | 367 | if ((lines & 8) == 0) |
| 368 | data &= i | |
| 368 | data &= iop | |
| 369 | 369 | |
| 370 | 370 | /* 6 - 0 */ |
| 371 | 371 | if ((lines & 16) == 0) |
| 372 | data &= i | |
| 372 | data &= iop | |
| 373 | 373 | |
| 374 | 374 | /* Y - P */ |
| 375 | 375 | if ((lines & 32) == 0) |
| 376 | data &= i | |
| 376 | data &= iop | |
| 377 | 377 | |
| 378 | 378 | /* H - Enter */ |
| 379 | 379 | if ((lines & 64) == 0) |
| 380 | data &= i | |
| 380 | data &= iop | |
| 381 | 381 | |
| 382 | 382 | /* B - Space */ |
| 383 | 383 | if ((lines & 128) == 0) |
| 384 | 384 | { |
| 385 | data &= i | |
| 385 | data &= iop | |
| 386 | 386 | /* SYMBOL SHIFT for extra keys */ |
| 387 | 387 | if (ss_extra1 != 0x1f || ss_extra2 != 0x1f) |
| 388 | 388 | data &= ~0x02; |
| r15082 | r15083 | |
| 398 | 398 | |
| 399 | 399 | /* Issue 2 Spectrums default to having bits 5, 6 & 7 set. |
| 400 | 400 | Issue 3 Spectrums default to having bits 5 & 7 set and bit 6 reset. */ |
| 401 | if (i | |
| 401 | if (iop | |
| 402 | 402 | data ^= (0x40); |
| 403 | 403 | |
| 404 | 404 | return data; |
| r15082 | r15083 | |
| 407 | 407 | /* kempston joystick interface */ |
| 408 | 408 | READ8_MEMBER(spectrum_state::spectrum_port_1f_r) |
| 409 | 409 | { |
| 410 | return i | |
| 410 | return iop | |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | /* fuller joystick interface */ |
| 414 | 414 | READ8_MEMBER(spectrum_state::spectrum_port_7f_r) |
| 415 | 415 | { |
| 416 | return i | |
| 416 | return iop | |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | /* mikrogen joystick interface */ |
| 420 | 420 | READ8_MEMBER(spectrum_state::spectrum_port_df_r) |
| 421 | 421 | { |
| 422 | return i | |
| 422 | return iop | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | READ8_MEMBER(spectrum_state::spectrum_port_ula_r) |
| r15082 | r15083 | |
| 461 | 461 | PORT_CONFSETTING( 0x03, "Mikrogen" ) |
| 462 | 462 | |
| 463 | 463 | PORT_START("KEMPSTON") /* Kempston joystick interface */ |
| 464 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Kempston)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 465 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Kempston)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 466 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Kempston)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 467 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Kempston)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 468 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Kempston)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 464 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Kempston)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x01) | |
| 465 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Kempston)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x01) | |
| 466 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Kempston)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x01) | |
| 467 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Kempston)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x01) | |
| 468 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Kempston)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x01) | |
| 469 | 469 | |
| 470 | 470 | PORT_START("FULLER") /* Fuller joystick interface */ |
| 471 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Fuller)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 472 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Fuller)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 473 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Fuller)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 474 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Fuller)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 475 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Fuller)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 471 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Fuller)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x02) | |
| 472 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Fuller)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x02) | |
| 473 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Fuller)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x02) | |
| 474 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Fuller)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x02) | |
| 475 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Fuller)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x02) | |
| 476 | 476 | |
| 477 | 477 | PORT_START("MIKROGEN") /* Mikrogen joystick interface */ |
| 478 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Mikrogen)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 479 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Mikrogen)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 480 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Mikrogen)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 481 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Mikrogen)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 482 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Mikrogen)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 478 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Up (Mikrogen)") PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x03) | |
| 479 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Down (Mikrogen)") PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x03) | |
| 480 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Right (Mikrogen)") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x03) | |
| 481 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Left (Mikrogen)") PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x03) | |
| 482 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P1 Joystick Fire (Mikrogen)") PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("JOY_INTF", 0x0f, EQUALS, 0x03) | |
| 483 | 483 | INPUT_PORTS_END |
| 484 | 484 | |
| 485 | 485 | /* |
| r15082 | r15083 | |
|---|---|---|
| 220 | 220 | UINT8 data = 0x7f; |
| 221 | 221 | |
| 222 | 222 | /* bit 0 to 5, keyboard rows 0 to 5 */ |
| 223 | if (!BIT(m_lednum, 0)) data &= input_port_read(machine(), "PC0"); | |
| 224 | if (!BIT(m_lednum, 1)) data &= input_port_read(machine(), "PC1"); | |
| 225 | if (!BIT(m_lednum, 2)) data &= input_port_read(machine(), "PC2"); | |
| 226 | if (!BIT(m_lednum, 3)) data &= input_port_read(machine(), "PC3"); | |
| 227 | if (!BIT(m_lednum, 4)) data &= input_port_read(machine(), "PC4"); | |
| 228 | if (!BIT(m_lednum, 5)) data &= input_port_read(machine(), "PC5"); | |
| 223 | if (!BIT(m_lednum, 0)) data &= ioport("PC0")->read(); | |
| 224 | if (!BIT(m_lednum, 1)) data &= ioport("PC1")->read(); | |
| 225 | if (!BIT(m_lednum, 2)) data &= ioport("PC2")->read(); | |
| 226 | if (!BIT(m_lednum, 3)) data &= ioport("PC3")->read(); | |
| 227 | if (!BIT(m_lednum, 4)) data &= ioport("PC4")->read(); | |
| 228 | if (!BIT(m_lednum, 5)) data &= ioport("PC5")->read(); | |
| 229 | 229 | |
| 230 | 230 | /* bit 6, user key */ |
| 231 | data &= i | |
| 231 | data &= iop | |
| 232 | 232 | |
| 233 | 233 | /* bit 7, tape input */ |
| 234 | 234 | data |= ((m_cassette)->input() > 0 ? 1 : 0) << 7; |
| r15082 | r15083 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | void get_ram_expansion_settings(address_space *space, int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end) |
| 338 | 338 | { |
| 339 | if ( | |
| 339 | if ( | |
| 340 | 340 | write_protect_on = 1; |
| 341 | 341 | else |
| 342 | 342 | write_protect_on = 0; |
| 343 | 343 | |
| 344 | 344 | ram_expansion_installed = 1; |
| 345 | 345 | |
| 346 | switch( | |
| 346 | switch( | |
| 347 | 347 | { |
| 348 | 348 | case 0x00: // No RAM Expansion |
| 349 | 349 | ram_expansion_installed = 0; |
| r15082 | r15083 | |
|---|---|---|
| 428 | 428 | |
| 429 | 429 | */ |
| 430 | 430 | |
| 431 | UINT8 x = input_port_read_safe(machine(), "IKBD_MOUSEX", 0x00); | |
| 432 | UINT8 y = input_port_read_safe(machine(), "IKBD_MOUSEY", 0x00); | |
| 431 | UINT8 x = ioport("IKBD_MOUSEX")->read_safe(0x00); | |
| 432 | UINT8 y = ioport("IKBD_MOUSEY")->read_safe(0x00); | |
| 433 | 433 | |
| 434 | 434 | if (m_ikbd_mouse_pc == 0) |
| 435 | 435 | { |
| r15082 | r15083 | |
| 511 | 511 | UINT8 data = 0xff; |
| 512 | 512 | |
| 513 | 513 | // keyboard data |
| 514 | if (!BIT(m_ikbd_keylatch, 1)) data &= input_port_read(machine(), "P31"); | |
| 515 | if (!BIT(m_ikbd_keylatch, 2)) data &= input_port_read(machine(), "P32"); | |
| 516 | if (!BIT(m_ikbd_keylatch, 3)) data &= input_port_read(machine(), "P33"); | |
| 517 | if (!BIT(m_ikbd_keylatch, 4)) data &= input_port_read(machine(), "P34"); | |
| 518 | if (!BIT(m_ikbd_keylatch, 5)) data &= input_port_read(machine(), "P35"); | |
| 519 | if (!BIT(m_ikbd_keylatch, 6)) data &= input_port_read(machine(), "P36"); | |
| 520 | if (!BIT(m_ikbd_keylatch, 7)) data &= input_port_read(machine(), "P37"); | |
| 521 | if (!BIT(m_ikbd_keylatch, 8)) data &= input_port_read(machine(), "P40"); | |
| 522 | if (!BIT(m_ikbd_keylatch, 9)) data &= input_port_read(machine(), "P41"); | |
| 523 | if (!BIT(m_ikbd_keylatch, 10)) data &= input_port_read(machine(), "P42"); | |
| 524 | if (!BIT(m_ikbd_keylatch, 11)) data &= input_port_read(machine(), "P43"); | |
| 525 | if (!BIT(m_ikbd_keylatch, 12)) data &= input_port_read(machine(), "P44"); | |
| 526 | if (!BIT(m_ikbd_keylatch, 13)) data &= input_port_read(machine(), "P45"); | |
| 527 | if (!BIT(m_ikbd_keylatch, 14)) data &= input_port_read(machine(), "P46"); | |
| 528 | if (!BIT(m_ikbd_keylatch, 15)) data &= input_port_read(machine(), "P47"); | |
| 514 | if (!BIT(m_ikbd_keylatch, 1)) data &= ioport("P31")->read(); | |
| 515 | if (!BIT(m_ikbd_keylatch, 2)) data &= ioport("P32")->read(); | |
| 516 | if (!BIT(m_ikbd_keylatch, 3)) data &= ioport("P33")->read(); | |
| 517 | if (!BIT(m_ikbd_keylatch, 4)) data &= ioport("P34")->read(); | |
| 518 | if (!BIT(m_ikbd_keylatch, 5)) data &= ioport("P35")->read(); | |
| 519 | if (!BIT(m_ikbd_keylatch, 6)) data &= ioport("P36")->read(); | |
| 520 | if (!BIT(m_ikbd_keylatch, 7)) data &= ioport("P37")->read(); | |
| 521 | if (!BIT(m_ikbd_keylatch, 8)) data &= ioport("P40")->read(); | |
| 522 | if (!BIT(m_ikbd_keylatch, 9)) data &= ioport("P41")->read(); | |
| 523 | if (!BIT(m_ikbd_keylatch, 10)) data &= ioport("P42")->read(); | |
| 524 | if (!BIT(m_ikbd_keylatch, 11)) data &= ioport("P43")->read(); | |
| 525 | if (!BIT(m_ikbd_keylatch, 12)) data &= ioport("P44")->read(); | |
| 526 | if (!BIT(m_ikbd_keylatch, 13)) data &= ioport("P45")->read(); | |
| 527 | if (!BIT(m_ikbd_keylatch, 14)) data &= ioport("P46")->read(); | |
| 528 | if (!BIT(m_ikbd_keylatch, 15)) data &= ioport("P47")->read(); | |
| 529 | 529 | |
| 530 | 530 | return data; |
| 531 | 531 | } |
| r15082 | r15083 | |
| 549 | 549 | |
| 550 | 550 | */ |
| 551 | 551 | |
| 552 | UINT8 data = i | |
| 552 | UINT8 data = iop | |
| 553 | 553 | |
| 554 | 554 | // serial receive |
| 555 | 555 | data |= m_ikbd_tx << 3; |
| r15082 | r15083 | |
| 636 | 636 | |
| 637 | 637 | if (m_ikbd_joy) return 0xff; |
| 638 | 638 | |
| 639 | UINT8 data = i | |
| 639 | UINT8 data = iop | |
| 640 | 640 | |
| 641 | if ((i | |
| 641 | if ((iop | |
| 642 | 642 | { |
| 643 | 643 | data = (data & 0xf0) | m_ikbd_mouse; |
| 644 | 644 | } |
| r15082 | r15083 | |
| 1143 | 1143 | |
| 1144 | 1144 | */ |
| 1145 | 1145 | |
| 1146 | return (i | |
| 1146 | return (iop | |
| 1147 | 1147 | } |
| 1148 | 1148 | |
| 1149 | 1149 | |
| r15082 | r15083 | |
| 1573 | 1573 | PORT_INCLUDE( ikbd ) |
| 1574 | 1574 | |
| 1575 | 1575 | PORT_START("IKBD_JOY0") |
| 1576 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, PORTCOND_EQUALS, 0x01) // XB | |
| 1577 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, PORTCOND_EQUALS, 0x01) // XA | |
| 1578 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, PORTCOND_EQUALS, 0x01) // YA | |
| 1579 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, PORTCOND_EQUALS, 0x01) // YB | |
| 1576 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, EQUALS, 0x01) // XB | |
| 1577 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, EQUALS, 0x01) // XA | |
| 1578 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, EQUALS, 0x01) // YA | |
| 1579 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("config", 0x01, EQUALS, 0x01) // YB | |
| 1580 | 1580 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 1581 | 1581 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 1582 | 1582 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 1583 | 1583 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 1584 | 1584 | |
| 1585 | 1585 | PORT_START("IKBD_JOY1") |
| 1586 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("config", 0x01, | |
| 1586 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("config", 0x01, | |
| 1587 | 1587 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1588 | 1588 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1589 | 1589 | |
| 1590 | 1590 | PORT_START("IKBD_MOUSEX") |
| 1591 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CONDITION("config", 0x01, | |
| 1591 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CONDITION("config", 0x01, | |
| 1592 | 1592 | |
| 1593 | 1593 | PORT_START("IKBD_MOUSEY") |
| 1594 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CONDITION("config", 0x01, | |
| 1594 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_CONDITION("config", 0x01, | |
| 1595 | 1595 | INPUT_PORTS_END |
| 1596 | 1596 | |
| 1597 | 1597 | |
| r15082 | r15083 | |
| 1925 | 1925 | // ring indicator |
| 1926 | 1926 | |
| 1927 | 1927 | // monochrome monitor detect |
| 1928 | data |= i | |
| 1928 | data |= iop | |
| 1929 | 1929 | |
| 1930 | 1930 | return data; |
| 1931 | 1931 | } |
| r15082 | r15083 | |
| 1995 | 1995 | // ring indicator |
| 1996 | 1996 | |
| 1997 | 1997 | // monochrome monitor detect, DMA sound active |
| 1998 | data |= (i | |
| 1998 | data |= (iop | |
| 1999 | 1999 | |
| 2000 | 2000 | return data; |
| 2001 | 2001 | } |
| r15082 | r15083 | |
|---|---|---|
| 108 | 108 | UINT16 retVal = 0; |
| 109 | 109 | // Read country code |
| 110 | 110 | if (m_pr_cont == 0x0900) |
| 111 | retVal = i | |
| 111 | retVal = iop | |
| 112 | 112 | |
| 113 | 113 | // Regular keyboard read |
| 114 | 114 | if (m_pr_cont == 0x0800 || m_pr_cont == 0x0a00) |
| r15082 | r15083 | |
| 116 | 116 | retVal=0xff00; |
| 117 | 117 | switch(m_keyboard_line) |
| 118 | 118 | { |
| 119 | case 0x01: retVal = input_port_read(machine(), "LINE0") << 8; break; | |
| 120 | case 0x02: retVal = input_port_read(machine(), "LINE1") << 8; break; | |
| 121 | case 0x04: retVal = input_port_read(machine(), "LINE2") << 8; break; | |
| 122 | case 0x08: retVal = input_port_read(machine(), "LINE3") << 8; break; | |
| 123 | case 0x10: retVal = input_port_read(machine(), "LINE4") << 8; break; | |
| 124 | case 0x20: retVal = input_port_read(machine(), "LINE5") << 8; break; | |
| 125 | case 0x40: retVal = input_port_read(machine(), "LINE6") << 8; break; | |
| 126 | case 0x80: retVal = input_port_read(machine(), "LINE7") << 8; break; | |
| 119 | case 0x01: retVal = ioport("LINE0")->read() << 8; break; | |
| 120 | case 0x02: retVal = ioport("LINE1")->read() << 8; break; | |
| 121 | case 0x04: retVal = ioport("LINE2")->read() << 8; break; | |
| 122 | case 0x08: retVal = ioport("LINE3")->read() << 8; break; | |
| 123 | case 0x10: retVal = ioport("LINE4")->read() << 8; break; | |
| 124 | case 0x20: retVal = ioport("LINE5")->read() << 8; break; | |
| 125 | case 0x40: retVal = ioport("LINE6")->read() << 8; break; | |
| 126 | case 0x80: retVal = ioport("LINE7")->read() << 8; break; | |
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | return retVal; |
| r15082 | r15083 | |
|---|---|---|
| 111 | 111 | { |
| 112 | 112 | if (data & 0x01) |
| 113 | 113 | { |
| 114 | m_tvdraw_data = i | |
| 114 | m_tvdraw_data = iop | |
| 115 | 115 | |
| 116 | 116 | if (m_tvdraw_data < 4) m_tvdraw_data = 4; |
| 117 | 117 | if (m_tvdraw_data > 251) m_tvdraw_data = 251; |
| 118 | 118 | } |
| 119 | 119 | else |
| 120 | 120 | { |
| 121 | m_tvdraw_data = i | |
| 121 | m_tvdraw_data = iop | |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| r15082 | r15083 | |
| 128 | 128 | |
| 129 | 129 | READ8_MEMBER( sg1000_state::tvdraw_status_r ) |
| 130 | 130 | { |
| 131 | return i | |
| 131 | return iop | |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /*------------------------------------------------- |
| r15082 | r15083 | |
| 564 | 564 | |
| 565 | 565 | static const char *const keynames[] = { "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7" }; |
| 566 | 566 | |
| 567 | return i | |
| 567 | return iop | |
| 568 | 568 | } |
| 569 | 569 | |
| 570 | 570 | READ8_MEMBER( sc3000_state::ppi_pb_r ) |
| r15082 | r15083 | |
| 585 | 585 | static const char *const keynames[] = { "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7" }; |
| 586 | 586 | |
| 587 | 587 | /* keyboard */ |
| 588 | UINT8 data = i | |
| 588 | UINT8 data = iop | |
| 589 | 589 | |
| 590 | 590 | /* cartridge contact */ |
| 591 | 591 | data |= 0x10; |
| r15082 | r15083 | |
|---|---|---|
| 1471 | 1471 | |
| 1472 | 1472 | for (i=0; i<4; i++) |
| 1473 | 1473 | { |
| 1474 | typewriter_keys[i] = in | |
| 1474 | typewriter_keys[i] = machine.root_device().ioport | |
| 1475 | 1475 | } |
| 1476 | 1476 | |
| 1477 | 1477 | for (i=0; i<4; i++) |
| r15082 | r15083 | |
| 1511 | 1511 | |
| 1512 | 1512 | |
| 1513 | 1513 | /* read new state of control keys */ |
| 1514 | control_keys = | |
| 1514 | control_keys = s | |
| 1515 | 1515 | |
| 1516 | 1516 | if (control_keys & tx0_control) |
| 1517 | 1517 | { |
| r15082 | r15083 | |
| 1580 | 1580 | |
| 1581 | 1581 | |
| 1582 | 1582 | /* handle toggle switch register keys */ |
| 1583 | tsr_keys = ( | |
| 1583 | tsr_keys = ( | |
| 1584 | 1584 | |
| 1585 | 1585 | /* compute transitions */ |
| 1586 | 1586 | tsr_transitions = tsr_keys & (~ state->m_old_tsr_keys); |
| r15082 | r15083 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | READ_LINE_MEMBER( eti660_state::clear_r ) |
| 124 | 124 | { |
| 125 | return BIT(i | |
| 125 | return BIT(iop | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | READ_LINE_MEMBER( eti660_state::ef2_r ) |
| r15082 | r15083 | |
| 132 | 132 | |
| 133 | 133 | READ_LINE_MEMBER( eti660_state::ef4_r ) |
| 134 | 134 | { |
| 135 | return BIT(i | |
| 135 | return BIT(iop | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | WRITE_LINE_MEMBER( eti660_state::q_w ) |
| r15082 | r15083 | |
| 194 | 194 | |
| 195 | 195 | UINT8 data = 0xf0; |
| 196 | 196 | |
| 197 | if (!BIT(m_keylatch, 0)) data &= input_port_read(machine(), "PA0"); | |
| 198 | if (!BIT(m_keylatch, 1)) data &= input_port_read(machine(), "PA1"); | |
| 199 | if (!BIT(m_keylatch, 2)) data &= input_port_read(machine(), "PA2"); | |
| 200 | if (!BIT(m_keylatch, 3)) data &= input_port_read(machine(), "PA3"); | |
| 197 | if (!BIT(m_keylatch, 0)) data &= ioport("PA0")->read(); | |
| 198 | if (!BIT(m_keylatch, 1)) data &= ioport("PA1")->read(); | |
| 199 | if (!BIT(m_keylatch, 2)) data &= ioport("PA2")->read(); | |
| 200 | if (!BIT(m_keylatch, 3)) data &= ioport("PA3")->read(); | |
| 201 | 201 | |
| 202 | 202 | return data; |
| 203 | 203 | } |
| r15082 | r15083 | |
|---|---|---|
| 681 | 681 | |
| 682 | 682 | READ8_MEMBER( c128_state::vic_lightpen_x_cb ) |
| 683 | 683 | { |
| 684 | return i | |
| 684 | return iop | |
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | READ8_MEMBER( c128_state::vic_lightpen_y_cb ) |
| 688 | 688 | { |
| 689 | return i | |
| 689 | return iop | |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | 692 | READ8_MEMBER( c128_state::vic_lightpen_button_cb ) |
| 693 | 693 | { |
| 694 | return i | |
| 694 | return iop | |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | 697 | READ8_MEMBER( c128_state::vic_rdy_cb ) |
| 698 | 698 | { |
| 699 | return i | |
| 699 | return iop | |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | 702 | static const vic2_interface c128_vic2_ntsc_intf = { |
| r15082 | r15083 | |
|---|---|---|
| 452 | 452 | |
| 453 | 453 | switch (m_ksc) |
| 454 | 454 | { |
| 455 | case 0: data = input_port_read(machine(), "KSC0"); break; | |
| 456 | case 1: data = input_port_read(machine(), "KSC1"); break; | |
| 457 | case 2: data = input_port_read(machine(), "KSC2"); break; | |
| 458 | case 3: data = input_port_read(machine(), "KSC3"); break; | |
| 459 | case 4: data = input_port_read(machine(), "KSC4"); break; | |
| 460 | case 5: data = input_port_read(machine(), "KSC5"); break; | |
| 461 | case 6: data = input_port_read(machine(), "KSC6"); break; | |
| 462 | case 7: data = input_port_read(machine(), "KSC7"); break; | |
| 463 | case 8: data = input_port_read(machine(), "KSC8"); break; | |
| 464 | case 9: data = input_port_read(machine(), "SW4"); break; | |
| 455 | case 0: data = ioport("KSC0")->read(); break; | |
| 456 | case 1: data = ioport("KSC1")->read(); break; | |
| 457 | case 2: data = ioport("KSC2")->read(); break; | |
| 458 | case 3: data = ioport("KSC3")->read(); break; | |
| 459 | case 4: data = ioport("KSC4")->read(); break; | |
| 460 | case 5: data = ioport("KSC5")->read(); break; | |
| 461 | case 6: data = ioport("KSC6")->read(); break; | |
| 462 | case 7: data = ioport("KSC7")->read(); break; | |
| 463 | case 8: data = ioport("KSC8")->read(); break; | |
| 464 | case 9: data = ioport("SW4")->read(); break; | |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 251 | 251 | floppy_drive_set_ready_state(m_floppy0, d, 1); |
| 252 | 252 | floppy_drive_set_ready_state(m_floppy1, d, 1); |
| 253 | 253 | |
| 254 | if (i | |
| 254 | if (iop | |
| 255 | 255 | break; |
| 256 | 256 | } |
| 257 | 257 | } |
| r15082 | r15083 | |
| 270 | 270 | { |
| 271 | 271 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" }; |
| 272 | 272 | |
| 273 | UINT8 data = input_port_read(machine(), keynames[m_drive]); | |
| 274 | UINT8 special = input_port_read(machine(), "SPECIAL"); | |
| 273 | UINT8 data = ioport(keynames[m_drive])->read(); | |
| 274 | UINT8 special = ioport("SPECIAL")->read(); | |
| 275 | 275 | int ctrl = BIT(special, 0); |
| 276 | 276 | int shift = BIT(special, 2) & BIT(special, 1); |
| 277 | 277 | UINT8 keydata = 0xff; |
| r15082 | r15083 | |
| 764 | 764 | for (i = 0; i < 8; i++) ls259_w(*program, i, 0); |
| 765 | 765 | |
| 766 | 766 | // set FDC ready |
| 767 | if (!i | |
| 767 | if (!iop | |
| 768 | 768 | |
| 769 | 769 | // reset FDC |
| 770 | 770 | upd765_reset_w(m_fdc, 1); |
| r15082 | r15083 | |
|---|---|---|
| 61 | 61 | PORT_CONFNAME( 0x0f, 0x01, "Right Controller Port (P1)") PORT_CHANGED( coco_state::joystick_mode_changed, 0 ) |
| 62 | 62 | PORT_CONFSETTING( 0x00, "Unconnected" ) |
| 63 | 63 | PORT_CONFSETTING( 0x01, "Joystick" ) |
| 64 | PORT_CONFSETTING( 0x02, "The Rat Graphics Mouse" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_NOTEQUALS, 0x20) | |
| 65 | PORT_CONFSETTING( 0x03, "Diecom Light Gun Adaptor" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_NOTEQUALS, 0x30) | |
| 64 | PORT_CONFSETTING( 0x02, "The Rat Graphics Mouse" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, NOTEQUALS, 0x20) | |
| 65 | PORT_CONFSETTING( 0x03, "Diecom Light Gun Adaptor" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, NOTEQUALS, 0x30) | |
| 66 | 66 | PORT_CONFNAME( 0xf0, 0x10, "Left Controller Port (P2)") PORT_CHANGED( coco_state::joystick_mode_changed, 0 ) |
| 67 | 67 | PORT_CONFSETTING( 0x00, "Unconnected" ) |
| 68 | 68 | PORT_CONFSETTING( 0x10, "Joystick" ) |
| 69 | PORT_CONFSETTING( 0x20, "The Rat Graphics Mouse" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_NOTEQUALS, 0x02) | |
| 70 | PORT_CONFSETTING( 0x30, "Diecom Light Gun Adaptor" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_NOTEQUALS, 0x03) | |
| 69 | PORT_CONFSETTING( 0x20, "The Rat Graphics Mouse" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, NOTEQUALS, 0x02) | |
| 70 | PORT_CONFSETTING( 0x30, "Diecom Light Gun Adaptor" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, NOTEQUALS, 0x03) | |
| 71 | 71 | |
| 72 | 72 | PORT_START(HIRES_INTF_TAG) |
| 73 | 73 | PORT_CONFNAME( 0x07, 0x00, "Hi-Res Joystick Interfaces" ) |
| 74 | 74 | PORT_CONFSETTING( 0x00, "None" ) |
| 75 | PORT_CONFSETTING( 0x01, "Hi-Res in Right Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x01) | |
| 76 | PORT_CONFSETTING( 0x02, "Hi-Res CoCoMax 3 Style in Right Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x01) | |
| 77 | PORT_CONFSETTING( 0x03, "Hi-Res in Left Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x10) | |
| 78 | PORT_CONFSETTING( 0x04, "Hi-Res CoCoMax 3 Style in Left Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x10) | |
| 75 | PORT_CONFSETTING( 0x01, "Hi-Res in Right Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01) | |
| 76 | PORT_CONFSETTING( 0x02, "Hi-Res CoCoMax 3 Style in Right Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01) | |
| 77 | PORT_CONFSETTING( 0x03, "Hi-Res in Left Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10) | |
| 78 | PORT_CONFSETTING( 0x04, "Hi-Res CoCoMax 3 Style in Left Port" ) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10) | |
| 79 | 79 | INPUT_PORTS_END |
| 80 | 80 | |
| 81 | 81 | |
| r15082 | r15083 | |
| 86 | 86 | |
| 87 | 87 | static INPUT_PORTS_START( coco_joystick ) |
| 88 | 88 | PORT_START(JOYSTICK_RX_TAG) |
| 89 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 89 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 90 | 90 | PORT_START(JOYSTICK_RY_TAG) |
| 91 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 91 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 92 | 92 | PORT_START(JOYSTICK_LX_TAG) |
| 93 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 93 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 94 | 94 | PORT_START(JOYSTICK_LY_TAG) |
| 95 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 95 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 96 | 96 | PORT_START(JOYSTICK_BUTTONS_TAG) |
| 97 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x01) | |
| 98 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x10) | |
| 97 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01) | |
| 98 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10) | |
| 99 | 99 | INPUT_PORTS_END |
| 100 | 100 | |
| 101 | 101 |
| r15082 | r15083 | |
|---|---|---|
| 156 | 156 | |
| 157 | 157 | if (BIT(m_kp_matrix, 0)) |
| 158 | 158 | { |
| 159 | data |= i | |
| 159 | data |= iop | |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if (BIT(m_kp_matrix, 1)) |
| 163 | 163 | { |
| 164 | data |= i | |
| 164 | data |= iop | |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | if (BIT(m_kp_matrix, 2)) |
| 168 | 168 | { |
| 169 | data |= i | |
| 169 | data |= iop | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if (BIT(m_kp_matrix, 3)) |
| 173 | 173 | { |
| 174 | data |= i | |
| 174 | data |= iop | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 1177 | 1177 | running_machine &machine = device->machine(); |
| 1178 | 1178 | |
| 1179 | 1179 | /* Left controller port */ |
| 1180 | if ( in | |
| 1180 | if ( machine.root_device().ioport | |
| 1181 | 1181 | { |
| 1182 | 1182 | state->m_keypad_left_column = data / 16; |
| 1183 | 1183 | } |
| 1184 | 1184 | |
| 1185 | 1185 | /* Right controller port */ |
| 1186 | switch( in | |
| 1186 | switch( machine.root_device().ioport | |
| 1187 | 1187 | { |
| 1188 | 1188 | case 0x03: /* Keypad */ |
| 1189 | 1189 | state->m_keypad_right_column = data & 0x0F; |
| r15082 | r15083 | |
| 1201 | 1201 | UINT8 val = 0; |
| 1202 | 1202 | |
| 1203 | 1203 | /* Left controller port PINs 1-4 ( 4321 ) */ |
| 1204 | switch( in | |
| 1204 | switch( machine.root_device().ioport | |
| 1205 | 1205 | { |
| 1206 | 1206 | case 0x00: /* Joystick */ |
| 1207 | 1207 | case 0x05: /* Joystick w/Boostergrip */ |
| 1208 | val |= in | |
| 1208 | val |= machine.root_device().ioport | |
| 1209 | 1209 | break; |
| 1210 | 1210 | case 0x01: /* Paddle */ |
| 1211 | val |= in | |
| 1211 | val |= machine.root_device().ioport | |
| 1212 | 1212 | break; |
| 1213 | 1213 | case 0x02: /* Driving */ |
| 1214 | 1214 | val |= 0xC0; |
| 1215 | val |= ( driving_lookup[ ( in | |
| 1215 | val |= ( driving_lookup[ ( machine.root_device().ioport | |
| 1216 | 1216 | break; |
| 1217 | 1217 | case 0x06: /* Trakball CX-22 */ |
| 1218 | 1218 | case 0x07: /* Trakball CX-80 / ST mouse */ |
| r15082 | r15083 | |
| 1223 | 1223 | } |
| 1224 | 1224 | |
| 1225 | 1225 | /* Right controller port PINs 1-4 ( 4321 ) */ |
| 1226 | switch( in | |
| 1226 | switch( machine.root_device().ioport | |
| 1227 | 1227 | { |
| 1228 | 1228 | case 0x00: /* Joystick */ |
| 1229 | 1229 | case 0x05: /* Joystick w/Boostergrip */ |
| 1230 | val |= in | |
| 1230 | val |= machine.root_device().ioport | |
| 1231 | 1231 | break; |
| 1232 | 1232 | case 0x01: /* Paddle */ |
| 1233 | val |= in | |
| 1233 | val |= machine.root_device().ioport | |
| 1234 | 1234 | break; |
| 1235 | 1235 | case 0x02: /* Driving */ |
| 1236 | 1236 | val |= 0x0C; |
| 1237 | val |= ( driving_lookup[ ( in | |
| 1237 | val |= ( driving_lookup[ ( machine.root_device().ioport | |
| 1238 | 1238 | break; |
| 1239 | 1239 | case 0x06: /* Trakball CX-22 */ |
| 1240 | 1240 | case 0x07: /* Trakball CX-80 / ST mouse */ |
| r15082 | r15083 | |
| 1257 | 1257 | |
| 1258 | 1258 | static READ8_DEVICE_HANDLER( riot_input_port_8_r ) |
| 1259 | 1259 | { |
| 1260 | return | |
| 1260 | return | |
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | 1263 | static const riot6532_interface r6532_interface = |
| r15082 | r15083 | |
| 1302 | 1302 | switch( offset ) |
| 1303 | 1303 | { |
| 1304 | 1304 | case 0: /* Left controller port PIN 5 */ |
| 1305 | switch ( i | |
| 1305 | switch ( iop | |
| 1306 | 1306 | { |
| 1307 | 1307 | case 0x00: /* Joystick */ |
| 1308 | 1308 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1309 | 1309 | case 0x01: /* Paddle */ |
| 1310 | return i | |
| 1310 | return iop | |
| 1311 | 1311 | case 0x03: /* Keypad */ |
| 1312 | 1312 | for ( i = 0; i < 4; i++ ) |
| 1313 | 1313 | { |
| 1314 | 1314 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1315 | 1315 | { |
| 1316 | if ( ( i | |
| 1316 | if ( ( iop | |
| 1317 | 1317 | { |
| 1318 | 1318 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1319 | 1319 | } |
| r15082 | r15083 | |
| 1325 | 1325 | } |
| 1326 | 1326 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1327 | 1327 | case 0x05: /* Boostergrip joystick */ |
| 1328 | return ( i | |
| 1328 | return ( iop | |
| 1329 | 1329 | default: |
| 1330 | 1330 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1331 | 1331 | } |
| 1332 | 1332 | break; |
| 1333 | 1333 | case 1: /* Right controller port PIN 5 */ |
| 1334 | switch ( i | |
| 1334 | switch ( iop | |
| 1335 | 1335 | { |
| 1336 | 1336 | case 0x00: /* Joystick */ |
| 1337 | 1337 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1338 | 1338 | case 0x01: /* Paddle */ |
| 1339 | return i | |
| 1339 | return iop | |
| 1340 | 1340 | case 0x03: /* Keypad */ |
| 1341 | 1341 | for ( i = 0; i < 4; i++ ) |
| 1342 | 1342 | { |
| 1343 | 1343 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1344 | 1344 | { |
| 1345 | if ( ( i | |
| 1345 | if ( ( iop | |
| 1346 | 1346 | { |
| 1347 | 1347 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1348 | 1348 | } |
| r15082 | r15083 | |
| 1354 | 1354 | } |
| 1355 | 1355 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1356 | 1356 | case 0x05: /* Joystick w/Boostergrip */ |
| 1357 | return ( i | |
| 1357 | return ( iop | |
| 1358 | 1358 | default: |
| 1359 | 1359 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1360 | 1360 | } |
| 1361 | 1361 | break; |
| 1362 | 1362 | case 2: /* Left controller port PIN 9 */ |
| 1363 | switch ( i | |
| 1363 | switch ( iop | |
| 1364 | 1364 | { |
| 1365 | 1365 | case 0x00: /* Joystick */ |
| 1366 | 1366 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1367 | 1367 | case 0x01: /* Paddle */ |
| 1368 | return i | |
| 1368 | return iop | |
| 1369 | 1369 | case 0x03: /* Keypad */ |
| 1370 | 1370 | for ( i = 0; i < 4; i++ ) |
| 1371 | 1371 | { |
| 1372 | 1372 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1373 | 1373 | { |
| 1374 | if ( ( i | |
| 1374 | if ( ( iop | |
| 1375 | 1375 | { |
| 1376 | 1376 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1377 | 1377 | } |
| r15082 | r15083 | |
| 1383 | 1383 | } |
| 1384 | 1384 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1385 | 1385 | case 0x05: /* Joystick w/Boostergrip */ |
| 1386 | return ( i | |
| 1386 | return ( iop | |
| 1387 | 1387 | default: |
| 1388 | 1388 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1389 | 1389 | } |
| 1390 | 1390 | break; |
| 1391 | 1391 | case 3: /* Right controller port PIN 9 */ |
| 1392 | switch ( i | |
| 1392 | switch ( iop | |
| 1393 | 1393 | { |
| 1394 | 1394 | case 0x00: /* Joystick */ |
| 1395 | 1395 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1396 | 1396 | case 0x01: /* Paddle */ |
| 1397 | return i | |
| 1397 | return iop | |
| 1398 | 1398 | case 0x03: /* Keypad */ |
| 1399 | 1399 | for ( i = 0; i < 4; i++ ) |
| 1400 | 1400 | { |
| 1401 | 1401 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1402 | 1402 | { |
| 1403 | if ( ( i | |
| 1403 | if ( ( iop | |
| 1404 | 1404 | { |
| 1405 | 1405 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1406 | 1406 | } |
| r15082 | r15083 | |
| 1412 | 1412 | } |
| 1413 | 1413 | return TIA_INPUT_PORT_ALWAYS_ON; |
| 1414 | 1414 | case 0x05: /* Joystick w/Boostergrip */ |
| 1415 | return ( i | |
| 1415 | return ( iop | |
| 1416 | 1416 | default: |
| 1417 | 1417 | return TIA_INPUT_PORT_ALWAYS_OFF; |
| 1418 | 1418 | } |
| 1419 | 1419 | break; |
| 1420 | 1420 | case 4: /* Left controller port PIN 6 */ |
| 1421 | switch ( i | |
| 1421 | switch ( iop | |
| 1422 | 1422 | { |
| 1423 | 1423 | case 0x00: /* Joystick */ |
| 1424 | 1424 | case 0x05: /* Joystick w/Boostergrip */ |
| 1425 | return i | |
| 1425 | return iop | |
| 1426 | 1426 | case 0x01: /* Paddle */ |
| 1427 | 1427 | return 0xff; |
| 1428 | 1428 | case 0x02: /* Driving */ |
| 1429 | return i | |
| 1429 | return iop | |
| 1430 | 1430 | case 0x03: /* Keypad */ |
| 1431 | 1431 | for ( i = 0; i < 4; i++ ) |
| 1432 | 1432 | { |
| 1433 | 1433 | if ( ! ( ( m_keypad_left_column >> i ) & 0x01 ) ) |
| 1434 | 1434 | { |
| 1435 | if ( ( i | |
| 1435 | if ( ( iop | |
| 1436 | 1436 | { |
| 1437 | 1437 | return 0xff; |
| 1438 | 1438 | } |
| r15082 | r15083 | |
| 1444 | 1444 | } |
| 1445 | 1445 | return 0xff; |
| 1446 | 1446 | case 0x06: /* Trakball CX-22 */ |
| 1447 | return i | |
| 1447 | return iop | |
| 1448 | 1448 | default: |
| 1449 | 1449 | return 0xff; |
| 1450 | 1450 | } |
| 1451 | 1451 | break; |
| 1452 | 1452 | case 5: /* Right controller port PIN 6 */ |
| 1453 | switch ( i | |
| 1453 | switch ( iop | |
| 1454 | 1454 | { |
| 1455 | 1455 | case 0x00: /* Joystick */ |
| 1456 | 1456 | case 0x05: /* Joystick w/Boostergrip */ |
| 1457 | return i | |
| 1457 | return iop | |
| 1458 | 1458 | case 0x01: /* Paddle */ |
| 1459 | 1459 | return 0xff; |
| 1460 | 1460 | case 0x02: /* Driving */ |
| 1461 | return i | |
| 1461 | return iop | |
| 1462 | 1462 | case 0x03: /* Keypad */ |
| 1463 | 1463 | for ( i = 0; i < 4; i++ ) |
| 1464 | 1464 | { |
| 1465 | 1465 | if ( ! ( ( m_keypad_right_column >> i ) & 0x01 ) ) |
| 1466 | 1466 | { |
| 1467 | if ( ( i | |
| 1467 | if ( ( iop | |
| 1468 | 1468 | { |
| 1469 | 1469 | return 0xff; |
| 1470 | 1470 | } |
| r15082 | r15083 | |
| 1476 | 1476 | } |
| 1477 | 1477 | return 0xff; |
| 1478 | 1478 | case 0x06: /* Trakball CX-22 */ |
| 1479 | return i | |
| 1479 | return iop | |
| 1480 | 1480 | default: |
| 1481 | 1481 | return 0xff; |
| 1482 | 1482 | } |
| r15082 | r15083 | |
| 2056 | 2056 | static INPUT_PORTS_START( a2600 ) |
| 2057 | 2057 | |
| 2058 | 2058 | PORT_START("PADDLE1") |
| 2059 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2059 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2060 | 2060 | PORT_START("PADDLE3") |
| 2061 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(3) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2061 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(3) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2062 | 2062 | PORT_START("PADDLE2") |
| 2063 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2063 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2064 | 2064 | PORT_START("PADDLE4") |
| 2065 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(4) PORT_REVERSE PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2065 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(4) PORT_REVERSE PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2066 | 2066 | |
| 2067 | 2067 | PORT_START("BUTTONS_L") /* left port button(s) */ |
| 2068 | // PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x50) | |
| 2069 | // PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x50) | |
| 2070 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x50) | |
| 2071 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2072 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2073 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2074 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2068 | // PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x50) | |
| 2069 | // PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x50) | |
| 2070 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x50) | |
| 2071 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x20) | |
| 2072 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2073 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2074 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2075 | 2075 | |
| 2076 | 2076 | PORT_START("BUTTONS_R") /* right port button(s) */ |
| 2077 | // PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x05) | |
| 2078 | // PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x05) | |
| 2079 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x05) | |
| 2080 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2081 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2082 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2083 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2077 | // PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x05) | |
| 2078 | // PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x05) | |
| 2079 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x05) | |
| 2080 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x02) | |
| 2081 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2082 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2083 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2084 | 2084 | |
| 2085 | 2085 | PORT_START("SWA_JOY") /* SWCHA joystick */ |
| 2086 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2087 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2088 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2089 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2090 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2091 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2092 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2093 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2086 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2087 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2088 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2089 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x00) | |
| 2090 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2091 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2092 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2093 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x00) | |
| 2094 | 2094 | |
| 2095 | 2095 | PORT_START("SWA_PAD") /* SWCHA paddles */ |
| 2096 | 2096 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2097 | 2097 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2098 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2099 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2098 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x01) | |
| 2099 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x01) | |
| 2100 | 2100 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2101 | 2101 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2102 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2103 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2102 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x10) | |
| 2103 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x10) | |
| 2104 | 2104 | |
| 2105 | 2105 | PORT_START("SWB") /* SWCHB */ |
| 2106 | 2106 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset Game") PORT_CODE(KEYCODE_2) |
| r15082 | r15083 | |
| 2145 | 2145 | //PORT_CONFSETTING( 0x0b, "Save Key" ) |
| 2146 | 2146 | |
| 2147 | 2147 | PORT_START("KEYPAD_L") /* left keypad */ |
| 2148 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 1") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2149 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 2") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2150 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 3") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2151 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 4") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2152 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 5") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2153 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 6") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2154 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 7") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2155 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 8") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2156 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 9") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2157 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left *") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2158 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 0") PORT_CODE(KEYCODE_DEL_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2159 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left #") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2148 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 1") PORT_CODE(KEYCODE_7_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2149 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 2") PORT_CODE(KEYCODE_8_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2150 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 3") PORT_CODE(KEYCODE_9_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2151 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 4") PORT_CODE(KEYCODE_4_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2152 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 5") PORT_CODE(KEYCODE_5_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2153 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 6") PORT_CODE(KEYCODE_6_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2154 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 7") PORT_CODE(KEYCODE_1_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2155 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 8") PORT_CODE(KEYCODE_2_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2156 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 9") PORT_CODE(KEYCODE_3_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2157 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left *") PORT_CODE(KEYCODE_0_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2158 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left 0") PORT_CODE(KEYCODE_DEL_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2159 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("left #") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CONDITION("CONTROLLERS", 0xf0, EQUALS, 0x30) | |
| 2160 | 2160 | |
| 2161 | 2161 | PORT_START("KEYPAD_R") /* right keypad */ |
| 2162 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 1") PORT_CODE(KEYCODE_5) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2163 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 2") PORT_CODE(KEYCODE_6) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2164 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 3") PORT_CODE(KEYCODE_7) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2165 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 4") PORT_CODE(KEYCODE_R) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2166 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 5") PORT_CODE(KEYCODE_T) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2167 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 6") PORT_CODE(KEYCODE_Y) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2168 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 7") PORT_CODE(KEYCODE_F) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2169 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 8") PORT_CODE(KEYCODE_G) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2170 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 9") PORT_CODE(KEYCODE_H) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2171 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right *") PORT_CODE(KEYCODE_V) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2172 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 0") PORT_CODE(KEYCODE_B) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2173 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right #") PORT_CODE(KEYCODE_N) PORT_CONDITION("CONTROLLERS", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2162 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 1") PORT_CODE(KEYCODE_5) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2163 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 2") PORT_CODE(KEYCODE_6) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2164 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 3") PORT_CODE(KEYCODE_7) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2165 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 4") PORT_CODE(KEYCODE_R) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2166 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 5") PORT_CODE(KEYCODE_T) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2167 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 6") PORT_CODE(KEYCODE_Y) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2168 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 7") PORT_CODE(KEYCODE_F) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2169 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 8") PORT_CODE(KEYCODE_G) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2170 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 9") PORT_CODE(KEYCODE_H) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2171 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right *") PORT_CODE(KEYCODE_V) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2172 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right 0") PORT_CODE(KEYCODE_B) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2173 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("right #") PORT_CODE(KEYCODE_N) PORT_CONDITION("CONTROLLERS", 0x0f, EQUALS, 0x03) | |
| 2174 | 2174 | |
| 2175 | 2175 | PORT_START("WHEEL_L") /* left driving controller */ |
| 2176 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2176 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2177 | 2177 | |
| 2178 | 2178 | PORT_START("WHEEL_R") /* right driving controller */ |
| 2179 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2179 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2180 | 2180 | |
| 2181 | 2181 | PORT_START("GUNX_L") /* left light gun X */ |
| 2182 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2182 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2183 | 2183 | |
| 2184 | 2184 | PORT_START("GUNY_L") /* left light gun Y */ |
| 2185 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2185 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2186 | 2186 | |
| 2187 | 2187 | PORT_START("GUNX_R") /* right light gun X */ |
| 2188 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2188 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2189 | 2189 | |
| 2190 | 2190 | PORT_START("GUNY_R") /* right light gun Y */ |
| 2191 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2191 | // PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2192 | 2192 | |
| 2193 | 2193 | PORT_START("TRAKX_L") /* left trak ball X */ |
| 2194 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2194 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2195 | 2195 | |
| 2196 | 2196 | PORT_START("TRAKY_L") /* left trak ball Y */ |
| 2197 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2197 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_CONDITION("CONTROLLERS", 0xf0, | |
| 2198 | 2198 | |
| 2199 | 2199 | PORT_START("TRAKX_R") /* right trak ball X */ |
| 2200 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2200 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2201 | 2201 | |
| 2202 | 2202 | PORT_START("TRAKY_R") /* right trak ball Y */ |
| 2203 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2203 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(40) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_CONDITION("CONTROLLERS", 0x0f, | |
| 2204 | 2204 | |
| 2205 | 2205 | INPUT_PORTS_END |
| 2206 | 2206 |
| r15082 | r15083 | |
|---|---|---|
| 134 | 134 | READ8_MEMBER( mk2_state::mk2_read_a ) |
| 135 | 135 | { |
| 136 | 136 | int data=0xff; |
| 137 | int help=i | |
| 137 | int help=iop | |
| 138 | 138 | |
| 139 | 139 | switch (mos6530_portb_out_get(m_miot)&0x7) |
| 140 | 140 | { |
| r15082 | r15083 | |
| 147 | 147 | if (BIT(help, 0)) data&=~0x20; // A |
| 148 | 148 | break; |
| 149 | 149 | case 5: |
| 150 | if (BIT(input_port_read(machine(), "EXTRA"), 2)) data&=~0x8; // Enter | |
| 151 | if (BIT(input_port_read(machine(), "EXTRA"), 1)) data&=~0x10; // Clear | |
| 150 | if (BIT(ioport("EXTRA")->read(), 2)) data&=~0x8; // Enter | |
| 151 | if (BIT(ioport("EXTRA")->read(), 1)) data&=~0x10; // Clear | |
| 152 | 152 | if (BIT(help, 7)) data&=~0x20; // H |
| 153 | 153 | if (BIT(help, 6)) data&=~0x40; // G |
| 154 | 154 | break; |
| r15082 | r15083 | |
|---|---|---|
| 219 | 219 | "LINE8", "LINE9", "LINE10", "LINE11", "LINE12", "LINE13", "LINE14", "LINE15" |
| 220 | 220 | }; |
| 221 | 221 | |
| 222 | return i | |
| 222 | return iop | |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | READ8_MEMBER(pcw_state::pcw_keyboard_data_r) |
| r15082 | r15083 | |
| 354 | 354 | static int pcw_get_sys_status(running_machine &machine) |
| 355 | 355 | { |
| 356 | 356 | pcw_state *state = machine.driver_data<pcw_state>(); |
| 357 | return state->m_interrupt_counter | (in | |
| 357 | return state->m_interrupt_counter | (machine.root_device().ioport | |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | READ8_MEMBER(pcw_state::pcw_interrupt_counter_r) |
| r15082 | r15083 | |
| 588 | 588 | case 0x0e0: |
| 589 | 589 | { |
| 590 | 590 | /* spectravideo joystick */ |
| 591 | if (i | |
| 591 | if (iop | |
| 592 | 592 | { |
| 593 | return i | |
| 593 | return iop | |
| 594 | 594 | } |
| 595 | 595 | else |
| 596 | 596 | { |
| r15082 | r15083 | |
| 602 | 602 | { |
| 603 | 603 | |
| 604 | 604 | /* kempston joystick */ |
| 605 | return i | |
| 605 | return iop | |
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | case 0x0e1: |
| r15082 | r15083 | |
| 1262 | 1262 | /* from here on are the pretend dipswitches for machine config etc */ |
| 1263 | 1263 | PORT_START("EXTRA") |
| 1264 | 1264 | /* vblank */ |
| 1265 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 1265 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 1266 | 1266 | /* frame rate option */ |
| 1267 | 1267 | PORT_DIPNAME( 0x10, 0x010, "50/60Hz Frame Rate Option") |
| 1268 | 1268 | PORT_DIPSETTING( 0x00, "60Hz") |
| r15082 | r15083 | |
|---|---|---|
| 350 | 350 | |
| 351 | 351 | READ_LINE_MEMBER( studio2_state::clear_r ) |
| 352 | 352 | { |
| 353 | return BIT(i | |
| 353 | return BIT(iop | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | READ_LINE_MEMBER( studio2_state::ef3_r ) |
| 357 | 357 | { |
| 358 | return BIT(i | |
| 358 | return BIT(iop | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | READ_LINE_MEMBER( studio2_state::ef4_r ) |
| 362 | 362 | { |
| 363 | return BIT(i | |
| 363 | return BIT(iop | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | WRITE_LINE_MEMBER( studio2_state::q_w ) |
| r15082 | r15083 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | for (bit = 0; bit < 8; bit++) |
| 232 | 232 | { |
| 233 | if (!BIT(m_keylatch, bit)) data &= i | |
| 233 | if (!BIT(m_keylatch, bit)) data &= iop | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 160 | 160 | PORT_CONFNAME(0x08, 0x00, "Vsync cable hardware") |
| 161 | 161 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 162 | 162 | PORT_CONFSETTING( 0x08, DEF_STR( On ) ) |
| 163 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 163 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 164 | 164 | INPUT_PORTS_END |
| 165 | 165 | |
| 166 | 166 | static INPUT_PORTS_START(orica) |
| r15082 | r15083 | |
| 265 | 265 | PORT_CONFNAME(0x08, 0x00, "Vsync cable hardware") |
| 266 | 266 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 267 | 267 | PORT_CONFSETTING( 0x08, DEF_STR( On ) ) |
| 268 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 268 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 269 | 269 | INPUT_PORTS_END |
| 270 | 270 | |
| 271 | 271 | static INPUT_PORTS_START(telstrat) |
| r15082 | r15083 | |
| 282 | 282 | PORT_CONFNAME(0x08, 0x00, "Vsync cable hardware") |
| 283 | 283 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 284 | 284 | PORT_CONFSETTING( 0x08, DEF_STR( On ) ) |
| 285 | PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 285 | PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 286 | 286 | |
| 287 | 287 | PORT_START("JOY0") /* left joystick port */ |
| 288 | 288 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Joystick 0 Up") PORT_CODE(JOYCODE_X_RIGHT_SWITCH) |
| r15082 | r15083 | |
|---|---|---|
| 105 | 105 | { |
| 106 | 106 | char kbdrow[6]; |
| 107 | 107 | sprintf(kbdrow,"X%X",m_digit); |
| 108 | data = i | |
| 108 | data = iop | |
| 109 | 109 | } |
| 110 | 110 | return data; |
| 111 | 111 | } |
| r15082 | r15083 | |
|---|---|---|
| 271 | 271 | |
| 272 | 272 | if (state->m_jcart_io_data[0] & 0x40) |
| 273 | 273 | { |
| 274 | joy[0] = input_port_read_safe(space->machine(), "JCART3_3B", 0); | |
| 275 | joy[1] = input_port_read_safe(space->machine(), "JCART4_3B", 0); | |
| 274 | joy[0] = state->ioport("JCART3_3B")->read_safe(0); | |
| 275 | joy[1] = state->ioport("JCART4_3B")->read_safe(0); | |
| 276 | 276 | retdata = (state->m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); |
| 277 | 277 | } |
| 278 | 278 | else |
| 279 | 279 | { |
| 280 | joy[0] = ((input_port_read_safe(space->machine(), "JCART3_3B", 0) & 0xc0) >> 2) | | |
| 281 | (input_port_read_safe(space->machine(), "JCART3_3B", 0) & 0x03); | |
| 282 | joy[1] = ((input_port_read_safe(space->machine(), "JCART4_3B", 0) & 0xc0) >> 2) | | |
| 283 | (input_port_read_safe(space->machine(), "JCART4_3B", 0) & 0x03); | |
| 280 | joy[0] = ((state->ioport("JCART3_3B")->read_safe(0) & 0xc0) >> 2) | | |
| 281 | (state->ioport("JCART3_3B")->read_safe(0) & 0x03); | |
| 282 | joy[1] = ((state->ioport("JCART4_3B")->read_safe(0) & 0xc0) >> 2) | | |
| 283 | (state->ioport("JCART4_3B")->read_safe(0) & 0x03); | |
| 284 | 284 | retdata = (state->m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); |
| 285 | 285 | } |
| 286 | 286 | return retdata; |
| r15082 | r15083 | |
| 317 | 317 | switch (portnum) |
| 318 | 318 | { |
| 319 | 319 | case 0: |
| 320 | controller = (in | |
| 320 | controller = (machine.root_device().ioport | |
| 321 | 321 | break; |
| 322 | 322 | |
| 323 | 323 | case 1: |
| 324 | controller = (in | |
| 324 | controller = (machine.root_device().ioport | |
| 325 | 325 | break; |
| 326 | 326 | |
| 327 | 327 | default: |
| r15082 | r15083 | |
| 338 | 338 | { |
| 339 | 339 | /* here we read B, C & the additional buttons */ |
| 340 | 340 | retdata = (megadrive_io_data_regs[portnum] & helper_6b) | |
| 341 | (((input_port_read_safe(machine, pad6names[0][portnum], 0) & 0x30) | | |
| 342 | (input_port_read_safe(machine, pad6names[1][portnum], 0) & 0x0f)) & ~helper_6b); | |
| 341 | (((state->ioport(pad6names[0][portnum])->read_safe(0) & 0x30) | | |
| 342 | (state->ioport(pad6names[1][portnum])->read_safe(0) & 0x0f)) & ~helper_6b); | |
| 343 | 343 | } |
| 344 | 344 | else |
| 345 | 345 | { |
| 346 | 346 | /* here we read B, C & the directional buttons */ |
| 347 | 347 | retdata = (megadrive_io_data_regs[portnum] & helper_6b) | |
| 348 | ((i | |
| 348 | ((state->iop | |
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | 351 | else |
| r15082 | r15083 | |
| 354 | 354 | { |
| 355 | 355 | /* here we read ((Start & A) >> 2) | 0x00 */ |
| 356 | 356 | retdata = (megadrive_io_data_regs[portnum] & helper_6b) | |
| 357 | (((i | |
| 357 | (((state->iop | |
| 358 | 358 | } |
| 359 | 359 | else if (state->m_mess_io_stage[portnum]==2) |
| 360 | 360 | { |
| 361 | 361 | /* here we read ((Start & A) >> 2) | 0x0f */ |
| 362 | 362 | retdata = (megadrive_io_data_regs[portnum] & helper_6b) | |
| 363 | ((((i | |
| 363 | ((((state->iop | |
| 364 | 364 | } |
| 365 | 365 | else |
| 366 | 366 | { |
| 367 | 367 | /* here we read ((Start & A) >> 2) | Up and Down */ |
| 368 | 368 | retdata = (megadrive_io_data_regs[portnum] & helper_6b) | |
| 369 | ((((input_port_read_safe(machine, pad6names[0][portnum], 0) & 0xc0) >> 2) | | |
| 370 | (input_port_read_safe(machine, pad6names[0][portnum], 0) & 0x03)) & ~helper_6b); | |
| 369 | ((((state->ioport(pad6names[0][portnum])->read_safe(0) & 0xc0) >> 2) | | |
| 370 | (state->ioport(pad6names[0][portnum])->read_safe(0) & 0x03)) & ~helper_6b); | |
| 371 | 371 | } |
| 372 | 372 | } |
| 373 | 373 | |
| r15082 | r15083 | |
| 382 | 382 | { |
| 383 | 383 | /* here we read B, C & the directional buttons */ |
| 384 | 384 | retdata = (megadrive_io_data_regs[portnum] & helper_3b) | |
| 385 | (((i | |
| 385 | (((state->iop | |
| 386 | 386 | } |
| 387 | 387 | else |
| 388 | 388 | { |
| 389 | 389 | /* here we read ((Start & A) >> 2) | Up and Down */ |
| 390 | 390 | retdata = (megadrive_io_data_regs[portnum] & helper_3b) | |
| 391 | ((((input_port_read_safe(machine, pad3names[portnum], 0) & 0xc0) >> 2) | | |
| 392 | (input_port_read_safe(machine, pad3names[portnum], 0) & 0x03) | 0x40) & ~helper_3b); | |
| 391 | ((((state->ioport(pad3names[portnum])->read_safe(0) & 0xc0) >> 2) | | |
| 392 | (state->ioport(pad3names[portnum])->read_safe(0) & 0x03) | 0x40) & ~helper_3b); | |
| 393 | 393 | } |
| 394 | 394 | } |
| 395 | 395 | |
| r15082 | r15083 | |
| 405 | 405 | switch (portnum) |
| 406 | 406 | { |
| 407 | 407 | case 0: |
| 408 | controller = (in | |
| 408 | controller = (machine.root_device().ioport | |
| 409 | 409 | break; |
| 410 | 410 | |
| 411 | 411 | case 1: |
| 412 | controller = (in | |
| 412 | controller = (machine.root_device().ioport | |
| 413 | 413 | break; |
| 414 | 414 | |
| 415 | 415 | default: |
| r15082 | r15083 | |
| 463 | 463 | PORT_CONFSETTING( 0x00, "Joystick 3 Buttons" ) |
| 464 | 464 | |
| 465 | 465 | PORT_START("PAD1_3B") /* Joypad 1 (3 button + start) NOT READ DIRECTLY */ |
| 466 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 467 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 468 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 469 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 470 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 B") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 471 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 C") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 472 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 A") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 473 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 466 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 467 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 468 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 469 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 470 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 B") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 471 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 C") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 472 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 A") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 473 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 474 | 474 | |
| 475 | 475 | PORT_START("PAD2_3B") /* Joypad 2 (3 button + start) NOT READ DIRECTLY */ |
| 476 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 477 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 478 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 479 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 480 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 B") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 481 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 482 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 A") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 483 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 476 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 477 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 478 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 479 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 480 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 B") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 481 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 482 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 A") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 483 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 484 | 484 | |
| 485 | 485 | PORT_START("JCART3_3B") /* Joypad 3 on J-Cart (3 button + start) */ |
| 486 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 487 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 488 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 489 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 490 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_NAME("P3 B") PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 491 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_NAME("P3 C") PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 492 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_NAME("P3 A") PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 493 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, PORTCOND_EQUALS, 0x00) | |
| 486 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 487 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 488 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 489 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 490 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_NAME("P3 B") PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 491 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_NAME("P3 C") PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 492 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_NAME("P3 A") PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 493 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0xf00, EQUALS, 0x00) | |
| 494 | 494 | |
| 495 | 495 | PORT_START("JCART4_3B") /* Joypad 4 on J-Cart (3 button + start) */ |
| 496 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 497 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 498 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 499 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 500 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) PORT_NAME("P4 B") PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 501 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) PORT_NAME("P4 C") PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 502 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_NAME("P4 A") PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 503 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x00) | |
| 496 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 497 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 498 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 499 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 500 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) PORT_NAME("P4 B") PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 501 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) PORT_NAME("P4 C") PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 502 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_NAME("P4 A") PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 503 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x00) | |
| 504 | 504 | |
| 505 | 505 | PORT_START("PAD1_6B") /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */ |
| 506 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 507 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 508 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 509 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 510 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 B") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 511 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 C") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 512 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 A") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 513 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 506 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 507 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 508 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 509 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 510 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 B") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 511 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 C") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 512 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 A") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 513 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 514 | 514 | |
| 515 | 515 | PORT_START("EXTRA1") /* Extra buttons for Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */ |
| 516 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME("P1 Z") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 517 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("P1 Y") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 518 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("P1 X") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 519 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME("P1 Mode") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 516 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME("P1 Z") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 517 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("P1 Y") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 518 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("P1 X") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 519 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME("P1 Mode") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 520 | 520 | |
| 521 | 521 | PORT_START("PAD2_6B") /* Joypad 2 (6 button + start + mode) NOT READ DIRECTLY */ |
| 522 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 523 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 524 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 525 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 526 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 B") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 527 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 528 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 A") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 529 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 522 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 523 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 524 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 525 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 526 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 B") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 527 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 528 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 A") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 529 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 530 | 530 | |
| 531 | 531 | PORT_START("EXTRA2") /* Extra buttons for Joypad 2 (6 button + start + mode) NOT READ DIRECTLY */ |
| 532 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("P2 Z") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 533 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("P2 Y") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 534 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 X") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 535 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("P2 Mode") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 532 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("P2 Z") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 533 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("P2 Y") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 534 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 X") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 535 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("P2 Mode") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 536 | 536 | |
| 537 | 537 | PORT_START("RESET") /* Buttons on Genesis Console */ |
| 538 | 538 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?) |
| r15082 | r15083 | |
| 923 | 923 | switch (pen) |
| 924 | 924 | { |
| 925 | 925 | case PICO_PENX: |
| 926 | penpos = in | |
| 926 | penpos = machine.root_device().ioport("PENX")->read_safe( | |
| 927 | 927 | penpos |= 0x6; |
| 928 | 928 | penpos = penpos * 320 / 255; |
| 929 | 929 | penpos += 0x3d; |
| 930 | 930 | break; |
| 931 | 931 | case PICO_PENY: |
| 932 | penpos = in | |
| 932 | penpos = machine.root_device().ioport("PENY")->read_safe( | |
| 933 | 933 | penpos |= 0x6; |
| 934 | 934 | penpos = penpos * 251 / 255; |
| 935 | 935 | penpos += 0x1fc; |
| r15082 | r15083 | |
| 950 | 950 | retdata = (megadrive_region_export << 6) | (megadrive_region_pal << 5); |
| 951 | 951 | break; |
| 952 | 952 | case 1: |
| 953 | retdata = i | |
| 953 | retdata = state->iop | |
| 954 | 954 | break; |
| 955 | 955 | |
| 956 | 956 | /* |
| r15082 | r15083 | |
| 983 | 983 | either page 5 or page 6 is often unused. |
| 984 | 984 | */ |
| 985 | 985 | { |
| 986 | UINT8 tmp = i | |
| 986 | UINT8 tmp = state->iop | |
| 987 | 987 | if (tmp == 2 && state->m_page_register != 0x3f) |
| 988 | 988 | { |
| 989 | 989 | state->m_page_register <<= 1; |
| r15082 | r15083 | |
|---|---|---|
| 196 | 196 | if (BIT(m_digit, i)) |
| 197 | 197 | { |
| 198 | 198 | sprintf(kbdrow,"X%d",i); |
| 199 | m_keydata &= i | |
| 199 | m_keydata &= iop | |
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | UINT8 result = 0xff; |
| 81 | 81 | |
| 82 | if (BIT(offset, 0)) result &= input_port_read(machine(), "row_00"); | |
| 83 | if (BIT(offset, 1)) result &= input_port_read(machine(), "row_10"); | |
| 84 | if (BIT(offset, 2)) result &= input_port_read(machine(), "row_20"); | |
| 85 | if (BIT(offset, 3)) result &= input_port_read(machine(), "row_30"); | |
| 86 | if (BIT(offset, 4)) result &= input_port_read(machine(), "row_40"); | |
| 87 | if (BIT(offset, 5)) result &= input_port_read(machine(), "row_50"); | |
| 88 | if (BIT(offset, 6)) result &= input_port_read(machine(), "row_60"); | |
| 89 | if (BIT(offset, 7)) result &= input_port_read(machine(), "row_70"); | |
| 90 | if (BIT(offset, 8)) result &= input_port_read(machine(), "row_08"); | |
| 91 | if (BIT(offset, 9)) result &= input_port_read(machine(), "row_18"); | |
| 92 | if (BIT(offset, 10)) result &= input_port_read(machine(), "row_28"); | |
| 93 | if (BIT(offset, 11)) result &= input_port_read(machine(), "row_38"); | |
| 94 | if (BIT(offset, 12)) result &= input_port_read(machine(), "row_48"); | |
| 82 | if (BIT(offset, 0)) result &= ioport("row_00")->read(); | |
| 83 | if (BIT(offset, 1)) result &= ioport("row_10")->read(); | |
| 84 | if (BIT(offset, 2)) result &= ioport("row_20")->read(); | |
| 85 | if (BIT(offset, 3)) result &= ioport("row_30")->read(); | |
| 86 | if (BIT(offset, 4)) result &= ioport("row_40")->read(); | |
| 87 | if (BIT(offset, 5)) result &= ioport("row_50")->read(); | |
| 88 | if (BIT(offset, 6)) result &= ioport("row_60")->read(); | |
| 89 | if (BIT(offset, 7)) result &= ioport("row_70")->read(); | |
| 90 | if (BIT(offset, 8)) result &= ioport("row_08")->read(); | |
| 91 | if (BIT(offset, 9)) result &= ioport("row_18")->read(); | |
| 92 | if (BIT(offset, 10)) result &= ioport("row_28")->read(); | |
| 93 | if (BIT(offset, 11)) result &= ioport("row_38")->read(); | |
| 94 | if (BIT(offset, 12)) result &= ioport("row_48")->read(); | |
| 95 | 95 | |
| 96 | 96 | return result; |
| 97 | 97 | } |
| r15082 | r15083 | |
|---|---|---|
| 322 | 322 | |
| 323 | 323 | READ8_MEMBER( rex6000_state::touchscreen_r ) |
| 324 | 324 | { |
| 325 | UINT16 x = input_port_read(machine(), "PENX"); | |
| 326 | UINT16 y = input_port_read(machine(), "PENY"); | |
| 327 | UINT16 battery = input_port_read(machine(), "BATTERY"); | |
| 325 | UINT16 x = ioport("PENX")->read(); | |
| 326 | UINT16 y = ioport("PENY")->read(); | |
| 327 | UINT16 battery = ioport("BATTERY")->read(); | |
| 328 | 328 | |
| 329 | 329 | switch (offset) |
| 330 | 330 | { |
| 331 | 331 | case 0x08: |
| 332 | return ((i | |
| 332 | return ((iop | |
| 333 | 333 | case 0x09: |
| 334 | 334 | if (m_touchscreen[4] & 0x80) |
| 335 | 335 | return (battery>>0) & 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | if (bank != state->last_sndram_bank) |
| 121 | 121 | { |
| 122 | 122 | state->last_sndram_bank = bank; |
| 123 | state->membank("sndbank")->set_base( | |
| 123 | state->membank("sndbank")->set_base(st | |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 |
| r15082 | r15083 | |
|---|---|---|
| 82 | 82 | static INPUT_CHANGED( panel_check ) |
| 83 | 83 | { |
| 84 | 84 | ssem_state *state = field.machine().driver_data<ssem_state>(); |
| 85 | UINT8 edit0_state = input_port_read(field.machine(), "EDIT0"); | |
| 86 | UINT8 edit1_state = input_port_read(field.machine(), "EDIT1"); | |
| 87 | UINT8 edit2_state = input_port_read(field.machine(), "EDIT2"); | |
| 88 | UINT8 edit3_state = input_port_read(field.machine(), "EDIT3"); | |
| 89 | UINT8 misc_state = input_port_read(field.machine(), "MISC"); | |
| 85 | UINT8 edit0_state = field.machine().root_device().ioport("EDIT0")->read(); | |
| 86 | UINT8 edit1_state = field.machine().root_device().ioport("EDIT1")->read(); | |
| 87 | UINT8 edit2_state = field.machine().root_device().ioport("EDIT2")->read(); | |
| 88 | UINT8 edit3_state = field.machine().root_device().ioport("EDIT3")->read(); | |
| 89 | UINT8 misc_state = field.machine().root_device().ioport("MISC")->read(); | |
| 90 | 90 | device_t *ssem_cpu = field.machine().device("maincpu"); |
| 91 | 91 | |
| 92 | 92 | switch( (int)(FPTR)param ) |
| r15082 | r15083 | |
|---|---|---|
| 26 | 26 | { |
| 27 | 27 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7" }; |
| 28 | 28 | |
| 29 | return i | |
| 29 | return iop | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /* Address maps */ |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | int table = 0, row, col; |
| 228 | 228 | int keydata = 0xff; |
| 229 | 229 | |
| 230 | UINT8 line_mod = i | |
| 230 | UINT8 line_mod = iop | |
| 231 | 231 | |
| 232 | 232 | if((line_mod & 0x07) && (line_mod & 0x18)) |
| 233 | 233 | { |
| r15082 | r15083 | |
| 245 | 245 | // scan keyboard |
| 246 | 246 | for (row = 0; row < 12; row++) |
| 247 | 247 | { |
| 248 | UINT8 data = i | |
| 248 | UINT8 data = iop | |
| 249 | 249 | |
| 250 | 250 | for (col = 0; col < 8; col++) |
| 251 | 251 | { |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | |
| 248 | 248 | UINT8 data = 0; |
| 249 | 249 | |
| 250 | if (BIT(m_keylatch, 0)) data |= input_port_read(machine(), "ROW0") | input_port_read(machine(), "JOY0"); | |
| 251 | if (BIT(m_keylatch, 1)) data |= input_port_read(machine(), "ROW1") | input_port_read(machine(), "JOY1"); | |
| 252 | if (BIT(m_keylatch, 2)) data |= input_port_read(machine(), "ROW2"); | |
| 253 | if (BIT(m_keylatch, 3)) data |= input_port_read(machine(), "ROW3"); | |
| 254 | if (BIT(m_keylatch, 4)) data |= input_port_read(machine(), "ROW4"); | |
| 255 | if (BIT(m_keylatch, 5)) data |= input_port_read(machine(), "ROW5"); | |
| 256 | if (BIT(m_keylatch, 6)) data |= input_port_read(machine(), "ROW6"); | |
| 257 | if (BIT(m_keylatch, 7)) data |= input_port_read(machine(), "ROW7"); | |
| 250 | if (BIT(m_keylatch, 0)) data |= ioport("ROW0")->read() | ioport("JOY0")->read(); | |
| 251 | if (BIT(m_keylatch, 1)) data |= ioport("ROW1")->read() | ioport("JOY1")->read(); | |
| 252 | if (BIT(m_keylatch, 2)) data |= ioport("ROW2")->read(); | |
| 253 | if (BIT(m_keylatch, 3)) data |= ioport("ROW3")->read(); | |
| 254 | if (BIT(m_keylatch, 4)) data |= ioport("ROW4")->read(); | |
| 255 | if (BIT(m_keylatch, 5)) data |= ioport("ROW5")->read(); | |
| 256 | if (BIT(m_keylatch, 6)) data |= ioport("ROW6")->read(); | |
| 257 | if (BIT(m_keylatch, 7)) data |= ioport("ROW7")->read(); | |
| 258 | 258 | |
| 259 | 259 | return data; |
| 260 | 260 | } |
| r15082 | r15083 | |
| 943 | 943 | { |
| 944 | 944 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 945 | 945 | |
| 946 | m_disk_type=i | |
| 946 | m_disk_type=iop | |
| 947 | 947 | logerror("disktype=%d\n",m_disk_type); |
| 948 | 948 | |
| 949 | 949 | m_printer_char=0; |
| r15082 | r15083 | |
|---|---|---|
| 46 | 46 | { |
| 47 | 47 | char kbdrow[6]; |
| 48 | 48 | sprintf(kbdrow,"X%X",offset); |
| 49 | return i | |
| 49 | return iop | |
| 50 | 50 | } |
| 51 | 51 | else |
| 52 | 52 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 520 | 520 | |
| 521 | 521 | static READ8_DEVICE_HANDLER( amiga_cia_0_portA_r ) |
| 522 | 522 | { |
| 523 | UINT8 ret = | |
| 523 | UINT8 ret = | |
| 524 | 524 | ret |= device->machine().device<amiga_fdc>("fdc")->ciaapra_r(); |
| 525 | 525 | return ret; |
| 526 | 526 | } |
| r15082 | r15083 | |
| 528 | 528 | |
| 529 | 529 | static READ8_DEVICE_HANDLER( amiga_cia_0_cdtv_portA_r ) |
| 530 | 530 | { |
| 531 | return | |
| 531 | return | |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | |
| r15082 | r15083 | |
| 563 | 563 | |
| 564 | 564 | static UINT16 amiga_read_joy0dat(running_machine &machine) |
| 565 | 565 | { |
| 566 | if ( in | |
| 566 | if ( machine.root_device().ioport | |
| 567 | 567 | /* Joystick */ |
| 568 | return in | |
| 568 | return machine. | |
| 569 | 569 | } else { |
| 570 | 570 | /* Mouse */ |
| 571 | 571 | int input; |
| 572 | input = ( input_port_read(machine, "P0MOUSEX") & 0xff ); | |
| 573 | input |= ( input_port_read(machine, "P0MOUSEY") & 0xff ) << 8; | |
| 572 | input = ( machine.root_device().ioport("P0MOUSEX")->read() & 0xff ); | |
| 573 | input |= ( machine.root_device().ioport("P0MOUSEY")->read() & 0xff ) << 8; | |
| 574 | 574 | return input; |
| 575 | 575 | } |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | static UINT16 amiga_read_joy1dat(running_machine &machine) |
| 579 | 579 | { |
| 580 | if ( in | |
| 580 | if ( machine.root_device().ioport | |
| 581 | 581 | /* Joystick */ |
| 582 | return in | |
| 582 | return machine. | |
| 583 | 583 | } else { |
| 584 | 584 | /* Mouse */ |
| 585 | 585 | int input; |
| 586 | input = ( input_port_read(machine, "P1MOUSEX") & 0xff ); | |
| 587 | input |= ( input_port_read(machine, "P1MOUSEY") & 0xff ) << 8; | |
| 586 | input = ( machine.root_device().ioport("P1MOUSEX")->read() & 0xff ); | |
| 587 | input |= ( machine.root_device().ioport("P1MOUSEY")->read() & 0xff ) << 8; | |
| 588 | 588 | return input; |
| 589 | 589 | } |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | static void amiga_reset(running_machine &machine) |
| 593 | 593 | { |
| 594 | if (in | |
| 594 | if (machine.root_device().ioport | |
| 595 | 595 | { |
| 596 | 596 | /* Install RTC */ |
| 597 | 597 | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xdc0000, 0xdc003f, FUNC(amiga_clock_r), FUNC(amiga_clock_w)); |
| r15082 | r15083 | |
|---|---|---|
| 192 | 192 | static INPUT_PORTS_START(sorcerer) |
| 193 | 193 | PORT_START("VS") |
| 194 | 194 | /* vblank */ |
| 195 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 195 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 196 | 196 | |
| 197 | 197 | /* line 0 */ |
| 198 | 198 | PORT_START("LINE0") |
| r15082 | r15083 | |
|---|---|---|
| 936 | 936 | |
| 937 | 937 | void abc800_state::machine_reset() |
| 938 | 938 | { |
| 939 | m_sb = i | |
| 939 | m_sb = iop | |
| 940 | 940 | |
| 941 | 941 | m_fetch_charram = 0; |
| 942 | 942 | bankswitch(); |
| r15082 | r15083 | |
| 967 | 967 | |
| 968 | 968 | void abc802_state::machine_reset() |
| 969 | 969 | { |
| 970 | UINT8 config = input_port_read(machine(), "CONFIG"); | |
| 971 | m_sb = input_port_read(machine(), "SB"); | |
| 970 | UINT8 config = ioport("CONFIG")->read(); | |
| 971 | m_sb = ioport("SB")->read(); | |
| 972 | 972 | |
| 973 | 973 | // memory banking |
| 974 | 974 | m_lrs = 1; |
| r15082 | r15083 | |
| 1025 | 1025 | |
| 1026 | 1026 | void abc806_state::machine_reset() |
| 1027 | 1027 | { |
| 1028 | m_sb = i | |
| 1028 | m_sb = iop | |
| 1029 | 1029 | |
| 1030 | 1030 | // setup memory banking |
| 1031 | 1031 | int bank; |
| r15082 | r15083 | |
|---|---|---|
| 915 | 915 | int i; |
| 916 | 916 | |
| 917 | 917 | /* TODO: is there a bit that sets this up? */ |
| 918 | m_color_mode = i | |
| 918 | m_color_mode = iop | |
| 919 | 919 | |
| 920 | 920 | if(m_color_mode) //color |
| 921 | 921 | { |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | UINT8 data; |
| 70 | 70 | char kbdrow[6]; |
| 71 | 71 | sprintf(kbdrow,"X%d",m_digit); |
| 72 | data = i | |
| 72 | data = iop | |
| 73 | 73 | return ((data << 4) ^ 0xf0) | data; |
| 74 | 74 | } |
| 75 | 75 |
| r15082 | r15083 | |
|---|---|---|
| 120 | 120 | "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", |
| 121 | 121 | "LINE8", "LINE9", "LINEA", "LINEB", "LINEC", "LINED", "LINEE", "LINEF" |
| 122 | 122 | }; |
| 123 | return i | |
| 123 | return iop | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | READ8_MEMBER(tvc_state::tvc_flipflop_r) |
| r15082 | r15083 | |
|---|---|---|
| 473 | 473 | |
| 474 | 474 | READ_LINE_MEMBER( tmc1800_state::clear_r ) |
| 475 | 475 | { |
| 476 | return BIT(i | |
| 476 | return BIT(iop | |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | READ_LINE_MEMBER( tmc1800_state::ef2_r ) |
| r15082 | r15083 | |
| 484 | 484 | READ_LINE_MEMBER( tmc1800_state::ef3_r ) |
| 485 | 485 | { |
| 486 | 486 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 487 | UINT8 data = ~i | |
| 487 | UINT8 data = ~iop | |
| 488 | 488 | |
| 489 | 489 | return BIT(data, m_keylatch % 8); |
| 490 | 490 | } |
| r15082 | r15083 | |
| 514 | 514 | |
| 515 | 515 | READ_LINE_MEMBER( osc1000b_state::clear_r ) |
| 516 | 516 | { |
| 517 | return BIT(i | |
| 517 | return BIT(iop | |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | READ_LINE_MEMBER( osc1000b_state::ef2_r ) |
| r15082 | r15083 | |
| 525 | 525 | READ_LINE_MEMBER( osc1000b_state::ef3_r ) |
| 526 | 526 | { |
| 527 | 527 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 528 | UINT8 data = ~i | |
| 528 | UINT8 data = ~iop | |
| 529 | 529 | |
| 530 | 530 | return BIT(data, m_keylatch % 8); |
| 531 | 531 | } |
| r15082 | r15083 | |
| 555 | 555 | |
| 556 | 556 | READ_LINE_MEMBER( tmc2000_state::clear_r ) |
| 557 | 557 | { |
| 558 | return BIT(i | |
| 558 | return BIT(iop | |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | 561 | READ_LINE_MEMBER( tmc2000_state::ef2_r ) |
| r15082 | r15083 | |
| 566 | 566 | READ_LINE_MEMBER( tmc2000_state::ef3_r ) |
| 567 | 567 | { |
| 568 | 568 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 569 | UINT8 data = ~i | |
| 569 | UINT8 data = ~iop | |
| 570 | 570 | |
| 571 | 571 | return BIT(data, m_keylatch % 8); |
| 572 | 572 | } |
| r15082 | r15083 | |
| 611 | 611 | |
| 612 | 612 | READ_LINE_MEMBER( nano_state::clear_r ) |
| 613 | 613 | { |
| 614 | int run = BIT(input_port_read(machine(), "RUN"), 0); | |
| 615 | int monitor = BIT(input_port_read(machine(), "MONITOR"), 0); | |
| 614 | int run = BIT(ioport("RUN")->read(), 0); | |
| 615 | int monitor = BIT(ioport("MONITOR")->read(), 0); | |
| 616 | 616 | |
| 617 | 617 | return run & monitor; |
| 618 | 618 | } |
| r15082 | r15083 | |
| 625 | 625 | READ_LINE_MEMBER( nano_state::ef3_r ) |
| 626 | 626 | { |
| 627 | 627 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 628 | UINT8 data = ~i | |
| 628 | UINT8 data = ~iop | |
| 629 | 629 | |
| 630 | 630 | return BIT(data, m_keylatch % 8); |
| 631 | 631 | } |
| r15082 | r15083 | |
|---|---|---|
| 552 | 552 | |
| 553 | 553 | for (i = 0; i < 8; i++) |
| 554 | 554 | { |
| 555 | value = i | |
| 555 | value = iop | |
| 556 | 556 | |
| 557 | 557 | if (value != 0xff) |
| 558 | 558 | { |
| r15082 | r15083 | |
| 648 | 648 | |
| 649 | 649 | UINT8 data = 0xff; |
| 650 | 650 | |
| 651 | if (!BIT(m_keylatch, 0)) data &= input_port_read(machine(), "ROW0"); | |
| 652 | if (!BIT(m_keylatch, 1)) data &= input_port_read(machine(), "ROW1"); | |
| 653 | if (!BIT(m_keylatch, 2)) data &= input_port_read(machine(), "ROW2"); | |
| 654 | if (!BIT(m_keylatch, 3)) data &= input_port_read(machine(), "ROW3"); | |
| 655 | if (!BIT(m_keylatch, 4)) data &= input_port_read(machine(), "ROW4"); | |
| 656 | if (!BIT(m_keylatch, 5)) data &= input_port_read(machine(), "ROW5"); | |
| 657 | if (!BIT(m_keylatch, 6)) data &= input_port_read(machine(), "ROW6"); | |
| 658 | if (!BIT(m_keylatch, 7)) data &= input_port_read(machine(), "ROW7"); | |
| 651 | if (!BIT(m_keylatch, 0)) data &= ioport("ROW0")->read(); | |
| 652 | if (!BIT(m_keylatch, 1)) data &= ioport("ROW1")->read(); | |
| 653 | if (!BIT(m_keylatch, 2)) data &= ioport("ROW2")->read(); | |
| 654 | if (!BIT(m_keylatch, 3)) data &= ioport("ROW3")->read(); | |
| 655 | if (!BIT(m_keylatch, 4)) data &= ioport("ROW4")->read(); | |
| 656 | if (!BIT(m_keylatch, 5)) data &= ioport("ROW5")->read(); | |
| 657 | if (!BIT(m_keylatch, 6)) data &= ioport("ROW6")->read(); | |
| 658 | if (!BIT(m_keylatch, 7)) data &= ioport("ROW7")->read(); | |
| 659 | 659 | |
| 660 | 660 | return data; |
| 661 | 661 | } |
| r15082 | r15083 | |
| 680 | 680 | { |
| 681 | 681 | UINT8 data = 0xff; |
| 682 | 682 | |
| 683 | if (!BIT(m_joylatch, 0)) data &= input_port_read(machine(), "JOY0"); | |
| 684 | if (!BIT(m_joylatch, 1)) data &= input_port_read(machine(), "JOY1"); | |
| 685 | if (!BIT(m_joylatch, 2)) data &= input_port_read(machine(), "JOY2"); | |
| 686 | if (!BIT(m_joylatch, 3)) data &= input_port_read(machine(), "JOY3"); | |
| 683 | if (!BIT(m_joylatch, 0)) data &= ioport("JOY0")->read(); | |
| 684 | if (!BIT(m_joylatch, 1)) data &= ioport("JOY1")->read(); | |
| 685 | if (!BIT(m_joylatch, 2)) data &= ioport("JOY2")->read(); | |
| 686 | if (!BIT(m_joylatch, 3)) data &= ioport("JOY3")->read(); | |
| 687 | 687 | |
| 688 | 688 | return data; |
| 689 | 689 | } |
| r15082 | r15083 | |
|---|---|---|
| 1395 | 1395 | UINT8 res,dir_en,in_r; |
| 1396 | 1396 | |
| 1397 | 1397 | res = 0xff; |
| 1398 | in_r = ~i | |
| 1398 | in_r = ~iop | |
| 1399 | 1399 | |
| 1400 | 1400 | if(m_joy_mode & 0x40) |
| 1401 | 1401 | { |
| r15082 | r15083 | |
| 1751 | 1751 | beep_set_frequency(machine.device(BEEPER_TAG),4096); |
| 1752 | 1752 | beep_set_state(machine.device(BEEPER_TAG),0); |
| 1753 | 1753 | |
| 1754 | // state->m_monitor_type = in | |
| 1754 | // state->m_monitor_type = machine.root_device().ioport | |
| 1755 | 1755 | } |
| 1756 | 1756 | |
| 1757 | 1757 | static const gfx_layout mz2500_cg_layout = |
| r15082 | r15083 | |
| 1931 | 1931 | |
| 1932 | 1932 | res = 0xff; |
| 1933 | 1933 | for(i=0;i<0xe;i++) |
| 1934 | res &= | |
| 1934 | res &= | |
| 1935 | 1935 | |
| 1936 | 1936 | state->m_pio_latchb = res; |
| 1937 | 1937 | |
| 1938 | 1938 | return res; |
| 1939 | 1939 | } |
| 1940 | 1940 | |
| 1941 | state->m_pio_latchb = | |
| 1941 | state->m_pio_latchb = | |
| 1942 | 1942 | |
| 1943 | return | |
| 1943 | return | |
| 1944 | 1944 | } |
| 1945 | 1945 | |
| 1946 | 1946 | #if 0 |
| r15082 | r15083 | |
|---|---|---|
| 581 | 581 | case 0: // key press |
| 582 | 582 | m_towns_kb_output = 0x80; |
| 583 | 583 | m_towns_kb_extend = scancode & 0x7f; |
| 584 | if(i | |
| 584 | if(iop | |
| 585 | 585 | m_towns_kb_output |= 0x04; |
| 586 | if(i | |
| 586 | if(iop | |
| 587 | 587 | m_towns_kb_output |= 0x08; |
| 588 | if(i | |
| 588 | if(iop | |
| 589 | 589 | m_towns_kb_output |= 0x20; |
| 590 | 590 | break; |
| 591 | 591 | case 1: // key release |
| 592 | 592 | m_towns_kb_output = 0x90; |
| 593 | 593 | m_towns_kb_extend = scancode & 0x7f; |
| 594 | if(i | |
| 594 | if(iop | |
| 595 | 595 | m_towns_kb_output |= 0x04; |
| 596 | if(i | |
| 596 | if(iop | |
| 597 | 597 | m_towns_kb_output |= 0x08; |
| 598 | if(i | |
| 598 | if(iop | |
| 599 | 599 | m_towns_kb_output |= 0x20; |
| 600 | 600 | break; |
| 601 | 601 | case 2: // extended byte |
| r15082 | r15083 | |
| 622 | 622 | scan = 0; |
| 623 | 623 | for(port=0;port<4;port++) |
| 624 | 624 | { |
| 625 | portval = i | |
| 625 | portval = iop | |
| 626 | 626 | for(bit=0;bit<32;bit++) |
| 627 | 627 | { |
| 628 | 628 | if(((portval & (1<<bit))) != ((m_kb_prev[port] & (1<<bit)))) |
| r15082 | r15083 | |
| 840 | 840 | READ32_MEMBER(towns_state::towns_padport_r) |
| 841 | 841 | { |
| 842 | 842 | UINT32 ret = 0; |
| 843 | UINT32 porttype = | |
| 843 | UINT32 porttype = | |
| 844 | 844 | UINT8 extra1; |
| 845 | 845 | UINT8 extra2; |
| 846 | 846 | UINT32 state; |
| r15082 | r15083 | |
| 851 | 851 | ret |= 0x00ff0000; |
| 852 | 852 | if((porttype & 0x0f) == 0x01) |
| 853 | 853 | { |
| 854 | extra1 = | |
| 854 | extra1 = | |
| 855 | 855 | |
| 856 | 856 | if(m_towns_pad_mask & 0x10) |
| 857 | ret |= ( | |
| 857 | ret |= ( | |
| 858 | 858 | else |
| 859 | ret |= ( | |
| 859 | ret |= ( | |
| 860 | 860 | |
| 861 | 861 | if(extra1 & 0x01) // Run button = left+right |
| 862 | 862 | ret &= ~0x0000000c; |
| r15082 | r15083 | |
| 870 | 870 | } |
| 871 | 871 | if((porttype & 0xf0) == 0x10) |
| 872 | 872 | { |
| 873 | extra2 = | |
| 873 | extra2 = | |
| 874 | 874 | |
| 875 | 875 | if(m_towns_pad_mask & 0x20) |
| 876 | ret |= (( | |
| 876 | ret |= (( | |
| 877 | 877 | else |
| 878 | ret |= (( | |
| 878 | ret |= (( | |
| 879 | 879 | |
| 880 | 880 | if(extra2 & 0x01) |
| 881 | 881 | ret &= ~0x000c0000; |
| r15082 | r15083 | |
| 889 | 889 | } |
| 890 | 890 | if((porttype & 0x0f) == 0x04) // 6-button joystick |
| 891 | 891 | { |
| 892 | extra1 = | |
| 892 | extra1 = | |
| 893 | 893 | |
| 894 | 894 | if(m_towns_pad_mask & 0x10) |
| 895 | 895 | ret |= 0x0000007f; |
| 896 | 896 | else |
| 897 | ret |= ( | |
| 897 | ret |= ( | |
| 898 | 898 | |
| 899 | 899 | if(!(m_towns_pad_mask & 0x10)) |
| 900 | 900 | { |
| r15082 | r15083 | |
| 921 | 921 | } |
| 922 | 922 | if((porttype & 0xf0) == 0x40) // 6-button joystick |
| 923 | 923 | { |
| 924 | extra2 = | |
| 924 | extra2 = | |
| 925 | 925 | |
| 926 | 926 | if(m_towns_pad_mask & 0x20) |
| 927 | 927 | ret |= 0x007f0000; |
| 928 | 928 | else |
| 929 | ret |= (( | |
| 929 | ret |= (( | |
| 930 | 930 | |
| 931 | 931 | if(!(m_towns_pad_mask & 0x10)) |
| 932 | 932 | { |
| r15082 | r15083 | |
| 975 | 975 | } |
| 976 | 976 | |
| 977 | 977 | // button states are always visible |
| 978 | state = | |
| 978 | state = | |
| 979 | 979 | if(!(state & 0x01)) |
| 980 | 980 | ret |= 0x00000010; |
| 981 | 981 | if(!(state & 0x02)) |
| r15082 | r15083 | |
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | 1009 | // button states are always visible |
| 1010 | state = | |
| 1010 | state = | |
| 1011 | 1011 | if(!(state & 0x01)) |
| 1012 | 1012 | ret |= 0x00100000; |
| 1013 | 1013 | if(!(state & 0x02)) |
| r15082 | r15083 | |
| 1022 | 1022 | WRITE32_MEMBER(towns_state::towns_pad_mask_w) |
| 1023 | 1023 | { |
| 1024 | 1024 | UINT8 current_x,current_y; |
| 1025 | UINT32 type = | |
| 1025 | UINT32 type = | |
| 1026 | 1026 | |
| 1027 | 1027 | if(ACCESSING_BITS_16_23) |
| 1028 | 1028 | { |
| r15082 | r15083 | |
| 1034 | 1034 | if(m_towns_mouse_output == MOUSE_START) |
| 1035 | 1035 | { |
| 1036 | 1036 | m_towns_mouse_output = MOUSE_X_HIGH; |
| 1037 | current_x = input_port_read(space.machine(),"mouse2"); | |
| 1038 | current_y = input_port_read(space.machine(),"mouse3"); | |
| 1037 | current_x = space.machine().root_device().ioport("mouse2")->read(); | |
| 1038 | current_y = space.machine().root_device().ioport("mouse3")->read(); | |
| 1039 | 1039 | m_towns_mouse_x = m_prev_x - current_x; |
| 1040 | 1040 | m_towns_mouse_y = m_prev_y - current_y; |
| 1041 | 1041 | m_prev_x = current_x; |
| r15082 | r15083 | |
| 1050 | 1050 | if(m_towns_mouse_output == MOUSE_START) |
| 1051 | 1051 | { |
| 1052 | 1052 | m_towns_mouse_output = MOUSE_SYNC; |
| 1053 | current_x = input_port_read(space.machine(),"mouse2"); | |
| 1054 | current_y = input_port_read(space.machine(),"mouse3"); | |
| 1053 | current_x = space.machine().root_device().ioport("mouse2")->read(); | |
| 1054 | current_y = space.machine().root_device().ioport("mouse3")->read(); | |
| 1055 | 1055 | m_towns_mouse_x = m_prev_x - current_x; |
| 1056 | 1056 | m_towns_mouse_y = m_prev_y - current_y; |
| 1057 | 1057 | m_prev_x = current_x; |
| r15082 | r15083 | |
| 1070 | 1070 | if(m_towns_mouse_output == MOUSE_START) |
| 1071 | 1071 | { |
| 1072 | 1072 | m_towns_mouse_output = MOUSE_X_HIGH; |
| 1073 | current_x = input_port_read(space.machine(),"mouse2"); | |
| 1074 | current_y = input_port_read(space.machine(),"mouse3"); | |
| 1073 | current_x = space.machine().root_device().ioport("mouse2")->read(); | |
| 1074 | current_y = space.machine().root_device().ioport("mouse3")->read(); | |
| 1075 | 1075 | m_towns_mouse_x = m_prev_x - current_x; |
| 1076 | 1076 | m_towns_mouse_y = m_prev_y - current_y; |
| 1077 | 1077 | m_prev_x = current_x; |
| r15082 | r15083 | |
| 1086 | 1086 | if(m_towns_mouse_output == MOUSE_START) |
| 1087 | 1087 | { |
| 1088 | 1088 | m_towns_mouse_output = MOUSE_SYNC; |
| 1089 | current_x = input_port_read(space.machine(),"mouse2"); | |
| 1090 | current_y = input_port_read(space.machine(),"mouse3"); | |
| 1089 | current_x = space.machine().root_device().ioport("mouse2")->read(); | |
| 1090 | current_y = space.machine().root_device().ioport("mouse3")->read(); | |
| 1091 | 1091 | m_towns_mouse_x = m_prev_x - current_x; |
| 1092 | 1092 | m_towns_mouse_y = m_prev_y - current_y; |
| 1093 | 1093 | m_prev_x = current_x; |
| r15082 | r15083 | |
| 2331 | 2331 | PORT_BIT(0x20000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("COPY") |
| 2332 | 2332 | |
| 2333 | 2333 | PORT_START("joy1") |
| 2334 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2335 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2336 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2337 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2338 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2339 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2340 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2341 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2334 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2335 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2336 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2337 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2338 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2339 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2340 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2341 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2342 | 2342 | |
| 2343 | 2343 | PORT_START("joy1_ex") |
| 2344 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("1P Run") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2345 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("1P Select") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2346 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2347 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2348 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2349 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2350 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2351 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2344 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("1P Run") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2345 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("1P Select") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2346 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2347 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2348 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2349 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2350 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2351 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2352 | 2352 | |
| 2353 | 2353 | PORT_START("joy2") |
| 2354 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2355 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2356 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2357 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2358 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2359 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2360 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2361 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2354 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2355 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2356 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2357 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2358 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2359 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2360 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2361 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2362 | 2362 | |
| 2363 | 2363 | PORT_START("joy2_ex") |
| 2364 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("2P Run") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2365 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("2P Select") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2366 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2367 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2368 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2369 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2370 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2371 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2364 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("2P Run") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2365 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("2P Select") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2366 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2367 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2368 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2369 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2370 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2371 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2372 | 2372 | |
| 2373 | 2373 | PORT_START("6b_joy1") |
| 2374 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2375 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2376 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2377 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2378 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2379 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2380 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2381 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2374 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2375 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2376 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2377 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2378 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2379 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2380 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2381 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2382 | 2382 | |
| 2383 | 2383 | PORT_START("6b_joy1_ex") |
| 2384 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("1P Run") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2385 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("1P Select") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2386 | PORT_BIT(0x00000004,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2387 | PORT_BIT(0x00000008,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2388 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2389 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2390 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2391 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 2384 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("1P Run") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2385 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("1P Select") PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2386 | PORT_BIT(0x00000004,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2387 | PORT_BIT(0x00000008,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2388 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2389 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2390 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2391 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x04) | |
| 2392 | 2392 | |
| 2393 | 2393 | PORT_START("6b_joy2") |
| 2394 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2395 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2396 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2397 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2398 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2399 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2400 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2401 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2394 | PORT_BIT(0x00000001,IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2395 | PORT_BIT(0x00000002,IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2396 | PORT_BIT(0x00000004,IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2397 | PORT_BIT(0x00000008,IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2398 | PORT_BIT(0x00000010,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2399 | PORT_BIT(0x00000020,IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2400 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2401 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2402 | 2402 | |
| 2403 | 2403 | PORT_START("6b_joy2_ex") |
| 2404 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("2P Run") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2405 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("2P Select") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2406 | PORT_BIT(0x00000004,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2407 | PORT_BIT(0x00000008,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2408 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2409 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2410 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2411 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 2404 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH, IPT_START) PORT_NAME("2P Run") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2405 | PORT_BIT(0x00000002,IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("2P Select") PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2406 | PORT_BIT(0x00000004,IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2407 | PORT_BIT(0x00000008,IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2408 | PORT_BIT(0x00000010,IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2409 | PORT_BIT(0x00000020,IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2410 | PORT_BIT(0x00000040,IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2411 | PORT_BIT(0x00000080,IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x40) | |
| 2412 | 2412 | |
| 2413 | 2413 | PORT_START("mouse1") // buttons |
| 2414 | 2414 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left mouse button") PORT_CODE(MOUSECODE_BUTTON1) |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | PORT_START("vblank") /* IN2 */ |
| 75 | 75 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 76 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 76 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 77 | 77 | |
| 78 | 78 | PORT_START("console_buttons") /* IN3 */ |
| 79 | 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Reset") PORT_CODE(KEYCODE_R) |
| r15082 | r15083 | |
|---|---|---|
| 107 | 107 | switch (offset) |
| 108 | 108 | { |
| 109 | 109 | case UPD7810_PORTA: |
| 110 | data = i | |
| 110 | data = iop | |
| 111 | 111 | break; |
| 112 | 112 | default: |
| 113 | 113 | logerror("%.4x port %d read %.2x\n", (int)cpu_get_reg(&space.device(), CPUINFO_INT_PC), offset, data); |
| r15082 | r15083 | |
|---|---|---|
| 472 | 472 | m_keylatch = 0; |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | m_keydata = i | |
| 475 | m_keydata = iop | |
| 476 | 476 | |
| 477 | 477 | output_set_digit_value(m_keylatch, m_segment_data[m_keylatch]); |
| 478 | 478 | } |
| r15082 | r15083 | |
|---|---|---|
| 172 | 172 | |
| 173 | 173 | UINT8 data = 0xff; |
| 174 | 174 | if (BIT(m_ppi_portc, 4)) |
| 175 | data &= i | |
| 175 | data &= iop | |
| 176 | 176 | if (BIT(m_ppi_portc, 5)) |
| 177 | data &= i | |
| 177 | data &= iop | |
| 178 | 178 | if (BIT(m_ppi_portc, 6)) |
| 179 | data &= i | |
| 179 | data &= iop | |
| 180 | 180 | |
| 181 | 181 | return data; |
| 182 | 182 | } |
| r15082 | r15083 | |
|---|---|---|
| 148 | 148 | UINT8 result = 0; |
| 149 | 149 | |
| 150 | 150 | result |= m_de; |
| 151 | result |= i | |
| 151 | result |= iop | |
| 152 | 152 | |
| 153 | 153 | return result; |
| 154 | 154 | } |
| r15082 | r15083 | |
| 176 | 176 | einstein_state *einstein = machine.driver_data<einstein_state>(); |
| 177 | 177 | UINT8 data = 0xff; |
| 178 | 178 | |
| 179 | if (!BIT(einstein->m_keyboard_line, 0)) data &= input_port_read(machine, "LINE0"); | |
| 180 | if (!BIT(einstein->m_keyboard_line, 1)) data &= input_port_read(machine, "LINE1"); | |
| 181 | if (!BIT(einstein->m_keyboard_line, 2)) data &= input_port_read(machine, "LINE2"); | |
| 182 | if (!BIT(einstein->m_keyboard_line, 3)) data &= input_port_read(machine, "LINE3"); | |
| 183 | if (!BIT(einstein->m_keyboard_line, 4)) data &= input_port_read(machine, "LINE4"); | |
| 184 | if (!BIT(einstein->m_keyboard_line, 5)) data &= input_port_read(machine, "LINE5"); | |
| 185 | if (!BIT(einstein->m_keyboard_line, 6)) data &= input_port_read(machine, "LINE6"); | |
| 186 | if (!BIT(einstein->m_keyboard_line, 7)) data &= input_port_read(machine, "LINE7"); | |
| 179 | if (!BIT(einstein->m_keyboard_line, 0)) data &= machine.root_device().ioport("LINE0")->read(); | |
| 180 | if (!BIT(einstein->m_keyboard_line, 1)) data &= machine.root_device().ioport("LINE1")->read(); | |
| 181 | if (!BIT(einstein->m_keyboard_line, 2)) data &= machine.root_device().ioport("LINE2")->read(); | |
| 182 | if (!BIT(einstein->m_keyboard_line, 3)) data &= machine.root_device().ioport("LINE3")->read(); | |
| 183 | if (!BIT(einstein->m_keyboard_line, 4)) data &= machine.root_device().ioport("LINE4")->read(); | |
| 184 | if (!BIT(einstein->m_keyboard_line, 5)) data &= machine.root_device().ioport("LINE5")->read(); | |
| 185 | if (!BIT(einstein->m_keyboard_line, 6)) data &= machine.root_device().ioport("LINE6")->read(); | |
| 186 | if (!BIT(einstein->m_keyboard_line, 7)) data &= machine.root_device().ioport("LINE7")->read(); | |
| 187 | 187 | |
| 188 | 188 | einstein->m_keyboard_data = data; |
| 189 | 189 | } |
| r15082 | r15083 | |
| 196 | 196 | einstein_scan_keyboard(timer.machine()); |
| 197 | 197 | |
| 198 | 198 | /* if /fire1 or /fire2 is 0, signal a fire interrupt */ |
| 199 | if (( | |
| 199 | if (( | |
| 200 | 200 | { |
| 201 | 201 | einstein->m_interrupt |= EINSTEIN_FIRE_INT; |
| 202 | 202 | } |
| r15082 | r15083 | |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /* double sided drive connected? */ |
| 259 | if ( | |
| 259 | if ( | |
| 260 | 260 | { |
| 261 | 261 | /* bit 4 selects the side then */ |
| 262 | 262 | //floppy->ss_w(BIT(data, 4)); |
| r15082 | r15083 | |
| 331 | 331 | m_interrupt &= ~EINSTEIN_KEY_INT; |
| 332 | 332 | |
| 333 | 333 | /* bit 0 and 1: fire buttons on the joysticks */ |
| 334 | data |= i | |
| 334 | data |= iop | |
| 335 | 335 | |
| 336 | 336 | /* bit 2 to 4: printer status */ |
| 337 | 337 | data |= centronics->busy_r() << 2; |
| r15082 | r15083 | |
| 339 | 339 | data |= centronics->fault_r() << 4; |
| 340 | 340 | |
| 341 | 341 | /* bit 5 to 7: graph, control and shift key */ |
| 342 | data |= i | |
| 342 | data |= iop | |
| 343 | 343 | |
| 344 | 344 | if(VERBOSE_KEYBOARD) |
| 345 | 345 | logerror("%s: einstein_kybintmsk_r %02x\n", machine().describe_context(), data); |
| r15082 | r15083 | |
| 423 | 423 | { |
| 424 | 424 | einstein_state *state = machine.driver_data<einstein_state>(); |
| 425 | 425 | //device_t *floppy; |
| 426 | //UINT8 config = in | |
| 426 | //UINT8 config = machine.root_device().ioport | |
| 427 | 427 | |
| 428 | 428 | /* save pointers to our devices */ |
| 429 | 429 | state->m_color_screen = machine.device("screen"); |
| r15082 | r15083 | |
|---|---|---|
| 764 | 764 | |
| 765 | 765 | */ |
| 766 | 766 | |
| 767 | return i | |
| 767 | return iop | |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | WRITE8_MEMBER( wangpc_state::ppi_pc_w ) |
| r15082 | r15083 | |
|---|---|---|
| 141 | 141 | case 0x28: // KCR (Keypad Control Reg) |
| 142 | 142 | if (data & 0x04 ) |
| 143 | 143 | { |
| 144 | m_vboy_regs.klb = (data & 0x01) ? 0 : (input_port_read(machine(), "INPUT") & 0x00ff); | |
| 145 | m_vboy_regs.khb = (data & 0x01) ? 0 : (input_port_read(machine(), "INPUT") & 0xff00) >> 8; | |
| 144 | m_vboy_regs.klb = (data & 0x01) ? 0 : (ioport("INPUT")->read() & 0x00ff); | |
| 145 | m_vboy_regs.khb = (data & 0x01) ? 0 : (ioport("INPUT")->read() & 0xff00) >> 8; | |
| 146 | 146 | } |
| 147 | 147 | else if (data & 0x20) |
| 148 | 148 | { |
| 149 | m_vboy_regs.klb = input_port_read(machine(), "INPUT") & 0x00ff; | |
| 150 | m_vboy_regs.khb = (input_port_read(machine(), "INPUT") & 0xff00) >> 8; | |
| 149 | m_vboy_regs.klb = ioport("INPUT")->read() & 0x00ff; | |
| 150 | m_vboy_regs.khb = (ioport("INPUT")->read() & 0xff00) >> 8; | |
| 151 | 151 | } |
| 152 | 152 | m_vboy_regs.kcr = (data | 0x48) & 0xfd; // according to docs: bit 6 & bit 3 are unused and set to 1, bit 1 is read only. |
| 153 | 153 | break; |
| r15082 | r15083 | |
|---|---|---|
| 273 | 273 | { |
| 274 | 274 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7" }; |
| 275 | 275 | |
| 276 | return i | |
| 276 | return iop | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | READ8_MEMBER(ti99_2_state::ti99_2_read_misc_cru) |
| r15082 | r15083 | |
|---|---|---|
| 388 | 388 | { |
| 389 | 389 | fk1_state *state = timer.machine().driver_data<fk1_state>(); |
| 390 | 390 | |
| 391 | if ( | |
| 391 | if ( | |
| 392 | 392 | { |
| 393 | 393 | state->m_int_vector = 6; |
| 394 | 394 | cputag_set_input_line(timer.machine(), "maincpu", 0, HOLD_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 365 | 365 | /* Input ports */ |
| 366 | 366 | static INPUT_PORTS_START( multi8 ) |
| 367 | 367 | PORT_START("VBLANK") |
| 368 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 368 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 369 | 369 | |
| 370 | 370 | PORT_START("key1") //0x00-0x1f |
| 371 | 371 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH,IPT_UNUSED) //0x00 null |
| r15082 | r15083 | |
| 484 | 484 | multi8_state *state = timer.machine().driver_data<multi8_state>(); |
| 485 | 485 | static const char *const portnames[3] = { "key1","key2","key3" }; |
| 486 | 486 | int i,port_i,scancode; |
| 487 | UINT8 keymod = | |
| 487 | UINT8 keymod = | |
| 488 | 488 | scancode = 0; |
| 489 | 489 | |
| 490 | 490 | state->m_shift_press_flag = ((keymod & 0x02) >> 1); |
| r15082 | r15083 | |
| 493 | 493 | { |
| 494 | 494 | for(i=0;i<32;i++) |
| 495 | 495 | { |
| 496 | if(( | |
| 496 | if(( | |
| 497 | 497 | { |
| 498 | 498 | //key_flag = 1; |
| 499 | 499 | if(!state->m_shift_press_flag) // shift not pressed |
| r15082 | r15083 | |
| 578 | 578 | |
| 579 | 579 | READ8_MEMBER( multi8_state::porta_r ) |
| 580 | 580 | { |
| 581 | int vsync = (i | |
| 581 | int vsync = (iop | |
| 582 | 582 | /* |
| 583 | 583 | -x-- ---- kanji rom is present (0) yes |
| 584 | 584 | --x- ---- vsync |
| r15082 | r15083 | |
|---|---|---|
| 86 | 86 | data = data & ~0x000000F2; |
| 87 | 87 | // keys |
| 88 | 88 | data |= 0x00F2; |
| 89 | if ((port_c & 0x01) == 0) data &= ~input_port_read( device->machine(), "PORTF-01"); | |
| 90 | if ((port_c & 0x02) == 0) data &= ~input_port_read( device->machine(), "PORTF-02"); | |
| 91 | if ((port_c & 0x04) == 0) data &= ~input_port_read( device->machine(), "PORTF-04"); | |
| 92 | if ((port_c & 0x08) == 0) data &= ~input_port_read( device->machine(), "PORTF-08"); | |
| 93 | if ((port_c & 0x10) == 0) data &= ~input_port_read( device->machine(), "PORTF-10"); | |
| 94 | data &= ~input_port_read( device->machine(), "PORTF"); | |
| 89 | if ((port_c & 0x01) == 0) data &= ~device->machine().root_device().ioport( "PORTF-01")->read(); | |
| 90 | if ((port_c & 0x02) == 0) data &= ~device->machine().root_device().ioport( "PORTF-02")->read(); | |
| 91 | if ((port_c & 0x04) == 0) data &= ~device->machine().root_device().ioport( "PORTF-04")->read(); | |
| 92 | if ((port_c & 0x08) == 0) data &= ~device->machine().root_device().ioport( "PORTF-08")->read(); | |
| 93 | if ((port_c & 0x10) == 0) data &= ~device->machine().root_device().ioport( "PORTF-10")->read(); | |
| 94 | data &= ~device->machine().root_device().ioport( "PORTF")->read(); | |
| 95 | 95 | } |
| 96 | 96 | break; |
| 97 | 97 | case S3C2440_GPIO_PORT_G : |
| r15082 | r15083 | |
| 99 | 99 | data = data & ~0x00008001; |
| 100 | 100 | // keys |
| 101 | 101 | data = data | 0x8000; |
| 102 | data &= ~ | |
| 102 | data &= ~ | |
| 103 | 103 | // no sd card inserted |
| 104 | 104 | data = data | 0x0001; |
| 105 | 105 | } |
| r15082 | r15083 | |
|---|---|---|
| 297 | 297 | UINT8 data = 0x10; |
| 298 | 298 | |
| 299 | 299 | // DIP switches |
| 300 | data |= i | |
| 300 | data |= iop | |
| 301 | 301 | |
| 302 | 302 | // floppy interrupt |
| 303 | 303 | data |= wd17xx_intrq_r(m_fdc) << 6; |
| r15082 | r15083 | |
| 530 | 530 | data |= m_centronics->busy_r(); |
| 531 | 531 | |
| 532 | 532 | // DIP switches |
| 533 | data |= i | |
| 533 | data |= iop | |
| 534 | 534 | |
| 535 | 535 | // floppy interrupt |
| 536 | 536 | data |= wd17xx_intrq_r(m_fdc) << 6; |
| r15082 | r15083 | |
|---|---|---|
| 523 | 523 | { |
| 524 | 524 | int result = 0xff; |
| 525 | 525 | |
| 526 | if (!BIT(offset, 0)) result &= input_port_read(machine(), "joystick_0"); | |
| 527 | if (!BIT(offset, 1)) result &= input_port_read(machine(), "joystick_0_arm"); | |
| 528 | if (!BIT(offset, 2)) result &= input_port_read(machine(), "joystick_1"); | |
| 529 | if (!BIT(offset, 3)) result &= input_port_read(machine(), "joystick_1_arm"); | |
| 526 | if (!BIT(offset, 0)) result &= ioport("joystick_0")->read(); | |
| 527 | if (!BIT(offset, 1)) result &= ioport("joystick_0_arm")->read(); | |
| 528 | if (!BIT(offset, 2)) result &= ioport("joystick_1")->read(); | |
| 529 | if (!BIT(offset, 3)) result &= ioport("joystick_1_arm")->read(); | |
| 530 | 530 | |
| 531 | 531 | return result; |
| 532 | 532 | } |
| r15082 | r15083 | |
| 536 | 536 | UINT8 result = 0x3f; |
| 537 | 537 | |
| 538 | 538 | /* bit 0 to 5, keyboard input */ |
| 539 | if (!BIT(offset, 0)) result &= input_port_read(machine(), "keyboard_0"); | |
| 540 | if (!BIT(offset, 1)) result &= input_port_read(machine(), "keyboard_1"); | |
| 541 | if (!BIT(offset, 2)) result &= input_port_read(machine(), "keyboard_2"); | |
| 542 | if (!BIT(offset, 3)) result &= input_port_read(machine(), "keyboard_3"); | |
| 543 | if (!BIT(offset, 4)) result &= input_port_read(machine(), "keyboard_4"); | |
| 544 | if (!BIT(offset, 5)) result &= input_port_read(machine(), "keyboard_5"); | |
| 545 | if (!BIT(offset, 6)) result &= input_port_read(machine(), "keyboard_6"); | |
| 546 | if (!BIT(offset, 7)) result &= input_port_read(machine(), "keyboard_7"); | |
| 539 | if (!BIT(offset, 0)) result &= ioport("keyboard_0")->read(); | |
| 540 | if (!BIT(offset, 1)) result &= ioport("keyboard_1")->read(); | |
| 541 | if (!BIT(offset, 2)) result &= ioport("keyboard_2")->read(); | |
| 542 | if (!BIT(offset, 3)) result &= ioport("keyboard_3")->read(); | |
| 543 | if (!BIT(offset, 4)) result &= ioport("keyboard_4")->read(); | |
| 544 | if (!BIT(offset, 5)) result &= ioport("keyboard_5")->read(); | |
| 545 | if (!BIT(offset, 6)) result &= ioport("keyboard_6")->read(); | |
| 546 | if (!BIT(offset, 7)) result &= ioport("keyboard_7")->read(); | |
| 547 | 547 | |
| 548 | 548 | /* bit 6, cassette input */ |
| 549 | 549 | result |= ((m_cassette->input()) > 0 ? 1 : 0) << 6; |
| r15082 | r15083 | |
|---|---|---|
| 60 | 60 | ssystem3_state *state = machine.driver_data<ssystem3_state>(); |
| 61 | 61 | memset(&state->m_playfield, 0, sizeof(state->m_playfield)); |
| 62 | 62 | state->m_playfield.signal=FALSE; |
| 63 | // state->m_playfield.on=TRUE; //in | |
| 63 | // state->m_playfield.on=TRUE; //machine.root_device().ioport | |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | static void ssystem3_playfield_write(running_machine &machine, int reset, int signal) |
| r15082 | r15083 | |
| 112 | 112 | static void ssystem3_playfield_read(running_machine &machine, int *on, int *ready) |
| 113 | 113 | { |
| 114 | 114 | //ssystem3_state *state = machine.driver_data<ssystem3_state>(); |
| 115 | *on=!(in | |
| 115 | *on=!(machine.root_device().ioport | |
| 116 | 116 | // *on=!state->m_playfield.on; |
| 117 | 117 | *ready=FALSE; |
| 118 | 118 | } |
| r15082 | r15083 | |
| 129 | 129 | ssystem3_state *state = device->machine().driver_data<ssystem3_state>(); |
| 130 | 130 | UINT8 data=0xff; |
| 131 | 131 | #if 1 // time switch |
| 132 | if (!(state->m_porta&0x10)) data&=input_port_read(device->machine(), "matrix1")|0xf1; | |
| 133 | if (!(state->m_porta&0x20)) data&=input_port_read(device->machine(), "matrix2")|0xf1; | |
| 134 | if (!(state->m_porta&0x40)) data&=input_port_read(device->machine(), "matrix3")|0xf1; | |
| 135 | if (!(state->m_porta&0x80)) data&=input_port_read(device->machine(), "matrix4")|0xf1; | |
| 132 | if (!(state->m_porta&0x10)) data&=device->machine().root_device().ioport("matrix1")->read()|0xf1; | |
| 133 | if (!(state->m_porta&0x20)) data&=device->machine().root_device().ioport("matrix2")->read()|0xf1; | |
| 134 | if (!(state->m_porta&0x40)) data&=device->machine().root_device().ioport("matrix3")->read()|0xf1; | |
| 135 | if (!(state->m_porta&0x80)) data&=device->machine().root_device().ioport("matrix4")->read()|0xf1; | |
| 136 | 136 | #else |
| 137 | if (!(state->m_porta&0x10)) data&=input_port_read(device->machine(), "matrix1")|0xf0; | |
| 138 | if (!(state->m_porta&0x20)) data&=input_port_read(device->machine(), "matrix2")|0xf0; | |
| 139 | if (!(state->m_porta&0x40)) data&=input_port_read(device->machine(), "matrix3")|0xf0; | |
| 140 | if (!(state->m_porta&0x80)) data&=input_port_read(device->machine(), "matrix4")|0xf0; | |
| 137 | if (!(state->m_porta&0x10)) data&=device->machine().root_device().ioport("matrix1")->read()|0xf0; | |
| 138 | if (!(state->m_porta&0x20)) data&=device->machine().root_device().ioport("matrix2")->read()|0xf0; | |
| 139 | if (!(state->m_porta&0x40)) data&=device->machine().root_device().ioport("matrix3")->read()|0xf0; | |
| 140 | if (!(state->m_porta&0x80)) data&=device->machine().root_device().ioport("matrix4")->read()|0xf0; | |
| 141 | 141 | #endif |
| 142 | 142 | if (!(state->m_porta&1)) { |
| 143 | if (!(input_port_read(device->machine(), "matrix1")&1)) data&=~0x10; | |
| 144 | if (!(input_port_read(device->machine(), "matrix2")&1)) data&=~0x20; | |
| 145 | if (!(input_port_read(device->machine(), "matrix3")&1)) data&=~0x40; | |
| 146 | if (!(input_port_read(device->machine(), "matrix4")&1)) data&=~0x80; | |
| 143 | if (!(device->machine().root_device().ioport("matrix1")->read()&1)) data&=~0x10; | |
| 144 | if (!(device->machine().root_device().ioport("matrix2")->read()&1)) data&=~0x20; | |
| 145 | if (!(device->machine().root_device().ioport("matrix3")->read()&1)) data&=~0x40; | |
| 146 | if (!(state->ioport("matrix4")->read()&1)) data&=~0x80; | |
| 147 | 147 | } |
| 148 | 148 | if (!(state->m_porta&2)) { |
| 149 | if (!(input_port_read(device->machine(), "matrix1")&2)) data&=~0x10; | |
| 150 | if (!(input_port_read(device->machine(), "matrix2")&2)) data&=~0x20; | |
| 151 | if (!(input_port_read(device->machine(), "matrix3")&2)) data&=~0x40; | |
| 152 | if (!(input_port_read(device->machine(), "matrix4")&2)) data&=~0x80; | |
| 149 | if (!(device->machine().root_device().ioport("matrix1")->read()&2)) data&=~0x10; | |
| 150 | if (!(device->machine().root_device().ioport("matrix2")->read()&2)) data&=~0x20; | |
| 151 | if (!(device->machine().root_device().ioport("matrix3")->read()&2)) data&=~0x40; | |
| 152 | if (!(device->machine().root_device().ioport("matrix4")->read()&2)) data&=~0x80; | |
| 153 | 153 | } |
| 154 | 154 | if (!(state->m_porta&4)) { |
| 155 | if (!(input_port_read(device->machine(), "matrix1")&4)) data&=~0x10; | |
| 156 | if (!(input_port_read(device->machine(), "matrix2")&4)) data&=~0x20; | |
| 157 | if (!(input_port_read(device->machine(), "matrix3")&4)) data&=~0x40; | |
| 158 | if (!(input_port_read(device->machine(), "matrix4")&4)) data&=~0x80; | |
| 155 | if (!(device->machine().root_device().ioport("matrix1")->read()&4)) data&=~0x10; | |
| 156 | if (!(device->machine().root_device().ioport("matrix2")->read()&4)) data&=~0x20; | |
| 157 | if (!(device->machine().root_device().ioport("matrix3")->read()&4)) data&=~0x40; | |
| 158 | if (!(device->machine().root_device().ioport("matrix4")->read()&4)) data&=~0x80; | |
| 159 | 159 | } |
| 160 | 160 | if (!(state->m_porta&8)) { |
| 161 | if (!(input_port_read(device->machine(), "matrix1")&8)) data&=~0x10; | |
| 162 | if (!(input_port_read(device->machine(), "matrix2")&8)) data&=~0x20; | |
| 163 | if (!(input_port_read(device->machine(), "matrix3")&8)) data&=~0x40; | |
| 164 | if (!(input_port_read(device->machine(), "matrix4")&8)) data&=~0x80; | |
| 161 | if (!(device->machine().root_device().ioport("matrix1")->read()&8)) data&=~0x10; | |
| 162 | if (!(device->machine().root_device().ioport("matrix2")->read()&8)) data&=~0x20; | |
| 163 | if (!(device->machine().root_device().ioport("matrix3")->read()&8)) data&=~0x40; | |
| 164 | if (!(device->machine().root_device().ioport("matrix4")->read()&8)) data&=~0x80; | |
| 165 | 165 | } |
| 166 | 166 | // logerror("%.4x via port a read %02x\n",(int)activecpu_get_pc(), data); |
| 167 | 167 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 318 | 318 | { |
| 319 | 319 | running_machine &machine = field.machine(); |
| 320 | 320 | |
| 321 | if ( (in | |
| 321 | if ( (machine.root_device().ioport | |
| 322 | 322 | { |
| 323 | 323 | PALETTE_INIT_CALL( amstrad_cpc_green ); |
| 324 | 324 | } |
| r15082 | r15083 | |
|---|---|---|
| 307 | 307 | { |
| 308 | 308 | default: |
| 309 | 309 | case 0x00: ret = 0x0000; break; /* nothing? */ |
| 310 | case 0x09: ret = input_port_read(field.machine(), "MAHJONG1"); break; | |
| 311 | case 0x12: ret = input_port_read(field.machine(), "MAHJONG2"); break; | |
| 312 | case 0x1b: ret = input_port_read(field.machine(), "MAHJONG3"); break; /* player 1 normal inputs? */ | |
| 313 | case 0x24: ret = input_port_read(field.machine(), "MAHJONG4"); break; | |
| 310 | case 0x09: ret = field.machine().root_device().ioport("MAHJONG1")->read(); break; | |
| 311 | case 0x12: ret = field.machine().root_device().ioport("MAHJONG2")->read(); break; | |
| 312 | case 0x1b: ret = field.machine().root_device().ioport("MAHJONG3")->read(); break; /* player 1 normal inputs? */ | |
| 313 | case 0x24: ret = field.machine().root_device().ioport("MAHJONG4")->read(); break; | |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | return ret; |
| r15082 | r15083 | |
| 1061 | 1061 | READ16_MEMBER(ng_aes_state::aes_in0_r) |
| 1062 | 1062 | { |
| 1063 | 1063 | UINT32 ret = 0xffff; |
| 1064 | UINT32 ctrl = i | |
| 1064 | UINT32 ctrl = iop | |
| 1065 | 1065 | |
| 1066 | 1066 | switch(ctrl & 0x0f) |
| 1067 | 1067 | { |
| r15082 | r15083 | |
| 1069 | 1069 | ret = 0xffff; |
| 1070 | 1070 | break; |
| 1071 | 1071 | case 0x01: |
| 1072 | ret = i | |
| 1072 | ret = iop | |
| 1073 | 1073 | break; |
| 1074 | 1074 | case 0x02: |
| 1075 | 1075 | switch (m_controller_select) |
| 1076 | 1076 | { |
| 1077 | case 0x09: ret = input_port_read(machine(), "MJ01_P1"); break; | |
| 1078 | case 0x12: ret = input_port_read(machine(), "MJ02_P1"); break; | |
| 1079 | case 0x1b: ret = input_port_read(machine(), "MJ03_P1"); break; /* player 1 normal inputs? */ | |
| 1080 | case 0x24: ret = input_port_read(machine(), "MJ04_P1"); break; | |
| 1077 | case 0x09: ret = ioport("MJ01_P1")->read(); break; | |
| 1078 | case 0x12: ret = ioport("MJ02_P1")->read(); break; | |
| 1079 | case 0x1b: ret = ioport("MJ03_P1")->read(); break; /* player 1 normal inputs? */ | |
| 1080 | case 0x24: ret = ioport("MJ04_P1")->read(); break; | |
| 1081 | 1081 | default: |
| 1082 | ret = i | |
| 1082 | ret = iop | |
| 1083 | 1083 | break; |
| 1084 | 1084 | } |
| 1085 | 1085 | break; |
| r15082 | r15083 | |
| 1091 | 1091 | READ16_MEMBER(ng_aes_state::aes_in1_r) |
| 1092 | 1092 | { |
| 1093 | 1093 | UINT32 ret = 0xffff; |
| 1094 | UINT32 ctrl = i | |
| 1094 | UINT32 ctrl = iop | |
| 1095 | 1095 | |
| 1096 | 1096 | switch(ctrl & 0xf0) |
| 1097 | 1097 | { |
| r15082 | r15083 | |
| 1099 | 1099 | ret = 0xffff; |
| 1100 | 1100 | break; |
| 1101 | 1101 | case 0x10: |
| 1102 | ret = i | |
| 1102 | ret = iop | |
| 1103 | 1103 | break; |
| 1104 | 1104 | case 0x20: |
| 1105 | 1105 | switch (m_controller_select) |
| 1106 | 1106 | { |
| 1107 | case 0x09: ret = input_port_read(machine(), "MJ01_P2"); break; | |
| 1108 | case 0x12: ret = input_port_read(machine(), "MJ02_P2"); break; | |
| 1109 | case 0x1b: ret = input_port_read(machine(), "MJ03_P2"); break; /* player 2 normal inputs? */ | |
| 1110 | case 0x24: ret = input_port_read(machine(), "MJ04_P2"); break; | |
| 1107 | case 0x09: ret = ioport("MJ01_P2")->read(); break; | |
| 1108 | case 0x12: ret = ioport("MJ02_P2")->read(); break; | |
| 1109 | case 0x1b: ret = ioport("MJ03_P2")->read(); break; /* player 2 normal inputs? */ | |
| 1110 | case 0x24: ret = ioport("MJ04_P2")->read(); break; | |
| 1111 | 1111 | default: |
| 1112 | ret = i | |
| 1112 | ret = iop | |
| 1113 | 1113 | break; |
| 1114 | 1114 | } |
| 1115 | 1115 | break; |
| r15082 | r15083 | |
| 1121 | 1121 | |
| 1122 | 1122 | READ16_MEMBER(ng_aes_state::aes_in2_r) |
| 1123 | 1123 | { |
| 1124 | UINT32 in2 = i | |
| 1124 | UINT32 in2 = iop | |
| 1125 | 1125 | UINT32 ret = in2; |
| 1126 | UINT32 sel = i | |
| 1126 | UINT32 sel = iop | |
| 1127 | 1127 | |
| 1128 | 1128 | if((sel & 0x02) && (m_controller_select == 0x24)) |
| 1129 | 1129 | ret ^= 0x0200; |
| r15082 | r15083 | |
| 1459 | 1459 | static INPUT_PORTS_START( controller ) |
| 1460 | 1460 | PORT_START("IN0") |
| 1461 | 1461 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1462 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1463 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1464 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1465 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1466 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1467 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1468 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1469 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 1462 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1463 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1464 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1465 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1466 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1467 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1468 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1469 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 1470 | 1470 | |
| 1471 | 1471 | |
| 1472 | 1472 | PORT_START("IN1") |
| 1473 | 1473 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1474 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1475 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1476 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1477 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1478 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1479 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1480 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1481 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 1474 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1475 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1476 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1477 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1478 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1479 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1480 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1481 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 1482 | 1482 | INPUT_PORTS_END |
| 1483 | 1483 | |
| 1484 | 1484 | static INPUT_PORTS_START( mjpanel ) |
| 1485 | 1485 | PORT_START("MJ01_P1") |
| 1486 | 1486 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1487 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1488 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1489 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1490 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1491 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1492 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1493 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1487 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1488 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1489 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1490 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1491 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1492 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1493 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1494 | 1494 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1495 | 1495 | |
| 1496 | 1496 | PORT_START("MJ02_P1") |
| 1497 | 1497 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1498 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1499 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1500 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1501 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1502 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1503 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1504 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1505 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1498 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1499 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1500 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1501 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1502 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1503 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1504 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1505 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1506 | 1506 | |
| 1507 | 1507 | PORT_START("MJ03_P1") |
| 1508 | 1508 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1509 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1510 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1511 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1512 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1513 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1514 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1515 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1516 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1509 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1510 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1511 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1512 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1513 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1514 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1515 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1516 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1517 | 1517 | |
| 1518 | 1518 | PORT_START("MJ04_P1") |
| 1519 | 1519 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1520 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1521 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1522 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1523 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1524 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 1520 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1521 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1522 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1523 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1524 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 1525 | 1525 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1526 | 1526 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1527 | 1527 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1528 | 1528 | |
| 1529 | 1529 | PORT_START("MJ01_P2") |
| 1530 | 1530 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1531 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1532 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1533 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1534 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1535 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1536 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1537 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1531 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1532 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1533 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1534 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1535 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1536 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1537 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1538 | 1538 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1539 | 1539 | |
| 1540 | 1540 | PORT_START("MJ02_P2") |
| 1541 | 1541 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1542 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1543 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1544 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1545 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1546 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1547 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1548 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1542 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1543 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1544 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1545 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1546 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1547 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1548 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1549 | 1549 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1550 | 1550 | |
| 1551 | 1551 | PORT_START("MJ03_P2") |
| 1552 | 1552 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1553 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1554 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1555 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1556 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1557 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1558 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1559 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1560 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1553 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1554 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1555 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1556 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1557 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1558 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1559 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1560 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1561 | 1561 | |
| 1562 | 1562 | PORT_START("MJ04_P2") |
| 1563 | 1563 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1564 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1565 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1566 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1567 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1568 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 1564 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1565 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1566 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1567 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1568 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 1569 | 1569 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1570 | 1570 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1571 | 1571 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r15082 | r15083 | |
|---|---|---|
| 581 | 581 | { |
| 582 | 582 | for(i=0;i<32;i++) |
| 583 | 583 | { |
| 584 | if(( | |
| 584 | if(( | |
| 585 | 585 | { |
| 586 | 586 | { |
| 587 | 587 | state->m_keyb_press = scancode; |
| r15082 | r15083 | |
|---|---|---|
| 69 | 69 | { |
| 70 | 70 | UINT8 data = 0xff; |
| 71 | 71 | |
| 72 | if (!BIT(keylatch, 0)) data &= input_port_read(machine, "KEY0"); | |
| 73 | if (!BIT(keylatch, 1)) data &= input_port_read(machine, "KEY1"); | |
| 74 | if (!BIT(keylatch, 2)) data &= input_port_read(machine, "KEY2"); | |
| 75 | if (!BIT(keylatch, 3)) data &= input_port_read(machine, "KEY3"); | |
| 76 | if (!BIT(keylatch, 4)) data &= input_port_read(machine, "KEY4"); | |
| 77 | if (!BIT(keylatch, 5)) data &= input_port_read(machine, "KEY5"); | |
| 78 | if (!BIT(keylatch, 6)) data &= input_port_read(machine, "KEY6"); | |
| 79 | if (!BIT(keylatch, 7)) data &= input_port_read(machine, "KEY7"); | |
| 80 | if (!BIT(keylatch, 8)) data &= input_port_read(machine, "KEY8"); | |
| 72 | if (!BIT(keylatch, 0)) data &= machine.root_device().ioport("KEY0")->read(); | |
| 73 | if (!BIT(keylatch, 1)) data &= machine.root_device().ioport("KEY1")->read(); | |
| 74 | if (!BIT(keylatch, 2)) data &= machine.root_device().ioport("KEY2")->read(); | |
| 75 | if (!BIT(keylatch, 3)) data &= machine.root_device().ioport("KEY3")->read(); | |
| 76 | if (!BIT(keylatch, 4)) data &= machine.root_device().ioport("KEY4")->read(); | |
| 77 | if (!BIT(keylatch, 5)) data &= machine.root_device().ioport("KEY5")->read(); | |
| 78 | if (!BIT(keylatch, 6)) data &= machine.root_device().ioport("KEY6")->read(); | |
| 79 | if (!BIT(keylatch, 7)) data &= machine.root_device().ioport("KEY7")->read(); | |
| 80 | if (!BIT(keylatch, 8)) data &= machine.root_device().ioport("KEY8")->read(); | |
| 81 | 81 | |
| 82 | 82 | return data; |
| 83 | 83 | } |
| r15082 | r15083 | |
| 274 | 274 | data |= 0x20; |
| 275 | 275 | |
| 276 | 276 | // low power sensor |
| 277 | data |= BIT(i | |
| 277 | data |= BIT(iop | |
| 278 | 278 | |
| 279 | 279 | return data; |
| 280 | 280 | } |
| r15082 | r15083 | |
| 316 | 316 | data |= 0x20; |
| 317 | 317 | |
| 318 | 318 | // low power sensor |
| 319 | data |= BIT(i | |
| 319 | data |= BIT(iop | |
| 320 | 320 | |
| 321 | 321 | return data; |
| 322 | 322 | } |
| r15082 | r15083 | |
|---|---|---|
| 113 | 113 | { |
| 114 | 114 | char kbdrow[6]; |
| 115 | 115 | sprintf(kbdrow,"X%X",m_digit); |
| 116 | data = i | |
| 116 | data = iop | |
| 117 | 117 | } |
| 118 | 118 | return data; |
| 119 | 119 | } |
| r15082 | r15083 | |
|---|---|---|
| 159 | 159 | |
| 160 | 160 | static INPUT_PORTS_START( sms ) |
| 161 | 161 | PORT_START("PORT_DC") |
| 162 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 163 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 164 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 165 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 166 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 167 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 168 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 169 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 162 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 163 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 164 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 165 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 166 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 167 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00) | |
| 168 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 169 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 170 | 170 | |
| 171 | 171 | PORT_START("PORT_DD") |
| 172 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 173 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 174 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 175 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 172 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 173 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 174 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 175 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00) | |
| 176 | 176 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* Software Reset bit */ |
| 177 | 177 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 178 | 178 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* Port A TH */ |
| r15082 | r15083 | |
| 183 | 183 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME(DEF_STR(Pause)) |
| 184 | 184 | |
| 185 | 185 | PORT_START("LPHASER0") /* Light phaser X - player 1 */ |
| 186 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 186 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 187 | 187 | |
| 188 | 188 | PORT_START("LPHASER1") /* Light phaser Y - player 1 */ |
| 189 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 189 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 190 | 190 | |
| 191 | 191 | PORT_START("LPHASER2") /* Light phaser X - player 2 */ |
| 192 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 192 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 193 | 193 | |
| 194 | 194 | PORT_START("LPHASER3") /* Light phaser Y - player 2 */ |
| 195 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(25) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 195 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(25) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 196 | 196 | |
| 197 | 197 | PORT_START("RFU") /* Rapid Fire Unit */ |
| 198 | 198 | PORT_CONFNAME( 0x03, 0x00, "Rapid Fire Unit - Player 1" ) |
| r15082 | r15083 | |
| 207 | 207 | PORT_CONFSETTING( 0x0c, "Button A + B" ) |
| 208 | 208 | |
| 209 | 209 | PORT_START("PADDLE0") /* Paddle player 1 */ |
| 210 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 210 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 211 | 211 | |
| 212 | 212 | PORT_START("PADDLE1") /* Paddle player 2 */ |
| 213 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 213 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 214 | 214 | |
| 215 | 215 | PORT_START("CTRLIPT") /* Light Phaser and Paddle Control buttons */ |
| 216 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 217 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 218 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 219 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) | |
| 220 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 221 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 222 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 223 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) | |
| 216 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 217 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 218 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04) | |
| 219 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04) | |
| 220 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 221 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 222 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x40) | |
| 223 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x40) | |
| 224 | 224 | |
| 225 | 225 | PORT_START("CTRLSEL") /* Controller selection */ |
| 226 | 226 | PORT_CONFNAME( 0x0f, 0x00, "Player 1 Controller" ) |
| r15082 | r15083 | |
| 235 | 235 | PORT_CONFSETTING( 0x40, "Sega Sports Pad" ) |
| 236 | 236 | |
| 237 | 237 | PORT_START("SPORT0") /* Player 1 Sports Pad X axis */ |
| 238 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 238 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 239 | 239 | |
| 240 | 240 | PORT_START("SPORT1") /* Player 1 Sports Pad Y axis */ |
| 241 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 241 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 242 | 242 | |
| 243 | 243 | PORT_START("SPORT2") /* Player 2 Sports Pad X axis */ |
| 244 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 244 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 245 | 245 | |
| 246 | 246 | PORT_START("SPORT3") /* Player 2 Sports Pad Y axis */ |
| 247 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 247 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 248 | 248 | INPUT_PORTS_END |
| 249 | 249 | |
| 250 | 250 | static INPUT_PORTS_START( sms1 ) |
| r15082 | r15083 | |
| 259 | 259 | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 260 | 260 | |
| 261 | 261 | PORT_START("SSCOPE_BINOCULAR") |
| 262 | PORT_CONFNAME( 0x03, 0x00, "SegaScope - Binocular Hack" ) PORT_CONDITION("SEGASCOPE", 0x01, | |
| 262 | PORT_CONFNAME( 0x03, 0x00, "SegaScope - Binocular Hack" ) PORT_CONDITION("SEGASCOPE", 0x01, | |
| 263 | 263 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 264 | 264 | PORT_CONFSETTING( 0x01, "Left Lens" ) |
| 265 | 265 | PORT_CONFSETTING( 0x02, "Right Lens" ) |
| 266 | 266 | PORT_CONFSETTING( 0x03, "Both Lens" ) |
| 267 | PORT_BIT( 0x03, 0x00, IPT_UNUSED ) PORT_CONDITION("SEGASCOPE", 0x01, | |
| 267 | PORT_BIT( 0x03, 0x00, IPT_UNUSED ) PORT_CONDITION("SEGASCOPE", 0x01, | |
| 268 | 268 | INPUT_PORTS_END |
| 269 | 269 | |
| 270 | 270 | static INPUT_PORTS_START( smsj ) |
| r15082 | r15083 | |
| 277 | 277 | |
| 278 | 278 | PORT_START("TVDRAW_X") |
| 279 | 279 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Tablet - X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 280 | PORT_CONDITION("TVDRAW", 0x01, | |
| 280 | PORT_CONDITION("TVDRAW", 0x01, | |
| 281 | 281 | |
| 282 | 282 | PORT_START("TVDRAW_Y") |
| 283 | 283 | PORT_BIT( 0xff, 0x60, IPT_LIGHTGUN_Y ) PORT_NAME("Tablet - Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0, 191) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 284 | PORT_CONDITION("TVDRAW", 0x01, | |
| 284 | PORT_CONDITION("TVDRAW", 0x01, | |
| 285 | 285 | |
| 286 | 286 | PORT_START("TVDRAW_PEN") |
| 287 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Tablet - Pen") PORT_CONDITION("TVDRAW", 0x01, | |
| 287 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Tablet - Pen") PORT_CONDITION("TVDRAW", 0x01, | |
| 288 | 288 | INPUT_PORTS_END |
| 289 | 289 | |
| 290 | 290 | static INPUT_PORTS_START( gg ) |
| r15082 | r15083 | |
|---|---|---|
| 121 | 121 | switch( ( m_port_b >> 1 ) & 0x0f ) |
| 122 | 122 | { |
| 123 | 123 | case 0: |
| 124 | data = i | |
| 124 | data = iop | |
| 125 | 125 | break; |
| 126 | 126 | case 1: |
| 127 | data = i | |
| 127 | data = iop | |
| 128 | 128 | break; |
| 129 | 129 | case 2: |
| 130 | data = i | |
| 130 | data = iop | |
| 131 | 131 | break; |
| 132 | 132 | } |
| 133 | 133 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 633 | 633 | { |
| 634 | 634 | if( pad->n_byte < PAD_BYTES_STANDARD ) |
| 635 | 635 | { |
| 636 | pad->n_shiftout = in | |
| 636 | pad->n_shiftout = machine.root_device().ioport | |
| 637 | 637 | pad->n_byte++; |
| 638 | 638 | b_ack = 1; |
| 639 | 639 | } |
| r15082 | r15083 | |
|---|---|---|
| 140 | 140 | UINT8 data = 0xe0; |
| 141 | 141 | |
| 142 | 142 | /* bit 5-7, keyboard input */ |
| 143 | if (!BIT(offset, 8)) data &= input_port_read(machine(), "keyboard_row_fe") & 0xe0; | |
| 144 | if (!BIT(offset, 9)) data &= input_port_read(machine(), "keyboard_row_fd") & 0xe0; | |
| 145 | if (!BIT(offset, 10)) data &= input_port_read(machine(), "keyboard_row_fb") & 0xe0; | |
| 146 | if (!BIT(offset, 11)) data &= input_port_read(machine(), "keyboard_row_f7") & 0xe0; | |
| 147 | if (!BIT(offset, 12)) data &= input_port_read(machine(), "keyboard_row_ef") & 0xe0; | |
| 148 | if (!BIT(offset, 13)) data &= input_port_read(machine(), "keyboard_row_df") & 0xe0; | |
| 149 | if (!BIT(offset, 14)) data &= input_port_read(machine(), "keyboard_row_bf") & 0xe0; | |
| 150 | if (!BIT(offset, 15)) data &= input_port_read(machine(), "keyboard_row_7f") & 0xe0; | |
| 143 | if (!BIT(offset, 8)) data &= ioport("keyboard_row_fe")->read() & 0xe0; | |
| 144 | if (!BIT(offset, 9)) data &= ioport("keyboard_row_fd")->read() & 0xe0; | |
| 145 | if (!BIT(offset, 10)) data &= ioport("keyboard_row_fb")->read() & 0xe0; | |
| 146 | if (!BIT(offset, 11)) data &= ioport("keyboard_row_f7")->read() & 0xe0; | |
| 147 | if (!BIT(offset, 12)) data &= ioport("keyboard_row_ef")->read() & 0xe0; | |
| 148 | if (!BIT(offset, 13)) data &= ioport("keyboard_row_df")->read() & 0xe0; | |
| 149 | if (!BIT(offset, 14)) data &= ioport("keyboard_row_bf")->read() & 0xe0; | |
| 150 | if (!BIT(offset, 15)) data &= ioport("keyboard_row_7f")->read() & 0xe0; | |
| 151 | 151 | |
| 152 | 152 | /* bit 0-4, interrupt source */ |
| 153 | 153 | data |= m_status; |
| r15082 | r15083 | |
| 216 | 216 | UINT8 data = 0x1f; |
| 217 | 217 | |
| 218 | 218 | /* bit 0-4, keyboard input */ |
| 219 | if (!BIT(offset, 8)) data &= input_port_read(machine(), "keyboard_row_fe") & 0x1f; | |
| 220 | if (!BIT(offset, 9)) data &= input_port_read(machine(), "keyboard_row_fd") & 0x1f; | |
| 221 | if (!BIT(offset, 10)) data &= input_port_read(machine(), "keyboard_row_fb") & 0x1f; | |
| 222 | if (!BIT(offset, 11)) data &= input_port_read(machine(), "keyboard_row_f7") & 0x1f; | |
| 223 | if (!BIT(offset, 12)) data &= input_port_read(machine(), "keyboard_row_ef") & 0x1f; | |
| 224 | if (!BIT(offset, 13)) data &= input_port_read(machine(), "keyboard_row_df") & 0x1f; | |
| 225 | if (!BIT(offset, 14)) data &= input_port_read(machine(), "keyboard_row_bf") & 0x1f; | |
| 226 | if (!BIT(offset, 15)) data &= input_port_read(machine(), "keyboard_row_7f") & 0x1f; | |
| 219 | if (!BIT(offset, 8)) data &= ioport("keyboard_row_fe")->read() & 0x1f; | |
| 220 | if (!BIT(offset, 9)) data &= ioport("keyboard_row_fd")->read() & 0x1f; | |
| 221 | if (!BIT(offset, 10)) data &= ioport("keyboard_row_fb")->read() & 0x1f; | |
| 222 | if (!BIT(offset, 11)) data &= ioport("keyboard_row_f7")->read() & 0x1f; | |
| 223 | if (!BIT(offset, 12)) data &= ioport("keyboard_row_ef")->read() & 0x1f; | |
| 224 | if (!BIT(offset, 13)) data &= ioport("keyboard_row_df")->read() & 0x1f; | |
| 225 | if (!BIT(offset, 14)) data &= ioport("keyboard_row_bf")->read() & 0x1f; | |
| 226 | if (!BIT(offset, 15)) data &= ioport("keyboard_row_7f")->read() & 0x1f; | |
| 227 | 227 | |
| 228 | 228 | if (offset == 0xff00) |
| 229 | 229 | { |
| 230 | data &= i | |
| 230 | data &= iop | |
| 231 | 231 | |
| 232 | 232 | /* if no key has been pressed, return the mouse state */ |
| 233 | 233 | if (data == 0x1f) |
| r15082 | r15083 | |
|---|---|---|
| 281 | 281 | UINT8 value; |
| 282 | 282 | |
| 283 | 283 | snprintf(port, ARRAY_LENGTH(port), "LINE%d", offset); |
| 284 | value = i | |
| 284 | value = ioport(port)->read( | |
| 285 | 285 | |
| 286 | 286 | /* hack for ports overlapping with joystick */ |
| 287 | 287 | if (offset == 4 || offset == 5) |
| 288 | 288 | { |
| 289 | 289 | snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", offset); |
| 290 | value |= i | |
| 290 | value |= ioport(port)->read( | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | return value; |
| r15082 | r15083 | |
|---|---|---|
| 242 | 242 | { |
| 243 | 243 | char kbdrow[6]; |
| 244 | 244 | sprintf(kbdrow,"X%d", m_keyboard_line & 7); |
| 245 | UINT8 data = i | |
| 245 | UINT8 data = iop | |
| 246 | 246 | |
| 247 | 247 | if (m_keyboard_part) |
| 248 | 248 | data >>= 4; |
| r15082 | r15083 | |
|---|---|---|
| 140 | 140 | |
| 141 | 141 | INPUT_CHANGED_MEMBER( comx35_state::trigger_reset ) |
| 142 | 142 | { |
| 143 | if (newval && BIT(i | |
| 143 | if (newval && BIT(iop | |
| 144 | 144 | { |
| 145 | 145 | machine_reset(); |
| 146 | 146 | } |
| r15082 | r15083 | |
| 361 | 361 | |
| 362 | 362 | READ_LINE_MEMBER( comx35_state::shift_r ) |
| 363 | 363 | { |
| 364 | return BIT(i | |
| 364 | return BIT(iop | |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | READ_LINE_MEMBER( comx35_state::control_r ) |
| 368 | 368 | { |
| 369 | return BIT(i | |
| 369 | return BIT(iop | |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | static CDP1871_INTERFACE( kbc_intf ) |
| r15082 | r15083 | |
|---|---|---|
| 133 | 133 | machine.scheduler().timer_set(attotime::from_hz(10000), FUNC(ep804_kbd_callback)); |
| 134 | 134 | // 74C923 4 by 5 key encoder. |
| 135 | 135 | // if previous key is still held, bail out |
| 136 | if (input_port_read(machine, keynames[state->m_kbd_row])) | |
| 137 | if (state->digel804_convert_col_to_bin(input_port_read(machine, keynames[state->m_kbd_row]), state->m_kbd_row) == state->m_kbd) | |
| 136 | if (machine.root_device().ioport(keynames[state->m_kbd_row])->read()) | |
| 137 | if (state->digel804_convert_col_to_bin(machine.root_device().ioport(keynames[state->m_kbd_row])->read(), state->m_kbd_row) == state->m_kbd) | |
| 138 | 138 | return; |
| 139 | 139 | |
| 140 | 140 | state->m_kbd_row++; |
| 141 | 141 | state->m_kbd_row &= 3; |
| 142 | 142 | |
| 143 | 143 | /* see if a key pressed */ |
| 144 | if (in | |
| 144 | if (machine.root_device().ioport | |
| 145 | 145 | { |
| 146 | 146 | fprintf(stderr,"DEBUG: key was pressed!\n"); |
| 147 | state->m_kbd = state->digel804_convert_col_to_bin(in | |
| 147 | state->m_kbd = state->digel804_convert_col_to_bin(machine.root_device().ioport | |
| 148 | 148 | state->m_key_intq = 0; |
| 149 | 149 | cputag_set_input_line(machine, "maincpu", 0, HOLD_LINE);//ASSERT_LINE); |
| 150 | 150 | } |
| r15082 | r15083 | |
|---|---|---|
| 97 | 97 | READ8_MEMBER( tiki100_state::keyboard_r ) |
| 98 | 98 | { |
| 99 | 99 | static const char *const keynames[] = { "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9", "ROW10", "ROW11", "ROW12" }; |
| 100 | UINT8 data = i | |
| 100 | UINT8 data = iop | |
| 101 | 101 | |
| 102 | 102 | m_keylatch++; |
| 103 | 103 |
| r15082 | r15083 | |
|---|---|---|
| 769 | 769 | |
| 770 | 770 | static INPUT_CHANGED( input_update ) |
| 771 | 771 | { |
| 772 | UINT32 buttons = | |
| 772 | UINT32 buttons = | |
| 773 | 773 | |
| 774 | 774 | ps_intc_set_interrupt_line(field.machine(), PS_INT_BTN_ACTION, (buttons & 1) ? 1 : 0); |
| 775 | 775 | ps_intc_set_interrupt_line(field.machine(), PS_INT_BTN_RIGHT, (buttons & 2) ? 1 : 0); |
| r15082 | r15083 | |
|---|---|---|
| 49 | 49 | { |
| 50 | 50 | char kbdrow[8]; |
| 51 | 51 | sprintf(kbdrow,"LINE%d",offset); |
| 52 | return i | |
| 52 | return iop | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | static ADDRESS_MAP_START(homez80_mem, AS_PROGRAM, 8, homez80_state) |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | data |= m_keylatch; |
| 147 | 147 | |
| 148 | 148 | /* keyboard rows */ |
| 149 | data |= BIT(input_port_read(machine(), "ROW0"), m_keylatch) << 4; | |
| 150 | data |= BIT(input_port_read(machine(), "ROW1"), m_keylatch) << 5; | |
| 151 | data |= BIT(input_port_read(machine(), "ROW2"), m_keylatch) << 6; | |
| 149 | data |= BIT(ioport("ROW0")->read(), m_keylatch) << 4; | |
| 150 | data |= BIT(ioport("ROW1")->read(), m_keylatch) << 5; | |
| 151 | data |= BIT(ioport("ROW2")->read(), m_keylatch) << 6; | |
| 152 | 152 | |
| 153 | 153 | /* demultiplexer clock */ |
| 154 | 154 | data |= (m_keyclk << 7); |
| r15082 | r15083 | |
|---|---|---|
| 57 | 57 | "COL_F", "COL_G", "COL_H", "COL_I" |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | return i | |
| 60 | return iop | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 |
| r15082 | r15083 | |
|---|---|---|
| 132 | 132 | static INPUT_PORTS_START( pc200 ) |
| 133 | 133 | PORT_START("IN0") /* IN0 */ |
| 134 | 134 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 135 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 135 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 136 | 136 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 137 | 137 | |
| 138 | 138 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
|---|---|---|
| 59 | 59 | { |
| 60 | 60 | UINT8 data; |
| 61 | 61 | |
| 62 | switch (i | |
| 62 | switch (iop | |
| 63 | 63 | { |
| 64 | 64 | case 0x04: data = 0x33; break; //right |
| 65 | 65 | case 0x08: data = 0x37; break; //left |
| r15082 | r15083 | |
| 73 | 73 | |
| 74 | 74 | case 0x03: //STRIG(0) |
| 75 | 75 | { |
| 76 | m_out.data[m_out.write++] = (i | |
| 76 | m_out.data[m_out.write++] = (iop | |
| 77 | 77 | } |
| 78 | 78 | break; |
| 79 | 79 | |
| 80 | 80 | case 0x04: //STRIG(1) |
| 81 | 81 | { |
| 82 | m_out.data[m_out.write++] = (i | |
| 82 | m_out.data[m_out.write++] = (iop | |
| 83 | 83 | } |
| 84 | 84 | break; |
| 85 | 85 | |
| r15082 | r15083 | |
| 93 | 93 | if(address == 0xc00e) |
| 94 | 94 | data = 0x0a; |
| 95 | 95 | else if(address == 0xd000) |
| 96 | data = i | |
| 96 | data = iop | |
| 97 | 97 | else |
| 98 | 98 | data = m_t6834_ram[address & 0x7ff]; |
| 99 | 99 | |
| r15082 | r15083 | |
| 415 | 415 | |
| 416 | 416 | for (int i=0 ;i<10; i++) |
| 417 | 417 | if (matrix & (1<<i)) |
| 418 | data |= i | |
| 418 | data |= iop | |
| 419 | 419 | |
| 420 | 420 | m_out.data[m_out.write++] = data; |
| 421 | 421 | } |
| r15082 | r15083 | |
| 424 | 424 | case 0x28: //test chr |
| 425 | 425 | { |
| 426 | 426 | UINT8 idx = kb_get_index(m_in.data[m_in.read++]); |
| 427 | m_out.data[m_out.write++] = (i | |
| 427 | m_out.data[m_out.write++] = (iop | |
| 428 | 428 | } |
| 429 | 429 | break; |
| 430 | 430 | |
| r15082 | r15083 | |
| 911 | 911 | |
| 912 | 912 | if (m_kb_on && newval) |
| 913 | 913 | { |
| 914 | UINT8 shift = (i | |
| 914 | UINT8 shift = (iop | |
| 915 | 915 | UINT16 udk_s = udk_offset[(shift*6) + idx - 1]; |
| 916 | 916 | |
| 917 | 917 | /* First 3 chars are used for description */ |
| r15082 | r15083 | |
| 932 | 932 | INPUT_CHANGED_MEMBER( x07_state::kb_keys ) |
| 933 | 933 | { |
| 934 | 934 | UINT8 modifier; |
| 935 | UINT8 a1 = input_port_read(field.machine(), "A1"); | |
| 936 | UINT8 bz = input_port_read(field.machine(), "BZ"); | |
| 935 | UINT8 a1 = field.machine().root_device().ioport("A1")->read(); | |
| 936 | UINT8 bz = field.machine().root_device().ioport("BZ")->read(); | |
| 937 | 937 | UINT8 keycode = (UINT8)(FPTR)param; |
| 938 | 938 | |
| 939 | 939 | if (m_kb_on && !newval) |
| r15082 | r15083 | |
| 1031 | 1031 | if (m_draw_udk) |
| 1032 | 1032 | for(i = 0, x = 0; i < 5; i++) |
| 1033 | 1033 | { |
| 1034 | UINT16 ofs = udk_offset[i + ((i | |
| 1034 | UINT16 ofs = udk_offset[i + ((iop | |
| 1035 | 1035 | draw_char(x++, 3, 0x83); |
| 1036 | 1036 | for(j = 0; j < 3; j++) |
| 1037 | 1037 | draw_char(x++, 3, m_t6834_ram[ofs++]); |
| r15082 | r15083 | |
| 1487 | 1487 | m_prn_char_code = 0; |
| 1488 | 1488 | m_prn_size = 0; |
| 1489 | 1489 | |
| 1490 | m_regs_r[2] = i | |
| 1490 | m_regs_r[2] = iop | |
| 1491 | 1491 | |
| 1492 | 1492 | cpu_set_reg(m_maincpu, Z80_PC, 0xc3c3); |
| 1493 | 1493 | } |
| r15082 | r15083 | |
|---|---|---|
| 367 | 367 | int i; |
| 368 | 368 | UINT8 code; |
| 369 | 369 | UINT8 key_code = 0; |
| 370 | UINT8 shift = input_port_read(timer.machine(), "LINEC") & 0x02 ? 1 : 0; | |
| 371 | UINT8 ctrl = input_port_read(timer.machine(), "LINEC") & 0x01 ? 1 : 0; | |
| 370 | UINT8 shift = timer.machine().root_device().ioport("LINEC")->read() & 0x02 ? 1 : 0; | |
| 371 | UINT8 ctrl = timer.machine().root_device().ioport("LINEC")->read() & 0x01 ? 1 : 0; | |
| 372 | 372 | state->m_key_pressed = 0xff; |
| 373 | 373 | for(i = 0; i < 7; i++) |
| 374 | 374 | { |
| 375 | 375 | |
| 376 | code = | |
| 376 | code = | |
| 377 | 377 | if (code != 0) |
| 378 | 378 | { |
| 379 | 379 | if (i==0 && shift==0) { |
| r15082 | r15083 | |
|---|---|---|
| 126 | 126 | |
| 127 | 127 | switch (m_ls145_p) |
| 128 | 128 | { |
| 129 | case 0: return input_port_read(machine(), "Q0"); | |
| 130 | case 1: return input_port_read(machine(), "Q1"); | |
| 131 | case 2: return input_port_read(machine(), "Q2"); | |
| 129 | case 0: return ioport("Q0")->read(); | |
| 130 | case 1: return ioport("Q1")->read(); | |
| 131 | case 2: return ioport("Q2")->read(); | |
| 132 | 132 | default: return 0xff; |
| 133 | 133 | } |
| 134 | 134 | } |
| r15082 | r15083 | |
|---|---|---|
| 34 | 34 | { |
| 35 | 35 | static const char *const keynames[] = { "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9", "Y10", "Y11", "Y12", "Y13", "Y14", "Y15" }; |
| 36 | 36 | |
| 37 | UINT8 data = i | |
| 37 | UINT8 data = iop | |
| 38 | 38 | |
| 39 | 39 | int a8 = (data & 0x0f) == 0x0f; |
| 40 | 40 | |
| r15082 | r15083 | |
| 78 | 78 | |
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | UINT8 special = i | |
| 81 | UINT8 special = iop | |
| 82 | 82 | |
| 83 | 83 | int ctrl = BIT(special, 0); |
| 84 | 84 | int shift = BIT(special, 2) & BIT(special, 1); |
| r15082 | r15083 | |
|---|---|---|
| 745 | 745 | |
| 746 | 746 | ret |= 0x70; |
| 747 | 747 | |
| 748 | if(i | |
| 748 | if(iop | |
| 749 | 749 | { |
| 750 | 750 | ret |= 0x0f; |
| 751 | 751 | pdata = centronics->read(space, 0); |
| 752 | 752 | for(x=0;x<6;x++) |
| 753 | 753 | { |
| 754 | 754 | if(~pdata & (1<<x)) |
| 755 | if(i | |
| 755 | if(iop | |
| 756 | 756 | ret &= ~0x08; |
| 757 | 757 | } |
| 758 | 758 | } |
| r15082 | r15083 | |
| 808 | 808 | { |
| 809 | 809 | UINT8 ret = 0xff; |
| 810 | 810 | |
| 811 | if(i | |
| 811 | if(iop | |
| 812 | 812 | ret &= ~0x01; |
| 813 | 813 | |
| 814 | 814 | return 0xff; |
| r15082 | r15083 | |
| 874 | 874 | break; |
| 875 | 875 | case 0x09: |
| 876 | 876 | // Joystick port read |
| 877 | state->m_psg_data = | |
| 877 | state->m_psg_data = | |
| 878 | 878 | break; |
| 879 | 879 | } |
| 880 | 880 | } |
| r15082 | r15083 | |
| 943 | 943 | |
| 944 | 944 | static READ8_DEVICE_HANDLER( fm77av_joy_1_r ) |
| 945 | 945 | { |
| 946 | return | |
| 946 | return | |
| 947 | 947 | } |
| 948 | 948 | |
| 949 | 949 | static READ8_DEVICE_HANDLER( fm77av_joy_2_r ) |
| 950 | 950 | { |
| 951 | return | |
| 951 | return | |
| 952 | 952 | } |
| 953 | 953 | |
| 954 | 954 | READ8_MEMBER(fm7_state::fm7_unknown_r) |
| r15082 | r15083 | |
| 1249 | 1249 | int bit = 0; |
| 1250 | 1250 | int x,y; |
| 1251 | 1251 | UINT32 keys; |
| 1252 | UINT32 modifiers = in | |
| 1252 | UINT32 modifiers = machine.root_device().ioport | |
| 1253 | 1253 | static const UINT16 modscancodes[6] = { 0x52, 0x53, 0x54, 0x55, 0x56, 0x5a }; |
| 1254 | 1254 | |
| 1255 | 1255 | for(x=0;x<3;x++) |
| 1256 | 1256 | { |
| 1257 | keys = in | |
| 1257 | keys = machine.root_device().ioport | |
| 1258 | 1258 | |
| 1259 | 1259 | for(y=0;y<32;y++) // loop through each bit in the port |
| 1260 | 1260 | { |
| r15082 | r15083 | |
| 1296 | 1296 | int bit = 0; |
| 1297 | 1297 | int mod = 0; |
| 1298 | 1298 | UINT32 keys; |
| 1299 | UINT32 modifiers = in | |
| 1299 | UINT32 modifiers = machine.root_device().ioport | |
| 1300 | 1300 | |
| 1301 | if(in | |
| 1301 | if(machine.root_device().ioport | |
| 1302 | 1302 | { |
| 1303 | 1303 | state->m_break_flag = 1; |
| 1304 | 1304 | cputag_set_input_line(machine,"maincpu",M6809_FIRQ_LINE,ASSERT_LINE); |
| r15082 | r15083 | |
| 1327 | 1327 | |
| 1328 | 1328 | for(x=0;x<3;x++) |
| 1329 | 1329 | { |
| 1330 | keys = in | |
| 1330 | keys = machine.root_device().ioport | |
| 1331 | 1331 | |
| 1332 | 1332 | for(y=0;y<32;y++) // loop through each bit in the port |
| 1333 | 1333 | { |
| r15082 | r15083 | |
| 1956 | 1956 | // set boot mode (FM-7 only, AV and later has boot RAM instead) |
| 1957 | 1957 | if(state->m_type == SYS_FM7) |
| 1958 | 1958 | { |
| 1959 | if(!(in | |
| 1959 | if(!(machine.root_device().ioport | |
| 1960 | 1960 | { // DOS mode |
| 1961 | 1961 | state->membank("bank17")->set_base(machine.root_device().memregion("dos")->base()); |
| 1962 | 1962 | } |
| r15082 | r15083 | |
|---|---|---|
| 229 | 229 | jr100_state *state = device->machine().driver_data<jr100_state>(); |
| 230 | 230 | UINT8 val = 0x1f; |
| 231 | 231 | if (keynames[state->m_keyboard_line]) { |
| 232 | val = | |
| 232 | val = s | |
| 233 | 233 | } |
| 234 | 234 | return val; |
| 235 | 235 | } |
| r15082 | r15083 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | */ |
| 87 | 87 | |
| 88 | UINT8 data = 0;//in | |
| 88 | UINT8 data = 0;//machine.root_device().ioport | |
| 89 | 89 | |
| 90 | if (BIT(m_keylatch, 0)) data |= input_port_read(machine(), "IO00"); | |
| 91 | if (BIT(m_keylatch, 1)) data |= input_port_read(machine(), "IO01"); | |
| 92 | if (BIT(m_keylatch, 2)) data |= input_port_read(machine(), "IO02"); | |
| 93 | if (BIT(m_keylatch, 3)) data |= input_port_read(machine(), "IO03"); | |
| 94 | if (BIT(m_keylatch, 4)) data |= input_port_read(machine(), "IO04"); | |
| 95 | if (BIT(m_keylatch, 5)) data |= input_port_read(machine(), "IO05"); | |
| 96 | if (BIT(m_keylatch, 6)) data |= input_port_read(machine(), "IO06"); | |
| 97 | if (BIT(m_keylatch, 7)) data |= input_port_read(machine(), "IO07"); | |
| 98 | if (!BIT(m_cmd, 4)) data |= input_port_read(machine(), "UV201-31"); | |
| 90 | if (BIT(m_keylatch, 0)) data |= ioport("IO00")->read(); | |
| 91 | if (BIT(m_keylatch, 1)) data |= ioport("IO01")->read(); | |
| 92 | if (BIT(m_keylatch, 2)) data |= ioport("IO02")->read(); | |
| 93 | if (BIT(m_keylatch, 3)) data |= ioport("IO03")->read(); | |
| 94 | if (BIT(m_keylatch, 4)) data |= ioport("IO04")->read(); | |
| 95 | if (BIT(m_keylatch, 5)) data |= ioport("IO05")->read(); | |
| 96 | if (BIT(m_keylatch, 6)) data |= ioport("IO06")->read(); | |
| 97 | if (BIT(m_keylatch, 7)) data |= ioport("IO07")->read(); | |
| 98 | if (!BIT(m_cmd, 4)) data |= ioport("UV201-31")->read(); | |
| 99 | 99 | |
| 100 | 100 | return data; |
| 101 | 101 | } |
| r15082 | r15083 | |
|---|---|---|
| 131 | 131 | if (m_kbd_type) |
| 132 | 132 | { // Trainer |
| 133 | 133 | if (upper == 3) |
| 134 | data &= i | |
| 134 | data &= iop | |
| 135 | 135 | else |
| 136 | 136 | if (upper == 4) |
| 137 | data &= i | |
| 137 | data &= iop | |
| 138 | 138 | else |
| 139 | 139 | if (upper == 5) |
| 140 | data &= i | |
| 140 | data &= iop | |
| 141 | 141 | } |
| 142 | 142 | else |
| 143 | 143 | { // Chess |
| 144 | 144 | if (upper == 3) |
| 145 | data &= i | |
| 145 | data &= iop | |
| 146 | 146 | else |
| 147 | 147 | if (upper == 4) |
| 148 | data &= i | |
| 148 | data &= iop | |
| 149 | 149 | else |
| 150 | 150 | if (upper == 5) |
| 151 | data &= i | |
| 151 | data &= iop | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 234 | 234 | for (i = 0; i < 4; i++) |
| 235 | 235 | { |
| 236 | 236 | sprintf(kbdrow,"X%X",i); |
| 237 | inp = | |
| 237 | inp = | |
| 238 | 238 | |
| 239 | 239 | for (j = 0; j < 5; j++) |
| 240 | 240 | if (BIT(inp, j)) |
| r15082 | r15083 | |
|---|---|---|
| 133 | 133 | esq1_state *state = device->machine().driver_data<esq1_state>(); |
| 134 | 134 | // printf("DP [%02x]: %d mlo %d mhi %d tape %d\n", data, data&1, (data>>4)&1, (data>>5)&1, (data>>6)&3); |
| 135 | 135 | // printf("[%02x] bank %d => offset %x (PC=%x)\n", data, bank, bank * 0x1000, cpu_get_pc(device->machine().firstcpu)); |
| 136 | state->membank("osbank")->set_base( | |
| 136 | state->membank("osbank")->set_base(st | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | static void duart_tx(device_t *device, int channel, UINT8 data) |
| r15082 | r15083 | |
|---|---|---|
| 247 | 247 | |
| 248 | 248 | static READ8_DEVICE_HANDLER( a1200_cia_0_portA_r ) |
| 249 | 249 | { |
| 250 | UINT8 ret = | |
| 250 | UINT8 ret = | |
| 251 | 251 | ret |= device->machine().device<amiga_fdc>("fdc")->ciaapra_r(); |
| 252 | 252 | return ret; |
| 253 | 253 | } |
| r15082 | r15083 | |
|---|---|---|
| 192 | 192 | case S3C2410_GPIO_PORT_G : |
| 193 | 193 | { |
| 194 | 194 | data = data & ~0xFF00; |
| 195 | if ((data & 0x02) == 0) data |= (input_port_read( device->machine(), "ROW1") << 8); | |
| 196 | if ((data & 0x04) == 0) data |= (input_port_read( device->machine(), "ROW2") << 8); | |
| 197 | if ((data & 0x08) == 0) data |= (input_port_read( device->machine(), "ROW3") << 8); | |
| 198 | if ((data & 0x10) == 0) data |= (input_port_read( device->machine(), "ROW4") << 8); | |
| 199 | if ((data & 0x20) == 0) data |= (input_port_read( device->machine(), "ROW5") << 8); | |
| 200 | if ((data & 0x40) == 0) data |= (input_port_read( device->machine(), "ROW6") << 8); | |
| 201 | if ((data & 0x80) == 0) data |= (input_port_read( device->machine(), "ROW7") << 8); | |
| 195 | if ((data & 0x02) == 0) data |= (device->machine().root_device().ioport( "ROW1")->read() << 8); | |
| 196 | if ((data & 0x04) == 0) data |= (device->machine().root_device().ioport( "ROW2")->read() << 8); | |
| 197 | if ((data & 0x08) == 0) data |= (device->machine().root_device().ioport( "ROW3")->read() << 8); | |
| 198 | if ((data & 0x10) == 0) data |= (device->machine().root_device().ioport( "ROW4")->read() << 8); | |
| 199 | if ((data & 0x20) == 0) data |= (device->machine().root_device().ioport( "ROW5")->read() << 8); | |
| 200 | if ((data & 0x40) == 0) data |= (device->machine().root_device().ioport( "ROW6")->read() << 8); | |
| 201 | if ((data & 0x80) == 0) data |= (device->machine().root_device().ioport( "ROW7")->read() << 8); | |
| 202 | 202 | } |
| 203 | 203 | break; |
| 204 | 204 | case S3C2410_GPIO_PORT_H : |
| r15082 | r15083 | |
|---|---|---|
| 75 | 75 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8" }; |
| 76 | 76 | int table = 0, row, col; |
| 77 | 77 | |
| 78 | if (i | |
| 78 | if (iop | |
| 79 | 79 | { |
| 80 | 80 | // shift, upper case |
| 81 | 81 | table = 1; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | if (i | |
| 84 | if (iop | |
| 85 | 85 | { |
| 86 | 86 | // ctrl |
| 87 | 87 | table = 2; |
| r15082 | r15083 | |
| 90 | 90 | // scan keyboard |
| 91 | 91 | for (row = 0; row < 9; row++) |
| 92 | 92 | { |
| 93 | UINT8 data = i | |
| 93 | UINT8 data = iop | |
| 94 | 94 | |
| 95 | 95 | for (col = 0; col < 8; col++) |
| 96 | 96 | { |
| r15082 | r15083 | |
|---|---|---|
| 73 | 73 | data |= m_centronics->busy_r() << 1; |
| 74 | 74 | |
| 75 | 75 | // RESET key |
| 76 | data |= i | |
| 76 | data |= iop | |
| 77 | 77 | |
| 78 | 78 | return data; |
| 79 | 79 | } |
| r15082 | r15083 | |
|---|---|---|
| 263 | 263 | static MACHINE_RESET(pdp11ub2) |
| 264 | 264 | { |
| 265 | 265 | // Load M9312 |
| 266 | UINT8* user1 = machine.root_device().memregion("consproms")->base() + in | |
| 266 | UINT8* user1 = machine.root_device().memregion("consproms")->base() + machine.root_device().ioport | |
| 267 | 267 | UINT8* maincpu = machine.root_device().memregion("maincpu")->base(); |
| 268 | 268 | |
| 269 | 269 | //0165000 |
| 270 | 270 | load9312prom(maincpu + 0165000,user1,0x100); |
| 271 | 271 | |
| 272 | UINT8 s1 = in | |
| 272 | UINT8 s1 = machine.root_device().ioport | |
| 273 | 273 | |
| 274 | 274 | if (s1 & 0x02) { // if boot enabled |
| 275 | 275 | UINT16 addr = 0173000; |
| 276 | 276 | if (s1 & 1) { |
| 277 | 277 | addr = 0165000; |
| 278 | 278 | } |
| 279 | addr += in | |
| 279 | addr += machine.root_device().ioport | |
| 280 | 280 | cpu_set_reg(machine.device("maincpu"), T11_PC, addr); |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | //0173000 |
| 284 | load9312prom(maincpu + 0173000,machine.root_device().memregion("devproms")->base() + in | |
| 284 | load9312prom(maincpu + 0173000,machine.root_device().memregion("devproms")->base() + machine.root_device().ioport | |
| 285 | 285 | //0173200 |
| 286 | load9312prom(maincpu + 0173200,machine.root_device().memregion("devproms")->base() + in | |
| 286 | load9312prom(maincpu + 0173200,machine.root_device().memregion("devproms")->base() + machine.root_device().ioport | |
| 287 | 287 | //0173400 |
| 288 | load9312prom(maincpu + 0173400,machine.root_device().memregion("devproms")->base() + in | |
| 288 | load9312prom(maincpu + 0173400,machine.root_device().memregion("devproms")->base() + machine.root_device().ioport | |
| 289 | 289 | //0173600 |
| 290 | load9312prom(maincpu + 0173600,machine.root_device().memregion("devproms")->base() + in | |
| 290 | load9312prom(maincpu + 0173600,machine.root_device().memregion("devproms")->base() + machine.root_device().ioport | |
| 291 | 291 | |
| 292 | 292 | } |
| 293 | 293 |
| r15082 | r15083 | |
|---|---|---|
| 106 | 106 | data = 0; |
| 107 | 107 | if ( m_io_regs[5] & 0x08 ) |
| 108 | 108 | { |
| 109 | data = i | |
| 109 | data = iop | |
| 110 | 110 | } |
| 111 | 111 | if ( m_io_regs[5] & 0x04 ) |
| 112 | 112 | { |
| 113 | data = i | |
| 113 | data = iop | |
| 114 | 114 | } |
| 115 | 115 | if ( m_io_regs[5] & 0x02 ) |
| 116 | 116 | { |
| 117 | data = i | |
| 117 | data = iop | |
| 118 | 118 | } |
| 119 | 119 | if ( m_io_regs[5] & 0x01 ) |
| 120 | 120 | { |
| 121 | data = i | |
| 121 | data = iop | |
| 122 | 122 | } |
| 123 | 123 | m_fd_data = 0; |
| 124 | 124 | break; |
| r15082 | r15083 | |
|---|---|---|
| 159 | 159 | break; |
| 160 | 160 | case S3C2410_GPIO_PORT_F : |
| 161 | 161 | { |
| 162 | data = (data & ~0xFF) | ( | |
| 162 | data = (data & ~0xFF) | ( | |
| 163 | 163 | } |
| 164 | 164 | break; |
| 165 | 165 | case S3C2410_GPIO_PORT_G : |
| r15082 | r15083 | |
| 213 | 213 | { |
| 214 | 214 | case 0 + 0 : data = 0x2EE + (PALM_Z22_BATTERY_LEVEL * 0xFF / 100); break; |
| 215 | 215 | case 0 + 1 : data = 0; break; |
| 216 | case 2 + 0 : data = input_port_read( device->machine(), "PENX"); break; | |
| 217 | case 2 + 1 : data = 0x3FF - input_port_read( device->machine(), "PENY"); break; | |
| 216 | case 2 + 0 : data = device->machine().root_device().ioport( "PENX")->read(); break; | |
| 217 | case 2 + 1 : data = 0x3FF - device->machine().root_device().ioport( "PENY")->read(); break; | |
| 218 | 218 | } |
| 219 | 219 | verboselog( device->machine(), 5, "s3c2410_adc_data_r %08X\n", data); |
| 220 | 220 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 157 | 157 | "KEY8", "KEY9", "KEYA", "UNUSED", |
| 158 | 158 | "UNUSED", "UNUSED", "UNUSED", "UNUSED" }; |
| 159 | 159 | |
| 160 | return i | |
| 160 | return iop | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | READ8_MEMBER( a5105_state::key_mux_r ) |
| r15082 | r15083 | |
|---|---|---|
| 115 | 115 | if (m_model != MODEL_MAC_CLASSIC_II) |
| 116 | 116 | { |
| 117 | 117 | // Color Classic has no MONTYPE so the safe read gets us 512x384, which is right |
| 118 | if ( | |
| 118 | if ( | |
| 119 | 119 | { |
| 120 | 120 | palette_set_color(space.machine(), m_rbv_clutoffs, MAKE_RGB(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2])); |
| 121 | 121 | m_rbv_palette[m_rbv_clutoffs] = MAKE_RGB(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2]); |
| r15082 | r15083 | |
| 151 | 151 | if (m_model != MODEL_MAC_CLASSIC_II) |
| 152 | 152 | { |
| 153 | 153 | // Color Classic has no MONTYPE so the safe read gets us 512x384, which is right |
| 154 | if ( | |
| 154 | if ( | |
| 155 | 155 | { |
| 156 | 156 | palette_set_color(space.machine(), m_rbv_clutoffs, MAKE_RGB(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2])); |
| 157 | 157 | m_rbv_palette[m_rbv_clutoffs] = MAKE_RGB(m_rbv_colors[2], m_rbv_colors[2], m_rbv_colors[2]); |
| r15082 | r15083 | |
| 239 | 239 | if (offset == 0x10) |
| 240 | 240 | { |
| 241 | 241 | data &= ~0x38; |
| 242 | data |= ( | |
| 242 | data |= ( | |
| 243 | 243 | // printf("rbv_r montype: %02x (PC %x)\n", data, cpu_get_pc(space.cpu)); |
| 244 | 244 | } |
| 245 | 245 |
| r15082 | r15083 | |
|---|---|---|
| 384 | 384 | state->membank(bank1)->set_base(addr); |
| 385 | 385 | |
| 386 | 386 | /* write enabled? */ |
| 387 | if (in | |
| 387 | if (machine.root_device().ioport | |
| 388 | 388 | { |
| 389 | 389 | /* yes */ |
| 390 | 390 | state->membank(bank5)->set_base(addr); |
| r15082 | r15083 | |
| 499 | 499 | int inputport_10_state; |
| 500 | 500 | int changed_bits; |
| 501 | 501 | |
| 502 | inputport_10_state = | |
| 502 | inputport_10_state = | |
| 503 | 503 | |
| 504 | 504 | changed_bits = inputport_10_state^state->m_previous_inputport_10_state; |
| 505 | 505 | |
| r15082 | r15083 | |
| 553 | 553 | state->m_memory_config[2] = 0; |
| 554 | 554 | state->m_memory_config[3] = 0; |
| 555 | 555 | |
| 556 | state->m_previous_inputport_10_state = in | |
| 556 | state->m_previous_inputport_10_state = machine.root_device().ioport | |
| 557 | 557 | |
| 558 | 558 | /* setup reset state ints are masked */ |
| 559 | 559 | state->m_irq_mask = 0; |
| r15082 | r15083 | |
| 670 | 670 | nc_update_interrupts(machine()); |
| 671 | 671 | } |
| 672 | 672 | |
| 673 | return i | |
| 673 | return iop | |
| 674 | 674 | } |
| 675 | 675 | |
| 676 | 676 | |
| r15082 | r15083 | |
| 987 | 987 | nc_card_battery_status &=~(1<<7); |
| 988 | 988 | } |
| 989 | 989 | |
| 990 | if (i | |
| 990 | if (iop | |
| 991 | 991 | { |
| 992 | 992 | /* card write enable */ |
| 993 | 993 | nc_card_battery_status &=~(1<<6); |
| r15082 | r15083 | |
| 1386 | 1386 | nc_card_battery_status&=~(1<<7); |
| 1387 | 1387 | } |
| 1388 | 1388 | |
| 1389 | if (i | |
| 1389 | if (iop | |
| 1390 | 1390 | { |
| 1391 | 1391 | /* card write enable */ |
| 1392 | 1392 | nc_card_battery_status &=~(1<<6); |
| r15082 | r15083 | |
|---|---|---|
| 579 | 579 | |
| 580 | 580 | READ_LINE_MEMBER( bw12_state::ay3600_shift_r ) |
| 581 | 581 | { |
| 582 | return BIT(i | |
| 582 | return BIT(iop | |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | READ_LINE_MEMBER( bw12_state::ay3600_control_r ) |
| 586 | 586 | { |
| 587 | return BIT(i | |
| 587 | return BIT(iop | |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | 590 | WRITE_LINE_MEMBER( bw12_state::ay3600_data_ready_w ) |
| r15082 | r15083 | |
|---|---|---|
| 35 | 35 | UINT8 data = 0xff; |
| 36 | 36 | |
| 37 | 37 | if (~offset & 4) |
| 38 | data &= i | |
| 38 | data &= iop | |
| 39 | 39 | if (~offset & 2) |
| 40 | data &= i | |
| 40 | data &= iop | |
| 41 | 41 | if (~offset & 1) |
| 42 | data &= i | |
| 42 | data &= iop | |
| 43 | 43 | |
| 44 | 44 | return data; |
| 45 | 45 | } |
| r15082 | r15083 | |
|---|---|---|
| 108 | 108 | if(state->m_keyboard_line>9) { |
| 109 | 109 | return 0xff; |
| 110 | 110 | } |
| 111 | return | |
| 111 | return | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | static WRITE8_DEVICE_HANDLER(pk8000_80_portc_w) |
| r15082 | r15083 | |
| 161 | 161 | READ8_MEMBER(pk8000_state::pk8000_joy_1_r) |
| 162 | 162 | { |
| 163 | 163 | UINT8 retVal = (cassette_device_image(machine())->input() > 0.0038 ? 0x80 : 0); |
| 164 | retVal |= i | |
| 164 | retVal |= iop | |
| 165 | 165 | return retVal; |
| 166 | 166 | } |
| 167 | 167 | READ8_MEMBER(pk8000_state::pk8000_joy_2_r) |
| 168 | 168 | { |
| 169 | 169 | UINT8 retVal = (cassette_device_image(machine())->input() > 0.0038 ? 0x80 : 0); |
| 170 | retVal |= i | |
| 170 | retVal |= iop | |
| 171 | 171 | return retVal; |
| 172 | 172 | } |
| 173 | 173 |
| r15082 | r15083 | |
|---|---|---|
| 154 | 154 | break; |
| 155 | 155 | |
| 156 | 156 | case 5: |
| 157 | if (i | |
| 157 | if (iop | |
| 158 | 158 | { |
| 159 | 159 | //cartridge memory is writable |
| 160 | 160 | if (data & 0x08) |
| r15082 | r15083 | |
| 199 | 199 | |
| 200 | 200 | for (int line=0; line<8; line++) |
| 201 | 201 | if (!(m_kb_matrix & (1<<line))) |
| 202 | data &= i | |
| 202 | data &= iop | |
| 203 | 203 | |
| 204 | 204 | return data; |
| 205 | 205 | } |
| r15082 | r15083 | |
| 216 | 216 | switch( offset ) |
| 217 | 217 | { |
| 218 | 218 | case 0: //x-axis |
| 219 | data = (i | |
| 219 | data = (iop | |
| 220 | 220 | break; |
| 221 | 221 | case 1: //y-axis |
| 222 | data = (i | |
| 222 | data = (iop | |
| 223 | 223 | break; |
| 224 | 224 | } |
| 225 | 225 | |
| r15082 | r15083 | |
| 231 | 231 | switch( offset ) |
| 232 | 232 | { |
| 233 | 233 | case 0: //x-axis |
| 234 | m_mousex = i | |
| 234 | m_mousex = iop | |
| 235 | 235 | break; |
| 236 | 236 | case 1: //y-axis |
| 237 | m_mousey = i | |
| 237 | m_mousey = iop | |
| 238 | 238 | break; |
| 239 | 239 | } |
| 240 | 240 | } |
| r15082 | r15083 | |
|---|---|---|
| 100 | 100 | for (i = 0; i < 11; i++) |
| 101 | 101 | { |
| 102 | 102 | sprintf(kbdrow,"X%X",i); |
| 103 | j = i | |
| 103 | j = iop | |
| 104 | 104 | if (j) |
| 105 | 105 | return (machine().rand() & 0x10) | 2; |
| 106 | 106 | } |
| r15082 | r15083 | |
| 137 | 137 | for (i = 0; i < 11; i++) |
| 138 | 138 | { |
| 139 | 139 | sprintf(kbdrow,"X%X",i); |
| 140 | j = i | |
| 140 | j = iop | |
| 141 | 141 | if (j) |
| 142 | 142 | { |
| 143 | 143 | if (j==m_j) return 0; |
| r15082 | r15083 | |
| 151 | 151 | else |
| 152 | 152 | if (offset == 1) // port 41 bits 6&7 (modifier keys), and bit 1 (test rom status bit) |
| 153 | 153 | { |
| 154 | return (machine().rand() & 2) | i | |
| 154 | return (machine().rand() & 2) | iop | |
| 155 | 155 | } |
| 156 | 156 | else // port 42 (get a row) |
| 157 | 157 | { |
| 158 | 158 | for (i = 0; i < 11; i++) |
| 159 | 159 | { |
| 160 | 160 | sprintf(kbdrow,"X%X",i); |
| 161 | if (i | |
| 161 | if (iop | |
| 162 | 162 | return i; |
| 163 | 163 | } |
| 164 | 164 | } |
| r15082 | r15083 | |
|---|---|---|
| 209 | 209 | switch( offset ) |
| 210 | 210 | { |
| 211 | 211 | case 0x30: /* Read controls */ |
| 212 | data = i | |
| 212 | data = iop | |
| 213 | 213 | break; |
| 214 | 214 | case 0x31: |
| 215 | data = i | |
| 215 | data = iop | |
| 216 | 216 | /* Sub-batttery OK */ |
| 217 | 217 | data |= 0x02; |
| 218 | 218 | break; |
| r15082 | r15083 | |
| 558 | 558 | if ( state->m_io_reg[0x33] & 0x04 ) |
| 559 | 559 | { |
| 560 | 560 | device_set_input_line( state->m_tlcs900, TLCS900_NMI, |
| 561 | ( | |
| 561 | ( | |
| 562 | 562 | } |
| 563 | 563 | } |
| 564 | 564 |
| r15082 | r15083 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | static INPUT_PORTS_START( nes_controllers ) |
| 58 | 58 | PORT_START("PAD1") /* Joypad 1 */ |
| 59 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 60 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 61 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 62 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 63 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 64 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 65 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 66 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) | |
| 59 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 60 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 61 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 62 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 63 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 64 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 65 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 66 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001) | |
| 67 | 67 | |
| 68 | 68 | PORT_START("PAD2") /* Joypad 2 */ |
| 69 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 70 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 71 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 72 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 73 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 74 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 75 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 76 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, PORTCOND_EQUALS, 0x0010) | |
| 69 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 A") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 70 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 B") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 71 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 72 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 73 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 74 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 75 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 76 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010) | |
| 77 | 77 | |
| 78 | 78 | PORT_START("PAD3") /* Joypad 3 */ |
| 79 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 A") PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 80 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 B") PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 81 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 82 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 83 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 84 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 85 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 86 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, PORTCOND_EQUALS, 0x0100) | |
| 79 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 A") PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 80 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 B") PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 81 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 82 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 83 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 84 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 85 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 86 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100) | |
| 87 | 87 | |
| 88 | 88 | PORT_START("PAD4") /* Joypad 4 */ |
| 89 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 A") PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 90 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 B") PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 91 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 92 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 93 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 94 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 95 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 96 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, PORTCOND_EQUALS, 0x1000) | |
| 89 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 A") PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 90 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 B") PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 91 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 92 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 93 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 94 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 95 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 96 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000) | |
| 97 | 97 | |
| 98 | 98 | PORT_START("ZAPPER1_X") /* P1 zapper */ |
| 99 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 99 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 100 | 100 | PORT_START("ZAPPER1_Y") /* P1 zapper */ |
| 101 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 101 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 102 | 102 | PORT_START("ZAPPER1_T") /* P1 zapper trigger */ |
| 103 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P1 Lightgun Trigger") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 103 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P1 Lightgun Trigger") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 104 | 104 | |
| 105 | 105 | PORT_START("ZAPPER2_X") /* P2 zapper */ |
| 106 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 106 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 107 | 107 | PORT_START("ZAPPER2_Y") /* P2 zapper */ |
| 108 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 108 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 109 | 109 | PORT_START("ZAPPER2_T") /* P2 zapper trigger */ |
| 110 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P2 Lightgun Trigger") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 110 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P2 Lightgun Trigger") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 111 | 111 | |
| 112 | 112 | PORT_START("PADDLE") /* Arkanoid paddle */ |
| 113 | PORT_BIT( 0xff, 0x7f, IPT_PADDLE) PORT_SENSITIVITY(25) PORT_KEYDELTA(3) PORT_MINMAX(0x62,0xf2) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 113 | PORT_BIT( 0xff, 0x7f, IPT_PADDLE) PORT_SENSITIVITY(25) PORT_KEYDELTA(3) PORT_MINMAX(0x62,0xf2) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, | |
| 114 | 114 | |
| 115 | 115 | PORT_START("CC_LEFT") |
| 116 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 117 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 118 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 119 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 120 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 121 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 122 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 123 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 116 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 117 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 118 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 119 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 120 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 121 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 122 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 123 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 124 | 124 | |
| 125 | 125 | PORT_START("CC_RIGHT") |
| 126 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 127 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 128 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 129 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 130 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 131 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 132 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 133 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1)PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0006) | |
| 126 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 127 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 128 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 129 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 130 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 131 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 132 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 133 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1)PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0006) | |
| 134 | 134 | |
| 135 | 135 | INPUT_PORTS_END |
| 136 | 136 | |
| 137 | 137 | static INPUT_PORTS_START( fc_keyboard ) |
| 138 | 138 | PORT_START("FCKEY0") |
| 139 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 140 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 141 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 142 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 143 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 144 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 145 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 146 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 139 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 140 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 141 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 142 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 143 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 144 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 145 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 146 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 147 | 147 | |
| 148 | 148 | PORT_START("FCKEY1") |
| 149 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 150 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 151 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 152 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 153 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 154 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 155 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 156 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 149 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 150 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 151 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 152 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 153 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 154 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 155 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 156 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 157 | 157 | |
| 158 | 158 | PORT_START("FCKEY2") |
| 159 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 160 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 161 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 162 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 163 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 164 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 165 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 166 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 159 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 160 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 161 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 162 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 163 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 164 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 165 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 166 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 167 | 167 | |
| 168 | 168 | PORT_START("FCKEY3") |
| 169 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 170 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 171 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 172 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 173 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 174 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 176 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 169 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 170 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 171 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 172 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 173 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 174 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 176 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 177 | 177 | |
| 178 | 178 | PORT_START("FCKEY4") |
| 179 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 180 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 181 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 182 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 183 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 184 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 185 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 186 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 179 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 180 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 181 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 182 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 183 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 184 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 185 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 186 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 187 | 187 | |
| 188 | 188 | PORT_START("FCKEY5") |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 191 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 192 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 193 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 194 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 195 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 196 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 191 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 192 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 193 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 194 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 195 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 196 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 197 | 197 | |
| 198 | 198 | PORT_START("FCKEY6") |
| 199 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 200 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 201 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 202 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 203 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 204 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 205 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 206 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 199 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 200 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 201 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 202 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 203 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 204 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 205 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 206 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 207 | 207 | |
| 208 | 208 | PORT_START("FCKEY7") |
| 209 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 210 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 211 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 212 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 213 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 214 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 215 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 216 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 209 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 210 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 211 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 212 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 213 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 214 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 215 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 216 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 217 | 217 | |
| 218 | 218 | PORT_START("FCKEY8") |
| 219 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 220 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 221 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 222 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 223 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 224 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 225 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 226 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) | |
| 219 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 220 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 221 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 222 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 223 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 224 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 225 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 226 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0008) | |
| 227 | 227 | |
| 228 | 228 | INPUT_PORTS_END |
| 229 | 229 | |
| 230 | 230 | static INPUT_PORTS_START( subor_keyboard ) |
| 231 | 231 | PORT_START("SUBKEY0") |
| 232 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 233 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 234 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 235 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 236 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 237 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 238 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 239 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 232 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 233 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 234 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 235 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 236 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 237 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 238 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 239 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 240 | 240 | |
| 241 | 241 | PORT_START("SUBKEY1") |
| 242 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 243 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 244 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 245 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 246 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 247 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 248 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 249 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 242 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 243 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 244 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 245 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 246 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 247 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 248 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 249 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 250 | 250 | |
| 251 | 251 | PORT_START("SUBKEY2") |
| 252 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 253 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 254 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 255 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 256 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 257 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 259 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 252 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 253 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 254 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 255 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 256 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 257 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 259 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 260 | 260 | |
| 261 | 261 | PORT_START("SUBKEY3") |
| 262 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 263 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 264 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 265 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 266 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 267 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 268 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 269 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 262 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 263 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 264 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 265 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 266 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 267 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 268 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 269 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 270 | 270 | |
| 271 | 271 | PORT_START("SUBKEY4") |
| 272 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 273 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 274 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 275 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 276 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 277 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 278 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 279 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 272 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 273 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 274 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 275 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 276 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 277 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 278 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 279 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 280 | 280 | |
| 281 | 281 | PORT_START("SUBKEY5") |
| 282 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 283 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 284 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 285 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 286 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 287 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 288 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 289 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 282 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 283 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 284 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 285 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 286 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 287 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 288 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 289 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 290 | 290 | |
| 291 | 291 | PORT_START("SUBKEY6") |
| 292 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 293 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 294 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 295 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 296 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 297 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 298 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 299 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 292 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 293 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 294 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 295 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 296 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 297 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 298 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 299 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 300 | 300 | |
| 301 | 301 | PORT_START("SUBKEY7") |
| 302 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 303 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 304 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 305 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 306 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 307 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 308 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 309 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 302 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 303 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 304 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 305 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 306 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 307 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 308 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 309 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 310 | 310 | |
| 311 | 311 | PORT_START("SUBKEY8") |
| 312 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 313 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 314 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 316 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 317 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 318 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 319 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 312 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 313 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 314 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 316 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 317 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 318 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 319 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 320 | 320 | |
| 321 | 321 | PORT_START("SUBKEY9") |
| 322 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 322 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x000f, | |
| 323 | 323 | |
| 324 | 324 | PORT_START("SUBKEY10") |
| 325 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 326 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 327 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 328 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 329 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 330 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 331 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 332 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 325 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 326 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 327 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 328 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 329 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 330 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 331 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 332 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 333 | 333 | |
| 334 | 334 | PORT_START("SUBKEY11") |
| 335 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD)PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 336 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 337 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 338 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 339 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 340 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 341 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD)PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 342 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 335 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD)PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 336 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 337 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 338 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 339 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 340 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 341 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD)PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 342 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 343 | 343 | |
| 344 | 344 | PORT_START("SUBKEY12") |
| 345 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 346 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 347 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 348 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 350 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 351 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 352 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) | |
| 345 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 346 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 347 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 348 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2") PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 350 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 351 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 352 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0009) | |
| 353 | 353 | |
| 354 | 354 | INPUT_PORTS_END |
| 355 | 355 |
| r15082 | r15083 | |
|---|---|---|
| 292 | 292 | UINT8 data = 0xff; |
| 293 | 293 | |
| 294 | 294 | if (!(offset & 0x80)) |
| 295 | data &= i | |
| 295 | data &= iop | |
| 296 | 296 | |
| 297 | 297 | if (!(offset & 0x40)) |
| 298 | data &= i | |
| 298 | data &= iop | |
| 299 | 299 | |
| 300 | 300 | if (!(offset & 0x20)) |
| 301 | data &= i | |
| 301 | data &= iop | |
| 302 | 302 | |
| 303 | 303 | if (!(offset & 0x10)) |
| 304 | data &= i | |
| 304 | data &= iop | |
| 305 | 305 | |
| 306 | 306 | if (!(offset & 0x08)) |
| 307 | data &= i | |
| 307 | data &= iop | |
| 308 | 308 | |
| 309 | 309 | if (!(offset & 0x04)) |
| 310 | data &= i | |
| 310 | data &= iop | |
| 311 | 311 | |
| 312 | 312 | if (!(offset & 0x02)) |
| 313 | data &= i | |
| 313 | data &= iop | |
| 314 | 314 | |
| 315 | 315 | if (!(offset & 0x01)) |
| 316 | data &= i | |
| 316 | data &= iop | |
| 317 | 317 | |
| 318 | 318 | return data; |
| 319 | 319 | } |
| r15082 | r15083 | |
|---|---|---|
| 396 | 396 | data |= m_serial->in_ack()<<1; |
| 397 | 397 | data |= m_serial->in_xin()<<2; |
| 398 | 398 | |
| 399 | data |= i | |
| 399 | data |= iop | |
| 400 | 400 | |
| 401 | 401 | return data; |
| 402 | 402 | } |
| r15082 | r15083 | |
| 419 | 419 | UINT8 data = 0x00; |
| 420 | 420 | |
| 421 | 421 | if (m_kb_matrix & 0x01) |
| 422 | data |= i | |
| 422 | data |= iop | |
| 423 | 423 | if (m_kb_matrix & 0x02) |
| 424 | data |= i | |
| 424 | data |= iop | |
| 425 | 425 | if (m_kb_matrix & 0x04) |
| 426 | data |= i | |
| 426 | data |= iop | |
| 427 | 427 | if (m_kb_matrix & 0x08) |
| 428 | data |= i | |
| 428 | data |= iop | |
| 429 | 429 | if (m_kb_matrix & 0x10) |
| 430 | data |= i | |
| 430 | data |= iop | |
| 431 | 431 | if (m_kb_matrix & 0x20) |
| 432 | data |= i | |
| 432 | data |= iop | |
| 433 | 433 | if (m_kb_matrix & 0x40) |
| 434 | data |= i | |
| 434 | data |= iop | |
| 435 | 435 | if (m_kb_matrix & 0x80) |
| 436 | data |= i | |
| 436 | data |= iop | |
| 437 | 437 | if (m_kb_matrix & 0x100) |
| 438 | data |= i | |
| 438 | data |= iop | |
| 439 | 439 | if (m_kb_matrix & 0x200) |
| 440 | data |= i | |
| 440 | data |= iop | |
| 441 | 441 | |
| 442 | 442 | return data; |
| 443 | 443 | } |
| r15082 | r15083 | |
|---|---|---|
| 166 | 166 | |
| 167 | 167 | READ16_MEMBER(sgi_ip2_state::sgi_ip2_swtch_r) |
| 168 | 168 | { |
| 169 | verboselog(machine(), 0, "sgi_ip2_swtch_r: %04x\n", input_port_read(machine(), "SWTCH")); | |
| 170 | return input_port_read(machine(), "SWTCH"); | |
| 169 | verboselog(machine(), 0, "sgi_ip2_swtch_r: %04x\n", ioport("SWTCH")->read()); | |
| 170 | return ioport("SWTCH")->read(); | |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | READ8_MEMBER(sgi_ip2_state::sgi_ip2_clock_ctl_r) |
| r15082 | r15083 | |
|---|---|---|
| 785 | 785 | } |
| 786 | 786 | } |
| 787 | 787 | // TODO: fix |
| 788 | state->subdevice<ns16550_device>("ns16550_2")->ri_w( | |
| 788 | state->subdevice<ns16550_device>("ns16550_2")->ri_w( | |
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | |
| r15082 | r15083 | |
| 1019 | 1019 | { |
| 1020 | 1020 | // logerror("system status r: \n"); |
| 1021 | 1021 | |
| 1022 | return m_system_status | (i | |
| 1022 | return m_system_status | (iop | |
| 1023 | 1023 | } |
| 1024 | 1024 | |
| 1025 | 1025 | READ8_MEMBER(pcw16_state::pcw16_timer_interrupt_counter_r) |
| r15082 | r15083 | |
| 1331 | 1331 | static INPUT_PORTS_START(pcw16) |
| 1332 | 1332 | PORT_START("EXTRA") |
| 1333 | 1333 | /* vblank */ |
| 1334 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_VBLANK) | |
| 1334 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") | |
| 1335 | 1335 | /* power switch - default is on */ |
| 1336 | 1336 | PORT_DIPNAME(0x40, 0x40, "Power Switch/Suspend") |
| 1337 | 1337 | PORT_DIPSETTING(0x0, DEF_STR( Off) ) |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | if (!device->started()) return 0; |
| 68 | 68 | |
| 69 | 69 | if (!(state->m_kb_matrix & 0x01)) |
| 70 | data &= | |
| 70 | data &= | |
| 71 | 71 | if (!(state->m_kb_matrix & 0x02)) |
| 72 | data &= | |
| 72 | data &= | |
| 73 | 73 | if (!(state->m_kb_matrix & 0x04)) |
| 74 | data &= | |
| 74 | data &= | |
| 75 | 75 | if (!(state->m_kb_matrix & 0x08)) |
| 76 | data &= | |
| 76 | data &= | |
| 77 | 77 | if (!(state->m_kb_matrix & 0x10)) |
| 78 | data &= | |
| 78 | data &= | |
| 79 | 79 | if (!(state->m_kb_matrix & 0x20)) |
| 80 | data &= | |
| 80 | data &= | |
| 81 | 81 | if (!(state->m_kb_matrix & 0x40)) |
| 82 | data &= | |
| 82 | data &= | |
| 83 | 83 | if (!(state->m_kb_matrix & 0x80)) |
| 84 | data &= | |
| 84 | data &= s | |
| 85 | 85 | |
| 86 | 86 | return data; |
| 87 | 87 | } |
| r15082 | r15083 | |
| 246 | 246 | |
| 247 | 247 | data |= (m_rtc->tp_r()<<5); |
| 248 | 248 | data |= (m_rtc->data_out_r()<<6); |
| 249 | data |= (i | |
| 249 | data |= (iop | |
| 250 | 250 | |
| 251 | 251 | return data; |
| 252 | 252 | } |
| r15082 | r15083 | |
|---|---|---|
| 116 | 116 | for(i = 0; i < 16; i++) |
| 117 | 117 | { |
| 118 | 118 | sprintf(kbdrow,"LINE%X", i); |
| 119 | code = | |
| 119 | code = | |
| 120 | 120 | if (code < 0xff) |
| 121 | 121 | { |
| 122 | 122 | state->m_keyboard_int = 1; |
| r15082 | r15083 | |
|---|---|---|
| 306 | 306 | data |= !m_motor; |
| 307 | 307 | |
| 308 | 308 | // JS4 |
| 309 | switch (i | |
| 309 | switch (iop | |
| 310 | 310 | { |
| 311 | 311 | case 0: js4 = 0; break; |
| 312 | 312 | case 1: js4 = 1; break; |
| r15082 | r15083 | |
| 318 | 318 | data |= js4 << 4; |
| 319 | 319 | |
| 320 | 320 | // JS5 |
| 321 | switch (i | |
| 321 | switch (iop | |
| 322 | 322 | { |
| 323 | 323 | case 0: js5 = 0; break; |
| 324 | 324 | case 1: js5 = 1; break; |
| r15082 | r15083 | |
|---|---|---|
| 161 | 161 | { |
| 162 | 162 | char kbdrow[6]; |
| 163 | 163 | sprintf(kbdrow,"X%d",m_kbd); |
| 164 | return i | |
| 164 | return iop | |
| 165 | 165 | } |
| 166 | 166 | else |
| 167 | 167 | return 0xff; |
| r15082 | r15083 | |
|---|---|---|
| 141 | 141 | case 0x09: break; |
| 142 | 142 | case 0x0a: |
| 143 | 143 | if (vg230->data[9]&1) |
| 144 | data=i | |
| 144 | data=iop | |
| 145 | 145 | else |
| 146 | 146 | data=0xff; |
| 147 | 147 | break; |
| r15082 | r15083 | |
|---|---|---|
| 147 | 147 | { |
| 148 | 148 | UINT8 result = 0xff; |
| 149 | 149 | |
| 150 | if (!BIT(offset, 8)) result &= input_port_read(machine(), "ROW0"); | |
| 151 | if (!BIT(offset, 9)) result &= input_port_read(machine(), "ROW1"); | |
| 152 | if (!BIT(offset, 10)) result &= input_port_read(machine(), "ROW2"); | |
| 153 | if (!BIT(offset, 11)) result &= input_port_read(machine(), "ROW3"); | |
| 154 | if (!BIT(offset, 12)) result &= input_port_read(machine(), "ROW4"); | |
| 155 | if (!BIT(offset, 13)) result &= input_port_read(machine(), "ROW5"); | |
| 156 | if (!BIT(offset, 14)) result &= input_port_read(machine(), "ROW6"); | |
| 157 | if (!BIT(offset, 15)) result &= input_port_read(machine(), "ROW7"); | |
| 150 | if (!BIT(offset, 8)) result &= ioport("ROW0")->read(); | |
| 151 | if (!BIT(offset, 9)) result &= ioport("ROW1")->read(); | |
| 152 | if (!BIT(offset, 10)) result &= ioport("ROW2")->read(); | |
| 153 | if (!BIT(offset, 11)) result &= ioport("ROW3")->read(); | |
| 154 | if (!BIT(offset, 12)) result &= ioport("ROW4")->read(); | |
| 155 | if (!BIT(offset, 13)) result &= ioport("ROW5")->read(); | |
| 156 | if (!BIT(offset, 14)) result &= ioport("ROW6")->read(); | |
| 157 | if (!BIT(offset, 15)) result &= ioport("ROW7")->read(); | |
| 158 | 158 | |
| 159 | 159 | return result; |
| 160 | 160 | } |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | UINT8 data = m_digit; |
| 153 | 153 | |
| 154 | 154 | if (BIT(m_digit, 3)) |
| 155 | data |= i | |
| 155 | data |= iop | |
| 156 | 156 | if (BIT(m_digit, 4)) |
| 157 | data |= i | |
| 157 | data |= iop | |
| 158 | 158 | if (BIT(m_digit, 5)) |
| 159 | data |= i | |
| 159 | data |= iop | |
| 160 | 160 | if (BIT(m_digit, 6)) |
| 161 | data |= i | |
| 161 | data |= iop | |
| 162 | 162 | |
| 163 | 163 | return data; |
| 164 | 164 | } |
| r15082 | r15083 | |
|---|---|---|
| 404 | 404 | |
| 405 | 405 | |
| 406 | 406 | /* read new state of edit keys */ |
| 407 | edit_keys = | |
| 407 | edit_keys = | |
| 408 | 408 | |
| 409 | 409 | /* toggle data reg according to transitions */ |
| 410 | 410 | state->m_panel_data_reg ^= edit_keys & (~state->m_old_edit_keys); |
| r15082 | r15083 | |
| 414 | 414 | |
| 415 | 415 | |
| 416 | 416 | /* read new state of control keys */ |
| 417 | control_keys = | |
| 417 | control_keys = s | |
| 418 | 418 | |
| 419 | 419 | /* compute transitions */ |
| 420 | 420 | control_transitions = control_keys & (~state->m_old_control_keys); |
| r15082 | r15083 | |
|---|---|---|
| 452 | 452 | { |
| 453 | 453 | state->m_mfp.rsr |= 0x80; // Buffer full |
| 454 | 454 | // mfp_trigger_irq(MFP_IRQ_RX_FULL); |
| 455 | if(in | |
| 455 | if(machine.root_device().ioport | |
| 456 | 456 | { |
| 457 | 457 | state->m_current_vector[6] = 0x4c; |
| 458 | 458 | cputag_set_input_line_and_vector(machine, "maincpu",6,ASSERT_LINE,0x4c); |
| r15082 | r15083 | |
| 483 | 483 | { |
| 484 | 484 | state->m_keyboard.keytime[x] -= 5; |
| 485 | 485 | } |
| 486 | if(!(in | |
| 486 | if(!(machine.root_device().ioport | |
| 487 | 487 | { |
| 488 | 488 | if(state->m_keyboard.keyon[x] != 0) |
| 489 | 489 | { |
| r15082 | r15083 | |
| 497 | 497 | // check to see if a key is being held |
| 498 | 498 | if(state->m_keyboard.keyon[x] != 0 && state->m_keyboard.keytime[x] == 0 && state->m_keyboard.last_pressed == x) |
| 499 | 499 | { |
| 500 | if(in | |
| 500 | if(machine.root_device().ioport | |
| 501 | 501 | { |
| 502 | 502 | x68k_keyboard_push_scancode(machine,state->m_keyboard.last_pressed); |
| 503 | 503 | state->m_keyboard.keytime[state->m_keyboard.last_pressed] = (state->m_keyboard.repeat^2)*5+30; |
| 504 | 504 | logerror("KB: Holding key 0x%02x\n",state->m_keyboard.last_pressed); |
| 505 | 505 | } |
| 506 | 506 | } |
| 507 | if((in | |
| 507 | if((machine.root_device().ioport | |
| 508 | 508 | { |
| 509 | 509 | if(state->m_keyboard.keyon[x] == 0) |
| 510 | 510 | { |
| r15082 | r15083 | |
| 548 | 548 | switch(state->m_mouse.inputtype) |
| 549 | 549 | { |
| 550 | 550 | case 0: |
| 551 | ipt = in | |
| 551 | ipt = machine.root_device().ioport | |
| 552 | 552 | break; |
| 553 | 553 | case 1: |
| 554 | val = in | |
| 554 | val = machine.root_device().ioport | |
| 555 | 555 | ipt = val - state->m_mouse.last_mouse_x; |
| 556 | 556 | state->m_mouse.last_mouse_x = val; |
| 557 | 557 | break; |
| 558 | 558 | case 2: |
| 559 | val = in | |
| 559 | val = machine.root_device().ioport | |
| 560 | 560 | ipt = val - state->m_mouse.last_mouse_y; |
| 561 | 561 | state->m_mouse.last_mouse_y = val; |
| 562 | 562 | break; |
| r15082 | r15083 | |
| 697 | 697 | x68k_state *state = device->machine().driver_data<x68k_state>(); |
| 698 | 698 | if(port == 1) |
| 699 | 699 | { |
| 700 | UINT8 porta = input_port_read(device->machine(),"md3b") & 0xff; | |
| 701 | UINT8 portb = (input_port_read(device->machine(),"md3b") >> 8) & 0xff; | |
| 700 | UINT8 porta = device->machine().root_device().ioport("md3b")->read() & 0xff; | |
| 701 | UINT8 portb = (state->ioport("md3b")->read() >> 8) & 0xff; | |
| 702 | 702 | if(state->m_mdctrl.mux1 & 0x10) |
| 703 | 703 | { |
| 704 | 704 | return porta | 0x90; |
| r15082 | r15083 | |
| 710 | 710 | } |
| 711 | 711 | if(port == 2) |
| 712 | 712 | { |
| 713 | UINT8 porta = (input_port_read(device->machine(),"md3b") >> 16) & 0xff; | |
| 714 | UINT8 portb = (input_port_read(device->machine(),"md3b") >> 24) & 0xff; | |
| 713 | UINT8 porta = (device->machine().root_device().ioport("md3b")->read() >> 16) & 0xff; | |
| 714 | UINT8 portb = (device->machine().root_device().ioport("md3b")->read() >> 24) & 0xff; | |
| 715 | 715 | if(state->m_mdctrl.mux2 & 0x20) |
| 716 | 716 | { |
| 717 | 717 | return porta | 0x90; |
| r15082 | r15083 | |
| 749 | 749 | x68k_state *state = device->machine().driver_data<x68k_state>(); |
| 750 | 750 | if(port == 1) |
| 751 | 751 | { |
| 752 | UINT8 porta = input_port_read(device->machine(),"md6b") & 0xff; | |
| 753 | UINT8 portb = (input_port_read(device->machine(),"md6b") >> 8) & 0xff; | |
| 754 | UINT8 extra = input_port_read(device->machine(),"md6b_extra") & 0x0f; | |
| 752 | UINT8 porta = device->machine().root_device().ioport("md6b")->read() & 0xff; | |
| 753 | UINT8 portb = (device->machine().root_device().ioport("md6b")->read() >> 8) & 0xff; | |
| 754 | UINT8 extra = state->ioport("md6b_extra")->read() & 0x0f; | |
| 755 | 755 | |
| 756 | 756 | switch(state->m_mdctrl.seq1) |
| 757 | 757 | { |
| r15082 | r15083 | |
| 787 | 787 | } |
| 788 | 788 | if(port == 2) |
| 789 | 789 | { |
| 790 | UINT8 porta = (input_port_read(device->machine(),"md6b") >> 16) & 0xff; | |
| 791 | UINT8 portb = (input_port_read(device->machine(),"md6b") >> 24) & 0xff; | |
| 792 | UINT8 extra = (input_port_read(device->machine(),"md6b_extra") >> 4) & 0x0f; | |
| 790 | UINT8 porta = (device->machine().root_device().ioport("md6b")->read() >> 16) & 0xff; | |
| 791 | UINT8 portb = (device->machine().root_device().ioport("md6b")->read() >> 24) & 0xff; | |
| 792 | UINT8 extra = (device->machine().root_device().ioport("md6b_extra")->read() >> 4) & 0x0f; | |
| 793 | 793 | |
| 794 | 794 | switch(state->m_mdctrl.seq2) |
| 795 | 795 | { |
| r15082 | r15083 | |
| 838 | 838 | x68k_state *state = device->machine().driver_data<x68k_state>(); |
| 839 | 839 | if(port == 1) |
| 840 | 840 | { |
| 841 | UINT8 porta = input_port_read(device->machine(),"xpd1lr") & 0xff; | |
| 842 | UINT8 portb = (input_port_read(device->machine(),"xpd1lr") >> 8) & 0xff; | |
| 841 | UINT8 porta = device->machine().root_device().ioport("xpd1lr")->read() & 0xff; | |
| 842 | UINT8 portb = (state->ioport("xpd1lr")->read() >> 8) & 0xff; | |
| 843 | 843 | if(state->m_mdctrl.mux1 & 0x10) |
| 844 | 844 | { |
| 845 | 845 | return porta; |
| r15082 | r15083 | |
| 851 | 851 | } |
| 852 | 852 | if(port == 2) |
| 853 | 853 | { |
| 854 | UINT8 porta = (input_port_read(device->machine(),"xpd1lr") >> 16) & 0xff; | |
| 855 | UINT8 portb = (input_port_read(device->machine(),"xpd1lr") >> 24) & 0xff; | |
| 854 | UINT8 porta = (device->machine().root_device().ioport("xpd1lr")->read() >> 16) & 0xff; | |
| 855 | UINT8 portb = (device->machine().root_device().ioport("xpd1lr")->read() >> 24) & 0xff; | |
| 856 | 856 | if(state->m_mdctrl.mux2 & 0x20) |
| 857 | 857 | { |
| 858 | 858 | return porta; |
| r15082 | r15083 | |
| 869 | 869 | static READ8_DEVICE_HANDLER( ppi_port_a_r ) |
| 870 | 870 | { |
| 871 | 871 | x68k_state *state = device->machine().driver_data<x68k_state>(); |
| 872 | int ctrl = | |
| 872 | int ctrl = | |
| 873 | 873 | |
| 874 | 874 | switch(ctrl) |
| 875 | 875 | { |
| 876 | 876 | case 0x00: // standard MSX/FM-Towns joystick |
| 877 | 877 | if(state->m_joy.joy1_enable == 0) |
| 878 | return | |
| 878 | return s | |
| 879 | 879 | else |
| 880 | 880 | return 0xff; |
| 881 | 881 | case 0x01: // 3-button Megadrive gamepad |
| r15082 | r15083 | |
| 892 | 892 | static READ8_DEVICE_HANDLER( ppi_port_b_r ) |
| 893 | 893 | { |
| 894 | 894 | x68k_state *state = device->machine().driver_data<x68k_state>(); |
| 895 | int ctrl = | |
| 895 | int ctrl = | |
| 896 | 896 | |
| 897 | 897 | switch(ctrl) |
| 898 | 898 | { |
| 899 | 899 | case 0x00: // standard MSX/FM-Towns joystick |
| 900 | 900 | if(state->m_joy.joy2_enable == 0) |
| 901 | return | |
| 901 | return s | |
| 902 | 902 | else |
| 903 | 903 | return 0xff; |
| 904 | 904 | case 0x10: // 3-button Megadrive gamepad |
| r15082 | r15083 | |
| 1715 | 1715 | state->m_current_vector[2] = 0x02; // bus error |
| 1716 | 1716 | state->m_current_irq_line = 2; |
| 1717 | 1717 | // cputag_set_input_line_and_vector(space->machine(), "maincpu",2,ASSERT_LINE,state->m_current_vector[2]); |
| 1718 | if( | |
| 1718 | if(s | |
| 1719 | 1719 | { |
| 1720 | 1720 | offset *= 2; |
| 1721 | 1721 | if(ACCESSING_BITS_0_7) |
| r15082 | r15083 | |
| 1733 | 1733 | state->m_current_vector[2] = 0x02; // bus error |
| 1734 | 1734 | state->m_current_irq_line = 2; |
| 1735 | 1735 | // cputag_set_input_line_and_vector(space->machine(), "maincpu",2,ASSERT_LINE,state->m_current_vector[2]); |
| 1736 | if( | |
| 1736 | if(s | |
| 1737 | 1737 | { |
| 1738 | 1738 | offset *= 2; |
| 1739 | 1739 | if(ACCESSING_BITS_0_7) |
| r15082 | r15083 | |
| 1750 | 1750 | state->m_current_vector[2] = 0x02; // bus error |
| 1751 | 1751 | state->m_current_irq_line = 2; |
| 1752 | 1752 | // cputag_set_input_line_and_vector(space->machine(), "maincpu",2,ASSERT_LINE,state->m_current_vector[2]); |
| 1753 | if( | |
| 1753 | if(s | |
| 1754 | 1754 | { |
| 1755 | 1755 | offset *= 2; |
| 1756 | 1756 | if(ACCESSING_BITS_0_7) |
| r15082 | r15083 | |
| 1768 | 1768 | state->m_current_vector[2] = 0x02; // bus error |
| 1769 | 1769 | state->m_current_irq_line = 2; |
| 1770 | 1770 | // cputag_set_input_line_and_vector(space->machine(), "maincpu",2,ASSERT_LINE,state->m_current_vector[2]); |
| 1771 | if( | |
| 1771 | if(s | |
| 1772 | 1772 | { |
| 1773 | 1773 | offset *= 2; |
| 1774 | 1774 | if(ACCESSING_BITS_0_7) |
| r15082 | r15083 | |
| 1781 | 1781 | { |
| 1782 | 1782 | x68k_state *state = space->machine().driver_data<x68k_state>(); |
| 1783 | 1783 | /* These are expansion devices, if not present, they cause a bus error */ |
| 1784 | if( | |
| 1784 | if(s | |
| 1785 | 1785 | { |
| 1786 | 1786 | state->m_current_vector[2] = 0x02; // bus error |
| 1787 | 1787 | state->m_current_irq_line = 2; |
| r15082 | r15083 | |
| 1798 | 1798 | { |
| 1799 | 1799 | x68k_state *state = space->machine().driver_data<x68k_state>(); |
| 1800 | 1800 | /* These are expansion devices, if not present, they cause a bus error */ |
| 1801 | if( | |
| 1801 | if(s | |
| 1802 | 1802 | { |
| 1803 | 1803 | state->m_current_vector[2] = 0x02; // bus error |
| 1804 | 1804 | state->m_current_irq_line = 2; |
| r15082 | r15083 | |
| 2163 | 2163 | // TODO: Sharp Cyber Stick (CZ-8NJ2) support |
| 2164 | 2164 | |
| 2165 | 2165 | PORT_START( "joy1" ) |
| 2166 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2167 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2168 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2169 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2170 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2171 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2172 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2173 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x00) | |
| 2166 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2167 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2168 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2169 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2170 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2171 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2172 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2173 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x00) | |
| 2174 | 2174 | |
| 2175 | 2175 | PORT_START( "joy2" ) |
| 2176 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2177 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2178 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2179 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2180 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2181 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2182 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2183 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x00) | |
| 2176 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2177 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2178 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2179 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2180 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2181 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2182 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2183 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x00) | |
| 2184 | 2184 | |
| 2185 | 2185 | PORT_START( "key1" ) |
| 2186 | 2186 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_UNUSED) // unused |
| r15082 | r15083 | |
| 2329 | 2329 | |
| 2330 | 2330 | // 3-button Megadrive gamepad |
| 2331 | 2331 | PORT_START("md3b") |
| 2332 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 1 Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2333 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 1 Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2334 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 1 Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2335 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 1 Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2336 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2337 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2338 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 C Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2339 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2332 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 1 Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2333 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 1 Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2334 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 1 Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2335 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 1 Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2336 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2337 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2338 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 C Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2339 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2340 | 2340 | |
| 2341 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2342 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2343 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2344 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2345 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2346 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2347 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Start Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2348 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 2341 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2342 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2343 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2344 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2345 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2346 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2347 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Start Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2348 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x01) | |
| 2349 | 2349 | |
| 2350 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 2 Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2351 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 2 Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2352 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 2 Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2353 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 2 Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2354 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2355 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2356 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 C Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2357 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2350 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 2 Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2351 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 2 Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2352 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 2 Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2353 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 2 Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2354 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2355 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2356 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 C Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2357 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2358 | 2358 | |
| 2359 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2360 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2361 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2362 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2363 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2364 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2365 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Start Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2366 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 2359 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2360 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2361 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2362 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2363 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2364 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2365 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Start Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2366 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x10) | |
| 2367 | 2367 | |
| 2368 | 2368 | // 6-button Megadrive gamepad |
| 2369 | 2369 | PORT_START("md6b") |
| 2370 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 1 Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2371 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 1 Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2372 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 1 Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2373 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 1 Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2374 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2375 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2376 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 C Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2377 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2370 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 1 Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2371 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 1 Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2372 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 1 Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2373 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 1 Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2374 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2375 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2376 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 C Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2377 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2378 | 2378 | |
| 2379 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2380 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2381 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2382 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2383 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2384 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2385 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Start Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2386 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2379 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2380 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2381 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2382 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2383 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2384 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2385 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Start Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2386 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2387 | 2387 | |
| 2388 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 2 Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2389 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 2 Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2390 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 2 Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2391 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 2 Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2392 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2393 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2394 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 C Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2395 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2388 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("MD Pad 2 Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2389 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("MD Pad 2 Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2390 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("MD Pad 2 Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2391 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("MD Pad 2 Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2392 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2393 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2394 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 C Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2395 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2396 | 2396 | |
| 2397 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2398 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2399 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2400 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2401 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2402 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2403 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Start Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2404 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2397 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2398 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2399 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2400 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2401 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2402 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2403 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_START ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Start Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2404 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2405 | 2405 | |
| 2406 | 2406 | // extra inputs |
| 2407 | 2407 | PORT_START("md6b_extra") |
| 2408 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Z Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2409 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Y Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2410 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 X Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2411 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Mode Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 2408 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Z Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2409 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Y Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2410 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 X Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2411 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME("MD Pad 1 Mode Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x02) | |
| 2412 | 2412 | |
| 2413 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Z Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2414 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Y Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2415 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 X Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2416 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Mode Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 2413 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Z Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2414 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Y Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2415 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 X Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2416 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("MD Pad 2 Mode Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x20) | |
| 2417 | 2417 | |
| 2418 | 2418 | // Dempa/Micomsoft XPD-1LR (dual D-pad gamepad sold with Libble Rabble) |
| 2419 | 2419 | PORT_START("xpd1lr") |
| 2420 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 1 Left/Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2421 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 1 Left/Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2422 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 1 Left/Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2423 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 1 Left/Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2424 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2425 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2426 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2427 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2420 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 1 Left/Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2421 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 1 Left/Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2422 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 1 Left/Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2423 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 1 Left/Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2424 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2425 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 B Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2426 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("XPD Pad 1 A Button") PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2427 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2428 | 2428 | |
| 2429 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 1 Right/Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2430 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 1 Right/Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2431 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 1 Right/Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2432 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 1 Right/Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2433 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2434 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2435 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2436 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 2429 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 1 Right/Up") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2430 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 1 Right/Down") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2431 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 1 Right/Left") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2432 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 1 Right/Right") PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2433 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2434 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2435 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2436 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0x0f, EQUALS, 0x03) | |
| 2437 | 2437 | |
| 2438 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 2 Left/Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2439 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 2 Left/Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2440 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 2 Left/Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2441 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 2 Left/Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2442 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2443 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2444 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2445 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2438 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("XPD Pad 2 Left/Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2439 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("XPD Pad 2 Left/Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2440 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("XPD Pad 2 Left/Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2441 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("XPD Pad 2 Left/Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2442 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2443 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 B Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2444 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("XPD Pad 2 A Button") PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2445 | PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2446 | 2446 | |
| 2447 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 2 Right/Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2448 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 2 Right/Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2449 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 2 Right/Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2450 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 2 Right/Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2451 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2452 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2453 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2454 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 2447 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("XPD Pad 2 Right/Up") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2448 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("XPD Pad 2 Right/Down") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2449 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("XPD Pad 2 Right/Left") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2450 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("XPD Pad 2 Right/Right") PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2451 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2452 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2453 | PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2454 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("ctrltype", 0xf0, EQUALS, 0x30) | |
| 2455 | 2455 | |
| 2456 | 2456 | INPUT_PORTS_END |
| 2457 | 2457 |
| r15082 | r15083 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | for (int line=0; line<8; line++) |
| 64 | 64 | if (m_mux_data & (1<<line)) |
| 65 | data &= i | |
| 65 | data &= iop | |
| 66 | 66 | |
| 67 | 67 | return data; |
| 68 | 68 | } |
| r15082 | r15083 | |
|---|---|---|
| 253 | 253 | static INTERRUPT_GEN( n64_reset_poll ) |
| 254 | 254 | { |
| 255 | 255 | n64_periphs *periphs = device->machine().device<n64_periphs>("rcp"); |
| 256 | periphs->poll_reset_button(( | |
| 256 | periphs->poll_reset_button(( | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | static MACHINE_CONFIG_START( n64, n64_state ) |
| r15082 | r15083 | |
|---|---|---|
| 296 | 296 | PORT_CONFSETTING( GENMOD, "GenMod" ) |
| 297 | 297 | |
| 298 | 298 | PORT_START( "BOOTROM" ) |
| 299 | PORT_CONFNAME( 0x01, GENEVE_098, "Boot ROM" ) PORT_CONDITION( "MODE", 0x01, | |
| 299 | PORT_CONFNAME( 0x01, GENEVE_098, "Boot ROM" ) PORT_CONDITION( "MODE", 0x01, | |
| 300 | 300 | PORT_CONFSETTING( GENEVE_098, "Version 0.98" ) |
| 301 | 301 | PORT_CONFSETTING( GENEVE_100, "Version 1.00" ) |
| 302 | 302 | |
| 303 | 303 | PORT_START( "SRAM" ) |
| 304 | PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" ) PORT_CONDITION( "MODE", 0x01, | |
| 304 | PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" ) PORT_CONDITION( "MODE", 0x01, | |
| 305 | 305 | PORT_CONFSETTING( 0x00, "32 KiB" ) |
| 306 | 306 | PORT_CONFSETTING( 0x01, "64 KiB" ) |
| 307 | 307 | PORT_CONFSETTING( 0x02, "384 KiB" ) |
| 308 | 308 | |
| 309 | 309 | PORT_START( "GENMODDIPS" ) |
| 310 | PORT_DIPNAME( GM_TURBO, 0x00, "Genmod Turbo mode") PORT_CONDITION( "MODE", 0x01, | |
| 310 | PORT_DIPNAME( GM_TURBO, 0x00, "Genmod Turbo mode") PORT_CONDITION( "MODE", 0x01, | |
| 311 | 311 | PORT_CONFSETTING( 0x00, DEF_STR( Off )) |
| 312 | 312 | PORT_CONFSETTING( GM_TURBO, DEF_STR( On )) |
| 313 | PORT_DIPNAME( GM_TIM, GM_TIM, "Genmod TI mode") PORT_CONDITION( "MODE", 0x01, | |
| 313 | PORT_DIPNAME( GM_TIM, GM_TIM, "Genmod TI mode") PORT_CONDITION( "MODE", 0x01, | |
| 314 | 314 | PORT_CONFSETTING( 0x00, DEF_STR( Off )) |
| 315 | 315 | PORT_CONFSETTING( GM_TIM, DEF_STR( On )) |
| 316 | 316 | |
| r15082 | r15083 | |
| 440 | 440 | if (m_inta==CLEAR_LINE) answer |= 0x02; |
| 441 | 441 | if (m_int2==CLEAR_LINE) answer |= 0x04; |
| 442 | 442 | |
| 443 | joy = i | |
| 443 | joy = iop | |
| 444 | 444 | if (m_joystick_select==0) joy = joy & 0xff; |
| 445 | 445 | else joy = (joy>>8) & 0xff; |
| 446 | 446 | answer |= joy; |
| r15082 | r15083 | |
| 480 | 480 | if (m_keyint==CLEAR_LINE) answer |= 0x40; |
| 481 | 481 | |
| 482 | 482 | // Joystick up (mirror of bit 7) |
| 483 | joy = i | |
| 483 | joy = iop | |
| 484 | 484 | if (m_joystick_select==0) joy = joy & 0xff; |
| 485 | 485 | else joy = (joy>>8) & 0xff; |
| 486 | 486 | if ((joy & 0x80)==0x00) answer |= 0x80; |
| r15082 | r15083 | |
| 694 | 694 | driver->m_int2 = CLEAR_LINE; // flag reflecting the INT2 line |
| 695 | 695 | driver->m_keyint = CLEAR_LINE; |
| 696 | 696 | |
| 697 | driver->m_peribox->set_genmod(in | |
| 697 | driver->m_peribox->set_genmod(machine.root_device().ioport | |
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | static MACHINE_CONFIG_START( geneve_60hz, geneve ) |
| r15082 | r15083 | |
|---|---|---|
| 115 | 115 | |
| 116 | 116 | switch (m_ls145_p) |
| 117 | 117 | { |
| 118 | case 6: data &= input_port_read(machine(), "Q6"); break; | |
| 119 | case 7: data &= input_port_read(machine(), "Q7"); break; | |
| 120 | case 8: data &= input_port_read(machine(), "Q8"); break; | |
| 121 | case 9: data &= input_port_read(machine(), "Q9"); break; | |
| 118 | case 6: data &= ioport("Q6")->read(); break; | |
| 119 | case 7: data &= ioport("Q7")->read(); break; | |
| 120 | case 8: data &= ioport("Q8")->read(); break; | |
| 121 | case 9: data &= ioport("Q9")->read(); break; | |
| 122 | 122 | default: |
| 123 | 123 | if (!m_eprom_oe && !m_eprom_ce) |
| 124 | 124 | { |
| r15082 | r15083 | |
|---|---|---|
| 509 | 509 | { |
| 510 | 510 | space->install_read_bank(0x10000 - size, 0xdfff, "bank3"); |
| 511 | 511 | space->nop_write(0x10000 - size, 0xdfff); |
| 512 | state->membank("bank3")->set_base(s | |
| 512 | state->membank("bank3")->set_base(state-> | |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | /* ram, continued */ |
| r15082 | r15083 | |
| 659 | 659 | |
| 660 | 660 | if (VERBOSE) |
| 661 | 661 | logerror("7508 cmd: DIP Switch Read\n"); |
| 662 | m_sior = i | |
| 662 | m_sior = iop | |
| 663 | 663 | break; |
| 664 | 664 | |
| 665 | 665 | case 0x0b: if (VERBOSE) logerror("7508 cmd: Stop Key Interrupt disable\n"); break; |
| r15082 | r15083 | |
| 928 | 928 | static INPUT_CHANGED( key_callback ) |
| 929 | 929 | { |
| 930 | 930 | px4_state *px4 = field.machine().driver_data<px4_state>(); |
| 931 | UINT32 oldvalue = oldval * field.mask, newvalue = newval * field.mask; | |
| 931 | UINT32 oldvalue = oldval * field.mask(), newvalue = newval * field.mask(); | |
| 932 | 932 | UINT32 delta = oldvalue ^ newvalue; |
| 933 | 933 | int i, scancode = 0xff, down = 0; |
| 934 | 934 |
| r15082 | r15083 | |
|---|---|---|
| 278 | 278 | READ8_MEMBER(polgar_state::read_1ff1_sfortea) |
| 279 | 279 | { |
| 280 | 280 | UINT8 data; |
| 281 | data = i | |
| 281 | data = iop | |
| 282 | 282 | logerror("1ff0 data %02x\n",data); |
| 283 | 283 | return 0; |
| 284 | 284 | // return data; |
| r15082 | r15083 | |
| 287 | 287 | READ8_MEMBER(polgar_state::read_1ff0_sfortea) |
| 288 | 288 | { |
| 289 | 289 | UINT8 data; |
| 290 | data = i | |
| 290 | data = iop | |
| 291 | 291 | logerror("1ff0 data %02x\n",data); |
| 292 | 292 | return 0; |
| 293 | 293 | // return data; |
| r15082 | r15083 | |
| 655 | 655 | if (latch_data) |
| 656 | 656 | { |
| 657 | 657 | line = get_first_cleared_bit(latch_data); |
| 658 | tmp = i | |
| 658 | tmp = iop | |
| 659 | 659 | |
| 660 | 660 | if (tmp != 0xff) |
| 661 | 661 | data = convert_imputmask(tmp); |
| r15082 | r15083 | |
| 674 | 674 | { "KEY1_0", "KEY1_1", "KEY1_2", "KEY1_3", "KEY1_4", "KEY1_5", "KEY1_6", "KEY1_7" } |
| 675 | 675 | }; |
| 676 | 676 | |
| 677 | data = i | |
| 677 | data = iop | |
| 678 | 678 | // logerror("Keyboard Port = %s Data = %d\n ", ((led_status & 0x80) == 0x00) ? keynames[0][offset] : keynames[1][offset], data); |
| 679 | 679 | return data | 0x7f; |
| 680 | 680 | } |
| r15082 | r15083 | |
| 687 | 687 | { "KEY1_0", "KEY1_1", "KEY1_2", "KEY1_3", "KEY1_4", "KEY1_5", "KEY1_6", "KEY1_7" } |
| 688 | 688 | }; |
| 689 | 689 | |
| 690 | data = i | |
| 690 | data = iop | |
| 691 | 691 | logerror("Keyboard Port = %s Data = %d\n ", keynames[0][offset] , data); |
| 692 | 692 | return data | 0x7f; |
| 693 | 693 | } |
| r15082 | r15083 | |
| 701 | 701 | { "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9" }; |
| 702 | 702 | |
| 703 | 703 | if (BPL32latch_data == 0xff) { |
| 704 | tmp = i | |
| 704 | tmp = iop | |
| 705 | 705 | logerror("Keyboard Port Offset = %d tmp %d\n", offset,tmp); |
| 706 | 706 | |
| 707 | 707 | data = tmp << 24; |
| r15082 | r15083 | |
| 709 | 709 | if (BPL32latch_data & 0x7f) { |
| 710 | 710 | logerror("ReadingBoard %02x\n",BPL32latch_data); |
| 711 | 711 | line = get_first_cleared_bit(BPL32latch_data); |
| 712 | tmp = i | |
| 712 | tmp = iop | |
| 713 | 713 | |
| 714 | 714 | if (tmp != 0xff) |
| 715 | 715 | data = convert_imputmask(tmp) << 24; |
| r15082 | r15083 | |
| 747 | 747 | data = mboard_read_board_8(&space,0); |
| 748 | 748 | } else { |
| 749 | 749 | if (monteciv_select[0] == 0x0) { |
| 750 | data = i | |
| 750 | data = iop | |
| 751 | 751 | #if 0 |
| 752 | 752 | if (data) { |
| 753 | 753 | output_set_digit_value(0,64); |
| r15082 | r15083 | |
| 762 | 762 | } |
| 763 | 763 | #endif |
| 764 | 764 | } else { |
| 765 | data = i | |
| 765 | data = iop | |
| 766 | 766 | } |
| 767 | 767 | } |
| 768 | 768 | return data; |
| r15082 | r15083 | |
| 779 | 779 | // { "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9" }; |
| 780 | 780 | |
| 781 | 781 | if (latch_data == 0xff) { |
| 782 | data = i | |
| 782 | data = iop | |
| 783 | 783 | } else { |
| 784 | 784 | // if (latch_data & 0x7f) { |
| 785 | 785 | data = mboard_read_board_8(&space,0); |
| r15082 | r15083 | |
| 787 | 787 | |
| 788 | 788 | // logerror("ReadingBoard %02x\n",latch_data); |
| 789 | 789 | // line = get_first_cleared_bit(latch_data); |
| 790 | // tmp = in | |
| 790 | // tmp = machine.root_device().ioport | |
| 791 | 791 | // mboard_write_board_8(&space,0, latch_data); |
| 792 | 792 | // data = mboard_read_board_8(&space,0); |
| 793 | 793 | // logerror("BoardRead Port Offset = %d data %02x Latch %02x\n", offset,data,latch_data); |
| r15082 | r15083 | |
| 826 | 826 | UINT32 data; |
| 827 | 827 | static const char *const keynames[4] = { "BUTTON_1", "BUTTON_2", "", "BUTTON_3" }; |
| 828 | 828 | |
| 829 | data = i | |
| 829 | data = iop | |
| 830 | 830 | |
| 831 | 831 | data = data|data<<8|data<<16|data<<24; // this might not be needed if MAME does handle odd alignment over 32bit boundaries right |
| 832 | 832 | logerror("Read from Buttons: %08x %08x\n",offset,data); |
| r15082 | r15083 | |
| 839 | 839 | static const char *const keynames[4] = { "BUTTON_1", "", "BUTTON_2", "BUTTON_3" }; |
| 840 | 840 | |
| 841 | 841 | |
| 842 | data = i | |
| 842 | data = iop | |
| 843 | 843 | |
| 844 | 844 | data = data << 8; |
| 845 | 845 | logerror("Read from Buttons: %08x %08x\n",offset,data); |
| r15082 | r15083 | |
| 852 | 852 | static const char *const keynames[3] = { "BUTTON_1", "BUTTON_2", "BUTTON_3" }; |
| 853 | 853 | |
| 854 | 854 | |
| 855 | data = i | |
| 855 | data = iop | |
| 856 | 856 | |
| 857 | 857 | logerror("Read from %06x offset: %x %04x\n",0xf00000,offset,data); |
| 858 | 858 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 990 | 990 | ---- --x- monitor refresh rate DIP-SW |
| 991 | 991 | ---- ---x (pbsy?) |
| 992 | 992 | */ |
| 993 | return i | |
| 993 | return iop | |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | WRITE8_MEMBER(pc8801_state::pc8801_ctrl_w) |
| r15082 | r15083 | |
| 1823 | 1823 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1824 | 1824 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1825 | 1825 | PORT_BIT( 0x10, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("upd1990a", upd1990a_device, data_out_r) |
| 1826 | PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_VBLANK | |
| 1826 | PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 1827 | 1827 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1828 | 1828 | |
| 1829 | 1829 | PORT_START("CFG") /* EXSWITCH */ |
| r15082 | r15083 | |
| 2168 | 2168 | pc8801_state *state = machine.driver_data<pc8801_state>(); |
| 2169 | 2169 | MACHINE_RESET_CALL( pc8801 ); |
| 2170 | 2170 | state->m_has_clock_speed = 1; |
| 2171 | state->m_clock_setting = in | |
| 2171 | state->m_clock_setting = machine.root_device().ioport | |
| 2172 | 2172 | |
| 2173 | 2173 | machine.device("maincpu")->set_unscaled_clock(state->m_clock_setting ? XTAL_4MHz : XTAL_8MHz); |
| 2174 | 2174 | machine.device("fdccpu")->set_unscaled_clock(state->m_clock_setting ? XTAL_4MHz : XTAL_8MHz); // correct? |
| r15082 | r15083 | |
| 2218 | 2218 | /* YM2203 Interface */ |
| 2219 | 2219 | |
| 2220 | 2220 | /* TODO: mouse routing (that's why I don't use DEVCB_INPUT_PORT here) */ |
| 2221 | static READ8_DEVICE_HANDLER( opn_porta_r ) { return input_port_read(device->machine(), "OPN_PA"); } | |
| 2222 | static READ8_DEVICE_HANDLER( opn_portb_r ) { return input_port_read(device->machine(), "OPN_PB"); } | |
| 2221 | static READ8_DEVICE_HANDLER( opn_porta_r ) { return device->machine().root_device().ioport("OPN_PA")->read(); } | |
| 2222 | static READ8_DEVICE_HANDLER( opn_portb_r ) { return device->machine().root_device().ioport("OPN_PB")->read(); } | |
| 2223 | 2223 | |
| 2224 | 2224 | static const ym2203_interface pc88_ym2203_intf = |
| 2225 | 2225 | { |
| r15082 | r15083 | |
|---|---|---|
| 195 | 195 | { |
| 196 | 196 | if (BIT(m_digit, i)) |
| 197 | 197 | { |
| 198 | if (!BIT(input_port_read(machine(), "KI1"), i)) data &= ~0x10; | |
| 199 | if (!BIT(input_port_read(machine(), "KI2"), i)) data &= ~0x20; | |
| 200 | if (!BIT(input_port_read(machine(), "KI3"), i)) data &= ~0x80; | |
| 198 | if (!BIT(ioport("KI1")->read(), i)) data &= ~0x10; | |
| 199 | if (!BIT(ioport("KI2")->read(), i)) data &= ~0x20; | |
| 200 | if (!BIT(ioport("KI3")->read(), i)) data &= ~0x80; | |
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 |
| r15082 | r15083 | |
|---|---|---|
| 146 | 146 | // first check that the kb latch[1] is clear; if it isn't, don't touch it! |
| 147 | 147 | if ((state->m_kb_latch_low[1] != 0) || (state->m_kb_latch_high[1] != 1)) return; |
| 148 | 148 | // next check for joypad buttons |
| 149 | keyvalue = in | |
| 149 | keyvalue = machine.root_device().ioport | |
| 150 | 150 | if (keyvalue != 0) |
| 151 | 151 | { |
| 152 | 152 | state->m_kb_latch_low[1] = (keyvalue & 0xFF0)>>4; |
| r15082 | r15083 | |
| 156 | 156 | // next check for mouse movement. |
| 157 | 157 | // this isn't written yet, so write me please! |
| 158 | 158 | // next check if shift is down |
| 159 | shift = in | |
| 159 | shift = machine.root_device().ioport | |
| 160 | 160 | // find key low and high byte ok keyboard section |
| 161 | 161 | for (row = 4; row>=0; row--) |
| 162 | 162 | { |
| 163 | keyvalue = in | |
| 163 | keyvalue = machine.root_device().ioport | |
| 164 | 164 | if (keyvalue != 0) |
| 165 | 165 | { |
| 166 | 166 | for (powerof2 = 9; powerof2 >= 0; powerof2--) |
| r15082 | r15083 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | for (int line=0; line<8; line++) |
| 38 | 38 | if (!(offset & (1<<line))) |
| 39 | data &= i | |
| 39 | data &= iop | |
| 40 | 40 | |
| 41 | 41 | return data; |
| 42 | 42 | } |
| r15082 | r15083 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | int bw2_state::get_ramdisk_size() |
| 33 | 33 | { |
| 34 | return i | |
| 34 | return iop | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* Memory */ |
| r15082 | r15083 | |
| 455 | 455 | |
| 456 | 456 | if (m_kb_row <= 9) |
| 457 | 457 | { |
| 458 | data = i | |
| 458 | data = iop | |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 227 | 227 | UINT8 keydata = 0; |
| 228 | 228 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8" }; |
| 229 | 229 | |
| 230 | if (i | |
| 230 | if (iop | |
| 231 | 231 | { |
| 232 | 232 | /* shift, upper case */ |
| 233 | 233 | table = 1; |
| r15082 | r15083 | |
| 236 | 236 | /* scan keyboard */ |
| 237 | 237 | for (row = 0; row < 9; row++) |
| 238 | 238 | { |
| 239 | UINT8 data = i | |
| 239 | UINT8 data = iop | |
| 240 | 240 | |
| 241 | 241 | for (col = 0; col < 8; col++) |
| 242 | 242 | { |
| r15082 | r15083 | |
| 352 | 352 | |
| 353 | 353 | /* Input ports */ |
| 354 | 354 | static INPUT_PORTS_START( jr200 ) |
| 355 | // PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 355 | // PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 356 | 356 | |
| 357 | 357 | PORT_START("ROW0") |
| 358 | 358 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HELP") PORT_CODE(KEYCODE_TILDE) |
| r15082 | r15083 | |
|---|---|---|
| 63 | 63 | case 0x21: |
| 64 | 64 | space->install_read_bank(start, end, page_num); |
| 65 | 65 | space->nop_write(start, end); |
| 66 | state->membank(page_num)->set_base(s | |
| 66 | state->membank(page_num)->set_base(state-> | |
| 67 | 67 | break; |
| 68 | 68 | |
| 69 | 69 | case 0xf8: |
| r15082 | r15083 | |
| 132 | 132 | { |
| 133 | 133 | case 0x015: |
| 134 | 134 | /* read keyboard line */ |
| 135 | dave_set_reg(device, 0x015, | |
| 135 | dave_set_reg(device, 0x015, | |
| 136 | 136 | break; |
| 137 | 137 | |
| 138 | 138 | case 0x016: |
| 139 | 139 | { |
| 140 | 140 | int ExternalJoystickInputs; |
| 141 | int ExternalJoystickPortInput = | |
| 141 | int ExternalJoystickPortInput = | |
| 142 | 142 | |
| 143 | 143 | if (ep->keyboard_line <= 4) |
| 144 | 144 | { |
| r15082 | r15083 | |
|---|---|---|
| 207 | 207 | |
| 208 | 208 | for (int row = 0; row < 8; row++) |
| 209 | 209 | { |
| 210 | UINT8 data = i | |
| 210 | UINT8 data = iop | |
| 211 | 211 | |
| 212 | 212 | if (data != 0xff) |
| 213 | 213 | { |
| r15082 | r15083 | |
| 348 | 348 | data |= (m_pid != PID_NONE) << 5; |
| 349 | 349 | |
| 350 | 350 | /* battery status */ |
| 351 | data |= BIT(i | |
| 351 | data |= BIT(iop | |
| 352 | 352 | |
| 353 | 353 | return data; |
| 354 | 354 | } |
| r15082 | r15083 | |
| 804 | 804 | address_space *io = m_maincpu->memory().space(AS_IO); |
| 805 | 805 | |
| 806 | 806 | // peripherals |
| 807 | m_pid = i | |
| 807 | m_pid = iop | |
| 808 | 808 | |
| 809 | 809 | io->unmap_readwrite(0x8070, 0x807b); |
| 810 | 810 | io->unmap_readwrite(0x807d, 0x807e); |
| r15082 | r15083 | |
|---|---|---|
| 87 | 87 | { |
| 88 | 88 | UINT8 result = 0xff; |
| 89 | 89 | |
| 90 | if (!BIT(m_keyboard_strobe, 0)) result &= input_port_read(machine(), "pb0"); | |
| 91 | if (!BIT(m_keyboard_strobe, 1)) result &= input_port_read(machine(), "pb1"); | |
| 92 | if (!BIT(m_keyboard_strobe, 2)) result &= input_port_read(machine(), "pb2"); | |
| 93 | if (!BIT(m_keyboard_strobe, 3)) result &= input_port_read(machine(), "pb3"); | |
| 94 | if (!BIT(m_keyboard_strobe, 4)) result &= input_port_read(machine(), "pb4"); | |
| 95 | if (!BIT(m_keyboard_strobe, 5)) result &= input_port_read(machine(), "pb5"); | |
| 96 | if (!BIT(m_keyboard_strobe, 6)) result &= input_port_read(machine(), "pb6"); | |
| 97 | if (!BIT(m_keyboard_strobe, 7)) result &= input_port_read(machine(), "pb7"); | |
| 90 | if (!BIT(m_keyboard_strobe, 0)) result &= ioport("pb0")->read(); | |
| 91 | if (!BIT(m_keyboard_strobe, 1)) result &= ioport("pb1")->read(); | |
| 92 | if (!BIT(m_keyboard_strobe, 2)) result &= ioport("pb2")->read(); | |
| 93 | if (!BIT(m_keyboard_strobe, 3)) result &= ioport("pb3")->read(); | |
| 94 | if (!BIT(m_keyboard_strobe, 4)) result &= ioport("pb4")->read(); | |
| 95 | if (!BIT(m_keyboard_strobe, 5)) result &= ioport("pb5")->read(); | |
| 96 | if (!BIT(m_keyboard_strobe, 6)) result &= ioport("pb6")->read(); | |
| 97 | if (!BIT(m_keyboard_strobe, 7)) result &= ioport("pb7")->read(); | |
| 98 | 98 | |
| 99 | 99 | return result; |
| 100 | 100 | } |
| r15082 | r15083 | |
| 103 | 103 | { |
| 104 | 104 | UINT8 result = 0xff; |
| 105 | 105 | |
| 106 | if (!BIT(m_keyboard_strobe, 7)) result &= i | |
| 106 | if (!BIT(m_keyboard_strobe, 7)) result &= iop | |
| 107 | 107 | else |
| 108 | if (!BIT(m_keyboard_strobe, 6)) result &= i | |
| 108 | if (!BIT(m_keyboard_strobe, 6)) result &= iop | |
| 109 | 109 | else |
| 110 | if (!BIT(m_keyboard_strobe, 5)) result &= i | |
| 110 | if (!BIT(m_keyboard_strobe, 5)) result &= iop | |
| 111 | 111 | else |
| 112 | if (!BIT(m_keyboard_strobe, 4)) result &= i | |
| 112 | if (!BIT(m_keyboard_strobe, 4)) result &= iop | |
| 113 | 113 | else |
| 114 | if (!BIT(m_keyboard_strobe, 3)) result &= i | |
| 114 | if (!BIT(m_keyboard_strobe, 3)) result &= iop | |
| 115 | 115 | else |
| 116 | if (!BIT(m_keyboard_strobe, 2)) result &= i | |
| 116 | if (!BIT(m_keyboard_strobe, 2)) result &= iop | |
| 117 | 117 | else |
| 118 | if (!BIT(m_keyboard_strobe, 1)) result &= i | |
| 118 | if (!BIT(m_keyboard_strobe, 1)) result &= iop | |
| 119 | 119 | else |
| 120 | if (!BIT(m_keyboard_strobe, 0)) result &= i | |
| 120 | if (!BIT(m_keyboard_strobe, 0)) result &= iop | |
| 121 | 121 | |
| 122 | 122 | return result; |
| 123 | 123 | } |
| r15082 | r15083 | |
| 164 | 164 | UINT8 result = 0xeb; |
| 165 | 165 | |
| 166 | 166 | /* bit 1, keyboard line pa6 */ |
| 167 | if (!BIT(m_keyboard_strobe, 0)) result &= input_port_read(machine(), "pb0") >> 5; | |
| 168 | if (!BIT(m_keyboard_strobe, 2)) result &= input_port_read(machine(), "pb2") >> 5; | |
| 169 | if (!BIT(m_keyboard_strobe, 7)) result &= input_port_read(machine(), "pb7") >> 5; | |
| 167 | if (!BIT(m_keyboard_strobe, 0)) result &= ioport("pb0")->read() >> 5; | |
| 168 | if (!BIT(m_keyboard_strobe, 2)) result &= ioport("pb2")->read() >> 5; | |
| 169 | if (!BIT(m_keyboard_strobe, 7)) result &= ioport("pb7")->read() >> 5; | |
| 170 | 170 | |
| 171 | 171 | /* bit 2, printer ots input */ |
| 172 | 172 | result |= (m_printer->is_ready() ? 0 : 4); |
| r15082 | r15083 | |
|---|---|---|
| 394 | 394 | |
| 395 | 395 | switch (m_keylatch) |
| 396 | 396 | { |
| 397 | case 0: data &= input_port_read(machine(), "KEY0"); break; | |
| 398 | case 1: data &= input_port_read(machine(), "KEY1"); break; | |
| 399 | case 2: data &= input_port_read(machine(), "KEY2"); break; | |
| 400 | case 3: data &= input_port_read(machine(), "KEY3"); break; | |
| 401 | case 4: data &= input_port_read(machine(), "KEY4"); break; | |
| 402 | case 5: data &= input_port_read(machine(), "KEY5"); break; | |
| 403 | case 6: data &= input_port_read(machine(), "KEY6"); break; | |
| 404 | case 7: data &= input_port_read(machine(), "KEY7"); break; | |
| 405 | case 8: data &= input_port_read(machine(), "KEY8"); break; | |
| 406 | case 9: data &= input_port_read(machine(), "KEY9"); break; | |
| 397 | case 0: data &= ioport("KEY0")->read(); break; | |
| 398 | case 1: data &= ioport("KEY1")->read(); break; | |
| 399 | case 2: data &= ioport("KEY2")->read(); break; | |
| 400 | case 3: data &= ioport("KEY3")->read(); break; | |
| 401 | case 4: data &= ioport("KEY4")->read(); break; | |
| 402 | case 5: data &= ioport("KEY5")->read(); break; | |
| 403 | case 6: data &= ioport("KEY6")->read(); break; | |
| 404 | case 7: data &= ioport("KEY7")->read(); break; | |
| 405 | case 8: data &= ioport("KEY8")->read(); break; | |
| 406 | case 9: data &= ioport("KEY9")->read(); break; | |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | data &= i | |
| 409 | data &= iop | |
| 410 | 410 | |
| 411 | 411 | return data; |
| 412 | 412 | } |
| r15082 | r15083 | |
| 437 | 437 | data |= (m_cassette->input() > 0.0) << 5; |
| 438 | 438 | |
| 439 | 439 | /* keyboard RPT */ |
| 440 | data |= BIT(i | |
| 440 | data |= BIT(iop | |
| 441 | 441 | |
| 442 | 442 | /* MC6847 FS */ |
| 443 | 443 | data |= (m_vdg->fs_r() ? 1 : 0) << 7; |
| r15082 | r15083 | |
|---|---|---|
| 262 | 262 | { |
| 263 | 263 | if (!BIT(m_digit, i)) |
| 264 | 264 | { |
| 265 | if (!BIT(input_port_read(machine(), "ROW0"), i)) data &= ~0x10; | |
| 266 | if (!BIT(input_port_read(machine(), "ROW1"), i)) data &= ~0x20; | |
| 267 | if (!BIT(input_port_read(machine(), "ROW2"), i)) data &= ~0x40; | |
| 268 | if (!BIT(input_port_read(machine(), "ROW3"), i)) data &= ~0x80; | |
| 265 | if (!BIT(ioport("ROW0")->read(), i)) data &= ~0x10; | |
| 266 | if (!BIT(ioport("ROW1")->read(), i)) data &= ~0x20; | |
| 267 | if (!BIT(ioport("ROW2")->read(), i)) data &= ~0x40; | |
| 268 | if (!BIT(ioport("ROW3")->read(), i)) data &= ~0x80; | |
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 |
| r15082 | r15083 | |
|---|---|---|
| 149 | 149 | UINT8 data=~0; |
| 150 | 150 | |
| 151 | 151 | if (!BIT(m_pad_data, 3)) |
| 152 | data &= i | |
| 152 | data &= iop | |
| 153 | 153 | if (!BIT(m_pad_data, 2)) |
| 154 | data &= i | |
| 154 | data &= iop | |
| 155 | 155 | if (!BIT(m_pad_data, 1)) |
| 156 | data &= i | |
| 156 | data &= iop | |
| 157 | 157 | if (!BIT(m_pad_data, 0)) |
| 158 | data &= i | |
| 158 | data &= iop | |
| 159 | 159 | |
| 160 | 160 | return data; |
| 161 | 161 | } |
| r15082 | r15083 | |
| 311 | 311 | static const char *const keynames[] = { "key0", "key1", "key2", "key3", "key4", "key5", "key6", "key7" }; |
| 312 | 312 | |
| 313 | 313 | keyboard_line = data & 0x07; |
| 314 | m_keyboard_data = i | |
| 314 | m_keyboard_data = iop | |
| 315 | 315 | |
| 316 | 316 | /* bit 4: cassette motor control */ |
| 317 | 317 | m_cass->change_state(BIT(data, 4) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); |
| r15082 | r15083 | |
|---|---|---|
| 174 | 174 | |
| 175 | 175 | res = 0; |
| 176 | 176 | for(i=0;i<15;i++) |
| 177 | res |= i | |
| 177 | res |= iop | |
| 178 | 178 | |
| 179 | 179 | return res; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if(m_key_mux >= 1 && m_key_mux <= 15) |
| 183 | return i | |
| 183 | return iop | |
| 184 | 184 | |
| 185 | 185 | return 0; |
| 186 | 186 | } |
| r15082 | r15083 | |
|---|---|---|
| 136 | 136 | { "SUPERSCOPE2", "SUPERSCOPE2_X", "SUPERSCOPE2_Y" }, |
| 137 | 137 | }; |
| 138 | 138 | |
| 139 | INT16 x = input_port_read(field.machine(), portnames[port][1]); | |
| 140 | INT16 y = input_port_read(field.machine(), portnames[port][2]); | |
| 139 | INT16 x = field.machine().root_device().ioport(portnames[port][1])->read(); | |
| 140 | INT16 y = field.machine().root_device().ioport(portnames[port][2])->read(); | |
| 141 | 141 | |
| 142 | 142 | /* these are the theoretical boundaries, but we currently are always onscreen... */ |
| 143 | 143 | if (x < 0 || x >= SNES_SCR_WIDTH || y < 0 || y >= snes_ppu.beam.last_visible_line) |
| r15082 | r15083 | |
| 150 | 150 | |
| 151 | 151 | static TIMER_CALLBACK( lightgun_tick ) |
| 152 | 152 | { |
| 153 | if ((input_port_read(machine, "CTRLSEL") & 0x0f) == 0x03 || (input_port_read(machine, "CTRLSEL") & 0x0f) == 0x04) | |
| 154 | { | |
| 153 | if ((machine.root_device().ioport("CTRLSEL")->read() & 0x0f) == 0x03 || (machine.root_device().ioport("CTRLSEL")->read() & 0x0f) == 0x04) { | |
| 155 | 154 | /* enable lightpen crosshair */ |
| 156 | 155 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL); |
| 157 | 156 | } |
| r15082 | r15083 | |
| 161 | 160 | crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE); |
| 162 | 161 | } |
| 163 | 162 | |
| 164 | if ((in | |
| 163 | if ((machine.root_device().ioport | |
| 165 | 164 | { |
| 166 | 165 | /* enable lightpen crosshair */ |
| 167 | 166 | crosshair_set_screen(machine, 1, CROSSHAIR_SCREEN_ALL); |
| r15082 | r15083 | |
| 176 | 175 | |
| 177 | 176 | static INPUT_PORTS_START( snes_joypads ) |
| 178 | 177 | PORT_START("SERIAL1_DATA1_L") |
| 179 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 180 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 181 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 182 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 178 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 179 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 180 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 181 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 183 | 182 | PORT_START("SERIAL1_DATA1_H") |
| 184 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 185 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 186 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 187 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 188 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 189 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 191 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) | |
| 183 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 184 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 185 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 186 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("P1 Start") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 187 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 188 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 189 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 190 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01) | |
| 192 | 191 | |
| 193 | 192 | PORT_START("SERIAL2_DATA1_L") |
| 194 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 195 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 196 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 197 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 193 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 194 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 195 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 196 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 198 | 197 | PORT_START("SERIAL2_DATA1_H") |
| 199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 200 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 201 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 202 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("P2 Start") PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 203 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 204 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 205 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 206 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) | |
| 198 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 199 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 200 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 201 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("P2 Start") PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 202 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 203 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 204 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 205 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10) | |
| 207 | 206 | |
| 208 | 207 | PORT_START("SERIAL1_DATA2_L") |
| 209 | 208 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r15082 | r15083 | |
| 226 | 225 | /* bits 4,5 = mouse speed: 0 = slow, 1 = normal, 2 = fast, 3 = unused */ |
| 227 | 226 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snes_mouse_speed_input, (void *)0) |
| 228 | 227 | /* bits 6,7 = mouse buttons */ |
| 229 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Mouse Button Left") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 230 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Mouse Button Right") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) | |
| 228 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Mouse Button Left") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 229 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Mouse Button Right") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02) | |
| 231 | 230 | |
| 232 | 231 | PORT_START("MOUSE1_X") |
| 233 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 232 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 234 | 233 | |
| 235 | 234 | PORT_START("MOUSE1_Y") |
| 236 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 235 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 237 | 236 | |
| 238 | 237 | PORT_START("MOUSE2") |
| 239 | 238 | /* bits 0,3 = mouse signature (must be 1) */ |
| r15082 | r15083 | |
| 244 | 243 | /* bits 4,5 = mouse speed: 0 = slow, 1 = normal, 2 = fast, 3 = unused */ |
| 245 | 244 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snes_mouse_speed_input, (void *)1) |
| 246 | 245 | /* bits 6,7 = mouse buttons */ |
| 247 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Mouse Button Left") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 248 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Mouse Button Right") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) | |
| 246 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Mouse Button Left") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 247 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Mouse Button Right") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x20) | |
| 249 | 248 | |
| 250 | 249 | PORT_START("MOUSE2_X") |
| 251 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 250 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 252 | 251 | |
| 253 | 252 | PORT_START("MOUSE2_Y") |
| 254 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 253 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 255 | 254 | INPUT_PORTS_END |
| 256 | 255 | |
| 257 | 256 | static INPUT_PORTS_START( snes_superscope ) |
| r15082 | r15083 | |
| 260 | 259 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snes_superscope_offscreen_input, (void *)0) |
| 261 | 260 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 262 | 261 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 263 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Port1 Superscope Pause") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 264 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Port1 Superscope Turbo") PORT_TOGGLE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 265 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Port1 Superscope Cursor") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 266 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Port1 Superscope Fire") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x03) | |
| 262 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Port1 Superscope Pause") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 263 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Port1 Superscope Turbo") PORT_TOGGLE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 264 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Port1 Superscope Cursor") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 265 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Port1 Superscope Fire") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03) | |
| 267 | 266 | |
| 268 | 267 | PORT_START("SUPERSCOPE1_X") |
| 269 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Port1 Superscope X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 268 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Port1 Superscope X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 270 | 269 | |
| 271 | 270 | PORT_START("SUPERSCOPE1_Y") |
| 272 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_NAME("Port1 Superscope Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 271 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_NAME("Port1 Superscope Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, | |
| 273 | 272 | |
| 274 | 273 | PORT_START("SUPERSCOPE2") |
| 275 | 274 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // Noise |
| 276 | 275 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snes_superscope_offscreen_input, (void *)1) |
| 277 | 276 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 278 | 277 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Port2 Superscope Pause") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 280 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Port2 Superscope Turbo") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 281 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Port2 Superscope Cursor") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 282 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Port2 Superscope Fire") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x30) | |
| 278 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Port2 Superscope Pause") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 279 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Port2 Superscope Turbo") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 280 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Port2 Superscope Cursor") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 281 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Port2 Superscope Fire") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30) | |
| 283 | 282 | |
| 284 | 283 | PORT_START("SUPERSCOPE2_X") |
| 285 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Port2 Superscope X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 284 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Port2 Superscope X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 286 | 285 | |
| 287 | 286 | PORT_START("SUPERSCOPE2_Y") |
| 288 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_NAME("Port2 Superscope Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 287 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_NAME("Port2 Superscope Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, | |
| 289 | 288 | INPUT_PORTS_END |
| 290 | 289 | |
| 291 | 290 | static INPUT_PORTS_START( snes ) |
| r15082 | r15083 | |
| 401 | 400 | { "SERIAL2_DATA1_L", "SERIAL2_DATA1_H", "SERIAL2_DATA2_L", "SERIAL2_DATA2_H" }, |
| 402 | 401 | }; |
| 403 | 402 | |
| 404 | state->m_data1[port] = input_port_read(machine, portnames[port][0]) | (input_port_read(machine, portnames[port][1]) << 8); | |
| 405 | state->m_data2[port] = input_port_read(machine, portnames[port][2]) | (input_port_read(machine, portnames[port][3]) << 8); | |
| 403 | state->m_data1[port] = machine.root_device().ioport(portnames[port][0])->read() | (machine.root_device().ioport(portnames[port][1])->read() << 8); | |
| 404 | state->m_data2[port] = machine.root_device().ioport(portnames[port][2])->read() | (machine.root_device().ioport(portnames[port][3])->read() << 8); | |
| 406 | 405 | |
| 407 | 406 | // avoid sending signals that could crash games |
| 408 | 407 | // if left, no right |
| r15082 | r15083 | |
| 425 | 424 | { "MOUSE2", "MOUSE2_X", "MOUSE2_Y" }, |
| 426 | 425 | }; |
| 427 | 426 | |
| 428 | state->m_mouse[port].buttons = input_port_read(machine, portnames[port][0]); | |
| 429 | state->m_mouse[port].x = input_port_read(machine, portnames[port][1]); | |
| 430 | state->m_mouse[port].y = input_port_read(machine, portnames[port][2]); | |
| 427 | state->m_mouse[port].buttons = machine.root_device().ioport(portnames[port][0])->read(); | |
| 428 | state->m_mouse[port].x = machine.root_device().ioport(portnames[port][1])->read(); | |
| 429 | state->m_mouse[port].y = machine.root_device().ioport(portnames[port][2])->read(); | |
| 431 | 430 | var = state->m_mouse[port].x - state->m_mouse[port].oldx; |
| 432 | 431 | |
| 433 | 432 | if (var < -127) |
| r15082 | r15083 | |
| 489 | 488 | UINT8 input; |
| 490 | 489 | |
| 491 | 490 | /* first read input bits */ |
| 492 | state->m_scope[port].x = input_port_read(machine, portnames[port][1]); | |
| 493 | state->m_scope[port].y = input_port_read(machine, portnames[port][2]); | |
| 494 | input = input_port_read(machine, portnames[port][0]); | |
| 491 | state->m_scope[port].x = machine.root_device().ioport(portnames[port][1])->read(); | |
| 492 | state->m_scope[port].y = machine.root_device().ioport(portnames[port][2])->read(); | |
| 493 | input = machine.root_device().ioport(portnames[port][0])->read(); | |
| 495 | 494 | |
| 496 | 495 | /* then start elaborating input bits: only keep old turbo value */ |
| 497 | 496 | state->m_scope[port].buttons &= 0x20; |
| r15082 | r15083 | |
| 543 | 542 | static void snes_input_read( running_machine &machine ) |
| 544 | 543 | { |
| 545 | 544 | snes_state *state = machine.driver_data<snes_state>(); |
| 546 | UINT8 ctrl1 = input_port_read(machine, "CTRLSEL") & 0x0f; | |
| 547 | UINT8 ctrl2 = (input_port_read(machine, "CTRLSEL") & 0xf0) >> 4; | |
| 545 | UINT8 ctrl1 = machine.root_device().ioport("CTRLSEL")->read() & 0x0f; | |
| 546 | UINT8 ctrl2 = (machine.root_device().ioport("CTRLSEL")->read() & 0xf0) >> 4; | |
| 548 | 547 | |
| 549 | 548 | /* Check if lightgun has been chosen as input: if so, enable crosshair */ |
| 550 | 549 | machine.scheduler().timer_set(attotime::zero, FUNC(lightgun_tick)); |
| r15082 | r15083 | |
| 608 | 607 | static UINT8 snes_oldjoy1_read( running_machine &machine ) |
| 609 | 608 | { |
| 610 | 609 | snes_state *state = machine.driver_data<snes_state>(); |
| 611 | UINT8 ctrl1 = in | |
| 610 | UINT8 ctrl1 = machine.root_device().ioport | |
| 612 | 611 | UINT8 res = 0; |
| 613 | 612 | |
| 614 | 613 | switch (ctrl1) |
| r15082 | r15083 | |
| 648 | 647 | static UINT8 snes_oldjoy2_read( running_machine &machine ) |
| 649 | 648 | { |
| 650 | 649 | snes_state *state = machine.driver_data<snes_state>(); |
| 651 | UINT8 ctrl2 = (in | |
| 650 | UINT8 ctrl2 = (machine.root_device().ioport | |
| 652 | 651 | UINT8 res = 0; |
| 653 | 652 | |
| 654 | 653 | switch (ctrl2) |
| r15082 | r15083 | |
|---|---|---|
| 1073 | 1073 | // smartmedia |
| 1074 | 1074 | data = (data & ~0x000000FF) | (m_smc.datarx & 0xFF); |
| 1075 | 1075 | // buttons |
| 1076 | data = (data & ~0x0000FF00) | (i | |
| 1076 | data = (data & ~0x0000FF00) | (iop | |
| 1077 | 1077 | } |
| 1078 | 1078 | break; |
| 1079 | 1079 | // PDDAT |
| r15082 | r15083 | |
| 1099 | 1099 | if (!m_smc.do_write) data = data | 0x00000008; |
| 1100 | 1100 | if (!smartmedia->is_present()) data = data | 0x00000004; |
| 1101 | 1101 | // buttons |
| 1102 | data = (data & ~0x000000C0) | (i | |
| 1102 | data = (data & ~0x000000C0) | (iop | |
| 1103 | 1103 | } |
| 1104 | 1104 | break; |
| 1105 | 1105 | } |
| r15082 | r15083 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | READ8_MEMBER( channelf_state::channelf_port_0_r ) |
| 50 | 50 | { |
| 51 | return port_read_with_latch(i | |
| 51 | return port_read_with_latch(iop | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | READ8_MEMBER( channelf_state::channelf_port_1_r ) |
| r15082 | r15083 | |
| 56 | 56 | UINT8 ext_value; |
| 57 | 57 | |
| 58 | 58 | if ((m_latch[0] & 0x40) == 0) |
| 59 | ext_value = i | |
| 59 | ext_value = iop | |
| 60 | 60 | else |
| 61 | ext_value = 0xc0 | i | |
| 61 | ext_value = 0xc0 | iop | |
| 62 | 62 | |
| 63 | 63 | return port_read_with_latch(ext_value,m_latch[1]); |
| 64 | 64 | } |
| r15082 | r15083 | |
| 68 | 68 | UINT8 ext_value; |
| 69 | 69 | |
| 70 | 70 | if ((m_latch[0] & 0x40) == 0) |
| 71 | ext_value = i | |
| 71 | ext_value = iop | |
| 72 | 72 | else |
| 73 | 73 | ext_value = 0xff; |
| 74 | 74 |
| r15082 | r15083 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | READ8_MEMBER(nixieclock_state::data_r) |
| 34 | 34 | { |
| 35 | return i | |
| 35 | return iop | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | static UINT8 nixie_to_num(UINT16 val) |
| r15082 | r15083 | |
|---|---|---|
| 109 | 109 | { |
| 110 | 110 | if (!BIT(m_keylatch, i)) |
| 111 | 111 | { |
| 112 | if (!BIT(input_port_read(machine(), "ROW0"), i)) data &= ~0x01; | |
| 113 | if (!BIT(input_port_read(machine(), "ROW1"), i)) data &= ~0x02; | |
| 114 | if (!BIT(input_port_read(machine(), "ROW2"), i)) data &= ~0x04; | |
| 112 | if (!BIT(ioport("ROW0")->read(), i)) data &= ~0x01; | |
| 113 | if (!BIT(ioport("ROW1")->read(), i)) data &= ~0x02; | |
| 114 | if (!BIT(ioport("ROW2")->read(), i)) data &= ~0x04; | |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 |
| r15082 | r15083 | |
|---|---|---|
| 152 | 152 | |
| 153 | 153 | READ_LINE_MEMBER( tmc2000e_state::clear_r ) |
| 154 | 154 | { |
| 155 | return BIT(i | |
| 155 | return BIT(iop | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | READ_LINE_MEMBER( tmc2000e_state::ef2_r ) |
| r15082 | r15083 | |
| 163 | 163 | READ_LINE_MEMBER( tmc2000e_state::ef3_r ) |
| 164 | 164 | { |
| 165 | 165 | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 166 | UINT8 data = ~i | |
| 166 | UINT8 data = ~iop | |
| 167 | 167 | |
| 168 | 168 | return BIT(data, m_keylatch % 8); |
| 169 | 169 | } |
| r15082 | r15083 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | char kbdrow[6]; |
| 69 | 69 | sprintf(kbdrow,"X%X", m_4c&15); |
| 70 | return i | |
| 70 | return iop | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | WRITE8_MEMBER( unior_state::unior_4c_w ) |
| r15082 | r15083 | |
|---|---|---|
| 55 | 55 | { |
| 56 | 56 | char kbdrow[6]; |
| 57 | 57 | sprintf(kbdrow,"%X",m_keyrow); |
| 58 | return i | |
| 58 | return iop | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | WRITE8_MEMBER( pmi80_state::keyboard_w ) |
| r15082 | r15083 | |
|---|---|---|
| 80 | 80 | { |
| 81 | 81 | char kbdrow[6]; |
| 82 | 82 | sprintf(kbdrow,"X%X",i); |
| 83 | data = (i | |
| 83 | data = (iop | |
| 84 | 84 | break; |
| 85 | 85 | } |
| 86 | 86 | } |
| r15082 | r15083 | |
|---|---|---|
| 641 | 641 | */ |
| 642 | 642 | |
| 643 | 643 | UINT8 data = 0; |
| 644 | UINT8 special = i | |
| 644 | UINT8 special = iop | |
| 645 | 645 | |
| 646 | 646 | // keyboard column |
| 647 | 647 | data = m_kc; |
| r15082 | r15083 | |
| 670 | 670 | */ |
| 671 | 671 | |
| 672 | 672 | UINT8 data = 0; |
| 673 | UINT8 special = i | |
| 673 | UINT8 special = iop | |
| 674 | 674 | |
| 675 | 675 | // shift |
| 676 | 676 | data |= (BIT(special, 0) & BIT(special, 1)); |
| r15082 | r15083 | |
|---|---|---|
| 145 | 145 | |
| 146 | 146 | static INPUT_PORTS_START( coco3_joystick ) |
| 147 | 147 | PORT_START(JOYSTICK_RX_TAG) |
| 148 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 148 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 149 | 149 | PORT_START(JOYSTICK_RY_TAG) |
| 150 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 150 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 151 | 151 | PORT_START(JOYSTICK_LX_TAG) |
| 152 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 152 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 153 | 153 | PORT_START(JOYSTICK_LY_TAG) |
| 154 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 154 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xFF) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 155 | 155 | PORT_START(JOYSTICK_BUTTONS_TAG) |
| 156 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x01) | |
| 157 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Right Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x01) | |
| 158 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x10) | |
| 159 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Left Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x10) | |
| 156 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Right Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01) | |
| 157 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Right Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x01) | |
| 158 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Left Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10) | |
| 159 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Left Button 1") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x10) | |
| 160 | 160 | INPUT_PORTS_END |
| 161 | 161 | |
| 162 | 162 | |
| r15082 | r15083 | |
| 167 | 167 | |
| 168 | 168 | static INPUT_PORTS_START( coco_rat_mouse ) |
| 169 | 169 | PORT_START(RAT_MOUSE_RX_TAG) |
| 170 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_X) PORT_NAME("Rat Mouse X (Right Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 170 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_X) PORT_NAME("Rat Mouse X (Right Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 171 | 171 | PORT_START(RAT_MOUSE_RY_TAG) |
| 172 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_Y) PORT_NAME("Rat Mouse Y (Right Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 172 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_Y) PORT_NAME("Rat Mouse Y (Right Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 173 | 173 | PORT_START(RAT_MOUSE_LX_TAG) |
| 174 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_X) PORT_NAME("Rat Mouse X (Left Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 174 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_X) PORT_NAME("Rat Mouse X (Left Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 175 | 175 | PORT_START(RAT_MOUSE_LY_TAG) |
| 176 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_Y) PORT_NAME("Rat Mouse Y (Left Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 176 | PORT_BIT( 0x03, 0x00, IPT_MOUSE_Y) PORT_NAME("Rat Mouse Y (Left Port)") PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 177 | 177 | PORT_START(RAT_MOUSE_BUTTONS_TAG) |
| 178 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x02) | |
| 179 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x02) | |
| 180 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x20) | |
| 181 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x20) | |
| 178 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02) | |
| 179 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x02) | |
| 180 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Rat Mouse Button 1 (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20) | |
| 181 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Rat Mouse Button 2 (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x20) | |
| 182 | 182 | INPUT_PORTS_END |
| 183 | 183 | |
| 184 | 184 | |
| r15082 | r15083 | |
| 189 | 189 | |
| 190 | 190 | static INPUT_PORTS_START( coco_lightgun ) |
| 191 | 191 | PORT_START(DIECOM_LIGHTGUN_RX_TAG) |
| 192 | PORT_BIT( 0x1ff, 266, IPT_LIGHTGUN_X ) PORT_NAME("Lightgun X (Right Port)") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(116,416) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 192 | PORT_BIT( 0x1ff, 266, IPT_LIGHTGUN_X ) PORT_NAME("Lightgun X (Right Port)") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(116,416) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 193 | 193 | PORT_START(DIECOM_LIGHTGUN_RY_TAG) |
| 194 | PORT_BIT( 0xff, 121, IPT_LIGHTGUN_Y ) PORT_NAME("Lightgun Y (Right Port)") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,242) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 194 | PORT_BIT( 0xff, 121, IPT_LIGHTGUN_Y ) PORT_NAME("Lightgun Y (Right Port)") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,242) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, | |
| 195 | 195 | PORT_START(DIECOM_LIGHTGUN_LX_TAG) |
| 196 | PORT_BIT( 0x1ff, 266, IPT_LIGHTGUN_X ) PORT_NAME("Lightgun X (Left Port)") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(116,416) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 196 | PORT_BIT( 0x1ff, 266, IPT_LIGHTGUN_X ) PORT_NAME("Lightgun X (Left Port)") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(116,416) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 197 | 197 | PORT_START(DIECOM_LIGHTGUN_LY_TAG) |
| 198 | PORT_BIT( 0xff, 121, IPT_LIGHTGUN_Y ) PORT_NAME("Lightgun Y (Left Port)") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,242) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 198 | PORT_BIT( 0xff, 121, IPT_LIGHTGUN_Y ) PORT_NAME("Lightgun Y (Left Port)") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,242) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, | |
| 199 | 199 | PORT_START(DIECOM_LIGHTGUN_BUTTONS_TAG) |
| 200 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, PORTCOND_EQUALS, 0x03) | |
| 201 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, PORTCOND_EQUALS, 0x30) | |
| 200 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Right Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1) PORT_CONDITION(CTRL_SEL_TAG, 0x0f, EQUALS, 0x03) | |
| 201 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger (Left Port)") PORT_CHANGED(coco_state::keyboard_changed, NULL) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(2) PORT_CONDITION(CTRL_SEL_TAG, 0xf0, EQUALS, 0x30) | |
| 202 | 202 | INPUT_PORTS_END |
| 203 | 203 | |
| 204 | 204 |
| r15082 | r15083 | |
|---|---|---|
| 103 | 103 | static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7" }; |
| 104 | 104 | UINT8 bit,data = 0xff; |
| 105 | 105 | for (bit = 0; bit < 8; bit++) |
| 106 | if (!BIT(m_kbd_row, bit)) data &= i | |
| 106 | if (!BIT(m_kbd_row, bit)) data &= iop | |
| 107 | 107 | |
| 108 | 108 | m_kbd_irq = (data == 0xff) ? 1 : 0; |
| 109 | 109 | if (m_control_bits & 8) data<<=4; |
| r15082 | r15083 | |
|---|---|---|
| 197 | 197 | * which makes this register read 0xFC |
| 198 | 198 | * When s4-7 is turned on, it reads 0xBC |
| 199 | 199 | */ |
| 200 | data = i | |
| 200 | data = iop | |
| 201 | 201 | return data; |
| 202 | 202 | } |
| 203 | 203 |
| r15082 | r15083 | |
|---|---|---|
| 200 | 200 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 201 | 201 | |
| 202 | 202 | PORT_START("DISC1") |
| 203 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Left/Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 204 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 205 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 206 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 207 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Left/Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 208 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 209 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 210 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 211 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Left/Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 212 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 213 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 214 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 215 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left/Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 216 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 217 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 218 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,PORTCOND_EQUALS,0x00) | |
| 203 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Left/Up") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 204 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 205 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 206 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Up-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 207 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Left/Right") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 208 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Right-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 209 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 210 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Right") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 211 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Left/Down") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 212 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 213 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 214 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Down-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 215 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Left/Left") PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 216 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Left-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 217 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 218 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left/Up-Up-Left") PORT_CONDITION("OPTIONS",0x01,EQUALS,0x00) | |
| 219 | 219 | |
| 220 | 220 | PORT_START("DISCX1") |
| 221 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Left/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01, | |
| 221 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Left/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01, | |
| 222 | 222 | |
| 223 | 223 | PORT_START("DISCY1") |
| 224 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Left/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01, | |
| 224 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Left/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_PLAYER(1) PORT_CONDITION("OPTIONS",0x01, | |
| 225 | 225 | |
| 226 | 226 | PORT_START("KEYPAD2") /* Right Player Controller Starts Here */ |
| 227 | 227 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Right/1") |
| r15082 | r15083 | |
| 242 | 242 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 243 | 243 | |
| 244 | 244 | PORT_START("DISC2") |
| 245 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Right/Up") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 246 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 247 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 248 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Up-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 249 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right/Right") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 250 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Down-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 251 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 252 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Right") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 253 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Right/Down") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 254 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 255 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 256 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Down-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 257 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Right/Left") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 258 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Up-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 259 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 260 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Left") PORT_CONDITION("OPTIONS",0x02,PORTCOND_EQUALS,0x00) | |
| 245 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Right/Up") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 246 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 247 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 248 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Up-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 249 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right/Right") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 250 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Right-Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 251 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 252 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Right") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 253 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("Right/Down") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 254 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 255 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 256 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Down-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 257 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Right/Left") PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 258 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Left-Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 259 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 260 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right/Up-Up-Left") PORT_CONDITION("OPTIONS",0x02,EQUALS,0x00) | |
| 261 | 261 | |
| 262 | 262 | PORT_START("DISCX2") |
| 263 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Right/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02, | |
| 263 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Right/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02, | |
| 264 | 264 | |
| 265 | 265 | PORT_START("DISCY2") |
| 266 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Right/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02, | |
| 266 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Right/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(2) PORT_CONDITION("OPTIONS",0x02, | |
| 267 | 267 | |
| 268 | 268 | PORT_START("OPTIONS") |
| 269 | 269 | PORT_CONFNAME( 0x01, 0x00, "Left Disc" ) |
| r15082 | r15083 | |
| 294 | 294 | |
| 295 | 295 | PORT_START("ECS_ROW0") |
| 296 | 296 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 297 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 298 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 299 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 300 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 302 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 303 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 297 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RTN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 298 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 299 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 300 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 302 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 303 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('%') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 304 | 304 | |
| 305 | 305 | PORT_START("ECS_ROW1") |
| 306 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 307 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 308 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 309 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 310 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 311 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 312 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 313 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 306 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 307 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 308 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 309 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 310 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 311 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 312 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 313 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 314 | 314 | |
| 315 | 315 | PORT_START("ECS_ROW2") |
| 316 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 317 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 318 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 319 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 320 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 321 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 322 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 323 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 316 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 317 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 318 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('-') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 319 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 320 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 321 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 322 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 323 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 324 | 324 | |
| 325 | 325 | PORT_START("ECS_ROW3") |
| 326 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 328 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 329 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 330 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 331 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 332 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 333 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 326 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 328 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 329 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 330 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 331 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 332 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 333 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 334 | 334 | |
| 335 | 335 | PORT_START("ECS_ROW4") |
| 336 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 337 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 338 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 339 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 340 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 341 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 342 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 343 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 336 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 337 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 338 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 339 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 340 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 341 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 342 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 343 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 344 | 344 | |
| 345 | 345 | PORT_START("ECS_ROW5") |
| 346 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 347 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 348 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 350 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 351 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 352 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 353 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x02) | |
| 346 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 347 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 348 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('\'') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('=') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 350 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 351 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('^') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 352 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('?') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 353 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x02) | |
| 354 | 354 | |
| 355 | 355 | PORT_START("ECS_ROW6") |
| 356 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("ECS_CNTRLSEL",0x0f, | |
| 356 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CONDITION("ECS_CNTRLSEL",0x0f, | |
| 357 | 357 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 358 | 358 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 359 | 359 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 376 | 376 | Bit 6 C6 NC NC NC NC NC NC NC |
| 377 | 377 | */ |
| 378 | 378 | PORT_START("ECS_SYNTH_ROW0") |
| 379 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 380 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 381 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 382 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 383 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 384 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 386 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 379 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 380 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 381 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 382 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 383 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 384 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 386 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 387 | 387 | |
| 388 | 388 | PORT_START("ECS_SYNTH_ROW1") |
| 389 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 390 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 391 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 392 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 393 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 394 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 395 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 389 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 390 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 391 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 392 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 393 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 394 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 395 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 397 | 397 | |
| 398 | 398 | PORT_START("ECS_SYNTH_ROW2") |
| 399 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 401 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 402 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 403 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 404 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 405 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 406 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 399 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 401 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 402 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 403 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 404 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 405 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 406 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 407 | 407 | |
| 408 | 408 | PORT_START("ECS_SYNTH_ROW3") |
| 409 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 410 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 411 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 412 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 413 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 414 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 415 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 416 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 409 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 410 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 411 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 412 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 413 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 414 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 415 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 416 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 417 | 417 | |
| 418 | 418 | PORT_START("ECS_SYNTH_ROW4") |
| 419 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 420 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 421 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 422 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 423 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 424 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 425 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 426 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 419 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Eb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 420 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 421 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Db5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 422 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 423 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 424 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 425 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 426 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 427 | 427 | |
| 428 | 428 | PORT_START("ECS_SYNTH_ROW5") |
| 429 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 430 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 431 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 432 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 433 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 434 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 435 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 436 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x01) | |
| 429 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 430 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Bb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 431 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 432 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ab5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 433 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 434 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Gb5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 435 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 436 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x01) | |
| 437 | 437 | |
| 438 | 438 | PORT_START("ECS_SYNTH_ROW6") |
| 439 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6") PORT_CONDITION("ECS_CNTRLSEL",0x0f, | |
| 439 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C6") PORT_CONDITION("ECS_CNTRLSEL",0x0f, | |
| 440 | 440 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 441 | 441 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 442 | 442 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r15082 | r15083 | |
| 449 | 449 | static INPUT_PORTS_START( intv_ecs_pads ) |
| 450 | 450 | // First ECS Hand Controller |
| 451 | 451 | PORT_START("KEYPAD3") |
| 452 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/1") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 453 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 454 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 455 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 456 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 457 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/6") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 458 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/7") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 459 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/8") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 460 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/9") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 461 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Clear") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 462 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/0") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 463 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Enter") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 464 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3/Upper") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 465 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3/Lower-Left") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 466 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3/Lower-Right") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 452 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/1") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 453 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 454 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 455 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 456 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 457 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/6") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 458 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/7") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 459 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/8") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 460 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/9") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 461 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Clear") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 462 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/0") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 463 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Enter") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 464 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3/Upper") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 465 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3/Lower-Left") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 466 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3/Lower-Right") PORT_PLAYER(3) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 467 | 467 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 468 | 468 | |
| 469 | 469 | PORT_START("DISC3") |
| 470 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P3/Up") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 471 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 472 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 473 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Up-Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 474 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P3/Right") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 475 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Down-Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 476 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 477 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Right") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 478 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P3/Down") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 479 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 480 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 481 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Down-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 482 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P3/Left") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 483 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Up-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 484 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 485 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Left") PORT_CONDITION("OPTIONS",0x04,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 470 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P3/Up") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 471 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 472 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 473 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Up-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 474 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P3/Right") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 475 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 476 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 477 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 478 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P3/Down") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 479 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 480 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 481 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 482 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P3/Left") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 483 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 484 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 485 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 486 | 486 | |
| 487 | 487 | PORT_START("DISCX3") |
| 488 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P3/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04, | |
| 488 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P3/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04, | |
| 489 | 489 | |
| 490 | 490 | PORT_START("DISCY3") |
| 491 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P3/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04, | |
| 491 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P3/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04, | |
| 492 | 492 | |
| 493 | 493 | // Second ECS Hand Controller |
| 494 | 494 | PORT_START("KEYPAD4") |
| 495 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/1") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 496 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 497 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 498 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 499 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 500 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/6") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 501 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/7") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 502 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/8") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 503 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/9") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 504 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Clear") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 505 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/0") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 506 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Enter") PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 507 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4/Upper") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 508 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4/Lower-Left") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 509 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4/Lower-Right") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 495 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/1") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 496 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/2") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 497 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/3") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 498 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/4") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 499 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/5") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 500 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/6") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 501 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/7") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 502 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/8") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 503 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/9") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 504 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Clear") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 505 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/0") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 506 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Enter") PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 507 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4/Upper") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 508 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4/Lower-Left") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 509 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4/Lower-Right") PORT_PLAYER(4) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 510 | 510 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 511 | 511 | |
| 512 | 512 | PORT_START("DISC4") |
| 513 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P4/Up") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 514 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 515 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 516 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Up-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 517 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P4/Right") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 518 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Down-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 519 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 520 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Right") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 521 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P4/Down") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 522 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 523 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 524 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Down-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 525 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P4/Left") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 526 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Up-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 527 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 528 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Left") PORT_CONDITION("OPTIONS",0x08,PORTCOND_EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,PORTCOND_EQUALS,0x00) | |
| 513 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P4/Up") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 514 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 515 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 516 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 517 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P4/Right") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 518 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 519 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 520 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 521 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P4/Down") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 522 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 523 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 524 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 525 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P4/Left") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 526 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 527 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 528 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("ECS_CNTRLSEL",0x0f,EQUALS,0x00) | |
| 529 | 529 | |
| 530 | 530 | PORT_START("DISCX4") |
| 531 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Right/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08, | |
| 531 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("Right/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08, | |
| 532 | 532 | |
| 533 | 533 | PORT_START("DISCY4") |
| 534 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Right/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08, | |
| 534 | PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("Right/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08, | |
| 535 | 535 | INPUT_PORTS_END |
| 536 | 536 | |
| 537 | 537 | static INPUT_PORTS_START( intvecs ) |
| r15082 | r15083 | |
|---|---|---|
| 250 | 250 | { |
| 251 | 251 | port_name[4] = '0' + (7 - i); |
| 252 | 252 | } |
| 253 | data &= (i | |
| 253 | data &= (iop | |
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | if ((offset & 0xff) == 0xfb) |
| 258 | 258 | { |
| 259 | data &= i | |
| 259 | data &= iop | |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | /* cassette input from wav */ |
| r15082 | r15083 | |
| 267 | 267 | } |
| 268 | 268 | else |
| 269 | 269 | { |
| 270 | data = i | |
| 270 | data = iop | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 628 | 628 | |
| 629 | 629 | if (!(m_kp_matrix&0x10)) |
| 630 | 630 | { |
| 631 | data &= i | |
| 631 | data &= iop | |
| 632 | 632 | } |
| 633 | 633 | if (!(m_kp_matrix&0x20)) |
| 634 | 634 | { |
| 635 | data &= i | |
| 635 | data &= iop | |
| 636 | 636 | } |
| 637 | 637 | if (!(m_kp_matrix&0x40)) |
| 638 | 638 | { |
| 639 | data &= i | |
| 639 | data &= iop | |
| 640 | 640 | } |
| 641 | 641 | if (!(m_kp_matrix&0x80)) |
| 642 | 642 | { |
| 643 | data &= i | |
| 643 | data &= iop | |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | return data; |
| r15082 | r15083 | |
| 788 | 788 | UINT8 data = 0; |
| 789 | 789 | |
| 790 | 790 | if (m_kp_matrix & 0x01) |
| 791 | data |= (i | |
| 791 | data |= (iop | |
| 792 | 792 | if (m_kp_matrix & 0x02) |
| 793 | data |= (i | |
| 793 | data |= (iop | |
| 794 | 794 | if (m_kp_matrix & 0x04) |
| 795 | data |= (i | |
| 795 | data |= (iop | |
| 796 | 796 | if (m_kp_matrix & 0x08) |
| 797 | data |= (i | |
| 797 | data |= (iop | |
| 798 | 798 | if (m_kp_matrix & 0x10) |
| 799 | data |= (i | |
| 799 | data |= (iop | |
| 800 | 800 | if (m_kp_matrix & 0x20) |
| 801 | data |= (i | |
| 801 | data |= (iop | |
| 802 | 802 | if (m_kp_matrix & 0x40) |
| 803 | data |= (i | |
| 803 | data |= (iop | |
| 804 | 804 | if (m_kp_matrix & 0x80) |
| 805 | data |= (i | |
| 805 | data |= (iop | |
| 806 | 806 | if (m_kp_matrix & 0x100) |
| 807 | data |= (i | |
| 807 | data |= (iop | |
| 808 | 808 | if (m_kp_matrix & 0x200) |
| 809 | data |= (i | |
| 809 | data |= (iop | |
| 810 | 810 | |
| 811 | 811 | return data & 0xff; |
| 812 | 812 | } |
| r15082 | r15083 | |
| 902 | 902 | UINT8 data = 0xff; |
| 903 | 903 | |
| 904 | 904 | if (m_kp_matrix & 0x01) |
| 905 | data &= i | |
| 905 | data &= iop | |
| 906 | 906 | if (m_kp_matrix & 0x02) |
| 907 | data &= i | |
| 907 | data &= iop | |
| 908 | 908 | if (m_kp_matrix & 0x04) |
| 909 | data &= i | |
| 909 | data &= iop | |
| 910 | 910 | if (m_kp_matrix & 0x08) |
| 911 | data &= i | |
| 911 | data &= iop | |
| 912 | 912 | if (m_kp_matrix & 0x10) |
| 913 | data &= i | |
| 913 | data &= iop | |
| 914 | 914 | if (m_kp_matrix & 0x20) |
| 915 | data &= i | |
| 915 | data &= iop | |
| 916 | 916 | if (m_kp_matrix & 0x40) |
| 917 | data &= i | |
| 917 | data &= iop | |
| 918 | 918 | if (m_kp_matrix & 0x80) |
| 919 | data &= i | |
| 919 | data &= iop | |
| 920 | 920 | |
| 921 | 921 | return (m_i8243->i8243_p2_r(offset)&0x0f) | (data&0xf0); |
| 922 | 922 | } |
| r15082 | r15083 | |
|---|---|---|
| 103 | 103 | case 7: |
| 104 | 104 | case 8: |
| 105 | 105 | sprintf(kbdrow,"IN%d",m_keyb_column); |
| 106 | data = i | |
| 106 | data = iop | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | return data; |
| r15082 | r15083 | |
| 130 | 130 | case 8: |
| 131 | 131 | case 9: |
| 132 | 132 | sprintf(kbdrow,"IN%d",m_keyb_column); |
| 133 | data = i | |
| 133 | data = iop | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | return 0xf0 | data; |
| r15082 | r15083 | |
| 139 | 139 | |
| 140 | 140 | READ8_MEMBER( pv2000_state::pv2000_keys_mod_r ) |
| 141 | 141 | { |
| 142 | return 0xf0 | i | |
| 142 | return 0xf0 | iop | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | READ8_MEMBER( pv2000_state::cass_in ) |
| r15082 | r15083 | |
| 315 | 315 | /* Check if a key is pressed */ |
| 316 | 316 | UINT8 key_pressed; |
| 317 | 317 | |
| 318 | key_pressed = input_port_read( machine(), "IN0" ) | |
| 319 | | input_port_read( machine(), "IN1" ) | |
| 320 | | input_port_read( machine(), "IN2" ) | |
| 321 | | input_port_read( machine(), "IN3" ) | |
| 322 | | input_port_read( machine(), "IN4" ) | |
| 323 | | input_port_read( machine(), "IN5" ) | |
| 324 | | input_port_read( machine(), "IN6" ) | |
| 325 | | input_port_read( machine(), "IN7" ) | |
| 326 | | input_port_read( machine(), "IN8" ); | |
| 318 | key_pressed = ioport( "IN0" )->read() | |
| 319 | | ioport( "IN1" )->read() | |
| 320 | | ioport( "IN2" )->read() | |
| 321 | | ioport( "IN3" )->read() | |
| 322 | | ioport( "IN4" )->read() | |
| 323 | | ioport( "IN5" )->read() | |
| 324 | | ioport( "IN6" )->read() | |
| 325 | | ioport( "IN7" )->read() | |
| 326 | | ioport( "IN8" )->read(); | |
| 327 | 327 | |
| 328 | 328 | if ( key_pressed && m_key_pressed != key_pressed ) |
| 329 | 329 | cputag_set_input_line(machine(), "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE); |
| r15082 | r15083 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | data = 0xff; |
| 119 | 119 | if (((m_led_status & 0x80) == 0x00)) |
| 120 | data=i | |
| 120 | data=iop | |
| 121 | 121 | else |
| 122 | data=i | |
| 122 | data=iop | |
| 123 | 123 | |
| 124 | 124 | logerror("Keyboard Port = %s Data = %d\n ", ((m_led_status & 0x80) == 0x00) ? keynames[0][offset] : keynames[1][offset], data); |
| 125 | 125 | return data | 0x7f; |
| r15082 | r15083 | |
|---|---|---|
| 155 | 155 | { |
| 156 | 156 | UINT8 retVal = 0x3f; |
| 157 | 157 | UINT8 *keyboard = memregion("keyboard")->base(); |
| 158 | UINT16 row1 = input_port_read(machine(), "ROW1"); | |
| 159 | UINT16 row2 = input_port_read(machine(), "ROW2"); | |
| 160 | UINT16 row3 = input_port_read(machine(), "ROW3"); | |
| 161 | UINT16 row4 = input_port_read(machine(), "ROW4"); | |
| 162 | UINT16 row5 = input_port_read(machine(), "ROW5"); | |
| 158 | UINT16 row1 = ioport("ROW1")->read(); | |
| 159 | UINT16 row2 = ioport("ROW2")->read(); | |
| 160 | UINT16 row3 = ioport("ROW3")->read(); | |
| 161 | UINT16 row4 = ioport("ROW4")->read(); | |
| 162 | UINT16 row5 = ioport("ROW5")->read(); | |
| 163 | 163 | UINT16 all = row1 | row2 | row3 | row4 | row5; |
| 164 | UINT16 addr = i | |
| 164 | UINT16 addr = iop | |
| 165 | 165 | if (all) |
| 166 | 166 | { |
| 167 | 167 | addr |= selectedline(all) << 2; |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | UINT8 data = 0xff; |
| 181 | 181 | |
| 182 | 182 | if ( ! ( m_porta & 0x01 ) ) |
| 183 | data &= i | |
| 183 | data &= iop | |
| 184 | 184 | |
| 185 | 185 | if ( ! ( m_porta & 0x02 ) ) |
| 186 | data &= i | |
| 186 | data &= iop | |
| 187 | 187 | |
| 188 | 188 | if ( ! ( m_porta & 0x04 ) ) |
| 189 | data &= i | |
| 189 | data &= iop | |
| 190 | 190 | |
| 191 | 191 | if ( ! ( m_porta & 0x08 ) ) |
| 192 | data &= i | |
| 192 | data &= iop | |
| 193 | 193 | |
| 194 | 194 | if ( ! ( m_porta & 0x10 ) ) |
| 195 | data &= i | |
| 195 | data &= iop | |
| 196 | 196 | |
| 197 | 197 | if ( ! ( m_porta & 0x20 ) ) |
| 198 | data &= i | |
| 198 | data &= iop | |
| 199 | 199 | |
| 200 | 200 | if ( ! ( m_porta & 0x40 ) ) |
| 201 | data &= i | |
| 201 | data &= iop | |
| 202 | 202 | |
| 203 | 203 | if ( ! ( m_porta & 0x80 ) ) |
| 204 | data &= i | |
| 204 | data &= iop | |
| 205 | 205 | |
| 206 | 206 | return data; |
| 207 | 207 | } |
| r15082 | r15083 | |
| 211 | 211 | { |
| 212 | 212 | UINT8 data = m_portc; |
| 213 | 213 | |
| 214 | data = ( data & 0xfe ) | ( i | |
| 214 | data = ( data & 0xfe ) | ( iop | |
| 215 | 215 | |
| 216 | 216 | return data; |
| 217 | 217 | } |
| r15082 | r15083 | |
|---|---|---|
| 302 | 302 | for (int i=0; i<10; i++) |
| 303 | 303 | { |
| 304 | 304 | if (!(m_kb_matrix & (1<<i))) |
| 305 | data &= i | |
| 305 | data &= iop | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 206 | 206 | |
| 207 | 207 | /* border pieces and moving piece */ |
| 208 | 208 | |
| 209 | port_input=in | |
| 209 | port_input=machine.root_device().ioport | |
| 210 | 210 | if (port_input) |
| 211 | 211 | { |
| 212 | 212 | i=get_first_bit(port_input); |
| r15082 | r15083 | |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | |
| 219 | port_input=in | |
| 219 | port_input=machine.root_device().ioport | |
| 220 | 220 | if (port_input) |
| 221 | 221 | { |
| 222 | 222 | i=get_first_bit(port_input); |
| r15082 | r15083 | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
| 229 | port_input=in | |
| 229 | port_input=machine.root_device().ioport | |
| 230 | 230 | if (port_input) |
| 231 | 231 | { |
| 232 | 232 | if (state->m_moving_piece) |
| r15082 | r15083 | |
| 329 | 329 | if (i==NOT_VALID) |
| 330 | 330 | return 0xff; |
| 331 | 331 | |
| 332 | key_data=i | |
| 332 | key_data=iop | |
| 333 | 333 | |
| 334 | 334 | if (key_data != 0xc0) |
| 335 | 335 | { |
| r15082 | r15083 | |
| 385 | 385 | output_set_value("MOVING",m_moving_piece); |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | key_data=i | |
| 388 | key_data=iop | |
| 389 | 389 | |
| 390 | 390 | if (key_data != 0xff) |
| 391 | 391 | { |
| r15082 | r15083 | |
| 393 | 393 | |
| 394 | 394 | /* Only if valid data and mouse button is pressed */ |
| 395 | 395 | |
| 396 | if (key_data && i | |
| 396 | if (key_data && iop | |
| 397 | 397 | { |
| 398 | 398 | |
| 399 | 399 | /* Set or remove pieces */ |
| r15082 | r15083 | |
| 507 | 507 | { |
| 508 | 508 | supercon_state *state = machine.driver_data<supercon_state>(); |
| 509 | 509 | |
| 510 | if (i | |
| 510 | if (state->iop | |
| 511 | 511 | state->m_timer_mouse_click->adjust(state->m_wait_time, 0); |
| 512 | 512 | else |
| 513 | 513 | state->m_selecting=FALSE; |
| r15082 | r15083 | |
|---|---|---|
| 106 | 106 | for (int i = 0; i < 8; i++) |
| 107 | 107 | { |
| 108 | 108 | sprintf(kbdrow,"X%X",i); |
| 109 | data &= i | |
| 109 | data &= iop | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return data; |
| r15082 | r15083 | |
| 120 | 120 | for (int i = 0; i < 8; i++) |
| 121 | 121 | { |
| 122 | 122 | sprintf(kbdrow,"X%X",i); |
| 123 | if (i | |
| 123 | if (iop | |
| 124 | 124 | data |= (1 << i); |
| 125 | 125 | } |
| 126 | 126 | |
| r15082 | r15083 | |
| 140 | 140 | else |
| 141 | 141 | { |
| 142 | 142 | // kb read |
| 143 | data = i | |
| 143 | data = iop | |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return (data & 0xf0) | (m_cassette_data & 0x0f); |
| r15082 | r15083 | |
|---|---|---|
| 322 | 322 | |
| 323 | 323 | if (!(m_key_line & 0x01)) |
| 324 | 324 | { |
| 325 | data &= i | |
| 325 | data &= iop | |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | if (!(m_key_line & 0x02)) |
| 329 | 329 | { |
| 330 | data &= i | |
| 330 | data &= iop | |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | if (!(m_key_line & 0x04)) |
| 334 | 334 | { |
| 335 | data &= i | |
| 335 | data &= iop | |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /* bit 3 is cold/warm start */ |
| r15082 | r15083 | |
| 455 | 455 | if ((data & 0x08)!=0) |
| 456 | 456 | { |
| 457 | 457 | LOG(("a/d select x coordinate\n")); |
| 458 | LOG(("x coord: %d\n", i | |
| 458 | LOG(("x coord: %d\n", iop | |
| 459 | 459 | |
| 460 | 460 | /* on screen range 0x060->0x03a0 */ |
| 461 | if (i | |
| 461 | if (iop | |
| 462 | 462 | { |
| 463 | 463 | /* this might not be totally accurate because hitable screen |
| 464 | 464 | area may include the border around the screen! */ |
| 465 | m_ad_value = i | |
| 465 | m_ad_value = iop | |
| 466 | 466 | } |
| 467 | 467 | else |
| 468 | 468 | { |
| r15082 | r15083 | |
| 485 | 485 | 0x0350->0x03a6 is panel at bottom */ |
| 486 | 486 | |
| 487 | 487 | LOG(("a/d select y coordinate\n")); |
| 488 | LOG(("y coord: %d\n", i | |
| 488 | LOG(("y coord: %d\n", iop | |
| 489 | 489 | |
| 490 | if (i | |
| 490 | if (iop | |
| 491 | 491 | { |
| 492 | m_ad_value = i | |
| 492 | m_ad_value = iop | |
| 493 | 493 | } |
| 494 | 494 | else |
| 495 | 495 | { |
| r15082 | r15083 | |
| 659 | 659 | INPUT_CHANGED_MEMBER( avigo_state::pen_move_irq ) |
| 660 | 660 | { |
| 661 | 661 | // an irq is generated when the pen is down on the screen and is being moved |
| 662 | if (i | |
| 662 | if (iop | |
| 663 | 663 | { |
| 664 | 664 | LOG(("pen move interrupt\n")); |
| 665 | 665 | m_irq |= (1<<6); |
| r15082 | r15083 | |
|---|---|---|
| 168 | 168 | case S3C44B0_GPIO_PORT_G : |
| 169 | 169 | { |
| 170 | 170 | data = 0x0000009F; |
| 171 | data = (data & ~0x1F) | ( | |
| 171 | data = (data & ~0x1F) | ( | |
| 172 | 172 | #if defined(JUICEBOX_ENTER_DEBUG_MENU) |
| 173 | 173 | if (juicebox->port_g_read_count++ < 1) |
| 174 | 174 | { |
| r15082 | r15083 | |
|---|---|---|
| 72 | 72 | { |
| 73 | 73 | UINT8 data = 0x0f; |
| 74 | 74 | |
| 75 | if (!BIT(m_digit_sel, 0)) data &= input_port_read(machine(), "LINE0"); | |
| 76 | if (!BIT(m_digit_sel, 1)) data &= input_port_read(machine(), "LINE1"); | |
| 77 | if (!BIT(m_digit_sel, 2)) data &= input_port_read(machine(), "LINE2"); | |
| 78 | if (!BIT(m_digit_sel, 3)) data &= input_port_read(machine(), "LINE3"); | |
| 79 | if (!BIT(m_digit_sel, 4)) data &= input_port_read(machine(), "LINE4"); | |
| 80 | if (!BIT(m_digit_sel, 5)) data &= input_port_read(machine(), "LINE5"); | |
| 75 | if (!BIT(m_digit_sel, 0)) data &= ioport("LINE0")->read(); | |
| 76 | if (!BIT(m_digit_sel, 1)) data &= ioport("LINE1")->read(); | |
| 77 | if (!BIT(m_digit_sel, 2)) data &= ioport("LINE2")->read(); | |
| 78 | if (!BIT(m_digit_sel, 3)) data &= ioport("LINE3")->read(); | |
| 79 | if (!BIT(m_digit_sel, 4)) data &= ioport("LINE4")->read(); | |
| 80 | if (!BIT(m_digit_sel, 5)) data &= ioport("LINE5")->read(); | |
| 81 | 81 | |
| 82 | 82 | // cassette-in bits go here - bit 4 = sync bit, bit 5 = data bit |
| 83 | 83 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | logerror("%s: lx800_porta_r(%02x)\n", machine().describe_context(), offset); |
| 68 | 68 | |
| 69 | result |= input_port_read(machine(), "LINEFEED") << 3; | |
| 70 | result |= input_port_read(machine(), "FORMFEED") << 4; | |
| 69 | result |= ioport("LINEFEED")->read() << 3; | |
| 70 | result |= ioport("FORMFEED")->read() << 4; | |
| 71 | 71 | result |= 1 << 5; |
| 72 | 72 | |
| 73 | 73 | result |= 1 << 7; |
| r15082 | r15083 | |
| 96 | 96 | |
| 97 | 97 | logerror("%s: lx800_portc_r(%02x)\n", machine().describe_context(), offset); |
| 98 | 98 | |
| 99 | result |= i | |
| 99 | result |= iop | |
| 100 | 100 | |
| 101 | 101 | return result; |
| 102 | 102 | } |
| r15082 | r15083 | |
|---|---|---|
| 468 | 468 | data |= m_int_pend << 1; |
| 469 | 469 | |
| 470 | 470 | // boot address |
| 471 | data |= i | |
| 471 | data |= iop | |
| 472 | 472 | |
| 473 | 473 | return data; |
| 474 | 474 | } |
| r15082 | r15083 | |
| 566 | 566 | |
| 567 | 567 | static INPUT_PORTS_START( mpz80 ) |
| 568 | 568 | PORT_START("16C") |
| 569 | PORT_DIPNAME( 0xf8, 0xf8, "Power-On-Jump Address" ) PORT_DIPLOCATION("16C:1,2,3,4,5") PORT_CONDITION("12C", 0x02, | |
| 569 | PORT_DIPNAME( 0xf8, 0xf8, "Power-On-Jump Address" ) PORT_DIPLOCATION("16C:1,2,3,4,5") PORT_CONDITION("12C", 0x02, | |
| 570 | 570 | PORT_DIPSETTING( 0xf8, "F800H" ) |
| 571 | 571 | PORT_DIPSETTING( 0xf0, "F000H" ) |
| 572 | 572 | PORT_DIPSETTING( 0xe8, "E800H" ) |
| r15082 | r15083 | |
| 599 | 599 | PORT_DIPSETTING( 0x10, "Boot DJ/DMA" ) |
| 600 | 600 | PORT_DIPSETTING( 0x08, "Boot HD/DMA" ) |
| 601 | 601 | PORT_DIPSETTING( 0x00, "Boot HDCA" ) |
| 602 | PORT_DIPNAME( 0x70, 0x00, "Diagnostics" ) PORT_DIPLOCATION("16C:2,3,4") PORT_CONDITION("12C", 0x02, | |
| 602 | PORT_DIPNAME( 0x70, 0x00, "Diagnostics" ) PORT_DIPLOCATION("16C:2,3,4") PORT_CONDITION("12C", 0x02, | |
| 603 | 603 | PORT_DIPSETTING( 0x00, "Read Registers" ) |
| 604 | 604 | PORT_DIPSETTING( 0x10, "Write Registers" ) |
| 605 | 605 | PORT_DIPSETTING( 0x20, "Write Map RAMs" ) |
| r15082 | r15083 | |
|---|---|---|
| 200 | 200 | UINT8 chr,gfx,inv; |
| 201 | 201 | UINT16 mem,x; |
| 202 | 202 | UINT32 *p = &bitmap.pix32(y); |
| 203 | UINT8 polarity = | |
| 203 | UINT8 polarity = s | |
| 204 | 204 | |
| 205 | 205 | for (x = 0; x < x_count; x++) |
| 206 | 206 | { |
| r15082 | r15083 | |
|---|---|---|
| 30 | 30 | switch (state->m_pet.state) |
| 31 | 31 | { |
| 32 | 32 | case 0: |
| 33 | state->m_pet.input = in | |
| 33 | state->m_pet.input = machine.root_device().ioport | |
| 34 | 34 | /* fall through */ |
| 35 | 35 | |
| 36 | 36 | case 2: case 4: case 6: case 8: |
| r15082 | r15083 | |
| 79 | 79 | switch (offset) |
| 80 | 80 | { |
| 81 | 81 | case 0x20: |
| 82 | data = i | |
| 82 | data = iop | |
| 83 | 83 | break; |
| 84 | 84 | case 0x21: |
| 85 | 85 | data &= ~0xf; |
| r15082 | r15083 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | void c64_state::check_interrupts() |
| 42 | 42 | { |
| 43 | int restore = BIT(i | |
| 43 | int restore = BIT(iop | |
| 44 | 44 | |
| 45 | 45 | m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq | m_vic_irq | m_exp_irq); |
| 46 | 46 | m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq | restore | m_exp_nmi); |
| r15082 | r15083 | |
| 125 | 125 | { |
| 126 | 126 | case 0: // CIA1 |
| 127 | 127 | if (offset & 1) |
| 128 | cia_set_port_mask_value(m_cia1, 1, i | |
| 128 | cia_set_port_mask_value(m_cia1, 1, iop | |
| 129 | 129 | else |
| 130 | cia_set_port_mask_value(m_cia1, 0, i | |
| 130 | cia_set_port_mask_value(m_cia1, 0, iop | |
| 131 | 131 | |
| 132 | 132 | data = mos6526_r(m_cia1, offset & 0x0f); |
| 133 | 133 | break; |
| r15082 | r15083 | |
| 369 | 369 | |
| 370 | 370 | READ8_MEMBER( c64_state::vic_lightpen_x_cb ) |
| 371 | 371 | { |
| 372 | return i | |
| 372 | return iop | |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | READ8_MEMBER( c64_state::vic_lightpen_y_cb ) |
| 376 | 376 | { |
| 377 | return i | |
| 377 | return iop | |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | READ8_MEMBER( c64_state::vic_lightpen_button_cb ) |
| 381 | 381 | { |
| 382 | return i | |
| 382 | return iop | |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | READ8_MEMBER( c64_state::vic_dma_read ) |
| r15082 | r15083 | |
| 407 | 407 | |
| 408 | 408 | READ8_MEMBER( c64_state::vic_rdy_cb ) |
| 409 | 409 | { |
| 410 | return i | |
| 410 | return iop | |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | static const vic2_interface vic_ntsc_intf = |
| r15082 | r15083 | |
| 450 | 450 | |
| 451 | 451 | int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp; |
| 452 | 452 | UINT8 cia0porta = mos6526_pa_r(state->m_cia1, 0); |
| 453 | int controller1 = input_port_read(machine, "CTRLSEL") & 0x07; | |
| 454 | int controller2 = input_port_read(machine, "CTRLSEL") & 0x70; | |
| 453 | int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07; | |
| 454 | int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70; | |
| 455 | 455 | // Notice that only a single input is defined for Mouse & Lightpen in both ports |
| 456 | 456 | switch (controller1) |
| 457 | 457 | { |
| 458 | 458 | case 0x01: |
| 459 | 459 | if (which) |
| 460 | pot2 = in | |
| 460 | pot2 = machine.root_device().ioport | |
| 461 | 461 | else |
| 462 | pot1 = in | |
| 462 | pot1 = machine.root_device().ioport | |
| 463 | 463 | break; |
| 464 | 464 | |
| 465 | 465 | case 0x02: |
| 466 | 466 | if (which) |
| 467 | pot2 = in | |
| 467 | pot2 = machine.root_device().ioport | |
| 468 | 468 | else |
| 469 | pot1 = in | |
| 469 | pot1 = machine.root_device().ioport | |
| 470 | 470 | break; |
| 471 | 471 | |
| 472 | 472 | case 0x03: |
| 473 | if (which && (in | |
| 473 | if (which && (machine.root_device().ioport | |
| 474 | 474 | pot1 = 0x00; |
| 475 | 475 | break; |
| 476 | 476 | |
| 477 | 477 | case 0x04: |
| 478 | 478 | if (which) |
| 479 | pot2 = in | |
| 479 | pot2 = machine.root_device().ioport | |
| 480 | 480 | else |
| 481 | pot1 = in | |
| 481 | pot1 = machine.root_device().ioport | |
| 482 | 482 | break; |
| 483 | 483 | |
| 484 | 484 | case 0x06: |
| 485 | if (which && (in | |
| 485 | if (which && (machine.root_device().ioport | |
| 486 | 486 | pot2 = 0x00; |
| 487 | 487 | break; |
| 488 | 488 | |
| r15082 | r15083 | |
| 499 | 499 | { |
| 500 | 500 | case 0x10: |
| 501 | 501 | if (which) |
| 502 | pot4 = in | |
| 502 | pot4 = machine.root_device().ioport | |
| 503 | 503 | else |
| 504 | pot3 = in | |
| 504 | pot3 = machine.root_device().ioport | |
| 505 | 505 | break; |
| 506 | 506 | |
| 507 | 507 | case 0x20: |
| 508 | 508 | if (which) |
| 509 | pot4 = in | |
| 509 | pot4 = machine.root_device().ioport | |
| 510 | 510 | else |
| 511 | pot3 = in | |
| 511 | pot3 = machine.root_device().ioport | |
| 512 | 512 | break; |
| 513 | 513 | |
| 514 | 514 | case 0x30: |
| 515 | if (which && (in | |
| 515 | if (which && (machine.root_device().ioport | |
| 516 | 516 | pot4 = 0x00; |
| 517 | 517 | break; |
| 518 | 518 | |
| 519 | 519 | case 0x40: |
| 520 | 520 | if (which) |
| 521 | pot4 = in | |
| 521 | pot4 = machine.root_device().ioport | |
| 522 | 522 | else |
| 523 | pot3 = in | |
| 523 | pot3 = machine.root_device().ioport | |
| 524 | 524 | break; |
| 525 | 525 | |
| 526 | 526 | case 0x60: |
| 527 | if (which && (in | |
| 527 | if (which && (machine.root_device().ioport | |
| 528 | 528 | pot4 = 0x00; |
| 529 | 529 | break; |
| 530 | 530 | |
| r15082 | r15083 | |
| 537 | 537 | break; |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | if (in | |
| 540 | if (machine.root_device().ioport | |
| 541 | 541 | { |
| 542 | 542 | temp = pot1; pot1 = pot3; pot3 = temp; |
| 543 | 543 | temp = pot2; pot2 = pot4; pot4 = temp; |
| r15082 | r15083 | |
|---|---|---|
| 31 | 31 | for (bit = 0; bit < 10; bit++) |
| 32 | 32 | if (~m_kb_mask & (0x01 << bit)) |
| 33 | 33 | for (port = 0; port < 8; port++) |
| 34 | data ^= in | |
| 34 | data ^= machine.root_device().ioport | |
| 35 | 35 | return data; |
| 36 | 36 | } |
| 37 | 37 |
| r15082 | r15083 | |
|---|---|---|
| 92 | 92 | int table = 0, row, col; |
| 93 | 93 | int keydata = -1; |
| 94 | 94 | |
| 95 | if (i | |
| 95 | if (iop | |
| 96 | 96 | { |
| 97 | 97 | /* shift, upper case */ |
| 98 | 98 | table = 1; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | if (i | |
| 101 | if (iop | |
| 102 | 102 | { |
| 103 | 103 | /* ctrl */ |
| 104 | 104 | table = 2; |
| r15082 | r15083 | |
| 107 | 107 | /* scan keyboard */ |
| 108 | 108 | for (row = 0; row < 9; row++) |
| 109 | 109 | { |
| 110 | UINT8 data = i | |
| 110 | UINT8 data = iop | |
| 111 | 111 | |
| 112 | 112 | for (col = 0; col < 8; col++) |
| 113 | 113 | { |
| r15082 | r15083 | |
|---|---|---|
| 22 | 22 | READ8_MEMBER(busicom_state::keyboard_r) |
| 23 | 23 | { |
| 24 | 24 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8" , "LINE9"}; |
| 25 | return i | |
| 25 | return iop | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | READ8_MEMBER(busicom_state::printer_r) |
| 29 | 29 | { |
| 30 | 30 | UINT8 retVal = 0; |
| 31 | 31 | if (m_drum_index==0) retVal |= 1; |
| 32 | retVal |= i | |
| 32 | retVal |= iop | |
| 33 | 33 | return retVal; |
| 34 | 34 | } |
| 35 | 35 |
| r15082 | r15083 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | UINT8 data = 0; |
| 81 | 81 | |
| 82 | data |= input_port_read(machine(), "LINE1"); | |
| 83 | data |= input_port_read(machine(), "LINE2"); | |
| 84 | data |= input_port_read(machine(), "LINE3"); | |
| 85 | data |= input_port_read(machine(), "LINE4"); | |
| 86 | data |= (input_port_read(machine(), "LINE1") ? 0x10 : 0); | |
| 87 | data |= (input_port_read(machine(), "LINE2") ? 0x20 : 0); | |
| 88 | data |= (input_port_read(machine(), "LINE3") ? 0x40 : 0); | |
| 89 | data |= (input_port_read(machine(), "LINE4") ? 0x80 : 0); | |
| 82 | data |= ioport("LINE1")->read(); | |
| 83 | data |= ioport("LINE2")->read(); | |
| 84 | data |= ioport("LINE3")->read(); | |
| 85 | data |= ioport("LINE4")->read(); | |
| 86 | data |= (ioport("LINE1")->read() ? 0x10 : 0); | |
| 87 | data |= (ioport("LINE2")->read() ? 0x20 : 0); | |
| 88 | data |= (ioport("LINE3")->read() ? 0x40 : 0); | |
| 89 | data |= (ioport("LINE4")->read() ? 0x80 : 0); | |
| 90 | 90 | |
| 91 | 91 | return data; |
| 92 | 92 | } |
| r15082 | r15083 | |
| 102 | 102 | |
| 103 | 103 | switch (m_matrix & 7) |
| 104 | 104 | { |
| 105 | case 0: data |= input_port_read(machine(), "LINE1"); break; | |
| 106 | case 1: data |= input_port_read(machine(), "LINE2"); break; | |
| 107 | case 2: data |= input_port_read(machine(), "LINE3"); break; | |
| 108 | case 3: data |= input_port_read(machine(), "LINE4"); break; | |
| 105 | case 0: data |= ioport("LINE1")->read(); break; | |
| 106 | case 1: data |= ioport("LINE2")->read(); break; | |
| 107 | case 2: data |= ioport("LINE3")->read(); break; | |
| 108 | case 3: data |= ioport("LINE4")->read(); break; | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 566 | 566 | // (bit 1: INT1 status) |
| 567 | 567 | // (bit 2: INT2 status) |
| 568 | 568 | // bit 3-7: keyboard status bits 0 to 4 |
| 569 | answer = ((i | |
| 569 | answer = ((iop | |
| 570 | 570 | if (m_alphalock_line==false) |
| 571 | answer &= ~(i | |
| 571 | answer &= ~(iop | |
| 572 | 572 | break; |
| 573 | 573 | |
| 574 | 574 | case TMS9901_INT8_INT15: |
| r15082 | r15083 | |
| 577 | 577 | // bit 3: tape input mirror |
| 578 | 578 | // bit 5-7: weird, not emulated |
| 579 | 579 | if (m_keyboard_column == 7) answer = 0x07; |
| 580 | else answer = ((i | |
| 580 | else answer = ((iop | |
| 581 | 581 | break; |
| 582 | 582 | |
| 583 | 583 | case TMS9901_P0_P7: |
| r15082 | r15083 | |
|---|---|---|
| 400 | 400 | static INPUT_PORTS_START( pccga ) |
| 401 | 401 | PORT_START("IN0") /* IN0 */ |
| 402 | 402 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 403 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 403 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 404 | 404 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 405 | 405 | |
| 406 | 406 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
| 470 | 470 | static INPUT_PORTS_START( pcega ) |
| 471 | 471 | PORT_START("IN0") /* IN0 */ |
| 472 | 472 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 473 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 473 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 474 | 474 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 475 | 475 | |
| 476 | 476 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
| 541 | 541 | static INPUT_PORTS_START( europc ) |
| 542 | 542 | PORT_START("IN0") /* IN0 */ |
| 543 | 543 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 544 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 544 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 545 | 545 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 546 | 546 | |
| 547 | 547 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
| 591 | 591 | static INPUT_PORTS_START( bondwell ) |
| 592 | 592 | PORT_START("IN0") /* IN0 */ |
| 593 | 593 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 594 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 594 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 595 | 595 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 596 | 596 | |
| 597 | 597 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
| 664 | 664 | static INPUT_PORTS_START( tandy1t ) |
| 665 | 665 | PORT_START("IN0") /* IN0 */ |
| 666 | 666 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 667 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK | |
| 667 | PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 668 | 668 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 669 | 669 | |
| 670 | 670 | PORT_START("DSW0") /* IN1 */ |
| r15082 | r15083 | |
|---|---|---|
| 123 | 123 | for (bit = 0; bit < 8; bit++) |
| 124 | 124 | if (m_kp_matrix & (1 << bit)) |
| 125 | 125 | for (port = 0; port < 6; port++) |
| 126 | data |= i | |
| 126 | data |= iop | |
| 127 | 127 | return data; |
| 128 | 128 | } |
| 129 | 129 | |
| r15082 | r15083 | |
| 156 | 156 | |
| 157 | 157 | READ8_MEMBER( micronic_state::irq_flag_r ) |
| 158 | 158 | { |
| 159 | return (i | |
| 159 | return (iop | |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | WRITE8_MEMBER( micronic_state::bank_select_w ) |
| r15082 | r15083 | |
|---|---|---|
| 312 | 312 | data |= ay31015_get_output_pin( m_uart, AY31015_FE ) ? 0x08 : 0; |
| 313 | 313 | ay31015_set_input_pin( m_uart, AY31015_SWE, 1 ); |
| 314 | 314 | |
| 315 | bool arrowkey = i | |
| 315 | bool arrowkey = iop | |
| 316 | 316 | bool keydown = m_sol20_fa & 1; |
| 317 | 317 | |
| 318 | 318 | return data | (arrowkey & keydown); |
| r15082 | r15083 | |
| 328 | 328 | |
| 329 | 329 | READ8_MEMBER( sol20_state::sol20_fc_r ) |
| 330 | 330 | { |
| 331 | UINT8 data = i | |
| 331 | UINT8 data = iop | |
| 332 | 332 | if (BIT(data, 0)) return 0x32; |
| 333 | 333 | if (BIT(data, 1)) return 0x34; |
| 334 | 334 | if (BIT(data, 2)) return 0x36; |
| r15082 | r15083 | |
| 556 | 556 | ay31015_set_input_pin( m_uart, AY31015_CS, 1 ); |
| 557 | 557 | |
| 558 | 558 | // set switched uart pins |
| 559 | data = i | |
| 559 | data = iop | |
| 560 | 560 | ay31015_set_input_pin( m_uart_s, AY31015_CS, 0 ); |
| 561 | 561 | ay31015_set_input_pin( m_uart_s, AY31015_NB1, BIT(data, 1) ? 1 : 0); |
| 562 | 562 | ay31015_set_input_pin( m_uart_s, AY31015_NB2, BIT(data, 2) ? 1 : 0); |
| r15082 | r15083 | |
| 566 | 566 | ay31015_set_input_pin( m_uart_s, AY31015_CS, 1 ); |
| 567 | 567 | |
| 568 | 568 | // set rs232 baud rate |
| 569 | data = i | |
| 569 | data = iop | |
| 570 | 570 | |
| 571 | 571 | if (data > 1) |
| 572 | 572 | do |
| r15082 | r15083 | |
| 576 | 576 | } |
| 577 | 577 | while (!(data & 1) && (s_count < 7)); // find which switch is used |
| 578 | 578 | |
| 579 | if ((s_count == 7) && (i | |
| 579 | if ((s_count == 7) && (iop | |
| 580 | 580 | s_clock = 9600 << 4; |
| 581 | 581 | else |
| 582 | 582 | s_clock = s_bauds[s_count] << 4; |
| r15082 | r15083 | |
| 608 | 608 | // Each character is 9 pixels wide (blank ones at the right) and 13 lines deep. |
| 609 | 609 | // Note on blinking characters: |
| 610 | 610 | // any character with bit 7 set will blink. With DPMON, do DA C000 C2FF to see what happens |
| 611 | UINT8 s1 = input_port_read(machine(), "S1"); | |
| 612 | UINT16 which = (input_port_read(machine(), "CONFIG") & 2) << 10; | |
| 611 | UINT8 s1 = ioport("S1")->read(); | |
| 612 | UINT16 which = (ioport("CONFIG")->read() & 2) << 10; | |
| 613 | 613 | UINT8 y,ra,chr,gfx; |
| 614 | 614 | UINT16 sy=0,ma,x,inv; |
| 615 | 615 | UINT8 polarity = (s1 & 8) ? 0xff : 0; |
| r15082 | r15083 | |
|---|---|---|
| 118 | 118 | |
| 119 | 119 | PORT_START("JOY_P1") |
| 120 | 120 | /* II is left of I on the original pad so we map them in reverse order */ |
| 121 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 122 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 123 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 124 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 125 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 126 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 127 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 128 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0000) | |
| 121 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 122 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 123 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 124 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 125 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 126 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 127 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 128 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0000) | |
| 129 | 129 | |
| 130 | 130 | PORT_START("JOY_P2") |
| 131 | 131 | /* II is left of I on the original pad so we map them in reverse order */ |
| 132 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 133 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 134 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 135 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 136 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 137 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 138 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 139 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0000) | |
| 132 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 133 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 134 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 135 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 136 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 137 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 138 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 139 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0000) | |
| 140 | 140 | |
| 141 | 141 | PORT_START("JOY_P3") |
| 142 | 142 | /* II is left of I on the original pad so we map them in reverse order */ |
| 143 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 144 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 145 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 146 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 147 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 148 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 149 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 150 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0000) | |
| 143 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 144 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 145 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 146 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 147 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 148 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 149 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 150 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0000) | |
| 151 | 151 | |
| 152 | 152 | PORT_START("JOY_P4") |
| 153 | 153 | /* II is left of I on the original pad so we map them in reverse order */ |
| 154 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 155 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 156 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 157 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 158 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 159 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 160 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 161 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0000) | |
| 154 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 155 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 156 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 157 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 158 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 159 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 160 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 161 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0000) | |
| 162 | 162 | |
| 163 | 163 | PORT_START("JOY_P5") |
| 164 | 164 | /* II is left of I on the original pad so we map them in reverse order */ |
| 165 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 166 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 167 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 168 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 169 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 171 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 172 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0000) | |
| 165 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 166 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 167 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 168 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 169 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 170 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 171 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 172 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0000) | |
| 173 | 173 | |
| 174 | 174 | PORT_START("JOY6B_P1") |
| 175 | 175 | /* II is left of I on the original pad so we map them in reverse order */ |
| 176 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 177 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 178 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 179 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 180 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 181 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 182 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 183 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 184 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Button III") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 185 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Button IV") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 186 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Button V") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 187 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Button VI") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, PORTCOND_EQUALS, 0x0002) | |
| 176 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 177 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 178 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 179 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 180 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 181 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 182 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 183 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 184 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Button III") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 185 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Button IV") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 186 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Button V") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 187 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Button VI") PORT_PLAYER(1) PORT_CONDITION("JOY_TYPE", 0x0003, EQUALS, 0x0002) | |
| 188 | 188 | PORT_BIT( 0xf000, IP_ACTIVE_HIGH,IPT_UNUSED ) //6-button pad header |
| 189 | 189 | |
| 190 | 190 | PORT_START("JOY6B_P2") /* Player 2 controls */ |
| 191 | 191 | /* II is left of I on the original pad so we map them in reverse order */ |
| 192 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 193 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 194 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 195 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 196 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 197 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 198 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 199 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 200 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Button III") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 201 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Button IV") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 202 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Button V") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 203 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Button VI") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, PORTCOND_EQUALS, 0x0008) | |
| 192 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 193 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 194 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 195 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 196 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 197 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 198 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 199 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 200 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Button III") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 201 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Button IV") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 202 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Button V") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 203 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Button VI") PORT_PLAYER(2) PORT_CONDITION("JOY_TYPE", 0x000c, EQUALS, 0x0008) | |
| 204 | 204 | PORT_BIT( 0xf000, IP_ACTIVE_HIGH,IPT_UNUSED ) //6-button pad header |
| 205 | 205 | |
| 206 | 206 | PORT_START("JOY6B_P3") /* Player 3 controls */ |
| 207 | 207 | /* II is left of I on the original pad so we map them in reverse order */ |
| 208 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 209 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 210 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 211 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 212 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 213 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 214 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 215 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 216 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 217 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 218 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 219 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, PORTCOND_EQUALS, 0x0020) | |
| 208 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 209 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 210 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 211 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 212 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 213 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 214 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 215 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 216 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 217 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 218 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 219 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(3) PORT_CONDITION("JOY_TYPE", 0x0030, EQUALS, 0x0020) | |
| 220 | 220 | PORT_BIT( 0xf000, IP_ACTIVE_HIGH,IPT_UNUSED ) //6-button pad header |
| 221 | 221 | |
| 222 | 222 | PORT_START("JOY6B_P4") /* Player 4 controls */ |
| 223 | 223 | /* II is left of I on the original pad so we map them in reverse order */ |
| 224 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 225 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 226 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 227 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 228 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 229 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 230 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 231 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 232 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 233 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 234 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 235 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, PORTCOND_EQUALS, 0x0080) | |
| 224 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 225 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 226 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 227 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 228 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 229 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 230 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 231 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 232 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 233 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 234 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 235 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(4) PORT_CONDITION("JOY_TYPE", 0x00c0, EQUALS, 0x0080) | |
| 236 | 236 | PORT_BIT( 0xf000, IP_ACTIVE_HIGH,IPT_UNUSED ) //6-button pad header |
| 237 | 237 | |
| 238 | 238 | PORT_START("JOY6B_P5") /* Player 5 controls */ |
| 239 | 239 | /* II is left of I on the original pad so we map them in reverse order */ |
| 240 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 241 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 242 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 243 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 244 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 245 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 246 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 247 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 248 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P5 Button III") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 249 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P5 Button IV") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 250 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P5 Button V") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 251 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P5 Button VI") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, PORTCOND_EQUALS, 0x0200) | |
| 240 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 241 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 242 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 243 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 244 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 245 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 246 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 247 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 248 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P5 Button III") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 249 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P5 Button IV") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 250 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P5 Button V") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 251 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P5 Button VI") PORT_PLAYER(5) PORT_CONDITION("JOY_TYPE", 0x0300, EQUALS, 0x0200) | |
| 252 | 252 | PORT_BIT( 0xf000, IP_ACTIVE_HIGH,IPT_UNUSED ) //6-button pad header |
| 253 | 253 | |
| 254 | 254 | PORT_START("JOY_TYPE") |
| r15082 | r15083 | |
|---|---|---|
| 180 | 180 | /* |
| 181 | 181 | // We do not want to show this setting; makes only sense for Geneve |
| 182 | 182 | PORT_START( "MODE" ) |
| 183 | PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0x0f, | |
| 183 | PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0x0f, | |
| 184 | 184 | PORT_CONFSETTING( 0x00, "Standard" ) |
| 185 | 185 | PORT_CONFSETTING( GENMOD, "GenMod" ) |
| 186 | 186 | */ |
| r15082 | r15083 | |
| 618 | 618 | } |
| 619 | 619 | else |
| 620 | 620 | { |
| 621 | answer = ((i | |
| 621 | answer = ((iop | |
| 622 | 622 | } |
| 623 | 623 | } |
| 624 | 624 | } |
| r15082 | r15083 | |
| 630 | 630 | } |
| 631 | 631 | else |
| 632 | 632 | { |
| 633 | answer = ((i | |
| 633 | answer = ((iop | |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | if ((m_mode != TI994) && (m_alphalock_line==false)) |
| 637 | 637 | { |
| 638 | answer &= ~(i | |
| 638 | answer &= ~(iop | |
| 639 | 639 | } |
| 640 | 640 | } |
| 641 | 641 | |
| r15082 | r15083 | |
| 648 | 648 | } |
| 649 | 649 | else |
| 650 | 650 | { |
| 651 | answer = ((i | |
| 651 | answer = ((iop | |
| 652 | 652 | } |
| 653 | 653 | break; |
| 654 | 654 | |
| r15082 | r15083 | |
| 948 | 948 | MACHINE_RESET( ti99_4 ) |
| 949 | 949 | { |
| 950 | 950 | ti99_4x *driver = machine.driver_data<ti99_4x>(); |
| 951 | if (in | |
| 951 | if (machine.root_device().ioport | |
| 952 | 952 | driver->m_handset = static_cast<ti99_handset_device*>(machine.device(HANDSET_TAG)); |
| 953 | 953 | else |
| 954 | 954 | driver->m_handset = NULL; |
| 955 | 955 | |
| 956 | if (in | |
| 956 | if (machine.root_device().ioport | |
| 957 | 957 | driver->m_mecmouse = static_cast<mecmouse_device*>(machine.device(MECMOUSE_TAG)); |
| 958 | 958 | else |
| 959 | 959 | driver->m_mecmouse = NULL; |
| r15082 | r15083 | |
| 1074 | 1074 | MACHINE_RESET( ti99_4a ) |
| 1075 | 1075 | { |
| 1076 | 1076 | ti99_4x *driver = machine.driver_data<ti99_4x>(); |
| 1077 | if (in | |
| 1077 | if (machine.root_device().ioport | |
| 1078 | 1078 | driver->m_mecmouse = static_cast<mecmouse_device*>(machine.device(MECMOUSE_TAG)); |
| 1079 | 1079 | else |
| 1080 | 1080 | driver->m_mecmouse = NULL; |
| r15082 | r15083 | |
|---|---|---|
| 142 | 142 | { |
| 143 | 143 | alphatro_state *state = device->machine().driver_data<alphatro_state>(); |
| 144 | 144 | const rgb_t *pens = palette_entry_list_raw(bitmap.palette()); |
| 145 | bool palette = BIT( | |
| 145 | bool palette = BIT(s | |
| 146 | 146 | UINT8 chr,gfx,attr,fg,inv; |
| 147 | 147 | UINT16 mem,x; |
| 148 | 148 | UINT32 *p = &bitmap.pix32(y); |
| r15082 | r15083 | |
|---|---|---|
| 56 | 56 | switch(offset & 0x0f) |
| 57 | 57 | { |
| 58 | 58 | case 0x08: |
| 59 | data = i | |
| 59 | data = iop | |
| 60 | 60 | break; |
| 61 | 61 | case 0x09: |
| 62 | data = i | |
| 62 | data = iop | |
| 63 | 63 | break; |
| 64 | 64 | case 0x0a: |
| 65 | data = i | |
| 65 | data = iop | |
| 66 | 66 | break; |
| 67 | 67 | case 0x0b: |
| 68 | data = i | |
| 68 | data = iop | |
| 69 | 69 | break; |
| 70 | 70 | case 0x0c: |
| 71 | data = i | |
| 71 | data = iop | |
| 72 | 72 | break; |
| 73 | 73 | case 0x0d: |
| 74 | data = i | |
| 74 | data = iop | |
| 75 | 75 | break; |
| 76 | 76 | case 0x0e: |
| 77 | data = i | |
| 77 | data = iop | |
| 78 | 78 | break; |
| 79 | 79 | } |
| 80 | 80 | return data; |
| r15082 | r15083 | |
|---|---|---|
| 70 | 70 | |
| 71 | 71 | UINT8 i,keyin,data = 0xff; |
| 72 | 72 | |
| 73 | keyin = i | |
| 73 | keyin = iop | |
| 74 | 74 | if (keyin != 0xff) |
| 75 | 75 | { |
| 76 | 76 | for (i = 1; i < 8; i++) |
| r15082 | r15083 | |
| 79 | 79 | data &= 0xfe; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | keyin = i | |
| 82 | keyin = iop | |
| 83 | 83 | if (keyin != 0xff) |
| 84 | 84 | { |
| 85 | 85 | for (i = 1; i < 8; i++) |
| r15082 | r15083 | |
|---|---|---|
| 87 | 87 | { |
| 88 | 88 | if (BIT(m_keylatch, i)) |
| 89 | 89 | { |
| 90 | UINT8 keydata = i | |
| 90 | UINT8 keydata = iop | |
| 91 | 91 | |
| 92 | 92 | if (BIT(keydata, 0)) data |= 0x01; |
| 93 | 93 | if (BIT(keydata, 1)) data |= 0x02; |
| r15082 | r15083 | |
| 159 | 159 | |
| 160 | 160 | INPUT_CHANGED_MEMBER( cosmicos_state::data ) |
| 161 | 161 | { |
| 162 | UINT8 data = i | |
| 162 | UINT8 data = iop | |
| 163 | 163 | int i; |
| 164 | 164 | |
| 165 | 165 | for (i = 0; i < 8; i++) |
| r15082 | r15083 | |
| 399 | 399 | |
| 400 | 400 | READ_LINE_MEMBER( cosmicos_state::ef1_r ) |
| 401 | 401 | { |
| 402 | UINT8 special = i | |
| 402 | UINT8 special = iop | |
| 403 | 403 | |
| 404 | 404 | return BIT(special, 0); |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | READ_LINE_MEMBER( cosmicos_state::ef2_r ) |
| 408 | 408 | { |
| 409 | UINT8 special = i | |
| 409 | UINT8 special = iop | |
| 410 | 410 | int casin = (m_cassette)->input() < 0.0; |
| 411 | 411 | |
| 412 | 412 | output_set_led_value(LED_CASSETTE, casin); |
| r15082 | r15083 | |
| 416 | 416 | |
| 417 | 417 | READ_LINE_MEMBER( cosmicos_state::ef3_r ) |
| 418 | 418 | { |
| 419 | UINT8 special = i | |
| 419 | UINT8 special = iop | |
| 420 | 420 | |
| 421 | 421 | return BIT(special, 2) | BIT(special, 3); |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | READ_LINE_MEMBER( cosmicos_state::ef4_r ) |
| 425 | 425 | { |
| 426 | return BIT(i | |
| 426 | return BIT(iop | |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | 429 | static COSMAC_SC_WRITE( cosmicos_sc_w ) |
| r15082 | r15083 | |
|---|---|---|
| 198 | 198 | |
| 199 | 199 | READ8_MEMBER( vic10_state::vic_lightpen_x_cb ) |
| 200 | 200 | { |
| 201 | return i | |
| 201 | return iop | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | READ8_MEMBER( vic10_state::vic_lightpen_y_cb ) |
| 205 | 205 | { |
| 206 | return i | |
| 206 | return iop | |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | READ8_MEMBER( vic10_state::vic_lightpen_button_cb ) |
| 210 | 210 | { |
| 211 | return i | |
| 211 | return iop | |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | READ8_MEMBER( vic10_state::vic_dma_read ) |
| r15082 | r15083 | |
| 235 | 235 | |
| 236 | 236 | READ8_MEMBER( vic10_state::vic_rdy_cb ) |
| 237 | 237 | { |
| 238 | return i | |
| 238 | return iop | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | static const vic2_interface vic_intf = |
| r15082 | r15083 | |
| 264 | 264 | |
| 265 | 265 | int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp; |
| 266 | 266 | UINT8 cia0porta = mos6526_pa_r(state->m_cia, 0); |
| 267 | int controller1 = input_port_read(machine, "CTRLSEL") & 0x07; | |
| 268 | int controller2 = input_port_read(machine, "CTRLSEL") & 0x70; | |
| 267 | int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07; | |
| 268 | int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70; | |
| 269 | 269 | // Notice that only a single input is defined for Mouse & Lightpen in both ports |
| 270 | 270 | switch (controller1) |
| 271 | 271 | { |
| 272 | 272 | case 0x01: |
| 273 | 273 | if (which) |
| 274 | pot2 = in | |
| 274 | pot2 = machine.root_device().ioport | |
| 275 | 275 | else |
| 276 | pot1 = in | |
| 276 | pot1 = machine.root_device().ioport | |
| 277 | 277 | break; |
| 278 | 278 | |
| 279 | 279 | case 0x02: |
| 280 | 280 | if (which) |
| 281 | pot2 = in | |
| 281 | pot2 = machine.root_device().ioport | |
| 282 | 282 | else |
| 283 | pot1 = in | |
| 283 | pot1 = machine.root_device().ioport | |
| 284 | 284 | break; |
| 285 | 285 | |
| 286 | 286 | case 0x03: |
| 287 | if (which && (in | |
| 287 | if (which && (machine.root_device().ioport | |
| 288 | 288 | pot1 = 0x00; |
| 289 | 289 | break; |
| 290 | 290 | |
| 291 | 291 | case 0x04: |
| 292 | 292 | if (which) |
| 293 | pot2 = in | |
| 293 | pot2 = machine.root_device().ioport | |
| 294 | 294 | else |
| 295 | pot1 = in | |
| 295 | pot1 = machine.root_device().ioport | |
| 296 | 296 | break; |
| 297 | 297 | |
| 298 | 298 | case 0x06: |
| 299 | if (which && (in | |
| 299 | if (which && (machine.root_device().ioport | |
| 300 | 300 | pot2 = 0x00; |
| 301 | 301 | break; |
| 302 | 302 | |
| r15082 | r15083 | |
| 313 | 313 | { |
| 314 | 314 | case 0x10: |
| 315 | 315 | if (which) |
| 316 | pot4 = in | |
| 316 | pot4 = machine.root_device().ioport | |
| 317 | 317 | else |
| 318 | pot3 = in | |
| 318 | pot3 = machine.root_device().ioport | |
| 319 | 319 | break; |
| 320 | 320 | |
| 321 | 321 | case 0x20: |
| 322 | 322 | if (which) |
| 323 | pot4 = in | |
| 323 | pot4 = machine.root_device().ioport | |
| 324 | 324 | else |
| 325 | pot3 = in | |
| 325 | pot3 = machine.root_device().ioport | |
| 326 | 326 | break; |
| 327 | 327 | |
| 328 | 328 | case 0x30: |
| 329 | if (which && (in | |
| 329 | if (which && (machine.root_device().ioport | |
| 330 | 330 | pot4 = 0x00; |
| 331 | 331 | break; |
| 332 | 332 | |
| 333 | 333 | case 0x40: |
| 334 | 334 | if (which) |
| 335 | pot4 = in | |
| 335 | pot4 = machine.root_device().ioport | |
| 336 | 336 | else |
| 337 | pot3 = in | |
| 337 | pot3 = machine.root_device().ioport | |
| 338 | 338 | break; |
| 339 | 339 | |
| 340 | 340 | case 0x60: |
| 341 | if (which && (in | |
| 341 | if (which && (machine.root_device().ioport | |
| 342 | 342 | pot4 = 0x00; |
| 343 | 343 | break; |
| 344 | 344 | |
| r15082 | r15083 | |
| 351 | 351 | break; |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | if (in | |
| 354 | if (machine.root_device().ioport | |
| 355 | 355 | { |
| 356 | 356 | temp = pot1; pot1 = pot3; pot3 = temp; |
| 357 | 357 | temp = pot2; pot2 = pot4; pot4 = temp; |
| r15082 | r15083 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | READ16_MEMBER( b16_state::vblank_r ) |
| 121 | 121 | { |
| 122 | return i | |
| 122 | return iop | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | WRITE8_MEMBER( b16_state::b16_6845_address_w ) |
| r15082 | r15083 | |
| 214 | 214 | /* Input ports */ |
| 215 | 215 | static INPUT_PORTS_START( b16 ) |
| 216 | 216 | PORT_START("SYSTEM") |
| 217 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK | |
| 217 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") | |
| 218 | 218 | INPUT_PORTS_END |
| 219 | 219 | |
| 220 | 220 |
| r15082 | r15083 | |
|---|---|---|
| 74 | 74 | case 0xA1: // keyboard |
| 75 | 75 | char kbdrow[6]; |
| 76 | 76 | sprintf(kbdrow,"X%X",offset>>8); |
| 77 | return i | |
| 77 | return iop | |
| 78 | 78 | |
| 79 | 79 | case 0xE8: // wants bit 4 low then high |
| 80 | 80 | return m_framecnt << 4; |
| r15082 | r15083 | |
|---|---|---|
| 43 | 43 | { |
| 44 | 44 | for (line = 0; line < 7; line++) |
| 45 | 45 | if (m_kb_counter == (0x7f & ~(1 << line))) |
| 46 | data = in | |
| 46 | data = machine.root_device().ioport | |
| 47 | 47 | } |
| 48 | 48 | else |
| 49 | 49 | { |
| 50 | 50 | //Read all the input lines |
| 51 | 51 | for (line = 0; line < 7; line++) |
| 52 | data &= in | |
| 52 | data &= machine.root_device().ioport | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return data & 0x7c; |
| r15082 | r15083 | |
| 124 | 124 | ---- --x- pulse |
| 125 | 125 | ---- ---x battery status |
| 126 | 126 | */ |
| 127 | return kb_read(machine()) | i | |
| 127 | return kb_read(machine()) | iop | |
| 128 | 128 | case 0x17: |
| 129 | 129 | /* datapack control lines */ |
| 130 | 130 | return (m_pack1->control_r() | (m_pack2->control_r() & 0x8f)) | ((m_pack2->control_r() & 0x10)<<1); |
| r15082 | r15083 | |
|---|---|---|
| 943 | 943 | case 0x0130/4: |
| 944 | 944 | if( (mem_mask) & 0x0000ffff ) // KEYINPUT |
| 945 | 945 | { |
| 946 | return i | |
| 946 | return iop | |
| 947 | 947 | } |
| 948 | 948 | if( (mem_mask) & 0xffff0000 ) |
| 949 | 949 | { |
| r15082 | r15083 | |
|---|---|---|
| 511 | 511 | { |
| 512 | 512 | UINT8 data = 0xff; |
| 513 | 513 | |
| 514 | if (!BIT(m_col, 0)) data &= input_port_read(machine(), "ROW0"); | |
| 515 | if (!BIT(m_col, 1)) data &= input_port_read(machine(), "ROW1"); | |
| 516 | if (!BIT(m_col, 2)) data &= input_port_read(machine(), "ROW2"); | |
| 517 | if (!BIT(m_col, 3)) data &= input_port_read(machine(), "ROW3"); | |
| 518 | if (!BIT(m_col, 4)) data &= input_port_read(machine(), "ROW4"); | |
| 519 | if (!BIT(m_col, 5)) data &= input_port_read(machine(), "ROW5"); | |
| 520 | if (!BIT(m_col, 6)) data &= input_port_read(machine(), "ROW6"); | |
| 521 | if (!BIT(m_col, 7)) data &= input_port_read(machine(), "ROW7"); | |
| 514 | if (!BIT(m_col, 0)) data &= ioport("ROW0")->read(); | |
| 515 | if (!BIT(m_col, 1)) data &= ioport("ROW1")->read(); | |
| 516 | if (!BIT(m_col, 2)) data &= ioport("ROW2")->read(); | |
| 517 | if (!BIT(m_col, 3)) data &= ioport("ROW3")->read(); | |
| 518 | if (!BIT(m_col, 4)) data &= ioport("ROW4")->read(); | |
| 519 | if (!BIT(m_col, 5)) data &= ioport("ROW5")->read(); | |
| 520 | if (!BIT(m_col, 6)) data &= ioport("ROW6")->read(); | |
| 521 | if (!BIT(m_col, 7)) data &= ioport("ROW7")->read(); | |
| 522 | 522 | |
| 523 | 523 | return data; |
| 524 | 524 | } |
| r15082 | r15083 | |
|---|---|---|
| 96 | 96 | { |
| 97 | 97 | char kbdrow[6]; |
| 98 | 98 | sprintf(kbdrow,"KEY%X", m_key_mux); |
| 99 | return (i | |
| 99 | return (iop | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | WRITE8_MEMBER( bmjr_state::key_w ) |
| r15082 | r15083 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | // internal state |
| 99 | 99 | astring m_filename; |
| 100 | i | |
| 100 | io | |
| 101 | 101 | bool m_playing; |
| 102 | 102 | required_device<laserdisc_device> m_laserdisc; |
| 103 | 103 | }; |
| r15082 | r15083 | |
| 217 | 217 | |
| 218 | 218 | void ldplayer_state::process_commands() |
| 219 | 219 | { |
| 220 | i | |
| 220 | iop | |
| 221 | 221 | int number; |
| 222 | 222 | |
| 223 | 223 | // step backwards |
| r15082 | r15083 | |
|---|---|---|
| 474 | 474 | # add the optimization flag |
| 475 | 475 | CCOMFLAGS += -O$(OPTIMIZE) |
| 476 | 476 | |
| 477 | # add the error warning flag | |
| 478 | ifndef NOWERROR | |
| 479 | CCOMFLAGS += -Werror | |
| 480 | endif | |
| 481 | ||
| 477 | 482 | # if we are optimizing, include optimization options |
| 478 | # and make all errors into warnings | |
| 479 | 483 | ifneq ($(OPTIMIZE),0) |
| 480 | ifneq ($(TARGETOS),os2) | |
| 481 | ifndef NOWERROR | |
| 482 | CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS) | |
| 483 | else | |
| 484 | 484 | CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) |
| 485 | 485 | endif |
| 486 | else | |
| 487 | CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) | |
| 488 | endif | |
| 489 | endif | |
| 490 | 486 | |
| 491 | 487 | # add a basic set of warnings |
| 492 | 488 | CCOMFLAGS += \ |
| Previous | 15994 Revisions | Next |