| Previous | 15994 Revisions | Next |
| r1680 Thursday 14th February, 2008 at 00:36:45 UTC by Nathan Woods |
|---|
| Updated to MAME 0.123u1 core |
| [ROOT] | |
| [docs] | messnew.txt |
| [src/build] | build.mak file2str.c png2bdc.c verinfo.c* |
| [src/emu] | cheat.c cpuexec.c drawgfx.c drawgfx.h emu.mak inptport.c mame.c memory.c sound.c tilemap.c tilemap.h timer.c timer.h video.c |
| [src/emu/cpu] | cpu.mak |
| [src/emu/cpu/adsp2100] | adsp2100.c |
| [src/emu/cpu/arm7] | arm7core.c arm7exec.c |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/f8] | f3853.c |
| [src/emu/cpu/h83002] | h8periph.c |
| [src/emu/cpu/i8039] | i8039.c |
| [src/emu/cpu/m37710] | m37710.c |
| [src/emu/cpu/m6502] | m65ce02.c m65ce02.h opsce02.h |
| [src/emu/cpu/m6800] | m6800.c |
| [src/emu/cpu/mips] | mips3com.c |
| [src/emu/cpu/powerpc] | drc_ops.c ppc_mem.c ppc_ops.c |
| [src/emu/cpu/sh2] | sh2.c |
| [src/emu/cpu/sh4] | sh4.c sh4.h |
| [src/emu/cpu/tlcs90] | tlcs90.c |
| [src/emu/cpu/tms34010] | tms34010.c |
| [src/emu/cpu/tms9900] | 99xxcore.h |
| [src/emu/cpu/z180] | z180.c |
| [src/emu/drivers] | xtal.h |
| [src/emu/machine] | 6522via.c 6526cia.c 6532riot.c 6840ptm.c 6850acia.c 74123.c 8237dma.c 8257dma.c ds2401.c ds2404.c idectrl.c intelfsh.c mb3773.c pc16552d.c pic8259.c pit8253.c rtc65271.c timekpr.c tmp68301.c wd33c93.c z80ctc.c z80dma.c z80sio.c |
| [src/emu/sound] | 2203intf.c 2608intf.c 2610intf.c 2612intf.c 262intf.c 3812intf.c es5503.c ics2115.c msm5205.c pokey.c scsp.c sound.mak upd7759.c wave.h ym2151.c ym2413.c ymf262.c ymf271.c ymf278b.c |
| [src/emu/video] | |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | 8080bw.c amiga.c cage.c dcs.c dkong.c exidy.c exidy440.c galaxian.c geebee.c gottlieb.c jaguar.c leland.c n8080.c segag80r.c snes.c taito_en.c vicdual.c warpwarp.c |
| [src/mame/drivers] | 1945kiii.c 20pacgal.c 8080bw.c acefruit.c acommand.c aeroboto.c aleck64.c alg.c arkanoid.c astinvad.c astrof.c atarisy1.c atetris.c backfire.c beaminv.c berzerk.c bestleag.c bigfghtr.c bishjan.c bloodbro.c bnstars.c calorie.c capbowl.c carrera.c cave.c cball.c ccastles.c centiped.c cherrym.c cherrym2.c clayshoo.c cliffhgr.c cloud9.c cninja.c cntsteer.c coinmstr.c combatsc.c contra.c coolpool.c couple.c cowrace.c cps2.c cps3.c crystal.c cshooter.c csk.c cultures.c cvs.c cybertnk.c dacholer.c dambustr.c darkhors.c darkmist.c dbz.c dday.c ddayjlc.c ddenlovr.c ddragon.c deco156.c deco32.c deco_mlc.c deniam.c dreamwld.c drmicro.c drtomy.c drw80pkr.c dunhuang.c dynadice.c dynax.c egghunt.c enigma2.c ettrivia.c exctsccr.c exedexes.c exerion.c exterm.c fastfred.c fcombat.c finalizr.c firebeat.c flower.c foodf.c funworld.c fuukifg2.c fuukifg3.c gaelco3d.c galaxian.c galivan.c galpani3.c gamecstl.c gameplan.c gberet.c gdrawpkr.c genesis.c gijoe.c goldstar.c good.c groundfx.c gstream.c gsword.c gticlub.c gunbustr.c gunsmoke.c halleys.c hanaawas.c higemaru.c hitme.c homedata.c hornet.c hyperspt.c hyprduel.c igs_180.c igs_m027.c ikki.c ironhors.c jackal.c jackpool.c jailbrek.c jalmah.c jedi.c jollyjgr.c jpmimpct.c kaneko16.c kchamp.c kinst.c koikoi.c konamigq.c konamigv.c konamigx.c ksys573.c laserbat.c limenko.c looping.c ltcasino.c lucky8.c m10.c* m107.c m72.c m92.c madalien.c magic10.c magicfly.c magmax.c malzak.c marinedt.c mario.c markham.c maxaflex.c mediagx.c megadriv.c megaplay.c megatech.c megazone.c merit.c metro.c mgolf.c midas.c midtunit.c midvunit.c midwunit.c midyunit.c midzeus.c miniboy7.c missile.c mitchell.c model2.c model3.c mogura.c mpu4.c mpu4drvr.c ms32.c murogem.c mw8080bw.c mwarr.c mystwarr.c namcofl.c namcoic.c namcona1.c namcond1.c namcos10.c namcos11.c namcos12.c namcos22.c namcos23.c naomi.c naughtyb.c neogeo.c nmg5.c nmk16.c nova2001.c nwk-tr.c nyny.c ohmygod.c olibochu.c onetwo.c overdriv.c pandoras.c panicr.c peplus.c pingpong.c pipeline.c pirates.c pkscram.c plygonet.c pmpoker.c policetr.c polyplay.c pooyan.c powerbal.c powerins.c ppmast93.c psikyo.c pturn.c punchout.c qdrmfgp.c qix.c quasar.c quizpani.c r2dtank.c rabbit.c raiden2.c rallyx.c rcasino.c retofinv.c rmhaihai.c rockola.c rocnrope.c royalmah.c rungun.c safarir.c sandscrp.c sbowling.c sbrkout.c scotrsht.c seattle.c segae.c segas16b.c segas24.c segas32.c segaybd.c seibuspi.c seta.c shaolins.c silkroad.c simpl156.c simpsons.c skyarmy.c skykid.c skylncr.c slapfght.c spacefb.c spcforce.c speglsht.c spiders.c sprcros2.c srmp6.c ssfindo.c ssingles.c sslam.c ssv.c stactics.c statriv2.c stfight.c strnskil.c stv.c subs.c supdrapo.c superchs.c superdq.c suprgolf.c system1.c system18.c taito_f3.c taitowlf.c talbot.c tatsumi.c tattack.c tceptor.c tecmosys.c tetrisp2.c tickee.c tmaster.c tmnt.c toaplan1.c toaplan2.c toki.c tp84.c trackfld.c trvmadns.c tubep.c tugboat.c tx1.c ultrsprt.c usgames.c vcombat.c* vegas.c vmetal.c vroulet.c vsnes.c wallc.c wardner.c wheelfir.c wilytowr.c wink.c wiping.c witch.c xexex.c xmen.c xyonix.c yumefuda.c zac2650.c zn.c zr107.c |
| [src/mame/includes] | cvs.h dc.h fastfred.h m10.h* nova2001.h* qix.h |
| [src/mame/machine] | amiga.c atari.c atarigen.c balsente.c cubocd32.c dc.c decocass.c galaxian.c harddriv.c irem_cpu.c irobot.c konamigx.c konamiic.c leland.c mcr.c midwayic.c mw8080bw.c n64.c namcoio.c nmk112.c nmk112.h pcshare.c psx.c snes.c stactics.c starwars.c stvcd.c ticket.c williams.c xevious.c |
| [src/mame/video] | 1942.c 1943.c 40love.c 4enraya.c actfancr.c aeroboto.c aerofgt.c airbustr.c alpha68k.c ampoker2.c amspdwy.c angelkds.c appoooh.c aquarium.c argus.c arkanoid.c armedf.c ashnojoe.c astrocde.c atari.c atarifb.c atarig1.c atarig42.c atarigt.c atarigx2.c atarimo.c atarisy1.c atarisy2.c atetris.c avgdvg.c badlands.c bagman.c bankp.c baraduke.c batman.c battlane.c battlex.c bbusters.c bfm_adr2.c bigstrkb.c bionicc.c bking.c blktiger.c blmbycar.c blockade.c bloodbro.c blstroid.c blueprnt.c bogeyman.c bombjack.c bosco.c brkthru.c bsktball.c bwing.c cabal.c canyon.c carjmbre.c cave.c cbasebal.c cclimber.c centiped.c chaknpop.c champbas.c changela.c circus.c circusc.c citycon.c cloak.c clshroad.c combatsc.c commando.c compgolf.c contra.c cop01.c cps1.c crbaloon.c crospang.c crshrace.c csk.c cvs.c cyberbal.c darius.c darkmist.c darkseal.c dbz.c dc.c dcheese.c dcon.c dday.c ddragon.c ddragon3.c ddrible.c deadang.c dec0.c dec8.c deco16ic.c deco32.c deco_mlc.c decocass.c deniam.c digdug.c djboy.c djmain.c dkong.c docastle.c dogfgt.c dooyong.c dragrace.c drgnmst.c drmicro.c dynduke.c eprom.c equites.c esd16.c espial.c exctsccr.c exedexes.c exerion.c exprraid.c f1gp.c fastfred.c fastlane.c fcombat.c finalizr.c firetrap.c firetrk.c fitfight.c flkatck.c flower.c flstory.c flyball.c foodf.c freekick.c fromanc2.c fromance.c funkybee.c funworld.c fuukifg2.c fuukifg3.c gaelco.c gaelco2.c gaiden.c galaga.c galaxian.c galivan.c gaplus.c gauntlet.c gberet.c gcpinbal.c gdrawpkr.c ginganin.c gladiatr.c glass.c gng.c goal92.c goindol.c goldstar.c gomoku.c goodejan.c gotcha.c gottlieb.c gotya.c grchamp.c gstriker.c gsword.c gtia.c gticlub.c gumbo.c gundealr.c gunsmoke.c hanaawas.c hcastle.c hexa.c hexion.c higemaru.c hng64.c holeland.c homedata.c homerun.c hyperspt.c hyprduel.c ikki.c inufuku.c iqblock.c ironhors.c itech32.c jack.c jackal.c jaguar.c jailbrek.c jalblend.c jcross.c kaneko16.c kangaroo.c karnov.c kchamp.c kickgoal.c kingobox.c klax.c kncljoe.c konamigx.c konamiic.c kopunch.c ksayakyu.c kyugo.c labyrunr.c ladybug.c ladyfrog.c lasso.c lastduel.c legionna.c lemmings.c liberate.c lkage.c lockon.c lordgun.c lvcards.c lwings.c m10.c* m107.c m52.c m57.c m58.c m62.c m72.c m90.c m92.c macrossp.c madmotor.c magmax.c mainsnk.c malzak.c mappy.c marineb.c mario.c markham.c marvins.c mayumi.c mcatadv.c mcr.c mcr3.c mcr68.c meadows.c megasys1.c megazone.c mermaid.c metlclsh.c metro.c midvunit.c midzeus2.c mikie.c mitchell.c mjkjidai.c mole.c mosaic.c mrdo.c mrjong.c ms32.c msisaac.c mugsmash.c mustache.c mystston.c mystwarr.c n8080.c namcona1.c namcos1.c namcos2.c namcos22.c namcos86.c naughtyb.c nemesis.c neogeo.c news.c ninjakd2.c nitedrvr.c nmk16.c nova2001.c nycaptor.c offtwall.c ohmygod.c ojankohs.c oneshot.c orbit.c othldrby.c pacland.c pacman.c pandoras.c paradise.c pass.c pbaction.c pcktgal.c pgm.c phoenix.c pingpong.c pirates.c pitnrun.c playch10.c playmark.c plygonet.c pokechmp.c polepos.c poolshrk.c pooyan.c popeye.c popper.c portrait.c powerins.c ppu2c0x.c prehisle.c psikyo.c psikyosh.c psychic5.c punchout.c pushman.c qix.c quasar.c quizdna.c quizpani.c raiden.c rallyx.c realbrk.c redclash.c relief.c renegade.c retofinv.c rockola.c rocnrope.c rpunch.c runaway.c rungun.c sauro.c sbasketb.c sbugger.c scotrsht.c sderby.c segag80r.c segaic16.c segaic24.c segas32.c seibuspi.c seicross.c sengokmj.c senjyo.c seta.c sf.c shadfrce.c shangkid.c shaolins.c shisen.c shootout.c shuuz.c sidearms.c sidepckt.c silkroad.c skullxbo.c skydiver.c skykid.c slapfght.c snk68.c solomon.c sonson.c spdodgeb.c speedatk.c speedbal.c speedspn.c splash.c sprcros2.c sprint2.c sprint4.c sprint8.c srumbler.c sshangha.c sslam.c ssozumo.c ssrj.c ssv.c stactics.c stadhero.c starshp1.c stfight.c stlforce.c strnskil.c stvvdp2.c suna8.c superqix.c suprloco.c suprnova.c suprridr.c suprslam.c system1.c system16.c tagteam.c tail2nos.c taito_b.c taito_f2.c taito_f3.c taito_l.c taitoic.c taitojc.c tank8.c tankbatt.c tankbust.c taotaido.c targeth.c tatsumi.c tbowl.c tceptor.c tecmo.c tecmo16.c tehkanwc.c terracre.c tetrisp2.c thedeep.c thepit.c thoop2.c thunderj.c tiamc1.c tigeroad.c timelimt.c timeplt.c tmnt.c toaplan1.c toaplan2.c toki.c toobin.c toypop.c tp84.c trackfld.c travrusa.c triplhnt.c trucocl.c tryout.c tsamurai.c tumbleb.c tunhunt.c turbo.c twin16.c twincobr.c tx1.c ultratnk.c unico.c usgames.c vastar.c vball.c victory.c videopin.c vindictr.c vulgus.c warpwarp.c wc90.c wc90b.c wecleman.c welltris.c wgp.c williams.c wiping.c wrally.c wwfsstar.c wwfwfest.c xain.c xevious.c xorworld.c xybots.c xyonix.c ygv608.c yiear.c yunsun16.c yunsung8.c zac2650.c zaccaria.c zaxxon.c zerozone.c zodiack.c |
| [src/mess] | inputx.c mscommon.c mslegacy.c mslegacy.h |
| [src/mess/audio] | t6721.c |
| [src/mess/devices] | flopdrv.c thomflop.c |
| [src/mess/drivers] | a2600.c a310.c abc80.c abc80x.c atarist.c cbmb.c dc.c einstein.c exidy.c nc.c pet.c ql.c tutor.c x68k.c |
| [src/mess/machine] | 6551.c 68901mfp.c 99_dsk.c amigacd.c amigafdc.c amigakbd.c apple2gs.c applefdc.c at29040.c bbc.c cbmb.c centroni.c coco.c compis.c corvushd.c electron.c europc.c gamecom.c gb.c hd63450.c i8271.c ibmpc.c kc.c kim1.c lisa.c lynx.c mac.c matsucd.c mc6843.c mm58274c.c mz700.c nec765.c nes_mmc.c osborne1.c pc_hdc.c pc_mouse.c pce.c pcf8593.c pdp1.c pet.c pmd85.c pokemini.c rp5c15.c rriot.c serial.c sgi.c sms.c svi318.c sym1.c thomson.c tms5501.c tms9901.c tms9902.c tx0.c vc1541.c vectrex.c wd17xx.c z80dart.c zx.c |
| [src/mess/osd/winui] | winui.mak |
| [src/mess/video] | abc80.c abc80x.c aim65.c amstrad.c apple2.c aquarius.c atarist.c cbmb.c cdp1861.c cdp1864.c coco3.c gb.c m6847.c microtan.c osi.c smsvdp.c ted7360.c thomson.c trs80.c vectrex.c x68k.c zx8301.c |
| [src/osd/windows] | windows.mak |
| [src/osd/winui] | mui_main.c winui.mak |
| r1679 | r1680 | |
|---|---|---|
| 1 | 0.123 | |
| 2 | ----- | |
| 3 | ||
| 4 | ||
| 5 | MAMETesters Bugs Fixed | |
| 6 | ---------------------- | |
| 7 | taito_f3.c0122u8red [Aaron Giles] | |
| 8 | dubugchunklength0122u7gre [Aaron Giles] | |
| 9 | m62.c0122u7yel [Aaron Giles] | |
| 10 | qix.c0122u8red [Atari Ace] | |
| 11 | yard.c0122u7yel [Aaron Giles] | |
| 12 | ||
| 13 | ||
| 14 | ||
| 15 | Source Changes | |
| 16 | -------------- | |
| 17 | Fixed crash in debugcmt with starting with no game on the command-line. | |
| 18 | [Andrew Gardner] | |
| 19 | ||
| 20 | Fixed PSR transfers in the ARM7 core. [R. Belmont] | |
| 21 | ||
| 22 | Fixed regression in cpu_spinuntil* calls that broke a number of games. | |
| 23 | [Aaron Giles] | |
| 24 | ||
| 25 | Fixed ADPCM in m62 games. Did some additional cleanup. [Aaron Giles] | |
| 26 | ||
| 27 | Fixed palette gradient for promutrv. [Pierpaolo Prazzoli] | |
| 28 | ||
| 29 | Fixed watchdog behavior when not explicitly specified. [Aaron Giles] | |
| 30 | ||
| 31 | Fixed sprite placement again in chinagat driver. [Aaron Giles] | |
| 32 | ||
| 33 | Fixed incorrect default screen siz | |
| 34 | ||
| 35 | ||
| 36 | ||
| 37 | New clones added | |
| 38 | ---------------- | |
| 39 | Vs. Janshi Brandnew Stars (MegaSystem32 Version) [David Haywood] | |
| 40 | ||
| 41 | ||
| 42 | ||
| 43 | 0.122u8 | |
| 44 | ------- | |
| 45 | ||
| 46 | ||
| 47 | MAMETesters Bugs Fixed | |
| 48 | ---------------------- | |
| 49 | stadhero0122u3gra [RansAckeR] | |
| 50 | wboy3_0119u3gra [RansAckeR] | |
| 51 | zerohour0122u6gra [RansAckeR] | |
| 52 | strahl0122u6yel [Mamesick] | |
| 53 | cmv801_0116gra [RansAckeR] | |
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | Source Changes | |
| 58 | -------------- | |
| 59 | Added deprecat.h that contains some deprecated/discouraged contructs. | |
| 60 | The idea is to create extra work if a driver wants to use these and | |
| 61 | hopefully gives an incentive to look for an alternate solution. Added | |
| 62 | #include of deprecat.h that rely on these contructs. Removed a bunch | |
| 63 | of unneccassary #include's from these files. [Zsolt Vasvari] | |
| 64 | ||
| 65 | Simplified Star Fire driver. [Zsolt Vasvari] | |
| 66 | ||
| 67 | drawgfx changes: [Zsolt Vasvari] | |
| 68 | - Removed copybitmap_remap and copyscrollbitmap_remap, neither which | |
| 69 | was used by anybody | |
| 70 | - Removed some obsolete commented out code | |
| 71 | - Fixed up some comments | |
| 72 | - Removed TRANSPARENCY_NONE case from copybitmap_core, which can | |
| 73 | never happen | |
| 74 | - Removed TRANSPARENCY_BLEND completely and TRANSPARENCY_BLEND_RAW | |
| 75 | as an option to copybitmap. Source tree needs to be recompiled | |
| 76 | as the transparancy mode enum has changed. | |
| 77 | - Removed TRANSPARENCY_NONE_RAW, TRANSPARENCY_PENS_RAW and | |
| 78 | TRANSPARENCY_PEN_TABLE_RAW as they were no longer used. | |
| 79 | - Changed copybitmap and copyscrollbitmap. There are now 2 versions | |
| 80 | of each, one without and with transparency. | |
| 81 | ||
| 82 | Fixed crash in masao. [couriersud] | |
| 83 | ||
| 84 | Corrected previous i0851 timer fix to use more accurate IE SFRs. | |
| 85 | [Jim Stolis] | |
| 86 | ||
| 87 | jedi.c updates: [Zsolt Vasvari] | |
| 88 | - Changed video code to directly manipulate the game bitmap | |
| 89 | - Background smoothing now happens at the same time as the background | |
| 90 | is drawn | |
| 91 | ||
| 92 | Fixed the CPS driver to at least display the correct clock in the | |
| 93 | driver info, by degrading the clock through alternate means. | |
| 94 | [David Haywood] | |
| 95 | ||
| 96 | m62.c changes: [couriersud] | |
| 97 | * fixed wrong resistor value (22K to 2.2K) - verified on spelunkr | |
| 98 | and kidniki hires pcb pictures | |
| 99 | * Changed resistor network calculation based on assumption that cs | |
| 100 | line is active either on tiles or sprites color prom. | |
| 101 | ||
| 102 | Simplified the video code for crgolf. [Zsolt Vasvari] | |
| 103 | ||
| 104 | Added PCB layouts for Penguin Bros & Puzzle De Bowling based on | |
| 105 | Hi-res pics. Corrected the seta2.c 68301 base clock as 50MHz / 3 | |
| 106 | (16.66666MHz) as all the Seta2 hardware has a 50MHz OSC. Secondary OSC | |
| 107 | are for other chips (28MHz and or 32.53047MHz). [Brian Troha] | |
| 108 | ||
| 109 | Simplified video code and adjusted some set names in the leland | |
| 110 | driver. [Zsolt Vasvari] | |
| 111 | ||
| 112 | Replaced tables with equations in the Sega C2 driver. | |
| 113 | [Nicola Salmoria] | |
| 114 | ||
| 115 | Added checks for CROSS_BUILD=1 to omit building m68kmake.exe, | |
| 116 | verinfo.exe, png2bdc.exe and file2str. Enables building mame using | |
| 117 | mingw on linux. [couriersud] | |
| 118 | ||
| 119 | Various Irem driver updates: [Aaron Giles] | |
| 120 | * Properly tagged m52 and m62 sound boards, plus variants. | |
| 121 | * Updated all connected drivers. | |
| 122 | * Merged memory maps. | |
| 123 | * Proper video timing in 10 yard fight. | |
| 124 | * Converted troangel to tilemaps. | |
| 125 | * Moved definitions to header files. | |
| 126 | * Updated mpatrol, yard to use resnet for colors. | |
| 127 | * Renamed mpatrol -> m52 | |
| 128 | * Renamed troangel -> m57 | |
| 129 | * Renamed yard -> m58 | |
| 130 | ||
| 131 | Cleaned up 20pacgal driver, including driver state. Tried improving | |
| 132 | on the ROM mirroring, without any success. [Zsolt Vasvari] | |
| 133 | ||
| 134 | Removed colortables from a number of drivers, as part of a larger | |
| 135 | move to phase out old-style colortables: gotya, gyruss, ampoker, | |
| 136 | circusc, clshroad, champbas, 1943, lucky8, olibochu, yamato, | |
| 137 | appoooh, bking, bladestl, blueprnt, carpolo, centiped, cop01, | |
| 138 | cosmic, ddrible, irobot, ace, alpha68k, arabian, bfm_sc2, carjmbre, | |
| 139 | cclimber, cherrym2, combatsc, contra, fastlane, hcastle, labyrunr, | |
| 140 | cham24, multigam. [Zsolt Vasvari] | |
| 141 | ||
| 142 | Removed non-existent, second M6295 from Hit the Ice. Fixes missing | |
| 143 | sounds (e.g. team select screen). Hit the Ice/Violence Fight now | |
| 144 | share the same sound CPU memory maps. [Philip Bennett] | |
| 145 | ||
| 146 | Improved DIP switches according to manuals for the following drivers: | |
| 147 | wboy, chplft, extdwnhl, zingzip, zaxxon, congo, vanguard, zarzon, | |
| 148 | nibbler, segag80r.c, yard, kaneko16.c. [RansAckeR] | |
| 149 | ||
| 150 | Verified the sound roms for Rock'n 3 and added proper names. Added | |
| 151 | PCB layout for sound rom board only. [Brian Troha] | |
| 152 | ||
| 153 | Cleaned up Time Pilot sound board implementation: [Aaron Giles] | |
| 154 | * full memory maps | |
| 155 | * partial machine driver removes need for replicating filtering logic | |
| 156 | * updated all relevant drivers | |
| 157 | ||
| 158 | Cleaned up Time Pilot and Tutankham drivers: [Aaron Giles] | |
| 159 | * correct clocks where possible | |
| 160 | * merged memory maps | |
| 161 | * fully decoded memory maps | |
| 162 | * replaced hacky sprite rendering in Time Pilot with partial updates | |
| 163 | * save state support | |
| 164 | * removed Power Surge kludge, replaced with unmapped handler control | |
| 165 | * Tutankham runs at 60fps, with IRQs every other frame | |
| 166 | * Proper IRQ ack in Tutankham | |
| 167 | * Proper NMI generation in Time Pilot | |
| 168 | ||
| 169 | Cleaned up pooyan driver. Save states, full memory maps, proper NMI | |
| 170 | generation, etc. Flipped video to align better with Time Pilot. | |
| 171 | [Aaron Giles] | |
| 172 | ||
| 173 | Changed 6840 interrupt handling to work like the recent 6821 changes. | |
| 174 | Updated MPU4 driver accordingly. Updated Scorpion 2 driver to match | |
| 175 | MPU4 coding style. [James Wallace] | |
| 176 | ||
| 177 | Resolved all unknown dips in the galpani2 driver according to kaneko's | |
| 178 | docs, unified memory maps of both CPUs and repositioned a pair of | |
| 179 | graphic ROMS. [Luis Faria] | |
| 180 | ||
| 181 | Made some minor improvements to 1942.c & 1943.c DIPs. Improved | |
| 182 | segas16a.c, segas16b.c & system16.c DIPs and added DIP locations | |
| 183 | from manuals. [RansAckeR] | |
| 184 | ||
| 185 | Removed distinction between *_gettotalcycles() and | |
| 186 | *_gettotalcycles64(). All functions now return 64-bit results. Updated | |
| 187 | all call sites appropriately. [Aaron Giles] | |
| 188 | ||
| 189 | Further improvements to SCSP FM. [kingshriek] | |
| 190 | ||
| 191 | Moved cpu_getiloops() and cpu_scalebyfcount() to deprecat.h. Added | |
| 192 | #include "deprecat.h" where necessary to make this happen. Cleaned up | |
| 193 | cpuexec.c/.h to latest core style. Cleaned up implementation of | |
| 194 | extended INP header in inptport.c. Removed external access to | |
| 195 | cycles_currently_ran(). Replaced use of cycles_currently_ran() in | |
| 196 | v9938 code with mame_rand(), since that is effectively the same thing. | |
| 197 | [Aaron Giles] | |
| 198 | ||
| 199 | Added dip locations to about half the games in seta.c. [Brian Troha] | |
| 200 | ||
| 201 | Removed champbas color PROM. Now uses TRANSPARENCY_PENS instead of | |
| 202 | TRANSPARENCY_COLOR. Hooked up palette bank selector from schematics, | |
| 203 | though I am not sure if it is actually used by the code. Changed set | |
| 204 | names to match title screen, which is why baseball is spelt as | |
| 205 | "Base Ball". [Zsolt Vasvari] | |
| 206 | ||
| 207 | Some minor cleanup to the equites driver, including memory map | |
| 208 | merging. [Aaron Giles] | |
| 209 | ||
| 210 | Added new option VIDEO_UPDATE_SCANLINE, which cases VIDEO_UPDATE to | |
| 211 | be called for every visible scanline. Removed manual implementation | |
| 212 | of this in timeplt, in favor of using the new flag. There are | |
| 213 | probably many more drivers that can leverage this. [Aaron Giles] | |
| 214 | ||
| 215 | Added stream_get_sample_rate(), stream_get_time(), and | |
| 216 | stream_get_sample_period(). These functions are not really tested yet | |
| 217 | -- make sure they give reasonable results when first used! Updated | |
| 218 | streams.h header to latest core style. [Aaron Giles] | |
| 219 | ||
| 220 | Fixed reset crashes in all Z180 games. Removed the various busy loop | |
| 221 | and non-exact optimzations from the Z180 core. [Zsolt Vasvari] | |
| 222 | ||
| 223 | Correct colors in Birdie King 3 -- just needed a new dump. Fixed | |
| 224 | incorrect ROM names. Switched color decoding to use the resnet code. | |
| 225 | [Zsolt Vasvari] | |
| 226 | ||
| 227 | Cleaned up the rockola.c driver. Fixed dip switches for all games. | |
| 228 | Added notes about the games. [stephh] | |
| 229 | ||
| 230 | Reorganized exidy440 audio code to make it easier to eventually use | |
| 231 | the MC3417/18 emulation directly. Added MC3418 variant support to the | |
| 232 | HC55516 audio code. [Zsolt Vasvari] | |
| 233 | ||
| 234 | Updated williams driver to use VIDEO_UPDATE_SCANLINE (most bitmap- | |
| 235 | based drivers should.) Converted to 32bpp to catch mid-screen palette | |
| 236 | tweaks. Removed some unnecessary read/write handlers. [Aaron Giles] | |
| 237 | ||
| 238 | Improved colors in circusc, gyruss, gotya with the resnet code. | |
| 239 | [Zsolt Vasvari] | |
| 240 | ||
| 241 | Significant improvements to Lock-On. Added POLL input handling to the | |
| 242 | NEC V20/V30 core. [Philip Bennett] | |
| 243 | ||
| 244 | Changed debugger-related code to be based off a new makefile define | |
| 245 | (DEBUGGER) which sets a new compile-time define (ENABLE_DEBUGGER). | |
| 246 | This means that MAME_DEBUG no longer means "enable debugger", it | |
| 247 | simply enables debugging features such as assertions and debug code | |
| 248 | in drivers. Also removed the various levels of opbase protection in | |
| 249 | memory.h and always just turned on full bounds checking. [Aaron Giles] | |
| 250 | ||
| 251 | Added some instructions to the H8/30xx CPU: [Luca Elia] | |
| 252 | or.l ERs, ERd | |
| 253 | rotl/shal.l ERd | |
| 254 | not.l/neg.l ERd | |
| 255 | exts.w Rd | |
| 256 | sub/or/xor.l #Imm:32, ERd | |
| 257 | bset/bnot/bclr.b Rn, @ERd | |
| 258 | bst/bist.b #Imm:3, @ERd | |
| 259 | bnot.b #Imm:3, @ERd | |
| 260 | ||
| 261 | Added H8/3007 & H8/3044 variants with their memory maps. Preliminary | |
| 262 | implementation of the H8/3007 timers. [Luca Elia] | |
| 263 | ||
| 264 | Added AM_WRITEONLY as a shortcut for AM_WRITE(MWAx_RAM). [Aaron Giles] | |
| 265 | ||
| 266 | Cleaned up Kangaroo driver: [Aaron Giles] | |
| 267 | * documented MB8841 (needs to be decapped to get code) | |
| 268 | * proper video timing | |
| 269 | * full memory maps | |
| 270 | * simplified and more accurate video logic | |
| 271 | ||
| 272 | More opcode improvements to Risky Challenge. [robiza] | |
| 273 | ||
| 274 | Added DIP locations to bking.c [RansAckeR] | |
| 275 | ||
| 276 | ||
| 277 | ||
| 278 | New games added or promoted from NOT_WORKING status | |
| 279 | --------------------------------------------------- | |
| 280 | Wheels Runner [Luca Elia] | |
| 281 | ||
| 282 | ||
| 283 | ||
| 284 | New clones added | |
| 285 | ---------------- | |
| 286 | Lock-On (rev. C) [Philip Bennett] | |
| 287 | Progressive Music Trivia (Question set 4) [Andrew Gardner] | |
| 288 | ||
| 289 | ||
| 290 | ||
| 291 | New games marked as GAME_NOT_WORKING | |
| 292 | ------------------------------------ | |
| 293 | Puzzlet (Japan) [Luca Elia] | |
| 294 | Galaxy Games BIOS [Andrew Gardner] | |
| 295 | ||
| 296 | ||
| 297 | ||
| 298 | 0.122u7 | |
| 299 | ------- | |
| 300 | ||
| 301 | ||
| 302 | MAMETesters Bugs Fixed | |
| 303 | ---------------------- | |
| 304 | tylz0122u5red [Zsolt Vasvari] | |
| 305 | stadhero0122u3gre [Zsolt Vasvari] | |
| 306 | stadhero0122u3ora [Zsolt Vasvari] | |
| 307 | asterix_1055gre [couriersud] | |
| 308 | blktiger37b15gre [couriersud] | |
| 309 | newui0118u4ora [Atari Ace] | |
| 310 | mpatrol0117u2gre [Aaron Giles] | |
| 311 | realbrk0111u4gra [Brian Troha] | |
| 312 | schmisr0111u5gra [Brian Troha, partial fix] | |
| 313 | penbros0111u5gra [Brian Troha] | |
| 314 | ninjakd2_0111u3gra [Nicola Salmoria] | |
| 315 | mnight0102gre [Nicola Salmoria] | |
| 316 | toki060gre [robiza, Corrado Tomaselli] | |
| 317 | ||
| 318 | ||
| 319 | ||
| 320 | Source Changes | |
| 321 | -------------- | |
| 322 | Added internal divider on m680* series CPUs (except the original | |
| 323 | m6800). Updated clocks on all games using them to remove the explicit | |
| 324 | divider. [Aaron Giles] | |
| 325 | ||
| 326 | Reverted experimental D3D fix, since it breaks switchres. | |
| 327 | [Aaron Giles] | |
| 328 | ||
| 329 | dkong updates: [couriersud] | |
| 330 | * fix dkong sound following Clock Divider update | |
| 331 | * updated to use XTAL_* | |
| 332 | * revert a change after sound regression in dkong. | |
| 333 | ||
| 334 | i8085.c updates: [couriersud] | |
| 335 | * 8085 has an internal clock divider by 2. Changed i8085.c to reflect | |
| 336 | this for I8085. I8080 still at 1. | |
| 337 | * Changed driver clocks to reflect internal clock divider | |
| 338 | * Added some FIXME: comments where clocks for I8085 are outside specs | |
| 339 | ||
| 340 | Space Fighter Mark II: [Zsolt Vasvari] | |
| 341 | - Changed year to 1979 as per Guru's contact | |
| 342 | - Renamed set 2 ROMs to allow merging | |
| 343 | - Removed experimental code left in there | |
| 344 | ||
| 345 | phoenix.c updates: [couriersud] | |
| 346 | * Modified I8085 clock | |
| 347 | * Added dip locations | |
| 348 | * consolidated inputs | |
| 349 | * tagged inputs | |
| 350 | * combined memory maps | |
| 351 | * fixed sound issue related to (auto) save states | |
| 352 | ||
| 353 | pleiads updates: [couriersud] | |
| 354 | * video timing from schematics | |
| 355 | * palette from schematics (resnet.h) | |
| 356 | * no more colortable | |
| 357 | ||
| 358 | survival updates: [couriersud] | |
| 359 | * palette from schematics (resnet.h) | |
| 360 | ||
| 361 | Removed bogus (bad) dump of Heated Barrel US set 2. [Brian Troha] | |
| 362 | ||
| 363 | RSP Changes: [SGINut, Nicola Salmoria, Ville Linde] | |
| 364 | - Initialize RSP registers to 0 in lieu of mame_rand | |
| 365 | - Re-fix RSP single-stepping mode when set by another CPU | |
| 366 | - Reading the RSP PC returns only the least significant 12 bits | |
| 367 | - Fixed flag behavior when read out via CFC2 | |
| 368 | - Fixed RSP VRCP instruction to match the real hardware results | |
| 369 | - Corrected VRCP element lookup | |
| 370 | - Corrected unaligned DMA behavior | |
| 371 | ||
| 372 | Removed all palette_X_r functions in favor of direct RAM reads. | |
| 373 | [Zsolt Vasvari] | |
| 374 | ||
| 375 | Removed no longer applicable assert from VIDEO_START(generic). Removed | |
| 376 | VIDEO_START(generic) from drivers that didn't need it. Removed | |
| 377 | MDRV_VIDEO_START(generic_bitmapped) from drivers that don't need it. | |
| 378 | [Zsolt Vasvari] | |
| 379 | ||
| 380 | Made detection of dynamic attempts to install ROM/RAM handlers more | |
| 381 | aggressive. Previous checks would not catch modifications in | |
| 382 | DRIVER_INIT or MACHINE_START calls. Fixed a number of cases of | |
| 383 | incorrect usage throughout the drivers. [Aaron Giles] | |
| 384 | ||
| 385 | Changed one of the cheat calls back to using more generic switch | |
| 386 | detection so they can be triggered via joysticks. [Aaron Giles] | |
| 387 | ||
| 388 | Renamed sauro.c sp0256 internal rom to "sp0256-al2.bin". | |
| 389 | Removed BAD_DUMP flag from it as well. [couriersud] | |
| 390 | ||
| 391 | Marked HD6309 as divide-by-4 internally. Updated drivers accordingly. | |
| 392 | [Aaron Giles] | |
| 393 | ||
| 394 | Major cleanup to the ddragon driver: [Aaron Giles] | |
| 395 | - improved video and interrupt timing | |
| 396 | - consolidated common memory maps and input ports | |
| 397 | - added save state support | |
| 398 | - correct clocks | |
| 399 | ||
| 400 | blktiger.c updates: [couriersud] | |
| 401 | * combines memory maps | |
| 402 | * input ports were tagged | |
| 403 | * all reads use input port tags | |
| 404 | * added dip switch locations from Romstar manual | |
| 405 | ||
| 406 | Added all known variants of the tms5110 as proper chips. Updated | |
| 407 | dkong, cvs and scramble to use new chips. [couriersud] | |
| 408 | ||
| 409 | Converted atarifb.c to tilemaps. [Zsolt Vasvari] | |
| 410 | ||
| 411 | Switched namcos11/namcos12 over to memory_configure_bank / | |
| 412 | memory_set_bank. Simplified golgo 13 gun reading. [smf] | |
| 413 | ||
| 414 | mpatrol driver cleanup [Aaron Giles] | |
| 415 | - merged memory maps | |
| 416 | - complete memory map | |
| 417 | - correct video timing | |
| 418 | - correct CPU clocks | |
| 419 | - replaced protection hack with actual implementation | |
| 420 | - cleaned up inputs | |
| 421 | ||
| 422 | Added tilemap_get_scrollx / tilemap_get_scrolly. [Nicola Salmoria] | |
| 423 | ||
| 424 | Preserve fractional part of sample offset when looping in SCSP. Fixes | |
| 425 | remaining pitch stability problems. Fixed minor issue with timers | |
| 426 | B&C expiring. [kingshriek, R. Belmont] | |
| 427 | ||
| 428 | auto_malloc() once again actually fails when out of memory. | |
| 429 | [Aaron Giles] | |
| 430 | ||
| 431 | Switched zn.c to use MDRV_IMPORT_FROM. [smf] | |
| 432 | ||
| 433 | mario.c changes: [couriersud] | |
| 434 | * removed all traces to video/generic.h | |
| 435 | * fix flipscreen issue with autosave | |
| 436 | * on a hires pcb picture, verified resistor and capacitor values | |
| 437 | ||
| 438 | Added dip locations to Real Break. Filled in a couple of dips for the | |
| 439 | Pachinko Gindama Shoubu games. [Brian Troha] | |
| 440 | ||
| 441 | Fixed invalid memory_install_*_handler calls in drivers/williams.c. | |
| 442 | Emulated external OR circuit for all drivers using the PIA chip. This | |
| 443 | used to be internal to the PIA emulation, but, in fact, this is | |
| 444 | external logic. The PIA has two seperate INTA and INTB out lines. | |
| 445 | This fixes at least PlayBall. [Zsolt Vasvari] | |
| 446 | ||
| 447 | Added the ability to the HC55516 emulator to take an external | |
| 448 | osciallator. Updated Mouse Trap to use the new interface. | |
| 449 | [Zsolt Vasvari] | |
| 450 | ||
| 451 | Cleaned up and merged ninjakd2, mnight and omegaf drivers into a | |
| 452 | single driver. Additionally: [Nicola Salmoria] | |
| 453 | - added flip screen support to all games | |
| 454 | - fixed sprite overdraw mode: | |
| 455 | - ninjakd2 congratulations screen (e.g. stage 3) shows japanese | |
| 456 | characters which were previously missing | |
| 457 | - in ninjakd2, at the beginning of a level items are visible | |
| 458 | during the initial fade in. I'm not sure if this is correct | |
| 459 | but the other effects wouldn't work otherwise | |
| 460 | - in mnight attract mode, when the big ship is firing the other | |
| 461 | sprites no longer leave trails | |
| 462 | - in mnight at the end of a level the screen is slowly filled | |
| 463 | with balls and then slowly cleared to begin the following | |
| 464 | level. Same effect in the death sequence during attract mode. | |
| 465 | - added proper computation of sprites to be drawn taking into | |
| 466 | account double size sprites. This fixes sticking shots in mnight | |
| 467 | without need for a hack. | |
| 468 | - lowered ninjakd2 PCM playback rate to 13020 (from 16000). This | |
| 469 | seems to sound better and is a round division from one of the | |
| 470 | master clocks. | |
| 471 | - removed ROM patch that was used to avoid the input protection in | |
| 472 | omegaf, added a rough but effective protection simulation. | |
| 473 | - corrected some dip switches | |
| 474 | - hooked up sound cpu reset line | |
| 475 | - simplified ROM loading for the older games swizzling address lines | |
| 476 | in driver init. | |
| 477 | ||
| 478 | Added MDRV_SOUND_ROUTE_EX to specify target input channel. Added | |
| 479 | input id to route struct. Fixed DISCRETE_INPUT_STREAM and added input | |
| 480 | channel # to DISCRETE_INPUT_STREAM. [couriersud] | |
| 481 | ||
| 482 | Fixed default debugger memory view width for CPUs with >byte-sized | |
| 483 | minimum. Made menu updating dynamic at click time, fixing issues with | |
| 484 | incorrect checkmarks. [Aaron Giles] | |
| 485 | ||
| 486 | Fixed Ninja Kuna. Cleaned up memory maps. Renamed files to ninjakun.c. | |
| 487 | [Zsolt Vasvari] | |
| 488 | ||
| 489 | Added MC3417 and MC3418 variants to the HC55516 sound emulation. | |
| 490 | Changed Mouse Trap to use MC3417. [Zsolt Vasvari] | |
| 491 | ||
| 492 | Fixed saving i8085 callbacks across a reset. Added 'pull' callback for | |
| 493 | the SID pin. This is needed by the Red Alert voice board. | |
| 494 | [Zsolt Vasvari] | |
| 495 | ||
| 496 | Made the text displayed by the various UI sliders more intelligent. | |
| 497 | Basically, it will only print an index for an item if there are | |
| 498 | multiple of a given type. [Zsolt Vasvari] | |
| 499 | ||
| 500 | Updated jailbrek clocks and video timing based on measurements. | |
| 501 | [Aaron Giles] | |
| 502 | ||
| 503 | Fixed i8051 timers from firing when not enabled. Checking TCON alone | |
| 504 | is not enough to invoke timers. Added IE SFR flags in conditional. | |
| 505 | [Jim Stolis] | |
| 506 | ||
| 507 | Added a _CALL variant to all prototype macros. The use of these | |
| 508 | should make it easier to change the signiture of these functions in | |
| 509 | the future. Replaced existing calls with macro where appropriate. | |
| 510 | [Zsolt Vasvari] | |
| 511 | ||
| 512 | Removed VIDEO_START_CALL(generic) from all drivers not needing it, | |
| 513 | which were all of them. Removed VIDEO_START_CALL(generic_bitmapped) | |
| 514 | from jpmimpct. [Zsolt Vasvari] | |
| 515 | ||
| 516 | Changed YM2203 clock in stfight to 3MHz (compared against OST) | |
| 517 | [Yasuhiro Ogawa] | |
| 518 | ||
| 519 | Improved linear zoom effect resolution to address gaps in CPS3 | |
| 520 | rendering. [OopsWare] | |
| 521 | ||
| 522 | Rewrote and modernized the redalert driver: [Zsolt Vasvari] | |
| 523 | - correct colors -- in places different from the manual's description, | |
| 524 | but matches the flyer perfectly | |
| 525 | - added speech | |
| 526 | - fixed AY-8910 sounds | |
| 527 | - odds and ends | |
| 528 | - corrected colors in Demoneye-X | |
| 529 | - added some sound to Demoneye-X | |
| 530 | - marked Demoneye-X it NOT_WORKING, due to the (still) missing 3rd | |
| 531 | gfx layer that makes it impossible to pass the 2nd level. | |
| 532 | ||
| 533 | Added all the known Naomi BIOS dumps along with descriptions and | |
| 534 | information about region bytes & version numbers. [Brian Troha] | |
| 535 | ||
| 536 | Removed the freely distributable Exidy games' dependency on Berzerk. | |
| 537 | [Zsolt Vasvari] | |
| 538 | ||
| 539 | Added support for the BLX opcode in ARM7 THUMB mode. [SGINut] | |
| 540 | ||
| 541 | Verified DIP locations from manuals for scramble and 800fath. | |
| 542 | [RansAckeR] | |
| 543 | ||
| 544 | Changed S14001A emulator to allow setting the clock frequency instead | |
| 545 | of the clock multiplier. This is how the real chip works. Changed the | |
| 546 | Berzerk driver to set the S14001A clock as per the schematics. | |
| 547 | [Zsolt Vasvari] | |
| 548 | ||
| 549 | Removed the use of the global Machine from a number of places in the | |
| 550 | code. [Zsolt Vasvari] | |
| 551 | ||
| 552 | Fixed issues flagged by MSVC warning C4305 (type truncation). Almost | |
| 553 | all of these are harmless double->float narrowing in initializers, but | |
| 554 | one warning spotlighted a bug in segasyse.c, where code to use a | |
| 555 | higher sprite number had no effect due to the insufficient range of | |
| 556 | UINT8. [Atari Ace] | |
| 557 | ||
| 558 | Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a | |
| 559 | function which is missing an argument list). Fixed some VS7-specific | |
| 560 | issues (OPTIMIZE=0 at least compiles now). [Atari Ace] | |
| 561 | ||
| 562 | Added a missing case statement in sm8500d.c, noticed while reviewing | |
| 563 | dead code warnings. [Atari Ace] | |
| 564 | ||
| 565 | Corrected Diet gogo h6280 clock so that it behaves correctly with | |
| 566 | Charles Macdonald fix to the cpu core. Verified and corrected | |
| 567 | frequencies and pin 7 okim6295 on the following games: | |
| 568 | The new zealand story (3 z80 version), Trio The punch, Vandyke, | |
| 569 | paradise.c games, Downtown, Shaolin's Road and Twins. | |
| 570 | [Corrado Tomaselli] | |
| 571 | ||
| 572 | Removed all peplus memory hacks and game specific DRIVER_INIT. There | |
| 573 | are now just two DRIVER_INIT, one for normal boards and one for | |
| 574 | superboards. Temporarily disabled AutoHold Cheat but documented | |
| 575 | addresses for future update. [Jim Stolis] | |
| 576 | ||
| 577 | Added further unencrypted opcodes to risky challenge. The game now | |
| 578 | boots with the intro animation. [robiza] | |
| 579 | ||
| 580 | ||
| 581 | ||
| 582 | New clones added | |
| 583 | ---------------- | |
| 584 | Jokers Wild Poker (PP0065) [Jim Stolis] | |
| 585 | Double Down Stud Poker (PP0250) [Jim Stolis] | |
| 586 | Standard Draw Poker (PP0447) [Jim Stolis] | |
| 587 | Night Stocker (set 2) [Andrew Gardner] | |
| 588 | Trivial Pursuit (Genus I) (set 2) [Andrew Gardner] | |
| 589 | ||
| 590 | ||
| 591 | ||
| 592 | 0.122u6 | |
| 593 | ------- | |
| 594 | ||
| 595 | ||
| 596 | MAMETesters Bugs Fixed | |
| 597 | ---------------------- | |
| 598 | pangpoms098u3ora [Brian Troha] | |
| 599 | cuebrckj0102u5gre [Zsolt Vasvari] | |
| 600 | astinvad0106u11gre [Aaron Giles] | |
| 601 | victory137b4gre [Zsolt Vasvari] | |
| 602 | victory37b16gre [Zsolt Vasvari] | |
| 603 | dcs057ora [Aaron Giles] | |
| 604 | pleiads0111u4gre [Robbert] | |
| 605 | armwrest35b9yel [David Haywood] | |
| 606 | gstrik20105u4gra [Brian Troha] | |
| 607 | narc060gra [Aaron Giles] | |
| 608 | mia0106u5gra [RansAckeR] | |
| 609 | nss_smw0115ora [Atari Ace] | |
| 610 | darkplnt0119u3yel [Atari Ace] | |
| 611 | mhhonban0120u3gra [RansAckeR] | |
| 612 | rollerg0111u5gra [RansAckeR] | |
| 613 | bionicc0109ora [RansAckeR] | |
| 614 | lcasino0111ora [RansAckeR] | |
| 615 | megaplay.c0122u4red [Atari Ace] | |
| 616 | nmnlnd0122u3yel [Mamesick] | |
| 617 | cocktail0119yel [Robbert] | |
| 618 | tokisens0122u3gra [RansAckeR] | |
| 619 | alleymas0119u3gre [RansAckeR] | |
| 620 | crbaloon36finalgre [Zsolt Vasvari] | |
| 621 | topsecrt0109gre2 [Bryan McPhail] | |
| 622 | quasar0122u5red [Zsolt Vasvari] | |
| 623 | stadhero0122u3gra [RansAckeR] | |
| 624 | ||
| 625 | ||
| 626 | ||
| 627 | Source Changes | |
| 628 | -------------- | |
| 629 | Swinging Singles cleanup: [Tomasz Slanina] | |
| 630 | - hooked up crt6845 | |
| 631 | - converted to tilemaps | |
| 632 | - simplified protection(?) emulation | |
| 633 | - removed tilemap, a bit more low level video hw emulation | |
| 634 | - fake colors | |
| 635 | ||
| 636 | Lowerd FPS in lasso.c to avoid corrupting Chameleon's high score | |
| 637 | table. [Zsolt Vasvari] | |
| 638 | ||
| 639 | Removed obsolete uitext.c and all references to it. [Aaron Giles] | |
| 640 | ||
| 641 | Some more modernization/clean-up in the exidy driver. [Zsolt Vasvari] | |
| 642 | ||
| 643 | Added VIDEO_ALWAYS_UPDATED for reliable collision detection in the | |
| 644 | CVS driver. [Zsolt Vasvari] | |
| 645 | ||
| 646 | Cleaned up astinvad driver: [Aaron Giles] | |
| 647 | * Proper video timing | |
| 648 | * Hooked up 8255 PPIs | |
| 649 | * Correct interrupt timing | |
| 650 | * Consolidated code into single file | |
| 651 | ||
| 652 | i8039.c/mario.c updates: [couriersud] | |
| 653 | * fixed movd instructions | |
| 654 | * add MB8884 and M58715 cpu types | |
| 655 | * moved timer hack to M58715 | |
| 656 | * added ram_mask for internal ram access | |
| 657 | * added R.A11 as 'M' to dasm flags | |
| 658 | * added EA "IO" port | |
| 659 | * mario now uses M58715 as sound cpu | |
| 660 | * hooked up EA line for M58715 | |
| 661 | * fixed portA startup value | |
| 662 | * documented hardware changes to use a I8039 on a mario board | |
| 663 | ||
| 664 | sauro.c: [couriersud] | |
| 665 | * revert promsize to 256 for trckydoc | |
| 666 | ||
| 667 | Added XTAL clocks to zaxxon.c. [Aaron Giles] | |
| 668 | ||
| 669 | Cleaned up cojag/jaguar driver: [Aaron Giles] | |
| 670 | * proper video timing, configured by the chipset | |
| 671 | * 32-bit rendering, removing 16bpp hacks | |
| 672 | * support for borders | |
| 673 | * proper object processor timing, including multiple passes per line | |
| 674 | * added R3041 as a clone of the R3000 | |
| 675 | * fixed XTALs based on documentation | |
| 676 | ||
| 677 | Consolidated exidy and victory drivers. Removed complicated dirty | |
| 678 | tracking from victory.c. Reorganized the exidy audio hardware code. | |
| 679 | Changed Targ to use a loaded PROM instead of a hard-coded one. Renamed | |
| 680 | Side Trak to Side Track as per the title screen. [Zsolt Vasvari] | |
| 681 | ||
| 682 | 6821 PIA changes: [Zsolt Vasvari] | |
| 683 | - Added orthogonal accessors | |
| 684 | - Removed hacky update_shared_irq_handler(), now the same | |
| 685 | IRQ callback maybe called multiple times, but this shouldn't | |
| 686 | be a problem | |
| 687 | - IRQ lines are cleared on a reset | |
| 688 | ||
| 689 | Disabled code in the TMS5220 that set the Buffer Empty flag after a | |
| 690 | stop frame. This fixes Victory. This might be the incorrect fix but | |
| 691 | the old code wasn't working either. [Zsolt Vasvari] | |
| 692 | ||
| 693 | Hooked up revx dcs reset line. Signaled IRQ on correct CPU when DCS | |
| 694 | sends data back (duh). [Aaron Giles] | |
| 695 | ||
| 696 | Removed unnecessary check that could cause SCSP hangs in grdforce. | |
| 697 | [kingshriek] | |
| 698 | ||
| 699 | Tweaked deco156 clock speed to be 28 to prevent the games from running | |
| 700 | in slow motion. I suspect the 156 chip has an internal multiplier, the | |
| 701 | usual input pin is 7Mhz IIRC. [David Haywood] | |
| 702 | ||
| 703 | dkong.c changes: [couriersud] | |
| 704 | * added equivalence circuit for Sanyo EZV audio amplifier | |
| 705 | * Set DK_C159 = 0 to avoid over-aggressive high-pass filter. Solely | |
| 706 | based on observations. | |
| 707 | * added comment on above to source | |
| 708 | * Added define DK_NO_FILTERS to turn of DAC filters and post-mixer | |
| 709 | filters for debugging | |
| 710 | ||
| 711 | Adds dips for Water Balls. Adds dip port locations to all dips. | |
| 712 | [Brian Troha] | |
| 713 | ||
| 714 | Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers. | |
| 715 | Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1. | |
| 716 | Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER | |
| 717 | and CPUINFO_INT_CLOCK_DIVIDER. Updated a number of drivers to use | |
| 718 | cpunum_get_clock() instead of Machine->drv->cpu[x].clock. Raw input | |
| 719 | clock speeds should now be specified for all CPUs in the | |
| 720 | MACHINE_DRIVER. [Aaron Giles] | |
| 721 | ||
| 722 | Changed TLC43076 and games using it to RGB32. Removed global Machine | |
| 723 | variable where possible. [Zsolt Vasvari] | |
| 724 | ||
| 725 | Removed dirtybuffer from video/generic.c and all drivers still using | |
| 726 | it. Good riddance... Removed videoram_w, colorram_w and spriteram_w | |
| 727 | and changed all drivers using it to access RAM directly. Removed | |
| 728 | videoram_r, colorram_r, spriteram_r, spriteram16_r and spriteram16_w | |
| 729 | from video/generic.c and changed all games to use (possibly shared) | |
| 730 | RAM. [Zsolt Vasvari] | |
| 731 | ||
| 732 | Cleaned up memory maps in the seibu sound interfaces. Changed to use | |
| 733 | shared sound configs instead of statically copying them in each | |
| 734 | driver. [Aaron Giles] | |
| 735 | ||
| 736 | Verified and changed cpu frequencies and oki m6295 pin 7 on the | |
| 737 | following pcbs: Asuka&Asuka, Cadash, Equites h/w games and sound | |
| 738 | board, F1GP, Super Formula, Gladiator, Ping Pong king, Great | |
| 739 | Swordsman, Irem m52 sound board, Tropical Angel, Explosive Breakers, | |
| 740 | Magical Crystal, Mad Gear, Roller Aces, Chinese Hero, Simpsons, | |
| 741 | Golfing Greats, Time Pilot 84. [Corrado Tomaselli] | |
| 742 | ||
| 743 | Added some more static qualifiers on recent new/changed code. | |
| 744 | [Atari Ace] | |
| 745 | ||
| 746 | Fixed dbreed72 crash introduced in 0.122u5. [Mamesick] | |
| 747 | ||
| 748 | Fixed HuC6280 low-speed mode so it uses 4 cycles instead of 3. | |
| 749 | [Charles MacDonald] | |
| 750 | ||
| 751 | Hand fixed Road Runner's corrupted ROM. We are 99.99% sure that the | |
| 752 | bad bytes are the same as the Desert Gun ones. [Zsolt Vasvari] | |
| 753 | ||
| 754 | Cleaned up leland clocks a little. Made the i186 divide-by-2 clock | |
| 755 | internal. [Aaron Giles] | |
| 756 | ||
| 757 | Added clocks to the MCR sound boards and some of the MCR games. Added | |
| 758 | TMS5220 variants TMS5200 and TMC0285 as proper chips. Changed MCR | |
| 759 | squawk & talk to use the TMS5200 as documented. [Aaron Giles] | |
| 760 | ||
| 761 | Cleaned up Crazy Baloon driver: proper memory maps, crystals, etc. | |
| 762 | Implemented the missing features of the collision detector custom IC. | |
| 763 | [Zsolt Vasvari] | |
| 764 | ||
| 765 | First pass at fixing the cpu clock speeds on the playstation based | |
| 766 | hardware. The system 10 & 12 clock speeds have been raised as they | |
| 767 | run on an upgraded chipset. The internal divide in the CPU core has | |
| 768 | been set to 4 as we have no wait states, incorrect dma timing, | |
| 769 | no gpu timing, no dma bus stealing and no gte timing. [smf] | |
| 770 | ||
| 771 | Fixed RET instruction on the i960 core. [Ernesto Corvi, ElSemi] | |
| 772 | ||
| 773 | Removed speedups in the gstream and limenko drivers which were | |
| 774 | breaking the games. [David Haywood] | |
| 775 | ||
| 776 | Fixed regression on i8039 T1 counter mode. [couriersud] | |
| 777 | ||
| 778 | Added CUSTOM_INPUT macro for defining input port callbacks. Pushed | |
| 779 | its usage throughout the code. [Aaron Giles] | |
| 780 | ||
| 781 | phoenix and clones: [couriersud] | |
| 782 | * video timing from schematics | |
| 783 | * palette from schematics (resnet.h) | |
| 784 | * no more colortable | |
| 785 | * added save state | |
| 786 | ||
| 787 | Minor RSP fixes: [SGINut] | |
| 788 | - Fixed accumulator state on powerup by testing against real hardware | |
| 789 | - Fixed single-step behavior by testing against real hardware | |
| 790 | ||
| 791 | Added save state support to atetris.c. [Svante Gerhard] | |
| 792 | ||
| 793 | Fixed up atetris memory maps and clocks according to schematics. | |
| 794 | [Aaron Giles] | |
| 795 | ||
| 796 | Added targ and spectar to TinyMAME. [neoforma] | |
| 797 | ||
| 798 | ||
| 799 | ||
| 800 | New games added or promoted from NOT_WORKING status | |
| 801 | --------------------------------------------------- | |
| 802 | Ripper Ribbit [Aaron Giles] | |
| 803 | Chicken Farm [Aaron Giles] | |
| 804 | Crazzy Clownz [Aaron Giles] | |
| 805 | Space Fighter Mark II [Zsolt Vasvari, Guru] | |
| 806 | ||
| 807 | ||
| 808 | ||
| 809 | New clones added | |
| 810 | ---------------- | |
| 811 | Heated Barrel (US set 2) [Corrado Tomaselli] | |
| 812 | Player's Edge Plus (XMP00006) Multi-Poker [Jim Stolis] | |
| 813 | ||
| 814 | ||
| 815 | ||
| 816 | New games marked as GAME_NOT_WORKING | |
| 817 | ------------------------------------ | |
| 818 | International Toote (Germany) [Luca Elia] | |
| 819 | Dodge City [Roberto Fresca] | |
| 820 | ||
| 821 | ||
| 822 | ||
| 823 | 0.122u5 | |
| 824 | ------- | |
| 825 | ||
| 826 | ||
| 827 | MAMETesters Bugs Fixed | |
| 828 | ---------------------- | |
| 829 | scorpion0111u5gra [couriersud] | |
| 830 | qbert37b14gre1 [Zsolt Vasvari] | |
| 831 | blktiger060gre [robiza] | |
| 832 | kinstc081u7gre [Aaron Giles] | |
| 833 | kinst2083gre [Aaron Giles] | |
| 834 | umk3059gre [Aaron Giles] | |
| 835 | umk3137b5gre [Aaron Giles] | |
| 836 | lasso056gre_1 [Zsolt Vasvari] | |
| 837 | lasso056gre_2 [Zsolt Vasvari] | |
| 838 | term20103u4gre [Aaron Giles] | |
| 839 | term20104u2gre [Aaron Giles] | |
| 840 | m72_0115u3yel [Mamesick, Aaron Giles] | |
| 841 | deadang0119u2red [David Haywood] | |
| 842 | tmnt095gre [Zsolt Vasvari] | |
| 843 | memleak0122u2ora [Atari Ace] | |
| 844 | junglek055gre [Zsolt Vasvari] | |
| 845 | ||
| 846 | ||
| 847 | ||
| 848 | Source Changes | |
| 849 | -------------- | |
| 850 | Fixed flipped tilemap offset for scramble and clones (playable | |
| 851 | cocktail mode). [couriersud] | |
| 852 | ||
| 853 | Changed Exidy driver to draws the background directly from memory | |
| 854 | avoiding having to decode the gfx repeadately. [Zsolt Vasvari] | |
| 855 | ||
| 856 | Added machine and cpunum parameters to INTERRUPT_GEN callbacks. Fixed | |
| 857 | several places that were not using INTERRUPT_GEN or OPBASE_HANDLER | |
| 858 | macros. [Atari Ace] | |
| 859 | ||
| 860 | Minor bugfixes to the gfxlayout cleanups included in u4. [Atari Ace] | |
| 861 | ||
| 862 | Added code to debug 64-bit builds to allocate all address space below | |
| 863 | 4GB to help find 64-bit errors. Added environment variable | |
| 864 | OSDDEBUGMALLOC which, if set, explicitly overrides the debug malloc | |
| 865 | debug settings. Added environment variable OSDDEBUG4GB which, if set, | |
| 866 | explicitly overrides the new 64-bit address space allocations. (Sadly | |
| 867 | this is necessary due to some D3D drivers being 64-bit unclean....) | |
| 868 | [Aaron Giles] | |
| 869 | ||
| 870 | Fixed winwork to use proper tchar functions for getenv. [Aaron Giles] | |
| 871 | ||
| 872 | Fixed bug where the 64-bit DRC was not saving rbp. [Aaron Giles] | |
| 873 | ||
| 874 | Cleaned up the lasso driver. [Zsolt Vasvari] | |
| 875 | ||
| 876 | Simplified Y-unit DMA rendering, fixing bugs and removing the macro | |
| 877 | voodoo. [Aaron Giles] | |
| 878 | ||
| 879 | Removed a bunch of dead code from othunder.c. [Zsolt Vasvari] | |
| 880 | ||
| 881 | Implemented proper video timing and scanline interrupts in the m72 | |
| 882 | driver. [Mamesick, Aaron Giles] | |
| 883 | ||
| 884 | mario.c improvements: [couriersud] | |
| 885 | * discrete sound | |
| 886 | * hooked up z80dma | |
| 887 | * combined memory maps | |
| 888 | * statics in mario_state struct | |
| 889 | * fixed save state issues | |
| 890 | * combine sh_* writes into one routine | |
| 891 | ||
| 892 | audio/dkong.c: [couriersud] | |
| 893 | * fixed LS123 constant to match TI datasheet diode circuit constant | |
| 894 | ||
| 895 | TX-1 improvements [Philip Bennett, Guru]: | |
| 896 | * Fixed remaining arithmetic unit issues | |
| 897 | * Added correct object colour pixel LUT PROM to tx1a | |
| 898 | * Fixed x-flipping | |
| 899 | * Added engine sounds | |
| 900 | ||
| 901 | Added correct DIP switch settings for Big Fight. Also corrected Cycle | |
| 902 | Warriors DIP switches. [Philip Bennett] | |
| 903 | ||
| 904 | Changed and verified frequencies on Ikari Warriors h/w, Tnk3, Hyper | |
| 905 | Sports, Jackal and S.A.R. [Corrado Tomaselli] | |
| 906 | ||
| 907 | Verified and corrected a lot of frequencies and oki6295 pin 7 on pcbs: | |
| 908 | Double Dribble, Chequered Flag, Diet gogo, Boulderdash, Sly Spy, | |
| 909 | Psycho Nics Oscar, Captain Silver, Magical Cat Adventure, Raiden, | |
| 910 | Superman, Twin Hawk, Vimana, Ghox, Dogyunn, truxton2, Pipi and Bibis, | |
| 911 | Fix Eight and Money Money. [Corrado Tomaselli] | |
| 912 | ||
| 913 | Cleaned up brkthru/darwin memory maps. Changed both games to use | |
| 914 | identical video timing parameters based on measurements of darwin. | |
| 915 | Guessed based on available information at the master clock and | |
| 916 | derived all game clocks from it. [Aaron Giles] | |
| 917 | ||
| 918 | Reogranized and started to clean up the CVS driver. Added emulation | |
| 919 | of the speech CPU. Removed CVS BIOS entry. Removed unnecessary | |
| 920 | patching. [Zsolt Vasvari] | |
| 921 | ||
| 922 | sauro.c: [couriersud] | |
| 923 | * Hooked up sp0256 sound | |
| 924 | * analyzed and commented some ports | |
| 925 | * added palette_bank support without real success | |
| 926 | ||
| 927 | Reorganized the Raiden 2 driver.. a bit of extra documentation of the | |
| 928 | 'V33' based set, which has been renamed. Nothing new working. | |
| 929 | [David Haywood] | |
| 930 | ||
| 931 | Fixed scan functions for kickgoal background, which were swapped. | |
| 932 | [David Haywood] | |
| 933 | ||
| 934 | Fixed 2650 disassembly of the sense and flag bits. Fixed incorrect | |
| 935 | argument order in OUT instruction. Corrected spacing. [Zsolt Vasvari] | |
| 936 | ||
| 937 | Fixed hang/crash on empty config file. [Wilbert Pol] | |
| 938 | ||
| 939 | Cleaned up tceptor memory maps. [Zsolt Vasvari] | |
| 940 | ||
| 941 | Atari System 2 driver cleanup: [Aaron Giles] | |
| 942 | * Proper video timing. | |
| 943 | * Full memory maps. | |
| 944 | * Save state support. | |
| 945 | * Removed 720 sound CPU hack in favor of prepopulated EEPROM like | |
| 946 | the other games. | |
| 947 | ||
| 948 | Added support for outputting 64-bit target addresses in the i386dasm. | |
| 949 | [Aaron Giles] | |
| 950 | ||
| 951 | Added MESS PC-Engine emulatation system. Fixed MAME debug build under | |
| 952 | VC2003. [Mariusz Wojcieszek] | |
| 953 | ||
| 954 | Unified memory maps in tmnt.c and twin16.c. Reversed ROM set names | |
| 955 | of Cuebrick World and Japan versions. Changed some function names to | |
| 956 | reflect parent set. [Zsolt Vasvari] | |
| 957 | ||
| 958 | Changed Konami drivers to allocate and decode graphics using the same | |
| 959 | layouts. Removed the layout parameter from the decodechar() calls. | |
| 960 | [Atari Ace] | |
| 961 | ||
| 962 | Fixed C++ compilation errors. [Dave Dribin] | |
| 963 | ||
| 964 | Made INPs compatible between 64-bit MAME and 32-bit MAME. [Chad] | |
| 965 | ||
| 966 | Complete taitosj memory map from Nicola's ancient notes. General code | |
| 967 | clean-up. [Zsolt Vasvari] | |
| 968 | ||
| 969 | src2html improvments: [Aaron Giles] | |
| 970 | - added line numbers | |
| 971 | - added link to the raw file if the src and dst dirs are the same | |
| 972 | ||
| 973 | "Fix" for full screen switch, which makes no sense, but is included | |
| 974 | based on empirical evidence that is somehow works. [Emuman] | |
| 975 | ||
| 976 | ||
| 977 | ||
| 978 | New games added or promoted from NOT_WORKING status | |
| 979 | --------------------------------------------------- | |
| 980 | Name Club Ver.3 (J 970723 V1.000) [David Haywood, Mariusz Wojcieszek] | |
| 981 | Blazing Lazers [Mariusz Wojcieszek, Charles MacDonald, Mr. Do] | |
| 982 | ||
| 983 | ||
| 984 | ||
| 985 | New clones added | |
| 986 | ---------------- | |
| 987 | Lead Angle (Japan) [Guru] | |
| 988 | A Question of Sport (39-960-107) [Highwayman] | |
| 989 | Gee Bee (F.lli Bertolino license) [Corrado Tomaselli] | |
| 990 | ||
| 991 | ||
| 992 | ||
| 993 | New games marked as GAME_NOT_WORKING | |
| 994 | ------------------------------------ | |
| 995 | Road Runner (Midway) [Zsolt Vasvari, Guru] | |
| 996 | Paranoia [Mariusz Wojcieszek] | |
| 997 | ||
| 998 | ||
| 999 | ||
| 1000 | 0.122u4 | |
| 1001 | ------- | |
| 1002 | ||
| 1003 | ||
| 1004 | MAMETesters Bugs Fixed | |
| 1005 | ---------------------- | |
| 1006 | gui0121u1gre [Aaron Giles] | |
| 1007 | drivedge0121u4gre [Aaron Giles] | |
| 1008 | bking3076u2red [Pierpaolo Prazzoli] | |
| 1009 | btoads0102u5gre [Aaron Giles] | |
| 1010 | btoads0103u1gre [Aaron Giles] | |
| 1011 | editableui0120u4red [Aaron Giles] | |
| 1012 | cheat0118red [Aaron Giles] | |
| 1013 | altf4_0111u4gre [Aaron Giles] | |
| 1014 | beastrzb097u2red [Oliver Stoneberg] | |
| 1015 | memoryleak0118u1ora [Oliver Stoneberg] | |
| 1016 | memory_leak0111u6ora [Oliver Stoneberg] | |
| 1017 | mahoudai0106u7yel [Philip Bennett] | |
| 1018 | gridiron079gre [David Haywood] | |
| 1019 | maniach37b11gre [David Haywood] | |
| 1020 | matmaniac37b14gre [David Haywood] | |
| 1021 | qzkklgy2_0106u6red [David Haywood] | |
| 1022 | warriorb0109u2gre [David Haywood] | |
| 1023 | vball071u1gre [Bryan McPhail] | |
| 1024 | d3dwindow0117u3red [Aaron Giles, Emuman] | |
| 1025 | arkanoid061gre [Bryan McPhail] | |
| 1026 | flkatck058gre [David Haywood] | |
| 1027 | memleak0119u3ora [Oliver Stoneberg] | |
| 1028 | system24_0120u3red [Atari Ace, Aaron Giles] | |
| 1029 | aleck64_0120red [Aaron Giles] | |
| 1030 | mtetrisc0115u1red [Aaron Giles] | |
| 1031 | suratk0122u3gra [Pierpaolo Prazzoli] | |
| 1032 | suratk0122u3ora [Pierpaolo Prazzoli] | |
| 1033 | skychut37b1yel [couriersud] | |
| 1034 | skychut37b6gre [couriersud] | |
| 1035 | darius2_0114gre [Bryan McPhail] | |
| 1036 | ad2083_0111u5gra [couriersud] | |
| 1037 | abaseb0122u3red [Zsolt Vasvari] | |
| 1038 | ladybug080u1gre [Zsolt Vasvari] | |
| 1039 | suprridr0122u2gra [Zsolt Vasvari] | |
| 1040 | invho2_0122u3red [Zsolt Vasvari] | |
| 1041 | narc37b16yel [Aaron Giles] | |
| 1042 | kingofb37b6gre [robiza] | |
| 1043 | stonebal0117u2gre [Aaron Giles] | |
| 1044 | wotw36b1gre [Zsolt Vasvari] | |
| 1045 | wallst071gre [Zsolt Vasvari] | |
| 1046 | mtrap37b14gre [Zsolt Vasvari] | |
| 1047 | pitfight0109u2gre [Aaron Giles] | |
| 1048 | ||
| 1049 | ||
| 1050 | ||
| 1051 | Source Changes | |
| 1052 | -------------- | |
| 1053 | Corrected btoads clocks according XTALs on the PCB. [Aaron Giles] | |
| 1054 | ||
| 1055 | "Simplified" MC8123 decryption, though it's still more complicated | |
| 1056 | than I'd like it to be. [Nicola Salmoria] | |
| 1057 | ||
| 1058 | Cleaned up clocks in the itech32 driver. [Aaron Giles] | |
| 1059 | ||
| 1060 | Added partial key for FD1089B 317-0037. [Nicola Salmoria] | |
| 1061 | ||
| 1062 | Fixed bking3 clocks as per Guru readme. Added GAME_WRONG_COLORS flag | |
| 1063 | to bking3. [Pierpaolo Prazzoli] | |
| 1064 | ||
| 1065 | TMS34020 fixes: [Aaron Giles] | |
| 1066 | * Allowed 32-bit pixel sizes | |
| 1067 | * Fixed RPIX instruction | |
| 1068 | ||
| 1069 | Added new function input_poll_keyboard_switches to poll for only key | |
| 1070 | events. Expanded the size of the maximum simultaneously pressed | |
| 1071 | switches. [Aaron Giles] | |
| 1072 | ||
| 1073 | Removed GAME_IMPERFECT_GRAPHICS from all jpmimpct games bar Cluedo | |
| 1074 | (see driver note). [Philip Bennett] | |
| 1075 | ||
| 1076 | mario driver improvements: [couriersud] | |
| 1077 | - Hooked up flipscreen | |
| 1078 | - Changed monitor orientation to ROT0 | |
| 1079 | ||
| 1080 | Added Z80 DMA chip [couriersud] | |
| 1081 | - only implements intelligence to emulate dkong3 | |
| 1082 | - fixed a misleading comment in 8257dma.h | |
| 1083 | ||
| 1084 | dkong driver improvements: [couriersud] | |
| 1085 | - hooked up z80dma | |
| 1086 | - removed 2nd player inputs from sdbk input_ports | |
| 1087 | - fixed some dump "copy/paste" bugs in dip locations | |
| 1088 | ||
| 1089 | Added redumped Turkey USA to the seta2.c driver. [Brian Troha] | |
| 1090 | ||
| 1091 | Fixed bad ram pages errors in stactics service mode. | |
| 1092 | [Pierpaolo Prazzoli] | |
| 1093 | ||
| 1094 | Atari updates: [Aaron Giles] | |
| 1095 | - Added save state support to slapstic. | |
| 1096 | - Added save state support to YM2413. | |
| 1097 | - Modified slapstic code to support address range mirrors. | |
| 1098 | - Cleaned up Rampart driver: | |
| 1099 | - simplified rendering code | |
| 1100 | - full memory map | |
| 1101 | - added save state support | |
| 1102 | ||
| 1103 | Implemented decent-sounding FM in the SCSP. [kingshriek] | |
| 1104 | ||
| 1105 | Updated Naomi driver, now boots and shows some test menus (press F2 | |
| 1106 | to get into test, use 9 to navigate). Also hooked up ROM board PIO | |
| 1107 | and skeleton for DMA. [R. Belmont, Samuele Zannoli, ElSemi] | |
| 1108 | ||
| 1109 | N64 improvements: [SGINut] | |
| 1110 | - Move texture masking to occur after coordinate adjustment | |
| 1111 | - Fix 32-bit texturing in load_tile (Mario Kart 64 title screen) | |
| 1112 | - Add zero-alpha early-out (Mario 64 trees/stars, Mario Kart 64 | |
| 1113 | trees/karts) | |
| 1114 | ||
| 1115 | ad2083 improvements: [couriersud] | |
| 1116 | * completed tms5110A code | |
| 1117 | * working speech synthesis | |
| 1118 | * documented analysis done on pcb pictures and findings | |
| 1119 | * as a consequence, marked all sound roms as BAD DUMP | |
| 1120 | * created sound driver in scramble.c | |
| 1121 | ||
| 1122 | Cleaned up graphics layouts in preparation for new format. Added new | |
| 1123 | GFXLAYOUT_RAW() macro to normalize definition. Added new validation | |
| 1124 | code. Made all remaining instances of gfx_layouts const. [Atari Ace] | |
| 1125 | ||
| 1126 | Updated Amiga driver to use formal XTALs. [Dirk Best] | |
| 1127 | ||
| 1128 | Changed 6522 emulation such that when writing to the ACR register with | |
| 1129 | the timer 1 in continuous counting mode, the timer 1 value should not | |
| 1130 | be reloaded but keep on counting. [Wilbert Pol] | |
| 1131 | ||
| 1132 | Added XTAL defines to bfm_sc2.c and cleaned up lvcards.c. | |
| 1133 | [James Wallace] | |
| 1134 | ||
| 1135 | Added default layout to neogeo games allowing for either cropping or | |
| 1136 | stretching to the alternate 304x224 layout. Removed default cropping | |
| 1137 | in the driver. [David Haywood, Aaron Giles] | |
| 1138 | ||
| 1139 | Fixed crash when saving state of older DCS-based games. Added save | |
| 1140 | state support to the midvunit driver. [Aaron Giles] | |
| 1141 | ||
| 1142 | Major improvements to Cycle Warriors video code (still not perfect, | |
| 1143 | but road layer works now). [Bryan McPhail] | |
| 1144 | ||
| 1145 | Major rewrite of skychut.c. There are still some glitches and it is | |
| 1146 | not perfect but the following has been achieved: [couriersud] | |
| 1147 | * adds samples to ipm invaders - just rename your old invaders | |
| 1148 | samples to ipminvad to test | |
| 1149 | * added - amongst others - "capsule" dip switch to ipm invaders | |
| 1150 | * sound ports identified | |
| 1151 | * demo sound and cabinet type driver configuration | |
| 1152 | ||
| 1153 | Updated memory configuration for Superboard game versions in peplus | |
| 1154 | driver. Fixes CMOS DATA errors on reload. [Jim Stolis] | |
| 1155 | ||
| 1156 | Rewrote the CVS system video code. [Zsolt Vasvari] | |
| 1157 | ||
| 1158 | Fixed S2650 register window display. [Zsolt Vasvari] | |
| 1159 | ||
| 1160 | Added sound to Cycle Warriors and Big Fight. Corrected OKI M6295 | |
| 1161 | clock values. [Philip Bennett] | |
| 1162 | ||
| 1163 | Fixed missing arrow in Venture on the zoomed out map, and the | |
| 1164 | incorrect fading twister in Hard Hat. [Zsolt Vasvari] | |
| 1165 | ||
| 1166 | ||
| 1167 | ||
| 1168 | New games added or promoted from NOT_WORKING status | |
| 1169 | --------------------------------------------------- | |
| 1170 | Dangerous Curves [Philip Bennett, Dazzer] | |
| 1171 | Big Fight [Bryan McPhail] | |
| 1172 | ||
| 1173 | ||
| 1174 | ||
| 1175 | New clones added | |
| 1176 | ---------------- | |
| 1177 | Invasion - The Abductors (version 5.0) [Brian Troha] | |
| 1178 | Alien Syndrome (set 5, System 16A, FD1089B 317-0037) [Nicola Salmoria] | |
| 1179 | Dragon Spirit (Atari license) [Satoshi Suzuki] | |
| 1180 | ||
| 1181 | ||
| 1182 | ||
| 1183 | 0.122u3 | |
| 1184 | ------- | |
| 1185 | ||
| 1186 | ||
| 1187 | MAMETesters Bugs Fixed | |
| 1188 | ---------------------- | |
| 1189 | hstennis0103u2gra [Brian Troha] | |
| 1190 | edrandy0113gra [Brian Troha] | |
| 1191 | robocop2_0106u3gra [Brian Troha, Bryan McPhail] | |
| 1192 | mario0110u1gre [couriersud] | |
| 1193 | sbrkout0118yel [R. Belmont, Adam Bousley] | |
| 1194 | pestplce0122red [couriersud] | |
| 1195 | funkyjet055yel [Bryan McPhail] | |
| 1196 | liberate074u1gre [Bryan McPhail] | |
| 1197 | tokiu056gre [Bryan McPhail] | |
| 1198 | powerbls0112u4red [Pierpaolo Prazzoli] | |
| 1199 | wwestern0115u1yel [Atari Ace] | |
| 1200 | namcos1_0118u2yel [Atari Ace] | |
| 1201 | victnine0116u2red [Pierpaolo Prazzoli] | |
| 1202 | btoads0103gre [Aaron Giles] | |
| 1203 | ||
| 1204 | ||
| 1205 | ||
| 1206 | Source Changes | |
| 1207 | -------------- | |
| 1208 | Fixes clocks for Orbs. [David Haywood, Tomasz Slanina] | |
| 1209 | ||
| 1210 | Fixed various 64-bit GCC warnings. [R. Belmont] | |
| 1211 | ||
| 1212 | Improves accuracy and documentation of NSS/SNES DSP-1. | |
| 1213 | [Andreas Naive, R. Belmont] | |
| 1214 | ||
| 1215 | Added new file xtal.h, documenting all known arcade PCB clock cystals. | |
| 1216 | Drivers should be updated to use these as a basis for their clocks, | |
| 1217 | and the list should be augmented as additional crystals are found. | |
| 1218 | [Guru, Aaron Giles] | |
| 1219 | ||
| 1220 | suprloco improvements: [Pierpaolo Prazzoli] | |
| 1221 | * Fixed IC.34 memory test | |
| 1222 | * Fixed 2nd player cocktail mode | |
| 1223 | * Changed coin3 to service1 | |
| 1224 | ||
| 1225 | Cleaned up inputs/DIP switches in cninja driver. [Brian Troha] | |
| 1226 | ||
| 1227 | Rewrote mario.c: [couriersud] | |
| 1228 | - rewrote driver, separate MACHINE_DRIVER(mario_audio) | |
| 1229 | - palette from schematics | |
| 1230 | - video timing from schematics | |
| 1231 | - driver configuration switch Nintendo/Std Monitor | |
| 1232 | - got rid of COLORTABLE | |
| 1233 | ||
| 1234 | Fixed typo for IO1 irq callback in hyperstone core. | |
| 1235 | [Pierpaolo Prazzoli] | |
| 1236 | ||
| 1237 | Added memory_get_bank() function. Fixed logging in memory.c to to use | |
| 1238 | %p for pointer values. [Aaron Giles] | |
| 1239 | ||
| 1240 | Fixed save states in i8051 cpu core [Pierpaolo Prazzoli] | |
| 1241 | ||
| 1242 | Implemented a few SysCtrl, Maple, and PVR/HOLLY bits for Naomi. The | |
| 1243 | BIOS gets slightly further but is nowhere near starting up. | |
| 1244 | [R. Belmont] | |
| 1245 | ||
| 1246 | Zeus updates: [Aaron Giles] | |
| 1247 | * Better documented various bit latches. | |
| 1248 | * Hooked up crusnexo lamp board (added layout). | |
| 1249 | * Fixed year in MK4 startup test. | |
| 1250 | ||
| 1251 | Fixed TMS5110 tables. [couriersud, Lord Nightmare] | |
| 1252 | ||
| 1253 | Removed ui_popup(). Drivers should always be using popmessage() | |
| 1254 | instead (has been this way for a while). Augmented popmessage() so | |
| 1255 | that you can pass NULL to immediately dismiss any messages. | |
| 1256 | [Aaron Giles, thanks to Oliver Stoneberg's suggestion] | |
| 1257 | ||
| 1258 | Added ATTR_PRINTF to a number of functions that have printf semantics. | |
| 1259 | [Oliver Stoneberg] | |
| 1260 | ||
| 1261 | Rewrote sbrkout driver based on schematics: [Aaron Giles] | |
| 1262 | * XTAL-based timing | |
| 1263 | * Correct video timing | |
| 1264 | * Full memory map | |
| 1265 | * Correct memory usage ("zero page" RAM is shared with videoram) | |
| 1266 | * Removed all input hacks | |
| 1267 | * Fixed interrupt generation | |
| 1268 | * Connected coin counters | |
| 1269 | * Added save state support | |
| 1270 | ||
| 1271 | Fixed several UNICODE=1 issues in the debugger. Changed the Windows | |
| 1272 | build process to always enable UNICODE=1 for 64-bit builds. | |
| 1273 | [Oliver Stoneberg, Aaron Giles] | |
| 1274 | ||
| 1275 | Added save state support to btoads. [Aaron Giles] | |
| 1276 | ||
| 1277 | Fixed onna34ro mcu simulation properly. [Pierpaolo Prazzoli] | |
| 1278 | ||
| 1279 | ||
| 1280 | ||
| 1281 | New clones added | |
| 1282 | ---------------- | |
| 1283 | Mutant Fighter (World, EM-3) [Stefan Lindberg] | |
| 1284 | The Simpsons (2 Players Asia) [Arzeno Fabrice] | |
| 1285 | ||
| 1286 | ||
| 1287 | ||
| 1288 | 0.122u2 | |
| 1289 | ------- | |
| 1290 | ||
| 1291 | ||
| 1292 | MAMETesters Bugs Fixed | |
| 1293 | ---------------------- | |
| 1294 | pestplce0122red [couriersud] | |
| 1295 | hunchbkd0122red [couriersud] | |
| 1296 | radarscp0122yel [couriersud] | |
| 1297 | mwalk0122red [couriersud] | |
| 1298 | qtheater0122u1ora [Philip Bennett] | |
| 1299 | ||
| 1300 | ||
| 1301 | ||
| 1302 | Source Changes | |
| 1303 | -------------- | |
| 1304 | Fixed M65C02 optimization. [Peter Trauner] | |
| 1305 | ||
| 1306 | TMS51xx and M58817 speech updates: [couriersud] | |
| 1307 | - radarsc1 uses tms5110 speech synth | |
| 1308 | - cvs games: according to PCBInfos speech chip is TMS5100. | |
| 1309 | Changed driver to use TMS5100 and "game system operational" now | |
| 1310 | sounds more natural | |
| 1311 | - removed sound/m58817.* | |
| 1312 | - added support for multiple coefficients maps to tms5110.* | |
| 1313 | - added coefficient maps for TMS5100 and M58817 from documented | |
| 1314 | sources to tms5110r.c | |
| 1315 | - fixed interpolation factors (see tms5110r.c for reason) | |
| 1316 | - made lattice calculation precision 9bit | |
| 1317 | - added support for READBIT and LOADADDRESS commands to tms5110.c | |
| 1318 | - more changes in line with various patents | |
| 1319 | - documented TRS-02, TKG-02/03 "voice" interface | |
| 1320 | ||
| 1321 | Completed the addition of static qualifiers to all MAME symbols that | |
| 1322 | aren't explicitly exported. [Atari Ace] | |
| 1323 | ||
| 1324 | Named the input_seq_type enumeration and used it explicitly in several | |
| 1325 | places. [Nathan Woods] | |
| 1326 | ||
| 1327 | Corrected tx1 and tx1a coinage DSW assignments. Reversed buggyboy/ | |
| 1328 | buggybjr 'Game Time' settings. [Philip Bennett] | |
| 1329 | ||
| 1330 | TMS3203x core updates: [Aaron Giles] | |
| 1331 | * fixed interrupt handling | |
| 1332 | * added support for edge-triggered interrupts on '32 | |
| 1333 | * expanded interrupt support for the '32 | |
| 1334 | * updated drivers using TMS3203x core to deassert interrupts | |
| 1335 | * added externally accessible functions for converting '3x floating point | |
| 1336 | format | |
| 1337 | * updated gaelco3d driver to use new functions | |
| 1338 | ||
| 1339 | Zeus2 (+related) updates: [Aaron Giles] | |
| 1340 | * fixed save states for DCS games | |
| 1341 | * cleaned up Zeus2 waveram handling | |
| 1342 | * added Zeus2 save state support | |
| 1343 | * added preliminary model and quad rendering support for Zeus2 | |
| 1344 | * added support to timekpr for the ZPRAM used on Zeus2 | |
| 1345 | * hooked up ZPRAM in Zeus2 games | |
| 1346 | * hooked up controls in Zeus2 games | |
| 1347 | * updated poly.c to ensure it is idle before saving state | |
| 1348 | * Added artifical Z offset of -2 to make the full screen show in crusnexo | |
| 1349 | ||
| 1350 | Replaced tekken2/tekken2a/tekken2b 'tes1wave.8k' ROM with the | |
| 1351 | correct, non-byte-swapped dump. [Philip Bennett] | |
| 1352 | ||
| 1353 | Added discrete 74LS624(56789) implementation [couriersud] | |
| 1354 | - DISCRETE_74LS624 is a VCO needed for dkongjr | |
| 1355 | - Supports Logic, Energy and Count outputs | |
| 1356 | ||
| 1357 | dkong updates: [couriersud] | |
| 1358 | - Added dkongjr discrete sound | |
| 1359 | - Proper interface Z80 - I8035 for dkongjr | |
| 1360 | - Changed discrete sound output factors | |
| 1361 | - removed samples support for dkongjr | |
| 1362 | - Cosmetic changes | |
| 1363 | - Fixed regression in radarscp sound | |
| 1364 | - Added dipswitch locations to dkong3b | |
| 1365 | ||
| 1366 | Documentation and clock frequency improvements for seta.c: [Brian Troha] | |
| 1367 | - Added the Guru's readme info for Thundercade | |
| 1368 | - Corrected rom name for Thundercade | |
| 1369 | - changed clocks to OSC by divider IE: 16000000/2 /* 8MHz */ | |
| 1370 | - Changed Orbs clock to 16MHz with note about 14.xx MHz | |
| 1371 | - Changed Meta Fox's x0-006 (65c02) to same as Thundercade | |
| 1372 | - Changed the YM3438 in Ultra Toukond Densetsu from 6MHz to 1600000/4 | |
| 1373 | /* 4MHz */ as there is no mention of 6MHz OSC on PCB | |
| 1374 | ||
| 1375 | Verified a number of clock frequencies from real PCBs. | |
| 1376 | [Corrado Tomaselli, Zsolt Vasvari] | |
| 1377 | ||
| 1378 | Fixed several memory leaks related to SCSI CD emulation. | |
| 1379 | [Oliver Stoneberg] | |
| 1380 | ||
| 1381 | Removed the increasing of the R register from each IX/IY related | |
| 1382 | (FD xx or DD xx) instruction on the Z80. According to documentation | |
| 1383 | and the behavior of the Amstrad CPC driver, this is incorrect. | |
| 1384 | [Barry Rodewald] | |
| 1385 | ||
| 1386 | Added initial FPU support to the SH4 core. [Samuele Zannoli] | |
| 1387 | ||
| 1388 | Adjusted most conditional logging in MAME to use the idiom | |
| 1389 | "do { if (VERBOSE) logerror x; } while (0)". This has the benefit that | |
| 1390 | the compiler checks the syntax of the logging even in the case it will | |
| 1391 | be eliminated, and in fact a number of cases here needed adjustments | |
| 1392 | to compile because of this. [Atari Ace] | |
| 1393 | ||
| 1394 | ||
| 1395 | ||
| 1396 | 0.122u1 | |
| 1397 | ------- | |
| 1398 | ||
| 1399 | ||
| 1400 | MAMETesters Bugs Fixed | |
| 1401 | ---------------------- | |
| 1402 | ym2610_0119u2gre [Philip Bennett] | |
| 1403 | ||
| 1404 | ||
| 1405 | ||
| 1406 | Source Changes | |
| 1407 | -------------- | |
| 1408 | Zeus updates: [Aaron Giles] | |
| 1409 | * Figured out data format of 2 matrix form. | |
| 1410 | * Extracted data for lights. | |
| 1411 | * Added backface culling which mostly works but fails sometimes, so | |
| 1412 | it is disabled. | |
| 1413 | * Started on some initial lighting calculations. | |
| 1414 | * Cleaned up zeus wave RAM accessors. | |
| 1415 | * Changed rendering code to allow for greater parallelism on multicore | |
| 1416 | systems. | |
| 1417 | * Removed some vestigial zeus 2 hacks. | |
| 1418 | * Reduced visible area to remove artifacts. | |
| 1419 | * Made right/bottom vertices inclusive to fix some gapping issues. | |
| 1420 | * Fixed invasn lightgun offset. | |
| 1421 | ||
| 1422 | Zeus 2 hardware: | |
| 1423 | * Fixed ROM loading, added banking support. | |
| 1424 | * Separated zeus 2 video implementation from zeus implementation. | |
| 1425 | * Implemented direct pixel accesses; enough to get startup screens | |
| 1426 | to show. | |
| 1427 | * Hooked up ZPRAM. | |
| 1428 | * Fixed digital inputs for crusnexo. | |
| 1429 | * Fixed default screen parameters to match the games. | |
| 1430 | ||
| 1431 | Afega/nmk16 cleanups: [David Haywood, Tomasz Slanina] | |
| 1432 | * Merged afega.c and nmk16.c drivers | |
| 1433 | * Removed many hacks from both. | |
| 1434 | * Fixed a number of games | |
| 1435 | ||
| 1436 | Fixed C219 sample read order and implemented sign+magnitude format. | |
| 1437 | Removed GAME_IMPERFECT_SOUND flag from all Namco NA-1 games. | |
| 1438 | [Philip Bennett] | |
| 1439 | ||
| 1440 | Fixed ROM-based DCS2 system to ignore HLE transfers. (Fixes broken | |
| 1441 | sound in invasn.) Properly reduced internal memory on the ADSP-2104 | |
| 1442 | variants. [Aaron Giles] | |
| 1443 | ||
| 1444 | Fixed bug that would cause events to leak through to the game when the | |
| 1445 | debugger was up. [Aaron Giles] | |
| 1446 | ||
| 1447 | Verified some cpu clocks of original boards using a frequency counter: | |
| 1448 | [Corrado Tomaselli] | |
| 1449 | * Changed Success Joe Ym2203 clock from 3mhz to 4mhz | |
| 1450 | * Changed Pang M6295 clock from 990khz to 1Mhz | |
| 1451 | * Changed Halley Comet main cpu clock to 1.664mhz (it's not a | |
| 1452 | mistake, the clock is very low) | |
| 1453 | * Besides confirming clocks on some games, I modified: | |
| 1454 | * Aerofighters and Turbo Force sound z80 to 5mhz | |
| 1455 | * Midnight Resitance 68k cpu to 10mhz (20mhz crystal) and modified | |
| 1456 | m6295 clock to 1mhz. Also confirmed pin 7 is high. | |
| 1457 | (Midnight resistance has a lot of slow downs on the pcb too) | |
| 1458 | ||
| 1459 | Minor "code quality" improvements: [Atari Ace] | |
| 1460 | * fixed some remaining static/const qualifier missed cases | |
| 1461 | * fixed some missing #include "foo.h" | |
| 1462 | * a few global names were modified to make them less generic/more | |
| 1463 | consistent (voodoo.c, vrender0.c, lethal.c, rungun.c, zac2650.c) | |
| 1464 | * some dead/useless code was removed (i8051.c,model1.c,romcmp.c) | |
| 1465 | ||
| 1466 | ||
| 1467 | ||
| 1468 | New games added or promoted from NOT_WORKING status | |
| 1469 | --------------------------------------------------- | |
| 1470 | Invasion [Aaron Giles] | |
| 1471 | Buggy Boy Junior/Speed Buggy (Upright) [Philip Bennett] | |
| 1472 | Task Force Harrier [David Haywood, Tomasz Slanina] | |
| 1473 | US AAF Mustang [David Haywood, Tomasz Slanina] | |
| 1474 | Black Heart [David Haywood, Tomasz Slanina] | |
| 1475 | Red Hawk [David Haywood, Tomasz Slanina] | |
| 1476 | Stagger I [David Haywood, Tomasz Slanina] | |
| 1477 | Sen Jin - Guardian Storm [David Haywood, Tomasz Slanina] | |
| 1478 | Spectrum 2000 [David Haywood, Tomasz Slanina] | |
| 1479 | Fire Hawk [David Haywood, Tomasz Slanina] | |
| 1480 | ||
| 1481 | ||
| 1482 | ||
| 1483 | New clones added | |
| 1484 | ---------------- | |
| 1485 | World Class Bowling (v1.3) [Brian Troha] | |
| 1486 |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | #include <stdlib.h> |
| 51 | 51 | #include <string.h> |
| 52 | 52 | #include <ctype.h> |
| 53 | #include "osdcore.h" | |
| 54 | 53 | #include "png.h" |
| 55 | 54 | |
| 56 | 55 |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | FILE2STR = $(BUILDOUT)/file2str$(EXE) |
| 27 | 27 | PNG2BDC = $(BUILDOUT)/png2bdc$(EXE) |
| 28 | VERINFO = $(BUILDOUT)/verinfo$(EXE) | |
| 28 | 29 | |
| 29 | 30 | ifneq ($(CROSS_BUILD),1) |
| 30 | 31 | BUILD += \ |
| 31 | 32 | $(FILE2STR) \ |
| 32 | 33 | $(PNG2BDC) \ |
| 34 | $(VERINFO) \ | |
| 33 | 35 | |
| 34 | 36 | |
| 35 | 37 | |
| r1679 | r1680 | |
| 42 | 44 | |
| 43 | 45 | $(FILE2STR): $(FILE2STROBJS) $(LIBOCORE) |
| 44 | 46 | @echo Linking $@... |
| 45 | $(LD) $(LDFLAGS) $^ | |
| 47 | $(LD) $(LDFLAGS) $^ | |
| 46 | 48 | |
| 47 | 49 | |
| 48 | 50 | |
| r1679 | r1680 | |
| 53 | 55 | PNG2BDCOBJS = \ |
| 54 | 56 | $(BUILDOBJ)/png2bdc.o \ |
| 55 | 57 | |
| 56 | $(PNG2BDC): $(PNG2BDCOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) | |
| 58 | $(PNG2BDC): $(PNG2BDCOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) | |
| 57 | 59 | @echo Linking $@... |
| 58 | $(LD) $(LDFLAGS) $^ $(LIB | |
| 60 | $(LD) $(LDFLAGS) $^ $(LIBUTIL) $(LIBOCORE) $(ZLIB) -o $@ | |
| 59 | 61 | |
| 62 | ||
| 63 | ||
| 64 | #------------------------------------------------- | |
| 65 | # verinfo | |
| 66 | #------------------------------------------------- | |
| 67 | ||
| 68 | VERINFOOBJS = \ | |
| 69 | $(BUILDOBJ)/verinfo.o | |
| 70 | ||
| 71 | $(VERINFO): $(VERINFOOBJS) $(LIBOCORE) | |
| 72 | @echo Linking $@... | |
| 73 | $(LD) $(LDFLAGS) $^ -o $@ | |
| 74 | ||
| 60 | 75 | endif |
| 61 |
| r0 | r1680 | |
|---|---|---|
| 1 | //============================================================ | |
| 2 | // | |
| 3 | // verinfo.c - Version resource emitter code | |
| 4 | // | |
| 5 | // Copyright Nicola Salmoria and the MAME Team. | |
| 6 | // Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | // | |
| 8 | //============================================================ | |
| 9 | ||
| 10 | #include <stdio.h> | |
| 11 | #include <ctype.h> | |
| 12 | ||
| 13 | #include <string.h> | |
| 14 | #include <stdlib.h> | |
| 15 | ||
| 16 | #define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) | |
| 17 | ||
| 18 | //============================================================ | |
| 19 | // TYPE DEFINITIONS | |
| 20 | //============================================================ | |
| 21 | ||
| 22 | typedef struct _version_info version_info; | |
| 23 | struct _version_info | |
| 24 | { | |
| 25 | int version_major; | |
| 26 | int version_minor; | |
| 27 | int version_build; | |
| 28 | int version_subbuild; | |
| 29 | const char *version_string; | |
| 30 | const char *author; | |
| 31 | const char *comments; | |
| 32 | const char *company_name; | |
| 33 | const char *file_description; | |
| 34 | const char *internal_name; | |
| 35 | const char *legal_copyright; | |
| 36 | const char *original_filename; | |
| 37 | const char *product_name; | |
| 38 | }; | |
| 39 | ||
| 40 | ||
| 41 | ||
| 42 | //============================================================ | |
| 43 | // emit_version_info | |
| 44 | //============================================================ | |
| 45 | ||
| 46 | static void emit_version_info(const version_info *v) | |
| 47 | { | |
| 48 | printf("VS_VERSION_INFO VERSIONINFO\n"); | |
| 49 | printf("\tFILEVERSION %d,%d,%d,%d\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); | |
| 50 | printf("\tPRODUCTVERSION %d,%d,%d,%d\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); | |
| 51 | printf("\tFILEFLAGSMASK 0x3fL\n"); | |
| 52 | #ifdef MAME_DEBUG | |
| 53 | if (v->version_build == 0) | |
| 54 | printf("\tFILEFLAGS VS_FF_DEBUG\n"); | |
| 55 | else | |
| 56 | printf("\tFILEFLAGS VS_FF_PRERELEASE | VS_FF_DEBUG\n"); | |
| 57 | #else | |
| 58 | if (v->version_build == 0) | |
| 59 | printf("\tFILEFLAGS 0x0L\n"); | |
| 60 | else | |
| 61 | printf("\tFILEFLAGS VS_FF_PRERELEASE\n"); | |
| 62 | #endif | |
| 63 | printf("\tFILEOS VOS_NT_WINDOWS32\n"); | |
| 64 | printf("\tFILETYPE VFT_APP\n"); | |
| 65 | printf("\tFILESUBTYPE VFT2_UNKNOWN\n"); | |
| 66 | printf("BEGIN\n"); | |
| 67 | printf("\tBLOCK \"StringFileInfo\"\n"); | |
| 68 | printf("\tBEGIN\n"); | |
| 69 | printf("#ifdef UNICODE\n"); | |
| 70 | printf("\t\tBLOCK \"040904b0\"\n"); | |
| 71 | printf("#else\n"); | |
| 72 | printf("\t\tBLOCK \"040904E4\"\n"); | |
| 73 | printf("#endif\n"); | |
| 74 | printf("\t\tBEGIN\n"); | |
| 75 | if (v->author != NULL) | |
| 76 | printf("\t\t\tVALUE \"Author\", \"%s\\0\"\n", v->author); | |
| 77 | if (v->comments != NULL) | |
| 78 | printf("\t\t\tVALUE \"Comments\", \"%s\\0\"\n", v->comments); | |
| 79 | if (v->company_name != NULL) | |
| 80 | printf("\t\t\tVALUE \"CompanyName\", \"%s\\0\"\n", v->company_name); | |
| 81 | if (v->file_description != NULL) | |
| 82 | printf("\t\t\tVALUE \"FileDescription\", \"%s\\0\"\n", v->file_description); | |
| 83 | printf("\t\t\tVALUE \"FileVersion\", \"%d, %d, %d, %d\\0\"\n", v->version_major, v->version_minor, v->version_build, v->version_subbuild); | |
| 84 | if (v->internal_name != NULL) | |
| 85 | printf("\t\t\tVALUE \"InternalName\", \"%s\\0\"\n", v->internal_name); | |
| 86 | if (v->legal_copyright != NULL) | |
| 87 | printf("\t\t\tVALUE \"LegalCopyright\", \"%s\\0\"\n", v->legal_copyright); | |
| 88 | if (v->original_filename != NULL) | |
| 89 | printf("\t\t\tVALUE \"OriginalFilename\", \"%s\\0\"\n", v->original_filename); | |
| 90 | if (v->product_name != NULL) | |
| 91 | printf("\t\t\tVALUE \"ProductName\", \"%s\\0\"\n", v->product_name); | |
| 92 | printf("\t\t\tVALUE \"ProductVersion\", \"%s\\0\"\n", v->version_string); | |
| 93 | printf("\t\tEND\n"); | |
| 94 | printf("\tEND\n"); | |
| 95 | printf("\tBLOCK \"VarFileInfo\"\n"); | |
| 96 | printf("\tBEGIN\n"); | |
| 97 | printf("#ifdef UNICODE\n"); | |
| 98 | printf("\t\tVALUE \"Translation\", 0x409, 1200\n"); | |
| 99 | printf("#else\n"); | |
| 100 | printf("\t\tVALUE \"Translation\", 0x409, 1252\n"); | |
| 101 | printf("#endif\n"); | |
| 102 | printf("\tEND\n"); | |
| 103 | printf("END\n"); | |
| 104 | } | |
| 105 | ||
| 106 | ||
| 107 | ||
| 108 | //============================================================ | |
| 109 | // parse_version_digit | |
| 110 | //============================================================ | |
| 111 | ||
| 112 | static int parse_version_digit(const char *str, int *position) | |
| 113 | { | |
| 114 | int value = 0; | |
| 115 | ||
| 116 | while (str[*position] != 0 && !isspace(str[*position]) && !isdigit(str[*position])) | |
| 117 | (*position)++; | |
| 118 | ||
| 119 | if (str[*position] != 0 && isdigit(str[*position])) | |
| 120 | { | |
| 121 | sscanf(&str[*position], "%d", &value); | |
| 122 | while (isdigit(str[*position])) | |
| 123 | (*position)++; | |
| 124 | } | |
| 125 | return value; | |
| 126 | } | |
| 127 | ||
| 128 | ||
| 129 | ||
| 130 | //============================================================ | |
| 131 | // parse_version | |
| 132 | //============================================================ | |
| 133 | ||
| 134 | static int parse_version(char *str, int *version_major, int *version_minor, int *version_micro, const char **version_string) | |
| 135 | { | |
| 136 | char *version; | |
| 137 | int position = 0; | |
| 138 | ||
| 139 | // find the version string | |
| 140 | version = strstr(str, "build_version"); | |
| 141 | if (version != NULL) | |
| 142 | version = strchr(version, '"'); | |
| 143 | if (version == NULL) | |
| 144 | { | |
| 145 | fprintf(stderr, "Unable to find build_version string\n"); | |
| 146 | return 1; | |
| 147 | } | |
| 148 | version++; | |
| 149 | *strchr(version, ' ') = 0; | |
| 150 | ||
| 151 | *version_string = version; | |
| 152 | *version_major = parse_version_digit(version, &position); | |
| 153 | *version_minor = parse_version_digit(version, &position); | |
| 154 | *version_micro = parse_version_digit(version, &position); | |
| 155 | return 0; | |
| 156 | } | |
| 157 | ||
| 158 | ||
| 159 | ||
| 160 | //============================================================ | |
| 161 | // main | |
| 162 | //============================================================ | |
| 163 | ||
| 164 | int main(int argc, char *argv[]) | |
| 165 | { | |
| 166 | version_info v; | |
| 167 | char legal_copyright[512]; | |
| 168 | char *buffer; | |
| 169 | size_t size; | |
| 170 | FILE *f; | |
| 171 | ||
| 172 | memset(&v, 0, sizeof(v)); | |
| 173 | ||
| 174 | // validate parameters | |
| 175 | if (argc < 2) | |
| 176 | { | |
| 177 | printf("Usage: %s <filename>\n", argv[0]); | |
| 178 | return 0; | |
| 179 | } | |
| 180 | ||
| 181 | // open the file | |
| 182 | f = fopen(argv[1], "rb"); | |
| 183 | if (f == NULL) | |
| 184 | { | |
| 185 | fprintf(stderr, "Error opening file %s\n", argv[1]); | |
| 186 | return 1; | |
| 187 | } | |
| 188 | ||
| 189 | // get the file size | |
| 190 | fseek(f, 0, SEEK_END); | |
| 191 | size = ftell(f); | |
| 192 | fseek(f, 0, SEEK_SET); | |
| 193 | ||
| 194 | // allocate a buffer | |
| 195 | buffer = malloc(size + 1); | |
| 196 | if (buffer == NULL) | |
| 197 | { | |
| 198 | fclose(f); | |
| 199 | fprintf(stderr, "Error allocating %ld bytes\n", (long) size + 1); | |
| 200 | return 1; | |
| 201 | } | |
| 202 | ||
| 203 | // read the file contents and NULL-terminate | |
| 204 | fread(buffer, 1, size, f); | |
| 205 | fclose(f); | |
| 206 | buffer[size] = 0; | |
| 207 | ||
| 208 | // parse out version string | |
| 209 | if (parse_version(buffer, &v.version_major, &v.version_minor, &v.version_build, &v.version_string)) | |
| 210 | return 1; | |
| 211 | ||
| 212 | #ifdef MESS | |
| 213 | // MESS | |
| 214 | v.author = "MESS Team"; | |
| 215 | v.comments = "Multi Emulation Super System"; | |
| 216 | v.company_name = "MESS Team"; | |
| 217 | v.file_description = "Multi Emulation Super System"; | |
| 218 | v.internal_name = "MESS"; | |
| 219 | v.original_filename = "MESS"; | |
| 220 | v.product_name = "MESS"; | |
| 221 | #elif defined(WINUI) | |
| 222 | // MAMEUI | |
| 223 | v.author = "Christopher Kirmse and the MAMEUI team"; | |
| 224 | v.comments = "Multiple Arcade Machine Emulator with GUI"; | |
| 225 | v.company_name = "MAME Team"; | |
| 226 | v.file_description = "Multiple Arcade Machine Emulator with GUI"; | |
| 227 | v.internal_name = "MAMEUI"; | |
| 228 | v.original_filename = "MAMEUI"; | |
| 229 | v.product_name = "MAMEUI"; | |
| 230 | #else | |
| 231 | // MAME | |
| 232 | v.author = "Nicola Salmoria and the MAME Team"; | |
| 233 | v.comments = "Multiple Arcade Machine Emulator"; | |
| 234 | v.company_name = "MAME Team"; | |
| 235 | v.file_description = "Multiple Arcade Machine Emulator"; | |
| 236 | v.internal_name = "MAME"; | |
| 237 | v.original_filename = "MAME"; | |
| 238 | v.product_name = "MAME"; | |
| 239 | #endif | |
| 240 | ||
| 241 | // build legal_copyright string | |
| 242 | v.legal_copyright = legal_copyright; | |
| 243 | snprintf(legal_copyright, ARRAY_LENGTH(legal_copyright), "Copyright Nicola Salmoria and the MAME team"); | |
| 244 | ||
| 245 | // emit the info | |
| 246 | emit_version_info(&v); | |
| 247 | ||
| 248 | free(buffer); | |
| 249 | return 0; | |
| 250 | } |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include <stdio.h> |
| 13 | #include | |
| 13 | #include < | |
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | /*------------------------------------------------- |
| r1679 | r1680 | |
| 21 | 21 | { |
| 22 | 22 | const char *srcfile, *dstfile, *varname, *type; |
| 23 | 23 | FILE *src, *dst; |
| 24 | | |
| 24 | unsigned char *buffer; | |
| 25 | 25 | int bytes, offs; |
| 26 | 26 | int terminate = 1; |
| 27 | 27 |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | * 0.639 * 15k * 1uF -> 0.9585s |
| 56 | 56 | */ |
| 57 | 57 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 95850), 100000); |
| 58 | timer_adjust(sound_volume_timer, period, 0, period); | |
| 58 | timer_adjust_periodic(sound_volume_timer, period, 0, period); | |
| 59 | 59 | } |
| 60 | 60 | else |
| 61 | 61 | { |
| r1679 | r1680 | |
| 68 | 68 | */ |
| 69 | 69 | // attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 702900), 100000); |
| 70 | 70 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 191700), 100000); |
| 71 | timer_adjust(sound_volume_timer, period, 0, period); | |
| 71 | timer_adjust_periodic(sound_volume_timer, period, 0, period); | |
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| r1679 | r1680 | |
| 103 | 103 | * ...I'm sure this is off by one number of magnitude :/ |
| 104 | 104 | */ |
| 105 | 105 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 95850), 100000); |
| 106 | timer_adjust(music_volume_timer, period, 0, period); | |
| 106 | timer_adjust_periodic(music_volume_timer, period, 0, period); | |
| 107 | 107 | } |
| 108 | 108 | else |
| 109 | 109 | { |
| r1679 | r1680 | |
| 114 | 114 | */ |
| 115 | 115 | // attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 3003300), 100000); |
| 116 | 116 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 300330), 100000); |
| 117 | timer_adjust(music_volume_timer, period, 0, period); | |
| 117 | timer_adjust_periodic(music_volume_timer, period, 0, period); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | } |
| r1679 | r1680 | |
|---|---|---|
| 1154 | 1154 | |
| 1155 | 1155 | /* Initialize the timers */ |
| 1156 | 1156 | timers[0].timer = timer_alloc( snes_spc_timer , NULL); |
| 1157 | timer_adjust( timers[0].timer, ATTOTIME_IN_HZ(8000), 0, ATTOTIME_IN_HZ(8000) ); | |
| 1157 | timer_adjust_periodic( timers[0].timer, ATTOTIME_IN_HZ(8000), 0, ATTOTIME_IN_HZ(8000) ); | |
| 1158 | 1158 | timer_enable( timers[0].timer, 0 ); |
| 1159 | 1159 | timers[1].timer = timer_alloc( snes_spc_timer , NULL); |
| 1160 | timer_adjust( timers[1].timer, ATTOTIME_IN_HZ(8000), 1, ATTOTIME_IN_HZ(8000) ); | |
| 1160 | timer_adjust_periodic( timers[1].timer, ATTOTIME_IN_HZ(8000), 1, ATTOTIME_IN_HZ(8000) ); | |
| 1161 | 1161 | timer_enable( timers[1].timer, 0 ); |
| 1162 | 1162 | timers[2].timer = timer_alloc( snes_spc_timer , NULL); |
| 1163 | timer_adjust( timers[2].timer, ATTOTIME_IN_HZ(64000), 2, ATTOTIME_IN_HZ(64000) ); | |
| 1163 | timer_adjust_periodic( timers[2].timer, ATTOTIME_IN_HZ(64000), 2, ATTOTIME_IN_HZ(64000) ); | |
| 1164 | 1164 | timer_enable( timers[2].timer, 0 ); |
| 1165 | 1165 | |
| 1166 | 1166 | DSP_Reset(); |
| r1679 | r1680 | |
|---|---|---|
| 462 | 462 | if ((data & 0x3f) == 0x15) |
| 463 | 463 | { |
| 464 | 464 | attotime rate = attotime_mul(ATTOTIME_IN_HZ(26000000), 32 * 2 * (serial_frequency + 1)); |
| 465 | timer_adjust(serial_timer, rate, 0, rate); | |
| 465 | timer_adjust_periodic(serial_timer, rate, 0, rate); | |
| 466 | 466 | } |
| 467 | 467 | break; |
| 468 | 468 |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | |
| 156 | 156 | update_SN76477_status(); |
| 157 | 157 | |
| 158 | timer_adjust(sound_timer[n], expire, n | |
| 158 | timer_adjust_oneshot(sound_timer[n], expire, n | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | |
| r1679 | r1680 | |
| 165 | 165 | |
| 166 | 166 | update_SN76477_status(); |
| 167 | 167 | |
| 168 | timer_adjust(sound_timer[n], attotime_never, n | |
| 168 | timer_adjust_oneshot(sound_timer[n], attotime_never, n | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | { |
| 92 | 92 | chan->curlocation = CUSTOM_REG_LONG(REG_AUD0LCH + chan->index * 8); |
| 93 | 93 | chan->curlength = CUSTOM_REG(REG_AUD0LEN + chan->index * 8); |
| 94 | timer_adjust(chan->irq_timer, ATTOTIME_IN_HZ(15750), chan->index | |
| 94 | timer_adjust_oneshot(chan->irq_timer, ATTOTIME_IN_HZ(15750), chan->index | |
| 95 | 95 | LOG(("dma_reload(%d): offs=%05X len=%04X\n", chan->index, chan->curlocation, chan->curlength)); |
| 96 | 96 | } |
| 97 | 97 |
| r1679 | r1680 | |
|---|---|---|
| 361 | 361 | sample_start_raw(CHANNEL_LFO+2,backgroundwave,ARRAY_LENGTH(backgroundwave),1000,1); |
| 362 | 362 | |
| 363 | 363 | noisetimer = timer_alloc(noise_timer_cb, NULL); |
| 364 | timer_adjust(noisetimer, ATTOTIME_IN_NSEC((155000+22000)/100*693*22), 0, ATTOTIME_IN_NSEC((155000+22000)/100*693*22)); | |
| 364 | timer_adjust_periodic(noisetimer, ATTOTIME_IN_NSEC((155000+22000)/100*693*22), 0, ATTOTIME_IN_NSEC((155000+22000)/100*693*22)); | |
| 365 | 365 | |
| 366 | 366 | lfotimer = timer_alloc(lfo_timer_cb, NULL); |
| 367 | 367 | |
| r1679 | r1680 | |
| 443 | 443 | #undef Vbe |
| 444 | 444 | #undef Vcc |
| 445 | 445 | logerror("lfo timer bits:%d%d%d%d r1:%d, r2:%d, re: %d, td: %9.2fsec\n", lfobit[0], lfobit[1], lfobit[2], lfobit[3], (int)r1, (int)r2, (int)Re, td); |
| 446 | timer_adjust(lfotimer, attotime_make(0, ATTOSECONDS_PER_SECOND / (MAXFREQ-MINFREQ) * td), 0, attotime_make(0, ATTOSECONDS_PER_SECOND / (MAXFREQ-MINFREQ) * td)); | |
| 446 | timer_adjust_periodic(lfotimer, attotime_make(0, ATTOSECONDS_PER_SECOND / (MAXFREQ-MINFREQ) * td), 0, attotime_make(0, ATTOSECONDS_PER_SECOND / (MAXFREQ-MINFREQ) * td)); | |
| 447 | 447 | #else |
| 448 | 448 | double r0, r1, rx = 100000.0; |
| 449 | 449 | |
| r1679 | r1680 | |
| 500 | 500 | rx = rx + 2000000.0 * r0 / (r0+r1); |
| 501 | 501 | |
| 502 | 502 | LOG(("lfotimer bits:%d%d%d%d r0:%d, r1:%d, rx: %d, time: %9.2fus\n", lfobit[3], lfobit[2], lfobit[1], lfobit[0], (int)r0, (int)r1, (int)rx, 0.639 * rx)); |
| 503 | timer_adjust(lfotimer, attotime_make(0, ATTOSECONDS_PER_SECOND / 1000000000 / (MAXFREQ-MINFREQ) * 639 * rx), 0, attotime_make(0, ATTOSECONDS_PER_SECOND / 1000000000 / (MAXFREQ-MINFREQ) * 639 * rx)); | |
| 503 | timer_adjust_periodic(lfotimer, attotime_make(0, ATTOSECONDS_PER_SECOND / 1000000000 / (MAXFREQ-MINFREQ) * 639 * rx), 0, attotime_make(0, ATTOSECONDS_PER_SECOND / 1000000000 / (MAXFREQ-MINFREQ) * 639 * rx)); | |
| 504 | 504 | #endif |
| 505 | 505 | } |
| 506 | 506 |
| r1679 | r1680 | |
|---|---|---|
| 202 | 202 | { |
| 203 | 203 | if (dma_timer_enabled) |
| 204 | 204 | { |
| 205 | timer_adjust(dma_timer, attotime_never, 0 | |
| 205 | timer_adjust_oneshot(dma_timer, attotime_never, 0 | |
| 206 | 206 | dma_timer_enabled = 0; |
| 207 | 207 | } |
| 208 | 208 | return; |
| r1679 | r1680 | |
| 253 | 253 | if (!dma_timer_enabled) |
| 254 | 254 | { |
| 255 | 255 | attotime period = attotime_mul(serial_period_per_word, tms32031_io_regs[DMA_TRANSFER_COUNT]); |
| 256 | timer_adjust(dma_timer, period, addr, period); | |
| 256 | timer_adjust_periodic(dma_timer, period, addr, period); | |
| 257 | 257 | dma_timer_enabled = 1; |
| 258 | 258 | } |
| 259 | 259 | } |
| r1679 | r1680 | |
| 261 | 261 | /* see if we turned off */ |
| 262 | 262 | else if (!enabled && dma_enabled) |
| 263 | 263 | { |
| 264 | timer_adjust(dma_timer, attotime_never, 0 | |
| 264 | timer_adjust_oneshot(dma_timer, attotime_never, 0 | |
| 265 | 265 | dma_timer_enabled = 0; |
| 266 | 266 | } |
| 267 | 267 | |
| r1679 | r1680 | |
| 303 | 303 | if (tms32031_io_regs[base + TIMER0_GLOBAL_CTL] != 0x2c1) |
| 304 | 304 | logerror("CAGE TIMER%d: unexpected timer config %08X!\n", which, tms32031_io_regs[base + TIMER0_GLOBAL_CTL]); |
| 305 | 305 | |
| 306 | timer_adjust(timer[which], period, which | |
| 306 | timer_adjust_oneshot(timer[which], period, which | |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | /* see if we turned off */ |
| 310 | 310 | else if (!enabled && cage_timer_enabled[which]) |
| 311 | 311 | { |
| 312 | timer_adjust(timer[which], attotime_never, which | |
| 312 | timer_adjust_oneshot(timer[which], attotime_never, which | |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /* set the new state */ |
| r1679 | r1680 | |
| 551 | 551 | |
| 552 | 552 | dma_enabled = 0; |
| 553 | 553 | dma_timer_enabled = 0; |
| 554 | timer_adjust(dma_timer, attotime_never, 0 | |
| 554 | timer_adjust_oneshot(dma_timer, attotime_never, 0 | |
| 555 | 555 | |
| 556 | 556 | cage_timer_enabled[0] = 0; |
| 557 | 557 | cage_timer_enabled[1] = 0; |
| 558 | timer_adjust(timer[0], attotime_never, 0, attotime_never); | |
| 559 | timer_adjust(timer[1], attotime_never, 0, attotime_never); | |
| 558 | timer_adjust_oneshot(timer[0], attotime_never, 0); | |
| 559 | timer_adjust_oneshot(timer[1], attotime_never, 0); | |
| 560 | 560 | |
| 561 | 561 | memset(tms32031_io_regs, 0, 0x60 * 4); |
| 562 | 562 |
| r1679 | r1680 | |
|---|---|---|
| 17 | 17 | #define FADE_TO_ZERO 1 |
| 18 | 18 | |
| 19 | 19 | |
| 20 | #define EXIDY440_AUDIO_CLOCK (EXIDY440_MASTER_CLOCK / 4 / 4) | |
| 21 | #define EXIDY440_MC3418_CLOCK (EXIDY440_AUDIO_CLOCK / 16) | |
| 22 | #define EXIDY440_MC3417_CLOCK (EXIDY440_AUDIO_CLOCK / 32) | |
| 20 | 23 | |
| 24 | ||
| 21 | 25 | /* internal caching */ |
| 22 | 26 | #define MAX_CACHE_ENTRIES 1024 /* maximum separate samples we expect to ever see */ |
| 23 | 27 | #define SAMPLE_BUFFER_LENGTH 1024 /* size of temporary decode buffer on the stack */ |
| r1679 | r1680 | |
| 383 | 387 | * |
| 384 | 388 | *************************************/ |
| 385 | 389 | |
| 386 | static void | |
| 390 | static void | |
| 387 | 391 | { |
| 388 | 392 | /* update the stream */ |
| 389 | 393 | stream_update(stream); |
| r1679 | r1680 | |
| 419 | 423 | int result = 0; |
| 420 | 424 | |
| 421 | 425 | /* first update the current state of the DMA transfers */ |
| 422 | | |
| 426 | | |
| 423 | 427 | |
| 424 | 428 | /* switch off the offset we were given */ |
| 425 | 429 | switch (offset) |
| r1679 | r1680 | |
| 489 | 493 | case 0x16: |
| 490 | 494 | result = m6844_chain; |
| 491 | 495 | break; |
| 496 | ||
| 497 | /* 0x17-0x1f not used */ | |
| 498 | default: break; | |
| 492 | 499 | } |
| 493 | 500 | |
| 494 | 501 | return result; |
| r1679 | r1680 | |
| 500 | 507 | int i; |
| 501 | 508 | |
| 502 | 509 | /* first update the current state of the DMA transfers */ |
| 503 | | |
| 510 | | |
| 504 | 511 | |
| 505 | 512 | /* switch off the offset we were given */ |
| 506 | 513 | switch (offset) |
| r1679 | r1680 | |
| 591 | 598 | case 0x16: |
| 592 | 599 | m6844_chain = data; |
| 593 | 600 | break; |
| 601 | ||
| 602 | /* 0x17-0x1f not used */ | |
| 603 | default: break; | |
| 594 | 604 | } |
| 595 | 605 | } |
| 596 | 606 | |
| r1679 | r1680 | |
| 883 | 893 | *************************************/ |
| 884 | 894 | |
| 885 | 895 | static ADDRESS_MAP_START( exidy440_audio_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 886 | AM_RANGE(0x8000, 0x8016) AM_READWRITE(m6844_r, m6844_w) AM_BASE(&m6844_data) | |
| 887 | AM_RANGE(0x8400, 0x8407) AM_READWRITE(MRA8_RAM, sound_volume_w) AM_BASE(&sound_volume) | |
| 888 | AM_RANGE(0x8800, 0x8800) AM_READ(sound_command_r) | |
| 889 | AM_RANGE(0x9400, 0x9403) AM_WRITE(MWA8_RAM) AM_BASE(&sound_banks) | |
| 890 | AM_RANGE(0x9800, 0x9800) AM_READWRITE(MRA8_NOP, sound_interrupt_clear_w) | |
| 896 | AM_RANGE(0x0000, 0x7fff) AM_NOP | |
| 897 | AM_RANGE(0x8000, 0x801f) AM_MIRROR(0x03e0) AM_READWRITE(m6844_r, m6844_w) AM_BASE(&m6844_data) | |
| 898 | AM_RANGE(0x8400, 0x840f) AM_MIRROR(0x03f0) AM_READWRITE(MRA8_RAM, sound_volume_w) AM_BASE(&sound_volume) | |
| 899 | AM_RANGE(0x8800, 0x8800) AM_MIRROR(0x03ff) AM_READWRITE(sound_command_r, MWA8_NOP) | |
| 900 | AM_RANGE(0x8c00, 0x93ff) AM_NOP | |
| 901 | AM_RANGE(0x9400, 0x9403) AM_MIRROR(0x03fc) AM_READWRITE(MRA8_NOP, MWA8_RAM) AM_BASE(&sound_banks) | |
| 902 | AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READWRITE(MRA8_NOP, sound_interrupt_clear_w) | |
| 903 | AM_RANGE(0x9c00, 0x9fff) AM_NOP | |
| 891 | 904 | AM_RANGE(0xa000, 0xbfff) AM_RAM |
| 905 | AM_RANGE(0xc000, 0xdfff) AM_NOP | |
| 892 | 906 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 893 | 907 | ADDRESS_MAP_END |
| 894 | 908 | |
| r1679 | r1680 | |
| 916 | 930 | |
| 917 | 931 | MACHINE_DRIVER_START( exidy440_audio ) |
| 918 | 932 | |
| 919 | MDRV_CPU_ADD(M6809,EXIDY440_ | |
| 933 | MDRV_CPU_ADD(M6809, EXIDY440_ | |
| 920 | 934 | MDRV_CPU_PROGRAM_MAP(exidy440_audio_map,0) |
| 921 | 935 | MDRV_CPU_VBLANK_INT(irq0_line_assert,1) |
| 922 | 936 | |
| r1679 | r1680 | |
| 926 | 940 | MDRV_SOUND_CONFIG(custom_interface) |
| 927 | 941 | MDRV_SOUND_ROUTE(0, "left", 1.0) |
| 928 | 942 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 943 | ||
| 944 | // MDRV_SOUND_ADD(MC3418, EXIDY440_MC3418_CLOCK) | |
| 945 | // MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 946 | ||
| 947 | // MDRV_SOUND_ADD(MC3418, EXIDY440_MC3418_CLOCK) | |
| 948 | // MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 949 | ||
| 950 | // MDRV_SOUND_ADD(MC3417, EXIDY440_MC3417_CLOCK) | |
| 951 | // MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 952 | ||
| 953 | // MDRV_SOUND_ADD(MC3417, EXIDY440_MC3417_CLOCK) | |
| 954 | // MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 929 | 955 | MACHINE_DRIVER_END |
| r1679 | r1680 | |
|---|---|---|
| 168 | 168 | if (last_croak) |
| 169 | 169 | { |
| 170 | 170 | /* The croak will keep playing until .429s after being disabled */ |
| 171 | timer_adjust(frogs_croak_timer, double_to_attotime(1.1 * RES_K(390) * CAP_U(1)), 0 | |
| 171 | timer_adjust_oneshot(frogs_croak_timer, double_to_attotime(1.1 * RES_K(390) * CAP_U(1)), 0 | |
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | if (new_buzzz) |
| r1679 | r1680 | |
|---|---|---|
| 819 | 819 | if (t->control & 0x0001) |
| 820 | 820 | { |
| 821 | 821 | int count = t->maxA ? t->maxA : 0x10000; |
| 822 | timer_adjust(t->int_timer, attotime_mul(ATTOTIME_IN_HZ(2000000), count), which | |
| 822 | timer_adjust_oneshot(t->int_timer, attotime_mul(ATTOTIME_IN_HZ(2000000), count), which | |
| 823 | 823 | if (LOG_TIMER) logerror(" Repriming interrupt\n"); |
| 824 | 824 | } |
| 825 | 825 | else |
| 826 | timer_adjust(t->int_timer, attotime_never, which | |
| 826 | timer_adjust_oneshot(t->int_timer, attotime_never, which | |
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | |
| r1679 | r1680 | |
| 937 | 937 | internal_timer_sync(which); |
| 938 | 938 | |
| 939 | 939 | /* nuke the timer and force the interrupt timer to be recomputed */ |
| 940 | timer_adjust(t->time_timer, attotime_never, which | |
| 940 | timer_adjust_oneshot(t->time_timer, attotime_never, which | |
| 941 | 941 | t->time_timer_active = 0; |
| 942 | 942 | update_int_timer = 1; |
| 943 | 943 | } |
| r1679 | r1680 | |
| 946 | 946 | else if ((diff & 0x8000) && (new_control & 0x8000)) |
| 947 | 947 | { |
| 948 | 948 | /* start the timing */ |
| 949 | timer_adjust(t->time_timer, attotime_never, which | |
| 949 | timer_adjust_oneshot(t->time_timer, attotime_never, which | |
| 950 | 950 | t->time_timer_active = 1; |
| 951 | 951 | update_int_timer = 1; |
| 952 | 952 | } |
| r1679 | r1680 | |
| 975 | 975 | { |
| 976 | 976 | int diff = t->maxA - t->count; |
| 977 | 977 | if (diff <= 0) diff += 0x10000; |
| 978 | timer_adjust(t->int_timer, attotime_mul(ATTOTIME_IN_HZ(2000000), diff), which | |
| 978 | timer_adjust_oneshot(t->int_timer, attotime_mul(ATTOTIME_IN_HZ(2000000), diff), which | |
| 979 | 979 | if (LOG_TIMER) logerror("Set interrupt timer for %d\n", which); |
| 980 | 980 | } |
| 981 | 981 | else |
| 982 | timer_adjust(t->int_timer, attotime_never, which | |
| 982 | timer_adjust_oneshot(t->int_timer, attotime_never, which | |
| 983 | 983 | } |
| 984 | 984 | } |
| 985 | 985 | |
| r1679 | r1680 | |
| 1064 | 1064 | if (LOG_DMA) logerror("Initiated DMA %d - count = %04X, source = %04X, dest = %04X\n", which, d->count, d->source, d->dest); |
| 1065 | 1065 | |
| 1066 | 1066 | d->finished = 0; |
| 1067 | timer_adjust(d->finish_timer, attotime_mul(ATTOTIME_IN_HZ(dac[dacnum].frequency), count), which | |
| 1067 | timer_adjust_oneshot(d->finish_timer, attotime_mul(ATTOTIME_IN_HZ(dac[dacnum].frequency), count), which | |
| 1068 | 1068 | } |
| 1069 | 1069 | } |
| 1070 | 1070 | |
| r1679 | r1680 | |
| 1607 | 1607 | if (ctr->count == 0) ctr->count = 0x10000; |
| 1608 | 1608 | |
| 1609 | 1609 | /* reset/start the timer */ |
| 1610 | timer_adjust(ctr->timer, attotime_never, 0 | |
| 1610 | timer_adjust_oneshot(ctr->timer, attotime_never, 0 | |
| 1611 | 1611 | |
| 1612 | 1612 | if (LOG_PIT) logerror("PIT counter %d set to %d (%d Hz)\n", which, ctr->count, 4000000 / ctr->count); |
| 1613 | 1613 |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | /* Set to 1 to disable DAC and post-mixer filters */ |
| 22 | 22 | #define DK_NO_FILTERS (0) |
| 23 | 23 | |
| 24 | /* Issue surrounded by this define need to be analyzed and | |
| 25 | * reviewed at a lator time. | |
| 26 | * Currently, the following issues exist: | |
| 27 | * - although not present on schematics, a 10K resistor is needed | |
| 28 | * as RF in the mixer stage. Without this resistor, the DAC | |
| 29 | * sound is completely overmodulated. | |
| 30 | */ | |
| 24 | 31 | |
| 32 | // FIXME: Review at a later time | |
| 33 | #define DK_REVIEW (1) | |
| 34 | ||
| 25 | 35 | #define ACTIVELOW_PORT_BIT(P,A,D) (((P) & (~(1 << (A)))) | (((D) ^ 1) << (A))) |
| 26 | 36 | |
| 27 | 37 | /* Needed for dkongjr ... FIXME */ |
| r1679 | r1680 | |
| 216 | 226 | {DK_R2, DK_R24, DK_R1, DK_R14}, |
| 217 | 227 | {0,0,0}, // no variable resistors |
| 218 | 228 | {0,0,0}, // no node capacitors |
| 229 | #if DK_REVIEW | |
| 230 | 0, RES_K(10), | |
| 231 | #else | |
| 219 | 232 | 0, 0, |
| 233 | #endif | |
| 220 | 234 | DK_C159, |
| 221 | 235 | DK_C12, |
| 222 | 236 | 0, 1}; |
| r1679 | r1680 | |
| 361 | 375 | // Amplifier: internal amplifier |
| 362 | 376 | DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0)) |
| 363 | 377 | DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3) |
| 364 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, RES_K(50), DK_C13) | |
| 378 | DISCRETE_CRFILTER(NODE_295,1,NODE_294, RES_K(50), DK_C13) | |
| 379 | //DISCRETE_CRFILTER(NODE_295,1,NODE_294, 1000, DK_C13) | |
| 365 | 380 | // EZV20 equivalent filter circuit ... |
| 366 | 381 | DISCRETE_CRFILTER(NODE_296,1,NODE_295, RES_K(1), CAP_U(4.7)) |
| 367 | ||
| 368 | 382 | #if DK_NO_FILTERS |
| 369 | 383 | DISCRETE_OUTPUT(NODE_288, 32767.0/5.0 * 10) |
| 370 | 384 | #else |
| r1679 | r1680 | |
|---|---|---|
| 121 | 121 | case 3: |
| 122 | 122 | logerror("Counter: X1/Clk - divided by 16, counter is %04x, so interrupt every %d cycles\n",counter,(M68000_CLOCK/M68681_CLOCK)*counter*16); |
| 123 | 123 | timer_mode=TIMER_SINGLESHOT; |
| 124 | timer_adjust(timer_68681, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter*16,1), 0 | |
| 124 | timer_adjust_oneshot(timer_68681, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter*16,1), 0 | |
| 125 | 125 | break; |
| 126 | 126 | case 4: |
| 127 | 127 | logerror("Timer: Unimplemented external IP2\n"); |
| r1679 | r1680 | |
| 132 | 132 | case 6: |
| 133 | 133 | logerror("Timer: X1/Clk, counter is %04x, so interrupt every %d cycles\n",counter,(M68000_CLOCK/M68681_CLOCK)*counter); |
| 134 | 134 | timer_mode=TIMER_PULSE; |
| 135 | timer_adjust(timer_68681, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter,1), 0, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter,1)); | |
| 135 | timer_adjust_periodic(timer_68681, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter,1), 0, ATTOTIME_IN_CYCLES((M68000_CLOCK/M68681_CLOCK)*counter,1)); | |
| 136 | 136 | break; |
| 137 | 137 | case 7: |
| 138 | 138 | logerror("Timer: Unimplemented X1/Clk - divided by 16\n"); |
| r1679 | r1680 | |
|---|---|---|
| 46 | 46 | * discharge C33 (1uF) through R50 (22k) -> 0.14058s |
| 47 | 47 | */ |
| 48 | 48 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 14058), 100000); |
| 49 | timer_adjust(volume_timer, period, 0, period); | |
| 49 | timer_adjust_periodic(volume_timer, period, 0, period); | |
| 50 | 50 | } |
| 51 | 51 | else |
| 52 | 52 | { |
| r1679 | r1680 | |
| 58 | 58 | * maybe half as fast? |
| 59 | 59 | */ |
| 60 | 60 | attotime period = attotime_div(attotime_mul(ATTOTIME_IN_HZ(32768), 29060), 100000); |
| 61 | timer_adjust(volume_timer, period, 0, period); | |
| 61 | timer_adjust_periodic(volume_timer, period, 0, period); | |
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 |
| r1679 | r1680 | |
|---|---|---|
| 520 | 520 | if ((diff & 0x20) && !(newval & 0x20)) |
| 521 | 521 | { |
| 522 | 522 | //mame_printf_debug("Stopping timer\n"); |
| 523 | timer_adjust(sega005_sound_timer, attotime_never, 0 | |
| 523 | timer_adjust_oneshot(sega005_sound_timer, attotime_never, 0 | |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | /* if bit 5 goes low, we start the timer again */ |
| 527 | 527 | if ((diff & 0x20) && (newval & 0x20)) |
| 528 | 528 | { |
| 529 | 529 | //mame_printf_debug("Starting timer\n"); |
| 530 | timer_adjust(sega005_sound_timer, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ), 0, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ)); | |
| 530 | timer_adjust_periodic(sega005_sound_timer, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ), 0, ATTOTIME_IN_HZ(SEGA005_555_TIMER_FREQ)); | |
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 |
| r1679 | r1680 | |
|---|---|---|
| 236 | 236 | { |
| 237 | 237 | /* base clock is 250kHz divided by 256 */ |
| 238 | 238 | attotime interval = attotime_mul(ATTOTIME_IN_HZ(250000), 256 * (256-nmi_rate)); |
| 239 | timer_adjust(nmi_timer, interval, 0, interval); | |
| 239 | timer_adjust_periodic(nmi_timer, interval, 0, interval); | |
| 240 | 240 | } |
| 241 | 241 | else |
| 242 | timer_adjust(nmi_timer, attotime_never, 0 | |
| 242 | timer_adjust_oneshot(nmi_timer, attotime_never, 0 | |
| 243 | 243 | |
| 244 | 244 | /* Bit 1 controls a LED on the sound board. I'm not emulating it */ |
| 245 | 245 | } |
| r1679 | r1680 | |
|---|---|---|
| 832 | 832 | /* reset timers */ |
| 833 | 833 | dcs.timer_enable = 0; |
| 834 | 834 | dcs.timer_scale = 1; |
| 835 | timer_adjust(dcs.internal_timer, attotime_never, 0 | |
| 835 | timer_adjust_oneshot(dcs.internal_timer, attotime_never, 0 | |
| 836 | 836 | |
| 837 | 837 | /* start the SPORT0 timer */ |
| 838 | 838 | if (dcs.sport_timer) |
| 839 | timer_adjust(dcs.sport_timer, ATTOTIME_IN_HZ(1000), 0, ATTOTIME_IN_HZ(1000)); | |
| 839 | timer_adjust_periodic(dcs.sport_timer, ATTOTIME_IN_HZ(1000), 0, ATTOTIME_IN_HZ(1000)); | |
| 840 | 840 | |
| 841 | 841 | /* reset the HLE transfer states */ |
| 842 | 842 | transfer.dcs_state = transfer.state = 0; |
| r1679 | r1680 | |
| 1716 | 1716 | |
| 1717 | 1717 | /* set the next timer, but only if it's for a reasonable number */ |
| 1718 | 1718 | if (!dcs.timer_ignore && (dcs.timer_period > 10 || dcs.timer_scale > 1)) |
| 1719 | timer_adjust(dcs.internal_timer, ATTOTIME_IN_CYCLES(target_cycles, dcs.cpunum), 0 | |
| 1719 | timer_adjust_oneshot(dcs.internal_timer, ATTOTIME_IN_CYCLES(target_cycles, dcs.cpunum), 0 | |
| 1720 | 1720 | cpunum_set_input_line(machine, dcs.cpunum, ADSP2105_TIMER, PULSE_LINE); |
| 1721 | 1721 | } |
| 1722 | 1722 | |
| r1679 | r1680 | |
| 1751 | 1751 | |
| 1752 | 1752 | /* adjust the timer if not optimized */ |
| 1753 | 1753 | if (!dcs.timer_ignore) |
| 1754 | timer_adjust(dcs.internal_timer, ATTOTIME_IN_CYCLES(dcs.timer_scale * (dcs.timer_start_count + 1), dcs.cpunum), 0 | |
| 1754 | timer_adjust_oneshot(dcs.internal_timer, ATTOTIME_IN_CYCLES(dcs.timer_scale * (dcs.timer_start_count + 1), dcs.cpunum), 0 | |
| 1755 | 1755 | } |
| 1756 | 1756 | |
| 1757 | 1757 | |
| r1679 | r1680 | |
| 1767 | 1767 | else |
| 1768 | 1768 | { |
| 1769 | 1769 | // mame_printf_debug("Timer disabled\n"); |
| 1770 | timer_adjust(dcs.internal_timer, attotime_never, 0 | |
| 1770 | timer_adjust_oneshot(dcs.internal_timer, attotime_never, 0 | |
| 1771 | 1771 | } |
| 1772 | 1772 | } |
| 1773 | 1773 | |
| r1679 | r1680 | |
| 1846 | 1846 | if ((data & 0x0800) == 0) |
| 1847 | 1847 | { |
| 1848 | 1848 | dmadac_enable(0, dcs.channels, 0); |
| 1849 | timer_adjust(dcs.reg_timer, attotime_never, 0 | |
| 1849 | timer_adjust_oneshot(dcs.reg_timer, attotime_never, 0 | |
| 1850 | 1850 | } |
| 1851 | 1851 | break; |
| 1852 | 1852 | |
| r1679 | r1680 | |
| 1855 | 1855 | if ((data & 0x0002) == 0) |
| 1856 | 1856 | { |
| 1857 | 1857 | dmadac_enable(0, dcs.channels, 0); |
| 1858 | timer_adjust(dcs.reg_timer, attotime_never, 0 | |
| 1858 | timer_adjust_oneshot(dcs.reg_timer, attotime_never, 0 | |
| 1859 | 1859 | } |
| 1860 | 1860 | break; |
| 1861 | 1861 | |
| r1679 | r1680 | |
| 1966 | 1966 | if (dcs.incs) |
| 1967 | 1967 | { |
| 1968 | 1968 | attotime period = attotime_div(attotime_mul(sample_period, dcs.size), (2 * dcs.channels * dcs.incs)); |
| 1969 | timer_adjust(dcs.reg_timer, period, 0, period); | |
| 1969 | timer_adjust_periodic(dcs.reg_timer, period, 0, period); | |
| 1970 | 1970 | } |
| 1971 | 1971 | } |
| 1972 | 1972 | |
| r1679 | r1680 | |
| 2019 | 2019 | dmadac_enable(0, dcs.channels, 0); |
| 2020 | 2020 | |
| 2021 | 2021 | /* remove timer */ |
| 2022 | timer_adjust(dcs.reg_timer, attotime_never, 0 | |
| 2022 | timer_adjust_oneshot(dcs.reg_timer, attotime_never, 0 | |
| 2023 | 2023 | } |
| 2024 | 2024 | |
| 2025 | 2025 | |
| r1679 | r1680 | |
| 2068 | 2068 | for ( ; transfer.fifo_entries; transfer.fifo_entries--) |
| 2069 | 2069 | preprocess_write((*dcs.fifo_data_r)()); |
| 2070 | 2070 | } |
| 2071 | timer_adjust(transfer.watchdog, ATTOTIME_IN_MSEC(1), transfer.writes_left | |
| 2071 | timer_adjust_oneshot(transfer.watchdog, ATTOTIME_IN_MSEC(1), transfer.writes_left | |
| 2072 | 2072 | } |
| 2073 | 2073 | |
| 2074 | 2074 | |
| r1679 | r1680 | |
| 2298 | 2298 | transfer.sum = 0; |
| 2299 | 2299 | if (transfer.hle_enabled) |
| 2300 | 2300 | { |
| 2301 | timer_adjust(transfer.watchdog, ATTOTIME_IN_MSEC(1), transfer.writes_left | |
| 2301 | timer_adjust_oneshot(transfer.watchdog, ATTOTIME_IN_MSEC(1), transfer.writes_left | |
| 2302 | 2302 | return 1; |
| 2303 | 2303 | } |
| 2304 | 2304 | break; |
| r1679 | r1680 | |
| 2325 | 2325 | if (transfer.state == 0) |
| 2326 | 2326 | { |
| 2327 | 2327 | timer_set(ATTOTIME_IN_USEC(1), NULL, transfer.sum, s2_ack_callback); |
| 2328 | timer_adjust(transfer.watchdog, attotime_never, 0 | |
| 2328 | timer_adjust_oneshot(transfer.watchdog, attotime_never, 0 | |
| 2329 | 2329 | } |
| 2330 | 2330 | return 1; |
| 2331 | 2331 | } |
| r1679 | r1680 | |
|---|---|---|
| 418 | 418 | |
| 419 | 419 | /* now start counting clock cycles down */ |
| 420 | 420 | riot_state = RIOT_POST_COUNT; |
| 421 | timer_adjust(riot_timer, attotime_mul(ATTOTIME_IN_HZ(SH6532_CLOCK), 0xff), 0 | |
| 421 | timer_adjust_oneshot(riot_timer, attotime_mul(ATTOTIME_IN_HZ(SH6532_CLOCK), 0xff), 0 | |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | /* if not, we are done counting down */ |
| 425 | 425 | else |
| 426 | 426 | { |
| 427 | 427 | riot_state = RIOT_IDLE; |
| 428 | timer_adjust(riot_timer, attotime_never, 0 | |
| 428 | timer_adjust_oneshot(riot_timer, attotime_never, 0 | |
| 429 | 429 | } |
| 430 | 430 | } |
| 431 | 431 | |
| r1679 | r1680 | |
| 499 | 499 | |
| 500 | 500 | /* set a new timer */ |
| 501 | 501 | riot_clock_divisor = divisors[offset & 0x03]; |
| 502 | timer_adjust(riot_timer, attotime_mul(ATTOTIME_IN_HZ(SH6532_CLOCK), data * riot_clock_divisor), 0 | |
| 502 | timer_adjust_oneshot(riot_timer, attotime_mul(ATTOTIME_IN_HZ(SH6532_CLOCK), data * riot_clock_divisor), 0 | |
| 503 | 503 | riot_state = RIOT_COUNT; |
| 504 | 504 | } |
| 505 | 505 | } |
| r1679 | r1680 | |
|---|---|---|
| 800 | 800 | if (attotime_compare(schaser_effect_555_time_remain, attotime_zero) != 0) |
| 801 | 801 | { |
| 802 | 802 | /* timer re-enabled, use up remaining 555 high time */ |
| 803 | timer_adjust(schaser_effect_555_timer, schaser_effect_555_time_remain, effect | |
| 803 | timer_adjust_oneshot(schaser_effect_555_timer, schaser_effect_555_time_remain, effect | |
| 804 | 804 | } |
| 805 | 805 | else if (!schaser_effect_555_is_low) |
| 806 | 806 | { |
| 807 | 807 | /* set 555 high time */ |
| 808 | 808 | attotime new_time = attotime_make(0, ATTOSECONDS_PER_SECOND * .8873 * schaser_effect_rc[effect]); |
| 809 | timer_adjust(schaser_effect_555_timer, new_time, effect | |
| 809 | timer_adjust_oneshot(schaser_effect_555_timer, new_time, effect | |
| 810 | 810 | } |
| 811 | 811 | } |
| 812 | 812 | else |
| r1679 | r1680 | |
| 815 | 815 | if (!schaser_effect_555_is_low) |
| 816 | 816 | { |
| 817 | 817 | schaser_effect_555_time_remain = timer_timeleft(schaser_effect_555_timer); |
| 818 | timer_adjust(schaser_effect_555_timer, attotime_never, 0 | |
| 818 | timer_adjust_oneshot(schaser_effect_555_timer, attotime_never, 0 | |
| 819 | 819 | } |
| 820 | 820 | } |
| 821 | 821 | last_effect = effect; |
| r1679 | r1680 | |
| 874 | 874 | else |
| 875 | 875 | new_time = attotime_never; |
| 876 | 876 | } |
| 877 | timer_adjust(schaser_effect_555_timer, new_time, effect | |
| 877 | timer_adjust_oneshot(schaser_effect_555_timer, new_time, effect | |
| 878 | 878 | SN76477_enable_w(0, !(schaser_effect_555_is_low || schaser_explosion)); |
| 879 | 879 | SN76477_one_shot_cap_voltage_w(0, !(schaser_effect_555_is_low || schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT); |
| 880 | 880 | } |
| r1679 | r1680 | |
| 891 | 891 | MACHINE_RESET( schaser ) |
| 892 | 892 | { |
| 893 | 893 | schaser_effect_555_is_low = 0; |
| 894 | timer_adjust(schaser_effect_555_timer, attotime_never, 0 | |
| 894 | timer_adjust_oneshot(schaser_effect_555_timer, attotime_never, 0 | |
| 895 | 895 | schaser_sh_port_1_w(0, 0); |
| 896 | 896 | schaser_sh_port_2_w(0, 0); |
| 897 | 897 | schaser_effect_555_time_remain = attotime_zero; |
| r1679 | r1680 | |
|---|---|---|
| 96 | 96 | switch (data) |
| 97 | 97 | { |
| 98 | 98 | case 0x10: |
| 99 | timer_adjust(nmi_timer, attotime_never, 0 | |
| 99 | timer_adjust_oneshot(nmi_timer, attotime_never, 0 | |
| 100 | 100 | return; /* nop */ |
| 101 | 101 | } |
| 102 | timer_adjust(nmi_timer, ATTOTIME_IN_USEC(166), 0, ATTOTIME_IN_USEC(166)); | |
| 102 | timer_adjust_periodic(nmi_timer, ATTOTIME_IN_USEC(166), 0, ATTOTIME_IN_USEC(166)); | |
| 103 | 103 | |
| 104 | 104 | } |
| 105 | 105 |
| r1679 | r1680 | |
|---|---|---|
| 301 | 301 | const UINT8 gussun_decryption_table[256] = { |
| 302 | 302 | 0xcd,xxxx,xxxx,0x36,xxxx,0x52,0xb1,0x5b, 0x68,0xcd,xxxx,xxxx,xxxx,0xa8,xxxx,xxxx, /* 00 */ |
| 303 | 303 | // 0x63 gggg gggg gggg |
| 304 | xxxx,xxxx,0x75,0x24,0x08,0x83,0x32,0xe9, xxxx,0x7 | |
| 304 | xxxx,xxxx,0x75,0x24,0x08,0x83,0x32,0xe9, xxxx,0x79,xxxx,0x8f,0x22,xxxx,0xac,xxxx, /* 10 */ | |
| 305 | 305 | // ???? pppp gggg |
| 306 | 0x5d,0xa5,0x11,0x51,0x0a,0x29,0x01,xxxx ,0xf8,0x98,0x91,0x40,0x28,0x00,0x03,0x5f, /* 20 */ | |
| 307 | // gggg pppp ???? gggg gggg gggg gggg pppp | |
| 306 | 0x5d,0xa5,0x11,0x51,0x0a,0x29,xxxx,xxxx ,0xf8,0x98,0x91,0x40,0x28,0x00,0x03,0x5f, /* 20 */ | |
| 307 | // gggg pppp gggg gggg gggg gggg pppp | |
| 308 | 308 | 0x26,xxxx,xxxx,0x8b,0x2f,0x02,xxxx,xxxx, 0x8e,0xab,xxxx,xxxx,0xbc,0xf1,0xb3,xxxx, /* 30 */ |
| 309 | 309 | // gggg 0x90 |
| 310 | xxxx,0x19,0xc6,xxxx,xxxx,0x3a,0x01,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,0x01,xxxx, /* 40 */ | |
| 311 | // ???? ???? ???? | |
| 312 | xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x2c,0x7e,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */ | |
| 313 | // gggg ???? gggg pppp gggg | |
| 314 | 0xb0,xxxx,0x28,0x79,xxxx,xxxx,0xb5,0x07, 0xb9,xxxx,0x27,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */ | |
| 310 | 0x19,xxxx,0xc6,xxxx,xxxx,0x3a,xxxx,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,xxxx,xxxx, /* 40 */ | |
| 311 | // ???? | |
| 312 | xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x2c,0x7c,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */ | |
| 313 | // gggg gggg gggg pppp gggg | |
| 314 | 0xb0,xxxx,0x29,0x79,xxxx,xxxx,0xb5,0x07, 0xb9,xxxx,0x27,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */ | |
| 315 | 315 | // ???? pppp gggg gggg |
| 316 | xxxx,0xea,0x72,0x73,0xad,0xd1,0x3b,0x5e, 0xe5,0x57,xxxx,0x0d,xxxx,xxxx,xxxx,0x3c, /* 70 */ | |
| 317 | // gggg ???? | |
| 318 | xxxx,0x86,0x76,0x7f,0x08,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */ | |
| 319 | // ???? pppp ???? ???? gggg | |
| 320 | xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,0x19, /* 90 */ | |
| 321 | // ???? gggg ???? | |
| 316 | xxxx,0xea,0x72,0x73,0xad,0xd1,0x3b,0x5e, 0xe5,0x57,xxxx,0x0d,xxxx,xxxx,0x42,0x3c, /* 70 */ | |
| 317 | // gggg pppp ???? | |
| 318 | xxxx,0x86,0x78,0x7d,0x30,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */ | |
| 319 | // ???? pppp ???? pppp gggg | |
| 320 | xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,xxxx, /* 90 */ | |
| 321 | // gggg gggg | |
| 322 | 322 | xxxx,0xa3,xxxx,xxxx,xxxx,xxxx,0xfa,0xb4, xxxx,0x81,0xe6,0x48,0x80,0x8c,0xd4,xxxx, /* a0 */ |
| 323 | 323 | // gggg ???? gggg gggg |
| 324 | xxxx,0x19,0x00,0x19,0x77,0x3d,0x3e,xxxx, xxxx,0xb6,0x4b,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */ | |
| 325 | // ???? ???? ???? gggg ???? ???? pppp | |
| 324 | xxxx,xxxx,0x84,0xb6,0x77,0x3d,0x3e,xxxx, xxxx,0xb7,0x4b,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */ | |
| 325 | // gggg ???? gggg gggg ???? pppp | |
| 326 | 326 | xxxx,0xff,0x47,xxxx,0x55,0x1e,xxxx,0x59, 0x93,xxxx,xxxx,xxxx,0x88,0xc1,0x01,0xb2, /* c0 */ |
| 327 | // ???? pppp | |
| 328 | xxxx,0x2e,0x06,0xc7,0x05,xxxx,0x8a,0x5a, 0x58,0xbe,xxxx,0x4a,xxxx,0x1f,0x23,xxxx, /* d0 */ | |
| 329 | // ???? | |
| 330 | 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,0x11,0xe2, 0x38,0xfe,0x50,0x9c,xxxx,xxxx,xxxx,0x49, /* e0 */ | |
| 331 | // ???? ???? gggg | |
| 332 | 0xfb,xxxx,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,0x7d,0xf7,0xbd,0x39,0x71,0xbf,xxxx, /* f0 */ | |
| 333 | // pppp gggg pppp | |
| 327 | // gggg pppp | |
| 328 | 0x01,0x2e,0x06,0xc7,0x05,xxxx,0x8a,0x5a, 0x58,0xbe,xxxx,0x4e,xxxx,0x1f,0x23,xxxx, /* d0 */ | |
| 329 | // ???? gggg | |
| 330 | 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,xxxx,0xe2, 0x38,0xfe,0x50,0x9c,xxxx,xxxx,xxxx,0x49, /* e0 */ | |
| 331 | // gggg gggg | |
| 332 | 0xfb,0x20,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,0x76,0xf7,0xbd,0x39,0x7e,0xbf,xxxx, /* f0 */ | |
| 333 | // pppp gggg gggg gggg | |
| 334 | 334 | }; |
| 335 | 335 | |
| 336 | ||
| 336 | 337 | /* |
| 337 | 338 | missing opcode: |
| 338 | 339 | |
| r1679 | r1680 | |
| 342 | 343 | "????" -> missing |
| 343 | 344 | "0xHH" -> right code (not supported) |
| 344 | 345 | |
| 345 | 14 -> 08 (2097b 20980 - routine from 2097a) (0 | |
| 346 | 14 -> 08 (2097b 20980 - routine from 2097a) (0 | |
| 346 | 347 | - to handle the player number |
| 347 | j19 -> 79 (1df45 routine from 1df27 / 2282f - routine from 2281f to 22871) no 70,71,76,77,78,7a,7b,7c,7e,7f(ok) ok 79,7d | |
| 348 | .26 -> 29 (14ed_ , 198e_ | |
| 349 | .41 -> 19 | |
| 350 | .46 -> 10 (1461b | |
| 351 | .4e -> 19 (208ac - | |
| 352 | j5a -> 7e (195eb - (222fc - routine from 222ed to ) (7x j...) no 70,71(ok),77,79,7a,7b,7d,7f ok 76,78,7c,7e | |
| 353 | .62 -> 28 (1cf86 1cfa3 - routine from 1cf61 to 1cff4) (water in level 1) (01 11 19 29) | |
| 354 | j63 -> 78 (1df7f, 1df8c, 1df95, 21f08 - routine from 1df27 to ) no 71(ok),77(ok),7f(ok) ok 70,76,78,79 7a,7b,7c,7d,7e | |
| 355 | j82 -> 76 (76,78,7c,7e) -> | |
| 348 | .40 -> ?? | |
| 349 | j5a -> 78 (195eb - (222fc - routine from 222ed to ) (7x j...) no 70,79,7a,7b,7d,7f ok 78,7c,7e | |
| 350 | .62 -> ?? (1cf86 1cfa3 - routine from 1cf61 to 1cff4) (water in level 1) (01 11 19 29) | |
| 351 | 7e -> (1e073 - | |
| 352 | j82 -> 78 (78,7c,7e) -> | |
| 356 | 353 | .84 -> 18 (1d8f1 - routine from 1d8c7 to 1d8fc) - three bytes (00,08,18,28,30) (sprite animation) |
| 357 | .9f -> 19 ( | |
| 358 | ab -> 42 | |
| 359 | .b1 -> 19 | |
| 360 | .b2 -> 20 (20a8b - 20acc probably 20 - after the start and before the menu - to handle the player number | |
| 354 | ab -> 4f? | |
| 361 | 355 | .b3 -> 19 (216b6 - 216cf |
| 362 | b9 -> b5 (21210 - ) 2 bytes - | |
| 363 | db -> (16992 | |
| 364 | jf9 -> 7c (16d02(f 16cfa)-16598-165a1-18de7(f 18dc4) no 71,77(ok),(icons? 70,76,78,7a,7c,7e),7f maybe 79,7b,7d | |
| 356 | b9 -> b7 (21210 - ) 2 bytes - | |
| 365 | 357 | |
| 358 | ||
| 366 | 359 | rz probably: |
| 360 | 19 -> 79 (1df45 routine from 1df27 / 2282f - routine from 2281f to 22871) no 70,78,7a,7b,7c,7e,7f(ok) ok 79,7d | |
| 367 | 361 | 2d -> 00 (1df1d - routine from 1dee8 to 1df26) -> 00 - to handle sprite animation |
| 368 | 83 -> 7f (194cd - routine from) no 70,71,76,78,79,7a,7c,7d,7e ok 77(no),7b(white rocks) ok 7f | |
| 369 | b4 -> 77 (1d03a, 1d57a - routine from 1d4df ) no 70,71,76,78,79,7a,7b,7c,7d,7e,7f ok 77 | |
| 362 | 63 -> 7d (1df7f, 1df8c, 1df95, 21f08 - routine from 1df27 to ) no 70,78,7a,7b,7c,7e,7f(ok) ok 79,7d | |
| 363 | 7b -> 0d | |
| 364 | 83 -> 7f (194cd - routine from) no 70,78,79,7a,7b,7c,7d,7e ok 77(no) ok 7f | |
| 365 | 86 -> 2d | |
| 370 | 366 | ba -> 4b (1094d, 10b28 - routine from 10948 to 10b73) one byte -> probably 4b |
| 371 | c2 -> 47 (22881, 220ff - routine from 22872 to 22885) (4f?) | |
| 372 | 367 | ce -> 01 (10236 - routine from 1017e to 10254) (01, 09, 19, 21, 29, 31) -> probably 01 |
| 373 | fd -> 71 (1d659 - routine from 1d63c to 1d65e) no 70,76,77,78,79,7a,7b,7c,7d,7e,7f ok 71 | |
| 368 | f1 -> 20 to handle the player number | |
| 369 | fd -> 7e (1d659 - routine from 1d63c to 1d65e) no 70,76,77,78,79,7a,7b, 7c,7d,7e,7f ok 7e | |
| 374 | 370 | |
| 375 | 371 | rz guess: |
| 376 | 372 | 06 -> b1 (22872 - routine from 22872 to 2289d) |
| r1679 | r1680 | |
| 382 | 378 | 28 -> f8 ( |
| 383 | 379 | 29 -> 98 (1df22 - routine from 1dee8 to 1df26) -> 98 - to handle sprite animation |
| 384 | 380 | 2b -> 40 (1d4d2 1db81 1dba9 - routine from 1d4b2 to 1d4de) -> 40 |
| 385 | 2c -> 28 (20333 - routine from 2032a to 20366) | |
| 381 | 2c -> 28 (20333 - routine from 2032a to 20366) (18,28) | |
| 386 | 382 | 34 -> 2f (20381 - routine from 2037b to 20391) - used to handle number of lives and game over |
| 387 | 383 | 52 -> a0 |
| 384 | 55 -> 41 | |
| 388 | 385 | 59 -> 2c (220cf - 2037f - routine from 2202f to ) 2bytes (2c, |
| 389 | 386 | 5b -> 2b (used in "Service Mode" / "CHARACTER menu") |
| 390 | 387 | 66 -> b5 (1daaf - routine from 1da61 to 1daca) - two bytes (colors effect) |
| 391 | 388 | 6a -> 27 (20368 - routine from 20368 to 2037a) - used to limit the max lives number |
| 392 | 389 | 73 -> 73 (1d4f7 - routine from 1d4df to 1d539) -> (no 70,71,72,74,75,76,77,78,79,7a,7b,7c,7d,7e,7f) - ok 73 |
| 393 | 390 | 88 -> 9a |
| 391 | 92 -> 9d | |
| 394 | 392 | 97 -> cb |
| 395 | 393 | a7 -> b4 (2029a - routine from 20290 to |
| 396 | 394 | ad -> 8c (1d559, 1d8d4 - routine from 1d547 - ; routine from 1d8b8 to 1d8fc) .............................. |
| 397 | 395 | ae -> d4 (20215 - ) used when you insert a coin to handle the "coin number" in decimal |
| 396 | b2 -> 84 (20a8b - 20acc) 20,21,84,85 (scroll down the object) - to handle the player number | |
| 397 | b4 -> 77 (1d03a, 1d57a - routine from 1d4df ) no 70,71,76,78,79,7a,7b,7c,7d,7e,7f ok 77 | |
| 398 | b6 -> 3e | |
| 399 | c2 -> 47 (22881, 220ff - routine from 22872 to 22885) | |
| 400 | db -> 4e (18b1a) | |
| 401 | eb -> 9c | |
| 398 | 402 | ef -> 49 (dec CW) (used in "Service Mode" / "CHARACTER menu") |
| 403 | f9 -> 76 (16d02(f 16cfa)-16598-165a1-18de7(f 18dc4) no 71(no),77(no),(icons? 70,76,78,7a,7c,7e),79,7d,7f(no) maybe 76 | |
| 399 | 404 | fb -> bd |
| 400 | 405 | |
| 406 | ||
| 407 | ||
| 401 | 408 | missing V35+ core: |
| 402 | 409 | 00 -> 63 not supported (229e2 - routine from 229da to 229ec) (for now we use cd instruction + hack) |
| 403 | 410 | 0f 92 -> of 92 not supported (1011d before of STI instruction) (for now no effects) |
| r1679 | r1680 | |
|---|---|---|
| 296 | 296 | if (cddanum != -1) |
| 297 | 297 | { |
| 298 | 298 | cdda_start_audio(cddanum, lba, num_blocks); |
| 299 | timer_adjust( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 299 | timer_adjust_oneshot( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | |
| r1679 | r1680 | |
| 315 | 315 | } |
| 316 | 316 | else |
| 317 | 317 | { |
| 318 | timer_adjust( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 318 | timer_adjust_oneshot( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 319 | 319 | } |
| 320 | 320 | } |
| 321 | 321 | } |
| r1679 | r1680 | |
| 379 | 379 | akiko_set_cd_status( 0x80000000 ); /* subcode ready */ |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | timer_adjust( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 382 | timer_adjust_oneshot( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 | |
| 383 | 383 | } |
| 384 | 384 | } |
| 385 | 385 | |
| r1679 | r1680 | |
| 484 | 484 | if ( akiko.cdrom_readreqmask == 0 ) |
| 485 | 485 | akiko_set_cd_status(0x04000000); |
| 486 | 486 | else |
| 487 | timer_adjust( akiko.dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / akiko.cdrom_speed ), 0 | |
| 487 | timer_adjust_oneshot( akiko.dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / akiko.cdrom_speed ), 0 | |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | static void akiko_start_dma( void ) |
| r1679 | r1680 | |
| 500 | 500 | |
| 501 | 501 | akiko.cdrom_lba_cur = akiko.cdrom_lba_start; |
| 502 | 502 | |
| 503 | timer_adjust( akiko.dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / akiko.cdrom_speed ), 0 | |
| 503 | timer_adjust_oneshot( akiko.dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / akiko.cdrom_speed ), 0 | |
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | static void akiko_setup_response( int len, UINT8 *r1 ) |
| r1679 | r1680 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | READ8_HANDLER( stactics_horiz_pos_r ) |
| 50 | 50 | { |
| 51 | return stactics_horiz_pos+0x8 | |
| 51 | return stactics_horiz_pos+0x88; | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | INTERRUPT_GEN( stactics_interrupt ) |
| r1679 | r1680 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | param = (param + 0x10) & 0xff; |
| 66 | 66 | |
| 67 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 67 | timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 68 | 68 | |
| 69 | 69 | TTL7474_update(0); |
| 70 | 70 | } |
| r1679 | r1680 | |
| 86 | 86 | |
| 87 | 87 | /* start a timer to generate interrupts */ |
| 88 | 88 | int_timer = timer_alloc(interrupt_timer, NULL); |
| 89 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 89 | timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | MACHINE_RESET( galaxian ) |
| r1679 | r1680 | |
|---|---|---|
| 143 | 143 | { |
| 144 | 144 | logerror("%s MMU SELFTEST ROM\n", Machine->gamedrv->name); |
| 145 | 145 | rbank2 = MRA8_BANK2; |
| 146 | wbank2 = MWA8_ | |
| 146 | wbank2 = MWA8_UNMAP; | |
| 147 | 147 | } |
| 148 | 148 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x57ff, 0, 0, rbank2); |
| 149 | 149 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x57ff, 0, 0, wbank2); |
| r1679 | r1680 | |
| 162 | 162 | { |
| 163 | 163 | logerror("%s MMU BIOS ROM\n", Machine->gamedrv->name); |
| 164 | 164 | rbank3 = MRA8_BANK3; |
| 165 | wbank3 = MWA8_ | |
| 165 | wbank3 = MWA8_UNMAP; | |
| 166 | 166 | base3 = memory_region(REGION_CPU1)+0x14000; /* 8K lo BIOS */ |
| 167 | 167 | rbank4 = MRA8_BANK4; |
| 168 | wbank4 = MWA8_ | |
| 168 | wbank4 = MWA8_UNMAP; | |
| 169 | 169 | base4 = memory_region(REGION_CPU1)+0x15800; /* 4K FP ROM + 8K hi BIOS */ |
| 170 | 170 | } |
| 171 | 171 | else |
| r1679 | r1680 | |
| 197 | 197 | { |
| 198 | 198 | logerror("%s MMU BASIC ROM\n", Machine->gamedrv->name); |
| 199 | 199 | rbank1 = MRA8_BANK1; |
| 200 | wbank1 = MWA8_ | |
| 200 | wbank1 = MWA8_UNMAP; | |
| 201 | 201 | base1 = memory_region(REGION_CPU1)+0x10000; /* 8K BASIC */ |
| 202 | 202 | } |
| 203 | 203 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xbfff, 0, 0, rbank1); |
| r1679 | r1680 | |
| 216 | 216 | { |
| 217 | 217 | logerror("%s MMU SELFTEST ROM\n", Machine->gamedrv->name); |
| 218 | 218 | rbank2 = MRA8_BANK2; |
| 219 | wbank2 = MWA8_ | |
| 219 | wbank2 = MWA8_UNMAP; | |
| 220 | 220 | base2 = memory_region(REGION_CPU1)+0x15000; /* 0x0800 bytes */ |
| 221 | 221 | } |
| 222 | 222 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x5000, 0x57ff, 0, 0, rbank2); |
| r1679 | r1680 | |
|---|---|---|
| 149 | 149 | WRITE8_HANDLER( decocass_sound_nmi_enable_w ) |
| 150 | 150 | { |
| 151 | 151 | LOG(2,("CPU #%d sound NMI enb -> $%02x\n", cpu_getactivecpu(), data)); |
| 152 | timer_adjust(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); | |
| 152 | timer_adjust_periodic(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | READ8_HANDLER( decocass_sound_nmi_enable_r ) |
| 156 | 156 | { |
| 157 | 157 | UINT8 data = 0xff; |
| 158 | 158 | LOG(2,("CPU #%d sound NMI enb <- $%02x\n", cpu_getactivecpu(), data)); |
| 159 | timer_adjust(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); | |
| 159 | timer_adjust_periodic(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); | |
| 160 | 160 | return data; |
| 161 | 161 | } |
| 162 | 162 | |
| r1679 | r1680 | |
| 286 | 286 | |
| 287 | 287 | /* on reset also remove the sound timer */ |
| 288 | 288 | if (data & 1) |
| 289 | timer_adjust(decocass_sound_timer, attotime_never, 0 | |
| 289 | timer_adjust_oneshot(decocass_sound_timer, attotime_never, 0 | |
| 290 | 290 | |
| 291 | 291 | /* 8041 active low reset */ |
| 292 | 292 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data & 0x08) ^ 0x08 ); |
| r1679 | r1680 | |
| 1603 | 1603 | decocass_w(A, mem[A]); |
| 1604 | 1604 | /* restart the timer if the tape was playing */ |
| 1605 | 1605 | if (0 != tape_dir) |
| 1606 | timer_adjust(tape_timer, attotime_never, 0 | |
| 1606 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 1607 | 1607 | #endif |
| 1608 | 1608 | } |
| 1609 | 1609 | |
| r1679 | r1680 | |
| 1985 | 1985 | /* remember time */ |
| 1986 | 1986 | tape_time0 = decocass_adjust_tape_time(tape_time0); |
| 1987 | 1987 | |
| 1988 | timer_adjust(tape_timer, attotime_never, 0 | |
| 1988 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 1989 | 1989 | } |
| 1990 | 1990 | |
| 1991 | 1991 | |
| r1679 | r1680 | |
| 2018 | 2018 | { |
| 2019 | 2019 | LOG(2,("tape %5.4fs: rewind\n", attotime_to_double(tape_time0))); |
| 2020 | 2020 | tape_dir = -1; |
| 2021 | timer_adjust(tape_timer, attotime_never, 0 | |
| 2021 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 2022 | 2022 | set_led_status(0, 1); |
| 2023 | 2023 | } |
| 2024 | 2024 | else |
| r1679 | r1680 | |
| 2041 | 2041 | { |
| 2042 | 2042 | LOG(2,("tape %5.4fs: forward\n", attotime_to_double(tape_time0))); |
| 2043 | 2043 | tape_dir = +1; |
| 2044 | timer_adjust(tape_timer, attotime_never, 0 | |
| 2044 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 2045 | 2045 | set_led_status(0, 1); |
| 2046 | 2046 | } |
| 2047 | 2047 | else |
| r1679 | r1680 | |
| 2066 | 2066 | { |
| 2067 | 2067 | LOG(2,("tape: fast rewind %s\n", (0 == (data & 0x04)) ? "on" : "off")); |
| 2068 | 2068 | tape_dir = (tape_speed) ? -7 : -1; |
| 2069 | timer_adjust(tape_timer, attotime_never, 0 | |
| 2069 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 2070 | 2070 | } |
| 2071 | 2071 | else |
| 2072 | 2072 | if (tape_dir > 0) |
| 2073 | 2073 | { |
| 2074 | 2074 | LOG(2,("tape: fast forward %s\n", (0 == (data & 0x04)) ? "on" : "off")); |
| 2075 | 2075 | tape_dir = (tape_speed) ? +7 : +1; |
| 2076 | timer_adjust(tape_timer, attotime_never, 0 | |
| 2076 | timer_adjust_oneshot(tape_timer, attotime_never, 0 | |
| 2077 | 2077 | } |
| 2078 | 2078 | } |
| 2079 | 2079 |
| r1679 | r1680 | |
|---|---|---|
| 113 | 113 | else |
| 114 | 114 | logerror("vg start [busy!] "); |
| 115 | 115 | IR_CPU_STATE; |
| 116 | timer_adjust(irvg_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 116 | timer_adjust_oneshot(irvg_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 117 | 117 | #endif |
| 118 | 118 | irvg_running=1; |
| 119 | 119 | } |
| r1679 | r1680 | |
| 851 | 851 | #if IR_TIMING |
| 852 | 852 | if (irmb_running == 0) |
| 853 | 853 | { |
| 854 | timer_adjust(irmb_timer, attotime_mul(ATTOTIME_IN_HZ(12000000), icount), 0 | |
| 854 | timer_adjust_oneshot(irmb_timer, attotime_mul(ATTOTIME_IN_HZ(12000000), icount), 0 | |
| 855 | 855 | logerror("mb start "); |
| 856 | 856 | IR_CPU_STATE; |
| 857 | 857 | } |
| r1679 | r1680 | |
| 859 | 859 | { |
| 860 | 860 | logerror("mb start [busy!] "); |
| 861 | 861 | IR_CPU_STATE; |
| 862 | timer_adjust(irmb_timer, attotime_mul(ATTOTIME_IN_NSEC(200), icount), 0 | |
| 862 | timer_adjust_oneshot(irmb_timer, attotime_mul(ATTOTIME_IN_NSEC(200), icount), 0 | |
| 863 | 863 | } |
| 864 | 864 | #else |
| 865 | 865 | cpunum_set_input_line(Machine, 0, M6809_FIRQ_LINE, ASSERT_LINE); |
| r1679 | r1680 | |
|---|---|---|
| 368 | 368 | |
| 369 | 369 | MACHINE_RESET( leland ) |
| 370 | 370 | { |
| 371 | timer_adjust(master_int_timer, video_screen_get_time_until_pos(0, 8, 0), 8 | |
| 371 | timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(0, 8, 0), 8 | |
| 372 | 372 | |
| 373 | 373 | /* reset globals */ |
| 374 | 374 | leland_gfx_control = 0x00; |
| r1679 | r1680 | |
| 422 | 422 | MACHINE_RESET( ataxx ) |
| 423 | 423 | { |
| 424 | 424 | memset(extra_tram, 0, ATAXX_EXTRA_TRAM_SIZE); |
| 425 | timer_adjust(master_int_timer, video_screen_get_time_until_pos(0, 8, 0), 8 | |
| 425 | timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(0, 8, 0), 8 | |
| 426 | 426 | |
| 427 | 427 | /* initialize the XROM */ |
| 428 | 428 | xrom_length = memory_region_length(REGION_USER1); |
| r1679 | r1680 | |
| 474 | 474 | scanline += 16; |
| 475 | 475 | if (scanline > 248) |
| 476 | 476 | scanline = 8; |
| 477 | timer_adjust(master_int_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 477 | timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | |
| r1679 | r1680 | |
| 486 | 486 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 487 | 487 | |
| 488 | 488 | /* set a timer for the next one */ |
| 489 | timer_adjust(master_int_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 489 | timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | |
| r1679 | r1680 | |
| 1271 | 1271 | break; |
| 1272 | 1272 | |
| 1273 | 1273 | case 0x08: /* */ |
| 1274 | timer_adjust(master_int_timer, video_screen_get_time_until_pos(0, data + 1, 0), data + 1 | |
| 1274 | timer_adjust_oneshot(master_int_timer, video_screen_get_time_until_pos(0, data + 1, 0), data + 1 | |
| 1275 | 1275 | break; |
| 1276 | 1276 | |
| 1277 | 1277 | default: |
| r1679 | r1680 | |
|---|---|---|
| 442 | 442 | /* otherwise, flag the time as having just been written for 1/2 second */ |
| 443 | 443 | else |
| 444 | 444 | { |
| 445 | timer_adjust(pic.time_write_timer, ATTOTIME_IN_MSEC(500), 0 | |
| 445 | timer_adjust_oneshot(pic.time_write_timer, ATTOTIME_IN_MSEC(500), 0 | |
| 446 | 446 | pic.time_just_written = 1; |
| 447 | 447 | pic.state = 0; |
| 448 | 448 | } |
| r1679 | r1680 | |
|---|---|---|
| 257 | 257 | ecx = tx = -tx; |
| 258 | 258 | |
| 259 | 259 | tilebpp = (tilebpp-1) & 7; |
| 260 | pal_base = Machine-> | |
| 260 | pal_base = Machine-> | |
| 261 | 261 | cmask = colormask[tilebpp]; |
| 262 | 262 | |
| 263 | 263 | src_pitch = src_bitmap->rowpixels; |
| r1679 | r1680 | |
| 522 | 522 | src_fh = 16; |
| 523 | 523 | src_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 524 | 524 | |
| 525 | pal_base = Machine-> | |
| 525 | pal_base = Machine-> | |
| 526 | 526 | shd_base = Machine->shadow_table; |
| 527 | 527 | |
| 528 | 528 | dst_ptr = bitmap->base; |
| r1679 | r1680 | |
|---|---|---|
| 198 | 198 | cr3 = (cd_curfad>>16)&0xff; |
| 199 | 199 | cr4 = cd_curfad; |
| 200 | 200 | |
| 201 | timer_adjust(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 201 | timer_adjust_oneshot(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | // global functions |
| r1679 | r1680 | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | sector_timer = timer_alloc(sector_cb, NULL); |
| 277 | timer_adjust(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 277 | timer_adjust_oneshot(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | static blockT *cd_alloc_block(UINT8 *blknum) |
| r1679 | r1680 | |
| 776 | 776 | |
| 777 | 777 | // and do the disc I/O |
| 778 | 778 | // make sure it doesn't come in too early |
| 779 | timer_adjust(sector_timer, attotime_never, 0, attotime_never); | |
| 780 | timer_adjust(sector_timer, ATTOTIME_IN_HZ(150), 0, attotime_zero); // 150 sectors / second = 300kBytes/second | |
| 779 | timer_adjust_oneshot(sector_timer, attotime_never, 0); | |
| 780 | timer_adjust_oneshot(sector_timer, ATTOTIME_IN_HZ(150), 0); // 150 sectors / second = 300kBytes/second | |
| 781 | 781 | break; |
| 782 | 782 | |
| 783 | 783 | case 0x1100: // disk seek |
| r1679 | r1680 | |
| 1285 | 1285 | playtype = 1; |
| 1286 | 1286 | |
| 1287 | 1287 | // and do the disc I/O |
| 1288 | // timer_adjust(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 1288 | // timer_adjust_oneshot(sector_timer, ATTOTIME_IN_HZ(150), 0 | |
| 1289 | 1289 | break; |
| 1290 | 1290 | |
| 1291 | 1291 | case 0x7500: |
| r1679 | r1680 | |
|---|---|---|
| 97 | 97 | if (!dispenser[0].power) |
| 98 | 98 | { |
| 99 | 99 | LOG(("PC: %04X Ticket Power On\n", activecpu_get_pc())); |
| 100 | timer_adjust(dispenser[0].timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 100 | timer_adjust_oneshot(dispenser[0].timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 101 | 101 | dispenser[0].power = 1; |
| 102 | 102 | |
| 103 | 103 | dispenser[0].status = ticketnotdispensed; |
| r1679 | r1680 | |
| 108 | 108 | if (dispenser[0].power) |
| 109 | 109 | { |
| 110 | 110 | LOG(("PC: %04X Ticket Power Off\n", activecpu_get_pc())); |
| 111 | timer_adjust(dispenser[0].timer, attotime_never, 0 | |
| 111 | timer_adjust_oneshot(dispenser[0].timer, attotime_never, 0 | |
| 112 | 112 | set_led_status(2,0); |
| 113 | 113 | dispenser[0].power = 0; |
| 114 | 114 | } |
| r1679 | r1680 | |
| 123 | 123 | if (!dispenser[1].power) |
| 124 | 124 | { |
| 125 | 125 | LOG(("PC: %04X Ticket Power On\n", activecpu_get_pc())); |
| 126 | timer_adjust(dispenser[1].timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 126 | timer_adjust_oneshot(dispenser[1].timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 127 | 127 | dispenser[1].power = 1; |
| 128 | 128 | |
| 129 | 129 | dispenser[1].status = ticketnotdispensed; |
| r1679 | r1680 | |
| 134 | 134 | if (dispenser[1].power) |
| 135 | 135 | { |
| 136 | 136 | LOG(("PC: %04X Ticket Power Off\n", activecpu_get_pc())); |
| 137 | timer_adjust(dispenser[1].timer, attotime_never, 0 | |
| 137 | timer_adjust_oneshot(dispenser[1].timer, attotime_never, 0 | |
| 138 | 138 | set_led_status(2,0); |
| 139 | 139 | dispenser[1].power = 0; |
| 140 | 140 | } |
| r1679 | r1680 | |
| 158 | 158 | { |
| 159 | 159 | dispenser->status ^= active_bit; |
| 160 | 160 | LOG(("Ticket Status Changed to %02X\n", dispenser->status)); |
| 161 | timer_adjust(dispenser->timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 161 | timer_adjust_oneshot(dispenser->timer, ATTOTIME_IN_MSEC(time_msec), 0 | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | if (dispenser->status == ticketdispensed) |
| r1679 | r1680 | |
|---|---|---|
| 1005 | 1005 | if ((customio_command[chip] & 0x0f) == 0) |
| 1006 | 1006 | { |
| 1007 | 1007 | LOG(("disabling nmi generate timer\n")); |
| 1008 | timer_adjust(nmi_timer[chip], attotime_never, chip | |
| 1008 | timer_adjust_oneshot(nmi_timer[chip], attotime_never, chip | |
| 1009 | 1009 | } |
| 1010 | 1010 | else |
| 1011 | 1011 | { |
| r1679 | r1680 | |
| 1015 | 1015 | // inputs if a transfer terminates at the wrong time. |
| 1016 | 1016 | // On the other hand, the time cannot be too short otherwise the 54XX will |
| 1017 | 1017 | // not have enough time to process the incoming commands. |
| 1018 | timer_adjust(nmi_timer[chip], ATTOTIME_IN_USEC(200), chip, ATTOTIME_IN_USEC(200)); | |
| 1018 | timer_adjust_periodic(nmi_timer[chip], ATTOTIME_IN_USEC(200), chip, ATTOTIME_IN_USEC(200)); | |
| 1019 | 1019 | |
| 1020 | 1020 | if (customio_command[chip] & 0x10) |
| 1021 | 1021 | { |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "deprecat.h" |
| 9 | #include "debugger.h" | |
| 9 | 10 | #include "dc.h" |
| 10 | 11 | #include "cpu/sh4/sh4.h" |
| 11 | 12 | |
| r1679 | r1680 | |
| 119 | 120 | UINT32 sysctrl_regs[0x200/4]; |
| 120 | 121 | static UINT32 maple_regs[0x100/4]; |
| 121 | 122 | static UINT32 dc_rtcregister[4]; |
| 123 | static UINT32 g1bus_regs[0x100/4]; | |
| 124 | extern UINT32 dma_offset; | |
| 125 | static UINT8 maple0x86data1[0x80]; | |
| 126 | static UINT8 maple0x86data2[0x400]; | |
| 122 | 127 | |
| 123 | 128 | static UINT32 maple0x82answer[]= |
| 124 | 129 | { |
| r1679 | r1680 | |
| 137 | 142 | // non 32-bit accesses have not yet been seen here, we need to know when they are |
| 138 | 143 | if ((mem_mask != U64(0x00000000ffffffff)) && (mem_mask != U64(0xffffffff00000000))) |
| 139 | 144 | { |
| 140 | assert_always(0, "Wrong mask!\n"); | |
| 145 | mame_printf_verbose("Wrong mask! (PC=%x)\n", activecpu_get_pc()); | |
| 146 | #ifdef ENABLE_DEBUGGER | |
| 147 | mame_debug_break(); | |
| 148 | #endif | |
| 141 | 149 | } |
| 142 | 150 | |
| 143 | 151 | if (mem_mask == U64(0x00000000ffffffff)) |
| r1679 | r1680 | |
| 214 | 222 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 215 | 223 | |
| 216 | 224 | #if DEBUG_SYSCTRL |
| 217 | if ((reg != 0x40) && (reg != 0x42)) // filter out IRQ status reads | |
| 225 | if ((reg != 0x40) && (reg != 0x42) && (reg != 0x23) && (reg > 2)) // filter out IRQ status reads | |
| 218 | 226 | { |
| 219 | mame_printf_verbose("SYSCTRL: read %x @ %x (reg %x: %s), mask %llx (PC=%x)\n", sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, activecpu_get_pc()); | |
| 227 | mame_printf_verbose("SYSCTRL: [%08x] read %x @ %x (reg %x: %s), mask %llx (PC=%x)\n", 0x5f6800+reg*4, sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, activecpu_get_pc()); | |
| 220 | 228 | } |
| 221 | 229 | #endif |
| 222 | 230 | |
| r1679 | r1680 | |
| 243 | 251 | ddtdata.direction=0; |
| 244 | 252 | ddtdata.channel=2; |
| 245 | 253 | ddtdata.mode=25; //011001 |
| 254 | /*if (pp == 1) | |
| 255 | if (sysctrl_regs[SB_C2DLEN] == 0x240) | |
| 256 | pp=pp+1;*/ | |
| 246 | 257 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); |
| 258 | #if DEBUG_SYSCTRL | |
| 259 | mame_printf_verbose("SYSCTRL: Ch2 dma %x from %08x to %08x (lmmode0=%d lmmode1=%d)\n", sysctrl_regs[SB_C2DLEN], ddtdata.source-ddtdata.length, sysctrl_regs[SB_C2DSTAT],sysctrl_regs[SB_LMMODE0],sysctrl_regs[SB_LMMODE1]); | |
| 260 | #endif | |
| 247 | 261 | sysctrl_regs[SB_C2DSTAT]=sysctrl_regs[SB_C2DSTAT]+ddtdata.length; |
| 248 | 262 | sysctrl_regs[SB_C2DLEN]=0; |
| 249 | 263 | sysctrl_regs[SB_C2DST]=0; |
| r1679 | r1680 | |
| 265 | 279 | update_interrupt_status(); |
| 266 | 280 | |
| 267 | 281 | #if DEBUG_SYSCTRL |
| 268 | if ((reg != 0x40) && (reg != 0x42)) // filter out IRQ acks | |
| 282 | if ((reg != 0x40) && (reg != 0x42) && (reg > 2)) // filter out IRQ acks and ch2 dma | |
| 269 | 283 | { |
| 270 | mame_printf_verbose("SYSCTRL: write %llx to %x (reg %x | |
| 284 | mame_printf_verbose("SYSCTRL: write %llx to %x (reg %x | |
| 271 | 285 | } |
| 272 | 286 | #endif |
| 273 | 287 | } |
| r1679 | r1680 | |
| 279 | 293 | |
| 280 | 294 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 281 | 295 | |
| 296 | #if DEBUG_MAPLE | |
| 297 | mame_printf_verbose("MAPLE: Unmapped read %08x\n", 0x5f6c00+reg*4); | |
| 298 | #endif | |
| 282 | 299 | return (UINT64)maple_regs[reg] << shift; |
| 283 | 300 | } |
| 284 | 301 | |
| r1679 | r1680 | |
| 290 | 307 | struct sh4_ddt_dma ddtdata; |
| 291 | 308 | UINT32 buff[512]; |
| 292 | 309 | UINT32 endflag,port,pattern,length,command,dap,sap,destination; |
| 310 | static int jvs_command = 0,jvs_address = 0; | |
| 293 | 311 | int chk; |
| 294 | 312 | int a; |
| 313 | int off,len; | |
| 295 | 314 | |
| 296 | 315 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 297 | 316 | dat = (UINT32)(data >> shift); |
| 298 | 317 | old = maple_regs[reg]; |
| 299 | 318 | |
| 300 | 319 | #if DEBUG_MAPLE |
| 301 | mame_printf_verbose("MAPLE: write %llx to %x (reg %x: %s), mask %llx\n", data >> shift, offset, reg, maple_names[reg], mem_mask); | |
| 320 | mame_printf_verbose("MAPLE: [%08x=%x] write %llx to %x (reg %x: %s), mask %llx\n", 0x5f6c00+reg*4, dat, data >> shift, offset, reg, maple_names[reg], mem_mask); | |
| 302 | 321 | #endif |
| 303 | 322 | |
| 304 | 323 | maple_regs[reg] = dat; // 5f6c00+reg*4=dat |
| r1679 | r1680 | |
| 314 | 333 | dat=maple_regs[SB_MDSTAR]; |
| 315 | 334 | while (1) // do transfers |
| 316 | 335 | { |
| 317 | ddtdata.source=dat; | |
| 318 | ddtdata.length=3; | |
| 319 | ddtdata.size=4; | |
| 320 | ddtdata.buffer=buff; | |
| 321 | ddtdata.direction=0; | |
| 322 | ddtdata.channel= -1; | |
| 323 | ddtdata.mode= -1; | |
| 336 | ddtdata.source=dat; // source address | |
| 337 | ddtdata.length=3; // words to transfer | |
| 338 | ddtdata.size=4; // bytes per word | |
| 339 | ddtdata.buffer=buff; // destination buffer | |
| 340 | ddtdata.direction=0; // 0 source to buffer, 1 buffer to source | |
| 341 | ddtdata.channel= -1; // not used | |
| 342 | ddtdata.mode= -1; // copy from/to buffer | |
| 324 | 343 | cpunum_set_info_ptr(0, CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, &ddtdata); |
| 325 | 344 | |
| 326 | 345 | maple_regs[reg] = 0; |
| r1679 | r1680 | |
| 340 | 359 | switch (command) |
| 341 | 360 | { |
| 342 | 361 | case 1: |
| 343 | ddtdata.length=1; | |
| 344 | break; | |
| 345 | 362 | case 3: |
| 346 | 363 | ddtdata.length=1; |
| 364 | #if DEBUG_MAPLE | |
| 365 | mame_printf_verbose("MAPLE: transfer command %d port %d\n", command, port); | |
| 366 | #endif | |
| 347 | 367 | break; |
| 348 | case 0x80: // compute checksum | |
| 368 | case 0x80: // get data and compute checksum | |
| 349 | 369 | ddtdata.length=length; |
| 350 | 370 | ddtdata.direction=0; |
| 351 | 371 | ddtdata.channel= -1; |
| r1679 | r1680 | |
| 359 | 379 | chk=chk+(signed char)((buff[a] >> 16) & 255); |
| 360 | 380 | chk=chk+(signed char)((buff[a] >> 24) & 255); |
| 361 | 381 | } |
| 362 | chk=chk+(buff[0] & 255); | |
| 382 | chk=chk+(buff[0] & 255); // address (big endian !) last is 0xffffffff | |
| 363 | 383 | chk=chk+((buff[0] >> 8) & 255); |
| 364 | 384 | chk=chk+((buff[0] >> 16) & 255); |
| 365 | 385 | chk=chk+((buff[0] >> 24) & 255); |
| r1679 | r1680 | |
| 380 | 400 | ddtdata.mode=-1; |
| 381 | 401 | cpunum_set_info_ptr(0,CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA,&ddtdata); |
| 382 | 402 | |
| 383 | if ((buff[0] & 0xff) == 3) | |
| 403 | if ((buff[0] & 0xff) == 3) // read data | |
| 384 | 404 | { |
| 385 | buff[1]=0x14131211; | |
| 386 | for (a=0;a < 31;a++) | |
| 405 | for (a=0;a < 0x80;a+=4) | |
| 387 | 406 | { |
| 388 | buff[ | |
| 407 | buff[1+a/4]=(maple0x86data1[a+3] << 24)+(maple0x86data1[a+2] << 16)+(maple0x86data1[a+1] << 8)+maple0x86data1[a]; | |
| 389 | 408 | } |
| 390 | buff[1]=0x1413b1b9; // put checksum | |
| 391 | buff[5]=0x8ab82221; // put checksum | |
| 392 | 409 | ddtdata.length=0x84/4; |
| 393 | 410 | } |
| 394 | else if (( | |
| 411 | else if (( | |
| 395 | 412 | { |
| 413 | off=(buff[0] >> 8) & 0xff; | |
| 414 | len=(buff[0] >> 16) & 0xff; | |
| 415 | for (a=0;a < len;a++) | |
| 416 | maple0x86data1[off+a]=(buff[1+a/4] >> (a & 3) * 8) & 255; | |
| 417 | } | |
| 418 | else if (((buff[0] & 0xff) == 0x31) || ((buff[0] & 0xff) == 0x1)) | |
| 419 | { | |
| 396 | 420 | ddtdata.length=1; |
| 397 | 421 | } |
| 398 | 422 | else if ((buff[0] & 0xff) == 0x17) // send command into jvs serial bus !!! |
| 399 | 423 | { |
| 400 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f0,d9, 0 | |
| 401 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f1,01, 0 | |
| 402 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,01,1,10, 01,0 | |
| 403 | switch (buff[2] & 0xff) // jvs command | |
| 404 | { | |
| 405 | case 0xf0: | |
| 406 | case 0xf1: | |
| 407 | case 0x10: | |
| 408 | break; | |
| 409 | } | |
| 410 | buff[1]=0xe4e3e2e1; | |
| 411 | ddtdata.length=2; | |
| 424 | // Examples: | |
| 425 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f0,d9, 0 // ff broadcast | |
| 426 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,ff,2,f1,01, 0 // 01 can be any from 01 to 0x1f | |
| 427 | // 17,*c295407 (77),*c295404,*c295405,*c295406,0,01,1,10, 01,0 // 01 is address | |
| 428 | // Currently: | |
| 429 | // 17,?,?,?,?,?,slave address,length,jvs command bytes... | |
| 430 | jvs_address = (buff[1] >> 16) & 0xff; // slave address | |
| 431 | jvs_command = buff[2] & 0xff; // jvs command | |
| 432 | #if DEBUG_MAPLE | |
| 433 | mame_printf_verbose("MAPLE: sent jvs command %d\n", jvs_command); | |
| 434 | #endif | |
| 435 | buff[1] = 0xe4e3e2e1; | |
| 436 | ddtdata.length = 2; | |
| 412 | 437 | } |
| 413 | else if ((buff[0] & 0xff) == 0x15) | |
| 438 | else if ((buff[0] & 0xff) == 0x15) // get response from previous jvs command | |
| 414 | 439 | { |
| 440 | int tocopy; | |
| 415 | 441 | // 15,0,0,0 |
| 416 | buff[1]=0xA4A3A2A1; | |
| 417 | for (a=0;a < 7;a++) | |
| 442 | maple0x86data1[0] = 0xa0; | |
| 443 | for (a=1;a < 32;a++) | |
| 444 | maple0x86data2[a] = maple0x86data2[a-1] + 1; | |
| 445 | buff[1] = 0xA3A2A1A0; | |
| 446 | for (a=0;a < 9;a++) | |
| 418 | 447 | { |
| 419 | 448 | buff[2+a]=buff[1+a]+0x04040404; |
| 420 | 449 | } |
| 421 | buff[1]=buff[1] | 0x0c000000; | |
| 422 | buff[2]=buff[2] & 0xFFCFFFFF; | |
| 450 | buff[1] = buff[1] | 0x0c000000; | |
| 451 | maple0x86data2[3] = maple0x86data2[3] | 0x0c; | |
| 452 | buff[2] = buff[2] & 0xFFCFFFFF; | |
| 453 | maple0x86data2[6] = maple0x86data2[6] & 0xcf; | |
| 423 | 454 | |
| 424 | a=readinputport(0); // mettere qui tasti | |
| 425 | buff[2]=buff[2] | (a << 20); | |
| 426 | *(((unsigned char *)buff)+0x18)=0; | |
| 427 | *(((unsigned char *)buff)+0x1d)=1; | |
| 428 | *(((unsigned char *)buff)+0x16)=0x8e; | |
| 429 | ddtdata.length=9; | |
| 455 | a = readinputport(0); // put keys here | |
| 456 | buff[2]= buff[2] | (a << 20); | |
| 457 | maple0x86data2[6] = maple0x86data2[6] | (a << 4); | |
| 458 | if (jvs_command) | |
| 459 | *(((unsigned char *)buff)+0x15+2)=jvs_address; | |
| 460 | else | |
| 461 | *(((unsigned char *)buff)+0x15+2)=0; | |
| 462 | *(((unsigned char *)buff)+0x15+3)=0; | |
| 463 | *(((unsigned char *)buff)+0x15+8)=1; | |
| 464 | *(((unsigned char *)buff)+0x15+1)=0x8e; | |
| 465 | if (jvs_command) | |
| 466 | maple0x86data2[0x11+2] = jvs_address; | |
| 467 | else | |
| 468 | maple0x86data2[0x11+2] = 0; | |
| 469 | maple0x86data2[0x11+3] = 0; | |
| 470 | maple0x86data2[0x11+8] = 1; | |
| 471 | maple0x86data2[0x11+1] = 0x8e; | |
| 472 | maple0x86data2[0x11+9] = 1; | |
| 473 | // 4 + 1 + 0x10 + ?,8e,addr,0,?,?,addr?,len,status,report1,jvsbytes... | |
| 474 | ddtdata.length=11; | |
| 475 | tocopy=27; | |
| 476 | *(((unsigned char *)buff)+0x15+9)=1; | |
| 477 | switch (jvs_command) | |
| 478 | { | |
| 479 | case 0xf0: // reset | |
| 480 | case 0xf1: // set address | |
| 481 | break; | |
| 482 | case 0x10: | |
| 483 | strcpy((char *)(maple0x86data2+0x11+10), "MAME test JVS I/O board"); // name | |
| 484 | maple0x86data2[0x11+7]=24+2; | |
| 485 | tocopy += 24; | |
| 486 | break; | |
| 487 | case 0x11: | |
| 488 | maple0x86data2[0x11+10]=0x13; // version bcd | |
| 489 | maple0x86data2[0x11+7]=1+2; | |
| 490 | tocopy += 1; | |
| 491 | break; | |
| 492 | case 0x12: | |
| 493 | maple0x86data2[0x11+10]=0x30; // version bcd | |
| 494 | maple0x86data2[0x11+7]=1+2; | |
| 495 | tocopy += 1; | |
| 496 | break; | |
| 497 | case 0x13: | |
| 498 | maple0x86data2[0x11+10]=0x10; // version bcd | |
| 499 | maple0x86data2[0x11+7]=1+2; | |
| 500 | tocopy += 1; | |
| 501 | break; | |
| 502 | case 0x14: | |
| 503 | // four bytes for every available function | |
| 504 | // first function | |
| 505 | maple0x86data2[0x11+10]=1; | |
| 506 | maple0x86data2[0x11+11]=2; // number of players | |
| 507 | maple0x86data2[0x11+12]=7; | |
| 508 | maple0x86data2[0x11+13]=0; | |
| 509 | // second function | |
| 510 | maple0x86data2[0x11+14]=2; | |
| 511 | maple0x86data2[0x11+15]=2; // number of coin slots | |
| 512 | maple0x86data2[0x11+16]=0; | |
| 513 | maple0x86data2[0x11+17]=0; | |
| 514 | // third function | |
| 515 | maple0x86data2[0x11+18]=3; | |
| 516 | maple0x86data2[0x11+19]=2; // channels | |
| 517 | maple0x86data2[0x11+20]=8; // bits | |
| 518 | maple0x86data2[0x11+21]=0; | |
| 519 | // no more functions | |
| 520 | maple0x86data2[0x11+22]=0; | |
| 521 | maple0x86data2[0x11+7]=13+2; | |
| 522 | tocopy += 13; | |
| 523 | break; | |
| 524 | case 0x21: | |
| 525 | maple0x86data2[0x11+10]=0; // bits 7-6 status bits 5-0 higer bits of coin count | |
| 526 | maple0x86data2[0x11+11]=0; // lower bits of coin count | |
| 527 | maple0x86data2[0x11+12]=0; // like previuos two but for second coin slot | |
| 528 | maple0x86data2[0x11+13]=0; | |
| 529 | maple0x86data2[0x11+7]=4+2; | |
| 530 | tocopy += 4; | |
| 531 | break; | |
| 532 | } | |
| 533 | for (a=0;a < tocopy;a=a+4) | |
| 534 | buff[1+a/4] = maple0x86data2[a] | (maple0x86data2[a+1] << 8) | (maple0x86data2[a+2] << 16) | (maple0x86data2[a+3] << 24); | |
| 535 | jvs_command=0; | |
| 536 | ddtdata.length = (tocopy+7)/4; | |
| 430 | 537 | } |
| 431 | 538 | else if ((buff[0] & 0xff) == 0x21) |
| 432 | 539 | { |
| r1679 | r1680 | |
| 438 | 545 | ddtdata.length=1; |
| 439 | 546 | } |
| 440 | 547 | break; |
| 548 | default: | |
| 549 | #if DEBUG_MAPLE | |
| 550 | mame_printf_verbose("MAPLE: unknown transfer command %d port %d\n", command, port); | |
| 551 | #endif | |
| 552 | break; | |
| 441 | 553 | } |
| 442 | 554 | } |
| 443 | 555 | ddtdata.destination=destination; |
| r1679 | r1680 | |
| 459 | 571 | } |
| 460 | 572 | break; |
| 461 | 573 | } |
| 462 | #if DEBUG_MAPLE | |
| 463 | mame_printf_verbose("MAPLE: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 464 | #endif | |
| 465 | 574 | } |
| 466 | 575 | |
| 467 | 576 | READ64_HANDLER( dc_gdrom_r ) |
| r1679 | r1680 | |
| 500 | 609 | off=offset << 1; |
| 501 | 610 | } |
| 502 | 611 | |
| 503 | mame_printf_verbose("GDROM: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 612 | mame_printf_verbose("GDROM: [%08x=%x]write %llx to %x, mask %llx\n", 0x5f7000+off*4, dat, data, offset, mem_mask); | |
| 504 | 613 | } |
| 505 | 614 | |
| 506 | 615 | READ64_HANDLER( dc_g1_ctrl_r ) |
| 507 | 616 | { |
| 508 | return 0; | |
| 617 | int reg; | |
| 618 | UINT64 shift; | |
| 619 | ||
| 620 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 621 | mame_printf_verbose("G1CTRL: Unmapped read %08x\n", 0x5f7400+reg*4); | |
| 622 | return (UINT64)g1bus_regs[reg] << shift; | |
| 509 | 623 | } |
| 510 | 624 | |
| 511 | 625 | WRITE64_HANDLER( dc_g1_ctrl_w ) |
| 512 | 626 | { |
| 513 | mame_printf_verbose("G1CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 627 | int reg; | |
| 628 | UINT64 shift; | |
| 629 | UINT32 old,dat; | |
| 630 | struct sh4_ddt_dma ddtdata; | |
| 631 | UINT8 *ROM = (UINT8 *)memory_region(REGION_USER1); | |
| 632 | ||
| 633 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 634 | dat = (UINT32)(data >> shift); | |
| 635 | old = g1bus_regs[reg]; | |
| 636 | ||
| 637 | g1bus_regs[reg] = dat; // 5f6c00+reg*4=dat | |
| 638 | mame_printf_verbose("G1CTRL: [%08x=%x] write %llx to %x, mask %llx\n", 0x5f7400+reg*4, dat, data, offset, mem_mask); | |
| 639 | switch (reg) | |
| 640 | { | |
| 641 | case SB_GDST: | |
| 642 | if (!(old & 1) && (dat & 1)) // 0 -> 1 | |
| 643 | { | |
| 644 | if ((g1bus_regs[SB_GDEN] == 0) || (g1bus_regs[SB_GDDIR] == 0)) | |
| 645 | { | |
| 646 | mame_printf_verbose("G1CTRL: unsupported transfer\n"); | |
| 647 | return; | |
| 648 | } | |
| 649 | ddtdata.destination=g1bus_regs[SB_GDSTAR]; // destination address | |
| 650 | ddtdata.length=g1bus_regs[SB_GDLEN] >> 5; // words to transfer | |
| 651 | ddtdata.size=32; // bytes per word | |
| 652 | ddtdata.buffer=ROM+dma_offset; // buffer address | |
| 653 | ddtdata.direction=1; // 0 source to buffer, 1 buffer to destination | |
| 654 | ddtdata.channel= -1; // not used | |
| 655 | ddtdata.mode= -1; // copy from/to buffer | |
| 656 | mame_printf_verbose("G1CTRL: transfer %x from ROM %08x to sdram %08x\n", g1bus_regs[SB_GDLEN], dma_offset, g1bus_regs[SB_GDSTAR]); | |
| 657 | cpunum_set_info_ptr(0, CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, &ddtdata); | |
| 658 | g1bus_regs[SB_GDST]=0; | |
| 659 | sysctrl_regs[SB_ISTNRM] |= (1 << 14); | |
| 660 | } | |
| 661 | break; | |
| 662 | } | |
| 514 | 663 | } |
| 515 | 664 | |
| 516 | 665 | READ64_HANDLER( dc_g2_ctrl_r ) |
| 517 | 666 | { |
| 667 | int reg; | |
| 668 | UINT64 shift; | |
| 669 | ||
| 670 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 671 | mame_printf_verbose("G2CTRL: Unmapped read %08x\n", 0x5f7800+reg*4); | |
| 518 | 672 | return 0; |
| 519 | 673 | } |
| 520 | 674 | |
| 521 | 675 | WRITE64_HANDLER( dc_g2_ctrl_w ) |
| 522 | 676 | { |
| 523 | mame_printf_verbose("G2CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 677 | int reg; | |
| 678 | UINT64 shift; | |
| 679 | UINT32 dat; | |
| 680 | ||
| 681 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 682 | dat = (UINT32)(data >> shift); | |
| 683 | mame_printf_verbose("G2CTRL: [%08x=%x] write %llx to %x, mask %llx\n", 0x5f7800+reg*4, dat, data, offset, mem_mask); | |
| 524 | 684 | } |
| 525 | 685 | |
| 526 | 686 | READ64_HANDLER( dc_modem_r ) |
| 527 | 687 | { |
| 688 | int reg; | |
| 689 | UINT64 shift; | |
| 690 | ||
| 691 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 692 | mame_printf_verbose("MODEM: Unmapped read %08x\n", 0x600000+reg*4); | |
| 528 | 693 | return 0; |
| 529 | 694 | } |
| 530 | 695 | |
| 531 | 696 | WRITE64_HANDLER( dc_modem_w ) |
| 532 | 697 | { |
| 533 | mame_printf_verbose("MODEM: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 698 | int reg; | |
| 699 | UINT64 shift; | |
| 700 | UINT32 dat; | |
| 701 | ||
| 702 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 703 | dat = (UINT32)(data >> shift); | |
| 704 | mame_printf_verbose("MODEM: [%08x=%x] write %llx to %x, mask %llx\n", 0x600000+reg*4, dat, data, offset, mem_mask); | |
| 534 | 705 | } |
| 535 | 706 | |
| 536 | 707 | READ64_HANDLER( dc_rtc_r ) |
| 537 | 708 | { |
| 709 | int reg; | |
| 710 | UINT64 shift; | |
| 711 | ||
| 712 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 713 | mame_printf_verbose("RTC: Unmapped read %08x\n", 0x710000+reg*4); | |
| 538 | 714 | return 0; |
| 539 | 715 | } |
| 540 | 716 | |
| 541 | 717 | WRITE64_HANDLER( dc_rtc_w ) |
| 542 | 718 | { |
| 543 | UINT32 dat,off; | |
| 544 | UINT32 old; | |
| 719 | int reg; | |
| 720 | UINT64 shift; | |
| 721 | UINT32 old,dat; | |
| 545 | 722 | |
| 546 | if ((int)mem_mask & 1) { | |
| 547 | dat=(UINT32)(data >> 32); | |
| 548 | off=(offset << 1) | 1; | |
| 549 | } else { | |
| 550 | dat=(UINT32)data; | |
| 551 | off=offset << 1; | |
| 723 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 724 | dat = (UINT32)(data >> shift); | |
| 725 | old = dc_rtcregister[reg]; | |
| 726 | dc_rtcregister[reg] = dat & 0xFFFF; // 5f6c00+off*4=dat | |
| 727 | switch (reg) | |
| 728 | { | |
| 729 | case RTC1: | |
| 730 | if (dc_rtcregister[RTC3]) | |
| 731 | dc_rtcregister[RTC3] = 0; | |
| 732 | else | |
| 733 | dc_rtcregister[reg] = old; | |
| 734 | break; | |
| 735 | case RTC2: | |
| 736 | if (dc_rtcregister[RTC3] == 0) | |
| 737 | dc_rtcregister[reg] = old; | |
| 738 | break; | |
| 739 | case RTC3: | |
| 740 | dc_rtcregister[RTC3] &= 1; | |
| 741 | break; | |
| 552 | 742 | } |
| 553 | old = dc_rtcregister[off]; | |
| 554 | dc_rtcregister[off] = dat & 0xFFFF; // 5f6c00+off*4=dat | |
| 555 | /* switch (off) | |
| 556 | { | |
| 557 | case RTC1: | |
| 558 | if (dc_rtcregister[RTC3]) | |
| 559 | dc_rtcregister[RTC3] = 0; | |
| 560 | else | |
| 561 | dc_rtcregister[off] = old; | |
| 562 | break; | |
| 563 | case RTC2: | |
| 564 | if (dc_rtcregister[RTC3] == 0) | |
| 565 | dc_rtcregister[off] = old; | |
| 566 | break; | |
| 567 | case RTC3: | |
| 568 | dc_rtcregister[RTC3] &= 1; | |
| 569 | break; | |
| 570 | }*/ | |
| 571 | mame_printf_verbose("RTC: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 743 | mame_printf_verbose("RTC: [%08x=%x] write %llx to %x, mask %llx\n", 0x710000 + reg*4, dat, data, offset, mem_mask); | |
| 572 | 744 | } |
| 573 | 745 | |
| 574 | 746 | /*static void dc_rtc_increment(void) |
| r1679 | r1680 | |
| 580 | 752 | |
| 581 | 753 | MACHINE_RESET( dc ) |
| 582 | 754 | { |
| 755 | int a; | |
| 756 | ||
| 583 | 757 | /* halt the ARM7 */ |
| 584 | 758 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); |
| 585 | 759 | |
| r1679 | r1680 | |
| 588 | 762 | memset(dc_rtcregister, 0, sizeof(dc_rtcregister)); |
| 589 | 763 | |
| 590 | 764 | sysctrl_regs[SB_SBREV] = 0x0b; |
| 765 | for (a=0;a < 0x80;a++) | |
| 766 | maple0x86data1[a]=0x11+a; | |
| 767 | // checksums | |
| 768 | maple0x86data1[0]=0xb9; | |
| 769 | maple0x86data1[1]=0xb1; | |
| 770 | maple0x86data1[18]=0xb8; | |
| 771 | maple0x86data1[19]=0x8a; | |
| 591 | 772 | } |
| 592 | 773 | |
| 593 | 774 | READ64_HANDLER( dc_aica_reg_r ) |
| r1679 | r1680 | |
| 597 | 778 | |
| 598 | 779 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 599 | 780 | |
| 600 | ||
| 781 | mam | |
| 601 | 782 | return 0; |
| 602 | 783 | } |
| 603 | 784 | |
| r1679 | r1680 | |
| 623 | 804 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE); |
| 624 | 805 | } |
| 625 | 806 | } |
| 626 | mame_printf_verbose("AICA REG: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 807 | mame_printf_verbose("AICA REG: [%08x=%x] write %llx to %x, mask %llx\n", 0x700000+reg*4, dat, data, offset, mem_mask); | |
| 627 | 808 | } |
| r1679 | r1680 | |
|---|---|---|
| 766 | 766 | |
| 767 | 767 | // adjust the timer |
| 768 | 768 | period = attotime_mul(ATTOTIME_IN_HZ(DACRATE_NTSC), (ai_dacrate + 1) * (current->length / 4)); |
| 769 | timer_adjust(audio_timer, period, 0 | |
| 769 | timer_adjust_oneshot(audio_timer, period, 0 | |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | static void audio_fifo_pop(void) |
| r1679 | r1680 | |
| 1549 | 1549 | UINT32 *cart = (UINT32*)memory_region(REGION_USER2); |
| 1550 | 1550 | UINT64 boot_checksum; |
| 1551 | 1551 | |
| 1552 | mi_version = 0; | |
| 1553 | mi_interrupt = 0; | |
| 1554 | mi_intr_mask = 0; | |
| 1555 | ||
| 1556 | sp_mem_addr = 0; | |
| 1557 | sp_dram_addr = 0; | |
| 1558 | sp_dma_length = 0; | |
| 1559 | sp_dma_count = 0; | |
| 1560 | sp_dma_skip = 0; | |
| 1561 | sp_semaphore = 0; | |
| 1562 | ||
| 1563 | dp_start = 0; | |
| 1564 | dp_end = 0; | |
| 1565 | dp_current = 0; | |
| 1566 | dp_status = 0; | |
| 1567 | ||
| 1568 | n64_vi_width = 0; | |
| 1569 | n64_vi_origin = 0; | |
| 1570 | n64_vi_control = 0; | |
| 1571 | n64_vi_burst = n64_vi_vsync = n64_vi_hsync = n64_vi_leap = n64_vi_hstart = n64_vi_vstart = 0; | |
| 1572 | n64_vi_intr = n64_vi_vburst = n64_vi_xscale = n64_vi_yscale = 0; | |
| 1573 | ||
| 1574 | ai_dram_addr = 0; | |
| 1575 | ai_len = 0 ; | |
| 1576 | ai_control = 0; | |
| 1577 | ai_dacrate = 0; | |
| 1578 | ai_bitrate = 0; | |
| 1579 | ai_status = 0; | |
| 1580 | ||
| 1581 | memset(audio_fifo, 0, sizeof(audio_fifo)); | |
| 1582 | audio_fifo_wpos = 0; | |
| 1583 | audio_fifo_rpos = 0; | |
| 1584 | audio_fifo_num = 0; | |
| 1585 | ||
| 1586 | pi_dram_addr = 0; | |
| 1587 | pi_cart_addr = 0; | |
| 1588 | pi_first_dma = 1; | |
| 1589 | ||
| 1590 | memset(pif_ram, 0, sizeof(pif_ram)); | |
| 1591 | memset(pif_cmd, 0, sizeof(pif_cmd)); | |
| 1592 | si_dram_addr = 0; | |
| 1593 | si_pif_addr = 0; | |
| 1594 | si_status = 0; | |
| 1595 | ||
| 1596 | memset(eeprom, 0, sizeof(eeprom)); | |
| 1597 | memset(mempack, 0, sizeof(mempack)); | |
| 1598 | ||
| 1599 | cic_status = 0; | |
| 1600 | ||
| 1552 | 1601 | cpunum_set_info_int(0, CPUINFO_INT_MIPS3_DRC_OPTIONS, MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY); |
| 1553 | 1602 | |
| 1554 | 1603 | /* configure fast RAM regions for DRC */ |
| r1679 | r1680 | |
| 1559 | 1608 | cpunum_set_info_int(0, CPUINFO_INT_MIPS3_FASTRAM_READONLY, 0); |
| 1560 | 1609 | |
| 1561 | 1610 | audio_timer = timer_alloc(audio_timer_callback, NULL); |
| 1562 | timer_adjust(audio_timer, attotime_never, 0 | |
| 1611 | timer_adjust_oneshot(audio_timer, attotime_never, 0 | |
| 1563 | 1612 | |
| 1564 | 1613 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 1565 | 1614 |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | #define BANKSIZE 0x10000 |
| 16 | 16 | |
| 17 | 17 | /* which chips have their sample address table divided into pages */ |
| 18 | static | |
| 18 | static UINT8 | |
| 19 | 19 | |
| 20 | static UINT8 current_bank[8] | |
| 20 | static UINT8 current_bank[8] | |
| 21 | 21 | |
| 22 | void NMK112_ | |
| 22 | void NMK112_init(UINT8 disable_ | |
| 23 | 23 | { |
| 24 | has_paged_table[chip] = value; | |
| 24 | memset(current_bank, ~0, sizeof(current_bank)); | |
| 25 | page_mask = ~disable_page_mask; | |
| 25 | 26 | } |
| 26 | 27 | |
| 27 | 28 | WRITE8_HANDLER( NMK112_okibank_w ) |
| 28 | 29 | { |
| 29 | 30 | int chip = (offset & 4) >> 2; |
| 30 | 31 | int banknum = offset & 3; |
| 32 | int paged = (page_mask & (1 << chip)); | |
| 31 | 33 | |
| 32 | 34 | UINT8 *rom = memory_region(REGION_SOUND1 + chip); |
| 33 | 35 | int size = memory_region_length(REGION_SOUND1 + chip) - 0x40000; |
| r1679 | r1680 | |
| 37 | 39 | current_bank[offset] = data; |
| 38 | 40 | |
| 39 | 41 | /* copy the samples */ |
| 40 | if (( | |
| 42 | if (( | |
| 41 | 43 | memcpy(rom + 0x400, rom + 0x40000 + bankaddr+0x400, BANKSIZE-0x400); |
| 42 | 44 | else |
| 43 | 45 | memcpy(rom + banknum * BANKSIZE, rom + 0x40000 + bankaddr, BANKSIZE); |
| 44 | 46 | |
| 45 | 47 | /* also copy the sample address table, if it is paged on this chip */ |
| 46 | if ( | |
| 48 | if ( | |
| 47 | 49 | { |
| 48 | 50 | rom += banknum * TABLESIZE; |
| 49 | 51 | memcpy(rom, rom + 0x40000 + bankaddr, TABLESIZE); |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #ifndef NMK112_H |
| 2 | 2 | #define NMK112_H |
| 3 | 3 | |
| 4 | void NMK112_ | |
| 4 | void NMK112_init(UINT8 disable_ | |
| 5 | 5 | |
| 6 | 6 | WRITE8_HANDLER( NMK112_okibank_w ); |
| 7 | 7 | WRITE16_HANDLER( NMK112_okibank_lsb_w ); |
| r1679 | r1680 | |
|---|---|---|
| 111 | 111 | { |
| 112 | 112 | /* next interrupt after scanline 256 is scanline 64 */ |
| 113 | 113 | if (param == 256) |
| 114 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 64, 0), 64 | |
| 114 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 64, 0), 64 | |
| 115 | 115 | else |
| 116 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, param + 64, 0), param + 64 | |
| 116 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, param + 64, 0), param + 64 | |
| 117 | 117 | |
| 118 | 118 | /* IRQ starts on scanline 0, 64, 128, etc. */ |
| 119 | 119 | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, ASSERT_LINE); |
| r1679 | r1680 | |
| 192 | 192 | |
| 193 | 193 | /* start a timer to generate interrupts */ |
| 194 | 194 | scanline_timer = timer_alloc(interrupt_timer, NULL); |
| 195 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 195 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 196 | 196 | |
| 197 | 197 | /* register for saving */ |
| 198 | 198 | for (i = 0; i < 3; i++) |
| r1679 | r1680 | |
| 683 | 683 | if (counter[which].gate && !counter[which].timer_active) |
| 684 | 684 | { |
| 685 | 685 | counter[which].timer_active = 1; |
| 686 | timer_adjust(counter[which].timer, attotime_mul(ATTOTIME_IN_HZ(2000000), counter[which].count), which | |
| 686 | timer_adjust_oneshot(counter[which].timer, attotime_mul(ATTOTIME_IN_HZ(2000000), counter[which].count), which | |
| 687 | 687 | } |
| 688 | 688 | } |
| 689 | 689 | } |
| r1679 | r1680 | |
| 693 | 693 | { |
| 694 | 694 | /* only stop the timer if it exists */ |
| 695 | 695 | if (counter[which].timer_active) |
| 696 | timer_adjust(counter[which].timer, attotime_never, 0 | |
| 696 | timer_adjust_oneshot(counter[which].timer, attotime_never, 0 | |
| 697 | 697 | counter[which].timer_active = 0; |
| 698 | 698 | } |
| 699 | 699 | |
| r1679 | r1680 | |
| 932 | 932 | |
| 933 | 933 | /* if there's already a timer, remove it */ |
| 934 | 934 | if (counter_0_timer_active) |
| 935 | timer_adjust(counter_0_timer, attotime_never, 0 | |
| 935 | timer_adjust_oneshot(counter_0_timer, attotime_never, 0 | |
| 936 | 936 | counter_0_timer_active = 0; |
| 937 | 937 | |
| 938 | 938 | /* find the counter with the maximum frequency */ |
| r1679 | r1680 | |
| 957 | 957 | if (maxfreq > 0.0) |
| 958 | 958 | { |
| 959 | 959 | counter_0_timer_active = 1; |
| 960 | timer_adjust(counter_0_timer, ATTOTIME_IN_HZ(maxfreq), 0, ATTOTIME_IN_HZ(maxfreq)); | |
| 960 | timer_adjust_periodic(counter_0_timer, ATTOTIME_IN_HZ(maxfreq), 0, ATTOTIME_IN_HZ(maxfreq)); | |
| 961 | 961 | } |
| 962 | 962 | } |
| 963 | 963 | |
| r1679 | r1680 | |
| 1006 | 1006 | /* if we gate off, remove the timer */ |
| 1007 | 1007 | else if (counter[0].gate && !(data & 0x02) && counter_0_timer_active) |
| 1008 | 1008 | { |
| 1009 | timer_adjust(counter_0_timer, attotime_never, 0 | |
| 1009 | timer_adjust_oneshot(counter_0_timer, attotime_never, 0 | |
| 1010 | 1010 | counter_0_timer_active = 0; |
| 1011 | 1011 | } |
| 1012 | 1012 |
| r1679 | r1680 | |
|---|---|---|
| 82 | 82 | cpunum_set_input_line(machine, 0, G65816_LINE_NMI, HOLD_LINE ); |
| 83 | 83 | |
| 84 | 84 | // don't happen again |
| 85 | timer_adjust(snes_nmi_timer, attotime_never, 0 | |
| 85 | timer_adjust_oneshot(snes_nmi_timer, attotime_never, 0 | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | static void snes_hirq_tick(void) |
| r1679 | r1680 | |
| 94 | 94 | cpunum_set_input_line(Machine, 0, G65816_LINE_IRQ, HOLD_LINE ); |
| 95 | 95 | |
| 96 | 96 | // don't happen again |
| 97 | timer_adjust(snes_hirq_timer, attotime_never, 0 | |
| 97 | timer_adjust_oneshot(snes_hirq_timer, attotime_never, 0 | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | static TIMER_CALLBACK( snes_hirq_tick_callback ) |
| r1679 | r1680 | |
| 148 | 148 | } |
| 149 | 149 | else |
| 150 | 150 | { |
| 151 | timer_adjust(snes_hirq_timer, video_screen_get_time_until_pos(0, snes_ppu.beam.current_vert, pixel*snes_htmult), 0 | |
| 151 | timer_adjust_oneshot(snes_hirq_timer, video_screen_get_time_until_pos(0, snes_ppu.beam.current_vert, pixel*snes_htmult), 0 | |
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | } |
| r1679 | r1680 | |
| 164 | 164 | if( snes_ram[NMITIMEN] & 0x80 ) /* NMI only signaled if this bit set */ |
| 165 | 165 | { |
| 166 | 166 | // NMI goes off about 12 cycles after this (otherwise Chrono Trigger, NFL QB Club, etc. lock up) |
| 167 | timer_adjust(snes_nmi_timer, ATTOTIME_IN_CYCLES(12, 0), 0 | |
| 167 | timer_adjust_oneshot(snes_nmi_timer, ATTOTIME_IN_CYCLES(12, 0), 0 | |
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
| r1679 | r1680 | |
| 229 | 229 | |
| 230 | 230 | cpuintrf_pop_context(); |
| 231 | 231 | |
| 232 | timer_adjust(snes_scanline_timer, attotime_never, 0, attotime_never); | |
| 233 | timer_adjust(snes_hblank_timer, video_screen_get_time_until_pos(0, snes_ppu.beam.current_vert, hblank_offset*snes_htmult), 0, attotime_never); | |
| 232 | timer_adjust_oneshot(snes_scanline_timer, attotime_never, 0); | |
| 233 | timer_adjust_oneshot(snes_hblank_timer, video_screen_get_time_until_pos(0, snes_ppu.beam.current_vert, hblank_offset*snes_htmult), 0); | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /* This is called at the start of hblank *before* the scanline indicated in current_vert! */ |
| r1679 | r1680 | |
| 241 | 241 | snes_ppu.beam.current_vert = video_screen_get_vpos(0); |
| 242 | 242 | |
| 243 | 243 | /* make sure we halt */ |
| 244 | timer_adjust(snes_hblank_timer, attotime_never, 0 | |
| 244 | timer_adjust_oneshot(snes_hblank_timer, attotime_never, 0 | |
| 245 | 245 | |
| 246 | 246 | // we must guarantee the 65816's context for HDMA to work |
| 247 | 247 | cpuintrf_push_context(0); |
| r1679 | r1680 | |
| 273 | 273 | nextscan = 0; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | timer_adjust(snes_scanline_timer, video_screen_get_time_until_pos(0, nextscan, 0), 0 | |
| 276 | timer_adjust_oneshot(snes_scanline_timer, video_screen_get_time_until_pos(0, nextscan, 0), 0 | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | static void snes_init_ram(void) |
| r1679 | r1680 | |
| 320 | 320 | |
| 321 | 321 | /* init timers and stop them */ |
| 322 | 322 | snes_scanline_timer = timer_alloc(snes_scanline_tick, NULL); |
| 323 | timer_adjust(snes_scanline_timer, attotime_never, 0 | |
| 323 | timer_adjust_oneshot(snes_scanline_timer, attotime_never, 0 | |
| 324 | 324 | snes_hblank_timer = timer_alloc(snes_hblank_tick, NULL); |
| 325 | timer_adjust(snes_hblank_timer, attotime_never, 0 | |
| 325 | timer_adjust_oneshot(snes_hblank_timer, attotime_never, 0 | |
| 326 | 326 | snes_nmi_timer = timer_alloc(snes_nmi_tick, NULL); |
| 327 | timer_adjust(snes_nmi_timer, attotime_never, 0 | |
| 327 | timer_adjust_oneshot(snes_nmi_timer, attotime_never, 0 | |
| 328 | 328 | snes_hirq_timer = timer_alloc(snes_hirq_tick_callback, NULL); |
| 329 | timer_adjust(snes_hirq_timer, attotime_never, 0 | |
| 329 | timer_adjust_oneshot(snes_hirq_timer, attotime_never, 0 | |
| 330 | 330 | |
| 331 | 331 | // SNES hcounter has a 0-339 range. hblank starts at counter 260. |
| 332 | 332 | // clayfighter sets an HIRQ at 260, apparently it wants it to be before hdma kicks off, so we'll delay 2 pixels. |
| 333 | 333 | hblank_offset = 268; |
| 334 | timer_adjust(snes_hblank_timer, video_screen_get_time_until_pos(0, ((snes_ram[STAT78] & 0x10) == SNES_NTSC) ? SNES_VTOTAL_NTSC-1 : SNES_VTOTAL_PAL-1, hblank_offset), 0 | |
| 334 | timer_adjust_oneshot(snes_hblank_timer, video_screen_get_time_until_pos(0, ((snes_ram[STAT78] & 0x10) == SNES_NTSC) ? SNES_VTOTAL_NTSC-1 : SNES_VTOTAL_PAL-1, hblank_offset), 0 | |
| 335 | 335 | |
| 336 | 336 | // check if DSP1 is present (maybe not 100%?) |
| 337 | 337 | has_dsp1 = ((snes_r_bank1(0xffd6) >= 3) && (snes_r_bank1(0xffd6) <= 5)) ? 1 : 0; |
| r1679 | r1680 | |
|---|---|---|
| 1033 | 1033 | CUSTOM_REG(REG_DMACON) |= 0x4000; |
| 1034 | 1034 | |
| 1035 | 1035 | /* set a timer */ |
| 1036 | timer_adjust( amiga_blitter_timer, ATTOTIME_IN_CYCLES( blittime, 0 ), 0 | |
| 1036 | timer_adjust_oneshot( amiga_blitter_timer, ATTOTIME_IN_CYCLES( blittime, 0 ), 0 | |
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | |
| r1679 | r1680 | |
| 1399 | 1399 | |
| 1400 | 1400 | /* if 'blitter-nasty' has been turned on and we have a blit pending, reschedule it */ |
| 1401 | 1401 | if ( ( data & 0x400 ) && ( CUSTOM_REG(REG_DMACON) & 0x4000 ) ) |
| 1402 | timer_adjust( amiga_blitter_timer, ATTOTIME_IN_CYCLES( BLITTER_NASTY_DELAY, 0 ), 0 | |
| 1402 | timer_adjust_oneshot( amiga_blitter_timer, ATTOTIME_IN_CYCLES( BLITTER_NASTY_DELAY, 0 ), 0 | |
| 1403 | 1403 | |
| 1404 | 1404 | break; |
| 1405 | 1405 | |
| r1679 | r1680 | |
| 1410 | 1410 | CUSTOM_REG(offset) = data; |
| 1411 | 1411 | |
| 1412 | 1412 | if ( temp & 0x8000 ) /* if we're enabling irq's, delay a bit */ |
| 1413 | timer_adjust( amiga_irq_timer, ATTOTIME_IN_CYCLES( AMIGA_IRQ_DELAY_CYCLES, 0 ), 0 | |
| 1413 | timer_adjust_oneshot( amiga_irq_timer, ATTOTIME_IN_CYCLES( AMIGA_IRQ_DELAY_CYCLES, 0 ), 0 | |
| 1414 | 1414 | else /* if we're disabling irq's, process right away */ |
| 1415 | 1415 | update_irqs(); |
| 1416 | 1416 | break; |
| r1679 | r1680 | |
| 1427 | 1427 | CUSTOM_REG(offset) = data; |
| 1428 | 1428 | |
| 1429 | 1429 | if ( temp & 0x8000 ) /* if we're generating irq's, delay a bit */ |
| 1430 | timer_adjust( amiga_irq_timer, ATTOTIME_IN_CYCLES( AMIGA_IRQ_DELAY_CYCLES, 0 ), 0 | |
| 1430 | timer_adjust_oneshot( amiga_irq_timer, ATTOTIME_IN_CYCLES( AMIGA_IRQ_DELAY_CYCLES, 0 ), 0 | |
| 1431 | 1431 | else /* if we're clearing irq's, process right away */ |
| 1432 | 1432 | update_irqs(); |
| 1433 | 1433 | break; |
| r1679 | r1680 | |
|---|---|---|
| 532 | 532 | if (pc_keyb.on != on) |
| 533 | 533 | { |
| 534 | 534 | if (on) |
| 535 | timer_adjust(pc_keyboard_timer, keyb_delay, 0 | |
| 535 | timer_adjust_oneshot(pc_keyboard_timer, keyb_delay, 0 | |
| 536 | 536 | else |
| 537 | 537 | timer_reset(pc_keyboard_timer, attotime_never); |
| 538 | 538 |
| r1679 | r1680 | |
|---|---|---|
| 171 | 171 | |
| 172 | 172 | void atarigen_scanline_int_set(int scrnum, int scanline) |
| 173 | 173 | { |
| 174 | timer_adjust(scanline_interrupt_timer, video_screen_get_time_until_pos(scrnum, scanline, 0), scrnum | |
| 174 | timer_adjust_oneshot(scanline_interrupt_timer, video_screen_get_time_until_pos(scrnum, scanline, 0), scrnum | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
| r1679 | r1680 | |
| 275 | 275 | atarigen_scanline_int_gen(machine, 0); |
| 276 | 276 | |
| 277 | 277 | /* set a new timer to go off at the same scan line next frame */ |
| 278 | timer_adjust(scanline_interrupt_timer, video_screen_get_frame_period(param), param | |
| 278 | timer_adjust_oneshot(scanline_interrupt_timer, video_screen_get_frame_period(param), param | |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | |
| r1679 | r1680 | |
| 853 | 853 | |
| 854 | 854 | /* set a timer to go off at scanline 0 */ |
| 855 | 855 | if (scanline_callback != NULL) |
| 856 | timer_adjust(scanline_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), (scrnum << 16) | 0 | |
| 856 | timer_adjust_oneshot(scanline_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), (scrnum << 16) | 0 | |
| 857 | 857 | } |
| 858 | 858 | |
| 859 | 859 | |
| r1679 | r1680 | |
| 876 | 876 | scanline += scanlines_per_callback; |
| 877 | 877 | if (scanline >= machine->screen[scrnum].height) |
| 878 | 878 | scanline = 0; |
| 879 | timer_adjust(scanline_timer[scrnum], video_screen_get_time_until_pos(scrnum, scanline, 0), (scrnum << 16) | scanline | |
| 879 | timer_adjust_oneshot(scanline_timer[scrnum], video_screen_get_time_until_pos(scrnum, scanline, 0), (scrnum << 16) | scanline | |
| 880 | 880 | } |
| 881 | 881 | } |
| 882 | 882 | |
| r1679 | r1680 | |
| 913 | 913 | tilemap_set_scrollx(atarigen_playfield2_tilemap, 0, atarivc_state.pf1_xscroll); |
| 914 | 914 | tilemap_set_scrolly(atarigen_playfield2_tilemap, 0, atarivc_state.pf1_yscroll); |
| 915 | 915 | } |
| 916 | timer_adjust(atarivc_eof_update_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 916 | timer_adjust_oneshot(atarivc_eof_update_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 917 | 917 | |
| 918 | 918 | /* use this for debugging the video controller values */ |
| 919 | 919 | #if 0 |
| r1679 | r1680 | |
| 954 | 954 | |
| 955 | 955 | /* start a timer to go off a little before scanline 0 */ |
| 956 | 956 | if (atarivc_eof_data) |
| 957 | timer_adjust(atarivc_eof_update_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 957 | timer_adjust_oneshot(atarivc_eof_update_timer[scrnum], video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 |
| r1679 | r1680 | |
|---|---|---|
| 730 | 730 | /* counter 0 is self-updating if clocked externally */ |
| 731 | 731 | if (counter == 0 && !(m6840_state[counter].control & 0x02)) |
| 732 | 732 | { |
| 733 | timer_adjust(m6840_state[counter].timer, attotime_never, 0 | |
| 733 | timer_adjust_oneshot(m6840_state[counter].timer, attotime_never, 0 | |
| 734 | 734 | m6840_state[counter].timer_active = 0; |
| 735 | 735 | return; |
| 736 | 736 | } |
| r1679 | r1680 | |
| 751 | 751 | /* set the timer */ |
| 752 | 752 | total_period = attotime_make(0, attotime_to_attoseconds(period) * count); |
| 753 | 753 | LOG(("reload_count(%d): period = %f count = %d\n", counter, attotime_to_double(period), count)); |
| 754 | timer_adjust(m6840_state[counter].timer, total_period, (count << 2) + counter | |
| 754 | timer_adjust_oneshot(m6840_state[counter].timer, total_period, (count << 2) + counter | |
| 755 | 755 | m6840_state[counter].timer_active = 1; |
| 756 | 756 | } |
| 757 | 757 | |
| r1679 | r1680 | |
| 814 | 814 | { |
| 815 | 815 | for (i = 0; i < 3; i++) |
| 816 | 816 | { |
| 817 | timer_adjust(m6840_state[i].timer, attotime_never, 0 | |
| 817 | timer_adjust_oneshot(m6840_state[i].timer, attotime_never, 0 | |
| 818 | 818 | m6840_state[i].timer_active = 0; |
| 819 | 819 | } |
| 820 | 820 | } |
| r1679 | r1680 | |
| 1016 | 1016 | { |
| 1017 | 1017 | /* watchdog counter is clocked by 7.3728MHz crystal / 16 */ |
| 1018 | 1018 | /* watchdog is tripped when 14-bit counter overflows => / 32768 = 14.0625Hz*/ |
| 1019 | timer_adjust(ipu_watchdog_timer, ATTOTIME_IN_HZ(7372800 / 16 / 32768), 0 | |
| 1019 | timer_adjust_oneshot(ipu_watchdog_timer, ATTOTIME_IN_HZ(7372800 / 16 / 32768), 0 | |
| 1020 | 1020 | return 0xff; |
| 1021 | 1021 | } |
| 1022 | 1022 |
| r1679 | r1680 | |
|---|---|---|
| 64 | 64 | timer_period = attotime_mul(ATTOTIME_IN_HZ(44100), 128); // roughly 2.9us |
| 65 | 65 | |
| 66 | 66 | K056800_sound_cpu_timer = timer_alloc(K056800_sound_cpu_timer_tick, NULL); |
| 67 | timer_adjust(K056800_sound_cpu_timer, timer_period, 0, timer_period); | |
| 67 | timer_adjust_periodic(K056800_sound_cpu_timer, timer_period, 0, timer_period); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | READ32_HANDLER(K056800_host_r) |
| r1679 | r1680 | |
|---|---|---|
| 629 | 629 | duart_irq_state = (duart_read_data[0x05] & duart_write_data[0x05]) != 0; |
| 630 | 630 | atarigen_update_interrupts(); |
| 631 | 631 | } |
| 632 | timer_adjust(duart_timer, attotime_mul(duart_clock_period(), 65536), 0 | |
| 632 | timer_adjust_oneshot(duart_timer, attotime_mul(duart_clock_period(), 65536), 0 | |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | |
| r1679 | r1680 | |
| 656 | 656 | case 0x0e: /* Start-Counter Command 3 */ |
| 657 | 657 | { |
| 658 | 658 | int reps = (duart_write_data[0x06] << 8) | duart_write_data[0x07]; |
| 659 | timer_adjust(duart_timer, attotime_mul(duart_clock_period(), reps), 0 | |
| 659 | timer_adjust_oneshot(duart_timer, attotime_mul(duart_clock_period(), reps), 0 | |
| 660 | 660 | logerror("DUART timer started (period=%f)\n", attotime_to_double(attotime_mul(duart_clock_period(), reps))); |
| 661 | 661 | return 0x00ff; |
| 662 | 662 | } |
| 663 | 663 | case 0x0f: /* Stop-Counter Command 3 */ |
| 664 | 664 | { |
| 665 | 665 | int reps = attotime_to_double(attotime_mul(timer_timeleft(duart_timer), duart_clock())); |
| 666 | timer_adjust(duart_timer, attotime_never, 0 | |
| 666 | timer_adjust_oneshot(duart_timer, attotime_never, 0 | |
| 667 | 667 | duart_read_data[0x06] = reps >> 8; |
| 668 | 668 | duart_read_data[0x07] = reps & 0xff; |
| 669 | 669 | logerror("DUART timer stopped (final count=%04X)\n", reps); |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | static void dma_start_timer( int n_channel, UINT32 n_ticks ) |
| 144 | 144 | { |
| 145 | timer_adjust( m_p_timer_dma[ n_channel ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_ticks), n_channel | |
| 145 | timer_adjust_oneshot( m_p_timer_dma[ n_channel ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_ticks), n_channel | |
| 146 | 146 | m_p_n_dma_ticks[ n_channel ] = n_ticks; |
| 147 | 147 | m_p_b_dma_running[ n_channel ] = 1; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | static void dma_stop_timer( int n_channel ) |
| 151 | 151 | { |
| 152 | timer_adjust( m_p_timer_dma[ n_channel ], attotime_never, 0 | |
| 152 | timer_adjust_oneshot( m_p_timer_dma[ n_channel ], attotime_never, 0 | |
| 153 | 153 | m_p_b_dma_running[ n_channel ] = 0; |
| 154 | 154 | } |
| 155 | 155 | |
| r1679 | r1680 | |
| 542 | 542 | { |
| 543 | 543 | if( ( m_p_n_root_mode[ n_counter ] & RC_STOP ) != 0 ) |
| 544 | 544 | { |
| 545 | timer_adjust( m_p_timer_root[ n_counter ], attotime_never, n_count | |
| 545 | timer_adjust_oneshot( m_p_timer_root[ n_counter ], attotime_never, n_count | |
| 546 | 546 | } |
| 547 | 547 | else |
| 548 | 548 | { |
| r1679 | r1680 | |
| 556 | 556 | |
| 557 | 557 | n_duration *= root_divider( n_counter ); |
| 558 | 558 | |
| 559 | timer_adjust( m_p_timer_root[ n_counter ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_duration), n_counter | |
| 559 | timer_adjust_oneshot( m_p_timer_root[ n_counter ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_duration), n_counter | |
| 560 | 560 | } |
| 561 | 561 | } |
| 562 | 562 | |
| r1679 | r1680 | |
| 739 | 739 | n_time = attotime_never; |
| 740 | 740 | verboselog( 2, "sio_timer_adjust( %d ) finished\n", n_port ); |
| 741 | 741 | } |
| 742 | timer_adjust( m_p_timer_sio[ n_port ], n_time, n_port | |
| 742 | timer_adjust_oneshot( m_p_timer_sio[ n_port ], n_time, n_port | |
| 743 | 743 | } |
| 744 | 744 | |
| 745 | 745 | static TIMER_CALLBACK( sio_clock ) |
| r1679 | r1680 | |
|---|---|---|
| 273 | 273 | /* set a timer for the next update */ |
| 274 | 274 | scanline += 0x20; |
| 275 | 275 | if (scanline >= 256) scanline = 0; |
| 276 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 276 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | |
| r1679 | r1680 | |
| 293 | 293 | timer_set(video_screen_get_time_until_pos(0, 0, 0), NULL, 0, williams_count240_off_callback); |
| 294 | 294 | |
| 295 | 295 | /* set a timer for next frame */ |
| 296 | timer_adjust(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0 | |
| 296 | timer_adjust_oneshot(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0 | |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | |
| r1679 | r1680 | |
| 364 | 364 | |
| 365 | 365 | /* set a timer to go off every 16 scanlines, to toggle the VA11 line and update the screen */ |
| 366 | 366 | scanline_timer = timer_alloc(williams_va11_callback, NULL); |
| 367 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 367 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 368 | 368 | |
| 369 | 369 | /* also set a timer to go off on scanline 240 */ |
| 370 | 370 | scan240_timer = timer_alloc(williams_count240_callback, NULL); |
| 371 | timer_adjust(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0 | |
| 371 | timer_adjust_oneshot(scan240_timer, video_screen_get_time_until_pos(0, 240, 0), 0 | |
| 372 | 372 | |
| 373 | 373 | state_save_register_global(vram_bank); |
| 374 | 374 | } |
| r1679 | r1680 | |
| 402 | 402 | /* set a timer for the next update */ |
| 403 | 403 | scanline += 0x20; |
| 404 | 404 | if (scanline >= 256) scanline = 0; |
| 405 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 405 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | |
| r1679 | r1680 | |
| 422 | 422 | timer_set(video_screen_get_time_until_pos(0, 8, 0), NULL, 0, williams2_endscreen_off_callback); |
| 423 | 423 | |
| 424 | 424 | /* set a timer for next frame */ |
| 425 | timer_adjust(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0 | |
| 425 | timer_adjust_oneshot(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0 | |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | |
| r1679 | r1680 | |
| 453 | 453 | |
| 454 | 454 | /* set a timer to go off every 16 scanlines, to toggle the VA11 line and update the screen */ |
| 455 | 455 | scanline_timer = timer_alloc(williams2_va11_callback, NULL); |
| 456 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 456 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 457 | 457 | |
| 458 | 458 | /* also set a timer to go off on scanline 254 */ |
| 459 | 459 | scan254_timer = timer_alloc(williams2_endscreen_callback, NULL); |
| 460 | timer_adjust(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0 | |
| 460 | timer_adjust_oneshot(scan254_timer, video_screen_get_time_until_pos(0, 254, 0), 0 | |
| 461 | 461 | |
| 462 | 462 | state_save_register_global(vram_bank); |
| 463 | 463 | state_save_register_func_postload(williams2_postload); |
| r1679 | r1680 | |
|---|---|---|
| 388 | 388 | M_STOP--; /* Decrease count */ |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | timer_adjust(math_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), mptime), 1 | |
| 391 | timer_adjust_oneshot(math_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), mptime), 1 | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | next_vpos = vysnc_chain_counter_to_vpos(next_counter, next_vblank); |
| 84 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0 | |
| 84 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0 | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| r1679 | r1680 | |
| 94 | 94 | static void mw8080bw_start_interrupt_timer(void) |
| 95 | 95 | { |
| 96 | 96 | int vpos = vysnc_chain_counter_to_vpos(MW8080BW_INT_TRIGGER_COUNT_1, MW8080BW_INT_TRIGGER_VBLANK_1); |
| 97 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 97 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 |
| r1679 | r1680 | |
|---|---|---|
| 141 | 141 | DRIVER( galaxiaj ) /* (c) Namco */ |
| 142 | 142 | DRIVER( galmidw ) /* (c) Midway */ |
| 143 | 143 | DRIVER( galmidwo ) /* (c) Midway */ |
| 144 | DRIVER( galtaito ) /* (c) Taito */ | |
| 144 | 145 | DRIVER( superg ) /* hack */ |
| 145 | 146 | DRIVER( galapx ) /* hack */ |
| 146 | 147 | DRIVER( moonaln ) /* [Nichibutsu] (Karateco license) or hack */ |
| r1679 | r1680 | |
| 2045 | 2046 | DRIVER( hellfir1 ) /* B90 / TP-??? (c) 1989 Toaplan + Taito license */ |
| 2046 | 2047 | DRIVER( hellfir2 ) /* B90 / TP-??? (c) 1989 Toaplan + Taito license */ |
| 2047 | 2048 | DRIVER( zerowing ) /* TP-015 (c) 1989 Toaplan */ |
| 2049 | DRIVER( zerowng2 ) /* TP-015 (c) 1989 Toaplan */ | |
| 2048 | 2050 | DRIVER( demonwld ) /* TP-016 (c) 1990 Toaplan (+ Taito license when set to Japan) */ |
| 2049 | 2051 | DRIVER( demonwl1 ) /* TP-016 (c) 1989 Toaplan + Taito license */ |
| 2050 | 2052 | DRIVER( demonwl2 ) /* TP-016 (c) 1989 Toaplan */ |
| r1679 | r1680 | |
| 4473 | 4475 | DRIVER( jailbrek ) /* GX507 (c) 1986 */ |
| 4474 | 4476 | DRIVER( manhatan ) /* GX507 (c) 1986 (Japan) */ |
| 4475 | 4477 | DRIVER( jailbrkb ) /* bootleg */ |
| 4476 | ||
| 4478 | | |
| 4477 | 4479 | DRIVER( finalizr ) /* GX523 (c) 1985 */ |
| 4478 | 4480 | DRIVER( finalizb ) /* bootleg */ |
| 4479 | 4481 | DRIVER( ironhors ) /* GX560 (c) 1986 */ |
| r1679 | r1680 | |
| 4485 | 4487 | DRIVER( topgunbl ) /* bootleg */ |
| 4486 | 4488 | DRIVER( ddribble ) /* GX690 (c) 1986 */ |
| 4487 | 4489 | DRIVER( contra ) /* GX633 (c) 1987 */ |
| 4490 | DRIVER( contra1 ) /* GX633 (c) 1987 */ | |
| 4488 | 4491 | DRIVER( contrab ) /* bootleg */ |
| 4489 | 4492 | DRIVER( contraj ) /* GX633 (c) 1987 (Japan) */ |
| 4490 | 4493 | DRIVER( contrajb ) /* bootleg */ |
| r1679 | r1680 | |
| 6063 | 6066 | DRIVER( gauntd24 ) /* (c) 1999 Midway Games */ |
| 6064 | 6067 | DRIVER( cartfury ) /* (c) 2000 Midway Games */ |
| 6065 | 6068 | |
| 6066 | /* Midway Touchmaster | |
| 6069 | /* Midway Touchmaster / Galaxy Games */ | |
| 6067 | 6070 | DRIVER( tm ) /* (c) 1996 Midway Games */ |
| 6068 | 6071 | DRIVER( tm3k ) /* (c) 1996 Midway Games */ |
| 6069 | 6072 | DRIVER( tm4k ) /* (c) 1996 Midway Games */ |
| 6073 | DRIVER( galgbios ) /* (c) 1998 Creative Electonics & Software (CES) */ | |
| 6070 | 6074 | |
| 6071 | 6075 | /* Cinematronics raster games */ |
| 6072 | 6076 | DRIVER( embargo ) |
| r1679 | r1680 | |
| 6368 | 6372 | DRIVER( kirarast ) /* (c) 1996 */ |
| 6369 | 6373 | DRIVER( tp2m32 ) /* (c) 1997 */ |
| 6370 | 6374 | DRIVER( bnstars ) /* (c) 1997 */ |
| 6375 | DRIVER( wpksocv2 ) /* (c) 1997 */ | |
| 6371 | 6376 | |
| 6372 | 6377 | DRIVER( f1superb ) /* (c) 1994 */ |
| 6373 | 6378 | |
| r1679 | r1680 | |
| 6590 | 6595 | DRIVER( blazeon ) /* (c) 1992 Atlus */ |
| 6591 | 6596 | DRIVER( sandscrp ) /* (c) 1992 Face */ |
| 6592 | 6597 | DRIVER( sandscra ) /* (c) 1992 Face */ |
| 6598 | DRIVER( sandscrb ) /* (c) 1992 Face */ | |
| 6593 | 6599 | DRIVER( explbrkr ) /* (c) 1992 Kaneko */ |
| 6594 | 6600 | DRIVER( bakubrkr ) /* (c) 1992 Kaneko */ |
| 6595 | 6601 | DRIVER( shogwarr ) /* (c) 1992 Kaneko */ |
| r1679 | r1680 | |
| 7781 | 7787 | DRIVER( pkscram ) /* (c) 1993 Cosmo Electronics Corporation */ |
| 7782 | 7788 | DRIVER( jollycrd ) /* (c) 1985 TAB-Austria */ |
| 7783 | 7789 | DRIVER( jolycdae ) /* (c) 1985 TAB-Austria */ |
| 7790 | DRIVER( jolyc3x3 ) /* (c) 1985 TAB-Austria */ | |
| 7791 | DRIVER( jolyc980 ) /* (c) 2000 Spale-Soft */ | |
| 7784 | 7792 | DRIVER( jolycdcr ) /* (c) 1993 Soft Design */ |
| 7785 | 7793 | DRIVER( jolycdit ) /* 199? bootleg */ |
| 7786 | DRIVER( jolycdat ) /* (c) 1986 Fun World */ | |
| 7787 | DRIVER( jolycdab ) /* (c) 1990 Inter Games */ | |
| 7788 | DRIVER( bigdeal ) /* (c) 1986 Fun World */ | |
| 7789 | DRIVER( bigdealb ) /* (c) 1986 Fun World */ | |
| 7794 | DRIVER( jolycdab ) /* (c) 1986 Inter Games */ | |
| 7795 | DRIVER( bigdeal ) /* (c) 1986 Funworld */ | |
| 7796 | DRIVER( bigdealb ) /* (c) 1986 Funworld */ | |
| 7797 | DRIVER( jolycdat ) /* (c) 1986 Funworld */ | |
| 7790 | 7798 | DRIVER( cuoreuno ) /* (c) 1996 C.M.C. */ |
| 7791 | DRIVER( elephfam ) /* (c) 199 | |
| 7799 | DRIVER( elephfam ) /* (c) 1997 C.M.C. */ | |
| 7792 | 7800 | DRIVER( elephfmb ) /* (c) 1996 C.M.C. */ |
| 7793 | 7801 | DRIVER( pool10 ) /* (c) 1996 C.M.C. */ |
| 7794 | 7802 | DRIVER( pool10b ) /* (c) 1996 C.M.C. */ |
| 7795 | 7803 | DRIVER( tortufam ) /* (c) 1997 C.M.C. */ |
| 7796 | 7804 | DRIVER( royalcrd ) /* (c) 1991 TAB-Austria */ |
| 7797 | 7805 | DRIVER( royalcdb ) /* (c) 1991 TAB-Austria */ |
| 7798 | DRIVER( royalcdc ) /* (c) 199? Evona Electronic */ | |
| 7806 | DRIVER( royalcdc ) /* (c) 1991 Evona Electronic */ | |
| 7807 | DRIVER( lluck3x3 ) /* (c) 1991 TAB-Austria */ | |
| 7808 | DRIVER( lluck4x1 ) /* (c) 1991 TAB-Austria */ | |
| 7799 | 7809 | DRIVER( magiccrd ) /* (c) 1996 Impera */ |
| 7810 | DRIVER( magiccda ) /* (c) 1996 Impera */ | |
| 7811 | DRIVER( magiccdb ) /* (c) 1996 Impera */ | |
| 7812 | DRIVER( vegasslw ) /* (c) 1993 Funworld */ | |
| 7813 | DRIVER( vegasfst ) /* (c) 1993 Soft Design */ | |
| 7800 | 7814 | DRIVER( jokercrd ) /* (c) 1993 Vesely Svet */ |
| 7801 | DRIVER( mongl | |
| 7815 | DRIVER( mongolnw | |
| 7802 | 7816 | DRIVER( soccernw ) /* 199? bootleg */ |
| 7803 | 7817 | DRIVER( snookr10 ) /* (c) 1998 Sandiy */ |
| 7804 | 7818 | DRIVER( saloon ) /* 199? unknown */ |
| r1679 | r1680 | |
| 7925 | 7939 | DRIVER( drw80pkr ) |
| 7926 | 7940 | DRIVER( blazlaz ) |
| 7927 | 7941 | DRIVER( paranoia ) |
| 7928 | DRIVER( galgbios ) /* (c) 1998 Creative Electonics */ | |
| 7942 | DRIVER( vcombat ) /* (c) 1993 VR8 Inc. */ | |
| 7943 | DRIVER( shadfgtr ) /* (c) 1989 Sega? */ | |
| 7929 | 7944 | |
| 7930 | 7945 | #endif /* DRIVER_RECURSIVE */ |
| r0 | r1680 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | IREM M-10,M-11 and M-15 based hardware | |
| 4 | ||
| 5 | ****************************************************************************/ | |
| 6 | ||
| 7 | ||
| 8 | #define IREMM10_MASTER_CLOCK (25000000) | |
| 9 | ||
| 10 | #define IREMM10_CPU_CLOCK (IREMM10_MASTER_CLOCK/20) | |
| 11 | #define IREMM10_PIXEL_CLOCK (IREMM10_MASTER_CLOCK/5) | |
| 12 | #define IREMM10_HTOTAL (318) | |
| 13 | #define IREMM10_HBSTART (248) | |
| 14 | #define IREMM10_HBEND (8) | |
| 15 | #define IREMM10_VTOTAL (262) | |
| 16 | #define IREMM10_VBSTART (240) | |
| 17 | #define IREMM10_VBEND (16) | |
| 18 | ||
| 19 | #define IREMM15_MASTER_CLOCK (11730000) | |
| 20 | ||
| 21 | #define IREMM15_CPU_CLOCK (IREMM15_MASTER_CLOCK/10) | |
| 22 | #define IREMM15_PIXEL_CLOCK (IREMM15_MASTER_CLOCK/2) | |
| 23 | #define IREMM15_HTOTAL (372) | |
| 24 | #define IREMM15_HBSTART (256) | |
| 25 | #define IREMM15_HBEND (0) | |
| 26 | #define IREMM15_VTOTAL (262) | |
| 27 | #define IREMM15_VBSTART (240) | |
| 28 | #define IREMM15_VBEND (16) | |
| 29 | ||
| 30 | typedef struct _m10_state m10_state; | |
| 31 | struct _m10_state | |
| 32 | { | |
| 33 | /* memory pointers */ | |
| 34 | UINT8 * chargen; | |
| 35 | UINT8 * memory; | |
| 36 | UINT8 * rom; | |
| 37 | ||
| 38 | /* machine states */ | |
| 39 | ||
| 40 | /* sound state */ | |
| 41 | ||
| 42 | /* video state */ | |
| 43 | UINT8 bottomline; | |
| 44 | UINT8 flip; | |
| 45 | ||
| 46 | /* Specific states */ | |
| 47 | }; | |
| 48 | ||
| 49 | ||
| 50 | /*----------- defined in video/m10.c -----------*/ | |
| 51 | ||
| 52 | ||
| 53 | WRITE8_HANDLER( m10_colorram_w ); | |
| 54 | WRITE8_HANDLER( m15_chargen_w ); | |
| 55 | ||
| 56 | VIDEO_UPDATE( m10 ); | |
| 57 | VIDEO_UPDATE( m15 ); | |
| 58 | ||
| 59 | VIDEO_START( m10 ); | |
| 60 | VIDEO_START( m15 ); | |
| 61 |
| r0 | r1680 | |
|---|---|---|
| 1 | extern UINT8 *nova2001_fg_videoram, *nova2001_bg_videoram; | |
| 2 | ||
| 3 | extern WRITE8_HANDLER( nova2001_fg_videoram_w ); | |
| 4 | extern WRITE8_HANDLER( nova2001_bg_videoram_w ); | |
| 5 | extern WRITE8_HANDLER( ninjakun_bg_videoram_w ); | |
| 6 | extern READ8_HANDLER( ninjakun_bg_videoram_r ); | |
| 7 | extern WRITE8_HANDLER( nova2001_scroll_x_w ); | |
| 8 | extern WRITE8_HANDLER( nova2001_scroll_y_w ); | |
| 9 | extern WRITE8_HANDLER( nova2001_flipscreen_w ); | |
| 10 | extern WRITE8_HANDLER( pkunwar_flipscreen_w ); | |
| 11 | extern WRITE8_HANDLER( ninjakun_paletteram_w ); | |
| 12 | ||
| 13 | extern PALETTE_INIT( nova2001 ); | |
| 14 | extern VIDEO_START( nova2001 ); | |
| 15 | extern VIDEO_UPDATE( nova2001 ); | |
| 16 | extern VIDEO_START( ninjakun ); | |
| 17 | extern VIDEO_UPDATE( ninjakun ); | |
| 18 | extern VIDEO_START( pkunwar ); | |
| 19 | extern VIDEO_UPDATE( pkunwar ); | |
| 20 | extern VIDEO_START( raiders5 ); | |
| 21 | extern VIDEO_UPDATE( raiders5 ); |
| r1679 | r1680 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | ||
| 8 | #define CVS_S2636_Y_OFFSET (3) | |
| 9 | #define CVS_S2636_X_OFFSET (-26) | |
| 10 | ||
| 11 | ||
| 7 | 12 | /*----------- defined in driver/cvs.c -----------*/ |
| 8 | 13 | |
| 9 | 14 | extern UINT8 *cvs_color_ram; |
| r1679 | r1680 | |
| 11 | 16 | extern UINT8 *cvs_bullet_ram; |
| 12 | 17 | extern UINT8 *cvs_palette_ram; |
| 13 | 18 | extern UINT8 *cvs_character_ram; |
| 19 | extern UINT8 *cvs_s2636_0_ram; | |
| 20 | extern UINT8 *cvs_s2636_1_ram; | |
| 21 | extern UINT8 *cvs_s2636_2_ram; | |
| 14 | 22 | |
| 15 | 23 | MACHINE_START( cvs ); |
| 16 | 24 | |
| r1679 | r1680 | |
| 20 | 28 | READ8_HANDLER( cvs_bullet_ram_or_palette_r ); |
| 21 | 29 | WRITE8_HANDLER( cvs_bullet_ram_or_palette_w ); |
| 22 | 30 | |
| 31 | READ8_HANDLER( cvs_s2636_0_or_character_ram_r ); | |
| 32 | WRITE8_HANDLER( cvs_s2636_0_or_character_ram_w ); | |
| 23 | 33 | READ8_HANDLER( cvs_s2636_1_or_character_ram_r ); |
| 24 | 34 | WRITE8_HANDLER( cvs_s2636_1_or_character_ram_w ); |
| 25 | 35 | READ8_HANDLER( cvs_s2636_2_or_character_ram_r ); |
| 26 | 36 | WRITE8_HANDLER( cvs_s2636_2_or_character_ram_w ); |
| 27 | READ8_HANDLER( cvs_s2636_3_or_character_ram_r ); | |
| 28 | WRITE8_HANDLER( cvs_s2636_3_or_character_ram_w ); | |
| 29 | 37 | |
| 30 | 38 | UINT8 cvs_get_character_banking_mode(void); |
| 31 | 39 | |
| 32 | 40 | |
| 33 | 41 | /*----------- defined in video/cvs.c -----------*/ |
| 34 | 42 | |
| 35 | extern mame_bitmap *cvs_collision_bitmap; | |
| 36 | 43 | extern mame_bitmap *cvs_collision_background; |
| 37 | 44 | extern int cvs_collision_register; |
| 38 | 45 | |
| r1679 | r1680 | |
| 47 | 54 | READ8_HANDLER( cvs_collision_clear ); |
| 48 | 55 | |
| 49 | 56 | void cvs_scroll_stars(void); |
| 50 |
| r1679 | r1680 | |
|---|---|---|
| 39 | 39 | #define SB_C2DSTAT ((0x005F6800-0x005F6800)/4) |
| 40 | 40 | #define SB_C2DLEN ((0x005F6804-0x005F6800)/4) |
| 41 | 41 | #define SB_C2DST ((0x005F6808-0x005F6800)/4) |
| 42 | #define SB_LMMODE0 ((0x005F6884-0x005F6800)/4) | |
| 43 | #define SB_LMMODE1 ((0x005F6888-0x005F6800)/4) | |
| 42 | 44 | #define SB_SBREV ((0x005F689c-0x005F6800)/4) |
| 43 | 45 | #define SB_ISTNRM ((0x005F6900-0x005F6800)/4) |
| 44 | 46 | #define SB_ISTEXT ((0x005F6904-0x005F6800)/4) |
| r1679 | r1680 | |
| 56 | 58 | |
| 57 | 59 | /*address*/ |
| 58 | 60 | #define SB_MDSTAR ((0x005F6C04-0x005F6C00)/4) |
| 61 | #define SB_MDTSEL ((0x005F6C10-0x005F6C00)/4) | |
| 62 | #define SB_MDEN ((0x005F6C14-0x005F6C00)/4) | |
| 59 | 63 | #define SB_MDST ((0x005F6C18-0x005F6C00)/4) |
| 60 | #define SB_MDTSEL ((0x005F6C10-0x005F6C00)/4) | |
| 61 | 64 | #define SB_MSYS ((0x005F6C80-0x005F6C00)/4) |
| 65 | #define SB_MST ((0x005F6C84-0x005F6C00)/4) | |
| 66 | #define SB_MSHTCL ((0x005F6C88-0x005F6C00)/4) | |
| 67 | #define SB_MDAPRO ((0x005F6C8C-0x005F6C00)/4) | |
| 68 | #define SB_MMSEL ((0x005F6CE8-0x005F6C00)/4) | |
| 62 | 69 | |
| 70 | #define SB_GDSTAR ((0x005F7404-0x005F7400)/4) | |
| 71 | #define SB_GDLEN ((0x005F7408-0x005F7400)/4) | |
| 72 | #define SB_GDDIR ((0x005F740C-0x005F7400)/4) | |
| 73 | #define SB_GDEN ((0x005F7414-0x005F7400)/4) | |
| 74 | #define SB_GDST ((0x005F7418-0x005F7400)/4) | |
| 75 | #define SB_G1RRC ((0x005F7480-0x005F7400)/4) | |
| 76 | #define SB_G1RWC ((0x005F7484-0x005F7400)/4) | |
| 77 | #define SB_G1FRC ((0x005F7488-0x005F7400)/4) | |
| 78 | #define SB_G1FWC ((0x005F748C-0x005F7400)/4) | |
| 79 | #define SB_G1CRC ((0x005F7490-0x005F7400)/4) | |
| 80 | #define SB_G1CWC ((0x005F7494-0x005F7400)/4) | |
| 81 | #define SB_G1GDRC ((0x005F74A0-0x005F7400)/4) | |
| 82 | #define SB_G1GDWC ((0x005F74A4-0x005F7400)/4) | |
| 83 | #define SB_G1SYSM ((0x005F74B0-0x005F7400)/4) | |
| 84 | #define SB_G1CRDYC ((0x005F74B4-0x005F7400)/4) | |
| 85 | #define SB_GDAPRO ((0x005F74B8-0x005F7400)/4) | |
| 63 | 86 | |
| 87 | #define RTC1 ((0x00710000-0x00710000)/4) | |
| 88 | #define RTC2 ((0x00710004-0x00710000)/4) | |
| 89 | #define RTC3 ((0x00710008-0x00710000)/4) | |
| 90 | ||
| 91 | ||
| 64 | 92 | /*----------- defined in video/dc.c -----------*/ |
| 65 | 93 | |
| 66 | 94 | READ64_HANDLER( pvr_ctrl_r ); |
| r1679 | r1680 | |
| 81 | 109 | #define VO_CONTROL ((0x005F80E8-0x005F8000)/4) |
| 82 | 110 | #define SPG_STATUS ((0x005F810c-0x005F8000)/4) |
| 83 | 111 | #define TA_LIST_INIT ((0x005F8144-0x005F8000)/4) |
| 112 | #define TA_OL_BASE ((0x005F8124-0x005F8000)/4) | |
| 113 | #define TA_ISP_BASE ((0x005F8128-0x005F8000)/4) | |
| 114 | #define TA_OL_LIMIT ((0x005F812C-0x005F8000)/4) | |
| 115 | #define TA_ISP_LIMIT ((0x005F8130-0x005F8000)/4) | |
| 116 | #define TA_ALLOC_CTRL ((0x005F8140-0x005F8000)/4) | |
| 117 | #define PARAM_BASE ((0x005F8020-0x005F8000)/4) | |
| 118 | #define REGION_BASE ((0x005F802C-0x005F8000)/4) | |
| 119 | #define TA_NEXT_OPB_INIT ((0x005F8164-0x005F8000)/4) | |
| 120 | #define TA_NEXT_OPB ((0x005F8134-0x005F8000)/4) | |
| 121 | #define TA_ITP_CURRENT ((0x005F8138-0x005F8000)/4) | |
| 84 | 122 | |
| 85 | ||
| 86 | 123 | #endif |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | extern UINT8 qix_cocktail_flip; |
| 51 | 51 | |
| 52 | 52 | VIDEO_START( qix ); |
| 53 | VIDEO_UPDATE( qix ); | |
| 53 | 54 | |
| 55 | WRITE8_HANDLER( qix_mc6845_address_w ); | |
| 56 | READ8_HANDLER( qix_mc6845_register_r ); | |
| 57 | WRITE8_HANDLER( qix_mc6845_register_w ); | |
| 54 | 58 | READ8_HANDLER( qix_scanline_r ); |
| 55 | 59 | READ8_HANDLER( qix_videoram_r ); |
| 56 | 60 | WRITE8_HANDLER( qix_videoram_w ); |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | extern UINT8 *fastfred_spriteram; |
| 12 | 12 | extern size_t fastfred_spriteram_size; |
| 13 | 13 | extern UINT8 *fastfred_attributesram; |
| 14 | extern UINT8 *fastfred_background_color; | |
| 14 | 15 | |
| 15 | 16 | PALETTE_INIT( fastfred ); |
| 16 | 17 | VIDEO_START( fastfred ); |
| r1679 | r1680 | |
| 20 | 21 | WRITE8_HANDLER( fastfred_charbank2_w ); |
| 21 | 22 | WRITE8_HANDLER( fastfred_colorbank1_w ); |
| 22 | 23 | WRITE8_HANDLER( fastfred_colorbank2_w ); |
| 23 | WRITE8_HANDLER( fastfred_background_color_w ); | |
| 24 | 24 | WRITE8_HANDLER( fastfred_flip_screen_x_w ); |
| 25 | 25 | WRITE8_HANDLER( fastfred_flip_screen_y_w ); |
| 26 | 26 | VIDEO_UPDATE( fastfred ); |
| r1679 | r1680 | |
|---|---|---|
| 755 | 755 | $(MACHINE)/pgmy2ks.o \ |
| 756 | 756 | |
| 757 | 757 | $(MAMEOBJ)/irem.a: \ |
| 758 | $(DRIVERS)/m10.o $(VIDEO)/m10.o \ | |
| 758 | 759 | $(DRIVERS)/m52.o $(VIDEO)/m52.o \ |
| 759 | 760 | $(DRIVERS)/m57.o $(VIDEO)/m57.o \ |
| 760 | 761 | $(DRIVERS)/m58.o $(VIDEO)/m58.o \ |
| r1679 | r1680 | |
| 766 | 767 | $(DRIVERS)/olibochu.o \ |
| 767 | 768 | $(DRIVERS)/redalert.o $(AUDIO)/redalert.o $(VIDEO)/redalert.o \ |
| 768 | 769 | $(DRIVERS)/shisen.o $(VIDEO)/shisen.o \ |
| 769 | $(DRIVERS)/skychut.o $(VIDEO)/skychut.o \ | |
| 770 | 770 | $(DRIVERS)/travrusa.o $(VIDEO)/travrusa.o \ |
| 771 | 771 | $(DRIVERS)/vigilant.o $(VIDEO)/vigilant.o \ |
| 772 | 772 | $(DRIVERS)/wilytowr.o \ |
| r1679 | r1680 | |
| 1441 | 1441 | |
| 1442 | 1442 | $(MAMEOBJ)/upl.a: \ |
| 1443 | 1443 | $(DRIVERS)/mouser.o $(VIDEO)/mouser.o \ |
| 1444 | $(DRIVERS)/ninjakun.o $(VIDEO)/ninjakun.o \ | |
| 1445 | 1444 | $(DRIVERS)/ninjakd2.o $(VIDEO)/ninjakd2.o \ |
| 1446 | 1445 | $(DRIVERS)/nova2001.o $(VIDEO)/nova2001.o \ |
| 1447 | $(DRIVERS)/pkunwar.o $(VIDEO)/pkunwar.o \ | |
| 1448 | $(DRIVERS)/raiders5.o $(VIDEO)/raiders5.o \ | |
| 1449 | 1446 | $(DRIVERS)/xxmissio.o $(VIDEO)/xxmissio.o \ |
| 1450 | 1447 | |
| 1451 | 1448 | $(MAMEOBJ)/valadon.a: \ |
| r1679 | r1680 | |
| 1540 | 1537 | $(DRIVERS)/fortecar.o \ |
| 1541 | 1538 | $(DRIVERS)/freekick.o $(VIDEO)/freekick.o \ |
| 1542 | 1539 | $(DRIVERS)/funworld.o $(VIDEO)/funworld.o \ |
| 1543 | $(DRIVERS)/galgames.o \ | |
| 1544 | 1540 | $(DRIVERS)/gamecstl.o \ |
| 1545 | 1541 | $(DRIVERS)/gdrawpkr.o $(VIDEO)/gdrawpkr.o \ |
| 1546 | 1542 | $(DRIVERS)/gtipoker.o \ |
| r1679 | r1680 | |
| 1629 | 1625 | $(DRIVERS)/turbosub.o \ |
| 1630 | 1626 | $(DRIVERS)/usgames.o $(VIDEO)/usgames.o \ |
| 1631 | 1627 | $(DRIVERS)/vamphalf.o \ |
| 1628 | $(DRIVERS)/vcombat.o \ | |
| 1632 | 1629 | $(DRIVERS)/vroulet.o \ |
| 1633 | 1630 | $(DRIVERS)/wldarrow.o \ |
| 1634 | 1631 | $(DRIVERS)/xyonix.o $(VIDEO)/xyonix.o \ |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | VIDEO_START(sbugger) |
| 32 | 32 | { |
| 33 | sbugger_tilemap = tilemap_create(get_sbugger_tile_info,tilemap_scan_rows, | |
| 33 | sbugger_tilemap = tilemap_create(get_sbugger_tile_info,tilemap_scan_rows, | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | VIDEO_UPDATE(sbugger) |
| r1679 | r1680 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | VIDEO_START( targeth ) |
| 78 | 78 | { |
| 79 | pant[0] = tilemap_create(get_tile_info_targeth_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 80 | pant[1] = tilemap_create(get_tile_info_targeth_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 79 | pant[0] = tilemap_create(get_tile_info_targeth_screen0,tilemap_scan_rows,16,16,64,32); | |
| 80 | pant[1] = tilemap_create(get_tile_info_targeth_screen1,tilemap_scan_rows,16,16,64,32); | |
| 81 | 81 | |
| 82 | 82 | tilemap_set_transparent_pen(pant[0],0); |
| 83 | 83 | } |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | VIDEO_START( nycaptor ) |
| 73 | 73 | { |
| 74 | 74 | nycaptor_spriteram = auto_malloc (160); |
| 75 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 75 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 76 | 76 | |
| 77 | 77 | tilemap_set_transmask(bg_tilemap,0,0xf800,0x7ff); //split 0 |
| 78 | 78 | tilemap_set_transmask(bg_tilemap,1,0xfe00,0x01ff);//split 1 |
| r1679 | r1680 | |
|---|---|---|
| 52 | 52 | paletteram=NULL; |
| 53 | 53 | |
| 54 | 54 | |
| 55 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 55 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 56 | 56 | |
| 57 | 57 | tilemap_set_transparent_pen(bg_tilemap,15); |
| 58 | 58 |
| r1679 | r1680 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | VIDEO_START( xevious ) |
| 223 | 223 | { |
| 224 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 225 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 224 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 225 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 226 | 226 | |
| 227 | 227 | tilemap_set_scrolldx(bg_tilemap,-20,288+27); |
| 228 | 228 | tilemap_set_scrolldy(bg_tilemap,-16,-16); |
| r1679 | r1680 | |
|---|---|---|
| 74 | 74 | { |
| 75 | 75 | scroll_ram = auto_malloc(BGRAM_BANK_SIZE * BGRAM_BANKS); |
| 76 | 76 | |
| 77 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 78 | bg_tilemap8x4 = tilemap_create(get_bg_tile_info,bg8x4_scan, TILEMAP_TYPE_PEN, 16,16,128,64); | |
| 79 | bg_tilemap4x8 = tilemap_create(get_bg_tile_info,bg4x8_scan, TILEMAP_TYPE_PEN, 16,16,64,128); | |
| 77 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 78 | bg_tilemap8x4 = tilemap_create(get_bg_tile_info,bg8x4_scan, 16,16,128,64); | |
| 79 | bg_tilemap4x8 = tilemap_create(get_bg_tile_info,bg4x8_scan, 16,16,64,128); | |
| 80 | 80 | |
| 81 | 81 | tilemap_set_transparent_pen(tx_tilemap,3); |
| 82 | 82 |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | VIDEO_START( dynduke ) |
| 83 | 83 | { |
| 84 | bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 85 | fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 86 | tx_layer = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 84 | bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 85 | fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,32,32); | |
| 86 | tx_layer = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(fg_layer,15); |
| 89 | 89 | tilemap_set_transparent_pen(tx_layer,15); |
| r1679 | r1680 | |
|---|---|---|
| 63 | 63 | } |
| 64 | 64 | #endif |
| 65 | 65 | |
| 66 | static void mlc_drawgfxzoom( | |
| 66 | static void mlc_drawgfxzoom( | |
| 67 | 67 | UINT32 code1,UINT32 code2, UINT32 color,int flipx,int flipy,int sx,int sy, |
| 68 | 68 | const rectangle *clip,int transparency,int transparent_color,int use8bpp, |
| 69 | 69 | int scalex, int scaley) |
| r1679 | r1680 | |
| 98 | 98 | { |
| 99 | 99 | if( gfx ) |
| 100 | 100 | { |
| 101 | const pen_t *pal = &Machine-> | |
| 101 | const pen_t *pal = &Machine-> | |
| 102 | 102 | int source_base1 = (code1 % gfx->total_elements) * gfx->height; |
| 103 | 103 | int source_base2 = (code2 % gfx->total_elements) * gfx->height; |
| 104 | 104 |
| r1679 | r1680 | |
|---|---|---|
| 75 | 75 | tmpbitmap = auto_bitmap_alloc( 256, 64, machine->screen[0].format ); |
| 76 | 76 | |
| 77 | 77 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 78 | | |
| 78 | | |
| 79 | 79 | |
| 80 | 80 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 81 | 81 | tilemap_set_scrollx(fg_tilemap, 0, 64); |
| r1679 | r1680 | |
|---|---|---|
| 174 | 174 | |
| 175 | 175 | VIDEO_START( tryout ) |
| 176 | 176 | { |
| 177 | fg_tilemap = tilemap_create(get_fg_tile_info,get_fg_memory_offset,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 178 | bg_tilemap = tilemap_create(get_bg_tile_info,get_bg_memory_offset,TILEMAP_TYPE_PEN,16,16,64,16); | |
| 177 | fg_tilemap = tilemap_create(get_fg_tile_info,get_fg_memory_offset,8,8,32,32); | |
| 178 | bg_tilemap = tilemap_create(get_bg_tile_info,get_bg_memory_offset,16,16,64,16); | |
| 179 | 179 | |
| 180 | 180 | tryout_vram=auto_malloc(8 * 0x800); |
| 181 | 181 | tryout_vram_gfx=auto_malloc(0x6000); |
| r1679 | r1680 | |
|---|---|---|
| 86 | 86 | K053936_wraparound_enable(0, 0); |
| 87 | 87 | K053936_set_offset(0, 34, 9); |
| 88 | 88 | |
| 89 | rng_936_tilemap = tilemap_create(get_rng_936_tile_info, tilemap_scan_rows, | |
| 89 | rng_936_tilemap = tilemap_create(get_rng_936_tile_info, tilemap_scan_rows, | |
| 90 | 90 | tilemap_set_transparent_pen(rng_936_tilemap, 0); |
| 91 | 91 | |
| 92 | 92 | /* find first empty slot to decode gfx */ |
| r1679 | r1680 | |
| 106 | 106 | machine->gfx[ttl_gfx_index]->total_colors = machine->drv->total_colors / 16; |
| 107 | 107 | |
| 108 | 108 | // create the tilemap |
| 109 | ttl_tilemap = tilemap_create(ttl_get_tile_info, tilemap_scan_rows, | |
| 109 | ttl_tilemap = tilemap_create(ttl_get_tile_info, tilemap_scan_rows, | |
| 110 | 110 | |
| 111 | 111 | tilemap_set_transparent_pen(ttl_tilemap, 0); |
| 112 | 112 |
| r1679 | r1680 | |
|---|---|---|
| 114 | 114 | |
| 115 | 115 | VIDEO_START( madmotor ) |
| 116 | 116 | { |
| 117 | madmotor_pf1_tilemap = tilemap_create(get_pf1_tile_info, pf1_scan, TILEMAP_TYPE_PEN, 8, 8, 64,64); | |
| 118 | madmotor_pf2_tilemap = tilemap_create(get_pf2_tile_info, pf2_scan, TILEMAP_TYPE_PEN,16,16, 32,32); | |
| 119 | madmotor_pf3_tilemap = tilemap_create(get_pf3_tile_info, pf3_scan, TILEMAP_TYPE_PEN, 16,16, 32,64); | |
| 120 | madmotor_pf3a_tilemap= tilemap_create(get_pf3a_tile_info,pf3a_scan,TILEMAP_TYPE_PEN, 16,16,128,16); | |
| 117 | madmotor_pf1_tilemap = tilemap_create(get_pf1_tile_info, pf1_scan, 8, 8, 64,64); | |
| 118 | madmotor_pf2_tilemap = tilemap_create(get_pf2_tile_info, pf2_scan, 16,16, 32,32); | |
| 119 | madmotor_pf3_tilemap = tilemap_create(get_pf3_tile_info, pf3_scan, 16,16, 32,64); | |
| 120 | madmotor_pf3a_tilemap= tilemap_create(get_pf3a_tile_info,pf3a_scan, 16,16,128,16); | |
| 121 | 121 | |
| 122 | 122 | tilemap_set_transparent_pen(madmotor_pf1_tilemap,0); |
| 123 | 123 | tilemap_set_transparent_pen(madmotor_pf2_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 94 | 94 | }; |
| 95 | 95 | |
| 96 | 96 | /* initialize the playfield */ |
| 97 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 97 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 98 | 98 | |
| 99 | 99 | /* initialize the motion objects */ |
| 100 | 100 | atarimo_init(machine, 0, &modesc); |
| 101 | 101 | |
| 102 | 102 | /* initialize the alphanumerics */ |
| 103 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 103 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 104 | 104 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 105 | 105 | } |
| 106 | 106 | |
| r1679 | r1680 | |
| 145 | 145 | }; |
| 146 | 146 | |
| 147 | 147 | /* initialize the playfield */ |
| 148 | atarigen_playfield_tilemap = tilemap_create(guts_get_playfield_tile_info, tilemap_scan_cols, | |
| 148 | atarigen_playfield_tilemap = tilemap_create(guts_get_playfield_tile_info, tilemap_scan_cols, | |
| 149 | 149 | |
| 150 | 150 | /* initialize the motion objects */ |
| 151 | 151 | atarimo_init(machine, 0, &modesc); |
| 152 | 152 | |
| 153 | 153 | /* initialize the alphanumerics */ |
| 154 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 154 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 155 | 155 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 156 | 156 | } |
| 157 | 157 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | static tilemap *bg_tilemap; |
| 12 | 13 | |
| r1679 | r1680 | |
| 30 | 31 | ***************************************************************************/ |
| 31 | 32 | PALETTE_INIT( rocnrope ) |
| 32 | 33 | { |
| 34 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 35 | static const int resistances_b [2] = { 470, 220 }; | |
| 36 | double rweights[3], gweights[3], bweights[2]; | |
| 33 | 37 | int i; |
| 34 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 35 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 36 | 38 | |
| 39 | /* compute the color output resistor weights */ | |
| 40 | compute_resistor_weights(0, 255, -1.0, | |
| 41 | 3, &resistances_rg[0], rweights, 1000, 0, | |
| 42 | 3, &resistances_rg[0], gweights, 1000, 0, | |
| 43 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 37 | 44 | |
| 38 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 45 | /* allocate the colortable */ | |
| 46 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 47 | ||
| 48 | /* create a lookup table for the palette */ | |
| 49 | for (i = 0; i < 0x20; i++) | |
| 39 | 50 | { |
| 40 | int bit0,bit1,bit2,r,g,b; | |
| 51 | int bit0, bit1, bit2; | |
| 52 | int r, g, b; | |
| 41 | 53 | |
| 42 | 54 | /* red component */ |
| 43 | bit0 = (*color_prom >> 0) & 0x01; | |
| 44 | bit1 = (*color_prom >> 1) & 0x01; | |
| 45 | bit2 = (*color_prom >> 2) & 0x01; | |
| 46 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 55 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 56 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 57 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 58 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 59 | ||
| 47 | 60 | /* green component */ |
| 48 | bit0 = (*color_prom >> 3) & 0x01; | |
| 49 | bit1 = (*color_prom >> 4) & 0x01; | |
| 50 | bit2 = (*color_prom >> 5) & 0x01; | |
| 51 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 61 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 62 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 63 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 64 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 65 | ||
| 52 | 66 | /* blue component */ |
| 53 | bit0 = 0; | |
| 54 | bit1 = (*color_prom >> 6) & 0x01; | |
| 55 | bit2 = (*color_prom >> 7) & 0x01; | |
| 56 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 67 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 68 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 69 | b = combine_2_weights(bweights, bit0, bit1); | |
| 57 | 70 | |
| 58 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 59 | color_prom++; | |
| 71 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 60 | 72 | } |
| 61 | 73 | |
| 62 | 74 | /* color_prom now points to the beginning of the lookup table */ |
| 75 | color_prom += 0x20; | |
| 63 | 76 | |
| 64 | /* sprites */ | |
| 65 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 66 | COLOR(1,i) = *(color_prom++) & 0x0f; | |
| 67 | ||
| 68 | /* characters */ | |
| 69 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 70 | COLOR(0,i) = *(color_prom++) & 0x0f; | |
| 77 | /* sprites and characters */ | |
| 78 | for (i = 0; i < 0x200; i++) | |
| 79 | { | |
| 80 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 81 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 82 | } | |
| 71 | 83 | } |
| 72 | 84 | |
| 73 | 85 | WRITE8_HANDLER( rocnrope_videoram_w ) |
| r1679 | r1680 | |
| 98 | 110 | int color = attr & 0x0f; |
| 99 | 111 | int flags = ((attr & 0x40) ? TILE_FLIPX : 0) | ((attr & 0x20) ? TILE_FLIPY : 0); |
| 100 | 112 | |
| 101 | SET_TILE_INFO( | |
| 113 | SET_TILE_INFO(1, code, color, flags); | |
| 102 | 114 | } |
| 103 | 115 | |
| 104 | 116 | VIDEO_START( rocnrope ) |
| 105 | 117 | { |
| 106 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 107 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 118 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 108 | 119 | } |
| 109 | 120 | |
| 110 | 121 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
| 113 | 124 | |
| 114 | 125 | for (offs = spriteram_size - 2;offs >= 0;offs -= 2) |
| 115 | 126 | { |
| 116 | drawgfx(bitmap,machine->gfx[1], | |
| 127 | int color = spriteram_2[offs] & 0x0f; | |
| 128 | ||
| 129 | drawgfx(bitmap,machine->gfx[0], | |
| 117 | 130 | spriteram[offs + 1], |
| 118 | | |
| 131 | c | |
| 119 | 132 | spriteram_2[offs] & 0x40,~spriteram_2[offs] & 0x80, |
| 120 | 133 | 240-spriteram[offs],spriteram_2[offs + 1], |
| 121 | cliprect,TRANSPARENCY_COLOR,0); | |
| 134 | cliprect,TRANSPARENCY_PENS, | |
| 135 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 122 | 136 | } |
| 123 | 137 | } |
| 124 | 138 |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | VIDEO_START( pspikes ) |
| 97 | 97 | { |
| 98 | bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows, | |
| 98 | bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows, | |
| 99 | 99 | /* no bg2 in this game */ |
| 100 | 100 | |
| 101 | 101 | sprite_gfx = 1; |
| r1679 | r1680 | |
| 104 | 104 | |
| 105 | 105 | VIDEO_START( karatblz ) |
| 106 | 106 | { |
| 107 | bg1_tilemap = tilemap_create(karatblz_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 108 | bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 107 | bg1_tilemap = tilemap_create(karatblz_bg1_tile_info,tilemap_scan_rows, 8,8,64,64); | |
| 108 | bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 109 | 109 | |
| 110 | 110 | tilemap_set_transparent_pen(bg2_tilemap,15); |
| 111 | 111 | |
| r1679 | r1680 | |
| 118 | 118 | { |
| 119 | 119 | int i; |
| 120 | 120 | |
| 121 | bg1_tilemap = tilemap_create(spinlbrk_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 122 | bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 121 | bg1_tilemap = tilemap_create(spinlbrk_bg1_tile_info,tilemap_scan_rows, 8,8,64,64); | |
| 122 | bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 123 | 123 | |
| 124 | 124 | tilemap_set_transparent_pen(bg2_tilemap,15); |
| 125 | 125 | |
| r1679 | r1680 | |
| 143 | 143 | |
| 144 | 144 | VIDEO_START( turbofrc ) |
| 145 | 145 | { |
| 146 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 147 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 146 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows, 8,8,64,64); | |
| 147 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 148 | 148 | |
| 149 | 149 | tilemap_set_transparent_pen(bg2_tilemap,15); |
| 150 | 150 | |
| r1679 | r1680 | |
| 155 | 155 | |
| 156 | 156 | VIDEO_START( wbbc97 ) |
| 157 | 157 | { |
| 158 | bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows, | |
| 158 | bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows, | |
| 159 | 159 | /* no bg2 in this game */ |
| 160 | 160 | |
| 161 | 161 | tilemap_set_transparent_pen(bg1_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 111 | 111 | |
| 112 | 112 | static void video_start_common(running_machine *machine, UINT32 tile_transmask) |
| 113 | 113 | { |
| 114 | docastle_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 114 | docastle_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 115 | 115 | tilemap_set_transmask(docastle_tilemap, 0, tile_transmask, 0x0000); |
| 116 | 116 | } |
| 117 | 117 |
| r1679 | r1680 | |
|---|---|---|
| 124 | 124 | VIDEO_START( mystston ) |
| 125 | 125 | { |
| 126 | 126 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x, |
| 127 | | |
| 127 | | |
| 128 | 128 | |
| 129 | 129 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_x, |
| 130 | | |
| 130 | | |
| 131 | 131 | |
| 132 | 132 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 133 | 133 | } |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | old_bg_color = -1; |
| 106 | 106 | stuff_palette( machine, 0, 0, 16*8 ); |
| 107 | 107 | stuff_palette( machine, 16*8*3, 16*8, 16*8 ); |
| 108 | me_fg_tilemap = tilemap_create(get_me_fg_tile_info,tilemap_scan_cols, | |
| 108 | me_fg_tilemap = tilemap_create(get_me_fg_tile_info,tilemap_scan_cols, | |
| 109 | 109 | tilemap_set_transparent_pen(me_fg_tilemap,15); |
| 110 | me_bg_tilemap = tilemap_create(get_me_bg_tile_info,tilemap_scan_cols, | |
| 110 | me_bg_tilemap = tilemap_create(get_me_bg_tile_info,tilemap_scan_cols, | |
| 111 | 111 | tilemap_set_scrollx( me_fg_tilemap, 0, -mainsnk_offset ); |
| 112 | 112 | tilemap_set_scrollx( me_bg_tilemap, 0, -mainsnk_offset ); |
| 113 | 113 | } |
| r1679 | r1680 | |
|---|---|---|
| 515 | 515 | namcond1_gfxbank = 0; |
| 516 | 516 | |
| 517 | 517 | /* create tilemaps of all sizes and combinations */ |
| 518 | tilemap_A_cache_8[0] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 519 | tilemap_A_cache_8[1] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 520 | tilemap_A_cache_8[2] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 32,64); | |
| 518 | tilemap_A_cache_8[0] = tilemap_create(get_tile_info_A_8, get_tile_offset, 8,8, 32,32); | |
| 519 | tilemap_A_cache_8[1] = tilemap_create(get_tile_info_A_8, get_tile_offset, 8,8, 64,32); | |
| 520 | tilemap_A_cache_8[2] = tilemap_create(get_tile_info_A_8, get_tile_offset, 8,8, 32,64); | |
| 521 | 521 | |
| 522 | tilemap_A_cache_16[0] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 32,32); | |
| 523 | tilemap_A_cache_16[1] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 64,32); | |
| 524 | tilemap_A_cache_16[2] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 32,64); | |
| 522 | tilemap_A_cache_16[0] = tilemap_create(get_tile_info_A_16, get_tile_offset, 16,16, 32,32); | |
| 523 | tilemap_A_cache_16[1] = tilemap_create(get_tile_info_A_16, get_tile_offset, 16,16, 64,32); | |
| 524 | tilemap_A_cache_16[2] = tilemap_create(get_tile_info_A_16, get_tile_offset, 16,16, 32,64); | |
| 525 | 525 | |
| 526 | tilemap_B_cache_8[0] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 527 | tilemap_B_cache_8[1] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 528 | tilemap_B_cache_8[2] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_PEN, 8,8, 32,64); | |
| 526 | tilemap_B_cache_8[0] = tilemap_create(get_tile_info_B_8, get_tile_offset, 8,8, 32,32); | |
| 527 | tilemap_B_cache_8[1] = tilemap_create(get_tile_info_B_8, get_tile_offset, 8,8, 64,32); | |
| 528 | tilemap_B_cache_8[2] = tilemap_create(get_tile_info_B_8, get_tile_offset, 8,8, 32,64); | |
| 529 | 529 | |
| 530 | tilemap_B_cache_16[0] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 32,32); | |
| 531 | tilemap_B_cache_16[1] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 64,32); | |
| 532 | tilemap_B_cache_16[2] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_PEN, 16,16, 32,64); | |
| 530 | tilemap_B_cache_16[0] = tilemap_create(get_tile_info_B_16, get_tile_offset, 16,16, 32,32); | |
| 531 | tilemap_B_cache_16[1] = tilemap_create(get_tile_info_B_16, get_tile_offset, 16,16, 64,32); | |
| 532 | tilemap_B_cache_16[2] = tilemap_create(get_tile_info_B_16, get_tile_offset, 16,16, 32,64); | |
| 533 | 533 | |
| 534 | 534 | tilemap_A = NULL; |
| 535 | 535 | tilemap_B = NULL; |
| r1679 | r1680 | |
|---|---|---|
| 118 | 118 | |
| 119 | 119 | VIDEO_START( senjyo ) |
| 120 | 120 | { |
| 121 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 121 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 122 | 122 | |
| 123 | 123 | if (senjyo) |
| 124 | 124 | { |
| 125 | bg1_tilemap = tilemap_create(senjyo_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,32); | |
| 126 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,48); /* only 16x32 used by Star Force */ | |
| 127 | bg3_tilemap = tilemap_create(get_bg3_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,56); /* only 16x32 used by Star Force */ | |
| 125 | bg1_tilemap = tilemap_create(senjyo_bg1_tile_info,tilemap_scan_rows,16,16,16,32); | |
| 126 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,16,16,16,48); /* only 16x32 used by Star Force */ | |
| 127 | bg3_tilemap = tilemap_create(get_bg3_tile_info, tilemap_scan_rows,16,16,16,56); /* only 16x32 used by Star Force */ | |
| 128 | 128 | } |
| 129 | 129 | else |
| 130 | 130 | { |
| 131 | bg1_tilemap = tilemap_create(starforc_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,32); | |
| 132 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,32); /* only 16x32 used by Star Force */ | |
| 133 | bg3_tilemap = tilemap_create(get_bg3_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,32); /* only 16x32 used by Star Force */ | |
| 131 | bg1_tilemap = tilemap_create(starforc_bg1_tile_info,tilemap_scan_rows,16,16,16,32); | |
| 132 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,16,16,16,32); /* only 16x32 used by Star Force */ | |
| 133 | bg3_tilemap = tilemap_create(get_bg3_tile_info, tilemap_scan_rows,16,16,16,32); /* only 16x32 used by Star Force */ | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | VIDEO_START( yiear ) |
| 106 | 106 | { |
| 107 | 107 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 108 | | |
| 108 | | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 128 | 128 | VIDEO_START( sonson ) |
| 129 | 129 | { |
| 130 | 130 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 131 | | |
| 131 | | |
| 132 | 132 | |
| 133 | 133 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 134 | 134 | } |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | VIDEO_START(sslam) |
| 144 | 144 | { |
| 145 | sslam_bg_tilemap = tilemap_create(get_sslam_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 146 | sslam_md_tilemap = tilemap_create(get_sslam_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 147 | sslam_tx_tilemap = tilemap_create(get_sslam_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 145 | sslam_bg_tilemap = tilemap_create(get_sslam_bg_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 146 | sslam_md_tilemap = tilemap_create(get_sslam_md_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 147 | sslam_tx_tilemap = tilemap_create(get_sslam_tx_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 148 | 148 | |
| 149 | 149 | tilemap_set_transparent_pen(sslam_md_tilemap,0); |
| 150 | 150 | tilemap_set_transparent_pen(sslam_tx_tilemap,0); |
| r1679 | r1680 | |
| 155 | 155 | |
| 156 | 156 | VIDEO_START(powerbls) |
| 157 | 157 | { |
| 158 | sslam_bg_tilemap = tilemap_create(get_powerbls_bg_tile_info,tilemap_scan_rows, | |
| 158 | sslam_bg_tilemap = tilemap_create(get_powerbls_bg_tile_info,tilemap_scan_rows, | |
| 159 | 159 | |
| 160 | 160 | sprites_x_offset = -21; |
| 161 | 161 | state_save_register_global(sprites_x_offset); |
| r1679 | r1680 | |
|---|---|---|
| 128 | 128 | |
| 129 | 129 | VIDEO_START( hcastle ) |
| 130 | 130 | { |
| 131 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 132 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 131 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,8,8,64,32); | |
| 132 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan, 8,8,64,32); | |
| 133 | 133 | |
| 134 | 134 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 135 | 135 | } |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | VIDEO_START( deadang ) |
| 73 | 73 | { |
| 74 | pf3_layer = tilemap_create(get_pf3_tile_info,bg_scan, TILEMAP_TYPE_PEN, 16,16,128,256); | |
| 75 | pf2_layer = tilemap_create(get_pf2_tile_info,bg_scan, TILEMAP_TYPE_PEN,16,16,128,256); | |
| 76 | pf1_layer = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16, 32, 32); | |
| 77 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 74 | pf3_layer = tilemap_create(get_pf3_tile_info,bg_scan, 16,16,128,256); | |
| 75 | pf2_layer = tilemap_create(get_pf2_tile_info,bg_scan, 16,16,128,256); | |
| 76 | pf1_layer = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,16,16, 32, 32); | |
| 77 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8, 8, 32, 32); | |
| 78 | 78 | |
| 79 | 79 | tilemap_set_transparent_pen(pf2_layer, 15); |
| 80 | 80 | tilemap_set_transparent_pen(pf1_layer, 15); |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | ***************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "driver.h" |
| 16 | #include "video/ | |
| 16 | #include "video/m | |
| 17 | 17 | #include "twincobr.h" |
| 18 | 18 | |
| 19 | 19 | |
| r1679 | r1680 | |
| 103 | 103 | |
| 104 | 104 | static void twincobr_create_tilemaps(void) |
| 105 | 105 | { |
| 106 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 107 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 108 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 106 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 107 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 108 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 109 | 109 | |
| 110 | 110 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 111 | 111 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
| 190 | 190 | |
| 191 | 191 | WRITE16_HANDLER( twincobr_crtc_reg_sel_w ) |
| 192 | 192 | { |
| 193 | ||
| 193 | // mc6845_address_w(offset, data); | |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | WRITE16_HANDLER( twincobr_crtc_data_w ) |
| 197 | 197 | { |
| 198 | ||
| 198 | // mc6845_register_w(offset, data); | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | WRITE16_HANDLER( twincobr_txoffs_w ) |
| r1679 | r1680 | |
| 371 | 371 | |
| 372 | 372 | WRITE8_HANDLER( wardner_CRTC_reg_sel_w ) |
| 373 | 373 | { |
| 374 | ||
| 374 | // mc6845_address_w(offset, data); | |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | 377 | WRITE8_HANDLER( wardner_CRTC_data_w ) |
| 378 | 378 | { |
| 379 | ||
| 379 | // mc6845_register_w(0, data); | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 |
| r1679 | r1680 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | VIDEO_START( hexion ) |
| 45 | 45 | { |
| 46 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 47 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 46 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,64,32); | |
| 47 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows, 8,8,64,32); | |
| 48 | 48 | |
| 49 | 49 | tilemap_set_transparent_pen(bg_tilemap[0],0); |
| 50 | 50 | tilemap_set_scrollx(bg_tilemap[1],0,-4); |
| r1679 | r1680 | |
|---|---|---|
| 246 | 246 | |
| 247 | 247 | VIDEO_START( bking ) |
| 248 | 248 | { |
| 249 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 249 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 250 | 250 | helper0 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 251 | 251 | helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 252 | 252 | } |
| r1679 | r1680 | |
|---|---|---|
| 125 | 125 | |
| 126 | 126 | VIDEO_START( labyrunr ) |
| 127 | 127 | { |
| 128 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 129 | layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 128 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,32,32); | |
| 129 | layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,32,32); | |
| 130 | 130 | |
| 131 | 131 | tilemap_set_transparent_pen(layer0,0); |
| 132 | 132 | tilemap_set_transparent_pen(layer1,0); |
| r1679 | r1680 | |
|---|---|---|
| 94 | 94 | state_save_register_global(ddragon3_bg_tilebase); |
| 95 | 95 | |
| 96 | 96 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 97 | | |
| 97 | | |
| 98 | 98 | |
| 99 | 99 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 100 | | |
| 100 | | |
| 101 | 101 | |
| 102 | 102 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 103 | 103 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 27 | 27 | { |
| 28 | 28 | helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 29 | 29 | |
| 30 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 30 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | VIDEO_START( dragrace ) |
| 51 | 51 | { |
| 52 | 52 | bg_tilemap = tilemap_create( |
| 53 | get_tile_info, tilemap_scan_rows, | |
| 53 | get_tile_info, tilemap_scan_rows, | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | VIDEO_START( orbit ) |
| 51 | 51 | { |
| 52 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 52 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 |
| r1679 | r1680 | |
|---|---|---|
| 332 | 332 | UINT8 alpha = alpha_table[global_pen]; |
| 333 | 333 | if (alpha) |
| 334 | 334 | { |
| 335 | p[i] = alpha_blend16(p[i], Machine-> | |
| 335 | p[i] = alpha_blend16(p[i], Machine-> | |
| 336 | 336 | } |
| 337 | 337 | else |
| 338 | 338 | { |
| 339 | p[i] = Machine-> | |
| 339 | p[i] = Machine-> | |
| 340 | 340 | } |
| 341 | 341 | } |
| 342 | 342 | dp_i += xd; |
| r1679 | r1680 | |
| 482 | 482 | int i; |
| 483 | 483 | int region_length; |
| 484 | 484 | |
| 485 | text_layer = tilemap_create( get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8,64,32 ); | |
| 486 | back_layer = tilemap_create( get_back_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16,16,32,32 ); | |
| 487 | mid_layer = tilemap_create( get_mid_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16,16,32,32 ); | |
| 488 | fore_layer = tilemap_create( get_fore_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16,16,32,32 ); | |
| 485 | text_layer = tilemap_create( get_text_tile_info, tilemap_scan_rows, 8,8,64,32 ); | |
| 486 | back_layer = tilemap_create( get_back_tile_info, tilemap_scan_cols, 16,16,32,32 ); | |
| 487 | mid_layer = tilemap_create( get_mid_tile_info, tilemap_scan_cols, 16,16,32,32 ); | |
| 488 | fore_layer = tilemap_create( get_fore_tile_info, tilemap_scan_cols, 16,16,32,32 ); | |
| 489 | 489 | |
| 490 | 490 | tilemap_set_transparent_pen(text_layer, 31); |
| 491 | 491 | tilemap_set_transparent_pen(mid_layer, 63); |
| r1679 | r1680 | |
| 598 | 598 | UINT8 alpha = alpha_table[pen]; |
| 599 | 599 | if (alpha) |
| 600 | 600 | { |
| 601 | *d = alpha_blend16(*d, machine-> | |
| 601 | *d = alpha_blend16(*d, machine-> | |
| 602 | 602 | } |
| 603 | 603 | else |
| 604 | 604 | { |
| 605 | *d = machine-> | |
| 605 | *d = machine-> | |
| 606 | 606 | } |
| 607 | 607 | } |
| 608 | 608 | ++d; |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | VIDEO_START( sauro ) |
| 88 | 88 | { |
| 89 | 89 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols, |
| 90 | | |
| 90 | | |
| 91 | 91 | |
| 92 | 92 | fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols, |
| 93 | | |
| 93 | | |
| 94 | 94 | |
| 95 | 95 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 96 | 96 | palette_bank = 0; |
| r1679 | r1680 | |
| 160 | 160 | VIDEO_START( trckydoc ) |
| 161 | 161 | { |
| 162 | 162 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols, |
| 163 | | |
| 163 | | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | static void trckydoc_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 195 | 195 | |
| 196 | 196 | VIDEO_START( gaplus ) |
| 197 | 197 | { |
| 198 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 198 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 199 | 199 | |
| 200 | 200 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 0xff); |
| 201 | 201 |
| r1679 | r1680 | |
|---|---|---|
| 33 | 33 | tilemap_mark_tile_dirty(drmicro_bg1,(offset & 0x3ff)); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | READ8_HANDLER( drmicro_videoram_r ) | |
| 37 | { | |
| 38 | return drmicro_videoram[offset]; | |
| 39 | } | |
| 40 | 36 | |
| 41 | 37 | /****************************************************************************/ |
| 42 | 38 | |
| r1679 | r1680 | |
| 74 | 70 | { |
| 75 | 71 | int i; |
| 76 | 72 | |
| 77 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 73 | /* allocate the colortable */ | |
| 74 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 75 | ||
| 76 | /* create a lookup table for the palette */ | |
| 77 | for (i = 0; i < 0x20; i++) | |
| 78 | 78 | { |
| 79 | int bit0,bit1,bit2,r,g,b; | |
| 79 | int bit0, bit1, bit2; | |
| 80 | int r, g, b; | |
| 80 | 81 | |
| 81 | bit0 = (*color_prom >> 0) & 0x01; | |
| 82 | bit1 = (*color_prom >> 1) & 0x01; | |
| 83 | bit2 = (*color_prom >> 2) & 0x01; | |
| 82 | /* red component */ | |
| 83 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 84 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 85 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 84 | 86 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 85 | bit0 = (*color_prom >> 3) & 0x01; | |
| 86 | bit1 = (*color_prom >> 4) & 0x01; | |
| 87 | bit2 = (*color_prom >> 5) & 0x01; | |
| 87 | ||
| 88 | /* green component */ | |
| 89 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 90 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 91 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 88 | 92 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 93 | ||
| 94 | /* blue component */ | |
| 89 | 95 | bit0 = 0; |
| 90 | bit1 = (*color_prom >> 6) & 0x01; | |
| 91 | bit2 = (*color_prom >> 7) & 0x01; | |
| 96 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 97 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 92 | 98 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 93 | 99 | |
| 94 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 95 | color_prom++; | |
| 100 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 96 | 101 | } |
| 97 | 102 | |
| 98 | for (i=0; i<machine->drv->color_table_len; i++) | |
| 99 | colortable[i] = color_prom[i] & 0x0f; | |
| 103 | /* color_prom now points to the beginning of the lookup table */ | |
| 104 | color_prom += 0x20; | |
| 105 | ||
| 106 | for (i = 0; i < 0x200; i++) | |
| 107 | { | |
| 108 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 109 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 110 | } | |
| 100 | 111 | } |
| 101 | 112 | |
| 102 | 113 | VIDEO_START( drmicro) |
| 103 | 114 | { |
| 104 | 115 | drmicro_videoram = auto_malloc(0x1000); |
| 105 | 116 | |
| 106 | drmicro_bg1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 107 | drmicro_bg2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 117 | drmicro_bg1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, 8,8,32,32); | |
| 118 | drmicro_bg2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, 8,8,32,32); | |
| 108 | 119 | |
| 109 | 120 | tilemap_set_transparent_pen(drmicro_bg2,0); |
| 110 | 121 | } |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | VIDEO_START( speedatk ) |
| 101 | 101 | { |
| 102 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 102 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | VIDEO_UPDATE( speedatk ) |
| r1679 | r1680 | |
|---|---|---|
| 269 | 269 | skip = sprite_base[SPR_SKIP_LO] + (sprite_base[SPR_SKIP_HI] << 8); |
| 270 | 270 | |
| 271 | 271 | height = sprite_base[SPR_Y_BOTTOM] - sprite_base[SPR_Y_TOP]; |
| 272 | sprite_palette = Machine-> | |
| 272 | sprite_palette = Machine-> | |
| 273 | 273 | |
| 274 | 274 | sy = sprite_base[SPR_Y_TOP] + 1; |
| 275 | 275 |
| r1679 | r1680 | |
|---|---|---|
| 200 | 200 | { |
| 201 | 201 | tilemap_0 = tilemap_create( get_tile_info_0, |
| 202 | 202 | powerins_get_memory_offset_0, |
| 203 | ||
| 203 | ||
| 204 | 204 | 16,16, |
| 205 | 205 | DIM_NX_0, DIM_NY_0 ); |
| 206 | 206 | |
| 207 | 207 | tilemap_1 = tilemap_create( get_tile_info_1, |
| 208 | 208 | tilemap_scan_cols, |
| 209 | ||
| 209 | ||
| 210 | 210 | 8,8, |
| 211 | 211 | DIM_NX_1, DIM_NY_1 ); |
| 212 | 212 |
| r1679 | r1680 | |
|---|---|---|
| 2413 | 2413 | |
| 2414 | 2414 | if( gfx ) |
| 2415 | 2415 | { |
| 2416 | const pen_t *pal = &Machine-> | |
| 2416 | const pen_t *pal = &Machine-> | |
| 2417 | 2417 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 2418 | 2418 | |
| 2419 | 2419 | //int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; |
| r1679 | r1680 | |
|---|---|---|
| 39 | 39 | PALETTE_INIT( exedexes ) |
| 40 | 40 | { |
| 41 | 41 | int i; |
| 42 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 43 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 44 | 42 | |
| 43 | /* allocate the colortable */ | |
| 44 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 45 | 45 | |
| 46 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 46 | /* create a lookup table for the palette */ | |
| 47 | for (i = 0; i < 0x100; i++) | |
| 47 | 48 | { |
| 48 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 49 | int r = pal4bit(color_prom[i + 0x000]); | |
| 50 | int g = pal4bit(color_prom[i + 0x100]); | |
| 51 | int b = pal4bit(color_prom[i + 0x200]); | |
| 49 | 52 | |
| 50 | ||
| 51 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 52 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 53 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 54 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 55 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 56 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 57 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 58 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 59 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 60 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 61 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 62 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 63 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 64 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 65 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 66 | ||
| 67 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 68 | color_prom++; | |
| 53 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 69 | 54 | } |
| 70 | 55 | |
| 71 | color_prom += 2*machine->drv->total_colors; | |
| 72 | 56 | /* color_prom now points to the beginning of the lookup table */ |
| 57 | color_prom += 0x300; | |
| 73 | 58 | |
| 74 | /* characters use colors 192-207 */ | |
| 75 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 76 | COLOR(0,i) = (*color_prom++) + 192; | |
| 59 | /* characters use colors 0xc0-0xcf */ | |
| 60 | for (i = 0; i < 0x100; i++) | |
| 61 | { | |
| 62 | UINT8 ctabentry = color_prom[i] | 0xc0; | |
| 63 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 64 | } | |
| 77 | 65 | |
| 78 | /* 32x32 tiles use colors 0-15 */ | |
| 79 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 80 | COLOR(1,i) = (*color_prom++); | |
| 66 | /* 32x32 tiles use colors 0-0x0f */ | |
| 67 | for (i = 0x100; i < 0x200; i++) | |
| 68 | { | |
| 69 | UINT8 ctabentry = color_prom[i]; | |
| 70 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 71 | } | |
| 81 | 72 | |
| 82 | /* 16x16 tiles use colors 64-79 */ | |
| 83 | for (i = 0;i < TOTAL_COLORS(2);i++) | |
| 84 | COLOR(2,i) = (*color_prom++) + 64; | |
| 73 | /* 16x16 tiles use colors 0x40-0x4f */ | |
| 74 | for (i = 0x200; i < 0x300; i++) | |
| 75 | { | |
| 76 | UINT8 ctabentry = color_prom[i] | 0x40; | |
| 77 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 78 | } | |
| 85 | 79 | |
| 86 | /* sprites use colors 128-191 in four banks */ | |
| 87 | for (i = 0;i < TOTAL_COLORS(3);i++) | |
| 80 | /* sprites use colors 0x80-0xbf in four banks */ | |
| 81 | for (i = 0x300; i < 0x400; i++) | |
| 88 | 82 | { |
| 89 | COLOR(3,i) = color_prom[0] + 128 + 16 * color_prom[256]; | |
| 90 | color_prom++; | |
| 83 | UINT8 ctabentry = color_prom[i] | (color_prom[i + 0x100] << 4) | 0x80; | |
| 84 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 91 | 85 | } |
| 92 | 86 | } |
| 93 | 87 | |
| r1679 | r1680 | |
| 157 | 151 | int code = videoram[tile_index] + 2 * (colorram[tile_index] & 0x80); |
| 158 | 152 | int color = colorram[tile_index] & 0x3f; |
| 159 | 153 | |
| 154 | tileinfo->group = color; | |
| 155 | ||
| 160 | 156 | SET_TILE_INFO(0, code, color, 0); |
| 161 | 157 | } |
| 162 | 158 | |
| r1679 | r1680 | |
| 175 | 171 | VIDEO_START( exedexes ) |
| 176 | 172 | { |
| 177 | 173 | bg_tilemap = tilemap_create(get_bg_tile_info, exedexes_bg_tilemap_scan, |
| 178 | | |
| 174 | | |
| 179 | 175 | |
| 180 | 176 | fg_tilemap = tilemap_create(get_fg_tile_info, exedexes_fg_tilemap_scan, |
| 181 | | |
| 177 | | |
| 182 | 178 | |
| 183 | 179 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_rows, |
| 184 | | |
| 180 | | |
| 185 | 181 | |
| 186 | 182 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 187 | tilemap_ | |
| 183 | colortable_configure_tilemap_g | |
| 188 | 184 | } |
| 189 | 185 | |
| 190 | 186 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int priority) |
| r1679 | r1680 | |
| 242 | 238 | draw_sprites(machine, bitmap, cliprect, 0); |
| 243 | 239 | |
| 244 | 240 | if (chon) |
| 245 | { | |
| 246 | 241 | tilemap_draw(bitmap, cliprect, tx_tilemap, 0, 0); |
| 247 | ||
| 242 | ||
| 248 | 243 | return 0; |
| 249 | 244 | } |
| 250 | 245 |
| r1679 | r1680 | |
|---|---|---|
| 756 | 756 | |
| 757 | 757 | VIDEO_START(skns) |
| 758 | 758 | { |
| 759 | skns_tilemap_A = tilemap_create(get_tilemap_A_tile_info,tilemap_scan_rows, | |
| 759 | skns_tilemap_A = tilemap_create(get_tilemap_A_tile_info,tilemap_scan_rows, | |
| 760 | 760 | tilemap_set_transparent_pen(skns_tilemap_A,0); |
| 761 | 761 | |
| 762 | skns_tilemap_B = tilemap_create(get_tilemap_B_tile_info,tilemap_scan_rows, | |
| 762 | skns_tilemap_B = tilemap_create(get_tilemap_B_tile_info,tilemap_scan_rows, | |
| 763 | 763 | tilemap_set_transparent_pen(skns_tilemap_B,0); |
| 764 | 764 | |
| 765 | 765 | machine->gfx[2]->color_granularity=256; |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | VIDEO_START( flkatck ) |
| 74 | 74 | { |
| 75 | k007121_tilemap[0] = tilemap_create(get_tile_info_A,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 76 | k007121_tilemap[1] = tilemap_create(get_tile_info_B,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 75 | k007121_tilemap[0] = tilemap_create(get_tile_info_A,tilemap_scan_rows,8,8,32,32); | |
| 76 | k007121_tilemap[1] = tilemap_create(get_tile_info_B,tilemap_scan_rows,8,8,32,32); | |
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | VIDEO_START( shootout ){ |
| 75 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 76 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 75 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 76 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 77 | 77 | tilemap_set_transparent_pen( foreground, 0 ); |
| 78 | 78 | } |
| 79 | 79 |
| r1679 | r1680 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | VIDEO_START( contra ) |
| 160 | 160 | { |
| 161 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 162 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 163 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 161 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 162 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 163 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 164 | 164 | |
| 165 | 165 | private_spriteram = auto_malloc(0x800); |
| 166 | 166 | private_spriteram_2 = auto_malloc(0x800); |
| r1679 | r1680 | |
|---|---|---|
| 156 | 156 | VIDEO_START( paradise ) |
| 157 | 157 | { |
| 158 | 158 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 159 | | |
| 159 | | |
| 160 | 160 | |
| 161 | 161 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 162 | | |
| 162 | | |
| 163 | 163 | |
| 164 | 164 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 165 | | |
| 165 | | |
| 166 | 166 | |
| 167 | 167 | /* pixmap */ |
| 168 | 168 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| r1679 | r1680 | |
|---|---|---|
| 479 | 479 | static TIMER_CALLBACK( scanline_interrupt ) |
| 480 | 480 | { |
| 481 | 481 | /* set timer for next frame */ |
| 482 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, VIDEO_INTSCANLINE, 0), 0 | |
| 482 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, VIDEO_INTSCANLINE, 0), 0 | |
| 483 | 483 | |
| 484 | 484 | /* set the interrupt bit in the status reg */ |
| 485 | 485 | logerror("-------------- (DISPLAY INT @ %d) ----------------\n", video_screen_get_vpos(0)); |
| r1679 | r1680 | |
| 1347 | 1347 | break; |
| 1348 | 1348 | |
| 1349 | 1349 | case 0x2c/2: /* VIDEO_INTSCANLINE */ |
| 1350 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, VIDEO_INTSCANLINE, 0), 0 | |
| 1350 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, VIDEO_INTSCANLINE, 0), 0 | |
| 1351 | 1351 | break; |
| 1352 | 1352 | |
| 1353 | 1353 | case 0x32/2: /* VIDEO_VTOTAL */ |
| r1679 | r1680 | |
|---|---|---|
| 176 | 176 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 177 | 177 | |
| 178 | 178 | /* info offset type w h col row */ |
| 179 | tx_tilemap = tilemap_create(chaknpop_get_tx_tile_info, tilemap_scan_rows, | |
| 179 | tx_tilemap = tilemap_create(chaknpop_get_tx_tile_info, tilemap_scan_rows, | |
| 180 | 180 | |
| 181 | 181 | vram1 = &RAM[0x10000]; |
| 182 | 182 | vram2 = &RAM[0x12000]; |
| r1679 | r1680 | |
|---|---|---|
| 103 | 103 | |
| 104 | 104 | VIDEO_START(fitfight) |
| 105 | 105 | { |
| 106 | fof_bak_tilemap = tilemap_create(get_fof_bak_tile_info,tilemap_scan_cols, | |
| 106 | fof_bak_tilemap = tilemap_create(get_fof_bak_tile_info,tilemap_scan_cols, | |
| 107 | 107 | /* opaque */ |
| 108 | 108 | |
| 109 | fof_mid_tilemap = tilemap_create(get_fof_mid_tile_info,tilemap_scan_cols, | |
| 109 | fof_mid_tilemap = tilemap_create(get_fof_mid_tile_info,tilemap_scan_cols, | |
| 110 | 110 | tilemap_set_transparent_pen(fof_mid_tilemap,0); |
| 111 | 111 | |
| 112 | fof_txt_tilemap = tilemap_create(get_fof_txt_tile_info,tilemap_scan_cols, | |
| 112 | fof_txt_tilemap = tilemap_create(get_fof_txt_tile_info,tilemap_scan_cols, | |
| 113 | 113 | tilemap_set_transparent_pen(fof_txt_tilemap,0); |
| 114 | 114 | } |
| 115 | 115 |
| r1679 | r1680 | |
|---|---|---|
| 185 | 185 | |
| 186 | 186 | VIDEO_START( ashnojoe ) |
| 187 | 187 | { |
| 188 | joetilemap = tilemap_create(get_joe_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 189 | joetilemap2 = tilemap_create(get_joe_tile_info_2,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 190 | joetilemap3 = tilemap_create(get_joe_tile_info_3,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 191 | joetilemap4 = tilemap_create(get_joe_tile_info_4,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 192 | joetilemap5 = tilemap_create(get_joe_tile_info_5,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 193 | joetilemap6 = tilemap_create(get_joe_tile_info_6,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 194 | joetilemap7 = tilemap_create(get_joe_tile_info_7,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 188 | joetilemap = tilemap_create(get_joe_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 189 | joetilemap2 = tilemap_create(get_joe_tile_info_2,tilemap_scan_rows,16,16,32,32); | |
| 190 | joetilemap3 = tilemap_create(get_joe_tile_info_3,tilemap_scan_rows, 8, 8,64,64); | |
| 191 | joetilemap4 = tilemap_create(get_joe_tile_info_4,tilemap_scan_rows, 8, 8,64,64); | |
| 192 | joetilemap5 = tilemap_create(get_joe_tile_info_5,tilemap_scan_rows,16,16,32,32); | |
| 193 | joetilemap6 = tilemap_create(get_joe_tile_info_6,tilemap_scan_rows, 16,16,32,32); | |
| 194 | joetilemap7 = tilemap_create(get_joe_tile_info_7,tilemap_scan_rows, 16,16,32,32); | |
| 195 | 195 | |
| 196 | 196 | tilemap_set_transparent_pen(joetilemap, 15); |
| 197 | 197 | tilemap_set_transparent_pen(joetilemap2,15); |
| r1679 | r1680 | |
|---|---|---|
| 199 | 199 | |
| 200 | 200 | VIDEO_START( amazon ) |
| 201 | 201 | { |
| 202 | background = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 203 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 202 | background = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 203 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 204 | 204 | tilemap_set_transparent_pen(foreground,0xf); |
| 205 | 205 | |
| 206 | 206 | /* register for saving */ |
| r1679 | r1680 | |
|---|---|---|
| 41 | 41 | UINT8* saa5050_vidram; /* Video RAM for SAA 5050 */ |
| 42 | 42 | |
| 43 | 43 | static mame_bitmap* collision_bitmap; |
| 44 | static s2636_t *s2636_0, *s2636_1; | |
| 45 | UINT8 *malzak_s2636_0_ram; | |
| 46 | UINT8 *malzak_s2636_1_ram; | |
| 44 | 47 | |
| 45 | 48 | int malzak_x; |
| 46 | 49 | int malzak_y; |
| r1679 | r1680 | |
| 57 | 60 | collision_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); |
| 58 | 61 | |
| 59 | 62 | saa5050_vidram = auto_malloc(0x800); |
| 63 | ||
| 64 | /* configure the S2636 chips */ | |
| 65 | // s2636_0 = s2636_config(malzak_s2636_0_ram, machine->screen[0].height, machine->screen[0].width, -8, -16); | |
| 66 | // s2636_1 = s2636_config(malzak_s2636_1_ram, machine->screen[0].height, machine->screen[0].width, -9, -16); | |
| 67 | s2636_0 = s2636_config(malzak_s2636_0_ram, machine->screen[0].height, machine->screen[0].width, 0, -16); | |
| 68 | s2636_1 = s2636_config(malzak_s2636_1_ram, machine->screen[0].height, machine->screen[0].width, 0, -16); | |
| 60 | 69 | } |
| 61 | 70 | |
| 62 | 71 | VIDEO_UPDATE( malzak ) |
| r1679 | r1680 | |
| 64 | 73 | int code, colour; |
| 65 | 74 | int sx, sy; |
| 66 | 75 | int x,y; |
| 76 | mame_bitmap *s2636_0_bitmap; | |
| 77 | mame_bitmap *s2636_1_bitmap; | |
| 67 | 78 | |
| 68 | 79 | fillbitmap(bitmap,0,0); |
| 69 | 80 | |
| r1679 | r1680 | |
| 169 | 180 | { |
| 170 | 181 | if (saa5050_state.saa5050_flags & SAA5050_DBLHI) |
| 171 | 182 | { |
| 172 | drawgfx (bitmap, machine->gfx[ | |
| 183 | drawgfx (bitmap, machine->gfx[2], code, colour, 0, 0, | |
| 173 | 184 | sx * 6, sy * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); |
| 174 | drawgfx (bitmap, machine->gfx[ | |
| 185 | drawgfx (bitmap, machine->gfx[3], code, colour, 0, 0, | |
| 175 | 186 | sx * 6, (sy + 1) * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); |
| 176 | 187 | } |
| 177 | 188 | else |
| 178 | 189 | { |
| 179 | drawgfx (bitmap, machine->gfx[ | |
| 190 | drawgfx (bitmap, machine->gfx[1], code, colour, 0, 0, | |
| 180 | 191 | sx * 6, sy * 10, &machine->screen[0].visarea, TRANSPARENCY_NONE, 0); |
| 181 | 192 | } |
| 182 | 193 | } |
| r1679 | r1680 | |
| 208 | 219 | sx, sy, &machine->screen[0].visarea, TRANSPARENCY_PEN, 0); |
| 209 | 220 | } |
| 210 | 221 | |
| 211 | // S2636 - Sprites / Collision detection (x2) | |
| 222 | /* update the S2636 chips */ | |
| 223 | s2636_0_bitmap = s2636_update(s2636_0, cliprect); | |
| 224 | s2636_1_bitmap = s2636_update(s2636_1, cliprect); | |
| 212 | 225 | |
| 213 | s2636_x_offset = -16; | |
| 214 | // s2636_y_offset = -8; | |
| 226 | /* copy the S2636 images into the main bitmap */ | |
| 227 | { | |
| 228 | int y; | |
| 215 | 229 | |
| 216 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,1,collision_bitmap); | |
| 217 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,2,collision_bitmap); | |
| 230 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 231 | { | |
| 232 | int x; | |
| 233 | ||
| 234 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) | |
| 235 | { | |
| 236 | int pixel0 = *BITMAP_ADDR8(s2636_0_bitmap, y, x); | |
| 237 | int pixel1 = *BITMAP_ADDR8(s2636_1_bitmap, y, x); | |
| 238 | ||
| 239 | if (S2636_IS_PIXEL_DRAWN(pixel0)) | |
| 240 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel0)]; | |
| 241 | ||
| 242 | if (S2636_IS_PIXEL_DRAWN(pixel1)) | |
| 243 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel1)]; | |
| 244 | } | |
| 245 | } | |
| 246 | } | |
| 247 | ||
| 218 | 248 | return 0; |
| 219 | 249 | } |
| 220 | 250 |
| r1679 | r1680 | |
|---|---|---|
| 490 | 490 | { |
| 491 | 491 | if( gfx ) |
| 492 | 492 | { |
| 493 | const pen_t *pal = &Machine-> | |
| 493 | const pen_t *pal = &Machine-> | |
| 494 | 494 | int source_base = (code % gfx->total_elements) * gfx->height; |
| 495 | 495 | |
| 496 | 496 | if (sprite_screen_width && sprite_screen_height) |
| r1679 | r1680 | |
| 949 | 949 | |
| 950 | 950 | VIDEO_START( captaven ) |
| 951 | 951 | { |
| 952 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 953 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 954 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 955 | pf3_tilemap = tilemap_create(get_ca_pf3_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 952 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 953 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,16,16,64,32); | |
| 954 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,16,16,64,32); | |
| 955 | pf3_tilemap = tilemap_create(get_ca_pf3_tile_info, tilemap_scan_rows,16,16,32,32); | |
| 956 | 956 | deco32_raster_display_list=auto_malloc(10 * 256); |
| 957 | 957 | memset(deco32_raster_display_list, 0, 10 * 256); |
| 958 | 958 | |
| r1679 | r1680 | |
| 968 | 968 | |
| 969 | 969 | VIDEO_START( fghthist ) |
| 970 | 970 | { |
| 971 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 972 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 973 | pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 974 | pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 971 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 972 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,16,16,64,32); | |
| 973 | pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,16,16,64,32); | |
| 974 | pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows, 16,16,64,32); | |
| 975 | 975 | pf1a_tilemap =0; |
| 976 | 976 | dirty_palette = auto_malloc(4096); |
| 977 | 977 | |
| r1679 | r1680 | |
| 988 | 988 | |
| 989 | 989 | VIDEO_START( dragngun ) |
| 990 | 990 | { |
| 991 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 992 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 993 | pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 994 | pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 995 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 991 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 992 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,16,16,64,32); | |
| 993 | pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,16,16,64,32); | |
| 994 | pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows, 16,16,64,32); | |
| 995 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,16,16,64,32); | |
| 996 | 996 | dirty_palette = auto_malloc(4096); |
| 997 | 997 | deco32_raster_display_list = auto_malloc(10 * 256); |
| 998 | 998 | |
| r1679 | r1680 | |
| 1011 | 1011 | |
| 1012 | 1012 | VIDEO_START( lockload ) |
| 1013 | 1013 | { |
| 1014 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 1015 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 1016 | pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 1017 | pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 1018 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 1014 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 1015 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,16,16,64,32); | |
| 1016 | pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,16,16,32,32); | |
| 1017 | pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows, 16,16,32,32); | |
| 1018 | pf1a_tilemap =tilemap_create(get_pf1a_tile_info, deco16_scan_rows,16,16,64,32); | |
| 1019 | 1019 | dirty_palette = auto_malloc(4096); |
| 1020 | 1020 | deco32_raster_display_list = auto_malloc(10 * 256); |
| 1021 | 1021 | memset(deco32_raster_display_list, 0, 10 * 256); |
| r1679 | r1680 | |
| 1035 | 1035 | |
| 1036 | 1036 | VIDEO_START( nslasher ) |
| 1037 | 1037 | { |
| 1038 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 1039 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 1040 | pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 1041 | pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 1038 | pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 1039 | pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,16,16,64,32); | |
| 1040 | pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,16,16,64,32); | |
| 1041 | pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows, 16,16,64,32); | |
| 1042 | 1042 | pf1a_tilemap =0; |
| 1043 | 1043 | dirty_palette = auto_malloc(4096); |
| 1044 | 1044 | |
| r1679 | r1680 | |
| 1414 | 1414 | */ |
| 1415 | 1415 | static void mixDualAlphaSprites(running_machine* machine, mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx0, const gfx_element *gfx1, int mixAlphaTilemap) |
| 1416 | 1416 | { |
| 1417 | const pen_t *pal0 = &machine->remapped_colortable[gfx0->color_base]; | |
| 1418 | const pen_t *pal1 = &machine->remapped_colortable[gfx1->color_base]; | |
| 1419 | const pen_t *pal2 = &machine->remapped_colortable[(deco32_pri&1) ? machine->gfx[1]->color_base : machine->gfx[2]->color_base]; | |
| 1417 | const pen_t *pal0 = &machine->pens[gfx0->color_base]; | |
| 1418 | const pen_t *pal1 = &machine->pens[gfx1->color_base]; | |
| 1419 | const pen_t *pal2 = &machine->pens[(deco32_pri&1) ? machine->gfx[1]->color_base : machine->gfx[2]->color_base]; | |
| 1420 | 1420 | int x,y; |
| 1421 | 1421 | |
| 1422 | 1422 | /* Mix sprites into main bitmap, based on priority & alpha */ |
| r1679 | r1680 | |
|---|---|---|
| 307 | 307 | { |
| 308 | 308 | lowbitscroll = 0; |
| 309 | 309 | /* info offset type w h col row */ |
| 310 | bg0_tilemap = tilemap_create(argus_get_bg0_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 311 | bg1_tilemap = tilemap_create(argus_get_bg1_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 312 | tx_tilemap = tilemap_create(argus_get_tx_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 310 | bg0_tilemap = tilemap_create(argus_get_bg0_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 311 | bg1_tilemap = tilemap_create(argus_get_bg1_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 312 | tx_tilemap = tilemap_create(argus_get_tx_tile_info, tilemap_scan_cols, 8, 8, 32, 32); | |
| 313 | 313 | |
| 314 | 314 | /* dummy RAM for back ground */ |
| 315 | 315 | argus_dummy_bg0ram = auto_malloc( 0x800 ); |
| r1679 | r1680 | |
| 328 | 328 | VIDEO_START( valtric ) |
| 329 | 329 | { |
| 330 | 330 | /* info offset type w h col row */ |
| 331 | bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 332 | tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 331 | bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 332 | tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, 8, 8, 32, 32); | |
| 333 | 333 | |
| 334 | 334 | tilemap_set_transparent_pen( bg1_tilemap, 15 ); |
| 335 | 335 | tilemap_set_transparent_pen( tx_tilemap, 15 ); |
| r1679 | r1680 | |
| 341 | 341 | VIDEO_START( butasan ) |
| 342 | 342 | { |
| 343 | 343 | /* info offset type w h col row */ |
| 344 | bg0_tilemap = tilemap_create(butasan_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 345 | bg1_tilemap = tilemap_create(butasan_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 346 | tx_tilemap = tilemap_create(butasan_get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 344 | bg0_tilemap = tilemap_create(butasan_get_bg0_tile_info, tilemap_scan_rows, 16, 16, 32, 32); | |
| 345 | bg1_tilemap = tilemap_create(butasan_get_bg1_tile_info, tilemap_scan_rows, 16, 16, 32, 32); | |
| 346 | tx_tilemap = tilemap_create(butasan_get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 347 | 347 | |
| 348 | 348 | butasan_txram = auto_malloc( BUTASAN_TEXT_RAMSIZE ); |
| 349 | 349 | butasan_bg0ram = auto_malloc( BUTASAN_BG0_RAMSIZE ); |
| r1679 | r1680 | |
| 396 | 396 | VIDEO_START( bombsa ) |
| 397 | 397 | { |
| 398 | 398 | /* info offset type w h col row */ |
| 399 | // bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 400 | tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 399 | // bg1_tilemap = tilemap_create(valtric_get_bg_tile_info, tilemap_scan_cols, 16, 16, 32, 32); | |
| 400 | tx_tilemap = tilemap_create(valtric_get_tx_tile_info, tilemap_scan_cols, 8, 8, 32, 32); | |
| 401 | 401 | |
| 402 | 402 | #if 0 |
| 403 | 403 | /* this might be wrong.. but it looks like there may be a tilemap here that can change between 8x8 and 16x16 mode.. */ |
| 404 | 404 | /* when you start the game it gets 'corrupted' with data for another layer.. */ |
| 405 | tx_alt_tilemap = tilemap_create(bombsa_get_tx_alt_tile_info, tilemap_scan_cols, | |
| 405 | tx_alt_tilemap = tilemap_create(bombsa_get_tx_alt_tile_info, tilemap_scan_cols, | |
| 406 | 406 | #endif |
| 407 | 407 | |
| 408 | bombsa_bg_tilemap = tilemap_create(bombsa_get_bg_tile_info, tilemap_scan_cols, | |
| 408 | bombsa_bg_tilemap = tilemap_create(bombsa_get_bg_tile_info, tilemap_scan_cols, | |
| 409 | 409 | |
| 410 | 410 | #if 0 |
| 411 | 411 | bombsa_tx_alt_ram = auto_malloc(0x800); |
| r1679 | r1680 | |
|---|---|---|
| 111 | 111 | state->work_bitmap = auto_bitmap_alloc(32,32,machine->screen[0].format); |
| 112 | 112 | |
| 113 | 113 | /* allocate tilemaps for each of the three sections */ |
| 114 | state->text_tilemap = tilemap_create(get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 115 | state->left_tilemap = tilemap_create(get_left_tile_info, get_memory_offset, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 116 | state->right_tilemap = tilemap_create(get_right_tile_info, get_memory_offset, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 117 | state->center_tilemap = tilemap_create(get_center_tile_info, get_memory_offset, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 114 | state->text_tilemap = tilemap_create(get_text_tile_info, tilemap_scan_rows, 8,8, 32,32); | |
| 115 | state->left_tilemap = tilemap_create(get_left_tile_info, get_memory_offset, 8,8, 64,32); | |
| 116 | state->right_tilemap = tilemap_create(get_right_tile_info, get_memory_offset, 8,8, 64,32); | |
| 117 | state->center_tilemap = tilemap_create(get_center_tile_info, get_memory_offset, 8,8, 64,32); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | #if 0 |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | { |
| 82 | 82 | bg_tile_bank = fg_tile_bank = 0; |
| 83 | 83 | |
| 84 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 85 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 86 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 84 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 85 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 86 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 89 | 89 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 86 | 86 | |
| 87 | 87 | VIDEO_START( goodejan ) |
| 88 | 88 | { |
| 89 | bg_tilemap = tilemap_create(goodejan_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 90 | tx_tilemap = tilemap_create(goodejan_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 89 | bg_tilemap = tilemap_create(goodejan_bg_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 90 | tx_tilemap = tilemap_create(goodejan_tx_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 91 | 91 | tilemap_set_transparent_pen(tx_tilemap,15); |
| 92 | 92 | } |
| 93 | 93 |
| r1679 | r1680 | |
|---|---|---|
| 78 | 78 | VIDEO_START( gaiden ) |
| 79 | 79 | { |
| 80 | 80 | /* set up tile layers */ |
| 81 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 64, 32); | |
| 82 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 64, 32); | |
| 83 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 81 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); | |
| 82 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); | |
| 83 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 84 | 84 | |
| 85 | 85 | tilemap_set_transparent_pen(background, 0); |
| 86 | 86 | tilemap_set_transparent_pen(foreground, 0); |
| r1679 | r1680 | |
| 93 | 93 | tile_bitmap_bg = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| 94 | 94 | tile_bitmap_fg = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| 95 | 95 | |
| 96 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 97 | foreground = tilemap_create(get_fg_tile_info_raiga,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 98 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 96 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows,16,16,64,32); | |
| 97 | foreground = tilemap_create(get_fg_tile_info_raiga,tilemap_scan_rows,16,16,64,32); | |
| 98 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 99 | 99 | |
| 100 | 100 | tilemap_set_transparent_pen(background,0); |
| 101 | 101 | tilemap_set_transparent_pen(foreground,0); |
| r1679 | r1680 | |
| 108 | 108 | VIDEO_START( drgnbowl ) |
| 109 | 109 | { |
| 110 | 110 | /* set up tile layers */ |
| 111 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 64, 32); | |
| 112 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 64, 32); | |
| 113 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 111 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); | |
| 112 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 16, 16, 64, 32); | |
| 113 | text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 114 | 114 | |
| 115 | 115 | tilemap_set_transparent_pen(foreground, 15); |
| 116 | 116 | tilemap_set_transparent_pen(text_layer, 15); |
| r1679 | r1680 | |
|---|---|---|
| 136 | 136 | memset(congo_custom, 0, sizeof(congo_custom)); |
| 137 | 137 | |
| 138 | 138 | /* create a background and foreground tilemap */ |
| 139 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,512); | |
| 140 | fg_tilemap = tilemap_create(fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 139 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8,8, 32,512); | |
| 140 | fg_tilemap = tilemap_create(fg_tile_info, tilemap_scan_rows, 8,8, 32,32); | |
| 141 | 141 | |
| 142 | 142 | /* configure the foreground tilemap */ |
| 143 | 143 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | VIDEO_START( shangkid ) |
| 52 | 52 | { |
| 53 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 53 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | WRITE8_HANDLER( shangkid_videoram_w ) |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | UINT8 *trackfld_scroll; |
| 12 | 13 | UINT8 *trackfld_scroll2; |
| r1679 | r1680 | |
| 34 | 35 | ***************************************************************************/ |
| 35 | 36 | PALETTE_INIT( trackfld ) |
| 36 | 37 | { |
| 38 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 39 | static const int resistances_b [2] = { 470, 220 }; | |
| 40 | double rweights[3], gweights[3], bweights[2]; | |
| 37 | 41 | int i; |
| 38 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 39 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 40 | 42 | |
| 43 | /* compute the color output resistor weights */ | |
| 44 | compute_resistor_weights(0, 255, -1.0, | |
| 45 | 3, &resistances_rg[0], rweights, 1000, 0, | |
| 46 | 3, &resistances_rg[0], gweights, 1000, 0, | |
| 47 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 41 | 48 | |
| 42 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 49 | /* allocate the colortable */ | |
| 50 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 51 | ||
| 52 | /* create a lookup table for the palette */ | |
| 53 | for (i = 0; i < 0x20; i++) | |
| 43 | 54 | { |
| 44 | int bit0,bit1,bit2,r,g,b; | |
| 55 | int bit0, bit1, bit2; | |
| 56 | int r, g, b; | |
| 45 | 57 | |
| 58 | /* red component */ | |
| 59 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 60 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 61 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 62 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 46 | 63 | |
| 47 | /* red component */ | |
| 48 | bit0 = (*color_prom >> 0) & 0x01; | |
| 49 | bit1 = (*color_prom >> 1) & 0x01; | |
| 50 | bit2 = (*color_prom >> 2) & 0x01; | |
| 51 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 52 | 64 | /* green component */ |
| 53 | bit0 = (*color_prom >> 3) & 0x01; | |
| 54 | bit1 = (*color_prom >> 4) & 0x01; | |
| 55 | bit2 = (*color_prom >> 5) & 0x01; | |
| 56 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 65 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 66 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 67 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 68 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 69 | ||
| 57 | 70 | /* blue component */ |
| 58 | bit0 = 0; | |
| 59 | bit1 = (*color_prom >> 6) & 0x01; | |
| 60 | bit2 = (*color_prom >> 7) & 0x01; | |
| 61 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 71 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 72 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 73 | b = combine_2_weights(bweights, bit0, bit1); | |
| 62 | 74 | |
| 63 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 64 | ||
| 65 | color_prom++; | |
| 75 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 66 | 76 | } |
| 67 | 77 | |
| 68 | 78 | /* color_prom now points to the beginning of the lookup table */ |
| 79 | color_prom += 0x20; | |
| 69 | 80 | |
| 70 | ||
| 71 | 81 | /* sprites */ |
| 72 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 73 | COLOR(1,i) = *(color_prom++) & 0x0f; | |
| 82 | for (i = 0; i < 0x100; i++) | |
| 83 | { | |
| 84 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 85 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 86 | } | |
| 74 | 87 | |
| 75 | 88 | /* characters */ |
| 76 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 77 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 89 | for (i = 0x100; i < 0x200; i++) | |
| 90 | { | |
| 91 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 92 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 93 | } | |
| 78 | 94 | } |
| 79 | 95 | |
| 80 | 96 | WRITE8_HANDLER( trackfld_videoram_w ) |
| r1679 | r1680 | |
| 161 | 177 | if( bg_bank ) |
| 162 | 178 | code |= 0x400; |
| 163 | 179 | |
| 164 | SET_TILE_INFO( | |
| 180 | SET_TILE_INFO(1, code, color, flags); | |
| 165 | 181 | } |
| 166 | 182 | |
| 167 | 183 | VIDEO_START( trackfld ) |
| 168 | 184 | { |
| 169 | 185 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 170 | | |
| 186 | | |
| 171 | 187 | |
| 172 | 188 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 173 | 189 | } |
| r1679 | r1680 | |
| 196 | 212 | /* proving that this is a hardware related "feature" */ |
| 197 | 213 | sy += 1; |
| 198 | 214 | |
| 199 | drawgfx(bitmap, machine->gfx[ | |
| 215 | drawgfx(bitmap, machine->gfx[0], | |
| 200 | 216 | code + sprite_bank1 + sprite_bank2, color, |
| 201 | 217 | flipx, flipy, |
| 202 | 218 | sx, sy, |
| 203 | 219 | cliprect, |
| 204 | TRANSPARENCY_COLOR, 0); | |
| 220 | TRANSPARENCY_PENS, | |
| 221 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 205 | 222 | |
| 206 | 223 | /* redraw with wraparound */ |
| 207 | drawgfx(bitmap,machine->gfx[ | |
| 224 | drawgfx(bitmap,machine->gfx[0], | |
| 208 | 225 | code + sprite_bank1 + sprite_bank2, color, |
| 209 | 226 | flipx, flipy, |
| 210 | 227 | sx - 256, sy, |
| 211 | 228 | cliprect, |
| 212 | TRANSPARENCY_COLOR, 0); | |
| 229 | TRANSPARENCY_PENS, | |
| 230 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 213 | 231 | } |
| 214 | 232 | } |
| 215 | 233 |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "deprecat.h" |
| 11 | #include "video/resnet.h" | |
| 11 | 12 | #include "fastfred.h" |
| 12 | 13 | |
| 13 | 14 | extern UINT8 galaxian_stars_on; |
| r1679 | r1680 | |
| 18 | 19 | UINT8 *fastfred_spriteram; |
| 19 | 20 | size_t fastfred_spriteram_size; |
| 20 | 21 | UINT8 *fastfred_attributesram; |
| 22 | UINT8 *fastfred_background_color; | |
| 21 | 23 | UINT8 *imago_fg_videoram; |
| 22 | 24 | |
| 23 | 25 | |
| r1679 | r1680 | |
| 36 | 38 | static UINT16 charbank; |
| 37 | 39 | static UINT8 colorbank; |
| 38 | 40 | int fastfred_hardware_type; |
| 39 | static const UINT8 *fastfred_color_prom; | |
| 40 | 41 | static tilemap *bg_tilemap, *fg_tilemap, *web_tilemap; |
| 41 | 42 | |
| 42 | 43 | /*************************************************************************** |
| r1679 | r1680 | |
| 50 | 51 | |
| 51 | 52 | ***************************************************************************/ |
| 52 | 53 | |
| 53 | static void set_color(pen_t pen, int i) | |
| 54 | { | |
| 55 | UINT8 r,g,b; | |
| 56 | int bit0, bit1, bit2, bit3; | |
| 57 | ||
| 58 | bit0 = (fastfred_color_prom[i] >> 0) & 0x01; | |
| 59 | bit1 = (fastfred_color_prom[i] >> 1) & 0x01; | |
| 60 | bit2 = (fastfred_color_prom[i] >> 2) & 0x01; | |
| 61 | bit3 = (fastfred_color_prom[i] >> 3) & 0x01; | |
| 62 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 63 | bit0 = (fastfred_color_prom[i + 0x100] >> 0) & 0x01; | |
| 64 | bit1 = (fastfred_color_prom[i + 0x100] >> 1) & 0x01; | |
| 65 | bit2 = (fastfred_color_prom[i + 0x100] >> 2) & 0x01; | |
| 66 | bit3 = (fastfred_color_prom[i + 0x100] >> 3) & 0x01; | |
| 67 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 68 | bit0 = (fastfred_color_prom[i + 0x200] >> 0) & 0x01; | |
| 69 | bit1 = (fastfred_color_prom[i + 0x200] >> 1) & 0x01; | |
| 70 | bit2 = (fastfred_color_prom[i + 0x200] >> 2) & 0x01; | |
| 71 | bit3 = (fastfred_color_prom[i + 0x200] >> 3) & 0x01; | |
| 72 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 73 | ||
| 74 | palette_set_color_rgb(Machine,pen,r,g,b); | |
| 75 | } | |
| 76 | ||
| 77 | 54 | PALETTE_INIT( fastfred ) |
| 78 | 55 | { |
| 79 | pen_t i; | |
| 80 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 81 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 56 | static const int resistances[4] = { 1000, 470, 220, 100 }; | |
| 57 | double rweights[4], gweights[4], bweights[4]; | |
| 58 | int i; | |
| 82 | 59 | |
| 60 | /* compute the color output resistor weights */ | |
| 61 | compute_resistor_weights(0, 255, -1.0, | |
| 62 | 4, resistances, rweights, 470, 0, | |
| 63 | 4, resistances, gweights, 470, 0, | |
| 64 | 4, resistances, bweights, 470, 0); | |
| 83 | 65 | |
| 84 | fastfred_color_prom = color_prom; /* we'll need this later */ | |
| 66 | /* allocate the colortable */ | |
| 67 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 85 | 68 | |
| 86 | for (i = 0;i < 256;i++) | |
| 69 | /* create a lookup table for the palette */ | |
| 70 | for (i = 0; i < 0x100; i++) | |
| 87 | 71 | { |
| 88 | set_color(i, i); | |
| 89 | } | |
| 72 | int bit0, bit1, bit2, bit3; | |
| 73 | int r, g, b; | |
| 90 | 74 | |
| 75 | /* red component */ | |
| 76 | bit0 = (color_prom[i + 0x000] >> 0) & 0x01; | |
| 77 | bit1 = (color_prom[i + 0x000] >> 1) & 0x01; | |
| 78 | bit2 = (color_prom[i + 0x000] >> 2) & 0x01; | |
| 79 | bit3 = (color_prom[i + 0x000] >> 3) & 0x01; | |
| 80 | r = combine_4_weights(rweights, bit0, bit1, bit2, bit3); | |
| 91 | 81 | |
| 92 | /* characters and sprites use the same palette */ | |
| 93 | for (i = 0; i < TOTAL_COLORS(0); i++) | |
| 94 | { | |
| 95 | pen_t color; | |
| 82 | /* green component */ | |
| 83 | bit0 = (color_prom[i + 0x100] >> 0) & 0x01; | |
| 84 | bit1 = (color_prom[i + 0x100] >> 1) & 0x01; | |
| 85 | bit2 = (color_prom[i + 0x100] >> 2) & 0x01; | |
| 86 | bit3 = (color_prom[i + 0x100] >> 3) & 0x01; | |
| 87 | g = combine_4_weights(gweights, bit0, bit1, bit2, bit3); | |
| 96 | 88 | |
| 97 | if ((i & 0x07) == 0) | |
| 98 | color = 0; | |
| 99 | else | |
| 100 | color = i; | |
| 89 | /* blue component */ | |
| 90 | bit0 = (color_prom[i + 0x200] >> 0) & 0x01; | |
| 91 | bit1 = (color_prom[i + 0x200] >> 1) & 0x01; | |
| 92 | bit2 = (color_prom[i + 0x200] >> 2) & 0x01; | |
| 93 | bit3 = (color_prom[i + 0x200] >> 3) & 0x01; | |
| 94 | b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); | |
| 101 | 95 | |
| 102 | | |
| 96 | colortable_palette_set_color(machine->colortable, i, MAKE_ | |
| 103 | 97 | } |
| 98 | ||
| 99 | /* characters and sprites use the same palette */ | |
| 100 | for (i = 0; i < 0x100; i++) | |
| 101 | colortable_entry_set_value(machine->colortable, i, i); | |
| 104 | 102 | } |
| 105 | 103 | |
| 106 | 104 | /*************************************************************************** |
| r1679 | r1680 | |
| 129 | 127 | |
| 130 | 128 | VIDEO_START( fastfred ) |
| 131 | 129 | { |
| 132 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 130 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 133 | 131 | |
| 132 | tilemap_set_transparent_pen(bg_tilemap, 0); | |
| 134 | 133 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 135 | 134 | } |
| 136 | 135 | |
| r1679 | r1680 | |
| 221 | 220 | } |
| 222 | 221 | |
| 223 | 222 | |
| 224 | WRITE8_HANDLER( fastfred_background_color_w ) | |
| 225 | { | |
| 226 | set_color(0, data); | |
| 227 | } | |
| 228 | 223 | |
| 229 | ||
| 230 | 224 | WRITE8_HANDLER( fastfred_flip_screen_x_w ) |
| 231 | 225 | { |
| 232 | 226 | if (flip_screen_x != (data & 0x01)) |
| r1679 | r1680 | |
| 332 | 326 | |
| 333 | 327 | VIDEO_UPDATE( fastfred ) |
| 334 | 328 | { |
| 329 | fillbitmap(bitmap, *fastfred_background_color, cliprect); | |
| 335 | 330 | tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); |
| 336 | ||
| 337 | 331 | draw_sprites(machine, bitmap, cliprect); |
| 332 | ||
| 338 | 333 | return 0; |
| 339 | 334 | } |
| 340 | 335 | |
| r1679 | r1680 | |
| 377 | 372 | |
| 378 | 373 | VIDEO_START( imago ) |
| 379 | 374 | { |
| 380 | web_tilemap = tilemap_create(imago_get_tile_info_web,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 381 | bg_tilemap = tilemap_create(imago_get_tile_info_bg, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 382 | fg_tilemap = tilemap_create(imago_get_tile_info_fg, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 375 | web_tilemap = tilemap_create(imago_get_tile_info_web,tilemap_scan_rows, 8,8,32,32); | |
| 376 | bg_tilemap = tilemap_create(imago_get_tile_info_bg, tilemap_scan_rows,8,8,32,32); | |
| 377 | fg_tilemap = tilemap_create(imago_get_tile_info_fg, tilemap_scan_rows,8,8,32,32); | |
| 383 | 378 | |
| 384 | 379 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 385 | 380 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
| 396 | 391 | VIDEO_UPDATE( imago ) |
| 397 | 392 | { |
| 398 | 393 | tilemap_draw(bitmap,cliprect,web_tilemap,0,0); |
| 399 | ||
| 400 | 394 | galaxian_draw_stars(machine, bitmap); |
| 401 | ||
| 402 | 395 | tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); |
| 403 | ||
| 404 | 396 | draw_sprites(machine, bitmap, cliprect); |
| 405 | ||
| 406 | 397 | tilemap_draw(bitmap,cliprect,fg_tilemap,0,0); |
| 398 | ||
| 407 | 399 | return 0; |
| 408 | 400 | } |
| r1679 | r1680 | |
|---|---|---|
| 240 | 240 | dirty_f=auto_malloc(0x800); |
| 241 | 241 | memset(dirty_f,1,0x800); |
| 242 | 242 | |
| 243 | fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_rows, | |
| 243 | fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_rows, | |
| 244 | 244 | |
| 245 | 245 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 246 | 246 | } |
| r1679 | r1680 | |
| 253 | 253 | dirty_f=auto_malloc(0x800); |
| 254 | 254 | memset(dirty_f,1,0x800); |
| 255 | 255 | |
| 256 | fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_cols, | |
| 256 | fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_cols, | |
| 257 | 257 | |
| 258 | 258 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 259 | 259 | } |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | VIDEO_START( lwings ) |
| 93 | 93 | { |
| 94 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 95 | bg1_tilemap = tilemap_create(lwings_get_bg1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 94 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 95 | bg1_tilemap = tilemap_create(lwings_get_bg1_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 96 | 96 | |
| 97 | 97 | tilemap_set_transparent_pen(fg_tilemap,3); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | VIDEO_START( trojan ) |
| 101 | 101 | { |
| 102 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN,8, 8,32,32); | |
| 103 | bg1_tilemap = tilemap_create(trojan_get_bg1_tile_info,tilemap_scan_cols, TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 104 | bg2_tilemap = tilemap_create(get_bg2_tile_info, get_bg2_memory_offset,TILEMAP_TYPE_PEN, 16,16,32,16); | |
| 102 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 103 | bg1_tilemap = tilemap_create(trojan_get_bg1_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 104 | bg2_tilemap = tilemap_create(get_bg2_tile_info, get_bg2_memory_offset, 16,16,32,16); | |
| 105 | 105 | |
| 106 | 106 | tilemap_set_transparent_pen(fg_tilemap,3); |
| 107 | 107 | tilemap_set_transmask(bg1_tilemap,0,0xffff,0x0001); /* split type 0 is totally transparent in front half */ |
| r1679 | r1680 | |
|---|---|---|
| 45 | 45 | bit 0 -- 2 kohm resistor -- inverter -- RED/GREEN/BLUE |
| 46 | 46 | |
| 47 | 47 | ***************************************************************************/ |
| 48 | static void convert_palette(running_machine *machine,const UINT8 *color_prom) | |
| 49 | { | |
| 50 | int i; | |
| 51 | 48 | |
| 52 | ||
| 53 | for (i = 0;i < 1024;i++) | |
| 54 | { | |
| 55 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 56 | ||
| 57 | ||
| 58 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 59 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 60 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 61 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 62 | r = 255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3); | |
| 63 | bit0 = (color_prom[1024] >> 0) & 0x01; | |
| 64 | bit1 = (color_prom[1024] >> 1) & 0x01; | |
| 65 | bit2 = (color_prom[1024] >> 2) & 0x01; | |
| 66 | bit3 = (color_prom[1024] >> 3) & 0x01; | |
| 67 | g = 255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3); | |
| 68 | bit0 = (color_prom[2*1024] >> 0) & 0x01; | |
| 69 | bit1 = (color_prom[2*1024] >> 1) & 0x01; | |
| 70 | bit2 = (color_prom[2*1024] >> 2) & 0x01; | |
| 71 | bit3 = (color_prom[2*1024] >> 3) & 0x01; | |
| 72 | b = 255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3); | |
| 73 | ||
| 74 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 75 | color_prom++; | |
| 76 | } | |
| 77 | ||
| 78 | /* reserve the last color for the transparent pen (none of the game colors has */ | |
| 79 | /* these RGB components) */ | |
| 80 | palette_set_color(machine,1024,MAKE_RGB(240,240,240)); | |
| 81 | } | |
| 82 | ||
| 83 | ||
| 84 | 49 | /* these depend on jumpers on the board and change from game to game */ |
| 85 | 50 | static int gfx0inv,gfx1inv,gfx2inv,gfx3inv; |
| 86 | 51 | |
| 87 | 52 | PALETTE_INIT( punchout ) |
| 88 | 53 | { |
| 89 | 54 | int i; |
| 90 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 91 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)]) | |
| 92 | 55 | |
| 56 | for (i = 0; i < 0x800; i++) | |
| 57 | { | |
| 58 | int pen; | |
| 59 | int r, g, b; | |
| 93 | 60 | |
| 94 | convert_palette(machine,color_prom); | |
| 61 | if (i < 0x200) | |
| 62 | /* top monitor chars */ | |
| 63 | pen = ((i - 0x000) ^ gfx0inv) | 0x000; | |
| 64 | else if (i < 0x400) | |
| 65 | /* bottom monitor chars */ | |
| 66 | pen = ((i - 0x200) ^ gfx1inv) | 0x200; | |
| 67 | else if (i < 0x600) | |
| 68 | /* big sprite #1 */ | |
| 69 | pen = ((i - 0x400) ^ gfx2inv) | 0x200; | |
| 70 | else | |
| 71 | /* big sprite #2*/ | |
| 72 | pen = ((i - 0x600) ^ gfx3inv) | 0x200; | |
| 95 | 73 | |
| 74 | r = 255 - pal4bit(color_prom[pen + 0x000]); | |
| 75 | g = 255 - pal4bit(color_prom[pen + 0x400]); | |
| 76 | b = 255 - pal4bit(color_prom[pen + 0x800]); | |
| 96 | 77 | |
| 97 | /* top monitor chars */ | |
| 98 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 99 | COLOR(0,i ^ gfx0inv) = i; | |
| 100 | ||
| 101 | /* bottom monitor chars */ | |
| 102 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 103 | COLOR(1,i ^ gfx1inv) = i + 512; | |
| 104 | ||
| 105 | /* big sprite #1 */ | |
| 106 | for (i = 0;i < TOTAL_COLORS(2);i++) | |
| 107 | { | |
| 108 | if (i % 8 == 0) COLOR(2,i ^ gfx2inv) = 1024; /* transparent */ | |
| 109 | else COLOR(2,i ^ gfx2inv) = i + 512; | |
| 78 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 110 | 79 | } |
| 111 | ||
| 112 | /* big sprite #2 */ | |
| 113 | for (i = 0;i < TOTAL_COLORS(3);i++) | |
| 114 | { | |
| 115 | if (i % 4 == 0) COLOR(3,i ^ gfx3inv) = 1024; /* transparent */ | |
| 116 | else COLOR(3,i ^ gfx3inv) = i + 512; | |
| 117 | } | |
| 118 | 80 | } |
| 119 | 81 | |
| 82 | ||
| 120 | 83 | PALETTE_INIT( armwrest ) |
| 121 | 84 | { |
| 122 | 85 | int i; |
| 123 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 124 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)]) | |
| 125 | 86 | |
| 87 | for (i = 0; i < 0xa00; i++) | |
| 88 | { | |
| 89 | int pen; | |
| 90 | int r, g, b; | |
| 126 | 91 | |
| 127 | convert_palette(machine,color_prom); | |
| 92 | if (i < 0x400) | |
| 93 | /* top monitor chars */ | |
| 94 | pen = (i - 0x000) | 0x000; | |
| 95 | else if (i < 0x600) | |
| 96 | /* bottom monitor chars */ | |
| 97 | pen = (i - 0x400) | 0x200; | |
| 98 | else if (i < 0x800) | |
| 99 | /* big sprite #1 */ | |
| 100 | pen = (i - 0x600) | 0x200; | |
| 101 | else | |
| 102 | /* big sprite #2*/ | |
| 103 | pen = ((i - 0x800) ^ 0x03) | 0x200; | |
| 128 | 104 | |
| 105 | r = 255 - pal4bit(color_prom[pen + 0x000]); | |
| 106 | g = 255 - pal4bit(color_prom[pen + 0x400]); | |
| 107 | b = 255 - pal4bit(color_prom[pen + 0x800]); | |
| 129 | 108 | |
| 130 | /* top monitor / bottom monitor backround chars */ | |
| 131 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 132 | COLOR(0,i) = i; | |
| 133 | ||
| 134 | /* bottom monitor foreground chars */ | |
| 135 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 136 | COLOR(1,i) = i + 512; | |
| 137 | ||
| 138 | /* big sprite #1 */ | |
| 139 | for (i = 0;i < TOTAL_COLORS(2);i++) | |
| 140 | { | |
| 141 | if (i % 8 == 7) COLOR(2,i) = 1024; /* transparent */ | |
| 142 | else COLOR(2,i) = i + 512; | |
| 109 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 143 | 110 | } |
| 144 | ||
| 145 | /* big sprite #2 - pen order is inverted */ | |
| 146 | for (i = 0;i < TOTAL_COLORS(3);i++) | |
| 147 | { | |
| 148 | if (i % 4 == 3) COLOR(3,i ^ 3) = 1024; /* transparent */ | |
| 149 | else COLOR(3,i ^ 3) = i + 512; | |
| 150 | } | |
| 151 | 111 | } |
| 152 | 112 | |
| 153 | 113 | |
| 154 | ||
| 155 | 114 | DRIVER_INIT( punchout ) |
| 156 | 115 | { |
| 157 | 116 | gfx0inv = 0x03; |
| r1679 | r1680 | |
| 222 | 181 | |
| 223 | 182 | VIDEO_START( punchout ) |
| 224 | 183 | { |
| 225 | punchout_topTilemap = tilemap_create(top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 226 | punchout_botTilemap = tilemap_create(bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 184 | punchout_topTilemap = tilemap_create(top_get_info, tilemap_scan_rows, 8,8, 32,32); | |
| 185 | punchout_botTilemap = tilemap_create(bot_get_info, tilemap_scan_rows, 8,8, 64,32); | |
| 227 | 186 | tilemap_set_scroll_rows(punchout_botTilemap, 32); |
| 228 | 187 | |
| 229 | spr1tilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); | |
| 230 | spr1alttilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); | |
| 231 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); | |
| 188 | spr1tilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, 8,8, 16,32); | |
| 189 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, 8,8, 16,32); | |
| 232 | 190 | |
| 233 | 191 | fgtilemap = NULL; |
| 192 | ||
| 193 | tilemap_set_transparent_pen(spr1tilemap, gfx2inv & 0x07); | |
| 194 | tilemap_set_transparent_pen(spr2tilemap, gfx3inv & 0x03); | |
| 234 | 195 | } |
| 235 | 196 | |
| 236 | 197 | |
| r1679 | r1680 | |
| 276 | 237 | |
| 277 | 238 | VIDEO_START( armwrest ) |
| 278 | 239 | { |
| 279 | punchout_topTilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 280 | punchout_botTilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 240 | punchout_topTilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, 8,8, 32,32); | |
| 241 | punchout_botTilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, 8,8, 32,32); | |
| 281 | 242 | |
| 282 | spr1tilemap = tilemap_create(bs1_get_info, armwrest_bs1_scan, TILEMAP_TYPE_PEN, 8,8, 32,16); | |
| 283 | spr1alttilemap = tilemap_create(bs1_get_info, armwrest_bs1alt_scan, TILEMAP_TYPE_PEN, 8,8, 32,16); | |
| 284 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 16,32); | |
| 243 | spr1tilemap = tilemap_create(bs1_get_info, armwrest_bs1_scan, 8,8, 32,16); | |
| 244 | spr1alttilemap = tilemap_create(bs1_get_info, armwrest_bs1alt_scan, 8,8, 32,16); | |
| 245 | spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, 8,8, 16,32); | |
| 246 | fgtilemap = tilemap_create(armwrest_fg_get_info, tilemap_scan_rows, 8,8, 32,32); | |
| 285 | 247 | |
| 286 | fgtilemap = tilemap_create(armwrest_fg_get_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 287 | tilemap_set_transparent_pen(fgtilemap, 7); | |
| 248 | tilemap_set_transparent_pen(spr1tilemap, 0x07); | |
| 249 | tilemap_set_transparent_pen(spr1alttilemap, 0x07); | |
| 250 | tilemap_set_transparent_pen(spr2tilemap, 0x00); | |
| 251 | tilemap_set_transparent_pen(fgtilemap, 0x07); | |
| 288 | 252 | } |
| 289 | 253 | |
| 290 | 254 | |
| r1679 | r1680 | |
| 351 | 315 | zoom = punchout_bigsprite1[0] + 256 * (punchout_bigsprite1[1] & 0x0f); |
| 352 | 316 | if (zoom) |
| 353 | 317 | { |
| 354 | mame_bitmap *sprbitmap = tilemap_get_pixmap(spr1tilemap); | |
| 355 | 318 | int sx,sy; |
| 356 | 319 | UINT32 startx,starty; |
| 357 | 320 | int incxx,incyy; |
| r1679 | r1680 | |
| 373 | 336 | |
| 374 | 337 | if (punchout_bigsprite1[6] & 1) /* flip x */ |
| 375 | 338 | { |
| 376 | startx = ( | |
| 339 | startx = ((16 * 8) | |
| 377 | 340 | incxx = -incxx; |
| 378 | 341 | } |
| 379 | 342 | |
| 380 | | |
| 343 | tilemap_draw_roz(bitmap,cli | |
| 381 | 344 | startx,starty + 0x200*(2) * zoom, |
| 382 | 345 | incxx,0,0,incyy, /* zoom, no rotation */ |
| 383 | 346 | 0, /* no wraparound */ |
| 384 | | |
| 347 | | |
| 385 | 348 | } |
| 386 | 349 | } |
| 387 | 350 | |
| r1679 | r1680 | |
| 393 | 356 | zoom = punchout_bigsprite1[0] + 256 * (punchout_bigsprite1[1] & 0x0f); |
| 394 | 357 | if (zoom) |
| 395 | 358 | { |
| 396 | mame_bitmap *sprbitmap; | |
| 397 | 359 | int sx,sy; |
| 398 | 360 | UINT32 startx,starty; |
| 399 | 361 | int incxx,incyy; |
| 362 | tilemap *_tilemap; | |
| 400 | 363 | |
| 401 | 364 | sx = 4096 - (punchout_bigsprite1[2] + 256 * (punchout_bigsprite1[3] & 0x0f)); |
| 402 | 365 | if (sx > 2048) sx -= 4096; |
| r1679 | r1680 | |
| 413 | 376 | startx += 3740 * zoom; /* adjustment to match the screen shots */ |
| 414 | 377 | starty -= 178 * zoom; /* and make the hall of fame picture nice */ |
| 415 | 378 | |
| 416 | sprbitmap = tilemap_get_pixmap(spr1tilemap); | |
| 417 | ||
| 418 | 379 | if (punchout_bigsprite1[6] & 1) /* flip x */ |
| 419 | 380 | { |
| 420 | sprbitmap = tilemap_get_pixmap(spr1alttilemap); // when you catch the money bag in armwrest it either expects wraparound, or a different layout.. | |
| 421 | startx = (bitmap->width << 16) - startx - 1; | |
| 381 | _tilemap = spr1alttilemap; | |
| 382 | startx = ((32 * 8) << 16) - startx - 1; | |
| 422 | 383 | incxx = -incxx; |
| 423 | 384 | } |
| 385 | else | |
| 386 | _tilemap = spr1tilemap; | |
| 424 | 387 | |
| 425 | copyrozbitmap(bitmap,sprbitmap, | |
| 388 | ||
| 389 | tilemap_draw_roz(bitmap,cliprect,_tilemap, | |
| 426 | 390 | startx,starty + 0x200*(2) * zoom, |
| 427 | 391 | incxx,0,0,incyy, /* zoom, no rotation */ |
| 428 | 392 | 0, /* no wraparound */ |
| 429 | | |
| 393 | | |
| 430 | 394 | } |
| 431 | 395 | } |
| 432 | 396 | |
| 433 | 397 | static void drawbs2(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 434 | 398 | { |
| 435 | mame_bitmap *sprbitmap = tilemap_get_pixmap(spr2tilemap); | |
| 436 | 399 | int sx,sy; |
| 400 | int incxx; | |
| 437 | 401 | |
| 438 | 402 | sx = 512 - (punchout_bigsprite2[0] + 256 * (punchout_bigsprite2[1] & 1)); |
| 439 | 403 | if (sx > 512-127) sx -= 512; |
| r1679 | r1680 | |
| 442 | 406 | sy = -punchout_bigsprite2[2] + 256 * (punchout_bigsprite2[3] & 1); |
| 443 | 407 | sy += 3; /* adjustment to match the screen shots */ |
| 444 | 408 | |
| 445 | copybitmap_trans(bitmap,sprbitmap, punchout_bigsprite2[4] & 1, 0, sx, sy, cliprect, machine->pens[1024]); | |
| 409 | sx = -sx << 16; | |
| 410 | sy = -sy << 16; | |
| 411 | ||
| 412 | if (punchout_bigsprite2[4] & 1) /* flip x */ | |
| 413 | { | |
| 414 | sx = ((16 * 8) << 16) - sx - 1; | |
| 415 | incxx = -1; | |
| 416 | } | |
| 417 | else | |
| 418 | incxx = 1; | |
| 419 | ||
| 420 | tilemap_draw_roz(bitmap,cliprect,spr2tilemap, | |
| 421 | sx, sy, incxx << 16, 0, 0, 1 << 16, | |
| 422 | 0, 0, 0); | |
| 446 | 423 | } |
| 447 | 424 | |
| 448 | 425 | VIDEO_UPDATE( punchout ) |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | VIDEO_START( kopunch ) |
| 92 | 92 | { |
| 93 | 93 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 94 | | |
| 94 | | |
| 95 | 95 | |
| 96 | 96 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 97 | | |
| 97 | | |
| 98 | 98 | |
| 99 | 99 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 100 | 100 | } |
| r1679 | r1680 | |
|---|---|---|
| 85 | 85 | { |
| 86 | 86 | if (tecmo_video_type == 2) /* gemini */ |
| 87 | 87 | { |
| 88 | bg_tilemap = tilemap_create(gemini_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 89 | fg_tilemap = tilemap_create(gemini_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 88 | bg_tilemap = tilemap_create(gemini_get_bg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 89 | fg_tilemap = tilemap_create(gemini_get_fg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 90 | 90 | } |
| 91 | 91 | else /* rygar, silkworm */ |
| 92 | 92 | { |
| 93 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 94 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 93 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 94 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 95 | 95 | } |
| 96 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 96 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 97 | 97 | |
| 98 | 98 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 99 | 99 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 52 | 52 | VIDEO_START( news ) |
| 53 | 53 | { |
| 54 | 54 | |
| 55 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 55 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 56 | 56 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 57 | 57 | |
| 58 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 58 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | PALETTE_INIT( finalizr ) |
| 20 | 20 | { |
| 21 | 21 | int i; |
| 22 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 23 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 24 | 22 | |
| 23 | /* allocate the colortable */ | |
| 24 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 25 | 25 | |
| 26 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 26 | /* create a lookup table for the palette */ | |
| 27 | for (i = 0; i < 0x20; i++) | |
| 27 | 28 | { |
| 28 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 29 | int r = pal4bit(color_prom[i + 0x00] >> 0); | |
| 30 | int g = pal4bit(color_prom[i + 0x00] >> 4); | |
| 31 | int b = pal4bit(color_prom[i + 0x20] >> 0); | |
| 29 | 32 | |
| 30 | ||
| 31 | /* red component */ | |
| 32 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 33 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 34 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 35 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 36 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 37 | /* green component */ | |
| 38 | bit0 = (color_prom[0] >> 4) & 0x01; | |
| 39 | bit1 = (color_prom[0] >> 5) & 0x01; | |
| 40 | bit2 = (color_prom[0] >> 6) & 0x01; | |
| 41 | bit3 = (color_prom[0] >> 7) & 0x01; | |
| 42 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 43 | /* blue component */ | |
| 44 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 45 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 46 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 47 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 48 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 49 | ||
| 50 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 51 | color_prom++; | |
| 33 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 52 | 34 | } |
| 53 | 35 | |
| 54 | color_prom += machine->drv->total_colors; | |
| 55 | /* color_prom now points to the beginning of the lookup tables */ | |
| 36 | /* color_prom now points to the beginning of the lookup table */ | |
| 37 | color_prom += 0x40; | |
| 56 | 38 | |
| 57 | for (i = 0;i < | |
| 39 | for (i = 0; i < 0x | |
| 58 | 40 | { |
| 59 | if (*color_prom & 0x0f) COLOR(1,i) = *color_prom & 0x0f; | |
| 60 | else COLOR(1,i) = 0; | |
| 61 | color_prom++; | |
| 41 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 42 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 62 | 43 | } |
| 63 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 44 | ||
| 45 | for (i = 0x100; i < 0x200; i++) | |
| 64 | 46 | { |
| 65 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 47 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 48 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 66 | 49 | } |
| 67 | 50 | } |
| 68 | 51 |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | }; |
| 74 | 74 | |
| 75 | 75 | /* initialize the playfield */ |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 77 | 77 | |
| 78 | 78 | /* initialize the motion objects */ |
| 79 | 79 | atarimo_init(machine, 0, &modesc); |
| r1679 | r1680 | |
|---|---|---|
| 786 | 786 | |
| 787 | 787 | VIDEO_START( toprollr ) |
| 788 | 788 | { |
| 789 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 789 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | static void toprollr_draw_big_sprite(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect,int priority) |
| r1679 | r1680 | |
|---|---|---|
| 75 | 75 | VIDEO_START( xorworld ) |
| 76 | 76 | { |
| 77 | 77 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 78 | | |
| 78 | | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /* |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | VIDEO_START(speedspn) |
| 22 | 22 | { |
| 23 | 23 | speedspn_vidram = auto_malloc(0x1000 * 2); |
| 24 | speedspn_tilemap = tilemap_create(get_speedspn_tile_info,tilemap_scan_cols, | |
| 24 | speedspn_tilemap = tilemap_create(get_speedspn_tile_info,tilemap_scan_cols, | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | WRITE8_HANDLER( speedspn_vidram_w ) |
| r1679 | r1680 | |
|---|---|---|
| 64 | 64 | VIDEO_START( hexa ) |
| 65 | 65 | { |
| 66 | 66 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 67 | | |
| 67 | | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 |
| r1679 | r1680 | |
|---|---|---|
| 182 | 182 | VIDEO_START( cloak ) |
| 183 | 183 | { |
| 184 | 184 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 185 | | |
| 185 | | |
| 186 | 186 | |
| 187 | 187 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 188 | 188 | tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| r1679 | r1680 | |
|---|---|---|
| 938 | 938 | |
| 939 | 939 | //if (K001005_status == 2) |
| 940 | 940 | { |
| 941 | fillbitmap(K001005_bitmap[K001005_bitmap_page], Machine-> | |
| 941 | fillbitmap(K001005_bitmap[K001005_bitmap_page], Machine-> | |
| 942 | 942 | fillbitmap(K001005_zbuffer, 0xffffffff, &K001005_cliprect); |
| 943 | 943 | } |
| 944 | 944 | } |
| r1679 | r1680 | |
|---|---|---|
| 228 | 228 | bg_tilemap[i] = tilemap_create( |
| 229 | 229 | get_info[i], |
| 230 | 230 | tilemap_scan_rows, |
| 231 | | |
| 231 | | |
| 232 | 232 | |
| 233 | 233 | tilemap_palette_bank[i] = -1; |
| 234 | 234 | } |
| r1679 | r1680 | |
| 278 | 278 | mask = machine->gfx[1]; |
| 279 | 279 | code %= gfx->total_elements; |
| 280 | 280 | color %= gfx->total_colors; |
| 281 | paldata = &machine-> | |
| 281 | paldata = &machine-> | |
| 282 | 282 | gfx_addr = gfx->gfxdata + code * gfx->char_modulo; |
| 283 | 283 | gfx_pitch = gfx->line_modulo; |
| 284 | 284 | mask_addr = mask->gfxdata + code * mask->char_modulo; |
| r1679 | r1680 | |
| 413 | 413 | gfx = machine->gfx[0]; |
| 414 | 414 | code %= gfx->total_elements; |
| 415 | 415 | color %= gfx->total_colors; |
| 416 | paldata = &machine-> | |
| 416 | paldata = &machine-> | |
| 417 | 417 | gfx_addr = gfx->gfxdata + code * gfx->char_modulo; |
| 418 | 418 | gfx_pitch = gfx->line_modulo; |
| 419 | 419 | |
| r1679 | r1680 | |
| 575 | 575 | gfx_element *pGfx; |
| 576 | 576 | |
| 577 | 577 | pGfx = machine->gfx[0]; |
| 578 | paldata = &machine-> | |
| 578 | paldata = &machine-> | |
| 579 | 579 | |
| 580 | 580 | /* draw one scanline at a time */ |
| 581 | 581 | clip.min_x = cliprect->min_x; |
| r1679 | r1680 | |
|---|---|---|
| 43 | 43 | static const int resistances[3] = { 1000, 470, 220 }; |
| 44 | 44 | |
| 45 | 45 | /* initialize the playfield */ |
| 46 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 46 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 47 | 47 | tilemap_set_transparent_pen(atarigen_playfield_tilemap, 0); |
| 48 | 48 | |
| 49 | 49 | /* adjust the playfield for the 8 pixel offset */ |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | VIDEO_START( bsktball ) |
| 31 | 31 | { |
| 32 | 32 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 33 | | |
| 33 | | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 107 | 107 | sprite_offy = 128; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | //bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 111 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 112 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 113 | armedf_tx_tilemap = tilemap_create(get_tx_tile_info,armedf_scan,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 110 | //bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 111 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 112 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 113 | armedf_tx_tilemap = tilemap_create(get_tx_tile_info,armedf_scan,8,8,64,32); | |
| 114 | 114 | |
| 115 | 115 | tilemap_set_transparent_pen(fg_tilemap,0xf); |
| 116 | 116 | tilemap_set_transparent_pen(armedf_tx_tilemap,0xf); |
| r1679 | r1680 | |
|---|---|---|
| 827 | 827 | counter++; |
| 828 | 828 | scanline = (scanline+1) % VTOTAL; |
| 829 | 829 | /* come back at the next appropriate scanline */ |
| 830 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 830 | timer_adjust_oneshot(state->scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | 833 | static void check_palette(running_machine *machine) |
| r1679 | r1680 | |
| 894 | 894 | case HARDWARE_TRS02: |
| 895 | 895 | state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 896 | 896 | state->scanline_timer = timer_alloc(scanline_callback, NULL); |
| 897 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 897 | timer_adjust_oneshot(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 898 | 898 | /* fall through */ |
| 899 | 899 | case HARDWARE_TKG04: |
| 900 | 900 | case HARDWARE_TKG02: |
| 901 | state->bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, | |
| 901 | state->bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, | |
| 902 | 902 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); |
| 903 | 903 | break; |
| 904 | 904 | case HARDWARE_TRS01: |
| 905 | state->bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, | |
| 905 | state->bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, | |
| 906 | 906 | tilemap_set_scrolldx(state->bg_tilemap, 0, 128); |
| 907 | 907 | |
| 908 | 908 | state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 909 | 909 | |
| 910 | 910 | state->scanline_timer = timer_alloc(scanline_callback, NULL); |
| 911 | timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 911 | timer_adjust_oneshot(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 912 | 912 | break; |
| 913 | 913 | default: |
| 914 | 914 | fatalerror("Invalid hardware type in dkong_video_start"); |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | { |
| 57 | 57 | helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 58 | 58 | |
| 59 | playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, | |
| 59 | playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 |
| r1679 | r1680 | |
|---|---|---|
| 139 | 139 | ***************************************************************************/ |
| 140 | 140 | VIDEO_START( appoooh ) |
| 141 | 141 | { |
| 142 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 143 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 142 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 143 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 144 | 144 | |
| 145 | 145 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 146 | 146 | tilemap_set_scrolldy(fg_tilemap,8,8); |
| r1679 | r1680 | |
|---|---|---|
| 210 | 210 | |
| 211 | 211 | VIDEO_START( travrusa ) |
| 212 | 212 | { |
| 213 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 213 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 214 | 214 | |
| 215 | 215 | tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */ |
| 216 | 216 | tilemap_set_transmask(bg_tilemap,1,0x3f,0xc0); /* split type 1 has pens 6 and 7 opaque - tunnels */ |
| r1679 | r1680 | |
|---|---|---|
| 144 | 144 | { |
| 145 | 145 | metlclsh_otherram = auto_malloc(0x800); // banked ram |
| 146 | 146 | |
| 147 | bg_tilemap = tilemap_create(get_bg_tile_info,metlclsh_bgtilemap_scan,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 148 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 147 | bg_tilemap = tilemap_create(get_bg_tile_info,metlclsh_bgtilemap_scan,16,16,32,16); | |
| 148 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 149 | 149 | |
| 150 | 150 | tilemap_set_transparent_pen( bg_tilemap, 0 ); |
| 151 | 151 | tilemap_set_transparent_pen( fg_tilemap, 0 ); |
| r1679 | r1680 | |
|---|---|---|
| 133 | 133 | VIDEO_START_CALL(kaneko16_sprites); |
| 134 | 134 | |
| 135 | 135 | kaneko16_tmap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 136 | | |
| 136 | | |
| 137 | 137 | kaneko16_tmap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 138 | | |
| 138 | | |
| 139 | 139 | |
| 140 | 140 | kaneko16_tmap_2 = 0; |
| 141 | 141 | |
| r1679 | r1680 | |
| 179 | 179 | VIDEO_START_CALL(kaneko16_1xVIEW2); |
| 180 | 180 | |
| 181 | 181 | kaneko16_tmap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 182 | | |
| 182 | | |
| 183 | 183 | kaneko16_tmap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 184 | | |
| 184 | | |
| 185 | 185 | |
| 186 | 186 | { |
| 187 | 187 | int dx, xdim = machine->screen[0].width; |
| r1679 | r1680 | |
| 395 | 395 | UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, |
| 396 | 396 | const rectangle *clip,int priority) |
| 397 | 397 | { |
| 398 | const pen_t *pal = &machine-> | |
| 398 | const pen_t *pal = &machine-> | |
| 399 | 399 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 400 | 400 | |
| 401 | 401 | int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16; |
| r1679 | r1680 | |
|---|---|---|
| 97 | 97 | K056832_vh_start(machine, REGION_GFX1, K056832_BPP_4, 1, NULL, dbz_tile_callback, 1); |
| 98 | 98 | K053247_vh_start(machine, REGION_GFX2, -52, 16, NORMAL_PLANE_ORDER, dbz_sprite_callback); |
| 99 | 99 | |
| 100 | dbz_bg1_tilemap = tilemap_create(get_dbz_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,64,32); | |
| 101 | dbz_bg2_tilemap = tilemap_create(get_dbz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,64,32); | |
| 100 | dbz_bg1_tilemap = tilemap_create(get_dbz_bg1_tile_info,tilemap_scan_rows, 16, 16,64,32); | |
| 101 | dbz_bg2_tilemap = tilemap_create(get_dbz_bg2_tile_info,tilemap_scan_rows, 16, 16,64,32); | |
| 102 | 102 | |
| 103 | 103 | tilemap_set_transparent_pen(dbz_bg1_tilemap,0); |
| 104 | 104 | tilemap_set_transparent_pen(dbz_bg2_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 33 | 33 | tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 34 | 34 | tmpbitmap3 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 35 | 35 | tmpbitmap4 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 36 | ||
| 37 | /* leave everything at the default, but map all foreground 0 pens as transparent */ | |
| 38 | // for (i = 0;i < 16;i++) palette_used_colors[8 * i] = PALETTE_COLOR_TRANSPARENT; | |
| 39 | 36 | } |
| 40 | 37 | |
| 41 | 38 |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | VIDEO_START( wc90 ) |
| 91 | 91 | { |
| 92 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 93 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 94 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 92 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,64,32); | |
| 93 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 94 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 95 | 95 | |
| 96 | 96 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 97 | 97 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
| 99 | 99 | |
| 100 | 100 | VIDEO_START( wc90t ) |
| 101 | 101 | { |
| 102 | bg_tilemap = tilemap_create(track_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 103 | fg_tilemap = tilemap_create(track_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 104 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 102 | bg_tilemap = tilemap_create(track_get_bg_tile_info,tilemap_scan_rows, 16,16,64,32); | |
| 103 | fg_tilemap = tilemap_create(track_get_fg_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 104 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 105 | 105 | |
| 106 | 106 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 107 | 107 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 106 | 106 | int i, size; |
| 107 | 107 | |
| 108 | 108 | /* initialize the playfield */ |
| 109 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 109 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 110 | 110 | |
| 111 | 111 | /* initialize the motion objects */ |
| 112 | 112 | atarimo_init(machine, 0, &modesc); |
| 113 | 113 | |
| 114 | 114 | /* initialize the alphanumerics */ |
| 115 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 115 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 116 | 116 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 117 | 117 | |
| 118 | 118 | /* modify the motion object code lookup table to account for the code XOR */ |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | VIDEO_START( ms32 ) |
| 74 | 74 | { |
| 75 | ms32_tx_tilemap = tilemap_create(get_ms32_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 76 | ms32_bg_tilemap = tilemap_create(get_ms32_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 77 | ms32_roz_tilemap = tilemap_create(get_ms32_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,128,128); | |
| 75 | ms32_tx_tilemap = tilemap_create(get_ms32_tx_tile_info,tilemap_scan_rows,8, 8,64,64); | |
| 76 | ms32_bg_tilemap = tilemap_create(get_ms32_bg_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 77 | ms32_roz_tilemap = tilemap_create(get_ms32_roz_tile_info,tilemap_scan_rows,16,16,128,128); | |
| 78 | 78 | |
| 79 | 79 | tilemap_set_transparent_pen(ms32_tx_tilemap,0); |
| 80 | 80 | tilemap_set_transparent_pen(ms32_bg_tilemap,0); |
| r1679 | r1680 | |
| 89 | 89 | if (!strcmp(machine->gamedrv->name,"47pie2o")) ms32_reverse_sprite_order = 0; |
| 90 | 90 | if (!strcmp(machine->gamedrv->name,"hayaosi3")) ms32_reverse_sprite_order = 0; |
| 91 | 91 | if (!strcmp(machine->gamedrv->name,"bnstars")) ms32_reverse_sprite_order = 0; |
| 92 | if (!strcmp(machine->gamedrv->name,"wpksocv2")) ms32_reverse_sprite_order = 0; | |
| 92 | 93 | |
| 93 | 94 | // tp2m32 doesn't set the brightness registers so we need sensible defaults |
| 94 | 95 | brt[0] = brt[1] = 0xffff; |
| r1679 | r1680 | |
|---|---|---|
| 268 | 268 | |
| 269 | 269 | VIDEO_START( darkseal ) |
| 270 | 270 | { |
| 271 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 272 | pf2_tilemap = tilemap_create(get_bg_tile_info2,darkseal_scan, TILEMAP_TYPE_PEN,16,16,64,64); | |
| 273 | pf3_tilemap = tilemap_create(get_bg_tile_info3,darkseal_scan, TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 271 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,64); | |
| 272 | pf2_tilemap = tilemap_create(get_bg_tile_info2,darkseal_scan, 16,16,64,64); | |
| 273 | pf3_tilemap = tilemap_create(get_bg_tile_info3,darkseal_scan, 16,16,64,64); | |
| 274 | 274 | |
| 275 | 275 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 276 | 276 | tilemap_set_transparent_pen(pf2_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 88 | 88 | VIDEO_START( seicross ) |
| 89 | 89 | { |
| 90 | 90 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 91 | | |
| 91 | | |
| 92 | 92 | |
| 93 | 93 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 94 | 94 | } |
| r1679 | r1680 | |
|---|---|---|
| 209 | 209 | int shadow, |
| 210 | 210 | int shadow_pen, int eos ) |
| 211 | 211 | { |
| 212 | const pen_t *shadow_base = machine-> | |
| 212 | const pen_t *shadow_base = machine-> | |
| 213 | 213 | const UINT8 *source; |
| 214 | 214 | int full_shadow=shadow&SYS16_SPR_SHADOW; |
| 215 | 215 | int partial_shadow=shadow&SYS16_SPR_PARTIAL_SHADOW; |
| r1679 | r1680 | |
| 340 | 340 | |
| 341 | 341 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int b3d ) //* |
| 342 | 342 | { |
| 343 | const pen_t *base_pal = machine-> | |
| 343 | const pen_t *base_pal = machine-> | |
| 344 | 344 | const UINT8 *base_gfx = memory_region(REGION_GFX2); |
| 345 | 345 | const int gfx_rom_size = memory_region_length(REGION_GFX2); |
| 346 | 346 | const UINT16 *source = sys16_spriteram; |
| r1679 | r1680 | |
| 788 | 788 | background = tilemap_create( |
| 789 | 789 | get_bg_tile_info, |
| 790 | 790 | sys16_bg_map, |
| 791 | ||
| 791 | ||
| 792 | 792 | 8,8, |
| 793 | 793 | 64*2,32*2 ); |
| 794 | 794 | else |
| 795 | 795 | background = tilemap_create( |
| 796 | 796 | get_bg_tile_info, |
| 797 | 797 | sys16_bg_map, |
| 798 | ||
| 798 | ||
| 799 | 799 | 8,8, |
| 800 | 800 | 64*2,32*2 ); |
| 801 | 801 | |
| 802 | 802 | foreground = tilemap_create( |
| 803 | 803 | get_fg_tile_info, |
| 804 | 804 | sys16_bg_map, |
| 805 | ||
| 805 | ||
| 806 | 806 | 8,8, |
| 807 | 807 | 64*2,32*2 ); |
| 808 | 808 | |
| 809 | 809 | text_layer = tilemap_create( |
| 810 | 810 | get_text_tile_info, |
| 811 | 811 | sys16_text_map, |
| 812 | ||
| 812 | ||
| 813 | 813 | 8,8, |
| 814 | 814 | 40,28 ); |
| 815 | 815 | |
| r1679 | r1680 | |
| 875 | 875 | background2 = tilemap_create( |
| 876 | 876 | get_bg2_tile_info, |
| 877 | 877 | sys16_bg_map, |
| 878 | ||
| 878 | ||
| 879 | 879 | 8,8, |
| 880 | 880 | 64*2,32*2 ); |
| 881 | 881 | |
| 882 | 882 | foreground2 = tilemap_create( |
| 883 | 883 | get_fg2_tile_info, |
| 884 | 884 | sys16_bg_map, |
| 885 | ||
| 885 | ||
| 886 | 886 | 8,8, |
| 887 | 887 | 64*2,32*2 ); |
| 888 | 888 |
| r1679 | r1680 | |
|---|---|---|
| 323 | 323 | scanline += 64; |
| 324 | 324 | if (scanline >= machine->screen[0].visarea.max_y) |
| 325 | 325 | scanline = 0; |
| 326 | timer_adjust(force_update_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 326 | timer_adjust_oneshot(force_update_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /*--------------------------------------------------------------- |
| r1679 | r1680 | |
| 445 | 445 | |
| 446 | 446 | /* start a timer to update a few times during refresh */ |
| 447 | 447 | force_update_timer = timer_alloc(force_update, NULL); |
| 448 | timer_adjust(force_update_timer,video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 448 | timer_adjust_oneshot(force_update_timer,video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 449 | 449 | |
| 450 | 450 | init_savestate(map, mo); |
| 451 | 451 |
| r1679 | r1680 | |
|---|---|---|
| 98 | 98 | |
| 99 | 99 | VIDEO_START( deniam ) |
| 100 | 100 | { |
| 101 | bg_tilemap = tilemap_create(get_bg_tile_info,scan_pages, TILEMAP_TYPE_PEN, 8,8,128,64); | |
| 102 | fg_tilemap = tilemap_create(get_fg_tile_info,scan_pages, TILEMAP_TYPE_PEN,8,8,128,64); | |
| 103 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8, 64,32); | |
| 101 | bg_tilemap = tilemap_create(get_bg_tile_info,scan_pages, 8,8,128,64); | |
| 102 | fg_tilemap = tilemap_create(get_fg_tile_info,scan_pages, 8,8,128,64); | |
| 103 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,8,8, 64,32); | |
| 104 | 104 | |
| 105 | 105 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 106 | 106 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 109 | 109 | VIDEO_START( mcr3 ) |
| 110 | 110 | { |
| 111 | 111 | /* initialize the background tilemap */ |
| 112 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 112 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
| 116 | 116 | VIDEO_START( mcrmono ) |
| 117 | 117 | { |
| 118 | 118 | /* initialize the background tilemap */ |
| 119 | bg_tilemap = tilemap_create(mcrmono_get_bg_tile_info, tilemap_scan_rows, | |
| 119 | bg_tilemap = tilemap_create(mcrmono_get_bg_tile_info, tilemap_scan_rows, | |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | VIDEO_START( spyhunt ) |
| 124 | 124 | { |
| 125 | 125 | /* initialize the background tilemap */ |
| 126 | bg_tilemap = tilemap_create(spyhunt_get_bg_tile_info, spyhunt_bg_scan, | |
| 126 | bg_tilemap = tilemap_create(spyhunt_get_bg_tile_info, spyhunt_bg_scan, | |
| 127 | 127 | |
| 128 | 128 | /* initialize the text tilemap */ |
| 129 | alpha_tilemap = tilemap_create(spyhunt_get_alpha_tile_info, tilemap_scan_cols, | |
| 129 | alpha_tilemap = tilemap_create(spyhunt_get_alpha_tile_info, tilemap_scan_cols, | |
| 130 | 130 | tilemap_set_transparent_pen(alpha_tilemap, 0); |
| 131 | 131 | tilemap_set_scrollx(alpha_tilemap, 0, 16); |
| 132 | 132 |
| r1679 | r1680 | |
|---|---|---|
| 157 | 157 | |
| 158 | 158 | VIDEO_START( stadhero ) |
| 159 | 159 | { |
| 160 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 161 | pf2_tilemap = tilemap_create(get_pf2_tile_info,stadhero_scan,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 160 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 161 | pf2_tilemap = tilemap_create(get_pf2_tile_info,stadhero_scan, 16,16,64,64); | |
| 162 | 162 | |
| 163 | 163 | stadhero_pf2_data = auto_malloc(0x2000 * 2); |
| 164 | 164 |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | VIDEO_START( prehisle ) |
| 96 | 96 | { |
| 97 | 97 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_cols, |
| 98 | | |
| 98 | | |
| 99 | 99 | |
| 100 | 100 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 101 | | |
| 101 | | |
| 102 | 102 | |
| 103 | 103 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 104 | | |
| 104 | | |
| 105 | 105 | |
| 106 | 106 | tilemap_set_transparent_pen(bg_tilemap, 15); |
| 107 | 107 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
|---|---|---|
| 161 | 161 | stuff_palette( machine, 0, 0, 16*8 ); /* load sprite colors */ |
| 162 | 162 | stuff_palette( machine, 16*8*3, 16*8, 16*8 ); /* load text colors */ |
| 163 | 163 | |
| 164 | fg_tilemap = tilemap_create(get_fg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 165 | bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 166 | tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 164 | fg_tilemap = tilemap_create(get_fg_tilemap_info,tilemap_scan_cols,8,8,64,32); | |
| 165 | bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,8,8,64,32); | |
| 166 | tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,8,8,32,32); | |
| 167 | 167 | |
| 168 | 168 | { |
| 169 | 169 | tilemap_clip = machine->screen[0].visarea; |
| r1679 | r1680 | |
|---|---|---|
| 205 | 205 | |
| 206 | 206 | VIDEO_START( wwfsstar ) |
| 207 | 207 | { |
| 208 | fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows, | |
| 208 | fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows, | |
| 209 | 209 | tilemap_set_transparent_pen(fg0_tilemap,0); |
| 210 | 210 | |
| 211 | bg0_tilemap = tilemap_create(get_bg0_tile_info,bg0_scan, | |
| 211 | bg0_tilemap = tilemap_create(get_bg0_tile_info,bg0_scan, | |
| 212 | 212 | tilemap_set_transparent_pen(fg0_tilemap,0); |
| 213 | 213 | } |
| 214 | 214 |
| r1679 | r1680 | |
|---|---|---|
| 201 | 201 | |
| 202 | 202 | VIDEO_START( polepos ) |
| 203 | 203 | { |
| 204 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,16); | |
| 205 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 204 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_cols,8,8,64,16); | |
| 205 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 206 | 206 | |
| 207 | 207 | colortable_configure_tilemap_groups(machine->colortable, tx_tilemap, machine->gfx[0], 0x2f); |
| 208 | 208 | } |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | VIDEO_START( actfancr ) |
| 89 | 89 | { |
| 90 | pf1_tilemap = tilemap_create(get_tile_info,actfancr_scan,TILEMAP_TYPE_PEN,16,16,256,16); | |
| 91 | pf1_alt_tilemap = tilemap_create(get_tile_info,actfancr_scan2,TILEMAP_TYPE_PEN,16,16,128,32); | |
| 92 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 90 | pf1_tilemap = tilemap_create(get_tile_info,actfancr_scan,16,16,256,16); | |
| 91 | pf1_alt_tilemap = tilemap_create(get_tile_info,actfancr_scan2,16,16,128,32); | |
| 92 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 93 | 93 | |
| 94 | 94 | tilemap_set_transparent_pen(pf2_tilemap,0); |
| 95 | 95 | |
| r1679 | r1680 | |
| 98 | 98 | |
| 99 | 99 | VIDEO_START( triothep ) |
| 100 | 100 | { |
| 101 | pf1_tilemap = tilemap_create(get_trio_tile_info,triothep_scan,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 102 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 101 | pf1_tilemap = tilemap_create(get_trio_tile_info,triothep_scan,16,16,32,32); | |
| 102 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 103 | 103 | |
| 104 | 104 | tilemap_set_transparent_pen(pf2_tilemap,0); |
| 105 | 105 |
| r1679 | r1680 | |
|---|---|---|
| 208 | 208 | framebuffer[1] = auto_bitmap_alloc(512,256,machine->screen[0].format); |
| 209 | 209 | pixel_bitmap = NULL; /* only hitice needs this */ |
| 210 | 210 | |
| 211 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 212 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 213 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 211 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,64,64); | |
| 212 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 213 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 214 | 214 | |
| 215 | 215 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 216 | 216 | tilemap_set_transparent_pen(tx_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | PALETTE_INIT( jackal ) |
| 20 | 20 | { |
| 21 | 21 | int i; |
| 22 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 23 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 24 | 22 | |
| 25 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 23 | /* allocate the colortable */ | |
| 24 | machine->colortable = colortable_alloc(machine, 0x200); | |
| 25 | ||
| 26 | for (i = 0; i < 0x1000; i++) | |
| 26 | 27 | { |
| 27 | COLOR(0,i) = (i & 0xff) + 256; | |
| 28 | UINT16 ctabentry = (i & 0xff) | 0x100; | |
| 29 | ||
| 28 | 30 | /* this is surely wrong - is there a PROM missing? */ |
| 29 | 31 | if (i & 0x0f) |
| 30 | COLOR(0,i) |= i/256; | |
| 32 | ctabentry = ctabentry | (i >> 8); | |
| 33 | ||
| 34 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 31 | 35 | } |
| 32 | 36 | |
| 33 | for (i = 0;i < | |
| 37 | for (i = 0x1000; i < 0x | |
| 34 | 38 | { |
| 35 | COLOR(1,i) = (*color_prom & 0x0f); | |
| 36 | color_prom++; | |
| 39 | UINT8 ctabentry = color_prom[i - 0x1000] & 0x0f; | |
| 40 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 37 | 41 | } |
| 38 | 42 | |
| 39 | for (i = 0;i < | |
| 43 | for (i = 0x1100; i < 0x1200 | |
| 40 | 44 | { |
| 41 | COLOR(3,i) = (*color_prom & 0x0f) + 16; | |
| 42 | color_prom++; | |
| 45 | UINT8 ctabentry = (color_prom[i - 0x1100] & 0x0f) | 0x10; | |
| 46 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 43 | 47 | } |
| 44 | 48 | } |
| 45 | 49 | |
| 50 | ||
| 51 | static void set_pens(running_machine *machine) | |
| 52 | { | |
| 53 | int i; | |
| 54 | ||
| 55 | for (i = 0; i < 0x400; i += 2) | |
| 56 | { | |
| 57 | UINT16 data = paletteram[i] | (paletteram[i | 1] << 8); | |
| 58 | ||
| 59 | rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10)); | |
| 60 | ||
| 61 | colortable_palette_set_color(machine->colortable, i >> 1, color); | |
| 62 | } | |
| 63 | } | |
| 64 | ||
| 65 | ||
| 46 | 66 | void jackal_mark_tile_dirty(int offset) |
| 47 | 67 | { |
| 48 | 68 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| r1679 | r1680 | |
| 62 | 82 | |
| 63 | 83 | VIDEO_START( jackal ) |
| 64 | 84 | { |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 66 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 85 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 67 | 86 | } |
| 68 | 87 | |
| 69 | 88 | static void draw_background( mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
| 86 | 105 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 87 | 106 | |
| 88 | 107 | for (i = 0; i < 32; i++) |
| 89 | { | |
| 90 | 108 | tilemap_set_scrollx(bg_tilemap, i, jackal_scrollram[i]); |
| 91 | } | |
| 92 | 109 | } |
| 93 | 110 | |
| 94 | 111 | if (jackal_videoctrl[2] & 0x04) |
| r1679 | r1680 | |
| 211 | 228 | |
| 212 | 229 | VIDEO_UPDATE( jackal ) |
| 213 | 230 | { |
| 231 | set_pens(machine); | |
| 214 | 232 | draw_background(bitmap, cliprect); |
| 215 | 233 | draw_sprites(machine, bitmap, cliprect); |
| 216 | 234 | return 0; |
| r1679 | r1680 | |
|---|---|---|
| 90 | 90 | helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 91 | 91 | helper3 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 92 | 92 | |
| 93 | tilemap1 = tilemap_create(tank8_get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 94 | tilemap2 = tilemap_create(tank8_get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 93 | tilemap1 = tilemap_create(tank8_get_tile_info1, tilemap_scan_rows, 16, 16, 32, 32); | |
| 94 | tilemap2 = tilemap_create(tank8_get_tile_info2, tilemap_scan_rows, 16, 16, 32, 32); | |
| 95 | 95 | |
| 96 | 96 | /* VBLANK starts on scanline #256 and ends on scanline #24 */ |
| 97 | 97 |
| r1679 | r1680 | |
|---|---|---|
| 797 | 797 | |
| 798 | 798 | if (!PC080SN_dblwidth) /* standard tilemaps */ |
| 799 | 799 | { |
| 800 | PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 801 | PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 800 | PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,8,8,64,64); | |
| 801 | PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,8,8,64,64); | |
| 802 | 802 | } |
| 803 | 803 | else /* double width tilemaps */ |
| 804 | 804 | { |
| 805 | PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 806 | PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 805 | PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,8,8,128,64); | |
| 806 | PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,8,8,128,64); | |
| 807 | 807 | } |
| 808 | 808 | |
| 809 | 809 | PC080SN_ram[i] = auto_malloc(PC080SN_RAM_SIZE); |
| r1679 | r1680 | |
| 1534 | 1534 | TC0080VCO_bg_flip_yoffs = bg_flip_yoffs; /* usually -2 */ |
| 1535 | 1535 | TC0080VCO_has_tx = has_fg0; /* for debugging only */ |
| 1536 | 1536 | |
| 1537 | TC0080VCO_tilemap[0] = tilemap_create(TC0080VCO_get_bg0_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 1538 | TC0080VCO_tilemap[1] = tilemap_create(TC0080VCO_get_bg1_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 1537 | TC0080VCO_tilemap[0] = tilemap_create(TC0080VCO_get_bg0_tile_info_0,tilemap_scan_rows,16,16,64,64); | |
| 1538 | TC0080VCO_tilemap[1] = tilemap_create(TC0080VCO_get_bg1_tile_info_0,tilemap_scan_rows,16,16,64,64); | |
| 1539 | 1539 | TC0080VCO_ram = auto_malloc(TC0080VCO_RAM_SIZE); |
| 1540 | 1540 | |
| 1541 | 1541 | memset( TC0080VCO_ram,0,TC0080VCO_RAM_SIZE ); |
| r1679 | r1680 | |
| 1558 | 1558 | |
| 1559 | 1559 | /* Perform extra initialisations for text layer */ |
| 1560 | 1560 | { |
| 1561 | TC0080VCO_tilemap[2] = tilemap_create(TC0080VCO_get_tx_tile_info,tilemap_scan_rows, | |
| 1561 | TC0080VCO_tilemap[2] = tilemap_create(TC0080VCO_get_tx_tile_info,tilemap_scan_rows, | |
| 1562 | 1562 | TC0080VCO_char_dirty = auto_malloc(TC0080VCO_TOTAL_CHARS); |
| 1563 | 1563 | |
| 1564 | 1564 | TC0080VCO_dirty_chars(); |
| r1679 | r1680 | |
| 1985 | 1985 | zx, 0, 0, zy, |
| 1986 | 1986 | 0, /* why no wraparound ?? */ |
| 1987 | 1987 | &machine->screen[0].visarea, |
| 1988 | TRANSPARENCY_ | |
| 1988 | TRANSPARENCY_PEN | |
| 1989 | 1989 | } |
| 1990 | 1990 | } |
| 1991 | 1991 | |
| r1679 | r1680 | |
| 2292 | 2292 | TC0100SCN_dblwidth[i]=0; |
| 2293 | 2293 | |
| 2294 | 2294 | /* Single width versions */ |
| 2295 | TC0100SCN_tilemap[i][0][0] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 2296 | TC0100SCN_tilemap[i][1][0] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 2297 | TC0100SCN_tilemap[i][2][0] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 2295 | TC0100SCN_tilemap[i][0][0] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,8,8,64,64); | |
| 2296 | TC0100SCN_tilemap[i][1][0] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,8,8,64,64); | |
| 2297 | TC0100SCN_tilemap[i][2][0] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,8,8,64,64); | |
| 2298 | 2298 | |
| 2299 | 2299 | /* Double width versions */ |
| 2300 | TC0100SCN_tilemap[i][0][1] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 2301 | TC0100SCN_tilemap[i][1][1] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 2302 | TC0100SCN_tilemap[i][2][1] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,32); | |
| 2300 | TC0100SCN_tilemap[i][0][1] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,8,8,128,64); | |
| 2301 | TC0100SCN_tilemap[i][1][1] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,8,8,128,64); | |
| 2302 | TC0100SCN_tilemap[i][2][1] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,8,8,128,32); | |
| 2303 | 2303 | |
| 2304 | 2304 | /* Set up clipping for multi-TC0100SCN games. We assume |
| 2305 | 2305 | this code won't ever affect single screen games: |
| r1679 | r1680 | |
| 2787 | 2787 | void TC0280GRD_vh_start(int gfxnum) |
| 2788 | 2788 | { |
| 2789 | 2789 | TC0280GRD_ram = auto_malloc(TC0280GRD_RAM_SIZE); |
| 2790 | TC0280GRD_tilemap = tilemap_create(TC0280GRD_get_tile_info,tilemap_scan_rows, | |
| 2790 | TC0280GRD_tilemap = tilemap_create(TC0280GRD_get_tile_info,tilemap_scan_rows, | |
| 2791 | 2791 | |
| 2792 | 2792 | state_save_register_global_pointer(TC0280GRD_ram, TC0280GRD_RAM_SIZE/2); |
| 2793 | 2793 | state_save_register_global_array(TC0280GRD_ctrl); |
| r1679 | r1680 | |
| 3165 | 3165 | TC0480SCP_dblwidth=0; |
| 3166 | 3166 | |
| 3167 | 3167 | /* Single width versions */ |
| 3168 | TC0480SCP_tilemap[0][0] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 3169 | TC0480SCP_tilemap[1][0] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 3170 | TC0480SCP_tilemap[2][0] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 3171 | TC0480SCP_tilemap[3][0] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 3172 | TC0480SCP_tilemap[4][0] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 3168 | TC0480SCP_tilemap[0][0] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,16,16,32,32); | |
| 3169 | TC0480SCP_tilemap[1][0] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,16,16,32,32); | |
| 3170 | TC0480SCP_tilemap[2][0] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,16,16,32,32); | |
| 3171 | TC0480SCP_tilemap[3][0] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,16,16,32,32); | |
| 3172 | TC0480SCP_tilemap[4][0] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,8,8,64,64); | |
| 3173 | 3173 | |
| 3174 | 3174 | /* Double width versions */ |
| 3175 | TC0480SCP_tilemap[0][1] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 3176 | TC0480SCP_tilemap[1][1] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 3177 | TC0480SCP_tilemap[2][1] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 3178 | TC0480SCP_tilemap[3][1] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 3179 | TC0480SCP_tilemap[4][1] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 3175 | TC0480SCP_tilemap[0][1] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,16,16,64,32); | |
| 3176 | TC0480SCP_tilemap[1][1] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,16,16,64,32); | |
| 3177 | TC0480SCP_tilemap[2][1] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,16,16,64,32); | |
| 3178 | TC0480SCP_tilemap[3][1] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,16,16,64,32); | |
| 3179 | TC0480SCP_tilemap[4][1] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,8,8,64,64); | |
| 3180 | 3180 | |
| 3181 | 3181 | TC0480SCP_ram = auto_malloc(TC0480SCP_RAM_SIZE); |
| 3182 | 3182 | TC0480SCP_char_dirty = auto_malloc(TC0480SCP_TOTAL_CHARS); |
| r1679 | r1680 | |
|---|---|---|
| 126 | 126 | |
| 127 | 127 | VIDEO_START( namcos86 ) |
| 128 | 128 | { |
| 129 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 130 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 131 | bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 132 | bg_tilemap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 129 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,64,32); | |
| 130 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,64,32); | |
| 131 | bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,8,8,64,32); | |
| 132 | bg_tilemap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,8,8,64,32); | |
| 133 | 133 | |
| 134 | 134 | tilemap_set_transparent_pen(bg_tilemap[0],7); |
| 135 | 135 | tilemap_set_transparent_pen(bg_tilemap[1],7); |
| r1679 | r1680 | |
| 360 | 360 | |
| 361 | 361 | fillbitmap(priority_bitmap, 0, cliprect); |
| 362 | 362 | |
| 363 | fillbitmap(bitmap,machine-> | |
| 363 | fillbitmap(bitmap,machine-> | |
| 364 | 364 | |
| 365 | 365 | for (layer = 0;layer < 8;layer++) |
| 366 | 366 | { |
| r1679 | r1680 | |
|---|---|---|
| 184 | 184 | |
| 185 | 185 | #if TILEMAPS |
| 186 | 186 | bg_tilemap = tilemap_create( get_tile_info, tilemap_scan_cols, |
| 187 | ||
| 187 | ||
| 188 | 188 | 8,8,0x20*((suna8_text_dim > 0)?4:8),0x20); |
| 189 | 189 | |
| 190 | 190 | tilemap_set_transparent_pen(bg_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 1 | /******************************************************************************* | |
| 1 | #include "driver.h" | |
| 2 | #include "nova2001.h" | |
| 2 | 3 | |
| 3 | Nova 2001 - Video Description: | |
| 4 | -------------------------------------------------------------------------- | |
| 4 | UINT8 *nova2001_fg_videoram, *nova2001_bg_videoram; | |
| 5 | 5 | |
| 6 | Foreground Playfield Chars (static) | |
| 7 | character code index from first set of chars | |
| 8 | Foreground Playfield color modifier RAM | |
| 9 | Char colors are normally taken from the first set of 16, | |
| 10 | This is the pen for "color 1" for this tile (from the first 16 pens) | |
| 6 | static tilemap *bg_tilemap, *fg_tilemap; | |
| 11 | 7 | |
| 12 | Background Playfield Chars (scrolling) | |
| 13 | character code index from second set of chars | |
| 14 | Foreground Playfield color modifier RAM | |
| 15 | Char colors are normally taken from the second set of 16, | |
| 16 | This is the pen for "color 1" for this tile (from the second 16 pens) | |
| 17 | (Scrolling in controlled via the 8910 A and B port outputs) | |
| 18 | 8 | |
| 19 | Sprite memory is made of 32 byte records: | |
| 9 | /************************************* | |
| 10 | * | |
| 11 | * Palette handling | |
| 12 | * | |
| 13 | *************************************/ | |
| 20 | 14 | |
| 21 | Sprite+0, 0x80 = Sprite Bank | |
| 22 | Sprite+0, 0x7f = Sprite Character Code | |
| 23 | Sprite+1, 0xff = X location | |
| 24 | Sprite+2, 0xff = Y location | |
| 25 | Sprite+3, 0x20 = Y Flip | |
| 26 | Sprite+3, 0x10 = X Flip | |
| 27 | Sprite+3, 0x0f = pen for "color 1" taken from the first 16 colors | |
| 28 | Sprite+3, 0x80 | |
| 29 | Sprite+3, 0x40 | |
| 15 | PALETTE_INIT( nova2001 ) | |
| 16 | { | |
| 17 | int i; | |
| 30 | 18 | |
| 31 | | |
| 19 | /* Color #1 is us | |
| 32 | 20 | |
| 33 | *******************************************************************************/ | |
| 21 | /* To handle this, color entries 0-15 are based on */ | |
| 22 | /* the primary 16 colors, while color entries 16-31 */ | |
| 23 | /* are based on the secondary set. */ | |
| 34 | 24 | |
| 35 | #include "driver.h" | |
| 25 | /* The only difference between 0-15 and 16-31 is that */ | |
| 26 | /* color #1 changes each time */ | |
| 36 | 27 | |
| 37 | UINT8 *nova2001_videoram2, *nova2001_colorram2; | |
| 38 | ||
| 39 | static tilemap *bg_tilemap, *fg_tilemap; | |
| 40 | ||
| 41 | PALETTE_INIT( nova2001 ) | |
| 42 | { | |
| 43 | int i,j; | |
| 44 | ||
| 45 | ||
| 46 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 28 | for (i = 0; i < 0x200; ++i) | |
| 47 | 29 | { |
| 30 | int entry; | |
| 48 | 31 | int intensity,r,g,b; |
| 49 | 32 | |
| 33 | if ((i & 0xf) == 1) | |
| 34 | { | |
| 35 | entry = ((i & 0xf0) >> 4) | ((i & 0x100) >> 4); | |
| 36 | } | |
| 37 | else | |
| 38 | { | |
| 39 | entry = ((i & 0x0f) >> 0) | ((i & 0x100) >> 4); | |
| 40 | } | |
| 50 | 41 | |
| 51 | intensity = ( | |
| 42 | intensity = ( | |
| 52 | 43 | /* red component */ |
| 53 | r = ((( | |
| 44 | r = ((( | |
| 54 | 45 | /* green component */ |
| 55 | g = ((( | |
| 46 | g = ((( | |
| 56 | 47 | /* blue component */ |
| 57 | b = ((( | |
| 48 | b = ((( | |
| 58 | 49 | |
| 59 | 50 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); |
| 60 | color_prom++; | |
| 61 | 51 | } |
| 52 | } | |
| 62 | 53 | |
| 63 | /* Color #1 is used for palette animation. */ | |
| 54 | WRITE8_HANDLER( ninjakun_paletteram_w ) | |
| 55 | { | |
| 56 | int i; | |
| 64 | 57 | |
| 65 | /* To handle this, color entries 0-15 are based on */ | |
| 66 | /* the primary 16 colors, while color entries 16-31 */ | |
| 67 | /* are based on the secondary set. */ | |
| 58 | paletteram_BBGGRRII_w(offset,data); | |
| 68 | 59 | |
| 69 | /* The only difference among 0-15 and 16-31 is that */ | |
| 70 | /* color #1 changes each time */ | |
| 60 | // expand the sprite palette to full length | |
| 61 | if (offset < 16) | |
| 62 | { | |
| 63 | paletteram_BBGGRRII_w(0x200 + offset * 16 + 1, data); | |
| 71 | 64 | |
| 72 | for (i = 0;i < 16;i++) | |
| 73 | { | |
| 74 | for (j = 0;j < 16;j++) | |
| 65 | if (offset != 1) | |
| 75 | 66 | { |
| 76 | | |
| 67 | | |
| 77 | 68 | { |
| 78 | colortable[16*i+1] = i; | |
| 79 | colortable[16*i+16*16+1] = i+16; | |
| 69 | paletteram_BBGGRRII_w(0x200 + offset + i * 16, data); | |
| 80 | 70 | } |
| 81 | else | |
| 82 | { | |
| 83 | colortable[16*i+j] = j; | |
| 84 | colortable[16*i+16*16+j] = j+16; | |
| 85 | } | |
| 86 | 71 | } |
| 87 | 72 | } |
| 88 | 73 | } |
| 89 | 74 | |
| 90 | WRITE8_HANDLER( nova2001_videoram_w ) | |
| 75 | ||
| 76 | ||
| 77 | /************************************* | |
| 78 | * | |
| 79 | * Callbacks for the TileMap code | |
| 80 | * | |
| 81 | *************************************/ | |
| 82 | ||
| 83 | static TILE_GET_INFO( nova2001_get_bg_tile_info ) | |
| 91 | 84 | { |
| 92 | videoram[offset] = data; | |
| 93 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 85 | int code = nova2001_bg_videoram[tile_index]; | |
| 86 | int color = nova2001_bg_videoram[tile_index + 0x400] & 0x0f; | |
| 87 | ||
| 88 | SET_TILE_INFO(2, code, color, 0); | |
| 94 | 89 | } |
| 95 | 90 | |
| 96 | ||
| 91 | static TILE | |
| 97 | 92 | { |
| 98 | colorram[offset] = data; | |
| 99 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 93 | int attr = nova2001_fg_videoram[tile_index + 0x400]; | |
| 94 | int code = nova2001_fg_videoram[tile_index]; | |
| 95 | int color = attr & 0x0f; | |
| 96 | ||
| 97 | SET_TILE_INFO(1, code, color, 0); | |
| 98 | ||
| 99 | tileinfo->category = (attr & 0x10) >> 4; | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | ||
| 102 | static TILE | |
| 103 | 103 | { |
| 104 | nova2001_videoram2[offset] = data; | |
| 105 | tilemap_mark_tile_dirty(fg_tilemap, offset); | |
| 104 | int attr = nova2001_bg_videoram[tile_index+0x400]; | |
| 105 | int code = nova2001_bg_videoram[tile_index] + ((attr & 0xc0) << 2); | |
| 106 | int color = attr & 0x0f; | |
| 107 | ||
| 108 | SET_TILE_INFO(2, code, color, 0); | |
| 106 | 109 | } |
| 107 | 110 | |
| 108 | ||
| 111 | static TILE | |
| 109 | 112 | { |
| 110 | nova2001_colorram2[offset] = data; | |
| 111 | tilemap_mark_tile_dirty(fg_tilemap, offset); | |
| 113 | int attr = nova2001_fg_videoram[tile_index+0x400]; | |
| 114 | int code = nova2001_fg_videoram[tile_index] + ((attr & 0x20) << 3); | |
| 115 | int color = attr & 0x0f; | |
| 116 | ||
| 117 | SET_TILE_INFO(1, code, color, 0); | |
| 118 | ||
| 119 | tileinfo->category = (attr & 0x10) >> 4; | |
| 112 | 120 | } |
| 113 | 121 | |
| 122 | static TILE_GET_INFO( pkunwar_get_bg_tile_info ) | |
| 123 | { | |
| 124 | int attr = nova2001_bg_videoram[tile_index + 0x400]; | |
| 125 | int code = nova2001_bg_videoram[tile_index] + ((attr & 0x07) << 8); | |
| 126 | int color = (attr & 0xf0) >> 4; | |
| 127 | ||
| 128 | SET_TILE_INFO(1, code, color, 0); | |
| 129 | ||
| 130 | tileinfo->category = (attr & 0x08) >> 3; | |
| 131 | } | |
| 132 | ||
| 133 | static TILE_GET_INFO( raiders5_get_bg_tile_info ) | |
| 134 | { | |
| 135 | int attr = nova2001_bg_videoram[tile_index+0x400]; | |
| 136 | int code = nova2001_bg_videoram[tile_index] + ((attr & 0x01) << 8); | |
| 137 | int color = (attr & 0xf0) >> 4; | |
| 138 | ||
| 139 | SET_TILE_INFO(2, code, color, 0); | |
| 140 | } | |
| 141 | ||
| 142 | static TILE_GET_INFO( raiders5_get_fg_tile_info ) | |
| 143 | { | |
| 144 | int code = nova2001_fg_videoram[tile_index]; | |
| 145 | int color = (nova2001_fg_videoram[tile_index + 0x400] & 0xf0) >> 4; | |
| 146 | ||
| 147 | SET_TILE_INFO(1, code, color, 0); | |
| 148 | } | |
| 149 | ||
| 150 | ||
| 151 | ||
| 152 | /************************************* | |
| 153 | * | |
| 154 | * Video system start | |
| 155 | * | |
| 156 | *************************************/ | |
| 157 | ||
| 158 | VIDEO_START( nova2001 ) | |
| 159 | { | |
| 160 | bg_tilemap = tilemap_create(nova2001_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 161 | fg_tilemap = tilemap_create(nova2001_get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 162 | tilemap_set_transparent_pen(fg_tilemap, 0); | |
| 163 | tilemap_set_scrolldx(bg_tilemap, 0, -7); | |
| 164 | } | |
| 165 | ||
| 166 | VIDEO_START( pkunwar ) | |
| 167 | { | |
| 168 | bg_tilemap = tilemap_create(pkunwar_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 169 | tilemap_set_transparent_pen(bg_tilemap, 0); | |
| 170 | } | |
| 171 | ||
| 172 | VIDEO_START( ninjakun ) | |
| 173 | { | |
| 174 | bg_tilemap = tilemap_create(ninjakun_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 175 | fg_tilemap = tilemap_create(ninjakun_get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 176 | tilemap_set_transparent_pen(fg_tilemap, 0); | |
| 177 | tilemap_set_scrolldx(bg_tilemap, 7, 0); | |
| 178 | } | |
| 179 | ||
| 180 | VIDEO_START( raiders5 ) | |
| 181 | { | |
| 182 | bg_tilemap = tilemap_create(raiders5_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 183 | fg_tilemap = tilemap_create(raiders5_get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 184 | tilemap_set_transparent_pen(fg_tilemap, 0); | |
| 185 | tilemap_set_scrolldx(bg_tilemap, 7, 0); | |
| 186 | } | |
| 187 | ||
| 188 | ||
| 189 | ||
| 190 | /************************************* | |
| 191 | * | |
| 192 | * Memory handlers | |
| 193 | * | |
| 194 | *************************************/ | |
| 195 | ||
| 196 | WRITE8_HANDLER( nova2001_fg_videoram_w ) | |
| 197 | { | |
| 198 | nova2001_fg_videoram[offset] = data; | |
| 199 | tilemap_mark_tile_dirty(fg_tilemap, offset & 0x3ff); | |
| 200 | } | |
| 201 | ||
| 202 | WRITE8_HANDLER( nova2001_bg_videoram_w ) | |
| 203 | { | |
| 204 | nova2001_bg_videoram[offset] = data; | |
| 205 | tilemap_mark_tile_dirty(bg_tilemap,offset & 0x3ff); | |
| 206 | } | |
| 207 | ||
| 208 | WRITE8_HANDLER( ninjakun_bg_videoram_w ) | |
| 209 | { | |
| 210 | int x = tilemap_get_scrollx(bg_tilemap, 0) >> 3; | |
| 211 | int y = tilemap_get_scrolly(bg_tilemap, 0) >> 3; | |
| 212 | ||
| 213 | // add scroll registers to address | |
| 214 | offset = ((offset + x + (y << 5)) & 0x3ff) + (offset & 0x400); | |
| 215 | ||
| 216 | nova2001_bg_videoram[offset] = data; | |
| 217 | tilemap_mark_tile_dirty(bg_tilemap,offset & 0x3ff); | |
| 218 | } | |
| 219 | ||
| 220 | READ8_HANDLER( ninjakun_bg_videoram_r ) | |
| 221 | { | |
| 222 | int x = tilemap_get_scrollx(bg_tilemap, 0) >> 3; | |
| 223 | int y = tilemap_get_scrolly(bg_tilemap, 0) >> 3; | |
| 224 | ||
| 225 | // add scroll registers to address | |
| 226 | offset = ((offset + x + (y << 5)) & 0x3ff) + (offset & 0x400); | |
| 227 | ||
| 228 | return nova2001_bg_videoram[offset]; | |
| 229 | } | |
| 230 | ||
| 114 | 231 | WRITE8_HANDLER( nova2001_scroll_x_w ) |
| 115 | 232 | { |
| 116 | tilemap_set_scrollx(bg_tilemap, 0, data | |
| 233 | tilemap_set_scrollx(bg_tilemap, 0, data | |
| 117 | 234 | } |
| 118 | 235 | |
| 119 | 236 | WRITE8_HANDLER( nova2001_scroll_y_w ) |
| r1679 | r1680 | |
| 123 | 240 | |
| 124 | 241 | WRITE8_HANDLER( nova2001_flipscreen_w ) |
| 125 | 242 | { |
| 126 | if (flip_screen != (~data & 0x01)) | |
| 127 | { | |
| 128 | flip_screen_set(~data & 0x01); | |
| 129 | tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); | |
| 130 | } | |
| 243 | // inverted | |
| 244 | flip_screen_set(~data & 1); | |
| 131 | 245 | } |
| 132 | 246 | |
| 133 | ||
| 247 | WR | |
| 134 | 248 | { |
| 135 | int code = videoram[tile_index]; | |
| 136 | int color = colorram[tile_index] & 0x0f; | |
| 137 | ||
| 138 | SET_TILE_INFO(1, code, color, 0); | |
| 249 | flip_screen_set(data & 1); | |
| 139 | 250 | } |
| 140 | 251 | |
| 141 | static TILE_GET_INFO( get_fg_tile_info ) | |
| 142 | { | |
| 143 | int code = nova2001_videoram2[tile_index]; | |
| 144 | int color = nova2001_colorram2[tile_index] & 0x0f; | |
| 145 | 252 | |
| 146 | SET_TILE_INFO(0, code, color, 0); | |
| 147 | } | |
| 148 | 253 | |
| 149 | VIDEO_START( nova2001 ) | |
| 254 | /************************************* | |
| 255 | * | |
| 256 | * Video update | |
| 257 | * | |
| 258 | *************************************/ | |
| 259 | ||
| 260 | static void nova2001_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) | |
| 150 | 261 | { |
| 151 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 152 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 262 | const gfx_element *gfx = machine->gfx[0]; | |
| 263 | int offs; | |
| 153 | 264 | |
| 154 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 155 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 265 | for (offs = 0; offs < 0x800; offs += 32) | |
| 266 | { | |
| 267 | int attr = spriteram[offs+3]; | |
| 268 | int flipx = attr & 0x10; | |
| 269 | int flipy = attr & 0x20; | |
| 270 | int sx = spriteram[offs+1] - ((attr & 0x40) << 2); // high bit shown in schematics, not used by game | |
| 271 | int sy = spriteram[offs+2]; | |
| 272 | int tile = spriteram[offs+0]; | |
| 273 | int color = attr & 0x0f; | |
| 156 | 274 | |
| 157 | tilemap_set_transparent_pen(fg_tilemap, 0); | |
| 275 | if (attr & 0x80) // disable bit shown in schematics, not used by game | |
| 276 | { | |
| 277 | continue; | |
| 278 | } | |
| 279 | ||
| 280 | if (flip_screen) | |
| 281 | { | |
| 282 | sx = 240 - sx; | |
| 283 | sy = 240 - sy; | |
| 284 | flipx = !flipx; | |
| 285 | flipy = !flipy; | |
| 286 | } | |
| 287 | ||
| 288 | drawgfx(bitmap, gfx, | |
| 289 | tile, | |
| 290 | color, | |
| 291 | flipx, flipy, | |
| 292 | sx, sy, | |
| 293 | cliprect, TRANSPARENCY_PEN, 0); | |
| 294 | } | |
| 158 | 295 | } |
| 159 | 296 | |
| 160 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) | |
| 297 | static void pkunwar_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) | |
| 161 | 298 | { |
| 299 | const gfx_element *gfx = machine->gfx[0]; | |
| 162 | 300 | int offs; |
| 163 | 301 | |
| 164 | for (offs = 0;offs < | |
| 302 | for (offs = 0; offs < 0x800 | |
| 165 | 303 | { |
| 166 | int flipx = spriteram[offs+3] & 0x10; | |
| 167 | int flipy = spriteram[offs+3] & 0x20; | |
| 304 | int attr = spriteram[offs+3]; | |
| 305 | int flipx = spriteram[offs+0] & 0x01; | |
| 306 | int flipy = spriteram[offs+0] & 0x02; | |
| 168 | 307 | int sx = spriteram[offs+1]; |
| 169 | 308 | int sy = spriteram[offs+2]; |
| 309 | int tile = ((spriteram[offs+0] & 0xfc) >> 2) + ((attr & 0x07) << 6); | |
| 310 | int color = (attr & 0xf0) >> 4; | |
| 170 | 311 | |
| 312 | if (attr & 0x08) // deducted by comparison, not used by game | |
| 313 | { | |
| 314 | continue; | |
| 315 | } | |
| 316 | ||
| 171 | 317 | if (flip_screen) |
| 172 | 318 | { |
| 173 | 319 | sx = 240 - sx; |
| r1679 | r1680 | |
| 176 | 322 | flipy = !flipy; |
| 177 | 323 | } |
| 178 | 324 | |
| 179 | drawgfx(bitmap,machine->gfx[2 + ((spriteram[offs+0] & 0x80) >> 7)], | |
| 180 | spriteram[offs+0] & 0x7f, | |
| 181 | spriteram[offs+3] & 0x0f, | |
| 182 | flipx,flipy, | |
| 183 | sx,sy, | |
| 184 | cliprect,TRANSPARENCY_PEN,0); | |
| 325 | drawgfx(bitmap, gfx, | |
| 326 | tile, | |
| 327 | color, | |
| 328 | flipx, flipy, | |
| 329 | sx, sy, | |
| 330 | cliprect, TRANSPARENCY_PEN, 0); | |
| 331 | ||
| 332 | // there's no X MSB, so draw with wraparound (fixes title screen) | |
| 333 | drawgfx(bitmap, gfx, | |
| 334 | tile, | |
| 335 | color, | |
| 336 | flipx, flipy, | |
| 337 | sx - 256, sy, | |
| 338 | cliprect, TRANSPARENCY_PEN, 0); | |
| 185 | 339 | } |
| 186 | 340 | } |
| 187 | 341 | |
| 342 | ||
| 343 | ||
| 188 | 344 | VIDEO_UPDATE( nova2001 ) |
| 189 | 345 | { |
| 190 | 346 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| 191 | draw_sprites(machine, bitmap, cliprect); | |
| 347 | ||
| 348 | nova2001_draw_sprites(machine, bitmap, cliprect); | |
| 349 | ||
| 350 | // according to the schematics, fg category 0 should be drawn behind sprites, | |
| 351 | // but it doesn't look right that way | |
| 192 | 352 | tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0); |
| 353 | tilemap_draw(bitmap, cliprect, fg_tilemap, 1, 0); | |
| 354 | ||
| 193 | 355 | return 0; |
| 194 | 356 | } |
| 357 | ||
| 358 | VIDEO_UPDATE( pkunwar ) | |
| 359 | { | |
| 360 | tilemap_draw(bitmap, cliprect, bg_tilemap, TILEMAP_DRAW_OPAQUE | 0, 0); | |
| 361 | tilemap_draw(bitmap, cliprect, bg_tilemap, TILEMAP_DRAW_OPAQUE | 1, 0); | |
| 362 | ||
| 363 | pkunwar_draw_sprites(machine, bitmap, cliprect); | |
| 364 | ||
| 365 | tilemap_draw(bitmap, cliprect, bg_tilemap, 1, 0); | |
| 366 | ||
| 367 | return 0; | |
| 368 | } | |
| 369 | ||
| 370 | VIDEO_UPDATE( ninjakun ) | |
| 371 | { | |
| 372 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 373 | ||
| 374 | tilemap_draw(bitmap, cliprect, fg_tilemap, 1, 0); | |
| 375 | ||
| 376 | nova2001_draw_sprites(machine, bitmap, cliprect); | |
| 377 | ||
| 378 | tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0); | |
| 379 | ||
| 380 | return 0; | |
| 381 | } | |
| 382 | ||
| 383 | VIDEO_UPDATE( raiders5 ) | |
| 384 | { | |
| 385 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 386 | ||
| 387 | pkunwar_draw_sprites(machine, bitmap, cliprect); | |
| 388 | ||
| 389 | tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0); | |
| 390 | ||
| 391 | return 0; | |
| 392 | } |
| r1679 | r1680 | |
|---|---|---|
| 1142 | 1142 | |
| 1143 | 1143 | MACHINE_RESET_CALL(cps); |
| 1144 | 1144 | |
| 1145 | cps1_bg_tilemap[0] = tilemap_create(get_tile0_info,tilemap0_scan,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 1146 | cps1_bg_tilemap[1] = tilemap_create(get_tile1_info,tilemap1_scan,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 1147 | cps1_bg_tilemap[2] = tilemap_create(get_tile2_info,tilemap2_scan,TILEMAP_TYPE_PEN,32,32,64,64); | |
| 1145 | cps1_bg_tilemap[0] = tilemap_create(get_tile0_info,tilemap0_scan, 8, 8,64,64); | |
| 1146 | cps1_bg_tilemap[1] = tilemap_create(get_tile1_info,tilemap1_scan,16,16,64,64); | |
| 1147 | cps1_bg_tilemap[2] = tilemap_create(get_tile2_info,tilemap2_scan,32,32,64,64); | |
| 1148 | 1148 | |
| 1149 | 1149 | /* front masks will change at runtime to handle sprite occluding */ |
| 1150 | 1150 | cps1_update_transmasks(); |
| r1679 | r1680 | |
|---|---|---|
| 102 | 102 | VIDEO_START( yunsun16 ) |
| 103 | 103 | { |
| 104 | 104 | tilemap_0 = tilemap_create( get_tile_info_0,yunsun16_tilemap_scan_pages, |
| 105 | ||
| 105 | ||
| 106 | 106 | 16,16, |
| 107 | 107 | TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y); |
| 108 | 108 | |
| 109 | 109 | tilemap_1 = tilemap_create( get_tile_info_1,yunsun16_tilemap_scan_pages, |
| 110 | ||
| 110 | ||
| 111 | 111 | 16,16, |
| 112 | 112 | TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y); |
| 113 | 113 |
| r1679 | r1680 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | --- |
| 47 | 47 | |
| 48 | As if this wasn't enough, there are also "3D" fire beams made | |
| 49 | of 120 green LED's which are on a mechanism in front of the mirror. | |
| 50 | Along with a single red "sight" LED. I am reading in the sequence | |
| 51 | ROMS and building up a character set to simulate the LEDS with | |
| 52 | conventional character graphics. | |
| 53 | ||
| 54 | Finally, there is a score display made of 7-segment LEDS, along | |
| 55 | with Credits, Barriers, and Rounds displays made of some other | |
| 56 | type of LED bar graphs. I'm displaying them the best I can on the | |
| 57 | bottom line of the screen | |
| 58 | ||
| 59 | 48 | ***************************************************************************/ |
| 60 | 49 | |
| 61 | 50 | #include "driver.h" |
| r1679 | r1680 | |
| 71 | 60 | int stactics_shot_arrive; |
| 72 | 61 | |
| 73 | 62 | /* These are needed by driver/stactics.c */ |
| 74 | UINT8 *stactics_scroll_ram; | |
| 75 | 63 | UINT8 *stactics_videoram_b; |
| 76 | UINT8 *stactics_chardata_b; | |
| 77 | 64 | UINT8 *stactics_videoram_d; |
| 78 | UINT8 *stactics_chardata_d; | |
| 79 | 65 | UINT8 *stactics_videoram_e; |
| 80 | UINT8 *stactics_chardata_e; | |
| 81 | 66 | UINT8 *stactics_videoram_f; |
| 82 | UINT8 *stactics_ | |
| 67 | UINT8 *stactics_p | |
| 83 | 68 | UINT8 *stactics_display_buffer; |
| 69 | UINT8 *stactics_lamps; | |
| 84 | 70 | |
| 85 | static UINT8 *dirty_videoram_b; | |
| 86 | static UINT8 *dirty_chardata_b; | |
| 87 | static UINT8 *dirty_videoram_d; | |
| 88 | static UINT8 *dirty_chardata_d; | |
| 89 | static UINT8 *dirty_videoram_e; | |
| 90 | static UINT8 *dirty_chardata_e; | |
| 91 | static UINT8 *dirty_videoram_f; | |
| 92 | static UINT8 *dirty_chardata_f; | |
| 71 | static UINT8 y_scroll_d; | |
| 72 | static UINT8 y_scroll_e; | |
| 73 | static UINT8 y_scroll_f; | |
| 93 | 74 | |
| 94 | static int d_offset; | |
| 95 | static int e_offset; | |
| 96 | static int f_offset; | |
| 75 | static UINT16 beam_state; | |
| 76 | static UINT16 old_beam_state; | |
| 77 | static UINT16 beam_states_per_frame; | |
| 97 | 78 | |
| 98 | static int palette_select; | |
| 99 | 79 | |
| 100 | static mame_bitmap *tmpbitmap2; | |
| 101 | static mame_bitmap *bitmap_B; | |
| 102 | static mame_bitmap *bitmap_D; | |
| 103 | static mame_bitmap *bitmap_E; | |
| 104 | static mame_bitmap *bitmap_F; | |
| 105 | 80 | |
| 106 | static UINT8 *beamdata; | |
| 107 | static int states_per_frame; | |
| 108 | ||
| 109 | #define DIRTY_CHARDATA_SIZE 0x100 | |
| 110 | #define BEAMDATA_SIZE 0x800 | |
| 111 | ||
| 112 | /* The first 16 came from the 7448 BCD to 7-segment decoder data sheet */ | |
| 113 | /* The rest are made up */ | |
| 114 | ||
| 115 | static const UINT8 stactics_special_chars[32*8] = { | |
| 116 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space */ | |
| 117 | 0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0xf0, 0x00, /* extras... */ | |
| 118 | 0xf0, 0x80, 0x80, 0xf0, 0x00, 0x00, 0xf0, 0x00, /* extras... */ | |
| 119 | 0x90, 0x90, 0x90, 0xf0, 0x00, 0x00, 0x00, 0x00, /* extras... */ | |
| 120 | 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0xf0, 0x00, /* extras... */ | |
| 121 | 0x00, 0x00, 0x00, 0xf0, 0x80, 0x80, 0xf0, 0x00, /* extras... */ | |
| 122 | 0xf0, 0x90, 0x90, 0xf0, 0x10, 0x10, 0xf0, 0x00, /* 9 */ | |
| 123 | 0xf0, 0x90, 0x90, 0xf0, 0x90, 0x90, 0xf0, 0x00, /* 8 */ | |
| 124 | 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, /* 7 */ | |
| 125 | 0xf0, 0x80, 0x80, 0xf0, 0x90, 0x90, 0xf0, 0x00, /* 6 */ | |
| 126 | 0xf0, 0x80, 0x80, 0xf0, 0x10, 0x10, 0xf0, 0x00, /* 5 */ | |
| 127 | 0x90, 0x90, 0x90, 0xf0, 0x10, 0x10, 0x10, 0x00, /* 4 */ | |
| 128 | 0xf0, 0x10, 0x10, 0xf0, 0x10, 0x10, 0xf0, 0x00, /* 3 */ | |
| 129 | 0xf0, 0x10, 0x10, 0xf0, 0x80, 0x80, 0xf0, 0x00, /* 2 */ | |
| 130 | 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, /* 1 */ | |
| 131 | 0xf0, 0x90, 0x90, 0x90, 0x90, 0x90, 0xf0, 0x00, /* 0 */ | |
| 132 | ||
| 133 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space */ | |
| 134 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 pip */ | |
| 135 | 0x60, 0x90, 0x80, 0x60, 0x10, 0x90, 0x60, 0x00, /* S for Score */ | |
| 136 | 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 pips */ | |
| 137 | 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, /* 3 pips */ | |
| 138 | 0x60, 0x90, 0x80, 0x80, 0x80, 0x90, 0x60, 0x00, /* C for Credits */ | |
| 139 | 0xe0, 0x90, 0x90, 0xe0, 0x90, 0x90, 0xe0, 0x00, /* B for Barriers */ | |
| 140 | 0xe0, 0x90, 0x90, 0xe0, 0xc0, 0xa0, 0x90, 0x00, /* R for Rounds */ | |
| 141 | 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 4 pips */ | |
| 142 | 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, /* Colon */ | |
| 143 | 0x40, 0xe0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, /* Sight */ | |
| 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space (Unused) */ | |
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space (Unused) */ | |
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space (Unused) */ | |
| 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space (Unused) */ | |
| 148 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* Space */ | |
| 149 | }; | |
| 150 | ||
| 151 | ||
| 152 | static int firebeam_state; | |
| 153 | static int old_firebeam_state; | |
| 154 | ||
| 155 | 81 | PALETTE_INIT( stactics ) |
| 156 | 82 | { |
| 157 | ||
| 83 | | |
| 158 | 84 | |
| 159 | for (i=0;i<16;i++) | |
| 160 | { | |
| 161 | int bit0,bit1,bit2, bit3,r,g,b; | |
| 85 | for (i = 0; i < 0x400; i++) | |
| 86 | { | |
| 87 | int bit0 = (color_prom[i] >> 0) & 0x01; | |
| 88 | int bit1 = (color_prom[i] >> 1) & 0x01; | |
| 89 | int bit2 = (color_prom[i] >> 2) & 0x01; | |
| 90 | int bit3 = (color_prom[i] >> 3) & 0x01; | |
| 162 | 91 | |
| 163 | bit0 = i & 1; | |
| 164 | bit1 = (i >> 1) & 1; | |
| 165 | bit2 = (i >> 2) & 1; | |
| 166 | bit3 = (i >> 3) & 1; | |
| 92 | /* red component */ | |
| 93 | int r = 0xff * bit0; | |
| 167 | 94 | |
| 168 | /* red component */ | |
| 169 | r = 0xff * bit0; | |
| 95 | /* green component */ | |
| 96 | int g = 0xff * bit1 - 0xcc * bit3; | |
| 170 | 97 | |
| 171 | /* green component */ | |
| 172 | g = 0xff * bit1 - 0xcc * bit3; | |
| 98 | /* blue component */ | |
| 99 | int b = 0xff * bit2; | |
| 173 | 100 | |
| 174 | /* blue component */ | |
| 175 | b = 0xff * bit2; | |
| 176 | ||
| 177 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 178 | } | |
| 179 | ||
| 180 | /* The color prom in Space Tactics is used for both */ | |
| 181 | /* color codes, and priority layering of the 4 layers */ | |
| 182 | ||
| 183 | /* Since we are taking care of the layering by our */ | |
| 184 | /* drawing order, we don't need all of the color prom */ | |
| 185 | /* entries */ | |
| 186 | ||
| 187 | /* For each of 4 color schemes */ | |
| 188 | for(i=0;i<4;i++) | |
| 189 | { | |
| 190 | /* For page B - Alphanumerics and alien shots */ | |
| 191 | for(j=0;j<16;j++) | |
| 192 | { | |
| 193 | *(colortable++) = 0; | |
| 194 | *(colortable++) = color_prom[i*0x100+0x01*0x10+j]; | |
| 195 | } | |
| 196 | /* For page F - Close Aliens (these are all the same color) */ | |
| 197 | for(j=0;j<16;j++) | |
| 198 | { | |
| 199 | *(colortable++) = 0; | |
| 200 | *(colortable++) = color_prom[i*0x100+0x02*0x10]; | |
| 201 | } | |
| 202 | /* For page E - Medium Aliens (these are all the same color) */ | |
| 203 | for(j=0;j<16;j++) | |
| 204 | { | |
| 205 | *(colortable++) = 0; | |
| 206 | *(colortable++) = color_prom[i*0x100+0x04*0x10+j]; | |
| 207 | } | |
| 208 | /* For page D - Far Aliens (these are all the same color) */ | |
| 209 | for(j=0;j<16;j++) | |
| 210 | { | |
| 211 | *(colortable++) = 0; | |
| 212 | *(colortable++) = color_prom[i*0x100+0x08*0x10+j]; | |
| 213 | } | |
| 214 | } | |
| 101 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 102 | } | |
| 215 | 103 | } |
| 216 | 104 | |
| 217 | 105 | /*************************************************************************** |
| r1679 | r1680 | |
| 222 | 110 | |
| 223 | 111 | VIDEO_START( stactics ) |
| 224 | 112 | { |
| 225 | int i,j; | |
| 226 | const UINT8 *firebeam_data; | |
| 227 | UINT8 firechar[256*8*9]; | |
| 113 | y_scroll_d = 0; | |
| 114 | y_scroll_e = 0; | |
| 115 | y_scroll_f = 0; | |
| 228 | 116 | |
| 229 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 230 | tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 231 | bitmap_B = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 232 | bitmap_D = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 233 | bitmap_E = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 234 | bitmap_F = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 117 | stactics_vblank_count = 0; | |
| 118 | stactics_shot_standby = 1; | |
| 119 | stactics_shot_arrive = 0; | |
| 120 | beam_state = 0; | |
| 121 | old_beam_state = 0; | |
| 235 | 122 | |
| 236 | /* Allocate dirty buffers */ | |
| 237 | dirty_videoram_b = auto_malloc(videoram_size); | |
| 238 | dirty_videoram_d = auto_malloc(videoram_size); | |
| 239 | dirty_videoram_e = auto_malloc(videoram_size); | |
| 240 | dirty_videoram_f = auto_malloc(videoram_size); | |
| 241 | dirty_chardata_b = auto_malloc(DIRTY_CHARDATA_SIZE); | |
| 242 | dirty_chardata_d = auto_malloc(DIRTY_CHARDATA_SIZE); | |
| 243 | dirty_chardata_e = auto_malloc(DIRTY_CHARDATA_SIZE); | |
| 244 | dirty_chardata_f = auto_malloc(DIRTY_CHARDATA_SIZE); | |
| 245 | ||
| 246 | memset(dirty_videoram_b,1,videoram_size); | |
| 247 | memset(dirty_videoram_d,1,videoram_size); | |
| 248 | memset(dirty_videoram_e,1,videoram_size); | |
| 249 | memset(dirty_videoram_f,1,videoram_size); | |
| 250 | memset(dirty_chardata_b,1,DIRTY_CHARDATA_SIZE); | |
| 251 | memset(dirty_chardata_d,1,DIRTY_CHARDATA_SIZE); | |
| 252 | memset(dirty_chardata_e,1,DIRTY_CHARDATA_SIZE); | |
| 253 | memset(dirty_chardata_f,1,DIRTY_CHARDATA_SIZE); | |
| 254 | ||
| 255 | d_offset = 0; | |
| 256 | e_offset = 0; | |
| 257 | f_offset = 0; | |
| 258 | ||
| 259 | palette_select = 0; | |
| 260 | stactics_vblank_count = 0; | |
| 261 | stactics_shot_standby = 1; | |
| 262 | stactics_shot_arrive = 0; | |
| 263 | firebeam_state = 0; | |
| 264 | old_firebeam_state = 0; | |
| 265 | ||
| 266 | /* Create a fake character set for LED fire beam */ | |
| 267 | ||
| 268 | memset(firechar,0,sizeof(firechar)); | |
| 269 | for(i=0;i<256;i++) | |
| 270 | { | |
| 271 | for(j=0;j<8;j++) | |
| 272 | { | |
| 273 | if ((i>>j)&0x01) | |
| 274 | { | |
| 275 | firechar[i*9+(7-j)] |= (0x01<<(7-j)); | |
| 276 | firechar[i*9+(7-j)+1] |= (0x01<<(7-j)); | |
| 277 | } | |
| 278 | } | |
| 279 | } | |
| 280 | ||
| 281 | for(i=0;i<256;i++) | |
| 282 | { | |
| 283 | decodechar(machine->gfx[4], | |
| 284 | i, | |
| 285 | firechar); | |
| 286 | } | |
| 287 | ||
| 288 | /* Decode the Fire Beam ROM for later */ | |
| 289 | /* (I am basically just juggling the bytes */ | |
| 290 | /* and storing it again to make it easier) */ | |
| 291 | ||
| 292 | beamdata = auto_malloc(BEAMDATA_SIZE); | |
| 293 | ||
| 294 | firebeam_data = memory_region(REGION_GFX1); | |
| 295 | ||
| 296 | for(i=0;i<256;i++) | |
| 297 | { | |
| 298 | beamdata[i*8] = firebeam_data[i ]; | |
| 299 | beamdata[i*8+1] = firebeam_data[i + 1024 ]; | |
| 300 | beamdata[i*8+2] = firebeam_data[i + 256]; | |
| 301 | beamdata[i*8+3] = firebeam_data[i + 1024 + 256]; | |
| 302 | beamdata[i*8+4] = firebeam_data[i + 512 ]; | |
| 303 | beamdata[i*8+5] = firebeam_data[i + 1024 + 512 ]; | |
| 304 | beamdata[i*8+6] = firebeam_data[i + 512 + 256]; | |
| 305 | beamdata[i*8+7] = firebeam_data[i + 1024 + 512 + 256]; | |
| 306 | } | |
| 307 | ||
| 308 | /* Build some characters for simulating the LED displays */ | |
| 309 | ||
| 310 | for(i=0;i<32;i++) | |
| 311 | { | |
| 312 | decodechar(machine->gfx[5], | |
| 313 | i, | |
| 314 | stactics_special_chars); | |
| 315 | } | |
| 316 | ||
| 317 | stactics_vblank_count = 0; | |
| 318 | stactics_vert_pos = 0; | |
| 319 | stactics_horiz_pos = 0; | |
| 320 | *stactics_motor_on = 0; | |
| 123 | stactics_vblank_count = 0; | |
| 124 | stactics_vert_pos = 0; | |
| 125 | stactics_horiz_pos = 0; | |
| 126 | *stactics_motor_on = 0; | |
| 321 | 127 | } |
| 322 | 128 | |
| 323 | 129 | |
| 324 | WRITE8_HANDLER( stactics_ | |
| 130 | WRITE8_HANDLER( stactics_scroll_ram_w ) | |
| 325 | 131 | { |
| 326 | int old_palette_select = palette_select; | |
| 132 | switch ((offset & 0x700) >> 8) | |
| 133 | { | |
| 134 | case 4: // Page D | |
| 135 | if (data&0x01) | |
| 136 | y_scroll_d = offset&0xff; | |
| 137 | break; | |
| 327 | 138 | |
| 328 | switch (offset) | |
| 329 | { | |
| 330 | case 0: | |
| 331 | palette_select = (palette_select & 0x02) | (data&0x01); | |
| 332 | break; | |
| 333 | case 1: | |
| 334 | palette_select = (palette_select & 0x01) | ((data&0x01)<<1); | |
| 335 | break; | |
| 336 | default: | |
| 337 | return; | |
| 338 | } | |
| 139 | case 5: // Page E | |
| 140 | if (data&0x01) | |
| 141 | y_scroll_e = offset&0xff; | |
| 142 | break; | |
| 339 | 143 | |
| 340 | if (old_palette_select != palette_select) | |
| 341 | { | |
| 342 | memset(dirty_videoram_b,1,videoram_size); | |
| 343 | memset(dirty_videoram_d,1,videoram_size); | |
| 344 | memset(dirty_videoram_e,1,videoram_size); | |
| 345 | memset(dirty_videoram_f,1,videoram_size); | |
| 144 | case 6: // Page F | |
| 145 | if (data&0x01) | |
| 146 | y_scroll_f = offset&0xff; | |
| 147 | break; | |
| 346 | 148 | } |
| 347 | return; | |
| 348 | 149 | } |
| 349 | 150 | |
| 350 | ||
| 351 | WRITE8_HANDLER( stactics_scroll_ram_w ) | |
| 352 | { | |
| 353 | int temp; | |
| 354 | ||
| 355 | if (stactics_scroll_ram[offset] != data) | |
| 356 | { | |
| 357 | stactics_scroll_ram[offset] = data; | |
| 358 | temp = (offset&0x700)>>8; | |
| 359 | switch(temp) | |
| 360 | { | |
| 361 | case 4: // Page D | |
| 362 | { | |
| 363 | if (data&0x01) | |
| 364 | d_offset = offset&0xff; | |
| 365 | break; | |
| 366 | } | |
| 367 | case 5: // Page E | |
| 368 | { | |
| 369 | if (data&0x01) | |
| 370 | e_offset = offset&0xff; | |
| 371 | break; | |
| 372 | } | |
| 373 | case 6: // Page F | |
| 374 | { | |
| 375 | if (data&0x01) | |
| 376 | f_offset = offset&0xff; | |
| 377 | break; | |
| 378 | } | |
| 379 | } | |
| 380 | } | |
| 381 | } | |
| 382 | ||
| 383 | 151 | WRITE8_HANDLER( stactics_speed_latch_w ) |
| 384 | 152 | { |
| 385 | /* This writes to a shift register which is clocked by */ | |
| 386 | /* a 555 oscillator. This value determines the speed of */ | |
| 387 | /* the LED fire beams as follows: */ | |
| 153 | /* This writes to a shift register which is clocked by */ | |
| 154 | /* a 555 oscillator. This value determines the speed of */ | |
| 155 | /* the LED fire beams as follows: */ | |
| 388 | 156 | |
| 389 | /* 555_freq / bits_in_SR * edges_in_SR / states_in_PR67 / frame_rate */ | |
| 390 | /* = num_led_states_per_frame */ | |
| 391 | /* 36439 / 8 * x / 32 / 60 ~= 19/8*x */ | |
| 157 | /* 555_freq / bits_in_SR * edges_in_SR / states_in_PR67 / frame_rate */ | |
| 158 | /* = num_led_states_per_frame */ | |
| 159 | /* 36439 / 8 * x / 32 / 60 ~= 19/8*x */ | |
| 392 | 160 | |
| 393 | ||
| 161 | | |
| 394 | 162 | |
| 395 | int i; | |
| 396 | int num_rising_edges = 0; | |
| 163 | int i; | |
| 164 | int num_rising_edges = 0; | |
| 397 | 165 | |
| 398 | for(i=0;i<8;i++) | |
| 399 | { | |
| 400 | if ( (((data>>i)&0x01) == 1) && (((data>>((i+1)%8))&0x01) == 0)) | |
| 401 | num_rising_edges++; | |
| 402 | } | |
| 166 | for(i=0;i<8;i++) | |
| 167 | { | |
| 168 | if ( (((data>>i)&0x01) == 1) && (((data>>((i+1)%8))&0x01) == 0)) | |
| 169 | num_rising_edges++; | |
| 170 | } | |
| 403 | 171 | |
| 404 | ||
| 172 | beam_states_per_frame = num_rising_edges*19/8; | |
| 405 | 173 | } |
| 406 | 174 | |
| 407 | 175 | WRITE8_HANDLER( stactics_shot_trigger_w ) |
| 408 | 176 | { |
| 409 | ||
| 177 | | |
| 410 | 178 | } |
| 411 | 179 | |
| 412 | 180 | WRITE8_HANDLER( stactics_shot_flag_clear_w ) |
| 413 | 181 | { |
| 414 | ||
| 182 | | |
| 415 | 183 | } |
| 416 | 184 | |
| 417 | WRITE8_HANDLER( stactics_videoram_b_w ) | |
| 418 | { | |
| 419 | if (stactics_videoram_b[offset] != data) | |
| 420 | { | |
| 421 | stactics_videoram_b[offset] = data; | |
| 422 | dirty_videoram_b[offset] = 1; | |
| 423 | } | |
| 424 | } | |
| 425 | 185 | |
| 426 | WRITE8_HANDLER( stactics_chardata_b_w ) | |
| 427 | { | |
| 428 | if (stactics_chardata_b[offset] != data) | |
| 429 | { | |
| 430 | stactics_chardata_b[offset] = data; | |
| 431 | dirty_chardata_b[offset>>3] = 1; | |
| 432 | } | |
| 433 | } | |
| 434 | 186 | |
| 435 | ||
| 187 | ||
| 436 | 188 | { |
| 437 | if (stactics_videoram_d[offset] != data) | |
| 438 | { | |
| 439 | stactics_videoram_d[offset] = data; | |
| 440 | dirty_videoram_d[offset] = 1; | |
| 441 | } | |
| 442 | } | |
| 189 | /* An LED fire beam! */ | |
| 190 | /* (There were 120 green LEDS mounted in the cabinet in the game, */ | |
| 191 | /* and one red one, for the sight) */ | |
| 443 | 192 | |
| 444 | WRITE8_HANDLER( stactics_chardata_d_w ) | |
| 445 | { | |
| 446 | if (stactics_chardata_d[offset] != data) | |
| 447 | { | |
| 448 | stactics_chardata_d[offset] = data; | |
| 449 | dirty_chardata_d[offset>>3] = 1; | |
| 450 | } | |
| 451 | } | |
| 193 | /* First, update the firebeam state */ | |
| 452 | 194 | |
| 453 | WRITE8_HANDLER( stactics_videoram_e_w ) | |
| 454 | { | |
| 455 | if (stactics_videoram_e[offset] != data) | |
| 456 | { | |
| 457 | stactics_videoram_e[offset] = data; | |
| 458 | dirty_videoram_e[offset] = 1; | |
| 459 | } | |
| 460 | } | |
| 195 | old_beam_state = beam_state; | |
| 196 | if (stactics_shot_standby == 0) | |
| 197 | beam_state = beam_state + beam_states_per_frame; | |
| 461 | 198 | |
| 462 | WRITE8_HANDLER( stactics_chardata_e_w ) | |
| 463 | { | |
| 464 | if (stactics_chardata_e[offset] != data) | |
| 465 | { | |
| 466 | stactics_chardata_e[offset] = data; | |
| 467 | dirty_chardata_e[offset>>3] = 1; | |
| 468 | } | |
| 469 | } | |
| 199 | /* These are thresholds for the two shots from the LED fire ROM */ | |
| 200 | /* (Note: There are two more for sound triggers, */ | |
| 201 | /* whenever that gets implemented) */ | |
| 202 | if ((old_beam_state < 0x8b) & (beam_state >= 0x8b)) | |
| 203 | stactics_shot_arrive = 1; | |
| 470 | 204 | |
| 471 | WRITE8_HANDLER( stactics_videoram_f_w ) | |
| 472 | { | |
| 473 | if (stactics_videoram_f[offset] != data) | |
| 474 | { | |
| 475 | stactics_videoram_f[offset] = data; | |
| 476 | dirty_videoram_f[offset] = 1; | |
| 477 | } | |
| 478 | } | |
| 205 | if ((old_beam_state < 0xca) & (beam_state >= 0xca)) | |
| 206 | stactics_shot_arrive = 1; | |
| 479 | 207 | |
| 480 | WRITE8_HANDLER( stactics_chardata_f_w ) | |
| 481 | { | |
| 482 | if (stactics_chardata_f[offset] != data) | |
| 483 | { | |
| 484 | stactics_chardata_f[offset] = data; | |
| 485 | dirty_chardata_f[offset>>3] = 1; | |
| 486 | } | |
| 208 | if (beam_state >= 0x100) | |
| 209 | { | |
| 210 | beam_state = 0; | |
| 211 | stactics_shot_standby = 1; | |
| 212 | } | |
| 487 | 213 | } |
| 488 | 214 | |
| 489 | /* Actual area for visible monitor stuff is only 30*8 lines */ | |
| 490 | /* The rest is used for the score, etc. */ | |
| 491 | 215 | |
| 492 | static const rectangle visible_screen_area = {0*8, 32*8, 0*8, 30*8}; | |
| 493 | 216 | |
| 494 | ||
| 217 | ||
| 495 | 218 | { |
| 496 | int offs, sx, sy, i; | |
| 497 | int char_number; | |
| 498 | int color_code; | |
| 499 | int pixel_x, pixel_y; | |
| 219 | UINT8 code; | |
| 220 | UINT8 gfx; | |
| 500 | 221 | |
| 501 | int palette_offset = palette_select * 64; | |
| 222 | /* compute effective row */ | |
| 223 | y = y - y_scroll; | |
| 502 | 224 | |
| 503 | for(offs=0x400-1; offs>=0; offs--) | |
| 504 | { | |
| 505 | sx = offs%32; | |
| 506 | sy = offs/32; | |
| 225 | /* get the character code at the given pixel */ | |
| 226 | code = videoram[((y >> 3) << 5) | (x >> 3)]; | |
| 507 | 227 | |
| 508 | color_code = palette_offset + (stactics_videoram_b[offs]>>4); | |
| 228 | /* get the gfx byte */ | |
| 229 | gfx = videoram[0x800 | (code << 3) | (y & 0x07)]; | |
| 509 | 230 | |
| 510 | /* Draw aliens in Page D */ | |
| 231 | /* return the appropriate pixel within the byte */ | |
| 232 | return (gfx >> (~x & 0x07)) & 0x01; | |
| 233 | } | |
| 511 | 234 | |
| 512 | char_number = stactics_videoram_d[offs]; | |
| 513 | 235 | |
| 514 | if (dirty_chardata_d[char_number] == 1) | |
| 515 | { | |
| 516 | decodechar(machine->gfx[3], | |
| 517 | char_number, | |
| 518 | stactics_chardata_d); | |
| 519 | dirty_chardata_d[char_number] = 2; | |
| 520 | dirty_videoram_d[offs] = 1; | |
| 521 | } | |
| 522 | else if (dirty_chardata_d[char_number] == 2) | |
| 523 | { | |
| 524 | dirty_videoram_d[offs] = 1; | |
| 525 | } | |
| 236 | static void draw_background(mame_bitmap *bitmap, const rectangle *cliprect, const pen_t *pens) | |
| 237 | { | |
| 238 | int y; | |
| 526 | 239 | |
| 527 | if (dirty_videoram_d[offs]) | |
| 528 | { | |
| 529 | drawgfx(bitmap_D,machine->gfx[3], | |
| 530 | char_number, | |
| 531 | color_code, | |
| 532 | 0,0, | |
| 533 | sx*8,sy*8, | |
| 534 | cliprect,TRANSPARENCY_NONE,0); | |
| 535 | dirty_videoram_d[offs] = 0; | |
| 536 | } | |
| 240 | fillbitmap(bitmap, pens[0], cliprect); | |
| 537 | 241 | |
| 538 | /* Draw aliens in Page E */ | |
| 242 | /* for every row */ | |
| 243 | for (y = 0; y < 0x100; y++) | |
| 244 | { | |
| 245 | int x; | |
| 539 | 246 | |
| 540 | char_number = stactics_videoram_e[offs]; | |
| 247 | /* for every pixel on the row */ | |
| 248 | for (x = 0; x < 0x100; x++) | |
| 249 | { | |
| 250 | /* get the pixels for the four planes */ | |
| 251 | int pixel_b = get_pixel_on_plane(stactics_videoram_b, y, x, 0); | |
| 252 | int pixel_d = get_pixel_on_plane(stactics_videoram_d, y, x, y_scroll_d); | |
| 253 | int pixel_e = get_pixel_on_plane(stactics_videoram_e, y, x, y_scroll_e); | |
| 254 | int pixel_f = get_pixel_on_plane(stactics_videoram_f, y, x, y_scroll_f); | |
| 541 | 255 | |
| 542 | if (dirty_chardata_e[char_number] == 1) | |
| 543 | { | |
| 544 | decodechar(machine->gfx[2], | |
| 545 | char_number, | |
| 546 | stactics_chardata_e); | |
| 547 | dirty_chardata_e[char_number] = 2; | |
| 548 | dirty_videoram_e[offs] = 1; | |
| 549 | } | |
| 550 | else if (dirty_chardata_e[char_number] == 2) | |
| 551 | { | |
| 552 | dirty_videoram_e[offs] = 1; | |
| 553 | } | |
| 256 | /* get the color for this pixel */ | |
| 257 | UINT8 color = stactics_videoram_b[((y >> 3) << 5) | (x >> 3)] >> 4; | |
| 554 | 258 | |
| 555 | if (dirty_videoram_e[offs]) | |
| 556 | { | |
| 557 | drawgfx(bitmap_E,machine->gfx[2], | |
| 558 | char_number, | |
| 559 | color_code, | |
| 560 | 0,0, | |
| 561 | sx*8,sy*8, | |
| 562 | cliprect,TRANSPARENCY_NONE,0); | |
| 563 | dirty_videoram_e[offs] = 0; | |
| 564 | } | |
| 259 | /* assemble the pen index */ | |
| 260 | int pen = color | | |
| 261 | (pixel_b << 4) | | |
| 262 | (pixel_f << 5) | | |
| 263 | (pixel_e << 6) | | |
| 264 | (pixel_d << 7) | | |
| 265 | ((stactics_palette[0] & 0x01) << 8) | | |
| 266 | ((stactics_palette[1] & 0x01) << 9); | |
| 565 | 267 | |
| 566 | /* Draw aliens in Page F */ | |
| 268 | /* compute the effective pixel coordinate after adjusting for the | |
| 269 | mirror movement - this is mechanical on the real machine */ | |
| 270 | int sy = y + stactics_vert_pos; | |
| 271 | int sx = x - stactics_horiz_pos; | |
| 567 | 272 | |
| 568 | char_number = stactics_videoram_f[offs]; | |
| 273 | /* plot if visible */ | |
| 274 | if ((sy >= 0) && (sy < 0x100) && (sx >= 0) && (sx < 0x100)) | |
| 275 | *BITMAP_ADDR16(bitmap, sy, sx) = pens[pen]; | |
| 276 | } | |
| 277 | } | |
| 278 | } | |
| 569 | 279 | |
| 570 | if (dirty_chardata_f[char_number] == 1) | |
| 571 | { | |
| 572 | decodechar(machine->gfx[1], | |
| 573 | char_number, | |
| 574 | stactics_chardata_f); | |
| 575 | dirty_chardata_f[char_number] = 2; | |
| 576 | dirty_videoram_f[offs] = 1; | |
| 577 | } | |
| 578 | else if (dirty_chardata_f[char_number] == 2) | |
| 579 | { | |
| 580 | dirty_videoram_f[offs] = 1; | |
| 581 | } | |
| 582 | 280 | |
| 583 | if (dirty_videoram_f[offs]) | |
| 584 | { | |
| 585 | drawgfx(bitmap_F,machine->gfx[1], | |
| 586 | char_number, | |
| 587 | color_code, | |
| 588 | 0,0, | |
| 589 | sx*8,sy*8, | |
| 590 | cliprect,TRANSPARENCY_NONE,0); | |
| 591 | dirty_videoram_f[offs] = 0; | |
| 592 | } | |
| 281 | static void set_indicator_leds(int data, const char *output_name, int base_index) | |
| 282 | { | |
| 283 | /* from 7448 datasheet */ | |
| 284 | static const int to_7seg[0x10] = | |
| 285 | { | |
| 286 | 0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x1f, 0x70, | |
| 287 | 0x7f, 0x73, 0x0d, 0x19, 0x23, 0x4b, 0x0f, 0x00 | |
| 288 | }; | |
| 593 | 289 | |
| 594 | /* Draw the page B stuff */ | |
| 290 | /* decode the data */ | |
| 291 | data = to_7seg[(data ^ 0x0f) & 0x0f]; | |
| 595 | 292 | |
| 596 | char_number = stactics_videoram_b[offs]; | |
| 293 | /* set the 4 LEDs */ | |
| 294 | output_set_indexed_value(output_name, base_index + 0, (data >> 4) & 0x01); | |
| 295 | output_set_indexed_value(output_name, base_index + 1, (data >> 0) & 0x01); | |
| 296 | output_set_indexed_value(output_name, base_index + 2, (data >> 1) & 0x01); | |
| 297 | output_set_indexed_value(output_name, base_index + 3, (data >> 2) & 0x01); | |
| 298 | } | |
| 597 | 299 | |
| 598 | if (dirty_chardata_b[char_number] == 1) | |
| 599 | { | |
| 600 | decodechar(machine->gfx[0], | |
| 601 | char_number, | |
| 602 | stactics_chardata_b); | |
| 603 | dirty_chardata_b[char_number] = 2; | |
| 604 | dirty_videoram_b[offs] = 1; | |
| 605 | } | |
| 606 | else if (dirty_chardata_b[char_number] == 2) | |
| 607 | { | |
| 608 | dirty_videoram_b[offs] = 1; | |
| 609 | } | |
| 610 | 300 | |
| 611 | if (dirty_videoram_b[offs]) | |
| 612 | { | |
| 613 | drawgfx(bitmap_B,machine->gfx[0], | |
| 614 | char_number, | |
| 615 | color_code, | |
| 616 | 0,0, | |
| 617 | sx*8,sy*8, | |
| 618 | cliprect,TRANSPARENCY_NONE,0); | |
| 619 | dirty_videoram_b[offs] = 0; | |
| 620 | } | |
| 301 | static void update_artwork(void) | |
| 302 | { | |
| 303 | int i; | |
| 304 | UINT8 *beam_region = memory_region(REGION_USER1); | |
| 621 | 305 | |
| 622 | } | |
| 306 | /* set the lamps first */ | |
| 307 | output_set_indexed_value("base_lamp", 4, stactics_lamps[0] & 0x01); | |
| 308 | output_set_indexed_value("base_lamp", 3, stactics_lamps[1] & 0x01); | |
| 309 | output_set_indexed_value("base_lamp", 2, stactics_lamps[2] & 0x01); | |
| 310 | output_set_indexed_value("base_lamp", 1, stactics_lamps[3] & 0x01); | |
| 311 | output_set_indexed_value("base_lamp", 0, stactics_lamps[4] & 0x01); | |
| 312 | output_set_value("start_lamp", stactics_lamps[5] & 0x01); | |
| 313 | output_set_value("barrier_lamp", stactics_lamps[6] & 0x01); /* this needs to flash on/off, not implemented */ | |
| 623 | 314 | |
| 624 | /* Now, composite the four layers together */ | |
| 315 | /* laser beam - loop for each LED */ | |
| 316 | for (i = 0; i < 0x40; i++) | |
| 317 | { | |
| 318 | offs_t beam_data_offs; | |
| 319 | UINT8 beam_data; | |
| 320 | int on; | |
| 625 | 321 | |
| 626 | copyscrollbitmap (tmpbitmap2,bitmap_D,0,0,1,&d_offset,NULL); | |
| 627 | copyscrollbitmap_trans(tmpbitmap2,bitmap_E,0,0,1,&e_offset,NULL,machine->pens[0]); | |
| 628 | copyscrollbitmap_trans(tmpbitmap2,bitmap_F,0,0,1,&f_offset,NULL,machine->pens[0]); | |
| 629 | copybitmap_trans (tmpbitmap2,bitmap_B,0,0,0,0,NULL,machine->pens[0]); | |
| 322 | beam_data_offs = ((i & 0x08) << 7) | ((i & 0x30) << 4) | beam_state; | |
| 323 | beam_data = beam_region[beam_data_offs]; | |
| 324 | on = (beam_data >> (i & 0x07)) & 0x01; | |
| 630 | 325 | |
| 631 | /* Now flip X & simulate the monitor motion */ | |
| 632 | fillbitmap(bitmap, machine->pens[0], cliprect); | |
| 633 | copybitmap(bitmap,tmpbitmap2,1,0,stactics_horiz_pos,stactics_vert_pos,&visible_screen_area); | |
| 326 | output_set_indexed_value("beam_led_left", i, on); | |
| 327 | output_set_indexed_value("beam_led_right", i, on); | |
| 328 | } | |
| 634 | 329 | |
| 635 | /* Finally, draw stuff that is on the console or on top of the monitor (LED's) */ | |
| 330 | /* sight LED */ | |
| 331 | output_set_value("sight_led", *stactics_motor_on & 0x01); | |
| 636 | 332 | |
| 637 | /***** Draw Score Display *****/ | |
| 333 | /* score display */ | |
| 334 | for (i = 0x01; i < 0x07; i++) | |
| 335 | output_set_indexed_value("score_7seg", i - 1, ~stactics_display_buffer[i] & 0x0f); | |
| 638 | 336 | |
| 639 | pixel_x = 16; | |
| 640 | pixel_y = 248; | |
| 337 | /* credits indicator */ | |
| 338 | set_indicator_leds(stactics_display_buffer[0x07], "credit_led", 0x00); | |
| 339 | set_indicator_leds(stactics_display_buffer[0x08], "credit_led", 0x04); | |
| 641 | 340 | |
| 642 | /* Draw an S */ | |
| 643 | drawgfx(bitmap,machine->gfx[5], | |
| 644 | 18, | |
| 645 | 0, | |
| 646 | 0,0, | |
| 647 | pixel_x,pixel_y, | |
| 648 | cliprect,TRANSPARENCY_NONE,0); | |
| 649 | pixel_x+=6; | |
| 650 | /* Draw a colon */ | |
| 651 | drawgfx(bitmap,machine->gfx[5], | |
| 652 | 25, | |
| 653 | 0, | |
| 654 | 0,0, | |
| 655 | pixel_x,pixel_y, | |
| 656 | cliprect,TRANSPARENCY_NONE,0); | |
| 657 | pixel_x+=6; | |
| 658 | /* Draw the digits */ | |
| 659 | for(i=1;i<7;i++) | |
| 660 | { | |
| 661 | drawgfx(bitmap,machine->gfx[5], | |
| 662 | stactics_display_buffer[i]&0x0f, | |
| 663 | 16, | |
| 664 | 0,0, | |
| 665 | pixel_x,pixel_y, | |
| 666 | cliprect,TRANSPARENCY_NONE,0); | |
| 667 | pixel_x+=6; | |
| 668 | } | |
| 341 | /* barriers indicator */ | |
| 342 | set_indicator_leds(stactics_display_buffer[0x09], "barrier_led", 0x00); | |
| 343 | set_indicator_leds(stactics_display_buffer[0x0a], "barrier_led", 0x04); | |
| 344 | set_indicator_leds(stactics_display_buffer[0x0b], "barrier_led", 0x08); | |
| 669 | 345 | |
| 670 | /***** Draw Credits Indicator *****/ | |
| 346 | /* rounds indicator */ | |
| 347 | set_indicator_leds(stactics_display_buffer[0x0c], "round_led", 0x00); | |
| 348 | set_indicator_leds(stactics_display_buffer[0x0d], "round_led", 0x04); | |
| 349 | set_indicator_leds(stactics_display_buffer[0x0e], "round_led", 0x08); | |
| 350 | set_indicator_leds(stactics_display_buffer[0x0f], "round_led", 0x0c); | |
| 351 | } | |
| 671 | 352 | |
| 672 | pixel_x = 64+16; | |
| 673 | 353 | |
| 674 | /* Draw a C */ | |
| 675 | drawgfx(bitmap,machine->gfx[5], | |
| 676 | 21, | |
| 677 | 0, | |
| 678 | 0,0, | |
| 679 | pixel_x,pixel_y, | |
| 680 | cliprect,TRANSPARENCY_NONE,0); | |
| 681 | pixel_x+=6; | |
| 682 | /* Draw a colon */ | |
| 683 | drawgfx(bitmap,machine->gfx[5], | |
| 684 | 25, | |
| 685 | 0, | |
| 686 | 0,0, | |
| 687 | pixel_x,pixel_y, | |
| 688 | cliprect,TRANSPARENCY_NONE,0); | |
| 689 | pixel_x+=6; | |
| 690 | /* Draw the pips */ | |
| 691 | for(i=7;i<9;i++) | |
| 692 | { | |
| 693 | drawgfx(bitmap,machine->gfx[5], | |
| 694 | 16 + (~stactics_display_buffer[i]&0x0f), | |
| 695 | 16, | |
| 696 | 0,0, | |
| 697 | pixel_x,pixel_y, | |
| 698 | cliprect,TRANSPARENCY_NONE,0); | |
| 699 | pixel_x+=2; | |
| 700 | } | |
| 354 | VIDEO_UPDATE( stactics ) | |
| 355 | { | |
| 356 | update_beam(); | |
| 701 | 357 | |
| 702 | /***** Draw Rounds Indicator *****/ | |
| 358 | /* update vblank counter */ | |
| 359 | stactics_vblank_count++; | |
| 703 | 360 | |
| 704 | pixel_x = 128+16; | |
| 361 | draw_background(bitmap, cliprect, machine->pens); | |
| 362 | update_artwork(); | |
| 705 | 363 | |
| 706 | /* Draw an R */ | |
| 707 | drawgfx(bitmap,machine->gfx[5], | |
| 708 | 22, | |
| 709 | 0, | |
| 710 | 0,0, | |
| 711 | pixel_x,pixel_y, | |
| 712 | cliprect,TRANSPARENCY_NONE,0); | |
| 713 | pixel_x+=6; | |
| 714 | /* Draw a colon */ | |
| 715 | drawgfx(bitmap,machine->gfx[5], | |
| 716 | 25, | |
| 717 | 0, | |
| 718 | 0,0, | |
| 719 | pixel_x,pixel_y, | |
| 720 | cliprect,TRANSPARENCY_NONE,0); | |
| 721 | pixel_x+=6; | |
| 722 | /* Draw the pips */ | |
| 723 | for(i=9;i<12;i++) | |
| 724 | { | |
| 725 | drawgfx(bitmap,machine->gfx[5], | |
| 726 | 16 + (~stactics_display_buffer[i]&0x0f), | |
| 727 | 16, | |
| 728 | 0,0, | |
| 729 | pixel_x,pixel_y, | |
| 730 | cliprect,TRANSPARENCY_NONE,0); | |
| 731 | pixel_x+=2; | |
| 732 | } | |
| 733 | ||
| 734 | /***** Draw Barriers Indicator *****/ | |
| 735 | ||
| 736 | pixel_x = 192+16; | |
| 737 | /* Draw a B */ | |
| 738 | drawgfx(bitmap,machine->gfx[5], | |
| 739 | 23, | |
| 740 | 0, | |
| 741 | 0,0, | |
| 742 | pixel_x,pixel_y, | |
| 743 | cliprect,TRANSPARENCY_NONE,0); | |
| 744 | pixel_x+=6; | |
| 745 | /* Draw a colon */ | |
| 746 | drawgfx(bitmap,machine->gfx[5], | |
| 747 | 25, | |
| 748 | 0, | |
| 749 | 0,0, | |
| 750 | pixel_x,pixel_y, | |
| 751 | cliprect,TRANSPARENCY_NONE,0); | |
| 752 | pixel_x+=6; | |
| 753 | /* Draw the pips */ | |
| 754 | for(i=12;i<16;i++) | |
| 755 | { | |
| 756 | drawgfx(bitmap,machine->gfx[5], | |
| 757 | 16 + (~stactics_display_buffer[i]&0x0f), | |
| 758 | 16, | |
| 759 | 0,0, | |
| 760 | pixel_x,pixel_y, | |
| 761 | cliprect,TRANSPARENCY_NONE,0); | |
| 762 | pixel_x+=2; | |
| 763 | } | |
| 764 | ||
| 765 | /* An LED fire beam! */ | |
| 766 | /* (There were 120 green LEDS mounted in the cabinet in the game, */ | |
| 767 | /* and one red one, for the sight) */ | |
| 768 | ||
| 769 | /* First, update the firebeam state */ | |
| 770 | ||
| 771 | old_firebeam_state = firebeam_state; | |
| 772 | if (stactics_shot_standby == 0) | |
| 773 | { | |
| 774 | firebeam_state = (firebeam_state + states_per_frame)%512; | |
| 775 | } | |
| 776 | ||
| 777 | /* These are thresholds for the two shots from the LED fire ROM */ | |
| 778 | /* (Note: There are two more for sound triggers, */ | |
| 779 | /* whenever that gets implemented) */ | |
| 780 | ||
| 781 | if ((old_firebeam_state < 0x8b) & (firebeam_state >= 0x8b)) | |
| 782 | stactics_shot_arrive = 1; | |
| 783 | ||
| 784 | if ((old_firebeam_state < 0xca) & (firebeam_state >= 0xca)) | |
| 785 | stactics_shot_arrive = 1; | |
| 786 | ||
| 787 | if (firebeam_state > 255) | |
| 788 | { | |
| 789 | firebeam_state = 0; | |
| 790 | stactics_shot_standby = 1; | |
| 791 | } | |
| 792 | ||
| 793 | /* Now, draw the beam */ | |
| 794 | ||
| 795 | pixel_x = 15; | |
| 796 | pixel_y = 166; | |
| 797 | ||
| 798 | for(i=0;i<8;i++) | |
| 799 | { | |
| 800 | if ((i%2)==1) | |
| 801 | { | |
| 802 | /* Draw 7 LEDS on each side */ | |
| 803 | drawgfx(bitmap,machine->gfx[4], | |
| 804 | beamdata[firebeam_state*8+i]&0x7f, | |
| 805 | 16*2, /* Make it green */ | |
| 806 | 0,0, | |
| 807 | pixel_x,pixel_y, | |
| 808 | cliprect,TRANSPARENCY_COLOR,0); | |
| 809 | drawgfx(bitmap,machine->gfx[4], | |
| 810 | beamdata[firebeam_state*8+i]&0x7f, | |
| 811 | 16*2, /* Make it green */ | |
| 812 | 1,0, | |
| 813 | 255-pixel_x,pixel_y, | |
| 814 | cliprect,TRANSPARENCY_COLOR,0); | |
| 815 | pixel_x+=14; | |
| 816 | pixel_y-=7; | |
| 817 | } | |
| 818 | else | |
| 819 | { | |
| 820 | /* Draw 8 LEDS on each side */ | |
| 821 | drawgfx(bitmap,machine->gfx[4], | |
| 822 | beamdata[firebeam_state*8+i], | |
| 823 | 16*2, /* Make it green */ | |
| 824 | 0,0, | |
| 825 | pixel_x,pixel_y, | |
| 826 | cliprect,TRANSPARENCY_COLOR,0); | |
| 827 | drawgfx(bitmap,machine->gfx[4], | |
| 828 | beamdata[firebeam_state*8+i], | |
| 829 | 16*2, /* Make it green */ | |
| 830 | 1,0, | |
| 831 | 255-pixel_x,pixel_y, | |
| 832 | cliprect,TRANSPARENCY_COLOR,0); | |
| 833 | pixel_x+=16; | |
| 834 | pixel_y-=8; | |
| 835 | } | |
| 836 | ||
| 837 | } | |
| 838 | ||
| 839 | /* Red Sight LED */ | |
| 840 | ||
| 841 | pixel_x = 134; | |
| 842 | pixel_y = 112; | |
| 843 | ||
| 844 | if (*stactics_motor_on & 0x01) | |
| 845 | { | |
| 846 | drawgfx(bitmap,machine->gfx[5], | |
| 847 | 26, | |
| 848 | 16, /* red */ | |
| 849 | 0,0, | |
| 850 | pixel_x,pixel_y, | |
| 851 | cliprect,TRANSPARENCY_COLOR,0); | |
| 852 | } | |
| 853 | ||
| 854 | /* Update vblank counter */ | |
| 855 | stactics_vblank_count++; | |
| 856 | ||
| 857 | /* reset dirty flags */ | |
| 858 | for(i=0;i<0xff;i++) | |
| 859 | { | |
| 860 | dirty_chardata_b[i] &= 0x01; | |
| 861 | dirty_chardata_d[i] &= 0x01; | |
| 862 | dirty_chardata_e[i] &= 0x01; | |
| 863 | dirty_chardata_f[i] &= 0x01; | |
| 864 | } | |
| 865 | ||
| 866 | 364 | return 0; |
| 867 | 365 | } |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | VIDEO_START( mermaid ) |
| 143 | 143 | { |
| 144 | 144 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 145 | | |
| 145 | | |
| 146 | 146 | |
| 147 | 147 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 148 | | |
| 148 | | |
| 149 | 149 | |
| 150 | 150 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 151 | 151 | tilemap_set_scroll_cols(fg_tilemap, 32); |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | ***********************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "video/mc6845.h" | |
| 12 | ||
| 13 | static mc6845_t *mc6845; | |
| 11 | 14 | static tilemap *bg_tilemap; |
| 12 | 15 | |
| 13 | 16 | WRITE8_HANDLER( gdrawpkr_videoram_w ) |
| r1679 | r1680 | |
| 41 | 44 | SET_TILE_INFO(bank, code, color, 0); |
| 42 | 45 | } |
| 43 | 46 | |
| 47 | WRITE8_HANDLER( gdrawpkr_mc6845_address_w ) | |
| 48 | { | |
| 49 | mc6845_address_w(mc6845, data); | |
| 50 | } | |
| 51 | ||
| 52 | READ8_HANDLER( gdrawpkr_mc6845_register_r ) | |
| 53 | { | |
| 54 | return mc6845_register_r(mc6845); | |
| 55 | } | |
| 56 | ||
| 57 | WRITE8_HANDLER( gdrawpkr_mc6845_register_w ) | |
| 58 | { | |
| 59 | mc6845_register_w(mc6845, data); | |
| 60 | } | |
| 61 | ||
| 44 | 62 | VIDEO_START( gdrawpkr ) |
| 45 | 63 | { |
| 46 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 47 | TILEMAP_TYPE_PEN, 8, 8, 32, 31); | |
| 64 | mc6845 = mc6845_config(NULL); | |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 31); | |
| 48 | 66 | } |
| 49 | 67 | |
| 50 | 68 | VIDEO_UPDATE( gdrawpkr ) |
| r1679 | r1680 | |
|---|---|---|
| 131 | 131 | |
| 132 | 132 | VIDEO_START( dcon ) |
| 133 | 133 | { |
| 134 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 135 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 136 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 137 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 134 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 135 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 136 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows,16,16,32,32); | |
| 137 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 138 | 138 | |
| 139 | 139 | tilemap_set_transparent_pen(midground_layer,15); |
| 140 | 140 | tilemap_set_transparent_pen(foreground_layer,15); |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( kickgoal ) |
| 57 | 57 | { |
| 58 | kickgoal_fgtm = tilemap_create(get_kickgoal_fg_tile_info,tilemap_scan_kicksfg, | |
| 58 | kickgoal_fgtm = tilemap_create(get_kickgoal_fg_tile_info,tilemap_scan_kicksfg, | |
| 59 | 59 | tilemap_set_transparent_pen(kickgoal_fgtm,15); |
| 60 | kickgoal_bgtm = tilemap_create(get_kickgoal_bg_tile_info,tilemap_scan_kicksbg, | |
| 60 | kickgoal_bgtm = tilemap_create(get_kickgoal_bg_tile_info,tilemap_scan_kicksbg, | |
| 61 | 61 | tilemap_set_transparent_pen(kickgoal_bgtm,15); |
| 62 | kickgoal_bg2tm = tilemap_create(get_kickgoal_bg2_tile_info,tilemap_scan_kicksbg2, | |
| 62 | kickgoal_bg2tm = tilemap_create(get_kickgoal_bg2_tile_info,tilemap_scan_kicksbg2, | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | |
| r1679 | r1680 | |
| 200 | 200 | |
| 201 | 201 | VIDEO_START( actionhw ) |
| 202 | 202 | { |
| 203 | kickgoal_fgtm = tilemap_create(get_actionhw_fg_tile_info,tilemap_scan_actionhwfg,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 204 | kickgoal_bgtm = tilemap_create(get_actionhw_bg_tile_info,tilemap_scan_actionhwbg,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 205 | kickgoal_bg2tm = tilemap_create(get_actionhw_bg2_tile_info,tilemap_scan_actionhwbg2,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 203 | kickgoal_fgtm = tilemap_create(get_actionhw_fg_tile_info,tilemap_scan_actionhwfg, 8, 8,64,64); | |
| 204 | kickgoal_bgtm = tilemap_create(get_actionhw_bg_tile_info,tilemap_scan_actionhwbg, 16,16,64,64); | |
| 205 | kickgoal_bg2tm = tilemap_create(get_actionhw_bg2_tile_info,tilemap_scan_actionhwbg2, 16,16,64,64); | |
| 206 | 206 | |
| 207 | 207 | tilemap_set_transparent_pen(kickgoal_fgtm,15); |
| 208 | 208 | tilemap_set_transparent_pen(kickgoal_bgtm,15); |
| r1679 | r1680 | |
|---|---|---|
| 514 | 514 | |
| 515 | 515 | static void video_start_common(running_machine *machine, tilemap_mapper_callback get_memory_offset) |
| 516 | 516 | { |
| 517 | bg_tilemap = tilemap_create(get_tile_info,get_memory_offset, | |
| 517 | bg_tilemap = tilemap_create(get_tile_info,get_memory_offset, | |
| 518 | 518 | |
| 519 | 519 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 520 | 520 | |
| r1679 | r1680 | |
| 818 | 818 | VIDEO_START( rockclim ) |
| 819 | 819 | { |
| 820 | 820 | VIDEO_START_CALL(galaxian); |
| 821 | rockclim_tilemap = tilemap_create(rockclim_get_tile_info,tilemap_scan_rows, | |
| 821 | rockclim_tilemap = tilemap_create(rockclim_get_tile_info,tilemap_scan_rows, | |
| 822 | 822 | draw_background = rockclim_draw_background; |
| 823 | 823 | modify_charcode = mooncrst_modify_charcode; |
| 824 | 824 | modify_spritecode = rockclim_modify_spritecode; |
| r1679 | r1680 | |
| 842 | 842 | |
| 843 | 843 | VIDEO_START( drivfrcg ) |
| 844 | 844 | { |
| 845 | bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows, | |
| 845 | bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows, | |
| 846 | 846 | |
| 847 | 847 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 848 | 848 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| r1679 | r1680 | |
| 880 | 880 | |
| 881 | 881 | VIDEO_START( ad2083 ) |
| 882 | 882 | { |
| 883 | bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows, | |
| 883 | bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows, | |
| 884 | 884 | |
| 885 | 885 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 886 | 886 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| r1679 | r1680 | |
| 938 | 938 | |
| 939 | 939 | VIDEO_START( racknrol ) |
| 940 | 940 | { |
| 941 | bg_tilemap = tilemap_create(racknrol_get_tile_info,tilemap_scan_rows, | |
| 941 | bg_tilemap = tilemap_create(racknrol_get_tile_info,tilemap_scan_rows, | |
| 942 | 942 | |
| 943 | 943 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 944 | 944 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| r1679 | r1680 | |
| 1023 | 1023 | |
| 1024 | 1024 | /* make a copy of the tilemap to emulate background priority */ |
| 1025 | 1025 | dambustr_videoram2 = auto_malloc(0x0400); |
| 1026 | dambustr_tilemap2 = tilemap_create(dambustr_get_tile_info2,tilemap_scan_rows, | |
| 1026 | dambustr_tilemap2 = tilemap_create(dambustr_get_tile_info2,tilemap_scan_rows, | |
| 1027 | 1027 | |
| 1028 | 1028 | tilemap_set_transparent_pen(dambustr_tilemap2,0); |
| 1029 | 1029 | } |
| r1679 | r1680 | |
| 2037 | 2037 | |
| 2038 | 2038 | int period_in_ms = 693 * (ra + 2.0 * rb) * c; |
| 2039 | 2039 | |
| 2040 | timer_adjust(stars_blink_timer, ATTOTIME_IN_MSEC(period_in_ms), 0, ATTOTIME_IN_MSEC(period_in_ms)); | |
| 2040 | timer_adjust_periodic(stars_blink_timer, ATTOTIME_IN_MSEC(period_in_ms), 0, ATTOTIME_IN_MSEC(period_in_ms)); | |
| 2041 | 2041 | } |
| 2042 | 2042 | |
| 2043 | 2043 | |
| r1679 | r1680 | |
| 2051 | 2051 | |
| 2052 | 2052 | static void start_stars_scroll_timer() |
| 2053 | 2053 | { |
| 2054 | timer_adjust(stars_scroll_timer, video_screen_get_frame_period(0), 0, video_screen_get_frame_period(0)); | |
| 2054 | timer_adjust_periodic(stars_scroll_timer, video_screen_get_frame_period(0), 0, video_screen_get_frame_period(0)); | |
| 2055 | 2055 | } |
| 2056 | 2056 | |
| 2057 | 2057 |
| r1679 | r1680 | |
|---|---|---|
| 59 | 59 | |
| 60 | 60 | VIDEO_START( othldrby ) |
| 61 | 61 | { |
| 62 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 63 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 64 | bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 62 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,16,16,32,32); | |
| 63 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,16,16,32,32); | |
| 64 | bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,16,16,32,32); | |
| 65 | 65 | |
| 66 | 66 | vram = auto_malloc(VIDEORAM_SIZE * sizeof(vram[0])); |
| 67 | 67 | buf_spriteram = auto_malloc(2*SPRITERAM_SIZE * sizeof(buf_spriteram[0])); |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | VIDEO_START( bbuster ) |
| 73 | 73 | { |
| 74 | fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 75 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,128,32); | |
| 76 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,128,32); | |
| 74 | fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 75 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,16,16,128,32); | |
| 76 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,16,16,128,32); | |
| 77 | 77 | |
| 78 | 78 | tilemap_set_transparent_pen(pf1_tilemap, 15); |
| 79 | 79 | tilemap_set_transparent_pen(fix_tilemap, 15); |
| r1679 | r1680 | |
| 81 | 81 | |
| 82 | 82 | VIDEO_START( mechatt ) |
| 83 | 83 | { |
| 84 | fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 85 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 86 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 84 | fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 85 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,16,16,256,32); | |
| 86 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,16,16,256,32); | |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(pf1_tilemap, 15); |
| 89 | 89 | tilemap_set_transparent_pen(fix_tilemap, 15); |
| r1679 | r1680 | |
| 148 | 148 | |
| 149 | 149 | static void bbusters_draw_block(running_machine *machine, mame_bitmap *dest,int x,int y,int size,int flipx,int flipy,UINT32 sprite,int color,int bank,int block) |
| 150 | 150 | { |
| 151 | const pen_t *pal = &machine-> | |
| 151 | const pen_t *pal = &machine-> | |
| 152 | 152 | UINT32 xinc=(scale_line_count * 0x10000 ) / size; |
| 153 | 153 | UINT8 pixel; |
| 154 | 154 | int x_index; |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | for (i=0;i<numchips;i++) |
| 69 | 69 | { |
| 70 | VS920A[i].tmap = tilemap_create(VS920A_get_tile_info,tilemap_scan_rows, | |
| 70 | VS920A[i].tmap = tilemap_create(VS920A_get_tile_info,tilemap_scan_rows, | |
| 71 | 71 | |
| 72 | 72 | tilemap_set_transparent_pen(VS920A[i].tmap, 0); |
| 73 | 73 | } |
| r1679 | r1680 | |
| 225 | 225 | |
| 226 | 226 | for (i=0;i<numchips;i++) |
| 227 | 227 | { |
| 228 | MB60553[i].tmap = tilemap_create(MB60553_get_tile_info,twc94_scan, | |
| 228 | MB60553[i].tmap = tilemap_create(MB60553_get_tile_info,twc94_scan, | |
| 229 | 229 | |
| 230 | 230 | tilemap_set_transparent_pen(MB60553[i].tmap, 0); |
| 231 | 231 | } |
| r1679 | r1680 | |
|---|---|---|
| 318 | 318 | hypr_tiletable_old = auto_malloc(hyprduel_tiletable_size); |
| 319 | 319 | dirtyindex = auto_malloc(hyprduel_tiletable_size/4); |
| 320 | 320 | |
| 321 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 322 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 323 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 321 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 322 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 323 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 324 | 324 | |
| 325 | 325 | tilemap_set_transparent_pen(bg_tilemap[0],0); |
| 326 | 326 | tilemap_set_transparent_pen(bg_tilemap[1],0); |
| r1679 | r1680 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | VIDEO_START( flstory ) |
| 48 | 48 | { |
| 49 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 49 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 50 | 50 | // tilemap_set_transparent_pen( bg_tilemap,15 ); |
| 51 | 51 | tilemap_set_transmask(bg_tilemap,0,0x3fff,0xc000); /* split type 0 has pens 0-13 transparent in front half */ |
| 52 | 52 | tilemap_set_transmask(bg_tilemap,1,0x8000,0x7fff); /* split type 1 has pen 15 transparent in front half */ |
| r1679 | r1680 | |
| 58 | 58 | |
| 59 | 59 | VIDEO_START( victnine ) |
| 60 | 60 | { |
| 61 | bg_tilemap = tilemap_create( victnine_get_tile_info,tilemap_scan_rows, | |
| 61 | bg_tilemap = tilemap_create( victnine_get_tile_info,tilemap_scan_rows, | |
| 62 | 62 | tilemap_set_scroll_cols(bg_tilemap,32); |
| 63 | 63 | |
| 64 | 64 | paletteram = auto_malloc(0x200); |
| r1679 | r1680 | |
|---|---|---|
| 139 | 139 | |
| 140 | 140 | VIDEO_START( suprslam ) |
| 141 | 141 | { |
| 142 | suprslam_bg_tilemap = tilemap_create(get_suprslam_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,64,64); | |
| 143 | suprslam_screen_tilemap = tilemap_create(get_suprslam_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 142 | suprslam_bg_tilemap = tilemap_create(get_suprslam_bg_tile_info,tilemap_scan_rows, 16, 16,64,64); | |
| 143 | suprslam_screen_tilemap = tilemap_create(get_suprslam_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 144 | 144 | |
| 145 | 145 | K053936_wraparound_enable(0, 1); |
| 146 | 146 | K053936_set_offset(0, -45, -21); |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | |
| 13 | ||
| 14 | UINT8 *strnskil_xscroll; | |
| 13 | 15 | static UINT8 strnskil_scrl_ctrl; |
| 14 | static UINT8 strnskil_xscroll[2]; | |
| 15 | 16 | |
| 16 | 17 | static tilemap *bg_tilemap; |
| 17 | 18 | |
| 19 | ||
| 18 | 20 | PALETTE_INIT( strnskil ) |
| 19 | 21 | { |
| 20 | 22 | int i; |
| 21 | 23 | |
| 22 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 24 | /* allocate the colortable */ | |
| 25 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 26 | ||
| 27 | /* create a lookup table for the palette */ | |
| 28 | for (i = 0; i < 0x100; i++) | |
| 23 | 29 | { |
| 24 | int r = color_prom[0]; | |
| 25 | int g = color_prom[machine->drv->total_colors]; | |
| 26 | int b = color_prom[2*machine->drv->total_colors]; | |
| 30 | int r = pal4bit(color_prom[i + 0x000]); | |
| 31 | int g = pal4bit(color_prom[i + 0x100]); | |
| 32 | int b = pal4bit(color_prom[i + 0x200]); | |
| 27 | 33 | |
| 28 | palette_set_color_rgb(machine,i,pal4bit(r),pal4bit(g),pal4bit(b)); | |
| 29 | color_prom++; | |
| 34 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 30 | 35 | } |
| 31 | 36 | |
| 32 | color_prom += 2*machine->drv->total_colors; | |
| 33 | ||
| 34 | 37 | /* color_prom now points to the beginning of the lookup table */ |
| 38 | color_prom += 0x300; | |
| 35 | 39 | |
| 36 | 40 | /* sprites lookup table */ |
| 37 | for (i=0; i<512; i++) | |
| 38 | *(colortable++) = *(color_prom++); | |
| 39 | ||
| 40 | /* bg lookup table */ | |
| 41 | for (i=0; i<512; i++) | |
| 42 | *(colortable++) = *(color_prom++); | |
| 43 | ||
| 41 | for (i = 0; i < 0x400; i++) | |
| 42 | { | |
| 43 | UINT8 ctabentry = color_prom[i]; | |
| 44 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 45 | } | |
| 44 | 46 | } |
| 45 | 47 | |
| 48 | ||
| 46 | 49 | WRITE8_HANDLER( strnskil_videoram_w ) |
| 47 | 50 | { |
| 48 | 51 | videoram[offset] = data; |
| 49 | 52 | tilemap_mark_tile_dirty(bg_tilemap, offset / 2); |
| 50 | 53 | } |
| 51 | 54 | |
| 52 | WRITE8_HANDLER( strnskil_scroll_x_w ) | |
| 53 | { | |
| 54 | strnskil_xscroll[offset] = data; | |
| 55 | } | |
| 56 | ||
| 57 | 55 | WRITE8_HANDLER( strnskil_scrl_ctrl_w ) |
| 58 | 56 | { |
| 59 | 57 | strnskil_scrl_ctrl = data >> 5; |
| r1679 | r1680 | |
| 77 | 75 | VIDEO_START( strnskil ) |
| 78 | 76 | { |
| 79 | 77 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 80 | | |
| 78 | | |
| 81 | 79 | |
| 82 | 80 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 83 | 81 | } |
| r1679 | r1680 | |
| 118 | 116 | flipx, flipy, |
| 119 | 117 | px, py, |
| 120 | 118 | cliprect, |
| 121 | TRANSPARENCY_COLOR, 0); | |
| 119 | TRANSPARENCY_PENS, | |
| 120 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 122 | 121 | } |
| 123 | 122 | } |
| 124 | 123 |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | VIDEO_START( atetris ) |
| 51 | 51 | { |
| 52 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 52 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | extern UINT8 shaolins_nmi_enable; |
| 12 | 13 | |
| r1679 | r1680 | |
| 30 | 31 | ***************************************************************************/ |
| 31 | 32 | PALETTE_INIT( shaolins ) |
| 32 | 33 | { |
| 34 | static const int resistances[4] = { 2200, 1000, 470, 220 }; | |
| 35 | double rweights[4], gweights[4], bweights[4]; | |
| 33 | 36 | int i; |
| 34 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 35 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 36 | 37 | |
| 38 | /* compute the color output resistor weights */ | |
| 39 | compute_resistor_weights(0, 255, -1.0, | |
| 40 | 4, resistances, rweights, 470, 0, | |
| 41 | 4, resistances, gweights, 470, 0, | |
| 42 | 4, resistances, bweights, 470, 0); | |
| 37 | 43 | |
| 38 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 44 | /* allocate the colortable */ | |
| 45 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 46 | ||
| 47 | /* create a lookup table for the palette */ | |
| 48 | for (i = 0; i < 0x100; i++) | |
| 39 | 49 | { |
| 40 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 50 | int bit0, bit1, bit2, bit3; | |
| 51 | int r, g, b; | |
| 41 | 52 | |
| 53 | /* red component */ | |
| 54 | bit0 = (color_prom[i + 0x000] >> 0) & 0x01; | |
| 55 | bit1 = (color_prom[i + 0x000] >> 1) & 0x01; | |
| 56 | bit2 = (color_prom[i + 0x000] >> 2) & 0x01; | |
| 57 | bit3 = (color_prom[i + 0x000] >> 3) & 0x01; | |
| 58 | r = combine_4_weights(rweights, bit0, bit1, bit2, bit3); | |
| 42 | 59 | |
| 43 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 44 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 45 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 46 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 47 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 48 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 49 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 50 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 51 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 52 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 53 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 54 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 55 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 56 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 57 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 60 | /* green component */ | |
| 61 | bit0 = (color_prom[i + 0x100] >> 0) & 0x01; | |
| 62 | bit1 = (color_prom[i + 0x100] >> 1) & 0x01; | |
| 63 | bit2 = (color_prom[i + 0x100] >> 2) & 0x01; | |
| 64 | bit3 = (color_prom[i + 0x100] >> 3) & 0x01; | |
| 65 | g = combine_4_weights(gweights, bit0, bit1, bit2, bit3); | |
| 58 | 66 | |
| 59 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 60 | color_prom++; | |
| 67 | /* blue component */ | |
| 68 | bit0 = (color_prom[i + 0x200] >> 0) & 0x01; | |
| 69 | bit1 = (color_prom[i + 0x200] >> 1) & 0x01; | |
| 70 | bit2 = (color_prom[i + 0x200] >> 2) & 0x01; | |
| 71 | bit3 = (color_prom[i + 0x200] >> 3) & 0x01; | |
| 72 | b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); | |
| 73 | ||
| 74 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 61 | 75 | } |
| 62 | 76 | |
| 63 | color_prom += 2*machine->drv->total_colors; | |
| 64 | /* color_prom now points to the beginning of the character lookup table */ | |
| 77 | /* color_prom now points to the beginning of the lookup table,*/ | |
| 78 | color_prom += 0x300; | |
| 65 | 79 | |
| 66 | ||
| 67 | /* there are eight 32 colors palette banks; sprites use colors 0-15 and */ | |
| 68 | /* characters 16-31 of each bank. */ | |
| 69 | for (i = 0;i < TOTAL_COLORS(0)/8;i++) | |
| 80 | /* characters use colors 0x10-0x1f of each 0x20 color bank, | |
| 81 | while sprites use colors 0-0x0f */ | |
| 82 | for (i = 0; i < 0x200; i++) | |
| 70 | 83 | { |
| 71 | 84 | int j; |
| 72 | 85 | |
| 73 | ||
| 74 | for (j = 0;j < 8;j++) | |
| 75 | COLOR(0,i + j * TOTAL_COLORS(0)/8) = (*color_prom & 0x0f) + 32 * j + 16; | |
| 76 | ||
| 77 | color_prom++; | |
| 78 | } | |
| 79 | ||
| 80 | for (i = 0;i < TOTAL_COLORS(1)/8;i++) | |
| 81 | { | |
| 82 | int j; | |
| 83 | ||
| 84 | ||
| 85 | for (j = 0;j < 8;j++) | |
| 86 | for (j = 0; j < 8; j++) | |
| 86 | 87 | { |
| 87 | /* preserve transparency */ | |
| 88 | if ((*color_prom & 0x0f) == 0) COLOR(1,i + j * TOTAL_COLORS(1)/8) = 0; | |
| 89 | else COLOR(1,i + j * TOTAL_COLORS(1)/8) = (*color_prom & 0x0f) + 32 * j; | |
| 88 | UINT8 ctabentry = (j << 5) | ((~i & 0x100) >> 4) | (color_prom[i] & 0x0f); | |
| 89 | colortable_entry_set_value(machine->colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); | |
| 90 | 90 | } |
| 91 | ||
| 92 | color_prom++; | |
| 93 | 91 | } |
| 94 | 92 | } |
| 95 | 93 | |
| r1679 | r1680 | |
| 119 | 117 | int col; |
| 120 | 118 | |
| 121 | 119 | for (col = 4; col < 32; col++) |
| 122 | { | |
| 123 | 120 | tilemap_set_scrolly(bg_tilemap, col, data + 1); |
| 124 | } | |
| 125 | 121 | } |
| 126 | 122 | |
| 127 | 123 | WRITE8_HANDLER( shaolins_nmi_w ) |
| r1679 | r1680 | |
| 148 | 144 | VIDEO_START( shaolins ) |
| 149 | 145 | { |
| 150 | 146 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 151 | | |
| 147 | | |
| 152 | 148 | |
| 153 | 149 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 154 | 150 | } |
| r1679 | r1680 | |
| 162 | 158 | if (spriteram[offs] && spriteram[offs + 6]) /* stop rogue sprites on high score screen */ |
| 163 | 159 | { |
| 164 | 160 | int code = spriteram[offs + 8]; |
| 165 | int color = (spriteram[offs + 9] & 0x0f) | |
| 161 | int color = (spriteram[offs + 9] & 0x0f) | ( | |
| 166 | 162 | int flipx = !(spriteram[offs + 9] & 0x40); |
| 167 | 163 | int flipy = spriteram[offs + 9] & 0x80; |
| 168 | 164 | int sx = 240 - spriteram[offs + 6]; |
| r1679 | r1680 | |
| 180 | 176 | code, color, |
| 181 | 177 | flipx, flipy, |
| 182 | 178 | sx, sy, |
| 183 | cliprect, | |
| 184 | TRANSPARENCY_COLOR, 0); | |
| 185 | /* transparency_color, otherwise sprites in test mode are not visible */ | |
| 179 | cliprect,TRANSPARENCY_PENS, | |
| 180 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, palettebank << 5)); | |
| 186 | 181 | } |
| 187 | 182 | } |
| 188 | 183 | } |
| r1679 | r1680 | |
|---|---|---|
| 173 | 173 | |
| 174 | 174 | VIDEO_START( sshangha ) |
| 175 | 175 | { |
| 176 | pf1_8x8_tilemap = tilemap_create(get_pf1_8x8_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 177 | pf1_16x16_tilemap = tilemap_create(get_pf1_16x16_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 178 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 176 | pf1_8x8_tilemap = tilemap_create(get_pf1_8x8_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 177 | pf1_16x16_tilemap = tilemap_create(get_pf1_16x16_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 178 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 179 | 179 | |
| 180 | 180 | tilemap_set_transparent_pen(pf1_8x8_tilemap,0); |
| 181 | 181 | tilemap_set_transparent_pen(pf1_16x16_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | |
| 12 | 13 | static int flipscreen; |
| r1679 | r1680 | |
| 20 | 21 | |
| 21 | 22 | PALETTE_INIT( wiping ) |
| 22 | 23 | { |
| 24 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 25 | static const int resistances_b [2] = { 470, 220 }; | |
| 26 | double rweights[3], gweights[3], bweights[2]; | |
| 23 | 27 | int i; |
| 24 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 25 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)]) | |
| 26 | 28 | |
| 29 | /* compute the color output resistor weights */ | |
| 30 | compute_resistor_weights(0, 255, -1.0, | |
| 31 | 3, &resistances_rg[0], rweights, 470, 0, | |
| 32 | 3, &resistances_rg[0], gweights, 470, 0, | |
| 33 | 2, &resistances_b[0], bweights, 470, 0); | |
| 27 | 34 | |
| 28 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 35 | /* allocate the colortable */ | |
| 36 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 37 | ||
| 38 | /* create a lookup table for the palette */ | |
| 39 | for (i = 0; i < 0x20; i++) | |
| 29 | 40 | { |
| 30 | int bit0,bit1,bit2,r,g,b; | |
| 41 | int bit0, bit1, bit2; | |
| 42 | int r, g, b; | |
| 31 | 43 | |
| 44 | /* red component */ | |
| 45 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 46 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 47 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 48 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 32 | 49 | |
| 33 | /* red component */ | |
| 34 | bit0 = (*color_prom >> 0) & 0x01; | |
| 35 | bit1 = (*color_prom >> 1) & 0x01; | |
| 36 | bit2 = (*color_prom >> 2) & 0x01; | |
| 37 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 38 | 50 | /* green component */ |
| 39 | bit0 = (*color_prom >> 3) & 0x01; | |
| 40 | bit1 = (*color_prom >> 4) & 0x01; | |
| 41 | bit2 = (*color_prom >> 5) & 0x01; | |
| 42 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 51 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 52 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 53 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 54 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 55 | ||
| 43 | 56 | /* blue component */ |
| 44 | bit0 = (*color_prom >> 6) & 0x01; | |
| 45 | bit1 = (*color_prom >> 7) & 0x01; | |
| 46 | b = 0x4f * bit0 + 0xa8 * bit1; | |
| 57 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 58 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 59 | b = combine_2_weights(bweights, bit0, bit1); | |
| 47 | 60 | |
| 48 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 49 | color_prom++; | |
| 61 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 50 | 62 | } |
| 51 | 63 | |
| 52 | 64 | /* color_prom now points to the beginning of the lookup table */ |
| 65 | color_prom += 0x20; | |
| 53 | 66 | |
| 54 | 67 | /* chars use colors 0-15 */ |
| 55 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 56 | COLOR(0,i ^ 3) = *(color_prom++) & 0x0f; | |
| 68 | for (i = 0; i < 0x100; i++) | |
| 69 | { | |
| 70 | UINT8 ctabentry = color_prom[i ^ 0x03] & 0x0f; | |
| 71 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 72 | } | |
| 57 | 73 | |
| 58 | 74 | /* sprites use colors 16-31 */ |
| 59 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 60 | COLOR(1,i ^ 3) = (*(color_prom++) & 0x0f) + 0x10; | |
| 75 | for (i = 0x100; i < 0x200; i++) | |
| 76 | { | |
| 77 | UINT8 ctabentry = (color_prom[i ^ 0x03] & 0x0f) | 0x10; | |
| 78 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 79 | } | |
| 61 | 80 | } |
| 62 | 81 | |
| 63 | 82 | |
| r1679 | r1680 | |
| 112 | 131 | /* Note, we're counting up on purpose ! */ |
| 113 | 132 | /* This way the vacuum cleaner is always on top */ |
| 114 | 133 | for (offs = 0x0; offs < 128; offs += 2) { |
| 115 | int sx,sy,flipx,flipy,otherbank; | |
| 134 | int sx,sy,color,flipx,flipy,otherbank; | |
| 116 | 135 | |
| 117 | 136 | sx = spriteram[offs+0x100+1] + ((spriteram[offs+0x81] & 0x01) << 8) - 40; |
| 118 | 137 | sy = 224 - spriteram[offs+0x100]; |
| 138 | color = spriteram[offs+1] & 0x3f; | |
| 119 | 139 | |
| 120 | 140 | otherbank = spriteram[offs+0x80] & 0x01; |
| 121 | 141 | |
| r1679 | r1680 | |
| 131 | 151 | |
| 132 | 152 | drawgfx(bitmap,machine->gfx[1], |
| 133 | 153 | (spriteram[offs] & 0x3f) + 64 * otherbank, |
| 134 | | |
| 154 | c | |
| 135 | 155 | flipx,flipy, |
| 136 | 156 | sx,sy, |
| 137 | &machine->screen[0].visarea,TRANSPARENCY_COLOR,0x1f); | |
| 157 | &machine->screen[0].visarea,TRANSPARENCY_PENS, | |
| 158 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0x1f)); | |
| 138 | 159 | } |
| 139 | 160 | |
| 140 | 161 | /* redraw high priority chars */ |
| r1679 | r1680 | |
|---|---|---|
| 63 | 63 | color_codes = memory_region(REGION_PROMS) + 0x300; |
| 64 | 64 | |
| 65 | 65 | |
| 66 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 67 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,32); | |
| 66 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8,8, 64,32); | |
| 67 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8,8, 64,32); | |
| 68 | 68 | |
| 69 | 69 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 70 | 70 |
| r1679 | r1680 | |
|---|---|---|
| 149 | 149 | |
| 150 | 150 | sys24_char_dirtymap = auto_malloc(SYS24_TILES); |
| 151 | 151 | |
| 152 | sys24_tile_layer[0] = tilemap_create(sys24_tile_info_0s, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 153 | sys24_tile_layer[1] = tilemap_create(sys24_tile_info_0w, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 154 | sys24_tile_layer[2] = tilemap_create(sys24_tile_info_1s, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 155 | sys24_tile_layer[3] = tilemap_create(sys24_tile_info_1w, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 152 | sys24_tile_layer[0] = tilemap_create(sys24_tile_info_0s, tilemap_scan_rows, 8, 8, 64, 64); | |
| 153 | sys24_tile_layer[1] = tilemap_create(sys24_tile_info_0w, tilemap_scan_rows, 8, 8, 64, 64); | |
| 154 | sys24_tile_layer[2] = tilemap_create(sys24_tile_info_1s, tilemap_scan_rows, 8, 8, 64, 64); | |
| 155 | sys24_tile_layer[3] = tilemap_create(sys24_tile_info_1w, tilemap_scan_rows, 8, 8, 64, 64); | |
| 156 | 156 | |
| 157 | 157 | tilemap_set_transparent_pen(sys24_tile_layer[0], 0); |
| 158 | 158 | tilemap_set_transparent_pen(sys24_tile_layer[1], 0); |
| r1679 | r1680 | |
|---|---|---|
| 269 | 269 | bitmap_type = TYPE_SKYSKIPR; |
| 270 | 270 | |
| 271 | 271 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 272 | | |
| 272 | | |
| 273 | 273 | |
| 274 | 274 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 275 | 275 | } |
| r1679 | r1680 | |
| 283 | 283 | bitmap_type = TYPE_POPEYE; |
| 284 | 284 | |
| 285 | 285 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 286 | | |
| 286 | | |
| 287 | 287 | |
| 288 | 288 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 289 | 289 | } |
| r1679 | r1680 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | VIDEO_START( 4enraya ) |
| 31 | 31 | { |
| 32 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 32 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | VIDEO_UPDATE( 4enraya) |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | VIDEO_START( blockade ) |
| 26 | 26 | { |
| 27 | 27 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 28 | | |
| 28 | | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | VIDEO_UPDATE( blockade ) |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | VIDEO_START( compgolf ) |
| 73 | 73 | { |
| 74 | background_tilemap = tilemap_create(get_back_info,back_scan,TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 75 | text_tilemap = tilemap_create(get_text_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 74 | background_tilemap = tilemap_create(get_back_info,back_scan, 16, 16, 32, 32); | |
| 75 | text_tilemap = tilemap_create(get_text_info,tilemap_scan_rows, 8, 8, 32, 32); | |
| 76 | 76 | |
| 77 | 77 | tilemap_set_transparent_pen(text_tilemap,0); |
| 78 | 78 | } |
| r1679 | r1680 | |
|---|---|---|
| 123 | 123 | VIDEO_START( lordgun ) |
| 124 | 124 | { |
| 125 | 125 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 126 | | |
| 126 | | |
| 127 | 127 | |
| 128 | 128 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 129 | | |
| 129 | | |
| 130 | 130 | |
| 131 | 131 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 132 | | |
| 132 | | |
| 133 | 133 | |
| 134 | 134 | tilemap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 135 | | |
| 135 | | |
| 136 | 136 | |
| 137 | 137 | tilemap_set_scroll_rows(tilemap_0,1); |
| 138 | 138 | tilemap_set_scroll_cols(tilemap_0,1); |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | VIDEO_START( pushman ) |
| 51 | 51 | { |
| 52 | bg_tilemap = tilemap_create(get_back_tile_info,background_scan_rows,TILEMAP_TYPE_PEN, 32,32,128,64); | |
| 53 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32,32); | |
| 52 | bg_tilemap = tilemap_create(get_back_tile_info,background_scan_rows, 32,32,128,64); | |
| 53 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8, 8, 32,32); | |
| 54 | 54 | |
| 55 | 55 | tilemap_set_transparent_pen(tx_tilemap,3); |
| 56 | 56 | } |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | VIDEO_START( lemmings ) |
| 96 | 96 | { |
| 97 | 97 | bitmap0 = auto_bitmap_alloc(2048,256,machine->screen[0].format); |
| 98 | vram_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols, | |
| 98 | vram_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols, | |
| 99 | 99 | |
| 100 | 100 | vram_buffer = (UINT8*)auto_malloc(2048*64); /* 64 bytes per VRAM character */ |
| 101 | 101 | vram_dirty = (UINT8*)auto_malloc(2048); |
| r1679 | r1680 | |
|---|---|---|
| 40 | 40 | { |
| 41 | 41 | // i'm not 100% sure it should be opaque, pink title screen looks strange in las vegas girls |
| 42 | 42 | // but if its transparent other things look incorrect |
| 43 | zerozone_tilemap = tilemap_create(get_zerozone_tile_info,tilemap_scan_cols, | |
| 43 | zerozone_tilemap = tilemap_create(get_zerozone_tile_info,tilemap_scan_cols, | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | VIDEO_UPDATE( zerozone ) |
| r1679 | r1680 | |
|---|---|---|
| 100 | 100 | |
| 101 | 101 | VIDEO_START( espial ) |
| 102 | 102 | { |
| 103 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 103 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 104 | 104 | |
| 105 | 105 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 106 | 106 | } |
| r1679 | r1680 | |
| 108 | 108 | VIDEO_START( netwars ) |
| 109 | 109 | { |
| 110 | 110 | /* Net Wars has a tile map that's twice as big as Espial's */ |
| 111 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 111 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 112 | 112 | |
| 113 | 113 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 114 | 114 | tilemap_set_scrolldy(bg_tilemap, 0, 0x100); |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | UINT8 *hyperspt_scroll; |
| 12 | 13 | |
| r1679 | r1680 | |
| 32 | 33 | ***************************************************************************/ |
| 33 | 34 | PALETTE_INIT( hyperspt ) |
| 34 | 35 | { |
| 36 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 37 | static const int resistances_b [2] = { 470, 220 }; | |
| 38 | double rweights[3], gweights[3], bweights[2]; | |
| 35 | 39 | int i; |
| 36 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 37 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 38 | 40 | |
| 41 | /* compute the color output resistor weights */ | |
| 42 | compute_resistor_weights(0, 255, -1.0, | |
| 43 | 3, &resistances_rg[0], rweights, 1000, 0, | |
| 44 | 3, &resistances_rg[0], gweights, 1000, 0, | |
| 45 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 39 | 46 | |
| 40 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 47 | /* allocate the colortable */ | |
| 48 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 49 | ||
| 50 | /* create a lookup table for the palette */ | |
| 51 | for (i = 0; i < 0x20; i++) | |
| 41 | 52 | { |
| 42 | int bit0,bit1,bit2,r,g,b; | |
| 53 | int bit0, bit1, bit2; | |
| 54 | int r, g, b; | |
| 43 | 55 | |
| 44 | 56 | /* red component */ |
| 45 | bit0 = (*color_prom >> 0) & 0x01; | |
| 46 | bit1 = (*color_prom >> 1) & 0x01; | |
| 47 | bit2 = (*color_prom >> 2) & 0x01; | |
| 48 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 57 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 58 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 59 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 60 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 61 | ||
| 49 | 62 | /* green component */ |
| 50 | bit0 = (*color_prom >> 3) & 0x01; | |
| 51 | bit1 = (*color_prom >> 4) & 0x01; | |
| 52 | bit2 = (*color_prom >> 5) & 0x01; | |
| 53 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 63 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 64 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 65 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 66 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 67 | ||
| 54 | 68 | /* blue component */ |
| 55 | bit0 = 0; | |
| 56 | bit1 = (*color_prom >> 6) & 0x01; | |
| 57 | bit2 = (*color_prom >> 7) & 0x01; | |
| 58 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 69 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 70 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 71 | b = combine_2_weights(bweights, bit0, bit1); | |
| 59 | 72 | |
| 60 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 61 | color_prom++; | |
| 73 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 62 | 74 | } |
| 63 | 75 | |
| 64 | 76 | /* color_prom now points to the beginning of the lookup table */ |
| 77 | color_prom += 0x20; | |
| 65 | 78 | |
| 66 | ||
| 67 | 79 | /* sprites */ |
| 68 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 69 | COLOR(1,i) = *(color_prom++) & 0x0f; | |
| 80 | for (i = 0; i < 0x100; i++) | |
| 81 | { | |
| 82 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 83 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 84 | } | |
| 70 | 85 | |
| 71 | 86 | /* characters */ |
| 72 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 73 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 87 | for (i = 0x100; i < 0x200; i++) | |
| 88 | { | |
| 89 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 90 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 91 | } | |
| 74 | 92 | } |
| 75 | 93 | |
| 76 | 94 | WRITE8_HANDLER( hyperspt_videoram_w ) |
| r1679 | r1680 | |
| 100 | 118 | int color = colorram[tile_index] & 0x0f; |
| 101 | 119 | int flags = ((colorram[tile_index] & 0x10) ? TILE_FLIPX : 0) | ((colorram[tile_index] & 0x20) ? TILE_FLIPY : 0); |
| 102 | 120 | |
| 103 | SET_TILE_INFO( | |
| 121 | SET_TILE_INFO(1, code, color, flags); | |
| 104 | 122 | } |
| 105 | 123 | |
| 106 | 124 | VIDEO_START( hyperspt ) |
| 107 | 125 | { |
| 108 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 109 | TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 126 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 32); | |
| 110 | 127 | |
| 111 | 128 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 112 | 129 | } |
| r1679 | r1680 | |
| 119 | 136 | { |
| 120 | 137 | int sx = spriteram[offs + 3]; |
| 121 | 138 | int sy = 240 - spriteram[offs + 1]; |
| 139 | int code = spriteram[offs + 2] + 8 * (spriteram[offs] & 0x20); | |
| 140 | int color = spriteram[offs] & 0x0f; | |
| 122 | 141 | int flipx = ~spriteram[offs] & 0x40; |
| 123 | 142 | int flipy = spriteram[offs] & 0x80; |
| 124 | 143 | |
| r1679 | r1680 | |
| 133 | 152 | |
| 134 | 153 | sy += 1; |
| 135 | 154 | |
| 136 | drawgfx(bitmap,machine->gfx[1], | |
| 137 | spriteram[offs + 2] + 8 * (spriteram[offs] & 0x20), | |
| 138 | spriteram[offs] & 0x0f, | |
| 155 | drawgfx(bitmap,machine->gfx[0], | |
| 156 | code, color, | |
| 139 | 157 | flipx, flipy, |
| 140 | 158 | sx, sy, |
| 141 | 159 | cliprect, |
| 142 | TRANSPARENCY_COLOR, 0); | |
| 160 | TRANSPARENCY_PENS, | |
| 161 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 143 | 162 | |
| 144 | 163 | /* redraw with wraparound */ |
| 145 | 164 | |
| 146 | drawgfx(bitmap,machine->gfx[1], | |
| 147 | spriteram[offs + 2] + 8 * (spriteram[offs] & 0x20), | |
| 148 | spriteram[offs] & 0x0f, | |
| 165 | drawgfx(bitmap,machine->gfx[0], | |
| 166 | code, color, | |
| 149 | 167 | flipx, flipy, |
| 150 | 168 | sx - 256, sy, |
| 151 | 169 | cliprect, |
| 152 | TRANSPARENCY_COLOR, 0); | |
| 170 | TRANSPARENCY_PENS, | |
| 171 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 153 | 172 | } |
| 154 | 173 | } |
| 155 | 174 | |
| r1679 | r1680 | |
| 177 | 196 | int color = colorram[tile_index] & 0x0f; |
| 178 | 197 | int flags = (colorram[tile_index] & 0x10) ? TILE_FLIPX : 0; |
| 179 | 198 | |
| 180 | SET_TILE_INFO( | |
| 199 | SET_TILE_INFO(1, code, color, flags); | |
| 181 | 200 | } |
| 182 | 201 | |
| 183 | 202 | VIDEO_START( roadf ) |
| 184 | 203 | { |
| 185 | bg_tilemap = tilemap_create(roadf_get_bg_tile_info, tilemap_scan_rows, | |
| 186 | TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 204 | bg_tilemap = tilemap_create(roadf_get_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 32); | |
| 187 | 205 | |
| 188 | 206 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 189 | 207 | } |
| r1679 | r1680 | |
|---|---|---|
| 141 | 141 | VIDEO_START( tiamc1 ) |
| 142 | 142 | { |
| 143 | 143 | bg_tilemap1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, |
| 144 | | |
| 144 | | |
| 145 | 145 | |
| 146 | 146 | bg_tilemap2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, |
| 147 | | |
| 147 | | |
| 148 | 148 | |
| 149 | 149 | tiamc1_bg_vshift = 0; |
| 150 | 150 | tiamc1_bg_hshift = 0; |
| r1679 | r1680 | |
|---|---|---|
| 256 | 256 | |
| 257 | 257 | static void toaplan1_create_tilemaps(void) |
| 258 | 258 | { |
| 259 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 260 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 261 | pf3_tilemap = tilemap_create(get_pf3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 262 | pf4_tilemap = tilemap_create(get_pf4_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 259 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 260 | pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 261 | pf3_tilemap = tilemap_create(get_pf3_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 262 | pf4_tilemap = tilemap_create(get_pf4_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 263 | 263 | |
| 264 | 264 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 265 | 265 | tilemap_set_transparent_pen(pf2_tilemap,0); |
| r1679 | r1680 | |
| 946 | 946 | UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, |
| 947 | 947 | const rectangle *clip,int priority) |
| 948 | 948 | { |
| 949 | const pen_t *pal = &Machine-> | |
| 949 | const pen_t *pal = &Machine-> | |
| 950 | 950 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 951 | 951 | |
| 952 | 952 | int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16; |
| r1679 | r1680 | |
|---|---|---|
| 228 | 228 | /* and one vertically scrolling */ |
| 229 | 229 | case G80_BACKGROUND_SPACEOD: |
| 230 | 230 | spaceod_bg_init_palette(machine); |
| 231 | spaceod_bg_htilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_TYPE_PEN, 8,8, 128,32); | |
| 232 | spaceod_bg_vtilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,128); | |
| 231 | spaceod_bg_htilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, 8,8, 128,32); | |
| 232 | spaceod_bg_vtilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, 8,8, 32,128); | |
| 233 | 233 | break; |
| 234 | 234 | |
| 235 | 235 | /* background tilemap is effectively 1 screen x n screens */ |
| 236 | 236 | case G80_BACKGROUND_MONSTERB: |
| 237 | bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, | |
| 237 | bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, | |
| 238 | 238 | break; |
| 239 | 239 | |
| 240 | 240 | /* background tilemap is effectively 4 screens x n screens */ |
| 241 | 241 | case G80_BACKGROUND_PIGNEWT: |
| 242 | 242 | case G80_BACKGROUND_SINDBADM: |
| 243 | bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, | |
| 243 | bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, | |
| 244 | 244 | break; |
| 245 | 245 | } |
| 246 | 246 |
| r1679 | r1680 | |
|---|---|---|
| 280 | 280 | K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tmnt_tile_callback); |
| 281 | 281 | K053245_vh_start(machine,0, REGION_GFX2,NORMAL_PLANE_ORDER,lgtnfght_sprite_callback); |
| 282 | 282 | |
| 283 | roz_tilemap = tilemap_create(glfgreat_get_roz_tile_info,tilemap_scan_rows, | |
| 283 | roz_tilemap = tilemap_create(glfgreat_get_roz_tile_info,tilemap_scan_rows, | |
| 284 | 284 | |
| 285 | 285 | tilemap_set_transparent_pen(roz_tilemap,0); |
| 286 | 286 | |
| r1679 | r1680 | |
| 301 | 301 | K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tmnt_tile_callback); |
| 302 | 302 | K053245_vh_start(machine,0, REGION_GFX2,NORMAL_PLANE_ORDER,prmrsocr_sprite_callback); |
| 303 | 303 | |
| 304 | roz_tilemap = tilemap_create(prmrsocr_get_roz_tile_info,tilemap_scan_rows, | |
| 304 | roz_tilemap = tilemap_create(prmrsocr_get_roz_tile_info,tilemap_scan_rows, | |
| 305 | 305 | |
| 306 | 306 | tilemap_set_transparent_pen(roz_tilemap,0); |
| 307 | 307 |
| r1679 | r1680 | |
|---|---|---|
| 133 | 133 | VIDEO_START( zodiack ) |
| 134 | 134 | { |
| 135 | 135 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 136 | | |
| 136 | | |
| 137 | 137 | |
| 138 | 138 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 139 | | |
| 139 | | |
| 140 | 140 | |
| 141 | 141 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 142 | 142 | tilemap_set_scroll_cols(fg_tilemap, 32); |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | static UINT32 pvrctrl_regs[0x100/4]; |
| 17 | 17 | static UINT32 pvrta_regs[0x2000/4]; |
| 18 | static int pvr_parconfseq[] = {1,2,3,2,3,4,5,6,5,6,7,8,9,10,11,12,13,14,13,14,15,16,17,16,17,0,0,0,0,0,18,19,20,19,20,21,22,23,22,23}; | |
| 19 | static int pvr_wordsvertex[24] = {8,8,8,8,8,16,16,8,8,8, 8, 8,8,8,8,8,16,16, 8,16,16,8,16,16}; | |
| 20 | static int pvr_wordspolygon[24] = {8,8,8,8,8, 8, 8,8,8,8,16,16,8,8,8,8, 8, 8,16,16,16,8, 8, 8}; | |
| 21 | static int pvr_parameterconfig[64]; | |
| 18 | 22 | |
| 19 | 23 | UINT64 *dc_texture_ram; |
| 20 | 24 | static UINT32 tafifo_buff[32]; |
| 21 | 25 | static int tafifo_pos, tafifo_mask, tafifo_vertexwords, tafifo_listtype; |
| 22 | 26 | static int start_render_received; |
| 27 | static int alloc_ctrl_OPB_Mode, alloc_ctrl_PT_OPB, alloc_ctrl_TM_OPB, alloc_ctrl_T_OPB, alloc_ctrl_ZM_OPB, alloc_ctrl_O_OPB; | |
| 23 | 28 | |
| 24 | 29 | struct testsprites |
| 25 | 30 | { |
| r1679 | r1680 | |
| 66 | 71 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 67 | 72 | |
| 68 | 73 | #if DEBUG_PVRCTRL |
| 69 | mame_printf_verbose("PVRCTRL: read %x @ %x (reg %x), mask %llx (PC=%x)\n", pvrctrl_regs[reg], offset, reg, mem_mask, activecpu_get_pc()); | |
| 74 | mame_printf_verbose("PVRCTRL: [%08x] read %x @ %x (reg %x), mask %llx (PC=%x)\n", 0x5f7c00+reg*4, pvrctrl_regs[reg], offset, reg, mem_mask, activecpu_get_pc()); | |
| 70 | 75 | #endif |
| 71 | 76 | |
| 72 | 77 | return (UINT64)pvrctrl_regs[reg] << shift; |
| r1679 | r1680 | |
| 76 | 81 | { |
| 77 | 82 | int reg; |
| 78 | 83 | UINT64 shift; |
| 84 | UINT32 dat; | |
| 79 | 85 | |
| 80 | 86 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 87 | dat = (UINT32)(data >> shift); | |
| 81 | 88 | |
| 82 | 89 | #if DEBUG_PVRCTRL |
| 83 | mame_printf_verbose("PVRCTRL: write %llx to %x (reg %x), mask %llx\n", data>>shift, offset, reg, mem_mask); | |
| 90 | mame_printf_verbose("PVRCTRL: [%08x=%x] write %llx to %x (reg %x), mask %llx\n", 0x5f7c00+reg*4, dat, data>>shift, offset, reg, mem_mask); | |
| 84 | 91 | #endif |
| 85 | 92 | |
| 86 | pvrctrl_regs[reg] |= dat | |
| 93 | pvrctrl_regs[reg] |= dat | |
| 87 | 94 | } |
| 88 | 95 | |
| 89 | 96 | READ64_HANDLER( pvr_ta_r ) |
| r1679 | r1680 | |
| 100 | 107 | break; |
| 101 | 108 | } |
| 102 | 109 | |
| 103 | #if DEBUG_PVRTA | |
| 104 | mame_printf_verbose("PVRTA: read %x @ %x (reg %x), mask %llx (PC=%x)\n", pvrta_regs[reg], offset, reg, mem_mask, activecpu_get_pc()); | |
| 110 | #if DEBUG_PVRTA_REGS | |
| 111 | mame_printf_verbose("PVRTA: [%08x] read %x @ %x (reg %x), mask %llx (PC=%x)\n", 0x5f8000+reg*4, pvrta_regs[reg], offset, reg, mem_mask, activecpu_get_pc()); | |
| 105 | 112 | #endif |
| 106 | 113 | return (UINT64)pvrta_regs[reg] << shift; |
| 107 | 114 | } |
| r1679 | r1680 | |
| 119 | 126 | switch (reg) |
| 120 | 127 | { |
| 121 | 128 | case SOFTRESET: |
| 122 | #if DEBUG_PVRTA_REGS | |
| 123 | 129 | if (dat & 1) |
| 124 | 130 | { |
| 131 | #if DEBUG_PVRTA | |
| 125 | 132 | mame_printf_verbose("pvr_ta_w: TA soft reset\n"); |
| 133 | #endif | |
| 126 | 134 | } |
| 127 | 135 | if (dat & 2) |
| 128 | 136 | { |
| 137 | #if DEBUG_PVRTA | |
| 129 | 138 | mame_printf_verbose("pvr_ta_w: Core Pipeline soft reset\n"); |
| 139 | #endif | |
| 140 | if (start_render_received == 1) | |
| 141 | start_render_received = 0; | |
| 130 | 142 | } |
| 131 | 143 | if (dat & 4) |
| 132 | 144 | { |
| 145 | #if DEBUG_PVRTA | |
| 133 | 146 | mame_printf_verbose("pvr_ta_w: sdram I/F soft reset\n"); |
| 147 | #endif | |
| 134 | 148 | } |
| 135 | #endif | |
| 136 | 149 | break; |
| 137 | 150 | case STARTRENDER: |
| 151 | #if DEBUG_PVRTA | |
| 152 | mame_printf_verbose("Start Render Received:\n"); | |
| 153 | mame_printf_verbose(" Region Array at %08x\n",pvrta_regs[REGION_BASE]); | |
| 154 | mame_printf_verbose(" ISP/TSP Parameters at %08x\n",pvrta_regs[PARAM_BASE]); | |
| 155 | #endif | |
| 138 | 156 | start_render_received=1; |
| 139 | 157 | break; |
| 158 | case TA_ALLOC_CTRL: | |
| 159 | alloc_ctrl_OPB_Mode = dat & 0x100000; // 0 up 1 down | |
| 160 | alloc_ctrl_PT_OPB = (4 << ((dat >> 16) & 3)) & 0x38; // number of 32 bit words (0,8,16,32) | |
| 161 | alloc_ctrl_TM_OPB = (4 << ((dat >> 12) & 3)) & 0x38; | |
| 162 | alloc_ctrl_T_OPB = (4 << ((dat >> 8) & 3)) & 0x38; | |
| 163 | alloc_ctrl_ZM_OPB = (4 << ((dat >> 4) & 3)) & 0x38; | |
| 164 | alloc_ctrl_O_OPB = (4 << ((dat >> 0) & 3)) & 0x38; | |
| 165 | break; | |
| 140 | 166 | case TA_LIST_INIT: |
| 141 | 167 | tafifo_pos=0; |
| 142 | 168 | tafifo_mask=7; |
| 143 | 169 | tafifo_vertexwords=8; |
| 144 | 170 | tafifo_listtype= -1; |
| 145 | 171 | toerasesprites=1; |
| 172 | #if DEBUG_PVRTA | |
| 173 | mame_printf_verbose("TA_OL_BASE %08x TA_OL_LIMIT %08x\n", pvrta_regs[TA_OL_BASE], pvrta_regs[TA_OL_LIMIT]); | |
| 174 | mame_printf_verbose("TA_ISP_BASE %08x TA_ISP_LIMIT %08x\n", pvrta_regs[TA_ISP_BASE], pvrta_regs[TA_ISP_LIMIT]); | |
| 175 | mame_printf_verbose("TA_ALLOC_CTRL %08x\n", pvrta_regs[TA_ALLOC_CTRL]); | |
| 176 | mame_printf_verbose("TA_NEXT_OPB_INIT %08x\n", pvrta_regs[TA_NEXT_OPB_INIT]); | |
| 177 | #endif | |
| 178 | pvrta_regs[TA_NEXT_OPB] = pvrta_regs[TA_NEXT_OPB_INIT]; | |
| 179 | pvrta_regs[TA_ITP_CURRENT] = pvrta_regs[TA_ISP_BASE]; | |
| 146 | 180 | break; |
| 147 | 181 | } |
| 148 | 182 | |
| 149 | #if DEBUG_PVRTA | |
| 150 | mame_printf_verbose("PVRTA: write %llx to %x (reg %x %x), mask %llx\n", data>>shift, offset, reg, (reg*4)+0x8000, mem_mask); | |
| 183 | #if DEBUG_PVRTA_REGS | |
| 184 | mame_printf_verbose("PVRTA: [%08x=%x] write %llx to %x (reg %x %x), mask %llx\n", 0x5f8000+reg*4, dat, data>>shift, offset, reg, (reg*4)+0x8000, mem_mask); | |
| 151 | 185 | #endif |
| 152 | 186 | } |
| 153 | 187 | |
| 154 | 188 | WRITE64_HANDLER( ta_fifo_poly_w ) |
| 155 | 189 | { |
| 156 | 190 | UINT32 a; |
| 157 | static UINT32 paracontrol,paratype,endofstrip,listtype; | |
| 191 | static UINT32 paracontrol,paratype,endofstrip,listtype,global_paratype,parameterconfig; | |
| 158 | 192 | static UINT32 groupcontrol,groupen,striplen,userclip; |
| 159 | 193 | static UINT32 objcontrol,shadow,volume,coltype,texture,offfset,gouraud,uv16bit; |
| 160 | 194 | static UINT32 textureusize,texturevsize,texturesizes,textureaddress,scanorder,pixelformat; |
| r1679 | r1680 | |
| 173 | 207 | } |
| 174 | 208 | else |
| 175 | 209 | { |
| 176 | | |
| 210 | mame_printf_debug("ta_fifo_poly_w: Only 64 bit writes supported!\n"); | |
| 177 | 211 | } |
| 178 | 212 | |
| 179 | 213 | tafifo_pos &= tafifo_mask; |
| 180 | 214 | if (tafifo_pos == 0) |
| 181 | 215 | { |
| 182 | 216 | paracontrol=(tafifo_buff[0] >> 24) & 0xff; |
| 183 | ||
| 184 | 217 | // 0 end of list |
| 185 | 218 | // 1 user tile clip |
| 186 | 219 | // 2 object list set |
| r1679 | r1680 | |
| 192 | 225 | paratype=(paracontrol >> 5) & 7; |
| 193 | 226 | endofstrip=(paracontrol >> 4) & 1; |
| 194 | 227 | listtype=(paracontrol >> 0) & 7; |
| 195 | groupcontrol=(tafifo_buff[0] >> 16) & 0xff; | |
| 196 | groupen=(groupcontrol >> 7) & 1; | |
| 197 | striplen=(groupcontrol >> 2) & 3; | |
| 198 | userclip=(groupcontrol >> 0) & 3; | |
| 199 | objcontrol=(tafifo_buff[0] >> 0) & 0xffff; | |
| 200 | shadow=(objcontrol >> 7) & 1; | |
| 201 | volume=(objcontrol >> 6) & 1; | |
| 202 | coltype=(objcontrol >> 4) & 3; | |
| 203 | texture=(objcontrol >> 3) & 1; | |
| 204 | offfset=(objcontrol >> 2) & 1; | |
| 205 | gouraud=(objcontrol >> 1) & 1; | |
| 206 | uv16bit=(objcontrol >> 0) & 1; | |
| 228 | if ((paratype >= 4) && (paratype <= 6)) | |
| 229 | { | |
| 230 | global_paratype = paratype; | |
| 231 | groupcontrol=(tafifo_buff[0] >> 16) & 0xff; | |
| 232 | groupen=(groupcontrol >> 7) & 1; | |
| 233 | striplen=(groupcontrol >> 2) & 3; | |
| 234 | userclip=(groupcontrol >> 0) & 3; | |
| 235 | objcontrol=(tafifo_buff[0] >> 0) & 0xffff; | |
| 236 | shadow=(objcontrol >> 7) & 1; | |
| 237 | volume=(objcontrol >> 6) & 1; | |
| 238 | coltype=(objcontrol >> 4) & 3; | |
| 239 | texture=(objcontrol >> 3) & 1; | |
| 240 | offfset=(objcontrol >> 2) & 1; | |
| 241 | gouraud=(objcontrol >> 1) & 1; | |
| 242 | uv16bit=(objcontrol >> 0) & 1; | |
| 243 | } | |
| 207 | 244 | |
| 208 | 245 | if (toerasesprites == 1) |
| 209 | 246 | { |
| r1679 | r1680 | |
| 214 | 251 | // check if we need 8 words more |
| 215 | 252 | if (tafifo_mask == 7) |
| 216 | 253 | { |
| 217 | if ((paratype == 4) && (((coltype >= 2) && (offfset == 1)) || ((coltype >= 2) && (volume == 1)))) | |
| 254 | parameterconfig = pvr_parameterconfig[objcontrol & 0x3d]; | |
| 255 | // decide number of words per vertex | |
| 256 | if (paratype == 7) | |
| 218 | 257 | { |
| 219 | tafifo_mask = 15; | |
| 220 | tafifo_pos = 8; | |
| 221 | return; | |
| 258 | if ((global_paratype == 5) || (tafifo_listtype == 1) || (tafifo_listtype == 3)) | |
| 259 | tafifo_vertexwords = 16; | |
| 260 | if (tafifo_vertexwords == 16) | |
| 261 | { | |
| 262 | tafifo_mask = 15; | |
| 263 | tafifo_pos = 8; | |
| 264 | return; | |
| 265 | } | |
| 222 | 266 | } |
| 223 | ||
| 224 | if ((paratype == 7) && (tafifo_vertexwords == 16)) | |
| 225 | { | |
| 226 | tafifo_mask = 15; | |
| 227 | tafifo_pos = 8; | |
| 228 | return; | |
| 229 | } | |
| 267 | tafifo_vertexwords=pvr_wordsvertex[parameterconfig]; | |
| 268 | if ((paratype == 4) && ((listtype != 1) && (listtype != 3))) | |
| 269 | if (pvr_wordspolygon[parameterconfig] == 16) | |
| 270 | { | |
| 271 | tafifo_mask = 15; | |
| 272 | tafifo_pos = 8; | |
| 273 | return; | |
| 274 | } | |
| 230 | 275 | } |
| 231 | 276 | else |
| 232 | 277 | { |
| r1679 | r1680 | |
| 235 | 280 | |
| 236 | 281 | // now we heve all the needed words |
| 237 | 282 | // interpret their meaning |
| 238 | if (tafifo_buff[0] == 0) | |
| 239 | { | |
| 283 | if (paratype == 0) | |
| 284 | { // end of list | |
| 240 | 285 | a=0; // 6-10 0-3 |
| 241 | 286 | switch (tafifo_listtype) |
| 242 | 287 | { |
| r1679 | r1680 | |
| 255 | 300 | case 4: |
| 256 | 301 | a = 1 << 21; |
| 257 | 302 | break; |
| 258 | break; | |
| 259 | 303 | } |
| 260 | 304 | sysctrl_regs[SB_ISTNRM] |= a; |
| 261 | 305 | update_interrupt_status(); |
| 262 | tafifo_listtype= -1; | |
| 306 | tafifo_listtype= -1; // no list being received | |
| 263 | 307 | } |
| 308 | else if (paratype == 1) | |
| 309 | { | |
| 310 | #if DEBUG_PVRDLIST | |
| 311 | mame_printf_verbose("Para Type 1 User Tile Clip\n"); | |
| 312 | mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); | |
| 313 | #endif | |
| 314 | } | |
| 315 | else if (paratype == 2) | |
| 316 | { | |
| 317 | #if DEBUG_PVRDLIST | |
| 318 | mame_printf_verbose("Para Type 2 Object List Set at %08x\n", tafifo_buff[1]); | |
| 319 | mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]); | |
| 320 | #endif | |
| 321 | } | |
| 322 | else if (paratype == 3) | |
| 323 | { | |
| 324 | #if DEBUG_PVRDLIST | |
| 325 | mame_printf_verbose("Para Type %x Unknown!\n", tafifo_buff[0]); | |
| 326 | #endif | |
| 327 | } | |
| 264 | 328 | else |
| 265 | 329 | { |
| 266 | 330 | #if DEBUG_PVRDLIST |
| 267 | 331 | mame_printf_verbose("Para Type %d End of Strip %d List Type %d\n", paratype, endofstrip, listtype); |
| 268 | 332 | #endif |
| 269 | 333 | |
| 270 | if (((paratype == 4) && (texture == 1)) || (paratype == 5)) | |
| 334 | // set type of list currently being recieved | |
| 335 | if ((paratype == 4) || (paratype == 5) || (paratype == 6)) | |
| 271 | 336 | { |
| 337 | if (tafifo_listtype < 0) | |
| 338 | { | |
| 339 | tafifo_listtype = listtype; | |
| 340 | } | |
| 341 | } | |
| 342 | ||
| 343 | if ((paratype == 4) || (paratype == 5)) | |
| 344 | { // quad or polygon | |
| 272 | 345 | depthcomparemode=(tafifo_buff[1] >> 29) & 7; |
| 273 | 346 | cullingmode=(tafifo_buff[1] >> 27) & 3; |
| 274 | 347 | zwritedisable=(tafifo_buff[1] >> 26) & 1; |
| r1679 | r1680 | |
| 292 | 365 | sstexture=(tafifo_buff[2] >> 12) & 1; |
| 293 | 366 | mmdadjust=(tafifo_buff[2] >> 8) & 1; |
| 294 | 367 | tsinstruction=(tafifo_buff[2] >> 6) & 3; |
| 295 | textureaddress=(tafifo_buff[3] & 0x1FFFFF) << 3; | |
| 296 | scanorder=(tafifo_buff[3] >> 26) & 1; | |
| 297 | pixelformat=(tafifo_buff[3] >> 27) & 7; | |
| 298 | mipmapped=(tafifo_buff[3] >> 31) & 1; | |
| 299 | vqcompressed=(tafifo_buff[3] >> 30) & 1; | |
| 300 | strideselect=(tafifo_buff[3] >> 25) & 1; | |
| 301 | ||
| 302 | #if DEBUG_PVRDLIST | |
| 303 | mame_printf_verbose(" Texture %d x %d at %08x format %d\n", textureusize, texturevsize, (tafifo_buff[3] & 0x1FFFFF) << 3, pixelformat); | |
| 304 | #endif | |
| 368 | if (texture == 1) | |
| 369 | { | |
| 370 | textureaddress=(tafifo_buff[3] & 0x1FFFFF) << 3; | |
| 371 | scanorder=(tafifo_buff[3] >> 26) & 1; | |
| 372 | pixelformat=(tafifo_buff[3] >> 27) & 7; | |
| 373 | mipmapped=(tafifo_buff[3] >> 31) & 1; | |
| 374 | vqcompressed=(tafifo_buff[3] >> 30) & 1; | |
| 375 | strideselect=(tafifo_buff[3] >> 25) & 1; | |
| 376 | #if DEBUG_PVRDLIST | |
| 377 | mame_printf_verbose(" Texture %d x %d at %08x format %d\n", textureusize, texturevsize, (tafifo_buff[3] & 0x1FFFFF) << 3, pixelformat); | |
| 378 | #endif | |
| 379 | } | |
| 380 | if (paratype == 4) | |
| 381 | { | |
| 382 | #if DEBUG_PVRDLIST | |
| 383 | mame_printf_verbose(" Sprite\n"); | |
| 384 | #endif | |
| 385 | } | |
| 386 | if (paratype == 5) | |
| 387 | { | |
| 388 | #if DEBUG_PVRDLIST | |
| 389 | mame_printf_verbose(" Polygon\n"); | |
| 390 | #endif | |
| 391 | } | |
| 305 | 392 | } |
| 306 | 393 | |
| 307 | 394 | if (paratype == 7) |
| 308 | 395 | { // vertex |
| 309 | #if DEBUG_PVRDLIST | |
| 310 | mame_printf_verbose(" test vertex "); | |
| 311 | for (a=1; a <= 11; a++) | |
| 396 | if (global_paratype == 5) | |
| 312 | 397 | { |
| 313 | mame_printf_verbose(" %e", u2f(tafifo_buff[a])); | |
| 314 | } | |
| 315 | mame_printf_verbose("\n"); | |
| 316 | mame_printf_verbose(" %e %e %e %e %e %e\n",u2f(tafifo_buff[13] & 0xffff0000),u2f((tafifo_buff[13] & 0xffff) << 16),u2f(tafifo_buff[14] & 0xffff0000),u2f((tafifo_buff[14] & 0xffff) << 16),u2f(tafifo_buff[15] & 0xffff0000),u2f((tafifo_buff[15] & 0xffff) << 16)); | |
| 317 | #endif | |
| 398 | #if DEBUG_PVRDLIST | |
| 399 | mame_printf_verbose(" Vertex sprite"); | |
| 400 | for (a=1; a <= 11; a++) | |
| 401 | { | |
| 402 | mame_printf_verbose(" %f", u2f(tafifo_buff[a])); | |
| 403 | } | |
| 404 | mame_printf_verbose("\n"); | |
| 405 | #endif | |
| 406 | if (texture == 1) | |
| 407 | { | |
| 408 | #if DEBUG_PVRDLIST | |
| 409 | mame_printf_verbose(" %f %f %f %f %f %f\n",u2f(tafifo_buff[13] & 0xffff0000),u2f((tafifo_buff[13] & 0xffff) << 16),u2f(tafifo_buff[14] & 0xffff0000),u2f((tafifo_buff[14] & 0xffff) << 16),u2f(tafifo_buff[15] & 0xffff0000),u2f((tafifo_buff[15] & 0xffff) << 16)); | |
| 410 | #endif | |
| 318 | 411 | /* test video start */ |
| 319 | // pixely=u2f((tafifo_buff[13] & 0xffff) << 16)*1024 | |
| 320 | showsprites[testsprites_size].positionx=u2f(tafifo_buff[1]); | |
| 321 | showsprites[testsprites_size].positiony=u2f(tafifo_buff[2]); | |
| 322 | showsprites[testsprites_size].sizex=u2f(tafifo_buff[4])-u2f(tafifo_buff[1]); | |
| 323 | showsprites[testsprites_size].sizey=u2f(tafifo_buff[8])-u2f(tafifo_buff[2]); | |
| 324 | showsprites[testsprites_size].u=u2f(tafifo_buff[13] & 0xffff0000); | |
| 325 | showsprites[testsprites_size].v=u2f((tafifo_buff[13] & 0xffff) << 16); | |
| 326 | showsprites[testsprites_size].du=u2f(tafifo_buff[14] & 0xffff0000)-showsprites[testsprites_size].u; | |
| 327 | showsprites[testsprites_size].dv=u2f((tafifo_buff[15] & 0xffff) << 16)-showsprites[testsprites_size].v; | |
| 328 | showsprites[testsprites_size].textureaddress=textureaddress; | |
| 329 | showsprites[testsprites_size].texturesizex=textureusize; | |
| 330 | showsprites[testsprites_size].texturesizey=texturevsize; | |
| 331 | showsprites[testsprites_size].texturemode=scanorder; | |
| 332 | showsprites[testsprites_size].texturesizes=texturesizes; | |
| 333 | showsprites[testsprites_size].texturepf=pixelformat; | |
| 334 | testsprites_size=testsprites_size+1; | |
| 412 | showsprites[testsprites_size].positionx=u2f(tafifo_buff[1]); | |
| 413 | showsprites[testsprites_size].positiony=u2f(tafifo_buff[2]); | |
| 414 | showsprites[testsprites_size].sizex=u2f(tafifo_buff[4])-u2f(tafifo_buff[1]); | |
| 415 | showsprites[testsprites_size].sizey=u2f(tafifo_buff[8])-u2f(tafifo_buff[2]); | |
| 416 | showsprites[testsprites_size].u=u2f(tafifo_buff[13] & 0xffff0000); | |
| 417 | showsprites[testsprites_size].v=u2f((tafifo_buff[13] & 0xffff) << 16); | |
| 418 | showsprites[testsprites_size].du=u2f(tafifo_buff[14] & 0xffff0000)-showsprites[testsprites_size].u; | |
| 419 | showsprites[testsprites_size].dv=u2f((tafifo_buff[15] & 0xffff) << 16)-showsprites[testsprites_size].v; | |
| 420 | showsprites[testsprites_size].textureaddress=textureaddress; | |
| 421 | showsprites[testsprites_size].texturesizex=textureusize; | |
| 422 | showsprites[testsprites_size].texturesizey=texturevsize; | |
| 423 | showsprites[testsprites_size].texturemode=scanorder+vqcompressed*2; | |
| 424 | showsprites[testsprites_size].texturesizes=texturesizes; | |
| 425 | showsprites[testsprites_size].texturepf=pixelformat; | |
| 426 | testsprites_size=testsprites_size+1; | |
| 335 | 427 | /* test video end */ |
| 336 | } | |
| 337 | ||
| 338 | if (paratype != 7) | |
| 339 | { | |
| 340 | tafifo_vertexwords=8; | |
| 341 | } | |
| 342 | if (((paratype == 4) && ((texture == 1) || (coltype == 1))) || (paratype == 5)) | |
| 343 | { | |
| 344 | tafifo_vertexwords=16; | |
| 345 | } | |
| 346 | if ((paratype == 4) || (paratype == 5) || (paratype == 6)) | |
| 347 | { | |
| 348 | if (tafifo_listtype < 0) | |
| 428 | } | |
| 429 | } | |
| 430 | if ((tafifo_listtype == 1) || (tafifo_listtype == 3)) | |
| 349 | 431 | { |
| 350 | tafifo_listtype = listtype; | |
| 432 | #if DEBUG_PVRDLIST | |
| 433 | mame_printf_verbose(" Vertex modifier volume"); | |
| 434 | for (a=1; a <= 11; a++) | |
| 435 | { | |
| 436 | mame_printf_verbose(" %f", u2f(tafifo_buff[a])); | |
| 437 | } | |
| 438 | mame_printf_verbose("\n"); | |
| 439 | #endif | |
| 351 | 440 | } |
| 441 | if (global_paratype == 4) | |
| 442 | { | |
| 443 | #if DEBUG_PVRDLIST | |
| 444 | mame_printf_verbose(" Vertex polygon"); | |
| 445 | mame_printf_verbose("\n"); | |
| 446 | #endif | |
| 447 | } | |
| 352 | 448 | } |
| 353 | 449 | } |
| 354 | 450 | } // if (tafifo_pos == 0) |
| r1679 | r1680 | |
| 356 | 452 | |
| 357 | 453 | WRITE64_HANDLER( ta_fifo_yuv_w ) |
| 358 | 454 | { |
| 359 | mame_printf_verbose("YUV FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask); | |
| 455 | int reg; | |
| 456 | UINT64 shift; | |
| 457 | UINT32 dat; | |
| 458 | ||
| 459 | reg = decode_reg_64(offset, mem_mask, &shift); | |
| 460 | dat = (UINT32)(data >> shift); | |
| 461 | ||
| 462 | mame_printf_verbose("YUV FIFO: [%08x=%x] write %llx to %x, mask %llx\n", 0x10800000+reg*4, dat, data, offset, mem_mask); | |
| 360 | 463 | } |
| 361 | 464 | |
| 362 | 465 | /* test video start */ |
| r1679 | r1680 | |
| 414 | 517 | UINT32 *bmpaddr; |
| 415 | 518 | int c,xt,yt,cd; |
| 416 | 519 | |
| 417 | fillbitmap(bitmap, | |
| 520 | fillbitmap(bitmap,program_read_dword_64le(0x05000000+6*4),cliprect); | |
| 418 | 521 | for (cs=0;cs < testsprites_size;cs++) |
| 419 | 522 | { |
| 420 | 523 | dx=showsprites[cs].sizex; |
| r1679 | r1680 | |
| 446 | 549 | |
| 447 | 550 | if (showsprites[cs].texturemode == 1) |
| 448 | 551 | addrp=showsprites[cs].textureaddress+(showsprites[cs].texturesizex*yt+xt)*2; |
| 552 | else if (showsprites[cs].texturemode == 0) | |
| 553 | addrp=showsprites[cs].textureaddress+(dilated1[cd][xt] + dilated0[cd][yt])*2; | |
| 449 | 554 | else |
| 450 | addrp=showsprites[cs].textureaddress+(dilated1[cd][xt] + dilated0[cd][yt])*2; | |
| 555 | { | |
| 556 | c=0x800+(dilated1[cd][xt >> 1] + dilated0[cd][yt >> 1]); | |
| 557 | c=*(((UINT8 *)dc_texture_ram) + BYTE_XOR_LE(showsprites[cs].textureaddress+c)); | |
| 558 | addrp=showsprites[cs].textureaddress+c*8+(dilated1[cd][xt & 1] + dilated0[cd][yt & 1])*2; | |
| 559 | } | |
| 451 | 560 | |
| 452 | 561 | c=*(((UINT16 *)dc_texture_ram) + (WORD2_XOR_LE(addrp) >> 1)); |
| 453 | 562 | if (showsprites[cs].texturepf == 2) |
| r1679 | r1680 | |
| 468 | 577 | } |
| 469 | 578 | /* test video end */ |
| 470 | 579 | |
| 580 | static void pvr_build_parameterconfig(void) | |
| 581 | { | |
| 582 | int a,b,c,d,e,p; | |
| 583 | ||
| 584 | for (a = 0;a <= 63;a++) | |
| 585 | pvr_parameterconfig[a] = -1; | |
| 586 | p=0; | |
| 587 | // volume,col_type,texture,offset,16bit_uv | |
| 588 | for (a = 0;a <= 1;a++) | |
| 589 | for (b = 0;b <= 3;b++) | |
| 590 | for (c = 0;c <= 1;c++) | |
| 591 | if (c == 0) | |
| 592 | { | |
| 593 | for (d = 0;d <= 1;d++) | |
| 594 | for (e = 0;e <= 1;e++) | |
| 595 | pvr_parameterconfig[(a << 6) | (b << 4) | (c << 3) | (d << 2) | (e << 0)] = pvr_parconfseq[p]; | |
| 596 | p++; | |
| 597 | } | |
| 598 | else | |
| 599 | for (d = 0;d <= 1;d++) | |
| 600 | for (e = 0;e <= 1;e++) | |
| 601 | { | |
| 602 | pvr_parameterconfig[(a << 6) | (b << 4) | (c << 3) | (d << 2) | (e << 0)] = pvr_parconfseq[p]; | |
| 603 | p++; | |
| 604 | } | |
| 605 | for (a = 1;a <= 63;a++) | |
| 606 | if (pvr_parameterconfig[a] < 0) | |
| 607 | pvr_parameterconfig[a] = pvr_parameterconfig[a-1]; | |
| 608 | } | |
| 609 | ||
| 471 | 610 | VIDEO_START(dc) |
| 472 | 611 | { |
| 473 | 612 | memset(pvrctrl_regs, 0, sizeof(pvrctrl_regs)); |
| 474 | 613 | memset(pvrta_regs, 0, sizeof(pvrta_regs)); |
| 614 | pvr_build_parameterconfig(); | |
| 475 | 615 | |
| 476 | 616 | // if the next 2 registers do not have the correct values, the naomi bios will hang |
| 477 | 617 | pvrta_regs[PVRID]=0x17fd11db; |
| r1679 | r1680 | |
|---|---|---|
| 32 | 32 | tileram = (UINT16 *)auto_malloc(0x400 * sizeof(UINT16)); |
| 33 | 33 | |
| 34 | 34 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 35 | | |
| 35 | | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | WRITE8_HANDLER( mole_videoram_w ) |
| r1679 | r1680 | |
|---|---|---|
| 205 | 205 | |
| 206 | 206 | assert(taitojc_gfx_index != MAX_GFX_ELEMENTS); |
| 207 | 207 | |
| 208 | taitojc_tilemap = tilemap_create(taitojc_tile_info, tilemap_scan_rows, | |
| 208 | taitojc_tilemap = tilemap_create(taitojc_tile_info, tilemap_scan_rows, | |
| 209 | 209 | taitojc_dirty_map = auto_malloc(TAITOJC_NUM_TILES); |
| 210 | 210 | |
| 211 | 211 | tilemap_set_transparent_pen(taitojc_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 177 | 177 | |
| 178 | 178 | VIDEO_START(pitnrun) |
| 179 | 179 | { |
| 180 | fg = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 181 | bg = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32*4,32 ); | |
| 180 | fg = tilemap_create( get_tile_info1,tilemap_scan_rows,8,8,32,32 ); | |
| 181 | bg = tilemap_create( get_tile_info2,tilemap_scan_rows,8,8,32*4,32 ); | |
| 182 | 182 | tilemap_set_transparent_pen( fg, 0 ); |
| 183 | 183 | tmp_bitmap[0] = auto_bitmap_alloc(128,128,machine->screen[0].format); |
| 184 | 184 | tmp_bitmap[1] = auto_bitmap_alloc(128,128,machine->screen[0].format); |
| r1679 | r1680 | |
|---|---|---|
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | 1268 | /* create the tilemap for the text layer */ |
| 1269 | info->textmap = tilemap_create(get_text_info, tilemap_scan_rows, | |
| 1269 | info->textmap = tilemap_create(get_text_info, tilemap_scan_rows, | |
| 1270 | 1270 | |
| 1271 | 1271 | /* configure it */ |
| 1272 | 1272 | info->textmap_info.rambase = info->textram; |
| r1679 | r1680 | |
| 1282 | 1282 | for (pagenum = 0; pagenum < info->numpages; pagenum++) |
| 1283 | 1283 | { |
| 1284 | 1284 | /* each page is 64x32 */ |
| 1285 | info->tilemaps[pagenum] = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 1285 | info->tilemaps[pagenum] = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 1286 | 1286 | |
| 1287 | 1287 | /* configure the tilemap */ |
| 1288 | 1288 | info->tilemap_info[pagenum].rambase = info->tileram + pagenum * 64*32; |
| r1679 | r1680 | |
|---|---|---|
| 535 | 535 | zeus_fifo_words = 0; |
| 536 | 536 | |
| 537 | 537 | /* set the interrupt signal to indicate we can handle more */ |
| 538 | timer_adjust(int_timer, ATTOTIME_IN_NSEC(500), 0 | |
| 538 | timer_adjust_oneshot(int_timer, ATTOTIME_IN_NSEC(500), 0 | |
| 539 | 539 | break; |
| 540 | 540 | |
| 541 | 541 | case 0x20: |
| r1679 | r1680 | |
|---|---|---|
| 92 | 92 | VIDEO_START( tehkanwc ) |
| 93 | 93 | { |
| 94 | 94 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 95 | | |
| 95 | | |
| 96 | 96 | |
| 97 | 97 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 98 | | |
| 98 | | |
| 99 | 99 | |
| 100 | 100 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 101 | 101 | } |
| r1679 | r1680 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | VIDEO_START( bionicc ) |
| 95 | 95 | { |
| 96 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 97 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 98 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 96 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 97 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, 16,16,64,64); | |
| 98 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,64,64); | |
| 99 | 99 | |
| 100 | 100 | tilemap_set_transparent_pen(tx_tilemap,3); |
| 101 | 101 | tilemap_set_transmask(fg_tilemap,0,0xffff,0x8000); /* split type 0 is completely transparent in front half */ |
| r1679 | r1680 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | VIDEO_START( citycon ) |
| 63 | 63 | { |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,citycon_scan,TILEMAP_TYPE_PEN,8,8,128,32); | |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info,citycon_scan,TILEMAP_TYPE_PEN, 8,8,128,32); | |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,citycon_scan,8,8,128,32); | |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info,citycon_scan, 8,8,128,32); | |
| 66 | 66 | |
| 67 | 67 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 68 | 68 | tilemap_set_scroll_rows(fg_tilemap,32); |
| r1679 | r1680 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | VIDEO_START( suprridr ) |
| 49 | 49 | { |
| 50 | fg_tilemap = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 51 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 52 | bg_tilemap_noscroll = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 50 | fg_tilemap = tilemap_create(get_tile_info2, tilemap_scan_rows, 8,8, 32,32); | |
| 51 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 8,8, 32,32); | |
| 52 | bg_tilemap_noscroll = tilemap_create(get_tile_info, tilemap_scan_rows, 8,8, 32,32); | |
| 53 | 53 | |
| 54 | 54 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 55 | 55 | } |
| r1679 | r1680 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | tilemap_0_size0 = tilemap_create( get_tile_info_0, |
| 172 | 172 | tilemap_scan_rows, |
| 173 | ||
| 173 | ||
| 174 | 174 | 16,16, |
| 175 | 175 | 0x20, 0x80 ); |
| 176 | 176 | tilemap_0_size1 = tilemap_create( get_tile_info_0, |
| 177 | 177 | tilemap_scan_rows, |
| 178 | ||
| 178 | ||
| 179 | 179 | 16,16, |
| 180 | 180 | 0x40, 0x40 ); |
| 181 | 181 | |
| 182 | 182 | tilemap_0_size2 = tilemap_create( get_tile_info_0, |
| 183 | 183 | tilemap_scan_rows, |
| 184 | ||
| 184 | ||
| 185 | 185 | 16,16, |
| 186 | 186 | 0x80, 0x20 ); |
| 187 | 187 | |
| 188 | 188 | tilemap_0_size3 = tilemap_create( get_tile_info_0, |
| 189 | 189 | tilemap_scan_rows, |
| 190 | ||
| 190 | ||
| 191 | 191 | 16,16, |
| 192 | 192 | 0x100, 0x10 ); |
| 193 | 193 | |
| 194 | 194 | tilemap_1_size0 = tilemap_create( get_tile_info_1, |
| 195 | 195 | tilemap_scan_rows, |
| 196 | ||
| 196 | ||
| 197 | 197 | 16,16, |
| 198 | 198 | 0x20, 0x80 ); |
| 199 | 199 | |
| 200 | 200 | tilemap_1_size1 = tilemap_create( get_tile_info_1, |
| 201 | 201 | tilemap_scan_rows, |
| 202 | ||
| 202 | ||
| 203 | 203 | 16,16, |
| 204 | 204 | 0x40, 0x40 ); |
| 205 | 205 | |
| 206 | 206 | tilemap_1_size2 = tilemap_create( get_tile_info_1, |
| 207 | 207 | tilemap_scan_rows, |
| 208 | ||
| 208 | ||
| 209 | 209 | 16,16, |
| 210 | 210 | 0x80, 0x20 ); |
| 211 | 211 | |
| 212 | 212 | tilemap_1_size3 = tilemap_create( get_tile_info_1, |
| 213 | 213 | tilemap_scan_rows, |
| 214 | ||
| 214 | ||
| 215 | 215 | 16,16, |
| 216 | 216 | 0x100, 0x10 ); |
| 217 | 217 |
| r1679 | r1680 | |
|---|---|---|
| 112 | 112 | |
| 113 | 113 | VIDEO_START( bigtwin ) |
| 114 | 114 | { |
| 115 | tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 116 | fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 115 | tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 116 | fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 117 | 117 | |
| 118 | 118 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 119 | 119 | |
| r1679 | r1680 | |
| 125 | 125 | |
| 126 | 126 | VIDEO_START( wbeachvl ) |
| 127 | 127 | { |
| 128 | tx_tilemap = tilemap_create(wbeachvl_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 129 | fg_tilemap = tilemap_create(wbeachvl_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 130 | bg_tilemap = tilemap_create(wbeachvl_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 128 | tx_tilemap = tilemap_create(wbeachvl_get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 129 | fg_tilemap = tilemap_create(wbeachvl_get_fg_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 130 | bg_tilemap = tilemap_create(wbeachvl_get_bg_tile_info,tilemap_scan_rows, 16,16,64,32); | |
| 131 | 131 | |
| 132 | 132 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 133 | 133 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
| 139 | 139 | |
| 140 | 140 | VIDEO_START( excelsr ) |
| 141 | 141 | { |
| 142 | tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 143 | fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 142 | tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 143 | fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 144 | 144 | |
| 145 | 145 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 146 | 146 | |
| r1679 | r1680 | |
| 151 | 151 | |
| 152 | 152 | VIDEO_START( hotmind ) |
| 153 | 153 | { |
| 154 | tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 155 | fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 156 | bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 154 | tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows, 8, 8,64,64); | |
| 155 | fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 156 | bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 157 | 157 | |
| 158 | 158 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 159 | 159 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
| 173 | 173 | |
| 174 | 174 | VIDEO_START( hrdtimes ) |
| 175 | 175 | { |
| 176 | tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 177 | fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 178 | bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 176 | tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows, 8, 8,64,64); | |
| 177 | fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 178 | bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows, 16,16,32,32); | |
| 179 | 179 | |
| 180 | 180 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 181 | 181 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 102 | 102 | VIDEO_START(ampoker2) |
| 103 | 103 | { |
| 104 | 104 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 105 | | |
| 105 | | |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | VIDEO_START(sigma2k) |
| 109 | 109 | { |
| 110 | 110 | bg_tilemap = tilemap_create(s2k_get_bg_tile_info, tilemap_scan_rows, |
| 111 | | |
| 111 | | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | VIDEO_UPDATE(ampoker2) |
| r1679 | r1680 | |
|---|---|---|
| 133 | 133 | VIDEO_START( esd16 ) |
| 134 | 134 | { |
| 135 | 135 | esdtilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 136 | | |
| 136 | | |
| 137 | 137 | |
| 138 | 138 | esdtilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 139 | | |
| 139 | | |
| 140 | 140 | |
| 141 | 141 | /* hedpanic changes tilemap 1 to 16x16 at various times */ |
| 142 | 142 | esdtilemap_1_16x16 = tilemap_create( get_tile_info_1_16x16, tilemap_scan_rows, |
| 143 | | |
| 143 | | |
| 144 | 144 | |
| 145 | 145 | tilemap_set_scrolldx(esdtilemap_0, -0x60 + 2, -0x60 ); |
| 146 | 146 | tilemap_set_scrolldx(esdtilemap_1, -0x60 , -0x60 + 2 ); |
| r1679 | r1680 | |
|---|---|---|
| 307 | 307 | |
| 308 | 308 | VIDEO_START( pgm ) |
| 309 | 309 | { |
| 310 | pgm_tx_tilemap= tilemap_create(get_pgm_tx_tilemap_tile_info,tilemap_scan_rows, | |
| 310 | pgm_tx_tilemap= tilemap_create(get_pgm_tx_tilemap_tile_info,tilemap_scan_rows, | |
| 311 | 311 | tilemap_set_transparent_pen(pgm_tx_tilemap,15); |
| 312 | 312 | |
| 313 | pgm_bg_tilemap = tilemap_create(get_pgm_bg_tilemap_tile_info,tilemap_scan_rows, | |
| 313 | pgm_bg_tilemap = tilemap_create(get_pgm_bg_tilemap_tile_info,tilemap_scan_rows, | |
| 314 | 314 | tilemap_set_transparent_pen(pgm_bg_tilemap,31); |
| 315 | 315 | tilemap_set_scroll_rows(pgm_bg_tilemap,64*32); |
| 316 | 316 |
| r1679 | r1680 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | VIDEO_START( iqblock ) |
| 49 | 49 | { |
| 50 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 51 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,32,64, 8); | |
| 50 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 51 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,32,64, 8); | |
| 52 | 52 | |
| 53 | 53 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 54 | 54 | tilemap_set_scroll_cols(fg_tilemap,64); |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | |
| 13 | ||
| 13 | ||
| 14 | 14 | |
| 15 | static mame_bitmap *sprite_bitmap; | |
| 16 | static UINT8 ikki_flipscreen; | |
| 17 | static int punch_through_pen; | |
| 18 | ||
| 15 | 19 | PALETTE_INIT( ikki ) |
| 16 | 20 | { |
| 17 | 21 | int i; |
| 18 | 22 | |
| 19 | for (i = 0; i<256; i++) | |
| 23 | /* allocate the colortable - extra pen for the punch through pen */ | |
| 24 | machine->colortable = colortable_alloc(machine, 0x101); | |
| 25 | ||
| 26 | /* create a lookup table for the palette */ | |
| 27 | for (i = 0; i < 0x100; i++) | |
| 20 | 28 | { |
| 21 | palette_set_color_rgb(machine,i,pal4bit(color_prom[0]),pal4bit(color_prom[256]),pal4bit(color_prom[2*256])); | |
| 29 | int r = pal4bit(color_prom[i + 0x000]); | |
| 30 | int g = pal4bit(color_prom[i + 0x100]); | |
| 31 | int b = pal4bit(color_prom[i + 0x200]); | |
| 22 | 32 | |
| 23 | color_p | |
| 33 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 24 | 34 | } |
| 25 | 35 | |
| 26 | /* 256th color is not drawn on screen */ | |
| 27 | /* this is used for special transparent function */ | |
| 28 | palette_set_color(machine,256,MAKE_RGB(0,0,1)); | |
| 29 | ||
| 30 | color_prom += 2*256; | |
| 31 | ||
| 32 | 36 | /* color_prom now points to the beginning of the lookup table */ |
| 37 | color_prom += 0x300; | |
| 33 | 38 | |
| 34 | 39 | /* sprites lookup table */ |
| 35 | for (i=0; i< | |
| 40 | for (i = 0; i < 0x200; i++) | |
| 36 | 41 | { |
| 37 | int d = 255-*(color_prom++); | |
| 38 | if ( ((i % 8) == 7) && (d == 0) ) | |
| 39 | *(colortable++) = 256; /* special transparent */ | |
| 40 | else | |
| 41 | *(colortable++) = d; /* normal color */ | |
| 42 | UINT16 ctabentry = color_prom[i] ^ 0xff; | |
| 43 | ||
| 44 | if (((i & 0x07) == 0x07) && (ctabentry == 0)) | |
| 45 | { | |
| 46 | /* punch through */ | |
| 47 | punch_through_pen = i; | |
| 48 | ctabentry = 0x100; | |
| 49 | } | |
| 50 | ||
| 51 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 42 | 52 | } |
| 43 | 53 | |
| 44 | 54 | /* bg lookup table */ |
| 45 | for (i=0; i<512; i++) | |
| 46 | *(colortable++) = *(color_prom++); | |
| 47 | ||
| 55 | for (i = 0x200; i < 0x400; i++) | |
| 56 | { | |
| 57 | UINT8 ctabentry = color_prom[i]; | |
| 58 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 59 | } | |
| 48 | 60 | } |
| 49 | 61 | |
| 50 | 62 | WRITE8_HANDLER( ikki_scroll_w ) |
| r1679 | r1680 | |
| 57 | 69 | ikki_flipscreen = (data >> 2) & 1; |
| 58 | 70 | } |
| 59 | 71 | |
| 72 | ||
| 73 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) | |
| 74 | { | |
| 75 | int y; | |
| 76 | offs_t offs; | |
| 77 | ||
| 78 | fillbitmap(sprite_bitmap, punch_through_pen, cliprect); | |
| 79 | ||
| 80 | for (offs = 0; offs < 0x800; offs += 4) | |
| 81 | { | |
| 82 | int code = (spriteram[offs + 2] & 0x80) | (spriteram[offs + 1] >> 1); | |
| 83 | int color = spriteram[offs + 2] & 0x3f; | |
| 84 | ||
| 85 | int x = spriteram[offs + 3]; | |
| 86 | y = spriteram[offs + 0]; | |
| 87 | ||
| 88 | if (ikki_flipscreen) | |
| 89 | x = 240 - x; | |
| 90 | else | |
| 91 | y = 224 - y; | |
| 92 | ||
| 93 | x = x & 0xff; | |
| 94 | y = y & 0xff; | |
| 95 | ||
| 96 | if (x > 248) | |
| 97 | x = x - 256; | |
| 98 | ||
| 99 | if (y > 240) | |
| 100 | y = y - 256; | |
| 101 | ||
| 102 | drawgfx(sprite_bitmap,machine->gfx[1], | |
| 103 | code, color, | |
| 104 | ikki_flipscreen,ikki_flipscreen, | |
| 105 | x,y, | |
| 106 | cliprect, TRANSPARENCY_PENS, | |
| 107 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 108 | } | |
| 109 | ||
| 110 | /* copy the sprite bitmap into the main bitmap, skipping the transparent pixels */ | |
| 111 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 112 | { | |
| 113 | int x; | |
| 114 | ||
| 115 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) | |
| 116 | { | |
| 117 | UINT16 pen = *BITMAP_ADDR16(sprite_bitmap, y, x); | |
| 118 | ||
| 119 | if (colortable_entry_get_value(machine->colortable, pen) != 0x100) | |
| 120 | *BITMAP_ADDR16(bitmap, y, x) = pen; | |
| 121 | } | |
| 122 | } | |
| 123 | } | |
| 124 | ||
| 125 | ||
| 126 | VIDEO_START( ikki ) | |
| 127 | { | |
| 128 | sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 129 | } | |
| 130 | ||
| 131 | ||
| 60 | 132 | VIDEO_UPDATE( ikki ) |
| 61 | 133 | { |
| 62 | ||
| 63 | int offs,chr,col,px,py,f,bank,d; | |
| 134 | offs_t offs; | |
| 64 | 135 | UINT8 *VIDEOATTR = memory_region( REGION_USER1 ); |
| 65 | 136 | |
| 66 | f = ikki_flipscreen; | |
| 67 | ||
| 68 | 137 | /* draw bg layer */ |
| 69 | 138 | |
| 70 | 139 | for (offs=0; offs<(videoram_size/2); offs++) |
| 71 | 140 | { |
| 72 | int | |
| 141 | int color, bank; | |
| 73 | 142 | |
| 74 | sx = offs / 32; | |
| 75 | sy = offs % 32; | |
| 143 | int sx = offs / 32; | |
| 144 | int sy = offs % 32; | |
| 145 | int y = sy*8; | |
| 146 | int x = sx*8; | |
| 76 | 147 | |
| 77 | py = sy*8; | |
| 78 | px = sx*8; | |
| 148 | int d = VIDEOATTR[ sx ]; | |
| 79 | 149 | |
| 80 | d = VIDEOATTR[ sx ]; | |
| 81 | ||
| 82 | 150 | switch (d) |
| 83 | 151 | { |
| 84 | 152 | case 0x02: /* scroll area */ |
| 85 | px = sx*8 - ikki_scroll[1]; | |
| 86 | if (px<0) | |
| 87 | px=px+8*22; | |
| 88 | py = (sy*8 + ~ikki_scroll[0]) & 0xff; | |
| 153 | x = sx*8 - ikki_scroll[1]; | |
| 154 | if (x<0) | |
| 155 | x=x+8*22; | |
| 156 | y = (sy*8 + ~ikki_scroll[0]) & 0xff; | |
| 89 | 157 | break; |
| 90 | 158 | |
| 91 | 159 | case 0x03: /* non-scroll area */ |
| r1679 | r1680 | |
| 104 | 172 | break; |
| 105 | 173 | } |
| 106 | 174 | |
| 107 | if (f | |
| 175 | if (ikki_flipscreen) | |
| 108 | 176 | { |
| 109 | px = 248-px; | |
| 110 | py = 248-py; | |
| 177 | x = 248-x; | |
| 178 | y = 248-y; | |
| 111 | 179 | } |
| 112 | 180 | |
| 113 | col = videoram[offs*2]; | |
| 114 | bank = (col & 0xe0) << 3; | |
| 115 | col = ((col & 0x1f)<<0) | ((col & 0x80) >> 2); | |
| 181 | color = videoram[offs*2]; | |
| 182 | bank = (color & 0xe0) << 3; | |
| 183 | color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); | |
| 116 | 184 | |
| 117 | 185 | drawgfx(bitmap,machine->gfx[0], |
| 118 | 186 | videoram[offs*2+1] + bank, |
| 119 | col, | |
| 120 | f,f, | |
| 121 | px,py, | |
| 187 | color, | |
| 188 | ikki_flipscreen,ikki_flipscreen, | |
| 189 | x,y, | |
| 122 | 190 | cliprect,TRANSPARENCY_NONE,0); |
| 123 | 191 | } |
| 124 | 192 | |
| 125 | ||
| 193 | | |
| 126 | 194 | |
| 127 | fillbitmap(tmpbitmap, machine->pens[256], 0); | |
| 128 | ||
| 129 | /* c060 - c0ff */ | |
| 130 | for (offs=0x00; offs<0x800; offs +=4) | |
| 131 | { | |
| 132 | chr = spriteram[offs+1] >> 1 ; | |
| 133 | col = spriteram[offs+2]; | |
| 134 | ||
| 135 | px = spriteram[offs+3]; | |
| 136 | py = spriteram[offs+0]; | |
| 137 | ||
| 138 | chr += (col & 0x80); | |
| 139 | col = (col & 0x3f) >> 0 ; | |
| 140 | ||
| 141 | if (f==0) | |
| 142 | py = 224-py; | |
| 143 | else | |
| 144 | px = 240-px; | |
| 145 | ||
| 146 | px = px & 0xff; | |
| 147 | py = py & 0xff; | |
| 148 | ||
| 149 | if (px>248) | |
| 150 | px = px-256; | |
| 151 | if (py>240) | |
| 152 | py = py-256; | |
| 153 | ||
| 154 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 155 | chr, | |
| 156 | col, | |
| 157 | f,f, | |
| 158 | px,py, | |
| 159 | cliprect,TRANSPARENCY_COLOR,0); | |
| 160 | } | |
| 161 | ||
| 162 | copybitmap_trans(bitmap,tmpbitmap,0,0,0,0,cliprect,machine->pens[256]); | |
| 163 | ||
| 164 | ||
| 165 | 195 | /* mask sprites */ |
| 166 | 196 | |
| 167 | 197 | for (offs=0; offs<(videoram_size/2); offs++) |
| 168 | 198 | { |
| 169 | int sx,sy; | |
| 199 | int sx = offs / 32; | |
| 200 | int sy = offs % 32; | |
| 170 | 201 | |
| 171 | sx = offs / 32; | |
| 172 | sy = offs % 32; | |
| 202 | int d = VIDEOATTR[ sx ]; | |
| 173 | 203 | |
| 174 | d = VIDEOATTR[ sx ]; | |
| 175 | ||
| 176 | 204 | if ( (d == 0) || (d == 0x0d) ) |
| 177 | 205 | { |
| 178 | py = sy*8; | |
| 179 | px = sx*8; | |
| 206 | int color, bank; | |
| 180 | 207 | |
| 181 | if (f != 0) | |
| 208 | int y = sy*8; | |
| 209 | int x = sx*8; | |
| 210 | ||
| 211 | if (ikki_flipscreen) | |
| 182 | 212 | { |
| 183 | px = 248-px; | |
| 184 | py = 248-py; | |
| 213 | x = 248-x; | |
| 214 | y = 248-y; | |
| 185 | 215 | } |
| 186 | 216 | |
| 187 | col = videoram[offs*2]; | |
| 188 | bank = (col & 0xe0) << 3; | |
| 189 | col = ((col & 0x1f)<<0) | ((col & 0x80) >> 2); | |
| 217 | color = videoram[offs*2]; | |
| 218 | bank = (color & 0xe0) << 3; | |
| 219 | color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); | |
| 190 | 220 | |
| 191 | 221 | drawgfx(bitmap,machine->gfx[0], |
| 192 | 222 | videoram[offs*2+1] + bank, |
| 193 | col, | |
| 194 | f,f, | |
| 195 | px,py, | |
| 223 | color, | |
| 224 | ikki_flipscreen,ikki_flipscreen, | |
| 225 | x,y, | |
| 196 | 226 | cliprect,TRANSPARENCY_NONE,0); |
| 197 | 227 | } |
| 198 | 228 | } |
| r1679 | r1680 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | VIDEO_START( darius ) |
| 47 | 47 | { |
| 48 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 48 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 49 | 49 | |
| 50 | 50 | spritelist = auto_malloc(0x800 * sizeof(*spritelist)); |
| 51 | 51 |
| r1679 | r1680 | |
|---|---|---|
| 48 | 48 | cbasebal_textram = auto_malloc(0x1000); |
| 49 | 49 | cbasebal_scrollram = auto_malloc(0x1000); |
| 50 | 50 | |
| 51 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 52 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 51 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,64,32); | |
| 52 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 53 | 53 | |
| 54 | 54 | tilemap_set_transparent_pen(fg_tilemap,3); |
| 55 | 55 | } |
| r1679 | r1680 | |
|---|---|---|
| 125 | 125 | VIDEO_START( sbasketb ) |
| 126 | 126 | { |
| 127 | 127 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 128 | | |
| 128 | | |
| 129 | 129 | |
| 130 | 130 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 131 | 131 | } |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "de | |
| 10 | #include "video/mc6845.h" | |
| 11 | 11 | #include "qix.h" |
| 12 | #include "video/crtc6845.h" | |
| 13 | 12 | |
| 14 | 13 | |
| 15 | /* Constants */ | |
| 16 | #define SCANLINE_INCREMENT 1 | |
| 17 | ||
| 18 | ||
| 19 | 14 | /* Globals */ |
| 20 | 15 | UINT8 *qix_videoaddress; |
| 21 | 16 | UINT8 qix_cocktail_flip; |
| 22 | 17 | |
| 23 | 18 | |
| 24 | 19 | /* Local variables */ |
| 20 | static mc6845_t *mc6845; | |
| 25 | 21 | static UINT8 vram_mask; |
| 26 | 22 | static UINT8 qix_palettebank; |
| 27 | 23 | static UINT8 leds; |
| 28 | static emu_timer *scanline_timer; | |
| 29 | 24 | static UINT8 scanline_latch; |
| 30 | 25 | |
| 31 | 26 | |
| r1679 | r1680 | |
| 38 | 33 | |
| 39 | 34 | static void qix_display_enable_changed(int display_enabled); |
| 40 | 35 | |
| 41 | static | |
| 36 | static void *qix_begin_update(mame_bitmap *bitmap, const rectangl | |
| 42 | 37 | |
| 43 | static void *qix_begin_update(running_machine *machine, | |
| 44 | int screen, | |
| 45 | mame_bitmap *bitmap, | |
| 46 | const rectangle *cliprect); | |
| 47 | ||
| 48 | 38 | static void qix_update_row(mame_bitmap *bitmap, |
| 49 | 39 | const rectangle *cliprect, |
| 50 | 40 | UINT16 ma, |
| r1679 | r1680 | |
| 61 | 51 | * |
| 62 | 52 | *************************************/ |
| 63 | 53 | |
| 64 | static const c | |
| 54 | static const mc | |
| 65 | 55 | { |
| 66 | 56 | 0, /* screen we are acting on */ |
| 67 | 57 | QIX_CHARACTER_CLOCK, /* the clock (pin 21) of the chip */ |
| r1679 | r1680 | |
| 76 | 66 | VIDEO_START( qix ) |
| 77 | 67 | { |
| 78 | 68 | /* configure the CRT controller */ |
| 79 | c | |
| 69 | mc6845 = mc6845_config( | |
| 80 | 70 | |
| 81 | 71 | /* allocate memory for the full video RAM */ |
| 82 | 72 | videoram = auto_malloc(256 * 256); |
| r1679 | r1680 | |
| 84 | 74 | /* initialize the mask for games that don't use it */ |
| 85 | 75 | vram_mask = 0xff; |
| 86 | 76 | |
| 87 | /* allocate a timer */ | |
| 88 | scanline_timer = timer_alloc(scanline_callback, NULL); | |
| 89 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1, attotime_zero); | |
| 90 | ||
| 91 | 77 | /* set up save states */ |
| 92 | 78 | state_save_register_global_pointer(videoram, 256 * 256); |
| 93 | 79 | state_save_register_global(qix_cocktail_flip); |
| r1679 | r1680 | |
| 100 | 86 | |
| 101 | 87 | /************************************* |
| 102 | 88 | * |
| 103 | * Scanline caching | |
| 104 | * | |
| 105 | *************************************/ | |
| 106 | ||
| 107 | static TIMER_CALLBACK( scanline_callback ) | |
| 108 | { | |
| 109 | int scanline = param; | |
| 110 | ||
| 111 | /* force a partial update */ | |
| 112 | video_screen_update_partial(0, scanline - 1); | |
| 113 | ||
| 114 | /* set a timer for the next increment */ | |
| 115 | scanline += SCANLINE_INCREMENT; | |
| 116 | if (scanline > machine->screen[0].visarea.max_y) | |
| 117 | scanline = SCANLINE_INCREMENT; | |
| 118 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero); | |
| 119 | } | |
| 120 | ||
| 121 | ||
| 122 | ||
| 123 | /************************************* | |
| 124 | * | |
| 125 | 89 | * Current scanline read |
| 126 | 90 | * |
| 127 | 91 | *************************************/ |
| r1679 | r1680 | |
| 131 | 95 | /* on the rising edge, latch the scanline */ |
| 132 | 96 | if (display_enabled) |
| 133 | 97 | { |
| 134 | UINT16 ma = crtc6845_get_ma(0); | |
| 135 | UINT8 ra = crtc6845_get_ra(0); | |
| 98 | UINT16 ma = mc6845_get_ma(mc6845); | |
| 99 | UINT8 ra = mc6845_get_ra(mc6845); | |
| 136 | 100 | |
| 137 | 101 | /* RA0-RA2 goes to D0-D2 and MA5-MA9 goes to D3-D7 */ |
| 138 | 102 | scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07); |
| r1679 | r1680 | |
| 188 | 152 | |
| 189 | 153 | WRITE8_HANDLER( qix_videoram_w ) |
| 190 | 154 | { |
| 155 | /* update the screen in case the game is writing "behind" the beam - | |
| 156 | Zookeeper likes to do this */ | |
| 157 | video_screen_update_partial(0, video_screen_get_vpos(0) - 1); | |
| 158 | ||
| 191 | 159 | /* add in the upper bit of the address latch */ |
| 192 | 160 | offset += (qix_videoaddress[0] & 0x80) << 8; |
| 193 | 161 | |
| r1679 | r1680 | |
| 238 | 206 | * |
| 239 | 207 | *************************************/ |
| 240 | 208 | |
| 209 | #define NUM_PENS (0x100) | |
| 210 | ||
| 211 | ||
| 241 | 212 | WRITE8_HANDLER( qix_paletteram_w ) |
| 242 | 213 | { |
| 214 | UINT8 old_data = paletteram[offset]; | |
| 215 | ||
| 216 | /* set the palette RAM value */ | |
| 217 | paletteram[offset] = data; | |
| 218 | ||
| 219 | /* trigger an update if a currently visible pen has changed */ | |
| 220 | if (((offset >> 8) == qix_palettebank) && | |
| 221 | (old_data != data)) | |
| 222 | video_screen_update_partial(0, video_screen_get_vpos(0) - 1); | |
| 223 | } | |
| 224 | ||
| 225 | ||
| 226 | WRITE8_HANDLER( qix_palettebank_w ) | |
| 227 | { | |
| 228 | /* set the bank value */ | |
| 229 | if (qix_palettebank != (data & 3)) | |
| 230 | { | |
| 231 | video_screen_update_partial(0, video_screen_get_vpos(0) - 1); | |
| 232 | qix_palettebank = data & 3; | |
| 233 | } | |
| 234 | ||
| 235 | /* LEDs are in the upper 6 bits */ | |
| 236 | leds = ~data & 0xfc; | |
| 237 | } | |
| 238 | ||
| 239 | ||
| 240 | static void get_pens(pen_t *pens) | |
| 241 | { | |
| 242 | offs_t offs; | |
| 243 | ||
| 243 | 244 | /* this conversion table should be about right. It gives a reasonable */ |
| 244 | 245 | /* gray scale in the test screen, and the red, green and blue squares */ |
| 245 | 246 | /* in the same screen are barely visible, as the manual requires. */ |
| r1679 | r1680 | |
| 262 | 263 | 0xb6, /* value = 3, intensity = 2 */ |
| 263 | 264 | 0xff /* value = 3, intensity = 3 */ |
| 264 | 265 | }; |
| 265 | int bits, intensity, red, green, blue; | |
| 266 | 266 | |
| 267 | /* set the palette RAM value */ | |
| 268 | paletteram[offset] = data; | |
| 267 | for (offs = qix_palettebank << 8; offs < (qix_palettebank << 8) + NUM_PENS; offs++) | |
| 268 | { | |
| 269 | int bits, intensity, r, g, b; | |
| 269 | 270 | |
| 270 | /* compute R, G, B from the table */ | |
| 271 | intensity = (data >> 0) & 0x03; | |
| 272 | bits = (data >> 6) & 0x03; | |
| 273 | red = table[(bits << 2) | intensity]; | |
| 274 | bits = (data >> 4) & 0x03; | |
| 275 | green = table[(bits << 2) | intensity]; | |
| 276 | bits = (data >> 2) & 0x03; | |
| 277 | blue = table[(bits << 2) | intensity]; | |
| 271 | UINT8 data = paletteram[offs]; | |
| 278 | 272 | |
| 279 | /* update the palette */ | |
| 280 | palette_set_color(Machine, offset, MAKE_RGB(red, green, blue)); | |
| 273 | /* compute R, G, B from the table */ | |
| 274 | intensity = (data >> 0) & 0x03; | |
| 275 | bits = (data >> 6) & 0x03; | |
| 276 | r = table[(bits << 2) | intensity]; | |
| 277 | bits = (data >> 4) & 0x03; | |
| 278 | g = table[(bits << 2) | intensity]; | |
| 279 | bits = (data >> 2) & 0x03; | |
| 280 | b = table[(bits << 2) | intensity]; | |
| 281 | ||
| 282 | /* update the palette */ | |
| 283 | pens[offs & 0xff] = MAKE_RGB(r, g, b); | |
| 284 | } | |
| 281 | 285 | } |
| 282 | 286 | |
| 283 | 287 | |
| 284 | WRITE8_HANDLER( qix_palettebank_w ) | |
| 288 | ||
| 289 | /************************************* | |
| 290 | * | |
| 291 | * M6845 access | |
| 292 | * | |
| 293 | *************************************/ | |
| 294 | ||
| 295 | WRITE8_HANDLER( qix_mc6845_address_w ) | |
| 285 | 296 | { |
| 286 | /* set the bank value */ | |
| 287 | if (qix_palettebank != (data & 3)) | |
| 288 | { | |
| 289 | video_screen_update_partial(0, video_screen_get_vpos(0) - 1); | |
| 290 | qix_palettebank = data & 3; | |
| 291 | } | |
| 297 | mc6845_address_w(mc6845, data); | |
| 298 | } | |
| 292 | 299 | |
| 293 | /* LEDs are in the upper 6 bits */ | |
| 294 | leds = ~data & 0xfc; | |
| 300 | ||
| 301 | READ8_HANDLER( qix_mc6845_register_r ) | |
| 302 | { | |
| 303 | return mc6845_register_r(mc6845); | |
| 295 | 304 | } |
| 296 | 305 | |
| 297 | 306 | |
| 307 | WRITE8_HANDLER( qix_mc6845_register_w ) | |
| 308 | { | |
| 309 | mc6845_register_w(mc6845, data); | |
| 310 | } | |
| 298 | 311 | |
| 312 | ||
| 313 | ||
| 299 | 314 | /************************************* |
| 300 | 315 | * |
| 301 | * | |
| 316 | * M6845 callbacks for updating | |
| 302 | 317 | * the screen |
| 303 | 318 | * |
| 304 | 319 | *************************************/ |
| 305 | 320 | |
| 306 | static void *qix_begin_update(running_machine *machine, int screen, | |
| 307 | mame_bitmap *bitmap, const rectangle *cliprect) | |
| 321 | static void *qix_begin_update(mame_bitmap *bitmap, const rectangle *cliprect) | |
| 308 | 322 | { |
| 309 | 323 | #if 0 |
| 310 | 324 | // note the confusing bit order! |
| 311 | 325 | popmessage("self test leds: %d%d %d%d%d%d",BIT(leds,7),BIT(leds,5),BIT(leds,6),BIT(leds,4),BIT(leds,2),BIT(leds,3)); |
| 312 | 326 | #endif |
| 313 | 327 | |
| 314 | /* return the pens we are going to use to update the display */ | |
| 315 | return (void *)&machine->pens[qix_palettebank * 256]; | |
| 328 | /* create the pens */ | |
| 329 | static pen_t pens[NUM_PENS]; | |
| 330 | ||
| 331 | get_pens(pens); | |
| 332 | ||
| 333 | return pens; | |
| 316 | 334 | } |
| 317 | 335 | |
| 318 | 336 | |
| r1679 | r1680 | |
| 333 | 351 | |
| 334 | 352 | draw_scanline8(bitmap, 0, y, x_count * 8, scanline, pens, -1); |
| 335 | 353 | } |
| 354 | ||
| 355 | ||
| 356 | ||
| 357 | /************************************* | |
| 358 | * | |
| 359 | * Standard video update | |
| 360 | * | |
| 361 | *************************************/ | |
| 362 | ||
| 363 | VIDEO_UPDATE( qix ) | |
| 364 | { | |
| 365 | mc6845_update(mc6845, bitmap, cliprect); | |
| 366 | ||
| 367 | return 0; | |
| 368 | } |
| r1679 | r1680 | |
|---|---|---|
| 100 | 100 | |
| 101 | 101 | VIDEO_START(ksayakyu) |
| 102 | 102 | { |
| 103 | ksayakyu_tilemap = tilemap_create(get_ksayakyu_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32*8); | |
| 104 | ksayakyu_textmap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 103 | ksayakyu_tilemap = tilemap_create(get_ksayakyu_tile_info,tilemap_scan_rows, 8, 8,32,32*8); | |
| 104 | ksayakyu_textmap = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 105 | 105 | tilemap_set_transparent_pen(ksayakyu_textmap,0); |
| 106 | 106 | } |
| 107 | 107 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | UINT8 *ironhors_scroll; |
| 12 | 13 | static int palettebank, charbank, spriterambank; |
| r1679 | r1680 | |
| 17 | 18 | |
| 18 | 19 | Convert the color PROMs into a more useable format. |
| 19 | 20 | |
| 20 | Iron Horse has three 256x4 palette PROMs (one per gun) and two 256x4 | |
| 21 | lookup table PROMs (one for characters, one for sprites). | |
| 22 | I don't know for sure how the palette PROMs are connected to the RGB | |
| 23 | output, but it's probably the usual: | |
| 24 | ||
| 25 | bit 3 -- 220 ohm resistor -- RED/GREEN/BLUE | |
| 26 | -- 470 ohm resistor -- RED/GREEN/BLUE | |
| 27 | -- 1 kohm resistor -- RED/GREEN/BLUE | |
| 28 | bit 0 -- 2.2kohm resistor -- RED/GREEN/BLUE | |
| 29 | ||
| 30 | 21 | ***************************************************************************/ |
| 31 | 22 | PALETTE_INIT( ironhors ) |
| 32 | 23 | { |
| 24 | static const int resistances[4] = { 2000, 1000, 470, 220 }; | |
| 25 | double rweights[4], gweights[4], bweights[4]; | |
| 33 | 26 | int i; |
| 34 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 35 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 36 | 27 | |
| 28 | /* compute the color output resistor weights */ | |
| 29 | compute_resistor_weights(0, 255, -1.0, | |
| 30 | 4, resistances, rweights, 1000, 0, | |
| 31 | 4, resistances, gweights, 1000, 0, | |
| 32 | 4, resistances, bweights, 1000, 0); | |
| 37 | 33 | |
| 38 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 34 | /* allocate the colortable */ | |
| 35 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 36 | ||
| 37 | /* create a lookup table for the palette */ | |
| 38 | for (i = 0; i < 0x100; i++) | |
| 39 | 39 | { |
| 40 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 40 | int bit0, bit1, bit2, bit3; | |
| 41 | int r, g, b; | |
| 41 | 42 | |
| 43 | /* red component */ | |
| 44 | bit0 = (color_prom[i + 0x000] >> 0) & 0x01; | |
| 45 | bit1 = (color_prom[i + 0x000] >> 1) & 0x01; | |
| 46 | bit2 = (color_prom[i + 0x000] >> 2) & 0x01; | |
| 47 | bit3 = (color_prom[i + 0x000] >> 3) & 0x01; | |
| 48 | r = combine_4_weights(rweights, bit0, bit1, bit2, bit3); | |
| 42 | 49 | |
| 43 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 44 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 45 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 46 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 47 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 48 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 49 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 50 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 51 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 52 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 53 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 54 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 55 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 56 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 57 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 50 | /* green component */ | |
| 51 | bit0 = (color_prom[i + 0x100] >> 0) & 0x01; | |
| 52 | bit1 = (color_prom[i + 0x100] >> 1) & 0x01; | |
| 53 | bit2 = (color_prom[i + 0x100] >> 2) & 0x01; | |
| 54 | bit3 = (color_prom[i + 0x100] >> 3) & 0x01; | |
| 55 | g = combine_4_weights(gweights, bit0, bit1, bit2, bit3); | |
| 58 | 56 | |
| 59 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 60 | color_prom++; | |
| 57 | /* blue component */ | |
| 58 | bit0 = (color_prom[i + 0x200] >> 0) & 0x01; | |
| 59 | bit1 = (color_prom[i + 0x200] >> 1) & 0x01; | |
| 60 | bit2 = (color_prom[i + 0x200] >> 2) & 0x01; | |
| 61 | bit3 = (color_prom[i + 0x200] >> 3) & 0x01; | |
| 62 | b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); | |
| 63 | ||
| 64 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 61 | 65 | } |
| 62 | 66 | |
| 63 | color_prom += 2*machine->drv->total_colors; | |
| 64 | /* color_prom now points to the beginning of the character lookup table */ | |
| 67 | /* color_prom now points to the beginning of the lookup table,*/ | |
| 68 | color_prom += 0x300; | |
| 65 | 69 | |
| 66 | ||
| 67 | /* there are eight 32 colors palette banks; sprites use colors 0-15 and */ | |
| 68 | /* characters 16-31 of each bank. */ | |
| 69 | for (i = 0;i < TOTAL_COLORS(0)/8;i++) | |
| 70 | /* characters use colors 0x10-0x1f of each 0x20 color bank, | |
| 71 | while sprites use colors 0-0x0f */ | |
| 72 | for (i = 0; i < 0x200; i++) | |
| 70 | 73 | { |
| 71 | 74 | int j; |
| 72 | 75 | |
| 73 | ||
| 74 | for (j = 0;j < 8;j++) | |
| 75 | COLOR(0,i + j * TOTAL_COLORS(0)/8) = (*color_prom & 0x0f) + 32 * j + 16; | |
| 76 | ||
| 77 | color_prom++; | |
| 76 | for (j = 0; j < 8; j++) | |
| 77 | { | |
| 78 | UINT8 ctabentry = (j << 5) | ((~i & 0x100) >> 4) | (color_prom[i] & 0x0f); | |
| 79 | colortable_entry_set_value(machine->colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); | |
| 80 | } | |
| 78 | 81 | } |
| 79 | ||
| 80 | for (i = 0;i < TOTAL_COLORS(1)/8;i++) | |
| 81 | { | |
| 82 | int j; | |
| 83 | ||
| 84 | ||
| 85 | for (j = 0;j < 8;j++) | |
| 86 | COLOR(1,i + j * TOTAL_COLORS(1)/8) = (*color_prom & 0x0f) + 32 * j; | |
| 87 | ||
| 88 | color_prom++; | |
| 89 | } | |
| 90 | 82 | } |
| 91 | 83 | |
| 92 | 84 | WRITE8_HANDLER( ironhors_videoram_w ) |
| r1679 | r1680 | |
| 155 | 147 | VIDEO_START( ironhors ) |
| 156 | 148 | { |
| 157 | 149 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 158 | | |
| 150 | | |
| 159 | 151 | |
| 160 | 152 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 161 | 153 | } |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | VIDEO_START( battlex ) |
| 80 | 80 | { |
| 81 | 81 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 82 | | |
| 82 | | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
|---|---|---|
| 84 | 84 | }; |
| 85 | 85 | |
| 86 | 86 | /* initialize the playfield */ |
| 87 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 87 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 88 | 88 | |
| 89 | 89 | /* initialize the motion objects */ |
| 90 | 90 | atarimo_init(machine, 0, &modesc); |
| 91 | 91 | |
| 92 | 92 | /* initialize the alphanumerics */ |
| 93 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 93 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 94 | 94 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 95 | 95 | } |
| 96 | 96 |
| r1679 | r1680 | |
|---|---|---|
| 132 | 132 | |
| 133 | 133 | VIDEO_START( glass ) |
| 134 | 134 | { |
| 135 | pant[0] = tilemap_create(get_tile_info_glass_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 136 | pant[1] = tilemap_create(get_tile_info_glass_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 135 | pant[0] = tilemap_create(get_tile_info_glass_screen0,tilemap_scan_rows,16,16,32,32); | |
| 136 | pant[1] = tilemap_create(get_tile_info_glass_screen1,tilemap_scan_rows,16,16,32,32); | |
| 137 | 137 | screen_bitmap = auto_bitmap_alloc (320, 200, machine->screen[0].format); |
| 138 | 138 | |
| 139 | 139 | tilemap_set_transparent_pen(pant[0],0); |
| r1679 | r1680 | |
|---|---|---|
| 251 | 251 | |
| 252 | 252 | VIDEO_START( mcatadv ) |
| 253 | 253 | { |
| 254 | mcatadv_tilemap1 = tilemap_create(get_mcatadv_tile_info1,tilemap_scan_rows, | |
| 254 | mcatadv_tilemap1 = tilemap_create(get_mcatadv_tile_info1,tilemap_scan_rows, | |
| 255 | 255 | tilemap_set_transparent_pen(mcatadv_tilemap1,0); |
| 256 | 256 | |
| 257 | mcatadv_tilemap2 = tilemap_create(get_mcatadv_tile_info2,tilemap_scan_rows, | |
| 257 | mcatadv_tilemap2 = tilemap_create(get_mcatadv_tile_info2,tilemap_scan_rows, | |
| 258 | 258 | tilemap_set_transparent_pen(mcatadv_tilemap2,0); |
| 259 | 259 | |
| 260 | 260 | spriteram_old = auto_malloc(spriteram_size); |
| r1679 | r1680 | |
|---|---|---|
| 406 | 406 | ***************************************************************************/ |
| 407 | 407 | static void create_tilemaps_0(void) |
| 408 | 408 | { |
| 409 | top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 410 | fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 411 | bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 409 | top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 410 | fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 411 | bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 412 | 412 | |
| 413 | 413 | tilemap_set_transparent_pen(top_tilemap[0],0); |
| 414 | 414 | tilemap_set_transparent_pen(fg_tilemap[0],0); |
| r1679 | r1680 | |
| 417 | 417 | |
| 418 | 418 | static void create_tilemaps_1(void) |
| 419 | 419 | { |
| 420 | top_tilemap[1] = tilemap_create(get_top1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 421 | fg_tilemap[1] = tilemap_create(get_fg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 422 | bg_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 420 | top_tilemap[1] = tilemap_create(get_top1_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 421 | fg_tilemap[1] = tilemap_create(get_fg1_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 422 | bg_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 423 | 423 | |
| 424 | 424 | tilemap_set_transparent_pen(top_tilemap[1],0); |
| 425 | 425 | tilemap_set_transparent_pen(fg_tilemap[1],0); |
| r1679 | r1680 | |
| 428 | 428 | |
| 429 | 429 | static void truxton2_create_tilemaps_0(void) |
| 430 | 430 | { |
| 431 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 432 | top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 433 | fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 434 | bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 431 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 432 | top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 433 | fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 434 | bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 435 | 435 | |
| 436 | 436 | tilemap_set_scroll_rows(tx_tilemap,8*32); /* line scrolling */ |
| 437 | 437 | tilemap_set_scroll_cols(tx_tilemap,1); |
| r1679 | r1680 | |
| 444 | 444 | |
| 445 | 445 | static void batrider_create_tilemaps_0(void) |
| 446 | 446 | { |
| 447 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 448 | top_tilemap[0] = tilemap_create(batrider_get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 449 | fg_tilemap[0] = tilemap_create(batrider_get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 450 | bg_tilemap[0] = tilemap_create(batrider_get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 447 | tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 448 | top_tilemap[0] = tilemap_create(batrider_get_top0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 449 | fg_tilemap[0] = tilemap_create(batrider_get_fg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 450 | bg_tilemap[0] = tilemap_create(batrider_get_bg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 451 | 451 | |
| 452 | 452 | tilemap_set_scroll_rows(tx_tilemap,8*32); /* line scrolling */ |
| 453 | 453 | tilemap_set_scroll_cols(tx_tilemap,1); |
| r1679 | r1680 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | VIDEO_START( mjkjidai ) |
| 34 | 34 | { |
| 35 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 35 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | PALETTE_INIT( jailbrek ) |
| 9 | 9 | { |
| 10 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 11 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 12 | 10 | int i; |
| 13 | 11 | |
| 14 | for ( i = 0; i < machine->drv->total_colors; i++ ) | |
| 12 | /* allocate the colortable */ | |
| 13 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 14 | ||
| 15 | /* create a lookup table for the palette */ | |
| 16 | for (i = 0; i < 0x20; i++) | |
| 15 | 17 | { |
| 16 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 18 | int r = pal4bit(color_prom[i + 0x00] >> 0); | |
| 19 | int g = pal4bit(color_prom[i + 0x00] >> 4); | |
| 20 | int b = pal4bit(color_prom[i + 0x20] >> 0); | |
| 17 | 21 | |
| 22 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 23 | } | |
| 18 | 24 | |
| 19 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 20 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 21 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 22 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 23 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 25 | /* color_prom now points to the beginning of the lookup table */ | |
| 26 | color_prom += 0x40; | |
| 24 | 27 | |
| 25 | bit0 = (color_prom[0] >> 4) & 0x01; | |
| 26 | bit1 = (color_prom[0] >> 5) & 0x01; | |
| 27 | bit2 = (color_prom[0] >> 6) & 0x01; | |
| 28 | bit3 = (color_prom[0] >> 7) & 0x01; | |
| 29 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 30 | ||
| 31 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 32 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 33 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 34 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 35 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 36 | ||
| 37 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 38 | color_prom++; | |
| 28 | for (i = 0; i < 0x100; i++) | |
| 29 | { | |
| 30 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 31 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 39 | 32 | } |
| 40 | 33 | |
| 41 | color_prom += machine->drv->total_colors; | |
| 42 | ||
| 43 | for ( i = 0; i < TOTAL_COLORS(0); i++ ) | |
| 44 | COLOR(0,i) = ( *color_prom++ ) + 0x10; | |
| 45 | ||
| 46 | for ( i = 0; i < TOTAL_COLORS(1); i++ ) | |
| 47 | COLOR(1,i) = *color_prom++; | |
| 34 | for (i = 0x100; i < 0x200; i++) | |
| 35 | { | |
| 36 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 37 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 38 | } | |
| 48 | 39 | } |
| 49 | 40 | |
| 50 | 41 | WRITE8_HANDLER( jailbrek_videoram_w ) |
| r1679 | r1680 | |
| 71 | 62 | VIDEO_START( jailbrek ) |
| 72 | 63 | { |
| 73 | 64 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 74 | | |
| 65 | | |
| 75 | 66 | tilemap_set_scrolldx(bg_tilemap, 0, 396 - 256); |
| 76 | 67 | } |
| 77 | 68 | |
| r1679 | r1680 | |
| 98 | 89 | } |
| 99 | 90 | |
| 100 | 91 | drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, |
| 101 | sx, sy, cliprect, TRANSPARENCY_COLOR, 0); | |
| 92 | sx, sy, cliprect, TRANSPARENCY_PENS, | |
| 93 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 102 | 94 | } |
| 103 | 95 | } |
| 104 | 96 | |
| r1679 | r1680 | |
| 115 | 107 | tilemap_set_scrollx(bg_tilemap, 0, 0); |
| 116 | 108 | |
| 117 | 109 | for (i = 0; i < 32; i++) |
| 118 | { | |
| 119 | 110 | tilemap_set_scrolly(bg_tilemap, i, ((jailbrek_scroll_x[i + 32] << 8) + jailbrek_scroll_x[i])); |
| 120 | } | |
| 121 | 111 | } |
| 122 | 112 | else |
| 123 | 113 | { |
| r1679 | r1680 | |
| 126 | 116 | tilemap_set_scrolly(bg_tilemap, 0, 0); |
| 127 | 117 | |
| 128 | 118 | for (i = 0; i < 32; i++) |
| 129 | { | |
| 130 | 119 | tilemap_set_scrollx(bg_tilemap, i, ((jailbrek_scroll_x[i + 32] << 8) + jailbrek_scroll_x[i])); |
| 131 | } | |
| 132 | 120 | } |
| 133 | 121 | |
| 134 | 122 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | VIDEO_START( bigkarnk ) |
| 83 | 83 | { |
| 84 | pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 85 | pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 84 | pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,16,16,32,32); | |
| 85 | pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,16,16,32,32); | |
| 86 | 86 | |
| 87 | 87 | tilemap_set_transmask(pant[0],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */ |
| 88 | 88 | tilemap_set_transmask(pant[1],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */ |
| r1679 | r1680 | |
| 90 | 90 | |
| 91 | 91 | VIDEO_START( maniacsq ) |
| 92 | 92 | { |
| 93 | pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 94 | pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 93 | pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,16,16,32,32); | |
| 94 | pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,16,16,32,32); | |
| 95 | 95 | |
| 96 | 96 | tilemap_set_transparent_pen(pant[0],0); |
| 97 | 97 | tilemap_set_transparent_pen(pant[1],0); |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | VIDEO_START( bankp ) |
| 156 | 156 | { |
| 157 | 157 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 158 | | |
| 158 | | |
| 159 | 159 | |
| 160 | 160 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 161 | | |
| 161 | | |
| 162 | 162 | |
| 163 | 163 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[1], 0); |
| 164 | 164 | colortable_configure_tilemap_groups(machine->colortable, fg_tilemap, machine->gfx[0], 0); |
| r1679 | r1680 | |
|---|---|---|
| 83 | 83 | VIDEO_START( tankbust ) |
| 84 | 84 | { |
| 85 | 85 | /* not scrollable */ |
| 86 | txt_tilemap = tilemap_create(get_txt_tile_info, tilemap_scan_rows, | |
| 86 | txt_tilemap = tilemap_create(get_txt_tile_info, tilemap_scan_rows, | |
| 87 | 87 | |
| 88 | 88 | /* scrollable */ |
| 89 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 89 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | tilemap_set_transparent_pen(txt_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 106 | 106 | |
| 107 | 107 | static void get_sprite_info(running_machine *machine) |
| 108 | 108 | { |
| 109 | const pen_t *base_pal = machine-> | |
| 109 | const pen_t *base_pal = machine-> | |
| 110 | 110 | UINT8 *base_gfx = memory_region(REGION_GFX1); |
| 111 | 111 | int gfx_max = memory_region_length(REGION_GFX1); |
| 112 | 112 | |
| r1679 | r1680 | |
| 566 | 566 | int scrollx, sy, sx; |
| 567 | 567 | int mdy, tdy, i; |
| 568 | 568 | |
| 569 | rgb_ptr = machine-> | |
| 569 | rgb_ptr = machine-> | |
| 570 | 570 | |
| 571 | 571 | if (priority == 0x02) |
| 572 | 572 | { |
| r1679 | r1680 | |
| 683 | 683 | dst_pitch = bitmap->rowpixels; |
| 684 | 684 | dst_base = (UINT16 *)bitmap->base + (y0+dy)*dst_pitch + (x0+dx); |
| 685 | 685 | |
| 686 | pal_base = machine-> | |
| 686 | pal_base = machine-> | |
| 687 | 687 | |
| 688 | 688 | alpha <<= 6; |
| 689 | 689 | |
| r1679 | r1680 | |
| 922 | 922 | |
| 923 | 923 | bg_tilemap = tilemap_create(wecleman_get_bg_tile_info, |
| 924 | 924 | tilemap_scan_rows, |
| 925 | | |
| 925 | | |
| 926 | 926 | 8,8, |
| 927 | 927 | PAGE_NX * 2, PAGE_NY * 2 ); |
| 928 | 928 | |
| 929 | 929 | fg_tilemap = tilemap_create(wecleman_get_fg_tile_info, |
| 930 | 930 | tilemap_scan_rows, |
| 931 | ||
| 931 | ||
| 932 | 932 | 8,8, |
| 933 | 933 | PAGE_NX * 2, PAGE_NY * 2); |
| 934 | 934 | |
| 935 | 935 | txt_tilemap = tilemap_create(wecleman_get_txt_tile_info, |
| 936 | 936 | tilemap_scan_rows, |
| 937 | ||
| 937 | ||
| 938 | 938 | 8,8, |
| 939 | 939 | PAGE_NX * 1, PAGE_NY * 1); |
| 940 | 940 | |
| r1679 | r1680 | |
| 1022 | 1022 | int cloud_sx, cloud_sy; |
| 1023 | 1023 | int i, j, k; |
| 1024 | 1024 | |
| 1025 | mrct = machine-> | |
| 1025 | mrct = machine-> | |
| 1026 | 1026 | |
| 1027 | 1027 | video_on = wecleman_irqctrl & 0x40; |
| 1028 | 1028 |
| r1679 | r1680 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | VIDEO_START( crbaloon ) |
| 80 | 80 | { |
| 81 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy, | |
| 81 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy, | |
| 82 | 82 | |
| 83 | 83 | state_save_register_global(crbaloon_collision_address); |
| 84 | 84 | state_save_register_global(crbaloon_collision_address_clear); |
| r1679 | r1680 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | VIDEO_START( portrait ) |
| 63 | 63 | { |
| 64 | background = tilemap_create( get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32 ); | |
| 65 | foreground = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32 ); | |
| 64 | background = tilemap_create( get_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 32 ); | |
| 65 | foreground = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 16, 16, 32, 32 ); | |
| 66 | 66 | |
| 67 | 67 | tilemap_set_transparent_pen( foreground, 0 ); |
| 68 | 68 | } |
| r1679 | r1680 | |
|---|---|---|
| 136 | 136 | |
| 137 | 137 | VIDEO_START( bosco ) |
| 138 | 138 | { |
| 139 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 140 | fg_tilemap = tilemap_create(fg_get_tile_info,fg_tilemap_scan, TILEMAP_TYPE_PEN,8,8, 8,32); | |
| 139 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 140 | fg_tilemap = tilemap_create(fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); | |
| 141 | 141 | |
| 142 | 142 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 0x1f); |
| 143 | 143 | colortable_configure_tilemap_groups(machine->colortable, fg_tilemap, machine->gfx[0], 0x1f); |
| r1679 | r1680 | |
|---|---|---|
| 90 | 90 | VIDEO_START( funkybee ) |
| 91 | 91 | { |
| 92 | 92 | bg_tilemap = tilemap_create(get_bg_tile_info, funkybee_tilemap_scan, |
| 93 | | |
| 93 | | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 268 | 268 | VIDEO_START( tetrisp2 ) |
| 269 | 269 | { |
| 270 | 270 | tilemap_bg = tilemap_create( get_tile_info_bg,tilemap_scan_rows, |
| 271 | ||
| 271 | ||
| 272 | 272 | 16,16,NX_0,NY_0); |
| 273 | 273 | |
| 274 | 274 | tilemap_fg = tilemap_create( get_tile_info_fg,tilemap_scan_rows, |
| 275 | ||
| 275 | ||
| 276 | 276 | 8,8,NX_1,NY_1); |
| 277 | 277 | |
| 278 | 278 | tilemap_rot = tilemap_create( get_tile_info_rot,tilemap_scan_rows, |
| 279 | ||
| 279 | ||
| 280 | 280 | 16,16,NX_0*2,NY_0*2); |
| 281 | 281 | |
| 282 | 282 | tilemap_set_transparent_pen(tilemap_bg,0); |
| r1679 | r1680 | |
| 287 | 287 | VIDEO_START( rockntread ) |
| 288 | 288 | { |
| 289 | 289 | tilemap_bg = tilemap_create( get_tile_info_bg,tilemap_scan_rows, |
| 290 | ||
| 290 | ||
| 291 | 291 | 16, 16, 256, 16); // rockn ms(main),1,2,3,4 |
| 292 | 292 | |
| 293 | 293 | tilemap_fg = tilemap_create( get_tile_info_fg,tilemap_scan_rows, |
| 294 | ||
| 294 | ||
| 295 | 295 | 8, 8, 64, 64); |
| 296 | 296 | |
| 297 | 297 | tilemap_rot = tilemap_create( get_tile_info_rot,tilemap_scan_rows, |
| 298 | ||
| 298 | ||
| 299 | 299 | 16, 16, 128, 128); |
| 300 | 300 | |
| 301 | 301 | tilemap_set_transparent_pen(tilemap_bg, 0); |
| r1679 | r1680 | |
| 307 | 307 | VIDEO_START( rocknms ) |
| 308 | 308 | { |
| 309 | 309 | tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows, |
| 310 | ||
| 310 | ||
| 311 | 311 | 16, 16, 256, 16); // rockn ms(main),1,2,3,4 |
| 312 | 312 | |
| 313 | 313 | tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows, |
| 314 | ||
| 314 | ||
| 315 | 315 | 8, 8, 64, 64); |
| 316 | 316 | |
| 317 | 317 | tilemap_rot = tilemap_create(get_tile_info_rot,tilemap_scan_rows, |
| 318 | ||
| 318 | ||
| 319 | 319 | 16, 16, 128, 128); |
| 320 | 320 | |
| 321 | 321 | tilemap_sub_bg = tilemap_create(get_tile_info_rocknms_sub_bg,tilemap_scan_rows, |
| 322 | ||
| 322 | ||
| 323 | 323 | 16, 16, 32, 256); // rockn ms(sub) |
| 324 | 324 | |
| 325 | 325 | tilemap_sub_fg = tilemap_create(get_tile_info_rocknms_sub_fg,tilemap_scan_rows, |
| 326 | ||
| 326 | ||
| 327 | 327 | 8, 8, 64, 64); |
| 328 | 328 | |
| 329 | 329 | tilemap_sub_rot = tilemap_create( get_tile_info_rocknms_sub_rot,tilemap_scan_rows, |
| 330 | ||
| 330 | ||
| 331 | 331 | 16, 16, 128, 128); |
| 332 | 332 | |
| 333 | 333 | tilemap_set_transparent_pen(tilemap_bg, 0); |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | VIDEO_START( lastduel ) |
| 89 | 89 | { |
| 90 | bg_tilemap = tilemap_create(ld_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 91 | fg_tilemap = tilemap_create(ld_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 92 | tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 90 | bg_tilemap = tilemap_create(ld_get_bg_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 91 | fg_tilemap = tilemap_create(ld_get_fg_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 92 | tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,8,8,64,32); | |
| 93 | 93 | |
| 94 | 94 | tilemap_set_transmask(fg_tilemap,0,0xffff,0x0001); |
| 95 | 95 | tilemap_set_transmask(fg_tilemap,1,0xf07f,0x0f81); |
| r1679 | r1680 | |
| 101 | 101 | |
| 102 | 102 | VIDEO_START( madgear ) |
| 103 | 103 | { |
| 104 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 105 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 106 | tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 104 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 105 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 106 | tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,8,8,64,32); | |
| 107 | 107 | |
| 108 | 108 | tilemap_set_transmask(fg_tilemap,0,0xffff,0x8000); |
| 109 | 109 | tilemap_set_transmask(fg_tilemap,1,0x80ff,0xff00); |
| r1679 | r1680 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | VIDEO_START( alpha68k ) |
| 71 | 71 | { |
| 72 | fix_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols, | |
| 72 | fix_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols, | |
| 73 | 73 | |
| 74 | 74 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 75 | 75 | } |
| r1679 | r1680 | |
|---|---|---|
| 133 | 133 | |
| 134 | 134 | VIDEO_START(drgnmst) |
| 135 | 135 | { |
| 136 | drgnmst_fg_tilemap = tilemap_create(get_drgnmst_fg_tile_info,drgnmst_fg_tilemap_scan_cols, | |
| 136 | drgnmst_fg_tilemap = tilemap_create(get_drgnmst_fg_tile_info,drgnmst_fg_tilemap_scan_cols, | |
| 137 | 137 | tilemap_set_transparent_pen(drgnmst_fg_tilemap,15); |
| 138 | 138 | |
| 139 | drgnmst_md_tilemap = tilemap_create(get_drgnmst_md_tile_info,drgnmst_md_tilemap_scan_cols, | |
| 139 | drgnmst_md_tilemap = tilemap_create(get_drgnmst_md_tile_info,drgnmst_md_tilemap_scan_cols, | |
| 140 | 140 | tilemap_set_transparent_pen(drgnmst_md_tilemap,15); |
| 141 | 141 | |
| 142 | drgnmst_bg_tilemap = tilemap_create(get_drgnmst_bg_tile_info,drgnmst_bg_tilemap_scan_cols, | |
| 142 | drgnmst_bg_tilemap = tilemap_create(get_drgnmst_bg_tile_info,drgnmst_bg_tilemap_scan_cols, | |
| 143 | 143 | tilemap_set_transparent_pen(drgnmst_bg_tilemap,15); |
| 144 | 144 | |
| 145 | 145 | // do the other tilemaps have rowscroll too? probably not .. |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | VIDEO_START(freekick) |
| 21 | 21 | { |
| 22 | freek_tilemap = tilemap_create(get_freek_tile_info,tilemap_scan_rows, | |
| 22 | freek_tilemap = tilemap_create(get_freek_tile_info,tilemap_scan_rows, | |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 |
| r1679 | r1680 | |
|---|---|---|
| 490 | 490 | int dx = extent->param[0].dpdx * 65536.0f; |
| 491 | 491 | const poly_extra_data *extra = extradata; |
| 492 | 492 | mame_bitmap *destmap = destbase; |
| 493 | const pen_t *pal = &Machine-> | |
| 493 | const pen_t *pal = &Machine-> | |
| 494 | 494 | int prioverchar = extra->prioverchar; |
| 495 | 495 | int z = extra->z; |
| 496 | 496 | int alpha = extra->alpha; |
| r1679 | r1680 | |
| 2224 | 2224 | |
| 2225 | 2225 | static VIDEO_START( common ) |
| 2226 | 2226 | { |
| 2227 | bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows, | |
| 2227 | bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows, | |
| 2228 | 2228 | tilemap_set_transparent_pen( bgtilemap, 0xf ); |
| 2229 | 2229 | |
| 2230 | 2230 | mbDSPisActive = 0; |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | VIDEO_START( redclash ) |
| 156 | 156 | { |
| 157 | 157 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 158 | | |
| 158 | | |
| 159 | 159 | |
| 160 | 160 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 161 | 161 | } |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | VIDEO_START( flyball ) |
| 51 | 51 | { |
| 52 | 52 | flyball_tilemap = tilemap_create(flyball_get_tile_info, |
| 53 | flyball_get_memory_offset, | |
| 53 | flyball_get_memory_offset, | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 |
| r1679 | r1680 | |
|---|---|---|
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | /* initialize the playfield */ |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 86 | 86 | |
| 87 | 87 | /* initialize the motion objects */ |
| 88 | 88 | atarimo_init(machine, 0, &modesc); |
| 89 | 89 | |
| 90 | 90 | /* initialize the alphanumerics */ |
| 91 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 91 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 92 | 92 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 93 | 93 | } |
| 94 | 94 |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "deprecat.h" |
| 11 | #include "video/mc6845.h" | |
| 11 | 12 | |
| 13 | ||
| 12 | 14 | UINT8 *rockola_videoram2; |
| 13 | 15 | UINT8 *rockola_charram; |
| 14 | 16 | |
| 15 | 17 | static int charbank; |
| 16 | 18 | static int backcolor; |
| 17 | 19 | |
| 18 | static tilemap *bg_tilemap, *fg_tilemap; | |
| 20 | static mc6845_t *mc6845; | |
| 21 | static tilemap *bg_tilemap; | |
| 22 | static tilemap *fg_tilemap; | |
| 19 | 23 | |
| 20 | 24 | static rgb_t palette[64]; |
| 21 | 25 | |
| r1679 | r1680 | |
| 110 | 114 | } |
| 111 | 115 | } |
| 112 | 116 | |
| 117 | ||
| 118 | WRITE8_HANDLER( rockola_mc6845_address_w ) | |
| 119 | { | |
| 120 | mc6845_address_w(mc6845, data); | |
| 121 | } | |
| 122 | ||
| 123 | ||
| 124 | WRITE8_HANDLER( rockola_mc6845_register_w ) | |
| 125 | { | |
| 126 | mc6845_register_w(mc6845, data); | |
| 127 | } | |
| 128 | ||
| 129 | ||
| 113 | 130 | WRITE8_HANDLER( rockola_flipscreen_w ) |
| 114 | 131 | { |
| 115 | 132 | int bank; |
| r1679 | r1680 | |
| 176 | 193 | |
| 177 | 194 | VIDEO_START( rockola ) |
| 178 | 195 | { |
| 179 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 180 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 196 | mc6845 = mc6845_config(NULL); | |
| 181 | 197 | |
| 182 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 183 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 198 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 199 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 184 | 200 | |
| 185 | 201 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 186 | 202 | } |
| r1679 | r1680 | |
| 299 | 315 | |
| 300 | 316 | VIDEO_START( satansat ) |
| 301 | 317 | { |
| 302 | bg_tilemap = tilemap_create(satansat_get_bg_tile_info, tilemap_scan_rows, | |
| 303 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 318 | mc6845 = mc6845_config(NULL); | |
| 304 | 319 | |
| 305 | fg_tilemap = tilemap_create(satansat_get_fg_tile_info, tilemap_scan_rows, | |
| 306 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 320 | bg_tilemap = tilemap_create(satansat_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 321 | fg_tilemap = tilemap_create(satansat_get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 307 | 322 | |
| 308 | 323 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 309 | 324 | } |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | VIDEO_START( centiped ) |
| 89 | 89 | { |
| 90 | bg_tilemap = tilemap_create(centiped_get_tile_info, tilemap_scan_rows, | |
| 90 | bg_tilemap = tilemap_create(centiped_get_tile_info, tilemap_scan_rows, | |
| 91 | 91 | |
| 92 | 92 | init_penmask(); |
| 93 | 93 | |
| r1679 | r1680 | |
| 100 | 100 | |
| 101 | 101 | VIDEO_START( warlords ) |
| 102 | 102 | { |
| 103 | bg_tilemap = tilemap_create(warlords_get_tile_info, tilemap_scan_rows, | |
| 103 | bg_tilemap = tilemap_create(warlords_get_tile_info, tilemap_scan_rows, | |
| 104 | 104 | |
| 105 | 105 | /* we overload centiped_flipscreen here to track the cocktail/upright state */ |
| 106 | 106 | centiped_flipscreen = readinputport(0) & 0x80; |
| r1679 | r1680 | |
| 110 | 110 | |
| 111 | 111 | VIDEO_START( milliped ) |
| 112 | 112 | { |
| 113 | bg_tilemap = tilemap_create(milliped_get_tile_info, tilemap_scan_rows, | |
| 113 | bg_tilemap = tilemap_create(milliped_get_tile_info, tilemap_scan_rows, | |
| 114 | 114 | |
| 115 | 115 | init_penmask(); |
| 116 | 116 | |
| r1679 | r1680 | |
| 122 | 122 | |
| 123 | 123 | VIDEO_START( bullsdrt ) |
| 124 | 124 | { |
| 125 | bg_tilemap = tilemap_create(bullsdrt_get_tile_info, tilemap_scan_rows, | |
| 125 | bg_tilemap = tilemap_create(bullsdrt_get_tile_info, tilemap_scan_rows, | |
| 126 | 126 | |
| 127 | 127 | init_penmask(); |
| 128 | 128 |
| r1679 | r1680 | |
|---|---|---|
| 197 | 197 | decode_gfx(machine, playfield_lookup, motable); |
| 198 | 198 | |
| 199 | 199 | /* initialize the playfield */ |
| 200 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 200 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 201 | 201 | |
| 202 | 202 | /* initialize the motion objects */ |
| 203 | 203 | atarimo_init(machine, 0, &modesc); |
| 204 | 204 | |
| 205 | 205 | /* initialize the alphanumerics */ |
| 206 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 206 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 207 | 207 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 208 | 208 | |
| 209 | 209 | /* modify the motion object code lookup */ |
| r1679 | r1680 | |
| 351 | 351 | |
| 352 | 352 | /* but since we've adjusted it, we must reset it to the normal value |
| 353 | 353 | once we hit scanline 0 again */ |
| 354 | timer_adjust(yscroll_reset_timer, video_screen_get_time_until_pos(0, 0, 0), newscroll | |
| 354 | timer_adjust_oneshot(yscroll_reset_timer, video_screen_get_time_until_pos(0, 0, 0), newscroll | |
| 355 | 355 | |
| 356 | 356 | /* update the data */ |
| 357 | 357 | *atarigen_yscroll = newscroll; |
| r1679 | r1680 | |
| 419 | 419 | atarigen_scanline_int_gen(machine, 0); |
| 420 | 420 | |
| 421 | 421 | /* set a timer to turn it off */ |
| 422 | timer_adjust(int3off_timer, video_screen_get_scan_period(0), 0 | |
| 422 | timer_adjust_oneshot(int3off_timer, video_screen_get_scan_period(0), 0 | |
| 423 | 423 | |
| 424 | 424 | /* determine the time of the next one */ |
| 425 | 425 | next_timer_scanline = -1; |
| r1679 | r1680 | |
| 498 | 498 | |
| 499 | 499 | /* set a new one */ |
| 500 | 500 | if (best != -1) |
| 501 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, best, 0), best | |
| 501 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, best, 0), best | |
| 502 | 502 | else |
| 503 | timer_adjust(scanline_timer, attotime_never, 0 | |
| 503 | timer_adjust_oneshot(scanline_timer, attotime_never, 0 | |
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | 506 |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | static void wgp_core_vh_start(running_machine *machine, int x_offs,int y_offs,int piv_xoffs,int piv_yoffs) |
| 58 | 58 | { |
| 59 | wgp_piv_tilemap[0] = tilemap_create(get_piv0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 60 | wgp_piv_tilemap[1] = tilemap_create(get_piv1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 61 | wgp_piv_tilemap[2] = tilemap_create(get_piv2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 59 | wgp_piv_tilemap[0] = tilemap_create(get_piv0_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 60 | wgp_piv_tilemap[1] = tilemap_create(get_piv1_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 61 | wgp_piv_tilemap[2] = tilemap_create(get_piv2_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 62 | 62 | |
| 63 | 63 | TC0100SCN_vh_start(machine,1,TC0100SCN_GFX_NUM,x_offs,y_offs,0,0,0,0,0); |
| 64 | 64 |
| r1679 | r1680 | |
|---|---|---|
| 218 | 218 | |
| 219 | 219 | VIDEO_START( welltris ) |
| 220 | 220 | { |
| 221 | char_tilemap = tilemap_create(get_welltris_tile_info, tilemap_scan_rows, | |
| 221 | char_tilemap = tilemap_create(get_welltris_tile_info, tilemap_scan_rows, | |
| 222 | 222 | |
| 223 | 223 | tilemap_set_transparent_pen(char_tilemap, 15); |
| 224 | 224 | } |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 82 | 82 | helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 83 | 83 | |
| 84 | tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 8, 32, 32); | |
| 85 | tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 8, 32, 32); | |
| 84 | tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, 16, 8, 32, 32); | |
| 85 | tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, 16, 8, 32, 32); | |
| 86 | 86 | |
| 87 | 87 | tilemap_set_scrolly(tilemap1, 0, +24); |
| 88 | 88 | tilemap_set_scrolly(tilemap2, 0, +24); |
| r1679 | r1680 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | VIDEO_START( gumbo ) |
| 40 | 40 | { |
| 41 | gumbo_bg_tilemap = tilemap_create(get_gumbo_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 64,32); | |
| 42 | gumbo_fg_tilemap = tilemap_create(get_gumbo_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 4, 4,128,64); | |
| 41 | gumbo_bg_tilemap = tilemap_create(get_gumbo_bg_tile_info,tilemap_scan_rows, 8, 8, 64,32); | |
| 42 | gumbo_fg_tilemap = tilemap_create(get_gumbo_fg_tile_info,tilemap_scan_rows, 4, 4,128,64); | |
| 43 | 43 | tilemap_set_transparent_pen(gumbo_fg_tilemap,0xff); |
| 44 | 44 | } |
| 45 | 45 |
| r1679 | r1680 | |
|---|---|---|
| 699 | 699 | |
| 700 | 700 | VIDEO_START( dec0_nodma ) |
| 701 | 701 | { |
| 702 | pf1_tilemap_0 = tilemap_create(get_pf1_tile_info,tile_shape0_8x8_scan,TILEMAP_TYPE_PEN, 8, 8,128, 32); | |
| 703 | pf1_tilemap_1 = tilemap_create(get_pf1_tile_info,tile_shape1_8x8_scan,TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 704 | pf1_tilemap_2 = tilemap_create(get_pf1_tile_info,tile_shape2_8x8_scan,TILEMAP_TYPE_PEN, 8, 8, 32,128); | |
| 705 | pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan, TILEMAP_TYPE_PEN,16,16, 64, 16); | |
| 706 | pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan, TILEMAP_TYPE_PEN,16,16, 32, 32); | |
| 707 | pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan, TILEMAP_TYPE_PEN,16,16, 16, 64); | |
| 708 | pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan, TILEMAP_TYPE_PEN,16,16, 64, 16); | |
| 709 | pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan, TILEMAP_TYPE_PEN,16,16, 32, 32); | |
| 710 | pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan, TILEMAP_TYPE_PEN,16,16, 16, 64); | |
| 702 | pf1_tilemap_0 = tilemap_create(get_pf1_tile_info,tile_shape0_8x8_scan, 8, 8,128, 32); | |
| 703 | pf1_tilemap_1 = tilemap_create(get_pf1_tile_info,tile_shape1_8x8_scan, 8, 8, 64, 64); | |
| 704 | pf1_tilemap_2 = tilemap_create(get_pf1_tile_info,tile_shape2_8x8_scan, 8, 8, 32,128); | |
| 705 | pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan, 16,16, 64, 16); | |
| 706 | pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan, 16,16, 32, 32); | |
| 707 | pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan, 16,16, 16, 64); | |
| 708 | pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan, 16,16, 64, 16); | |
| 709 | pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan, 16,16, 32, 32); | |
| 710 | pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan, 16,16, 16, 64); | |
| 711 | 711 | |
| 712 | 712 | dec0_spriteram=spriteram16; |
| 713 | 713 | } |
| r1679 | r1680 | |
|---|---|---|
| 230 | 230 | eaglshot_dirty_tile = (char*)auto_malloc(4 * 0x100000 / (16*8)); |
| 231 | 231 | |
| 232 | 232 | gdfs_tmap = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 233 | | |
| 233 | | |
| 234 | 234 | |
| 235 | 235 | tilemap_set_transparent_pen(gdfs_tmap, 0); |
| 236 | 236 | } |
| r1679 | r1680 | |
|---|---|---|
| 120 | 120 | atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30); |
| 121 | 121 | |
| 122 | 122 | /* initialize the playfield */ |
| 123 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarig42_playfield_scan, | |
| 123 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarig42_playfield_scan, | |
| 124 | 124 | |
| 125 | 125 | /* initialize the motion objects */ |
| 126 | 126 | adjusted_modesc.palettebase = atarig42_motion_object_base; |
| r1679 | r1680 | |
| 129 | 129 | atarirle_init(0, &adjusted_modesc); |
| 130 | 130 | |
| 131 | 131 | /* initialize the alphanumerics */ |
| 132 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 132 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 133 | 133 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 134 | 134 | |
| 135 | 135 | /* reset statics */ |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | #define TX_TILE_OFFSET_RIGHT (32 * 0 + 2) |
| 12 | 12 | #define TX_TILE_OFFSET_LEFT (32 * 31 + 2) |
| 13 | 13 | |
| 14 | #define SPR_TRANS_COLOR (0xff + 768) | |
| 15 | #define SPR_MASK_COLOR (0xfe + 768) | |
| 14 | #define SPR_TRANS_COLOR (0xff + 0x300) | |
| 15 | #define SPR_MASK_COLOR (0xfe + 0x300) | |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | UINT8 *tceptor_tile_ram; |
| r1679 | r1680 | |
| 42 | 42 | |
| 43 | 43 | PALETTE_INIT( tceptor ) |
| 44 | 44 | { |
| 45 | int totcolors, totlookup; | |
| 46 | 45 | int i; |
| 47 | 46 | |
| 48 | totcolors = machine->drv->total_colors; | |
| 49 | totlookup = machine->drv->color_table_len; | |
| 47 | /* allocate the colortable */ | |
| 48 | machine->colortable = colortable_alloc(machine, 0x400); | |
| 50 | 49 | |
| 51 | for (i = 0; i < totcolors; i++) | |
| 50 | /* create a lookup table for the palette */ | |
| 51 | for (i = 0; i < 0x400; i++) | |
| 52 | 52 | { |
| 53 | int bit0, bit1, bit2, bit3, r, g, b; | |
| 53 | int r = pal4bit(color_prom[i + 0x000]); | |
| 54 | int g = pal4bit(color_prom[i + 0x400]); | |
| 55 | int b = pal4bit(color_prom[i + 0x800]); | |
| 54 | 56 | |
| 55 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 56 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 57 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 58 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 59 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 60 | bit0 = (color_prom[totcolors] >> 0) & 0x01; | |
| 61 | bit1 = (color_prom[totcolors] >> 1) & 0x01; | |
| 62 | bit2 = (color_prom[totcolors] >> 2) & 0x01; | |
| 63 | bit3 = (color_prom[totcolors] >> 3) & 0x01; | |
| 64 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 65 | bit0 = (color_prom[2*totcolors] >> 0) & 0x01; | |
| 66 | bit1 = (color_prom[2*totcolors] >> 1) & 0x01; | |
| 67 | bit2 = (color_prom[2*totcolors] >> 2) & 0x01; | |
| 68 | bit3 = (color_prom[2*totcolors] >> 3) & 0x01; | |
| 69 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 70 | ||
| 71 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 72 | color_prom++; | |
| 57 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 73 | 58 | } |
| 74 | 59 | |
| 75 | color_prom += 2 * totcolors; | |
| 76 | 60 | /* color_prom now points to the beginning of the lookup table */ |
| 61 | color_prom += 0xc00; | |
| 77 | 62 | |
| 63 | ||
| 78 | 64 | /* |
| 79 | 65 | color lookup table: |
| 80 | 66 | 0- +1024 ( 4 * 256) colors: text (use 0- 256 colors) |
| r1679 | r1680 | |
| 84 | 70 | */ |
| 85 | 71 | |
| 86 | 72 | /* tiles lookup table (1024 colors) */ |
| 87 | for (i = 0; i < 1024;i++) | |
| 88 | colortable[i] = *color_prom++; | |
| 73 | for (i = 0; i < 0x0400; i++) | |
| 74 | { | |
| 75 | int ctabentry = color_prom[i]; | |
| 76 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 77 | } | |
| 89 | 78 | |
| 90 | /* road lookup table (256 colors) */ | |
| 91 | for (i = 0; i < 256; i++) | |
| 92 | colortable[i + 0xf00] = *(color_prom++) + 512; | |
| 93 | ||
| 94 | 79 | /* sprites lookup table (1024 colors) */ |
| 95 | for (i = 0;i < 1024; i++) | |
| 96 | colortable[i + 1024] = *(color_prom++) + 768; | |
| 80 | for (i = 0x0400; i < 0x0800; i++) | |
| 81 | { | |
| 82 | int ctabentry = color_prom[i] | 0x300; | |
| 83 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 84 | } | |
| 97 | 85 | |
| 98 | /* background: lookup prom is not presented, use prom directly (512 colors) */ | |
| 99 | for (i = 0;i < 512; i++) | |
| 100 | colortable[i + 2048] = i; | |
| 86 | /* background: no lookup PROM, use directly (512 colors) */ | |
| 87 | for (i = 0x0a00; i < 0x0c00; i++) | |
| 88 | { | |
| 89 | int ctabentry = i & 0x1ff; | |
| 90 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 91 | } | |
| 101 | 92 | |
| 93 | /* road lookup table (256 colors) */ | |
| 94 | for (i = 0x0f00; i < 0x1000; i++) | |
| 95 | { | |
| 96 | int ctabentry = color_prom[i - 0x700] | 0x200; | |
| 97 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 98 | } | |
| 99 | ||
| 102 | 100 | /* setup sprite mask color map */ |
| 103 | 101 | /* tceptor2: only 0x23 */ |
| 104 | 102 | memset(is_mask_spr, 0, sizeof is_mask_spr); |
| 105 | for (i = 0; i < 1024; i++) | |
| 106 | if (colortable[i + 1024] == SPR_MASK_COLOR) | |
| 107 | is_mask_spr[i / 16] = 1; | |
| 103 | for (i = 0; i < 0x400; i++) | |
| 104 | if (colortable_entry_get_value(machine->colortable, i | 0x400) == SPR_MASK_COLOR) | |
| 105 | is_mask_spr[i >> 4] = 1; | |
| 108 | 106 | } |
| 109 | 107 | |
| 110 | 108 | |
| r1679 | r1680 | |
| 132 | 130 | int code = tceptor_tile_ram[offset]; |
| 133 | 131 | int color = tceptor_tile_attr[offset]; |
| 134 | 132 | |
| 133 | tileinfo->group = color; | |
| 134 | ||
| 135 | 135 | SET_TILE_INFO(0, code, color, 0); |
| 136 | 136 | } |
| 137 | 137 | |
| r1679 | r1680 | |
| 430 | 430 | |
| 431 | 431 | namco_road_init(machine, gfx_index); |
| 432 | 432 | |
| 433 | namco_road_set_transparent_color(machine-> | |
| 433 | namco_road_set_transparent_color(colortable_entry_get_value(machine-> | |
| 434 | 434 | |
| 435 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, | |
| 435 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, | |
| 436 | 436 | |
| 437 | 437 | tilemap_set_scrollx(tx_tilemap, 0, -2*8); |
| 438 | 438 | tilemap_set_scrolly(tx_tilemap, 0, 0); |
| 439 | tilemap_ | |
| 439 | colortable_configure_tilemap_g | |
| 440 | 440 | |
| 441 | bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 442 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 441 | bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, 8, 8, 64, 32); | |
| 442 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, 8, 8, 64, 32); | |
| 443 | 443 | |
| 444 | 444 | state_save_register_global_pointer(tceptor_sprite_ram_buffered, 0x200 / 2); |
| 445 | 445 | state_save_register_global(bg1_scroll_x); |
| r1679 | r1680 | |
| 533 | 533 | flipx, flipy, |
| 534 | 534 | x, y, |
| 535 | 535 | cliprect, |
| 536 | TRANSPARENCY_COLOR, SPR_TRANS_COLOR, | |
| 536 | TRANSPARENCY_PENS, | |
| 537 | colortable_get_transpen_mask(machine->colortable, machine->gfx[gfx], color, SPR_TRANS_COLOR), | |
| 537 | 538 | scalex, |
| 538 | 539 | scaley); |
| 539 | 540 | } |
| r1679 | r1680 | |
| 546 | 547 | |
| 547 | 548 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) |
| 548 | 549 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 549 | if (*BITMAP_ADDR16(bitmap, y, x) == SPR_MASK_COLOR) | |
| 550 | { | |
| 550 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(bitmap, y, x)) == SPR_MASK_COLOR) | |
| 551 | 551 | // restore pixel |
| 552 | 552 | *BITMAP_ADDR16(bitmap, y, x) = *BITMAP_ADDR16(temp_bitmap, y, x); |
| 553 | } | |
| 554 | 553 | } |
| 555 | 554 | } |
| 556 | 555 |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | VIDEO_START( cop01 ) |
| 107 | 107 | { |
| 108 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 109 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 108 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 109 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 110 | 110 | |
| 111 | 111 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 112 | 112 |
| r1679 | r1680 | |
|---|---|---|
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | 98 | /* initialize the playfield */ |
| 99 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 99 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 100 | 100 | |
| 101 | 101 | /* initialize the motion objects */ |
| 102 | 102 | atarimo_init(machine, 0, &modesc); |
| 103 | 103 | |
| 104 | 104 | /* initialize the alphanumerics */ |
| 105 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 105 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 106 | 106 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 107 | 107 | } |
| 108 | 108 |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | PALETTE_INIT( hanaawas ) |
| 20 | 20 | { |
| 21 | 21 | int i; |
| 22 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 23 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 24 | 22 | |
| 23 | /* allocate the colortable */ | |
| 24 | machine->colortable = colortable_alloc(machine, 0x10); | |
| 25 | 25 | |
| 26 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 26 | /* create a lookup table for the palette */ | |
| 27 | for (i = 0; i < 0x10; i++) | |
| 27 | 28 | { |
| 28 | int bit0,bit1,bit2,r,g,b; | |
| 29 | int bit0, bit1, bit2; | |
| 30 | int r, g, b; | |
| 29 | 31 | |
| 30 | ||
| 31 | 32 | /* red component */ |
| 32 | bit0 = (*color_prom >> 0) & 0x01; | |
| 33 | bit1 = (*color_prom >> 1) & 0x01; | |
| 34 | bit2 = (*color_prom >> 2) & 0x01; | |
| 33 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 34 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 35 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 35 | 36 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 37 | ||
| 36 | 38 | /* green component */ |
| 37 | bit0 = (*color_prom >> 3) & 0x01; | |
| 38 | bit1 = (*color_prom >> 4) & 0x01; | |
| 39 | bit2 = (*color_prom >> 5) & 0x01; | |
| 39 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 40 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 41 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 40 | 42 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 43 | ||
| 41 | 44 | /* blue component */ |
| 42 | 45 | bit0 = 0; |
| 43 | bit1 = (*color_prom >> 6) & 0x01; | |
| 44 | bit2 = (*color_prom >> 7) & 0x01; | |
| 46 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 47 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 45 | 48 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 46 | 49 | |
| 47 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 48 | color_prom++; | |
| 50 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 49 | 51 | } |
| 50 | 52 | |
| 51 | color_prom += 0x10; | |
| 52 | 53 | /* color_prom now points to the beginning of the lookup table */ |
| 54 | color_prom += 0x20; | |
| 53 | 55 | |
| 54 | ||
| 55 | 56 | /* character lookup table. The 1bpp tiles really only use colors 0-0x0f and the |
| 56 | 57 | 3bpp ones 0x10-0x1f */ |
| 57 | ||
| 58 | for (i = 0;i < TOTAL_COLORS(0)/8 ;i++) | |
| 58 | for (i = 0; i < 0x100; i++) | |
| 59 | 59 | { |
| 60 | COLOR(0,i*8+0) = color_prom[i*4+0x00] & 0x0f; | |
| 61 | COLOR(0,i*8+1) = color_prom[i*4+0x01] & 0x0f; | |
| 62 | COLOR(0,i*8+2) = color_prom[i*4+0x02] & 0x0f; | |
| 63 | COLOR(0,i*8+3) = color_prom[i*4+0x03] & 0x0f; | |
| 64 | COLOR(0,i*8+4) = color_prom[i*4+0x80] & 0x0f; | |
| 65 | COLOR(0,i*8+5) = color_prom[i*4+0x81] & 0x0f; | |
| 66 | COLOR(0,i*8+6) = color_prom[i*4+0x82] & 0x0f; | |
| 67 | COLOR(0,i*8+7) = color_prom[i*4+0x83] & 0x0f; | |
| 60 | int swapped_i = BITSWAP8(i,2,7,6,5,4,3,1,0); | |
| 61 | UINT8 ctabentry = color_prom[swapped_i] & 0x0f; | |
| 62 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 68 | 63 | } |
| 69 | 64 | } |
| 70 | 65 | |
| r1679 | r1680 | |
| 107 | 102 | |
| 108 | 103 | VIDEO_START( hanaawas ) |
| 109 | 104 | { |
| 110 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 111 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 105 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 112 | 106 | } |
| 113 | 107 | |
| 114 | 108 | VIDEO_UPDATE( hanaawas ) |
| r1679 | r1680 | |
|---|---|---|
| 153 | 153 | |
| 154 | 154 | VIDEO_START(aquarium) |
| 155 | 155 | { |
| 156 | aquarium_txt_tilemap = tilemap_create(get_aquarium_txt_tile_info,tilemap_scan_rows, | |
| 156 | aquarium_txt_tilemap = tilemap_create(get_aquarium_txt_tile_info,tilemap_scan_rows, | |
| 157 | 157 | tilemap_set_transparent_pen(aquarium_txt_tilemap,0); |
| 158 | 158 | |
| 159 | aquarium_bak_tilemap = tilemap_create(get_aquarium_bak_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 160 | aquarium_mid_tilemap = tilemap_create(get_aquarium_mid_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 159 | aquarium_bak_tilemap = tilemap_create(get_aquarium_bak_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 160 | aquarium_mid_tilemap = tilemap_create(get_aquarium_mid_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 161 | 161 | tilemap_set_transparent_pen(aquarium_mid_tilemap,0); |
| 162 | 162 | } |
| 163 | 163 |
| r1679 | r1680 | |
|---|---|---|
| 392 | 392 | metro_tiletable_old = auto_malloc(metro_tiletable_size); |
| 393 | 393 | dirtyindex = auto_malloc(metro_tiletable_size/4); |
| 394 | 394 | |
| 395 | bg_tilemap[0] = tilemap_create(get_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 396 | bg_tilemap[1] = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 397 | bg_tilemap[2] = tilemap_create(get_tile_info_2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 395 | bg_tilemap[0] = tilemap_create(get_tile_info_0,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 396 | bg_tilemap[1] = tilemap_create(get_tile_info_1,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 397 | bg_tilemap[2] = tilemap_create(get_tile_info_2,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 398 | 398 | |
| 399 | 399 | tilemap_16x16[0] = NULL; |
| 400 | 400 | tilemap_16x16[1] = NULL; |
| r1679 | r1680 | |
| 415 | 415 | metro_tiletable_old = auto_malloc(metro_tiletable_size); |
| 416 | 416 | dirtyindex = auto_malloc(metro_tiletable_size/4); |
| 417 | 417 | |
| 418 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 419 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 420 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 418 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 419 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 420 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 421 | 421 | |
| 422 | 422 | tilemap_16x16[0] = NULL; |
| 423 | 423 | tilemap_16x16[1] = NULL; |
| r1679 | r1680 | |
| 442 | 442 | metro_tiletable_old = auto_malloc(metro_tiletable_size); |
| 443 | 443 | dirtyindex = auto_malloc(metro_tiletable_size/4); |
| 444 | 444 | |
| 445 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 446 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 447 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,WIN_NX,WIN_NY); | |
| 445 | bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 446 | bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 447 | bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY); | |
| 448 | 448 | |
| 449 | tilemap_16x16[0] = tilemap_create(get_tile_info_0_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,WIN_NX,WIN_NY); | |
| 450 | tilemap_16x16[1] = tilemap_create(get_tile_info_1_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,WIN_NX,WIN_NY); | |
| 451 | tilemap_16x16[2] = tilemap_create(get_tile_info_2_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,WIN_NX,WIN_NY); | |
| 449 | tilemap_16x16[0] = tilemap_create(get_tile_info_0_16x16_8bit,tilemap_scan_rows,16,16,WIN_NX,WIN_NY); | |
| 450 | tilemap_16x16[1] = tilemap_create(get_tile_info_1_16x16_8bit,tilemap_scan_rows,16,16,WIN_NX,WIN_NY); | |
| 451 | tilemap_16x16[2] = tilemap_create(get_tile_info_2_16x16_8bit,tilemap_scan_rows,16,16,WIN_NX,WIN_NY); | |
| 452 | 452 | |
| 453 | 453 | tilemap_set_transparent_pen(bg_tilemap[0],0); |
| 454 | 454 | tilemap_set_transparent_pen(bg_tilemap[1],0); |
| r1679 | r1680 | |
| 465 | 465 | has_zoom = 1; |
| 466 | 466 | |
| 467 | 467 | metro_K053936_tilemap = tilemap_create(metro_K053936_get_tile_info, tilemap_scan_rows, |
| 468 | | |
| 468 | | |
| 469 | 469 | |
| 470 | 470 | K053936_wraparound_enable(0, 0); |
| 471 | 471 | K053936_set_offset(0, -69, -21); |
| r1679 | r1680 | |
| 482 | 482 | has_zoom = 1; |
| 483 | 483 | |
| 484 | 484 | metro_K053936_tilemap = tilemap_create(metro_K053936_gstrik2_get_tile_info, tilemap_scan_gstrik2, |
| 485 | | |
| 485 | | |
| 486 | 486 | |
| 487 | 487 | K053936_wraparound_enable(0, 0); |
| 488 | 488 | K053936_set_offset(0, -69, -19); |
| r1679 | r1680 | |
|---|---|---|
| 264 | 264 | VIDEO_START( angelkds ) |
| 265 | 265 | { |
| 266 | 266 | |
| 267 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 267 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 268 | 268 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 269 | 269 | |
| 270 | bgbot_tilemap = tilemap_create(get_bgbot_tile_info,tilemap_scan_rows, | |
| 270 | bgbot_tilemap = tilemap_create(get_bgbot_tile_info,tilemap_scan_rows, | |
| 271 | 271 | tilemap_set_transparent_pen(bgbot_tilemap,15); |
| 272 | 272 | |
| 273 | bgtop_tilemap = tilemap_create(get_bgtop_tile_info,tilemap_scan_rows, | |
| 273 | bgtop_tilemap = tilemap_create(get_bgtop_tile_info,tilemap_scan_rows, | |
| 274 | 274 | tilemap_set_transparent_pen(bgtop_tilemap,15); |
| 275 | 275 | } |
| 276 | 276 |
| r1679 | r1680 | |
|---|---|---|
| 110 | 110 | { |
| 111 | 111 | UINT8 attr = circusc_colorram[tile_index]; |
| 112 | 112 | tileinfo->category = (attr & 0x10) >> 4; |
| 113 | tileinfo->group = attr & 0x0f; | |
| 114 | 113 | |
| 115 | 114 | SET_TILE_INFO(0, |
| 116 | 115 | circusc_videoram[tile_index] + ((attr & 0x20) << 3), |
| r1679 | r1680 | |
| 128 | 127 | |
| 129 | 128 | VIDEO_START( circusc ) |
| 130 | 129 | { |
| 131 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 130 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 132 | 131 | |
| 133 | 132 | tilemap_set_scroll_cols(bg_tilemap,32); |
| 134 | 133 | } |
| r1679 | r1680 | |
|---|---|---|
| 131 | 131 | VIDEO_START( mikie ) |
| 132 | 132 | { |
| 133 | 133 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 134 | | |
| 134 | | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 61 | 61 | if (scanline != -1) |
| 62 | 62 | { |
| 63 | 63 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); |
| 64 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline + 1, 0), scanline | |
| 64 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline + 1, 0), scanline | |
| 65 | 65 | timer_set(ATTOTIME_IN_HZ(25000000), NULL, -1, scanline_timer_cb); |
| 66 | 66 | } |
| 67 | 67 | else |
| r1679 | r1680 | |
| 449 | 449 | |
| 450 | 450 | /* update the scanline timer */ |
| 451 | 451 | if (offset == 0) |
| 452 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, (data & 0x1ff) + 1, 0), data & 0x1ff | |
| 452 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, (data & 0x1ff) + 1, 0), data & 0x1ff | |
| 453 | 453 | |
| 454 | 454 | /* if something changed, update our parameters */ |
| 455 | 455 | if (old != video_regs[offset] && video_regs[6] != 0 && video_regs[11] != 0) |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "video/mc6845.h" | |
| 2 | 3 | #include "deprecat.h" |
| 3 | 4 | |
| 4 | UINT8 *usg_videoram,*usg_charram; | |
| 5 | UINT8 *usgames_videoram,*usgames_charram; | |
| 5 | 6 | |
| 6 | 7 | |
| 7 | static tilemap *usg_tilemap; | |
| 8 | static mc6845_t *mc6845; | |
| 9 | static tilemap *usgames_tilemap; | |
| 8 | 10 | |
| 9 | 11 | |
| 10 | 12 | |
| 11 | PALETTE_INIT(usg) | |
| 13 | PALETTE_INIT(usgames) | |
| 12 | 14 | { |
| 13 | 15 | int j; |
| 14 | 16 | |
| r1679 | r1680 | |
| 35 | 37 | |
| 36 | 38 | |
| 37 | 39 | |
| 38 | static TILE_GET_INFO( get_usg_tile_info ) | |
| 40 | static TILE_GET_INFO( get_usgames_tile_info ) | |
| 39 | 41 | { |
| 40 | 42 | int tileno, colour; |
| 41 | 43 | |
| 42 | tileno = usg_videoram[tile_index*2]; | |
| 43 | colour = usg_videoram[tile_index*2+1]; | |
| 44 | tileno = usgames_videoram[tile_index*2]; | |
| 45 | colour = usgames_videoram[tile_index*2+1]; | |
| 44 | 46 | |
| 45 | 47 | SET_TILE_INFO(0,tileno,colour,0); |
| 46 | 48 | } |
| 47 | 49 | |
| 48 | VIDEO_START(usg) | |
| 50 | VIDEO_START(usgames) | |
| 49 | 51 | { |
| 50 | usg_tilemap = tilemap_create(get_usg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 52 | mc6845 = mc6845_config(NULL); | |
| 53 | usgames_tilemap = tilemap_create(get_usgames_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 51 | 54 | } |
| 52 | 55 | |
| 53 | 56 | |
| 54 | WRITE8_HANDLER( usg_videoram_w ) | |
| 57 | WRITE8_HANDLER( usgames_videoram_w ) | |
| 55 | 58 | { |
| 56 | usg_videoram[offset] = data; | |
| 57 | tilemap_mark_tile_dirty(usg_tilemap,offset/2); | |
| 59 | usgames_videoram[offset] = data; | |
| 60 | tilemap_mark_tile_dirty(usgames_tilemap,offset/2); | |
| 58 | 61 | } |
| 59 | 62 | |
| 60 | WRITE8_HANDLER( usg_charram_w ) | |
| 63 | WRITE8_HANDLER( usgames_charram_w ) | |
| 61 | 64 | { |
| 62 | usg_charram[offset] = data; | |
| 65 | usgames_charram[offset] = data; | |
| 63 | 66 | |
| 64 | decodechar(Machine->gfx[0], offset/8, usg_charram); | |
| 67 | decodechar(Machine->gfx[0], offset/8, usgames_charram); | |
| 65 | 68 | |
| 66 | tilemap_mark_all_tiles_dirty(usg_tilemap); | |
| 69 | tilemap_mark_all_tiles_dirty(usgames_tilemap); | |
| 67 | 70 | } |
| 68 | 71 | |
| 69 | 72 | |
| 73 | WRITE8_HANDLER( usgames_mc6845_address_w ) | |
| 74 | { | |
| 75 | mc6845_address_w(mc6845, data); | |
| 76 | } | |
| 70 | 77 | |
| 71 | VIDEO_UPDATE(usg) | |
| 78 | ||
| 79 | WRITE8_HANDLER( usgames_mc6845_register_w ) | |
| 72 | 80 | { |
| 73 | tilemap_draw(bitmap,cliprect,usg_tilemap,0,0); | |
| 81 | mc6845_register_w(mc6845, data); | |
| 82 | } | |
| 83 | ||
| 84 | ||
| 85 | VIDEO_UPDATE(usgames) | |
| 86 | { | |
| 87 | tilemap_draw(bitmap,cliprect,usgames_tilemap,0,0); | |
| 74 | 88 | return 0; |
| 75 | 89 | } |
| r1679 | r1680 | |
|---|---|---|
| 149 | 149 | |
| 150 | 150 | VIDEO_START( zaccaria ) |
| 151 | 151 | { |
| 152 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 152 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 153 | 153 | |
| 154 | 154 | tilemap_set_scroll_cols(bg_tilemap,32); |
| 155 | 155 | } |
| r1679 | r1680 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | VIDEO_START( shadfrce ) |
| 68 | 68 | { |
| 69 | shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows, | |
| 69 | shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows, | |
| 70 | 70 | tilemap_set_transparent_pen(shadfrce_fgtilemap,0); |
| 71 | 71 | |
| 72 | shadfrce_bg0tilemap = tilemap_create(get_shadfrce_bg0tile_info,tilemap_scan_rows, | |
| 72 | shadfrce_bg0tilemap = tilemap_create(get_shadfrce_bg0tile_info,tilemap_scan_rows, | |
| 73 | 73 | tilemap_set_transparent_pen(shadfrce_bg0tilemap,0); |
| 74 | 74 | |
| 75 | shadfrce_bg1tilemap = tilemap_create(get_shadfrce_bg1tile_info,tilemap_scan_rows, | |
| 75 | shadfrce_bg1tilemap = tilemap_create(get_shadfrce_bg1tile_info,tilemap_scan_rows, | |
| 76 | 76 | |
| 77 | 77 | shadfrce_spvideoram_old = auto_malloc(spriteram_size); |
| 78 | 78 | } |
| r1679 | r1680 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | VIDEO_START( speedbal ) |
| 41 | 41 | { |
| 42 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols_flip_x, TILEMAP_TYPE_PEN, 16, 16, 16, 16); | |
| 43 | fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols_flip_x, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 42 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols_flip_x, 16, 16, 16, 16); | |
| 43 | fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols_flip_x, 8, 8, 32, 32); | |
| 44 | 44 | |
| 45 | 45 | tilemap_set_transmask(bg_tilemap,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ |
| 46 | 46 | tilemap_set_transmask(bg_tilemap,1,0x00f7,0x0000); /* split type 1 has pen 0-2, 4-7 transparent in front half */ |
| r1679 | r1680 | |
|---|---|---|
| 130 | 130 | VIDEO_START( tagteam ) |
| 131 | 131 | { |
| 132 | 132 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_x, |
| 133 | | |
| 133 | | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 42 | 42 | * set both color clocks equal for one color |
| 43 | 43 | **********************************************/ |
| 44 | 44 | #define SETCOL_B(o,d) \ |
| 45 | antic.color_lookup[o] = (Machine-> | |
| 45 | antic.color_lookup[o] = (Machine-> | |
| 46 | 46 | |
| 47 | 47 | /********************************************** |
| 48 | 48 | * set left color clock for one color |
| 49 | 49 | **********************************************/ |
| 50 | 50 | #define SETCOL_L(o,d) \ |
| 51 | *((UINT8*)&antic.color_lookup[o] + 0) = Machine-> | |
| 51 | *((UINT8*)&antic.color_lookup[o] + 0) = Machine-> | |
| 52 | 52 | |
| 53 | 53 | /********************************************** |
| 54 | 54 | * set right color clock for one color |
| 55 | 55 | **********************************************/ |
| 56 | 56 | #define SETCOL_R(o,d) \ |
| 57 | *((UINT8*)&antic.color_lookup[o] + 1) = Machine-> | |
| 57 | *((UINT8*)&antic.color_lookup[o] + 1) = Machine-> | |
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 |
| r1679 | r1680 | |
|---|---|---|
| 104 | 104 | VIDEO_START( bagman ) |
| 105 | 105 | { |
| 106 | 106 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 107 | | |
| 107 | | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 222 | 222 | |
| 223 | 223 | VIDEO_START( inufuku ) |
| 224 | 224 | { |
| 225 | inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 226 | inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 225 | inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 226 | inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 227 | 227 | |
| 228 | 228 | tilemap_set_transparent_pen(inufuku_bg_tilemap, 255); |
| 229 | 229 | tilemap_set_transparent_pen(inufuku_text_tilemap, 255); |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | VIDEO_START( commando ) |
| 90 | 90 | { |
| 91 | 91 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 92 | | |
| 92 | | |
| 93 | 93 | |
| 94 | 94 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 95 | | |
| 95 | | |
| 96 | 96 | |
| 97 | 97 | tilemap_set_transparent_pen(fg_tilemap, 3); |
| 98 | 98 | } |
| r1679 | r1680 | |
|---|---|---|
| 124 | 124 | atarigen_playfield = &vram[0x2000]; |
| 125 | 125 | |
| 126 | 126 | /* initialize the playfield */ |
| 127 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 127 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 128 | 128 | |
| 129 | 129 | /* initialize the motion objects */ |
| 130 | 130 | atarimo_init(machine, 0, &modesc); |
| 131 | 131 | |
| 132 | 132 | /* initialize the alphanumerics */ |
| 133 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 133 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 134 | 134 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 135 | 135 | |
| 136 | 136 | /* reset the statics */ |
| r1679 | r1680 | |
| 196 | 196 | if (!(newscroll & 0x10)) |
| 197 | 197 | tilemap_set_scrolly(atarigen_playfield_tilemap, 0, (newscroll >> 6) - video_screen_get_vpos(0)); |
| 198 | 198 | else |
| 199 | timer_adjust(yscroll_reset_timer, video_screen_get_time_until_pos(0, 0, 0), newscroll >> 6 | |
| 199 | timer_adjust_oneshot(yscroll_reset_timer, video_screen_get_time_until_pos(0, 0, 0), newscroll >> 6 | |
| 200 | 200 | |
| 201 | 201 | /* update the playfield banking */ |
| 202 | 202 | if (playfield_tile_bank[1] != (newscroll & 0x0f) * 0x400) |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | static UINT8* robokid_bg2_videoram; |
| 26 | 26 | |
| 27 | 27 | |
| 28 | /************************************* | |
| 29 | * | |
| 30 | * Callbacks for the TileMap code | |
| 31 | * | |
| 32 | *************************************/ | |
| 33 | ||
| 28 | 34 | static TILE_GET_INFO( get_fg_tile_info ) |
| 29 | 35 | { |
| 30 | 36 | int const lo = ninjakd2_fg_videoram[(tile_index << 1)]; |
| r1679 | r1680 | |
| 113 | 119 | |
| 114 | 120 | |
| 115 | 121 | |
| 122 | /************************************* | |
| 123 | * | |
| 124 | * Video system start | |
| 125 | * | |
| 126 | *************************************/ | |
| 127 | ||
| 116 | 128 | static void videoram_alloc(const running_machine* const machine, int const size) |
| 117 | 129 | { |
| 118 | 130 | if (size) |
| r1679 | r1680 | |
| 135 | 147 | { |
| 136 | 148 | videoram_alloc(machine, 0); |
| 137 | 149 | |
| 138 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 139 | bg_tilemap = tilemap_create(ninjakd2_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 150 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 151 | bg_tilemap = tilemap_create(ninjakd2_get_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 32); | |
| 140 | 152 | |
| 141 | 153 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 142 | 154 | |
| r1679 | r1680 | |
| 147 | 159 | { |
| 148 | 160 | videoram_alloc(machine, 0); |
| 149 | 161 | |
| 150 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 151 | bg_tilemap = tilemap_create(mnight_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 162 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 163 | bg_tilemap = tilemap_create(mnight_get_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 32); | |
| 152 | 164 | |
| 153 | 165 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 154 | 166 | |
| r1679 | r1680 | |
| 161 | 173 | |
| 162 | 174 | videoram_alloc(machine, 0x0800); |
| 163 | 175 | |
| 164 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 165 | bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 166 | bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 167 | bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, robokid_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 32, 32); | |
| 176 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 177 | bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, robokid_bg_scan, 16, 16, 32, 32); | |
| 178 | bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, robokid_bg_scan, 16, 16, 32, 32); | |
| 179 | bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, robokid_bg_scan, 16, 16, 32, 32); | |
| 168 | 180 | |
| 169 | 181 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 170 | 182 | tilemap_set_transparent_pen(bg1_tilemap, 15); |
| r1679 | r1680 | |
| 179 | 191 | |
| 180 | 192 | videoram_alloc(machine, 0x2000); |
| 181 | 193 | |
| 182 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 183 | bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32); | |
| 184 | bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32); | |
| 185 | bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, omegaf_bg_scan, TILEMAP_TYPE_PEN, 16, 16, 128, 32); | |
| 194 | fg_tilemap = tilemap_create( get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 195 | bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, omegaf_bg_scan, 16, 16, 128, 32); | |
| 196 | bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, omegaf_bg_scan, 16, 16, 128, 32); | |
| 197 | bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, omegaf_bg_scan, 16, 16, 128, 32); | |
| 186 | 198 | |
| 187 | 199 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 188 | 200 | tilemap_set_transparent_pen(bg0_tilemap, 15); |
| r1679 | r1680 | |
| 194 | 206 | |
| 195 | 207 | |
| 196 | 208 | |
| 209 | /************************************* | |
| 210 | * | |
| 211 | * Memory handlers | |
| 212 | * | |
| 213 | *************************************/ | |
| 214 | ||
| 197 | 215 | WRITE8_HANDLER( ninjakd2_bgvideoram_w ) |
| 198 | 216 | { |
| 199 | 217 | ninjakd2_bg_videoram[offset] = data; |
| r1679 | r1680 | |
| 310 | 328 | } |
| 311 | 329 | |
| 312 | 330 | |
| 331 | ||
| 332 | /************************************* | |
| 333 | * | |
| 334 | * Video update | |
| 335 | * | |
| 336 | *************************************/ | |
| 337 | ||
| 313 | 338 | static void draw_sprites(running_machine* const machine, mame_bitmap* const bitmap, const rectangle* const cliprect) |
| 314 | 339 | { |
| 315 | 340 | const gfx_element* const gfx = machine->gfx[1]; |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( skydiver ) |
| 57 | 57 | { |
| 58 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 58 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 |
| r1679 | r1680 | |
|---|---|---|
| 167 | 167 | VIDEO_START( yunsung8 ) |
| 168 | 168 | { |
| 169 | 169 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 170 | | |
| 170 | | |
| 171 | 171 | |
| 172 | 172 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 173 | | |
| 173 | | |
| 174 | 174 | |
| 175 | 175 | tilemap_set_transparent_pen(tilemap_1,0); |
| 176 | 176 | } |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | |
| 156 | 156 | VIDEO_START( m52 ) |
| 157 | 157 | { |
| 158 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 158 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 159 | 159 | |
| 160 | 160 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 161 | 161 | tilemap_set_scrolldx(bg_tilemap, 128 - 1, -1); |
| r1679 | r1680 | |
| 332 | 332 | rect.max_y = ypos + 2 * BGHEIGHT - 1; |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | fillbitmap(bitmap, machine-> | |
| 335 | fillbitmap(bitmap, machine-> | |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 |
| r1679 | r1680 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | VIDEO_START( geebee ) |
| 183 | 183 | { |
| 184 | bg_tilemap = tilemap_create(geebee_get_tile_info,tilemap_scan, | |
| 184 | bg_tilemap = tilemap_create(geebee_get_tile_info,tilemap_scan, | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | VIDEO_START( navarone ) |
| 188 | 188 | { |
| 189 | bg_tilemap = tilemap_create(navarone_get_tile_info,tilemap_scan, | |
| 189 | bg_tilemap = tilemap_create(navarone_get_tile_info,tilemap_scan, | |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | VIDEO_START( warpwarp ) |
| 193 | 193 | { |
| 194 | bg_tilemap = tilemap_create(warpwarp_get_tile_info,tilemap_scan, | |
| 194 | bg_tilemap = tilemap_create(warpwarp_get_tile_info,tilemap_scan, | |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 |
| r1679 | r1680 | |
|---|---|---|
| 291 | 291 | return FALSE; |
| 292 | 292 | |
| 293 | 293 | /* adjust the timer */ |
| 294 | timer_adjust(object_timer, video_screen_get_time_until_pos(0, vc / 2, hdb), vc | (hdb << 16) | |
| 294 | timer_adjust_oneshot(object_timer, video_screen_get_time_until_pos(0, vc / 2, hdb), vc | (hdb << 16) | |
| 295 | 295 | return TRUE; |
| 296 | 296 | } |
| 297 | 297 |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | { |
| 92 | 92 | for (xtile = xstart; xtile != xend; xtile += xinc ) |
| 93 | 93 | { |
| 94 | const pen_t *pal = &Machine-> | |
| 94 | const pen_t *pal = &Machine-> | |
| 95 | 95 | const UINT8 *alpha = &jal_blend_table[gfx->color_granularity * (color % gfx->total_colors)]; |
| 96 | 96 | int source_base = ((code + code_offset++) % gfx->total_elements) * gfx->height; |
| 97 | 97 |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( gng ) |
| 57 | 57 | { |
| 58 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 59 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 58 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 59 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 60 | 60 | |
| 61 | 61 | tilemap_set_transparent_pen(fg_tilemap,3); |
| 62 | 62 |
| r1679 | r1680 | |
|---|---|---|
| 279 | 279 | |
| 280 | 280 | VIDEO_START( ojankohs ) |
| 281 | 281 | { |
| 282 | ojankohs_tilemap = tilemap_create(ojankohs_get_tile_info, tilemap_scan_rows, | |
| 282 | ojankohs_tilemap = tilemap_create(ojankohs_get_tile_info, tilemap_scan_rows, | |
| 283 | 283 | ojankohs_videoram = auto_malloc(0x2000); |
| 284 | 284 | ojankohs_colorram = auto_malloc(0x1000); |
| 285 | 285 | ojankohs_paletteram = auto_malloc(0x800); |
| r1679 | r1680 | |
| 287 | 287 | |
| 288 | 288 | VIDEO_START( ojankoy ) |
| 289 | 289 | { |
| 290 | ojankohs_tilemap = tilemap_create(ojankoy_get_tile_info, tilemap_scan_rows, | |
| 290 | ojankohs_tilemap = tilemap_create(ojankoy_get_tile_info, tilemap_scan_rows, | |
| 291 | 291 | ojankohs_videoram = auto_malloc(0x2000); |
| 292 | 292 | ojankohs_colorram = auto_malloc(0x1000); |
| 293 | 293 | ojankohs_paletteram = auto_malloc(0x800); |
| r1679 | r1680 | |
|---|---|---|
| 209 | 209 | state_save_register_item_array("Adder", 0, adder_ram); |
| 210 | 210 | state_save_register_item_2d_array("Adder", 0, adder_screen_ram); |
| 211 | 211 | |
| 212 | tilemap0 = tilemap_create(get_tile0_info, tilemap_scan_rows, | |
| 212 | tilemap0 = tilemap_create(get_tile0_info, tilemap_scan_rows, | |
| 213 | 213 | |
| 214 | tilemap1 = tilemap_create(get_tile1_info, tilemap_scan_rows, | |
| 214 | tilemap1 = tilemap_create(get_tile1_info, tilemap_scan_rows, | |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | // video update /////////////////////////////////////////////////////////// |
| r1679 | r1680 | |
|---|---|---|
| 65 | 65 | { |
| 66 | 66 | spacefev_red_cannon = 1; |
| 67 | 67 | |
| 68 | timer_adjust(cannon_timer, ATTOTIME_IN_USEC(550 * 68 * 10), 0 | |
| 68 | timer_adjust_oneshot(cannon_timer, ATTOTIME_IN_USEC(550 * 68 * 10), 0 | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | |
| r1679 | r1680 | |
| 73 | 73 | { |
| 74 | 74 | spacefev_red_cannon = 0; |
| 75 | 75 | |
| 76 | timer_adjust(cannon_timer, attotime_never, 0 | |
| 76 | timer_adjust_oneshot(cannon_timer, attotime_never, 0 | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 |
| r1679 | r1680 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | VIDEO_START( wc90b ) |
| 64 | 64 | { |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 66 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 67 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 65 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,64,32); | |
| 66 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 67 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 68 | 68 | |
| 69 | 69 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 70 | 70 | tilemap_set_transparent_pen(tx_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 112 | 112 | |
| 113 | 113 | VIDEO_START( kncljoe ) |
| 114 | 114 | { |
| 115 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 115 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 116 | 116 | |
| 117 | 117 | tilemap_set_scroll_rows(bg_tilemap,4); |
| 118 | 118 |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | VIDEO_START( holeland ) |
| 58 | 58 | { |
| 59 | bg_tilemap = tilemap_create(holeland_get_tile_info,tilemap_scan_rows, | |
| 59 | bg_tilemap = tilemap_create(holeland_get_tile_info,tilemap_scan_rows, | |
| 60 | 60 | |
| 61 | 61 | tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */ |
| 62 | 62 | tilemap_set_transmask(bg_tilemap,1,0x01,0xfe); /* split type 1 has pen 0? transparent in front half */ |
| r1679 | r1680 | |
| 64 | 64 | |
| 65 | 65 | VIDEO_START( crzrally ) |
| 66 | 66 | { |
| 67 | bg_tilemap = tilemap_create(crzrally_get_tile_info,tilemap_scan_cols, | |
| 67 | bg_tilemap = tilemap_create(crzrally_get_tile_info,tilemap_scan_cols, | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | WRITE8_HANDLER( holeland_videoram_w ) |
| r1679 | r1680 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | VIDEO_START( prosoccr ) |
| 121 | 121 | { |
| 122 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 123 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 122 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,16,16,32,32); | |
| 123 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,8,8,32,32); | |
| 124 | 124 | |
| 125 | 125 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | VIDEO_START( boomrang ) |
| 129 | 129 | { |
| 130 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 131 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 130 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,16,16,32,32); | |
| 131 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,8,8,32,32); | |
| 132 | 132 | |
| 133 | 133 | tilemap_set_transmask(background_tilemap,0,0x0001,0x007e); /* Bottom 1 pen/Top 7 pens */ |
| 134 | 134 | tilemap_set_transparent_pen(fix_tilemap,0); |
| r1679 | r1680 | |
| 136 | 136 | |
| 137 | 137 | VIDEO_START( liberate ) |
| 138 | 138 | { |
| 139 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 140 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 139 | background_tilemap = tilemap_create(get_back_tile_info,back_scan,16,16,32,32); | |
| 140 | fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,8,8,32,32); | |
| 141 | 141 | |
| 142 | 142 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 143 | 143 | } |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | VIDEO_START( spdodgeb ) |
| 81 | 81 | { |
| 82 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, | |
| 82 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 |
| r1679 | r1680 | |
|---|---|---|
| 29 | 29 | { |
| 30 | 30 | int i; |
| 31 | 31 | |
| 32 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 32 | /* allocate the colortable */ | |
| 33 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 34 | ||
| 35 | /* create a lookup table for the palette */ | |
| 36 | for (i = 0; i < 0x100; i++) | |
| 33 | 37 | { |
| 34 | int bit0, bit1, bit2, bit3, r, g, b; | |
| 38 | int r = pal4bit(color_prom[i + 0x000]); | |
| 39 | int g = pal4bit(color_prom[i + 0x100]); | |
| 40 | int b = pal4bit(color_prom[i + 0x200]); | |
| 35 | 41 | |
| 36 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 37 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 38 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 39 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 40 | ||
| 41 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 42 | ||
| 43 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 44 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 45 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 46 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 47 | ||
| 48 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 49 | ||
| 50 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 51 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 52 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 53 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 54 | ||
| 55 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 56 | ||
| 57 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 58 | color_prom++; | |
| 42 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 59 | 43 | } |
| 60 | 44 | |
| 61 | color_prom += 2 * machine->drv->total_colors; | |
| 62 | 45 | /* color_prom now points to the beginning of the lookup table */ |
| 46 | color_prom += 0x300; | |
| 63 | 47 | |
| 64 | /* characters use colors 64-79 */ | |
| 65 | for (i = 0; i < TOTAL_COLORS(0); i++) | |
| 66 | COLOR(0, i) = *(color_prom++) + 64; | |
| 67 | color_prom += 128; /* skip the bottom half of the PROM - not used */ | |
| 48 | /* characters use colors 0x40-0x4f */ | |
| 49 | for (i = 0; i < 0x80; i++) | |
| 50 | { | |
| 51 | UINT8 ctabentry = color_prom[i] | 0x40; | |
| 52 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 53 | } | |
| 68 | 54 | |
| 69 | /* background tiles use colors 0-63 */ | |
| 70 | for (i = 0; i < TOTAL_COLORS(1); i++) | |
| 55 | /* background tiles use colors 0-0x3f */ | |
| 56 | for (i = 0x100; i < 0x200; i++) | |
| 71 | 57 | { |
| 72 | COLOR(1, i) = color_prom[0] + 16 * (color_prom[256] & 0x03); | |
| 73 | color_prom++; | |
| 58 | UINT8 ctabentry = color_prom[i] | ((color_prom[i + 0x100] & 0x03) << 4); | |
| 59 | colortable_entry_set_value(machine->colortable, i - 0x80, ctabentry); | |
| 74 | 60 | } |
| 75 | color_prom += TOTAL_COLORS(1); | |
| 76 | 61 | |
| 77 | /* sprites use colors 128-255 */ | |
| 78 | for (i = 0; i < TOTAL_COLORS(2); i++) | |
| 62 | /* sprites use colors 0x80-0xff */ | |
| 63 | for (i = 0x300; i < 0x400; i++) | |
| 79 | 64 | { |
| 80 | COLOR(2, i) = color_prom[0] + 16 * (color_prom[256] & 0x07) + 128; | |
| 81 | color_prom++; | |
| 65 | UINT8 ctabentry = color_prom[i] | ((color_prom[i + 0x100] & 0x07) << 4) | 0x80; | |
| 66 | colortable_entry_set_value(machine->colortable, i - 0x180, ctabentry); | |
| 82 | 67 | } |
| 83 | color_prom += TOTAL_COLORS(2); | |
| 84 | 68 | } |
| 85 | 69 | |
| 86 | 70 | WRITE8_HANDLER( gunsmoke_videoram_w ) |
| r1679 | r1680 | |
| 144 | 128 | int code = videoram[tile_index] + ((attr & 0xe0) << 2); |
| 145 | 129 | int color = attr & 0x1f; |
| 146 | 130 | |
| 131 | tileinfo->group = color; | |
| 132 | ||
| 147 | 133 | SET_TILE_INFO(0, code, color, 0); |
| 148 | 134 | } |
| 149 | 135 | |
| r1679 | r1680 | |
| 154 | 140 | memory_configure_bank(1, 0, 4, &rombase[0x10000], 0x4000); |
| 155 | 141 | |
| 156 | 142 | /* create tilemaps */ |
| 157 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, | |
| 158 | TILEMAP_TYPE_PEN, 32, 32, 2048, 8); | |
| 143 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, 32, 32, 2048, 8); | |
| 144 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 159 | 145 | |
| 160 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 161 | TILEMAP_TYPE_COLORTABLE, 8, 8, 32, 32); | |
| 146 | colortable_configure_tilemap_groups(machine->colortable, fg_tilemap, machine->gfx[0], 0x4f); | |
| 162 | 147 | |
| 163 | tilemap_set_transparent_pen(fg_tilemap, 0x4f); | |
| 164 | ||
| 165 | 148 | /* register for saving */ |
| 166 | 149 | state_save_register_global(chon); |
| 167 | 150 | state_save_register_global(objon); |
| r1679 | r1680 | |
|---|---|---|
| 12 | 12 | #include "cvs.h" |
| 13 | 13 | |
| 14 | 14 | |
| 15 | #define MAX_STARS 250 | |
| 16 | #define STARS_COLOR_BASE 16 | |
| 15 | #define SPRITE_PEN_BASE (0x820) | |
| 16 | #define BULLET_STAR_PEN (0x828) | |
| 17 | 17 | |
| 18 | #define MAX_STARS 250 | |
| 19 | #define STARS_COLOR_BASE 16 | |
| 18 | 20 | |
| 19 | #ifdef LSB_FIRST | |
| 20 | #define BL0 0 | |
| 21 | #define BL1 1 | |
| 22 | #define BL2 2 | |
| 23 | #define BL3 3 | |
| 24 | #define WL0 0 | |
| 25 | #define WL1 1 | |
| 26 | #else | |
| 27 | #define BL0 3 | |
| 28 | #define BL1 2 | |
| 29 | #define BL2 1 | |
| 30 | #define BL3 0 | |
| 31 | #define WL0 1 | |
| 32 | #define WL1 0 | |
| 33 | #endif | |
| 34 | 21 | |
| 22 | static s2636_t *s2636_0, *s2636_1, *s2636_2; | |
| 23 | static mame_bitmap *background_bitmap; | |
| 24 | mame_bitmap *cvs_collision_background; | |
| 25 | static mame_bitmap *scrolled_collision_background; | |
| 35 | 26 | |
| 27 | int cvs_collision_register; | |
| 28 | ||
| 36 | 29 | struct star |
| 37 | 30 | { |
| 38 | 31 | int x,y,code; |
| r1679 | r1680 | |
| 45 | 38 | static UINT8 scroll_reg; |
| 46 | 39 | static int stars_scroll; |
| 47 | 40 | |
| 48 | static mame_bitmap *background_bitmap; | |
| 49 | mame_bitmap *cvs_collision_bitmap; | |
| 50 | mame_bitmap *cvs_collision_background; | |
| 51 | static mame_bitmap *scrolled_background; | |
| 52 | 41 | |
| 53 | int cvs_collision_register; | |
| 54 | ||
| 55 | ||
| 56 | 42 | /****************************************************** |
| 57 | 43 | * Convert Colour prom to format for Mame Colour Map * |
| 58 | 44 | * * |
| r1679 | r1680 | |
| 64 | 50 | |
| 65 | 51 | PALETTE_INIT( cvs ) |
| 66 | 52 | { |
| 67 | int attr | |
| 53 | int i, attr | |
| 68 | 54 | |
| 69 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 55 | /* allocate the colortable */ | |
| 56 | machine->colortable = colortable_alloc(machine, 0x10); | |
| 70 | 57 | |
| 71 | /* Colour Mapping Prom */ | |
| 72 | ||
| 73 | for(attr = 0;attr < 256; attr++) | |
| 58 | /* color mapping PROM */ | |
| 59 | for (attr = 0; attr < 0x100; attr++) | |
| 74 | 60 | { |
| 75 | for( | |
| 61 | for (i | |
| 76 | 62 | { |
| 77 | | |
| 63 | UINT8 ctabentry = color_prom[(i | |
| 78 | 64 | |
| 79 | 65 | /* bits 0 and 2 are swapped */ |
| 66 | ctabentry = BITSWAP8(ctabentry,7,6,5,4,3,0,1,2); | |
| 80 | 67 | |
| 81 | | |
| 68 | colort | |
| 82 | 69 | } |
| 83 | 70 | } |
| 84 | 71 | |
| 85 | /* Background Collision Map */ | |
| 86 | ||
| 87 | for(map=0;map<8;map++) | |
| 72 | /* background collision map */ | |
| 73 | for (i = 0; i < 8; i++) | |
| 88 | 74 | { |
| 89 | COLOR(0,2048+map) = (map & 4) >> 2; | |
| 90 | COLOR(0,2056+map) = (map & 2) >> 1; | |
| 91 | COLOR(0,2064+map) = ((map & 2) >> 1) || ((map & 4) >> 2); | |
| 75 | colortable_entry_set_value(machine->colortable, 0x800 + i, 0); | |
| 76 | colortable_entry_set_value(machine->colortable, 0x808 + i, i & 0x04); | |
| 77 | colortable_entry_set_value(machine->colortable, 0x810 + i, i & 0x02); | |
| 78 | colortable_entry_set_value(machine->colortable, 0x818 + i, i & 0x06); | |
| 92 | 79 | } |
| 93 | 80 | |
| 94 | /* Sprites */ | |
| 81 | /* sprites */ | |
| 82 | for (i = 0; i < 8; i++) | |
| 83 | colortable_entry_set_value(machine->colortable, SPRITE_PEN_BASE + i, i | 0x08); | |
| 95 | 84 | |
| 96 | for(map=0;map<8;map++) | |
| 85 | /* bullet */ | |
| 86 | colortable_entry_set_value(machine->colortable, BULLET_STAR_PEN, 7); | |
| 87 | } | |
| 88 | ||
| 89 | ||
| 90 | static void set_pens(running_machine *machine) | |
| 91 | { | |
| 92 | int i; | |
| 93 | ||
| 94 | for (i = 0; i < 0x10; i++) | |
| 97 | 95 | { |
| 98 | COLOR(1,map*2+0) = 0; | |
| 99 | COLOR(1,map*2+1) = 8 + map; | |
| 100 | } | |
| 96 | int r = pal2bit(~cvs_palette_ram[i] >> 0); | |
| 97 | int g = pal3bit(~cvs_palette_ram[i] >> 2); | |
| 98 | int b = pal3bit(~cvs_palette_ram[i] >> 5); | |
| 101 | 99 | |
| 102 | /* set the sprite chip offsets */ | |
| 103 | s2636_x_offset = -26; | |
| 104 | s2636_y_offset = 3; | |
| 100 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 101 | } | |
| 105 | 102 | } |
| 106 | 103 | |
| 107 | 104 | |
| 105 | ||
| 108 | 106 | WRITE8_HANDLER( cvs_video_fx_w ) |
| 109 | 107 | { |
| 110 | 108 | if (data & 0xce) |
| r1679 | r1680 | |
| 185 | 183 | } |
| 186 | 184 | } |
| 187 | 185 | |
| 186 | /* configure the S2636 chips */ | |
| 187 | s2636_0 = s2636_config(cvs_s2636_0_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 188 | s2636_1 = s2636_config(cvs_s2636_1_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 189 | s2636_2 = s2636_config(cvs_s2636_2_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 188 | 190 | |
| 189 | /* create the bitmaps for the S2636 chips */ | |
| 190 | s2636_1_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 191 | s2636_2_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 192 | s2636_3_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 193 | ||
| 194 | ||
| 195 | 191 | /* create helper bitmaps */ |
| 196 | 192 | background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 197 | cvs_collision_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 198 | cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 199 | scrolled_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED8); | |
| 193 | cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 194 | scrolled_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 200 | 195 | } |
| 201 | 196 | |
| 202 | 197 | |
| r1679 | r1680 | |
| 215 | 210 | offs_t offs; |
| 216 | 211 | int scroll[8]; |
| 217 | 212 | UINT8 character_banking_mode; |
| 213 | mame_bitmap *s2636_0_bitmap; | |
| 214 | mame_bitmap *s2636_1_bitmap; | |
| 215 | mame_bitmap *s2636_2_bitmap; | |
| 218 | 216 | |
| 217 | set_pens(machine); | |
| 219 | 218 | |
| 220 | /* set the palette */ | |
| 221 | for (offs = 0; offs < 0x10; offs++) | |
| 222 | { | |
| 223 | UINT8 data = cvs_palette_ram[offs]; | |
| 224 | ||
| 225 | palette_set_color_rgb(machine, offs, pal2bit(~data >> 0), pal3bit(~data >> 2), pal3bit(~data >> 5)); | |
| 226 | } | |
| 227 | ||
| 228 | ||
| 229 | 219 | /* create our background character set, which is a software |
| 230 | 220 | selectable mixture of RAM and ROM based tiles */ |
| 231 | 221 | |
| r1679 | r1680 | |
| 239 | 229 | for (; code < 0x100; code++) |
| 240 | 230 | decodechar(machine->gfx[0], code, cvs_character_ram); |
| 241 | 231 | |
| 242 | ||
| 243 | 232 | /* draw the background */ |
| 244 | 233 | for (offs = 0; offs < 0x0400; offs++) |
| 245 | 234 | { |
| 246 | int collision_color = 0; | |
| 235 | int collision_color = 0x100; | |
| 247 | 236 | |
| 248 | 237 | UINT8 code = cvs_video_ram[offs]; |
| 249 | 238 | UINT8 color = cvs_color_ram[offs]; |
| r1679 | r1680 | |
| 259 | 248 | |
| 260 | 249 | /* foreground for collision detection */ |
| 261 | 250 | if (color & 0x80) |
| 262 | collision_color = | |
| 251 | collision_color = 0x103; | |
| 263 | 252 | else |
| 264 | 253 | { |
| 265 | if ((color & 0x03) == 3) | |
| 266 | collision_color = 256; | |
| 267 | else if((color & 0x01) == 0) | |
| 268 | collision_color = 257; | |
| 254 | if ((color & 0x03) == 0x03) | |
| 255 | collision_color = 0x101; | |
| 256 | else if ((color & 0x01) == 0) | |
| 257 | collision_color = 0x102; | |
| 269 | 258 | } |
| 270 | 259 | |
| 271 | if (collision_color) | |
| 272 | drawgfx(cvs_collision_background, machine->gfx[0], | |
| 273 | code, collision_color, | |
| 274 | 0, 0, | |
| 275 | x, y, | |
| 276 | 0, TRANSPARENCY_NONE, 0); | |
| 260 | drawgfx(cvs_collision_background, machine->gfx[0], | |
| 261 | code, collision_color, | |
| 262 | 0, 0, | |
| 263 | x, y, | |
| 264 | 0, TRANSPARENCY_NONE, 0); | |
| 277 | 265 | } |
| 278 | 266 | |
| 279 | 267 | |
| r1679 | r1680 | |
| 288 | 276 | scroll[6] = 0; |
| 289 | 277 | scroll[7] = 0; |
| 290 | 278 | |
| 291 | copyscrollbitmap(bitmap,background_bitmap,0,0,8,scroll,&machine->screen[0].visarea); | |
| 292 | copyscrollbitmap(scrolled_background,cvs_collision_background,0,0,8,scroll,&machine->screen[0].visarea); | |
| 279 | copyscrollbitmap(bitmap, background_bitmap, 0, 0, 8, scroll, cliprect); | |
| 280 | copyscrollbitmap(scrolled_collision_background, cvs_collision_background, 0, 0, 8, scroll, cliprect); | |
| 293 | 281 | |
| 294 | /* 2636's */ | |
| 282 | /* update the S2636 chips */ | |
| 283 | s2636_0_bitmap = s2636_update(s2636_0, cliprect); | |
| 284 | s2636_1_bitmap = s2636_update(s2636_1, cliprect); | |
| 285 | s2636_2_bitmap = s2636_update(s2636_2, cliprect); | |
| 295 | 286 | |
| 296 | fillbitmap(s2636_1_bitmap,0,0); | |
| 297 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram,1,cvs_collision_bitmap); | |
| 298 | ||
| 299 | fillbitmap(s2636_2_bitmap,0,0); | |
| 300 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram,2,cvs_collision_bitmap); | |
| 301 | ||
| 302 | fillbitmap(s2636_3_bitmap,0,0); | |
| 303 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram,3,cvs_collision_bitmap); | |
| 304 | ||
| 305 | 287 | /* Bullet Hardware */ |
| 306 | ||
| 307 | 288 | for (offs = 8; offs < 256; offs++ ) |
| 308 | 289 | { |
| 309 | 290 | if (cvs_bullet_ram[offs] != 0) |
| r1679 | r1680 | |
| 314 | 295 | int bx=255-7-cvs_bullet_ram[offs]-ct; |
| 315 | 296 | |
| 316 | 297 | /* Bullet/Object Collision */ |
| 317 | if ((*BITMAP_ADDR8(s2636_1_bitmap, offs, bx) != 0) || | |
| 318 | (*BITMAP_ADDR8(s2636_2_bitmap, offs, bx) != 0) || | |
| 319 | (*BITMAP_ADDR8(s2636_3_bitmap, offs, bx) != 0)) | |
| 320 | cvs_collision_register |= 8; | |
| 298 | if ((*BITMAP_ADDR8(s2636_0_bitmap, offs, bx) != 0) || | |
| 299 | (*BITMAP_ADDR8(s2636_1_bitmap, offs, bx) != 0) || | |
| 300 | (*BITMAP_ADDR8(s2636_2_bitmap, offs, bx) != 0)) | |
| 301 | cvs_collision_register |= 0x08; | |
| 321 | 302 | |
| 322 | 303 | /* Bullet/Background Collision */ |
| 323 | if (*BITMAP_ADDR | |
| 304 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(scrolled_collision_background, offs, bx)) | |
| 324 | 305 | cvs_collision_register |= 0x80; |
| 325 | 306 | |
| 326 | *BITMAP_ADDR16(bitmap, offs, bx) = machine->pens[ | |
| 307 | *BITMAP_ADDR16(bitmap, offs, bx) = machine->pens[BULLET_STAR_PEN]; | |
| 327 | 308 | } |
| 328 | 309 | } |
| 329 | 310 | } |
| 330 | 311 | |
| 331 | /* Update 2636 images */ | |
| 332 | 312 | |
| 313 | /* mix and copy the S2636 images into the main bitmap, also check for collision */ | |
| 333 | 314 | { |
| 334 | int x; | |
| 335 | UINT32 S1,S2,S3,SB,pen; | |
| 315 | int y; | |
| 336 | 316 | |
| 337 | for( | |
| 317 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 338 | 318 | { |
| 339 | UINT32 *sp1 = (UINT32 *)BITMAP_ADDR8(s2636_1_bitmap, x, 0); | |
| 340 | UINT32 *sp2 = (UINT32 *)BITMAP_ADDR8(s2636_2_bitmap, x, 0); | |
| 341 | UINT32 *sp3 = (UINT32 *)BITMAP_ADDR8(s2636_3_bitmap, x, 0); | |
| 342 | UINT64 *dst = (UINT64 *)BITMAP_ADDR16(bitmap, x, 0); | |
| 343 | UINT8 *spb = (UINT8 *)BITMAP_ADDR8(scrolled_background, x, 0); | |
| 319 | int x; | |
| 344 | 320 | |
| 345 | for( | |
| 321 | for (x | |
| 346 | 322 | { |
| 347 | S1 = (*sp1++); | |
| 348 | S2 = (*sp2++); | |
| 349 | S3 = (*sp3++); | |
| 323 | int pixel0 = *BITMAP_ADDR8(s2636_0_bitmap, y, x); | |
| 324 | int pixel1 = *BITMAP_ADDR8(s2636_1_bitmap, y, x); | |
| 325 | int pixel2 = *BITMAP_ADDR8(s2636_2_bitmap, y, x); | |
| 350 | 326 | |
| 351 | pe | |
| 327 | int pixel = pixel0 | pixel1 | pixel2; | |
| 352 | 328 | |
| 353 | if(pe | |
| 329 | if (S2636_IS_PIXEL_DRAWN(pixel)) | |
| 354 | 330 | { |
| 355 | UINT16 *address = (UINT16 *)dst; | |
| 356 | if (pen & 0xff000000) address[BL3] = machine->pens[(pen >> 24) & 15]; | |
| 357 | if (pen & 0x00ff0000) address[BL2] = machine->pens[(pen >> 16) & 15]; | |
| 358 | if (pen & 0x0000ff00) address[BL1] = machine->pens[(pen >> 8) & 15]; | |
| 359 | if (pen & 0x000000ff) address[BL0] = machine->pens[(pen & 15)]; | |
| 331 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[SPRITE_PEN_BASE + S2636_PIXEL_COLOR(pixel)]; | |
| 360 | 332 | |
| 361 | /* Collision Detection */ | |
| 333 | /* S2636 vs. S2636 collision detection */ | |
| 334 | if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel1)) cvs_collision_register |= 0x01; | |
| 335 | if (S2636_IS_PIXEL_DRAWN(pixel1) && S2636_IS_PIXEL_DRAWN(pixel2)) cvs_collision_register |= 0x02; | |
| 336 | if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel2)) cvs_collision_register |= 0x04; | |
| 362 | 337 | |
| 363 | SB = 0; | |
| 364 | if (spb[BL3] != machine->pens[0]) SB = 0x08000000; | |
| 365 | if (spb[BL2] != machine->pens[0]) SB |= 0x00080000; | |
| 366 | if (spb[BL1] != machine->pens[0]) SB |= 0x00000800; | |
| 367 | if (spb[BL0] != machine->pens[0]) SB |= 0x00000008; | |
| 368 | ||
| 369 | if (S1 & S2) cvs_collision_register |= 1; | |
| 370 | if (S2 & S3) cvs_collision_register |= 2; | |
| 371 | if (S1 & S3) cvs_collision_register |= 4; | |
| 372 | ||
| 373 | if (SB) | |
| 338 | /* S2636 vs. background collision detection */ | |
| 339 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(scrolled_collision_background, y, x))) | |
| 374 | 340 | { |
| 375 | if (S1 & SB) cvs_collision_register |= 16; | |
| 376 | if (S2 & SB) cvs_collision_register |= 32; | |
| 377 | if (S3 & SB) cvs_collision_register |= 64; | |
| 341 | if (S2636_IS_PIXEL_DRAWN(pixel0)) cvs_collision_register |= 0x10; | |
| 342 | if (S2636_IS_PIXEL_DRAWN(pixel1)) cvs_collision_register |= 0x20; | |
| 343 | if (S2636_IS_PIXEL_DRAWN(pixel2)) cvs_collision_register |= 0x40; | |
| 378 | 344 | } |
| 379 | 345 | } |
| 380 | ||
| 381 | dst++; | |
| 382 | spb+=4; | |
| 383 | 346 | } |
| 384 | 347 | } |
| 385 | 348 | } |
| r1679 | r1680 | |
| 405 | 368 | if (flip_screen_y) |
| 406 | 369 | y = ~y; |
| 407 | 370 | |
| 408 | if (*BITMAP_ADDR16(bitmap, y, x) == machine->pens[0]) | |
| 409 | { | |
| 410 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[7]; | |
| 411 | } | |
| 371 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(bitmap, y, x)) == 0) | |
| 372 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[BULLET_STAR_PEN]; | |
| 412 | 373 | } |
| 413 | 374 | } |
| 414 | 375 | } |
| 415 | 376 | } |
| 416 | 377 | |
| 417 | ||
| 418 | 378 | return 0; |
| 419 | 379 | } |
| r1679 | r1680 | |
|---|---|---|
| 179 | 179 | turbo_state *state = machine->driver_data; |
| 180 | 180 | |
| 181 | 181 | /* initialize the foreground tilemap */ |
| 182 | state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 182 | state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| r1679 | r1680 | |
| 188 | 188 | turbo_state *state = machine->driver_data; |
| 189 | 189 | |
| 190 | 190 | /* initialize the foreground tilemap */ |
| 191 | state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 191 | state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, | |
| 192 | 192 | |
| 193 | 193 | /* allocate the bitmap RAM */ |
| 194 | 194 | state->buckrog_bitmap_ram = auto_malloc(0xe000); |
| r1679 | r1680 | |
|---|---|---|
| 446 | 446 | |
| 447 | 447 | /* layer 0 */ |
| 448 | 448 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 449 | | |
| 449 | | |
| 450 | 450 | |
| 451 | 451 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 452 | | |
| 452 | | |
| 453 | 453 | |
| 454 | 454 | |
| 455 | 455 | /* layer 1 */ |
| 456 | 456 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 457 | | |
| 457 | | |
| 458 | 458 | |
| 459 | 459 | tilemap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 460 | | |
| 460 | | |
| 461 | 461 | |
| 462 | 462 | tilemaps_flip = 0; |
| 463 | 463 | |
| r1679 | r1680 | |
| 479 | 479 | |
| 480 | 480 | /* layer 0 */ |
| 481 | 481 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 482 | | |
| 482 | | |
| 483 | 483 | |
| 484 | 484 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 485 | | |
| 485 | | |
| 486 | 486 | |
| 487 | 487 | |
| 488 | 488 | /* NO layer 1 */ |
| r1679 | r1680 | |
| 505 | 505 | |
| 506 | 506 | /* layer 0 */ |
| 507 | 507 | tilemap_0 = tilemap_create( twineagl_get_tile_info_0, tilemap_scan_rows, |
| 508 | | |
| 508 | | |
| 509 | 509 | |
| 510 | 510 | tilemap_1 = tilemap_create( twineagl_get_tile_info_1, tilemap_scan_rows, |
| 511 | | |
| 511 | | |
| 512 | 512 | |
| 513 | 513 | |
| 514 | 514 | /* NO layer 1 */ |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | #include "deprecat.h" |
| 11 | 12 | |
| 12 | 13 | UINT8 *tp84_videoram2, *tp84_colorram2; |
| r1679 | r1680 | |
| 51 | 52 | */ |
| 52 | 53 | PALETTE_INIT( tp84 ) |
| 53 | 54 | { |
| 55 | static const int resistances[4] = { 1000, 470, 220, 100 }; | |
| 56 | double rweights[4], gweights[4], bweights[4]; | |
| 54 | 57 | int i; |
| 55 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 56 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 57 | 58 | |
| 59 | /* compute the color output resistor weights */ | |
| 60 | compute_resistor_weights(0, 255, -1.0, | |
| 61 | 4, resistances, rweights, 470, 0, | |
| 62 | 4, resistances, gweights, 470, 0, | |
| 63 | 4, resistances, bweights, 470, 0); | |
| 58 | 64 | |
| 59 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 65 | /* allocate the colortable */ | |
| 66 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 67 | ||
| 68 | /* create a lookup table for the palette */ | |
| 69 | for (i = 0; i < 0x100; i++) | |
| 60 | 70 | { |
| 61 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 71 | int bit0, bit1, bit2, bit3; | |
| 72 | int r, g, b; | |
| 62 | 73 | |
| 63 | 74 | /* red component */ |
| 64 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 65 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 66 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 67 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 68 | r = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; | |
| 75 | bit0 = (color_prom[i + 0x000] >> 0) & 0x01; | |
| 76 | bit1 = (color_prom[i + 0x000] >> 1) & 0x01; | |
| 77 | bit2 = (color_prom[i + 0x000] >> 2) & 0x01; | |
| 78 | bit3 = (color_prom[i + 0x000] >> 3) & 0x01; | |
| 79 | r = combine_4_weights(rweights, bit0, bit1, bit2, bit3); | |
| 80 | ||
| 69 | 81 | /* green component */ |
| 70 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 71 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 72 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 73 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 74 | g = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; | |
| 82 | bit0 = (color_prom[i + 0x100] >> 0) & 0x01; | |
| 83 | bit1 = (color_prom[i + 0x100] >> 1) & 0x01; | |
| 84 | bit2 = (color_prom[i + 0x100] >> 2) & 0x01; | |
| 85 | bit3 = (color_prom[i + 0x100] >> 3) & 0x01; | |
| 86 | g = combine_4_weights(gweights, bit0, bit1, bit2, bit3); | |
| 87 | ||
| 75 | 88 | /* blue component */ |
| 76 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 77 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 78 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 79 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 80 | b = 0x0e * bit0 + 0x1f * bit1 + 0x42 * bit2 + 0x90 * bit3; | |
| 89 | bit0 = (color_prom[i + 0x200] >> 0) & 0x01; | |
| 90 | bit1 = (color_prom[i + 0x200] >> 1) & 0x01; | |
| 91 | bit2 = (color_prom[i + 0x200] >> 2) & 0x01; | |
| 92 | bit3 = (color_prom[i + 0x200] >> 3) & 0x01; | |
| 93 | b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); | |
| 81 | 94 | |
| 82 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 83 | ||
| 84 | color_prom++; | |
| 95 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 85 | 96 | } |
| 86 | 97 | |
| 87 | color_prom += 2*machine->drv->total_colors; | |
| 88 | 98 | /* color_prom now points to the beginning of the lookup table */ |
| 99 | color_prom += 0x300; | |
| 89 | 100 | |
| 90 | ||
| 91 | /* characters use colors 128-255 */ | |
| 92 | for (i = 0;i < TOTAL_COLORS(0)/8;i++) | |
| 101 | /* characters use colors 0x80-0xff, sprites use colors 0-0x7f */ | |
| 102 | for (i = 0; i < 0x200; i++) | |
| 93 | 103 | { |
| 94 | 104 | int j; |
| 95 | 105 | |
| 96 | ||
| 97 | for (j = 0;j < 8;j++) | |
| 98 | COLOR(0,i+256*j) = *color_prom + 128 + 16*j; | |
| 99 | ||
| 100 | color_prom++; | |
| 101 | } | |
| 102 | ||
| 103 | /* sprites use colors 0-127 */ | |
| 104 | for (i = 0;i < TOTAL_COLORS(1)/8;i++) | |
| 105 | { | |
| 106 | int j; | |
| 107 | ||
| 108 | ||
| 109 | for (j = 0;j < 8;j++) | |
| 106 | for (j = 0; j < 8; j++) | |
| 110 | 107 | { |
| 111 | if (*color_prom) COLOR(1,i+256*j) = *color_prom + 16*j; | |
| 112 | else COLOR(1,i+256*j) = 0; /* preserve transparency */ | |
| 108 | UINT8 ctabentry = ((~i & 0x100) >> 1) | (j << 4) | (color_prom[i] & 0x0f); | |
| 109 | colortable_entry_set_value(machine->colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); | |
| 113 | 110 | } |
| 114 | ||
| 115 | color_prom++; | |
| 116 | 111 | } |
| 117 | 112 | } |
| 118 | 113 | |
| r1679 | r1680 | |
| 204 | 199 | VIDEO_START( tp84 ) |
| 205 | 200 | { |
| 206 | 201 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 207 | | |
| 202 | | |
| 208 | 203 | |
| 209 | 204 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 210 | | |
| 205 | | |
| 211 | 206 | |
| 212 | 207 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 213 | 208 | |
| r1679 | r1680 | |
| 248 | 243 | color, |
| 249 | 244 | flipx,flipy, |
| 250 | 245 | sx,sy, |
| 251 | &clip,TRANSPARENCY_COLOR,0); | |
| 246 | &clip,TRANSPARENCY_PENS, | |
| 247 | colortable_get_transpen_mask(machine->colortable, gfx, color, coloffset)); | |
| 252 | 248 | } |
| 253 | 249 | } |
| 254 | 250 | } |
| r1679 | r1680 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | VIDEO_START( vb ) |
| 52 | 52 | { |
| 53 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, | |
| 53 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, | |
| 54 | 54 | |
| 55 | 55 | tilemap_set_scroll_rows(bg_tilemap,32); |
| 56 | 56 | } |
| r1679 | r1680 | |
|---|---|---|
| 75 | 75 | machine->gfx[ttl_gfx_index]->total_colors = machine->drv->total_colors / 16; |
| 76 | 76 | |
| 77 | 77 | // create the tilemap |
| 78 | ttl_tilemap = tilemap_create(ttl_get_tile_info, tilemap_scan_rows, | |
| 78 | ttl_tilemap = tilemap_create(ttl_get_tile_info, tilemap_scan_rows, | |
| 79 | 79 | |
| 80 | 80 | tilemap_set_transparent_pen(ttl_tilemap, 0); |
| 81 | 81 |
| r1679 | r1680 | |
|---|---|---|
| 22 | 22 | PALETTE_INIT( higemaru ) |
| 23 | 23 | { |
| 24 | 24 | int i; |
| 25 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 26 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 27 | 25 | |
| 26 | /* allocate the colortable */ | |
| 27 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 28 | 28 | |
| 29 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 29 | /* create a lookup table for the palette */ | |
| 30 | for (i = 0; i < 0x20; i++) | |
| 30 | 31 | { |
| 31 | int bit0,bit1,bit2,r,g,b; | |
| 32 | int bit0, bit1, bit2; | |
| 33 | int r, g, b; | |
| 32 | 34 | |
| 33 | 35 | /* red component */ |
| 34 | bit0 = (*color_prom >> 0) & 0x01; | |
| 35 | bit1 = (*color_prom >> 1) & 0x01; | |
| 36 | bit2 = (*color_prom >> 2) & 0x01; | |
| 36 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 37 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 38 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 37 | 39 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 40 | ||
| 38 | 41 | /* green component */ |
| 39 | bit0 = (*color_prom >> 3) & 0x01; | |
| 40 | bit1 = (*color_prom >> 4) & 0x01; | |
| 41 | bit2 = (*color_prom >> 5) & 0x01; | |
| 42 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 43 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 44 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 42 | 45 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 46 | ||
| 43 | 47 | /* blue component */ |
| 44 | 48 | bit0 = 0; |
| 45 | bit1 = (*color_prom >> 6) & 0x01; | |
| 46 | bit2 = (*color_prom >> 7) & 0x01; | |
| 49 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 50 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 47 | 51 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 48 | 52 | |
| 49 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 50 | color_prom++; | |
| 53 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 51 | 54 | } |
| 52 | 55 | |
| 53 | 56 | /* color_prom now points to the beginning of the lookup table */ |
| 57 | color_prom += 0x20; | |
| 54 | 58 | |
| 55 | 59 | /* characters use colors 0-15 */ |
| 56 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 57 | COLOR(0,i) = *(color_prom++) & 0x0f; | |
| 60 | for (i = 0; i < 0x80; i++) | |
| 61 | { | |
| 62 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 63 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 64 | } | |
| 58 | 65 | |
| 59 | color_prom += 128; /* the bottom half of the PROM doesn't seem to be used */ | |
| 60 | ||
| 61 | 66 | /* sprites use colors 16-31 */ |
| 62 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 63 | COLOR(1,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 67 | for (i = 0x80; i < 0x180; i++) | |
| 68 | { | |
| 69 | UINT8 ctabentry = (color_prom[i + 0x80] & 0x0f) | 0x10; | |
| 70 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 71 | } | |
| 64 | 72 | } |
| 65 | 73 | |
| 66 | 74 | WRITE8_HANDLER( higemaru_c800_w ) |
| r1679 | r1680 | |
| 89 | 97 | |
| 90 | 98 | VIDEO_START( higemaru ) |
| 91 | 99 | { |
| 92 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 93 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 100 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 94 | 101 | } |
| 95 | 102 | |
| 96 | 103 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | 108 | /* initialize the playfield */ |
| 109 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 109 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 110 | 110 | |
| 111 | 111 | /* initialize the second playfield */ |
| 112 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 112 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 113 | 113 | tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0); |
| 114 | 114 | |
| 115 | 115 | /* initialize the motion objects */ |
| 116 | 116 | atarimo_init(machine, 0, &modesc); |
| 117 | 117 | |
| 118 | 118 | /* initialize the alphanumerics */ |
| 119 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 119 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 120 | 120 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 121 | 121 | } |
| 122 | 122 |
| r1679 | r1680 | |
|---|---|---|
| 211 | 211 | spriteram_words = spriteram_size / 2; |
| 212 | 212 | |
| 213 | 213 | background = tilemap_create( |
| 214 | get_bg_tile_info, tilemap_scan_rows, | |
| 214 | get_bg_tile_info, tilemap_scan_rows, | |
| 215 | 215 | |
| 216 | 216 | foreground = tilemap_create( |
| 217 | get_fg_tile_info, tilemap_scan_rows, | |
| 217 | get_fg_tile_info, tilemap_scan_rows, | |
| 218 | 218 | |
| 219 | 219 | tilemap_set_transparent_pen( background, 0 ); |
| 220 | 220 | tilemap_set_transparent_pen( foreground, 0 ); |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | UINT16 *magmax_scroll_x; |
| 13 | 13 | UINT16 *magmax_scroll_y; |
| 14 | UINT16 magmax_vreg; | |
| 14 | UINT16 *magmax_vreg; | |
| 15 | 15 | static int flipscreen = 0; |
| 16 | 16 | |
| 17 | static UINT32 pens_line_tab[256]; | |
| 18 | static UINT32 *prom_tab = NULL; | |
| 17 | static UINT32 *prom_tab; | |
| 19 | 18 | |
| 20 | 19 | |
| 21 | static void blit_horiz_pixel_line(mame_bitmap *b,int x,int y,int w, UINT32* pens) | |
| 22 | { | |
| 23 | UINT16* lineadr = BITMAP_ADDR16(b, y, x); | |
| 24 | while(w-->0) | |
| 25 | { | |
| 26 | *lineadr++ = (UINT16)(*pens); | |
| 27 | pens++; | |
| 28 | } | |
| 29 | } | |
| 30 | ||
| 31 | ||
| 32 | 20 | /*************************************************************************** |
| 33 | 21 | |
| 34 | 22 | Convert the color PROMs into a more useable format. |
| r1679 | r1680 | |
| 45 | 33 | PALETTE_INIT( magmax ) |
| 46 | 34 | { |
| 47 | 35 | int i; |
| 48 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 49 | #define COLOR(gfxn, offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 50 | 36 | |
| 51 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 37 | /* allocate the colortable */ | |
| 38 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 39 | ||
| 40 | /* create a lookup table for the palette */ | |
| 41 | for (i = 0; i < 0x100; i++) | |
| 52 | 42 | { |
| 53 | int bit0, bit1, bit2, bit3, r, g, b; | |
| 43 | int r = pal4bit(color_prom[i + 0x000]); | |
| 44 | int g = pal4bit(color_prom[i + 0x100]); | |
| 45 | int b = pal4bit(color_prom[i + 0x200]); | |
| 54 | 46 | |
| 55 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 56 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 57 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 58 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 59 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 60 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 61 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 62 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 63 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 64 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 65 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 66 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 67 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 68 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 69 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 70 | ||
| 71 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 72 | color_prom++; | |
| 47 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 73 | 48 | } |
| 74 | 49 | |
| 75 | color_prom += 2*machine->drv->total_colors; | |
| 76 | /* color_prom now points to the beginning of the lookup tables */ | |
| 50 | /* color_prom now points to the beginning of the lookup table */ | |
| 51 | color_prom += 0x300; | |
| 77 | 52 | |
| 78 | /* characters use colors 0-15 */ | |
| 79 | for (i = 0; i < TOTAL_COLORS(0);i++) | |
| 80 | COLOR(0, i) = i; | |
| 53 | /* characters use colors 0-0x0f */ | |
| 54 | for (i = 0; i < 0x10; i++) | |
| 55 | colortable_entry_set_value(machine->colortable, i, i); | |
| 81 | 56 | |
| 82 | /*sprites use colors 16-32, color 31 being transparent*/ | |
| 83 | for (i = 0; i < TOTAL_COLORS(1);i++) | |
| 57 | /*sprites use colors 0x10-0x1f, color 0x1f being transparent*/ | |
| 58 | for (i = 0x10; i < 0x110; i++) | |
| 84 | 59 | { |
| 85 | COLOR(1, i) = *(color_prom++) + 16; | |
| 60 | UINT8 ctabentry = (color_prom[i - 0x10] & 0x0f) | 0x10; | |
| 61 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 86 | 62 | } |
| 87 | 63 | |
| 64 | /* background uses all colors (no lookup table) */ | |
| 65 | for (i = 0x110; i < 0x210; i++) | |
| 66 | colortable_entry_set_value(machine->colortable, i, i - 0x110); | |
| 67 | ||
| 88 | 68 | } |
| 89 | 69 | |
| 90 | 70 | VIDEO_START( magmax ) |
| r1679 | r1680 | |
| 93 | 73 | UINT8 * prom14D = memory_region(REGION_USER2); |
| 94 | 74 | |
| 95 | 75 | /* Set up save state */ |
| 96 | state_save_register_global( | |
| 76 | state_save_register_global(flipsc | |
| 97 | 77 | |
| 98 | 78 | prom_tab = auto_malloc(256 * sizeof(UINT32)); |
| 99 | 79 | |
| r1679 | r1680 | |
| 114 | 94 | int offs; |
| 115 | 95 | |
| 116 | 96 | /* bit 2 flip screen */ |
| 117 | if (flipscreen != (magmax_vreg & 0x04)) | |
| 118 | { | |
| 119 | flipscreen = magmax_vreg & 0x04; | |
| 120 | } | |
| 97 | flipscreen = *magmax_vreg & 0x04; | |
| 121 | 98 | |
| 122 | 99 | /* copy the background graphics */ |
| 123 | if (magmax_vreg & 0x40) /* background disable */ | |
| 124 | { | |
| 100 | if (*magmax_vreg & 0x40) /* background disable */ | |
| 125 | 101 | fillbitmap(bitmap, machine->pens[0], cliprect); |
| 126 | } | |
| 127 | 102 | else |
| 128 | 103 | { |
| 129 | | |
| 104 | int | |
| 130 | 105 | UINT8 * rom18B = memory_region(REGION_USER1); |
| 131 | 106 | UINT32 scroll_h = (*magmax_scroll_x) & 0x3fff; |
| 132 | 107 | UINT32 scroll_v = (*magmax_scroll_y) & 0xff; |
| r1679 | r1680 | |
| 136 | 111 | |
| 137 | 112 | for (v = 2*8; v < 30*8; v++) /*only for visible area*/ |
| 138 | 113 | { |
| 114 | int h; | |
| 115 | UINT8 line_data[256]; | |
| 116 | ||
| 139 | 117 | UINT32 map_v_scr_100 = (scroll_v + v) & 0x100; |
| 140 | 118 | UINT32 rom18D_addr = ((scroll_v + v) & 0xf8) + (map_v_scr_100<<5); |
| 141 | 119 | UINT32 rom15F_addr = (((scroll_v + v) & 0x07)<<2) + (map_v_scr_100<<5); |
| 142 | 120 | UINT32 map_v_scr_1fe_6 =((scroll_v + v) & 0x1fe)<<6; |
| 143 | 121 | |
| 144 | const pen_t *pens = &machine->pens[ | |
| 122 | const pen_t *pens = &machine->pens[0x110 + 0x20 + (map_v_scr_100>>1)]; | |
| 145 | 123 | |
| 146 | | |
| 124 | | |
| 147 | 125 | { |
| 148 | /* we are drawing surface */ | |
| 149 | for (h = 0; h < 0x80; h++) | |
| 150 | { | |
| 151 | UINT32 graph_data; | |
| 152 | UINT32 graph_color; | |
| 153 | UINT32 LS283; | |
| 154 | UINT32 prom_data; | |
| 126 | UINT32 graph_data; | |
| 127 | UINT32 graph_color; | |
| 128 | UINT32 LS283; | |
| 129 | UINT32 prom_data; | |
| 155 | 130 | |
| 156 | | |
| 131 | | |
| 157 | 132 | |
| 158 | prom_data = prom_tab[ (LS283 >> 6) & 0xff ]; | |
| 159 | ||
| 160 | rom18D_addr &= 0x20f8; | |
| 161 | rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3); | |
| 162 | ||
| 163 | rom15F_addr &= 0x201c; | |
| 164 | rom15F_addr += (rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1); | |
| 165 | rom15F_addr += (prom_data & 0x4000); | |
| 166 | ||
| 167 | graph_color = (prom_data & 0x0070); | |
| 168 | ||
| 169 | graph_data = rom18B[0x8000 + rom15F_addr]; | |
| 170 | if ((LS283 & 1)) | |
| 171 | graph_data >>= 4; | |
| 172 | graph_data &= 0x0f; | |
| 173 | ||
| 174 | pens_line_tab[h] = pens[graph_color + graph_data]; | |
| 175 | ||
| 176 | /*priority: background over sprites*/ | |
| 177 | /* not possible on the surface*/ | |
| 178 | //if ((map_v_scr_100) && ((graph_data & 0x0c)==0x0c)) | |
| 179 | //{ | |
| 180 | // *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data]; | |
| 181 | //} | |
| 182 | } | |
| 183 | for (h = 0x80; h < 0x100; h++) | |
| 133 | if (!map_v_scr_100) | |
| 184 | 134 | { |
| 185 | UINT32 graph_data; | |
| 186 | UINT32 graph_color; | |
| 187 | UINT32 LS283; | |
| 188 | UINT32 prom_data; | |
| 189 | ||
| 190 | LS283 = scroll_h + h + (rom18B[ (map_v_scr_1fe_6) + (h ^ 0xff) ] ^ 0xff); | |
| 191 | ||
| 192 | prom_data = prom_tab[ (LS283 >> 6) & 0xff ]; | |
| 193 | ||
| 194 | rom18D_addr &= 0x20f8; | |
| 195 | rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3); | |
| 196 | ||
| 197 | rom15F_addr &= 0x201c; | |
| 198 | rom15F_addr += (rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1); | |
| 199 | rom15F_addr += (prom_data & 0x4000); | |
| 200 | ||
| 201 | graph_color = (prom_data & 0x0070); | |
| 202 | ||
| 203 | graph_data = rom18B[0x8000 + rom15F_addr]; | |
| 204 | if ((LS283 & 1)) | |
| 205 | graph_data >>= 4; | |
| 206 | graph_data &= 0x0f; | |
| 207 | ||
| 208 | pens_line_tab[h] = pens[graph_color + graph_data]; | |
| 209 | ||
| 210 | /*priority: background over sprites*/ | |
| 211 | /* not possible on the surface*/ | |
| 212 | //if ((map_v_scr_100) && ((graph_data & 0x0c)==0x0c)) | |
| 213 | //{ | |
| 214 | // *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data]; | |
| 215 | //} | |
| 135 | if (h & 0x80) | |
| 136 | LS283 = LS283 + (rom18B[ map_v_scr_1fe_6 + (h ^ 0xff) ] ^ 0xff); | |
| 137 | else | |
| 138 | LS283 = LS283 + rom18B[ map_v_scr_1fe_6 + h ] + 0xff01; | |
| 216 | 139 | } |
| 217 | } | |
| 218 | else | |
| 219 | { | |
| 220 | /* we are drawing underground */ | |
| 221 | for (h = 0; h < 0x80; h++) | |
| 222 | { | |
| 223 | UINT32 graph_data; | |
| 224 | UINT32 graph_color; | |
| 225 | UINT32 LS283; | |
| 226 | UINT32 prom_data; | |
| 227 | 140 | |
| 228 | | |
| 141 | prom_data = prom_tab[ (LS283 >> | |
| 229 | 142 | |
| 230 | prom_data = prom_tab[ (LS283 >> 6) & 0xff ]; | |
| 143 | rom18D_addr &= 0x20f8; | |
| 144 | rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3); | |
| 231 | 145 | |
| 232 | rom18D_addr &= 0x20f8; | |
| 233 | rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3); | |
| 146 | rom15F_addr &= 0x201c; | |
| 147 | rom15F_addr += (rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1); | |
| 148 | rom15F_addr += (prom_data & 0x4000); | |
| 234 | 149 | |
| 235 | rom15F_addr &= 0x201c; | |
| 236 | rom15F_addr += (rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1); | |
| 237 | rom15F_addr += (prom_data & 0x4000); | |
| 150 | graph_color = (prom_data & 0x0070); | |
| 238 | 151 | |
| 239 | graph_color = (prom_data & 0x0070); | |
| 152 | graph_data = rom18B[0x8000 + rom15F_addr]; | |
| 153 | if ((LS283 & 1)) | |
| 154 | graph_data >>= 4; | |
| 155 | graph_data &= 0x0f; | |
| 240 | 156 | |
| 241 | graph_data = rom18B[0x8000 + rom15F_addr]; | |
| 242 | if ((LS283 & 1)) | |
| 243 | graph_data >>= 4; | |
| 244 | graph_data &= 0x0f; | |
| 157 | line_data[h] = graph_color + graph_data; | |
| 245 | 158 | |
| 246 | pens_line_tab[h] = pens[graph_color + graph_data]; | |
| 247 | ||
| 248 | /*priority: background over sprites*/ | |
| 249 | if (/*(map_v_scr_100) &&*/ ((graph_data & 0x0c)==0x0c)) | |
| 250 | { | |
| 251 | *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data]; | |
| 252 | } | |
| 253 | } | |
| 254 | for (h = 0x80; h < 0x100; h++) | |
| 255 | { | |
| 256 | UINT32 graph_data; | |
| 257 | UINT32 graph_color; | |
| 258 | UINT32 LS283; | |
| 259 | UINT32 prom_data; | |
| 260 | ||
| 261 | LS283 = scroll_h + h; | |
| 262 | ||
| 263 | prom_data = prom_tab[ (LS283 >> 6) & 0xff ]; | |
| 264 | ||
| 265 | rom18D_addr &= 0x20f8; | |
| 266 | rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3); | |
| 267 | ||
| 268 | rom15F_addr &= 0x201c; | |
| 269 | rom15F_addr += (rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1); | |
| 270 | rom15F_addr += (prom_data & 0x4000); | |
| 271 | ||
| 272 | graph_color = (prom_data & 0x0070); | |
| 273 | ||
| 274 | graph_data = rom18B[0x8000 + rom15F_addr]; | |
| 275 | if ((LS283 & 1)) | |
| 276 | graph_data >>= 4; | |
| 277 | graph_data &= 0x0f; | |
| 278 | ||
| 279 | pens_line_tab[h] = pens[graph_color + graph_data]; | |
| 280 | ||
| 281 | /*priority: background over sprites*/ | |
| 282 | if (/*(map_v_scr_100) &&*/ ((graph_data & 0x0c)==0x0c)) | |
| 283 | { | |
| 284 | *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data]; | |
| 285 | } | |
| 286 | } | |
| 159 | /*priority: background over sprites*/ | |
| 160 | if (map_v_scr_100 && ((graph_data & 0x0c)==0x0c)) | |
| 161 | *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data]; | |
| 287 | 162 | } |
| 288 | 163 | |
| 289 | 164 | if (flipscreen) |
| 290 | 165 | { |
| 291 | 166 | int i; |
| 292 | UINT | |
| 167 | UINT8 | |
| 293 | 168 | for (i=0; i<256; i++) |
| 294 | pens_line_tab_flipped[i] = pens_line_tab[255-i]; | |
| 295 | blit_horiz_pixel_line(bitmap,0,255-v,256,pens_line_tab_flipped); | |
| 169 | line_data_flip_x[i] = line_data[255-i]; | |
| 170 | draw_scanline8(bitmap, 0, 255-v, 256, line_data_flip_x, pens, -1); | |
| 296 | 171 | } |
| 297 | 172 | else |
| 298 | | |
| 173 | d | |
| 299 | 174 | } |
| 300 | 175 | } |
| 301 | 176 | |
| r1679 | r1680 | |
| 305 | 180 | int sx, sy; |
| 306 | 181 | |
| 307 | 182 | sy = spriteram16[offs] & 0xff; |
| 183 | ||
| 308 | 184 | if (sy) |
| 309 | 185 | { |
| 310 | 186 | int code = spriteram16[offs + 1] & 0xff; |
| r1679 | r1680 | |
| 325 | 201 | } |
| 326 | 202 | |
| 327 | 203 | if (code & 0x80) /* sprite bankswitch */ |
| 328 | { | |
| 329 | code += (magmax_vreg & 0x30) * 0x8; | |
| 330 | } | |
| 204 | code += (*magmax_vreg & 0x30) * 0x8; | |
| 331 | 205 | |
| 332 | 206 | drawgfx(bitmap, machine->gfx[1], |
| 333 | 207 | code, |
| 334 | 208 | color, |
| 335 | 209 | flipx, flipy, |
| 336 | 210 | sx, sy, |
| 337 | cliprect, TRANSPARENCY_COLOR, 31); | |
| 211 | cliprect, TRANSPARENCY_PENS, | |
| 212 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0x1f)); | |
| 338 | 213 | } |
| 339 | 214 | } |
| 340 | 215 | |
| 341 | if (!(magmax_vreg & 0x40)) /* background disable */ | |
| 216 | if (!(*magmax_vreg & 0x40)) /* background disable */ | |
| 342 | 217 | copybitmap_trans(bitmap, tmpbitmap, flipscreen,flipscreen,0,0, cliprect, 0); |
| 343 | 218 | |
| 344 | ||
| 345 | 219 | /* draw the foreground characters */ |
| 346 | 220 | for (offs = 32*32-1; offs >= 0; offs -= 1) |
| 347 | 221 | { |
| 348 | //int page = (magmax_vreg>>3) & 0x1; | |
| 222 | //int page = (*magmax_vreg>>3) & 0x1; | |
| 349 | 223 | int code; |
| 350 | 224 | |
| 351 | 225 | code = videoram16[offs /*+ page*/] & 0xff; |
| r1679 | r1680 | |
| 365 | 239 | 0, |
| 366 | 240 | flipscreen, flipscreen, |
| 367 | 241 | 8 * sx, 8 * sy, |
| 368 | cliprect, TRANSPARENCY_PEN, | |
| 242 | cliprect, TRANSPARENCY_PEN, 0x0f); | |
| 369 | 243 | } |
| 370 | 244 | } |
| 371 | 245 | return 0; |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | VIDEO_START( timelimt ) |
| 74 | 74 | { |
| 75 | 75 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 76 | | |
| 76 | | |
| 77 | 77 | |
| 78 | 78 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 79 | | |
| 79 | | |
| 80 | 80 | |
| 81 | 81 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 82 | 82 | } |
| r1679 | r1680 | |
|---|---|---|
| 520 | 520 | { |
| 521 | 521 | sprite_priority_bitmap = auto_bitmap_alloc( Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED8 ); |
| 522 | 522 | |
| 523 | pf1_tilemap_16x16 = tilemap_create(get_pf1_tile_info, deco16_scan_rows, TILEMAP_TYPE_PEN,16,16,64,32); | |
| 524 | pf1_tilemap_8x8 = tilemap_create(get_pf1_tile_info_b, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 523 | pf1_tilemap_16x16 = tilemap_create(get_pf1_tile_info, deco16_scan_rows, 16,16,64,32); | |
| 524 | pf1_tilemap_8x8 = tilemap_create(get_pf1_tile_info_b, tilemap_scan_rows,8,8,64,32); | |
| 525 | 525 | |
| 526 | 526 | if (split) |
| 527 | pf2_tilemap_16x16 = tilemap_create(get_pf2_tile_info, deco16_scan_rows, | |
| 527 | pf2_tilemap_16x16 = tilemap_create(get_pf2_tile_info, deco16_scan_rows, | |
| 528 | 528 | else |
| 529 | pf2_tilemap_16x16 = tilemap_create(get_pf2_tile_info, deco16_scan_rows, TILEMAP_TYPE_PEN,16,16,full_width ? 64 : 32,32); | |
| 530 | pf2_tilemap_8x8 = tilemap_create(get_pf2_tile_info_b, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,full_width ? 64 : 32,32); | |
| 529 | pf2_tilemap_16x16 = tilemap_create(get_pf2_tile_info, deco16_scan_rows, 16,16,full_width ? 64 : 32,32); | |
| 530 | pf2_tilemap_8x8 = tilemap_create(get_pf2_tile_info_b, tilemap_scan_rows,8,8,full_width ? 64 : 32,32); | |
| 531 | 531 | |
| 532 | 532 | dirty_palette = auto_malloc(4096); |
| 533 | 533 | deco16_raster_display_list=auto_malloc(20 * 256); |
| 534 | 534 | |
| 535 | 535 | if (!pf12_only) |
| 536 | 536 | { |
| 537 | pf4_tilemap_16x16 = tilemap_create(get_pf4_tile_info, deco16_scan_rows, TILEMAP_TYPE_PEN,16,16,full_width ? 64 : 32,32); | |
| 538 | pf3_tilemap_16x16 = tilemap_create(get_pf3_tile_info, deco16_scan_rows, TILEMAP_TYPE_PEN,16,16,full_width ? 64 : 32,32); | |
| 537 | pf4_tilemap_16x16 = tilemap_create(get_pf4_tile_info, deco16_scan_rows, 16,16,full_width ? 64 : 32,32); | |
| 538 | pf3_tilemap_16x16 = tilemap_create(get_pf3_tile_info, deco16_scan_rows, 16,16,full_width ? 64 : 32,32); | |
| 539 | 539 | } |
| 540 | 540 | else |
| 541 | 541 | { |
| r1679 | r1680 | |
| 838 | 838 | int ox,oy,cx,cy; |
| 839 | 839 | int x_index,y_index,x,y; |
| 840 | 840 | |
| 841 | const pen_t *pal = &Machine-> | |
| 841 | const pen_t *pal = &Machine-> | |
| 842 | 842 | int source_base = (code % gfx->total_elements) * gfx->height; |
| 843 | 843 | |
| 844 | 844 | /* check bounds */ |
| r1679 | r1680 | |
|---|---|---|
| 135 | 135 | |
| 136 | 136 | VIDEO_START( goal92 ) |
| 137 | 137 | { |
| 138 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 139 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 140 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 138 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 139 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 140 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 141 | 141 | |
| 142 | 142 | buffered_spriteram16 = auto_malloc(0x400*2); |
| 143 | 143 |
| r1679 | r1680 | |
|---|---|---|
| 132 | 132 | ***************************************************************************/ |
| 133 | 133 | VIDEO_START( 1942 ) |
| 134 | 134 | { |
| 135 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 136 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,16); | |
| 135 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 136 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 16,16,32,16); | |
| 137 | 137 | |
| 138 | 138 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 139 | 139 |
| r1679 | r1680 | |
|---|---|---|
| 23 | 23 | VIDEO_START( poolshrk ) |
| 24 | 24 | { |
| 25 | 25 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, |
| 26 | | |
| 26 | | |
| 27 | 27 | |
| 28 | 28 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 29 | 29 | } |
| r1679 | r1680 | |
|---|---|---|
| 24 | 24 | { |
| 25 | 25 | mayumi_videoram = auto_malloc(0x1800); |
| 26 | 26 | |
| 27 | mayumi_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 27 | mayumi_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | WRITE8_HANDLER( mayumi_videoram_w ) |
| r1679 | r1680 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | VIDEO_START( raiden ) |
| 71 | 71 | { |
| 72 | bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 73 | fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 74 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 72 | bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 73 | fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,16,16,32,32); | |
| 74 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 75 | 75 | alternate=0; |
| 76 | 76 | |
| 77 | 77 | tilemap_set_transparent_pen(fg_layer,15); |
| r1679 | r1680 | |
| 80 | 80 | |
| 81 | 81 | VIDEO_START( raidena ) |
| 82 | 82 | { |
| 83 | bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 84 | fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 85 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 83 | bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols, 16,16,32,32); | |
| 84 | fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,16,16,32,32); | |
| 85 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 86 | 86 | alternate=1; |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(fg_layer,15); |
| r1679 | r1680 | |
|---|---|---|
| 59 | 59 | |
| 60 | 60 | VIDEO_START( bloodbro ) |
| 61 | 61 | { |
| 62 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,16); | |
| 63 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 64 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 62 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,32,16); | |
| 63 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 64 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 65 | 65 | |
| 66 | 66 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 67 | 67 | tilemap_set_transparent_pen(tx_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 371 | 371 | |
| 372 | 372 | VIDEO_START( fromanc2 ) |
| 373 | 373 | { |
| 374 | fromanc2_tilemap[0][0] = tilemap_create(fromanc2_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 375 | fromanc2_tilemap[0][1] = tilemap_create(fromanc2_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 376 | fromanc2_tilemap[0][2] = tilemap_create(fromanc2_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 377 | fromanc2_tilemap[0][3] = tilemap_create(fromanc2_get_v0_l3_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 378 | fromanc2_tilemap[1][0] = tilemap_create(fromanc2_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 379 | fromanc2_tilemap[1][1] = tilemap_create(fromanc2_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 380 | fromanc2_tilemap[1][2] = tilemap_create(fromanc2_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 381 | fromanc2_tilemap[1][3] = tilemap_create(fromanc2_get_v1_l3_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 374 | fromanc2_tilemap[0][0] = tilemap_create(fromanc2_get_v0_l0_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 375 | fromanc2_tilemap[0][1] = tilemap_create(fromanc2_get_v0_l1_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 376 | fromanc2_tilemap[0][2] = tilemap_create(fromanc2_get_v0_l2_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 377 | fromanc2_tilemap[0][3] = tilemap_create(fromanc2_get_v0_l3_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 378 | fromanc2_tilemap[1][0] = tilemap_create(fromanc2_get_v1_l0_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 379 | fromanc2_tilemap[1][1] = tilemap_create(fromanc2_get_v1_l1_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 380 | fromanc2_tilemap[1][2] = tilemap_create(fromanc2_get_v1_l2_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 381 | fromanc2_tilemap[1][3] = tilemap_create(fromanc2_get_v1_l3_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 382 | 382 | |
| 383 | 383 | fromanc2_videoram[0][0] = auto_malloc((64 * 64) * sizeof(UINT16)); |
| 384 | 384 | fromanc2_videoram[0][1] = auto_malloc((64 * 64) * sizeof(UINT16)); |
| r1679 | r1680 | |
| 402 | 402 | |
| 403 | 403 | VIDEO_START( fromancr ) |
| 404 | 404 | { |
| 405 | fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 406 | fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 407 | fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 405 | fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 406 | fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 407 | fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 408 | 408 | fromanc2_tilemap[0][3] = 0; |
| 409 | fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 410 | fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 411 | fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 409 | fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 410 | fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 411 | fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, 8, 8, 64, 64); | |
| 412 | 412 | fromanc2_tilemap[1][3] = 0; |
| 413 | 413 | |
| 414 | 414 | fromanc2_videoram[0][0] = auto_malloc((64 * 64) * sizeof(UINT16)); |
| r1679 | r1680 | |
| 430 | 430 | |
| 431 | 431 | VIDEO_START( fromanc4 ) |
| 432 | 432 | { |
| 433 | fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 434 | fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 435 | fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 433 | fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 434 | fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 435 | fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 436 | 436 | fromanc2_tilemap[0][3] = 0; |
| 437 | fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 438 | fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 439 | fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 437 | fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 438 | fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 439 | fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, 8, 8, 256, 64); | |
| 440 | 440 | fromanc2_tilemap[1][3] = 0; |
| 441 | 441 | |
| 442 | 442 | fromanc2_videoram[0][0] = auto_malloc((256 * 64) * sizeof(UINT16)); |
| r1679 | r1680 | |
|---|---|---|
| 66 | 66 | VIDEO_START( bombjack ) |
| 67 | 67 | { |
| 68 | 68 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 69 | | |
| 69 | | |
| 70 | 70 | |
| 71 | 71 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 72 | | |
| 72 | | |
| 73 | 73 | |
| 74 | 74 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 75 | 75 |
| r1679 | r1680 | |
|---|---|---|
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "driver.h" |
| 31 | #include "video/resnet.h" | |
| 31 | 32 | |
| 32 | 33 | |
| 33 | 34 | |
| 34 | 35 | UINT8 *rallyx_videoram,*rallyx_radarattr; |
| 35 | 36 | |
| 36 | 37 | static UINT8 *rallyx_radarx,*rallyx_radary; |
| 37 | static int | |
| 38 | static int | |
| 38 | 39 | |
| 39 | 40 | static tilemap *bg_tilemap,*fg_tilemap; |
| 40 | 41 | |
| 41 | 42 | #define MAX_STARS 1000 |
| 42 | #define STARS_COLOR_BASE | |
| 43 | #define STARS_COLOR_BASE (0x104) | |
| 43 | 44 | |
| 44 | 45 | static int stars_enable; |
| 45 | 46 | |
| r1679 | r1680 | |
| 51 | 52 | static int total_stars; |
| 52 | 53 | |
| 53 | 54 | |
| 54 | enum | |
| 55 | { | |
| 56 | TYPE_RALLYX, | |
| 57 | TYPE_JUNGLER, | |
| 58 | TYPE_TACTCIAN, | |
| 59 | TYPE_LOCOMOTN, | |
| 60 | TYPE_COMMSEGA | |
| 61 | }; | |
| 62 | ||
| 63 | ||
| 64 | DRIVER_INIT( rallyx ) | |
| 65 | { | |
| 66 | video_type = TYPE_RALLYX; | |
| 67 | } | |
| 68 | ||
| 69 | DRIVER_INIT( jungler ) | |
| 70 | { | |
| 71 | video_type = TYPE_JUNGLER; | |
| 72 | } | |
| 73 | ||
| 74 | DRIVER_INIT( tactcian ) | |
| 75 | { | |
| 76 | video_type = TYPE_TACTCIAN; | |
| 77 | } | |
| 78 | ||
| 79 | DRIVER_INIT( locomotn ) | |
| 80 | { | |
| 81 | video_type = TYPE_LOCOMOTN; | |
| 82 | } | |
| 83 | ||
| 84 | DRIVER_INIT( commsega ) | |
| 85 | { | |
| 86 | video_type = TYPE_COMMSEGA; | |
| 87 | } | |
| 88 | ||
| 89 | ||
| 90 | ||
| 91 | 55 | /*************************************************************************** |
| 92 | 56 | |
| 93 | 57 | Convert the color PROMs. |
| r1679 | r1680 | |
| 110 | 74 | ***************************************************************************/ |
| 111 | 75 | PALETTE_INIT( rallyx ) |
| 112 | 76 | { |
| 77 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 78 | static const int resistances_b [2] = { 470, 220 }; | |
| 79 | double rweights[3], gweights[3], bweights[2]; | |
| 113 | 80 | int i; |
| 114 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 115 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 116 | 81 | |
| 82 | /* compute the color output resistor weights */ | |
| 83 | compute_resistor_weights(0, 255, -1.0, | |
| 84 | 3, &resistances_rg[0], rweights, 0, 0, | |
| 85 | 3, &resistances_rg[0], gweights, 0, 0, | |
| 86 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 117 | 87 | |
| 118 | for (i = 0;i < 32;i++) | |
| 88 | /* allocate the colortable */ | |
| 89 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 90 | ||
| 91 | /* create a lookup table for the palette */ | |
| 92 | for (i = 0; i < 0x20; i++) | |
| 119 | 93 | { |
| 120 | int bit0,bit1,bit2,r,g,b; | |
| 94 | int bit0, bit1, bit2; | |
| 95 | int r, g, b; | |
| 121 | 96 | |
| 97 | /* red component */ | |
| 98 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 99 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 100 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 101 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 122 | 102 | |
| 123 | /* red component */ | |
| 124 | bit0 = (*color_prom >> 0) & 0x01; | |
| 125 | bit1 = (*color_prom >> 1) & 0x01; | |
| 126 | bit2 = (*color_prom >> 2) & 0x01; | |
| 127 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 128 | 103 | /* green component */ |
| 129 | bit0 = (*color_prom >> 3) & 0x01; | |
| 130 | bit1 = (*color_prom >> 4) & 0x01; | |
| 131 | bit2 = (*color_prom >> 5) & 0x01; | |
| 132 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 104 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 105 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 106 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 107 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 108 | ||
| 133 | 109 | /* blue component */ |
| 134 | if (video_type == TYPE_RALLYX) | |
| 135 | { | |
| 136 | bit0 = 0; | |
| 137 | bit1 = (*color_prom >> 6) & 0x01; | |
| 138 | bit2 = (*color_prom >> 7) & 0x01; | |
| 139 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 140 | } | |
| 141 | else | |
| 142 | { | |
| 143 | bit0 = (*color_prom >> 6) & 0x01; | |
| 144 | bit1 = (*color_prom >> 7) & 0x01; | |
| 145 | b = 0x50 * bit0 + 0xab * bit1; | |
| 146 | } | |
| 110 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 111 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 112 | b = combine_2_weights(bweights, bit0, bit1); | |
| 147 | 113 | |
| 148 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 149 | ||
| 150 | color_prom++; | |
| 114 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 151 | 115 | } |
| 152 | 116 | |
| 153 | 117 | /* color_prom now points to the beginning of the lookup table */ |
| 118 | color_prom += 0x20; | |
| 154 | 119 | |
| 155 | /* character lookup table */ | |
| 156 | /* sprites use the same color lookup table as characters */ | |
| 157 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 158 | COLOR(0,i) = *(color_prom++) & 0x0f; | |
| 120 | /* character/sprites lookup table */ | |
| 121 | for (i = 0x000; i < 0x100; i++) | |
| 122 | { | |
| 123 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 124 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 125 | } | |
| 159 | 126 | |
| 160 | /* radar dots lookup table */ | |
| 161 | /* they use colors 16-19 */ | |
| 162 | for (i = 0;i < 4;i++) | |
| 163 | COLOR(2,i) = 16 + i; | |
| 127 | /* bullets use colors 0x10-0x13 */ | |
| 128 | for (i = 0x100; i < 0x104; i++) | |
| 129 | colortable_entry_set_value(machine->colortable, i, (i - 0x100) | 0x10); | |
| 130 | } | |
| 164 | 131 | |
| 165 | /* Rally X doesn't have the optional starfield generator */ | |
| 166 | if (video_type != TYPE_RALLYX) | |
| 132 | ||
| 133 | PALETTE_INIT( jungler ) | |
| 134 | { | |
| 135 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 136 | static const int resistances_b [2] = { 470, 220 }; | |
| 137 | static const int resistances_star[3] = { 150, 100 }; | |
| 138 | double rweights[3], gweights[3], bweights[2]; | |
| 139 | double rweights_star[2], gweights_star[2], bweights_star[2]; | |
| 140 | int i; | |
| 141 | ||
| 142 | /* compute the color output resistor weights */ | |
| 143 | double scale = compute_resistor_weights(0, 255, -1.0, | |
| 144 | 2, resistances_star, rweights_star, 0, 0, | |
| 145 | 2, resistances_star, gweights_star, 0, 0, | |
| 146 | 2, resistances_star, bweights_star, 0, 0); | |
| 147 | ||
| 148 | compute_resistor_weights(0, 255, scale, | |
| 149 | 3, resistances_rg, rweights, 1000, 0, | |
| 150 | 3, resistances_rg, gweights, 1000, 0, | |
| 151 | 2, resistances_b, bweights, 1000, 0); | |
| 152 | ||
| 153 | /* allocate the colortable */ | |
| 154 | machine->colortable = colortable_alloc(machine, 0x60); | |
| 155 | ||
| 156 | /* create a lookup table for the palette */ | |
| 157 | for (i = 0; i < 0x20; i++) | |
| 167 | 158 | { |
| 168 | /* now the stars */ | |
| 169 | for (i = 0;i < 64;i++) | |
| 170 | { | |
| 171 | int bits,r,g,b; | |
| 172 | static const int map[4] = { 0x00, 0x47, 0x97, 0xde }; | |
| 159 | int bit0, bit1, bit2; | |
| 160 | int r, g, b; | |
| 173 | 161 | |
| 174 | bits = (i >> 0) & 0x03; | |
| 175 | r = map[bits]; | |
| 176 | bits = (i >> 2) & 0x03; | |
| 177 | g = map[bits]; | |
| 178 | bits = (i >> 4) & 0x03; | |
| 179 | b = map[bits]; | |
| 162 | /* red component */ | |
| 163 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 164 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 165 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 166 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 180 | 167 | |
| 181 | palette_set_color(machine,i + 32,MAKE_RGB(r,g,b)); | |
| 182 | } | |
| 168 | /* green component */ | |
| 169 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 170 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 171 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 172 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 173 | ||
| 174 | /* blue component */ | |
| 175 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 176 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 177 | b = combine_2_weights(bweights, bit0, bit1); | |
| 178 | ||
| 179 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 183 | 180 | } |
| 181 | ||
| 182 | /* star pens */ | |
| 183 | for (i = 0x20; i < 0x60; i++) | |
| 184 | { | |
| 185 | int bit0, bit1; | |
| 186 | int r, g, b; | |
| 187 | ||
| 188 | /* red component */ | |
| 189 | bit0 = ((i - 0x20) >> 0) & 0x01; | |
| 190 | bit1 = ((i - 0x20) >> 1) & 0x01; | |
| 191 | r = combine_2_weights(rweights_star, bit0, bit1); | |
| 192 | ||
| 193 | /* green component */ | |
| 194 | bit0 = ((i - 0x20) >> 2) & 0x01; | |
| 195 | bit1 = ((i - 0x20) >> 3) & 0x01; | |
| 196 | g = combine_2_weights(gweights_star, bit0, bit1); | |
| 197 | ||
| 198 | /* blue component */ | |
| 199 | bit0 = ((i - 0x20) >> 4) & 0x01; | |
| 200 | bit1 = ((i - 0x20) >> 5) & 0x01; | |
| 201 | b = combine_2_weights(bweights_star, bit0, bit1); | |
| 202 | ||
| 203 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 204 | } | |
| 205 | ||
| 206 | /* color_prom now points to the beginning of the lookup table */ | |
| 207 | color_prom += 0x20; | |
| 208 | ||
| 209 | /* character/sprites lookup table */ | |
| 210 | for (i = 0x000; i < 0x100; i++) | |
| 211 | { | |
| 212 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 213 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 214 | } | |
| 215 | ||
| 216 | /* bullets use colors 0x10-0x13 */ | |
| 217 | for (i = 0x100; i < 0x104; i++) | |
| 218 | colortable_entry_set_value(machine->colortable, i, (i - 0x100) | 0x10); | |
| 219 | ||
| 220 | /* stars */ | |
| 221 | for (i = 0x104; i < 0x144; i++) | |
| 222 | colortable_entry_set_value(machine->colortable, i, (i - 0x104) + 0x20); | |
| 184 | 223 | } |
| 185 | 224 | |
| 186 | 225 | |
| r1679 | r1680 | |
| 251 | 290 | |
| 252 | 291 | ***************************************************************************/ |
| 253 | 292 | |
| 254 | ||
| 293 | static | |
| 255 | 294 | { |
| 256 | int i; | |
| 295 | int generator; | |
| 296 | int x,y; | |
| 257 | 297 | |
| 258 | if (video_type == TYPE_RALLYX || video_type == TYPE_JUNGLER) | |
| 298 | /* precalculate the star background */ | |
| 299 | total_stars = 0; | |
| 300 | generator = 0; | |
| 301 | ||
| 302 | for (y = 0;y < 256;y++) | |
| 259 | 303 | { |
| 260 | bg_tilemap = tilemap_create(rallyx_bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 261 | fg_tilemap = tilemap_create(rallyx_fg_get_tile_info,fg_tilemap_scan, TILEMAP_TYPE_PEN,8,8, 8,32); | |
| 304 | for (x = 0;x < 288;x++) | |
| 305 | { | |
| 306 | int bit1,bit2; | |
| 307 | ||
| 308 | generator <<= 1; | |
| 309 | bit1 = (~generator >> 17) & 1; | |
| 310 | bit2 = (generator >> 5) & 1; | |
| 311 | ||
| 312 | if (bit1 ^ bit2) generator |= 1; | |
| 313 | ||
| 314 | if (((~generator >> 16) & 1) && | |
| 315 | (generator & 0xfe) == 0xfe) | |
| 316 | { | |
| 317 | int color; | |
| 318 | ||
| 319 | color = (~(generator >> 8)) & 0x3f; | |
| 320 | ||
| 321 | if (color && total_stars < MAX_STARS) | |
| 322 | { | |
| 323 | stars[total_stars].x = x; | |
| 324 | stars[total_stars].y = y; | |
| 325 | stars[total_stars].color = color; | |
| 326 | ||
| 327 | total_stars++; | |
| 328 | } | |
| 329 | } | |
| 330 | } | |
| 262 | 331 | } |
| 263 | else | |
| 264 | { | |
| 265 | bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 266 | fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan, TILEMAP_TYPE_PEN,8,8, 8,32); | |
| 267 | } | |
| 332 | } | |
| 268 | 333 | |
| 334 | ||
| 335 | VIDEO_START( rallyx ) | |
| 336 | { | |
| 337 | int i; | |
| 338 | ||
| 339 | bg_tilemap = tilemap_create(rallyx_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 340 | fg_tilemap = tilemap_create(rallyx_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); | |
| 341 | ||
| 269 | 342 | /* the scrolling tilemap is slightly misplaced in Rally X */ |
| 270 | if (video_type == TYPE_RALLYX) | |
| 271 | tilemap_set_scrolldx(bg_tilemap,3,3); | |
| 343 | tilemap_set_scrolldx(bg_tilemap,3,3); | |
| 272 | 344 | |
| 273 | /* commsega has more sprites and bullets than the other games */ | |
| 274 | if (video_type == TYPE_COMMSEGA) | |
| 275 | spriteram_base = 0x00; | |
| 276 | else | |
| 277 | spriteram_base = 0x14; | |
| 345 | spriteram_base = 0x14; | |
| 346 | ||
| 278 | 347 | spriteram = rallyx_videoram + 0x00; |
| 279 | 348 | spriteram_2 = spriteram + 0x800; |
| 280 | 349 | rallyx_radarx = rallyx_videoram + 0x20; |
| r1679 | r1680 | |
| 282 | 351 | |
| 283 | 352 | for (i = 0;i < 16;i++) |
| 284 | 353 | machine->shadow_table[i] = i+16; |
| 354 | ||
| 285 | 355 | for (i = 16;i < 32;i++) |
| 286 | 356 | machine->shadow_table[i] = i; |
| 357 | ||
| 287 | 358 | for (i = 0;i < 3;i++) |
| 288 | 359 | gfx_drawmode_table[i] = DRAWMODE_SHADOW; |
| 360 | ||
| 289 | 361 | gfx_drawmode_table[3] = DRAWMODE_NONE; |
| 362 | } | |
| 290 | 363 | |
| 291 | 364 | |
| 292 | /* Rally X doesn't have the optional starfield generator */ | |
| 293 | if (video_type != TYPE_RALLYX) | |
| 294 | { | |
| 295 | int generator; | |
| 296 | int x,y; | |
| 365 | VIDEO_START( jungler ) | |
| 366 | { | |
| 367 | int i; | |
| 297 | 368 | |
| 298 | /* precalculate the star background */ | |
| 299 | /* this comes from the Galaxian hardware, Bosconian is probably different */ | |
| 300 | total_stars = 0; | |
| 301 | generator = 0; | |
| 369 | bg_tilemap = tilemap_create(rallyx_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 370 | fg_tilemap = tilemap_create(rallyx_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); | |
| 302 | 371 | |
| 303 | for (y = 0;y < 256;y++) | |
| 304 | { | |
| 305 | for (x = 0;x < 288;x++) | |
| 306 | { | |
| 307 | int bit1,bit2; | |
| 372 | spriteram_base = 0x14; | |
| 308 | 373 | |
| 374 | spriteram = rallyx_videoram + 0x00; | |
| 375 | spriteram_2 = spriteram + 0x800; | |
| 376 | rallyx_radarx = rallyx_videoram + 0x20; | |
| 377 | rallyx_radary = rallyx_radarx + 0x800; | |
| 309 | 378 | |
| 310 | generator <<= 1; | |
| 311 | bit1 = (~generator >> 17) & 1; | |
| 312 | bit2 = (generator >> 5) & 1; | |
| 379 | for (i = 0;i < 16;i++) | |
| 380 | machine->shadow_table[i] = i+16; | |
| 313 | 381 | |
| 314 | if (bit1 ^ bit2) generator |= 1; | |
| 382 | for (i = 16;i < 32;i++) | |
| 383 | machine->shadow_table[i] = i; | |
| 315 | 384 | |
| 316 | if (((~generator >> 16) & 1) && | |
| 317 | (generator & 0xfe) == 0xfe) | |
| 318 | { | |
| 319 | int color; | |
| 385 | for (i = 0;i < 3;i++) | |
| 386 | gfx_drawmode_table[i] = DRAWMODE_SHADOW; | |
| 320 | 387 | |
| 321 | color = (~(generator >> 8)) & 0x3f; | |
| 322 | if (color && total_stars < MAX_STARS) | |
| 323 | { | |
| 324 | stars[total_stars].x = x; | |
| 325 | stars[total_stars].y = y; | |
| 326 | stars[total_stars].color = machine->pens[color + STARS_COLOR_BASE]; | |
| 388 | gfx_drawmode_table[3] = DRAWMODE_NONE; | |
| 327 | 389 | |
| 328 | total_stars++; | |
| 329 | } | |
| 330 | } | |
| 331 | } | |
| 332 | } | |
| 333 | } | |
| 390 | calculate_star_field(); | |
| 334 | 391 | } |
| 335 | 392 | |
| 336 | 393 | |
| 394 | VIDEO_START( locomotn ) | |
| 395 | { | |
| 396 | int i; | |
| 337 | 397 | |
| 398 | bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 399 | fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); | |
| 400 | ||
| 401 | spriteram_base = 0x14; | |
| 402 | ||
| 403 | spriteram = rallyx_videoram + 0x00; | |
| 404 | spriteram_2 = spriteram + 0x800; | |
| 405 | rallyx_radarx = rallyx_videoram + 0x20; | |
| 406 | rallyx_radary = rallyx_radarx + 0x800; | |
| 407 | ||
| 408 | for (i = 0;i < 16;i++) | |
| 409 | machine->shadow_table[i] = i+16; | |
| 410 | ||
| 411 | for (i = 16;i < 32;i++) | |
| 412 | machine->shadow_table[i] = i; | |
| 413 | ||
| 414 | for (i = 0;i < 3;i++) | |
| 415 | gfx_drawmode_table[i] = DRAWMODE_SHADOW; | |
| 416 | ||
| 417 | gfx_drawmode_table[3] = DRAWMODE_NONE; | |
| 418 | ||
| 419 | calculate_star_field(); | |
| 420 | } | |
| 421 | ||
| 422 | ||
| 423 | VIDEO_START( commsega ) | |
| 424 | { | |
| 425 | int i; | |
| 426 | ||
| 427 | bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 428 | fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); | |
| 429 | ||
| 430 | /* commsega has more sprites and bullets than the other games */ | |
| 431 | spriteram_base = 0x00; | |
| 432 | ||
| 433 | spriteram = rallyx_videoram + 0x00; | |
| 434 | spriteram_2 = spriteram + 0x800; | |
| 435 | rallyx_radarx = rallyx_videoram + 0x20; | |
| 436 | rallyx_radary = rallyx_radarx + 0x800; | |
| 437 | ||
| 438 | for (i = 0;i < 16;i++) | |
| 439 | machine->shadow_table[i] = i+16; | |
| 440 | ||
| 441 | for (i = 16;i < 32;i++) | |
| 442 | machine->shadow_table[i] = i; | |
| 443 | ||
| 444 | for (i = 0;i < 3;i++) | |
| 445 | gfx_drawmode_table[i] = DRAWMODE_SHADOW; | |
| 446 | ||
| 447 | gfx_drawmode_table[3] = DRAWMODE_NONE; | |
| 448 | ||
| 449 | calculate_star_field(); | |
| 450 | } | |
| 451 | ||
| 452 | ||
| 338 | 453 | /*************************************************************************** |
| 339 | 454 | |
| 340 | 455 | Memory handlers |
| r1679 | r1680 | |
| 369 | 484 | |
| 370 | 485 | static void plot_star(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x, int y, int color) |
| 371 | 486 | { |
| 372 | int bpen = machine->pens[0]; | |
| 373 | ||
| 374 | 487 | if (y < cliprect->min_y || |
| 375 | 488 | y > cliprect->max_y || |
| 376 | 489 | x < cliprect->min_x || |
| r1679 | r1680 | |
| 378 | 491 | return; |
| 379 | 492 | |
| 380 | 493 | if (flip_screen_x) |
| 381 | { | |
| 382 | 494 | x = 255 - x; |
| 383 | ||
| 495 | ||
| 384 | 496 | if (flip_screen_y) |
| 385 | { | |
| 386 | 497 | y = 255 - y; |
| 387 | } | |
| 388 | 498 | |
| 389 | if (*BITMAP_ADDR16(bitmap, y, x) == | |
| 499 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(bitmap, y, x) % 0x144) == 0 | |
| 390 | 500 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[STARS_COLOR_BASE + color]; |
| 391 | 501 | } |
| 392 | 502 | |
| r1679 | r1680 | |
| 396 | 506 | |
| 397 | 507 | for (offs = 0;offs < total_stars;offs++) |
| 398 | 508 | { |
| 399 | int x,y; | |
| 509 | int x = stars[offs].x; | |
| 510 | int y = stars[offs].y; | |
| 400 | 511 | |
| 401 | ||
| 402 | x = stars[offs].x; | |
| 403 | y = stars[offs].y; | |
| 404 | ||
| 405 | 512 | if ((y & 0x01) ^ ((x >> 3) & 0x01)) |
| 406 | { | |
| 407 | 513 | plot_star(machine, bitmap, cliprect, x, y, stars[offs].color); |
| 408 | } | |
| 409 | 514 | } |
| 410 | 515 | } |
| 411 | 516 | |
| r1679 | r1680 | |
| 418 | 523 | { |
| 419 | 524 | int sx = spriteram[offs + 1] + ((spriteram_2[offs + 1] & 0x80) << 1) - displacement; |
| 420 | 525 | int sy = 241 - spriteram_2[offs] - displacement; |
| 526 | int color = spriteram_2[offs + 1] & 0x3f; | |
| 421 | 527 | int flipx = spriteram[offs] & 1; |
| 422 | 528 | int flipy = spriteram[offs] & 2; |
| 423 | 529 | if (flip_screen) sx -= 2*displacement; |
| 424 | 530 | |
| 425 | 531 | pdrawgfx(bitmap,machine->gfx[1], |
| 426 | 532 | (spriteram[offs] & 0xfc) >> 2, |
| 427 | | |
| 533 | c | |
| 428 | 534 | flipx,flipy, |
| 429 | 535 | sx,sy, |
| 430 | cliprect,TRANSPARENCY_COLOR,0,0x02); | |
| 536 | cliprect,TRANSPARENCY_PENS, | |
| 537 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0), | |
| 538 | 0x02); | |
| 431 | 539 | } |
| 432 | 540 | } |
| 433 | 541 | |
| r1679 | r1680 | |
| 439 | 547 | { |
| 440 | 548 | int sx = spriteram[offs + 1] + ((spriteram_2[offs + 1] & 0x80) << 1); |
| 441 | 549 | int sy = 241 - spriteram_2[offs] - displacement; |
| 550 | int color = spriteram_2[offs + 1] & 0x3f; | |
| 442 | 551 | int flip = spriteram[offs] & 2; |
| 443 | 552 | |
| 444 | 553 | /* handle reduced visible area in some games */ |
| r1679 | r1680 | |
| 446 | 555 | |
| 447 | 556 | pdrawgfx(bitmap,machine->gfx[1], |
| 448 | 557 | ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1), |
| 449 | | |
| 558 | c | |
| 450 | 559 | flip,flip, |
| 451 | 560 | sx,sy, |
| 452 | cliprect,TRANSPARENCY_COLOR,0,0x02); | |
| 561 | cliprect,TRANSPARENCY_PENS, | |
| 562 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0), | |
| 563 | 0x02); | |
| 453 | 564 | } |
| 454 | 565 | } |
| 455 | 566 | |
| r1679 | r1680 | |
| 547 | 658 | |
| 548 | 659 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,0,0); |
| 549 | 660 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,0,0); |
| 550 | /* tile priority doesn't seem to be supported in Jungler */ | |
| 551 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,1,video_type == TYPE_JUNGLER ? 0 : 1); | |
| 552 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,1,video_type == TYPE_JUNGLER ? 0 : 1); | |
| 661 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,1,1); | |
| 662 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,1,1); | |
| 553 | 663 | |
| 554 | switch (video_type) | |
| 664 | rallyx_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 665 | rallyx_draw_sprites(machine, bitmap,cliprect,1); | |
| 666 | rallyx_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 667 | ||
| 668 | return 0; | |
| 669 | } | |
| 670 | ||
| 671 | ||
| 672 | VIDEO_UPDATE( jungler ) | |
| 673 | { | |
| 674 | /* the radar tilemap is just 8x32. We rely on the tilemap code to repeat it across | |
| 675 | the screen, and clip it to only the position where it is supposed to be shown */ | |
| 676 | rectangle fg_clip = *cliprect; | |
| 677 | rectangle bg_clip = *cliprect; | |
| 678 | if (flip_screen) | |
| 555 | 679 | { |
| 556 | case TYPE_RALLYX: | |
| 557 | rallyx_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 558 | rallyx_draw_sprites(machine, bitmap,cliprect,1); | |
| 559 | rallyx_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 560 | break; | |
| 680 | bg_clip.min_x = 8*8; | |
| 681 | fg_clip.max_x = 8*8-1; | |
| 682 | } | |
| 683 | else | |
| 684 | { | |
| 685 | bg_clip.max_x = 28*8-1; | |
| 686 | fg_clip.min_x = 28*8; | |
| 687 | } | |
| 561 | 688 | |
| 562 | case TYPE_JUNGLER: | |
| 563 | jungler_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 564 | rallyx_draw_sprites(machine, bitmap,cliprect,0); | |
| 565 | jungler_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 566 | break; | |
| 689 | fillbitmap(priority_bitmap,0,cliprect); | |
| 567 | 690 | |
| 568 | case TYPE_TACTCIAN: | |
| 569 | case TYPE_LOCOMOTN: | |
| 570 | case TYPE_COMMSEGA: | |
| 571 | locomotn_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 572 | locomotn_draw_sprites(machine, bitmap,cliprect,0); | |
| 573 | locomotn_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 574 | break; | |
| 691 | /* tile priority doesn't seem to be supported in Jungler */ | |
| 692 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,0,0); | |
| 693 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,0,0); | |
| 694 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,1,0); | |
| 695 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,1,0); | |
| 696 | ||
| 697 | jungler_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 698 | rallyx_draw_sprites(machine, bitmap,cliprect,0); | |
| 699 | jungler_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 700 | ||
| 701 | if (stars_enable) | |
| 702 | draw_stars(machine, bitmap, cliprect); | |
| 703 | ||
| 704 | return 0; | |
| 705 | } | |
| 706 | ||
| 707 | ||
| 708 | VIDEO_UPDATE( locomotn ) | |
| 709 | { | |
| 710 | /* the radar tilemap is just 8x32. We rely on the tilemap code to repeat it across | |
| 711 | the screen, and clip it to only the position where it is supposed to be shown */ | |
| 712 | rectangle fg_clip = *cliprect; | |
| 713 | rectangle bg_clip = *cliprect; | |
| 714 | if (flip_screen) | |
| 715 | { | |
| 716 | bg_clip.min_x = 8*8; | |
| 717 | fg_clip.max_x = 8*8-1; | |
| 575 | 718 | } |
| 719 | else | |
| 720 | { | |
| 721 | bg_clip.max_x = 28*8-1; | |
| 722 | fg_clip.min_x = 28*8; | |
| 723 | } | |
| 576 | 724 | |
| 577 | /* Rally X doesn't have the optional starfield generator */ | |
| 578 | if (video_type != TYPE_RALLYX) | |
| 579 | if (stars_enable) draw_stars(machine, bitmap,cliprect); | |
| 725 | fillbitmap(priority_bitmap,0,cliprect); | |
| 726 | ||
| 727 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,0,0); | |
| 728 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,0,0); | |
| 729 | tilemap_draw(bitmap,&bg_clip,bg_tilemap,1,1); | |
| 730 | tilemap_draw(bitmap,&fg_clip,fg_tilemap,1,1); | |
| 731 | ||
| 732 | locomotn_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN); | |
| 733 | locomotn_draw_sprites(machine, bitmap,cliprect,0); | |
| 734 | locomotn_draw_bullets(machine, bitmap,cliprect,TRANSPARENCY_PEN_TABLE); | |
| 735 | ||
| 736 | if (stars_enable) | |
| 737 | draw_stars(machine, bitmap, cliprect); | |
| 738 | ||
| 580 | 739 | return 0; |
| 581 | 740 | } |
| 741 |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | VIDEO_START( trucocl ) |
| 74 | 74 | { |
| 75 | bg_tilemap = tilemap_create( get_bg_tile_info, tilemap_scan_rows, | |
| 75 | bg_tilemap = tilemap_create( get_bg_tile_info, tilemap_scan_rows, | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | VIDEO_UPDATE( trucocl ) |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | VIDEO_START( unico ) |
| 143 | 143 | { |
| 144 | 144 | tilemap_0 = tilemap_create( get_tile_info_0,tilemap_scan_rows, |
| 145 | | |
| 145 | | |
| 146 | 146 | |
| 147 | 147 | tilemap_1 = tilemap_create( get_tile_info_1,tilemap_scan_rows, |
| 148 | | |
| 148 | | |
| 149 | 149 | |
| 150 | 150 | tilemap_2 = tilemap_create( get_tile_info_2,tilemap_scan_rows, |
| 151 | | |
| 151 | | |
| 152 | 152 | |
| 153 | 153 | sprites_scrolldx = -0x3f; |
| 154 | 154 | sprites_scrolldy = -0x0e; |
| r1679 | r1680 | |
| 169 | 169 | VIDEO_START( zeropnt2 ) |
| 170 | 170 | { |
| 171 | 171 | tilemap_0 = tilemap_create( get_tile_info32_0,tilemap_scan_rows, |
| 172 | | |
| 172 | | |
| 173 | 173 | |
| 174 | 174 | tilemap_1 = tilemap_create( get_tile_info32_1,tilemap_scan_rows, |
| 175 | | |
| 175 | | |
| 176 | 176 | |
| 177 | 177 | tilemap_2 = tilemap_create( get_tile_info32_2,tilemap_scan_rows, |
| 178 | | |
| 178 | | |
| 179 | 179 | |
| 180 | 180 | sprites_scrolldx = -0x3f; |
| 181 | 181 | sprites_scrolldy = -0x0e; |
| r1679 | r1680 | |
|---|---|---|
| 69 | 69 | int xoffs = 0; |
| 70 | 70 | int yoffs = 0; |
| 71 | 71 | |
| 72 | gcpinbal_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 73 | gcpinbal_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 74 | gcpinbal_tilemap[2] = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 72 | gcpinbal_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 73 | gcpinbal_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 74 | gcpinbal_tilemap[2] = tilemap_create(get_fg_tile_info, tilemap_scan_rows,8,8,64,64); | |
| 75 | 75 | |
| 76 | 76 | tilemap_set_transparent_pen( gcpinbal_tilemap[0],0 ); |
| 77 | 77 | tilemap_set_transparent_pen( gcpinbal_tilemap[1],0 ); |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | { |
| 156 | 156 | /* Backgrounds */ |
| 157 | 157 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 158 | ||
| 158 | ||
| 159 | 159 | 16,16, |
| 160 | 160 | 0x40, 0x20); |
| 161 | 161 | |
| 162 | 162 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 163 | ||
| 163 | ||
| 164 | 164 | 16,16, |
| 165 | 165 | 0x40, 0x20); |
| 166 | 166 | |
| 167 | 167 | /* Text */ |
| 168 | 168 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 169 | ||
| 169 | ||
| 170 | 170 | 8,8, |
| 171 | 171 | 0x40, 0x20); |
| 172 | 172 |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | VIDEO_START( carjmbre ) |
| 82 | 82 | { |
| 83 | 83 | |
| 84 | carjmbre_tilemap = tilemap_create( get_carjmbre_tile_info,tilemap_scan_rows, | |
| 84 | carjmbre_tilemap = tilemap_create( get_carjmbre_tile_info,tilemap_scan_rows, | |
| 85 | 85 | |
| 86 | 86 | state_save_register_global(carjmbre_flipscreen); |
| 87 | 87 | state_save_register_global(carjmbre_bgcolor); |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | { |
| 11 | 11 | int i; |
| 12 | 12 | |
| 13 | for (i=0; i<256; i++) | |
| 13 | /* allocate the colortable */ | |
| 14 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 15 | ||
| 16 | /* create a lookup table for the palette */ | |
| 17 | for (i = 0; i < 0x100; i++) | |
| 14 | 18 | { |
| 15 | palette_set_color_rgb(machine, i, pal4bit(color_prom[i]), pal4bit(color_prom[i+0x100]), pal4bit(color_prom[i+0x200])); | |
| 16 | colortable[i] = i; | |
| 19 | int r = pal4bit(color_prom[i + 0x000]); | |
| 20 | int g = pal4bit(color_prom[i + 0x100]); | |
| 21 | int b = pal4bit(color_prom[i + 0x200]); | |
| 22 | ||
| 23 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 17 | 24 | } |
| 25 | ||
| 26 | for (i = 0; i < 0x100; i++) | |
| 27 | colortable_entry_set_value(machine->colortable, i, i); | |
| 18 | 28 | } |
| 19 | 29 | |
| 20 | 30 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
| 138 | 148 | |
| 139 | 149 | VIDEO_START(flower) |
| 140 | 150 | { |
| 141 | flower_bg0_tilemap = tilemap_create(get_bg0_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,16,16); | |
| 142 | flower_bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,16); | |
| 143 | flower_text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 144 | flower_text_right_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8, 8, 2,32); | |
| 151 | flower_bg0_tilemap = tilemap_create(get_bg0_tile_info, tilemap_scan_rows, 16,16,16,16); | |
| 152 | flower_bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,16,16,16,16); | |
| 153 | flower_text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 154 | flower_text_right_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_cols, 8, 8, 2,32); | |
| 145 | 155 | |
| 146 | 156 | tilemap_set_transparent_pen(flower_bg1_tilemap,15); |
| 147 | 157 | tilemap_set_transparent_pen(flower_text_tilemap,3); |
| r1679 | r1680 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | VIDEO_START( xain ) |
| 90 | 90 | { |
| 91 | bgram0_tilemap = tilemap_create(get_bgram0_tile_info,back_scan, TILEMAP_TYPE_PEN,16,16,32,32); | |
| 92 | bgram1_tilemap = tilemap_create(get_bgram1_tile_info,back_scan, TILEMAP_TYPE_PEN,16,16,32,32); | |
| 93 | char_tilemap = tilemap_create(get_char_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 91 | bgram0_tilemap = tilemap_create(get_bgram0_tile_info,back_scan, 16,16,32,32); | |
| 92 | bgram1_tilemap = tilemap_create(get_bgram1_tile_info,back_scan, 16,16,32,32); | |
| 93 | char_tilemap = tilemap_create(get_char_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 94 | 94 | |
| 95 | 95 | tilemap_set_transparent_pen(bgram0_tilemap,0); |
| 96 | 96 | tilemap_set_transparent_pen(bgram1_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 108 | 108 | namcos1_spriteram = auto_malloc(0x1000); |
| 109 | 109 | |
| 110 | 110 | /* initialize playfields */ |
| 111 | bg_tilemap[0] = tilemap_create(bg_get_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 112 | bg_tilemap[1] = tilemap_create(bg_get_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 113 | bg_tilemap[2] = tilemap_create(bg_get_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 114 | bg_tilemap[3] = tilemap_create(bg_get_info3,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 115 | bg_tilemap[4] = tilemap_create(fg_get_info4,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 116 | bg_tilemap[5] = tilemap_create(fg_get_info5,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 111 | bg_tilemap[0] = tilemap_create(bg_get_info0,tilemap_scan_rows,8,8,64,64); | |
| 112 | bg_tilemap[1] = tilemap_create(bg_get_info1,tilemap_scan_rows,8,8,64,64); | |
| 113 | bg_tilemap[2] = tilemap_create(bg_get_info2,tilemap_scan_rows,8,8,64,64); | |
| 114 | bg_tilemap[3] = tilemap_create(bg_get_info3,tilemap_scan_rows,8,8,64,32); | |
| 115 | bg_tilemap[4] = tilemap_create(fg_get_info4,tilemap_scan_rows,8,8,36,28); | |
| 116 | bg_tilemap[5] = tilemap_create(fg_get_info5,tilemap_scan_rows,8,8,36,28); | |
| 117 | 117 | |
| 118 | 118 | tilemap_set_scrolldx(bg_tilemap[4],73,512-73); |
| 119 | 119 | tilemap_set_scrolldx(bg_tilemap[5],73,512-73); |
| r1679 | r1680 | |
|---|---|---|
| 153 | 153 | |
| 154 | 154 | VIDEO_START( mrdo ) |
| 155 | 155 | { |
| 156 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 157 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 156 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 157 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 158 | 158 | |
| 159 | 159 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 160 | 160 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | VIDEO_START( gundealr ) |
| 62 | 62 | { |
| 63 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,gundealr_scan, TILEMAP_TYPE_PEN,16,16,64,32); | |
| 63 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 8, 8,32,32); | |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,gundealr_scan, 16,16,64,32); | |
| 65 | 65 | |
| 66 | 66 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 67 | 67 | } |
| r1679 | r1680 | |
|---|---|---|
| 401 | 401 | |
| 402 | 402 | static void m62_start( tile_get_info_callback tile_get_info, int rows, int cols, int x1, int y1, int x2, int y2 ) |
| 403 | 403 | { |
| 404 | m62_background = tilemap_create( tile_get_info, tilemap_scan_rows, | |
| 404 | m62_background = tilemap_create( tile_get_info, tilemap_scan_rows, | |
| 405 | 405 | |
| 406 | 406 | m62_background_hscroll = 0; |
| 407 | 407 | m62_background_vscroll = 0; |
| r1679 | r1680 | |
| 420 | 420 | |
| 421 | 421 | static void m62_textlayer( tile_get_info_callback tile_get_info, int rows, int cols, int x1, int y1, int x2, int y2 ) |
| 422 | 422 | { |
| 423 | m62_foreground = tilemap_create( tile_get_info, tilemap_scan_rows, | |
| 423 | m62_foreground = tilemap_create( tile_get_info, tilemap_scan_rows, | |
| 424 | 424 | |
| 425 | 425 | if( rows != 0 ) |
| 426 | 426 | { |
| r1679 | r1680 | |
| 734 | 734 | |
| 735 | 735 | VIDEO_START( kidniki ) |
| 736 | 736 | { |
| 737 | m62_background = tilemap_create( get_kidniki_bg_tile_info, tilemap_scan_rows, | |
| 737 | m62_background = tilemap_create( get_kidniki_bg_tile_info, tilemap_scan_rows, | |
| 738 | 738 | |
| 739 | 739 | m62_background_hscroll = 0; |
| 740 | 740 | m62_background_vscroll = 0; |
| r1679 | r1680 | |
|---|---|---|
| 226 | 226 | { |
| 227 | 227 | /* allocate a per-scanline timer */ |
| 228 | 228 | scanline_timer = timer_alloc(scanline_callback, NULL); |
| 229 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1 | |
| 229 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1 | |
| 230 | 230 | |
| 231 | 231 | /* register for save states */ |
| 232 | 232 | init_savestate(); |
| r1679 | r1680 | |
| 241 | 241 | { |
| 242 | 242 | /* allocate a per-scanline timer */ |
| 243 | 243 | scanline_timer = timer_alloc(scanline_callback, NULL); |
| 244 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1 | |
| 244 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 1, 0), 1 | |
| 245 | 245 | |
| 246 | 246 | /* allocate videoram */ |
| 247 | 247 | profpac_videoram = auto_malloc(0x4000 * 4 * sizeof(*profpac_videoram)); |
| r1679 | r1680 | |
| 493 | 493 | scanline++; |
| 494 | 494 | if (scanline >= machine->screen[0].height) |
| 495 | 495 | scanline = 0; |
| 496 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 496 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "video/resnet.h" | |
| 10 | 11 | |
| 11 | 12 | UINT8 *megazone_scrollx; |
| 12 | 13 | UINT8 *megazone_scrolly; |
| r1679 | r1680 | |
| 43 | 44 | ***************************************************************************/ |
| 44 | 45 | PALETTE_INIT( megazone ) |
| 45 | 46 | { |
| 47 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 48 | static const int resistances_b [2] = { 470, 220 }; | |
| 49 | double rweights[3], gweights[3], bweights[2]; | |
| 46 | 50 | int i; |
| 47 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 48 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 49 | 51 | |
| 52 | /* compute the color output resistor weights */ | |
| 53 | compute_resistor_weights(0, 255, -1.0, | |
| 54 | 3, &resistances_rg[0], rweights, 1000, 0, | |
| 55 | 3, &resistances_rg[0], gweights, 1000, 0, | |
| 56 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 50 | 57 | |
| 51 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 58 | /* allocate the colortable */ | |
| 59 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 60 | ||
| 61 | /* create a lookup table for the palette */ | |
| 62 | for (i = 0; i < 0x20; i++) | |
| 52 | 63 | { |
| 53 | int bit0,bit1,bit2,r,g,b; | |
| 64 | int bit0, bit1, bit2; | |
| 65 | int r, g, b; | |
| 54 | 66 | |
| 55 | 67 | /* red component */ |
| 56 | bit0 = (*color_prom >> 0) & 0x01; | |
| 57 | bit1 = (*color_prom >> 1) & 0x01; | |
| 58 | bit2 = (*color_prom >> 2) & 0x01; | |
| 59 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 68 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 69 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 70 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 71 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 72 | ||
| 60 | 73 | /* green component */ |
| 61 | bit0 = (*color_prom >> 3) & 0x01; | |
| 62 | bit1 = (*color_prom >> 4) & 0x01; | |
| 63 | bit2 = (*color_prom >> 5) & 0x01; | |
| 64 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 74 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 75 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 76 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 77 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 78 | ||
| 65 | 79 | /* blue component */ |
| 66 | bit0 = 0; | |
| 67 | bit1 = (*color_prom >> 6) & 0x01; | |
| 68 | bit2 = (*color_prom >> 7) & 0x01; | |
| 69 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 80 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 81 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 82 | b = combine_2_weights(bweights, bit0, bit1); | |
| 70 | 83 | |
| 71 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 72 | color_prom++; | |
| 84 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 73 | 85 | } |
| 74 | 86 | |
| 75 | 87 | /* color_prom now points to the beginning of the lookup table */ |
| 88 | color_prom += 0x20; | |
| 76 | 89 | |
| 77 | 90 | /* sprites */ |
| 78 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 79 | COLOR(1,i) = *(color_prom++) & 0x0f; | |
| 91 | for (i = 0; i < 0x100; i++) | |
| 92 | { | |
| 93 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 94 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 95 | } | |
| 80 | 96 | |
| 81 | 97 | /* characters */ |
| 82 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 83 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 98 | for (i = 0x100; i < 0x200; i++) | |
| 99 | { | |
| 100 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 101 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 102 | } | |
| 84 | 103 | } |
| 85 | 104 | |
| 86 | 105 | WRITE8_HANDLER( megazone_flipscreen_w ) |
| r1679 | r1680 | |
| 116 | 135 | flipy = !flipy; |
| 117 | 136 | } |
| 118 | 137 | |
| 119 | drawgfx(tmpbitmap,machine->gfx[ | |
| 138 | drawgfx(tmpbitmap,machine->gfx[1], | |
| 120 | 139 | ((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ), |
| 121 | 140 | (colorram[offs] & 0x0f) + 0x10, |
| 122 | 141 | flipx,flipy, |
| r1679 | r1680 | |
| 149 | 168 | { |
| 150 | 169 | for (offs = spriteram_size-4; offs >= 0;offs -= 4) |
| 151 | 170 | { |
| 152 | int sx,sy,flipx,flipy; | |
| 171 | int sx = spriteram[offs + 3]; | |
| 172 | int sy = 255-((spriteram[offs + 1]+16)&0xff); | |
| 173 | int color = spriteram[offs + 0] & 0x0f; | |
| 174 | int flipx = ~spriteram[offs + 0] & 0x40; | |
| 175 | int flipy = spriteram[offs + 0] & 0x80; | |
| 153 | 176 | |
| 177 | if (flipscreen) | |
| 178 | { | |
| 179 | sx = sx - 11; | |
| 180 | sy = sy + 2; | |
| 181 | } | |
| 182 | else | |
| 183 | sx = sx + 32; | |
| 154 | 184 | |
| 155 | sx = spriteram[offs + 3]; | |
| 156 | if (flipscreen) sx-=11; else sx+=4*8; // Sprite y-position correction depending on screen flip | |
| 157 | sy = 255-((spriteram[offs + 1]+16)&0xff); | |
| 158 | if (flipscreen) sy+=2; // Sprite x-position correction depending on screen flip | |
| 159 | ||
| 160 | flipx = ~spriteram[offs+0] & 0x40; | |
| 161 | flipy = spriteram[offs+0] & 0x80; | |
| 162 | ||
| 163 | drawgfx(bitmap,machine->gfx[1], | |
| 185 | drawgfx(bitmap,machine->gfx[0], | |
| 164 | 186 | spriteram[offs + 2], |
| 165 | | |
| 187 | c | |
| 166 | 188 | flipx,flipy, |
| 167 | 189 | sx,sy, |
| 168 | cliprect,TRANSPARENCY_COLOR,0); | |
| 190 | cliprect,TRANSPARENCY_PENS, | |
| 191 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 169 | 192 | } |
| 170 | 193 | } |
| 171 | 194 | |
| r1679 | r1680 | |
| 193 | 216 | |
| 194 | 217 | |
| 195 | 218 | |
| 196 | drawgfx(bitmap,machine->gfx[ | |
| 219 | drawgfx(bitmap,machine->gfx[1], | |
| 197 | 220 | ((int)megazone_videoram2[offs]) + ((megazone_colorram2[offs] & (1<<7) ? 256 : 0) ), |
| 198 | 221 | (megazone_colorram2[offs] & 0x0f) + 0x10, |
| 199 | 222 | flipx,flipy, |
| r1679 | r1680 | |
|---|---|---|
| 59 | 59 | |
| 60 | 60 | VIDEO_START( pass ) |
| 61 | 61 | { |
| 62 | pass_bg_tilemap = tilemap_create(get_pass_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 63 | pass_fg_tilemap = tilemap_create(get_pass_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 4, 4,128,64); | |
| 62 | pass_bg_tilemap = tilemap_create(get_pass_bg_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 63 | pass_fg_tilemap = tilemap_create(get_pass_fg_tile_info,tilemap_scan_rows, 4, 4,128,64); | |
| 64 | 64 | |
| 65 | 65 | tilemap_set_transparent_pen(pass_fg_tilemap,255); |
| 66 | 66 | } |
| r1679 | r1680 | |
|---|---|---|
| 98 | 98 | |
| 99 | 99 | VIDEO_START( toki ) |
| 100 | 100 | { |
| 101 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 102 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 103 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 101 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 102 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 103 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 104 | 104 | |
| 105 | 105 | tilemap_set_transparent_pen(text_layer,15); |
| 106 | 106 | tilemap_set_transparent_pen(background_layer,15); |
| r1679 | r1680 | |
|---|---|---|
| 110 | 110 | pixel_bitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 111 | 111 | pixel_bitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format); |
| 112 | 112 | |
| 113 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 113 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 114 | 114 | |
| 115 | 115 | tilemap_set_scroll_rows(background,32); |
| 116 | 116 | tilemap_set_transparent_pen(background,0); |
| r1679 | r1680 | |
|---|---|---|
| 70 | 70 | |
| 71 | 71 | VIDEO_START( renegade ) |
| 72 | 72 | { |
| 73 | bg_tilemap = tilemap_create(get_bg_tilemap_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 64, 16); | |
| 74 | fg_tilemap = tilemap_create(get_fg_tilemap_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 73 | bg_tilemap = tilemap_create(get_bg_tilemap_info, tilemap_scan_rows, 16, 16, 64, 16); | |
| 74 | fg_tilemap = tilemap_create(get_fg_tilemap_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 75 | 75 | |
| 76 | 76 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 77 | 77 | tilemap_set_scrolldx(bg_tilemap, 256, 0); |
| r1679 | r1680 | |
|---|---|---|
| 440 | 440 | |
| 441 | 441 | VIDEO_START( galaga ) |
| 442 | 442 | { |
| 443 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 443 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 444 | 444 | colortable_configure_tilemap_groups(machine->colortable, tx_tilemap, machine->gfx[0], 0x1f); |
| 445 | 445 | |
| 446 | 446 | galaga_gfxbank = 0; |
| r1679 | r1680 | |
|---|---|---|
| 174 | 174 | VIDEO_START( lasso ) |
| 175 | 175 | { |
| 176 | 176 | /* create tilemap */ |
| 177 | bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, | |
| 177 | bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, | |
| 178 | 178 | |
| 179 | 179 | /* register for saving */ |
| 180 | 180 | state_save_register_global(gfxbank); |
| r1679 | r1680 | |
| 183 | 183 | VIDEO_START( wwjgtin ) |
| 184 | 184 | { |
| 185 | 185 | /* create tilemaps */ |
| 186 | bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 187 | track_tilemap = tilemap_create(wwjgtin_get_track_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 0x80,0x40); | |
| 186 | bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 187 | track_tilemap = tilemap_create(wwjgtin_get_track_tile_info, tilemap_scan_rows, 16,16, 0x80,0x40); | |
| 188 | 188 | |
| 189 | 189 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 190 | 190 | |
| r1679 | r1680 | |
| 196 | 196 | VIDEO_START( pinbo ) |
| 197 | 197 | { |
| 198 | 198 | /* create tilemap */ |
| 199 | bg_tilemap = tilemap_create(pinbo_get_bg_tile_info, tilemap_scan_rows, | |
| 199 | bg_tilemap = tilemap_create(pinbo_get_bg_tile_info, tilemap_scan_rows, | |
| 200 | 200 | |
| 201 | 201 | /* register for saving */ |
| 202 | 202 | state_save_register_global(gfxbank); |
| r1679 | r1680 | |
|---|---|---|
| 283 | 283 | memset(jal_blend_table,0,0xc00) ; |
| 284 | 284 | |
| 285 | 285 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 286 | | |
| 286 | | |
| 287 | 287 | |
| 288 | 288 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 289 | | |
| 289 | | |
| 290 | 290 | |
| 291 | 291 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 292 | 292 | } |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | VIDEO_START( ginganin ) |
| 144 | 144 | { |
| 145 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,BG_NX,BG_NY); | |
| 146 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,FG_NX,FG_NY); | |
| 147 | tx_tilemap = tilemap_create(get_txt_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,TXT_NX,TXT_NY); | |
| 145 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,BG_NX,BG_NY); | |
| 146 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,FG_NX,FG_NY); | |
| 147 | tx_tilemap = tilemap_create(get_txt_tile_info,tilemap_scan_rows,8,8,TXT_NX,TXT_NY); | |
| 148 | 148 | |
| 149 | 149 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 150 | 150 | tilemap_set_transparent_pen(tx_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | VIDEO_START( tail2nos ) |
| 54 | 54 | { |
| 55 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 55 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 56 | 56 | |
| 57 | 57 | K051316_vh_start_0(machine,REGION_GFX3,-4,TRUE,0,zoom_callback); |
| 58 | 58 |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | #include "video/s2636.h" |
| 20 | 20 | #include "cpu/s2650/s2650.h" |
| 21 | 21 | |
| 22 | #ifdef LSB_FIRST | |
| 23 | #define BL0 0 | |
| 24 | #define BL1 1 | |
| 25 | #define BL2 2 | |
| 26 | #define BL3 3 | |
| 27 | #define WL0 0 | |
| 28 | #define WL1 1 | |
| 29 | #else | |
| 30 | #define BL0 3 | |
| 31 | #define BL1 2 | |
| 32 | #define BL2 1 | |
| 33 | #define BL3 0 | |
| 34 | #define WL0 1 | |
| 35 | #define WL1 0 | |
| 36 | #endif | |
| 37 | 22 | |
| 38 | ||
| 39 | // Used here | |
| 40 | //static int scroll[8]; | |
| 41 | //static int scroll_reg = 0; | |
| 42 | ||
| 43 | 23 | UINT8 *quasar_effectram; |
| 44 | ||
| 24 | UINT8 quasar_effectcontrol; | |
| 45 | 25 | |
| 46 | static mame_bitmap *effect_bitmap; | |
| 47 | static mame_bitmap *background_bitmap; | |
| 26 | static s2636_t *s2636_0, *s2636_1, *s2636_2; | |
| 48 | 27 | |
| 49 | 28 | PALETTE_INIT( quasar ) |
| 50 | 29 | { |
| 51 | int i | |
| 30 | int i | |
| 52 | 31 | |
| 53 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 32 | /* allocate the colortable */ | |
| 33 | machine->colortable = colortable_alloc(machine, 0x500); | |
| 54 | 34 | |
| 55 | // Standard 1 bit per colour palette (background and sprites) | |
| 56 | ||
| 57 | for(col = 0;col < 8; col++) | |
| 35 | /* standard 1 bit per color palette (background and sprites) */ | |
| 36 | for (i = 0; i < 8; i++) | |
| 58 | 37 | { |
| 59 | palette_set_color_rgb(machine,col,pal1bit(col >> 0),pal1bit(col >> 1),pal1bit(col >> 2)); | |
| 38 | rgb_t color = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2)); | |
| 39 | colortable_palette_set_color(machine->colortable, i, color); | |
| 60 | 40 | } |
| 61 | 41 | |
| 62 | // Address 0-2 from graphic rom | |
| 63 | // 3-5 from colour ram | |
| 64 | // 6-8 from sprite chips (Used for priority) | |
| 65 | ||
| 66 | for(col = 0; col < 512; col++) | |
| 42 | /* effects color map */ | |
| 43 | for (i = 0; i < 0x100; i++) | |
| 67 | 44 | { |
| 68 | COLOR(0,col) = color_prom[col] & 7; | |
| 69 | } | |
| 45 | rgb_t color; | |
| 46 | int bit0, bit1, bit2; | |
| 47 | int r, g, b; | |
| 70 | 48 | |
| 71 | /* Background for collision */ | |
| 72 | ||
| 73 | COLOR(0,512) = 0; // Black | |
| 74 | for(col=1;col<8;col++) // White | |
| 75 | COLOR(0,512+col) = 7; | |
| 76 | ||
| 77 | /* Effects Colour Map */ | |
| 78 | ||
| 79 | for (i = 0;i < 256;i++) | |
| 80 | { | |
| 81 | int bit0,bit1,bit2,r,g,b; | |
| 82 | ||
| 83 | 49 | /* red component */ |
| 84 | bit0 = BIT(i,0); | |
| 85 | bit1 = BIT(i,1); | |
| 86 | bit2 = BIT(i,2); | |
| 50 | bit0 = BIT(i, 0); | |
| 51 | bit1 = BIT(i, 1); | |
| 52 | bit2 = BIT(i, 2); | |
| 87 | 53 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 54 | ||
| 88 | 55 | /* green component */ |
| 89 | bit0 = BIT(i,3); | |
| 90 | bit1 = BIT(i,4); | |
| 91 | bit2 = BIT(i,5); | |
| 56 | bit0 = BIT(i, 3); | |
| 57 | bit1 = BIT(i, 4); | |
| 58 | bit2 = BIT(i, 5); | |
| 92 | 59 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 60 | ||
| 93 | 61 | /* blue component */ |
| 94 | bit0 = BIT(i,6); | |
| 95 | bit1 = BIT(i,7); | |
| 62 | bit0 = BIT(i, 6); | |
| 63 | bit1 = BIT(i, 7); | |
| 96 | 64 | b = 0x4f * bit0 + 0xa8 * bit1; |
| 97 | 65 | |
| 98 | // Intensity 1 | |
| 99 | palette_set_color_rgb(machine,256+i,r>>2,g>>2,b>>2); | |
| 66 | /* intensity 0 */ | |
| 67 | colortable_palette_set_color(machine->colortable, 0x100 + i, RGB_BLACK); | |
| 100 | 68 | |
| 101 | // Intensity 2 | |
| 102 | palette_set_color_rgb(machine,512+i,(r>>2)+(r>>3),(g>>2)+(g>>3),(b>>2)+(b>>2)); | |
| 69 | /* intensity 1 */ | |
| 70 | color = MAKE_RGB(r >> 2, g >> 2, b >> 2); | |
| 71 | colortable_palette_set_color(machine->colortable, 0x200 + i, color); | |
| 103 | 72 | |
| 104 | // Intensity 3 | |
| 105 | palette_set_color_rgb(machine,768+i,r>>1,g>>1,b>>1); | |
| 73 | /* intensity 2 */ | |
| 74 | color = MAKE_RGB((r >> 2) + (r >> 3), (g >> 2) + (g >> 3), (b >> 2) + (b >> 2)); | |
| 75 | colortable_palette_set_color(machine->colortable, 0x300 + i, color); | |
| 76 | ||
| 77 | /* intensity 3 */ | |
| 78 | color = MAKE_RGB(r >> 1, g >> 1, b >> 1); | |
| 79 | colortable_palette_set_color(machine->colortable, 0x400 + i, color); | |
| 106 | 80 | } |
| 107 | 81 | |
| 108 | /* Sprites */ | |
| 82 | // Address 0-2 from graphic rom | |
| 83 | // 3-5 from color ram | |
| 84 | // 6-8 from sprite chips (Used for priority) | |
| 85 | for (i = 0; i < 0x200; i++) | |
| 86 | colortable_entry_set_value(machine->colortable, i, color_prom[i] & 0x07); | |
| 109 | 87 | |
| 110 | for(map=0;map<8;map++) | |
| 111 | { | |
| 112 | COLOR(0,map*2 + 2072) = 0; | |
| 113 | COLOR(0,map*2 + 2073) = 8 + map; | |
| 114 | } | |
| 88 | /* background for collision */ | |
| 89 | for (i = 1; i < 8; i++) | |
| 90 | colortable_entry_set_value(machine->colortable, 0x200 + i, 7); | |
| 91 | colortable_entry_set_value(machine->colortable, 0x200, 0); | |
| 115 | 92 | |
| 116 | /* Set Sprite chip offsets */ | |
| 117 | ||
| 118 | s2636_x_offset = -26; | |
| 119 | s2636_y_offset = 3; | |
| 93 | /* effects */ | |
| 94 | for (i = 0; i < 0x400; i++) | |
| 95 | colortable_entry_set_value(machine->colortable, 0x208 + i, 0x100 + i); | |
| 120 | 96 | } |
| 121 | 97 | |
| 98 | ||
| 122 | 99 | VIDEO_START( quasar ) |
| 123 | 100 | { |
| 124 | quasar_effectram | |
| 101 | quasar_effectram | |
| 125 | 102 | |
| 126 | effect_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 127 | background_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 103 | /* configure the S2636 chips */ | |
| 104 | s2636_0 = s2636_config(cvs_s2636_0_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 105 | s2636_1 = s2636_config(cvs_s2636_1_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 106 | s2636_2 = s2636_config(cvs_s2636_2_ram, machine->screen[0].height, machine->screen[0].width, CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); | |
| 128 | 107 | |
| 129 | VIDEO_START_CALL(cvs); | |
| 108 | /* create helper bitmaps */ | |
| 109 | cvs_collision_background = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); | |
| 130 | 110 | } |
| 131 | 111 | |
| 132 | 112 | VIDEO_UPDATE( quasar ) |
| 133 | 113 | { |
| 134 | int offs,character; | |
| 135 | int sx,sy, ox, oy; | |
| 136 | int forecolor; | |
| 114 | int offs; | |
| 115 | mame_bitmap *s2636_0_bitmap; | |
| 116 | mame_bitmap *s2636_1_bitmap; | |
| 117 | mame_bitmap *s2636_2_bitmap; | |
| 137 | 118 | |
| 138 | /* for every character in the Video RAM, check if it has been modified */ | |
| 139 | /* since last time and update it accordingly. */ | |
| 140 | ||
| 119 | /* for every character in the video RAM */ | |
| 141 | 120 | for (offs = 0; offs < 0x0400; offs++) |
| 142 | 121 | { |
| 143 | character = cvs_video_ram[offs]; | |
| 122 | int ox, oy; | |
| 123 | UINT8 code = cvs_video_ram[offs]; | |
| 144 | 124 | |
| 145 | sx = (offs % 32) * 8; | |
| 146 | sy = (offs / 32) * 8; | |
| 125 | UINT8 x = (offs & 0x1f) << 3; | |
| 126 | UINT8 y = (offs >> 5) << 3; | |
| 147 | 127 | |
| 148 | 128 | // While we have the current character code, draw the effects layer |
| 149 | 129 | // intensity / on and off controlled by latch |
| 150 | 130 | |
| 151 | if (quasar_effectcontrol == 0x30) | |
| 152 | forecolor = 0; | |
| 153 | else | |
| 154 | forecolor = quasar_effectram[offs] + (256 * (((quasar_effectcontrol >> 4) ^ 3) & 3)); | |
| 131 | int forecolor = 0x208 + quasar_effectram[offs] + (256 * (((quasar_effectcontrol >> 4) ^ 3) & 3)); | |
| 155 | 132 | |
| 156 | 133 | for(ox=0;ox<8;ox++) |
| 157 | 134 | for(oy=0;oy<8;oy++) |
| 158 | *BITMAP_ADDR16( | |
| 135 | *BITMAP_ADDR16( | |
| 159 | 136 | |
| 160 | 137 | /* Main Screen */ |
| 161 | 138 | |
| 162 | drawgfx(background_bitmap,machine->gfx[0], | |
| 163 | character, | |
| 164 | cvs_color_ram[offs], | |
| 139 | drawgfx(bitmap,machine->gfx[0], | |
| 140 | code, | |
| 141 | cvs_color_ram[offs] & 0x3f, | |
| 165 | 142 | 0,0, |
| 166 | sx,sy, | |
| 167 | 0,TRANSPARENCY_NONE,0); | |
| 143 | x,y, | |
| 144 | cliprect,TRANSPARENCY_PEN,0); | |
| 168 | 145 | |
| 169 | 146 | |
| 170 | 147 | /* background for Collision Detection (it can only hit certain items) */ |
| r1679 | r1680 | |
| 172 | 149 | if((cvs_color_ram[offs] & 7) == 0) |
| 173 | 150 | { |
| 174 | 151 | drawgfx(cvs_collision_background,machine->gfx[0], |
| 175 | c | |
| 152 | cod | |
| 176 | 153 | 64, |
| 177 | 154 | 0,0, |
| 178 | sx,sy, | |
| 179 | 0,TRANSPARENCY_NONE,0); | |
| 155 | x,y, | |
| 156 | cliprect,TRANSPARENCY_NONE,0); | |
| 180 | 157 | } |
| 181 | 158 | } |
| 182 | 159 | |
| 183 | /* Update screen */ | |
| 160 | /* update the S2636 chips */ | |
| 161 | s2636_0_bitmap = s2636_update(s2636_0, cliprect); | |
| 162 | s2636_1_bitmap = s2636_update(s2636_1, cliprect); | |
| 163 | s2636_2_bitmap = s2636_update(s2636_2, cliprect); | |
| 184 | 164 | |
| 185 | copybitmap (bitmap,effect_bitmap, 0,0,0,0,cliprect); | |
| 186 | copybitmap_trans(bitmap,background_bitmap,0,0,0,0,cliprect,0); | |
| 187 | ||
| 188 | /* 2636's */ | |
| 189 | ||
| 190 | fillbitmap(s2636_1_bitmap,0,0); | |
| 191 | s2636_update_bitmap(machine,s2636_1_bitmap,s2636_1_ram,1,cvs_collision_bitmap); | |
| 192 | ||
| 193 | fillbitmap(s2636_2_bitmap,0,0); | |
| 194 | s2636_update_bitmap(machine,s2636_2_bitmap,s2636_2_ram,2,cvs_collision_bitmap); | |
| 195 | ||
| 196 | fillbitmap(s2636_3_bitmap,0,0); | |
| 197 | s2636_update_bitmap(machine,s2636_3_bitmap,s2636_3_ram,3,cvs_collision_bitmap); | |
| 198 | ||
| 199 | 165 | /* Bullet Hardware */ |
| 200 | ||
| 201 | 166 | for (offs = 8; offs < 256; offs++ ) |
| 202 | 167 | { |
| 203 | 168 | if(cvs_bullet_ram[offs] != 0) |
| r1679 | r1680 | |
| 207 | 172 | { |
| 208 | 173 | int bx=255-9-cvs_bullet_ram[offs]-ct; |
| 209 | 174 | |
| 210 | /* Bullet/Object Collision */ | |
| 175 | /* bullet/object Collision */ | |
| 176 | if (*BITMAP_ADDR8(s2636_0_bitmap, offs, bx) != 0) cvs_collision_register |= 0x04; | |
| 177 | if (*BITMAP_ADDR8(s2636_2_bitmap, offs, bx) != 0) cvs_collision_register |= 0x08; | |
| 211 | 178 | |
| 212 | if (*BITMAP_ADDR8(s2636_1_bitmap, offs, bx) != 0) cvs_collision_register |= 4; | |
| 213 | if (*BITMAP_ADDR8(s2636_3_bitmap, offs, bx) != 0) cvs_collision_register |= 8; | |
| 214 | ||
| 215 | 179 | *BITMAP_ADDR16(bitmap, offs, bx) = machine->pens[7]; |
| 216 | 180 | } |
| 217 | 181 | } |
| 218 | 182 | } |
| 219 | 183 | |
| 220 | /* Update 2636 images */ | |
| 221 | 184 | |
| 222 | { | |
| 223 | UINT32 S1,S2,S3,SB,pen; | |
| 185 | /* mix and copy the S2636 images into the main bitmap, also check for collision */ | |
| 186 | { | |
| 187 | int y; | |
| 224 | 188 | |
| 225 | for(sx=255;sx>7;sx--) | |
| 226 | { | |
| 227 | UINT32 *sp1 = (UINT32 *)BITMAP_ADDR8(s2636_1_bitmap, sx, 0); | |
| 228 | UINT32 *sp2 = (UINT32 *)BITMAP_ADDR8(s2636_2_bitmap, sx, 0); | |
| 229 | UINT32 *sp3 = (UINT32 *)BITMAP_ADDR8(s2636_3_bitmap, sx, 0); | |
| 230 | UINT64 *dst = (UINT64 *)BITMAP_ADDR16(bitmap, sx, 0); | |
| 231 | UINT8 *spb = (UINT8 *)BITMAP_ADDR8(cvs_collision_background, sx, 0); | |
| 189 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 190 | { | |
| 191 | int x; | |
| 232 | 192 | |
| 233 | for(offs=0;offs<62;offs++) | |
| 234 | { | |
| 235 | S1 = (*sp1++); | |
| 236 | S2 = (*sp2++); | |
| 237 | S3 = (*sp3++); | |
| 193 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) | |
| 194 | { | |
| 195 | int pixel0 = *BITMAP_ADDR8(s2636_0_bitmap, y, x); | |
| 196 | int pixel1 = *BITMAP_ADDR8(s2636_1_bitmap, y, x); | |
| 197 | int pixel2 = *BITMAP_ADDR8(s2636_2_bitmap, y, x); | |
| 238 | 198 | |
| 239 | ||
| 199 | ||
| 240 | 200 | |
| 241 | if(pen) | |
| 242 | { | |
| 243 | UINT16 *address = (UINT16 *)dst; | |
| 244 | if (pen & 0xff000000) address[BL3] = machine->pens[(pen >> 24) & 15]; | |
| 245 | if (pen & 0x00ff0000) address[BL2] = machine->pens[(pen >> 16) & 15]; | |
| 246 | if (pen & 0x0000ff00) address[BL1] = machine->pens[(pen >> 8) & 15]; | |
| 247 | if (pen & 0x000000ff) address[BL0] = machine->pens[(pen & 15)]; | |
| 201 | if (S2636_IS_PIXEL_DRAWN(pixel)) | |
| 202 | { | |
| 203 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel)]; | |
| 248 | 204 | |
| 249 | /* Collision Detection */ | |
| 205 | /* S2636 vs. background collision detection */ | |
| 206 | if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(cvs_collision_background, y, x))) | |
| 207 | { | |
| 208 | if (S2636_IS_PIXEL_DRAWN(pixel0)) cvs_collision_register |= 0x01; | |
| 209 | if (S2636_IS_PIXEL_DRAWN(pixel2)) cvs_collision_register |= 0x02; | |
| 210 | } | |
| 211 | } | |
| 212 | } | |
| 213 | } | |
| 214 | } | |
| 250 | 215 | |
| 251 | SB = 0; | |
| 252 | if (spb[BL3] != machine->pens[0]) SB = 0x08000000; | |
| 253 | if (spb[BL2] != machine->pens[0]) SB |= 0x00080000; | |
| 254 | if (spb[BL1] != machine->pens[0]) SB |= 0x00000800; | |
| 255 | if (spb[BL0] != machine->pens[0]) SB |= 0x00000008; | |
| 256 | ||
| 257 | if (SB) | |
| 258 | { | |
| 259 | if (S1 & SB) cvs_collision_register |= 1; | |
| 260 | if (S3 & SB) cvs_collision_register |= 2; | |
| 261 | } | |
| 262 | } | |
| 263 | ||
| 264 | dst++; | |
| 265 | spb+=4; | |
| 266 | } | |
| 267 | } | |
| 268 | } | |
| 269 | 216 | return 0; |
| 270 | 217 | } |
| r1679 | r1680 | |
|---|---|---|
| 93 | 93 | VIDEO_START( mrjong ) |
| 94 | 94 | { |
| 95 | 95 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy, |
| 96 | | |
| 96 | | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 53 | 53 | |
| 54 | 54 | VIDEO_START(xyonix) |
| 55 | 55 | { |
| 56 | xyonix_tilemap = tilemap_create(get_xyonix_tile_info,tilemap_scan_rows, | |
| 56 | xyonix_tilemap = tilemap_create(get_xyonix_tile_info,tilemap_scan_rows, | |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | VIDEO_UPDATE(xyonix) |
| r1679 | r1680 | |
|---|---|---|
| 531 | 531 | |
| 532 | 532 | if (!micro.timer) |
| 533 | 533 | { |
| 534 | timer_adjust(micro.timer, attotime_never, 0 | |
| 534 | timer_adjust_oneshot(micro.timer, attotime_never, 0 | |
| 535 | 535 | micro.timer_active = 1; |
| 536 | 536 | micro.endtime = state_time; |
| 537 | 537 | } |
| 538 | 538 | else if (attotime_compare(timer_timeelapsed(micro.timer), micro.endtime) > 0) |
| 539 | 539 | { |
| 540 | timer_adjust(micro.timer, attotime_never, 0 | |
| 540 | timer_adjust_oneshot(micro.timer, attotime_never, 0 | |
| 541 | 541 | micro.timer_active = 1; |
| 542 | 542 | micro.endtime = state_time; |
| 543 | 543 | } |
| r1679 | r1680 | |
|---|---|---|
| 181 | 181 | VIDEO_START( 1943 ) |
| 182 | 182 | { |
| 183 | 183 | bg2_tilemap = tilemap_create(c1943_get_bg2_tile_info, tilemap_scan_cols, |
| 184 | | |
| 184 | | |
| 185 | 185 | |
| 186 | 186 | bg_tilemap = tilemap_create(c1943_get_bg_tile_info, tilemap_scan_cols, |
| 187 | | |
| 187 | | |
| 188 | 188 | |
| 189 | 189 | fg_tilemap = tilemap_create(c1943_get_fg_tile_info, tilemap_scan_rows, |
| 190 | | |
| 190 | | |
| 191 | 191 | |
| 192 | 192 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[1], 0x0f); |
| 193 | 193 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 206 | 206 | fg_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 207 | 207 | fillbitmap(fg_bitmap, 0xffff, NULL); |
| 208 | 208 | |
| 209 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 210 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 209 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 210 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 211 | 211 | |
| 212 | 212 | tilemap_set_scroll_rows(fg_tilemap, 32); |
| 213 | 213 |
| r1679 | r1680 | |
|---|---|---|
| 96 | 96 | stuff_palette( machine, 0, 0, 16*8 ); |
| 97 | 97 | stuff_palette( machine, 16*8*3, 16*8, 16*8 ); |
| 98 | 98 | |
| 99 | bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 100 | tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 99 | bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,8,8,64,64); | |
| 100 | tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,8,8,32,32); | |
| 101 | 101 | |
| 102 | 102 | tilemap_set_transparent_pen(tx_tilemap,0xf); |
| 103 | 103 | tilemap_set_scrolldx( bg_tilemap, 16, 22 ); |
| r1679 | r1680 | |
|---|---|---|
| 156 | 156 | |
| 157 | 157 | VIDEO_START( popper ) |
| 158 | 158 | { |
| 159 | popper_p123_tilemap = tilemap_create( get_popper_p123_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,33,32 ); | |
| 160 | popper_p0_tilemap = tilemap_create( get_popper_p0_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,33,32 ); | |
| 161 | popper_ol_p123_tilemap = tilemap_create( get_popper_ol_p123_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,2 ,32 ); | |
| 162 | popper_ol_p0_tilemap = tilemap_create( get_popper_ol_p0_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,2 ,32 ); | |
| 159 | popper_p123_tilemap = tilemap_create( get_popper_p123_tile_info, tilemap_scan_cols,8,8,33,32 ); | |
| 160 | popper_p0_tilemap = tilemap_create( get_popper_p0_tile_info, tilemap_scan_cols,8,8,33,32 ); | |
| 161 | popper_ol_p123_tilemap = tilemap_create( get_popper_ol_p123_tile_info,tilemap_scan_cols,8,8,2 ,32 ); | |
| 162 | popper_ol_p0_tilemap = tilemap_create( get_popper_ol_p0_tile_info, tilemap_scan_cols,8,8,2 ,32 ); | |
| 163 | 163 | |
| 164 | 164 | tilemap_set_transmask(popper_p123_tilemap, 0,0x0f,0x01); |
| 165 | 165 | tilemap_set_transmask(popper_p123_tilemap, 1,0x01,0x0f); |
| r1679 | r1680 | |
|---|---|---|
| 134 | 134 | |
| 135 | 135 | VIDEO_START( ddrible ) |
| 136 | 136 | { |
| 137 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 138 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 137 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,8,8,64,32); | |
| 138 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan, 8,8,64,32); | |
| 139 | 139 | |
| 140 | 140 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 141 | 141 | } |
| r1679 | r1680 | |
|---|---|---|
| 137 | 137 | VIDEO_START( ladyfrog ) |
| 138 | 138 | { |
| 139 | 139 | ladyfrog_spriteram = auto_malloc (160); |
| 140 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 140 | bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 141 | 141 | |
| 142 | 142 | paletteram = auto_malloc(0x200); |
| 143 | 143 | paletteram_2 = auto_malloc(0x200); |
| r1679 | r1680 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | VIDEO_START( djboy ) |
| 47 | 47 | { |
| 48 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 48 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 49 | 49 | pandora_start(0,0,0); |
| 50 | 50 | } |
| 51 | 51 |
| r1679 | r1680 | |
|---|---|---|
| 152 | 152 | if (!sidearms_gameid) |
| 153 | 153 | { |
| 154 | 154 | bg_tilemap = tilemap_create(get_sidearms_bg_tile_info, sidearms_tilemap_scan, |
| 155 | | |
| 155 | | |
| 156 | 156 | |
| 157 | 157 | tilemap_set_transparent_pen(bg_tilemap, 15); |
| 158 | 158 | } |
| 159 | 159 | else |
| 160 | 160 | { |
| 161 | bg_tilemap = tilemap_create(get_philko_bg_tile_info, sidearms_tilemap_scan, | |
| 161 | bg_tilemap = tilemap_create(get_philko_bg_tile_info, sidearms_tilemap_scan, | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 165 | | |
| 165 | | |
| 166 | 166 | |
| 167 | 167 | tilemap_set_transparent_pen(fg_tilemap, 3); |
| 168 | 168 |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( jack ) |
| 57 | 57 | { |
| 58 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flipy, | |
| 58 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flipy, | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | static void jack_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
| 136 | 136 | |
| 137 | 137 | VIDEO_START( joinem ) |
| 138 | 138 | { |
| 139 | bg_tilemap = tilemap_create(joinem_get_bg_tile_info, tilemap_scan_cols_flipy, | |
| 139 | bg_tilemap = tilemap_create(joinem_get_bg_tile_info, tilemap_scan_cols_flipy, | |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | static void joinem_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | VIDEO_START( dogfgt ) |
| 83 | 83 | { |
| 84 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 84 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 85 | 85 | |
| 86 | 86 | bitmapram = auto_malloc(BITMAPRAM_SIZE); |
| 87 | 87 |
| r1679 | r1680 | |
|---|---|---|
| 1201 | 1201 | |
| 1202 | 1202 | /* If halt flag was set, let CPU catch up before we make halt visible */ |
| 1203 | 1203 | if (vg->halt && !(vg->state_latch & 0x10)) |
| 1204 | timer_adjust(vg_halt_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), cycles), 1 | |
| 1204 | timer_adjust_oneshot(vg_halt_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), cycles), 1 | |
| 1205 | 1205 | |
| 1206 | 1206 | vg->state_latch = (vg->halt << 4) | (vg->state_latch & 0xf); |
| 1207 | 1207 | cycles += 8; |
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | timer_adjust(vg_run_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), cycles), 0 | |
| 1210 | timer_adjust_oneshot(vg_run_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), cycles), 0 | |
| 1211 | 1211 | } |
| 1212 | 1212 | |
| 1213 | 1213 | |
| r1679 | r1680 | |
| 1237 | 1237 | |
| 1238 | 1238 | vgc->vggo(vg); |
| 1239 | 1239 | vg_set_halt(0); |
| 1240 | timer_adjust(vg_run_timer, attotime_zero, 0 | |
| 1240 | timer_adjust_oneshot(vg_run_timer, attotime_zero, 0 | |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | WRITE16_HANDLER( avgdvg_go_word_w ) |
| r1679 | r1680 | |
|---|---|---|
| 189 | 189 | VIDEO_START( kingofb ) |
| 190 | 190 | { |
| 191 | 191 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y, |
| 192 | | |
| 192 | | |
| 193 | 193 | |
| 194 | 194 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_y, |
| 195 | | |
| 195 | | |
| 196 | 196 | |
| 197 | 197 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 198 | 198 | } |
| r1679 | r1680 | |
| 255 | 255 | VIDEO_START( ringking ) |
| 256 | 256 | { |
| 257 | 257 | bg_tilemap = tilemap_create(ringking_get_bg_tile_info, tilemap_scan_cols_flip_y, |
| 258 | | |
| 258 | | |
| 259 | 259 | |
| 260 | 260 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_y, |
| 261 | | |
| 261 | | |
| 262 | 262 | |
| 263 | 263 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 264 | 264 | } |
| r1679 | r1680 | |
|---|---|---|
| 45 | 45 | |
| 46 | 46 | static tilemap *bg_tilemap, *tx_tilemap; |
| 47 | 47 | |
| 48 | static const UINT8 *spritepalettebank; | |
| 49 | ||
| 50 | 48 | /* Notes: |
| 51 | 49 | write_layers and layers are used in galivan/dangar but not ninjemak |
| 52 | 50 | ninjemak_dispdisable is used in ninjemak but not galivan/dangar |
| 53 | spritepalettebank is set at palette init and doesn't need to be saved | |
| 54 | 51 | */ |
| 55 | 52 | |
| 56 | 53 | |
| r1679 | r1680 | |
| 64 | 61 | PALETTE_INIT( galivan ) |
| 65 | 62 | { |
| 66 | 63 | int i; |
| 67 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 68 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 69 | 64 | |
| 70 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 65 | /* allocate the colortable */ | |
| 66 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 67 | ||
| 68 | /* create a lookup table for the palette */ | |
| 69 | for (i = 0; i < 0x100; i++) | |
| 71 | 70 | { |
| 72 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 71 | int r = pal4bit(color_prom[i + 0x000]); | |
| 72 | int g = pal4bit(color_prom[i + 0x100]); | |
| 73 | int b = pal4bit(color_prom[i + 0x200]); | |
| 73 | 74 | |
| 74 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 75 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 76 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 77 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 78 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 79 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 80 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 81 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 82 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 83 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 84 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 85 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 86 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 87 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 88 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 89 | ||
| 90 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 91 | color_prom++; | |
| 75 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 92 | 76 | } |
| 93 | 77 | |
| 94 | color_prom += 2*machine->drv->total_colors; | |
| 95 | /* color_prom now points to the beginning of the lookup tables */ | |
| 78 | /* color_prom now points to the beginning of the lookup table */ | |
| 79 | color_prom += 0x300; | |
| 96 | 80 | |
| 81 | /* characters use colors 0-0x7f */ | |
| 82 | for (i = 0; i < 0x80; i++) | |
| 83 | colortable_entry_set_value(machine->colortable, i, i); | |
| 97 | 84 | |
| 98 | /* characters use colors 0-127 */ | |
| 99 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 100 | COLOR(0,i) = i; | |
| 101 | ||
| 102 | 85 | /* I think that */ |
| 103 | /* background tiles use colors | |
| 86 | /* background tiles use colors 0xc0-0xff in four banks */ | |
| 104 | 87 | /* the bottom two bits of the color code select the palette bank for */ |
| 105 | 88 | /* pens 0-7; the top two bits for pens 8-15. */ |
| 106 | for (i = 0;i < | |
| 89 | for (i = 0; i < 0x | |
| 107 | 90 | { |
| 108 | if (i & 8) COLOR(1,i) = 192 + (i & 0x0f) + ((i & 0xc0) >> 2); | |
| 109 | else COLOR(1,i) = 192 + (i & 0x0f) + ((i & 0x30) >> 0); | |
| 110 | } | |
| 91 | UINT8 ctabentry; | |
| 111 | 92 | |
| 93 | if (i & 0x08) | |
| 94 | ctabentry = 0xc0 | (i & 0x0f) | ((i & 0xc0) >> 2); | |
| 95 | else | |
| 96 | ctabentry = 0xc0 | (i & 0x0f) | ((i & 0x30) >> 0); | |
| 112 | 97 | |
| 113 | /* sprites use colors 128-191 in four banks */ | |
| 98 | colortable_entry_set_value(machine->colortable, 0x80 + i, ctabentry); | |
| 99 | } | |
| 100 | ||
| 101 | /* sprites use colors 0x80-0xbf in four banks */ | |
| 114 | 102 | /* The lookup table tells which colors to pick from the selected bank */ |
| 115 | 103 | /* the bank is selected by another PROM and depends on the top 7 bits of */ |
| 116 | 104 | /* the sprite code. The PROM selects the bank *separately* for pens 0-7 and */ |
| 117 | 105 | /* 8-15 (like for tiles). */ |
| 118 | for (i = 0;i < | |
| 106 | for (i = 0; i < 0x | |
| 119 | 107 | { |
| 120 | int j; | |
| 108 | UINT8 ctabentry; | |
| 109 | int i_swapped = ((i & 0x0f) << 8) | ((i & 0xff0) >> 4); | |
| 121 | 110 | |
| 122 | for (j = 0;j < 16;j++) | |
| 123 | { | |
| 124 | if (i & 8) | |
| 125 | COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x0c) << 2) + (*color_prom & 0x0f); | |
| 126 | else | |
| 127 | COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x03) << 4) + (*color_prom & 0x0f); | |
| 128 | } | |
| 111 | if (i & 0x80) | |
| 112 | ctabentry = 0x80 | ((i & 0x0c) << 2) | (color_prom[i >> 4] & 0x0f); | |
| 113 | else | |
| 114 | ctabentry = 0x80 | ((i & 0x03) << 4) | (color_prom[i >> 4] & 0x0f); | |
| 129 | 115 | |
| 130 | color_ | |
| 116 | colortable_entry_set_value(machine->colortable, 0x180 + i_swapped, ctabentry); | |
| 131 | 117 | } |
| 132 | 118 | |
| 133 | /* color_prom now points to the beginning of the sprite palette bank table */ | |
| 134 | spritepalettebank = color_prom; /* we'll need it at run time */ | |
| 119 | // for (i = 0;i < TOTAL_COLORS(2)/16;i++) | |
| 120 | // { | |
| 121 | // int j; | |
| 122 | ||
| 123 | // for (j = 0;j < 16;j++) | |
| 124 | // { | |
| 125 | // if (i & 8) | |
| 126 | // COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x0c) << 2) + (*color_prom & 0x0f); | |
| 127 | // else | |
| 128 | // COLOR(2,i + j * (TOTAL_COLORS(2)/16)) = 128 + ((j & 0x03) << 4) + (*color_prom & 0x0f); | |
| 129 | // } | |
| 130 | ||
| 131 | // color_prom++; | |
| 132 | // } | |
| 135 | 133 | } |
| 136 | 134 | |
| 137 | 135 | |
| r1679 | r1680 | |
| 203 | 201 | UINT8 *rombase = memory_region(REGION_CPU1); |
| 204 | 202 | memory_configure_bank(1, 0, 2, &rombase[0x10000], 0x2000); |
| 205 | 203 | |
| 206 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,128,128); | |
| 207 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 204 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,128,128); | |
| 205 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 208 | 206 | |
| 209 | 207 | tilemap_set_transparent_pen(tx_tilemap,15); |
| 210 | 208 | |
| r1679 | r1680 | |
| 222 | 220 | UINT8 *rombase = memory_region(REGION_CPU1); |
| 223 | 221 | memory_configure_bank(1, 0, 4, &rombase[0x10000], 0x2000); |
| 224 | 222 | |
| 225 | bg_tilemap = tilemap_create(ninjemak_get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,512,32); | |
| 226 | tx_tilemap = tilemap_create(ninjemak_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 223 | bg_tilemap = tilemap_create(ninjemak_get_bg_tile_info,tilemap_scan_cols, 16,16,512,32); | |
| 224 | tx_tilemap = tilemap_create(ninjemak_get_tx_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 227 | 225 | |
| 228 | 226 | tilemap_set_transparent_pen(tx_tilemap,15); |
| 229 | 227 | |
| r1679 | r1680 | |
| 367 | 365 | |
| 368 | 366 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 369 | 367 | { |
| 368 | const UINT8 *spritepalettebank = memory_region(REGION_USER1); | |
| 370 | 369 | int offs; |
| 371 | 370 | |
| 372 | 371 | /* draw the sprites */ |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( tsamurai ) |
| 57 | 57 | { |
| 58 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 59 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 58 | background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 59 | foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 60 | 60 | |
| 61 | 61 | tilemap_set_transparent_pen(background,0); |
| 62 | 62 | tilemap_set_transparent_pen(foreground,0); |
| r1679 | r1680 | |
| 255 | 255 | |
| 256 | 256 | VIDEO_START( vsgongf ) |
| 257 | 257 | { |
| 258 | foreground = tilemap_create(get_vsgongf_tile_info,tilemap_scan_rows, | |
| 258 | foreground = tilemap_create(get_vsgongf_tile_info,tilemap_scan_rows, | |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | VIDEO_UPDATE( vsgongf ) |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | VIDEO_START( canyon ) |
| 31 | 31 | { |
| 32 | 32 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 33 | | |
| 33 | | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 |
| r1679 | r1680 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | VIDEO_START( splash ) |
| 180 | 180 | { |
| 181 | bg_tilemap[0] = tilemap_create(get_tile_info_splash_tilemap0,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 182 | bg_tilemap[1] = tilemap_create(get_tile_info_splash_tilemap1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 181 | bg_tilemap[0] = tilemap_create(get_tile_info_splash_tilemap0,tilemap_scan_rows, 8, 8,64,32); | |
| 182 | bg_tilemap[1] = tilemap_create(get_tile_info_splash_tilemap1,tilemap_scan_rows,16,16,32,32); | |
| 183 | 183 | |
| 184 | 184 | tilemap_set_transparent_pen(bg_tilemap[0],0); |
| 185 | 185 | tilemap_set_transparent_pen(bg_tilemap[1],0); |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( f1gp ) |
| 57 | 57 | { |
| 58 | roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 59 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 58 | roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 59 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 60 | 60 | |
| 61 | 61 | K053936_wraparound_enable(0, 1); |
| 62 | 62 | K053936_set_offset(0, -58, -2); |
| r1679 | r1680 | |
| 71 | 71 | |
| 72 | 72 | VIDEO_START( f1gpb ) |
| 73 | 73 | { |
| 74 | roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 75 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 74 | roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 75 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 76 | 76 | |
| 77 | 77 | tilemap_set_transparent_pen(fg_tilemap,0xff); |
| 78 | 78 | |
| r1679 | r1680 | |
| 84 | 84 | |
| 85 | 85 | VIDEO_START( f1gp2 ) |
| 86 | 86 | { |
| 87 | roz_tilemap = tilemap_create(f1gp2_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 88 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 87 | roz_tilemap = tilemap_create(f1gp2_get_roz_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 88 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 89 | 89 | |
| 90 | 90 | K053936_wraparound_enable(0, 1); |
| 91 | 91 | K053936_set_offset(0, -48, -21); |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | VIDEO_START( lvcards ) |
| 106 | 106 | { |
| 107 | 107 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 108 | | |
| 108 | | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | VIDEO_UPDATE( lvcards ) |
| r1679 | r1680 | |
|---|---|---|
| 323 | 323 | VIDEO_START( namcos2 ) |
| 324 | 324 | { |
| 325 | 325 | namco_tilemap_init(2,memory_region(REGION_GFX4),TilemapCB); |
| 326 | tilemap_roz = tilemap_create(get_tile_info_roz,tilemap_scan_rows, | |
| 326 | tilemap_roz = tilemap_create(get_tile_info_roz,tilemap_scan_rows, | |
| 327 | 327 | tilemap_set_transparent_pen(tilemap_roz,0xff); |
| 328 | 328 | DrawSpriteInit(); |
| 329 | 329 | } |
| r1679 | r1680 | |
|---|---|---|
| 477 | 477 | |
| 478 | 478 | VIDEO_START( tx1 ) |
| 479 | 479 | { |
| 480 | tx1_tilemap = tilemap_create(get_tx1_tile_info, tilemap_scan_rows, | |
| 480 | tx1_tilemap = tilemap_create(get_tx1_tile_info, tilemap_scan_rows, | |
| 481 | 481 | tilemap_set_transparent_pen(tx1_tilemap, 0xff); |
| 482 | 482 | |
| 483 | 483 | /* Allocate a large bitmap that covers the three screens */ |
| r1679 | r1680 | |
| 1566 | 1566 | |
| 1567 | 1567 | VIDEO_START( buggyboy ) |
| 1568 | 1568 | { |
| 1569 | buggyboy_tilemap = tilemap_create(get_buggyboy_tile_info, tilemap_scan_rows, | |
| 1569 | buggyboy_tilemap = tilemap_create(get_buggyboy_tile_info, tilemap_scan_rows, | |
| 1570 | 1570 | tilemap_set_transparent_pen(buggyboy_tilemap, 0); |
| 1571 | 1571 | } |
| 1572 | 1572 |
| r1679 | r1680 | |
|---|---|---|
| 44 | 44 | PALETTE_INIT( pingpong ) |
| 45 | 45 | { |
| 46 | 46 | int i; |
| 47 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 48 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 49 | 47 | |
| 50 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 48 | /* allocate the colortable */ | |
| 49 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 50 | ||
| 51 | /* create a lookup table for the palette */ | |
| 52 | for (i = 0; i < 0x20; i++) | |
| 51 | 53 | { |
| 52 | int bit0,bit1,bit2,r,g,b; | |
| 54 | int bit0, bit1, bit2; | |
| 55 | int r, g, b; | |
| 53 | 56 | |
| 54 | 57 | /* red component */ |
| 55 | bit0 = (*color_prom >> 0) & 0x01; | |
| 56 | bit1 = (*color_prom >> 1) & 0x01; | |
| 57 | bit2 = (*color_prom >> 2) & 0x01; | |
| 58 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 59 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 60 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 58 | 61 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 62 | ||
| 59 | 63 | /* green component */ |
| 60 | bit0 = (*color_prom >> 3) & 0x01; | |
| 61 | bit1 = (*color_prom >> 4) & 0x01; | |
| 62 | bit2 = (*color_prom >> 5) & 0x01; | |
| 64 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 65 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 66 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 63 | 67 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 68 | ||
| 64 | 69 | /* blue component */ |
| 65 | 70 | bit0 = 0; |
| 66 | bit1 = (*color_prom >> 6) & 0x01; | |
| 67 | bit2 = (*color_prom >> 7) & 0x01; | |
| 71 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 72 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 68 | 73 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 69 | 74 | |
| 70 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 71 | color_prom++; | |
| 75 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 72 | 76 | } |
| 73 | 77 | |
| 74 | /* color_prom now points to the beginning of the char lookup table */ | |
| 78 | /* color_prom now points to the beginning of the lookup table */ | |
| 79 | color_prom += 0x20; | |
| 75 | 80 | |
| 76 | /* sprites */ | |
| 77 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 81 | /* characters */ | |
| 82 | for (i = 0; i < 0x100; i++) | |
| 78 | 83 | { |
| 79 | int code; | |
| 80 | int bit0,bit1,bit2,bit3; | |
| 81 | ||
| 82 | /* the bits of the color code are in reverse order - 0123 instead of 3210 */ | |
| 83 | code = *(color_prom++) & 0x0f; | |
| 84 | bit0 = (code >> 0) & 1; | |
| 85 | bit1 = (code >> 1) & 1; | |
| 86 | bit2 = (code >> 2) & 1; | |
| 87 | bit3 = (code >> 3) & 1; | |
| 88 | code = (bit0 << 3) | (bit1 << 2) | (bit2 << 1) | (bit3 << 0); | |
| 89 | COLOR(1,i) = code; | |
| 84 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 85 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 90 | 86 | } |
| 91 | 87 | |
| 92 | /* characters */ | |
| 93 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 94 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 88 | /* sprites */ | |
| 89 | for (i = 0x100; i < 0x200; i++) | |
| 90 | { | |
| 91 | UINT8 ctabentry = BITSWAP8(color_prom[i],7,6,5,4,0,1,2,3); | |
| 92 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 93 | } | |
| 95 | 94 | } |
| 96 | 95 | |
| 97 | 96 | WRITE8_HANDLER( pingpong_videoram_w ) |
| r1679 | r1680 | |
| 118 | 117 | |
| 119 | 118 | VIDEO_START( pingpong ) |
| 120 | 119 | { |
| 121 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 122 | TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 120 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 123 | 121 | } |
| 124 | 122 | |
| 125 | 123 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
| 136 | 134 | |
| 137 | 135 | flipx = spriteram[offs] & 0x40; |
| 138 | 136 | flipy = spriteram[offs] & 0x80; |
| 139 | color = spriteram[offs] & 0x1F; | |
| 140 | schar = spriteram[offs + 2] & 0x7F; | |
| 137 | color = spriteram[offs] & 0x1f; | |
| 138 | schar = spriteram[offs + 2] & 0x7f; | |
| 141 | 139 | |
| 142 | 140 | drawgfx(bitmap,machine->gfx[1], |
| 143 | 141 | schar, |
| 144 | 142 | color, |
| 145 | 143 | flipx,flipy, |
| 146 | 144 | sx,sy, |
| 147 | &spritevisiblearea,TRANSPARENCY_COLOR,0); | |
| 145 | &spritevisiblearea,TRANSPARENCY_PENS, | |
| 146 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 148 | 147 | } |
| 149 | 148 | } |
| 150 | 149 |
| r1679 | r1680 | |
|---|---|---|
| 232 | 232 | |
| 233 | 233 | VIDEO_START( ssrj ) |
| 234 | 234 | { |
| 235 | tilemap1 = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 236 | tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 237 | tilemap4 = tilemap_create( get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 235 | tilemap1 = tilemap_create( get_tile_info1,tilemap_scan_rows,8,8,32,32 ); | |
| 236 | tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,8,8,32,32 ); | |
| 237 | tilemap4 = tilemap_create( get_tile_info4,tilemap_scan_rows,8,8,32,32 ); | |
| 238 | 238 | tilemap_set_transparent_pen(tilemap2,0); |
| 239 | 239 | tilemap_set_transparent_pen(tilemap4,0); |
| 240 | 240 | } |
| r1679 | r1680 | |
|---|---|---|
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | /* initialize the playfield */ |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 86 | 86 | |
| 87 | 87 | /* initialize the motion objects */ |
| 88 | 88 | atarimo_init(machine, 0, &modesc); |
| r1679 | r1680 | |
|---|---|---|
| 111 | 111 | VIDEO_START( gotya ) |
| 112 | 112 | { |
| 113 | 113 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_thehand, |
| 114 | | |
| 114 | | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | static void draw_status_row(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int sx, int col) |
| r1679 | r1680 | |
|---|---|---|
| 194 | 194 | |
| 195 | 195 | VIDEO_START( apache3 ) |
| 196 | 196 | { |
| 197 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, | |
| 197 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, | |
| 198 | 198 | shadow_pen_array = auto_malloc(8192); |
| 199 | 199 | temp_bitmap = auto_bitmap_alloc(512, 512, BITMAP_FORMAT_RGB32); |
| 200 | 200 | |
| r1679 | r1680 | |
| 204 | 204 | |
| 205 | 205 | VIDEO_START( roundup5 ) |
| 206 | 206 | { |
| 207 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, | |
| 207 | tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, | |
| 208 | 208 | shadow_pen_array = auto_malloc(8192); |
| 209 | 209 | roundup5_vram = auto_malloc(0x48000 * 4); |
| 210 | 210 | |
| r1679 | r1680 | |
| 214 | 214 | |
| 215 | 215 | VIDEO_START( cyclwarr ) |
| 216 | 216 | { |
| 217 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 218 | //layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 219 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 220 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 221 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,512); | |
| 217 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,8,8,64,512); | |
| 218 | //layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,8,8,64,512); | |
| 219 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,8,8,128,256); | |
| 220 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,8,8,64,512); | |
| 221 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,8,8,64,512); | |
| 222 | 222 | |
| 223 | 223 | shadow_pen_array = auto_malloc(8192); |
| 224 | 224 | memset(shadow_pen_array, 0, 8192); |
| r1679 | r1680 | |
| 226 | 226 | |
| 227 | 227 | VIDEO_START( bigfight ) |
| 228 | 228 | { |
| 229 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 230 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 231 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 232 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,256); | |
| 229 | layer0 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,8,8,128,256); | |
| 230 | layer1 = tilemap_create(get_tile_info_bigfight_0,tilemap_scan_rows,8,8,128,256); | |
| 231 | layer2 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,8,8,128,256); | |
| 232 | layer3 = tilemap_create(get_tile_info_bigfight_1,tilemap_scan_rows,8,8,128,256); | |
| 233 | 233 | |
| 234 | 234 | shadow_pen_array = auto_malloc(8192); |
| 235 | 235 | memset(shadow_pen_array, 0, 8192); |
| r1679 | r1680 | |
| 271 | 271 | { |
| 272 | 272 | if( gfx ) |
| 273 | 273 | { |
| 274 | const pen_t *pal = &Machine-> | |
| 274 | const pen_t *pal = &Machine-> | |
| 275 | 275 | const UINT8 *shadow_pens = shadow_pen_array + (gfx->color_granularity * (color % gfx->total_colors)); |
| 276 | 276 | int source_base = (code % gfx->total_elements) * gfx->height; |
| 277 | 277 |
| r1679 | r1680 | |
|---|---|---|
| 1526 | 1526 | K007342_gfxnum = gfx_index; |
| 1527 | 1527 | K007342_callback = callback; |
| 1528 | 1528 | |
| 1529 | K007342_tilemap[0] = tilemap_create(K007342_get_tile_info0,K007342_scan,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 1530 | K007342_tilemap[1] = tilemap_create(K007342_get_tile_info1,K007342_scan,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 1529 | K007342_tilemap[0] = tilemap_create(K007342_get_tile_info0,K007342_scan,8,8,64,32); | |
| 1530 | K007342_tilemap[1] = tilemap_create(K007342_get_tile_info1,K007342_scan,8,8,64,32); | |
| 1531 | 1531 | |
| 1532 | 1532 | K007342_ram = auto_malloc(0x2000); |
| 1533 | 1533 | K007342_scroll_ram = auto_malloc(0x0200); |
| r1679 | r1680 | |
| 2044 | 2044 | |
| 2045 | 2045 | has_extra_video_ram = 0; |
| 2046 | 2046 | |
| 2047 | K052109_tilemap[0] = tilemap_create(K052109_get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 2048 | K052109_tilemap[1] = tilemap_create(K052109_get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 2049 | K052109_tilemap[2] = tilemap_create(K052109_get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 2047 | K052109_tilemap[0] = tilemap_create(K052109_get_tile_info0,tilemap_scan_rows,8,8,64,32); | |
| 2048 | K052109_tilemap[1] = tilemap_create(K052109_get_tile_info1,tilemap_scan_rows,8,8,64,32); | |
| 2049 | K052109_tilemap[2] = tilemap_create(K052109_get_tile_info2,tilemap_scan_rows,8,8,64,32); | |
| 2050 | 2050 | |
| 2051 | 2051 | K052109_ram = auto_malloc(0x6000); |
| 2052 | 2052 | |
| r1679 | r1680 | |
| 4703 | 4703 | K051316_bpp[chip] = bpp; |
| 4704 | 4704 | K051316_callback[chip] = callback; |
| 4705 | 4705 | |
| 4706 | K051316_tilemap[chip] = tilemap_create(get_tile_info[chip],tilemap_scan_rows, | |
| 4706 | K051316_tilemap[chip] = tilemap_create(get_tile_info[chip],tilemap_scan_rows, | |
| 4707 | 4707 | |
| 4708 | 4708 | K051316_ram[chip] = auto_malloc(0x800); |
| 4709 | 4709 | |
| r1679 | r1680 | |
| 5782 | 5782 | |
| 5783 | 5783 | K056832_videoram = auto_malloc(0x2000 * (K056832_PAGE_COUNT+1)); |
| 5784 | 5784 | |
| 5785 | K056832_tilemap[0x0] = tilemap_create(K056832_get_tile_info0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5786 | K056832_tilemap[0x1] = tilemap_create(K056832_get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5787 | K056832_tilemap[0x2] = tilemap_create(K056832_get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5788 | K056832_tilemap[0x3] = tilemap_create(K056832_get_tile_info3, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5789 | K056832_tilemap[0x4] = tilemap_create(K056832_get_tile_info4, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5790 | K056832_tilemap[0x5] = tilemap_create(K056832_get_tile_info5, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5791 | K056832_tilemap[0x6] = tilemap_create(K056832_get_tile_info6, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5792 | K056832_tilemap[0x7] = tilemap_create(K056832_get_tile_info7, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5793 | K056832_tilemap[0x8] = tilemap_create(K056832_get_tile_info8, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5794 | K056832_tilemap[0x9] = tilemap_create(K056832_get_tile_info9, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5795 | K056832_tilemap[0xa] = tilemap_create(K056832_get_tile_infoa, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5796 | K056832_tilemap[0xb] = tilemap_create(K056832_get_tile_infob, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5797 | K056832_tilemap[0xc] = tilemap_create(K056832_get_tile_infoc, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5798 | K056832_tilemap[0xd] = tilemap_create(K056832_get_tile_infod, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5799 | K056832_tilemap[0xe] = tilemap_create(K056832_get_tile_infoe, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5800 | K056832_tilemap[0xf] = tilemap_create(K056832_get_tile_infof, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64, 32); | |
| 5785 | K056832_tilemap[0x0] = tilemap_create(K056832_get_tile_info0, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5786 | K056832_tilemap[0x1] = tilemap_create(K056832_get_tile_info1, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5787 | K056832_tilemap[0x2] = tilemap_create(K056832_get_tile_info2, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5788 | K056832_tilemap[0x3] = tilemap_create(K056832_get_tile_info3, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5789 | K056832_tilemap[0x4] = tilemap_create(K056832_get_tile_info4, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5790 | K056832_tilemap[0x5] = tilemap_create(K056832_get_tile_info5, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5791 | K056832_tilemap[0x6] = tilemap_create(K056832_get_tile_info6, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5792 | K056832_tilemap[0x7] = tilemap_create(K056832_get_tile_info7, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5793 | K056832_tilemap[0x8] = tilemap_create(K056832_get_tile_info8, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5794 | K056832_tilemap[0x9] = tilemap_create(K056832_get_tile_info9, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5795 | K056832_tilemap[0xa] = tilemap_create(K056832_get_tile_infoa, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5796 | K056832_tilemap[0xb] = tilemap_create(K056832_get_tile_infob, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5797 | K056832_tilemap[0xc] = tilemap_create(K056832_get_tile_infoc, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5798 | K056832_tilemap[0xd] = tilemap_create(K056832_get_tile_infod, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5799 | K056832_tilemap[0xe] = tilemap_create(K056832_get_tile_infoe, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5800 | K056832_tilemap[0xf] = tilemap_create(K056832_get_tile_infof, tilemap_scan_rows, 8, 8, 64, 32); | |
| 5801 | 5801 | |
| 5802 | 5802 | for (i=0; i<K056832_PAGE_COUNT; i++) |
| 5803 | 5803 | { |
| r1679 | r1680 | |
|---|---|---|
| 127 | 127 | VIDEO_START( blmbycar ) |
| 128 | 128 | { |
| 129 | 129 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 130 | | |
| 130 | | |
| 131 | 131 | |
| 132 | 132 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 133 | | |
| 133 | | |
| 134 | 134 | |
| 135 | 135 | tilemap_set_scroll_rows(tilemap_0,1); |
| 136 | 136 | tilemap_set_scroll_cols(tilemap_0,1); |
| r1679 | r1680 | |
|---|---|---|
| 20 | 20 | PALETTE_INIT( retofinv ) |
| 21 | 21 | { |
| 22 | 22 | int i; |
| 23 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 24 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 25 | 23 | |
| 24 | /* allocate the colortable */ | |
| 25 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 26 | 26 | |
| 27 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 27 | /* create a lookup table for the palette */ | |
| 28 | for (i = 0; i < 0x100; i++) | |
| 28 | 29 | { |
| 29 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 30 | int r = pal4bit(color_prom[i + 0x000]); | |
| 31 | int g = pal4bit(color_prom[i + 0x100]); | |
| 32 | int b = pal4bit(color_prom[i + 0x200]); | |
| 30 | 33 | |
| 31 | bit0 = (color_prom[i + 0*machine->drv->total_colors] >> 0) & 0x01; | |
| 32 | bit1 = (color_prom[i + 0*machine->drv->total_colors] >> 1) & 0x01; | |
| 33 | bit2 = (color_prom[i + 0*machine->drv->total_colors] >> 2) & 0x01; | |
| 34 | bit3 = (color_prom[i + 0*machine->drv->total_colors] >> 3) & 0x01; | |
| 35 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 36 | ||
| 37 | bit0 = (color_prom[i + 1*machine->drv->total_colors] >> 0) & 0x01; | |
| 38 | bit1 = (color_prom[i + 1*machine->drv->total_colors] >> 1) & 0x01; | |
| 39 | bit2 = (color_prom[i + 1*machine->drv->total_colors] >> 2) & 0x01; | |
| 40 | bit3 = (color_prom[i + 1*machine->drv->total_colors] >> 3) & 0x01; | |
| 41 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 42 | ||
| 43 | bit0 = (color_prom[i + 2*machine->drv->total_colors] >> 0) & 0x01; | |
| 44 | bit1 = (color_prom[i + 2*machine->drv->total_colors] >> 1) & 0x01; | |
| 45 | bit2 = (color_prom[i + 2*machine->drv->total_colors] >> 2) & 0x01; | |
| 46 | bit3 = (color_prom[i + 2*machine->drv->total_colors] >> 3) & 0x01; | |
| 47 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 48 | ||
| 49 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 34 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 50 | 35 | } |
| 51 | 36 | |
| 52 | color_prom += 3*machine->drv->total_colors; | |
| 53 | 37 | /* color_prom now points to the beginning of the lookup table */ |
| 38 | color_prom += 0x300; | |
| 54 | 39 | |
| 40 | ||
| 55 | 41 | /* fg chars (1bpp) */ |
| 56 | for (i = 0;i < | |
| 42 | for (i = 0; i < | |
| 57 | 43 | { |
| 58 | if (i % 2) | |
| 59 | COLOR(0,i) = i/2; | |
| 44 | UINT8 ctabentry; | |
| 45 | ||
| 46 | if (i & 0x01) | |
| 47 | ctabentry = i >> 1; | |
| 60 | 48 | else |
| 61 | COLOR(0,i) = 0; | |
| 49 | ctabentry = 0; | |
| 50 | ||
| 51 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 62 | 52 | } |
| 63 | 53 | |
| 64 | /* sprites */ | |
| 65 | for(i = 0;i < TOTAL_COLORS(2);i++) | |
| 66 | COLOR(2,i) = BITSWAP8(color_prom[i],4,5,6,7,3,2,1,0); | |
| 67 | ||
| 68 | /* bg tiles */ | |
| 69 | for(i = 0;i < TOTAL_COLORS(1);i++) | |
| 70 | COLOR(1,i) = BITSWAP8(color_prom[TOTAL_COLORS(2) + i],4,5,6,7,3,2,1,0); | |
| 54 | /* sprites and bg tiles */ | |
| 55 | for (i = 0; i < 0x800; i++) | |
| 56 | { | |
| 57 | UINT8 ctabentry = BITSWAP8(color_prom[i],4,5,6,7,3,2,1,0); | |
| 58 | colortable_entry_set_value(machine->colortable, i + 0x200, ctabentry); | |
| 59 | } | |
| 71 | 60 | } |
| 72 | 61 | |
| 73 | 62 | |
| r1679 | r1680 | |
| 92 | 81 | static TILE_GET_INFO( bg_get_tile_info ) |
| 93 | 82 | { |
| 94 | 83 | SET_TILE_INFO( |
| 95 | | |
| 84 | 2, | |
| 96 | 85 | retofinv_bg_videoram[tile_index] + 256 * bg_bank, |
| 97 | 86 | retofinv_bg_videoram[0x400 + tile_index] & 0x3f, |
| 98 | 87 | 0); |
| r1679 | r1680 | |
| 101 | 90 | static TILE_GET_INFO( fg_get_tile_info ) |
| 102 | 91 | { |
| 103 | 92 | /* not sure about the transparency thing, but it makes sense */ |
| 93 | int color = retofinv_fg_videoram[0x400 + tile_index]; | |
| 94 | ||
| 95 | tileinfo->group = color; | |
| 96 | ||
| 104 | 97 | SET_TILE_INFO( |
| 105 | 98 | 0, |
| 106 | 99 | retofinv_fg_videoram[tile_index] + 256 * fg_bank, |
| 107 | | |
| 100 | c | |
| 108 | 101 | (tile_index < 0x40 || tile_index >= 0x3c0) ? TILE_FORCE_LAYER0 : 0); |
| 109 | 102 | } |
| 110 | 103 | |
| r1679 | r1680 | |
| 118 | 111 | |
| 119 | 112 | VIDEO_START( retofinv ) |
| 120 | 113 | { |
| 121 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 122 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan,TILEMAP_TYPE_COLORTABLE,8,8,36,28); | |
| 114 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,8,8,36,28); | |
| 115 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan,8,8,36,28); | |
| 123 | 116 | |
| 124 | tilemap_ | |
| 117 | colortable_configure_tilemap_g | |
| 125 | 118 | |
| 126 | 119 | spriteram = retofinv_sharedram + 0x0780; |
| 127 | 120 | spriteram_2 = retofinv_sharedram + 0x0f80; |
| r1679 | r1680 | |
| 225 | 218 | { |
| 226 | 219 | for (x = 0;x <= sizex;x++) |
| 227 | 220 | { |
| 228 | drawgfx(bitmap,machine->gfx[ | |
| 221 | drawgfx(bitmap,machine->gfx[1], | |
| 229 | 222 | sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], |
| 230 | 223 | color, |
| 231 | 224 | flipx,flipy, |
| 232 | 225 | sx + 16*x,sy + 16*y, |
| 233 | &spritevisiblearea,TRANSPARENCY_COLOR,0xff); | |
| 226 | &spritevisiblearea,TRANSPARENCY_PENS, | |
| 227 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0xff)); | |
| 234 | 228 | } |
| 235 | 229 | } |
| 236 | 230 | } |
| r1679 | r1680 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | VIDEO_START( meadows ) |
| 38 | 38 | { |
| 39 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 39 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 |
| r1679 | r1680 | |
|---|---|---|
| 90 | 90 | VIDEO_START( bogeyman ) |
| 91 | 91 | { |
| 92 | 92 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 93 | | |
| 93 | | |
| 94 | 94 | |
| 95 | 95 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 96 | | |
| 96 | | |
| 97 | 97 | |
| 98 | 98 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 99 | 99 | } |
| r1679 | r1680 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | VIDEO_START( m72 ) |
| 124 | 124 | { |
| 125 | bg_tilemap = tilemap_create(m72_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 126 | fg_tilemap = tilemap_create(m72_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 125 | bg_tilemap = tilemap_create(m72_get_bg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 126 | fg_tilemap = tilemap_create(m72_get_fg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 127 | 127 | |
| 128 | 128 | m72_spriteram = auto_malloc(spriteram_size); |
| 129 | 129 | |
| r1679 | r1680 | |
| 148 | 148 | |
| 149 | 149 | VIDEO_START( rtype2 ) |
| 150 | 150 | { |
| 151 | bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 152 | fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 151 | bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 152 | fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 153 | 153 | |
| 154 | 154 | m72_spriteram = auto_malloc(spriteram_size); |
| 155 | 155 | |
| r1679 | r1680 | |
| 186 | 186 | { |
| 187 | 187 | // The tilemap can be 256x64, but seems to be used at 128x64 (scroll wraparound). |
| 188 | 188 | // The layout ramains 256x64, the right half is just not displayed. |
| 189 | // bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,256,64); | |
| 190 | bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,majtitle_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 191 | fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 189 | // bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,8,8,256,64); | |
| 190 | bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,majtitle_scan_rows,8,8,128,64); | |
| 191 | fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 192 | 192 | |
| 193 | 193 | m72_spriteram = auto_malloc(spriteram_size); |
| 194 | 194 | |
| r1679 | r1680 | |
| 213 | 213 | |
| 214 | 214 | VIDEO_START( hharry ) |
| 215 | 215 | { |
| 216 | bg_tilemap = tilemap_create(hharry_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 217 | fg_tilemap = tilemap_create(m72_get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 216 | bg_tilemap = tilemap_create(hharry_get_bg_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 217 | fg_tilemap = tilemap_create(m72_get_fg_tile_info, tilemap_scan_rows,8,8,64,64); | |
| 218 | 218 | |
| 219 | 219 | m72_spriteram = auto_malloc(spriteram_size); |
| 220 | 220 |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | VIDEO_START( pokechmp ) |
| 31 | 31 | { |
| 32 | 32 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 33 | | |
| 33 | | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | VIDEO_START( ohmygod ) |
| 37 | 37 | { |
| 38 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 38 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 |
| r1679 | r1680 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | VIDEO_START( pow ) |
| 82 | 82 | { |
| 83 | fix_tilemap = tilemap_create(get_pow_tile_info,tilemap_scan_cols, | |
| 83 | fix_tilemap = tilemap_create(get_pow_tile_info,tilemap_scan_cols, | |
| 84 | 84 | |
| 85 | 85 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | VIDEO_START( searchar ) |
| 89 | 89 | { |
| 90 | fix_tilemap = tilemap_create(get_sar_tile_info,tilemap_scan_cols, | |
| 90 | fix_tilemap = tilemap_create(get_sar_tile_info,tilemap_scan_cols, | |
| 91 | 91 | |
| 92 | 92 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | VIDEO_START( ikari3 ) |
| 96 | 96 | { |
| 97 | fix_tilemap = tilemap_create(get_ikari3_tile_info,tilemap_scan_cols, | |
| 97 | fix_tilemap = tilemap_create(get_ikari3_tile_info,tilemap_scan_cols, | |
| 98 | 98 | |
| 99 | 99 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 100 | 100 | } |
| r1679 | r1680 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | VIDEO_START( aeroboto ) |
| 44 | 44 | { |
| 45 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 45 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 46 | 46 | |
| 47 | 47 | tilemap_set_transparent_pen(bg_tilemap,0); |
| 48 | 48 |
| r1679 | r1680 | |
|---|---|---|
| 136 | 136 | |
| 137 | 137 | VIDEO_START( firetrap ) |
| 138 | 138 | { |
| 139 | fg_tilemap = tilemap_create(get_fg_tile_info, get_fg_memory_offset,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 140 | bg1_tilemap = tilemap_create(get_bg1_tile_info,get_bg_memory_offset,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 141 | bg2_tilemap = tilemap_create(get_bg2_tile_info,get_bg_memory_offset,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 139 | fg_tilemap = tilemap_create(get_fg_tile_info, get_fg_memory_offset, 8, 8,32,32); | |
| 140 | bg1_tilemap = tilemap_create(get_bg1_tile_info,get_bg_memory_offset,16,16,32,32); | |
| 141 | bg2_tilemap = tilemap_create(get_bg2_tile_info,get_bg_memory_offset, 16,16,32,32); | |
| 142 | 142 | |
| 143 | 143 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 144 | 144 | tilemap_set_transparent_pen(bg1_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | VIDEO_START( thedeep ) |
| 110 | 110 | { |
| 111 | tilemap_0 = tilemap_create(get_tile_info_0,tilemap_scan_rows_back,TILEMAP_TYPE_PEN,16,16,0x20,0x20); | |
| 112 | tilemap_1 = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,0x20,0x20); | |
| 111 | tilemap_0 = tilemap_create(get_tile_info_0,tilemap_scan_rows_back,16,16,0x20,0x20); | |
| 112 | tilemap_1 = tilemap_create(get_tile_info_1,tilemap_scan_rows,8,8,0x20,0x20); | |
| 113 | 113 | |
| 114 | 114 | tilemap_set_transparent_pen( tilemap_0, 0 ); |
| 115 | 115 | tilemap_set_transparent_pen( tilemap_1, 0 ); |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | VIDEO_START( oneshot ) |
| 69 | 69 | { |
| 70 | oneshot_bg_tilemap = tilemap_create(get_oneshot_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 71 | oneshot_mid_tilemap = tilemap_create(get_oneshot_mid_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 72 | oneshot_fg_tilemap = tilemap_create(get_oneshot_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 70 | oneshot_bg_tilemap = tilemap_create(get_oneshot_bg_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 71 | oneshot_mid_tilemap = tilemap_create(get_oneshot_mid_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 72 | oneshot_fg_tilemap = tilemap_create(get_oneshot_fg_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 73 | 73 | |
| 74 | 74 | tilemap_set_transparent_pen(oneshot_bg_tilemap,0); |
| 75 | 75 | tilemap_set_transparent_pen(oneshot_mid_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | VIDEO_START( stlforce ) |
| 183 | 183 | { |
| 184 | stlforce_bg_tilemap = tilemap_create(get_stlforce_bg_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,64,16); | |
| 185 | stlforce_mlow_tilemap = tilemap_create(get_stlforce_mlow_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,64,16); | |
| 186 | stlforce_mhigh_tilemap = tilemap_create(get_stlforce_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,64,16); | |
| 187 | stlforce_tx_tilemap = tilemap_create(get_stlforce_tx_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 184 | stlforce_bg_tilemap = tilemap_create(get_stlforce_bg_tile_info, tilemap_scan_cols, 16,16,64,16); | |
| 185 | stlforce_mlow_tilemap = tilemap_create(get_stlforce_mlow_tile_info, tilemap_scan_cols, 16,16,64,16); | |
| 186 | stlforce_mhigh_tilemap = tilemap_create(get_stlforce_mhigh_tile_info,tilemap_scan_cols, 16,16,64,16); | |
| 187 | stlforce_tx_tilemap = tilemap_create(get_stlforce_tx_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 188 | 188 | |
| 189 | 189 | tilemap_set_transparent_pen(stlforce_mlow_tilemap,0); |
| 190 | 190 | tilemap_set_transparent_pen(stlforce_mhigh_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | VIDEO_START( amspdwy ) |
| 80 | 80 | { |
| 81 | 81 | bg_tilemap = tilemap_create( get_tile_info, tilemap_scan_cols_back, |
| 82 | | |
| 82 | | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 |
| r1679 | r1680 | |
|---|---|---|
| 114 | 114 | atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x10); |
| 115 | 115 | |
| 116 | 116 | /* initialize the playfield */ |
| 117 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 117 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 118 | 118 | |
| 119 | 119 | /* initialize the motion objects */ |
| 120 | 120 | atarirle_init(0, atarig1_pitfight ? &modesc_pitfight : &modesc_hydra); |
| 121 | 121 | |
| 122 | 122 | /* initialize the alphanumerics */ |
| 123 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 123 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 124 | 124 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 125 | 125 | |
| 126 | 126 | /* reset statics */ |
| r1679 | r1680 | |
|---|---|---|
| 94 | 94 | }; |
| 95 | 95 | |
| 96 | 96 | /* initialize the playfield */ |
| 97 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 97 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 98 | 98 | |
| 99 | 99 | /* initialize the motion objects */ |
| 100 | 100 | atarimo_init(machine, 0, &modesc); |
| 101 | 101 | |
| 102 | 102 | /* initialize the alphanumerics */ |
| 103 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 103 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 104 | 104 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 105 | 105 | } |
| 106 | 106 |
| r1679 | r1680 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | VIDEO_START( srumbler ) |
| 53 | 53 | { |
| 54 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 55 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 54 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 55 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 16,16,64,64); | |
| 56 | 56 | |
| 57 | 57 | tilemap_set_transparent_pen(fg_tilemap,3); |
| 58 | 58 |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | |
| 156 | 156 | VIDEO_START( legionna ) |
| 157 | 157 | { |
| 158 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 159 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 160 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 161 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 158 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 159 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 160 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows,16,16,32,32); | |
| 161 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 162 | 162 | |
| 163 | 163 | legionna_scrollram16 = auto_malloc(0x60); |
| 164 | 164 | |
| r1679 | r1680 | |
| 170 | 170 | |
| 171 | 171 | VIDEO_START( denjinmk ) |
| 172 | 172 | { |
| 173 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 174 | foreground_layer = tilemap_create(get_fore_tile_info_denji,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 175 | midground_layer = tilemap_create(get_mid_tile_info_denji, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 176 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 173 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 174 | foreground_layer = tilemap_create(get_fore_tile_info_denji,tilemap_scan_rows,16,16,32,32); | |
| 175 | midground_layer = tilemap_create(get_mid_tile_info_denji, tilemap_scan_rows,16,16,32,32); | |
| 176 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 177 | 177 | |
| 178 | 178 | legionna_scrollram16 = auto_malloc(0x60); |
| 179 | 179 | |
| r1679 | r1680 | |
| 185 | 185 | |
| 186 | 186 | VIDEO_START( cupsoc ) |
| 187 | 187 | { |
| 188 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 189 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 190 | midground_layer = tilemap_create(get_mid_tile_info_cupsoc, tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 191 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 188 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 189 | foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 190 | midground_layer = tilemap_create(get_mid_tile_info_cupsoc, tilemap_scan_rows,16,16,32,32); | |
| 191 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 192 | 192 | |
| 193 | 193 | legionna_scrollram16 = auto_malloc(0x60); |
| 194 | 194 |
| r1679 | r1680 | |
|---|---|---|
| 74 | 74 | VIDEO_START( pbaction ) |
| 75 | 75 | { |
| 76 | 76 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 77 | | |
| 77 | | |
| 78 | 78 | |
| 79 | 79 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 80 | | |
| 80 | | |
| 81 | 81 | |
| 82 | 82 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 83 | 83 | } |
| r1679 | r1680 | |
|---|---|---|
| 64 | 64 | VIDEO_START( mcr68 ) |
| 65 | 65 | { |
| 66 | 66 | /* initialize the background tilemap */ |
| 67 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 67 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 68 | 68 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 69 | 69 | } |
| 70 | 70 | |
| r1679 | r1680 | |
| 77 | 77 | int code, y, x; |
| 78 | 78 | |
| 79 | 79 | /* initialize the background tilemap */ |
| 80 | bg_tilemap = tilemap_create(zwackery_get_bg_tile_info, tilemap_scan_rows, | |
| 80 | bg_tilemap = tilemap_create(zwackery_get_bg_tile_info, tilemap_scan_rows, | |
| 81 | 81 | |
| 82 | 82 | /* initialize the foreground tilemap */ |
| 83 | fg_tilemap = tilemap_create(zwackery_get_fg_tile_info, tilemap_scan_rows, | |
| 83 | fg_tilemap = tilemap_create(zwackery_get_fg_tile_info, tilemap_scan_rows, | |
| 84 | 84 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 85 | 85 | |
| 86 | 86 | /* "colorize" each code */ |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | /********************************************************************************** |
| 2 | 2 | |
| 3 | 3 | |
| 4 | FUNWORLD. | |
| 4 | FUNWORLD / TAB. | |
| 5 | 5 | |
| 6 | ||
| 7 | 6 | Original preliminary driver: Curt Coder, Peter Trauner. |
| 8 | 7 | Rewrite and aditional work: Roberto Fresca. |
| 9 | 8 | |
| 10 | 9 | |
| 10 | ||
| 11 | 11 | Games running in this hardware: |
| 12 | 12 | |
| 13 | * Jolly Card (Austria), TAB-Austria, 1985. | |
| 14 | * Jolly Card (Austria, encrypted), TAB-Austria, 1985. | |
| 15 | * Jolly Card (Croatia), Soft Design, 1993. | |
| 16 | * Jolly Card (Italia, encrypted), bootleg, 199?. | |
| 17 | * Jolly Card (Austria, Fun World, bootleg), Inter Games, 1995. | |
| 18 | * Big Deal (Hungary, set 1), Fun World, 1990. | |
| 19 | * Big Deal (Hungary, set 2), Fun World, 1990. | |
| 20 | * Jolly Card (Austria, Fun World), Fun World, 1990. | |
| 21 | * Cuore 1 (Italia), C.M.C., 1996. | |
| 22 | * Elephant Family (Italia, new), C.M.C., 1997. | |
| 23 | * Elephant Family (Italia, old), C.M.C., 1996. | |
| 24 | * Pool 10 (Italia, set 1), C.M.C., 1996. | |
| 25 | * Pool 10 (Italia, set 2), C.M.C., 1996. | |
| 26 | * Tortuga Family (Italia), C.M.C., 1997. | |
| 27 | * Royal Card (Austria, set 1), TAB-Austria, 1991. | |
| 28 | * Royal Card (Austria, set 2), TAB-Austria, 1991. | |
| 29 | * Royal Card (Slovakia, encrypted), Evona Electronic, 1991. | |
| 30 | * Magic Card II (Bulgaria, bootleg), Impera, 1996. | |
| 31 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. | |
| 32 | * Mongolfier New (Italia), bootleg, 199?. | |
| 33 | * Soccer New (Italia), bootleg, 199?. | |
| 34 | * Snooker 10 (Ver 1.11), Sandiy, 1998. | |
| 35 | * Saloon (France, encrypted), unknown, 199?. | |
| 13 | * Jolly Card (austrian), TAB-Austria, 1985. | |
| 14 | * Jolly Card (austrian, encrypted), TAB-Austria, 1985. | |
| 15 | * Jolly Card (3x3 deal), TAB-Austria, 1985. | |
| 16 | * Jolly Card Professional 2.0, Spale-Soft, 2000. | |
| 17 | * Jolly Card (croatian), Soft Design, 1993. | |
| 18 | * Jolly Card (italian, blue TAB board, encrypted), bootleg, 199?. | |
| 19 | * Jolly Card (austrian, Funworld, bootleg), Inter Games, 1986. | |
| 20 | * Big Deal (hungarian, set 1), Funworld, 1986. | |
| 21 | * Big Deal (hungarian, set 2), Funworld, 1986. | |
| 22 | * Jolly Card (austrian, Funworld), Funworld, 1986. | |
| 23 | * Cuore 1 (italian), C.M.C., 1996. | |
| 24 | * Elephant Family (italian, new), C.M.C., 1997. | |
| 25 | * Elephant Family (italian, old), C.M.C., 1996. | |
| 26 | * Pool 10 (italian, set 1), C.M.C., 1996. | |
| 27 | * Pool 10 (italian, set 2), C.M.C., 1996. | |
| 28 | * Tortuga Family (italian), C.M.C., 1997. | |
| 29 | * Royal Card (austrian, set 1), TAB-Austria, 1991. | |
| 30 | * Royal Card (austrian, set 2), TAB-Austria, 1991. | |
| 31 | * Royal Card (slovak, encrypted), Evona Electronic, 1991. | |
| 32 | * Lucky Lady (3x3 deal), TAB-Austria, 1991. | |
| 33 | * Lucky Lady (4x1 aces), TAB-Austria, 1991. | |
| 34 | * Magic Card II (bulgarian), Impera, 1996. | |
| 35 | * Magic Card II (green TAB or Impera board), Impera, 1996. | |
| 36 | * Magic Card II (blue TAB board, encrypted), Impera, 1996. | |
| 37 | * Royal Vegas Joker Card (slow deal), Funworld, 1993. | |
| 38 | * Royal Vegas Joker Card (fast deal), Soft Design, 1993. | |
| 39 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. | |
| 40 | * Mongolfier New (italian), bootleg, 199?. | |
| 41 | * Soccer New (italian), bootleg, 199?. | |
| 42 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 43 | * Saloon (french, encrypted), unknown, 199?. | |
| 36 | 44 | |
| 37 | 45 | |
| 38 | 46 | ***********************************************************************************/ |
| 39 | 47 | |
| 40 | 48 | |
| 41 | 49 | #include "driver.h" |
| 50 | #include "video/mc6845.h" | |
| 42 | 51 | |
| 52 | static mc6845_t *mc6845; | |
| 43 | 53 | static tilemap *bg_tilemap; |
| 44 | 54 | |
| 45 | 55 | |
| r1679 | r1680 | |
| 86 | 96 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 87 | 97 | } |
| 88 | 98 | |
| 99 | WRITE8_HANDLER( funworld_mc6845_address_w ) | |
| 100 | { | |
| 101 | mc6845_address_w(mc6845, data); | |
| 102 | } | |
| 103 | ||
| 104 | READ8_HANDLER( funworld_mc6845_register_r ) | |
| 105 | { | |
| 106 | return mc6845_register_r(mc6845); | |
| 107 | } | |
| 108 | ||
| 109 | WRITE8_HANDLER( funworld_mc6845_register_w ) | |
| 110 | { | |
| 111 | mc6845_register_w(mc6845, data); | |
| 112 | } | |
| 113 | ||
| 89 | 114 | /**** normal hardware limit **** |
| 90 | 115 | - bits - |
| 91 | 116 | 7654 3210 |
| r1679 | r1680 | |
| 111 | 136 | |
| 112 | 137 | VIDEO_START(funworld) |
| 113 | 138 | { |
| 114 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 115 | TILEMAP_TYPE_PEN, 4, 8, 96, 29); | |
| 139 | mc6845 = mc6845_config(NULL); | |
| 140 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 96, 29); | |
| 116 | 141 | } |
| 117 | 142 | |
| 118 | 143 | VIDEO_START(magiccrd) |
| 119 | 144 | { |
| 120 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 121 | TILEMAP_TYPE_PEN, 4, 8, 112, 34); | |
| 145 | mc6845 = mc6845_config(NULL); | |
| 146 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 112, 34); | |
| 122 | 147 | } |
| 123 | 148 | |
| 149 | VIDEO_START(snookr10) | |
| 150 | { | |
| 151 | // mc6845 = mc6845_config(NULL); | |
| 152 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 128, 32); | |
| 153 | } | |
| 154 | ||
| 124 | 155 | VIDEO_UPDATE(funworld) |
| 125 | 156 | { |
| 126 | 157 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| r1679 | r1680 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | static tilemap *bg_tilemap; |
| 20 | 20 | |
| 21 | PALETTE_INIT( josvolly ) | |
| 21 | ||
| 22 | static PALETTE_INIT( common ) | |
| 22 | 23 | { |
| 23 | 24 | int i; |
| 24 | 25 | |
| 25 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 26 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 26 | /* characters */ | |
| 27 | for (i = 0; i < 0x100; i++) | |
| 28 | colortable_entry_set_value(machine->colortable, i, i); | |
| 27 | 29 | |
| 28 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 30 | /* sprites */ | |
| 31 | for (i = 0x100; i < 0x200; i++) | |
| 29 | 32 | { |
| 30 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 33 | UINT8 ctabentry = (BITSWAP8(color_prom[i - 0x100],7,6,5,4,0,1,2,3) & 0x0f) | 0x80; | |
| 34 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 35 | } | |
| 36 | } | |
| 31 | 37 | |
| 32 | 38 | |
| 33 | /* red component */ | |
| 34 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 35 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 36 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 37 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 38 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 39 | /* green component */ | |
| 40 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 41 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 42 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 43 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 44 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 45 | /* blue component */ | |
| 46 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 47 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 48 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 49 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 50 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 39 | PALETTE_INIT( josvolly ) | |
| 40 | { | |
| 41 | int i; | |
| 51 | 42 | |
| 52 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 53 | color_prom++; | |
| 54 | } | |
| 43 | /* allocate the colortable */ | |
| 44 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 55 | 45 | |
| 56 | color_prom += 2*machine->drv->total_colors; | |
| 57 | /* color_prom now points to the beginning of the sprite lookup table */ | |
| 46 | /* create a lookup table for the palette */ | |
| 47 | for (i = 0; i < 0x100; i++) | |
| 48 | { | |
| 49 | int r = pal4bit(color_prom[i + 0x000]); | |
| 50 | int g = pal4bit(color_prom[i + 0x100]); | |
| 51 | int b = pal4bit(color_prom[i + 0x200]); | |
| 58 | 52 | |
| 59 | /* characters */ | |
| 60 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 61 | COLOR(0,i) = i; | |
| 53 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 54 | } | |
| 62 | 55 | |
| 63 | /* sprites */ | |
| 64 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 65 | COLOR(1,i) = 0x80 + (BITSWAP8( color_prom[i], 7,6,5,4, 0,1,2,3) & 0xf); | |
| 56 | /* color_prom now points to the beginning of the lookup table */ | |
| 57 | color_prom += 0x300; | |
| 58 | ||
| 59 | PALETTE_INIT_CALL(common); | |
| 66 | 60 | } |
| 67 | 61 | |
| 62 | ||
| 68 | 63 | PALETTE_INIT( gsword ) |
| 69 | 64 | { |
| 70 | 65 | int i; |
| 71 | 66 | |
| 72 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 73 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 67 | /* allocate the colortable */ | |
| 68 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 74 | 69 | |
| 75 | for (i = 0;i < 256;i++) | |
| 70 | /* create a lookup table for the palette */ | |
| 71 | for (i = 0; i < 0x100; i++) | |
| 76 | 72 | { |
| 77 | int bit0,bit1,bit2,r,g,b; | |
| 73 | int bit0, bit1, bit2; | |
| 74 | int r, g, b; | |
| 78 | 75 | |
| 79 | 76 | /* red component */ |
| 80 | bit0 = (color_prom[256+i] >> 0) & 1; | |
| 81 | bit1 = (color_prom[256+i] >> 1) & 1; | |
| 82 | bit2 = (color_prom[256+i] >> 2) & 1; | |
| 77 | bit0 = (color_prom[i + 0x100] >> 0) & 1; | |
| 78 | bit1 = (color_prom[i + 0x100] >> 1) & 1; | |
| 79 | bit2 = (color_prom[i + 0x100] >> 2) & 1; | |
| 83 | 80 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 81 | ||
| 84 | 82 | /* green component */ |
| 85 | bit0 = (color_prom[256+i] >> 3) & 1; | |
| 86 | bit1 = (color_prom[i] >> 0) & 1; | |
| 87 | bit2 = (color_prom[i] >> 1) & 1; | |
| 83 | bit0 = (color_prom[i + 0x100] >> 3) & 1; | |
| 84 | bit1 = (color_prom[i + 0x000] >> 0) & 1; | |
| 85 | bit2 = (color_prom[i + 0x000] >> 1) & 1; | |
| 88 | 86 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 87 | ||
| 89 | 88 | /* blue component */ |
| 90 | 89 | bit0 = 0; |
| 91 | bit1 = (color_prom[i] >> 2) & 1; | |
| 92 | bit2 = (color_prom[i] >> 3) & 1; | |
| 90 | bit1 = (color_prom[i + 0x000] >> 2) & 1; | |
| 91 | bit2 = (color_prom[i + 0x000] >> 3) & 1; | |
| 93 | 92 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 94 | 93 | |
| 95 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 94 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 96 | 95 | } |
| 97 | 96 | |
| 98 | color_prom += 2*256; | |
| 99 | /* color_prom now points to the beginning of the sprite lookup table */ | |
| 97 | /* color_prom now points to the beginning of the lookup table */ | |
| 98 | color_prom += 0x200; | |
| 100 | 99 | |
| 101 | /* characters */ | |
| 102 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 103 | COLOR(0,i) = i; | |
| 104 | ||
| 105 | /* sprites */ | |
| 106 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 107 | COLOR(1,i) = 0x80 + (BITSWAP8( color_prom[i], 7,6,5,4, 0,1,2,3) & 0xf); | |
| 100 | PALETTE_INIT_CALL(common); | |
| 108 | 101 | } |
| 109 | 102 | |
| 110 | 103 | WRITE8_HANDLER( gsword_videoram_w ) |
| r1679 | r1680 | |
| 167 | 160 | VIDEO_START( gsword ) |
| 168 | 161 | { |
| 169 | 162 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 170 | | |
| 163 | | |
| 171 | 164 | } |
| 172 | 165 | |
| 173 | 166 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
| 176 | 169 | |
| 177 | 170 | for (offs = 0; offs < gsword_spritexy_size - 1; offs+=2) |
| 178 | 171 | { |
| 179 | int sx,sy,flipx,flipy,spritebank,tile; | |
| 172 | int sx,sy,flipx,flipy,spritebank,tile,color; | |
| 180 | 173 | |
| 181 | 174 | if (gsword_spritexy_ram[offs]!=0xf1) |
| 182 | 175 | { |
| 183 | 176 | spritebank = 0; |
| 184 | 177 | tile = gsword_spritetile_ram[offs]; |
| 178 | color = gsword_spritetile_ram[offs+1] & 0x3f; | |
| 185 | 179 | sy = 241-gsword_spritexy_ram[offs]; |
| 186 | 180 | sx = gsword_spritexy_ram[offs+1]-56; |
| 187 | 181 | flipx = gsword_spriteattrib_ram[offs] & 0x02; |
| r1679 | r1680 | |
| 204 | 198 | } |
| 205 | 199 | drawgfx(bitmap,machine->gfx[1+spritebank], |
| 206 | 200 | tile, |
| 207 | | |
| 201 | c | |
| 208 | 202 | flipx,flipy, |
| 209 | 203 | sx,sy, |
| 210 | cliprect,TRANSPARENCY_COLOR, 0x8f); | |
| 204 | cliprect,TRANSPARENCY_PENS, | |
| 205 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1+spritebank], color, 0x8f)); | |
| 211 | 206 | } |
| 212 | 207 | } |
| 213 | 208 | } |
| r1679 | r1680 | |
|---|---|---|
| 146 | 146 | mario_state *state = machine->driver_data; |
| 147 | 147 | |
| 148 | 148 | state->bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 149 | | |
| 149 | | |
| 150 | 150 | |
| 151 | 151 | state->gfx_bank = 0; |
| 152 | 152 | state->palette_bank = 0; |
| r1679 | r1680 | |
|---|---|---|
| 98 | 98 | |
| 99 | 99 | VIDEO_START( atarifb ) |
| 100 | 100 | { |
| 101 | alpha1_tilemap = tilemap_create(alpha1_get_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8,8, 3,32); | |
| 102 | alpha2_tilemap = tilemap_create(alpha2_get_tile_info, tilemap_scan_cols, TILEMAP_TYPE_PEN, 8,8, 3,32); | |
| 103 | field_tilemap = tilemap_create(field_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 32,32); | |
| 101 | alpha1_tilemap = tilemap_create(alpha1_get_tile_info, tilemap_scan_cols, 8,8, 3,32); | |
| 102 | alpha2_tilemap = tilemap_create(alpha2_get_tile_info, tilemap_scan_cols, 8,8, 3,32); | |
| 103 | field_tilemap = tilemap_create(field_get_tile_info, tilemap_scan_rows, 8,8, 32,32); | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 |
| r1679 | r1680 | |
|---|---|---|
| 137 | 137 | |
| 138 | 138 | VIDEO_START(silkroad) |
| 139 | 139 | { |
| 140 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 140 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 141 | 141 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 142 | 142 | |
| 143 | fg2_tilemap = tilemap_create(get_fg2_tile_info,tilemap_scan_rows, | |
| 143 | fg2_tilemap = tilemap_create(get_fg2_tile_info,tilemap_scan_rows, | |
| 144 | 144 | tilemap_set_transparent_pen(fg2_tilemap,0); |
| 145 | 145 | |
| 146 | fg3_tilemap = tilemap_create(get_fg3_tile_info,tilemap_scan_rows, | |
| 146 | fg3_tilemap = tilemap_create(get_fg3_tile_info,tilemap_scan_rows, | |
| 147 | 147 | tilemap_set_transparent_pen(fg3_tilemap,0); |
| 148 | 148 | } |
| 149 | 149 |
| r1679 | r1680 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | VIDEO_START( videopin ) |
| 33 | 33 | { |
| 34 | bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, | |
| 34 | bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 |
| r1679 | r1680 | |
|---|---|---|
| 83 | 83 | VIDEO_START( exprraid ) |
| 84 | 84 | { |
| 85 | 85 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 86 | | |
| 86 | | |
| 87 | 87 | |
| 88 | 88 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 89 | | |
| 89 | | |
| 90 | 90 | |
| 91 | 91 | tilemap_set_scroll_rows(bg_tilemap, 2); |
| 92 | 92 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | /* set up sprites */ |
| 72 | 72 | sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| 73 | 73 | |
| 74 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 75 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 76 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 74 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 75 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 76 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 77 | 77 | |
| 78 | 78 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 79 | 79 | tilemap_set_transparent_pen(bg_tilemap,0); |
| r1679 | r1680 | |
| 93 | 93 | /* set up sprites */ |
| 94 | 94 | sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| 95 | 95 | |
| 96 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 97 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 98 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 96 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 97 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 98 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 99 | 99 | |
| 100 | 100 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 101 | 101 | tilemap_set_transparent_pen(bg_tilemap,0); |
| r1679 | r1680 | |
| 113 | 113 | /* set up sprites */ |
| 114 | 114 | sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| 115 | 115 | |
| 116 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 117 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 118 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 116 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 117 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,16,16,64,32); | |
| 118 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 119 | 119 | |
| 120 | 120 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 121 | 121 | tilemap_set_transparent_pen(bg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 197 | 197 | 0,0, |
| 198 | 198 | 8*sx,8*sy, |
| 199 | 199 | cliprect, |
| 200 | (abilityflag) ? TRANSPARENCY_ | |
| 200 | (abilityflag) ? TRANSPARENCY_PEN | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | return 0; |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | ***************************************************************************/ |
| 68 | 68 | PALETTE_INIT( naughtyb ) |
| 69 | 69 | { |
| 70 | int i; | |
| 71 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 72 | ||
| 73 | 70 | /* note: there is no resistor on second PROM so we define second resistance as 0 */ |
| 74 | 71 | static const int resistances[2] = { 270, 0 }; |
| 75 | double weights_r[2], weights_g[2], weights_b[2]; | |
| 72 | double rweights[2], gweights[2], bweights[2]; | |
| 73 | int i; | |
| 76 | 74 | |
| 75 | /* compute the color output resistor weights */ | |
| 76 | compute_resistor_weights(0, 255, -1.0, | |
| 77 | 2, resistances, rweights, 270, 270, | |
| 78 | 2, resistances, gweights, 270, 270, | |
| 79 | 2, resistances, bweights, 270, 270); | |
| 77 | 80 | |
| 78 | compute_resistor_weights(0, 255, -1.0, | |
| 79 | 2, resistances, weights_r, 270, 270, | |
| 80 | 2, resistances, weights_g, 270, 270, | |
| 81 | 2, resistances, weights_b, 270, 270); | |
| 82 | ||
| 83 | ||
| 84 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 81 | for (i = 0; i < 0x100; i++) | |
| 85 | 82 | { |
| 86 | int bit0,bit1,r,g,b; | |
| 83 | int bit0, bit1; | |
| 84 | int r, g, b; | |
| 85 | int swapped_i; | |
| 87 | 86 | |
| 87 | /* red component */ | |
| 88 | bit0 = (color_prom[i | 0x000] >> 0) & 0x01; | |
| 89 | bit1 = (color_prom[i | 0x100] >> 0) & 0x01; | |
| 90 | r = combine_2_weights(rweights, bit0, bit1); | |
| 88 | 91 | |
| 89 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 90 | bit1 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 92 | /* green component */ | |
| 93 | bit0 = (color_prom[i | 0x000] >> 2) & 0x01; | |
| 94 | bit1 = (color_prom[i | 0x100] >> 2) & 0x01; | |
| 95 | g = combine_2_weights(gweights, bit0, bit1); | |
| 91 | 96 | |
| 92 | /*r = 0x55 * bit0 + 0xaa * bit1;*/ | |
| 93 | r = combine_2_weights(weights_r, bit0, bit1); | |
| 97 | /* blue component */ | |
| 98 | bit0 = (color_prom[i | 0x000] >> 1) & 0x01; | |
| 99 | bit1 = (color_prom[i | 0x100] >> 1) & 0x01; | |
| 100 | b = combine_2_weights(bweights, bit0, bit1); | |
| 94 | 101 | |
| 95 | bit0 = (color_prom[0] >> 2) & 0x01; | |
| 96 | bit1 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 97 | ||
| 98 | /*g = 0x55 * bit0 + 0xaa * bit1;*/ | |
| 99 | g = combine_2_weights(weights_g, bit0, bit1); | |
| 100 | ||
| 101 | bit0 = (color_prom[0] >> 1) & 0x01; | |
| 102 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 103 | ||
| 104 | /*b = 0x55 * bit0 + 0xaa * bit1;*/ | |
| 105 | b = combine_2_weights(weights_b, bit0, bit1); | |
| 106 | ||
| 107 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 108 | color_prom++; | |
| 102 | swapped_i = BITSWAP8(i,5,7,6,2,1,0,4,3); | |
| 103 | palette_set_color(machine, swapped_i, MAKE_RGB(r, g, b)); | |
| 109 | 104 | } |
| 110 | ||
| 111 | /* first bank of characters use colors 0-31, 64-95, 128-159 and 192-223 */ | |
| 112 | for (i = 0;i < 8;i++) | |
| 113 | { | |
| 114 | int j; | |
| 115 | ||
| 116 | ||
| 117 | for (j = 0;j < 4;j++) | |
| 118 | { | |
| 119 | COLOR(0,4*i + j*4*8) = i + j*64; | |
| 120 | COLOR(0,4*i + j*4*8 + 1) = 8 + i + j*64; | |
| 121 | COLOR(0,4*i + j*4*8 + 2) = 2*8 + i + j*64; | |
| 122 | COLOR(0,4*i + j*4*8 + 3) = 3*8 + i + j*64; | |
| 123 | } | |
| 124 | } | |
| 125 | ||
| 126 | /* second bank of characters use colors 32-63, 96-127, 160-191 and 224-255 */ | |
| 127 | for (i = 0;i < 8;i++) | |
| 128 | { | |
| 129 | int j; | |
| 130 | ||
| 131 | ||
| 132 | for (j = 0;j < 4;j++) | |
| 133 | { | |
| 134 | COLOR(1,4*i + j*4*8) = i + 32 + j*64; | |
| 135 | COLOR(1,4*i + j*4*8 + 1) = 8 + i + 32 + j*64; | |
| 136 | COLOR(1,4*i + j*4*8 + 2) = 2*8 + i + 32 + j*64; | |
| 137 | COLOR(1,4*i + j*4*8 + 3) = 3*8 + i + 32 + j*64; | |
| 138 | } | |
| 139 | } | |
| 140 | 105 | } |
| 141 | 106 | |
| 142 | 107 |
| r1679 | r1680 | |
|---|---|---|
| 77 | 77 | |
| 78 | 78 | VIDEO_START( runaway ) |
| 79 | 79 | { |
| 80 | bg_tilemap = tilemap_create(runaway_get_tile_info, tilemap_scan_rows, | |
| 80 | bg_tilemap = tilemap_create(runaway_get_tile_info, tilemap_scan_rows, | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | VIDEO_START( qwak ) |
| 85 | 85 | { |
| 86 | bg_tilemap = tilemap_create(qwak_get_tile_info, tilemap_scan_rows, | |
| 86 | bg_tilemap = tilemap_create(qwak_get_tile_info, tilemap_scan_rows, | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 |
| r1679 | r1680 | |
|---|---|---|
| 122 | 122 | |
| 123 | 123 | VIDEO_START( toypop ) |
| 124 | 124 | { |
| 125 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 125 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan, | |
| 126 | 126 | |
| 127 | 127 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 128 | 128 | } |
| r1679 | r1680 | |
|---|---|---|
| 459 | 459 | |
| 460 | 460 | VIDEO_START( pangpang ) |
| 461 | 461 | { |
| 462 | pf1_tilemap = tilemap_create(pangpang_get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 463 | pf1_alt_tilemap = tilemap_create(pangpang_get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 464 | pf2_tilemap = tilemap_create(pangpang_get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 462 | pf1_tilemap = tilemap_create(pangpang_get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 463 | pf1_alt_tilemap = tilemap_create(pangpang_get_bg1_tile_info,tumblep_scan,16,16,64,32); | |
| 464 | pf2_tilemap = tilemap_create(pangpang_get_bg2_tile_info,tumblep_scan, 16,16,64,32); | |
| 465 | 465 | |
| 466 | 466 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 467 | 467 | tilemap_set_transparent_pen(pf1_alt_tilemap,0); |
| r1679 | r1680 | |
| 474 | 474 | |
| 475 | 475 | VIDEO_START( tumblepb ) |
| 476 | 476 | { |
| 477 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 478 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 479 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 477 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 478 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,16,16,64,32); | |
| 479 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan, 16,16,64,32); | |
| 480 | 480 | |
| 481 | 481 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 482 | 482 | tilemap_set_transparent_pen(pf1_alt_tilemap,0); |
| r1679 | r1680 | |
| 488 | 488 | |
| 489 | 489 | VIDEO_START( sdfight ) |
| 490 | 490 | { |
| 491 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); // 64*64 to prevent bad tilemap wrapping? - check real behavior | |
| 492 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 493 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 491 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,64); // 64*64 to prevent bad tilemap wrapping? - check real behavior | |
| 492 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,16,16,64,32); | |
| 493 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan, 16,16,64,32); | |
| 494 | 494 | |
| 495 | 495 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 496 | 496 | tilemap_set_transparent_pen(pf1_alt_tilemap,0); |
| r1679 | r1680 | |
| 503 | 503 | |
| 504 | 504 | VIDEO_START( fncywld ) |
| 505 | 505 | { |
| 506 | pf1_tilemap = tilemap_create(get_fncywld_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 507 | pf1_alt_tilemap = tilemap_create(get_fncywld_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 508 | pf2_tilemap = tilemap_create(get_fncywld_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 506 | pf1_tilemap = tilemap_create(get_fncywld_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 507 | pf1_alt_tilemap = tilemap_create(get_fncywld_bg1_tile_info,tumblep_scan,16,16,64,32); | |
| 508 | pf2_tilemap = tilemap_create(get_fncywld_bg2_tile_info,tumblep_scan, 16,16,64,32); | |
| 509 | 509 | |
| 510 | 510 | tilemap_set_transparent_pen(pf1_tilemap,15); |
| 511 | 511 | tilemap_set_transparent_pen(pf1_alt_tilemap,15); |
| r1679 | r1680 | |
| 517 | 517 | |
| 518 | 518 | VIDEO_START( jumppop ) |
| 519 | 519 | { |
| 520 | pf1_tilemap = tilemap_create(get_jumppop_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,128,64); | |
| 521 | pf1_alt_tilemap = tilemap_create(get_jumppop_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 522 | pf2_tilemap = tilemap_create(get_jumppop_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 523 | pf2_alt_tilemap = tilemap_create(get_jumppop_bg2_alt_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,128,64); | |
| 520 | pf1_tilemap = tilemap_create(get_jumppop_fg_tile_info, tilemap_scan_rows, 8, 8,128,64); | |
| 521 | pf1_alt_tilemap = tilemap_create(get_jumppop_bg1_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 522 | pf2_tilemap = tilemap_create(get_jumppop_bg2_tile_info,tilemap_scan_rows, 16,16,64,64); | |
| 523 | pf2_alt_tilemap = tilemap_create(get_jumppop_bg2_alt_tile_info,tilemap_scan_rows, 8,8,128,64); | |
| 524 | 524 | |
| 525 | 525 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 526 | 526 | tilemap_set_transparent_pen(pf1_alt_tilemap,0); |
| r1679 | r1680 | |
| 830 | 830 | |
| 831 | 831 | VIDEO_START( suprtrio ) |
| 832 | 832 | { |
| 833 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 834 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 835 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 833 | pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 834 | pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,16,16,64,32); | |
| 835 | pf2_tilemap = tilemap_create(get_bg2_tile_info,tumblep_scan, 16,16,64,32); | |
| 836 | 836 | |
| 837 | 837 | tilemap_set_transparent_pen(pf1_alt_tilemap,0); |
| 838 | 838 | bcstory_tilebank = 0; |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | blue = color_prom[2*machine->drv->total_colors+i]; |
| 22 | 22 | |
| 23 | 23 | palette_set_color_rgb(machine,i,pal4bit(red),pal4bit(green),pal4bit(blue)); |
| 24 | ||
| 25 | *(colortable++) = i; | |
| 26 | 24 | } |
| 27 | 25 | } |
| 28 | 26 | |
| r1679 | r1680 | |
| 54 | 52 | VIDEO_START( kchamp ) |
| 55 | 53 | { |
| 56 | 54 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 57 | | |
| 55 | | |
| 58 | 56 | } |
| 59 | 57 | |
| 60 | 58 | /* |
| r1679 | r1680 | |
|---|---|---|
| 149 | 149 | |
| 150 | 150 | VIDEO_START( digdug ) |
| 151 | 151 | { |
| 152 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_TYPE_PEN, 8,8,36,28); | |
| 153 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 152 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan, 8,8,36,28); | |
| 153 | tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan,8,8,36,28); | |
| 154 | 154 | |
| 155 | 155 | tilemap_set_transparent_pen(tx_tilemap, 0); |
| 156 | 156 |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | { |
| 56 | 56 | helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 57 | 57 | |
| 58 | playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, | |
| 58 | playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | VIDEO_START( m90 ) |
| 57 | 57 | { |
| 58 | pf1_layer = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 59 | pf1_wide_layer = tilemap_create(get_pf1w_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 60 | pf2_layer = tilemap_create(get_pf2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 61 | pf2_wide_layer = tilemap_create(get_pf2w_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 58 | pf1_layer = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,8,8,64,64); | |
| 59 | pf1_wide_layer = tilemap_create(get_pf1w_tile_info,tilemap_scan_rows,8,8,128,64); | |
| 60 | pf2_layer = tilemap_create(get_pf2_tile_info, tilemap_scan_rows,8,8,64,64); | |
| 61 | pf2_wide_layer = tilemap_create(get_pf2w_tile_info,tilemap_scan_rows,8,8,128,64); | |
| 62 | 62 | |
| 63 | 63 | tilemap_set_transparent_pen(pf1_layer,0); |
| 64 | 64 | tilemap_set_transparent_pen(pf1_wide_layer,0); |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | PALETTE_INIT( scotrsht ) |
| 11 | 11 | { |
| 12 | 12 | int i; |
| 13 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 14 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 15 | 13 | |
| 14 | /* allocate the colortable */ | |
| 15 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 16 | 16 | |
| 17 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 17 | /* create a lookup table for the palette */ | |
| 18 | for (i = 0; i < 0x100; i++) | |
| 18 | 19 | { |
| 19 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 20 | int r = pal4bit(color_prom[i + 0x000]); | |
| 21 | int g = pal4bit(color_prom[i + 0x100]); | |
| 22 | int b = pal4bit(color_prom[i + 0x200]); | |
| 20 | 23 | |
| 21 | ||
| 22 | bit0 = (color_prom[0] >> 0) & 0x01; | |
| 23 | bit1 = (color_prom[0] >> 1) & 0x01; | |
| 24 | bit2 = (color_prom[0] >> 2) & 0x01; | |
| 25 | bit3 = (color_prom[0] >> 3) & 0x01; | |
| 26 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 27 | bit0 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; | |
| 28 | bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; | |
| 29 | bit2 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; | |
| 30 | bit3 = (color_prom[machine->drv->total_colors] >> 3) & 0x01; | |
| 31 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 32 | bit0 = (color_prom[2*machine->drv->total_colors] >> 0) & 0x01; | |
| 33 | bit1 = (color_prom[2*machine->drv->total_colors] >> 1) & 0x01; | |
| 34 | bit2 = (color_prom[2*machine->drv->total_colors] >> 2) & 0x01; | |
| 35 | bit3 = (color_prom[2*machine->drv->total_colors] >> 3) & 0x01; | |
| 36 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 37 | ||
| 38 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 39 | color_prom++; | |
| 24 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 40 | 25 | } |
| 41 | 26 | |
| 42 | color_prom += 2*machine->drv->total_colors; | |
| 43 | /* color_prom now points to the beginning of the character lookup table */ | |
| 27 | /* color_prom now points to the beginning of the lookup table */ | |
| 28 | color_prom += 0x300; | |
| 44 | 29 | |
| 45 | ||
| 46 | /* there are eight 16 colors palette banks; sprites use colors 0x00-0x7f and */ | |
| 47 | /* characters 0x80-0xff. */ | |
| 48 | for (i = 0;i < TOTAL_COLORS(0)/8;i++) | |
| 30 | /* characters use colors 0x80-0xff, sprites use colors 0-0x7f */ | |
| 31 | for (i = 0; i < 0x200; i++) | |
| 49 | 32 | { |
| 50 | 33 | int j; |
| 51 | 34 | |
| 52 | ||
| 53 | for (j = 0;j < 8;j++) | |
| 54 | COLOR(0,i + j * TOTAL_COLORS(0)/8) = (*color_prom & 0x0f) + 16 * j + 0x80; | |
| 55 | ||
| 56 | color_prom++; | |
| 35 | for (j = 0; j < 8; j++) | |
| 36 | { | |
| 37 | UINT8 ctabentry = ((~i & 0x100) >> 1) | (j << 4) | (color_prom[i] & 0x0f); | |
| 38 | colortable_entry_set_value(machine->colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); | |
| 39 | } | |
| 57 | 40 | } |
| 58 | ||
| 59 | for (i = 0;i < TOTAL_COLORS(1)/8;i++) | |
| 60 | { | |
| 61 | int j; | |
| 62 | ||
| 63 | ||
| 64 | for (j = 0;j < 8;j++) | |
| 65 | COLOR(1,i + j * TOTAL_COLORS(1)/8) = (*color_prom & 0x0f) + 16 * j; | |
| 66 | ||
| 67 | color_prom++; | |
| 68 | } | |
| 69 | 41 | } |
| 70 | 42 | |
| 71 | 43 | WRITE8_HANDLER( scotrsht_videoram_w ) |
| r1679 | r1680 | |
| 145 | 117 | } |
| 146 | 118 | |
| 147 | 119 | drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, |
| 148 | sx, sy, cliprect, TRANSPARENCY_COLOR, scotrsht_palette_bank * 16); | |
| 120 | sx, sy, cliprect, TRANSPARENCY_PENS, | |
| 121 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, scotrsht_palette_bank * 16)); | |
| 149 | 122 | } |
| 150 | 123 | } |
| 151 | 124 | |
| 152 | 125 | VIDEO_START( scotrsht ) |
| 153 | 126 | { |
| 154 | bg_tilemap = tilemap_create(scotrsht_get_bg_tile_info, tilemap_scan_rows, | |
| 127 | bg_tilemap = tilemap_create(scotrsht_get_bg_tile_info, tilemap_scan_rows, | |
| 155 | 128 | |
| 156 | 129 | tilemap_set_scroll_cols(bg_tilemap, 64); |
| 157 | 130 | } |
| r1679 | r1680 | |
|---|---|---|
| 184 | 184 | |
| 185 | 185 | videoram_pg_index = 0; |
| 186 | 186 | |
| 187 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 188 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 187 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 188 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 189 | 189 | |
| 190 | 190 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 191 | 191 |
| r1679 | r1680 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | VIDEO_START( msisaac ) |
| 63 | 63 | { |
| 64 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 65 | background2 = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 66 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 64 | background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8,8,32,32); | |
| 65 | background2 = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 66 | foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows,8,8,32,32); | |
| 67 | 67 | |
| 68 | 68 | tilemap_set_transparent_pen(background2,0); |
| 69 | 69 | tilemap_set_transparent_pen(foreground,0); |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | |
| 13 | static UINT8 markham_xscroll[2]; | |
| 14 | 13 | |
| 14 | UINT8 *markham_xscroll; | |
| 15 | ||
| 15 | 16 | static tilemap *bg_tilemap; |
| 16 | 17 | |
| 17 | 18 | PALETTE_INIT( markham ) |
| 18 | 19 | { |
| 19 | 20 | int i; |
| 20 | 21 | |
| 21 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 22 | /* allocate the colortable */ | |
| 23 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 24 | ||
| 25 | /* create a lookup table for the palette */ | |
| 26 | for (i = 0; i < 0x100; i++) | |
| 22 | 27 | { |
| 23 | int r = color_prom[0]; | |
| 24 | int g = color_prom[machine->drv->total_colors]; | |
| 25 | int b = color_prom[2*machine->drv->total_colors]; | |
| 28 | int r = pal4bit(color_prom[i + 0x000]); | |
| 29 | int g = pal4bit(color_prom[i + 0x100]); | |
| 30 | int b = pal4bit(color_prom[i + 0x200]); | |
| 26 | 31 | |
| 27 | palette_set_color_rgb(machine,i,pal4bit(r),pal4bit(g),pal4bit(b)); | |
| 28 | color_prom++; | |
| 32 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 29 | 33 | } |
| 30 | 34 | |
| 31 | color_prom += 2*machine->drv->total_colors; | |
| 32 | ||
| 33 | 35 | /* color_prom now points to the beginning of the lookup table */ |
| 36 | color_prom += 0x300; | |
| 34 | 37 | |
| 35 | 38 | /* sprites lookup table */ |
| 36 | for (i=0; i<512; i++) | |
| 37 | *(colortable++) = *(color_prom++); | |
| 38 | ||
| 39 | /* bg lookup table */ | |
| 40 | for (i=0; i<512; i++) | |
| 41 | *(colortable++) = *(color_prom++); | |
| 42 | ||
| 39 | for (i = 0; i < 0x400; i++) | |
| 40 | { | |
| 41 | UINT8 ctabentry = color_prom[i]; | |
| 42 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 43 | } | |
| 43 | 44 | } |
| 44 | 45 | |
| 45 | 46 | WRITE8_HANDLER( markham_videoram_w ) |
| r1679 | r1680 | |
| 48 | 49 | tilemap_mark_tile_dirty(bg_tilemap, offset / 2); |
| 49 | 50 | } |
| 50 | 51 | |
| 51 | WRITE8_HANDLER( markham_scroll_x_w ) | |
| 52 | { | |
| 53 | markham_xscroll[offset] = data; | |
| 54 | } | |
| 55 | ||
| 56 | 52 | WRITE8_HANDLER( markham_flipscreen_w ) |
| 57 | 53 | { |
| 58 | 54 | if (flip_screen != (data & 0x01)) |
| r1679 | r1680 | |
| 74 | 70 | VIDEO_START( markham ) |
| 75 | 71 | { |
| 76 | 72 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 77 | | |
| 73 | | |
| 78 | 74 | |
| 79 | 75 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 80 | 76 | } |
| r1679 | r1680 | |
| 117 | 113 | col, |
| 118 | 114 | fx,fy, |
| 119 | 115 | px,py, |
| 120 | cliprect,TRANSPARENCY_COLOR,0); | |
| 116 | cliprect,TRANSPARENCY_PENS, | |
| 117 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], col, 0)); | |
| 121 | 118 | } |
| 122 | 119 | } |
| 123 | 120 |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | VIDEO_START( pbillian ) |
| 58 | 58 | { |
| 59 | bg_tilemap = tilemap_create(pb_get_bg_tile_info, tilemap_scan_rows, | |
| 59 | bg_tilemap = tilemap_create(pb_get_bg_tile_info, tilemap_scan_rows, | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | VIDEO_START( superqix ) |
| 63 | 63 | { |
| 64 | 64 | fg_bitmap[0] = auto_bitmap_alloc(256, 256, machine->screen[0].format); |
| 65 | 65 | fg_bitmap[1] = auto_bitmap_alloc(256, 256, machine->screen[0].format); |
| 66 | bg_tilemap = tilemap_create(sqix_get_bg_tile_info, tilemap_scan_rows, | |
| 66 | bg_tilemap = tilemap_create(sqix_get_bg_tile_info, tilemap_scan_rows, | |
| 67 | 67 | |
| 68 | 68 | tilemap_set_transmask(bg_tilemap,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ |
| 69 | 69 | tilemap_set_transmask(bg_tilemap,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | VIDEO_START( playch10 ) |
| 100 | 100 | { |
| 101 | 101 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 102 | | |
| 102 | | |
| 103 | 103 | |
| 104 | 104 | ppu2c0x_init(machine, &ppu_interface ); |
| 105 | 105 | } |
| r1679 | r1680 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | READ8_HANDLER( dday_countdown_timer_r ) |
| 33 | 33 | { |
| 34 | ||
| 34 | | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | static TIMER_CALLBACK( countdown_timer_callback ) |
| r1679 | r1680 | |
| 39 | 39 | timer_value--; |
| 40 | 40 | |
| 41 | 41 | if (timer_value < 0) |
| 42 | { | |
| 43 | 42 | timer_value = 99; |
| 44 | } | |
| 45 | 43 | } |
| 46 | 44 | |
| 47 | 45 | static void start_countdown_timer(void) |
| r1679 | r1680 | |
| 62 | 60 | { |
| 63 | 61 | int i; |
| 64 | 62 | |
| 63 | palette_set_shadow_factor(machine, 1.0 / 8); | |
| 65 | 64 | |
| 66 | palette_set_shadow_factor(machine, 1.0/8); /* this matches the previous version of the driver (>>3) */ | |
| 65 | /* allocate the colortable */ | |
| 66 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 67 | 67 | |
| 68 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 68 | /* create a lookup table for the palette */ | |
| 69 | for (i = 0; i < 0x100; i++) | |
| 69 | 70 | { |
| 70 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 71 | int r = pal4bit(color_prom[i + 0x000]); | |
| 72 | int g = pal4bit(color_prom[i + 0x100]); | |
| 73 | int b = pal4bit(color_prom[i + 0x200]); | |
| 71 | 74 | |
| 72 | ||
| 73 | /* red component */ | |
| 74 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 75 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 76 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 77 | bit3 = (color_prom[i] >> 3) & 0x01; | |
| 78 | r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 79 | /* green component */ | |
| 80 | bit0 = (color_prom[i + machine->drv->total_colors] >> 0) & 0x01; | |
| 81 | bit1 = (color_prom[i + machine->drv->total_colors] >> 1) & 0x01; | |
| 82 | bit2 = (color_prom[i + machine->drv->total_colors] >> 2) & 0x01; | |
| 83 | bit3 = (color_prom[i + machine->drv->total_colors] >> 3) & 0x01; | |
| 84 | g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 85 | /* blue component */ | |
| 86 | bit0 = (color_prom[i + 2*machine->drv->total_colors] >> 0) & 0x01; | |
| 87 | bit1 = (color_prom[i + 2*machine->drv->total_colors] >> 1) & 0x01; | |
| 88 | bit2 = (color_prom[i + 2*machine->drv->total_colors] >> 2) & 0x01; | |
| 89 | bit3 = (color_prom[i + 2*machine->drv->total_colors] >> 3) & 0x01; | |
| 90 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; | |
| 91 | ||
| 92 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 75 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 93 | 76 | } |
| 94 | 77 | |
| 78 | for (i = 0; i < 0x100; i++) | |
| 79 | colortable_entry_set_value(machine->colortable, i, i); | |
| 95 | 80 | |
| 96 | 81 | /* HACK!!! This table is handgenerated, but it matches the screenshot. |
| 97 | 82 | I have no clue how it really works */ |
| 83 | colortable_entry_set_value(machine->colortable, 0*8+0+0, 0x00); | |
| 84 | colortable_entry_set_value(machine->colortable, 0*8+0+1, 0x01); | |
| 85 | colortable_entry_set_value(machine->colortable, 0*8+0+2, 0x15); | |
| 86 | colortable_entry_set_value(machine->colortable, 0*8+0+3, 0x02); | |
| 87 | colortable_entry_set_value(machine->colortable, 0*8+4+0, 0x00); | |
| 88 | colortable_entry_set_value(machine->colortable, 0*8+4+1, 0x01); | |
| 89 | colortable_entry_set_value(machine->colortable, 0*8+4+2, 0x15); | |
| 90 | colortable_entry_set_value(machine->colortable, 0*8+4+3, 0x02); | |
| 98 | 91 | |
| 99 | colortable[0*8+0] = 0; | |
| 100 | colortable[0*8+1] = 1; | |
| 101 | colortable[0*8+2] = 21; | |
| 102 | colortable[0*8+3] = 2; | |
| 103 | colortable[0*8+4+0] = 0; | |
| 104 | colortable[0*8+4+1] = 1; | |
| 105 | colortable[0*8+4+2] = 21; | |
| 106 | colortable[0*8+4+3] = 2; | |
| 92 | colortable_entry_set_value(machine->colortable, 1*8+0+0, 0x04); | |
| 93 | colortable_entry_set_value(machine->colortable, 1*8+0+1, 0x05); | |
| 94 | colortable_entry_set_value(machine->colortable, 1*8+0+2, 0x03); | |
| 95 | colortable_entry_set_value(machine->colortable, 1*8+0+3, 0x07); | |
| 96 | colortable_entry_set_value(machine->colortable, 1*8+4+0, 0x04); | |
| 97 | colortable_entry_set_value(machine->colortable, 1*8+4+1, 0x05); | |
| 98 | colortable_entry_set_value(machine->colortable, 1*8+4+2, 0x03); | |
| 99 | colortable_entry_set_value(machine->colortable, 1*8+4+3, 0x07); | |
| 107 | 100 | |
| 108 | colortable[1*8+0] = 4; | |
| 109 | colortable[1*8+1] = 5; | |
| 110 | colortable[1*8+2] = 3; | |
| 111 | colortable[1*8+3] = 7; | |
| 112 | colortable[1*8+4+0] = 4; | |
| 113 | colortable[1*8+4+1] = 5; | |
| 114 | colortable[1*8+4+2] = 3; | |
| 115 | colortable[1*8+4+3] = 7; | |
| 101 | colortable_entry_set_value(machine->colortable, 2*8+0+0, 0x08); | |
| 102 | colortable_entry_set_value(machine->colortable, 2*8+0+1, 0x15); | |
| 103 | colortable_entry_set_value(machine->colortable, 2*8+0+2, 0x0a); | |
| 104 | colortable_entry_set_value(machine->colortable, 2*8+0+3, 0x03); | |
| 105 | colortable_entry_set_value(machine->colortable, 2*8+4+0, 0x08); | |
| 106 | colortable_entry_set_value(machine->colortable, 2*8+4+1, 0x15); | |
| 107 | colortable_entry_set_value(machine->colortable, 2*8+4+2, 0x0a); | |
| 108 | colortable_entry_set_value(machine->colortable, 2*8+4+3, 0x03); | |
| 116 | 109 | |
| 117 | colortable[2*8+0] = 8; | |
| 118 | colortable[2*8+1] = 21; | |
| 119 | colortable[2*8+2] = 10; | |
| 120 | colortable[2*8+3] = 3; | |
| 121 | colortable[2*8+4+0] = 8; | |
| 122 | colortable[2*8+4+1] = 21; | |
| 123 | colortable[2*8+4+2] = 10; | |
| 124 | colortable[2*8+4+3] = 3; | |
| 110 | colortable_entry_set_value(machine->colortable, 3*8+0+0, 0x08); | |
| 111 | colortable_entry_set_value(machine->colortable, 3*8+0+1, 0x15); | |
| 112 | colortable_entry_set_value(machine->colortable, 3*8+0+2, 0x0a); | |
| 113 | colortable_entry_set_value(machine->colortable, 3*8+0+3, 0x03); | |
| 114 | colortable_entry_set_value(machine->colortable, 3*8+4+0, 0x08); | |
| 115 | colortable_entry_set_value(machine->colortable, 3*8+4+1, 0x15); | |
| 116 | colortable_entry_set_value(machine->colortable, 3*8+4+2, 0x0a); | |
| 117 | colortable_entry_set_value(machine->colortable, 3*8+4+3, 0x03); | |
| 125 | 118 | |
| 126 | colortable[3*8+0] = 8; | |
| 127 | colortable[3*8+1] = 21; | |
| 128 | colortable[3*8+2] = 10; | |
| 129 | colortable[3*8+3] = 3; | |
| 130 | colortable[3*8+4+0] = 8; | |
| 131 | colortable[3*8+4+1] = 21; | |
| 132 | colortable[3*8+4+2] = 10; | |
| 133 | colortable[3*8+4+3] = 3; | |
| 119 | colortable_entry_set_value(machine->colortable, 4*8+0+0, 0x10); | |
| 120 | colortable_entry_set_value(machine->colortable, 4*8+0+1, 0x11); | |
| 121 | colortable_entry_set_value(machine->colortable, 4*8+0+2, 0x12); | |
| 122 | colortable_entry_set_value(machine->colortable, 4*8+0+3, 0x07); | |
| 123 | colortable_entry_set_value(machine->colortable, 4*8+4+0, 0x10); | |
| 124 | colortable_entry_set_value(machine->colortable, 4*8+4+1, 0x11); | |
| 125 | colortable_entry_set_value(machine->colortable, 4*8+4+2, 0x12); | |
| 126 | colortable_entry_set_value(machine->colortable, 4*8+4+3, 0x07); | |
| 134 | 127 | |
| 135 | colortable[4*8+0] = 16; | |
| 136 | colortable[4*8+1] = 17; | |
| 137 | colortable[4*8+2] = 18; | |
| 138 | colortable[4*8+3] = 7; | |
| 139 | colortable[4*8+4+0] = 16; | |
| 140 | colortable[4*8+4+1] = 17; | |
| 141 | colortable[4*8+4+2] = 18; | |
| 142 | colortable[4*8+4+3] = 7; | |
| 128 | colortable_entry_set_value(machine->colortable, 5*8+0+0, 0x1d); | |
| 129 | colortable_entry_set_value(machine->colortable, 5*8+0+1, 0x15); | |
| 130 | colortable_entry_set_value(machine->colortable, 5*8+0+2, 0x16); | |
| 131 | colortable_entry_set_value(machine->colortable, 5*8+0+3, 0x1b); | |
| 132 | colortable_entry_set_value(machine->colortable, 5*8+4+0, 0x1d); | |
| 133 | colortable_entry_set_value(machine->colortable, 5*8+4+1, 0x15); | |
| 134 | colortable_entry_set_value(machine->colortable, 5*8+4+2, 0x16); | |
| 135 | colortable_entry_set_value(machine->colortable, 5*8+4+3, 0x1b); | |
| 143 | 136 | |
| 144 | colortable[5*8+0] = 29; | |
| 145 | colortable[5*8+1] = 21; | |
| 146 | colortable[5*8+2] = 22; | |
| 147 | colortable[5*8+3] = 27; | |
| 148 | colortable[5*8+4+0] = 29; | |
| 149 | colortable[5*8+4+1] = 21; | |
| 150 | colortable[5*8+4+2] = 22; | |
| 151 | colortable[5*8+4+3] = 27; | |
| 137 | colortable_entry_set_value(machine->colortable, 6*8+0+0, 0x1d); | |
| 138 | colortable_entry_set_value(machine->colortable, 6*8+0+1, 0x15); | |
| 139 | colortable_entry_set_value(machine->colortable, 6*8+0+2, 0x1a); | |
| 140 | colortable_entry_set_value(machine->colortable, 6*8+0+3, 0x1b); | |
| 141 | colortable_entry_set_value(machine->colortable, 6*8+4+0, 0x1d); | |
| 142 | colortable_entry_set_value(machine->colortable, 6*8+4+1, 0x15); | |
| 143 | colortable_entry_set_value(machine->colortable, 6*8+4+2, 0x1a); | |
| 144 | colortable_entry_set_value(machine->colortable, 6*8+4+3, 0x1b); | |
| 152 | 145 | |
| 153 | colortable[6*8+0] = 29; | |
| 154 | colortable[6*8+1] = 21; | |
| 155 | colortable[6*8+2] = 26; | |
| 156 | colortable[6*8+3] = 27; | |
| 157 | colortable[6*8+4+0] = 29; | |
| 158 | colortable[6*8+4+1] = 21; | |
| 159 | colortable[6*8+4+2] = 26; | |
| 160 | colortable[6*8+4+3] = 27; | |
| 161 | ||
| 162 | colortable[7*8+0] = 29; | |
| 163 | colortable[7*8+1] = 2; | |
| 164 | colortable[7*8+2] = 4; | |
| 165 | colortable[7*8+3] = 27; | |
| 166 | colortable[7*8+4+0] = 29; | |
| 167 | colortable[7*8+4+1] = 2; | |
| 168 | colortable[7*8+4+2] = 4; | |
| 169 | colortable[7*8+4+3] = 27; | |
| 146 | colortable_entry_set_value(machine->colortable, 7*8+0+0, 0x1d); | |
| 147 | colortable_entry_set_value(machine->colortable, 7*8+0+1, 0x02); | |
| 148 | colortable_entry_set_value(machine->colortable, 7*8+0+2, 0x04); | |
| 149 | colortable_entry_set_value(machine->colortable, 7*8+0+3, 0x1b); | |
| 150 | colortable_entry_set_value(machine->colortable, 7*8+4+0, 0x1d); | |
| 151 | colortable_entry_set_value(machine->colortable, 7*8+4+1, 0x02); | |
| 152 | colortable_entry_set_value(machine->colortable, 7*8+4+2, 0x04); | |
| 153 | colortable_entry_set_value(machine->colortable, 7*8+4+3, 0x1b); | |
| 170 | 154 | } |
| 171 | 155 | |
| 172 | 156 | |
| r1679 | r1680 | |
| 216 | 200 | |
| 217 | 201 | code = sl_map[flipx ? tile_index ^ 0x0f : tile_index]; |
| 218 | 202 | |
| 219 | if (sl_flipx != flipx) | |
| 220 | { | |
| 221 | if (code & 0x80) | |
| 222 | { | |
| 223 | /* no mirroring, draw dark spot */ | |
| 224 | code = 1; | |
| 225 | } | |
| 226 | } | |
| 203 | if ((sl_flipx != flipx) && (code & 0x80)) | |
| 204 | /* no mirroring, draw dark spot */ | |
| 205 | code = 1; | |
| 227 | 206 | |
| 228 | 207 | SET_TILE_INFO(3, code & 0x3f, 0, flipx ? TILE_FLIPX : 0); |
| 229 | 208 | } |
| r1679 | r1680 | |
| 237 | 216 | |
| 238 | 217 | VIDEO_START( dday ) |
| 239 | 218 | { |
| 240 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 241 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 242 | text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 243 | sl_tilemap = tilemap_create(get_sl_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 219 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,8,8,32,32); | |
| 220 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,8,8,32,32); | |
| 221 | text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 222 | sl_tilemap = tilemap_create(get_sl_tile_info, tilemap_scan_rows,8,8,32,32); | |
| 244 | 223 | |
| 245 | 224 | main_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 246 | 225 | |
| r1679 | r1680 | |
| 280 | 259 | { |
| 281 | 260 | int i; |
| 282 | 261 | |
| 283 | ||
| 284 | 262 | offset &= 0x03e0; |
| 285 | 263 | |
| 286 | ||
| 264 | | |
| 287 | 265 | |
| 288 | for (i = 0; i < 0x20; i++) | |
| 289 | { | |
| 266 | for (i = 0; i < 0x20; i++) | |
| 290 | 267 | tilemap_mark_tile_dirty(fg_tilemap, offset + i); |
| 291 | } | |
| 292 | 268 | } |
| 293 | 269 | |
| 294 | 270 | READ8_HANDLER( dday_colorram_r ) |
| 295 | 271 | { |
| 296 | ||
| 272 | | |
| 297 | 273 | } |
| 298 | 274 | |
| 299 | 275 |
| r1679 | r1680 | |
|---|---|---|
| 170 | 170 | atarimo_1_slipram = ¤t_slip[1]; |
| 171 | 171 | |
| 172 | 172 | /* initialize the playfield */ |
| 173 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 173 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 174 | 174 | |
| 175 | 175 | /* initialize the motion objects */ |
| 176 | 176 | atarimo_init(machine, 0, &mo0desc); |
| 177 | 177 | |
| 178 | 178 | /* initialize the alphanumerics */ |
| 179 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 179 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 180 | 180 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 181 | 181 | |
| 182 | 182 | /* allocate the second screen if necessary */ |
| 183 | 183 | if (screens == 2) |
| 184 | 184 | { |
| 185 | 185 | /* initialize the playfield */ |
| 186 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_rows, | |
| 186 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_rows, | |
| 187 | 187 | tilemap_set_scrollx(atarigen_playfield2_tilemap, 0, 0); |
| 188 | 188 | |
| 189 | 189 | /* initialize the motion objects */ |
| 190 | 190 | atarimo_init(machine, 1, &mo1desc); |
| 191 | 191 | |
| 192 | 192 | /* initialize the alphanumerics */ |
| 193 | atarigen_alpha2_tilemap = tilemap_create(get_alpha2_tile_info, tilemap_scan_rows, | |
| 193 | atarigen_alpha2_tilemap = tilemap_create(get_alpha2_tile_info, tilemap_scan_rows, | |
| 194 | 194 | tilemap_set_scrollx(atarigen_alpha2_tilemap, 0, 0); |
| 195 | 195 | tilemap_set_transparent_pen(atarigen_alpha2_tilemap, 0); |
| 196 | 196 | } |
| r1679 | r1680 | |
|---|---|---|
| 118 | 118 | if (lockon_main_inten) |
| 119 | 119 | cpunum_set_input_line_and_vector(machine, MAIN_CPU, 0, HOLD_LINE, 0xff); |
| 120 | 120 | |
| 121 | timer_adjust(cursor_timer, video_screen_get_time_until_pos(0, CURSOR_YPOS, CURSOR_XPOS), 0 | |
| 121 | timer_adjust_oneshot(cursor_timer, video_screen_get_time_until_pos(0, CURSOR_YPOS, CURSOR_XPOS), 0 | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /************************************* |
| r1679 | r1680 | |
| 428 | 428 | /* End of list marker */ |
| 429 | 429 | if (lockon_ground_ram[offs + 2] & 0x8000) |
| 430 | 430 | { |
| 431 | timer_adjust(bufend_timer, attotime_mul(ATTOTIME_IN_HZ(FRAMEBUFFER_CLOCK), FRAMEBUFFER_MAX_X * y), 0 | |
| 431 | timer_adjust_oneshot(bufend_timer, attotime_mul(ATTOTIME_IN_HZ(FRAMEBUFFER_CLOCK), FRAMEBUFFER_MAX_X * y), 0 | |
| 432 | 432 | } |
| 433 | 433 | } |
| 434 | 434 | } |
| r1679 | r1680 | |
| 935 | 935 | |
| 936 | 936 | VIDEO_START( lockon ) |
| 937 | 937 | { |
| 938 | lockon_tilemap = tilemap_create(get_lockon_tile_info, tilemap_scan_rows, | |
| 938 | lockon_tilemap = tilemap_create(get_lockon_tile_info, tilemap_scan_rows, | |
| 939 | 939 | tilemap_set_transparent_pen(lockon_tilemap, 0); |
| 940 | 940 | |
| 941 | 941 | /* Allocate the two frame buffers for rotation */ |
| r1679 | r1680 | |
| 950 | 950 | |
| 951 | 951 | /* Timer for the CRTC cursor pulse */ |
| 952 | 952 | cursor_timer = timer_alloc(cursor_callback, NULL); |
| 953 | timer_adjust(cursor_timer, video_screen_get_time_until_pos(0, CURSOR_YPOS, CURSOR_XPOS), 0 | |
| 953 | timer_adjust_oneshot(cursor_timer, video_screen_get_time_until_pos(0, CURSOR_YPOS, CURSOR_XPOS), 0 | |
| 954 | 954 | } |
| 955 | 955 | |
| 956 | 956 | VIDEO_UPDATE( lockon ) |
| r1679 | r1680 | |
|---|---|---|
| 322 | 322 | |
| 323 | 323 | VIDEO_START( superpac ) |
| 324 | 324 | { |
| 325 | bg_tilemap = tilemap_create(superpac_get_tile_info,superpac_tilemap_scan, | |
| 325 | bg_tilemap = tilemap_create(superpac_get_tile_info,superpac_tilemap_scan, | |
| 326 | 326 | sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 327 | 327 | |
| 328 | 328 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 31); |
| r1679 | r1680 | |
| 334 | 334 | |
| 335 | 335 | VIDEO_START( phozon ) |
| 336 | 336 | { |
| 337 | bg_tilemap = tilemap_create(phozon_get_tile_info,superpac_tilemap_scan, | |
| 337 | bg_tilemap = tilemap_create(phozon_get_tile_info,superpac_tilemap_scan, | |
| 338 | 338 | |
| 339 | 339 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 15); |
| 340 | 340 | |
| r1679 | r1680 | |
| 345 | 345 | |
| 346 | 346 | VIDEO_START( mappy ) |
| 347 | 347 | { |
| 348 | bg_tilemap = tilemap_create(mappy_get_tile_info,mappy_tilemap_scan, | |
| 348 | bg_tilemap = tilemap_create(mappy_get_tile_info,mappy_tilemap_scan, | |
| 349 | 349 | |
| 350 | 350 | colortable_configure_tilemap_groups(machine->colortable, bg_tilemap, machine->gfx[0], 31); |
| 351 | 351 | tilemap_set_scroll_cols(bg_tilemap, 36); |
| r1679 | r1680 | |
|---|---|---|
| 143 | 143 | VIDEO_START( tigeroad ) |
| 144 | 144 | { |
| 145 | 145 | bg_tilemap = tilemap_create(get_bg_tile_info, tigeroad_tilemap_scan, |
| 146 | | |
| 146 | | |
| 147 | 147 | |
| 148 | 148 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 149 | | |
| 149 | | |
| 150 | 150 | |
| 151 | 151 | tilemap_set_transmask(bg_tilemap, 0, 0xffff, 0); |
| 152 | 152 | tilemap_set_transmask(bg_tilemap, 1, 0x1ff, 0xfe00); |
| r1679 | r1680 | |
|---|---|---|
| 804 | 804 | UINT8 n, bits = 0; |
| 805 | 805 | UINT8 b = gtia.w.colbk & 0xf0; |
| 806 | 806 | UINT8 c = gtia.w.colpf1 & 0x0f; |
| 807 | UINT8 atari_A = Machine->remapped_colortable[((b+0x30)&0xf0)+c]; | |
| 808 | UINT8 atari_B = Machine->remapped_colortable[((b+0x70)&0xf0)+c]; | |
| 809 | UINT8 atari_C = Machine->remapped_colortable[b+c]; | |
| 810 | UINT8 atari_D = Machine->remapped_colortable[gtia.w.colbk]; | |
| 807 | UINT8 atari_A = Machine->pens[((b+0x30)&0xf0)+c]; | |
| 808 | UINT8 atari_B = Machine->pens[((b+0x70)&0xf0)+c]; | |
| 809 | UINT8 atari_C = Machine->pens[b+c]; | |
| 810 | UINT8 atari_D = Machine->pens[gtia.w.colbk]; | |
| 811 | 811 | |
| 812 | 812 | for( x = 0; x < width * 4; x++ ) |
| 813 | 813 | { |
| r1679 | r1680 | |
| 878 | 878 | UINT8 n, bits = 0; |
| 879 | 879 | UINT8 b = gtia.w.colpf2 & 0xf0; |
| 880 | 880 | UINT8 c = gtia.w.colpf1 & 0x0f; |
| 881 | UINT8 atari_A = Machine->remapped_colortable[((b+0x30)&0xf0)+c]; | |
| 882 | UINT8 atari_B = Machine->remapped_colortable[((b+0x70)&0xf0)+c]; | |
| 883 | UINT8 atari_C = Machine->remapped_colortable[b+c]; | |
| 884 | UINT8 atari_D = Machine->remapped_colortable[gtia.w.colpf2]; | |
| 881 | UINT8 atari_A = Machine->pens[((b+0x30)&0xf0)+c]; | |
| 882 | UINT8 atari_B = Machine->pens[((b+0x70)&0xf0)+c]; | |
| 883 | UINT8 atari_C = Machine->pens[b+c]; | |
| 884 | UINT8 atari_D = Machine->pens[gtia.w.colpf2]; | |
| 885 | 885 | |
| 886 | 886 | for( x = 0; x < width * 4; x++ ) |
| 887 | 887 | { |
| r1679 | r1680 | |
|---|---|---|
| 303 | 303 | { |
| 304 | 304 | struct cache_entry *entry = auto_malloc(sizeof(struct cache_entry)); |
| 305 | 305 | |
| 306 | entry->tmap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 306 | entry->tmap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 307 | 307 | entry->page = 0xff; |
| 308 | 308 | entry->bank = 0; |
| 309 | 309 | entry->next = cache_head; |
| r1679 | r1680 | |
|---|---|---|
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | /* initialize the playfield */ |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 85 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, | |
| 86 | 86 | |
| 87 | 87 | /* initialize the motion objects */ |
| 88 | 88 | atarimo_init(machine, 0, &modesc); |
| r1679 | r1680 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | VIDEO_START( perfrman ) |
| 77 | 77 | { |
| 78 | pf1_tilemap = tilemap_create(get_pf_tile_info,tilemap_scan_rows, | |
| 78 | pf1_tilemap = tilemap_create(get_pf_tile_info,tilemap_scan_rows, | |
| 79 | 79 | |
| 80 | 80 | tilemap_set_transparent_pen(pf1_tilemap,0); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | VIDEO_START( slapfight ) |
| 84 | 84 | { |
| 85 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 86 | fix_tilemap = tilemap_create(get_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 85 | pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 86 | fix_tilemap = tilemap_create(get_fix_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(fix_tilemap,0); |
| 89 | 89 | } |
| r1679 | r1680 | |
|---|---|---|
| 443 | 443 | { |
| 444 | 444 | for (xtile = xstart; xtile != xend; xtile += xinc ) |
| 445 | 445 | { |
| 446 | const pen_t *pal = &Machine-> | |
| 446 | const pen_t *pal = &Machine-> | |
| 447 | 447 | int source_base = ((code + code_offset++) % gfx->total_elements) * gfx->height; |
| 448 | 448 | |
| 449 | 449 | int x_index_base, y_index, sx, sy, ex, ey; |
| r1679 | r1680 | |
| 707 | 707 | /* Start drawing */ |
| 708 | 708 | if( gfx ) |
| 709 | 709 | { |
| 710 | const pen_t *pal = &Machine-> | |
| 710 | const pen_t *pal = &Machine-> | |
| 711 | 711 | |
| 712 | 712 | int sprite_screen_height = ((high*gfx->height*(0x400*0x400))/zoomy + 0x200)>>10; /* Round up to nearest pixel */ |
| 713 | 713 | int sprite_screen_width = ((wide*gfx->width*(0x400*0x400))/zoomx + 0x200)>>10; |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | quizdna_bg_ram = auto_malloc(0x2000); |
| 61 | 61 | quizdna_fg_ram = auto_malloc(0x1000); |
| 62 | 62 | |
| 63 | quizdna_bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32 ); | |
| 64 | quizdna_fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,8,32,32 ); | |
| 63 | quizdna_bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,8,8,64,32 ); | |
| 64 | quizdna_fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,16,8,32,32 ); | |
| 65 | 65 | |
| 66 | 66 | tilemap_set_transparent_pen( quizdna_fg_tilemap,0 ); |
| 67 | 67 | } |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | }; |
| 74 | 74 | |
| 75 | 75 | /* initialize the playfield */ |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 77 | 77 | |
| 78 | 78 | /* initialize the motion objects */ |
| 79 | 79 | atarimo_init(machine, 0, &modesc); |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | VIDEO_START( equites ) |
| 107 | 107 | { |
| 108 | charmap0 = tilemap_create(equites_charinfo, tilemap_scan_cols, | |
| 108 | charmap0 = tilemap_create(equites_charinfo, tilemap_scan_cols, | |
| 109 | 109 | tilemap_set_transparent_pen(charmap0, 0); |
| 110 | 110 | tilemap_set_scrolldx(charmap0, BMPAD, BMPAD); |
| 111 | 111 | tilemap_set_scrolldy(charmap0, BMPAD, BMPAD); |
| r1679 | r1680 | |
| 232 | 232 | |
| 233 | 233 | tmpbitmap = auto_bitmap_alloc(BMW, BMW, machine->screen[0].format); |
| 234 | 234 | |
| 235 | charmap0 = tilemap_create(splndrbt_char0info, tilemap_scan_cols, | |
| 235 | charmap0 = tilemap_create(splndrbt_char0info, tilemap_scan_cols, | |
| 236 | 236 | tilemap_set_transparent_pen(charmap0, 0); |
| 237 | 237 | tilemap_set_scrolldx(charmap0, 8, 8); |
| 238 | 238 | tilemap_set_scrolldy(charmap0, 32, 32); |
| 239 | 239 | |
| 240 | charmap1 = tilemap_create(splndrbt_char1info, tilemap_scan_cols, | |
| 240 | charmap1 = tilemap_create(splndrbt_char1info, tilemap_scan_cols, | |
| 241 | 241 | tilemap_set_transparent_pen(charmap1, 0); |
| 242 | 242 | tilemap_set_scrolldx(charmap1, 8, 8); |
| 243 | 243 | tilemap_set_scrolldy(charmap1, 32, 32); |
| r1679 | r1680 | |
|---|---|---|
| 584 | 584 | char_dirty = auto_malloc(1024); |
| 585 | 585 | tile_dirty = auto_malloc(16); |
| 586 | 586 | |
| 587 | bg_tilemap_l = tilemap_create( get_bg_l_tile_info, bgvideoram_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32 ); | |
| 588 | bg_tilemap_r = tilemap_create( get_bg_r_tile_info, bgvideoram_scan_cols, TILEMAP_TYPE_PEN, 16, 16, 32, 32 ); | |
| 589 | fg_tilemap = tilemap_create( get_fg_tile_info, fgvideoram_scan_cols, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 587 | bg_tilemap_l = tilemap_create( get_bg_l_tile_info, bgvideoram_scan_cols, 16, 16, 32, 32 ); | |
| 588 | bg_tilemap_r = tilemap_create( get_bg_r_tile_info, bgvideoram_scan_cols, 16, 16, 32, 32 ); | |
| 589 | fg_tilemap = tilemap_create( get_fg_tile_info, fgvideoram_scan_cols, 8, 8, 32, 32 ); | |
| 590 | 590 | |
| 591 | 591 | tilemap_set_transparent_pen( bg_tilemap_l, 0 ); |
| 592 | 592 | tilemap_set_transparent_pen( bg_tilemap_r, 0 ); |
| r1679 | r1680 | |
|---|---|---|
| 180 | 180 | K053936_wraparound_enable(0, 1); |
| 181 | 181 | K053936GP_set_offset(0, -10, 0); // floor tiles in demo loop2 (Elaine vs. boss) |
| 182 | 182 | |
| 183 | ult_936_tilemap = tilemap_create(get_gai_936_tile_info, tilemap_scan_rows, | |
| 183 | ult_936_tilemap = tilemap_create(get_gai_936_tile_info, tilemap_scan_rows, | |
| 184 | 184 | tilemap_set_transparent_pen(ult_936_tilemap, 0); |
| 185 | 185 | } |
| 186 | 186 | |
| r1679 | r1680 | |
| 224 | 224 | K053936_wraparound_enable(0, 1); |
| 225 | 225 | K053936GP_set_offset(0, -8, 0); // Brainy's laser |
| 226 | 226 | |
| 227 | ult_936_tilemap = tilemap_create(get_ult_936_tile_info, tilemap_scan_rows, | |
| 227 | ult_936_tilemap = tilemap_create(get_ult_936_tile_info, tilemap_scan_rows, | |
| 228 | 228 | tilemap_set_transparent_pen(ult_936_tilemap, 0); |
| 229 | 229 | } |
| 230 | 230 |
| r1679 | r1680 | |
|---|---|---|
| 77 | 77 | VIDEO_START( fromance ) |
| 78 | 78 | { |
| 79 | 79 | /* allocate tilemaps */ |
| 80 | bg_tilemap = tilemap_create(get_fromance_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,4, 64,64); | |
| 81 | fg_tilemap = tilemap_create(get_fromance_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,4, 64,64); | |
| 80 | bg_tilemap = tilemap_create(get_fromance_bg_tile_info, tilemap_scan_rows, 8,4, 64,64); | |
| 81 | fg_tilemap = tilemap_create(get_fromance_fg_tile_info, tilemap_scan_rows, 8,4, 64,64); | |
| 82 | 82 | |
| 83 | 83 | /* allocate local videoram */ |
| 84 | 84 | local_videoram[0] = auto_malloc(0x1000 * 3); |
| r1679 | r1680 | |
| 116 | 116 | VIDEO_START( nekkyoku ) |
| 117 | 117 | { |
| 118 | 118 | /* allocate tilemaps */ |
| 119 | bg_tilemap = tilemap_create(get_nekkyoku_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,4, 64,64); | |
| 120 | fg_tilemap = tilemap_create(get_nekkyoku_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,4, 64,64); | |
| 119 | bg_tilemap = tilemap_create(get_nekkyoku_bg_tile_info, tilemap_scan_rows, 8,4, 64,64); | |
| 120 | fg_tilemap = tilemap_create(get_nekkyoku_fg_tile_info, tilemap_scan_rows, 8,4, 64,64); | |
| 121 | 121 | |
| 122 | 122 | /* allocate local videoram */ |
| 123 | 123 | local_videoram[0] = auto_malloc(0x1000 * 3); |
| r1679 | r1680 | |
| 295 | 295 | { |
| 296 | 296 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); |
| 297 | 297 | if (param != 0) |
| 298 | timer_adjust(crtc_timer, attotime_make(0, machine->screen[0].refresh / param), 0, attotime_make(0, machine->screen[0].refresh / param)); | |
| 298 | timer_adjust_periodic(crtc_timer, attotime_make(0, machine->screen[0].refresh / param), 0, attotime_make(0, machine->screen[0].refresh / param)); | |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | |
| r1679 | r1680 | |
| 307 | 307 | { |
| 308 | 308 | /* only register we know about.... */ |
| 309 | 309 | case 0x0b: |
| 310 | timer_adjust(crtc_timer, video_screen_get_time_until_pos(0, Machine->screen[0].visarea.max_y + 1, 0), (data > 0x80) ? 2 : 1 | |
| 310 | timer_adjust_oneshot(crtc_timer, video_screen_get_time_until_pos(0, Machine->screen[0].visarea.max_y + 1, 0), (data > 0x80) ? 2 : 1 | |
| 311 | 311 | break; |
| 312 | 312 | |
| 313 | 313 | default: |
| r1679 | r1680 | |
|---|---|---|
| 23 | 23 | PALETTE_INIT( skykid ) |
| 24 | 24 | { |
| 25 | 25 | int i; |
| 26 | int bit0,bit1,bit2,bit3,r,g,b; | |
| 27 | int totcolors = machine->drv->total_colors; | |
| 28 | 26 | |
| 29 | for (i = 0; i < totcolors; i++) | |
| 27 | /* allocate the colortable */ | |
| 28 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 29 | ||
| 30 | /* create a lookup table for the palette */ | |
| 31 | for (i = 0; i < 0x100; i++) | |
| 30 | 32 | { |
| 31 | /* red component */ | |
| 32 | bit0 = (color_prom[totcolors*0] >> 0) & 0x01; | |
| 33 | bit1 = (color_prom[totcolors*0] >> 1) & 0x01; | |
| 34 | bit2 = (color_prom[totcolors*0] >> 2) & 0x01; | |
| 35 | bit3 = (color_prom[totcolors*0] >> 3) & 0x01; | |
| 36 | r = 0x0e*bit0 + 0x1f*bit1 + 0x43*bit2 + 0x8f*bit3; | |
| 33 | int r = pal4bit(color_prom[i + 0x000]); | |
| 34 | int g = pal4bit(color_prom[i + 0x100]); | |
| 35 | int b = pal4bit(color_prom[i + 0x200]); | |
| 37 | 36 | |
| 38 | /* green component */ | |
| 39 | bit0 = (color_prom[totcolors*1] >> 0) & 0x01; | |
| 40 | bit1 = (color_prom[totcolors*1] >> 1) & 0x01; | |
| 41 | bit2 = (color_prom[totcolors*1] >> 2) & 0x01; | |
| 42 | bit3 = (color_prom[totcolors*1] >> 3) & 0x01; | |
| 43 | g = 0x0e*bit0 + 0x1f*bit1 + 0x43*bit2 + 0x8f*bit3; | |
| 44 | ||
| 45 | /* blue component */ | |
| 46 | bit0 = (color_prom[totcolors*2] >> 0) & 0x01; | |
| 47 | bit1 = (color_prom[totcolors*2] >> 1) & 0x01; | |
| 48 | bit2 = (color_prom[totcolors*2] >> 2) & 0x01; | |
| 49 | bit3 = (color_prom[totcolors*2] >> 3) & 0x01; | |
| 50 | b = 0x0e*bit0 + 0x1f*bit1 + 0x43*bit2 + 0x8f*bit3; | |
| 51 | ||
| 52 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 53 | color_prom++; | |
| 37 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 54 | 38 | } |
| 55 | 39 | |
| 56 | /* text palette */ | |
| 57 | for (i = 0; i < 64*4; i++) | |
| 58 | *(colortable++) = i; | |
| 59 | ||
| 60 | color_prom += 2*totcolors; | |
| 61 | 40 | /* color_prom now points to the beginning of the lookup table */ |
| 41 | color_prom += 0x300; | |
| 62 | 42 | |
| 63 | /* tiles lookup table */ | |
| 64 | for (i = 0; i < 128*4; i++) | |
| 65 | *(colortable++) = *(color_prom++); | |
| 43 | /* text palette */ | |
| 44 | for (i = 0; i < 0x100; i++) | |
| 45 | colortable_entry_set_value(machine->colortable, i, i); | |
| 66 | 46 | |
| 67 | /* sprites lookup table */ | |
| 68 | for (i = 0;i < 64*8;i++) | |
| 69 | *(colortable++) = *(color_prom++); | |
| 47 | /* tiles/sprites */ | |
| 48 | for (i = 0x100; i < 0x500; i++) | |
| 49 | { | |
| 50 | UINT8 ctabentry = color_prom[i - 0x100]; | |
| 51 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 52 | } | |
| 70 | 53 | } |
| 71 | 54 | |
| 72 | 55 | |
| r1679 | r1680 | |
| 128 | 111 | |
| 129 | 112 | VIDEO_START( skykid ) |
| 130 | 113 | { |
| 131 | tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan, TILEMAP_TYPE_PEN,8,8,36,28); | |
| 132 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 114 | tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan, 8,8,36,28); | |
| 115 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 133 | 116 | |
| 134 | 117 | tilemap_set_transparent_pen(tx_tilemap, 0); |
| 135 | 118 | |
| r1679 | r1680 | |
| 240 | 223 | color, |
| 241 | 224 | flipx,flipy, |
| 242 | 225 | sx + 16*x,sy + 16*y, |
| 243 | cliprect,TRANSPARENCY_COLOR,0xff); | |
| 226 | cliprect,TRANSPARENCY_PENS, | |
| 227 | colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0xff)); | |
| 244 | 228 | } |
| 245 | 229 | } |
| 246 | 230 | } |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | }; |
| 74 | 74 | |
| 75 | 75 | /* initialize the playfield */ |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 76 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 77 | 77 | |
| 78 | 78 | /* initialize the motion objects */ |
| 79 | 79 | atarimo_init(machine, 0, &modesc); |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | VIDEO_START( quizpani ) |
| 75 | 75 | { |
| 76 | bg_tilemap = tilemap_create(bg_tile_info, bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 77 | txt_tilemap = tilemap_create(txt_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 76 | bg_tilemap = tilemap_create(bg_tile_info, bg_scan,16,16,256,32); | |
| 77 | txt_tilemap = tilemap_create(txt_tile_info,bg_scan,16,16,256,32); | |
| 78 | 78 | tilemap_set_transparent_pen(txt_tilemap,15); |
| 79 | 79 | } |
| 80 | 80 |
| r1679 | r1680 | |
|---|---|---|
| 121 | 121 | |
| 122 | 122 | gomoku_bg_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 123 | 123 | |
| 124 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 124 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 125 | 125 | |
| 126 | 126 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 127 | 127 |
| r1679 | r1680 | |
|---|---|---|
| 173 | 173 | order[j] = temp; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | fillbitmap(bitmap, machine-> | |
| 176 | fillbitmap(bitmap, machine-> | |
| 177 | 177 | |
| 178 | 178 | for (i = 0; i < NUM_LAYERS + 1; i++) |
| 179 | 179 | { |
| r1679 | r1680 | |
|---|---|---|
| 290 | 290 | helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 291 | 291 | helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 292 | 292 | |
| 293 | tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 16, 16); | |
| 294 | tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 16, 16); | |
| 293 | tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, 16, 16, 16, 16); | |
| 294 | tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, 16, 16, 16, 16); | |
| 295 | 295 | |
| 296 | 296 | memset(&car[0], 0, sizeof (struct sprite_data)); |
| 297 | 297 | memset(&car[1], 0, sizeof (struct sprite_data)); |
| r1679 | r1680 | |
|---|---|---|
| 126 | 126 | |
| 127 | 127 | VIDEO_START( m57 ) |
| 128 | 128 | { |
| 129 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 129 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 130 | 130 | tilemap_set_scroll_rows(bg_tilemap, 256); |
| 131 | 131 | } |
| 132 | 132 |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | VIDEO_START( mustache ) |
| 90 | 90 | { |
| 91 | 91 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_x, |
| 92 | | |
| 92 | | |
| 93 | 93 | |
| 94 | 94 | tilemap_set_scroll_rows(bg_tilemap, 4); |
| 95 | 95 | } |
| r1679 | r1680 | |
|---|---|---|
| 251 | 251 | else |
| 252 | 252 | auto_animation_frame_counter = auto_animation_frame_counter - 1; |
| 253 | 253 | |
| 254 | timer_adjust(auto_animation_timer, video_screen_get_time_until_pos(0, NEOGEO_VSSTART, 0), 0 | |
| 254 | timer_adjust_oneshot(auto_animation_timer, video_screen_get_time_until_pos(0, NEOGEO_VSSTART, 0), 0 | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | |
| r1679 | r1680 | |
| 263 | 263 | |
| 264 | 264 | static void start_auto_animation_timer(void) |
| 265 | 265 | { |
| 266 | timer_adjust(auto_animation_timer, video_screen_get_time_until_pos(0, NEOGEO_VSSTART, 0), 0 | |
| 266 | timer_adjust_oneshot(auto_animation_timer, video_screen_get_time_until_pos(0, NEOGEO_VSSTART, 0), 0 | |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | |
| r1679 | r1680 | |
| 673 | 673 | /* let's come back at the beginning of the next line */ |
| 674 | 674 | scanline = (scanline + 1) % NEOGEO_VTOTAL; |
| 675 | 675 | |
| 676 | timer_adjust(sprite_line_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 676 | timer_adjust_oneshot(sprite_line_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | |
| r1679 | r1680 | |
| 685 | 685 | |
| 686 | 686 | static void start_sprite_line_timer(void) |
| 687 | 687 | { |
| 688 | timer_adjust(sprite_line_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 688 | timer_adjust_oneshot(sprite_line_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 |
| r1679 | r1680 | |
|---|---|---|
| 273 | 273 | |
| 274 | 274 | _gxcommoninit(machine); |
| 275 | 275 | |
| 276 | gx_psac_tilemap = tilemap_create(get_gx_psac3_tile_info, tilemap_scan_rows, | |
| 276 | gx_psac_tilemap = tilemap_create(get_gx_psac3_tile_info, tilemap_scan_rows, | |
| 277 | 277 | gx_rozenable = 1; |
| 278 | 278 | |
| 279 | 279 | K053936_wraparound_enable(0, 1); |
| r1679 | r1680 | |
| 286 | 286 | |
| 287 | 287 | _gxcommoninit(machine); |
| 288 | 288 | |
| 289 | gx_psac_tilemap = tilemap_create(get_gx_psac_tile_info, tilemap_scan_rows, | |
| 289 | gx_psac_tilemap = tilemap_create(get_gx_psac_tile_info, tilemap_scan_rows, | |
| 290 | 290 | gx_rozenable = 1; |
| 291 | 291 | |
| 292 | 292 | K053936_wraparound_enable(0, 0); |
| r1679 | r1680 | |
| 321 | 321 | K056832_set_LayerOffset(2, 2+1, 0); |
| 322 | 322 | K056832_set_LayerOffset(3, 3+1, 0); |
| 323 | 323 | |
| 324 | gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 128); | |
| 325 | gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 128); | |
| 324 | gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, 16, 16, 128, 128); | |
| 325 | gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, 16, 16, 128, 128); | |
| 326 | 326 | tilemap_set_transparent_pen(gx_psac_tilemap, 0); |
| 327 | 327 | tilemap_set_transparent_pen(gx_psac_tilemap2, 0); |
| 328 | 328 | |
| r1679 | r1680 | |
| 341 | 341 | K056832_set_LayerOffset(2, 2+1, 0); |
| 342 | 342 | K056832_set_LayerOffset(3, 3+1, 0); |
| 343 | 343 | |
| 344 | gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 128); | |
| 345 | gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128, 128); | |
| 344 | gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, 16, 16, 128, 128); | |
| 345 | gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, 16, 16, 128, 128); | |
| 346 | 346 | tilemap_set_transparent_pen(gx_psac_tilemap, 0); |
| 347 | 347 | tilemap_set_transparent_pen(gx_psac_tilemap2, 0); |
| 348 | 348 |
| r1679 | r1680 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | PALETTE_INIT( sprcros2 ) |
| 14 | 14 | { |
| 15 | int i | |
| 15 | int i | |
| 16 | 16 | |
| 17 | for (i = 0;i < machine->drv->total_colors; i++) | |
| 17 | /* allocate the colortable */ | |
| 18 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 19 | ||
| 20 | /* create a lookup table for the palette */ | |
| 21 | for (i = 0; i < 0x20; i++) | |
| 18 | 22 | { |
| 23 | int bit0, bit1, bit2; | |
| 24 | int r, g, b; | |
| 25 | ||
| 19 | 26 | /* red component */ |
| 20 | 27 | bit0 = (color_prom[i] >> 0) & 0x01; |
| 21 | 28 | bit1 = (color_prom[i] >> 1) & 0x01; |
| 22 | 29 | bit2 = (color_prom[i] >> 2) & 0x01; |
| 23 | 30 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 31 | ||
| 24 | 32 | /* green component */ |
| 25 | 33 | bit0 = (color_prom[i] >> 3) & 0x01; |
| 26 | 34 | bit1 = (color_prom[i] >> 4) & 0x01; |
| 27 | 35 | bit2 = (color_prom[i] >> 5) & 0x01; |
| 28 | 36 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 37 | ||
| 29 | 38 | /* blue component */ |
| 30 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 31 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 32 | b = 0x47 * bit1 + 0xb8 * bit2; | |
| 39 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 40 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 41 | b = 0x47 * bit0 + 0xb8 * bit1; | |
| 33 | 42 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); |
| 43 | ||
| 44 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 34 | 45 | } |
| 35 | 46 | |
| 36 | //cluts | |
| 37 | for (i = 0;i < 0x100; i++) | |
| 47 | /* color_prom now points to the beginning of the lookup table */ | |
| 48 | color_prom += 0x20; | |
| 49 | ||
| 50 | /* bg */ | |
| 51 | for (i = 0; i < 0x100; i++) | |
| 38 | 52 | { |
| 39 | colortable[i]=color_prom[i+0x20]+(color_prom[i+0x120]<<4); //bg | |
| 40 | colortable[i+0x100]=color_prom[i+0x220]; //sprites | |
| 41 | colortable[i+0x200]=color_prom[i+0x320]; //fg | |
| 53 | UINT8 ctabentry = (color_prom[i] & 0x0f) | ((color_prom[i + 0x100] & 0x0f) << 4); | |
| 54 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 42 | 55 | } |
| 56 | ||
| 57 | /* sprites & fg */ | |
| 58 | for (i = 0x100; i < 0x300; i++) | |
| 59 | { | |
| 60 | UINT8 ctabentry = color_prom[i + 0x100]; | |
| 61 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 62 | } | |
| 43 | 63 | } |
| 44 | 64 | |
| 45 | 65 | WRITE8_HANDLER( sprcros2_fgvideoram_w ) |
| r1679 | r1680 | |
| 91 | 111 | { |
| 92 | 112 | UINT32 tile_number = sprcros2_fgvideoram[tile_index]; |
| 93 | 113 | UINT8 attr = sprcros2_fgvideoram[tile_index+0x400]; |
| 114 | int color = (attr&0xfc)>>2; | |
| 94 | 115 | |
| 116 | tileinfo->group = color; | |
| 117 | ||
| 95 | 118 | //attr |
| 96 | 119 | //76543210 |
| 97 | 120 | //xxxxxx-- colour |
| r1679 | r1680 | |
| 102 | 125 | SET_TILE_INFO( |
| 103 | 126 | 2, |
| 104 | 127 | tile_number, |
| 105 | | |
| 128 | | |
| 106 | 129 | 0); |
| 107 | 130 | } |
| 108 | 131 | |
| 109 | 132 | VIDEO_START( sprcros2 ) |
| 110 | 133 | { |
| 111 | sprcros2_bgtilemap = tilemap_create( get_sprcros2_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 112 | sprcros2_fgtilemap = tilemap_create( get_sprcros2_fgtile_info,tilemap_scan_rows,TILEMAP_TYPE_COLORTABLE,8,8,32,32 ); | |
| 134 | sprcros2_bgtilemap = tilemap_create( get_sprcros2_bgtile_info,tilemap_scan_rows,8,8,32,32 ); | |
| 135 | sprcros2_fgtilemap = tilemap_create( get_sprcros2_fgtile_info,tilemap_scan_rows,8,8,32,32 ); | |
| 113 | 136 | |
| 114 | tilemap_ | |
| 137 | colortable_configure_tilemap_g | |
| 115 | 138 | } |
| 116 | 139 | |
| 117 | 140 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect) |
| 118 | 141 | { |
| 119 | int offs,sx,sy,flipx,flipy; | |
| 142 | int offs,sx,sy,color,flipx,flipy; | |
| 120 | 143 | |
| 121 | 144 | for (offs = sprcros2_spriteram_size-4; offs >= 0; offs -= 4) |
| 122 | 145 | { |
| r1679 | r1680 | |
| 139 | 162 | |
| 140 | 163 | sx = ((sprcros2_spriteram[offs+3]+0x10)%0x100)-0x10; |
| 141 | 164 | sy = 225-(((sprcros2_spriteram[offs+2]+0x10)%0x100)-0x10); |
| 165 | color = (sprcros2_spriteram[offs+1]&0x38)>>3; | |
| 142 | 166 | flipx = sprcros2_spriteram[offs+1]&0x02; |
| 143 | 167 | flipy = 0; |
| 144 | 168 | |
| r1679 | r1680 | |
| 152 | 176 | |
| 153 | 177 | drawgfx(bitmap,machine->gfx[1], |
| 154 | 178 | sprcros2_spriteram[offs], |
| 155 | | |
| 179 | | |
| 156 | 180 | flipx,flipy, |
| 157 | 181 | sx,sy, |
| 158 | cliprect,TRANSPARENCY_COLOR,0); | |
| 182 | cliprect,TRANSPARENCY_PENS, | |
| 183 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 159 | 184 | } |
| 160 | 185 | } |
| 161 | 186 | } |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | 107 | /* initialize the playfield */ |
| 108 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 108 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 109 | 109 | |
| 110 | 110 | /* initialize the second playfield */ |
| 111 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 111 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 112 | 112 | tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0); |
| 113 | 113 | |
| 114 | 114 | /* initialize the motion objects */ |
| 115 | 115 | atarimo_init(machine, 0, &modesc); |
| 116 | 116 | |
| 117 | 117 | /* initialize the alphanumerics */ |
| 118 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 118 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 119 | 119 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 120 | 120 | } |
| 121 | 121 |
| r1679 | r1680 | |
|---|---|---|
| 327 | 327 | VIDEO_START( ladybug ) |
| 328 | 328 | { |
| 329 | 329 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 330 | | |
| 330 | | |
| 331 | 331 | |
| 332 | 332 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 333 | 333 | } |
| r1679 | r1680 | |
| 335 | 335 | VIDEO_START( sraider ) |
| 336 | 336 | { |
| 337 | 337 | grid_tilemap = tilemap_create(get_grid_tile_info, tilemap_scan_rows, |
| 338 | | |
| 338 | | |
| 339 | 339 | |
| 340 | 340 | tilemap_set_scroll_rows(grid_tilemap, 32); |
| 341 | 341 | |
| 342 | 342 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 343 | | |
| 343 | | |
| 344 | 344 | |
| 345 | 345 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 346 | 346 |
| r1679 | r1680 | |
|---|---|---|
| 261 | 261 | { |
| 262 | 262 | combasc_vreg = -1; |
| 263 | 263 | |
| 264 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 265 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 266 | textlayer = tilemap_create(get_text_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 264 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,32,32); | |
| 265 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,32,32); | |
| 266 | textlayer = tilemap_create(get_text_info, tilemap_scan_rows, 8,8,32,32); | |
| 267 | 267 | |
| 268 | 268 | private_spriteram[0] = auto_malloc(0x800); |
| 269 | 269 | private_spriteram[1] = auto_malloc(0x800); |
| r1679 | r1680 | |
| 281 | 281 | { |
| 282 | 282 | combasc_vreg = -1; |
| 283 | 283 | |
| 284 | bg_tilemap[0] = tilemap_create(get_tile_info0_bootleg,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 285 | bg_tilemap[1] = tilemap_create(get_tile_info1_bootleg,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 286 | textlayer = tilemap_create(get_text_info_bootleg, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 284 | bg_tilemap[0] = tilemap_create(get_tile_info0_bootleg,tilemap_scan_rows,8,8,32,32); | |
| 285 | bg_tilemap[1] = tilemap_create(get_tile_info1_bootleg,tilemap_scan_rows,8,8,32,32); | |
| 286 | textlayer = tilemap_create(get_text_info_bootleg, tilemap_scan_rows,8,8,32,32); | |
| 287 | 287 | |
| 288 | 288 | private_spriteram[0] = auto_malloc(0x800); |
| 289 | 289 | private_spriteram[1] = auto_malloc(0x800); |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | VIDEO_START( blueprnt ) |
| 80 | 80 | { |
| 81 | 81 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x, |
| 82 | | |
| 82 | | |
| 83 | 83 | |
| 84 | 84 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 85 | 85 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| r1679 | r1680 | |
|---|---|---|
| 367 | 367 | if (this_ppu->hblank_callback_proc) |
| 368 | 368 | (*this_ppu->hblank_callback_proc) (num, this_ppu->scanline, vblank, blanked); |
| 369 | 369 | |
| 370 | timer_adjust(chips[num].hblank_timer, attotime_never, num | |
| 370 | timer_adjust_oneshot(chips[num].hblank_timer, attotime_never, num | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | static TIMER_CALLBACK( nmi_callback ) |
| r1679 | r1680 | |
| 379 | 379 | if (intf->nmi_handler[num]) |
| 380 | 380 | (*intf->nmi_handler[num]) (num, ppu_regs); |
| 381 | 381 | |
| 382 | timer_adjust(chips[num].nmi_timer, attotime_never, num | |
| 382 | timer_adjust_oneshot(chips[num].nmi_timer, attotime_never, num | |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | static void draw_background(const int num, UINT8 *line_priority ) |
| r1679 | r1680 | |
| 871 | 871 | // a game can read the high bit of $2002 before the NMI is called (potentially resetting the bit |
| 872 | 872 | // via a read from $2002 in the NMI handler). |
| 873 | 873 | // B-Wings is an example game that needs this. |
| 874 | timer_adjust(this_ppu->nmi_timer, ATTOTIME_IN_CYCLES(4, 0), num | |
| 874 | timer_adjust_oneshot(this_ppu->nmi_timer, ATTOTIME_IN_CYCLES(4, 0), num | |
| 875 | 875 | } |
| 876 | 876 | } |
| 877 | 877 | |
| r1679 | r1680 | |
| 922 | 922 | next_scanline = 0; |
| 923 | 923 | |
| 924 | 924 | // Call us back when the hblank starts for this scanline |
| 925 | timer_adjust(this_ppu->hblank_timer, ATTOTIME_IN_CYCLES(86.67, 0), num | |
| 925 | timer_adjust_oneshot(this_ppu->hblank_timer, ATTOTIME_IN_CYCLES(86.67, 0), num | |
| 926 | 926 | |
| 927 | 927 | // trigger again at the start of the next scanline |
| 928 | timer_adjust(this_ppu->scanline_timer, video_screen_get_time_until_pos(0, next_scanline * this_ppu->scan_scale, 0), num | |
| 928 | timer_adjust_oneshot(this_ppu->scanline_timer, video_screen_get_time_until_pos(0, next_scanline * this_ppu->scan_scale, 0), num | |
| 929 | 929 | } |
| 930 | 930 | |
| 931 | 931 | /************************************* |
| r1679 | r1680 | |
| 950 | 950 | /* set the scan scale (this is for dual monitor vertical setups) */ |
| 951 | 951 | chips[num].scan_scale = scan_scale; |
| 952 | 952 | |
| 953 | timer_adjust(chips[num].nmi_timer, attotime_never, num | |
| 953 | timer_adjust_oneshot(chips[num].nmi_timer, attotime_never, num | |
| 954 | 954 | |
| 955 | 955 | // Call us back when the hblank starts for this scanline |
| 956 | timer_adjust(chips[num].hblank_timer, ATTOTIME_IN_CYCLES(86.67, 0), num | |
| 956 | timer_adjust_oneshot(chips[num].hblank_timer, ATTOTIME_IN_CYCLES(86.67, 0), num | |
| 957 | 957 | |
| 958 | 958 | // Call us back at the start of the next scanline |
| 959 | timer_adjust(chips[num].scanline_timer, video_screen_get_time_until_pos(0, 1, 0), num | |
| 959 | timer_adjust_oneshot(chips[num].scanline_timer, video_screen_get_time_until_pos(0, 1, 0), num | |
| 960 | 960 | |
| 961 | 961 | /* reset the callbacks */ |
| 962 | 962 | chips[num].scanline_callback_proc = 0; |
| r1679 | r1680 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | VIDEO_START( gotcha ) |
| 41 | 41 | { |
| 42 | fg_tilemap = tilemap_create(fg_get_tile_info,gotcha_tilemap_scan,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 43 | bg_tilemap = tilemap_create(bg_get_tile_info,gotcha_tilemap_scan,TILEMAP_TYPE_PEN, 16,16,64,32); | |
| 42 | fg_tilemap = tilemap_create(fg_get_tile_info,gotcha_tilemap_scan,16,16,64,32); | |
| 43 | bg_tilemap = tilemap_create(bg_get_tile_info,gotcha_tilemap_scan, 16,16,64,32); | |
| 44 | 44 | |
| 45 | 45 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 46 | 46 |
| r1679 | r1680 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | int i; |
| 53 | 53 | |
| 54 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 54 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 55 | 55 | |
| 56 | 56 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 57 | 57 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "video/resnet.h" | |
| 2 | 3 | |
| 3 | 4 | static int flipscreen; |
| 4 | 5 | static tilemap *layer0; |
| 5 | extern UINT8 *pandoras_sharedram; | |
| 6 | 6 | |
| 7 | 7 | /*********************************************************************** |
| 8 | 8 | |
| r1679 | r1680 | |
| 24 | 24 | ***************************************************************************/ |
| 25 | 25 | PALETTE_INIT( pandoras ) |
| 26 | 26 | { |
| 27 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 28 | static const int resistances_b [2] = { 470, 220 }; | |
| 29 | double rweights[3], gweights[3], bweights[2]; | |
| 27 | 30 | int i; |
| 28 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 29 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 30 | 31 | |
| 31 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 32 | /* compute the color output resistor weights */ | |
| 33 | compute_resistor_weights(0, 255, -1.0, | |
| 34 | 3, &resistances_rg[0], rweights, 1000, 0, | |
| 35 | 3, &resistances_rg[0], gweights, 1000, 0, | |
| 36 | 2, &resistances_b[0], bweights, 1000, 0); | |
| 37 | ||
| 38 | /* allocate the colortable */ | |
| 39 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 40 | ||
| 41 | /* create a lookup table for the palette */ | |
| 42 | for (i = 0; i < 0x20; i++) | |
| 32 | 43 | { |
| 33 | int bit0, bit1, bit2, r, g, b; | |
| 44 | int bit0, bit1, bit2; | |
| 45 | int r, g, b; | |
| 34 | 46 | |
| 35 | 47 | /* red component */ |
| 36 | bit0 = (*color_prom >> 0) & 0x01; | |
| 37 | bit1 = (*color_prom >> 1) & 0x01; | |
| 38 | bit2 = (*color_prom >> 2) & 0x01; | |
| 39 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 48 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 49 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 50 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 51 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 40 | 52 | |
| 41 | 53 | /* green component */ |
| 42 | bit0 = (*color_prom >> 3) & 0x01; | |
| 43 | bit1 = (*color_prom >> 4) & 0x01; | |
| 44 | bit2 = (*color_prom >> 5) & 0x01; | |
| 45 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 54 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 55 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 56 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 57 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 46 | 58 | |
| 47 | 59 | /* blue component */ |
| 48 | bit0 = 0; | |
| 49 | bit1 = (*color_prom >> 6) & 0x01; | |
| 50 | bit2 = (*color_prom >> 7) & 0x01; | |
| 51 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 60 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 61 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 62 | b = combine_2_weights(bweights, bit0, bit1); | |
| 52 | 63 | |
| 53 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 54 | color_prom++; | |
| 64 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 55 | 65 | } |
| 56 | 66 | |
| 57 | 67 | /* color_prom now points to the beginning of the lookup table */ |
| 68 | color_prom += 0x20; | |
| 58 | 69 | |
| 59 | 70 | /* sprites */ |
| 60 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 61 | COLOR(1,i) = *(color_prom++) & 0x0f; | |
| 71 | for (i = 0; i < 0x100; i++) | |
| 72 | { | |
| 73 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 74 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 75 | } | |
| 62 | 76 | |
| 63 | 77 | /* characters */ |
| 64 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 65 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 78 | for (i = 0x100; i < 0x200; i++) | |
| 79 | { | |
| 80 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 81 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 82 | } | |
| 66 | 83 | } |
| 67 | 84 | |
| 68 | 85 | /*************************************************************************** |
| r1679 | r1680 | |
| 75 | 92 | { |
| 76 | 93 | UINT8 attr = colorram[tile_index]; |
| 77 | 94 | SET_TILE_INFO( |
| 78 | | |
| 95 | 1, | |
| 79 | 96 | videoram[tile_index] + ((attr & 0x10) << 4), |
| 80 | 97 | attr & 0x0f, |
| 81 | 98 | TILE_FLIPYX((attr & 0xc0) >> 6)); |
| r1679 | r1680 | |
| 90 | 107 | |
| 91 | 108 | VIDEO_START( pandoras ) |
| 92 | 109 | { |
| 93 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows, | |
| 110 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows, | |
| 94 | 111 | } |
| 95 | 112 | |
| 96 | 113 | /*************************************************************************** |
| r1679 | r1680 | |
| 99 | 116 | |
| 100 | 117 | ***************************************************************************/ |
| 101 | 118 | |
| 102 | READ8_HANDLER( pandoras_vram_r ) | |
| 103 | { | |
| 104 | return videoram[offset]; | |
| 105 | } | |
| 106 | ||
| 107 | READ8_HANDLER( pandoras_cram_r ) | |
| 108 | { | |
| 109 | return colorram[offset]; | |
| 110 | } | |
| 111 | ||
| 112 | 119 | WRITE8_HANDLER( pandoras_vram_w ) |
| 113 | 120 | { |
| 114 | 121 | tilemap_mark_tile_dirty(layer0,offset); |
| r1679 | r1680 | |
| 146 | 153 | { |
| 147 | 154 | int sx = sr[offs + 1]; |
| 148 | 155 | int sy = 240 - sr[offs]; |
| 156 | int color = sr[offs + 3] & 0x0f; | |
| 149 | 157 | int nflipx = sr[offs + 3] & 0x40; |
| 150 | 158 | int nflipy = sr[offs + 3] & 0x80; |
| 151 | 159 | |
| 152 | drawgfx(bitmap,machine->gfx[ | |
| 160 | drawgfx(bitmap,machine->gfx[0], | |
| 153 | 161 | sr[offs + 2], |
| 154 | | |
| 162 | c | |
| 155 | 163 | !nflipx,!nflipy, |
| 156 | 164 | sx,sy, |
| 157 | cliprect,TRANSPARENCY_COLOR,0); | |
| 165 | cliprect,TRANSPARENCY_PENS, | |
| 166 | colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); | |
| 158 | 167 | } |
| 159 | 168 | } |
| 160 | 169 | |
| 161 | 170 | VIDEO_UPDATE( pandoras ) |
| 162 | 171 | { |
| 163 | 172 | tilemap_draw( bitmap,cliprect, layer0, 1 ,0); |
| 164 | draw_sprites( machine, bitmap,cliprect, &p | |
| 173 | draw_sprites( machine, bitmap,cliprect, &sp | |
| 165 | 174 | tilemap_draw( bitmap,cliprect, layer0, 0 ,0); |
| 166 | 175 | return 0; |
| 167 | 176 | } |
| r1679 | r1680 | |
|---|---|---|
| 115 | 115 | |
| 116 | 116 | VIDEO_START(bigstrkb) |
| 117 | 117 | { |
| 118 | bsb_tilemap = tilemap_create(get_bsb_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 119 | bsb_tilemap2 = tilemap_create(get_bsb_tile2_info,bsb_bg_scan,TILEMAP_TYPE_PEN, 16, 16,128,64); | |
| 120 | bsb_tilemap3 = tilemap_create(get_bsb_tile3_info,bsb_bg_scan,TILEMAP_TYPE_PEN, 16, 16,128,64); | |
| 118 | bsb_tilemap = tilemap_create(get_bsb_tile_info,tilemap_scan_cols, 8, 8,64,32); | |
| 119 | bsb_tilemap2 = tilemap_create(get_bsb_tile2_info,bsb_bg_scan, 16, 16,128,64); | |
| 120 | bsb_tilemap3 = tilemap_create(get_bsb_tile3_info,bsb_bg_scan, 16, 16,128,64); | |
| 121 | 121 | |
| 122 | 122 | tilemap_set_transparent_pen(bsb_tilemap,15); |
| 123 | 123 | // tilemap_set_transparent_pen(bsb_tilemap2,15); |
| r1679 | r1680 | |
|---|---|---|
| 374 | 374 | UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, |
| 375 | 375 | const rectangle *clip,int scalex, int scaley) |
| 376 | 376 | { |
| 377 | const pen_t *pal = &Machine-> | |
| 377 | const pen_t *pal = &Machine-> | |
| 378 | 378 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 379 | 379 | |
| 380 | 380 | int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | PALETTE_INIT( gberet ) |
| 31 | 31 | { |
| 32 | 32 | int i; |
| 33 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 34 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 35 | 33 | |
| 36 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 34 | /* allocate the colortable */ | |
| 35 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 36 | ||
| 37 | /* create a lookup table for the palette */ | |
| 38 | for (i = 0; i < 0x20; i++) | |
| 37 | 39 | { |
| 38 | int bit0,bit1,bit2,r,g,b; | |
| 40 | int bit0, bit1, bit2; | |
| 41 | int r, g, b; | |
| 39 | 42 | |
| 40 | bit0 = (*color_prom >> 0) & 0x01; | |
| 41 | bit1 = (*color_prom >> 1) & 0x01; | |
| 42 | bit2 = (*color_prom >> 2) & 0x01; | |
| 43 | /* red component */ | |
| 44 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 45 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 46 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 43 | 47 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 44 | bit0 = (*color_prom >> 3) & 0x01; | |
| 45 | bit1 = (*color_prom >> 4) & 0x01; | |
| 46 | bit2 = (*color_prom >> 5) & 0x01; | |
| 48 | ||
| 49 | /* green component */ | |
| 50 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 51 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 52 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 47 | 53 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 54 | ||
| 55 | /* blue component */ | |
| 48 | 56 | bit0 = 0; |
| 49 | bit1 = (*color_prom >> 6) & 0x01; | |
| 50 | bit2 = (*color_prom >> 7) & 0x01; | |
| 57 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 58 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 51 | 59 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 52 | 60 | |
| 53 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 54 | color_prom++; | |
| 61 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 55 | 62 | } |
| 56 | 63 | |
| 57 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 64 | /* color_prom now points to the beginning of the lookup table */ | |
| 65 | color_prom += 0x20; | |
| 66 | ||
| 67 | for (i = 0; i < 0x100; i++) | |
| 58 | 68 | { |
| 59 | if (*color_prom & 0x0f) COLOR(1,i) = *color_prom & 0x0f; | |
| 60 | else COLOR(1,i) = 0; | |
| 61 | color_prom++; | |
| 69 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 70 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 62 | 71 | } |
| 63 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 72 | ||
| 73 | for (i = 0x100; i < 0x200; i++) | |
| 64 | 74 | { |
| 65 | COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10; | |
| 75 | UINT8 ctabentry; | |
| 76 | ||
| 77 | if (color_prom[i] & 0x0f) | |
| 78 | ctabentry = color_prom[i] & 0x0f; | |
| 79 | else | |
| 80 | ctabentry = 0; | |
| 81 | ||
| 82 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 66 | 83 | } |
| 67 | 84 | } |
| 68 | 85 | |
| r1679 | r1680 | |
| 100 | 117 | int color = attr & 0x0f; |
| 101 | 118 | int flags = TILE_FLIPYX((attr & 0x30) >> 4); |
| 102 | 119 | |
| 120 | tileinfo->group = color; | |
| 103 | 121 | tileinfo->category = (attr & 0x80) >> 7; |
| 104 | 122 | |
| 105 | 123 | SET_TILE_INFO(0, code, color, flags); |
| r1679 | r1680 | |
| 107 | 125 | |
| 108 | 126 | VIDEO_START( gberet ) |
| 109 | 127 | { |
| 110 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 111 | TILEMAP_TYPE_COLORTABLE, 8, 8, 64, 32); | |
| 128 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 32); | |
| 112 | 129 | |
| 113 | tilemap_ | |
| 130 | colortable_configure_tilemap_g | |
| 114 | 131 | tilemap_set_scroll_rows(bg_tilemap, 32); |
| 115 | 132 | } |
| 116 | 133 | |
| r1679 | r1680 | |
| 145 | 162 | } |
| 146 | 163 | |
| 147 | 164 | drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, |
| 148 | cliprect, TRANSPARENCY_COLOR, 0); | |
| 165 | cliprect, TRANSPARENCY_PENS, | |
| 166 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 149 | 167 | } |
| 150 | 168 | } |
| 151 | 169 | } |
| r1679 | r1680 | |
| 197 | 215 | } |
| 198 | 216 | |
| 199 | 217 | drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, |
| 200 | cliprect, TRANSPARENCY_COLOR, 0); | |
| 218 | cliprect, TRANSPARENCY_PENS, | |
| 219 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 201 | 220 | } |
| 202 | 221 | } |
| 203 | 222 | } |
| r1679 | r1680 | |
|---|---|---|
| 40 | 40 | PALETTE_INIT( stfight ) |
| 41 | 41 | { |
| 42 | 42 | int i; |
| 43 | #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) | |
| 44 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 45 | 43 | |
| 44 | /* allocate the colortable */ | |
| 45 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 46 | 46 | |
| 47 | /* unique color for transparency */ | |
| 48 | palette_set_color(machine,256,MAKE_RGB(0x04,0x04,0x04)); | |
| 47 | /* text uses colors 0xc0-0xcf */ | |
| 48 | for (i = 0; i < 0x40; i++) | |
| 49 | { | |
| 50 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0xc0; | |
| 51 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 52 | } | |
| 49 | 53 | |
| 50 | /* text uses colors 192-207 */ | |
| 51 | for (i = 0;i < TOTAL_COLORS(0);i++) | |
| 54 | /* fg uses colors 0x40-0x7f */ | |
| 55 | for (i = 0x40; i < 0x140; i++) | |
| 52 | 56 | { |
| 53 | if ((*color_prom & 0x0f) == 0x0f) COLOR(0,i) = 256; /* transparent */ | |
| 54 | else COLOR(0,i) = (*color_prom & 0x0f) + 0xc0; | |
| 55 | color_prom++; | |
| 57 | UINT8 ctabentry = (color_prom[i + 0x1c0] & 0x0f) | ((color_prom[i + 0x0c0] & 0x03) << 4) | 0x40; | |
| 58 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 56 | 59 | } |
| 57 | color_prom += 256 - TOTAL_COLORS(0); /* rest of the PROM is unused */ | |
| 58 | 60 | |
| 59 | /* fg uses colors 64-127 */ | |
| 60 | for (i = 0;i < TOTAL_COLORS(1);i++) | |
| 61 | /* bg uses colors 0-0x3f */ | |
| 62 | for (i = 0x140; i < 0x240; i++) | |
| 61 | 63 | { |
| 62 | COLOR(1,i) = (color_prom[256] & 0x0f) + 16 * (color_prom[0] & 0x03) + 0x40; | |
| 63 | color_prom++; | |
| 64 | UINT8 ctabentry = (color_prom[i + 0x2c0] & 0x0f) | ((color_prom[i + 0x1c0] & 0x03) << 4); | |
| 65 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 64 | 66 | } |
| 65 | color_prom += 256; | |
| 66 | 67 | |
| 67 | /* bg uses colors 0-63 */ | |
| 68 | for (i = 0;i < TOTAL_COLORS(2);i++) | |
| 68 | /* bg uses colors 0x80-0xbf */ | |
| 69 | for (i = 0x240; i < 0x340; i++) | |
| 69 | 70 | { |
| 70 | COLOR(2,i) = (color_prom[256] & 0x0f) + 16 * (color_prom[0] & 0x03) + 0x00; | |
| 71 | color_prom++; | |
| 71 | UINT8 ctabentry = (color_prom[i + 0x3c0] & 0x0f) | ((color_prom[i + 0x2c0] & 0x03) << 4) | 0x80; | |
| 72 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 72 | 73 | } |
| 73 | ||
| 74 | } | |
| 74 | 75 | |
| 75 | /* sprites use colors 128-191 */ | |
| 76 | for (i = 0;i < TOTAL_COLORS(4);i++) | |
| 76 | ||
| 77 | static void set_pens(running_machine *machine) | |
| 78 | { | |
| 79 | int i; | |
| 80 | ||
| 81 | for (i = 0; i < 0x100; i++) | |
| 77 | 82 | { |
| 78 | COLOR(4,i) = (color_prom[256] & 0x0f) + 16 * (color_prom[0] & 0x03) + 0x80; | |
| 79 | color_prom++; | |
| 83 | UINT16 data = paletteram[i] | (paletteram_2[i] << 8); | |
| 84 | rgb_t color = MAKE_RGB(pal4bit(data >> 4), pal4bit(data >> 0), pal4bit(data >> 8)); | |
| 85 | ||
| 86 | colortable_palette_set_color(machine->colortable, i, color); | |
| 80 | 87 | } |
| 81 | color_prom += 256; | |
| 82 | 88 | } |
| 83 | 89 | |
| 90 | ||
| 84 | 91 | /*************************************************************************** |
| 85 | 92 | |
| 86 | 93 | Callbacks for the TileMap code |
| r1679 | r1680 | |
| 135 | 142 | static TILE_GET_INFO( get_tx_tile_info ) |
| 136 | 143 | { |
| 137 | 144 | UINT8 attr = stfight_text_attr_ram[tile_index]; |
| 145 | int color = attr & 0x0f; | |
| 138 | 146 | |
| 147 | tileinfo->group = color; | |
| 148 | ||
| 139 | 149 | SET_TILE_INFO( |
| 140 | 150 | 0, |
| 141 | 151 | stfight_text_char_ram[tile_index] + ((attr & 0x80) << 1), |
| r1679 | r1680 | |
| 152 | 162 | |
| 153 | 163 | VIDEO_START( stfight ) |
| 154 | 164 | { |
| 155 | bg_tilemap = tilemap_create(get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN, 16,16,128,256); | |
| 156 | fg_tilemap = tilemap_create(get_fg_tile_info,fg_scan,TILEMAP_TYPE_PEN,16,16,128,256); | |
| 157 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 158 | TILEMAP_TYPE_COLORTABLE,8,8,32,32); | |
| 165 | bg_tilemap = tilemap_create(get_bg_tile_info,bg_scan, 16,16,128,256); | |
| 166 | fg_tilemap = tilemap_create(get_fg_tile_info,fg_scan,16,16,128,256); | |
| 167 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 159 | 168 | |
| 160 | tilemap_set_transparent_pen(fg_tilemap,0x0F); | |
| 161 | tilemap_set_transparent_pen(tx_tilemap,256); | |
| 169 | tilemap_set_transparent_pen(fg_tilemap,0x0f); | |
| 170 | colortable_configure_tilemap_groups(machine->colortable, tx_tilemap, machine->gfx[0], 0xcf); | |
| 162 | 171 | } |
| 163 | 172 | |
| 164 | 173 | |
| r1679 | r1680 | |
| 285 | 294 | |
| 286 | 295 | VIDEO_UPDATE( stfight ) |
| 287 | 296 | { |
| 297 | set_pens(machine); | |
| 298 | ||
| 288 | 299 | fillbitmap(priority_bitmap,0,cliprect); |
| 289 | 300 | |
| 290 | 301 | fillbitmap(bitmap,machine->pens[0],cliprect); /* in case bg_tilemap is disabled */ |
| r1679 | r1680 | |
|---|---|---|
| 158 | 158 | static void gottlieb_video_start_common(void) |
| 159 | 159 | { |
| 160 | 160 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 161 | | |
| 161 | | |
| 162 | 162 | |
| 163 | 163 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 164 | 164 | } |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | VIDEO_START( ddragon ) |
| 107 | 107 | { |
| 108 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 109 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 108 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, 16,16,32,32); | |
| 109 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 110 | 110 | |
| 111 | 111 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 112 | 112 | tilemap_set_scrolldx(fg_tilemap, 0, 384 - 256); |
| r1679 | r1680 | |
| 120 | 120 | |
| 121 | 121 | VIDEO_START( chinagat ) |
| 122 | 122 | { |
| 123 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan, TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 124 | fg_tilemap = tilemap_create(get_fg_16color_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 123 | bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,16,16,32,32); | |
| 124 | fg_tilemap = tilemap_create(get_fg_16color_tile_info,tilemap_scan_rows,8, 8,32,32); | |
| 125 | 125 | |
| 126 | 126 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 127 | 127 | tilemap_set_scrolldy(fg_tilemap, -8, -8); |
| r1679 | r1680 | |
|---|---|---|
| 503 | 503 | |
| 504 | 504 | VIDEO_START( mrokumei ) |
| 505 | 505 | { |
| 506 | bg_tilemap[0][0] = tilemap_create( mrokumei_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 507 | bg_tilemap[0][1] = tilemap_create( mrokumei_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 508 | bg_tilemap[1][0] = tilemap_create( mrokumei_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 509 | bg_tilemap[1][1] = tilemap_create( mrokumei_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 506 | bg_tilemap[0][0] = tilemap_create( mrokumei_get_info0_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 507 | bg_tilemap[0][1] = tilemap_create( mrokumei_get_info0_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 508 | bg_tilemap[1][0] = tilemap_create( mrokumei_get_info1_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 509 | bg_tilemap[1][1] = tilemap_create( mrokumei_get_info1_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 510 | 510 | |
| 511 | 511 | tilemap_set_transparent_pen(bg_tilemap[0][1],0); |
| 512 | 512 | tilemap_set_transparent_pen(bg_tilemap[1][1],0); |
| r1679 | r1680 | |
| 514 | 514 | |
| 515 | 515 | VIDEO_START( reikaids ) |
| 516 | 516 | { |
| 517 | bg_tilemap[0][0] = tilemap_create( reikaids_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 518 | bg_tilemap[0][1] = tilemap_create( reikaids_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 519 | bg_tilemap[0][2] = tilemap_create( reikaids_get_info0_2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 520 | bg_tilemap[0][3] = tilemap_create( reikaids_get_info0_3, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 521 | bg_tilemap[1][0] = tilemap_create( reikaids_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 522 | bg_tilemap[1][1] = tilemap_create( reikaids_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 523 | bg_tilemap[1][2] = tilemap_create( reikaids_get_info1_2, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 524 | bg_tilemap[1][3] = tilemap_create( reikaids_get_info1_3, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32 ); | |
| 517 | bg_tilemap[0][0] = tilemap_create( reikaids_get_info0_0, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 518 | bg_tilemap[0][1] = tilemap_create( reikaids_get_info0_1, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 519 | bg_tilemap[0][2] = tilemap_create( reikaids_get_info0_2, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 520 | bg_tilemap[0][3] = tilemap_create( reikaids_get_info0_3, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 521 | bg_tilemap[1][0] = tilemap_create( reikaids_get_info1_0, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 522 | bg_tilemap[1][1] = tilemap_create( reikaids_get_info1_1, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 523 | bg_tilemap[1][2] = tilemap_create( reikaids_get_info1_2, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 524 | bg_tilemap[1][3] = tilemap_create( reikaids_get_info1_3, tilemap_scan_rows, 8, 8, 32, 32 ); | |
| 525 | 525 | |
| 526 | 526 | tilemap_set_transparent_pen(bg_tilemap[0][0],0xff); |
| 527 | 527 | tilemap_set_transparent_pen(bg_tilemap[0][1],0xff); |
| r1679 | r1680 | |
| 535 | 535 | |
| 536 | 536 | VIDEO_START( pteacher ) |
| 537 | 537 | { |
| 538 | bg_tilemap[0][0] = tilemap_create( pteacher_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 539 | bg_tilemap[0][1] = tilemap_create( pteacher_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 540 | bg_tilemap[1][0] = tilemap_create( pteacher_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 541 | bg_tilemap[1][1] = tilemap_create( pteacher_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 538 | bg_tilemap[0][0] = tilemap_create( pteacher_get_info0_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 539 | bg_tilemap[0][1] = tilemap_create( pteacher_get_info0_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 540 | bg_tilemap[1][0] = tilemap_create( pteacher_get_info1_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 541 | bg_tilemap[1][1] = tilemap_create( pteacher_get_info1_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 542 | 542 | |
| 543 | 543 | tilemap_set_transparent_pen(bg_tilemap[0][1],0xff); |
| 544 | 544 | tilemap_set_transparent_pen(bg_tilemap[1][1],0xff); |
| r1679 | r1680 | |
| 546 | 546 | |
| 547 | 547 | VIDEO_START( lemnangl ) |
| 548 | 548 | { |
| 549 | bg_tilemap[0][0] = tilemap_create( lemnangl_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 550 | bg_tilemap[0][1] = tilemap_create( lemnangl_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 551 | bg_tilemap[1][0] = tilemap_create( lemnangl_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 552 | bg_tilemap[1][1] = tilemap_create( lemnangl_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 549 | bg_tilemap[0][0] = tilemap_create( lemnangl_get_info0_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 550 | bg_tilemap[0][1] = tilemap_create( lemnangl_get_info0_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 551 | bg_tilemap[1][0] = tilemap_create( lemnangl_get_info1_0, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 552 | bg_tilemap[1][1] = tilemap_create( lemnangl_get_info1_1, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 553 | 553 | |
| 554 | 554 | tilemap_set_transparent_pen(bg_tilemap[0][1],0x0f); |
| 555 | 555 | tilemap_set_transparent_pen(bg_tilemap[1][1],0x0f); |
| r1679 | r1680 | |
|---|---|---|
| 140 | 140 | VIDEO_START( mugsmash ) |
| 141 | 141 | { |
| 142 | 142 | |
| 143 | mugsmash_tilemap1 = tilemap_create(get_mugsmash_tile_info1,tilemap_scan_rows, | |
| 143 | mugsmash_tilemap1 = tilemap_create(get_mugsmash_tile_info1,tilemap_scan_rows, | |
| 144 | 144 | tilemap_set_transparent_pen(mugsmash_tilemap1,0); |
| 145 | 145 | |
| 146 | mugsmash_tilemap2 = tilemap_create(get_mugsmash_tile_info2,tilemap_scan_rows, | |
| 146 | mugsmash_tilemap2 = tilemap_create(get_mugsmash_tile_info2,tilemap_scan_rows, | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | VIDEO_UPDATE( mugsmash ) |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | VIDEO_START( pcktgal ) |
| 57 | 57 | { |
| 58 | 58 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 59 | | |
| 59 | | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 1253 | 1253 | tilemap2Offset = hng64_videoregs[0xc] ; |
| 1254 | 1254 | |
| 1255 | 1255 | tilemap_dispose(hng64_tilemap1) ; |
| 1256 | hng64_tilemap1 = tilemap_create(get_hng64_tile2_info,tilemap_scan_rows, | |
| 1256 | hng64_tilemap1 = tilemap_create(get_hng64_tile2_info,tilemap_scan_rows, | |
| 1257 | 1257 | } |
| 1258 | 1258 | */ |
| 1259 | 1259 | |
| r1679 | r1680 | |
| 1296 | 1296 | |
| 1297 | 1297 | VIDEO_START( hng64 ) |
| 1298 | 1298 | { |
| 1299 | hng64_tilemap0 = tilemap_create(get_hng64_tile0_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1300 | hng64_tilemap1 = tilemap_create(get_hng64_tile1_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1301 | hng64_tilemap2 = tilemap_create(get_hng64_tile2_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1302 | hng64_tilemap3 = tilemap_create(get_hng64_tile3_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1299 | hng64_tilemap0 = tilemap_create(get_hng64_tile0_info, tilemap_scan_rows, 8, 8, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1300 | hng64_tilemap1 = tilemap_create(get_hng64_tile1_info, tilemap_scan_rows, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1301 | hng64_tilemap2 = tilemap_create(get_hng64_tile2_info, tilemap_scan_rows, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1302 | hng64_tilemap3 = tilemap_create(get_hng64_tile3_info, tilemap_scan_rows, 16, 16, 128,128); /* 128x128x4 = 0x10000 */ | |
| 1303 | 1303 | tilemap_set_transparent_pen(hng64_tilemap0,0); |
| 1304 | 1304 | tilemap_set_transparent_pen(hng64_tilemap1,0); |
| 1305 | 1305 | tilemap_set_transparent_pen(hng64_tilemap2,0); |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | VIDEO_START( solomon ) |
| 61 | 61 | { |
| 62 | 62 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 63 | | |
| 63 | | |
| 64 | 64 | |
| 65 | 65 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 66 | | |
| 66 | | |
| 67 | 67 | |
| 68 | 68 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 69 | 69 | } |
| r1679 | r1680 | |
|---|---|---|
| 153 | 153 | memset(spriteram_old,0,spriteram_size); |
| 154 | 154 | memset(spriteram_old2,0,spriteram_size); |
| 155 | 155 | |
| 156 | macrossp_text_tilemap = tilemap_create(get_macrossp_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 157 | macrossp_scra_tilemap = tilemap_create(get_macrossp_scra_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 158 | macrossp_scrb_tilemap = tilemap_create(get_macrossp_scrb_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 159 | macrossp_scrc_tilemap = tilemap_create(get_macrossp_scrc_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 156 | macrossp_text_tilemap = tilemap_create(get_macrossp_text_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 157 | macrossp_scra_tilemap = tilemap_create(get_macrossp_scra_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 158 | macrossp_scrb_tilemap = tilemap_create(get_macrossp_scrb_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 159 | macrossp_scrc_tilemap = tilemap_create(get_macrossp_scrc_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 160 | 160 | |
| 161 | 161 | tilemap_set_transparent_pen(macrossp_text_tilemap,0); |
| 162 | 162 | tilemap_set_transparent_pen(macrossp_scra_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | VIDEO_START( ppking ) |
| 56 | 56 | { |
| 57 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,64); | |
| 58 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,64); | |
| 57 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,8,8,32,64); | |
| 58 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,8,8,32,64); | |
| 59 | 59 | |
| 60 | 60 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 61 | 61 | |
| r1679 | r1680 | |
| 66 | 66 | |
| 67 | 67 | VIDEO_START( gladiatr ) |
| 68 | 68 | { |
| 69 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 70 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 69 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 70 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 71 | 71 | |
| 72 | 72 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 73 | 73 |
| r1679 | r1680 | |
|---|---|---|
| 58 | 58 | |
| 59 | 59 | VIDEO_START( goindol ) |
| 60 | 60 | { |
| 61 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 62 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 61 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 62 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 63 | 63 | |
| 64 | 64 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 65 | 65 | } |
| r1679 | r1680 | |
|---|---|---|
| 76 | 76 | { |
| 77 | 77 | int i; |
| 78 | 78 | |
| 79 | bg18_tilemap = tilemap_create(get_bg18_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 80 | bg19_tilemap = tilemap_create(get_bg19_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 81 | ch1a_tilemap = tilemap_create(get_ch1a_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 79 | bg18_tilemap = tilemap_create(get_bg18_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 80 | bg19_tilemap = tilemap_create(get_bg19_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 81 | ch1a_tilemap = tilemap_create(get_ch1a_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 82 | 82 | |
| 83 | 83 | bankc[0] = bankc[1] = bankc[2] = bankc[3] = 0; |
| 84 | 84 | horshoes_gfxbank = 0; |
| r1679 | r1680 | |
|---|---|---|
| 106 | 106 | |
| 107 | 107 | VIDEO_START( fastlane ) |
| 108 | 108 | { |
| 109 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 110 | layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 109 | layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,32,32); | |
| 110 | layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,32,32); | |
| 111 | 111 | |
| 112 | 112 | tilemap_set_scroll_rows( layer0, 32 ); |
| 113 | 113 |
| r1679 | r1680 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | VIDEO_START( kangaroo ) |
| 26 | 26 | { |
| 27 | videoram = auto_malloc(256 * 256); | |
| 28 | state_save_register_global_pointer(videoram, 256 * 256); | |
| 27 | /* video RAM is accessed 32 bits at a time (two planes, 4bpp each, 4 pixels) */ | |
| 28 | videoram32 = auto_malloc(256 * 64 * 4); | |
| 29 | state_save_register_global_pointer(videoram32, 256 * 64); | |
| 29 | 30 | } |
| 30 | 31 | |
| 31 | 32 | |
| 32 | 33 | |
| 33 | 34 | /************************************* |
| 34 | 35 | * |
| 36 | * Video RAM accesses | |
| 37 | * | |
| 38 | *************************************/ | |
| 39 | ||
| 40 | static void videoram_write(UINT16 offset, UINT8 data, UINT8 mask) | |
| 41 | { | |
| 42 | UINT32 expdata, layermask; | |
| 43 | ||
| 44 | /* data contains 4 2-bit values packed as DCBADCBA; expand these into 4 8-bit values */ | |
| 45 | expdata = 0; | |
| 46 | if (data & 0x01) expdata |= 0x00000055; | |
| 47 | if (data & 0x10) expdata |= 0x000000aa; | |
| 48 | if (data & 0x02) expdata |= 0x00005500; | |
| 49 | if (data & 0x20) expdata |= 0x0000aa00; | |
| 50 | if (data & 0x04) expdata |= 0x00550000; | |
| 51 | if (data & 0x40) expdata |= 0x00aa0000; | |
| 52 | if (data & 0x08) expdata |= 0x55000000; | |
| 53 | if (data & 0x80) expdata |= 0xaa000000; | |
| 54 | ||
| 55 | /* determine which layers are enabled */ | |
| 56 | layermask = 0; | |
| 57 | if (mask & 0x08) layermask |= 0x30303030; | |
| 58 | if (mask & 0x04) layermask |= 0xc0c0c0c0; | |
| 59 | if (mask & 0x02) layermask |= 0x03030303; | |
| 60 | if (mask & 0x01) layermask |= 0x0c0c0c0c; | |
| 61 | ||
| 62 | /* update layers */ | |
| 63 | videoram32[offset] = (videoram32[offset] & ~layermask) | (expdata & layermask); | |
| 64 | } | |
| 65 | ||
| 66 | ||
| 67 | WRITE8_HANDLER( kangaroo_videoram_w ) | |
| 68 | { | |
| 69 | videoram_write(offset, data, kangaroo_video_control[8]); | |
| 70 | } | |
| 71 | ||
| 72 | ||
| 73 | ||
| 74 | /************************************* | |
| 75 | * | |
| 35 | 76 | * Video control writes |
| 36 | 77 | * |
| 37 | 78 | *************************************/ |
| r1679 | r1680 | |
| 62 | 103 | |
| 63 | 104 | static void blitter_execute(void) |
| 64 | 105 | { |
| 65 | int src,dest; | |
| 66 | int x,y,width,height,old_bank_select,new_bank_select; | |
| 106 | UINT32 gfxhalfsize = memory_region_length(REGION_GFX1) / 2; | |
| 107 | const UINT8 *gfxbase = memory_region(REGION_GFX1); | |
| 108 | UINT16 src = kangaroo_video_control[0] + 256 * kangaroo_video_control[1]; | |
| 109 | UINT16 dst = kangaroo_video_control[2] + 256 * kangaroo_video_control[3]; | |
| 110 | UINT8 height = kangaroo_video_control[5]; | |
| 111 | UINT8 width = kangaroo_video_control[4]; | |
| 112 | UINT8 mask = kangaroo_video_control[8]; | |
| 113 | int x, y; | |
| 67 | 114 | |
| 68 | src = kangaroo_video_control[0] + 256 * kangaroo_video_control[1]; | |
| 69 | dest = kangaroo_video_control[2] + 256 * kangaroo_video_control[3]; | |
| 115 | /* during DMA operations, the top 2 bits are ORed together, as well as the bottom 2 bits */ | |
| 116 | /* adjust the mask to account for this */ | |
| 117 | if (mask & 0x0c) mask |= 0x0c; | |
| 118 | if (mask & 0x03) mask |= 0x03; | |
| 70 | 119 | |
| 71 | width = kangaroo_video_control[5]; | |
| 72 | height = kangaroo_video_control[4]; | |
| 73 | ||
| 74 | old_bank_select = new_bank_select = kangaroo_video_control[8]; | |
| 75 | ||
| 76 | if (new_bank_select & 0x0c) new_bank_select |= 0x0c; | |
| 77 | if (new_bank_select & 0x03) new_bank_select |= 0x03; | |
| 78 | ||
| 79 | kangaroo_video_control_w(8, new_bank_select & 0x05); | |
| 80 | ||
| 81 | for (x = 0; x <= width; x++) | |
| 82 | { | |
| 83 | for (y = 0; y <= height; y++) | |
| 84 | program_write_byte(dest + y, program_read_byte(src++)); | |
| 85 | ||
| 86 | dest += 256; | |
| 87 | } | |
| 88 | ||
| 89 | src = kangaroo_video_control[0] + 256 * kangaroo_video_control[1]; | |
| 90 | dest = kangaroo_video_control[2] + 256 * kangaroo_video_control[3]; | |
| 91 | ||
| 92 | kangaroo_video_control_w(8, new_bank_select & 0x0a); | |
| 93 | ||
| 94 | for (x = 0; x <= width; x++) | |
| 95 | { | |
| 96 | for (y = 0; y <= height; y++) | |
| 97 | program_write_byte(dest + y, program_read_byte(src++)); | |
| 98 | ||
| 99 | dest += 256; | |
| 100 | } | |
| 101 | ||
| 102 | kangaroo_video_control_w(8, old_bank_select); | |
| 120 | /* loop over height, then width */ | |
| 121 | for (y = 0; y <= height; y++, dst += 256) | |
| 122 | for (x = 0; x <= width; x++) | |
| 123 | { | |
| 124 | UINT16 effdst = (dst + x) & 0x3fff; | |
| 125 | UINT16 effsrc = src++ & (gfxhalfsize - 1); | |
| 126 | videoram_write(effdst, gfxbase[0*gfxhalfsize + effsrc], mask & 0x05); | |
| 127 | videoram_write(effdst, gfxbase[1*gfxhalfsize + effsrc], mask & 0x0a); | |
| 128 | } | |
| 103 | 129 | } |
| 104 | 130 | |
| 105 | 131 | |
| 106 | 132 | |
| 107 | 133 | /************************************* |
| 108 | 134 | * |
| 109 | * Video RAM writes | |
| 110 | * | |
| 111 | *************************************/ | |
| 112 | ||
| 113 | WRITE8_HANDLER( kangaroo_videoram_w ) | |
| 114 | { | |
| 115 | int sx, sy, offs; | |
| 116 | ||
| 117 | sx = (offset / 256) * 4; | |
| 118 | sy = offset % 256; | |
| 119 | offs = sy * 256 + sx; | |
| 120 | ||
| 121 | /* rearrange the bits to a more convenient pattern (from DCBADCBA to DDCCBBAA) */ | |
| 122 | data = BITSWAP8(data, 7,3,6,2,5,1,4,0); | |
| 123 | ||
| 124 | /* B layer, green & blue bits */ | |
| 125 | if (kangaroo_video_control[8] & 0x08) | |
| 126 | { | |
| 127 | videoram[offs ] = (videoram[offs ] & 0xcf) | (((data >> 0) & 3) << 4); | |
| 128 | videoram[offs+1] = (videoram[offs+1] & 0xcf) | (((data >> 2) & 3) << 4); | |
| 129 | videoram[offs+2] = (videoram[offs+2] & 0xcf) | (((data >> 4) & 3) << 4); | |
| 130 | videoram[offs+3] = (videoram[offs+3] & 0xcf) | (((data >> 6) & 3) << 4); | |
| 131 | } | |
| 132 | ||
| 133 | /* B layer, Z & red bits */ | |
| 134 | if (kangaroo_video_control[8] & 0x04) | |
| 135 | { | |
| 136 | videoram[offs ] = (videoram[offs ] & 0x3f) | (((data >> 0) & 3) << 6); | |
| 137 | videoram[offs+1] = (videoram[offs+1] & 0x3f) | (((data >> 2) & 3) << 6); | |
| 138 | videoram[offs+2] = (videoram[offs+2] & 0x3f) | (((data >> 4) & 3) << 6); | |
| 139 | videoram[offs+3] = (videoram[offs+3] & 0x3f) | (((data >> 6) & 3) << 6); | |
| 140 | } | |
| 141 | ||
| 142 | /* A layer, green & blue bits */ | |
| 143 | if (kangaroo_video_control[8] & 0x02) | |
| 144 | { | |
| 145 | videoram[offs ] = (videoram[offs ] & 0xfc) | (((data >> 0) & 3) << 0); | |
| 146 | videoram[offs+1] = (videoram[offs+1] & 0xfc) | (((data >> 2) & 3) << 0); | |
| 147 | videoram[offs+2] = (videoram[offs+2] & 0xfc) | (((data >> 4) & 3) << 0); | |
| 148 | videoram[offs+3] = (videoram[offs+3] & 0xfc) | (((data >> 6) & 3) << 0); | |
| 149 | } | |
| 150 | ||
| 151 | /* A layer, Z & red bits */ | |
| 152 | if (kangaroo_video_control[8] & 0x01) | |
| 153 | { | |
| 154 | videoram[offs ] = (videoram[offs ] & 0xf3) | (((data >> 0) & 3) << 2); | |
| 155 | videoram[offs+1] = (videoram[offs+1] & 0xf3) | (((data >> 2) & 3) << 2); | |
| 156 | videoram[offs+2] = (videoram[offs+2] & 0xf3) | (((data >> 4) & 3) << 2); | |
| 157 | videoram[offs+3] = (videoram[offs+3] & 0xf3) | (((data >> 6) & 3) << 2); | |
| 158 | } | |
| 159 | } | |
| 160 | ||
| 161 | ||
| 162 | ||
| 163 | /************************************* | |
| 164 | * | |
| 165 | 135 | * Video updater |
| 166 | 136 | * |
| 167 | 137 | *************************************/ |
| r1679 | r1680 | |
| 170 | 140 | { |
| 171 | 141 | UINT8 scrolly = kangaroo_video_control[6]; |
| 172 | 142 | UINT8 scrollx = kangaroo_video_control[7]; |
| 173 | UINT8 maska = kangaroo_video_control[10] >> 3; | |
| 174 | UINT8 maskb = kangaroo_video_control[10] >> 0; | |
| 143 | UINT8 maska = (kangaroo_video_control[10] & 0x28) >> 3; | |
| 144 | UINT8 maskb = (kangaroo_video_control[10] & 0x07) >> 0; | |
| 175 | 145 | UINT8 xora = (kangaroo_video_control[9] & 0x20) ? 0xff : 0x00; |
| 176 | 146 | UINT8 xorb = (kangaroo_video_control[9] & 0x10) ? 0xff : 0x00; |
| 177 | 147 | UINT8 enaa = (kangaroo_video_control[9] & 0x08); |
| r1679 | r1680 | |
| 196 | 166 | UINT8 effya = scrolly + (y ^ xora); |
| 197 | 167 | UINT8 effxb = (x / 2) ^ xorb; |
| 198 | 168 | UINT8 effyb = y ^ xorb; |
| 199 | UINT8 pixa = videoram[effya * 256 + effxa] & 0x0f; | |
| 200 | UINT8 pixb = videoram[effyb * 256 + effxb] >> 4; | |
| 169 | UINT8 pixa = (videoram32[effya + 256 * (effxa / 4)] >> (8 * (effxa % 4) + 0)) & 0x0f; | |
| 170 | UINT8 pixb = (videoram32[effyb + 256 * (effxb / 4)] >> (8 * (effxb % 4) + 4)) & 0x0f; | |
| 201 | 171 | UINT8 finalpens; |
| 202 | 172 | |
| 173 | /* for each layer, contribute bits if (a) enabled, and (b) either has priority or the opposite plane is 0 */ | |
| 203 | 174 | finalpens = 0; |
| 204 | 175 | if (enaa && (pria || pixb == 0)) |
| 205 | 176 | finalpens |= pixa; |
| 206 | 177 | if (enab && (prib || pixa == 0)) |
| 207 | 178 | finalpens |= pixb; |
| 208 | 179 | |
| 180 | /* store the first of two pixels, which is always full brightness */ | |
| 209 | 181 | dest[x + 0] = pens[finalpens & 7]; |
| 210 | 182 | |
| 211 | 183 | /* KOS1 alternates at 5MHz, offset from the pixel clock by 1/2 clock */ |
| r1679 | r1680 | |
| 213 | 185 | finalpens = 0; |
| 214 | 186 | if (enaa && (pria || pixb == 0)) |
| 215 | 187 | { |
| 216 | if (!(pixa & 0x08)) pixa &= | |
| 188 | if (!(pixa & 0x08)) pixa &= | |
| 217 | 189 | finalpens |= pixa; |
| 218 | 190 | } |
| 219 | 191 | if (enab && (prib || pixa == 0)) |
| 220 | 192 | { |
| 221 | if (!(pixb & 0x08)) pixb &= | |
| 193 | if (!(pixb & 0x08)) pixb &= | |
| 222 | 194 | finalpens |= pixb; |
| 223 | 195 | } |
| 224 | 196 | |
| 197 | /* store the second of two pixels, which is affected by KOS1 and the A/B masks */ | |
| 225 | 198 | dest[x + 1] = pens[finalpens & 7]; |
| 226 | 199 | } |
| 227 | 200 | } |
| r1679 | r1680 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | VIDEO_START( cabal ) |
| 44 | 44 | { |
| 45 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,16,16); | |
| 46 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 45 | background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,16,16,16,16); | |
| 46 | text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows, 8,8,32,32); | |
| 47 | 47 | |
| 48 | 48 | tilemap_set_transparent_pen(text_layer,3); |
| 49 | 49 | tilemap_set_transparent_pen(background_layer,15); |
| r1679 | r1680 | |
|---|---|---|
| 98 | 98 | |
| 99 | 99 | VIDEO_START( suprloco ) |
| 100 | 100 | { |
| 101 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 101 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 102 | 102 | |
| 103 | 103 | tilemap_set_scroll_rows(bg_tilemap,32); |
| 104 | 104 | } |
| r1679 | r1680 | |
| 190 | 190 | skip = spr_reg[SPR_SKIP_LO] + (spr_reg[SPR_SKIP_HI] << 8); |
| 191 | 191 | |
| 192 | 192 | height = spr_reg[SPR_Y_BOTTOM] - spr_reg[SPR_Y_TOP]; |
| 193 | spr_palette = machine-> | |
| 193 | spr_palette = machine-> | |
| 194 | 194 | sx = spr_reg[SPR_X]; |
| 195 | 195 | sy = spr_reg[SPR_Y_TOP] + 1; |
| 196 | 196 |
| r1679 | r1680 | |
|---|---|---|
| 250 | 250 | pf_layer_info *layer = &pf_layer[laynum]; |
| 251 | 251 | |
| 252 | 252 | /* allocate two tilemaps per layer, one normal, one wide */ |
| 253 | layer->tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 64,64); | |
| 254 | layer->wide_tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8,8, 128,64); | |
| 253 | layer->tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, 8,8, 64,64); | |
| 254 | layer->wide_tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, 8,8, 128,64); | |
| 255 | 255 | |
| 256 | 256 | /* set the user data for each one to point to the layer */ |
| 257 | 257 | tilemap_set_user_data(layer->tmap, &pf_layer[laynum]); |
| r1679 | r1680 | |
|---|---|---|
| 180 | 180 | |
| 181 | 181 | VIDEO_START( yard ) |
| 182 | 182 | { |
| 183 | bg_tilemap = tilemap_create(yard_get_bg_tile_info, yard_tilemap_scan_rows, | |
| 183 | bg_tilemap = tilemap_create(yard_get_bg_tile_info, yard_tilemap_scan_rows, | |
| 184 | 184 | tilemap_set_scrolldx(bg_tilemap, machine->screen[0].visarea.min_x, machine->screen[0].width - (machine->screen[0].visarea.max_x + 1)); |
| 185 | 185 | tilemap_set_scrolldy(bg_tilemap, machine->screen[0].visarea.min_y - 8, machine->screen[0].height + 16 - (machine->screen[0].visarea.max_y + 1)); |
| 186 | 186 |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | { |
| 61 | 61 | int i; |
| 62 | 62 | |
| 63 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 63 | /* allocate the colortable */ | |
| 64 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 65 | ||
| 66 | /* create a lookup table for the palette */ | |
| 67 | for (i = 0; i < 0x20; i++) | |
| 64 | 68 | { |
| 65 | int bit0, bit1, bit2, r, g, b; | |
| 69 | int bit0, bit1, bit2; | |
| 70 | int r, g, b; | |
| 66 | 71 | |
| 67 | 72 | /* red component */ |
| 68 | bit0 = (*color_prom >> 0) & 0x01; | |
| 69 | bit1 = (*color_prom >> 1) & 0x01; | |
| 70 | bit2 = (*color_prom >> 2) & 0x01; | |
| 73 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 74 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 75 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 71 | 76 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 77 | ||
| 72 | 78 | /* green component */ |
| 73 | bit0 = (*color_prom >> 3) & 0x01; | |
| 74 | bit1 = (*color_prom >> 4) & 0x01; | |
| 75 | bit2 = (*color_prom >> 5) & 0x01; | |
| 79 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 80 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 81 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 76 | 82 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 83 | ||
| 77 | 84 | /* blue component */ |
| 78 | 85 | bit0 = 0; |
| 79 | bit1 = (*color_prom >> 6) & 0x01; | |
| 80 | bit2 = (*color_prom >> 7) & 0x01; | |
| 86 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 87 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 81 | 88 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 82 | 89 | |
| 83 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 84 | color_prom++; | |
| 90 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 85 | 91 | } |
| 86 | 92 | |
| 87 | /* color_prom now points to the beginning of the char lookup table */ | |
| 93 | /* color_prom now points to the beginning of the lookup table */ | |
| 94 | color_prom += 0x20; | |
| 88 | 95 | |
| 89 | /* fg chars */ | |
| 90 | for (i = 0; i < 256; i++) | |
| 91 | colortable[i + 0x000] = 16 + (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 15)] & 15); | |
| 92 | color_prom += 256; | |
| 96 | /* fg chars/sprites */ | |
| 97 | for (i = 0; i < 0x200; i++) | |
| 98 | { | |
| 99 | UINT8 ctabentry = (color_prom[(i & 0x1c0) | ((i & 3) << 4) | ((i >> 2) & 0x0f)] & 0x0f) | 0x10; | |
| 100 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 101 | } | |
| 93 | 102 | |
| 94 | /* color_prom now points to the beginning of the sprite lookup table */ | |
| 95 | ||
| 96 | /* sprites */ | |
| 97 | for (i = 0; i < 256; i++) | |
| 98 | colortable[i + 0x100] = 16 + (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 15)] & 15); | |
| 99 | color_prom += 256; | |
| 100 | ||
| 101 | 103 | /* bg chars (this is not the full story... there are four layers mixed */ |
| 102 | 104 | /* using another PROM */ |
| 103 | for (i = 0; i < 256; i++) | |
| 104 | //colortable[i + 0x200] = 16 + (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 15)] & 15); | |
| 105 | colortable[i + 0x200] = *color_prom++ & 15; | |
| 105 | for (i = 0x200; i < 0x300; i++) | |
| 106 | { | |
| 107 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 108 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 109 | } | |
| 106 | 110 | } |
| 107 | 111 | |
| 108 | 112 | |
| r1679 | r1680 | |
| 115 | 119 | |
| 116 | 120 | VIDEO_START( fcombat ) |
| 117 | 121 | { |
| 118 | bgmap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 122 | bgmap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 119 | 123 | } |
| 120 | 124 | |
| 121 | 125 |
| r1679 | r1680 | |
|---|---|---|
| 88 | 88 | { |
| 89 | 89 | int i; |
| 90 | 90 | |
| 91 | pant[0] = tilemap_create(get_tile_info_thoop2_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 92 | pant[1] = tilemap_create(get_tile_info_thoop2_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 91 | pant[0] = tilemap_create(get_tile_info_thoop2_screen0,tilemap_scan_rows,16,16,32,32); | |
| 92 | pant[1] = tilemap_create(get_tile_info_thoop2_screen1,tilemap_scan_rows,16,16,32,32); | |
| 93 | 93 | |
| 94 | 94 | tilemap_set_transmask(pant[0],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */ |
| 95 | 95 | tilemap_set_transmask(pant[1],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */ |
| r1679 | r1680 | |
|---|---|---|
| 224 | 224 | |
| 225 | 225 | VIDEO_START( wwfwfest ) |
| 226 | 226 | { |
| 227 | fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 228 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 229 | bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 227 | fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 228 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 229 | bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 230 | 230 | |
| 231 | 231 | tilemap_set_transparent_pen(fg0_tilemap,0); |
| 232 | 232 | tilemap_set_transparent_pen(bg1_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | VIDEO_START( marineb ) |
| 51 | 51 | { |
| 52 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 52 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 53 | 53 | |
| 54 | 54 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 55 | 55 | } |
| r1679 | r1680 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | VIDEO_START( timeplt ) |
| 115 | 115 | { |
| 116 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 116 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 |
| r1679 | r1680 | |
|---|---|---|
| 120 | 120 | atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30); |
| 121 | 121 | |
| 122 | 122 | /* initialize the playfield */ |
| 123 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigx2_playfield_scan, | |
| 123 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigx2_playfield_scan, | |
| 124 | 124 | |
| 125 | 125 | /* initialize the motion objects */ |
| 126 | 126 | adjusted_modesc.palettebase = atarigx2_motion_object_base; |
| r1679 | r1680 | |
| 129 | 129 | atarirle_init(0, &adjusted_modesc); |
| 130 | 130 | |
| 131 | 131 | /* initialize the alphanumerics */ |
| 132 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 132 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 133 | 133 | tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0); |
| 134 | 134 | |
| 135 | 135 | /* reset statics */ |
| r1679 | r1680 | |
|---|---|---|
| 97 | 97 | VIDEO_START( fuuki16 ) |
| 98 | 98 | { |
| 99 | 99 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 100 | | |
| 100 | | |
| 101 | 101 | |
| 102 | 102 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 103 | | |
| 103 | | |
| 104 | 104 | |
| 105 | 105 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 106 | | |
| 106 | | |
| 107 | 107 | |
| 108 | 108 | tilemap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 109 | | |
| 109 | | |
| 110 | 110 | |
| 111 | 111 | tilemap_set_transparent_pen(tilemap_0,0x0f); // 4 bits |
| 112 | 112 | tilemap_set_transparent_pen(tilemap_1,0xff); // 8 bits |
| r1679 | r1680 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | VIDEO_START( vulgus ) |
| 119 | 119 | { |
| 120 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 121 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 120 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, 8, 8,32,32); | |
| 121 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,32,32); | |
| 122 | 122 | |
| 123 | 123 | colortable_configure_tilemap_groups(machine->colortable, fg_tilemap, machine->gfx[0], 47); |
| 124 | 124 | } |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | VIDEO_START( sderby ) |
| 97 | 97 | { |
| 98 | sderby_tilemap = tilemap_create(get_sderby_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 99 | sderby_md_tilemap = tilemap_create(get_sderby_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,32,32); | |
| 98 | sderby_tilemap = tilemap_create(get_sderby_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 99 | sderby_md_tilemap = tilemap_create(get_sderby_md_tile_info,tilemap_scan_rows, 16, 16,32,32); | |
| 100 | 100 | |
| 101 | 101 | tilemap_set_transparent_pen(sderby_md_tilemap,0); |
| 102 | 102 | |
| 103 | sderby_fg_tilemap = tilemap_create(get_sderby_fg_tile_info,tilemap_scan_rows, | |
| 103 | sderby_fg_tilemap = tilemap_create(get_sderby_fg_tile_info,tilemap_scan_rows, | |
| 104 | 104 | tilemap_set_transparent_pen(sderby_fg_tilemap,0); |
| 105 | 105 | } |
| 106 | 106 |
| r1679 | r1680 | |
|---|---|---|
| 48 | 48 | VIDEO_START( circus ) |
| 49 | 49 | { |
| 50 | 50 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 51 | | |
| 51 | | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | static void draw_line(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x1, int y1, int x2, int y2, int dotted) |
| r1679 | r1680 | |
| 65 | 65 | skip = 1; |
| 66 | 66 | |
| 67 | 67 | if (x1 == x2) |
| 68 | { | |
| 69 | 68 | for (count = y2; count >= y1; count -= skip) |
| 70 | { | |
| 71 | 69 | *BITMAP_ADDR16(bitmap, count, x1) = machine->pens[1]; |
| 72 | } | |
| 73 | } | |
| 74 | 70 | else |
| 75 | { | |
| 76 | 71 | for (count = x2; count >= x1; count -= skip) |
| 77 | { | |
| 78 | 72 | *BITMAP_ADDR16(bitmap, y1, count) = machine->pens[1]; |
| 79 | } | |
| 80 | } | |
| 81 | 73 | } |
| 82 | 74 | |
| 83 | 75 | static void draw_robot_box (running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x, int y) |
| r1679 | r1680 | |
| 202 | 194 | static void ripcord_draw_skydiver(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| 203 | 195 | { |
| 204 | 196 | const gfx_element *gfx; |
| 205 | const pen_t *pal_ptr; | |
| 206 | 197 | UINT8 *src_lineptr, *src_pixptr; |
| 207 | 198 | UINT16 *dst_lineptr, *dst_lineend; |
| 208 | UINT32 code | |
| 199 | UINT32 code | |
| 209 | 200 | int sx, sy; |
| 210 | 201 | int src_pitch, dst_width, dst_height, dst_pitch, dst_pixoffs, dst_pixend; |
| 211 | 202 | int collision, eax, edx; |
| r1679 | r1680 | |
| 213 | 204 | gfx = machine->gfx[0]; |
| 214 | 205 | |
| 215 | 206 | code = clown_z; |
| 216 | color = 0; | |
| 217 | 207 | |
| 218 | 208 | sx = clown_y; |
| 219 | 209 | sy = clown_x - 1; |
| r1679 | r1680 | |
| 222 | 212 | edx = 1; |
| 223 | 213 | |
| 224 | 214 | gfx = machine->gfx[1]; |
| 225 | pal_ptr = &machine->remapped_colortable[gfx->color_base + color * gfx->color_granularity]; | |
| 226 | 215 | src_lineptr = gfx->gfxdata + code * gfx->char_modulo; |
| 227 | 216 | src_pitch = gfx->line_modulo; |
| 228 | 217 | dst_pitch = bitmap->rowpixels; |
| r1679 | r1680 | |
| 244 | 233 | src_pixptr ++; |
| 245 | 234 | if (eax) |
| 246 | 235 | { |
| 247 | eax = | |
| 236 | eax = machine->pens[eax]; | |
| 248 | 237 | collision |= dst_lineptr[dst_pixoffs]; |
| 249 | 238 | dst_lineptr[dst_pixoffs] = eax; |
| 250 | 239 | } |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "video/s2636.h" |
| 9 | 9 | |
| 10 | ||
| 11 | UINT8 *zac2650_s2636_0_ram; | |
| 10 | 12 | static mame_bitmap *spritebitmap; |
| 11 | 13 | |
| 12 | 14 | static int CollisionBackground; |
| r1679 | r1680 | |
| 29 | 31 | |
| 30 | 32 | READ8_HANDLER( zac_s2636_r ) |
| 31 | 33 | { |
| 32 | if(offset!=0xCB) return s2636_ | |
| 34 | if(offset!=0xCB) return zac2650_s2636_0_ram[offset]; | |
| 33 | 35 | else return CollisionSprite; |
| 34 | 36 | } |
| 35 | 37 | |
| r1679 | r1680 | |
| 47 | 49 | int Checksum=0; |
| 48 | 50 | int x,y; |
| 49 | 51 | |
| 50 | if((s2636_ | |
| 52 | if((zac2650_s2636_0_ram[first * 0x10 + 10] < 0xf0) && (zac2650_s2636_0_ram[second * 0x10 + 10] < 0xf0)) | |
| 51 | 53 | { |
| 52 | int fx = (s2636_1_ram[first * 0x10 + 10] * 4)-22; | |
| 53 | int fy = (s2636_1_ram[first * 0x10 + 12] * 3)+3; | |
| 54 | int fx = (zac2650_s2636_0_ram[first * 0x10 + 10] * 4)-22; | |
| 55 | int fy = (zac2650_s2636_0_ram[first * 0x10 + 12] * 3)+3; | |
| 54 | 56 | int expand = (first==1) ? 2 : 1; |
| 55 | 57 | |
| 56 | 58 | /* Draw first sprite */ |
| r1679 | r1680 | |
| 86 | 88 | second * 2, |
| 87 | 89 | 1, |
| 88 | 90 | 0,0, |
| 89 | (s2636_ | |
| 91 | (zac2650_s2636_0_ram[second * 0x10 + 10] * 4)-22,(zac2650_s2636_0_ram[second * 0x10 + 12] * 3) + 3, | |
| 90 | 92 | 0, TRANSPARENCY_PEN, 0); |
| 91 | 93 | |
| 92 | 94 | /* Remove fingerprint */ |
| r1679 | r1680 | |
| 130 | 132 | VIDEO_START( tinvader ) |
| 131 | 133 | { |
| 132 | 134 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 133 | | |
| 135 | | |
| 134 | 136 | |
| 135 | 137 | spritebitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 136 | 138 | tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| r1679 | r1680 | |
| 158 | 160 | |
| 159 | 161 | for(offs=0;offs<0x50;offs+=0x10) |
| 160 | 162 | { |
| 161 | if((s2636_ | |
| 163 | if((zac2650_s2636_0_ram[offs+10]<0xF0) && (offs!=0x30)) | |
| 162 | 164 | { |
| 163 | 165 | int spriteno = (offs / 8); |
| 164 | int expand = ((s2636_1_ram[0xc0] & (spriteno*2))!=0) ? 2 : 1; | |
| 165 | int bx = (s2636_1_ram[offs+10] * 4) - 22; | |
| 166 | int by = (s2636_1_ram[offs+12] * 3) + 3; | |
| 166 | int expand = ((zac2650_s2636_0_ram[0xc0] & (spriteno*2))!=0) ? 2 : 1; | |
| 167 | int bx = (zac2650_s2636_0_ram[offs+10] * 4) - 22; | |
| 168 | int by = (zac2650_s2636_0_ram[offs+12] * 3) + 3; | |
| 167 | 169 | int x,y; |
| 168 | 170 | |
| 169 | 171 | /* 16x8 version */ |
| 170 | decodechar(machine->gfx[1],spriteno,s2636_ | |
| 172 | decodechar(machine->gfx[1],spriteno,zac2650_s2636_0_ram); | |
| 171 | 173 | |
| 172 | 174 | /* 16x16 version */ |
| 173 | decodechar(machine->gfx[2],spriteno,s2636_ | |
| 175 | decodechar(machine->gfx[2],spriteno,zac2650_s2636_0_ram); | |
| 174 | 176 | |
| 175 | 177 | /* Sprite->Background collision detection */ |
| 176 | 178 | drawgfx(bitmap,machine->gfx[expand], |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | VIDEO_START( vastar ) |
| 74 | 74 | { |
| 75 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 76 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 77 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 75 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,8,8,32,32); | |
| 76 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 77 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 78 | 78 | |
| 79 | 79 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 80 | 80 | tilemap_set_transparent_pen(bg1_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 191 | 191 | |
| 192 | 192 | VIDEO_START(taotaido) |
| 193 | 193 | { |
| 194 | bg_tilemap = tilemap_create(taotaido_bg_tile_info,taotaido_tilemap_scan_rows, | |
| 194 | bg_tilemap = tilemap_create(taotaido_bg_tile_info,taotaido_tilemap_scan_rows, | |
| 195 | 195 | |
| 196 | 196 | taotaido_spriteram_old = auto_malloc(0x2000); |
| 197 | 197 | taotaido_spriteram_older = auto_malloc(0x2000); |
| r1679 | r1680 | |
|---|---|---|
| 86 | 86 | atarigen_blend_gfx(machine, 1, 2, 0x0f, 0x10); |
| 87 | 87 | |
| 88 | 88 | /* initialize the playfield */ |
| 89 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 89 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, | |
| 90 | 90 | |
| 91 | 91 | /* initialize the second playfield */ |
| 92 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 92 | atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, | |
| 93 | 93 | tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0); |
| 94 | 94 | |
| 95 | 95 | /* initialize the motion objects */ |
| r1679 | r1680 | |
|---|---|---|
| 567 | 567 | f3_game_config=pCFG; |
| 568 | 568 | |
| 569 | 569 | if (f3_game_config->extend) { |
| 570 | pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 571 | pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 572 | pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 573 | pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 570 | pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,16,16,64,32); | |
| 571 | pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,16,16,64,32); | |
| 572 | pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,16,16,64,32); | |
| 573 | pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,16,16,64,32); | |
| 574 | 574 | |
| 575 | 575 | f3_pf_data_1=f3_pf_data+0x0000; |
| 576 | 576 | f3_pf_data_2=f3_pf_data+0x0800; |
| r1679 | r1680 | |
| 582 | 582 | twidth_mask_bit=6; |
| 583 | 583 | |
| 584 | 584 | } else { |
| 585 | pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 586 | pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 587 | pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 588 | pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 585 | pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,16,16,32,32); | |
| 586 | pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,16,16,32,32); | |
| 587 | pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,16,16,32,32); | |
| 588 | pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,16,16,32,32); | |
| 589 | 589 | |
| 590 | 590 | f3_pf_data_1=f3_pf_data+0x0000; |
| 591 | 591 | f3_pf_data_2=f3_pf_data+0x0400; |
| r1679 | r1680 | |
| 600 | 600 | spriteram32_buffered = (UINT32 *)auto_malloc(0x10000); |
| 601 | 601 | spritelist = auto_malloc(0x400 * sizeof(*spritelist)); |
| 602 | 602 | sprite_end = spritelist; |
| 603 | vram_layer = tilemap_create(get_tile_info_vram,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 604 | pixel_layer = tilemap_create(get_tile_info_pixel,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 603 | vram_layer = tilemap_create(get_tile_info_vram,tilemap_scan_rows,8,8,64,64); | |
| 604 | pixel_layer = tilemap_create(get_tile_info_pixel,tilemap_scan_cols,8,8,64,32); | |
| 605 | 605 | pivot_dirty = (UINT8 *)auto_malloc(2048); |
| 606 | 606 | pf_line_inf = auto_malloc(5 * sizeof(struct f3_playfield_line_inf)); |
| 607 | 607 | sa_line_inf = auto_malloc(1 * sizeof(struct f3_spritealpha_line_inf)); |
| r1679 | r1680 | |
| 1364 | 1364 | UINT32 orient, |
| 1365 | 1365 | int skip_layer_num) |
| 1366 | 1366 | { |
| 1367 | const pen_t *clut = &machine-> | |
| 1367 | const pen_t *clut = &machine-> | |
| 1368 | 1368 | UINT32 bgcolor=clut[0]; |
| 1369 | 1369 | int length; |
| 1370 | 1370 | |
| r1679 | r1680 | |
| 2668 | 2668 | |
| 2669 | 2669 | if( gfx ) |
| 2670 | 2670 | { |
| 2671 | const pen_t *pal = &Machine-> | |
| 2671 | const pen_t *pal = &Machine-> | |
| 2672 | 2672 | int source_base = (code % gfx->total_elements) * 16; |
| 2673 | 2673 | |
| 2674 | 2674 | { |
| r1679 | r1680 | |
| 2832 | 2832 | |
| 2833 | 2833 | if( gfx ) |
| 2834 | 2834 | { |
| 2835 | const pen_t *pal = &Machine-> | |
| 2835 | const pen_t *pal = &Machine-> | |
| 2836 | 2836 | int source_base = (code % gfx->total_elements) * 16; |
| 2837 | 2837 | |
| 2838 | 2838 | { |
| r1679 | r1680 | |
|---|---|---|
| 268 | 268 | gaelco2_videoram = spriteram16; |
| 269 | 269 | |
| 270 | 270 | /* create tilemaps */ |
| 271 | pant[0] = tilemap_create(get_tile_info_gaelco2_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 272 | pant[1] = tilemap_create(get_tile_info_gaelco2_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 271 | pant[0] = tilemap_create(get_tile_info_gaelco2_screen0,tilemap_scan_rows,16,16,64,32); | |
| 272 | pant[1] = tilemap_create(get_tile_info_gaelco2_screen1,tilemap_scan_rows,16,16,64,32); | |
| 273 | 273 | |
| 274 | 274 | /* set tilemap properties */ |
| 275 | 275 | tilemap_set_transparent_pen(pant[0],0); |
| r1679 | r1680 | |
| 288 | 288 | gaelco2_videoram = spriteram16; |
| 289 | 289 | |
| 290 | 290 | /* create tilemaps */ |
| 291 | pant[0] = tilemap_create(get_tile_info_gaelco2_screen0_dual,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 292 | pant[1] = tilemap_create(get_tile_info_gaelco2_screen1_dual,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 291 | pant[0] = tilemap_create(get_tile_info_gaelco2_screen0_dual,tilemap_scan_rows,16,16,64,32); | |
| 292 | pant[1] = tilemap_create(get_tile_info_gaelco2_screen1_dual,tilemap_scan_rows,16,16,64,32); | |
| 293 | 293 | |
| 294 | 294 | /* set tilemap properties */ |
| 295 | 295 | tilemap_set_transparent_pen(pant[0],0); |
| r1679 | r1680 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | VIDEO_START(homerun) |
| 65 | 65 | { |
| 66 | homerun_tilemap = tilemap_create(get_homerun_tile_info,tilemap_scan_rows, | |
| 66 | homerun_tilemap = tilemap_create(get_homerun_tile_info,tilemap_scan_rows, | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| r1679 | r1680 | |
|---|---|---|
| 134 | 134 | |
| 135 | 135 | VIDEO_START( champbas ) |
| 136 | 136 | { |
| 137 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 137 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | VIDEO_START( baraduke ) |
| 121 | 121 | { |
| 122 | tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 123 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 124 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 122 | tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,8,8,36,28); | |
| 123 | bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,64,32); | |
| 124 | bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,64,32); | |
| 125 | 125 | |
| 126 | 126 | tilemap_set_transparent_pen(tx_tilemap,3); |
| 127 | 127 | tilemap_set_transparent_pen(bg_tilemap[0],7); |
| r1679 | r1680 | |
|---|---|---|
| 132 | 132 | VIDEO_START( ssozumo ) |
| 133 | 133 | { |
| 134 | 134 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x, |
| 135 | | |
| 135 | | |
| 136 | 136 | |
| 137 | 137 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_x, |
| 138 | | |
| 138 | | |
| 139 | 139 | |
| 140 | 140 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 141 | 141 | } |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | switch (mcr_cpu_board) |
| 100 | 100 | { |
| 101 | 101 | case 90009: |
| 102 | bg_tilemap = tilemap_create(mcr_90009_get_tile_info, tilemap_scan_rows, | |
| 102 | bg_tilemap = tilemap_create(mcr_90009_get_tile_info, tilemap_scan_rows, | |
| 103 | 103 | break; |
| 104 | 104 | |
| 105 | 105 | case 90010: |
| 106 | bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, | |
| 106 | bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, | |
| 107 | 107 | break; |
| 108 | 108 | |
| 109 | 109 | case 91475: |
| 110 | bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, | |
| 110 | bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, | |
| 111 | 111 | break; |
| 112 | 112 | |
| 113 | 113 | case 91490: |
| 114 | bg_tilemap = tilemap_create(mcr_91490_get_tile_info, tilemap_scan_rows, | |
| 114 | bg_tilemap = tilemap_create(mcr_91490_get_tile_info, tilemap_scan_rows, | |
| 115 | 115 | break; |
| 116 | 116 | |
| 117 | 117 | default: |
| r1679 | r1680 | |
|---|---|---|
| 133 | 133 | pf_layer_info *layer = &pf_layer[laynum]; |
| 134 | 134 | |
| 135 | 135 | /* allocate a tilemaps per layer */ |
| 136 | layer->tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, | |
| 136 | layer->tmap = tilemap_create(get_pf_tile_info, tilemap_scan_rows, | |
| 137 | 137 | |
| 138 | 138 | /* set the user data to point to the layer */ |
| 139 | 139 | tilemap_set_user_data(layer->tmap, &pf_layer[laynum]); |
| r1679 | r1680 | |
|---|---|---|
| 83 | 83 | VIDEO_START( arkanoid ) |
| 84 | 84 | { |
| 85 | 85 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 86 | | |
| 86 | | |
| 87 | 87 | |
| 88 | 88 | state_save_register_global(gfxbank); |
| 89 | 89 | state_save_register_global(palettebank); |
| r1679 | r1680 | |
|---|---|---|
| 420 | 420 | VIDEO_START( twin16 ) |
| 421 | 421 | { |
| 422 | 422 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows_flip_y, |
| 423 | | |
| 423 | | |
| 424 | 424 | |
| 425 | 425 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 426 | 426 | } |
| r1679 | r1680 | |
| 428 | 428 | VIDEO_START( fround ) |
| 429 | 429 | { |
| 430 | 430 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 431 | | |
| 431 | | |
| 432 | 432 | |
| 433 | 433 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 434 | 434 | } |
| r1679 | r1680 | |
|---|---|---|
| 386 | 386 | { |
| 387 | 387 | /* 16x16 tilemaps */ |
| 388 | 388 | megasys1_tilemap[layer][0][0] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16, |
| 389 | | |
| 389 | | |
| 390 | 390 | megasys1_tilemap[layer][0][1] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16, |
| 391 | | |
| 391 | | |
| 392 | 392 | megasys1_tilemap[layer][0][2] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16, |
| 393 | | |
| 393 | | |
| 394 | 394 | megasys1_tilemap[layer][0][3] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16, |
| 395 | | |
| 395 | | |
| 396 | 396 | |
| 397 | 397 | /* 8x8 tilemaps */ |
| 398 | 398 | megasys1_tilemap[layer][1][0] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8, |
| 399 | | |
| 399 | | |
| 400 | 400 | megasys1_tilemap[layer][1][1] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8, |
| 401 | | |
| 401 | | |
| 402 | 402 | megasys1_tilemap[layer][1][2] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8, |
| 403 | | |
| 403 | | |
| 404 | 404 | megasys1_tilemap[layer][1][3] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8, |
| 405 | | |
| 405 | | |
| 406 | 406 | |
| 407 | 407 | /* set user data and transparency */ |
| 408 | 408 | for (i = 0; i < 8; i++) |
| r1679 | r1680 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | VIDEO_START( crshrace ) |
| 43 | 43 | { |
| 44 | tilemap1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 45 | tilemap2 = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 44 | tilemap1 = tilemap_create(get_tile_info1,tilemap_scan_rows,16,16,64,64); | |
| 45 | tilemap2 = tilemap_create(get_tile_info2,tilemap_scan_rows, 8, 8,64,64); | |
| 46 | 46 | |
| 47 | 47 | K053936_wraparound_enable(0, 1); |
| 48 | 48 | K053936_set_offset(0, -48, -21); |
| r1679 | r1680 | |
|---|---|---|
| 116 | 116 | VIDEO_START( airbustr ) |
| 117 | 117 | { |
| 118 | 118 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 119 | | |
| 119 | | |
| 120 | 120 | |
| 121 | 121 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 122 | | |
| 122 | | |
| 123 | 123 | |
| 124 | 124 | sprites_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); |
| 125 | 125 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 191 | 191 | /* one pixel to the left to get a more correct placement */ |
| 192 | 192 | xoffsethack = 1; |
| 193 | 193 | |
| 194 | bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, | |
| 194 | bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, | |
| 195 | 195 | |
| 196 | 196 | tilemap_set_scrolldx( bg_tilemap, 0, 384 - 288 ); |
| 197 | 197 | tilemap_set_scrolldy( bg_tilemap, 0, 264 - 224 ); |
| r1679 | r1680 | |
| 313 | 313 | |
| 314 | 314 | xoffsethack = 0; |
| 315 | 315 | |
| 316 | bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, | |
| 316 | bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, | |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | WRITE8_HANDLER( pengo_palettebank_w ) |
| r1679 | r1680 | |
| 389 | 389 | |
| 390 | 390 | xoffsethack = 1; |
| 391 | 391 | |
| 392 | bg_tilemap = tilemap_create( s2650_get_tile_info,tilemap_scan_rows, | |
| 392 | bg_tilemap = tilemap_create( s2650_get_tile_info,tilemap_scan_rows, | |
| 393 | 393 | |
| 394 | 394 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 395 | 395 | } |
| r1679 | r1680 | |
| 562 | 562 | |
| 563 | 563 | xoffsethack = 1; |
| 564 | 564 | |
| 565 | bg_tilemap = tilemap_create( jrpacman_get_tile_info,jrpacman_scan_rows, | |
| 565 | bg_tilemap = tilemap_create( jrpacman_get_tile_info,jrpacman_scan_rows, | |
| 566 | 566 | |
| 567 | 567 | tilemap_set_transparent_pen( bg_tilemap, 0 ); |
| 568 | 568 | tilemap_set_scroll_cols( bg_tilemap, 36 ); |
| r1679 | r1680 | |
|---|---|---|
| 217 | 217 | VIDEO_START( firebatl ) |
| 218 | 218 | { |
| 219 | 219 | /* These 2 use the graphics and scroll value */ |
| 220 | tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10); | |
| 221 | tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10); | |
| 220 | tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,16,16,0x20,0x10); | |
| 221 | tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,16,16,0x20,0x10); | |
| 222 | 222 | /* Text (No scrolling) */ |
| 223 | tilemap_1 = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra, | |
| 223 | tilemap_1 = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra, | |
| 224 | 224 | |
| 225 | 225 | tilemap_set_scroll_rows( tilemap_0a, 1); |
| 226 | 226 | tilemap_set_scroll_rows( tilemap_0b, 1); |
| r1679 | r1680 | |
| 240 | 240 | VIDEO_START( clshroad ) |
| 241 | 241 | { |
| 242 | 242 | /* These 2 use the graphics and scroll value */ |
| 243 | tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10); | |
| 244 | tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10); | |
| 243 | tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,16,16,0x20,0x10); | |
| 244 | tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,16,16,0x20,0x10); | |
| 245 | 245 | /* Text (No scrolling) */ |
| 246 | tilemap_1 = tilemap_create(get_tile_info_1,tilemap_scan_rows_extra, | |
| 246 | tilemap_1 = tilemap_create(get_tile_info_1,tilemap_scan_rows_extra, | |
| 247 | 247 | |
| 248 | 248 | tilemap_set_scroll_rows( tilemap_0a, 1); |
| 249 | 249 | tilemap_set_scroll_rows( tilemap_0b, 1); |
| r1679 | r1680 | |
|---|---|---|
| 81 | 81 | time = video_screen_get_time_until_pos(0, effscan, 0); |
| 82 | 82 | if (attotime_compare(time, video_screen_get_scan_period(0)) < 0) |
| 83 | 83 | time = attotime_add(time, video_screen_get_frame_period(0)); |
| 84 | timer_adjust(blitter_timer, time, 0 | |
| 84 | timer_adjust_oneshot(blitter_timer, time, 0 | |
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 |
| r1679 | r1680 | |
|---|---|---|
| 197 | 197 | UINT32 *dwptr; |
| 198 | 198 | int i; |
| 199 | 199 | |
| 200 | charmap = tilemap_create(get_charinfo,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 201 | fgmap = tilemap_create(get_fgtileinfo,bwing_scan_cols,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 202 | bgmap = tilemap_create(get_bgtileinfo,bwing_scan_cols,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 200 | charmap = tilemap_create(get_charinfo,tilemap_scan_cols, 8, 8,32,32); | |
| 201 | fgmap = tilemap_create(get_fgtileinfo,bwing_scan_cols,16,16,64,64); | |
| 202 | bgmap = tilemap_create(get_bgtileinfo,bwing_scan_cols,16,16,64,64); | |
| 203 | 203 | srxlat = auto_malloc(0x8000); |
| 204 | 204 | |
| 205 | 205 | scrollmap[0] = fgmap; |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | VIDEO_START( sf ) |
| 62 | 62 | { |
| 63 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16,16,2048,16); | |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,2048,16); | |
| 65 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 64,32); | |
| 63 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 16,16,2048,16); | |
| 64 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,2048,16); | |
| 65 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8, 64,32); | |
| 66 | 66 | |
| 67 | 67 | tilemap_set_transparent_pen(fg_tilemap,15); |
| 68 | 68 | tilemap_set_transparent_pen(tx_tilemap,3); |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | VIDEO_START( sengokmj ) |
| 107 | 107 | { |
| 108 | bg_tilemap = tilemap_create(sengoku_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,16); | |
| 109 | md_tilemap = tilemap_create(sengoku_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 110 | fg_tilemap = tilemap_create(sengoku_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 111 | tx_tilemap = tilemap_create(sengoku_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 108 | bg_tilemap = tilemap_create(sengoku_bg_tile_info,tilemap_scan_rows, 16,16,32,16); | |
| 109 | md_tilemap = tilemap_create(sengoku_md_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 110 | fg_tilemap = tilemap_create(sengoku_fg_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 111 | tx_tilemap = tilemap_create(sengoku_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 112 | 112 | |
| 113 | 113 | tilemap_set_transparent_pen(md_tilemap,15); |
| 114 | 114 | tilemap_set_transparent_pen(fg_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 410 | 410 | { |
| 411 | 411 | case 4: |
| 412 | 412 | tilemap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 413 | | |
| 413 | | |
| 414 | 414 | tilemap_set_transparent_pen(tilemap_3, 0); |
| 415 | 415 | tilemap_set_scroll_rows(tilemap_3, 1); |
| 416 | 416 | tilemap_set_scroll_cols(tilemap_3, 1); |
| 417 | 417 | |
| 418 | 418 | case 3: |
| 419 | 419 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 420 | | |
| 420 | | |
| 421 | 421 | tilemap_set_transparent_pen(tilemap_2, 0); |
| 422 | 422 | tilemap_set_scroll_rows(tilemap_2, 1); |
| 423 | 423 | tilemap_set_scroll_cols(tilemap_2, 1); |
| 424 | 424 | |
| 425 | 425 | case 2: |
| 426 | 426 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 427 | | |
| 427 | | |
| 428 | 428 | tilemap_set_transparent_pen(tilemap_1, 0); |
| 429 | 429 | tilemap_set_scroll_rows(tilemap_1, 1); |
| 430 | 430 | tilemap_set_scroll_cols(tilemap_1, 1); |
| 431 | 431 | |
| 432 | 432 | case 1: |
| 433 | 433 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 434 | | |
| 434 | | |
| 435 | 435 | tilemap_set_transparent_pen(tilemap_0, 0); |
| 436 | 436 | tilemap_set_scroll_rows(tilemap_0, 1); |
| 437 | 437 | tilemap_set_scroll_cols(tilemap_0, 1); |
| r1679 | r1680 | |
| 479 | 479 | |
| 480 | 480 | /* Layer 2 (8x8) needs to be handled differently */ |
| 481 | 481 | tilemap_2 = tilemap_create( sailormn_get_tile_info_2, tilemap_scan_rows, |
| 482 | | |
| 482 | | |
| 483 | 483 | tilemap_set_transparent_pen(tilemap_2, 0); |
| 484 | 484 | tilemap_set_scroll_rows(tilemap_2, 1); |
| 485 | 485 | tilemap_set_scroll_cols(tilemap_2, 1); |
| r1679 | r1680 | |
|---|---|---|
| 630 | 630 | |
| 631 | 631 | /* Create tilemaps */ |
| 632 | 632 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 633 | | |
| 633 | | |
| 634 | 634 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 635 | | |
| 635 | | |
| 636 | 636 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 637 | | |
| 637 | | |
| 638 | 638 | |
| 639 | 639 | /* Configure tilemap transparency */ |
| 640 | 640 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
| 662 | 662 | |
| 663 | 663 | /* Create tilemaps */ |
| 664 | 664 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 665 | | |
| 665 | | |
| 666 | 666 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 667 | | |
| 667 | | |
| 668 | 668 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 669 | | |
| 669 | | |
| 670 | 670 | |
| 671 | 671 | /* Configure tilemap transparency */ |
| 672 | 672 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
| 693 | 693 | |
| 694 | 694 | /* Create tilemaps */ |
| 695 | 695 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 696 | | |
| 696 | | |
| 697 | 697 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 698 | | |
| 698 | | |
| 699 | 699 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 700 | | |
| 700 | | |
| 701 | 701 | |
| 702 | 702 | /* Configure tilemap transparency */ |
| 703 | 703 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
| 724 | 724 | |
| 725 | 725 | /* Create tilemaps */ |
| 726 | 726 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 727 | | |
| 727 | | |
| 728 | 728 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 729 | | |
| 729 | | |
| 730 | 730 | fg2_tilemap = tilemap_create(get_fg2_tile_info, tilemap_scan_cols, |
| 731 | | |
| 731 | | |
| 732 | 732 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 733 | | |
| 733 | | |
| 734 | 734 | |
| 735 | 735 | /* Configure tilemap transparency */ |
| 736 | 736 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
| 756 | 756 | |
| 757 | 757 | /* Create tilemaps */ |
| 758 | 758 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 759 | | |
| 759 | | |
| 760 | 760 | fg_tilemap = tilemap_create(flytiger_get_fg_tile_info, tilemap_scan_cols, |
| 761 | | |
| 761 | | |
| 762 | 762 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 763 | | |
| 763 | | |
| 764 | 764 | |
| 765 | 765 | /* Configure tilemap transparency */ |
| 766 | 766 | tilemap_set_transparent_pen(bg_tilemap, 15); |
| r1679 | r1680 | |
| 789 | 789 | |
| 790 | 790 | /* Create tilemaps */ |
| 791 | 791 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 792 | | |
| 792 | | |
| 793 | 793 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 794 | | |
| 794 | | |
| 795 | 795 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, |
| 796 | | |
| 796 | | |
| 797 | 797 | |
| 798 | 798 | /* Configure tilemap transparency */ |
| 799 | 799 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| r1679 | r1680 | |
| 823 | 823 | |
| 824 | 824 | /* Create tilemaps */ |
| 825 | 825 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 826 | | |
| 826 | | |
| 827 | 827 | bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_cols, |
| 828 | | |
| 828 | | |
| 829 | 829 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, |
| 830 | | |
| 830 | | |
| 831 | 831 | fg2_tilemap = tilemap_create(get_fg2_tile_info, tilemap_scan_cols, |
| 832 | | |
| 832 | | |
| 833 | 833 | |
| 834 | 834 | /* Configure tilemap transparency */ |
| 835 | 835 | tilemap_set_transparent_pen(bg2_tilemap, 15); |
| r1679 | r1680 | |
| 852 | 852 | |
| 853 | 853 | /* Create tilemaps */ |
| 854 | 854 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, |
| 855 | | |
| 855 | | |
| 856 | 856 | bg2_tilemap = fg_tilemap = fg2_tilemap = NULL; /* Stop scroll handler from crashing on these */ |
| 857 | 857 | |
| 858 | 858 | /* Register for save/restore */ |
| r1679 | r1680 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | VIDEO_START( brkthru ) |
| 119 | 119 | { |
| 120 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 121 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 120 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 121 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,32,16); | |
| 122 | 122 | |
| 123 | 123 | tilemap_set_transparent_pen( fg_tilemap, 0 ); |
| 124 | 124 | tilemap_set_transparent_pen( bg_tilemap, 0 ); |
| r1679 | r1680 | |
|---|---|---|
| 207 | 207 | state_save_register_global_pointer(paletteram, 0x400 * 2); |
| 208 | 208 | |
| 209 | 209 | /* create the tilemap */ |
| 210 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_cols, | |
| 210 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_cols, | |
| 211 | 211 | tilemap_set_scrolldx(bg_tilemap, 2, 0); |
| 212 | 212 | |
| 213 | 213 | state_save_register(); |
| r1679 | r1680 | |
|---|---|---|
| 511 | 511 | |
| 512 | 512 | VIDEO_START( cobracom ) |
| 513 | 513 | { |
| 514 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,0,16,16,32,32); | |
| 515 | dec8_pf1_tilemap = tilemap_create(get_bac1_tile_info,bac0_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 516 | dec8_fix_tilemap = tilemap_create(get_cobracom_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 514 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,16,16,32,32); | |
| 515 | dec8_pf1_tilemap = tilemap_create(get_bac1_tile_info,bac0_scan_rows,16,16,32,32); | |
| 516 | dec8_fix_tilemap = tilemap_create(get_cobracom_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 517 | 517 | |
| 518 | 518 | tilemap_set_transparent_pen(dec8_pf1_tilemap,0); |
| 519 | 519 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| r1679 | r1680 | |
| 559 | 559 | |
| 560 | 560 | VIDEO_START( ghostb ) |
| 561 | 561 | { |
| 562 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,0,16,16,32,32); | |
| 563 | dec8_fix_tilemap = tilemap_create(get_ghostb_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 562 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,16,16,32,32); | |
| 563 | dec8_fix_tilemap = tilemap_create(get_ghostb_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 564 | 564 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 565 | 565 | |
| 566 | 566 | game_uses_priority=0; |
| r1679 | r1680 | |
| 599 | 599 | |
| 600 | 600 | VIDEO_START( oscar ) |
| 601 | 601 | { |
| 602 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 603 | dec8_fix_tilemap = tilemap_create(get_oscar_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 602 | dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,16,16,32,32); | |
| 603 | dec8_fix_tilemap = tilemap_create(get_oscar_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 604 | 604 | |
| 605 | 605 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 606 | 606 | tilemap_set_transmask(dec8_pf0_tilemap,0,0x00ff,0xff00); /* Bottom 8 pens */ |
| r1679 | r1680 | |
| 672 | 672 | |
| 673 | 673 | VIDEO_START( lastmiss ) |
| 674 | 674 | { |
| 675 | dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,0,16,16,32,32); | |
| 676 | dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 675 | dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,16,16,32,32); | |
| 676 | dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 677 | 677 | |
| 678 | 678 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 679 | 679 | game_uses_priority=0; |
| r1679 | r1680 | |
| 681 | 681 | |
| 682 | 682 | VIDEO_START( shackled ) |
| 683 | 683 | { |
| 684 | dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 685 | dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 684 | dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,16,16,32,32); | |
| 685 | dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 686 | 686 | |
| 687 | 687 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 688 | 688 | tilemap_set_transmask(dec8_pf0_tilemap,0,0x000f,0xfff0); /* Bottom 12 pens */ |
| r1679 | r1680 | |
| 737 | 737 | |
| 738 | 738 | VIDEO_START( srdarwin ) |
| 739 | 739 | { |
| 740 | dec8_pf0_tilemap = tilemap_create(get_srdarwin_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,16); | |
| 741 | dec8_fix_tilemap = tilemap_create(get_srdarwin_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 740 | dec8_pf0_tilemap = tilemap_create(get_srdarwin_tile_info,tilemap_scan_rows,16,16,32,16); | |
| 741 | dec8_fix_tilemap = tilemap_create(get_srdarwin_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 742 | 742 | |
| 743 | 743 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 744 | 744 | tilemap_set_transmask(dec8_pf0_tilemap,0,0xffff,0x0000); //* draw as background only |
| r1679 | r1680 | |
| 804 | 804 | |
| 805 | 805 | VIDEO_START( gondo ) |
| 806 | 806 | { |
| 807 | dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 808 | dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 807 | dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 808 | dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 809 | 809 | |
| 810 | 810 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 811 | 811 | tilemap_set_transmask(dec8_pf0_tilemap,0,0x00ff,0xff00); /* Bottom 8 pens */ |
| r1679 | r1680 | |
| 814 | 814 | |
| 815 | 815 | VIDEO_START( garyoret ) |
| 816 | 816 | { |
| 817 | dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 818 | dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 817 | dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 818 | dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 819 | 819 | |
| 820 | 820 | tilemap_set_transparent_pen(dec8_fix_tilemap,0); |
| 821 | 821 | game_uses_priority=1; |
| r1679 | r1680 | |
|---|---|---|
| 110 | 110 | buffered_spriteram32_2 = auto_malloc(spriteram_size); |
| 111 | 111 | |
| 112 | 112 | tilemap_0 = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 113 | | |
| 113 | | |
| 114 | 114 | |
| 115 | 115 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 116 | | |
| 116 | | |
| 117 | 117 | |
| 118 | 118 | tilemap_2 = tilemap_create( get_tile_info_2, tilemap_scan_rows, |
| 119 | | |
| 119 | | |
| 120 | 120 | |
| 121 | 121 | tilemap_3 = tilemap_create( get_tile_info_3, tilemap_scan_rows, |
| 122 | | |
| 122 | | |
| 123 | 123 | |
| 124 | 124 | tilemap_set_transparent_pen(tilemap_0,0xff); // 8 bits |
| 125 | 125 | tilemap_set_transparent_pen(tilemap_1,0xff); // 8 bits |
| r1679 | r1680 | |
|---|---|---|
| 204 | 204 | |
| 205 | 205 | VIDEO_START( tbowl ) |
| 206 | 206 | { |
| 207 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 208 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,128,32); | |
| 209 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16,128,32); | |
| 207 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 208 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16, 16,128,32); | |
| 209 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows, 16, 16,128,32); | |
| 210 | 210 | |
| 211 | 211 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 212 | 212 | tilemap_set_transparent_pen(bg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 145 | 145 | VIDEO_START( battlane ) |
| 146 | 146 | { |
| 147 | 147 | bg_tilemap = tilemap_create(get_tile_info_bg, battlane_tilemap_scan_rows_2x2, |
| 148 | | |
| 148 | | |
| 149 | 149 | |
| 150 | 150 | screen_bitmap = auto_bitmap_alloc(32 * 8, 32 * 8, BITMAP_FORMAT_INDEXED8); |
| 151 | 151 | } |
| r1679 | r1680 | |
|---|---|---|
| 140 | 140 | atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30); |
| 141 | 141 | |
| 142 | 142 | /* initialize the playfield */ |
| 143 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigt_playfield_scan, | |
| 143 | atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigt_playfield_scan, | |
| 144 | 144 | |
| 145 | 145 | /* initialize the motion objects */ |
| 146 | 146 | atarirle_init(0, &adjusted_modesc); |
| 147 | 147 | |
| 148 | 148 | /* initialize the alphanumerics */ |
| 149 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 149 | atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, | |
| 150 | 150 | |
| 151 | 151 | /* allocate temp bitmaps */ |
| 152 | 152 | pf_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16); |
| r1679 | r1680 | |
|---|---|---|
| 147 | 147 | |
| 148 | 148 | VIDEO_START( thepit ) |
| 149 | 149 | { |
| 150 | thepit_solid_tilemap = tilemap_create(solid_get_tile_info,tilemap_scan_rows, | |
| 150 | thepit_solid_tilemap = tilemap_create(solid_get_tile_info,tilemap_scan_rows, | |
| 151 | 151 | |
| 152 | thepit_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 152 | thepit_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 153 | 153 | tilemap_set_transparent_pen(thepit_tilemap, 0); |
| 154 | 154 | |
| 155 | 155 | tilemap_set_scroll_cols(thepit_solid_tilemap, 32); |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | cpunum_set_input_line(machine, 0, 1, HOLD_LINE); |
| 81 | 81 | if (param != 0) |
| 82 | timer_adjust(crtc_timer, attotime_make(0, machine->screen[0].refresh / param), 0, attotime_make(0, machine->screen[0].refresh / param)); | |
| 82 | timer_adjust_periodic(crtc_timer, attotime_make(0, machine->screen[0].refresh / param), 0, attotime_make(0, machine->screen[0].refresh / param)); | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | VIDEO_START( rpunch ) |
| 87 | 87 | { |
| 88 | 88 | /* allocate tilemaps for the backgrounds */ |
| 89 | background[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 90 | background[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 89 | background[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_cols, 8,8,64,64); | |
| 90 | background[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_cols,8,8,64,64); | |
| 91 | 91 | |
| 92 | 92 | /* configure the tilemaps */ |
| 93 | 93 | tilemap_set_transparent_pen(background[1],15); |
| r1679 | r1680 | |
| 165 | 165 | { |
| 166 | 166 | /* only register we know about.... */ |
| 167 | 167 | case 0x0b: |
| 168 | timer_adjust(crtc_timer, video_screen_get_time_until_pos(0, Machine->screen[0].visarea.max_y + 1, 0), (data == 0xc0) ? 2 : 1 | |
| 168 | timer_adjust_oneshot(crtc_timer, video_screen_get_time_until_pos(0, Machine->screen[0].visarea.max_y + 1, 0), (data == 0xc0) ? 2 : 1 | |
| 169 | 169 | break; |
| 170 | 170 | |
| 171 | 171 | default: |
| r1679 | r1680 | |
|---|---|---|
| 48 | 48 | tree1_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 49 | 49 | |
| 50 | 50 | changela_scanline_timer = timer_alloc(changela_scanline_callback, NULL); |
| 51 | timer_adjust(changela_scanline_timer, video_screen_get_time_until_pos(0, 30, 0), 30 | |
| 51 | timer_adjust_oneshot(changela_scanline_timer, video_screen_get_time_until_pos(0, 30, 0), 30 | |
| 52 | 52 | |
| 53 | 53 | state_save_register_global(slopeROM_bank); |
| 54 | 54 | state_save_register_global(tree_en); |
| r1679 | r1680 | |
| 738 | 738 | |
| 739 | 739 | sy++; |
| 740 | 740 | if(sy > 256) sy = 30; |
| 741 | timer_adjust(changela_scanline_timer, video_screen_get_time_until_pos(0, sy, 0), sy | |
| 741 | timer_adjust_oneshot(changela_scanline_timer, video_screen_get_time_until_pos(0, sy, 0), sy | |
| 742 | 742 | } |
| 743 | 743 | |
| 744 | 744 | VIDEO_UPDATE( changela ) |
| r1679 | r1680 | |
|---|---|---|
| 33 | 33 | { |
| 34 | 34 | helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format); |
| 35 | 35 | |
| 36 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 36 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "video/resnet.h" | |
| 8 | 9 | #include "pooyan.h" |
| 9 | 10 | |
| 11 | ||
| 10 | 12 | static tilemap *bg_tilemap; |
| 11 | 13 | |
| 12 | 14 | |
| r1679 | r1680 | |
| 32 | 34 | |
| 33 | 35 | PALETTE_INIT( pooyan ) |
| 34 | 36 | { |
| 35 | rgb_t palette[32]; | |
| 37 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 38 | static const int resistances_b [2] = { 470, 220 }; | |
| 39 | double rweights[3], gweights[3], bweights[2]; | |
| 36 | 40 | int i; |
| 37 | 41 | |
| 38 | for (i = 0;i < 32;i++) | |
| 42 | /* compute the color output resistor weights */ | |
| 43 | compute_resistor_weights(0, 255, -1.0, | |
| 44 | 3, resistances_rg, rweights, 1000, 0, | |
| 45 | 3, resistances_rg, gweights, 1000, 0, | |
| 46 | 2, resistances_b, bweights, 1000, 0); | |
| 47 | ||
| 48 | /* allocate the colortable */ | |
| 49 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 50 | ||
| 51 | /* create a lookup table for the palette */ | |
| 52 | for (i = 0; i < 0x20; i++) | |
| 39 | 53 | { |
| 40 | int bit0,bit1,bit2,r,g,b; | |
| 54 | int bit0, bit1, bit2; | |
| 55 | int r, g, b; | |
| 41 | 56 | |
| 42 | 57 | /* red component */ |
| 43 | bit0 = (*color_prom >> 0) & 0x01; | |
| 44 | bit1 = (*color_prom >> 1) & 0x01; | |
| 45 | bit2 = (*color_prom >> 2) & 0x01; | |
| 46 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 58 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 59 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 60 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 61 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 62 | ||
| 47 | 63 | /* green component */ |
| 48 | bit0 = (*color_prom >> 3) & 0x01; | |
| 49 | bit1 = (*color_prom >> 4) & 0x01; | |
| 50 | bit2 = (*color_prom >> 5) & 0x01; | |
| 51 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 64 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 65 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 66 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 67 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 68 | ||
| 52 | 69 | /* blue component */ |
| 53 | bit0 = 0; | |
| 54 | bit1 = (*color_prom >> 6) & 0x01; | |
| 55 | bit2 = (*color_prom >> 7) & 0x01; | |
| 56 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 70 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 71 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 72 | b = combine_2_weights(bweights, bit0, bit1); | |
| 57 | 73 | |
| 58 | palette[i] = MAKE_RGB(r,g,b); | |
| 59 | color_prom++; | |
| 74 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 60 | 75 | } |
| 61 | 76 | |
| 62 | /* color_prom now points to the beginning of the char lookup table */ | |
| 77 | /* color_prom now points to the beginning of the lookup table */ | |
| 78 | color_prom += 0x20; | |
| 63 | 79 | |
| 80 | /* characters */ | |
| 81 | for (i = 0; i < 0x100; i++) | |
| 82 | { | |
| 83 | UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; | |
| 84 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 85 | } | |
| 86 | ||
| 64 | 87 | /* sprites */ |
| 65 | for (i = 0;i < 16*16;i++) | |
| 66 | palette_set_color(machine, 16*16+i, palette[*color_prom++ & 0x0f]); | |
| 67 | ||
| 68 | /* characters */ | |
| 69 | for (i = 0;i < 16*16;i++) | |
| 70 | palette_set_color(machine, i, palette[(*color_prom++ & 0x0f) + 0x10]); | |
| 88 | for (i = 0x100; i < 0x200; i++) | |
| 89 | { | |
| 90 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 91 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 92 | } | |
| 71 | 93 | } |
| 72 | 94 | |
| 73 | 95 | |
| r1679 | r1680 | |
| 98 | 120 | |
| 99 | 121 | VIDEO_START( pooyan ) |
| 100 | 122 | { |
| 101 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 123 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 102 | 124 | } |
| 103 | 125 | |
| 104 | 126 | |
| r1679 | r1680 | |
| 150 | 172 | int flipx = ~spriteram_2[offs] & 0x40; |
| 151 | 173 | int flipy = spriteram_2[offs] & 0x80; |
| 152 | 174 | |
| 153 | /* Sprite flipscreen is supported by software */ | |
| 154 | 175 | drawgfx(bitmap,machine->gfx[1], |
| 155 | 176 | code, |
| 156 | 177 | color, |
| 157 | 178 | flipx, flipy, |
| 158 | 179 | sx, sy, |
| 159 | 180 | cliprect, |
| 160 | TRANSPARENCY_PEN, 0); | |
| 181 | TRANSPARENCY_PENS, | |
| 182 | colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); | |
| 161 | 183 | } |
| 162 | 184 | } |
| 163 | 185 |
| r1679 | r1680 | |
|---|---|---|
| 65 | 65 | |
| 66 | 66 | VIDEO_START( sidepckt ) |
| 67 | 67 | { |
| 68 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 68 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 69 | 69 | |
| 70 | 70 | tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */ |
| 71 | 71 | tilemap_set_transmask(bg_tilemap,1,0x01,0xfe); /* split type 1 has pen 0 transparent in front half */ |
| r1679 | r1680 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | VIDEO_START(pirates) |
| 42 | 42 | { |
| 43 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols, | |
| 43 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols, | |
| 44 | 44 | |
| 45 | 45 | /* Not sure how big they can be, Pirates uses only 32 columns, Genix 44 */ |
| 46 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 47 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 46 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 47 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols, 8,8,64,32); | |
| 48 | 48 | |
| 49 | 49 | tilemap_set_transparent_pen(tx_tilemap,0); |
| 50 | 50 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 80 | 80 | VIDEO_START( tankbatt ) |
| 81 | 81 | { |
| 82 | 82 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 83 | | |
| 83 | | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | static void draw_bullets(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "video/resnet.h" | |
| 8 | 9 | #include "exerion.h" |
| 9 | 10 | |
| 10 | 11 | |
| r1679 | r1680 | |
| 46 | 47 | |
| 47 | 48 | PALETTE_INIT( exerion ) |
| 48 | 49 | { |
| 50 | static const int resistances_rg[3] = { 1000, 470, 220 }; | |
| 51 | static const int resistances_b [2] = { 470, 220 }; | |
| 52 | double rweights[3], gweights[3], bweights[2]; | |
| 49 | 53 | int i; |
| 50 | 54 | |
| 51 | for (i = 0; i < machine->drv->total_colors; i++) | |
| 55 | /* compute the color output resistor weights */ | |
| 56 | compute_resistor_weights(0, 255, -1.0, | |
| 57 | 3, &resistances_rg[0], rweights, 0, 0, | |
| 58 | 3, &resistances_rg[0], gweights, 0, 0, | |
| 59 | 2, &resistances_b[0], bweights, 0, 0); | |
| 60 | ||
| 61 | /* allocate the colortable */ | |
| 62 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 63 | ||
| 64 | /* create a lookup table for the palette */ | |
| 65 | for (i = 0; i < 0x20; i++) | |
| 52 | 66 | { |
| 53 | int bit0, bit1, bit2, r, g, b; | |
| 67 | int bit0, bit1, bit2; | |
| 68 | int r, g, b; | |
| 54 | 69 | |
| 55 | 70 | /* red component */ |
| 56 | bit0 = (*color_prom >> 0) & 0x01; | |
| 57 | bit1 = (*color_prom >> 1) & 0x01; | |
| 58 | bit2 = (*color_prom >> 2) & 0x01; | |
| 59 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 71 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 72 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 73 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 74 | r = combine_3_weights(rweights, bit0, bit1, bit2); | |
| 75 | ||
| 60 | 76 | /* green component */ |
| 61 | bit0 = (*color_prom >> 3) & 0x01; | |
| 62 | bit1 = (*color_prom >> 4) & 0x01; | |
| 63 | bit2 = (*color_prom >> 5) & 0x01; | |
| 64 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 77 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 78 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 79 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 80 | g = combine_3_weights(gweights, bit0, bit1, bit2); | |
| 81 | ||
| 65 | 82 | /* blue component */ |
| 66 | bit0 = 0; | |
| 67 | bit1 = (*color_prom >> 6) & 0x01; | |
| 68 | bit2 = (*color_prom >> 7) & 0x01; | |
| 69 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 83 | bit0 = (color_prom[i] >> 6) & 0x01; | |
| 84 | bit1 = (color_prom[i] >> 7) & 0x01; | |
| 85 | b = combine_2_weights(bweights, bit0, bit1); | |
| 70 | 86 | |
| 71 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 72 | color_prom++; | |
| 87 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 73 | 88 | } |
| 74 | 89 | |
| 75 | /* color_prom now points to the beginning of the char lookup table */ | |
| 90 | /* color_prom now points to the beginning of the lookup table */ | |
| 91 | color_prom += 0x20; | |
| 76 | 92 | |
| 77 | /* fg chars */ | |
| 78 | for (i = 0; i < 256; i++) | |
| 79 | colortable[i + 0x000] = 16 + (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 15)] & 15); | |
| 80 | color_prom += 256; | |
| 93 | /* fg chars and sprites */ | |
| 94 | for (i = 0; i < 0x200; i++) | |
| 95 | { | |
| 96 | UINT8 ctabentry = 0x10 | (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 0x0f)] & 0x0f); | |
| 97 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 98 | } | |
| 81 | 99 | |
| 82 | /* color_prom now points to the beginning of the sprite lookup table */ | |
| 83 | ||
| 84 | /* sprites */ | |
| 85 | for (i = 0; i < 256; i++) | |
| 86 | colortable[i + 0x100] = 16 + (color_prom[(i & 0xc0) | ((i & 3) << 4) | ((i >> 2) & 15)] & 15); | |
| 87 | color_prom += 256; | |
| 88 | ||
| 89 | 100 | /* bg chars (this is not the full story... there are four layers mixed */ |
| 90 | 101 | /* using another PROM */ |
| 91 | for (i = 0; i < 256; i++) | |
| 92 | colortable[i + 0x200] = *color_prom++ & 15; | |
| 93 | } | |
| 102 | for (i = 0x200; i < 0x300; i++) | |
| 103 | { | |
| 104 | UINT8 ctabentry = color_prom[i] & 0x0f; | |
| 105 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 106 | } | |
| 107 | } | |
| 94 | 108 | |
| 95 | 109 | |
| 96 | 110 | |
| r1679 | r1680 | |
| 102 | 116 | |
| 103 | 117 | VIDEO_START( exerion ) |
| 104 | 118 | { |
| 105 | UINT16 *dst; | |
| 106 | UINT8 *src; | |
| 107 | int i, x, y; | |
| 119 | int i; | |
| 108 | 120 | |
| 109 | 121 | /* get pointers to the mixing and lookup PROMs */ |
| 110 | 122 | background_mixer = memory_region(REGION_PROMS) + 0x320; |
| r1679 | r1680 | |
| 132 | 144 | */ |
| 133 | 145 | for (i = 0; i < 4; i++) |
| 134 | 146 | { |
| 135 | src = memory_region(REGION_GFX3) + i * 0x2000; | |
| 136 | dst = background_gfx[i]; | |
| 147 | int y; | |
| 137 | 148 | |
| 138 | for (y = 0; y < 256; y++) | |
| 149 | UINT8 *src = memory_region(REGION_GFX3) + i * 0x2000; | |
| 150 | UINT16 *dst = background_gfx[i]; | |
| 151 | ||
| 152 | for (y = 0; y < 0x100; y++) | |
| 139 | 153 | { |
| 140 | for (x = 0; x < 128; x += 4) | |
| 154 | int x; | |
| 155 | ||
| 156 | for (x = 0; x < 0x80; x += 4) | |
| 141 | 157 | { |
| 142 | 158 | UINT8 data = *src++; |
| 143 | 159 | UINT16 val; |
| r1679 | r1680 | |
| 158 | 174 | if (val) val |= 0x100 >> i; |
| 159 | 175 | *dst++ = val << (2 * i); |
| 160 | 176 | } |
| 161 | for (x = 0; x < 128; x++) | |
| 177 | ||
| 178 | for (; x < 0x100; x++) | |
| 162 | 179 | *dst++ = 0; |
| 163 | 180 | } |
| 164 | 181 | } |
| r1679 | r1680 | |
| 207 | 224 | UINT8 snmi = 1; |
| 208 | 225 | |
| 209 | 226 | if (((hcounter & 0x180) == 0x180) && !video_screen_get_vblank(0)) |
| 210 | { | |
| 211 | 227 | snmi = !((hcounter >> 6) & 0x01); |
| 212 | } | |
| 213 | 228 | |
| 214 | 229 | return (video_screen_get_vblank(0) << 1) | snmi; |
| 215 | 230 | } |
| r1679 | r1680 | |
| 325 | 340 | } |
| 326 | 341 | |
| 327 | 342 | /* draw the scanline */ |
| 328 | pens = &machine-> | |
| 343 | pens = &machine-> | |
| 329 | 344 | draw_scanline8(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &scanline[cliprect->min_x], pens, -1); |
| 330 | 345 | } |
| 331 | 346 | } |
| r1679 | r1680 | |
| 378 | 393 | code &= ~0x10, code2 |= 0x10; |
| 379 | 394 | |
| 380 | 395 | drawgfx(bitmap, gfx, code2, color, xflip, yflip, x, y + gfx->height, |
| 381 | cliprect, TRANSPARENCY_COLOR, 16); | |
| 396 | cliprect, TRANSPARENCY_PENS, | |
| 397 | colortable_get_transpen_mask(machine->colortable, gfx, color, 0x10)); | |
| 382 | 398 | } |
| 383 | 399 | |
| 384 | 400 | drawgfx(bitmap, gfx, code, color, xflip, yflip, x, y, |
| 385 | cliprect, TRANSPARENCY_COLOR, 16); | |
| 401 | cliprect, TRANSPARENCY_PENS, | |
| 402 | colortable_get_transpen_mask(machine->colortable, gfx, color, 0x10)); | |
| 386 | 403 | |
| 387 | 404 | if (doubled) i += 4; |
| 388 | 405 | } |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | VIDEO_START( wrally ) |
| 81 | 81 | { |
| 82 | pant[0] = tilemap_create(get_tile_info_wrally_screen0,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 83 | pant[1] = tilemap_create(get_tile_info_wrally_screen1,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 82 | pant[0] = tilemap_create(get_tile_info_wrally_screen0,tilemap_scan_rows,16,16,64,32); | |
| 83 | pant[1] = tilemap_create(get_tile_info_wrally_screen1,tilemap_scan_rows,16,16,64,32); | |
| 84 | 84 | |
| 85 | 85 | tilemap_set_transparent_pen(pant[0],0); |
| 86 | 86 | tilemap_set_transparent_pen(pant[1],0); |
| r1679 | r1680 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | VIDEO_START( mosaic ) |
| 54 | 54 | { |
| 55 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 56 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,32); | |
| 55 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 56 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8,8,64,32); | |
| 57 | 57 | |
| 58 | 58 | tilemap_set_transparent_pen(fg_tilemap,0xff); |
| 59 | 59 | } |
| r1679 | r1680 | |
|---|---|---|
| 191 | 191 | |
| 192 | 192 | VIDEO_START( crospang ) |
| 193 | 193 | { |
| 194 | bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 195 | fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 194 | bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 195 | fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 196 | 196 | |
| 197 | 197 | tilemap_set_transparent_pen(fg_layer,0); |
| 198 | 198 | bestri_tilebank = 0; |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | /*defined in drivers/darkmist.c */ |
| 5 | ||
| 6 | extern UINT8 * darkmist_scroll; | |
| 7 | 4 | extern int darkmist_hw; |
| 8 | 5 | |
| 9 | static int spritebank; | |
| 10 | 6 | |
| 7 | UINT8 *darkmist_scroll; | |
| 8 | UINT8 *darkmist_spritebank; | |
| 9 | ||
| 11 | 10 | /* vis. flags */ |
| 12 | 11 | |
| 13 | 12 | #define DISPLAY_SPR 1 |
| r1679 | r1680 | |
| 77 | 76 | { |
| 78 | 77 | int i; |
| 79 | 78 | |
| 80 | /* black color */ | |
| 81 | palette_set_color(machine, 0x100, MAKE_RGB(0,0,0)); | |
| 79 | /* allocate the colortable */ | |
| 80 | machine->colortable = colortable_alloc(machine, 0x101); | |
| 82 | 81 | |
| 83 | /* color lookup tables */ | |
| 84 | ||
| 85 | for (i = 0;i < 256;i++) | |
| 82 | for (i = 0; i < 0x400; i++) | |
| 86 | 83 | { |
| 87 | if (*color_prom & 0x40) | |
| 88 | *(colortable++) = 0x100; | |
| 89 | else | |
| 90 | *(colortable++) = (*color_prom & 0x3f) + 0x80; | |
| 91 | color_prom++; | |
| 92 | } | |
| 84 | int ctabentry; | |
| 93 | 85 | |
| 94 | for (i = 0;i < 256;i++) | |
| 95 | { | |
| 96 | if (*color_prom & 0x40) | |
| 97 | *(colortable++) = 0x100; | |
| 86 | if (color_prom[i] & 0x40) | |
| 87 | ctabentry = 0x100; | |
| 98 | 88 | else |
| 99 | *(colortable++) = (*color_prom & 0x3f) + 0x00; | |
| 100 | color_prom++; | |
| 101 | } | |
| 89 | { | |
| 90 | ctabentry = (color_prom[i] & 0x3f); | |
| 102 | 91 | |
| 103 | for (i = 0;i < 256;i++) | |
| 104 | { | |
| 105 | if (*color_prom & 0x40) | |
| 106 | *(colortable++) = 0x100; | |
| 107 | else | |
| 108 | *(colortable++) = (*color_prom & 0x3f) + 0x40; | |
| 109 | color_prom++; | |
| 110 | } | |
| 92 | switch (i & 0x300) | |
| 93 | { | |
| 94 | case 0x000: ctabentry = ctabentry | 0x80; break; | |
| 95 | case 0x100: ctabentry = ctabentry | 0x00; break; | |
| 96 | case 0x200: ctabentry = ctabentry | 0x40; break; | |
| 97 | case 0x300: ctabentry = ctabentry | 0xc0; break; | |
| 98 | } | |
| 99 | } | |
| 111 | 100 | |
| 112 | for (i = 0;i < 256;i++) | |
| 113 | { | |
| 114 | if (*color_prom & 0x40) | |
| 115 | *(colortable++) = 0x100; | |
| 116 | else | |
| 117 | *(colortable++) = (*color_prom & 0x3f) + 0xc0; | |
| 118 | color_prom++; | |
| 101 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 119 | 102 | } |
| 120 | 103 | } |
| 121 | 104 | |
| 122 | WRITE8_HANDLER(darkmist_palette_w) | |
| 123 | { | |
| 124 | paletteram[offset]=data; | |
| 125 | offset&=0xff; | |
| 126 | palette_set_color_rgb(Machine, offset, pal4bit(paletteram[offset+0x200]), pal4bit(paletteram[offset] >> 4), pal4bit(paletteram[offset])); | |
| 127 | } | |
| 128 | 105 | |
| 129 | ||
| 106 | st | |
| 130 | 107 | { |
| 131 | return paletteram[offset]; | |
| 132 | } | |
| 108 | int i; | |
| 133 | 109 | |
| 134 | WRITE8_HANDLER(darkmist_spritebank_w) | |
| 135 | { | |
| 136 | spritebank=data<<8; | |
| 110 | for (i = 0; i < 0x100; i++) | |
| 111 | { | |
| 112 | int r = pal4bit(paletteram[i | 0x200] >> 0); | |
| 113 | int g = pal4bit(paletteram[i | 0x000] >> 4); | |
| 114 | int b = pal4bit(paletteram[i | 0x000] >> 0); | |
| 115 | ||
| 116 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 117 | } | |
| 118 | ||
| 119 | colortable_palette_set_color(machine->colortable, 0x100, RGB_BLACK); | |
| 137 | 120 | } |
| 138 | 121 | |
| 122 | ||
| 139 | 123 | VIDEO_START(darkmist) |
| 140 | 124 | { |
| 141 | bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,512,64 ); | |
| 142 | fgtilemap = tilemap_create( get_fgtile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,256 ); | |
| 143 | txtilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32 ); | |
| 125 | bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,16,16,512,64 ); | |
| 126 | fgtilemap = tilemap_create( get_fgtile_info,tilemap_scan_rows,16,16,64,256 ); | |
| 127 | txtilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,8,8,32,32 ); | |
| 144 | 128 | tilemap_set_transparent_pen(fgtilemap, 0); |
| 145 | 129 | tilemap_set_transparent_pen(txtilemap, 0); |
| 146 | 130 | } |
| r1679 | r1680 | |
| 150 | 134 | |
| 151 | 135 | #define DM_GETSCROLL(n) (((darkmist_scroll[(n)]<<1)&0xff) + ((darkmist_scroll[(n)]&0x80)?1:0) +( ((darkmist_scroll[(n)-1]<<4) | (darkmist_scroll[(n)-1]<<12) )&0xff00)) |
| 152 | 136 | |
| 137 | set_pens(machine); | |
| 138 | ||
| 153 | 139 | tilemap_set_scrollx(bgtilemap, 0, DM_GETSCROLL(0x2)); |
| 154 | 140 | tilemap_set_scrolly(bgtilemap, 0, DM_GETSCROLL(0x6)); |
| 155 | 141 | tilemap_set_scrollx(fgtilemap, 0, DM_GETSCROLL(0xa)); |
| r1679 | r1680 | |
| 158 | 144 | fillbitmap(bitmap, get_black_pen(machine), cliprect); |
| 159 | 145 | |
| 160 | 146 | if(darkmist_hw & DISPLAY_BG) |
| 161 | { | |
| 162 | 147 | tilemap_draw(bitmap,cliprect,bgtilemap, 0,0); |
| 163 | } | |
| 164 | 148 | |
| 165 | ||
| 166 | 149 | if(darkmist_hw & DISPLAY_FG) |
| 167 | { | |
| 168 | 150 | tilemap_draw(bitmap,cliprect,fgtilemap, 0,0); |
| 169 | } | |
| 170 | 151 | |
| 171 | 152 | if(darkmist_hw & DISPLAY_SPR) |
| 172 | 153 | { |
| r1679 | r1680 | |
| 190 | 171 | tile=spriteram[i+0]; |
| 191 | 172 | |
| 192 | 173 | if(spriteram[i+1]&0x20) |
| 193 | { | |
| 194 | tile+=spritebank; | |
| 195 | } | |
| 174 | tile += (*darkmist_spritebank << 8); | |
| 196 | 175 | |
| 197 | 176 | palette=((spriteram[i+1])>>1)&0xf; |
| 198 | 177 | |
| r1679 | r1680 | |
| 222 | 201 | |
| 223 | 202 | return 0; |
| 224 | 203 | } |
| 225 | ||
| 226 |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | ***************************************************************************/ |
| 20 | 20 | PALETTE_INIT( exctsccr ) |
| 21 | 21 | { |
| 22 | int i,idx; | |
| 23 | #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) | |
| 22 | int i; | |
| 24 | 23 | |
| 25 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 24 | /* allocate the colortable */ | |
| 25 | machine->colortable = colortable_alloc(machine, 0x20); | |
| 26 | ||
| 27 | /* create a lookup table for the palette */ | |
| 28 | for (i = 0; i < 0x20; i++) | |
| 26 | 29 | { |
| 27 | int bit0,bit1,bit2,r,g,b; | |
| 30 | int bit0, bit1, bit2; | |
| 31 | int r, g, b; | |
| 28 | 32 | |
| 33 | /* red component */ | |
| 29 | 34 | bit0 = (color_prom[i] >> 0) & 0x01; |
| 30 | 35 | bit1 = (color_prom[i] >> 1) & 0x01; |
| 31 | 36 | bit2 = (color_prom[i] >> 2) & 0x01; |
| 32 | 37 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 38 | ||
| 39 | /* green component */ | |
| 33 | 40 | bit0 = (color_prom[i] >> 3) & 0x01; |
| 34 | 41 | bit1 = (color_prom[i] >> 4) & 0x01; |
| 35 | 42 | bit2 = (color_prom[i] >> 5) & 0x01; |
| 36 | 43 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 44 | ||
| 45 | /* blue component */ | |
| 37 | 46 | bit0 = 0; |
| 38 | 47 | bit1 = (color_prom[i] >> 6) & 0x01; |
| 39 | 48 | bit2 = (color_prom[i] >> 7) & 0x01; |
| 40 | 49 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 41 | 50 | |
| 42 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 51 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 43 | 52 | } |
| 44 | 53 | |
| 45 | color_prom += machine->drv->total_colors; | |
| 54 | /* color_prom now points to the beginning of the lookup table */ | |
| 55 | color_prom += 0x20; | |
| 46 | 56 | |
| 47 | 57 | /* characters */ |
| 48 | idx = 0; | |
| 49 | for (i = 0;i < 32;i++) | |
| 58 | for (i = 0; i < 0x80; i++) | |
| 50 | 59 | { |
| 51 | COLOR(0,idx++) = color_prom[256+0+(i*4)]; | |
| 52 | COLOR(0,idx++) = color_prom[256+1+(i*4)]; | |
| 53 | COLOR(0,idx++) = color_prom[256+2+(i*4)]; | |
| 54 | COLOR(0,idx++) = color_prom[256+3+(i*4)]; | |
| 55 | COLOR(0,idx++) = color_prom[256+128+0+(i*4)]; | |
| 56 | COLOR(0,idx++) = color_prom[256+128+1+(i*4)]; | |
| 57 | COLOR(0,idx++) = color_prom[256+128+2+(i*4)]; | |
| 58 | COLOR(0,idx++) = color_prom[256+128+3+(i*4)]; | |
| 60 | int swapped_i = BITSWAP8(i,2,7,6,5,4,3,1,0); | |
| 61 | UINT8 ctabentry = color_prom[0x100 + swapped_i]; | |
| 62 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 59 | 63 | } |
| 60 | 64 | |
| 61 | 65 | /* sprites */ |
| 62 | ||
| 63 | idx=0; | |
| 64 | ||
| 65 | for (i = 0;i < 15*16;i++) | |
| 66 | for (i = 0; i < 0xf0; i++) | |
| 66 | 67 | { |
| 67 | if ( | |
| 68 | if ( | |
| 68 | 69 | { |
| 69 | COLOR(2,idx) = color_prom[i]+16; | |
| 70 | idx++; | |
| 70 | int swapped_i = BITSWAP8(i,3,7,6,5,4,2,1,0); | |
| 71 | UINT8 ctabentry = color_prom[i] | 0x10; | |
| 72 | colortable_entry_set_value(machine->colortable, swapped_i + 0x80, ctabentry); | |
| 71 | 73 | } |
| 72 | 74 | } |
| 73 | for (i = 15*16;i < 16*16;i++) | |
| 75 | ||
| 76 | for (i = 0xf0; i < 0x100; i++) | |
| 74 | 77 | { |
| 75 | if ( | |
| 78 | if ( | |
| 76 | 79 | { |
| 77 | COLOR(2,idx) = color_prom[i]+16; | |
| 78 | idx++; | |
| 80 | int swapped_i = BITSWAP8(i,3,7,6,5,4,2,1,0); | |
| 81 | UINT8 ctabentry = color_prom[i] | 0x10; | |
| 82 | colortable_entry_set_value(machine->colortable, swapped_i + 0x80, ctabentry); | |
| 79 | 83 | } |
| 80 | 84 | } |
| 81 | for (i = 16;i < 32;i++) | |
| 85 | ||
| 86 | for (i = 0x80; i < 0x100; i++) | |
| 82 | 87 | { |
| 83 | COLOR(2,idx++) = color_prom[256+0+(i*4)]+16; | |
| 84 | COLOR(2,idx++) = color_prom[256+1+(i*4)]+16; | |
| 85 | COLOR(2,idx++) = color_prom[256+2+(i*4)]+16; | |
| 86 | COLOR(2,idx++) = color_prom[256+3+(i*4)]+16; | |
| 87 | COLOR(2,idx++) = color_prom[256+128+0+(i*4)]+16; | |
| 88 | COLOR(2,idx++) = color_prom[256+128+1+(i*4)]+16; | |
| 89 | COLOR(2,idx++) = color_prom[256+128+2+(i*4)]+16; | |
| 90 | COLOR(2,idx++) = color_prom[256+128+3+(i*4)]+16; | |
| 88 | int swapped_i = BITSWAP8(i,2,7,6,5,4,3,1,0); | |
| 89 | UINT8 ctabentry = color_prom[0x100 + swapped_i] | 0x10; | |
| 90 | colortable_entry_set_value(machine->colortable, i + 0x80, ctabentry); | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | /* Patch for goalkeeper */ | |
| 94 | COLOR(2,29*8+7) = 16; | |
| 95 | ||
| 93 | /* patch for goalkeeper - but of course, this is totally wrong */ | |
| 94 | colortable_entry_set_value(machine->colortable, 0x80+(0x1d*8)+7, 0x10); | |
| 96 | 95 | } |
| 97 | 96 | |
| 98 | 97 | static TIMER_CALLBACK( exctsccr_fm_callback ) |
| r1679 | r1680 | |
| 133 | 132 | static TILE_GET_INFO( get_bg_tile_info ) |
| 134 | 133 | { |
| 135 | 134 | int code = videoram[tile_index]; |
| 136 | int color = colorram[tile_index] & 0x1f; | |
| 137 | 135 | |
| 136 | /* ZV 02052008 - this used to be "& 0x1f," but that's not supported by the | |
| 137 | color PROM decoding, so I am using 0x0f. I don't see any glitches */ | |
| 138 | int color = colorram[tile_index] & 0x0f; | |
| 139 | ||
| 138 | 140 | SET_TILE_INFO(gfx_bank, code, color, 0); |
| 139 | 141 | } |
| 140 | 142 | |
| 141 | 143 | VIDEO_START( exctsccr ) |
| 142 | 144 | { |
| 143 | 145 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 144 | | |
| 146 | | |
| 145 | 147 | |
| 146 | 148 | timer_pulse(ATTOTIME_IN_HZ(75), NULL, 0, exctsccr_fm_callback); /* updates fm */ |
| 147 | 149 | } |
| r1679 | r1680 | |
| 209 | 211 | |
| 210 | 212 | color += 6; |
| 211 | 213 | } |
| 214 | ||
| 212 | 215 | if ( color==0x1d && gfx_bank==1 ) |
| 213 | 216 | { |
| 214 | 217 | drawgfx(bitmap,machine->gfx[3], |
| r1679 | r1680 | |
| 218 | 221 | sx,sy, |
| 219 | 222 | cliprect, |
| 220 | 223 | TRANSPARENCY_PEN,0); |
| 224 | ||
| 221 | 225 | drawgfx(bitmap,machine->gfx[4], |
| 222 | 226 | code, |
| 223 | 227 | color, |
| 224 | 228 | flipx, flipy, |
| 225 | 229 | sx,sy, |
| 226 | 230 | cliprect, |
| 227 | TRANSPARENCY_COLOR, 16); | |
| 231 | TRANSPARENCY_PENS, | |
| 232 | colortable_get_transpen_mask(machine->colortable, machine->gfx[4], color, 0x10)); | |
| 228 | 233 | |
| 229 | } else | |
| 234 | } | |
| 235 | else | |
| 230 | 236 | { |
| 231 | drawgfx(bitmap,machine->gfx[bank], | |
| 232 | code, | |
| 233 | color, | |
| 234 | flipx, flipy, | |
| 235 | sx,sy, | |
| 236 | cliprect, | |
| 237 | TRANSPARENCY_PEN,0); | |
| 237 | drawgfx(bitmap,machine->gfx[bank], | |
| 238 | code, | |
| 239 | color, | |
| 240 | flipx, flipy, | |
| 241 | sx,sy, | |
| 242 | cliprect, | |
| 243 | TRANSPARENCY_PEN,0); | |
| 238 | 244 | } |
| 239 | 245 | } |
| 240 | 246 | } |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | VIDEO_START( sichuan2 ) |
| 57 | 57 | { |
| 58 | 58 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 59 | | |
| 59 | | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | VIDEO_UPDATE( sichuan2 ) |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | VIDEO_START( bioship ) |
| 101 | 101 | { |
| 102 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 103 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 102 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,16,16,256,32); | |
| 103 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 104 | 104 | spriteram_old = auto_malloc(0x1000); |
| 105 | 105 | spriteram_old2 = auto_malloc(0x1000); |
| 106 | 106 | background_bitmap = auto_bitmap_alloc(8192,512,machine->screen[0].format); |
| r1679 | r1680 | |
| 118 | 118 | |
| 119 | 119 | VIDEO_START( strahl ) |
| 120 | 120 | { |
| 121 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 122 | fg_tilemap = tilemap_create(strahl_get_fg_tile_info, bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 123 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 121 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,16,16,256,32); | |
| 122 | fg_tilemap = tilemap_create(strahl_get_fg_tile_info, bg_scan,16,16,256,32); | |
| 123 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 124 | 124 | spriteram_old = auto_malloc(0x1000); |
| 125 | 125 | spriteram_old2 = auto_malloc(0x1000); |
| 126 | 126 | |
| r1679 | r1680 | |
| 136 | 136 | |
| 137 | 137 | VIDEO_START( macross ) |
| 138 | 138 | { |
| 139 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 140 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 139 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,16,16,256,32); | |
| 140 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,32,32); | |
| 141 | 141 | spriteram_old = auto_malloc(0x1000); |
| 142 | 142 | spriteram_old2 = auto_malloc(0x1000); |
| 143 | 143 | |
| r1679 | r1680 | |
| 152 | 152 | |
| 153 | 153 | VIDEO_START( gunnail ) |
| 154 | 154 | { |
| 155 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 156 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 155 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,16,16,256,32); | |
| 156 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 157 | 157 | spriteram_old = auto_malloc(0x1000); |
| 158 | 158 | spriteram_old2 = auto_malloc(0x1000); |
| 159 | 159 | |
| r1679 | r1680 | |
| 170 | 170 | |
| 171 | 171 | VIDEO_START( macross2 ) |
| 172 | 172 | { |
| 173 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,1024,128); | |
| 174 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 173 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,16,16,1024,128); | |
| 174 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 175 | 175 | spriteram_old = auto_malloc(0x1000); |
| 176 | 176 | spriteram_old2 = auto_malloc(0x1000); |
| 177 | 177 | |
| r1679 | r1680 | |
| 187 | 187 | |
| 188 | 188 | VIDEO_START( tdragon2 ) |
| 189 | 189 | { |
| 190 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan_td2,TILEMAP_TYPE_PEN,16,16,1024,32); | |
| 191 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 190 | bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan_td2,16,16,1024,32); | |
| 191 | tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 192 | 192 | spriteram_old = auto_malloc(0x1000); |
| 193 | 193 | spriteram_old2 = auto_malloc(0x1000); |
| 194 | 194 | |
| r1679 | r1680 | |
| 204 | 204 | |
| 205 | 205 | VIDEO_START( bjtwin ) |
| 206 | 206 | { |
| 207 | bg_tilemap = tilemap_create(bjtwin_get_bg_tile_info,tilemap_scan_cols, | |
| 207 | bg_tilemap = tilemap_create(bjtwin_get_bg_tile_info,tilemap_scan_cols, | |
| 208 | 208 | spriteram_old = auto_malloc(0x1000); |
| 209 | 209 | spriteram_old2 = auto_malloc(0x1000); |
| 210 | 210 | |
| r1679 | r1680 | |
| 997 | 997 | |
| 998 | 998 | |
| 999 | 999 | tilemap_0 = tilemap_create( get_tile_info_0, afega_tilemap_scan_pages, |
| 1000 | ||
| 1000 | ||
| 1001 | 1001 | 16,16, |
| 1002 | 1002 | TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y); |
| 1003 | 1003 | |
| 1004 | 1004 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_cols, |
| 1005 | ||
| 1005 | ||
| 1006 | 1006 | 8,8, |
| 1007 | 1007 | 32,32); |
| 1008 | 1008 | |
| r1679 | r1680 | |
| 1020 | 1020 | |
| 1021 | 1021 | |
| 1022 | 1022 | tilemap_0 = tilemap_create( get_tile_info_0, firehawk_tilemap_scan_pages, |
| 1023 | ||
| 1023 | ||
| 1024 | 1024 | 16,16, |
| 1025 | 1025 | TILES_PER_PAGE_X*FIREHAWK_PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*FIREHAWK_PAGES_PER_TMAP_Y); |
| 1026 | 1026 | |
| 1027 | 1027 | tilemap_1 = tilemap_create( get_tile_info_1, tilemap_scan_cols, |
| 1028 | ||
| 1028 | ||
| 1029 | 1029 | 8,8, |
| 1030 | 1030 | 32,32); |
| 1031 | 1031 |
| r1679 | r1680 | |
|---|---|---|
| 37 | 37 | VIDEO_START( nitedrvr ) |
| 38 | 38 | { |
| 39 | 39 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 40 | | |
| 40 | | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | static void draw_box(running_machine *machine, mame_bitmap *bitmap, int bx, int by, int ex, int ey ) |
| r0 | r1680 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | video.c | |
| 4 | ||
| 5 | Functions to emulate the video hardware of the machine. | |
| 6 | ||
| 7 | (c) 12/2/1998 Lee Taylor | |
| 8 | ||
| 9 | 2006 - major rewrite by couriersud | |
| 10 | ||
| 11 | ***************************************************************************/ | |
| 12 | ||
| 13 | #include "driver.h" | |
| 14 | #include "deprecat.h" | |
| 15 | #include "m10.h" | |
| 16 | ||
| 17 | static tilemap * tx_tilemap; | |
| 18 | static gfx_element * back_gfx; | |
| 19 | static UINT32 extyoffs[32*8]; | |
| 20 | static UINT32 extxoffs[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; | |
| 21 | ||
| 22 | static const gfx_layout backlayout = | |
| 23 | { | |
| 24 | 8,8*32, /* 8*8 characters */ | |
| 25 | 4, /* 256 characters */ | |
| 26 | 1, /* 1 bits per pixel */ | |
| 27 | { 0 }, | |
| 28 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 29 | { 0*8*32, 1*8*32, 2*8*32, 3*8*32, 4*8*32, 5*8*32, 6*8*32, 7*8*32 }, | |
| 30 | 32*8*8, /* every char takes 8 consecutive bytes */ | |
| 31 | extxoffs, extyoffs | |
| 32 | }; | |
| 33 | ||
| 34 | static const gfx_layout charlayout = | |
| 35 | { | |
| 36 | 8,8, /* 8*8 characters */ | |
| 37 | 256, /* 256 characters */ | |
| 38 | 1, /* 1 bits per pixel */ | |
| 39 | { 0 }, | |
| 40 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 41 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 42 | 8*8 /* every char takes 8 consecutive bytes */ | |
| 43 | }; | |
| 44 | ||
| 45 | static UINT32 tilemap_scan(UINT32 col,UINT32 row,UINT32 num_cols,UINT32 num_rows) | |
| 46 | { | |
| 47 | //m10_state *state = Machine->driver_data; | |
| 48 | ||
| 49 | return (31-col)*32 + row; | |
| 50 | } | |
| 51 | ||
| 52 | ||
| 53 | static void get_tile_info(running_machine *machine, tile_data *tileinfo, tilemap_memory_index tile_index, void *param) | |
| 54 | { | |
| 55 | SET_TILE_INFO(0, videoram[tile_index], colorram[tile_index] & 0x07, 0); | |
| 56 | } | |
| 57 | ||
| 58 | ||
| 59 | WRITE8_HANDLER( m10_colorram_w ) | |
| 60 | { | |
| 61 | if (colorram[offset] != data) | |
| 62 | { | |
| 63 | tilemap_mark_tile_dirty(tx_tilemap, offset); | |
| 64 | colorram[offset] = data; | |
| 65 | } | |
| 66 | } | |
| 67 | ||
| 68 | ||
| 69 | WRITE8_HANDLER( m15_chargen_w ) | |
| 70 | { | |
| 71 | m10_state *state = Machine->driver_data; | |
| 72 | ||
| 73 | if (state->chargen[offset] != data) | |
| 74 | { | |
| 75 | state->chargen[offset] = data; | |
| 76 | /* not very effective ... dirty would be better */ | |
| 77 | decodechar(Machine->gfx[0],offset >> 3,state->chargen); | |
| 78 | } | |
| 79 | } | |
| 80 | ||
| 81 | ||
| 82 | INLINE void plot_pixel_m10(mame_bitmap *bm, int x, int y, int col) | |
| 83 | { | |
| 84 | m10_state *state = Machine->driver_data; | |
| 85 | ||
| 86 | if (!state->flip) | |
| 87 | *BITMAP_ADDR16(bm, y, x) = col; | |
| 88 | else | |
| 89 | *BITMAP_ADDR16(bm, (IREMM10_VBSTART - 1)- (y - IREMM10_VBEND) + 6 | |
| 90 | , (IREMM10_HBSTART - 1)- (x- IREMM10_HBEND)) = col; // only when flip_screen(?) | |
| 91 | } | |
| 92 | ||
| 93 | VIDEO_START( m10 ) | |
| 94 | { | |
| 95 | //m10_state *state = machine->driver_data; | |
| 96 | int i; | |
| 97 | ||
| 98 | for (i=0;i<32*8;i++) | |
| 99 | extyoffs[i] = i*8; | |
| 100 | ||
| 101 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,8,8,32,32); | |
| 102 | tilemap_set_transparent_pen(tx_tilemap, 0); | |
| 103 | tilemap_set_scrolldx(tx_tilemap, 0, 62); | |
| 104 | tilemap_set_scrolldy(tx_tilemap, 0, 0); | |
| 105 | ||
| 106 | back_gfx = allocgfx(&backlayout); | |
| 107 | back_gfx->total_colors = 8; | |
| 108 | ||
| 109 | machine->gfx[1] = back_gfx; | |
| 110 | return ; | |
| 111 | } | |
| 112 | ||
| 113 | VIDEO_START( m15 ) | |
| 114 | { | |
| 115 | m10_state *state = machine->driver_data; | |
| 116 | ||
| 117 | machine->gfx[0] = allocgfx(&charlayout); | |
| 118 | machine->gfx[0]->total_colors = 8; | |
| 119 | ||
| 120 | decodegfx(machine->gfx[0], state->chargen,0,256); | |
| 121 | ||
| 122 | tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,8,8,32,32); | |
| 123 | tilemap_set_scrolldx(tx_tilemap, 0, 116); | |
| 124 | tilemap_set_scrolldy(tx_tilemap, 0, 0); | |
| 125 | ||
| 126 | return ; | |
| 127 | } | |
| 128 | ||
| 129 | /*************************************************************************** | |
| 130 | ||
| 131 | Draw the game screen in the given mame_bitmap. | |
| 132 | ||
| 133 | ***************************************************************************/ | |
| 134 | VIDEO_UPDATE( m10 ) | |
| 135 | { | |
| 136 | m10_state *state = machine->driver_data; | |
| 137 | int offs; | |
| 138 | static const int color[4]= { 3, 3, 5, 5 }; | |
| 139 | static const int xpos[4] = { 4*8, 26*8, 7*8, 6*8}; | |
| 140 | int i; | |
| 141 | ||
| 142 | fillbitmap(bitmap,machine->pens[0],cliprect); | |
| 143 | ||
| 144 | decodegfx(back_gfx, state->chargen,0,4); | |
| 145 | for (i=0;i<4;i++) | |
| 146 | if (state->flip) | |
| 147 | drawgfx(bitmap, back_gfx, i, color[i], 1, 1, 31*8 - xpos[i], 6, cliprect, 0, 0); | |
| 148 | else | |
| 149 | drawgfx(bitmap, back_gfx, i, color[i], 0, 0, xpos[i], 0, cliprect, 0, 0); | |
| 150 | ||
| 151 | if (state->bottomline) | |
| 152 | { | |
| 153 | int y; | |
| 154 | ||
| 155 | for (y = IREMM10_VBEND;y < IREMM10_VBSTART;y++) | |
| 156 | plot_pixel_m10(bitmap,16,y,1); | |
| 157 | } | |
| 158 | ||
| 159 | for (offs = videoram_size - 1;offs >= 0;offs--) | |
| 160 | tilemap_mark_tile_dirty(tx_tilemap, offs); | |
| 161 | ||
| 162 | tilemap_set_flip(tx_tilemap, state->flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
| 163 | tilemap_draw(bitmap,cliprect,tx_tilemap,0,0); | |
| 164 | ||
| 165 | return 0; | |
| 166 | } | |
| 167 | ||
| 168 | ||
| 169 | /*************************************************************************** | |
| 170 | ||
| 171 | Draw the game screen in the given mame_bitmap. | |
| 172 | ||
| 173 | ***************************************************************************/ | |
| 174 | VIDEO_UPDATE( m15 ) | |
| 175 | { | |
| 176 | m10_state *state = machine->driver_data; | |
| 177 | int offs; | |
| 178 | ||
| 179 | for (offs = videoram_size - 1;offs >= 0;offs--) | |
| 180 | tilemap_mark_tile_dirty(tx_tilemap, offs); | |
| 181 | ||
| 182 | //tilemap_mark_all_tiles_dirty(tx_tilemap); | |
| 183 | tilemap_set_flip(tx_tilemap, state->flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
| 184 | tilemap_draw(bitmap,cliprect,tx_tilemap,0,0); | |
| 185 | ||
| 186 | return 0; | |
| 187 | } | |
| 188 |
| r1679 | r1680 | |
|---|---|---|
| 103 | 103 | static VIDEO_START(rcasino) |
| 104 | 104 | { |
| 105 | 105 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 106 | | |
| 106 | | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | static VIDEO_UPDATE(rcasino) |
| r1679 | r1680 | |
|---|---|---|
| 684 | 684 | static INPUT_PORTS_START( marukin ) |
| 685 | 685 | PORT_START /* DSW */ |
| 686 | 686 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 687 | PORT_ | |
| 687 | PORT_ | |
| 688 | 688 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 689 | 689 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 690 | 690 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 804 | 804 | static INPUT_PORTS_START( pkladies ) |
| 805 | 805 | PORT_START /* DSW */ |
| 806 | 806 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 807 | PORT_ | |
| 807 | PORT_ | |
| 808 | 808 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 809 | 809 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 810 | 810 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 926 | 926 | static INPUT_PORTS_START( pang ) |
| 927 | 927 | PORT_START /* DSW */ |
| 928 | 928 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 929 | PORT_ | |
| 929 | PORT_ | |
| 930 | 930 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 931 | 931 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 932 | 932 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 966 | 966 | static INPUT_PORTS_START( spangbl ) |
| 967 | 967 | PORT_START /* DSW */ |
| 968 | 968 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 969 | PORT_ | |
| 969 | PORT_ | |
| 970 | 970 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 971 | 971 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 972 | 972 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 1007 | 1007 | /* this port may not have the same role */ |
| 1008 | 1008 | PORT_START /* DSW */ |
| 1009 | 1009 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1010 | PORT_ | |
| 1010 | PORT_ | |
| 1011 | 1011 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1012 | 1012 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1013 | 1013 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 1123 | 1123 | static INPUT_PORTS_START( qtono1 ) |
| 1124 | 1124 | PORT_START /* DSW */ |
| 1125 | 1125 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1126 | PORT_ | |
| 1126 | PORT_ | |
| 1127 | 1127 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1128 | 1128 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1129 | 1129 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 1163 | 1163 | static INPUT_PORTS_START( block ) |
| 1164 | 1164 | PORT_START /* DSW */ |
| 1165 | 1165 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1166 | PORT_ | |
| 1166 | PORT_ | |
| 1167 | 1167 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1168 | 1168 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1169 | 1169 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
| 1205 | 1205 | static INPUT_PORTS_START( blockjoy ) |
| 1206 | 1206 | PORT_START /* DSW */ |
| 1207 | 1207 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1208 | PORT_ | |
| 1208 | PORT_ | |
| 1209 | 1209 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 1210 | 1210 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* USED - handled in port5_r */ |
| 1211 | 1211 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| r1679 | r1680 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | static VIDEO_START( mgolf ) |
| 37 | 37 | { |
| 38 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 38 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 |
| r1679 | r1680 | |
|---|---|---|
| 222 | 222 | return; |
| 223 | 223 | break; |
| 224 | 224 | case 0x14: /* Prepare scanline interrupt */ |
| 225 | timer_adjust(raster_irq_timer,video_screen_get_time_until_pos(0, irq_ram[0x14/4], 0),0 | |
| 225 | timer_adjust_oneshot(raster_irq_timer,video_screen_get_time_until_pos(0, irq_ram[0x14/4], 0),0 | |
| 226 | 226 | //logerror("prepare scanline to fire at %d (currently on %d)\n", irq_ram[0x14/4], video_screen_get_vpos(0)); |
| 227 | 227 | return; |
| 228 | 228 | break; |
| r1679 | r1680 | |
|---|---|---|
| 391 | 391 | PORT_START |
| 392 | 392 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 393 | 393 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 394 | PORT_ | |
| 394 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 395 | 395 | PORT_DIPNAME( 0x10, 0x00, "Monitors" ) |
| 396 | 396 | PORT_DIPSETTING( 0x00, "1" ) |
| 397 | 397 | PORT_DIPSETTING( 0x10, "2" ) |
| r1679 | r1680 | |
|---|---|---|
| 253 | 253 | attotime period = attotime_mul(ATTOTIME_IN_HZ(43000000), (PD + 1) * (TCV + 1)); |
| 254 | 254 | |
| 255 | 255 | if(Timer0ctrl&2) |
| 256 | timer_adjust(Timer0,period,0,period); | |
| 256 | timer_adjust_periodic(Timer0,period,0,period); | |
| 257 | 257 | else |
| 258 | timer_adjust(Timer0,period,0 | |
| 258 | timer_adjust_oneshot(Timer0,period,0 | |
| 259 | 259 | } |
| 260 | 260 | COMBINE_DATA(&Timer0ctrl); |
| 261 | 261 | } |
| r1679 | r1680 | |
| 281 | 281 | attotime period = attotime_mul(ATTOTIME_IN_HZ(43000000), (PD + 1) * (TCV + 1)); |
| 282 | 282 | |
| 283 | 283 | if(Timer1ctrl&2) |
| 284 | timer_adjust(Timer1,period,0,period); | |
| 284 | timer_adjust_periodic(Timer1,period,0,period); | |
| 285 | 285 | else |
| 286 | timer_adjust(Timer1,period,0 | |
| 286 | timer_adjust_oneshot(Timer1,period,0 | |
| 287 | 287 | } |
| 288 | 288 | COMBINE_DATA(&Timer1ctrl); |
| 289 | 289 | } |
| r1679 | r1680 | |
| 309 | 309 | attotime period = attotime_mul(ATTOTIME_IN_HZ(43000000), (PD + 1) * (TCV + 1)); |
| 310 | 310 | |
| 311 | 311 | if(Timer2ctrl&2) |
| 312 | timer_adjust(Timer2,period,0,period); | |
| 312 | timer_adjust_periodic(Timer2,period,0,period); | |
| 313 | 313 | else |
| 314 | timer_adjust(Timer2,period,0 | |
| 314 | timer_adjust_oneshot(Timer2,period,0 | |
| 315 | 315 | } |
| 316 | 316 | COMBINE_DATA(&Timer2ctrl); |
| 317 | 317 | } |
| r1679 | r1680 | |
| 337 | 337 | attotime period = attotime_mul(ATTOTIME_IN_HZ(43000000), (PD + 1) * (TCV + 1)); |
| 338 | 338 | |
| 339 | 339 | if(Timer3ctrl&2) |
| 340 | timer_adjust(Timer3,period,0,period); | |
| 340 | timer_adjust_periodic(Timer3,period,0,period); | |
| 341 | 341 | else |
| 342 | timer_adjust(Timer3,period,0 | |
| 342 | timer_adjust_oneshot(Timer3,period,0 | |
| 343 | 343 | } |
| 344 | 344 | COMBINE_DATA(&Timer3ctrl); |
| 345 | 345 | } |
| r1679 | r1680 | |
| 595 | 595 | Timer3ctrl=0; |
| 596 | 596 | |
| 597 | 597 | Timer0=timer_alloc(Timer0cb, NULL); |
| 598 | timer_adjust(Timer0,attotime_never,0 | |
| 598 | timer_adjust_oneshot(Timer0,attotime_never,0 | |
| 599 | 599 | |
| 600 | 600 | Timer1=timer_alloc(Timer1cb, NULL); |
| 601 | timer_adjust(Timer1,attotime_never,0 | |
| 601 | timer_adjust_oneshot(Timer1,attotime_never,0 | |
| 602 | 602 | |
| 603 | 603 | Timer2=timer_alloc(Timer2cb, NULL); |
| 604 | timer_adjust(Timer2,attotime_never,0 | |
| 604 | timer_adjust_oneshot(Timer2,attotime_never,0 | |
| 605 | 605 | |
| 606 | 606 | Timer3=timer_alloc(Timer3cb, NULL); |
| 607 | timer_adjust(Timer3,attotime_never,0 | |
| 607 | timer_adjust_oneshot(Timer3,attotime_never,0 | |
| 608 | 608 | |
| 609 | 609 | VR0_Snd_Set_Areas(textureram,frameram); |
| 610 | 610 | #ifdef IDLE_LOOP_SPEEDUP |
| r1679 | r1680 | |
| 785 | 785 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 786 | 786 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 787 | 787 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 788 | PORT_ | |
| 788 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 789 | 789 | |
| 790 | 790 | PORT_START |
| 791 | 791 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Pause ) ) |
| r1679 | r1680 | |
|---|---|---|
| 139 | 139 | |
| 140 | 140 | static VIDEO_START(cshooter) |
| 141 | 141 | { |
| 142 | cshooter_txtilemap = tilemap_create(get_cstx_tile_info,tilemap_scan_rows, | |
| 142 | cshooter_txtilemap = tilemap_create(get_cstx_tile_info,tilemap_scan_rows, | |
| 143 | 143 | tilemap_set_transparent_pen(cshooter_txtilemap, 3); |
| 144 | 144 | } |
| 145 | 145 |
| r1679 | r1680 | |
|---|---|---|
| 212 | 212 | }; |
| 213 | 213 | |
| 214 | 214 | static GFXDECODE_START( rocnrope ) |
| 215 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 216 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*16, 16 ) | |
| 215 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0, 16 ) | |
| 216 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 16*16, 16 ) | |
| 217 | 217 | GFXDECODE_END |
| 218 | 218 | |
| 219 | 219 | |
| r1679 | r1680 | |
| 234 | 234 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 235 | 235 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 236 | 236 | MDRV_GFXDECODE(rocnrope) |
| 237 | MDRV_PALETTE_LENGTH(32) | |
| 238 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 237 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 239 | 238 | |
| 240 | 239 | MDRV_PALETTE_INIT(rocnrope) |
| 241 | 240 | MDRV_VIDEO_START(rocnrope) |
| r1679 | r1680 | |
| 263 | 262 | ROM_LOAD( "rnr_7a.snd", 0x0000, 0x1000, CRC(75d2c4e2) SHA1(b701019b4e7b06b268be660ce7958b5367318c27) ) |
| 264 | 263 | ROM_LOAD( "rnr_8a.snd", 0x1000, 0x1000, CRC(ca4325ae) SHA1(34ac035c0c2ed6bcafde1491d976bb9e9d2a2a7d) ) |
| 265 | 264 | |
| 266 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 267 | ROM_LOAD( "rnr_h12.vid", 0x0000, 0x2000, CRC(e2114539) SHA1(0ea19ae4d7c2da14f23c81abb8e2c931785b2715) ) | |
| 268 | ROM_LOAD( "rnr_h11.vid", 0x2000, 0x2000, CRC(169a8f3f) SHA1(182c7c9b9849ebb57b3ff7c0b629f2f8e2efa9ba) ) | |
| 269 | ||
| 270 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 265 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 271 | 266 | ROM_LOAD( "rnr_a11.vid", 0x0000, 0x2000, CRC(afdaba5e) SHA1(27c090cb1c3767c997daeedbe1ba24786f9e78f1) ) |
| 272 | 267 | ROM_LOAD( "rnr_a12.vid", 0x2000, 0x2000, CRC(054cafeb) SHA1(4c3cd850b347217af3dd5c9bb84bcff7b30689bd) ) |
| 273 | 268 | ROM_LOAD( "rnr_a9.vid", 0x4000, 0x2000, CRC(9d2166b2) SHA1(42d2b05360e58b1b2b3ad06c98eb46d9da2b1c21) ) |
| 274 | 269 | ROM_LOAD( "rnr_a10.vid", 0x6000, 0x2000, CRC(aff6e22f) SHA1(476d67821519feddc9f9c8537b46e6eede790035) ) |
| 275 | 270 | |
| 271 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 272 | ROM_LOAD( "rnr_h12.vid", 0x0000, 0x2000, CRC(e2114539) SHA1(0ea19ae4d7c2da14f23c81abb8e2c931785b2715) ) | |
| 273 | ROM_LOAD( "rnr_h11.vid", 0x2000, 0x2000, CRC(169a8f3f) SHA1(182c7c9b9849ebb57b3ff7c0b629f2f8e2efa9ba) ) | |
| 274 | ||
| 276 | 275 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 277 | 276 | ROM_LOAD( "a17_prom.bin", 0x0000, 0x0020, CRC(22ad2c3e) SHA1(1c2198b286c75aa9e78d000432795b1ce86ad6b9) ) |
| 278 | 277 | ROM_LOAD( "b16_prom.bin", 0x0020, 0x0100, CRC(750a9677) SHA1(7a5b4aed5f87180850657b8852bb3f3138d58b5b) ) |
| r1679 | r1680 | |
| 291 | 290 | ROM_LOAD( "rnr_7a.snd", 0x0000, 0x1000, CRC(75d2c4e2) SHA1(b701019b4e7b06b268be660ce7958b5367318c27) ) |
| 292 | 291 | ROM_LOAD( "rnr_8a.snd", 0x1000, 0x1000, CRC(ca4325ae) SHA1(34ac035c0c2ed6bcafde1491d976bb9e9d2a2a7d) ) |
| 293 | 292 | |
| 294 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 295 | ROM_LOAD( "rnr_h12.vid", 0x0000, 0x2000, CRC(e2114539) SHA1(0ea19ae4d7c2da14f23c81abb8e2c931785b2715) ) | |
| 296 | ROM_LOAD( "rnr_h11.vid", 0x2000, 0x2000, CRC(169a8f3f) SHA1(182c7c9b9849ebb57b3ff7c0b629f2f8e2efa9ba) ) | |
| 297 | ||
| 298 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 293 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 299 | 294 | ROM_LOAD( "rnr_a11.vid", 0x0000, 0x2000, CRC(afdaba5e) SHA1(27c090cb1c3767c997daeedbe1ba24786f9e78f1) ) |
| 300 | 295 | ROM_LOAD( "rnr_a12.vid", 0x2000, 0x2000, CRC(054cafeb) SHA1(4c3cd850b347217af3dd5c9bb84bcff7b30689bd) ) |
| 301 | 296 | ROM_LOAD( "rnr_a9.vid", 0x4000, 0x2000, CRC(9d2166b2) SHA1(42d2b05360e58b1b2b3ad06c98eb46d9da2b1c21) ) |
| 302 | 297 | ROM_LOAD( "rnr_a10.vid", 0x6000, 0x2000, CRC(aff6e22f) SHA1(476d67821519feddc9f9c8537b46e6eede790035) ) |
| 303 | 298 | |
| 299 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 300 | ROM_LOAD( "rnr_h12.vid", 0x0000, 0x2000, CRC(e2114539) SHA1(0ea19ae4d7c2da14f23c81abb8e2c931785b2715) ) | |
| 301 | ROM_LOAD( "rnr_h11.vid", 0x2000, 0x2000, CRC(169a8f3f) SHA1(182c7c9b9849ebb57b3ff7c0b629f2f8e2efa9ba) ) | |
| 302 | ||
| 304 | 303 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 305 | 304 | ROM_LOAD( "a17_prom.bin", 0x0000, 0x0020, CRC(22ad2c3e) SHA1(1c2198b286c75aa9e78d000432795b1ce86ad6b9) ) |
| 306 | 305 | ROM_LOAD( "b16_prom.bin", 0x0020, 0x0100, CRC(750a9677) SHA1(7a5b4aed5f87180850657b8852bb3f3138d58b5b) ) |
| r1679 | r1680 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | #include "driver.h" |
| 26 | 26 | #include "machine/6821pia.h" |
| 27 | #include "video/ | |
| 27 | #include "video/m | |
| 28 | 28 | #include "sound/ay8910.h" |
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | static UINT8 *attr_ram1, *attr_ram2; |
| 32 | static mc6845_t *mc6845; | |
| 32 | 33 | static tilemap *bg_tilemap; |
| 33 | 34 | |
| 34 | 35 | static UINT8 question_adr[4]; |
| r1679 | r1680 | |
| 115 | 116 | question_adr[offset] = data; |
| 116 | 117 | } |
| 117 | 118 | |
| 119 | static WRITE8_HANDLER( coinmstr_mc6845_address_w ) | |
| 120 | { | |
| 121 | mc6845_address_w(mc6845, data); | |
| 122 | } | |
| 123 | ||
| 124 | static WRITE8_HANDLER( coinmstr_mc6845_register_w ) | |
| 125 | { | |
| 126 | mc6845_register_w(mc6845, data); | |
| 127 | } | |
| 128 | ||
| 118 | 129 | // Common memory map |
| 119 | 130 | |
| 120 | 131 | static ADDRESS_MAP_START( coinmstr_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1679 | r1680 | |
| 138 | 149 | AM_RANGE(0x50, 0x53) AM_READNOP |
| 139 | 150 | AM_RANGE(0x50, 0x53) AM_WRITENOP |
| 140 | 151 | AM_RANGE(0x58, 0x5b) AM_READWRITE(pia_2_r, pia_2_w) |
| 141 | AM_RANGE(0x70, 0x70) AM_WRITE(crtc6845_address_w) | |
| 142 | AM_RANGE(0x71, 0x71) AM_WRITE(crtc6845_register_w) | |
| 152 | AM_RANGE(0x70, 0x70) AM_WRITE(coinmstr_mc6845_address_w) | |
| 153 | AM_RANGE(0x71, 0x71) AM_WRITE(coinmstr_mc6845_register_w) | |
| 143 | 154 | AM_RANGE(0xc0, 0xc3) AM_READNOP |
| 144 | 155 | AM_RANGE(0xc0, 0xc3) AM_WRITENOP |
| 145 | 156 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 148 | 159 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 149 | 160 | AM_RANGE(0x00, 0x00) AM_READ(question_r) |
| 150 | 161 | AM_RANGE(0x00, 0x03) AM_WRITE(question_w) |
| 151 | AM_RANGE(0x40, 0x40) AM_WRITE(crtc6845_address_w) | |
| 152 | AM_RANGE(0x41, 0x41) AM_WRITE(crtc6845_register_w) | |
| 162 | AM_RANGE(0x40, 0x40) AM_WRITE(coinmstr_mc6845_address_w) | |
| 163 | AM_RANGE(0x41, 0x41) AM_WRITE(coinmstr_mc6845_register_w) | |
| 153 | 164 | AM_RANGE(0x48, 0x48) AM_WRITE(AY8910_control_port_0_w) |
| 154 | 165 | AM_RANGE(0x49, 0x49) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) |
| 155 | 166 | AM_RANGE(0x50, 0x53) AM_READWRITE(pia_0_r, pia_0_w) //? |
| r1679 | r1680 | |
| 165 | 176 | AM_RANGE(0x40, 0x41) AM_READNOP |
| 166 | 177 | AM_RANGE(0x40, 0x43) AM_WRITENOP |
| 167 | 178 | AM_RANGE(0x43, 0x43) AM_READNOP |
| 168 | AM_RANGE(0x48, 0x48) AM_WRITE(crtc6845_address_w) | |
| 169 | AM_RANGE(0x49, 0x49) AM_WRITE(crtc6845_register_w) | |
| 179 | AM_RANGE(0x48, 0x48) AM_WRITE(coinmstr_mc6845_address_w) | |
| 180 | AM_RANGE(0x49, 0x49) AM_WRITE(coinmstr_mc6845_register_w) | |
| 170 | 181 | AM_RANGE(0x50, 0x51) AM_READNOP |
| 171 | 182 | AM_RANGE(0x50, 0x53) AM_WRITENOP |
| 172 | 183 | AM_RANGE(0x53, 0x53) AM_READNOP |
| r1679 | r1680 | |
| 533 | 544 | |
| 534 | 545 | static VIDEO_START( coinmstr ) |
| 535 | 546 | { |
| 536 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 46, 64); | |
| 547 | mc6845 = mc6845_config(NULL); | |
| 548 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8, 8, 46, 64); | |
| 537 | 549 | } |
| 538 | 550 | |
| 539 | 551 | static VIDEO_UPDATE( coinmstr ) |
| r1679 | r1680 | |
|---|---|---|
| 36 | 36 | if (p1 == 0) |
| 37 | 37 | { |
| 38 | 38 | UINT8 p2 = ram[BYTE4_XOR_BE(fb_index + i)]; |
| 39 | bmp[i] = machine-> | |
| 39 | bmp[i] = machine-> | |
| 40 | 40 | } |
| 41 | 41 | else |
| 42 | 42 | { |
| 43 | bmp[i] = machine-> | |
| 43 | bmp[i] = machine-> | |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
| r1679 | r1680 | |
| 223 | 223 | PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_Y ) PORT_MINMAX(0x000,0xfff) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) |
| 224 | 224 | |
| 225 | 225 | PORT_START |
| 226 | PORT_ | |
| 226 | PORT_SERVICE_NO_TOGGLE( 0x1, IP_ACTIVE_LOW | |
| 227 | 227 | |
| 228 | 228 | INPUT_PORTS_END |
| 229 | 229 |
| r1679 | r1680 | |
|---|---|---|
| 248 | 248 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 249 | 249 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 250 | 250 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 251 | PORT_ | |
| 251 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 252 | 252 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* Video Freeze */ |
| 253 | 253 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Vault Switch") PORT_CODE(KEYCODE_9) |
| 254 | 254 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 ) |
| r1679 | r1680 | |
| 302 | 302 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 303 | 303 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 304 | 304 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 305 | PORT_ | |
| 305 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 306 | 306 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 307 | 307 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 308 | 308 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| r1679 | r1680 | |
| 401 | 401 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 402 | 402 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 403 | 403 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 404 | PORT_ | |
| 404 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 405 | 405 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 406 | 406 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 407 | 407 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| r1679 | r1680 | |
| 497 | 497 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 498 | 498 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 499 | 499 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 500 | PORT_ | |
| 500 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 501 | 501 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 502 | 502 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 503 | 503 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 593 | 593 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 594 | 594 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 595 | 595 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 596 | PORT_ | |
| 596 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 597 | 597 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 598 | 598 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 599 | 599 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| r1679 | r1680 | |
| 685 | 685 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 686 | 686 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 687 | 687 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 688 | PORT_ | |
| 688 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 689 | 689 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 690 | 690 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 691 | 691 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| r1679 | r1680 | |
| 772 | 772 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 773 | 773 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 774 | 774 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 775 | PORT_ | |
| 775 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 776 | 776 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 777 | 777 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 778 | 778 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 878 | 878 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 879 | 879 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 880 | 880 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 881 | PORT_ | |
| 881 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 882 | 882 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 883 | 883 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 884 | 884 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| r1679 | r1680 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | static VIDEO_START(hitme) |
| 58 | 58 | { |
| 59 | hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows, | |
| 59 | hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows, | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | static VIDEO_START(barricad) |
| 64 | 64 | { |
| 65 | hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows, | |
| 65 | hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows, | |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | */ |
| 96 | 96 | |
| 97 | 97 | #include "driver.h" |
| 98 | #include "video/ | |
| 98 | #include "video/m | |
| 99 | 99 | |
| 100 | static mc6845_t *mc6845; | |
| 100 | 101 | static UINT8 *murogem_videoram; |
| 101 | 102 | |
| 103 | ||
| 104 | static WRITE8_HANDLER( murogem_mc6845_address_w ) | |
| 105 | { | |
| 106 | mc6845_address_w(mc6845, data); | |
| 107 | } | |
| 108 | ||
| 109 | static WRITE8_HANDLER( murogem_mc6845_register_w ) | |
| 110 | { | |
| 111 | mc6845_register_w(mc6845, data); | |
| 112 | } | |
| 113 | ||
| 114 | ||
| 102 | 115 | static ADDRESS_MAP_START( murogem_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 103 | 116 | AM_RANGE(0x0000, 0x007f) AM_RAM |
| 104 | AM_RANGE(0x4000, 0x4000) AM_WRITE(crtc6845_address_w) | |
| 105 | AM_RANGE(0x4001, 0x4001) AM_WRITE(crtc6845_register_w) | |
| 117 | AM_RANGE(0x4000, 0x4000) AM_WRITE(murogem_mc6845_address_w) | |
| 118 | AM_RANGE(0x4001, 0x4001) AM_WRITE(murogem_mc6845_register_w) | |
| 106 | 119 | AM_RANGE(0x5000, 0x5000) AM_READ(input_port_0_r) |
| 107 | 120 | AM_RANGE(0x5800, 0x5800) AM_READ(input_port_1_r) |
| 108 | 121 | AM_RANGE(0x7000, 0x7000) AM_WRITE(MWA8_NOP) // sound? payout? |
| r1679 | r1680 | |
| 167 | 180 | |
| 168 | 181 | static VIDEO_START(murogem) |
| 169 | 182 | { |
| 183 | mc6845 = mc6845_config(NULL); | |
| 170 | 184 | } |
| 171 | 185 | |
| 172 | 186 | static VIDEO_UPDATE(murogem) |
| r1679 | r1680 | |
|---|---|---|
| 288 | 288 | OKIM6295_data_0_w(0,0x40); |
| 289 | 289 | OKIM6295_data_0_w(0,(0x80 | data)); |
| 290 | 290 | OKIM6295_data_0_w(0,0x81); |
| 291 | timer_adjust(music_timer, ATTOTIME_IN_MSEC(4), 0, ATTOTIME_IN_HZ(250)); /* 250Hz for smooth sequencing */ | |
| 291 | timer_adjust_periodic(music_timer, ATTOTIME_IN_MSEC(4), 0, ATTOTIME_IN_HZ(250)); /* 250Hz for smooth sequencing */ | |
| 292 | 292 | } |
| 293 | 293 | } |
| 294 | 294 | else { |
| r1679 | r1680 | |
|---|---|---|
| 111 | 111 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 112 | 112 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 113 | 113 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 114 | PORT_ | |
| 114 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 115 | 115 | PORT_BIT( 0x00f0, IP_ACTIVE_HIGH, IPT_VBLANK ) // all bits? check.. |
| 116 | 116 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom?.. |
| 117 | 117 |
| r1679 | r1680 | |
|---|---|---|
| 252 | 252 | if ( phillips_code & 0x800000 ) |
| 253 | 253 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); |
| 254 | 254 | |
| 255 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 255 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | static void vdp_interrupt (int state) |
| r1679 | r1680 | |
| 272 | 272 | { |
| 273 | 273 | port_bank = 0; |
| 274 | 274 | phillips_code = 0; |
| 275 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, 17, 0), 17 | |
| 275 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, 17, 0), 17 | |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | /********************************************************/ |
| r1679 | r1680 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | static VIDEO_START( zerotrgt ) |
| 84 | 84 | { |
| 85 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16,64,64); | |
| 86 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows_flip_x,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 85 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16,16,64,64); | |
| 86 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows_flip_x,8, 8,32,32); | |
| 87 | 87 | |
| 88 | 88 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 89 | 89 |
| r1679 | r1680 | |
|---|---|---|
| 324 | 324 | |
| 325 | 325 | if (chip == 0) |
| 326 | 326 | { |
| 327 | K037122_layer[chip][0] = tilemap_create(K037122_0_tile_info_layer0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 328 | K037122_layer[chip][1] = tilemap_create(K037122_0_tile_info_layer1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 128, 64); | |
| 327 | K037122_layer[chip][0] = tilemap_create(K037122_0_tile_info_layer0, tilemap_scan_rows, 8, 8, 256, 64); | |
| 328 | K037122_layer[chip][1] = tilemap_create(K037122_0_tile_info_layer1, tilemap_scan_rows, 8, 8, 128, 64); | |
| 329 | 329 | } |
| 330 | 330 | else |
| 331 | 331 | { |
| 332 | K037122_layer[chip][0] = tilemap_create(K037122_1_tile_info_layer0, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 256, 64); | |
| 333 | K037122_layer[chip][1] = tilemap_create(K037122_1_tile_info_layer1, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 128, 64); | |
| 332 | K037122_layer[chip][0] = tilemap_create(K037122_1_tile_info_layer0, tilemap_scan_rows, 8, 8, 256, 64); | |
| 333 | K037122_layer[chip][1] = tilemap_create(K037122_1_tile_info_layer1, tilemap_scan_rows, 8, 8, 128, 64); | |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | tilemap_set_transparent_pen(K037122_layer[chip][0], 0); |
| r1679 | r1680 | |
| 767 | 767 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 768 | 768 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 769 | 769 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 770 | PORT_ | |
| 770 | PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW | |
| 771 | 771 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 772 | 772 | |
| 773 | 773 | PORT_START |
| r1679 | r1680 | |
| 815 | 815 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 816 | 816 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 817 | 817 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 818 | PORT_ | |
| 818 | PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW | |
| 819 | 819 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 820 | 820 | |
| 821 | 821 | PORT_START |
| r1679 | r1680 | |
|---|---|---|
| 165 | 165 | break; |
| 166 | 166 | |
| 167 | 167 | /* next one at the start of this scanline */ |
| 168 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, curscanline, 0), curscanline | |
| 168 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, curscanline, 0), curscanline | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 |
| r1679 | r1680 | |
|---|---|---|
| 258 | 258 | /* this value is latched into up-counters, which are clocked at the */ |
| 259 | 259 | /* input clock / 256 */ |
| 260 | 260 | attotime nmi_rate = attotime_mul(ATTOTIME_IN_HZ(4000000), 4096 * (256 - data)); |
| 261 | timer_adjust(sound_nmi_timer, nmi_rate, 0, nmi_rate); | |
| 261 | timer_adjust_periodic(sound_nmi_timer, nmi_rate, 0, nmi_rate); | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 |
| r1679 | r1680 | |
|---|---|---|
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | static void draw_char(mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 172 | static void draw_char(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 173 | 173 | { |
| 174 | 174 | int i,j; |
| 175 | 175 | UINT8 *dp; |
| r1679 | r1680 | |
| 183 | 183 | { |
| 184 | 184 | UINT8 pen = dp[index++]; |
| 185 | 185 | if (pen) |
| 186 | { | |
| 187 | p[i] = Machine->remapped_colortable[gfx->color_base + (att & 0xf)]; | |
| 188 | } | |
| 186 | p[i] = machine->pens[gfx->color_base + (att & 0xf)]; | |
| 189 | 187 | else |
| 190 | 188 | { |
| 191 | 189 | if (((att >> 4) & 7) > 0) |
| 192 | { | |
| 193 | p[i] = Machine->remapped_colortable[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 194 | } | |
| 190 | p[i] = machine->pens[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 195 | 191 | } |
| 196 | 192 | } |
| 197 | 193 | } |
| r1679 | r1680 | |
| 304 | 300 | int att1 = (cga[index] >> 24) & 0xff; |
| 305 | 301 | int ch1 = (cga[index] >> 16) & 0xff; |
| 306 | 302 | |
| 307 | draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 308 | draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 303 | draw_char(machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 304 | draw_char(machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 309 | 305 | index++; |
| 310 | 306 | } |
| 311 | 307 | } |
| r1679 | r1680 | |
| 643 | 639 | static TIMER_CALLBACK( sound_timer_callback ) |
| 644 | 640 | { |
| 645 | 641 | ad1847_sample_counter = 0; |
| 646 | timer_adjust(sound_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 642 | timer_adjust_oneshot(sound_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 647 | 643 | |
| 648 | 644 | dmadac_transfer(0, 1, 0, 1, dacl_ptr, dacl); |
| 649 | 645 | dmadac_transfer(1, 1, 0, 1, dacr_ptr, dacr); |
| r1679 | r1680 | |
| 782 | 778 | |
| 783 | 779 | static INPUT_PORTS_START(mediagx) |
| 784 | 780 | PORT_START |
| 785 | PORT_ | |
| 781 | PORT_SERVICE_NO_TOGGLE( 0x001, IP_ACTIVE_HIGH | |
| 786 | 782 | PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 787 | 783 | PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_SERVICE2 ) |
| 788 | 784 | PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_VOLUME_DOWN ) |
| r1679 | r1680 | |
| 860 | 856 | dacr = auto_malloc(65536 * sizeof(INT16)); |
| 861 | 857 | |
| 862 | 858 | sound_timer = timer_alloc(sound_timer_callback, NULL); |
| 863 | timer_adjust(sound_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 859 | timer_adjust_oneshot(sound_timer, ATTOTIME_IN_MSEC(10), 0 | |
| 864 | 860 | |
| 865 | 861 | dmadac_enable(0, 2, 1); |
| 866 | 862 | ide_controller_reset(0); |
| r1679 | r1680 | |
|---|---|---|
| 383 | 383 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 384 | 384 | |
| 385 | 385 | PORT_START |
| 386 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown )) | |
| 387 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 388 | PORT_DIPSETTING( 0x01, DEF_STR( On )) | |
| 389 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown )) | |
| 390 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 391 | PORT_DIPSETTING( 0x02, DEF_STR( On )) | |
| 392 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown )) | |
| 393 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 394 | PORT_DIPSETTING( 0x04, DEF_STR( On )) | |
| 395 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown )) | |
| 396 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 397 | PORT_DIPSETTING( 0x08, DEF_STR( On )) | |
| 398 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown )) | |
| 399 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 400 | PORT_DIPSETTING( 0x10, DEF_STR( On )) | |
| 401 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown )) /* Manuals show dips 1 through 6 as unused */ | |
| 402 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) | |
| 403 | PORT_DIPSETTING( 0x20, DEF_STR( On )) | |
| 404 | PORT_DIPNAME( 0x40, 0x40, "Monitor Sync") | |
| 386 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:1" ) | |
| 387 | PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:2" ) | |
| 388 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:3" ) | |
| 389 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW1:4" ) | |
| 390 | PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW1:5" ) | |
| 391 | PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" ) | |
| 392 | PORT_DIPNAME( 0x40, 0x40, "Monitor Sync") PORT_DIPLOCATION("SW1:7") | |
| 405 | 393 | PORT_DIPSETTING( 0x00, "+") |
| 406 | 394 | PORT_DIPSETTING( 0x40, "-") |
| 407 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen )) /* For use with mirrored CRTs - Not supported */ | |
| 395 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen )) PORT_DIPLOCATION("SW1:8") /* For use with mirrored CRTs - Not supported */ | |
| 408 | 396 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 409 | 397 | PORT_DIPSETTING( 0x80, DEF_STR( On )) /* Will invert the Y axis of guns */ |
| 410 | 398 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 1211 | 1211 | PORT_START_TAG("IN2") |
| 1212 | 1212 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 1213 | 1213 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 1214 | PORT_ | |
| 1214 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1215 | 1215 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Coin") PORT_CODE(KEYCODE_7) |
| 1216 | 1216 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1217 | 1217 | |
| r1679 | r1680 | |
| 1315 | 1315 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Ron") PORT_CODE(KEYCODE_Z) |
| 1316 | 1316 | |
| 1317 | 1317 | PORT_START_TAG("IN2") |
| 1318 | PORT_ | |
| 1318 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1319 | 1319 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Coin") PORT_CODE(KEYCODE_7) |
| 1320 | 1320 | PORT_BIT( 0xf3, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1321 | 1321 |
| r1679 | r1680 | |
|---|---|---|
| 184 | 184 | if (!memcmp(nvram_unlock_seq, nvram_write_seq, sizeof(nvram_unlock_seq))) |
| 185 | 185 | { |
| 186 | 186 | nvram_write_enable = 1; |
| 187 | timer_adjust(nvram_write_timer, ATTOTIME_IN_MSEC(1000), 0 | |
| 187 | timer_adjust_oneshot(nvram_write_timer, ATTOTIME_IN_MSEC(1000), 0 | |
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 |
| r1679 | r1680 | |
|---|---|---|
| 310 | 310 | |
| 311 | 311 | static VIDEO_START( mwarr ) |
| 312 | 312 | { |
| 313 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN, 16, 16,64,16); | |
| 314 | mlow_tilemap = tilemap_create(get_mlow_tile_info, tilemap_scan_cols,TILEMAP_TYPE_PEN, 16, 16,64,16); | |
| 315 | mhigh_tilemap = tilemap_create(get_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN, 16, 16,64,16); | |
| 316 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 313 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, 16, 16,64,16); | |
| 314 | mlow_tilemap = tilemap_create(get_mlow_tile_info, tilemap_scan_cols, 16, 16,64,16); | |
| 315 | mhigh_tilemap = tilemap_create(get_mhigh_tile_info,tilemap_scan_cols, 16, 16,64,16); | |
| 316 | tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_rows, 8, 8,64,32); | |
| 317 | 317 | |
| 318 | 318 | sprites_buffer = auto_malloc(sizeof(UINT16) * 0x800); |
| 319 | 319 |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 92 | 92 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 93 | 93 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 94 | PORT_ | |
| 94 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 95 | 95 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 96 | 96 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 97 | 97 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 189 | 189 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 190 | 190 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 191 | 191 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 192 | PORT_ | |
| 192 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 193 | 193 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 194 | 194 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 195 | 195 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 296 | 296 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 297 | 297 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 298 | 298 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 299 | PORT_ | |
| 299 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 300 | 300 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 301 | 301 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 302 | 302 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 392 | 392 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 393 | 393 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 394 | 394 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 395 | PORT_ | |
| 395 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW | |
| 396 | 396 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 397 | 397 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 398 | 398 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 495 | 495 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 496 | 496 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 497 | 497 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 498 | PORT_ | |
| 498 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 499 | 499 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 500 | 500 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 501 | 501 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | WRITE8_HANDLER( drmicro_flipscreen_w ); |
| 22 | 22 | WRITE8_HANDLER( drmicro_priority_w ); |
| 23 | 23 | |
| 24 | READ8_HANDLER( drmicro_videoram_r ); | |
| 25 | 24 | WRITE8_HANDLER( drmicro_videoram_w ); |
| 26 | 25 | |
| 27 | 26 | extern void drmicro_flip_w( int flip ); |
| r1679 | r1680 | |
| 77 | 76 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 78 | 77 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) |
| 79 | 78 | AM_RANGE(0xc000, 0xdfff) AM_READ(MRA8_RAM) |
| 80 | AM_RANGE(0xe000, 0xefff) AM_READ( | |
| 79 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8 | |
| 81 | 80 | AM_RANGE(0xf000, 0xffff) AM_READ(MRA8_RAM) |
| 82 | 81 | ADDRESS_MAP_END |
| 83 | 82 | |
| r1679 | r1680 | |
| 245 | 244 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 246 | 245 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 247 | 246 | MDRV_GFXDECODE(drmicro) |
| 248 | MDRV_PALETTE_LENGTH(32) | |
| 249 | MDRV_COLORTABLE_LENGTH(512) | |
| 247 | MDRV_PALETTE_LENGTH(512) | |
| 250 | 248 | |
| 251 | 249 | MDRV_PALETTE_INIT(drmicro) |
| 252 | 250 | MDRV_VIDEO_START(drmicro) |
| r1679 | r1680 | |
|---|---|---|
| 88 | 88 | static VIDEO_START(vroulet) |
| 89 | 89 | { |
| 90 | 90 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 91 | | |
| 91 | | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | static VIDEO_UPDATE(vroulet) |
| r1679 | r1680 | |
|---|---|---|
| 413 | 413 | #define IN0_PORT \ |
| 414 | 414 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \ |
| 415 | 415 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \ |
| 416 | PORT_ | |
| 416 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 417 | 417 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 418 | 418 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 419 | 419 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) \ |
| r1679 | r1680 | |
| 955 | 955 | PORT_START /* IN0 */ |
| 956 | 956 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 957 | 957 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 958 | PORT_ | |
| 958 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 959 | 959 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 960 | 960 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 961 | 961 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r1679 | r1680 | |
| 2316 | 2316 | PORT_START /* IN0 */ |
| 2317 | 2317 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2318 | 2318 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2319 | PORT_ | |
| 2319 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 2320 | 2320 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2321 | 2321 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 2322 | 2322 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r1679 | r1680 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | static VIDEO_START( cultures ) |
| 45 | 45 | { |
| 46 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,512,512); | |
| 47 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,512,512); | |
| 48 | bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8, 64,128); | |
| 46 | bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,8,8,512,512); | |
| 47 | bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,8,8,512,512); | |
| 48 | bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,8,8, 64,128); | |
| 49 | 49 | |
| 50 | 50 | tilemap_set_transparent_pen(bg1_tilemap,0); |
| 51 | 51 | tilemap_set_transparent_pen(bg0_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 164 | 164 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 165 | 165 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) |
| 166 | 166 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START2 ) |
| 167 | PORT_ | |
| 167 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW | |
| 168 | 168 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 169 | 169 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 170 | 170 | |
| r1679 | r1680 | |
| 329 | 329 | static MACHINE_RESET( powerins ) |
| 330 | 330 | { |
| 331 | 331 | oki_bank = -1; // samples bank "unitialised" |
| 332 | NMK112_init(0); | |
| 332 | 333 | } |
| 333 | 334 | |
| 334 | 335 |
| r1679 | r1680 | |
|---|---|---|
| 241 | 241 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 242 | 242 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 243 | 243 | MDRV_GFXDECODE(exedexes) |
| 244 | MDRV_PALETTE_LENGTH(256) | |
| 245 | MDRV_COLORTABLE_LENGTH(64*4+64*4+16*16+16*16) | |
| 244 | MDRV_PALETTE_LENGTH(64*4+64*4+16*16+16*16) | |
| 246 | 245 | |
| 247 | 246 | MDRV_PALETTE_INIT(exedexes) |
| 248 | 247 | MDRV_VIDEO_START(exedexes) |
| r1679 | r1680 | |
|---|---|---|
| 151 | 151 | scanline += 32; |
| 152 | 152 | if (scanline > 256) |
| 153 | 153 | scanline = 32; |
| 154 | timer_adjust(jedi_timer,video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 154 | timer_adjust_oneshot(jedi_timer,video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
| r1679 | r1680 | |
| 171 | 171 | { |
| 172 | 172 | /* set a timer to run the interrupts */ |
| 173 | 173 | jedi_timer = timer_alloc(generate_interrupt, NULL); |
| 174 | timer_adjust(jedi_timer,video_screen_get_time_until_pos(0, 32, 0), 32 | |
| 174 | timer_adjust_oneshot(jedi_timer,video_screen_get_time_until_pos(0, 32, 0), 32 | |
| 175 | 175 | |
| 176 | 176 | /* configure the banks */ |
| 177 | 177 | memory_configure_bank(1, 0, 3, memory_region(REGION_CPU1) + 0x10000, 0x4000); |
| r1679 | r1680 | |
|---|---|---|
| 680 | 680 | |
| 681 | 681 | static VIDEO_START(witch) |
| 682 | 682 | { |
| 683 | gfx0a_tilemap = tilemap_create(get_gfx0a_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 684 | gfx0b_tilemap = tilemap_create(get_gfx0b_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 685 | gfx1_tilemap = tilemap_create(get_gfx1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 683 | gfx0a_tilemap = tilemap_create(get_gfx0a_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 684 | gfx0b_tilemap = tilemap_create(get_gfx0b_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 685 | gfx1_tilemap = tilemap_create(get_gfx1_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 686 | 686 | |
| 687 | 687 | tilemap_set_transparent_pen(gfx0a_tilemap,0); |
| 688 | 688 | tilemap_set_transparent_pen(gfx0b_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 182 | 182 | UINT16 v = paletteram32[offset] >> 16; |
| 183 | 183 | UINT16 triggerscanline=(((v>>8)&0xff)|((v&0xff)<<8))-(32+1); |
| 184 | 184 | |
| 185 | timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, triggerscanline, 0), 0 | |
| 185 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_time_until_pos(0, triggerscanline, 0), 0 | |
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | |
| r1679 | r1680 | |
| 211 | 211 | PORT_START |
| 212 | 212 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 213 | 213 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 214 | PORT_ | |
| 214 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH | |
| 215 | 215 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 216 | 216 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 217 | 217 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 329 | 329 | { |
| 330 | 330 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 331 | 331 | cpunum_set_input_line(machine, 0, I960_IRQ1, ASSERT_LINE); |
| 332 | timer_adjust(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 332 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 |
| r1679 | r1680 | |
|---|---|---|
| 2147 | 2147 | PORT_START_TAG("IN2") |
| 2148 | 2148 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B" |
| 2149 | 2149 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B" |
| 2150 | PORT_SERVICE(0x04, IP_ACTIVE_LOW ) // Test (there isn't a dip switch) | |
| 2150 | PORT_SERVICE(0x04, IP_ACTIVE_LOW ) // Test (there isn't a dip switch) | |
| 2151 | 2151 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer |
| 2152 | 2152 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) // Memory Reset |
| 2153 | 2153 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B" |
| r1679 | r1680 | |
| 2160 | 2160 | |
| 2161 | 2161 | static INPUT_PORTS_START( mjdialq2 ) |
| 2162 | 2162 | PORT_START_TAG("DSW0") |
| 2163 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 2164 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2165 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2166 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 2167 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2168 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2163 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) | |
| 2164 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 2165 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) | |
| 2166 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 2167 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) | |
| 2169 | 2168 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2170 | 2169 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2171 | 2170 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 2186 | 2185 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2187 | 2186 | |
| 2188 | 2187 | PORT_START_TAG("DSW1") |
| 2189 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 2190 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2191 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2192 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 2193 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2194 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2195 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 2196 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2197 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2188 | PORT_DIPNAME( 0x07, 0x07, "Time Setting" ) | |
| 2189 | PORT_DIPSETTING( 0x07, "08:30" ) | |
| 2190 | PORT_DIPSETTING( 0x06, "09:00" ) | |
| 2191 | PORT_DIPSETTING( 0x05, "09:30" ) | |
| 2192 | PORT_DIPSETTING( 0x04, "10:00" ) | |
| 2193 | PORT_DIPSETTING( 0x03, "10:30" ) | |
| 2194 | PORT_DIPSETTING( 0x02, "11:00" ) | |
| 2195 | PORT_DIPSETTING( 0x01, "11:30" ) | |
| 2196 | PORT_DIPSETTING( 0x00, "12:00" ) | |
| 2198 | 2197 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 2199 | 2198 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2200 | 2199 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 2204 | 2203 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 2205 | 2204 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2206 | 2205 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2207 | PORT_DIPNAME( 0x40, 0x40, | |
| 2206 | PORT_DIPNAME( 0x40, 0x40, " | |
| 2208 | 2207 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2209 | 2208 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2210 | 2209 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| r1679 | r1680 | |
| 2214 | 2213 | PORT_START_TAG("IN2") |
| 2215 | 2214 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "17B" |
| 2216 | 2215 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "18B" |
| 2217 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) // Test (there isn't a dip switch) | |
| 2216 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) // Test (there isn't a dip switch) | |
| 2218 | 2217 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer |
| 2219 | 2218 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) // Memory Reset |
| 2220 | 2219 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "06B" |
| r1679 | r1680 | |
| 2459 | 2458 | PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) |
| 2460 | 2459 | // PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 2461 | 2460 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) |
| 2462 | PORT_DIPNAME( 0x20, 0x20, | |
| 2461 | PORT_DIPNAME( 0x20, 0x20, "Auto | |
| 2463 | 2462 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2464 | 2463 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2465 | 2464 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) |
| r1679 | r1680 | |
| 2470 | 2469 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2471 | 2470 | |
| 2472 | 2471 | PORT_START_TAG("DSW1") |
| 2473 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Unknown ) ) | |
| 2474 | PORT_DIPSETTING( 0x07, "0" ) | |
| 2475 | PORT_DIPSETTING( 0x06, "1" ) | |
| 2476 | PORT_DIPSETTING( 0x05, "2" ) | |
| 2477 | PORT_DIPSETTING( 0x04, "3" ) | |
| 2478 | PORT_DIPSETTING( 0x03, "4" ) | |
| 2479 | PORT_DIPSETTING( 0x02, "5" ) | |
| 2480 | PORT_DIPSETTING( 0x01, "6" ) | |
| 2481 | PORT_DIPSETTING( 0x00, "7" ) | |
| 2472 | PORT_DIPNAME( 0x07, 0x07, "Time Setting" ) | |
| 2473 | PORT_DIPSETTING( 0x07, "8:30" ) | |
| 2474 | PORT_DIPSETTING( 0x06, "9:00" ) | |
| 2475 | PORT_DIPSETTING( 0x05, "9:30" ) | |
| 2476 | PORT_DIPSETTING( 0x04, "10:00" ) | |
| 2477 | PORT_DIPSETTING( 0x03, "10:30" ) | |
| 2478 | PORT_DIPSETTING( 0x02, "11:00" ) | |
| 2479 | PORT_DIPSETTING( 0x01, "11:30" ) | |
| 2480 | PORT_DIPSETTING( 0x00, "12:00" ) | |
| 2482 | 2481 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 2483 | 2482 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2484 | 2483 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2485 | PORT_DIPNAME( 0x10, 0x10, " | |
| 2484 | PORT_DIPNAME( 0x10, 0x10, "Buy Screen Bonus Points" ) /* Sets yo | |
| 2486 | 2485 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2487 | 2486 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2488 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) //* | |
| 2487 | /* make your game last at least 4 or 5 minutes. Continue if necessary. Before the next round you begin, | |
| 2488 | you will get some sort of message in Japanese stating that it is some sort of lucky time of day for you, and | |
| 2489 | you get 100 bonus points (for purchasing items). */ | |
| 2490 | PORT_DIPNAME( 0x20, 0x20, "Lucky Time Of Day Bonus" ) | |
| 2489 | 2491 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2490 | 2492 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2491 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2493 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2492 | 2494 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2493 | 2495 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2494 | 2496 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| r1679 | r1680 | |
| 2624 | 2626 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2625 | 2627 | |
| 2626 | 2628 | PORT_START_TAG("DSW1") |
| 2627 | PORT_DIPNAME( 0x07, 0x07, " | |
| 2629 | PORT_DIPNAME( 0x07, 0x07, "Time Setting" ) | |
| 2628 | 2630 | PORT_DIPSETTING( 0x07, "08:30" ) |
| 2629 | 2631 | PORT_DIPSETTING( 0x06, "09:00" ) |
| 2630 | 2632 | PORT_DIPSETTING( 0x05, "09:30" ) |
| r1679 | r1680 | |
| 2636 | 2638 | PORT_DIPNAME( 0x08, 0x08, "Moles On Gal's Face" ) |
| 2637 | 2639 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2638 | 2640 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2639 | PORT_DIPNAME( 0x10, 0x10, " | |
| 2641 | PORT_DIPNAME( 0x10, 0x10, "Buy Screen Bonus Points" ) /* Sets your points to 100 every time you arrive | |
| 2640 | 2642 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2641 | 2643 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2642 | PORT_DIPNAME( 0x20, 0x20, "Bonus Coin Every" ) | |
| 2643 | PORT_DIPSETTING( 0x00, "30" ) | |
| 2644 | PORT_DIPSETTING( 0x20, "150" ) | |
| 2644 | /* make your game last at least 4 or 5 minutes. Continue if necessary. Before the next round you begin, | |
| 2645 | you will get some sort of message in Japanese stating that it is some sort of lucky time of day for you, and | |
| 2646 | you get 100 bonus points (for purchasing items). */ | |
| 2647 | PORT_DIPNAME( 0x20, 0x20, "Lucky Time Of Day Bonus" ) | |
| 2648 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2649 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2645 | 2650 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) //* |
| 2646 | 2651 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2647 | 2652 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 3077 | 3082 | |
| 3078 | 3083 | static INPUT_PORTS_START( neruton ) |
| 3079 | 3084 | PORT_START_TAG("DSW2") //6a77 (select = 00) |
| 3080 | PORT_DIPNAME( 0x07, 0x07, " | |
| 3085 | PORT_DIPNAME( 0x07, 0x07, "Time Setting" ) | |
| 3081 | 3086 | PORT_DIPSETTING( 0x07, "08:30" ) |
| 3082 | 3087 | PORT_DIPSETTING( 0x06, "09:00" ) |
| 3083 | 3088 | PORT_DIPSETTING( 0x05, "09:30" ) |
| r1679 | r1680 | |
|---|---|---|
| 280 | 280 | MACHINE_DRIVER_END |
| 281 | 281 | |
| 282 | 282 | |
| 283 | ROM_START( contra ) | |
| 284 | ROM_REGION( 0x28000, REGION_CPU1, 0 ) /* 64k for code + 96k for banked ROMs */ | |
| 285 | ROM_LOAD( "633m03.18a", 0x20000, 0x08000, CRC(d045e1da) SHA1(ec781e98a6efb14861223250c6239b06ec98ed0b) ) | |
| 286 | ROM_CONTINUE( 0x08000, 0x08000 ) | |
| 287 | ROM_LOAD( "633i02.17a", 0x10000, 0x10000, CRC(b2f7bd9a) SHA1(6c29568419bc49f0be3995b0c34edd9038f6f8d9) ) | |
| 283 | 288 | |
| 284 | #if 0 | |
| 285 | /* bootleg versions use smaller gfx ROMs, but the data is the same */ | |
| 286 | ROM_LOAD( "g-7.rom", 0x00000, 0x10000, CRC(57f467d2) ) | |
| 287 | ROM_LOAD( "g-10.rom", 0x10000, 0x10000, CRC(e6db9685) ) | |
| 288 | ROM_LOAD( "g-9.rom", 0x20000, 0x10000, CRC(875c61de) ) | |
| 289 | ROM_LOAD( "g-8.rom", 0x30000, 0x10000, CRC(642765d6) ) | |
| 290 | ROM_LOAD( "g-15.rom", 0x40000, 0x10000, CRC(daa2324b) ) | |
| 291 | ROM_LOAD( "g-16.rom", 0x50000, 0x10000, CRC(e27cc835) ) | |
| 292 | ROM_LOAD( "g-17.rom", 0x60000, 0x10000, CRC(ce4330b9) ) | |
| 293 | ROM_LOAD( "g-18.rom", 0x70000, 0x10000, CRC(1571ce42) ) | |
| 294 | ROM_LOAD( "g-4.rom", 0x80000, 0x10000, CRC(2cc7e52c) ) | |
| 295 | ROM_LOAD( "g-5.rom", 0x90000, 0x10000, CRC(e01a5b9c) ) | |
| 296 | ROM_LOAD( "g-6.rom", 0xa0000, 0x10000, CRC(aeea6744) ) | |
| 297 | ROM_LOAD( "g-14.rom", 0xb0000, 0x10000, CRC(fca77c5a) ) | |
| 298 | ROM_LOAD( "g-11.rom", 0xc0000, 0x10000, CRC(bd9ba92c) ) | |
| 299 | ROM_LOAD( "g-12.rom", 0xd0000, 0x10000, CRC(d0be7ec2) ) | |
| 300 | ROM_LOAD( "g-13.rom", 0xe0000, 0x10000, CRC(2b513d12) ) | |
| 301 | #endif | |
| 289 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 64k for SOUND code */ | |
| 290 | ROM_LOAD( "633e01.12a", 0x08000, 0x08000, CRC(d1549255) SHA1(d700c7de36746ba247e3a5d0410b7aa036aa4073) ) | |
| 302 | 291 | |
| 292 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 293 | ROM_LOAD16_BYTE( "633e04.7d", 0x00000, 0x40000, CRC(14ddc542) SHA1(c7d8592672a6e50c2fe6b0670001c340022f16f9) ) | |
| 294 | ROM_LOAD16_BYTE( "633e05.7f", 0x00001, 0x40000, CRC(42185044) SHA1(a6e2598d766e6995c1a912e4a04987e6f4d547ff) ) | |
| 303 | 295 | |
| 304 | ROM_START( contra ) | |
| 296 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 297 | ROM_LOAD16_BYTE( "633e06.16d", 0x00000, 0x40000, CRC(9cf6faae) SHA1(9ab79c06cb541ce6fdac322886b8a14a2f3f5cf7) ) | |
| 298 | ROM_LOAD16_BYTE( "633e07.16f", 0x00001, 0x40000, CRC(f2d06638) SHA1(0fa0fbfc53ab5c31b9de22f90153d9af37ff22ce) ) | |
| 299 | ||
| 300 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 301 | ROM_LOAD( "633e08.10g", 0x0000, 0x0100, CRC(9f0949fa) SHA1(7c8fefdcae4523d008a7d39062194c7a80aa3500) ) /* 007121 #0 sprite lookup table */ | |
| 302 | ROM_LOAD( "633e09.12g", 0x0100, 0x0100, CRC(14ca5e19) SHA1(eeee2f8b3d1e4acf47de1e74c4e507ff924591e7) ) /* 007121 #0 char lookup table */ | |
| 303 | ROM_LOAD( "633f10.18g", 0x0200, 0x0100, CRC(2b244d84) SHA1(c3bde7afb501bae58d07721c637dc06938c22150) ) /* 007121 #1 sprite lookup table */ | |
| 304 | ROM_LOAD( "633f11.20g", 0x0300, 0x0100, CRC(14ca5e19) SHA1(eeee2f8b3d1e4acf47de1e74c4e507ff924591e7) ) /* 007121 #1 char lookup table */ | |
| 305 | ROM_END | |
| 306 | ||
| 307 | ROM_START( contra1 ) | |
| 305 | 308 | ROM_REGION( 0x28000, REGION_CPU1, 0 ) /* 64k for code + 96k for banked ROMs */ |
| 306 | 309 | ROM_LOAD( "633e03.18a", 0x20000, 0x08000, CRC(7fc0d8cf) SHA1(cf1cf15646a4e5dc72671e957bc51ca44d30995c) ) |
| 307 | ROM_CONTINUE( 0x08000, 0x08000 ) | |
| 308 | ROM_LOAD( "633e02.17a", 0x10000, 0x10000, CRC(b2f7bd9a) SHA1(6c29568419bc49f0be3995b0c34edd9038f6f8d9) ) | |
| 310 | ROM_CONTINUE( 0x08000, 0x08000 ) | |
| 311 | ROM_LOAD( "633i02.17a", 0x10000, 0x10000, CRC(b2f7bd9a) SHA1(6c29568419bc49f0be3995b0c34edd9038f6f8d9) ) | |
| 309 | 312 | |
| 310 | 313 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 64k for SOUND code */ |
| 311 | 314 | ROM_LOAD( "633e01.12a", 0x08000, 0x08000, CRC(d1549255) SHA1(d700c7de36746ba247e3a5d0410b7aa036aa4073) ) |
| r1679 | r1680 | |
| 327 | 330 | |
| 328 | 331 | ROM_START( contrab ) |
| 329 | 332 | ROM_REGION( 0x28000, REGION_CPU1, 0 ) /* 64k for code + 96k for banked ROMs */ |
| 330 | ROM_LOAD( " | |
| 333 | ROM_LOAD( "633m | |
| 331 | 334 | ROM_CONTINUE( 0x08000, 0x08000 ) |
| 332 | ROM_LOAD( "633 | |
| 335 | ROM_LOAD( "633i02.17a", 0x10000, 0x10000, CRC(b2f7bd9a) SHA1(6c29568419bc49f0be3995b0c34edd9038f6f8d9) ) | |
| 333 | 336 | |
| 334 | 337 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 64k for SOUND code */ |
| 335 | 338 | ROM_LOAD( "633e01.12a", 0x08000, 0x08000, CRC(d1549255) SHA1(d700c7de36746ba247e3a5d0410b7aa036aa4073) ) |
| 336 | 339 | |
| 337 | 340 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 338 | ROM_LOAD16_BYTE( "633e04.7d", 0x00000, 0x40000, CRC(14ddc542) SHA1(c7d8592672a6e50c2fe6b0670001c340022f16f9) ) | |
| 339 | ROM_LOAD16_BYTE( "633e05.7f", 0x00001, 0x40000, CRC(42185044) SHA1(a6e2598d766e6995c1a912e4a04987e6f4d547ff) ) | |
| 341 | /* bootleg versions use smaller gfx ROMs, but the data is the same */ | |
| 342 | ROM_LOAD( "g-7.rom", 0x00000, 0x10000, CRC(57f467d2) SHA1(e30be315980f421143d1357174af678362836285) ) | |
| 343 | ROM_LOAD( "g-10.rom", 0x10000, 0x10000, CRC(e6db9685) SHA1(4d5ccfe95b082fe9830e7a316f88fd6f02464900) ) | |
| 344 | ROM_LOAD( "g-9.rom", 0x20000, 0x10000, CRC(875c61de) SHA1(e8dc42fef810a9f5471d96cb5297eb29296ba472) ) | |
| 345 | ROM_LOAD( "g-8.rom", 0x30000, 0x10000, CRC(642765d6) SHA1(d1563a392b8d8409f0f2159c2e82cd34b9ca2900) ) | |
| 346 | ROM_LOAD( "g-15.rom", 0x40000, 0x10000, CRC(daa2324b) SHA1(8a5fb8b79957291dc952e19e6973c64bb7230816) ) | |
| 347 | ROM_LOAD( "g-16.rom", 0x50000, 0x10000, CRC(e27cc835) SHA1(cb980b1fed110c7e4ef21fa11f44e5aea100881b) ) | |
| 348 | ROM_LOAD( "g-17.rom", 0x60000, 0x10000, CRC(ce4330b9) SHA1(0a2bd31baa0bc5e3745ee5ddac995557a551d58c) ) | |
| 349 | ROM_LOAD( "g-18.rom", 0x70000, 0x10000, CRC(1571ce42) SHA1(04082ed78b5e7f20b99d6edfb6c363574abd6158) ) | |
| 340 | 350 | |
| 341 | 351 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 342 | ROM_LOAD16_BYTE( "633e06.16d", 0x00000, 0x40000, CRC(9cf6faae) SHA1(9ab79c06cb541ce6fdac322886b8a14a2f3f5cf7) ) | |
| 343 | ROM_LOAD16_BYTE( "633e07.16f", 0x00001, 0x40000, CRC(f2d06638) SHA1(0fa0fbfc53ab5c31b9de22f90153d9af37ff22ce) ) | |
| 352 | /* bootleg versions use smaller gfx ROMs, but the data is the same */ | |
| 353 | ROM_LOAD( "g-4.rom", 0x00000, 0x10000, CRC(2cc7e52c) SHA1(7598a63346bf06dd34fd643fdff53fc3de6768a6) ) | |
| 354 | ROM_LOAD( "g-5.rom", 0x10000, 0x10000, CRC(e01a5b9c) SHA1(58c99cf99f209c584da757320a2f107244056d4c) ) | |
| 355 | ROM_LOAD( "g-6.rom", 0x20000, 0x10000, CRC(aeea6744) SHA1(220b42f707db99967bdcbd9ac66fcc83675a72aa) ) | |
| 356 | ROM_LOAD( "g-14.rom", 0x30000, 0x10000, CRC(765afdc7) SHA1(b7f6871cb154ee7e42e683bce08b73b00e61b0bc) ) | |
| 357 | ROM_LOAD( "g-11.rom", 0x40000, 0x10000, CRC(bd9ba92c) SHA1(e7f65ed20cd7754cc476e8fab7e56105cedcdb98) ) | |
| 358 | ROM_LOAD( "g-12.rom", 0x50000, 0x10000, CRC(d0be7ec2) SHA1(5aa829b8ffbe3f5f92ba672b1c24bfb7836ba1a3) ) | |
| 359 | ROM_LOAD( "g-13.rom", 0x60000, 0x10000, CRC(2b513d12) SHA1(152ebd849751cc2e95513134ce773a6b2eeb320e) ) | |
| 360 | /* This last section, 0x70000-0x7ffff is empty */ | |
| 344 | 361 | |
| 345 | 362 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) |
| 346 | 363 | ROM_LOAD( "633e08.10g", 0x0000, 0x0100, CRC(9f0949fa) SHA1(7c8fefdcae4523d008a7d39062194c7a80aa3500) ) /* 007121 #0 sprite lookup table */ |
| r1679 | r1680 | |
| 384 | 401 | ROM_LOAD( "633e01.12a", 0x08000, 0x08000, CRC(d1549255) SHA1(d700c7de36746ba247e3a5d0410b7aa036aa4073) ) |
| 385 | 402 | |
| 386 | 403 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 387 | ROM_LOAD16_BYTE( "633e04.7d", 0x00000, 0x40000, CRC(14ddc542) SHA1(c7d8592672a6e50c2fe6b0670001c340022f16f9) ) | |
| 388 | ROM_LOAD16_BYTE( "633e05.7f", 0x00001, 0x40000, CRC(42185044) SHA1(a6e2598d766e6995c1a912e4a04987e6f4d547ff) ) | |
| 404 | /* bootleg versions use smaller gfx ROMs, but the data is the same */ | |
| 405 | ROM_LOAD( "g-7.rom", 0x00000, 0x10000, CRC(57f467d2) SHA1(e30be315980f421143d1357174af678362836285) ) | |
| 406 | ROM_LOAD( "g-10.rom", 0x10000, 0x10000, CRC(e6db9685) SHA1(4d5ccfe95b082fe9830e7a316f88fd6f02464900) ) | |
| 407 | ROM_LOAD( "g-9.rom", 0x20000, 0x10000, CRC(875c61de) SHA1(e8dc42fef810a9f5471d96cb5297eb29296ba472) ) | |
| 408 | ROM_LOAD( "g-8.rom", 0x30000, 0x10000, CRC(642765d6) SHA1(d1563a392b8d8409f0f2159c2e82cd34b9ca2900) ) | |
| 409 | ROM_LOAD( "g-15.rom", 0x40000, 0x10000, CRC(daa2324b) SHA1(8a5fb8b79957291dc952e19e6973c64bb7230816) ) | |
| 410 | ROM_LOAD( "g-16.rom", 0x50000, 0x10000, CRC(e27cc835) SHA1(cb980b1fed110c7e4ef21fa11f44e5aea100881b) ) | |
| 411 | ROM_LOAD( "g-17.rom", 0x60000, 0x10000, CRC(ce4330b9) SHA1(0a2bd31baa0bc5e3745ee5ddac995557a551d58c) ) | |
| 412 | ROM_LOAD( "g-18.rom", 0x70000, 0x10000, CRC(1571ce42) SHA1(04082ed78b5e7f20b99d6edfb6c363574abd6158) ) | |
| 389 | 413 | |
| 390 | 414 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 391 | ROM_LOAD16_BYTE( "633e06.16d", 0x00000, 0x40000, CRC(9cf6faae) SHA1(9ab79c06cb541ce6fdac322886b8a14a2f3f5cf7) ) | |
| 392 | ROM_LOAD16_BYTE( "633e07.16f", 0x00001, 0x40000, CRC(f2d06638) SHA1(0fa0fbfc53ab5c31b9de22f90153d9af37ff22ce) ) | |
| 415 | /* bootleg versions use smaller gfx ROMs, but the data is the same */ | |
| 416 | ROM_LOAD( "g-4.rom", 0x00000, 0x10000, CRC(2cc7e52c) SHA1(7598a63346bf06dd34fd643fdff53fc3de6768a6) ) | |
| 417 | ROM_LOAD( "g-5.rom", 0x10000, 0x10000, CRC(e01a5b9c) SHA1(58c99cf99f209c584da757320a2f107244056d4c) ) | |
| 418 | ROM_LOAD( "g-6.rom", 0x20000, 0x10000, CRC(aeea6744) SHA1(220b42f707db99967bdcbd9ac66fcc83675a72aa) ) | |
| 419 | ROM_LOAD( "g-14.rom", 0x30000, 0x10000, CRC(765afdc7) SHA1(b7f6871cb154ee7e42e683bce08b73b00e61b0bc) ) | |
| 420 | ROM_LOAD( "g-11.rom", 0x40000, 0x10000, CRC(bd9ba92c) SHA1(e7f65ed20cd7754cc476e8fab7e56105cedcdb98) ) | |
| 421 | ROM_LOAD( "g-12.rom", 0x50000, 0x10000, CRC(d0be7ec2) SHA1(5aa829b8ffbe3f5f92ba672b1c24bfb7836ba1a3) ) | |
| 422 | ROM_LOAD( "g-13.rom", 0x60000, 0x10000, CRC(2b513d12) SHA1(152ebd849751cc2e95513134ce773a6b2eeb320e) ) | |
| 423 | /* This last section, 0x70000-0x7ffff is empty */ | |
| 393 | 424 | |
| 425 | ||
| 394 | 426 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) |
| 395 | 427 | ROM_LOAD( "633e08.10g", 0x0000, 0x0100, CRC(9f0949fa) SHA1(7c8fefdcae4523d008a7d39062194c7a80aa3500) ) /* 007121 #0 sprite lookup table */ |
| 396 | 428 | ROM_LOAD( "633e09.12g", 0x0100, 0x0100, CRC(14ca5e19) SHA1(eeee2f8b3d1e4acf47de1e74c4e507ff924591e7) ) /* 007121 #0 char lookup table */ |
| r1679 | r1680 | |
| 448 | 480 | |
| 449 | 481 | |
| 450 | 482 | |
| 451 | GAME( 1987, contra, 0, contra, contra, 0, ROT90, "Konami", "Contra (US)", 0 ) | |
| 452 | GAME( 1987, contrab, contra, contra, contra, 0, ROT90, "bootleg", "Contra (US bootleg)", 0 ) | |
| 483 | GAME( 1987, contra, 0, contra, contra, 0, ROT90, "Konami", "Contra (US, Set 1)", 0 ) | |
| 484 | GAME( 1987, contra1, contra, contra, contra, 0, ROT90, "Konami", "Contra (US, Set 2)", 0 ) | |
| 485 | GAME( 1987, contrab, contra, contra, contra, 0, ROT90, "bootleg", "Contra (bootleg)", 0 ) | |
| 453 | 486 | GAME( 1987, contraj, contra, contra, contra, 0, ROT90, "Konami", "Contra (Japan)", 0 ) |
| 454 | 487 | GAME( 1987, contrajb, contra, contra, contra, 0, ROT90, "bootleg", "Contra (Japan bootleg)", 0 ) |
| 455 | 488 | GAME( 1987, gryzor, contra, contra, contra, 0, ROT90, "Konami", "Gryzor (Set 1)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 424 | 424 | |
| 425 | 425 | static MACHINE_DRIVER_START( zn1_1mb_vram ) |
| 426 | 426 | /* basic machine hardware */ |
| 427 | MDRV_CPU_ADD( PSXCPU, XTAL_67_7376MHz ) | |
| 427 | MDRV_CPU_ADD_TAG( "MAIN", PSXCPU, XTAL_67_7376MHz ) | |
| 428 | 428 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) |
| 429 | 429 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) |
| 430 | 430 | |
| r1679 | r1680 | |
| 458 | 458 | MACHINE_DRIVER_END |
| 459 | 459 | |
| 460 | 460 | static MACHINE_DRIVER_START( zn2 ) |
| 461 | MDRV_IMPORT_FROM( zn1_2mb_vram ) | |
| 461 | /* basic machine hardware */ | |
| 462 | MDRV_CPU_ADD_TAG( "MAIN", PSXCPU, XTAL_100MHz ) | |
| 463 | MDRV_CPU_PROGRAM_MAP( zn_map, 0 ) | |
| 464 | MDRV_CPU_VBLANK_INT( psx_vblank, 1 ) | |
| 465 | ||
| 466 | MDRV_SCREEN_REFRESH_RATE( 60 ) | |
| 467 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 468 | ||
| 469 | /* video hardware */ | |
| 470 | MDRV_VIDEO_ATTRIBUTES( VIDEO_TYPE_RASTER ) | |
| 471 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 472 | MDRV_SCREEN_SIZE( 1024, 1024 ) | |
| 473 | MDRV_SCREEN_VISIBLE_AREA( 0, 639, 0, 479 ) | |
| 474 | MDRV_PALETTE_LENGTH( 65536 ) | |
| 475 | ||
| 476 | MDRV_PALETTE_INIT( psx ) | |
| 477 | MDRV_VIDEO_START( psx_type2 ) | |
| 478 | MDRV_VIDEO_UPDATE( psx ) | |
| 479 | ||
| 480 | /* sound hardware */ | |
| 481 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 482 | ||
| 483 | MDRV_SOUND_ADD( PSXSPU, 0 ) | |
| 484 | MDRV_SOUND_CONFIG( psxspu_interface ) | |
| 485 | MDRV_SOUND_ROUTE(0, "left", 0.35) | |
| 486 | MDRV_SOUND_ROUTE(1, "right", 0.35) | |
| 462 | 487 | MACHINE_DRIVER_END |
| 463 | 488 | |
| 464 | 489 | /* |
| r1679 | r1680 | |
| 1279 | 1304 | static MACHINE_DRIVER_START( coh1000ta ) |
| 1280 | 1305 | MDRV_IMPORT_FROM( zn1_1mb_vram ) |
| 1281 | 1306 | |
| 1307 | MDRV_CPU_MODIFY( "MAIN" ) | |
| 1282 | 1308 | MDRV_CPU_VBLANK_INT( coh1000t_vblank, 1 ) |
| 1283 | 1309 | |
| 1284 | 1310 | MDRV_CPU_ADD( Z80, 16000000 / 4 ) |
| r1679 | r1680 | |
| 1362 | 1388 | static MACHINE_DRIVER_START( coh1000tb ) |
| 1363 | 1389 | MDRV_IMPORT_FROM( zn1_2mb_vram ) |
| 1364 | 1390 | |
| 1391 | MDRV_CPU_MODIFY( "MAIN" ) | |
| 1365 | 1392 | MDRV_CPU_VBLANK_INT( coh1000t_vblank, 1 ) |
| 1366 | 1393 | |
| 1367 | 1394 | MDRV_MACHINE_RESET( coh1000tb ) |
| r1679 | r1680 | |
| 2457 | 2484 | static MACHINE_DRIVER_START( coh1002v ) |
| 2458 | 2485 | MDRV_IMPORT_FROM( zn1_2mb_vram ) |
| 2459 | 2486 | |
| 2487 | MDRV_CPU_MODIFY( "MAIN" ) | |
| 2460 | 2488 | MDRV_CPU_VBLANK_INT( coh1002v_vblank, 1 ) |
| 2461 | 2489 | |
| 2462 | 2490 | MDRV_MACHINE_RESET( coh1002v ) |
| r1679 | r1680 | |
| 2756 | 2784 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2757 | 2785 | |
| 2758 | 2786 | PORT_START /* IN2 */ |
| 2759 | PORT_ | |
| 2787 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 2760 | 2788 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2761 | 2789 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 2762 | 2790 | PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 2026 | 2026 | if (((megadrive_io_data_regs[portnum]&0x40)==0x00) && ((data&0x40) == 0x40)) |
| 2027 | 2027 | { |
| 2028 | 2028 | io_stage[portnum]++; |
| 2029 | timer_adjust(io_timeout[portnum], ATTOTIME_IN_CYCLES(8192,0), 0 | |
| 2029 | timer_adjust_oneshot(io_timeout[portnum], ATTOTIME_IN_CYCLES(8192,0), 0 | |
| 2030 | 2030 | } |
| 2031 | 2031 | |
| 2032 | 2032 | } |
| r1679 | r1680 | |
| 4259 | 4259 | { |
| 4260 | 4260 | genesis_scanline_counter++; |
| 4261 | 4261 | // mame_printf_debug("scanline %d\n",genesis_scanline_counter); |
| 4262 | timer_adjust(scanline_timer, attotime_div(ATTOTIME_IN_HZ(megadriv_framerate), megadrive_total_scanlines), 0, attotime_zero); | |
| 4263 | timer_adjust(render_timer, ATTOTIME_IN_USEC(1), 0, attotime_zero); | |
| 4262 | timer_adjust_oneshot(scanline_timer, attotime_div(ATTOTIME_IN_HZ(megadriv_framerate), megadrive_total_scanlines), 0); | |
| 4263 | timer_adjust_oneshot(render_timer, ATTOTIME_IN_USEC(1), 0); | |
| 4264 | 4264 | |
| 4265 | 4265 | if (genesis_scanline_counter==megadrive_irq6_scanline ) |
| 4266 | 4266 | { |
| 4267 | 4267 | // mame_printf_debug("x %d",genesis_scanline_counter); |
| 4268 | timer_adjust(irq6_on_timer, ATTOTIME_IN_USEC(6), 0 | |
| 4268 | timer_adjust_oneshot(irq6_on_timer, ATTOTIME_IN_USEC(6), 0 | |
| 4269 | 4269 | megadrive_irq6_pending = 1; |
| 4270 | 4270 | megadrive_vblank_flag = 1; |
| 4271 | 4271 | } |
| r1679 | r1680 | |
| 4292 | 4292 | |
| 4293 | 4293 | if (MEGADRIVE_REG0_IRQ4_ENABLE) |
| 4294 | 4294 | { |
| 4295 | timer_adjust(irq4_on_timer, ATTOTIME_IN_USEC(1), 0 | |
| 4295 | timer_adjust_oneshot(irq4_on_timer, ATTOTIME_IN_USEC(1), 0 | |
| 4296 | 4296 | //mame_printf_debug("irq4 on scanline %d reload %d\n",genesis_scanline_counter,MEGADRIVE_REG0A_HINT_VALUE); |
| 4297 | 4297 | } |
| 4298 | 4298 | } |
| r1679 | r1680 | |
| 4303 | 4303 | else irq4counter=MEGADRIVE_REG0A_HINT_VALUE; |
| 4304 | 4304 | } |
| 4305 | 4305 | |
| 4306 | //if (genesis_scanline_counter==0) timer_adjust(irq4_on_timer, ATTOTIME_IN_USEC(2), 0 | |
| 4306 | //if (genesis_scanline_counter==0) timer_adjust_oneshot(irq4_on_timer, ATTOTIME_IN_USEC(2), 0 | |
| 4307 | 4307 | |
| 4308 | 4308 | |
| 4309 | 4309 | |
| r1679 | r1680 | |
| 4406 | 4406 | irq6_on_timer = timer_alloc(irq6_on_callback, NULL); |
| 4407 | 4407 | irq4_on_timer = timer_alloc(irq4_on_callback, NULL); |
| 4408 | 4408 | |
| 4409 | timer_adjust(frame_timer, attotime_zero, 0, attotime_zero); | |
| 4410 | timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero); | |
| 4409 | timer_adjust_oneshot(frame_timer, attotime_zero, 0); | |
| 4410 | timer_adjust_oneshot(scanline_timer, attotime_zero, 0); | |
| 4411 | 4411 | |
| 4412 | 4412 | // set_refresh_rate(megadriv_framerate); |
| 4413 | 4413 | cpunum_set_clockscale(machine, 0, 0.9950f); /* Fatal Rewind is very fussy... */ |
| r1679 | r1680 | |
| 4420 | 4420 | |
| 4421 | 4421 | void megadriv_stop_scanline_timer(void) |
| 4422 | 4422 | { |
| 4423 | timer_adjust(scanline_timer, attotime_never, 0 | |
| 4423 | timer_adjust_oneshot(scanline_timer, attotime_never, 0 | |
| 4424 | 4424 | } |
| 4425 | 4425 | |
| 4426 | 4426 | /* |
| r1679 | r1680 | |
| 4578 | 4578 | //mame_printf_debug("---------- framet %d, %08x %08x\n",xxx, (UINT32)(frametime>>32),(UINT32)(frametime&0xffffffff)); |
| 4579 | 4579 | } |
| 4580 | 4580 | |
| 4581 | timer_adjust(frame_timer, attotime_zero, 0, attotime_zero); | |
| 4582 | timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero); | |
| 4581 | timer_adjust_oneshot(frame_timer, attotime_zero, 0); | |
| 4582 | timer_adjust_oneshot(scanline_timer, attotime_zero, 0); | |
| 4583 | 4583 | |
| 4584 | 4584 | } |
| 4585 | 4585 |
| r1679 | r1680 | |
|---|---|---|
| 136 | 136 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 137 | 137 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 138 | 138 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 139 | PORT_ | |
| 139 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW | |
| 140 | 140 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) |
| 141 | 141 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 142 | 142 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | extern int malzak_y; |
| 50 | 50 | |
| 51 | 51 | extern UINT8* saa5050_vidram; /* Video RAM for SAA 5050 */ |
| 52 | extern UINT8 *malzak_s2636_0_ram; | |
| 53 | extern UINT8 *malzak_s2636_1_ram; | |
| 52 | 54 | |
| 53 | 55 | // in video/malzak.c |
| 54 | 56 | VIDEO_START( malzak ); |
| r1679 | r1680 | |
| 68 | 70 | |
| 69 | 71 | static READ8_HANDLER( fake_VRLE_r ) |
| 70 | 72 | { |
| 71 | return (s2636_ | |
| 73 | return (malzak_s2636_0_ram[0xcb] & 0x3f) + (video_screen_get_vblank(0)*0x40); | |
| 72 | 74 | } |
| 73 | 75 | |
| 74 | 76 | static READ8_HANDLER( ram_mirror_r ) |
| r1679 | r1680 | |
| 144 | 146 | AM_RANGE(0x1100, 0x11ff) AM_WRITE(MWA8_RAM) |
| 145 | 147 | AM_RANGE(0x1200, 0x12ff) AM_WRITE(MWA8_RAM) |
| 146 | 148 | AM_RANGE(0x1300, 0x13ff) AM_WRITE(MWA8_RAM) |
| 147 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(MWA8_RAM) AM_BASE(&s2636_1_ram) | |
| 148 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(MWA8_RAM) AM_BASE(&s2636_2_ram) | |
| 149 | AM_RANGE(0x1400, 0x14ff) AM_WRITE(MWA8_RAM) AM_BASE(&malzak_s2636_0_ram) | |
| 150 | AM_RANGE(0x1500, 0x15ff) AM_WRITE(MWA8_RAM) AM_BASE(&malzak_s2636_1_ram) | |
| 149 | 151 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(playfield_w) |
| 150 | 152 | AM_RANGE(0x1600, 0x16ff) AM_WRITE(MWA8_RAM) |
| 151 | 153 | AM_RANGE(0x1700, 0x17ff) AM_WRITE(MWA8_RAM) |
| r1679 | r1680 | |
| 360 | 362 | 8 * 10 |
| 361 | 363 | }; |
| 362 | 364 | |
| 363 | ||
| 365 | ||
| 364 | 366 | static GFXDECODE_START( malzak ) |
| 365 | 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 16 ) |
| 366 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_gfx_layout, 0, 8 ) /* s2636 #1 */ | |
| 367 | GFXDECODE_ENTRY( REGION_CPU1, 0x0000, s2636_gfx_layout, 0, 8 ) /* s2636 #2 */ | |
| 368 | 368 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_charlayout, 0, 128 ) |
| 369 | 369 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_hilayout, 0, 128 ) |
| 370 | 370 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, saa5050_lolayout, 0, 128 ) |
| r1679 | r1680 | |
|---|---|---|
| 305 | 305 | case 1: /* Raster IRQ scanline position, only valid for values between 1 & 239 (0 and 240-256 do NOT generate IRQ's) */ |
| 306 | 306 | scanline=(data&0xff); |
| 307 | 307 | if (raster_enable && scanline>0 && scanline<240) |
| 308 | timer_adjust(raster_irq_timer,video_screen_get_time_until_pos(0, scanline-1, 320),0 | |
| 308 | timer_adjust_oneshot(raster_irq_timer,video_screen_get_time_until_pos(0, scanline-1, 320),0 | |
| 309 | 309 | else |
| 310 | timer_adjust(raster_irq_timer,attotime_never,0 | |
| 310 | timer_adjust_oneshot(raster_irq_timer,attotime_never,0 | |
| 311 | 311 | break; |
| 312 | 312 | case 2: /* VBL irq ack */ |
| 313 | 313 | break; |
| r1679 | r1680 | |
| 1374 | 1374 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1375 | 1375 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1376 | 1376 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1377 | PORT_ | |
| 1377 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 1378 | 1378 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1379 | 1379 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1380 | 1380 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1456 | 1456 | PORT_START |
| 1457 | 1457 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1458 | 1458 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1459 | PORT_ | |
| 1459 | PORT_SERVICE( 0x0004, | |
| 1460 | 1460 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) //check //test BUTTON F2 |
| 1461 | 1461 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1462 | 1462 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1532 | 1532 | PORT_START |
| 1533 | 1533 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_VBLANK ) //IPT_VBLANK ) |
| 1534 | 1534 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1535 | PORT_BIT(0x0004, 0x04, IPT_DIPSWITCH_NAME ) PORT_NAME( DEF_STR( Service_Mode )) PORT_TOGGLE PORT_CODE(KEYCODE_F2) | |
| 1536 | // PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1535 | PORT_SERVICE( 0x0004, IP_ACTIVE_LOW ) | |
| 1537 | 1536 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNUSED ) //check //test BUTTON F2 |
| 1538 | 1537 | |
| 1539 | 1538 | PORT_START |
| r1679 | r1680 | |
| 1580 | 1579 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1581 | 1580 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1582 | 1581 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1583 | PORT_ | |
| 1582 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 1584 | 1583 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1585 | 1584 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 1586 | 1585 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
| 1618 | 1617 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1619 | 1618 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1620 | 1619 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1621 | PORT_ | |
| 1620 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 1622 | 1621 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 1623 | 1622 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 1624 | 1623 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
|---|---|---|
| 432 | 432 | { |
| 433 | 433 | int which = (offset >> 4) & 1; |
| 434 | 434 | if (data & 0x40) |
| 435 | timer_adjust(timer[which], attotime_never, 0 | |
| 435 | timer_adjust_oneshot(timer[which], attotime_never, 0 | |
| 436 | 436 | } |
| 437 | 437 | else |
| 438 | 438 | logerror("%06X:tms32031_control_w(%02X) = %08X\n", activecpu_get_pc(), offset, data); |
| r1679 | r1680 | |
| 526 | 526 | /* generate another interrupt on the next scanline while we are within the BEAM_DY */ |
| 527 | 527 | beamy++; |
| 528 | 528 | if (beamy <= machine->screen[0].visarea.max_y && beamy <= gun_y[player] + BEAM_DY) |
| 529 | timer_adjust(gun_timer[player], video_screen_get_time_until_pos(0, beamy, MAX(0, gun_x[player] - BEAM_DX)), play | |
| 529 | timer_adjust_oneshot(gun_timer[player], video_screen_get_time_until_pos(0, beamy, MAX(0, gun_x[player] - BEAM_DX)), play | |
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | |
| r1679 | r1680 | |
| 555 | 555 | }; |
| 556 | 556 | gun_x[player] = readinputportbytag(names[player][0]) * (visarea->max_x + 1 - visarea->min_x) / 255 + visarea->min_x + BEAM_XOFFS; |
| 557 | 557 | gun_y[player] = readinputportbytag(names[player][1]) * (visarea->max_y + 1 - visarea->min_y) / 255 + visarea->min_y; |
| 558 | timer_adjust(gun_timer[player], video_screen_get_time_until_pos(0, MAX(0, gun_y[player] - BEAM_DY), MAX(0, gun_x[player] - BEAM_DX)), play | |
| 558 | timer_adjust_oneshot(gun_timer[player], video_screen_get_time_until_pos(0, MAX(0, gun_y[player] - BEAM_DY), MAX(0, gun_x[player] - BEAM_DX)), play | |
| 559 | 559 | } |
| 560 | 560 | } |
| 561 | 561 | } |
| r1679 | r1680 | |
| 724 | 724 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 725 | 725 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 726 | 726 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 727 | PORT_ | |
| 727 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 728 | 728 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 729 | 729 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 730 | 730 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 829 | 829 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 830 | 830 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 831 | 831 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 832 | PORT_ | |
| 832 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 833 | 833 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 834 | 834 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 835 | 835 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 926 | 926 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 927 | 927 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 928 | 928 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 929 | PORT_ | |
| 929 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 930 | 930 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 931 | 931 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 932 | 932 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 1062 | 1062 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1063 | 1063 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 1064 | 1064 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 1065 | PORT_ | |
| 1065 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 1066 | 1066 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 1067 | 1067 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1068 | 1068 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 29 | 29 | #include "driver.h" |
| 30 | 30 | #include "sound/ay8910.h" |
| 31 | 31 | #include "cpu/i8039/i8039.h" |
| 32 | #include "video/crtc6845.h" | |
| 33 | 32 | |
| 34 | 33 | static tilemap *bg_tilemap; |
| 35 | 34 | |
| r1679 | r1680 | |
| 108 | 107 | |
| 109 | 108 | static VIDEO_START( drw80pkr ) |
| 110 | 109 | { |
| 111 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 110 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | static VIDEO_UPDATE( drw80pkr ) |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | static VIDEO_START( superdq ) |
| 57 | 57 | { |
| 58 | superdq_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 58 | superdq_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 59 | 59 | |
| 60 | 60 | add_exit_callback(machine, video_cleanup); |
| 61 | 61 | } |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | static VIDEO_START(bestleag) |
| 73 | 73 | { |
| 74 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,256, 32); | |
| 75 | bg_tilemap = tilemap_create(get_bg_tile_info,bsb_bg_scan,TILEMAP_TYPE_PEN,16,16,128, 64); | |
| 76 | fg_tilemap = tilemap_create(get_fg_tile_info,bsb_bg_scan,TILEMAP_TYPE_PEN,16,16,128, 64); | |
| 74 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,8,8,256, 32); | |
| 75 | bg_tilemap = tilemap_create(get_bg_tile_info,bsb_bg_scan,16,16,128, 64); | |
| 76 | fg_tilemap = tilemap_create(get_fg_tile_info,bsb_bg_scan,16,16,128, 64); | |
| 77 | 77 | |
| 78 | 78 | tilemap_set_transparent_pen(tx_tilemap,15); |
| 79 | 79 | tilemap_set_transparent_pen(fg_tilemap,15); |
| r1679 | r1680 | |
|---|---|---|
| 288 | 288 | |
| 289 | 289 | PORT_START |
| 290 | 290 | PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 291 | PORT_ | |
| 291 | PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW | |
| 292 | 292 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 293 | 293 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 294 | 294 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
| 321 | 321 | |
| 322 | 322 | PORT_START |
| 323 | 323 | PORT_BIT( 0xffcc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 324 | PORT_ | |
| 324 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW | |
| 325 | 325 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 326 | 326 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 327 | 327 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
| 401 | 401 | |
| 402 | 402 | PORT_START |
| 403 | 403 | PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 404 | PORT_ | |
| 404 | PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW | |
| 405 | 405 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 406 | 406 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 407 | 407 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | #include "sound/msm5205.h" |
| 26 | 26 | |
| 27 | 27 | |
| 28 | extern void konami1_decode(void); | |
| 29 | extern UINT8 konami1_decodebyte( UINT8 opcode, UINT16 address ); | |
| 28 | void konami1_decode(void); | |
| 29 | UINT8 konami1_decodebyte( UINT8 opcode, UINT16 address ); | |
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | extern UINT8 *trackfld_scroll; |
| 33 | 33 | extern UINT8 *trackfld_scroll2; |
| 34 | 34 | |
| 35 | extern WRITE8_HANDLER( trackfld_videoram_w ); | |
| 36 | extern WRITE8_HANDLER( trackfld_colorram_w ); | |
| 37 | extern WRITE8_HANDLER( trackfld_flipscreen_w ); | |
| 38 | extern WRITE8_HANDLER( atlantol_gfxbank_w ); | |
| 35 | WRITE8_HANDLER( trackfld_videoram_w ); | |
| 36 | WRITE8_HANDLER( trackfld_colorram_w ); | |
| 37 | WRITE8_HANDLER( trackfld_flipscreen_w ); | |
| 38 | WRITE8_HANDLER( atlantol_gfxbank_w ); | |
| 39 | 39 | |
| 40 | extern PALETTE_INIT( trackfld ); | |
| 41 | extern VIDEO_START( trackfld ); | |
| 42 | extern VIDEO_UPDATE( trackfld ); | |
| 40 | PALETTE_INIT( trackfld ); | |
| 41 | VIDEO_START( trackfld ); | |
| 42 | VIDEO_UPDATE( trackfld ); | |
| 43 | 43 | |
| 44 | extern WRITE8_HANDLER( konami_sh_irqtrigger_w ); | |
| 45 | extern READ8_HANDLER( trackfld_sh_timer_r ); | |
| 46 | extern READ8_HANDLER( trackfld_speech_r ); | |
| 47 | extern WRITE8_HANDLER( trackfld_sound_w ); | |
| 48 | extern READ8_HANDLER( hyprolyb_speech_r ); | |
| 49 | extern WRITE8_HANDLER( hyprolyb_ADPCM_data_w ); | |
| 44 | WRITE8_HANDLER( konami_sh_irqtrigger_w ); | |
| 45 | READ8_HANDLER( trackfld_sh_timer_r ); | |
| 46 | READ8_HANDLER( trackfld_speech_r ); | |
| 47 | WRITE8_HANDLER( trackfld_sound_w ); | |
| 48 | READ8_HANDLER( hyprolyb_speech_r ); | |
| 49 | WRITE8_HANDLER( hyprolyb_ADPCM_data_w ); | |
| 50 | 50 | |
| 51 | 51 | /* |
| 52 | 52 | Track'n'Field has 1k of battery backed RAM which can be erased by setting a dipswitch |
| r1679 | r1680 | |
| 839 | 839 | }; |
| 840 | 840 | |
| 841 | 841 | static GFXDECODE_START( trackfld ) |
| 842 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 843 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*16, 16 ) | |
| 842 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0, 16 ) | |
| 843 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 16*16, 16 ) | |
| 844 | 844 | GFXDECODE_END |
| 845 | 845 | |
| 846 | 846 | |
| r1679 | r1680 | |
| 880 | 880 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 881 | 881 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 882 | 882 | MDRV_GFXDECODE(trackfld) |
| 883 | MDRV_PALETTE_LENGTH(32) | |
| 884 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 883 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 885 | 884 | |
| 886 | 885 | MDRV_PALETTE_INIT(trackfld) |
| 887 | 886 | MDRV_VIDEO_START(trackfld) |
| r1679 | r1680 | |
| 925 | 924 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 926 | 925 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 927 | 926 | MDRV_GFXDECODE(trackfld) |
| 928 | MDRV_PALETTE_LENGTH(32) | |
| 929 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 927 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 930 | 928 | |
| 931 | 929 | MDRV_PALETTE_INIT(trackfld) |
| 932 | 930 | MDRV_VIDEO_START(trackfld) |
| r1679 | r1680 | |
| 997 | 995 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 998 | 996 | ROM_LOAD( "c2_d13.bin", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) ) |
| 999 | 997 | |
| 1000 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1001 | ROM_LOAD( "h16_e12.bin", 0x0000, 0x2000, CRC(50075768) SHA1(dfff92c0f59dd3d8d3d6256944bfd48792cef6a9) ) | |
| 1002 | ROM_LOAD( "h15_e11.bin", 0x2000, 0x2000, CRC(dda9e29f) SHA1(0f41cde82bb60c3f1591ee14dc3cff4642bbddc1) ) | |
| 1003 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1004 | ||
| 1005 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 998 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1006 | 999 | ROM_LOAD( "c11_d06.bin", 0x0000, 0x2000, CRC(82e2185a) SHA1(1da9ea20e7af0b49c62fb39834a7ec686491af04) ) |
| 1007 | 1000 | ROM_LOAD( "c12_d07.bin", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) ) |
| 1008 | 1001 | ROM_LOAD( "c13_d08.bin", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) ) |
| 1009 | 1002 | ROM_LOAD( "c14_d09.bin", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) ) |
| 1010 | 1003 | |
| 1004 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1005 | ROM_LOAD( "h16_e12.bin", 0x0000, 0x2000, CRC(50075768) SHA1(dfff92c0f59dd3d8d3d6256944bfd48792cef6a9) ) | |
| 1006 | ROM_LOAD( "h15_e11.bin", 0x2000, 0x2000, CRC(dda9e29f) SHA1(0f41cde82bb60c3f1591ee14dc3cff4642bbddc1) ) | |
| 1007 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1008 | ||
| 1011 | 1009 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1012 | 1010 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1013 | 1011 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1028 | 1026 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1029 | 1027 | ROM_LOAD( "c2_d13.bin", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) ) |
| 1030 | 1028 | |
| 1031 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1032 | ROM_LOAD( "h16_e12.bin", 0x0000, 0x2000, CRC(50075768) SHA1(dfff92c0f59dd3d8d3d6256944bfd48792cef6a9) ) | |
| 1033 | ROM_LOAD( "h15_e11.bin", 0x2000, 0x2000, CRC(dda9e29f) SHA1(0f41cde82bb60c3f1591ee14dc3cff4642bbddc1) ) | |
| 1034 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1035 | ||
| 1036 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1029 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1037 | 1030 | ROM_LOAD( "c11_d06.bin", 0x0000, 0x2000, CRC(82e2185a) SHA1(1da9ea20e7af0b49c62fb39834a7ec686491af04) ) |
| 1038 | 1031 | ROM_LOAD( "c12_d07.bin", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) ) |
| 1039 | 1032 | ROM_LOAD( "c13_d08.bin", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) ) |
| 1040 | 1033 | ROM_LOAD( "c14_d09.bin", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) ) |
| 1041 | 1034 | |
| 1035 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1036 | ROM_LOAD( "h16_e12.bin", 0x0000, 0x2000, CRC(50075768) SHA1(dfff92c0f59dd3d8d3d6256944bfd48792cef6a9) ) | |
| 1037 | ROM_LOAD( "h15_e11.bin", 0x2000, 0x2000, CRC(dda9e29f) SHA1(0f41cde82bb60c3f1591ee14dc3cff4642bbddc1) ) | |
| 1038 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1039 | ||
| 1042 | 1040 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1043 | 1041 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1044 | 1042 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1059 | 1057 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1060 | 1058 | ROM_LOAD( "c2_d13.bin", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) ) /* 361-d13.c03 */ |
| 1061 | 1059 | |
| 1062 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1063 | ROM_LOAD( "361-d12.h16", 0x0000, 0x2000, CRC(768bb63d) SHA1(effc46615c389245e5a4aac18292e1d764ff0e46) ) | |
| 1064 | ROM_LOAD( "361-d11.h15", 0x2000, 0x2000, CRC(3af0e2a8) SHA1(450f35fd7e45ecc88ee80bf57499b2e9f06f6487) ) | |
| 1065 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) /* 361-d10.h14 */ | |
| 1066 | ||
| 1067 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1060 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1068 | 1061 | ROM_LOAD( "c11_d06.bin", 0x0000, 0x2000, CRC(82e2185a) SHA1(1da9ea20e7af0b49c62fb39834a7ec686491af04) ) /* 361-d06.c11 */ |
| 1069 | 1062 | ROM_LOAD( "c12_d07.bin", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) ) /* 361-d07.c12 */ |
| 1070 | 1063 | ROM_LOAD( "c13_d08.bin", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) ) /* 361-d08.c13 */ |
| 1071 | 1064 | ROM_LOAD( "c14_d09.bin", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) ) /* 361-d09.c14 */ |
| 1072 | 1065 | |
| 1066 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1067 | ROM_LOAD( "361-d12.h16", 0x0000, 0x2000, CRC(768bb63d) SHA1(effc46615c389245e5a4aac18292e1d764ff0e46) ) | |
| 1068 | ROM_LOAD( "361-d11.h15", 0x2000, 0x2000, CRC(3af0e2a8) SHA1(450f35fd7e45ecc88ee80bf57499b2e9f06f6487) ) | |
| 1069 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) /* 361-d10.h14 */ | |
| 1070 | ||
| 1073 | 1071 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) /* Prom names = 361-b16.f01 / 361-b17.b16 / 361-b18.e15 */ |
| 1074 | 1072 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1075 | 1073 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1098 | 1096 | ROM_LOAD( "2764.3", 0xc000, 0x2000, CRC(c3ec42e1) SHA1(048a95726c4f031552e629c3788952c1bc5e7251) ) |
| 1099 | 1097 | ROM_LOAD( "2764.4", 0xe000, 0x2000, CRC(76998389) SHA1(499189b0e20296af88712199b93b958655083608) ) |
| 1100 | 1098 | |
| 1101 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1102 | ROM_LOAD( "361-d12.h16", 0x0000, 0x2000, CRC(768bb63d) SHA1(effc46615c389245e5a4aac18292e1d764ff0e46) ) | |
| 1103 | ROM_LOAD( "361-d11.h15", 0x2000, 0x2000, CRC(3af0e2a8) SHA1(450f35fd7e45ecc88ee80bf57499b2e9f06f6487) ) | |
| 1104 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1105 | ||
| 1106 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1099 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1107 | 1100 | ROM_LOAD( "c11_d06.bin", 0x0000, 0x2000, CRC(82e2185a) SHA1(1da9ea20e7af0b49c62fb39834a7ec686491af04) ) |
| 1108 | 1101 | ROM_LOAD( "c12_d07.bin", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) ) |
| 1109 | 1102 | ROM_LOAD( "c13_d08.bin", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) ) |
| 1110 | 1103 | ROM_LOAD( "c14_d09.bin", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) ) |
| 1111 | 1104 | |
| 1105 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1106 | ROM_LOAD( "361-d12.h16", 0x0000, 0x2000, CRC(768bb63d) SHA1(effc46615c389245e5a4aac18292e1d764ff0e46) ) | |
| 1107 | ROM_LOAD( "361-d11.h15", 0x2000, 0x2000, CRC(3af0e2a8) SHA1(450f35fd7e45ecc88ee80bf57499b2e9f06f6487) ) | |
| 1108 | ROM_LOAD( "h14_e10.bin", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) | |
| 1109 | ||
| 1112 | 1110 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1113 | 1111 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1114 | 1112 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1130 | 1128 | ROM_LOAD( "atl36", 0x00000, 0x10000, CRC(0bae8489) SHA1(fbaeac99733f9c46b0b8d9a601c57df4004e2044) ) |
| 1131 | 1129 | ROM_CONTINUE( 0x00000, 0x10000 ) |
| 1132 | 1130 | |
| 1133 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1134 | ROM_LOAD( "atl40", 0x00000, 0x20000, CRC(c915f53a) SHA1(5983fa68f8a494fe0c71e8dae79b45eee178bbcd) ) | |
| 1135 | ||
| 1136 | ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1131 | ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1137 | 1132 | ROM_LOAD( "atl38", 0x00000, 0x20000, CRC(dbbcbcda) SHA1(df84fd73425bac2dcde0b650369ed1ff105f729f) ) |
| 1138 | 1133 | ROM_LOAD( "atl39", 0x20000, 0x20000, CRC(d08f067f) SHA1(077446bf3269dba2881e745434f1581f3a901d99) ) |
| 1139 | 1134 | |
| 1135 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1136 | ROM_LOAD( "atl40", 0x00000, 0x20000, CRC(c915f53a) SHA1(5983fa68f8a494fe0c71e8dae79b45eee178bbcd) ) | |
| 1137 | ||
| 1140 | 1138 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1141 | 1139 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1142 | 1140 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1152 | 1150 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1153 | 1151 | ROM_LOAD( "mk1", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) ) |
| 1154 | 1152 | |
| 1155 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1156 | ROM_LOAD( "mk12", 0x0000, 0x2000, CRC(8b1a19cf) SHA1(9f75f69828eeaeb2d0dcf20fb80425546124b21e) ) | |
| 1157 | ROM_LOAD( "mk11", 0x2000, 0x2000, CRC(1a56d24d) SHA1(e64b8a9bdbcf6d2d583ded0750d5f48721785459) ) | |
| 1158 | ROM_LOAD( "mk10", 0x4000, 0x2000, CRC(e7d05634) SHA1(e7532749fe9b955ba221517807888b34a7754db7) ) | |
| 1159 | ||
| 1160 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1153 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1161 | 1154 | ROM_LOAD( "mk6", 0x0000, 0x2000, CRC(18fbe047) SHA1(d2c6aeb1dfd9751f4db386944d144e293001b497) ) |
| 1162 | 1155 | ROM_LOAD( "mk7", 0x2000, 0x2000, CRC(47dee791) SHA1(9c2d5c2ef1e2e8f329160a1c536119b078803347) ) |
| 1163 | 1156 | ROM_LOAD( "mk8", 0x4000, 0x2000, CRC(9c091ead) SHA1(fce50c9d260f20873289921926bd632d6d49ef15) ) |
| 1164 | 1157 | ROM_LOAD( "mk9", 0x6000, 0x2000, CRC(5c8ed3fe) SHA1(a878fcd547aad5388fef9fe2825c1122444c216d) ) |
| 1165 | 1158 | |
| 1159 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1160 | ROM_LOAD( "mk12", 0x0000, 0x2000, CRC(8b1a19cf) SHA1(9f75f69828eeaeb2d0dcf20fb80425546124b21e) ) | |
| 1161 | ROM_LOAD( "mk11", 0x2000, 0x2000, CRC(1a56d24d) SHA1(e64b8a9bdbcf6d2d583ded0750d5f48721785459) ) | |
| 1162 | ROM_LOAD( "mk10", 0x4000, 0x2000, CRC(e7d05634) SHA1(e7532749fe9b955ba221517807888b34a7754db7) ) | |
| 1163 | ||
| 1166 | 1164 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1167 | 1165 | ROM_LOAD( "prom.1", 0x0000, 0x0020, NO_DUMP ) /* palette */ |
| 1168 | 1166 | ROM_LOAD( "prom.3", 0x0020, 0x0100, NO_DUMP ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1197 | 1195 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1198 | 1196 | ROM_LOAD( "zandz.2c", 0x0000, 0x2000, CRC(3daca93a) SHA1(743c2b787aeb2c893ea476efc95d92e33b9bd159) ) |
| 1199 | 1197 | |
| 1200 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1198 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1199 | ROM_LOAD( "rom.11c", 0x0000, 0x2000, CRC(87d060d4) SHA1(22da2dfaf71d78a4789ca34c27571733ab65ea30) ) | |
| 1200 | ROM_LOAD( "rom.14c", 0x2000, 0x2000, CRC(5bff1607) SHA1(20c4b74c93511f9cafd6e3f2d048baad3a3a8aa4) ) | |
| 1201 | ||
| 1202 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1201 | 1203 | ROM_LOAD( "rom.16h", 0x0000, 0x2000, CRC(e6728bda) SHA1(8bd029af5136b0ed6c0087989c69f0b1c23305fb) ) |
| 1202 | 1204 | ROM_LOAD( "rom.15h", 0x2000, 0x2000, CRC(9c067ef4) SHA1(2a66beee4fa76d40ca18637c0061b196d3873df3) ) |
| 1203 | 1205 | ROM_LOAD( "rom.14h", 0x4000, 0x2000, CRC(3bbad920) SHA1(f5c491f37aa6855181c62fe6bb2975c7d011cc72) ) |
| 1204 | 1206 | |
| 1205 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1206 | ROM_LOAD( "rom.11c", 0x0000, 0x2000, CRC(87d060d4) SHA1(22da2dfaf71d78a4789ca34c27571733ab65ea30) ) | |
| 1207 | ROM_LOAD( "rom.14c", 0x2000, 0x2000, CRC(5bff1607) SHA1(20c4b74c93511f9cafd6e3f2d048baad3a3a8aa4) ) | |
| 1208 | ||
| 1209 | 1207 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1210 | 1208 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1211 | 1209 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1240 | 1238 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1241 | 1239 | ROM_LOAD( "02c.bin", 0x0000, 0x2000, CRC(3daca93a) SHA1(743c2b787aeb2c893ea476efc95d92e33b9bd159) ) |
| 1242 | 1240 | |
| 1243 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1241 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1242 | ROM_LOAD( "11c.bin", 0x0000, 0x2000, CRC(87d060d4) SHA1(22da2dfaf71d78a4789ca34c27571733ab65ea30) ) | |
| 1243 | ROM_LOAD( "14c.bin", 0x2000, 0x2000, CRC(5bff1607) SHA1(20c4b74c93511f9cafd6e3f2d048baad3a3a8aa4) ) | |
| 1244 | ||
| 1245 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1244 | 1246 | ROM_LOAD( "16h.bin", 0x0000, 0x2000, CRC(e6728bda) SHA1(8bd029af5136b0ed6c0087989c69f0b1c23305fb) ) |
| 1245 | 1247 | ROM_LOAD( "15h.bin", 0x2000, 0x2000, CRC(9c067ef4) SHA1(2a66beee4fa76d40ca18637c0061b196d3873df3) ) |
| 1246 | 1248 | ROM_LOAD( "14h.bin", 0x4000, 0x2000, CRC(3bbad920) SHA1(f5c491f37aa6855181c62fe6bb2975c7d011cc72) ) |
| 1247 | 1249 | |
| 1248 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1249 | ROM_LOAD( "11c.bin", 0x0000, 0x2000, CRC(87d060d4) SHA1(22da2dfaf71d78a4789ca34c27571733ab65ea30) ) | |
| 1250 | ROM_LOAD( "14c.bin", 0x2000, 0x2000, CRC(5bff1607) SHA1(20c4b74c93511f9cafd6e3f2d048baad3a3a8aa4) ) | |
| 1251 | ||
| 1252 | 1250 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1253 | 1251 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| 1254 | 1252 | ROM_LOAD( "361b17.b16", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 1270 | 1268 | ROM_LOAD( "2c.bin", 0x0000, 0x2000, CRC(105a8beb) SHA1(4bd9a0076fece8dc9a830e76a60fbcefe08940f7) ) |
| 1271 | 1269 | ROM_CONTINUE(0x0000,0x2000) |
| 1272 | 1270 | |
| 1273 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1274 | ROM_LOAD( "16h.bin", 0x0000, 0x2000, CRC(cb062c3b) SHA1(4a1c1a662dec26cb49310de596e1e1416d101d5d) ) | |
| 1275 | ROM_CONTINUE(0x0000,0x2000) | |
| 1276 | ROM_LOAD( "15h.bin", 0x2000, 0x2000, CRC(df83e659) SHA1(435523f3747c5aaf0a2d3a826766cb9b9ebb821e) ) | |
| 1277 | ROM_CONTINUE(0x2000,0x2000) | |
| 1278 | ROM_LOAD( "14h.bin", 0x4000, 0x2000, CRC(5ca53215) SHA1(650338a95465b61d9388bede716053523855eeee) ) | |
| 1279 | ROM_CONTINUE(0x4000,0x2000) | |
| 1280 | ||
| 1281 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1271 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1282 | 1272 | ROM_LOAD( "11c.bin", 0x0000, 0x2000, CRC(d24553fa) SHA1(ad4f2dd6c7236f33841bc59ce150a212fbe871cd) ) |
| 1283 | 1273 | ROM_CONTINUE(0x0000,0x2000) |
| 1284 | 1274 | ROM_LOAD( "14c.bin", 0x4000, 0x2000, CRC(4d0ab831) SHA1(2009b263fff3fd512a055fef23e667e76af1c584) ) |
| r1679 | r1680 | |
| 1288 | 1278 | ROM_LOAD( "15c.bin", 0x6000, 0x2000, CRC(bf1e608d) SHA1(ad5f16c091439358bbece9bc50e5979d44e85980) ) |
| 1289 | 1279 | ROM_CONTINUE(0x6000,0x2000) |
| 1290 | 1280 | |
| 1281 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1282 | ROM_LOAD( "16h.bin", 0x0000, 0x2000, CRC(cb062c3b) SHA1(4a1c1a662dec26cb49310de596e1e1416d101d5d) ) | |
| 1283 | ROM_CONTINUE(0x0000,0x2000) | |
| 1284 | ROM_LOAD( "15h.bin", 0x2000, 0x2000, CRC(df83e659) SHA1(435523f3747c5aaf0a2d3a826766cb9b9ebb821e) ) | |
| 1285 | ROM_CONTINUE(0x2000,0x2000) | |
| 1286 | ROM_LOAD( "14h.bin", 0x4000, 0x2000, CRC(5ca53215) SHA1(650338a95465b61d9388bede716053523855eeee) ) | |
| 1287 | ROM_CONTINUE(0x4000,0x2000) | |
| 1288 | ||
| 1291 | 1289 | /* Proms, and speech rom (unused?) are unchanged from the original */ |
| 1292 | 1290 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1293 | 1291 | ROM_LOAD( "361b16.f1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ |
| r1679 | r1680 | |
| 1314 | 1312 | |
| 1315 | 1313 | /* not encrypted opcodes */ |
| 1316 | 1314 | for (A = 0;A < 0x6000;A++) |
| 1317 | { | |
| 1318 | 1315 | decrypt[A] = rom[A]; |
| 1319 | } | |
| 1320 | 1316 | |
| 1321 | 1317 | /* "konami1" encrypted opcodes */ |
| 1322 | 1318 | for (A = 0x6000;A < size;A++) |
| 1323 | { | |
| 1324 | 1319 | decrypt[A] = konami1_decodebyte(rom[A],A); |
| 1325 | } | |
| 1326 | 1320 | |
| 1327 | 1321 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x1000, 0x1000, 0, 0, MWA8_NOP ); |
| 1328 | 1322 | } |
| r1679 | r1680 | |
| 1355 | 1349 | |
| 1356 | 1350 | /* decrypt program rom */ |
| 1357 | 1351 | for( i = 0; i < 0x2000; i++ ) |
| 1358 | { | |
| 1359 | 1352 | ROM[i] = BITSWAP8(ROM[i],0,1,2,3,4,5,6,7); |
| 1360 | } | |
| 1361 | 1353 | |
| 1362 | 1354 | ROM = memory_region(REGION_USER1); |
| 1363 | 1355 | |
| 1364 | 1356 | /* decrypt questions roms */ |
| 1365 | 1357 | for( i = 0; i < 0x40000; i++ ) |
| 1366 | { | |
| 1367 | 1358 | ROM[i] = BITSWAP8(ROM[i],0,1,2,3,4,5,6,7); |
| 1368 | } | |
| 1369 | 1359 | } |
| 1370 | 1360 | |
| 1371 | 1361 | |
| 1372 | GAME( 1983, trackfld, 0, trackfld, trackfld, trackfld, ROT0, "Konami", "Track & Field", 0 ) | |
| 1373 | GAME( 1983, trackflc, trackfld, trackfld, trackfld, trackfld, ROT0, "Konami (Centuri license)", "Track & Field (Centuri)", 0 ) | |
| 1374 | GAME( 1983, hyprolym, trackfld, trackfld, trackfld, trackfld, ROT0, "Konami", "Hyper Olympic", 0 ) | |
| 1375 | GAME( 1983, hyprolyb, trackfld, hyprolyb, trackfld, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg)", GAME_IMPERFECT_SOUND ) | |
| 1376 | GAME( 1996, atlantol, trackfld, hyprolyb, atlantol, atlantol, ROT0, "bootleg", "Atlant Olimpic", 0 ) | |
| 1377 | GAME( 1988, mastkin, 0, mastkin, mastkin, mastkin, ROT0, "Du Tech", "The Masters of Kin", GAME_WRONG_COLORS ) | |
| 1378 | GAME( 1985, wizzquiz, 0, wizzquiz, wizzquiz, wizzquiz, ROT0, "Konami", "Wizz Quiz (Konami version)", 0 ) | |
| 1379 | GAME( 1985, wizzquza, wizzquiz, wizzquiz, wizzquiz, wizzquiz, ROT0, "Zilec - Zenitone", "Wizz Quiz (version 4)", 0 ) | |
| 1380 | GAME( 1987, reaktor, 0, reaktor, reaktor, 0, ROT90, "Zilec", "Reaktor (Track & Field Conversion)", 0 ) | |
| 1362 | GAME( 1983, trackfld, 0, trackfld, trackfld, trackfld, ROT0, "Konami", "Track & Field", 0 ) | |
| 1363 | GAME( 1983, trackflc, trackfld, trackfld, trackfld, trackfld, ROT0, "Konami (Centuri license)", "Track & Field (Centuri)", 0 ) | |
| 1364 | GAME( 1983, hyprolym, trackfld, trackfld, trackfld, trackfld, ROT0, "Konami", "Hyper Olympic", 0 ) | |
| 1365 | GAME( 1983, hyprolyb, trackfld, hyprolyb, trackfld, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg)", GAME_IMPERFECT_SOUND ) | |
| 1366 | GAME( 1996, atlantol, trackfld, hyprolyb, atlantol, atlantol, ROT0, "bootleg", "Atlant Olimpic", 0 ) | |
| 1367 | GAME( 1988, mastkin, 0, mastkin, mastkin, mastkin, ROT0, "Du Tech", "The Masters of Kin", GAME_WRONG_COLORS ) | |
| 1368 | GAME( 1985, wizzquiz, 0, wizzquiz, wizzquiz, wizzquiz, ROT0, "Konami", "Wizz Quiz (Konami version)", 0 ) | |
| 1369 | GAME( 1985, wizzquza, wizzquiz, wizzquiz, wizzquiz, wizzquiz, ROT0, "Zilec - Zenitone", "Wizz Quiz (version 4)", 0 ) | |
| 1370 | GAME( 1987, reaktor, 0, reaktor, reaktor, 0, ROT90, "Zilec", "Reaktor (Track & Field conversion)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 116 | 116 | AM_RANGE(0xd800, 0xd83f) AM_READWRITE(MRA8_RAM, fastfred_attributes_w) AM_BASE(&fastfred_attributesram) |
| 117 | 117 | AM_RANGE(0xd840, 0xd85f) AM_RAM AM_BASE(&fastfred_spriteram) AM_SIZE(&fastfred_spriteram_size) |
| 118 | 118 | AM_RANGE(0xd860, 0xdbff) AM_RAM // Unused, but initialized |
| 119 | AM_RANGE(0xe000, 0xe000) AM_READWRITE(input_port_0_r, fastfred_background_color | |
| 119 | AM_RANGE(0xe000, 0xe000) AM_READWRITE(input_port_0_r, MWA8_RAM) AM_BASE(&fastfred_background_color | |
| 120 | 120 | AM_RANGE(0xe800, 0xe800) AM_READ(input_port_1_r) |
| 121 | 121 | AM_RANGE(0xf000, 0xf000) AM_READWRITE(input_port_2_r, MWA8_NOP) |
| 122 | 122 | AM_RANGE(0xf001, 0xf001) AM_WRITE(interrupt_enable_w) |
| r1679 | r1680 | |
| 139 | 139 | AM_RANGE(0xd040, 0xd05f) AM_RAM AM_BASE(&fastfred_spriteram) AM_SIZE(&fastfred_spriteram_size) |
| 140 | 140 | AM_RANGE(0xd060, 0xd3ff) AM_RAM |
| 141 | 141 | AM_RANGE(0xd800, 0xdbff) AM_MIRROR(0x400) AM_READWRITE(MRA8_RAM, fastfred_videoram_w) AM_BASE(&fastfred_videoram) |
| 142 | AM_RANGE(0xe000, 0xe000) AM_WRITE(fastfred_background_color | |
| 142 | AM_RANGE(0xe000, 0xe000) AM_WRITE(MWA8_RAM) AM_BASE(&fastfred_background_color | |
| 143 | 143 | AM_RANGE(0xe800, 0xe800) AM_READ(input_port_0_r) |
| 144 | 144 | AM_RANGE(0xe801, 0xe801) AM_READ(input_port_1_r) |
| 145 | 145 | AM_RANGE(0xe802, 0xe802) AM_READ(input_port_2_r) |
| r1679 | r1680 | |
| 574 | 574 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 575 | 575 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 576 | 576 | MDRV_GFXDECODE(fastfred) |
| 577 | MDRV_PALETTE_LENGTH(256) | |
| 578 | MDRV_COLORTABLE_LENGTH(32*8) | |
| 577 | MDRV_PALETTE_LENGTH(32*8) | |
| 579 | 578 | |
| 580 | 579 | MDRV_PALETTE_INIT(fastfred) |
| 581 | 580 | MDRV_VIDEO_START(fastfred) |
| r1679 | r1680 | |
| 898 | 897 | fastfred_hardware_type = 3; |
| 899 | 898 | } |
| 900 | 899 | |
| 901 | GAME( 1982, flyboy, 0, fastfred, flyboy, flyboy, ROT90, "Kaneko", "Fly-Boy", 0 ) | |
| 902 | GAME( 1982, flyboyb, flyboy, fastfred, flyboy, flyboyb, ROT90, "Kaneko", "Fly-Boy (bootleg)", 0 ) | |
| 903 | GAME( 1982, fastfred, flyboy, fastfred, fastfred, fastfred, ROT90, "Atari", "Fast Freddie", 0 ) | |
| 904 | GAME( 1983, jumpcoas, 0, jumpcoas, jumpcoas, jumpcoas, ROT90, "Kaneko", "Jump Coaster", 0 ) | |
| 905 | GAME( 1983, jumpcoat, jumpcoas,jumpcoas, jumpcoas, jumpcoas, ROT90, "Taito", "Jump Coaster (Taito)", 0 ) | |
| 906 | GAME( 1983, boggy84, 0, jumpcoas, boggy84, boggy84, ROT90, "bootleg", "Boggy '84", 0 ) | |
| 907 | GAME( 1986, redrobin, 0, fastfred, redrobin, flyboyb, ROT90, "Elettronolo", "Red Robin", 0 ) | |
| 908 | GAME( 1983, imago, 0, imago, imago, imago, ROT90, "Acom", "Imago", GAME_IMPERFECT_GRAPHICS ) | |
| 900 | GAME( 1982, flyboy, 0, fastfred, flyboy, flyboy, ROT90, "Kaneko", "Fly-Boy", 0 ) | |
| 901 | GAME( 1982, flyboyb, flyboy, fastfred, flyboy, flyboyb, ROT90, "Kaneko", "Fly-Boy (bootleg)", 0 ) | |
| 902 | GAME( 1982, fastfred, flyboy, fastfred, fastfred, fastfred, ROT90, "Atari", "Fast Freddie", 0 ) | |
| 903 | GAME( 1983, jumpcoas, 0, jumpcoas, jumpcoas, jumpcoas, ROT90, "Kaneko", "Jump Coaster", 0 ) | |
| 904 | GAME( 1983, jumpcoat, jumpcoas, jumpcoas, jumpcoas, jumpcoas, ROT90, "Taito", "Jump Coaster (Taito)", 0 ) | |
| 905 | GAME( 1983, boggy84, 0, jumpcoas, boggy84, boggy84, ROT90, "bootleg", "Boggy '84", 0 ) | |
| 906 | GAME( 1986, redrobin, 0, fastfred, redrobin, flyboyb, ROT90, "Elettronolo", "Red Robin", 0 ) | |
| 907 | GAME( 1983, imago, 0, imago, imago, imago, ROT90, "Acom", "Imago", GAME_IMPERFECT_GRAPHICS ) |
| r1679 | r1680 | |
|---|---|---|
| 100 | 100 | { |
| 101 | 101 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); |
| 102 | 102 | |
| 103 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 103 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
| r1679 | r1680 | |
| 112 | 112 | |
| 113 | 113 | static void start_irq_timer(void) |
| 114 | 114 | { |
| 115 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 115 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 |
| r1679 | r1680 | |
|---|---|---|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | period = attotime_mul(ATTOTIME_IN_HZ(3579545), divider); |
| 205 | timer_adjust( mcu_timer, period, 0, period); | |
| 205 | timer_adjust_periodic( mcu_timer, period, 0, period); | |
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 |
| r1679 | r1680 | |
|---|---|---|
| 799 | 799 | /* video hardware */ |
| 800 | 800 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 801 | 801 | MDRV_GFXDECODE(punchout) |
| 802 | MDRV_PALETTE_LENGTH(1024+1) | |
| 803 | MDRV_COLORTABLE_LENGTH(128*4+128*4+64*8+128*4) | |
| 802 | MDRV_PALETTE_LENGTH(128*4+128*4+64*8+128*4) | |
| 804 | 803 | MDRV_DEFAULT_LAYOUT(layout_dualhuov) |
| 805 | 804 | |
| 806 | 805 | MDRV_SCREEN_ADD("top", 0x000) |
| r1679 | r1680 | |
| 844 | 843 | |
| 845 | 844 | /* video hardware */ |
| 846 | 845 | MDRV_GFXDECODE(armwrest) |
| 847 | MDRV_ | |
| 846 | MDRV_P | |
| 848 | 847 | |
| 849 | 848 | MDRV_PALETTE_INIT(armwrest) |
| 850 | 849 | MDRV_VIDEO_START(armwrest) |
| r1679 | r1680 | |
|---|---|---|
| 965 | 965 | if (regs[1] & 2) |
| 966 | 966 | logerror("Unexpected value: timer %d is prescaled\n", which); |
| 967 | 967 | if (scale != 0) |
| 968 | timer_adjust(timer[which], attotime_mul(TIMER_PERIOD, scale), which | |
| 968 | timer_adjust_oneshot(timer[which], attotime_mul(TIMER_PERIOD, scale), which | |
| 969 | 969 | } |
| 970 | 970 | |
| 971 | 971 | /* trigger the interrupt */ |
| r1679 | r1680 | |
| 1178 | 1178 | if (nile_regs[offset] & 2) |
| 1179 | 1179 | logerror("Unexpected value: timer %d is prescaled\n", which); |
| 1180 | 1180 | if (scale != 0) |
| 1181 | timer_adjust(timer[which], attotime_mul(TIMER_PERIOD, scale), which | |
| 1181 | timer_adjust_oneshot(timer[which], attotime_mul(TIMER_PERIOD, scale), which | |
| 1182 | 1182 | if (LOG_TIMERS) logerror("Starting timer %d at a rate of %d Hz\n", which, (int)ATTOSECONDS_TO_HZ(attotime_mul(TIMER_PERIOD, nile_regs[offset + 1] + 1).attoseconds)); |
| 1183 | 1183 | } |
| 1184 | 1184 | |
| r1679 | r1680 | |
| 1188 | 1188 | if (nile_regs[offset] & 2) |
| 1189 | 1189 | logerror("Unexpected value: timer %d is prescaled\n", which); |
| 1190 | 1190 | nile_regs[offset + 1] = attotime_to_double(timer_timeleft(timer[which])) * SYSTEM_CLOCK; |
| 1191 | timer_adjust(timer[which], attotime_never, which | |
| 1191 | timer_adjust_oneshot(timer[which], attotime_never, which | |
| 1192 | 1192 | } |
| 1193 | 1193 | break; |
| 1194 | 1194 | |
| r1679 | r1680 | |
| 1204 | 1204 | { |
| 1205 | 1205 | if (nile_regs[offset - 1] & 2) |
| 1206 | 1206 | logerror("Unexpected value: timer %d is prescaled\n", which); |
| 1207 | timer_adjust(timer[which], attotime_mul(TIMER_PERIOD, nile_regs[offset]), which | |
| 1207 | timer_adjust_oneshot(timer[which], attotime_mul(TIMER_PERIOD, nile_regs[offset]), which | |
| 1208 | 1208 | } |
| 1209 | 1209 | break; |
| 1210 | 1210 | |
| r1679 | r1680 | |
| 1781 | 1781 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1782 | 1782 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 1783 | 1783 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 1784 | PORT_ | |
| 1784 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 1785 | 1785 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 1786 | 1786 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1787 | 1787 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 423 | 423 | MDRV_SCREEN_SIZE(36*8, 32*8) |
| 424 | 424 | MDRV_SCREEN_VISIBLE_AREA(1*8, 35*8-1, 2*8, 30*8-1) |
| 425 | 425 | MDRV_GFXDECODE(finalizr) |
| 426 | MDRV_PALETTE_LENGTH(32) | |
| 427 | MDRV_COLORTABLE_LENGTH(2*16*16) | |
| 426 | MDRV_PALETTE_LENGTH(2*16*16) | |
| 428 | 427 | |
| 429 | 428 | MDRV_PALETTE_INIT(finalizr) |
| 430 | 429 | MDRV_VIDEO_START(finalizr) |
| r1679 | r1680 | |
| 470 | 469 | ROM_REGION( 0x0240, REGION_PROMS, 0 ) |
| 471 | 470 | ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) /* palette */ |
| 472 | 471 | ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) /* palette */ |
| 473 | ROM_LOAD( "523h12.10f", 0x0040, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */ | |
| 474 | ROM_LOAD( "523h13.11f", 0x0140, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */ | |
| 472 | ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */ | |
| 473 | ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */ | |
| 475 | 474 | ROM_END |
| 476 | 475 | |
| 477 | 476 | ROM_START( finalizb ) |
| r1679 | r1680 | |
| 494 | 493 | ROM_REGION( 0x0240, REGION_PROMS, 0 ) |
| 495 | 494 | ROM_LOAD( "523h10.2f", 0x0000, 0x0020, CRC(ec15dd15) SHA1(710384b154a9363fdc88edffda252f1d60e000dc) ) /* palette */ |
| 496 | 495 | ROM_LOAD( "523h11.3f", 0x0020, 0x0020, CRC(54be2e83) SHA1(3200abc7f2238d62d7204ef57a6daa2df150538d) ) /* palette */ |
| 497 | ROM_LOAD( "523h12.10f", 0x0040, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */ | |
| 498 | ROM_LOAD( "523h13.11f", 0x0140, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */ | |
| 496 | ROM_LOAD( "523h13.11f", 0x0040, 0x0100, CRC(4e0647a0) SHA1(fb87f878456b8b76bb2c028cb890d2a5c1c3e388) ) /* characters */ | |
| 497 | ROM_LOAD( "523h12.10f", 0x0140, 0x0100, CRC(53166a2a) SHA1(6cdde206036df7176679711f7888d72acee27c8f) ) /* sprites */ | |
| 499 | 498 | ROM_END |
| 500 | 499 | |
| 501 | 500 |
| r1679 | r1680 | |
|---|---|---|
| 164 | 164 | update_main_irqs(); |
| 165 | 165 | |
| 166 | 166 | /* come back at the next appropriate scanline */ |
| 167 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 167 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 168 | 168 | |
| 169 | 169 | #if TWEAK_IRQ2_SCANLINE |
| 170 | 170 | if (scanline == 223) |
| r1679 | r1680 | |
| 186 | 186 | static MACHINE_RESET( yboard ) |
| 187 | 187 | { |
| 188 | 188 | interrupt_timer = timer_alloc(scanline_callback, NULL); |
| 189 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 223, 0), 223 | |
| 189 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 223, 0), 223 | |
| 190 | 190 | |
| 191 | 191 | state_save_register_global_array(misc_io_data); |
| 192 | 192 | state_save_register_global_array(analog_data); |
| r1679 | r1680 | |
|---|---|---|
| 108 | 108 | next_counter = INT_TRIGGER_COUNT_1; |
| 109 | 109 | |
| 110 | 110 | next_vpos = vysnc_chain_counter_to_vpos(next_counter); |
| 111 | timer_adjust(interrupt_assert_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0, attotime_zero); | |
| 112 | timer_adjust(interrupt_clear_timer, video_screen_get_time_until_pos(0, vpos + 1, 0), 0, attotime_zero); | |
| 111 | timer_adjust_oneshot(interrupt_assert_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0); | |
| 112 | timer_adjust_oneshot(interrupt_clear_timer, video_screen_get_time_until_pos(0, vpos + 1, 0), 0); | |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
| r1679 | r1680 | |
| 123 | 123 | static void start_interrupt_timers(void) |
| 124 | 124 | { |
| 125 | 125 | int vpos = vysnc_chain_counter_to_vpos(INT_TRIGGER_COUNT_1); |
| 126 | timer_adjust(interrupt_assert_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 126 | timer_adjust_oneshot(interrupt_assert_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 |
| r1679 | r1680 | |
|---|---|---|
| 34 | 34 | static VIDEO_START( cowrace ) |
| 35 | 35 | { |
| 36 | 36 | tmap = tilemap_create( get_tile_info, tilemap_scan_rows, |
| 37 | | |
| 37 | | |
| 38 | 38 | |
| 39 | 39 | tilemap_set_transparent_pen(tmap, 0); |
| 40 | 40 | } |
| r1679 | r1680 | |
|---|---|---|
| 211 | 211 | |
| 212 | 212 | static VIDEO_START(koikoi) |
| 213 | 213 | { |
| 214 | koikoi_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 214 | koikoi_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | static VIDEO_UPDATE(koikoi) |
| r1679 | r1680 | |
|---|---|---|
| 102 | 102 | |
| 103 | 103 | static VIDEO_UPDATE( hangplt ) |
| 104 | 104 | { |
| 105 | fillbitmap(bitmap, machine-> | |
| 105 | fillbitmap(bitmap, machine-> | |
| 106 | 106 | |
| 107 | 107 | K001604_tile_update(screen); |
| 108 | 108 | // K001604_draw_back_layer(bitmap, cliprect); |
| r1679 | r1680 | |
| 563 | 563 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 564 | 564 | |
| 565 | 565 | PORT_START |
| 566 | PORT_ | |
| 566 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 567 | 567 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 568 | 568 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 569 | 569 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 610 | 610 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 611 | 611 | |
| 612 | 612 | PORT_START |
| 613 | PORT_ | |
| 613 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 614 | 614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 615 | 615 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 616 | 616 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 660 | 660 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 661 | 661 | |
| 662 | 662 | PORT_START |
| 663 | PORT_ | |
| 663 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 664 | 664 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 665 | 665 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 666 | 666 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 697 | 697 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 698 | 698 | |
| 699 | 699 | PORT_START |
| 700 | PORT_ | |
| 700 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 701 | 701 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 702 | 702 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 703 | 703 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 146 | 146 | scanline = 0; |
| 147 | 147 | |
| 148 | 148 | /* set a timer for it */ |
| 149 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 149 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
| r1679 | r1680 | |
| 160 | 160 | static MACHINE_RESET( foodf ) |
| 161 | 161 | { |
| 162 | 162 | atarigen_interrupt_reset(update_interrupts); |
| 163 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 163 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 |
| r1679 | r1680 | |
|---|---|---|
| 324 | 324 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 325 | 325 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 326 | 326 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 327 | PORT_ | |
| 327 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW | |
| 328 | 328 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 329 | 329 | INPUT_PORTS_END |
| 330 | 330 | |
| r1679 | r1680 | |
| 380 | 380 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 381 | 381 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 382 | 382 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 383 | PORT_ | |
| 383 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW | |
| 384 | 384 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 385 | 385 | INPUT_PORTS_END |
| 386 | 386 |
| r1679 | r1680 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | vpos = ( ( vpos / 8 ) + 1 ) * 8; |
| 45 | 45 | |
| 46 | timer_adjust( acefruit_refresh_timer, video_screen_get_time_until_pos( 0, vpos, 0 ), 0 | |
| 46 | timer_adjust_oneshot( acefruit_refresh_timer, video_screen_get_time_until_pos( 0, vpos, 0 ), 0 | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | static VIDEO_START( acefruit ) |
| r1679 | r1680 | |
| 54 | 54 | static INTERRUPT_GEN( acefruit_vblank ) |
| 55 | 55 | { |
| 56 | 56 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE ); |
| 57 | timer_adjust( acefruit_refresh_timer, attotime_zero, 0 | |
| 57 | timer_adjust_oneshot( acefruit_refresh_timer, attotime_zero, 0 | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | static VIDEO_UPDATE( acefruit ) |
| r1679 | r1680 | |
|---|---|---|
| 6649 | 6649 | MDRV_SCREEN_SIZE(336, 256) |
| 6650 | 6650 | MDRV_SCREEN_VISIBLE_AREA(0, 336-1, 5, 256-16+5-1) |
| 6651 | 6651 | MDRV_PALETTE_LENGTH(0x100) |
| 6652 | MDRV_COLORTABLE_LENGTH(0x100) | |
| 6653 | 6652 | |
| 6654 | 6653 | MDRV_VIDEO_START(ddenlovr) |
| 6655 | 6654 | MDRV_VIDEO_EOF(ddenlovr) |
| r1679 | r1680 | |
| 6725 | 6724 | MDRV_SCREEN_SIZE(336, 256) |
| 6726 | 6725 | MDRV_SCREEN_VISIBLE_AREA(0, 336-1, 5, 256-16+5-1) |
| 6727 | 6726 | MDRV_PALETTE_LENGTH(0x100) |
| 6728 | MDRV_COLORTABLE_LENGTH(0x100) | |
| 6729 | 6727 | |
| 6730 | 6728 | MDRV_VIDEO_START(mmpanic) // extra layers |
| 6731 | 6729 | MDRV_VIDEO_EOF(ddenlovr) |
| r1679 | r1680 | |
|---|---|---|
| 17 | 17 | VU-003 <- High Colour Background |
| 18 | 18 | VIEW2-CHIP 23160-509 9047EAI (144pin PQFP) <- Tilemaps |
| 19 | 19 | MUX2-CHIP (64pin PQFP) |
| 20 | HELP1-CHIP | |
| 20 | HELP1-CHIP (64pin PQFP) | |
| 21 | 21 | IU-001 9045KP002 (44pin PQFP) |
| 22 | 22 | I/O JAMMA MC-8282 047 (46pin) <- Inputs |
| 23 | 23 | |
| r1679 | r1680 | |
| 28 | 28 | 91 The Berlin Wall |
| 29 | 29 | Magical Crystals Z00FC-02 |
| 30 | 30 | 92 Bakuretsu Breaker ZOOFC-02 |
| 31 | Blaze On | |
| 31 | Blaze On Z02AT-002 2 VU-00 | |
| 32 | 32 | Shogun Warriors ZO1DK-002 CALC3 MCU protection (EEPROM handling, 68k code snippet, data - palettes, tilemaps, fighters) |
| 33 | 33 | B.Rap Boys ZO1DK-002 CALC3 MCU protection (EEPROM handling, 68k code snippet, data - palettes, tilemaps, fighters) |
| 34 | 34 | 94 Great 1000 Miles Rally TBSOP01 MCU protection (EEPROM handling etc.) |
| r1679 | r1680 | |
| 892 | 892 | PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7" ) /* Listed as "Unused" */ |
| 893 | 893 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW1:8" ) /* Listed as "Unused" */ |
| 894 | 894 | |
| 895 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 896 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 897 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 898 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 899 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 900 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 901 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 902 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 895 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 896 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 897 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 898 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 899 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 900 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 901 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 902 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 903 | 903 | |
| 904 | 904 | PORT_START // IN1 - Player 2 - e00002.b |
| 905 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 906 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 907 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 908 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 909 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 910 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 911 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 912 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 905 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 906 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 907 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 908 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 909 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 910 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 911 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 912 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 913 | 913 | |
| 914 | 914 | PORT_START // IN2 - Coins - e00004.b |
| 915 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 916 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 915 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 916 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 917 | 917 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 918 | 918 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 919 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 920 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) // pause | |
| 921 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 922 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 919 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 920 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) // pause | |
| 921 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 922 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 923 | 923 | |
| 924 | 924 | PORT_START // IN3 - Seems unused ! - e00006.b |
| 925 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 926 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 927 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 928 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 929 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 930 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 931 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 932 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 925 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 926 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 927 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 928 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 929 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 930 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 931 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 932 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 933 | 933 | INPUT_PORTS_END |
| 934 | 934 | |
| 935 | 935 | |
| r1679 | r1680 | |
| 939 | 939 | |
| 940 | 940 | static INPUT_PORTS_START( berlwall ) |
| 941 | 941 | PORT_START // IN0 - Player 1 - 680000.w |
| 942 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 943 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 944 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 945 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 946 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 947 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 948 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 949 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 942 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 943 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 944 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 945 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 946 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 947 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 948 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 949 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 950 | 950 | |
| 951 | 951 | PORT_START // IN1 - Player 2 - 680002.w |
| 952 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 953 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 954 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 955 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 956 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 957 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 958 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 959 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 952 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 953 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 954 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 955 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 956 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 957 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 958 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 959 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 960 | 960 | |
| 961 | 961 | PORT_START // IN2 - Coins - 680004.w |
| 962 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 963 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 962 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 963 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 964 | 964 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 965 | 965 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 966 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 967 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 968 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 969 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 966 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 967 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 968 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 969 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 970 | 970 | |
| 971 | 971 | PORT_START // IN3 - ? - 680006.w |
| 972 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 973 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 974 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 975 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 976 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 977 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 978 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 979 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 972 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 973 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 974 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 975 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 976 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 977 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 978 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 979 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 980 | 980 | |
| 981 | 981 | PORT_START_TAG("DSW1") // IN4 - DSW 1 - $200018.b <- ! $80001d.b |
| 982 | 982 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1") |
| r1679 | r1680 | |
| 1130 | 1130 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1131 | 1131 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1132 | 1132 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1133 | PORT_ | |
| 1133 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_LOW | |
| 1134 | 1134 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT ) |
| 1135 | 1135 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1136 | 1136 | INPUT_PORTS_END |
| r1679 | r1680 | |
| 1141 | 1141 | |
| 1142 | 1142 | static INPUT_PORTS_START( bloodwar ) |
| 1143 | 1143 | PORT_START // IN0 - Player 1 - b00000.w |
| 1144 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1145 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1146 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1147 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1148 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1149 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1150 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1151 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1144 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1145 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1146 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1147 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1148 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1149 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1150 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1151 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1152 | 1152 | |
| 1153 | 1153 | PORT_START // IN1 - Player 2 - b00002.w |
| 1154 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1155 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1156 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1157 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1158 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1159 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1160 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1161 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1154 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1155 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1156 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1157 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1158 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1159 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1160 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1161 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1162 | 1162 | |
| 1163 | 1163 | PORT_START // IN2 - Coins - b00004.w |
| 1164 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1165 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1166 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1167 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1168 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1169 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1170 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1171 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // tested | |
| 1164 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1165 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1166 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1167 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1168 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 1169 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1170 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1171 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // tested | |
| 1172 | 1172 | |
| 1173 | 1173 | PORT_START // IN3 - ? - b00006.w |
| 1174 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1175 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1176 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // tested | |
| 1177 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1178 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1179 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1180 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1181 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1174 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1175 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1176 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // tested | |
| 1177 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1178 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1179 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1180 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1181 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1182 | 1182 | |
| 1183 | 1183 | PORT_START // IN4 - DSW from the MCU - $10497e.b <- $208000.b |
| 1184 | 1184 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1") |
| r1679 | r1680 | |
| 1211 | 1211 | |
| 1212 | 1212 | static INPUT_PORTS_START( bonkadv ) |
| 1213 | 1213 | PORT_START // IN0 - Player 1 - b00000.w |
| 1214 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1215 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1216 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1217 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1218 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1219 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1220 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1221 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1214 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1215 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1216 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1217 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1218 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1219 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1220 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1221 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1222 | 1222 | |
| 1223 | 1223 | PORT_START // IN1 - Player 2 - b00002.w |
| 1224 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1225 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1226 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1227 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1228 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1229 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1230 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1231 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1224 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1225 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1226 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1227 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1228 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1229 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1230 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1231 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1232 | 1232 | |
| 1233 | 1233 | PORT_START // IN2 - Coins - b00004.w |
| 1234 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1235 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1236 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1237 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1238 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1239 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1240 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1241 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) | |
| 1234 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1235 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1236 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1237 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1238 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 1239 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1240 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1241 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) | |
| 1242 | 1242 | |
| 1243 | 1243 | PORT_START // IN3 - ? - b00006.w |
| 1244 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1245 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1246 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1247 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1248 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1249 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1250 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1251 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1244 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1245 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1246 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1247 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1248 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1249 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested | |
| 1250 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1251 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1252 | 1252 | |
| 1253 | 1253 | PORT_START // IN4 - DSW from the MCU - $10019e.b <- $200200.b |
| 1254 | 1254 | PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) ) |
| r1679 | r1680 | |
| 1282 | 1282 | |
| 1283 | 1283 | static INPUT_PORTS_START( gtmr ) |
| 1284 | 1284 | PORT_START // IN0 - Player 1 - b00000.w |
| 1285 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1286 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1287 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1288 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1289 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // swapped for consistency: | |
| 1290 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // button1 is usually accel. | |
| 1291 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1292 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1285 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1286 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1287 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1288 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1289 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // swapped for consistency: | |
| 1290 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // button1 is usually accel. | |
| 1291 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1292 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1293 | 1293 | |
| 1294 | 1294 | PORT_START // IN1 - Player 2 - b00002.w |
| 1295 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1296 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1297 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1298 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1299 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // swapped for consistency: | |
| 1300 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // button1 is usually accel. | |
| 1301 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1302 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1295 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1296 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1297 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1298 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1299 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // swapped for consistency: | |
| 1300 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // button1 is usually accel. | |
| 1301 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1302 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1303 | 1303 | |
| 1304 | 1304 | PORT_START // IN2 - Coins - b00004.w |
| 1305 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1306 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1305 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1306 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1307 | 1307 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 1308 | 1308 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 1309 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1310 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1311 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1312 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1309 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 1310 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1311 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1312 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1313 | 1313 | |
| 1314 | 1314 | PORT_START // IN3 - Seems unused ! - b00006.w |
| 1315 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1316 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1317 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1318 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1319 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1320 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1321 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1322 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1315 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1316 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1317 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1318 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1319 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1320 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1321 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1322 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1323 | 1323 | |
| 1324 | 1324 | PORT_START // IN4 - DSW from the MCU - 101265.b <- 206000.b |
| 1325 | 1325 | PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW1:1" ) |
| r1679 | r1680 | |
| 1355 | 1355 | |
| 1356 | 1356 | static INPUT_PORTS_START( gtmr2 ) |
| 1357 | 1357 | PORT_START // IN0 - Player 1 - 100004.w <- b00000.w (cpl) |
| 1358 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1359 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1360 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1361 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1362 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // swapped for consistency: | |
| 1363 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // button1 is usually accel. | |
| 1364 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1365 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1358 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1359 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1360 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1361 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1362 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // swapped for consistency: | |
| 1363 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // button1 is usually accel. | |
| 1364 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1365 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1366 | 1366 | |
| 1367 | 1367 | PORT_START // IN1 - Player 2 - 10000c.w <- b00002.w (cpl) - for "test mode" only |
| 1368 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1369 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1370 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1371 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1372 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // swapped for consistency: | |
| 1373 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // button1 is usually accel. | |
| 1374 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1375 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1368 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1369 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1370 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1371 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1372 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // swapped for consistency: | |
| 1373 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // button1 is usually accel. | |
| 1374 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1375 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1376 | 1376 | |
| 1377 | 1377 | PORT_START // IN2 - Coins - 100014.w <- b00004.w (cpl) |
| 1378 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1379 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) // only in "test mode" | |
| 1378 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1379 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) // only in "test mode" | |
| 1380 | 1380 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 1381 | 1381 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 1382 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1383 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1384 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1385 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1382 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 1383 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1384 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1385 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1386 | 1386 | |
| 1387 | 1387 | PORT_START // IN3 - 100017.w <- b00006.w |
| 1388 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1389 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1390 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1391 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1392 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1393 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1388 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1389 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1390 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1391 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1392 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1393 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1394 | 1394 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("IN 3-6") // Code at 0x002236 - Centers 270D wheel ? |
| 1395 | PORT_BIT( | |
| 1395 | PORT_BIT( | |
| 1396 | 1396 | |
| 1397 | 1397 | PORT_START // IN4 - DSW from the MCU - 1016f7.b <- 206000.b |
| 1398 | 1398 | PORT_DIPNAME( 0x0700, 0x0700, "Linked Operation Board Number" ) PORT_DIPLOCATION("SW1:6,7,8") |
| r1679 | r1680 | |
| 1430 | 1430 | |
| 1431 | 1431 | PORT_START // Fake IN1 - To be pressed during boot sequence - Code at 0x000c9e |
| 1432 | 1432 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("IN 1-0") PORT_CODE(KEYCODE_H) // "sound test" |
| 1433 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1434 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1435 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1433 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1434 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1435 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1436 | 1436 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("IN 1-4") PORT_CODE(KEYCODE_J) // "view tiles" |
| 1437 | 1437 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("IN 1-5") PORT_CODE(KEYCODE_K) // "view memory" |
| 1438 | 1438 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("IN 1-6") PORT_CODE(KEYCODE_L) // "view sprites ?" |
| 1439 | PORT_BIT( | |
| 1439 | PORT_BIT( | |
| 1440 | 1440 | INPUT_PORTS_END |
| 1441 | 1441 | |
| 1442 | 1442 | |
| r1679 | r1680 | |
| 1458 | 1458 | PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7" ) /* Listed as "Unused" */ |
| 1459 | 1459 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW1:8" ) /* Listed as "Unused" */ |
| 1460 | 1460 | |
| 1461 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1462 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1463 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1464 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1465 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1466 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1467 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1468 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1461 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 1462 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 1463 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 1464 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 1465 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1466 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1467 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1468 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1469 | 1469 | |
| 1470 | 1470 | PORT_START // IN1 - Player 2 - c00002.b |
| 1471 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1472 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1473 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1474 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1475 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1476 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1477 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1478 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1471 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1472 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1473 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1474 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1475 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1476 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1477 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1478 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1479 | 1479 | |
| 1480 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1481 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1482 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1483 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1484 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1485 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1486 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1487 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1480 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 1481 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 1482 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 1483 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 1484 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1485 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1486 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1487 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1488 | 1488 | |
| 1489 | 1489 | PORT_START // IN2 - Other Buttons - c00004.b |
| 1490 | 1490 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1492 | 1492 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 1493 | 1493 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 1494 | 1494 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) |
| 1495 | PORT_ | |
| 1495 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW | |
| 1496 | 1496 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) |
| 1497 | 1497 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1498 | 1498 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1506 | 1506 | |
| 1507 | 1507 | static INPUT_PORTS_START( shogwarr ) |
| 1508 | 1508 | PORT_START // IN0 - - b80000.w |
| 1509 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1510 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1511 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1512 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1513 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1514 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1515 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1516 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1509 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1510 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1511 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1512 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1513 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1514 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1515 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1516 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1517 | 1517 | |
| 1518 | 1518 | PORT_START // IN1 - - b80002.w |
| 1519 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1520 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1521 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1522 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1523 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1524 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1525 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1526 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1519 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1520 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1521 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1522 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1523 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1524 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1525 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1526 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1527 | 1527 | |
| 1528 | 1528 | PORT_START // IN2 - Coins - b80004.w |
| 1529 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1530 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1531 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1532 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1533 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1534 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1535 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1536 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1529 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1530 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1531 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 1532 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 1533 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) | |
| 1534 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT ) | |
| 1535 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1536 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested | |
| 1537 | 1537 | |
| 1538 | 1538 | PORT_START // IN3 - ? - b80006.w |
| 1539 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1540 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1541 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1542 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1543 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1544 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1545 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1546 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1539 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1540 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1541 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1542 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1543 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1544 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1545 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1546 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1547 | 1547 | |
| 1548 | 1548 | PORT_START // IN4 - DSW from the MCU - 102e15.b <- 200059.b |
| 1549 | 1549 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1") |
| r1679 | r1680 | |
| 2387 | 2387 | BZ_BG.U2 57C8200 BG CHR |
| 2388 | 2388 | BZ_SP1.U20 27C8001 OBJ |
| 2389 | 2389 | BZ_SP2.U21 27C8001 OBJ |
| 2390 | BZ_SP1.U68 ( == BZ_SP1.U20) | |
| 2391 | BZ_SP2.U86 ( == BZ_SP2.U21) | |
| 2390 | BZ_SP1.U68 27C8001 OBJ (same as BZ_SP1.U20 for 2nd sprite chip) | |
| 2391 | BZ_SP2.U86 27C8001 OBJ (same as BZ_SP2.U21 for 2nd sprite chip) | |
| 2392 | 2392 | |
| 2393 | 2393 | ***************************************************************************/ |
| 2394 | 2394 |
| r1679 | r1680 | |
|---|---|---|
| 299 | 299 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 300 | 300 | MDRV_GFXDECODE(goldstar) |
| 301 | 301 | MDRV_PALETTE_LENGTH(256) |
| 302 | MDRV_COLORTABLE_LENGTH(256) | |
| 303 | 302 | MDRV_NVRAM_HANDLER(goldstar) |
| 304 | 303 | |
| 305 | 304 | MDRV_VIDEO_START(goldstar) |
| r1679 | r1680 | |
| 336 | 335 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 337 | 336 | MDRV_GFXDECODE(bl) |
| 338 | 337 | MDRV_PALETTE_LENGTH(256) |
| 339 | MDRV_COLORTABLE_LENGTH(256) | |
| 340 | 338 | MDRV_NVRAM_HANDLER(goldstar) |
| 341 | 339 | |
| 342 | 340 | MDRV_VIDEO_START(goldstar) |
| r1679 | r1680 | |
| 372 | 370 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1) |
| 373 | 371 | MDRV_GFXDECODE(ml) |
| 374 | 372 | MDRV_PALETTE_LENGTH(256) |
| 375 | MDRV_COLORTABLE_LENGTH(256) | |
| 376 | 373 | MDRV_NVRAM_HANDLER(goldstar) |
| 377 | 374 | |
| 378 | 375 | MDRV_VIDEO_START(goldstar) |
| r1679 | r1680 | |
|---|---|---|
| 269 | 269 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) |
| 270 | 270 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 271 | 271 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 272 | PORT_ | |
| 272 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 273 | 273 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 274 | 274 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 275 | 275 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r1679 | r1680 | |
| 362 | 362 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) |
| 363 | 363 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 364 | 364 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 365 | PORT_ | |
| 365 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 366 | 366 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 367 | 367 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 368 | 368 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r1679 | r1680 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | static VIDEO_START( cybertnk ) |
| 195 | 195 | { |
| 196 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 196 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows, | |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | static VIDEO_UPDATE( cybertnk ) |
| r1679 | r1680 | |
| 409 | 409 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // MG 2 |
| 410 | 410 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // Cannon 2 |
| 411 | 411 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 412 | PORT_ | |
| 412 | PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW | |
| 413 | 413 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START2 ) |
| 414 | 414 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START1 ) |
| 415 | 415 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 404 | 404 | static INPUT_PORTS_START( namcos10 ) |
| 405 | 405 | /* IN 0 */ |
| 406 | 406 | PORT_START |
| 407 | PORT_ | |
| 407 | PORT_SERVICE_NO_TOGGLE( 0x8000, IP_ACTIVE_HIGH | |
| 408 | 408 | PORT_BIT( 0x7fff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 409 | 409 | |
| 410 | 410 | /* IN 1 */ |
| r1679 | r1680 | |
|---|---|---|
| 2038 | 2038 | ROM_LOAD( "mr96004-10.22", 0x000000, 0x400000, CRC(83f4303a) SHA1(90ee010591afe1d35744925ef0e8d9a7e2ef3378) ) |
| 2039 | 2039 | ROM_END |
| 2040 | 2040 | |
| 2041 | /* | |
| 2042 | ||
| 2043 | World PK Soccer V2 | |
| 2044 | (c)1996 Jaleco | |
| 2045 | ||
| 2046 | MegaSystem32 with I/O subboard OZ-93155 | |
| 2047 | ||
| 2048 | ROM board: | |
| 2049 | MB-93138A EB91022-20078-1 | |
| 2050 | ||
| 2051 | 25 (actual label is "PK SOCCER V2 ROM 25 VER. 1.1") IC36 | |
| 2052 | 27 (actual label is "PK SOCCER V2 ROM 27 VER. 1.1") IC38 | |
| 2053 | 29 (actual label is "PK SOCCER V2 ROM 29 VER. 1.1") IC40 | |
| 2054 | 31 (actual label is "PK SOCCER V2 ROM 31 VER. 1.1") IC42 | |
| 2055 | 32 (actual label is "PK SOCCER V2 ROM 32 VER. 1.1") IC43 | |
| 2056 | ||
| 2057 | MR92042-01.22 (16M mask) IC33 | |
| 2058 | MR92042-08.23 (16M mask) IC34 | |
| 2059 | ||
| 2060 | ws-21 25 (actual label is "MB93138 Ver1.0 WS-21") IC30 | |
| 2061 | ||
| 2062 | MR95033-01.13 (16M mask) IC20 | |
| 2063 | MR95033-02.1 (16M mask) IC3 | |
| 2064 | MR95033-03.14 (16M mask) IC21 | |
| 2065 | MR95033-04.2 (16M mask) IC4 | |
| 2066 | MR95033-05.15 (16M mask) IC22 | |
| 2067 | MR95033-06.3 (16M mask) IC5 | |
| 2068 | ||
| 2069 | MR95033-07.9 (16M mask) IC11 | |
| 2070 | ||
| 2071 | MR95033-09.11 (16M mask) IC13 | |
| 2072 | ||
| 2073 | Daughter board: | |
| 2074 | SE-93139 EB91022-30056 | |
| 2075 | Custom chip: SS92046-01 9338EV 436091 06441 | |
| 2076 | ||
| 2077 | */ | |
| 2078 | ||
| 2079 | ROM_START( wpksocv2 ) | |
| 2080 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* V70 code */ | |
| 2081 | ROM_LOAD32_BYTE( "25", 0x000003, 0x80000, CRC(6c22a56c) SHA1(a03cbcfc024b39d2776f9e9897d1da07df6ae2d7) ) | |
| 2082 | ROM_LOAD32_BYTE( "27", 0x000002, 0x80000, CRC(50c594a8) SHA1(454a63d7b2a07399a64449205271b797bca1dec1) ) | |
| 2083 | ROM_LOAD32_BYTE( "29", 0x000001, 0x80000, CRC(22acd835) SHA1(0fa96a6dfde737d541842f85dc257776044e15b5) ) | |
| 2084 | ROM_LOAD32_BYTE( "31", 0x000000, 0x80000, CRC(f25e50f5) SHA1(b58722f11a8b94ef053caf531ac94a959350288a) ) | |
| 2085 | ||
| 2086 | ROM_REGION( 0xc00000, REGION_GFX1, 0 ) /* sprites, don't dispose since we use GFX_RAW */ | |
| 2087 | ROM_LOAD32_WORD( "mr95033-01.13", 0x000000, 0x200000, CRC(1f76ed57) SHA1(af9076b4b4c26b362825d892f46d2c04b4bb9d07) ) | |
| 2088 | ROM_LOAD32_WORD( "mr95033-02.1", 0x000002, 0x200000, CRC(5b119910) SHA1(aff44e355227dd159e388ab85a5b6d48644ff421) ) | |
| 2089 | ROM_LOAD32_WORD( "mr95033-03.14", 0x400000, 0x200000, CRC(8b6099ed) SHA1(c514cec1491aed00a5714c0b8d17c96e87ba50aa) ) | |
| 2090 | ROM_LOAD32_WORD( "mr95033-04.2", 0x400002, 0x200000, CRC(59144dc6) SHA1(0e192001d668791c91ca2af6b367067a5106a4b2) ) | |
| 2091 | ROM_LOAD32_WORD( "mr95033-05.15", 0x800000, 0x200000, CRC(cc5b8d0b) SHA1(70a5b9db600fc168d13ad54653cf1c8d2a45d991) ) | |
| 2092 | ROM_LOAD32_WORD( "mr95033-06.3", 0x800002, 0x200000, CRC(2f79942f) SHA1(73417d10f37bcd539b8081312226cf142a5a0d3d) ) | |
| 2093 | ||
| 2094 | ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* roz tiles, don't dispose since we use GFX_RAW */ | |
| 2095 | ROM_LOAD( "mr95033-07.9", 0x000000, 0x200000, CRC(76cd2e0b) SHA1(41aa18dfb4e06547d1f6d7ce49e5225027d16bbb) ) | |
| 2096 | ||
| 2097 | ROM_REGION( 0x200000, REGION_GFX3, 0 ) /* bg tiles, don't dispose since we use GFX_RAW */ | |
| 2098 | ROM_LOAD( "mr95033-09.11", 0x000000, 0x200000, CRC(8a6dae81) SHA1(e235f2865a9a003330bff1e4d0a017e5d10efd2a) ) | |
| 2099 | ||
| 2100 | ROM_REGION( 0x080000, REGION_GFX4, 0 ) /* tx tiles, don't dispose since we use GFX_RAW */ | |
| 2101 | ROM_LOAD( "32", 0x000000, 0x080000, CRC(becc25c2) SHA1(4ae7665cd45ebd9586068e99327145194ba216fc) ) | |
| 2102 | ||
| 2103 | ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* z80 program */ | |
| 2104 | ROM_LOAD( "ws-21", 0x000000, 0x040000, CRC(bdeff5d6) SHA1(920a6fc983d53f09510887e4e81ee89ccd5079e6) ) | |
| 2105 | ROM_RELOAD( 0x010000, 0x40000 ) | |
| 2106 | ||
| 2107 | ROM_REGION( 0x400000, REGION_SOUND1, 0 ) /* samples */ | |
| 2108 | ROM_LOAD( "mr92042-01.22", 0x000000, 0x200000, CRC(0fa26f65) SHA1(e92b14862fbce33ea4ab4567ec48199bfcbbdd84) ) | |
| 2109 | ROM_LOAD( "mr95033-08.23", 0x200000, 0x200000, CRC(89a291fa) SHA1(7746a0490134fc902ce2dc7b0d33b455d792c105) ) | |
| 2110 | ROM_END | |
| 2111 | ||
| 2112 | ||
| 2041 | 2113 | /********** DECRYPT **********/ |
| 2042 | 2114 | |
| 2043 | 2115 | /* 4 known types */ |
| r1679 | r1680 | |
| 2282 | 2354 | GAME( 1996, kirarast, 0, ms32, kirarast, kirarast, ROT0, "Jaleco", "Ryuusei Janshi Kirara Star", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 2283 | 2355 | GAME( 1997, tp2m32, tetrisp2, ms32, tp2m32, ss91022_10, ROT0, "Jaleco", "Tetris Plus 2 (MegaSystem 32 Version)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 2284 | 2356 | GAME( 1997, bnstars, bnstars1, ms32, 47pie2, bnstars, ROT0, "Jaleco", "Vs. Janshi Brandnew Stars (MegaSystem32 Version)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 2357 | GAME( 1996, wpksocv2, 0, ms32, ms32, ss92046_01, ROT0, "Jaleco", "World PK Soccer V2 (ver 1.1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) // custom IO board not emulated | |
| 2285 | 2358 | |
| 2359 | ||
| 2286 | 2360 | /* these boot and show something */ |
| 2287 | 2361 | GAME( 1994, f1superb, 0, ms32, f1superb, f1superb, ROT0, "Jaleco", "F1 Super Battle", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |
| r1679 | r1680 | |
|---|---|---|
| 594 | 594 | { |
| 595 | 595 | ic23_active=1; |
| 596 | 596 | ic24_output(0); |
| 597 | timer_adjust(ic24_timer, double_to_attotime(duration), 0 | |
| 597 | timer_adjust_oneshot(ic24_timer, double_to_attotime(duration), 0 | |
| 598 | 598 | } |
| 599 | 599 | } |
| 600 | 600 | } |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | { |
| 73 | 73 | |
| 74 | 74 | tmap = tilemap_create( get_tile_info, tilemap_scan_rows, |
| 75 | | |
| 75 | | |
| 76 | 76 | |
| 77 | 77 | tmap2 = tilemap_create( get_tile_info2, skylncr_tilemap_scan_pages, |
| 78 | | |
| 78 | | |
| 79 | 79 | TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y ); |
| 80 | 80 | |
| 81 | 81 | tilemap_set_transparent_pen(tmap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 272 | 272 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 273 | 273 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 274 | 274 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 275 | PORT_ | |
| 275 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 276 | 276 | INPUT_PORTS_END |
| 277 | 277 | |
| 278 | 278 |
| r1679 | r1680 | |
|---|---|---|
| 178 | 178 | PORT_START |
| 179 | 179 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 180 | 180 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 181 | PORT_ | |
| 181 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 182 | 182 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 183 | 183 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 184 | 184 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r1679 | r1680 | |
| 233 | 233 | PORT_START |
| 234 | 234 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 235 | 235 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 236 | PORT_ | |
| 236 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 237 | 237 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 238 | 238 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 239 | 239 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r1679 | r1680 | |
|---|---|---|
| 66 | 66 | #include "deprecat.h" |
| 67 | 67 | #include "machine/6821pia.h" |
| 68 | 68 | #include "machine/74123.h" |
| 69 | #include "video/ | |
| 69 | #include "video/m | |
| 70 | 70 | #include "cpu/m6800/m6800.h" |
| 71 | 71 | #include "cpu/m6809/m6809.h" |
| 72 | 72 | #include "sound/ay8910.h" |
| r1679 | r1680 | |
| 83 | 83 | #define AUDIO_CPU_2_CLOCK (AUDIO_2_MASTER_CLOCK) |
| 84 | 84 | |
| 85 | 85 | |
| 86 | static mc6845_t *mc6845; | |
| 86 | 87 | static UINT8 *nyny_videoram_1; |
| 87 | 88 | static UINT8 *nyny_videoram_2; |
| 88 | 89 | static UINT8 *nyny_colorram_1; |
| r1679 | r1680 | |
| 269 | 270 | #define NUM_PENS (8) |
| 270 | 271 | |
| 271 | 272 | |
| 273 | static WRITE8_HANDLER( nyny_mc6845_address_w ) | |
| 274 | { | |
| 275 | mc6845_address_w(mc6845, data); | |
| 276 | } | |
| 277 | ||
| 278 | ||
| 279 | static WRITE8_HANDLER( nyny_mc6845_register_w ) | |
| 280 | { | |
| 281 | mc6845_register_w(mc6845, data); | |
| 282 | } | |
| 283 | ||
| 284 | ||
| 272 | 285 | static WRITE8_HANDLER( flipscreen_w ) |
| 273 | 286 | { |
| 274 | 287 | flipscreen = data ? 0 : 1; |
| 275 | 288 | } |
| 276 | 289 | |
| 277 | 290 | |
| 278 | static void *nyny_begin_update(running_machine *machine, int screen, | |
| 279 | mame_bitmap *bitmap, const rectangle *cliprect) | |
| 291 | static void *nyny_begin_update(mame_bitmap *bitmap, const rectangle *cliprect) | |
| 280 | 292 | { |
| 281 | 293 | /* create the pens */ |
| 282 | 294 | offs_t i; |
| r1679 | r1680 | |
| 403 | 415 | } |
| 404 | 416 | |
| 405 | 417 | |
| 406 | static const c | |
| 418 | static const mc | |
| 407 | 419 | { |
| 408 | 420 | 0, /* screen we are acting on */ |
| 409 | 421 | CRTC_CLOCK, /* the clock (pin 21) of the chip */ |
| r1679 | r1680 | |
| 418 | 430 | static VIDEO_START( nyny ) |
| 419 | 431 | { |
| 420 | 432 | /* configure the CRT controller */ |
| 421 | c | |
| 433 | mc6845 = mc6845_config( | |
| 422 | 434 | } |
| 423 | 435 | |
| 424 | 436 | |
| 437 | static VIDEO_UPDATE( nyny ) | |
| 438 | { | |
| 439 | mc6845_update(mc6845, bitmap, cliprect); | |
| 425 | 440 | |
| 441 | return 0; | |
| 442 | } | |
| 443 | ||
| 444 | ||
| 445 | ||
| 426 | 446 | /************************************* |
| 427 | 447 | * |
| 428 | 448 | * Audio system - CPU 1 |
| r1679 | r1680 | |
| 521 | 541 | AM_RANGE(0x6000, 0x7fff) AM_RAM AM_BASE(&nyny_colorram_2) |
| 522 | 542 | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 523 | 543 | AM_RANGE(0xa000, 0xa0ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* SRAM (coin counter, shown when holding F2) */ |
| 524 | AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x00fe) AM_WRITE(crtc6845_address_w) | |
| 525 | AM_RANGE(0xa101, 0xa101) AM_MIRROR(0x00fe) AM_WRITE(crtc6845_register_w) | |
| 544 | AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x00fe) AM_WRITE(nyny_mc6845_address_w) | |
| 545 | AM_RANGE(0xa101, 0xa101) AM_MIRROR(0x00fe) AM_WRITE(nyny_mc6845_register_w) | |
| 526 | 546 | AM_RANGE(0xa200, 0xa20f) AM_MIRROR(0x00f0) AM_READWRITE(nyny_pia_1_2_r, nyny_pia_1_2_w) |
| 527 | 547 | AM_RANGE(0xa300, 0xa300) AM_MIRROR(0x00ff) AM_READWRITE(soundlatch3_r, audio_1_command_w) |
| 528 | 548 | AM_RANGE(0xa400, 0xa7ff) AM_NOP |
| r1679 | r1680 | |
| 674 | 694 | /* video hardware */ |
| 675 | 695 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 676 | 696 | MDRV_VIDEO_START(nyny) |
| 677 | MDRV_VIDEO_UPDATE( | |
| 697 | MDRV_VIDEO_UPDATE(nyny | |
| 678 | 698 | |
| 679 | 699 | MDRV_SCREEN_ADD("main", 0) |
| 680 | 700 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| r1679 | r1680 | |
|---|---|---|
| 275 | 275 | |
| 276 | 276 | static VIDEO_START( limenko ) |
| 277 | 277 | { |
| 278 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,128,64); | |
| 279 | md_tilemap = tilemap_create(get_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 280 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,128,64); | |
| 278 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,128,64); | |
| 279 | md_tilemap = tilemap_create(get_md_tile_info,tilemap_scan_rows,8,8,128,64); | |
| 280 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,128,64); | |
| 281 | 281 | |
| 282 | 282 | tilemap_set_transparent_pen(md_tilemap,0); |
| 283 | 283 | tilemap_set_transparent_pen(fg_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | static VIDEO_START ( pipeline ) |
| 92 | 92 | { |
| 93 | 93 | palram=auto_malloc(0x1000); |
| 94 | tilemap1 = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32 ); | |
| 95 | tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32 ); | |
| 94 | tilemap1 = tilemap_create( get_tile_info,tilemap_scan_rows,8,8,64,32 ); | |
| 95 | tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,8,8,64,32 ); | |
| 96 | 96 | tilemap_set_transparent_pen(tilemap2,0); |
| 97 | 97 | } |
| 98 | 98 |
| r1679 | r1680 | |
|---|---|---|
| 158 | 158 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //SERVICE4 Unused |
| 159 | 159 | |
| 160 | 160 | PORT_START /* IN5 */ |
| 161 | PORT_ | |
| 161 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 162 | 162 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 163 | 163 | INPUT_PORTS_END |
| 164 | 164 | |
| r1679 | r1680 | |
| 214 | 214 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //SERVICE4 Unused |
| 215 | 215 | |
| 216 | 216 | PORT_START /* IN5 */ |
| 217 | PORT_ | |
| 217 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 218 | 218 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 219 | 219 | INPUT_PORTS_END |
| 220 | 220 |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | that the two 4bpp tilemaps from the two chips are merged to form a single |
| 10 | 10 | 8bpp tilemap. |
| 11 | 11 | - topgunbl is derived from a completely different version, which supports gun |
| 12 | turret rotation. The copyright year is also d | |
| 12 | turret rotation. The copyright year is also d | |
| 13 | 13 | necessarily mean anything. |
| 14 | 14 | |
| 15 | 15 | TODO: |
| r1679 | r1680 | |
| 85 | 85 | static ADDRESS_MAP_START( slave_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 86 | 86 | AM_RANGE(0x2000, 0x2000) AM_WRITE(YM2151_register_port_0_w) |
| 87 | 87 | AM_RANGE(0x2001, 0x2001) AM_READWRITE(YM2151_status_port_0_r, YM2151_data_port_0_w) |
| 88 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_WRITE( | |
| 88 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_WRITE(MWA8 | |
| 89 | 89 | AM_RANGE(0x6000, 0x605f) AM_RAM // SOUND RAM (Self test check 0x6000-605f, 0x7c00-0x7fff) |
| 90 | 90 | AM_RANGE(0x6060, 0x7fff) AM_RAM AM_SHARE(1) |
| 91 | 91 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r1679 | r1680 | |
| 276 | 276 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 277 | 277 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 278 | 278 | MDRV_GFXDECODE(jackal) |
| 279 | MDRV_PALETTE_LENGTH(512) | |
| 280 | MDRV_COLORTABLE_LENGTH(256*16+16*16+16*16) | |
| 279 | MDRV_PALETTE_LENGTH(256*16+16*16+16*16) | |
| 281 | 280 | |
| 282 | 281 | MDRV_PALETTE_INIT(jackal) |
| 283 | 282 | MDRV_VIDEO_START(jackal) |
| r1679 | r1680 | |
|---|---|---|
| 2029 | 2029 | /* multiply by the precentage and divide by 100 to get the ON period */ |
| 2030 | 2030 | attotime on_period = attotime_div(attotime_mul(SPCENCTR_STROBE_PERIOD, SPCENCTR_DUTY_CYCLE), 100); |
| 2031 | 2031 | |
| 2032 | timer_adjust(spcenctr_strobe_on_timer, attotime_zero, 1, SPCENCTR_STROBE_PERIOD); | |
| 2033 | timer_adjust(spcenctr_strobe_off_timer, on_period, 0, SPCENCTR_STROBE_PERIOD); | |
| 2032 | timer_adjust_periodic(spcenctr_strobe_on_timer, attotime_zero, 1, SPCENCTR_STROBE_PERIOD); | |
| 2033 | timer_adjust_periodic(spcenctr_strobe_off_timer, on_period, 0, SPCENCTR_STROBE_PERIOD); | |
| 2034 | 2034 | } |
| 2035 | 2035 | else |
| 2036 | 2036 | { |
| 2037 | timer_adjust(spcenctr_strobe_on_timer, attotime_never, 0, attotime_zero); | |
| 2038 | timer_adjust(spcenctr_strobe_off_timer, attotime_zero, 0, attotime_zero); | |
| 2037 | timer_adjust_oneshot(spcenctr_strobe_on_timer, attotime_never, 0); | |
| 2038 | timer_adjust_oneshot(spcenctr_strobe_off_timer, attotime_zero, 0); | |
| 2039 | 2039 | } |
| 2040 | 2040 | } |
| 2041 | 2041 |
| r1679 | r1680 | |
|---|---|---|
| 438 | 438 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 439 | 439 | |
| 440 | 440 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* SERVICE */ |
| 441 | PORT_ | |
| 441 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_LOW | |
| 442 | 442 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT ) |
| 443 | 443 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 444 | 444 | |
| r1679 | r1680 | |
| 518 | 518 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 519 | 519 | |
| 520 | 520 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* SERVICE */ |
| 521 | PORT_ | |
| 521 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_LOW | |
| 522 | 522 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT ) |
| 523 | 523 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 524 | 524 |
| r1679 | r1680 | |
|---|---|---|
| 1 | /****************************************************************************** | |
| 1 | /****************************************************************************** | |
| 2 | 2 | |
| 3 | ||
| 3 | ||
| 4 | 4 | |
| 5 | ||
| 5 | ||
| 6 | 6 | |
| 7 | Memory Map: | |
| 7 | The peculiar feature of this hardware is the palette layout. 16 colors are | |
| 8 | arranged in a 16x16 matrix, with all columns containing a single color, except | |
| 9 | for column 1, which is a copy of row 1. Essentially, the 4bpp graphics are | |
| 10 | drawn using a fixed palette except for one color that changes. | |
| 11 | Nova 2001 and Penguin Kun Wars have palette PROMs and the effect applies to both | |
| 12 | tilemaps and sprites. Ninjakun and Raiders5 have palette RAM and the effect | |
| 13 | applies only to sprites while tilemaps use a normal palette. | |
| 8 | 14 | |
| 9 | Address Range: R/W: Function: | |
| 10 | -------------------------------------------------------------------------- | |
| 11 | 0000 - 7fff R Program ROM (7000-7fff mirror of 6000-6fff) | |
| 12 | a000 - a3ff R/W Foreground Playfield character RAM | |
| 13 | a400 - a7ff R/W Foreground Playfield color modifier RAM | |
| 14 | a800 - abff R/W Scrolling Playfield character RAM | |
| 15 | ac00 - a7ff R/W Scrolling Playfield color modifier RAM | |
| 16 | b000 - b7ff R/W Sprite RAM | |
| 17 | bfff W flip screen | |
| 18 | c000 R/W AY8910 #1 Data R/W | |
| 19 | c001 R/W AY8910 #2 Data R/W | |
| 20 | c002 W AY8910 #1 Control W | |
| 21 | c003 W AY8910 #2 Control W | |
| 22 | c004 R Interrupt acknowledge / Watchdog reset | |
| 23 | c006 R Player 1 Controls | |
| 24 | c007 R Player 2 Controls | |
| 25 | c00e R Coin Inputs, etc. | |
| 26 | e000 - e7ff R/W Work RAM | |
| 27 | 15 | |
| 28 | the parent set is VERY sensitive to coin inputs, if the coin isn't held down | |
| 29 | long enough, or is held down too long the game will reset, likewise if coins | |
| 30 | are inserted too quickly | |
| 16 | Another peculiar characteristic is that in the later scrolling games (that is | |
| 17 | Ninjakun and Raiders5, but not Nova 2001) the bg scroll registers are added to | |
| 18 | the videoram address not only when the video circuitry is accessing it, as | |
| 19 | usually happens, but also when the CPU is accessing it. | |
| 31 | 20 | |
| 32 | *******************************************************************************/ | |
| 33 | 21 | |
| 22 | Game Board | |
| 23 | ------------------------ --------- | |
| 24 | Nova 2001 UPL-83005 | |
| 25 | Ninjakun Majou no Bouken UPL-84003 | |
| 26 | Penguin Kun Wars UPL-????? | |
| 27 | Raiders5 UPL-85004 | |
| 28 | ||
| 29 | Hardware Overview: | |
| 30 | ------------------ | |
| 31 | 1xZ80 @ 3MHz (2x in Ninjakun and Raiders5) | |
| 32 | 2xAY8910 @ various frequencies | |
| 33 | ||
| 34 | Resolution: 256x192 | |
| 35 | 64 sprites | |
| 36 | Tilemaps: fg 256x256 (8x8) + bg 256x256 (8x8) (Penguin Kun Wars has only one) | |
| 37 | ||
| 38 | ||
| 39 | Designers: | |
| 40 | ---------- | |
| 41 | Nova 2001: | |
| 42 | * Staff : Ryuichi Nishizawa (Bucha), HAL, Fukushi, Hiromi | |
| 43 | ||
| 44 | Penguin Kun Wars: | |
| 45 | * Tsutomu Fuzisawa, Ogata, Nobuyuki Narita, Kosikawa | |
| 46 | ||
| 47 | Ninjakun Majou no Bouken: | |
| 48 | * Staff : Ryuichi Nishizawa (Bucha), Todo, Fukushi, Tsutomu Fuzisawa, Tateno | |
| 49 | ||
| 50 | Raiders5: | |
| 51 | * Staff : Tsutomu Fuzisawa, Suzuko, Naotsugu | |
| 52 | * Game, software and character design by : Ryuichi Nishizawa | |
| 53 | * Hardware and effect design by : Nobuyuki Narita | |
| 54 | ||
| 55 | ||
| 56 | Notes: | |
| 57 | ------ | |
| 58 | - nova2001 is VERY sensitive to coin inputs, if the coin isn't held down long | |
| 59 | enough, or is held down too long the game will reset, likewise if coins are | |
| 60 | inserted too quickly. This only happens in nova2001 and not in nova2001u. | |
| 61 | ||
| 62 | - Nova 2001 draws black bars on the sides of the screen so the visible area becomes | |
| 63 | 240x192, however the physical resolution is still 256x192, the game probably does | |
| 64 | that to avoid wraparound glitches in the background without having to care about | |
| 65 | the sprite X MSB. | |
| 66 | ||
| 67 | - In Ninjakun, hold P1 Start after a reset to skip the startup memory tests. | |
| 68 | ||
| 69 | - The production year of Penguin Kun Wars is uncertain since it's not shown on | |
| 70 | screen. The console/home computer ports were made by ASCII in 1985, and the | |
| 71 | Ninjakun character appears in the audience (just on the left of the timer) so | |
| 72 | this game must have been produced after Ninjakun. This restricts the possibilities | |
| 73 | to 1985 or 1984. | |
| 74 | ||
| 75 | - Penguin Kun Wars has some tile/sprite priority issues that have been verified | |
| 76 | to happen on the real board (e.g. the blob thing that moves in the middle of | |
| 77 | the table is not obscured by the text box at the end of a set). | |
| 78 | ||
| 79 | TODO: | |
| 80 | ----- | |
| 81 | - The Nova 2001 schematics show a FG priority bit, which should control priority | |
| 82 | over sprites. However that bit is set by the game only during the screen fade | |
| 83 | effect at the end of a level, so it would make the score area appear below | |
| 84 | the sprites, which definitely doesn't look right. For this reason, the priority | |
| 85 | bit is implemented in the video driver but it is ignored and the FG is always | |
| 86 | drawn above sprites. | |
| 87 | ||
| 88 | - In Ninjakun, some garbage is drawn behind the GAME OVER text at the end of a | |
| 89 | game. Correct behaviour? | |
| 90 | ||
| 91 | - The IRQ source of Ninjakun and Raiders5 CPU 2 is unknown. | |
| 92 | ||
| 93 | - Several unknown memory read accesses in Raiders5. | |
| 94 | ||
| 95 | ******************************************************************************* | |
| 96 | ||
| 97 | Nova 2001 Memory Map: | |
| 98 | ||
| 99 | Address Range: R/W: Function: | |
| 100 | -------------------------------------------------------------------------- | |
| 101 | 0000 - 7fff R Program ROM (7000-7fff mirror of 6000-6fff) | |
| 102 | a000 - a3ff R/W Foreground Playfield character RAM | |
| 103 | a400 - a7ff R/W Foreground Playfield color modifier RAM | |
| 104 | a800 - abff R/W Scrolling Playfield character RAM | |
| 105 | ac00 - a7ff R/W Scrolling Playfield color modifier RAM | |
| 106 | b000 - b7ff R/W Sprite RAM | |
| 107 | bfff W flip screen | |
| 108 | c000 R/W AY8910 #1 Data R/W | |
| 109 | c001 R/W AY8910 #2 Data R/W | |
| 110 | c002 W AY8910 #1 Control W | |
| 111 | c003 W AY8910 #2 Control W | |
| 112 | c004 R Interrupt acknowledge / Watchdog reset | |
| 113 | c006 R Player 1 Controls | |
| 114 | c007 R Player 2 Controls | |
| 115 | c00e R Coin Inputs, etc. | |
| 116 | e000 - e7ff R/W Work RAM | |
| 117 | ||
| 118 | ******************************************************************************/ | |
| 119 | ||
| 34 | 120 | #include "driver.h" |
| 35 | 121 | #include "sound/ay8910.h" |
| 122 | #include "nova2001.h" | |
| 36 | 123 | |
| 37 | /* From video/nova2001.c */ | |
| 38 | extern UINT8 *nova2001_videoram2, *nova2001_colorram2; | |
| 124 | #define MAIN_CLOCK XTAL_12MHz | |
| 39 | 125 | |
| 40 | extern WRITE8_HANDLER( nova2001_videoram_w ); | |
| 41 | extern WRITE8_HANDLER( nova2001_colorram_w ); | |
| 42 | extern WRITE8_HANDLER( nova2001_videoram2_w ); | |
| 43 | extern WRITE8_HANDLER( nova2001_colorram2_w ); | |
| 44 | extern WRITE8_HANDLER( nova2001_scroll_x_w ); | |
| 45 | extern WRITE8_HANDLER( nova2001_scroll_y_w ); | |
| 46 | extern WRITE8_HANDLER( nova2001_flipscreen_w ); | |
| 47 | 126 | |
| 48 | extern PALETTE_INIT( nova2001 ); | |
| 49 | extern VIDEO_START( nova2001 ); | |
| 50 | extern VIDEO_UPDATE( nova2001 ); | |
| 127 | /************************************* | |
| 128 | * | |
| 129 | * Ninjakun 0xA000 Read / Write Handlers | |
| 130 | * | |
| 131 | *************************************/ | |
| 51 | 132 | |
| 133 | static UINT8 ninjakun_io_a002_ctrl; | |
| 52 | 134 | |
| 135 | static READ8_HANDLER( ninjakun_io_A002_r ) | |
| 136 | { | |
| 137 | return ninjakun_io_a002_ctrl | readinputport(2); /* vblank */ | |
| 138 | } | |
| 53 | 139 | |
| 140 | static WRITE8_HANDLER( ninjakun_cpu1_io_A002_w ) | |
| 141 | { | |
| 142 | if( data == 0x80 ) ninjakun_io_a002_ctrl |= 0x04; | |
| 143 | if( data == 0x40 ) ninjakun_io_a002_ctrl &= ~0x08; | |
| 144 | } | |
| 145 | ||
| 146 | static WRITE8_HANDLER( ninjakun_cpu2_io_A002_w ) | |
| 147 | { | |
| 148 | if( data == 0x40 ) ninjakun_io_a002_ctrl |= 0x08; | |
| 149 | if( data == 0x80 ) ninjakun_io_a002_ctrl &= ~0x04; | |
| 150 | } | |
| 151 | ||
| 152 | ||
| 153 | ||
| 154 | /************************************* | |
| 155 | * | |
| 156 | * Init | |
| 157 | * | |
| 158 | *************************************/ | |
| 159 | ||
| 160 | static MACHINE_START( ninjakun ) | |
| 161 | { | |
| 162 | /* Save State Stuff */ | |
| 163 | state_save_register_global(ninjakun_io_a002_ctrl); | |
| 164 | } | |
| 165 | ||
| 166 | ||
| 167 | ||
| 168 | /************************************* | |
| 169 | * | |
| 170 | * Memory maps | |
| 171 | * | |
| 172 | *************************************/ | |
| 173 | ||
| 54 | 174 | static ADDRESS_MAP_START( nova2001_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 55 | 175 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 56 | AM_RANGE(0xa000, 0xa3ff) AM_RAM AM_WRITE(nova2001_videoram2_w) AM_BASE(&nova2001_videoram2) | |
| 57 | AM_RANGE(0xa400, 0xa7ff) AM_RAM AM_WRITE(nova2001_colorram2_w) AM_BASE(&nova2001_colorram2) | |
| 58 | AM_RANGE(0xa800, 0xabff) AM_RAM AM_WRITE(nova2001_videoram_w) AM_BASE(&videoram) | |
| 59 | AM_RANGE(0xac00, 0xafff) AM_RAM AM_WRITE(nova2001_colorram_w) AM_BASE(&colorram) | |
| 60 | AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) | |
| 61 | AM_RANGE(0xbfff, 0xbfff) AM_WRITE(nova2001_flipscreen_w) | |
| 176 | AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_WRITE(nova2001_fg_videoram_w) AM_BASE(&nova2001_fg_videoram) | |
| 177 | AM_RANGE(0xa800, 0xafff) AM_RAM AM_WRITE(nova2001_bg_videoram_w) AM_BASE(&nova2001_bg_videoram) | |
| 178 | AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_BASE(&spriteram) | |
| 179 | AM_RANGE(0xb800, 0xbfff) AM_WRITE(nova2001_flipscreen_w) | |
| 62 | 180 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) |
| 63 | 181 | AM_RANGE(0xc001, 0xc001) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) |
| 64 | 182 | AM_RANGE(0xc002, 0xc002) AM_WRITE(AY8910_control_port_0_w) |
| r1679 | r1680 | |
| 71 | 189 | ADDRESS_MAP_END |
| 72 | 190 | |
| 73 | 191 | |
| 192 | static ADDRESS_MAP_START( ninjakun_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 193 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 194 | AM_RANGE(0x2000, 0x7fff) AM_ROM | |
| 195 | AM_RANGE(0x8000, 0x8000) AM_WRITE(AY8910_control_port_0_w) | |
| 196 | AM_RANGE(0x8001, 0x8001) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 197 | AM_RANGE(0x8002, 0x8002) AM_WRITE(AY8910_control_port_1_w) | |
| 198 | AM_RANGE(0x8003, 0x8003) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 199 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) | |
| 200 | AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) | |
| 201 | AM_RANGE(0xa002, 0xa002) AM_READWRITE(ninjakun_io_A002_r, ninjakun_cpu1_io_A002_w) | |
| 202 | AM_RANGE(0xa003, 0xa003) AM_WRITE(pkunwar_flipscreen_w) | |
| 203 | AM_RANGE(0xc000, 0xc7ff) AM_READWRITE(MRA8_RAM, nova2001_fg_videoram_w) AM_BASE(&nova2001_fg_videoram) AM_SHARE(1) | |
| 204 | AM_RANGE(0xc800, 0xcfff) AM_READWRITE(ninjakun_bg_videoram_r, ninjakun_bg_videoram_w) AM_BASE(&nova2001_bg_videoram) AM_SHARE(2) | |
| 205 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_BASE(&spriteram) AM_SHARE(3) | |
| 206 | AM_RANGE(0xd800, 0xd9ff) AM_READWRITE(MRA8_RAM, ninjakun_paletteram_w) AM_BASE(&paletteram) AM_SHARE(4) | |
| 207 | AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE(5) | |
| 208 | AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE(6) | |
| 209 | ADDRESS_MAP_END | |
| 74 | 210 | |
| 211 | static ADDRESS_MAP_START( ninjakun_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 212 | AM_RANGE(0x0000, 0x1fff) AM_ROM | |
| 213 | AM_RANGE(0x2000, 0x7fff) AM_ROM AM_REGION(REGION_CPU1, 0x2000) | |
| 214 | AM_RANGE(0x8000, 0x8000) AM_WRITE(AY8910_control_port_0_w) | |
| 215 | AM_RANGE(0x8001, 0x8001) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 216 | AM_RANGE(0x8002, 0x8002) AM_WRITE(AY8910_control_port_1_w) | |
| 217 | AM_RANGE(0x8003, 0x8003) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 218 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) | |
| 219 | AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) | |
| 220 | AM_RANGE(0xa002, 0xa002) AM_READWRITE(ninjakun_io_A002_r, ninjakun_cpu2_io_A002_w) | |
| 221 | AM_RANGE(0xa003, 0xa003) AM_WRITE(nova2001_flipscreen_w) | |
| 222 | AM_RANGE(0xc000, 0xc7ff) AM_READWRITE(MRA8_RAM, nova2001_fg_videoram_w) AM_SHARE(1) | |
| 223 | AM_RANGE(0xc800, 0xcfff) AM_READWRITE(ninjakun_bg_videoram_r, ninjakun_bg_videoram_w) AM_SHARE(2) | |
| 224 | AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE(3) | |
| 225 | AM_RANGE(0xd800, 0xd9ff) AM_READWRITE(MRA8_RAM, ninjakun_paletteram_w) AM_SHARE(4) | |
| 226 | AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE(6) /* swapped wrt CPU1 */ | |
| 227 | AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE(5) /* swapped wrt CPU1 */ | |
| 228 | ADDRESS_MAP_END | |
| 229 | ||
| 230 | ||
| 231 | static ADDRESS_MAP_START( pkunwar_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 232 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 233 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE(&spriteram) | |
| 234 | AM_RANGE(0x8800, 0x8fff) AM_RAM AM_WRITE(nova2001_bg_videoram_w) AM_BASE(&nova2001_bg_videoram) | |
| 235 | AM_RANGE(0xa000, 0xa000) AM_WRITE(&AY8910_control_port_0_w) | |
| 236 | AM_RANGE(0xa001, 0xa001) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 237 | AM_RANGE(0xa002, 0xa002) AM_WRITE(AY8910_control_port_1_w) | |
| 238 | AM_RANGE(0xa003, 0xa003) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 239 | AM_RANGE(0xc000, 0xc7ff) AM_RAM | |
| 240 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 241 | ADDRESS_MAP_END | |
| 242 | ||
| 243 | static ADDRESS_MAP_START( pkunwar_io, ADDRESS_SPACE_IO, 8 ) | |
| 244 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 245 | AM_RANGE(0x00, 0x00) AM_WRITE(pkunwar_flipscreen_w) | |
| 246 | ADDRESS_MAP_END | |
| 247 | ||
| 248 | ||
| 249 | static ADDRESS_MAP_START( raiders5_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 250 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 251 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE(&spriteram) | |
| 252 | AM_RANGE(0x8800, 0x8fff) AM_RAM AM_WRITE(nova2001_fg_videoram_w) AM_BASE(&nova2001_fg_videoram) | |
| 253 | AM_RANGE(0x9000, 0x97ff) AM_READWRITE(ninjakun_bg_videoram_r, ninjakun_bg_videoram_w) AM_BASE(&nova2001_bg_videoram) | |
| 254 | AM_RANGE(0xa000, 0xa000) AM_WRITE(nova2001_scroll_x_w) | |
| 255 | AM_RANGE(0xa001, 0xa001) AM_WRITE(nova2001_scroll_y_w) | |
| 256 | AM_RANGE(0xa002, 0xa002) AM_WRITE(pkunwar_flipscreen_w) | |
| 257 | AM_RANGE(0xc000, 0xc000) AM_WRITE(AY8910_control_port_0_w) | |
| 258 | AM_RANGE(0xc001, 0xc001) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 259 | AM_RANGE(0xc002, 0xc002) AM_WRITE(AY8910_control_port_1_w) | |
| 260 | AM_RANGE(0xc003, 0xc003) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 261 | AM_RANGE(0xd000, 0xd1ff) AM_READWRITE(MRA8_RAM, ninjakun_paletteram_w) AM_BASE(&paletteram) | |
| 262 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(1) | |
| 263 | ADDRESS_MAP_END | |
| 264 | ||
| 265 | static ADDRESS_MAP_START( raiders5_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 266 | AM_RANGE(0x0000, 0x3fff) AM_ROM | |
| 267 | AM_RANGE(0x8000, 0x8000) AM_WRITE(AY8910_control_port_0_w) | |
| 268 | AM_RANGE(0x8001, 0x8001) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) | |
| 269 | AM_RANGE(0x8002, 0x8002) AM_WRITE(AY8910_control_port_1_w) | |
| 270 | AM_RANGE(0x8003, 0x8003) AM_READWRITE(AY8910_read_port_1_r, AY8910_write_port_1_w) | |
| 271 | AM_RANGE(0x9000, 0x9000) AM_READ(MRA8_NOP) /* unknown */ | |
| 272 | AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_SHARE(1) | |
| 273 | AM_RANGE(0xc000, 0xc000) AM_READ(MRA8_NOP) /* unknown */ | |
| 274 | AM_RANGE(0xc800, 0xc800) AM_READ(MRA8_NOP) /* unknown */ | |
| 275 | AM_RANGE(0xd000, 0xd000) AM_READ(MRA8_NOP) /* unknown */ | |
| 276 | AM_RANGE(0xe000, 0xe000) AM_WRITE(nova2001_scroll_x_w) | |
| 277 | AM_RANGE(0xe001, 0xe001) AM_WRITE(nova2001_scroll_y_w) | |
| 278 | AM_RANGE(0xe002, 0xe002) AM_WRITE(pkunwar_flipscreen_w) | |
| 279 | ADDRESS_MAP_END | |
| 280 | ||
| 281 | static ADDRESS_MAP_START( raiders5_io, ADDRESS_SPACE_IO, 8 ) | |
| 282 | AM_RANGE(0x00, 0x00) AM_READ(MRA8_NOP) /* unknown */ | |
| 283 | ADDRESS_MAP_END | |
| 284 | ||
| 285 | ||
| 286 | ||
| 287 | /************************************* | |
| 288 | * | |
| 289 | * Port definitions | |
| 290 | * | |
| 291 | *************************************/ | |
| 292 | ||
| 75 | 293 | static INPUT_PORTS_START( nova2001 ) |
| 76 | PORT_START | |
| 77 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 78 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 79 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 80 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 81 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 82 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pause | |
| 83 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // fire | |
| 294 | PORT_START | |
| 295 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 296 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 297 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 298 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 299 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 300 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pause | |
| 301 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // fire | |
| 84 | 302 | |
| 85 | PORT_START | |
| 86 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 87 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 88 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 89 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 90 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 91 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 92 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 303 | PORT_START | |
| 304 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 305 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 306 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 307 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 308 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 309 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 310 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 93 | 311 | |
| 94 | ||
| 312 | | |
| 95 | 313 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(4) |
| 96 | 314 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 97 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) | |
| 98 | PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 99 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 315 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) | |
| 316 | PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 317 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 100 | 318 | |
| 101 | PORT_START /* dsw0 */ | |
| 102 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 103 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 104 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 105 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Lives ) ) | |
| 106 | PORT_DIPSETTING( 0x02, "3" ) | |
| 107 | PORT_DIPSETTING( 0x00, "4" ) | |
| 108 | PORT_DIPNAME( 0x04, 0x04, "1st Bonus Life" ) | |
| 109 | PORT_DIPSETTING( 0x04, "20K" ) | |
| 110 | PORT_DIPSETTING( 0x00, "30K" ) | |
| 111 | PORT_DIPNAME( 0x18, 0x18, "Extra Bonus Life" ) | |
| 112 | PORT_DIPSETTING( 0x18, "60K" ) | |
| 113 | PORT_DIPSETTING( 0x10, "70K" ) | |
| 114 | PORT_DIPSETTING( 0x08, "90K" ) | |
| 115 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 116 | PORT_DIPNAME( 0x60, 0x60, DEF_STR( Coinage ) ) | |
| 117 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 118 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_2C ) ) | |
| 119 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) ) | |
| 120 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 121 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) | |
| 122 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 123 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 319 | PORT_START /* dsw0 */ | |
| 320 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") | |
| 321 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 322 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 323 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:2") | |
| 324 | PORT_DIPSETTING( 0x02, "3" ) | |
| 325 | PORT_DIPSETTING( 0x00, "4" ) | |
| 326 | PORT_DIPNAME( 0x04, 0x04, "1st Bonus Life" ) PORT_DIPLOCATION("SW1:3") | |
| 327 | PORT_DIPSETTING( 0x04, "20K" ) | |
| 328 | PORT_DIPSETTING( 0x00, "30K" ) | |
| 329 | PORT_DIPNAME( 0x18, 0x18, "Extra Bonus Life" ) PORT_DIPLOCATION("SW1:4,5") | |
| 330 | PORT_DIPSETTING( 0x18, "60K" ) | |
| 331 | PORT_DIPSETTING( 0x10, "70K" ) | |
| 332 | PORT_DIPSETTING( 0x08, "90K" ) | |
| 333 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 334 | PORT_DIPNAME( 0x60, 0x60, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:6,7") | |
| 335 | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) | |
| 336 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_2C ) ) | |
| 337 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) ) | |
| 338 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) | |
| 339 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8") | |
| 340 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 341 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 124 | 342 | |
| 125 | PORT_START /* dsw1 */ | |
| 126 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 127 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 128 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) | |
| 129 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 130 | PORT_DIPSETTING( 0x01, DEF_STR( Hardest ) ) | |
| 131 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 132 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 133 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 343 | PORT_START /* dsw1 */ | |
| 344 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") | |
| 345 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) | |
| 346 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) | |
| 347 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 348 | PORT_DIPSETTING( 0x01, DEF_STR( Hardest ) ) | |
| 349 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") | |
| 350 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 351 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 352 | PORT_DIPNAME( 0x08, 0x08, "High Score Names" ) PORT_DIPLOCATION("SW2:4") | |
| 353 | PORT_DIPSETTING( 0x00, "3 Letters" ) | |
| 354 | PORT_DIPSETTING( 0x08, "8 Letters" ) | |
| 355 | PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) | |
| 356 | PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) | |
| 357 | PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) | |
| 358 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) | |
| 359 | INPUT_PORTS_END | |
| 360 | ||
| 361 | static INPUT_PORTS_START( ninjakun ) | |
| 362 | PORT_START_TAG("IN0") /* 0xa000 */ | |
| 363 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY /* "XPOS1" */ | |
| 364 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 365 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 366 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 367 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 368 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 369 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 370 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 371 | ||
| 372 | PORT_START_TAG("IN1") /* 0xa001 */ | |
| 373 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_2WAY PORT_COCKTAIL /* "YPOS1" */ | |
| 374 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_2WAY PORT_COCKTAIL | |
| 375 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 376 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 377 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 378 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 379 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) | |
| 380 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 381 | ||
| 382 | PORT_START_TAG("IN2") /* 0xa002 */ | |
| 383 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 384 | ||
| 385 | PORT_START_TAG("DSW1") | |
| 386 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 387 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 388 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 389 | PORT_DIPNAME( 0x06, 0x04, DEF_STR( Lives ) ) | |
| 390 | PORT_DIPSETTING( 0x02, "2" ) | |
| 391 | PORT_DIPSETTING( 0x04, "3" ) | |
| 392 | PORT_DIPSETTING( 0x06, "4" ) | |
| 393 | PORT_DIPSETTING( 0x00, "5" ) | |
| 394 | PORT_DIPNAME( 0x08, 0x08, "First Bonus" ) | |
| 395 | PORT_DIPSETTING( 0x08, "30000" ) | |
| 396 | PORT_DIPSETTING( 0x00, "40000" ) | |
| 397 | PORT_DIPNAME( 0x30, 0x30, "Second Bonus" ) | |
| 398 | PORT_DIPSETTING( 0x00, "No Bonus" ) | |
| 399 | PORT_DIPSETTING( 0x10, "Every 30000" ) | |
| 400 | PORT_DIPSETTING( 0x30, "Every 50000" ) | |
| 401 | PORT_DIPSETTING( 0x20, "Every 70000" ) | |
| 402 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 403 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 404 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 405 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Difficulty ) ) | |
| 406 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) | |
| 407 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 408 | ||
| 409 | PORT_START_TAG("DSW2") | |
| 410 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) | |
| 411 | PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) | |
| 412 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) | |
| 413 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_2C ) ) | |
| 414 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) | |
| 415 | PORT_DIPSETTING( 0x01, DEF_STR( 3C_2C ) ) | |
| 416 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_2C ) ) | |
| 417 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) | |
| 418 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) | |
| 134 | 419 | PORT_DIPNAME( 0x08, 0x08, "High Score Names" ) |
| 135 | 420 | PORT_DIPSETTING( 0x00, "3 Letters" ) |
| 136 | 421 | PORT_DIPSETTING( 0x08, "8 Letters" ) |
| 137 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 138 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) | |
| 422 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Allow_Continue ) ) | |
| 423 | PORT_DIPSETTING( 0x10, DEF_STR( No ) ) | |
| 424 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 425 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )/* Probably Unused */ | |
| 426 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 427 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 428 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) | |
| 429 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 430 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 431 | PORT_DIPNAME( 0x80, 0x80, "Infinite Lives (If Free Play)" ) | |
| 432 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 433 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 139 | 434 | INPUT_PORTS_END |
| 140 | 435 | |
| 436 | static INPUT_PORTS_START( pkunwar ) | |
| 437 | PORT_START /* IN0 */ | |
| 438 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 439 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 440 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 441 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 442 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 443 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 444 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 141 | 446 | |
| 447 | PORT_START /* IN1 */ | |
| 448 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL | |
| 449 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL | |
| 450 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 451 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 452 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 453 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 454 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 455 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 142 | 456 | |
| 143 | static const gfx_layout charlayout = | |
| 457 | PORT_START /* DSW0 */ | |
| 458 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 459 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 460 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 461 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 462 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 463 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 464 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) | |
| 465 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 466 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 467 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) | |
| 468 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 469 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 470 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 471 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 472 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 473 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 474 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 475 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 476 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 477 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 478 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 479 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 480 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 481 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 482 | ||
| 483 | PORT_START /* DSW1 */ | |
| 484 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) | |
| 485 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 486 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) | |
| 487 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 488 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) | |
| 489 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) | |
| 490 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 491 | PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) | |
| 492 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 493 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 494 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 495 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) | |
| 496 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) | |
| 497 | PORT_DIPSETTING( 0x30, DEF_STR( Medium ) ) | |
| 498 | PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) | |
| 499 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 500 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) | |
| 501 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 502 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 503 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) | |
| 504 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 505 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 506 | INPUT_PORTS_END | |
| 507 | ||
| 508 | static INPUT_PORTS_START( raiders5 ) | |
| 509 | PORT_START | |
| 510 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) | |
| 511 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 512 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 513 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 514 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY | |
| 515 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 516 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY | |
| 517 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY | |
| 518 | ||
| 519 | PORT_START | |
| 520 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) | |
| 521 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 522 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 523 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 524 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL | |
| 525 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL | |
| 526 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL | |
| 527 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL | |
| 528 | ||
| 529 | PORT_START /* DSW1 */ | |
| 530 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 531 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 532 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 533 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) ) | |
| 534 | PORT_DIPSETTING( 0x00, "2" ) | |
| 535 | PORT_DIPSETTING( 0x06, "3" ) | |
| 536 | PORT_DIPSETTING( 0x04, "4" ) | |
| 537 | PORT_DIPSETTING( 0x02, "5" ) | |
| 538 | PORT_DIPNAME( 0x08, 0x08, "1st Bonus" ) | |
| 539 | PORT_DIPSETTING( 0x08, "30000" ) | |
| 540 | PORT_DIPSETTING( 0x00, "40000" ) | |
| 541 | PORT_DIPNAME( 0x30, 0x30, "2nd Bonus" ) | |
| 542 | PORT_DIPSETTING( 0x30, "Every(?) 50000" ) | |
| 543 | PORT_DIPSETTING( 0x20, "Every(?) 70000" ) | |
| 544 | PORT_DIPSETTING( 0x10, "Every(?) 90000" ) | |
| 545 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 546 | PORT_DIPNAME( 0x40, 0x40, "Exercise" ) | |
| 547 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 548 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 549 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Difficulty ) ) | |
| 550 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) | |
| 551 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) | |
| 552 | ||
| 553 | PORT_START /* DSW2*/ | |
| 554 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) | |
| 555 | PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) | |
| 556 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) | |
| 557 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_2C ) ) | |
| 558 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) | |
| 559 | PORT_DIPSETTING( 0x01, DEF_STR( 3C_2C ) ) | |
| 560 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_2C ) ) | |
| 561 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) | |
| 562 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) | |
| 563 | PORT_DIPNAME( 0x08, 0x08, "High Score Names" ) | |
| 564 | PORT_DIPSETTING( 0x00, "3 Letters" ) | |
| 565 | PORT_DIPSETTING( 0x08, "8 Letters" ) | |
| 566 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) ) | |
| 567 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 568 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) | |
| 569 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 570 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 571 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 572 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) | |
| 573 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 574 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 575 | PORT_DIPNAME( 0x80, 0x80, "Unlimited Lives (If Free Play)" ) | |
| 576 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 577 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 578 | ||
| 579 | INPUT_PORTS_END | |
| 580 | ||
| 581 | ||
| 582 | ||
| 583 | /************************************* | |
| 584 | * | |
| 585 | * Graphics layouts | |
| 586 | * | |
| 587 | *************************************/ | |
| 588 | ||
| 589 | static const gfx_layout layout8x8 = | |
| 144 | 590 | { |
| 145 | 8,8, /* 8*8 characters */ | |
| 146 | 256, /* 256 characters */ | |
| 147 | 4, /* 4 bits per pixel */ | |
| 148 | {0,1,2,3 }, /* the bitplanes are packed in one nibble */ | |
| 149 | {0, 4, 8192*8+0, 8192*8+4, 8, 12, 8192*8+8, 8192*8+12}, | |
| 150 | {16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7}, | |
| 151 | 8*16 | |
| 591 | 8,8, | |
| 592 | RGN_FRAC(1,1), | |
| 593 | 4, | |
| 594 | { STEP4(0,1) }, | |
| 595 | { STEP8(0,4) }, | |
| 596 | { STEP8(0,32) }, | |
| 597 | 32*8 | |
| 152 | 598 | }; |
| 153 | 599 | |
| 154 | static const gfx_layout | |
| 600 | static const gfx_layout | |
| 155 | 601 | { |
| 156 | 16,16, /* 16*16 characters */ | |
| 157 | 128, /* 128 sprites */ | |
| 158 | 4, /* 4 bits per pixel */ | |
| 159 | {0,1,2,3}, /* the bitplanes are packed in one nibble */ | |
| 160 | {0, 4, 8192*8+0, 8192*8+4, 8, 12, 8192*8+8, 8192*8+12, | |
| 161 | 16*8+0, 16*8+4, 16*8+8192*8+0, 16*8+8192*8+4, 16*8+8, 16*8+12, 16*8+8192*8+8, 16*8+8192*8+12}, | |
| 162 | {16*0, 16*1, 16*2, 16*3, 16*4, 16*5, 16*6, 16*7, | |
| 163 | 32*8+16*0, 32*8+16*1, 32*8+16*2, 32*8+16*3, 32*8+16*4, 32*8+16*5, 32*8+16*6, 32*8+16*7}, | |
| 164 | 8*64 | |
| 602 | 8,8, | |
| 603 | RGN_FRAC(1,4), | |
| 604 | 4, | |
| 605 | { STEP4(0,1) }, | |
| 606 | { STEP8(0,4) }, | |
| 607 | { STEP8(0,32) }, | |
| 608 | 32*8 | |
| 165 | 609 | }; |
| 166 | 610 | |
| 611 | static const gfx_layout layout16x16 = | |
| 612 | { | |
| 613 | 16,16, | |
| 614 | RGN_FRAC(1,1), | |
| 615 | 4, | |
| 616 | { STEP4(0,1) }, | |
| 617 | { STEP8(0,4), STEP8(32*8,4) }, | |
| 618 | { STEP8(0,32), STEP8(64*8,32) }, | |
| 619 | 128*8 | |
| 620 | }; | |
| 621 | ||
| 167 | 622 | static GFXDECODE_START( nova2001 ) |
| 168 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 16 ) | |
| 169 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, charlayout, 16*16, 16 ) | |
| 170 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, spritelayout, 0, 16 ) | |
| 171 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 0, 16 ) | |
| 623 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, layout16x16, 0x000, 16 ) // sprites | |
| 624 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, layout8x8_part, 0x000, 16 ) // fg tiles (using only 1/4th of the ROM space) | |
| 625 | GFXDECODE_ENTRY( REGION_GFX1, 0x4000, layout8x8_part, 0x100, 16 ) // bg tiles (using only 1/4th of the ROM space) | |
| 172 | 626 | GFXDECODE_END |
| 173 | 627 | |
| 628 | static GFXDECODE_START( ninjakun ) | |
| 629 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout16x16, 0x200, 16 ) // sprites | |
| 630 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout8x8, 0x000, 16 ) // fg tiles | |
| 631 | GFXDECODE_ENTRY( REGION_GFX2, 0, layout8x8, 0x100, 16 ) // bg tiles | |
| 632 | GFXDECODE_END | |
| 174 | 633 | |
| 634 | static GFXDECODE_START( pkunwar ) | |
| 635 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout16x16, 0x000, 16 ) // sprites | |
| 636 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout8x8, 0x100, 16 ) // bg tiles | |
| 637 | GFXDECODE_END | |
| 175 | 638 | |
| 176 | static const struct AY8910interface ay8910_interface_1 = | |
| 639 | static GFXDECODE_START( raiders5 ) | |
| 640 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout16x16, 0x200, 16 ) // sprites | |
| 641 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout8x8_part, 0x000, 16 ) // fg tiles (using only 1/4th of the ROM space) | |
| 642 | GFXDECODE_ENTRY( REGION_GFX2, 0, layout8x8, 0x100, 16 ) // bg tiles | |
| 643 | GFXDECODE_END | |
| 644 | ||
| 645 | ||
| 646 | ||
| 647 | /************************************* | |
| 648 | * | |
| 649 | * Sound definitions | |
| 650 | * | |
| 651 | *************************************/ | |
| 652 | ||
| 653 | static const struct AY8910interface nova2001_ay8910_interface_1 = | |
| 177 | 654 | { |
| 178 | 655 | 0, |
| 179 | 656 | 0, |
| 180 | nova2001_scroll_x_w, | |
| 657 | nova2001_scroll_x_w, | |
| 181 | 658 | nova2001_scroll_y_w |
| 182 | 659 | }; |
| 183 | 660 | |
| 184 | static const struct AY8910interface ay8910_interface_2 = | |
| 661 | static const struct AY8910interface nova2001_ay8910_interface_2 = | |
| 185 | 662 | { |
| 186 | 663 | input_port_3_r, |
| 187 | 664 | input_port_4_r |
| 188 | 665 | }; |
| 189 | 666 | |
| 667 | static const struct AY8910interface pkunwar_ay8910_interface_1 = | |
| 668 | { | |
| 669 | input_port_0_r, | |
| 670 | input_port_1_r | |
| 671 | }; | |
| 672 | ||
| 673 | static const struct AY8910interface pkunwar_ay8910_interface_2 = | |
| 674 | { | |
| 675 | input_port_2_r, | |
| 676 | input_port_3_r | |
| 677 | }; | |
| 678 | ||
| 679 | ||
| 680 | ||
| 681 | /************************************* | |
| 682 | * | |
| 683 | * Machine drivers | |
| 684 | * | |
| 685 | *************************************/ | |
| 686 | ||
| 190 | 687 | static MACHINE_DRIVER_START( nova2001 ) |
| 191 | 688 | |
| 192 | 689 | /* basic machine hardware */ |
| 193 | MDRV_CPU_ADD(Z80, | |
| 690 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz verified on schematics | |
| 194 | 691 | MDRV_CPU_PROGRAM_MAP(nova2001_map,0) |
| 195 | 692 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 196 | 693 | |
| 694 | /* video hardware */ | |
| 197 | 695 | MDRV_SCREEN_REFRESH_RATE(60) |
| 198 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) | |
| 199 | ||
| 200 | /* video hardware */ | |
| 201 | 696 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 202 | 697 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 203 | 698 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 204 | MDRV_SCREEN_VISIBLE_AREA( | |
| 699 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1) | |
| 205 | 700 | MDRV_GFXDECODE(nova2001) |
| 206 | MDRV_PALETTE_LENGTH(32) | |
| 207 | MDRV_COLORTABLE_LENGTH(32*16) | |
| 701 | MDRV_PALETTE_LENGTH(0x200) | |
| 208 | 702 | |
| 209 | 703 | MDRV_PALETTE_INIT(nova2001) |
| 210 | 704 | MDRV_VIDEO_START(nova2001) |
| r1679 | r1680 | |
| 213 | 707 | /* sound hardware */ |
| 214 | 708 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 215 | 709 | |
| 216 | MDRV_SOUND_ADD(AY8910, 6000000/3) | |
| 217 | MDRV_SOUND_CONFIG(ay8910_interface_1) | |
| 710 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/6) // 2 MHz verified on schematics | |
| 711 | MDRV_SOUND_CONFIG(nova2001_ay8910_interface_1) | |
| 218 | 712 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 219 | 713 | |
| 220 | MDRV_SOUND_ADD(AY8910, 6000000/3) | |
| 221 | MDRV_SOUND_CONFIG(ay8910_interface_2) | |
| 714 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/6) | |
| 715 | MDRV_SOUND_CONFIG(nova2001_ay8910_interface_2) | |
| 222 | 716 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 223 | 717 | MACHINE_DRIVER_END |
| 224 | 718 | |
| 719 | static MACHINE_DRIVER_START( ninjakun ) | |
| 225 | 720 | |
| 721 | /* basic machine hardware */ | |
| 722 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz | |
| 723 | MDRV_CPU_PROGRAM_MAP(ninjakun_cpu1_map,0) | |
| 724 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) | |
| 226 | 725 | |
| 726 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz | |
| 727 | MDRV_CPU_PROGRAM_MAP(ninjakun_cpu2_map,0) | |
| 728 | MDRV_CPU_VBLANK_INT(irq0_line_hold,4) /* ? */ | |
| 729 | ||
| 730 | MDRV_INTERLEAVE(100) /* 100 CPU slices per frame */ | |
| 731 | ||
| 732 | MDRV_MACHINE_START(ninjakun) | |
| 733 | ||
| 734 | /* video hardware */ | |
| 735 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 736 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 737 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 738 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 739 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1 ) | |
| 740 | MDRV_GFXDECODE(ninjakun) | |
| 741 | MDRV_PALETTE_LENGTH(0x300) | |
| 742 | ||
| 743 | MDRV_VIDEO_START(ninjakun) | |
| 744 | MDRV_VIDEO_UPDATE(ninjakun) | |
| 745 | ||
| 746 | /* sound hardware */ | |
| 747 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 748 | ||
| 749 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/4) // 3 MHz | |
| 750 | MDRV_SOUND_CONFIG(nova2001_ay8910_interface_2) // note swapped order wrt nova2001 | |
| 751 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) | |
| 752 | ||
| 753 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/4) // 3 MHz | |
| 754 | MDRV_SOUND_CONFIG(nova2001_ay8910_interface_1) | |
| 755 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) | |
| 756 | MACHINE_DRIVER_END | |
| 757 | ||
| 758 | static MACHINE_DRIVER_START( pkunwar ) | |
| 759 | ||
| 760 | /* basic machine hardware */ | |
| 761 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz | |
| 762 | MDRV_CPU_PROGRAM_MAP(pkunwar_map,0) | |
| 763 | MDRV_CPU_IO_MAP(pkunwar_io,0) | |
| 764 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) | |
| 765 | ||
| 766 | /* video hardware */ | |
| 767 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 768 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 769 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 770 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 771 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1) | |
| 772 | MDRV_GFXDECODE(pkunwar) | |
| 773 | MDRV_PALETTE_LENGTH(0x200) | |
| 774 | ||
| 775 | MDRV_PALETTE_INIT(nova2001) | |
| 776 | MDRV_VIDEO_START(pkunwar) | |
| 777 | MDRV_VIDEO_UPDATE(pkunwar) | |
| 778 | ||
| 779 | /* sound hardware */ | |
| 780 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 781 | ||
| 782 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/8) // 1.5MHz (correct?) | |
| 783 | MDRV_SOUND_CONFIG(pkunwar_ay8910_interface_1) | |
| 784 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 785 | ||
| 786 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/8) | |
| 787 | MDRV_SOUND_CONFIG(pkunwar_ay8910_interface_2) | |
| 788 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 789 | MACHINE_DRIVER_END | |
| 790 | ||
| 791 | static MACHINE_DRIVER_START( raiders5 ) | |
| 792 | ||
| 793 | /* basic machine hardware */ | |
| 794 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz | |
| 795 | MDRV_CPU_PROGRAM_MAP(raiders5_cpu1_map,0) | |
| 796 | MDRV_CPU_IO_MAP(raiders5_io,0) | |
| 797 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) | |
| 798 | ||
| 799 | MDRV_CPU_ADD(Z80, MAIN_CLOCK/4) // 3 MHz | |
| 800 | MDRV_CPU_PROGRAM_MAP(raiders5_cpu2_map,0) | |
| 801 | MDRV_CPU_VBLANK_INT(irq0_line_hold,4) /* ? */ | |
| 802 | ||
| 803 | MDRV_INTERLEAVE(400) | |
| 804 | ||
| 805 | /* video hardware */ | |
| 806 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 807 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 808 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 809 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 810 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1) | |
| 811 | MDRV_GFXDECODE(raiders5) | |
| 812 | MDRV_PALETTE_LENGTH(0x300) | |
| 813 | ||
| 814 | MDRV_VIDEO_START(raiders5) | |
| 815 | MDRV_VIDEO_UPDATE(raiders5) | |
| 816 | ||
| 817 | /* sound hardware */ | |
| 818 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 819 | ||
| 820 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/8) // 1.5MHz | |
| 821 | MDRV_SOUND_CONFIG(pkunwar_ay8910_interface_1) | |
| 822 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 823 | ||
| 824 | MDRV_SOUND_ADD(AY8910, MAIN_CLOCK/8) | |
| 825 | MDRV_SOUND_CONFIG(pkunwar_ay8910_interface_2) | |
| 826 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 827 | MACHINE_DRIVER_END | |
| 828 | ||
| 829 | ||
| 830 | ||
| 831 | /************************************* | |
| 832 | * | |
| 833 | * ROM definitions | |
| 834 | * | |
| 835 | *************************************/ | |
| 836 | ||
| 227 | 837 | ROM_START( nova2001 ) |
| 228 | 838 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 229 | 839 | ROM_LOAD( "1.6c", 0x0000, 0x2000, CRC(368cffc0) SHA1(b756c0542d5b86640af62639bdd0d32f6e364dd3) ) |
| 230 | 840 | ROM_LOAD( "2.6d", 0x2000, 0x2000, CRC(bc4e442b) SHA1(6e1dca5dde442db95403377bf49aaad2a337813e) ) |
| 231 | 841 | ROM_LOAD( "3.6f", 0x4000, 0x2000, CRC(b2849038) SHA1(b56c7c03ef7c677cc6df0280a485f9cda3435b23) ) |
| 232 | 842 | ROM_LOAD( "4.6g", 0x6000, 0x1000, CRC(6b5bb12d) SHA1(74aee3d08a7ee1f98eaec4a4b3062aa9d17948ec) ) |
| 233 | ROM_RELOAD( 0x7000, 0x1000 ) | |
| 843 | ROM_RELOAD( 0x7000, 0x1000 ) // half size ROM, mirrored | |
| 234 | 844 | |
| 235 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 236 | ROM_LOAD( "5.12s", 0x0000, 0x2000, CRC(54198941) SHA1(fe762a0bbcf10b13ece87ded2ea730257cfbe7d3) ) | |
| 237 | ROM_LOAD( "6.12p", 0x2000, 0x2000, CRC(cbd90dca) SHA1(7eacde832f5783f4389fb98d6bf6b26dd494665d) ) | |
| 845 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 846 | ROM_LOAD16_BYTE( "5.12s", 0x0000, 0x2000, CRC(54198941) SHA1(fe762a0bbcf10b13ece87ded2ea730257cfbe7d3) ) | |
| 847 | ROM_LOAD16_BYTE( "6.12p", 0x0001, 0x2000, CRC(cbd90dca) SHA1(7eacde832f5783f4389fb98d6bf6b26dd494665d) ) | |
| 848 | ROM_LOAD16_BYTE( "7.12n", 0x4000, 0x2000, CRC(9ebd8806) SHA1(26b6caa0d0a7ae52a182070ecc7bc696c12038b3) ) | |
| 849 | ROM_LOAD16_BYTE( "8.12l", 0x4001, 0x2000, CRC(d1b18389) SHA1(2d808fee774f1bb4cec42e23cfef36b54eee0efa) ) | |
| 238 | 850 | |
| 239 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 240 | ROM_LOAD( "7.12n", 0x0000, 0x2000, CRC(9ebd8806) SHA1(26b6caa0d0a7ae52a182070ecc7bc696c12038b3) ) | |
| 241 | ROM_LOAD( "8.12l", 0x2000, 0x2000, CRC(d1b18389) SHA1(2d808fee774f1bb4cec42e23cfef36b54eee0efa) ) | |
| 242 | ||
| 243 | 851 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) |
| 244 | 852 | ROM_LOAD( "nova2001.clr", 0x0000, 0x0020, CRC(a2fac5cd) SHA1(ad14aa2be57722d1f48b47171fe72f96091423b6) ) |
| 245 | 853 | ROM_END |
| r1679 | r1680 | |
| 250 | 858 | ROM_LOAD( "nova2001.2", 0x2000, 0x2000, CRC(fab87144) SHA1(506703f9d96443839f864ef5bde1a71120f54384) ) |
| 251 | 859 | ROM_LOAD( "3.6f", 0x4000, 0x2000, CRC(b2849038) SHA1(b56c7c03ef7c677cc6df0280a485f9cda3435b23) ) |
| 252 | 860 | ROM_LOAD( "4.6g", 0x6000, 0x1000, CRC(6b5bb12d) SHA1(74aee3d08a7ee1f98eaec4a4b3062aa9d17948ec) ) |
| 253 | ROM_RELOAD( 0x7000, 0x1000 ) | |
| 861 | ROM_RELOAD( 0x7000, 0x1000 ) // half size ROM, mirrored | |
| 254 | 862 | |
| 255 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 256 | ROM_LOAD( "nova2001.5", 0x0000, 0x2000, CRC(8ea576e8) SHA1(d8dbcfd43aafe25afad7f947a80737cdc55b23d7) ) | |
| 257 | ROM_LOAD( "nova2001.6", 0x2000, 0x2000, CRC(0c61656c) SHA1(41c480799798c95543b5a805694e68282b9f563a) ) | |
| 863 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 864 | ROM_LOAD16_BYTE( "nova2001.5", 0x0000, 0x2000, CRC(8ea576e8) SHA1(d8dbcfd43aafe25afad7f947a80737cdc55b23d7) ) | |
| 865 | ROM_LOAD16_BYTE( "nova2001.6", 0x0001, 0x2000, CRC(0c61656c) SHA1(41c480799798c95543b5a805694e68282b9f563a) ) | |
| 866 | ROM_LOAD16_BYTE( "7.12n", 0x4000, 0x2000, CRC(9ebd8806) SHA1(26b6caa0d0a7ae52a182070ecc7bc696c12038b3) ) | |
| 867 | ROM_LOAD16_BYTE( "8.12l", 0x4001, 0x2000, CRC(d1b18389) SHA1(2d808fee774f1bb4cec42e23cfef36b54eee0efa) ) | |
| 258 | 868 | |
| 259 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 260 | ROM_LOAD( "7.12n", 0x0000, 0x2000, CRC(9ebd8806) SHA1(26b6caa0d0a7ae52a182070ecc7bc696c12038b3) ) | |
| 261 | ROM_LOAD( "8.12l", 0x2000, 0x2000, CRC(d1b18389) SHA1(2d808fee774f1bb4cec42e23cfef36b54eee0efa) ) | |
| 262 | ||
| 263 | 869 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) |
| 264 | 870 | ROM_LOAD( "nova2001.clr", 0x0000, 0x0020, CRC(a2fac5cd) SHA1(ad14aa2be57722d1f48b47171fe72f96091423b6) ) |
| 265 | 871 | ROM_END |
| 266 | 872 | |
| 873 | ROM_START( ninjakun ) /* Original Board? */ | |
| 874 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 875 | ROM_LOAD( "ninja-1.7a", 0x0000, 0x02000, CRC(1c1dc141) SHA1(423d3ed35e73a8d5bfce075a889b0322b207bd0d) ) | |
| 876 | ROM_LOAD( "ninja-2.7b", 0x2000, 0x02000, CRC(39cc7d37) SHA1(7f0d0e1e92cb6a57f15eb7fc51a67112f1c5fc8e) ) | |
| 877 | ROM_LOAD( "ninja-3.7d", 0x4000, 0x02000, CRC(d542bfe3) SHA1(3814d8f5b1acda21438fff4f71670fa653dc7b30) ) | |
| 878 | ROM_LOAD( "ninja-4.7e", 0x6000, 0x02000, CRC(a57385c6) SHA1(77925a281e64889bfe967c3d42a388529aaf7eb6) ) | |
| 267 | 879 | |
| 880 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 881 | ROM_LOAD( "ninja-5.7h", 0x0000, 0x02000, CRC(164a42c4) SHA1(16b434b33b76b878514f67c23315d4c6da7bfc9e) ) | |
| 268 | 882 | |
| 269 | GAME( 1983, nova2001, 0, nova2001, nova2001, 0, ROT0, "UPL", "Nova 2001 (Japan)", 0 ) | |
| 270 | GAME( 1983, nov2001u, nova2001, nova2001, nova2001, 0, ROT0, "UPL (Universal license)", "Nova 2001 (US)", 0 ) | |
| 883 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 884 | ROM_LOAD16_BYTE( "ninja-6.7n", 0x0000, 0x02000, CRC(a74c4297) SHA1(87184d14c67331f2c8a2412e28f31427eddae799) ) | |
| 885 | ROM_LOAD16_BYTE( "ninja-7.7p", 0x0001, 0x02000, CRC(53a72039) SHA1(d77d608ce9388a8956831369badd88a8eda8e102) ) | |
| 886 | ROM_LOAD16_BYTE( "ninja-8.7s", 0x4000, 0x02000, CRC(4a99d857) SHA1(6aadb6a5c721a161a5c1bef5569c1e323e380cff) ) | |
| 887 | ROM_LOAD16_BYTE( "ninja-9.7t", 0x4001, 0x02000, CRC(dede49e4) SHA1(8ce4bc02ec583b3885ca63fb5e2d5dad185fe192) ) | |
| 888 | ||
| 889 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 890 | ROM_LOAD16_BYTE( "ninja-10.2c", 0x0000, 0x02000, CRC(0d55664a) SHA1(955a607b4401ce9f3f807d53833a766152b0ef9b) ) | |
| 891 | ROM_LOAD16_BYTE( "ninja-11.2d", 0x0001, 0x02000, CRC(12ff9597) SHA1(10b572844ab32e3ae54abe3600fecc1a811ac713) ) | |
| 892 | ROM_LOAD16_BYTE( "ninja-12.4c", 0x4000, 0x02000, CRC(e9b75807) SHA1(cf4c8ac962f785e9de5502df58eab9b3725aaa28) ) | |
| 893 | ROM_LOAD16_BYTE( "ninja-13.4d", 0x4001, 0x02000, CRC(1760ed2c) SHA1(ee4c8efcce483c8051873714856824a1a1e14b61) ) | |
| 894 | ROM_END | |
| 895 | ||
| 896 | ROM_START( pkunwar ) | |
| 897 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 898 | ROM_LOAD( "pkwar.01r", 0x0000, 0x4000, CRC(ce2d2c7b) SHA1(2ffe2eb339fd668ec4fe90eff66124a334db0693) ) | |
| 899 | ROM_LOAD( "pkwar.02r", 0x4000, 0x4000, CRC(abc1f661) SHA1(c4bf4a345efd4271617de9f334303d81c6885aa5) ) | |
| 900 | ROM_LOAD( "pkwar.03r", 0xe000, 0x2000, CRC(56faebea) SHA1(dd0406c723a08f5d1120655857a115ab8c2d2a11) ) | |
| 901 | ||
| 902 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 903 | ROM_LOAD( "pkwar.01y", 0x0000, 0x4000, CRC(428d3b92) SHA1(7fe11e8d785fe829d34e512f233bb9ccc70cd431) ) | |
| 904 | ROM_LOAD( "pkwar.02y", 0x4000, 0x4000, CRC(ce1da7bc) SHA1(a2357b61703a689ce63aec7dd44702b119894f8e) ) | |
| 905 | ROM_LOAD( "pkwar.03y", 0x8000, 0x4000, CRC(63204400) SHA1(1ba87ad3425c51150cb65408f04ee0147ef332d3) ) | |
| 906 | ROM_LOAD( "pkwar.04y", 0xc000, 0x4000, CRC(061dfca8) SHA1(0a2dd8fc790d607195ca18dfc55575c2b9ddc58a) ) | |
| 907 | ||
| 908 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 909 | ROM_LOAD( "pkwar.col", 0x0000, 0x0020, CRC(af0fc5e2) SHA1(480908bf893211b580ae19cfb40dc35ad1bbc343) ) | |
| 910 | ROM_END | |
| 911 | ||
| 912 | ROM_START( pkunwarj ) | |
| 913 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 914 | ROM_LOAD( "pgunwar.6", 0x0000, 0x4000, CRC(357f3ef3) SHA1(bc651fb7701b395ae8cda1888814af5c5aa325a6) ) | |
| 915 | ROM_LOAD( "pgunwar.5", 0x4000, 0x4000, CRC(0092e49e) SHA1(7945361036f7679e4f4bb6b94f60f3ca09c077dc) ) | |
| 916 | ROM_LOAD( "pkwar.03r", 0xe000, 0x2000, CRC(56faebea) SHA1(dd0406c723a08f5d1120655857a115ab8c2d2a11) ) | |
| 917 | ||
| 918 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 919 | ROM_LOAD( "pkwar.01y", 0x0000, 0x4000, CRC(428d3b92) SHA1(7fe11e8d785fe829d34e512f233bb9ccc70cd431) ) | |
| 920 | ROM_LOAD( "pkwar.02y", 0x4000, 0x4000, CRC(ce1da7bc) SHA1(a2357b61703a689ce63aec7dd44702b119894f8e) ) | |
| 921 | ROM_LOAD( "pgunwar.2", 0x8000, 0x4000, CRC(a2a43443) SHA1(4e10569886d364eb2539928ea81dc1565b60b590) ) | |
| 922 | ROM_LOAD( "pkwar.04y", 0xc000, 0x4000, CRC(061dfca8) SHA1(0a2dd8fc790d607195ca18dfc55575c2b9ddc58a) ) | |
| 923 | ||
| 924 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 925 | ROM_LOAD( "pkwar.col", 0x0000, 0x0020, CRC(af0fc5e2) SHA1(480908bf893211b580ae19cfb40dc35ad1bbc343) ) | |
| 926 | ROM_END | |
| 927 | ||
| 928 | ROM_START( raiders5 ) | |
| 929 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 930 | ROM_LOAD( "raiders5.1", 0x0000, 0x4000, CRC(47cea11f) SHA1(0499e6627ad9c16775fdc59f2ff56dfdfc23490a) ) | |
| 931 | ROM_LOAD( "raiders5.2", 0x4000, 0x4000, CRC(eb2ff410) SHA1(5c995b66b6301cd3cd58efd173481deaa036f842) ) | |
| 932 | ||
| 933 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 934 | ROM_LOAD( "raiders5.2", 0x0000, 0x4000, CRC(eb2ff410) SHA1(5c995b66b6301cd3cd58efd173481deaa036f842) ) | |
| 935 | ||
| 936 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 937 | ROM_LOAD( "raiders3.11f", 0x0000, 0x4000, CRC(30041d58) SHA1(a33087de7afb276925879898a96f418128a5a38c) ) | |
| 938 | ROM_LOAD( "raiders4.11g", 0x4000, 0x4000, CRC(e441931c) SHA1(f39b4c25de779c671a6e2b02df64e7fed726f4da) ) | |
| 939 | ||
| 940 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 941 | ROM_LOAD( "raiders5.11n", 0x0000, 0x4000, CRC(c0895090) SHA1(a3a1ae57ed66bc095ea9bfb26470290f67aab1fe) ) | |
| 942 | ROM_END | |
| 943 | ||
| 944 | ROM_START( raidrs5t ) | |
| 945 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 946 | ROM_LOAD( "raiders1.4c", 0x0000, 0x4000, CRC(4e2d5679) SHA1(a1c1603ba98814a83b92ad024ca4422aea872111) ) | |
| 947 | ROM_LOAD( "raiders2.4d", 0x4000, 0x4000, CRC(c8604be1) SHA1(6d23f26174bb9b2f7db3a5fa6b39674fe237135b) ) | |
| 948 | ||
| 949 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 950 | ROM_LOAD( "raiders2.4d", 0x0000, 0x4000, CRC(c8604be1) SHA1(6d23f26174bb9b2f7db3a5fa6b39674fe237135b) ) | |
| 951 | ||
| 952 | ROM_REGION( 0x8000, REGION_GFX1, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 953 | ROM_LOAD( "raiders3.11f", 0x0000, 0x4000, CRC(30041d58) SHA1(a33087de7afb276925879898a96f418128a5a38c) ) | |
| 954 | ROM_LOAD( "raiders4.11g", 0x4000, 0x4000, CRC(e441931c) SHA1(f39b4c25de779c671a6e2b02df64e7fed726f4da) ) | |
| 955 | ||
| 956 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) // (need lineswapping) | |
| 957 | ROM_LOAD( "raiders5.11n", 0x0000, 0x4000, CRC(c0895090) SHA1(a3a1ae57ed66bc095ea9bfb26470290f67aab1fe) ) | |
| 958 | ROM_END | |
| 959 | ||
| 960 | ||
| 961 | ||
| 962 | /************************************* | |
| 963 | * | |
| 964 | * Gfx ROM swizzling | |
| 965 | * | |
| 966 | *************************************/ | |
| 967 | ||
| 968 | /****************************************************************************** | |
| 969 | ||
| 970 | Gfx ROMs in pkunwar have an unusual layout, where a high address bit | |
| 971 | (which is no the top bit) separates parts of the same tile. | |
| 972 | ||
| 973 | This all originates from Nova2001 apparently, which uses 0x2000 bytes ROMs for | |
| 974 | the graphics. When the number of tiles was increased, the same 0x2000 blocks | |
| 975 | were maintained even if the ROMs got larger. | |
| 976 | ||
| 977 | To make it possible to decode graphics without resorting to ROM_CONTINUE | |
| 978 | trickery, this function makes an address line rotation, bringing bit "bit" to | |
| 979 | bit 0 and shifting left by one place all the intervening bits. | |
| 980 | ||
| 981 | This code is overly generic because it is used for several games in ninjakd2.c | |
| 982 | ||
| 983 | ******************************************************************************/ | |
| 984 | ||
| 985 | static void lineswap_gfx_roms(const int region, const int bit) | |
| 986 | { | |
| 987 | const int length = memory_region_length(region); | |
| 988 | ||
| 989 | UINT8* const src = memory_region(region); | |
| 990 | ||
| 991 | UINT8* const temp = malloc_or_die(length); | |
| 992 | ||
| 993 | const int mask = (1 << (bit + 1)) - 1; | |
| 994 | ||
| 995 | int sa; | |
| 996 | ||
| 997 | for (sa = 0; sa < length; sa++) | |
| 998 | { | |
| 999 | const int da = (sa & ~mask) | ((sa << 1) & mask) | ((sa >> bit) & 1); | |
| 1000 | ||
| 1001 | temp[da] = src[sa]; | |
| 1002 | } | |
| 1003 | ||
| 1004 | memcpy(src, temp, length); | |
| 1005 | ||
| 1006 | free(temp); | |
| 1007 | } | |
| 1008 | ||
| 1009 | ||
| 1010 | ||
| 1011 | /************************************* | |
| 1012 | * | |
| 1013 | * Driver initialization | |
| 1014 | * | |
| 1015 | *************************************/ | |
| 1016 | ||
| 1017 | static DRIVER_INIT( pkunwar ) | |
| 1018 | { | |
| 1019 | lineswap_gfx_roms(REGION_GFX1, 13); | |
| 1020 | } | |
| 1021 | ||
| 1022 | static DRIVER_INIT( raiders5 ) | |
| 1023 | { | |
| 1024 | lineswap_gfx_roms(REGION_GFX1, 13); | |
| 1025 | lineswap_gfx_roms(REGION_GFX2, 13); | |
| 1026 | } | |
| 1027 | ||
| 1028 | ||
| 1029 | ||
| 1030 | /************************************* | |
| 1031 | * | |
| 1032 | * Game drivers | |
| 1033 | * | |
| 1034 | *************************************/ | |
| 1035 | ||
| 1036 | GAME( 1983, nova2001, 0, nova2001, nova2001, 0, ROT0, "UPL", "Nova 2001 (Japan)", 0 ) | |
| 1037 | GAME( 1983, nov2001u, nova2001, nova2001, nova2001, 0, ROT0, "UPL (Universal license)", "Nova 2001 (US)", 0 ) | |
| 1038 | GAME( 1984, ninjakun, 0, ninjakun, ninjakun, 0, ROT0, "[UPL] (Taito license)", "Ninjakun Majou no Bouken", 0 ) | |
| 1039 | GAME( 1985?,pkunwar, 0, pkunwar, pkunwar, pkunwar, ROT0, "UPL", "Penguin-Kun Wars (US)", 0 ) | |
| 1040 | GAME( 1985?,pkunwarj, pkunwar, pkunwar, pkunwar, pkunwar, ROT0, "UPL", "Penguin-Kun Wars (Japan)", 0 ) | |
| 1041 | GAME( 1985, raiders5, 0, raiders5, raiders5, raiders5, ROT0, "UPL", "Raiders5", 0 ) | |
| 1042 | GAME( 1985, raidrs5t, raiders5, raiders5, raiders5, raiders5, ROT0, "UPL (Taito license)", "Raiders5 (Japan)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 57 | 57 | /* Defined in video/stactics.c */ |
| 58 | 58 | VIDEO_START( stactics ); |
| 59 | 59 | VIDEO_UPDATE( stactics ); |
| 60 | extern UINT8 *stactics_scroll_ram; | |
| 61 | 60 | extern UINT8 *stactics_videoram_b; |
| 62 | extern UINT8 *stactics_chardata_b; | |
| 63 | 61 | extern UINT8 *stactics_videoram_d; |
| 64 | extern UINT8 *stactics_chardata_d; | |
| 65 | 62 | extern UINT8 *stactics_videoram_e; |
| 66 | extern UINT8 *stactics_chardata_e; | |
| 67 | 63 | extern UINT8 *stactics_videoram_f; |
| 68 | extern UINT8 *stactics_ | |
| 64 | extern UINT8 *stactics_p | |
| 69 | 65 | extern UINT8 *stactics_display_buffer; |
| 66 | extern UINT8 *stactics_lamps; | |
| 70 | 67 | |
| 71 | 68 | PALETTE_INIT( stactics ); |
| 72 | 69 | |
| r1679 | r1680 | |
| 76 | 73 | WRITE8_HANDLER( stactics_shot_trigger_w ); |
| 77 | 74 | WRITE8_HANDLER( stactics_shot_flag_clear_w ); |
| 78 | 75 | |
| 79 | WRITE8_HANDLER( stactics_videoram_b_w ); | |
| 80 | WRITE8_HANDLER( stactics_chardata_b_w ); | |
| 81 | WRITE8_HANDLER( stactics_videoram_d_w ); | |
| 82 | WRITE8_HANDLER( stactics_chardata_d_w ); | |
| 83 | WRITE8_HANDLER( stactics_videoram_e_w ); | |
| 84 | WRITE8_HANDLER( stactics_chardata_e_w ); | |
| 85 | WRITE8_HANDLER( stactics_videoram_f_w ); | |
| 86 | WRITE8_HANDLER( stactics_chardata_f_w ); | |
| 87 | 76 | |
| 88 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 89 | AM_RANGE(0x0000, 0x2fff) AM_READ(MRA8_ROM) | |
| 90 | AM_RANGE(0x4000, 0x47ff) AM_READ(MRA8_RAM) | |
| 91 | AM_RANGE(0x5000, 0x5fff) AM_READ(input_port_0_r) | |
| 92 | AM_RANGE(0x6000, 0x6fff) AM_READ(input_port_1_r) | |
| 93 | AM_RANGE(0x7000, 0x7fff) AM_READ(stactics_port_2_r) | |
| 94 | AM_RANGE(0x8000, 0x8fff) AM_READ(stactics_port_3_r) | |
| 95 | AM_RANGE(0x9000, 0x9fff) AM_READ(stactics_vert_pos_r) | |
| 96 | AM_RANGE(0xa000, 0xafff) AM_READ(stactics_horiz_pos_r) | |
| 97 | ||
| 98 | AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_RAM) /* B RAM page */ | |
| 99 | AM_RANGE(0xd000, 0xdfff) AM_READ(MRA8_RAM) /* D RAM page */ | |
| 100 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8_RAM) /* E RAM page */ | |
| 101 | AM_RANGE(0xf000, 0xffff) AM_READ(MRA8_RAM) /* F RAM page */ | |
| 77 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 78 | AM_RANGE(0x0000, 0x2fff) AM_ROM | |
| 79 | AM_RANGE(0x4000, 0x47ff) AM_RAM | |
| 80 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_READ(input_port_0_r) | |
| 81 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(input_port_1_r) | |
| 82 | AM_RANGE(0x6000, 0x6001) AM_MIRROR(0x0f08) AM_WRITE(stactics_coin_lockout_w) | |
| 83 | AM_RANGE(0x6002, 0x6005) AM_MIRROR(0x0f08) AM_WRITE(MWA8_NOP) | |
| 84 | AM_RANGE(0x6006, 0x6007) AM_MIRROR(0x0f08) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_palette) | |
| 85 | /* AM_RANGE(0x6010, 0x6017) AM_MIRROR(0x0f08) AM_WRITE(stactics_sound_w) */ | |
| 86 | AM_RANGE(0x6016, 0x6016) AM_MIRROR(0x0f08) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_motor_on) /* Note: This overlaps rocket sound */ | |
| 87 | AM_RANGE(0x6020, 0x6027) AM_MIRROR(0x0f08) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_lamps) | |
| 88 | AM_RANGE(0x6030, 0x6030) AM_MIRROR(0x0f0f) AM_WRITE(stactics_speed_latch_w) | |
| 89 | AM_RANGE(0x6040, 0x6040) AM_MIRROR(0x0f0f) AM_WRITE(stactics_shot_trigger_w) | |
| 90 | AM_RANGE(0x6050, 0x6050) AM_MIRROR(0x0f0f) AM_WRITE(stactics_shot_flag_clear_w) | |
| 91 | AM_RANGE(0x6060, 0x606f) AM_MIRROR(0x0f00) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_display_buffer) | |
| 92 | AM_RANGE(0x6070, 0x609f) AM_MIRROR(0x0f00) AM_WRITE(MWA8_NOP) | |
| 93 | /* AM_RANGE(0x60a0, 0x60ef) AM_MIRROR(0x0f00) AM_WRITE(stactics_sound2_w) */ | |
| 94 | AM_RANGE(0x60f0, 0x60ff) AM_MIRROR(0x0f00) AM_WRITE(MWA8_NOP) | |
| 95 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_READ(stactics_port_2_r) | |
| 96 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_READ(stactics_port_3_r) | |
| 97 | AM_RANGE(0x8000, 0x8fff) AM_WRITE(stactics_scroll_ram_w) | |
| 98 | AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0fff) AM_READ(stactics_vert_pos_r) | |
| 99 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0fff) AM_READ(stactics_horiz_pos_r) | |
| 100 | AM_RANGE(0xb000, 0xbfff) AM_RAM AM_BASE(&stactics_videoram_b) | |
| 101 | AM_RANGE(0xc000, 0xcfff) AM_NOP | |
| 102 | AM_RANGE(0xd000, 0xdfff) AM_RAM AM_BASE(&stactics_videoram_d) | |
| 103 | AM_RANGE(0xe000, 0xefff) AM_RAM AM_BASE(&stactics_videoram_e) | |
| 104 | AM_RANGE(0xf000, 0xffff) AM_RAM AM_BASE(&stactics_videoram_f) | |
| 102 | 105 | ADDRESS_MAP_END |
| 103 | 106 | |
| 104 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 105 | AM_RANGE(0x4000, 0x47ff) AM_WRITE(MWA8_RAM) | |
| 106 | AM_RANGE(0x6000, 0x6001) AM_WRITE(stactics_coin_lockout_w) | |
| 107 | AM_RANGE(0x6006, 0x6007) AM_WRITE(stactics_palette_w) | |
| 108 | /* AM_RANGE(0x6010, 0x601f) AM_WRITE(stactics_sound_w) */ | |
| 109 | AM_RANGE(0x6016, 0x6016) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_motor_on) /* Note: This overlaps rocket sound */ | |
| 110 | /* AM_RANGE(0x6020, 0x602f) AM_WRITE(stactics_lamp_latch_w) */ | |
| 111 | AM_RANGE(0x6030, 0x603f) AM_WRITE(stactics_speed_latch_w) | |
| 112 | AM_RANGE(0x6040, 0x604f) AM_WRITE(stactics_shot_trigger_w) | |
| 113 | AM_RANGE(0x6050, 0x605f) AM_WRITE(stactics_shot_flag_clear_w) | |
| 114 | AM_RANGE(0x6060, 0x606f) AM_WRITE(MWA8_RAM) AM_BASE(&stactics_display_buffer) | |
| 115 | /* AM_RANGE(0x60a0, 0x60ef) AM_WRITE(stactics_sound2_w) */ | |
| 116 | 107 | |
| 117 | AM_RANGE(0x8000, 0x8fff) AM_WRITE(stactics_scroll_ram_w) AM_BASE(&stactics_scroll_ram) | |
| 118 | ||
| 119 | AM_RANGE(0xb000, 0xb3ff) AM_WRITE(stactics_videoram_b_w) AM_BASE(&stactics_videoram_b) AM_SIZE(&videoram_size) | |
| 120 | AM_RANGE(0xb400, 0xb7ff) AM_WRITE(MWA8_RAM) /* Unused, but initialized */ | |
| 121 | AM_RANGE(0xb800, 0xbfff) AM_WRITE(stactics_chardata_b_w) AM_BASE(&stactics_chardata_b) | |
| 122 | ||
| 123 | AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_NOP) /* according to the schematics, nothing is mapped here */ | |
| 124 | /* but, the game still tries to clear this out */ | |
| 125 | ||
| 126 | AM_RANGE(0xd000, 0xd3ff) AM_WRITE(stactics_videoram_d_w) AM_BASE(&stactics_videoram_d) | |
| 127 | AM_RANGE(0xd400, 0xd7ff) AM_WRITE(MWA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 128 | AM_RANGE(0xd800, 0xdfff) AM_WRITE(stactics_chardata_d_w) AM_BASE(&stactics_chardata_d) | |
| 129 | ||
| 130 | AM_RANGE(0xe000, 0xe3ff) AM_WRITE(stactics_videoram_e_w) AM_BASE(&stactics_videoram_e) | |
| 131 | AM_RANGE(0xe400, 0xe7ff) AM_WRITE(MWA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 132 | AM_RANGE(0xe800, 0xefff) AM_WRITE(stactics_chardata_e_w) AM_BASE(&stactics_chardata_e) | |
| 133 | ||
| 134 | AM_RANGE(0xf000, 0xf3ff) AM_WRITE(stactics_videoram_f_w) AM_BASE(&stactics_videoram_f) | |
| 135 | AM_RANGE(0xf400, 0xf7ff) AM_WRITE(MWA8_RAM) /* Used as scratch RAM, high scores, etc. */ | |
| 136 | AM_RANGE(0xf800, 0xffff) AM_WRITE(stactics_chardata_f_w) AM_BASE(&stactics_chardata_f) | |
| 137 | ||
| 138 | ADDRESS_MAP_END | |
| 139 | ||
| 140 | 108 | static INPUT_PORTS_START( stactics ) |
| 141 | 109 | |
| 142 | 110 | PORT_START /* IN0 */ |
| r1679 | r1680 | |
| 207 | 175 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 208 | 176 | INPUT_PORTS_END |
| 209 | 177 | |
| 210 | /* For the character graphics */ | |
| 211 | 178 | |
| 212 | static const gfx_layout gfxlayout = | |
| 213 | { | |
| 214 | 8,8, | |
| 215 | 256, | |
| 216 | 1, /* 1 bit per pixel */ | |
| 217 | { 0 }, | |
| 218 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 219 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 220 | 8*8 | |
| 221 | }; | |
| 222 | ||
| 223 | /* For the LED Fire Beam (made up) */ | |
| 224 | ||
| 225 | static const gfx_layout firelayout = | |
| 226 | { | |
| 227 | 16,9, | |
| 228 | 256, | |
| 229 | 1, /* 1 bit per pixel */ | |
| 230 | { 0 }, | |
| 231 | { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 }, | |
| 232 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8 }, | |
| 233 | 8*9 | |
| 234 | }; | |
| 235 | ||
| 236 | static GFXDECODE_START( stactics ) | |
| 237 | GFXDECODE_ENTRY( 0, 0, gfxlayout, 0, 64*4 ) /* Dynamically decoded from RAM */ | |
| 238 | GFXDECODE_ENTRY( 0, 0, gfxlayout, 1*2*16, 64*4 ) /* Dynamically decoded from RAM */ | |
| 239 | GFXDECODE_ENTRY( 0, 0, gfxlayout, 2*2*16, 64*4 ) /* Dynamically decoded from RAM */ | |
| 240 | GFXDECODE_ENTRY( 0, 0, gfxlayout, 3*2*16, 64*4 ) /* Dynamically decoded from RAM */ | |
| 241 | GFXDECODE_ENTRY( 0, 0, firelayout, 0, 64*4 ) /* LED Fire beam (synthesized gfx) */ | |
| 242 | GFXDECODE_ENTRY( 0, 0, gfxlayout, 0, 64*4 ) /* LED and Misc. Display characters */ | |
| 243 | GFXDECODE_END | |
| 244 | ||
| 245 | 179 | static MACHINE_DRIVER_START( stactics ) |
| 246 | 180 | |
| 247 | 181 | /* basic machine hardware */ |
| 248 | 182 | MDRV_CPU_ADD(8080, 1933560) |
| 249 | MDRV_CPU_PROGRAM_MAP( | |
| 183 | MDRV_CPU_PROGRAM_MAP( | |
| 250 | 184 | MDRV_CPU_VBLANK_INT(stactics_interrupt,1) |
| 251 | 185 | |
| 252 | 186 | MDRV_SCREEN_REFRESH_RATE(60) |
| 253 | 187 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 254 | 188 | |
| 255 | 189 | /* video hardware */ |
| 256 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 190 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_ALWAYS_UPDATE) | |
| 257 | 191 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 258 | 192 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 259 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) | |
| 260 | MDRV_GFXDECODE(stactics) | |
| 261 | MDRV_PALETTE_LENGTH(16) | |
| 262 | MDRV_COLORTABLE_LENGTH(16*4*4*2) | |
| 193 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1) | |
| 194 | MDRV_PALETTE_LENGTH(0x400) | |
| 263 | 195 | |
| 264 | 196 | MDRV_PALETTE_INIT(stactics) |
| 265 | 197 | MDRV_VIDEO_START(stactics) |
| r1679 | r1680 | |
| 285 | 217 | ROM_LOAD( "epr-222y", 0x2000, 0x0800, CRC(24dd2bcc) SHA1(f77c59beccc1a77e3bfc2928ff532d6e221ff42d) ) |
| 286 | 218 | ROM_LOAD( "epr-223x", 0x2800, 0x0800, CRC(7fef0940) SHA1(5b2af55f75ef0130f9202b6a916a96dbd601fcfa) ) |
| 287 | 219 | |
| 288 | ROM_REGION( 0x1060, REGION_GFX1, ROMREGION_DISPOSE ) /* gfx decoded in vh_start */ | |
| 289 | ROM_LOAD( "epr-217", 0x0000, 0x0800, CRC(38259f5f) SHA1(1f4182ffc2d78fca22711526bb2ae2cfe040173c) ) /* LED fire beam data */ | |
| 220 | ROM_REGION( 0x1040, REGION_PROMS, 0 ) | |
| 221 | ROM_LOAD( "pr54", 0x0000, 0x0800, CRC(9640bd6e) SHA1(dd12952a6591f2056ac1b5688dca0a3a2ef69f2d) ) /* color/priority PROM */ | |
| 290 | 222 | ROM_LOAD( "pr55", 0x0800, 0x0800, CRC(f162673b) SHA1(83743780b6c1f8014df24fa0650000b7cb137d92) ) /* timing PROM (unused) */ |
| 291 | 223 | ROM_LOAD( "pr65", 0x1000, 0x0020, CRC(a1506b9d) SHA1(037c3db2ea40eca459e8acba9d1506dd28d72d10) ) /* timing PROM (unused) */ |
| 292 | 224 | ROM_LOAD( "pr66", 0x1020, 0x0020, CRC(78dcf300) SHA1(37034cc0cfa4a8ec47937a2a34b77ec56b387a9b) ) /* timing PROM (unused) */ |
| 293 | ROM_LOAD( "pr67", 0x1040, 0x0020, CRC(b27874e7) SHA1(c24bc78c4b2ae01aaed5d994ce2e7c5e0f2eece8) ) /* LED timing ROM (unused) */ | |
| 294 | 225 | |
| 295 | ROM_REGION( 0x0800, REGION_PROMS, 0 ) | |
| 296 | ROM_LOAD( "pr54", 0x0000, 0x0800, CRC(9640bd6e) SHA1(dd12952a6591f2056ac1b5688dca0a3a2ef69f2d) ) /* color/priority prom */ | |
| 226 | ROM_REGION( 0x0820, REGION_USER1, 0 ) | |
| 227 | ROM_LOAD( "epr-217", 0x0000, 0x0800, CRC(38259f5f) SHA1(1f4182ffc2d78fca22711526bb2ae2cfe040173c) ) /* LED fire beam data */ | |
| 228 | ROM_LOAD( "pr67", 0x0800, 0x0020, CRC(b27874e7) SHA1(c24bc78c4b2ae01aaed5d994ce2e7c5e0f2eece8) ) /* LED timing ROM (unused) */ | |
| 297 | 229 | ROM_END |
| 298 | 230 | |
| 299 | 231 | |
| 300 | 232 | |
| 301 | GAME( 1981, stactics, 0, stactics, stactics, 0, | |
| 233 | GAME( 1981, stactics, 0, stactics, stactics, 0, | |
| 302 | 234 |
| r1679 | r1680 | |
|---|---|---|
| 109 | 109 | |
| 110 | 110 | static VIDEO_START( calorie ) |
| 111 | 111 | { |
| 112 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,16,16); | |
| 113 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 112 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,16,16,16,16); | |
| 113 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8, 8,32,32); | |
| 114 | 114 | |
| 115 | 115 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 116 | 116 | } |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | static VIDEO_START( drtomy ) |
| 93 | 93 | { |
| 94 | tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 95 | tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 94 | tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows,16,16,32,32); | |
| 95 | tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows,16,16,32,32); | |
| 96 | 96 | |
| 97 | 97 | tilemap_set_transparent_pen(tilemap_fg,0); |
| 98 | 98 | } |
| r1679 | r1680 | |
|---|---|---|
| 236 | 236 | |
| 237 | 237 | #include "driver.h" |
| 238 | 238 | #include "sound/ay8910.h" |
| 239 | #include "video/crtc6845.h" | |
| 240 | 239 | #include "machine/6821pia.h" |
| 241 | 240 | |
| 242 | 241 | /* from video */ |
| 243 | extern WRITE8_HANDLER( gdrawpkr_videoram_w ); | |
| 244 | extern WRITE8_HANDLER( gdrawpkr_colorram_w ); | |
| 245 | extern PALETTE_INIT( gdrawpkr ); | |
| 246 | extern VIDEO_START( gdrawpkr ); | |
| 247 | extern VIDEO_UPDATE( gdrawpkr ); | |
| 242 | WRITE8_HANDLER( gdrawpkr_videoram_w ); | |
| 243 | WRITE8_HANDLER( gdrawpkr_colorram_w ); | |
| 244 | WRITE8_HANDLER( gdrawpkr_mc6845_address_w ); | |
| 245 | READ8_HANDLER( gdrawpkr_mc6845_register_r ); | |
| 246 | WRITE8_HANDLER( gdrawpkr_mc6845_register_w ); | |
| 247 | PALETTE_INIT( gdrawpkr ); | |
| 248 | VIDEO_START( gdrawpkr ); | |
| 249 | VIDEO_UPDATE( gdrawpkr ); | |
| 248 | 250 | |
| 249 | 251 | |
| 250 | 252 | /************************* |
| r1679 | r1680 | |
| 255 | 257 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 256 | 258 | AM_RANGE(0x0840, 0x0840) AM_WRITE(AY8910_control_port_0_w) |
| 257 | 259 | AM_RANGE(0x0841, 0x0841) AM_WRITE(AY8910_write_port_0_w) |
| 258 | AM_RANGE(0x0880, 0x0880) AM_WRITE(crtc6845_address_w) | |
| 259 | AM_RANGE(0x0881, 0x0881) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 260 | AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_mc6845_address_w) | |
| 261 | AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_mc6845_register_r, gdrawpkr_mc6845_register_w) | |
| 260 | 262 | AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w) |
| 261 | 263 | AM_RANGE(0x08c8, 0x08cb) AM_READWRITE(pia_1_r, pia_1_w) |
| 262 | 264 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(gdrawpkr_videoram_w) AM_BASE(&videoram) |
| r1679 | r1680 | |
| 268 | 270 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 269 | 271 | AM_RANGE(0x0840, 0x0840) AM_WRITE(AY8910_control_port_0_w) |
| 270 | 272 | AM_RANGE(0x0841, 0x0841) AM_WRITE(AY8910_write_port_0_w) |
| 271 | AM_RANGE(0x0880, 0x0880) AM_WRITE(crtc6845_address_w) | |
| 272 | AM_RANGE(0x0881, 0x0881) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 273 | AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_mc6845_address_w) | |
| 274 | AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_mc6845_register_r, gdrawpkr_mc6845_register_w) | |
| 273 | 275 | AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w) |
| 274 | 276 | AM_RANGE(0x08c8, 0x08cb) AM_READWRITE(pia_1_r, pia_1_w) |
| 275 | 277 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(gdrawpkr_videoram_w) AM_BASE(&videoram) |
| r1679 | r1680 | |
| 578 | 580 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 31*8-1) /* Taken from MC6845 init, registers 01 & 06 */ |
| 579 | 581 | |
| 580 | 582 | MDRV_GFXDECODE(gdrawpkr) |
| 581 | MDRV_PALETTE_LENGTH(256) | |
| 582 | MDRV_COLORTABLE_LENGTH(1024) | |
| 583 | MDRV_PALETTE_LENGTH(1024) | |
| 583 | 584 | |
| 584 | 585 | MDRV_PALETTE_INIT(gdrawpkr) |
| 585 | 586 | MDRV_VIDEO_START(gdrawpkr) |
| r1679 | r1680 | |
| 619 | 620 | ROM_LOAD( "cg-2b.u69", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) |
| 620 | 621 | ROM_LOAD( "cg-2a.u68", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) |
| 621 | 622 | |
| 622 | ROM_REGION( 0x | |
| 623 | ROM_REGION( 0x400, REGION_PROMS, 0 ) | |
| 623 | 624 | ROM_LOAD( "82s129n.u28", 0x0000, 0x0100, CRC(6db5a344) SHA1(5f1a81ac02a2a74252decd3bb95a5436cc943930) ) |
| 625 | ROM_RELOAD( 0x0100, 0x0100 ) | |
| 626 | ROM_RELOAD( 0x0200, 0x0100 ) | |
| 627 | ROM_RELOAD( 0x0300, 0x0100 ) | |
| 624 | 628 | ROM_END |
| 625 | 629 | |
| 626 | 630 | ROM_START( elgrande ) |
| r1679 | r1680 | |
| 639 | 643 | ROM_LOAD( "d1.u69", 0x0800, 0x0800, CRC(ed3c83b7) SHA1(93e2134de3d9f79a6cff0391c1a32fccd3840c3f) ) |
| 640 | 644 | ROM_LOAD( "d1.u68", 0x1000, 0x0800, BAD_DUMP CRC(3ab70570) SHA1(5ff84015a78d15a5207499f84ce637e49bca136f) ) /* bad bits */ |
| 641 | 645 | |
| 642 | ROM_REGION( 0x | |
| 646 | ROM_REGION( 0x0500, REGION_PROMS, 0 ) | |
| 643 | 647 | ROM_LOAD( "d1.u28", 0x0000, 0x0200, CRC(a6d43709) SHA1(cbff2cb60137462dc0b7c7719a64574218d96c62) ) |
| 648 | ROM_RELOAD( 0x0100, 0x0200 ) | |
| 649 | ROM_RELOAD( 0x0200, 0x0200 ) | |
| 650 | ROM_RELOAD( 0x0300, 0x0200 ) | |
| 644 | 651 | ROM_END |
| 645 | 652 | |
| 646 | 653 | |
| r1679 | r1680 | |
| 654 | 661 | int x; |
| 655 | 662 | UINT8 *BPR = memory_region( REGION_PROMS ); |
| 656 | 663 | |
| 657 | for (x=0x0000;x<0x0 | |
| 664 | for (x=0x0000;x<0x0400;x++) | |
| 658 | 665 | { |
| 659 | 666 | if (BPR[x] == 0x07) |
| 660 | 667 | BPR[x] = 0x04; /* blue background */ |
| r1679 | r1680 | |
| 672 | 679 | UINT8 *ROM = memory_region( REGION_GFX2 ); |
| 673 | 680 | |
| 674 | 681 | /* Palette transformed by PLDs? */ |
| 675 | for (x=0x0000;x<0x0 | |
| 682 | for (x=0x0000;x<0x0400;x++) | |
| 676 | 683 | { |
| 677 | 684 | if (BPR[x] == 0x07) |
| 678 | 685 | BPR[x] = 0x00; /* black background */ |
| r1679 | r1680 | |
|---|---|---|
| 528 | 528 | if ((data & 0x0800) == 0) |
| 529 | 529 | { |
| 530 | 530 | dmadac_enable(0, SOUND_CHANNELS, 0); |
| 531 | timer_adjust(adsp_autobuffer_timer, attotime_never, 0 | |
| 531 | timer_adjust_oneshot(adsp_autobuffer_timer, attotime_never, 0 | |
| 532 | 532 | } |
| 533 | 533 | break; |
| 534 | 534 | |
| r1679 | r1680 | |
| 537 | 537 | if ((data & 0x0002) == 0) |
| 538 | 538 | { |
| 539 | 539 | dmadac_enable(0, SOUND_CHANNELS, 0); |
| 540 | timer_adjust(adsp_autobuffer_timer, attotime_never, 0 | |
| 540 | timer_adjust_oneshot(adsp_autobuffer_timer, attotime_never, 0 | |
| 541 | 541 | } |
| 542 | 542 | break; |
| 543 | 543 | |
| r1679 | r1680 | |
| 644 | 644 | /* fire off a timer wich will hit every half-buffer */ |
| 645 | 645 | sample_period = attotime_div(attotime_mul(sample_period, adsp_size), SOUND_CHANNELS * adsp_incs); |
| 646 | 646 | |
| 647 | timer_adjust(adsp_autobuffer_timer, sample_period, 0, sample_period); | |
| 647 | timer_adjust_periodic(adsp_autobuffer_timer, sample_period, 0, sample_period); | |
| 648 | 648 | |
| 649 | 649 | return; |
| 650 | 650 | } |
| r1679 | r1680 | |
| 656 | 656 | dmadac_enable(0, SOUND_CHANNELS, 0); |
| 657 | 657 | |
| 658 | 658 | /* remove timer */ |
| 659 | timer_adjust(adsp_autobuffer_timer, attotime_never, 0 | |
| 659 | timer_adjust_oneshot(adsp_autobuffer_timer, attotime_never, 0 | |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 |
| r1679 | r1680 | |
|---|---|---|
| 798 | 798 | emu_timer *timer; |
| 799 | 799 | |
| 800 | 800 | timer = timer_alloc( mcu_timer , NULL); |
| 801 | timer_adjust( timer, ATTOTIME_IN_HZ( 600 ), 0, ATTOTIME_IN_HZ( 600 ) ); | |
| 801 | timer_adjust_periodic( timer, ATTOTIME_IN_HZ( 600 ), 0, ATTOTIME_IN_HZ( 600 ) ); | |
| 802 | 802 | |
| 803 | 803 | psx_driver_init(); |
| 804 | 804 | namcoc7x_on_driver_init(); |
| r1679 | r1680 | |
| 912 | 912 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 913 | 913 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 914 | 914 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 915 | PORT_ | |
| 915 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH | |
| 916 | 916 | PORT_DIPNAME( 0x02, 0x00, "DIP1 (Test)" ) |
| 917 | 917 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 918 | 918 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| r1679 | r1680 | |
|---|---|---|
| 1342 | 1342 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1343 | 1343 | INPUT_PORTS_END |
| 1344 | 1344 | |
| 1345 | static INPUT_PORTS_START( galtaito ) | |
| 1346 | PORT_START_TAG("IN0") | |
| 1347 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 1348 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 1349 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 1350 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 1351 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 1352 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) ) | |
| 1353 | PORT_DIPSETTING( 0x20, DEF_STR( Upright ) ) | |
| 1354 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 1355 | PORT_SERVICE( 0x40, IP_ACTIVE_HIGH ) | |
| 1356 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) | |
| 1357 | ||
| 1358 | GAL_IN1 | |
| 1359 | ||
| 1360 | PORT_START_TAG("DSW0") | |
| 1361 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Bonus_Life ) ) | |
| 1362 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1363 | PORT_DIPSETTING( 0x01, "4000" ) | |
| 1364 | PORT_DIPSETTING( 0x02, "5000" ) | |
| 1365 | PORT_DIPSETTING( 0x03, "7000" ) | |
| 1366 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) | |
| 1367 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1368 | PORT_DIPSETTING( 0x04, "5" ) | |
| 1369 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) | |
| 1370 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1371 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1372 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 1373 | INPUT_PORTS_END | |
| 1374 | ||
| 1345 | 1375 | static INPUT_PORTS_START( superg ) |
| 1346 | 1376 | GAL_IN0 |
| 1347 | 1377 | GAL_IN1 |
| 1348 | 1378 | |
| 1349 | 1379 | PORT_START_TAG("DSW0") |
| 1350 | 1380 | PORT_DIPNAME( 0x03, 0x01, DEF_STR( Bonus_Life ) ) |
| 1381 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1351 | 1382 | PORT_DIPSETTING( 0x01, "4000" ) |
| 1352 | 1383 | PORT_DIPSETTING( 0x02, "5000" ) |
| 1353 | 1384 | PORT_DIPSETTING( 0x03, "7000" ) |
| 1354 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 1355 | 1385 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) |
| 1356 | 1386 | PORT_DIPSETTING( 0x00, "3" ) |
| 1357 | 1387 | PORT_DIPSETTING( 0x04, "5" ) |
| r1679 | r1680 | |
| 4961 | 4991 | ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) |
| 4962 | 4992 | ROM_END |
| 4963 | 4993 | |
| 4994 | ROM_START( galtaito ) | |
| 4995 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 4996 | ROM_LOAD( "gl-03.8g", 0x0000, 0x0800, CRC(e8f3aa67) SHA1(a0e9576784dbe602dd9780e667f01f31defd7c00) ) /* All eprom are HN462716 eproms */ | |
| 4997 | ROM_LOAD( "gl-04.8f", 0x0800, 0x0800, CRC(f58283e3) SHA1(edc6e72516c50fd3402281d9936574d276581ce9) ) | |
| 4998 | ROM_LOAD( "gl-05.8e", 0x1000, 0x0800, CRC(4c7031c0) SHA1(97f7ab0cedcd8eba1c8f6f516d84d672a2108258) ) | |
| 4999 | ROM_LOAD( "gl-06.8d", 0x1800, 0x0800, CRC(097d92a2) SHA1(63ef86657286a4e1fae4f795e0e6b410ca2ef06b) ) | |
| 5000 | ROM_LOAD( "gl-07.8c", 0x2000, 0x0800, CRC(5341d75a) SHA1(40bc8fcc598f58c6ff944e2a4a9288463e75a09d) ) | |
| 5001 | ||
| 5002 | ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 5003 | ROM_LOAD( "gl-01.1j", 0x0000, 0x0800, CRC(968b6016) SHA1(f13e4a8d0fdeb121d39ca76120acdc6c7e7f377c) ) | |
| 5004 | ROM_LOAD( "gl-02.1k", 0x0800, 0x0800, CRC(d14f7510) SHA1(cd09e6ee0a3890d01b2415f5b8346c42c02d15a3) ) | |
| 5005 | ||
| 5006 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 5007 | ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) | |
| 5008 | ROM_END | |
| 5009 | ||
| 4964 | 5010 | ROM_START( superg ) |
| 4965 | 5011 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 4966 | 5012 | ROM_LOAD( "7f.bin", 0x0000, 0x1000, CRC(4335b1de) SHA1(e41e3d90dac738cf71377f3b476ec67b14dee27a) ) |
| r1679 | r1680 | |
| 6972 | 7018 | GAME( 1979, galaxiaj, galaxian, galaxian, superg, 0, ROT90, "Namco", "Galaxian (Namco set 2)", GAME_SUPPORTS_SAVE ) |
| 6973 | 7019 | GAME( 1979, galmidw, galaxian, galaxian, galaxian, 0, ROT90, "[Namco] (Midway license)", "Galaxian (Midway)", GAME_SUPPORTS_SAVE ) |
| 6974 | 7020 | GAME( 1979, galmidwo, galaxian, galaxian, galaxian, 0, ROT90, "[Namco] (Midway license)", "Galaxian (Midway, old rev)", GAME_SUPPORTS_SAVE ) |
| 7021 | GAME( 1979, galtaito, galaxian, galaxian, galtaito, 0, ROT90, "[Namco] (Taito license)", "Galaxian (Taito)", GAME_SUPPORTS_SAVE ) | |
| 6975 | 7022 | GAME( 1979, superg, galaxian, galaxian, superg, 0, ROT90, "hack", "Super Galaxians", GAME_SUPPORTS_SAVE ) |
| 6976 | 7023 | GAME( 1979, galapx, galaxian, galaxian, superg, 0, ROT90, "hack", "Galaxian Part X", GAME_SUPPORTS_SAVE ) |
| 6977 | 7024 | GAME( 19??, moonaln, galaxian, galaxian, superg, 0, ROT90, "[Nichibutsu] (Karateco license)", "Moon Alien", GAME_SUPPORTS_SAVE ) |
| r1679 | r1680 | |
|---|---|---|
| 611 | 611 | |
| 612 | 612 | static INPUT_PORTS_START( hyprduel ) |
| 613 | 613 | PORT_START |
| 614 | PORT_ | |
| 614 | PORT_SERVICE_NO_TOGGLE( | |
| 615 | 615 | PORT_DIPNAME( 0x4000, 0x0000, "Show Warning" ) |
| 616 | 616 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 617 | 617 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r1679 | r1680 | |
|---|---|---|
| 18 | 18 | #include "deprecat.h" |
| 19 | 19 | #include "sound/sn76496.h" |
| 20 | 20 | |
| 21 | static UINT8 *strnskil_sharedram; | |
| 22 | ||
| 23 | 21 | /****************************************************************************/ |
| 24 | 22 | |
| 25 | extern WRITE8_HANDLER( strnskil_videoram_w ); | |
| 26 | extern WRITE8_HANDLER( strnskil_scroll_x_w ); | |
| 27 | extern WRITE8_HANDLER( strnskil_scrl_ctrl_w ); | |
| 23 | WRITE8_HANDLER( strnskil_videoram_w ); | |
| 24 | WRITE8_HANDLER( strnskil_scrl_ctrl_w ); | |
| 28 | 25 | |
| 29 | extern PALETTE_INIT( strnskil ); | |
| 30 | extern VIDEO_START( strnskil ); | |
| 31 | extern VIDEO_UPDATE( strnskil ); | |
| 26 | PALETTE_INIT( strnskil ); | |
| 27 | VIDEO_START( strnskil ); | |
| 28 | VIDEO_UPDATE( strnskil ); | |
| 32 | 29 | |
| 33 | static WRITE8_HANDLER( strnskil_sharedram_w ) | |
| 34 | { | |
| 35 | strnskil_sharedram[offset] = data; | |
| 36 | } | |
| 30 | extern UINT8 *strnskil_xscroll; | |
| 37 | 31 | |
| 38 | static READ8_HANDLER( strnskil_sharedram_r ) | |
| 39 | { | |
| 40 | return strnskil_sharedram[offset]; | |
| 41 | } | |
| 42 | 32 | |
| 33 | ||
| 43 | 34 | static READ8_HANDLER( strnskil_d800_r ) |
| 44 | 35 | { |
| 45 | 36 | /* bit0: interrupt type?, bit1: CPU2 busack? */ |
| r1679 | r1680 | |
| 100 | 91 | AM_RANGE(0x0000, 0x9fff) AM_READ(MRA8_ROM) |
| 101 | 92 | |
| 102 | 93 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) |
| 103 | AM_RANGE(0xc800, 0xcfff) AM_READ( | |
| 94 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8 | |
| 104 | 95 | AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) /* videoram */ |
| 105 | 96 | |
| 106 | 97 | AM_RANGE(0xd800, 0xd800) AM_READ(strnskil_d800_r) |
| r1679 | r1680 | |
| 115 | 106 | AM_RANGE(0x0000, 0x9fff) AM_WRITE(MWA8_ROM) |
| 116 | 107 | |
| 117 | 108 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) |
| 118 | AM_RANGE(0xc800, 0xcfff) AM_WRITE( | |
| 109 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8 | |
| 119 | 110 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE(strnskil_videoram_w) AM_BASE(&videoram) |
| 120 | 111 | |
| 121 | 112 | AM_RANGE(0xd808, 0xd808) AM_WRITE(strnskil_scrl_ctrl_w) |
| 122 | 113 | AM_RANGE(0xd809, 0xd809) AM_WRITE(MWA8_NOP) /* coin counter? */ |
| 123 | AM_RANGE(0xd80a, 0xd80b) AM_WRITE(strnskil_scroll | |
| 114 | AM_RANGE(0xd80a, 0xd80b) AM_WRITE(MWA8_RAM) AM_BASE(&strnskil_xscroll | |
| 124 | 115 | ADDRESS_MAP_END |
| 125 | 116 | |
| 126 | 117 | static ADDRESS_MAP_START( strnskil_readmem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 127 | 118 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) |
| 128 | 119 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) |
| 129 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) | |
| 120 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) AM_SHARE(1) | |
| 130 | 121 | ADDRESS_MAP_END |
| 131 | 122 | |
| 132 | 123 | static ADDRESS_MAP_START( strnskil_writemem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 133 | 124 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) |
| 134 | 125 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 135 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8_RAM) AM_ | |
| 126 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8_RAM) AM_ | |
| 136 | 127 | |
| 137 | 128 | AM_RANGE(0xd801, 0xd801) AM_WRITE(SN76496_0_w) |
| 138 | 129 | AM_RANGE(0xd802, 0xd802) AM_WRITE(SN76496_1_w) |
| r1679 | r1680 | |
| 362 | 353 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 363 | 354 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 364 | 355 | MDRV_GFXDECODE(strnskil) |
| 365 | MDRV_PALETTE_LENGTH(256) | |
| 366 | MDRV_COLORTABLE_LENGTH(1024) | |
| 356 | MDRV_PALETTE_LENGTH(1024) | |
| 367 | 357 | |
| 368 | 358 | MDRV_PALETTE_INIT(strnskil) |
| 369 | 359 | MDRV_VIDEO_START(strnskil) |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | scanline += 32; |
| 88 | 88 | if (scanline >= 256) |
| 89 | 89 | scanline -= 256; |
| 90 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 90 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| r1679 | r1680 | |
| 130 | 130 | reset_bank(); |
| 131 | 131 | |
| 132 | 132 | /* start interrupts going (32V clocked by 16V) */ |
| 133 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 48, 0), 48 | |
| 133 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 48, 0), 48 | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | UINT8 shaolins_nmi_enable; |
| 15 | 15 | |
| 16 | extern WRITE8_HANDLER( shaolins_videoram_w ); | |
| 17 | extern WRITE8_HANDLER( shaolins_colorram_w ); | |
| 18 | extern WRITE8_HANDLER( shaolins_palettebank_w ); | |
| 19 | extern WRITE8_HANDLER( shaolins_scroll_w ); | |
| 20 | extern WRITE8_HANDLER( shaolins_nmi_w ); | |
| 16 | WRITE8_HANDLER( shaolins_videoram_w ); | |
| 17 | WRITE8_HANDLER( shaolins_colorram_w ); | |
| 18 | WRITE8_HANDLER( shaolins_palettebank_w ); | |
| 19 | WRITE8_HANDLER( shaolins_scroll_w ); | |
| 20 | WRITE8_HANDLER( shaolins_nmi_w ); | |
| 21 | 21 | |
| 22 | extern PALETTE_INIT( shaolins ); | |
| 23 | extern VIDEO_START( shaolins ); | |
| 24 | extern VIDEO_UPDATE( shaolins ); | |
| 22 | PALETTE_INIT( shaolins ); | |
| 23 | VIDEO_START( shaolins ); | |
| 24 | VIDEO_UPDATE( shaolins ); | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | static INTERRUPT_GEN( shaolins_interrupt ) |
| r1679 | r1680 | |
| 231 | 231 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 232 | 232 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 233 | 233 | MDRV_GFXDECODE(shaolins) |
| 234 | MDRV_PALETTE_LENGTH(256) | |
| 235 | MDRV_COLORTABLE_LENGTH(16*8*16+16*8*16) | |
| 234 | MDRV_PALETTE_LENGTH(16*8*16+16*8*16) | |
| 236 | 235 | |
| 237 | 236 | MDRV_PALETTE_INIT(shaolins) |
| 238 | 237 | MDRV_VIDEO_START(shaolins) |
| r1679 | r1680 | |
| 302 | 301 | |
| 303 | 302 | |
| 304 | 303 | GAME( 1985, kicker, 0, shaolins, shaolins, 0, ROT90, "Konami", "Kicker", 0 ) |
| 305 | GAME( 1985, shaolins, kicker, shaolins, shaolins, 0, ROT90, "Konami", "Shao- | |
| 304 | GAME( 1985, shaolins, kicker, shaolins, shaolins, 0, ROT90, "Konami", "Shao-lin's Road", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 303 | 303 | |
| 304 | 304 | model2_timerorig[offset] = model2_timervals[offset]; |
| 305 | 305 | period = attotime_mul(ATTOTIME_IN_HZ(25000000), model2_timerorig[offset]); |
| 306 | timer_adjust(model2_timers[offset], period, 0 | |
| 306 | timer_adjust_oneshot(model2_timers[offset], period, 0 | |
| 307 | 307 | model2_timerrun[offset] = 1; |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | static void model2_timer_exp(int tnum, int bit) |
| 311 | 311 | { |
| 312 | timer_adjust(model2_timers[tnum], attotime_never, 0 | |
| 312 | timer_adjust_oneshot(model2_timers[tnum], attotime_never, 0 | |
| 313 | 313 | |
| 314 | 314 | model2_intreq |= (1<<bit); |
| 315 | 315 | if (model2_intena & (1<<bit)) |
| r1679 | r1680 | |
| 348 | 348 | model2_timers[2] = timer_alloc(model2_timer_2_cb, NULL); |
| 349 | 349 | model2_timers[3] = timer_alloc(model2_timer_3_cb, NULL); |
| 350 | 350 | |
| 351 | timer_adjust(model2_timers[0], attotime_never, 0, attotime_never); | |
| 352 | timer_adjust(model2_timers[1], attotime_never, 0, attotime_never); | |
| 353 | timer_adjust(model2_timers[2], attotime_never, 0, attotime_never); | |
| 354 | timer_adjust(model2_timers[3], attotime_never, 0, attotime_never); | |
| 351 | timer_adjust_oneshot(model2_timers[0], attotime_never, 0); | |
| 352 | timer_adjust_oneshot(model2_timers[1], attotime_never, 0); | |
| 353 | timer_adjust_oneshot(model2_timers[2], attotime_never, 0); | |
| 354 | timer_adjust_oneshot(model2_timers[3], attotime_never, 0); | |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | static MACHINE_RESET(model2o) |
| r1679 | r1680 | |
| 1425 | 1425 | PORT_START |
| 1426 | 1426 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1427 | 1427 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1428 | PORT_ | |
| 1428 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1429 | 1429 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1430 | 1430 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1431 | 1431 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r1679 | r1680 | |
| 1443 | 1443 | PORT_START |
| 1444 | 1444 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1445 | 1445 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1446 | PORT_ | |
| 1446 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1447 | 1447 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1448 | 1448 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1449 | 1449 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // VR 1 (Blue) |
| r1679 | r1680 | |
| 1474 | 1474 | PORT_START |
| 1475 | 1475 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1476 | 1476 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1477 | PORT_ | |
| 1477 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1478 | 1478 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1479 | 1479 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1480 | 1480 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // VR 1 (Red) |
| r1679 | r1680 | |
| 1507 | 1507 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1508 | 1508 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1509 | 1509 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1510 | PORT_ | |
| 1510 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1511 | 1511 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1512 | 1512 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1513 | 1513 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) |
| r1679 | r1680 | |
|---|---|---|
| 326 | 326 | MDRV_SCREEN_SIZE(36*8, 28*8) |
| 327 | 327 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) |
| 328 | 328 | MDRV_GFXDECODE(wiping) |
| 329 | MDRV_PALETTE_LENGTH(32) | |
| 330 | MDRV_COLORTABLE_LENGTH(64*4+64*4) | |
| 329 | MDRV_PALETTE_LENGTH(64*4+64*4) | |
| 331 | 330 | |
| 332 | 331 | MDRV_PALETTE_INIT(wiping) |
| 333 | 332 | MDRV_VIDEO_UPDATE(wiping) |
| r1679 | r1680 | |
|---|---|---|
| 326 | 326 | |
| 327 | 327 | static VIDEO_START(gstream) |
| 328 | 328 | { |
| 329 | gstream_tilemap1 = tilemap_create(get_gs1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 32, 32,16,16); | |
| 330 | gstream_tilemap2 = tilemap_create(get_gs2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 32, 32,16,16); | |
| 331 | gstream_tilemap3 = tilemap_create(get_gs3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 32, 32,16,16); | |
| 329 | gstream_tilemap1 = tilemap_create(get_gs1_tile_info,tilemap_scan_rows, 32, 32,16,16); | |
| 330 | gstream_tilemap2 = tilemap_create(get_gs2_tile_info,tilemap_scan_rows, 32, 32,16,16); | |
| 331 | gstream_tilemap3 = tilemap_create(get_gs3_tile_info,tilemap_scan_rows, 32, 32,16,16); | |
| 332 | 332 | |
| 333 | 333 | tilemap_set_transparent_pen(gstream_tilemap1,0); |
| 334 | 334 | tilemap_set_transparent_pen(gstream_tilemap2,0); |
| r1679 | r1680 | |
|---|---|---|
| 542 | 542 | - Any new region sets will need full encryption tables dumped to extract the proper |
| 543 | 543 | keys or they will need to be brute forced. XORs are no longer supported nor wanted. |
| 544 | 544 | |
| 545 | ||
| 546 | Stephh's inputs notes (based on some tests on the "parent" set) : | |
| 547 | ||
| 548 | 0) All games | |
| 549 | ||
| 550 | - All inputs have been mapped according to the "test mode" | |
| 551 | (even if some buttons don't physically exist on the machine). | |
| 552 | - Joysticks and buttons can be fully tested. | |
| 553 | - COINn sometimes don't show anything but are OK ingame. | |
| 554 | - Unless I notify something below for some games, there is no extra button ! | |
| 555 | ||
| 556 | 1) 'mmancp2u' | |
| 557 | ||
| 558 | - BUTTON3 doesn't physically exist on the machine and has no effect ingame. | |
| 559 | ||
| 560 | 2) 'megaman2' | |
| 561 | ||
| 562 | - BUTTON3 doesn't physically exist on the machine and has no effect ingame. | |
| 563 | ||
| 564 | 3) 'mpang' | |
| 565 | ||
| 566 | - BUTTON2 doesn't physically exist on the machine and can't be seen in the "test mode". | |
| 567 | However, if you map it where it should be, it has the same effect as BUTTON1. | |
| 568 | ||
| 569 | 4) 'pzloop2' | |
| 570 | ||
| 571 | - Whatever your settings are, the paddle can't be tested in the "test mode" ! | |
| 572 | I can't tell at the moment if it's an emulation or an ingame bug :( | |
| 573 | ||
| 574 | 5) 'dimahoo' | |
| 575 | ||
| 576 | - BUTTON3 doesn't physically exist on the machine. | |
| 577 | However, it acts like a rapid fire (keep button pressed). | |
| 578 | ||
| 579 | 6) 'progear' | |
| 580 | ||
| 581 | - BUTTON3 doesn't physically exist on the machine and has no effect ingame. | |
| 582 | ||
| 545 | 583 | ***************************************************************************/ |
| 546 | 584 | |
| 547 | 585 | #include "driver.h" |
| r1679 | r1680 | |
| 564 | 602 | } |
| 565 | 603 | #endif |
| 566 | 604 | |
| 605 | ||
| 606 | /************************************* | |
| 607 | * | |
| 608 | * Constants | |
| 609 | * | |
| 610 | *************************************/ | |
| 611 | ||
| 567 | 612 | /* Maximum size of Q Sound Z80 region */ |
| 568 | 613 | #define QSOUND_SIZE 0x50000 |
| 569 | 614 | |
| r1679 | r1680 | |
| 572 | 617 | #define CODE_SIZE 0x0400000 |
| 573 | 618 | |
| 574 | 619 | |
| 620 | /************************************* | |
| 621 | * | |
| 622 | * Global variables | |
| 623 | * | |
| 624 | *************************************/ | |
| 625 | ||
| 575 | 626 | static int readpaddle; |
| 576 | 627 | static int cps2networkpresent; |
| 577 | 628 | |
| 629 | ||
| 630 | /************************************* | |
| 631 | * | |
| 632 | * Interrupt generation | |
| 633 | * | |
| 634 | *************************************/ | |
| 635 | ||
| 578 | 636 | static INTERRUPT_GEN( cps2_interrupt ) |
| 579 | 637 | { |
| 580 | 638 | static int scancount; |
| r1679 | r1680 | |
| 633 | 691 | } |
| 634 | 692 | |
| 635 | 693 | |
| 694 | /************************************* | |
| 695 | * | |
| 696 | * EEPROM | |
| 697 | * | |
| 698 | *************************************/ | |
| 636 | 699 | |
| 637 | 700 | static const struct EEPROM_interface cps2_eeprom_interface = |
| 638 | 701 | { |
| r1679 | r1680 | |
| 656 | 719 | } |
| 657 | 720 | } |
| 658 | 721 | |
| 659 | static | |
| 722 | static CUSTOM_I | |
| 660 | 723 | { |
| 661 | return | |
| 724 | return | |
| 662 | 725 | } |
| 663 | 726 | |
| 664 | 727 | static WRITE16_HANDLER( cps2_eeprom_port_w ) |
| r1679 | r1680 | |
| 729 | 792 | } |
| 730 | 793 | } |
| 731 | 794 | |
| 795 | ||
| 796 | /************************************* | |
| 797 | * | |
| 798 | * Sound ? | |
| 799 | * | |
| 800 | *************************************/ | |
| 801 | ||
| 732 | 802 | static READ16_HANDLER( cps2_qsound_volume_r ) |
| 733 | 803 | { |
| 734 | 804 | /* Extra adapter memory (0x660000-0x663fff) available when bit 14 = 0 */ |
| r1679 | r1680 | |
| 742 | 812 | } |
| 743 | 813 | |
| 744 | 814 | |
| 745 | static UINT8 CPS2_Read8(offs_t address) | |
| 815 | /************************************* | |
| 816 | * | |
| 817 | * ??? | |
| 818 | * | |
| 819 | *************************************/ | |
| 820 | ||
| 821 | static UINT8 cps2_read8(offs_t address) | |
| 746 | 822 | { |
| 747 | 823 | return m68k_read_pcrelative_8(address); |
| 748 | 824 | } |
| 749 | 825 | |
| 750 | static UINT16 | |
| 826 | static UINT16 cps2_read16(offs_t address) | |
| 751 | 827 | { |
| 752 | 828 | return m68k_read_pcrelative_16(address); |
| 753 | 829 | } |
| 754 | 830 | |
| 755 | static UINT32 | |
| 831 | static UINT32 cps2_read32(offs_t address) | |
| 756 | 832 | { |
| 757 | 833 | return m68k_read_pcrelative_32(address); |
| 758 | 834 | } |
| 759 | 835 | |
| 760 | 836 | |
| 837 | /************************************* | |
| 838 | * | |
| 839 | * Read handlers | |
| 840 | * | |
| 841 | *************************************/ | |
| 761 | 842 | |
| 762 | 843 | static READ16_HANDLER( kludge_r ) |
| 763 | 844 | { |
| 764 | 845 | return 0xffff; |
| 765 | 846 | } |
| 766 | 847 | |
| 848 | static READ16_HANDLER( joy_or_paddle_r ) | |
| 849 | { | |
| 850 | if (readpaddle != 0) | |
| 851 | return (readinputportbytag("IN0")); | |
| 852 | else | |
| 853 | return (readinputportbytag("PADDLE1") & 0xff) | (readinputportbytag("PADDLE2") << 8); | |
| 854 | } | |
| 767 | 855 | |
| 856 | ||
| 857 | /************************************* | |
| 858 | * | |
| 859 | * Memory map | |
| 860 | * | |
| 861 | *************************************/ | |
| 862 | ||
| 768 | 863 | static ADDRESS_MAP_START( cps2_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 769 | AM_RANGE(0x000000, 0x3fffff) AM_READ(MRA16_ROM) /* 68000 ROM */ | |
| 770 | AM_RANGE(0x400000, 0x40000b) AM_READ(MRA16_RAM) /* CPS2 object output */ | |
| 771 | AM_RANGE(0x618000, 0x619fff) AM_READ(qsound_sharedram1_r) /* Q RAM */ | |
| 772 | AM_RANGE(0x662000, 0x662001) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 773 | AM_RANGE(0x662008, 0x662009) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 774 | AM_RANGE(0x662020, 0x662021) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 775 | AM_RANGE(0x660000, 0x663fff) AM_READ(MRA16_RAM) /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ | |
| 776 | AM_RANGE(0x664000, 0x664001) AM_READ(MRA16_RAM) /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ | |
| 777 | AM_RANGE(0x708000, 0x709fff) AM_READ(cps2_objram2_r) /* Object RAM */ | |
| 778 | AM_RANGE(0x70a000, 0x70bfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 779 | AM_RANGE(0x70c000, 0x70dfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 780 | AM_RANGE(0x70e000, 0x70ffff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 781 | AM_RANGE(0x800100, 0x8001ff) AM_READ(cps1_output_r) /* Output ports mirror (sfa) */ | |
| 782 | AM_RANGE(0x804000, 0x804001) AM_READ(input_port_0_word_r) /* IN0 */ | |
| 783 | AM_RANGE(0x804010, 0x804011) AM_READ(input_port_1_word_r) /* IN1 */ | |
| 784 | AM_RANGE(0x804020, 0x804021) AM_READ(cps2_eeprom_port_r) /* IN2 + EEPROM */ | |
| 785 | AM_RANGE(0x804030, 0x804031) AM_READ(cps2_qsound_volume_r) /* Master volume. Also when bit 14=0 addon memory is present, when bit 15=0 network adapter present. */ | |
| 786 | AM_RANGE(0x8040b0, 0x8040b3) AM_READ(kludge_r) /* unknown (xmcotaj hangs if this is 0) */ | |
| 787 | AM_RANGE(0x804100, 0x8041ff) AM_READ(cps1_output_r) /* CPS1 Output ports */ | |
| 788 | AM_RANGE(0x900000, 0x92ffff) AM_READ(MRA16_RAM) /* Video RAM */ | |
| 789 | AM_RANGE(0xff0000, 0xffffff) AM_READ(MRA16_RAM) /* RAM */ | |
| 864 | AM_RANGE(0x000000, 0x3fffff) AM_READ(MRA16_ROM) /* 68000 ROM */ | |
| 865 | AM_RANGE(0x400000, 0x40000b) AM_READ(MRA16_RAM) /* CPS2 object output */ | |
| 866 | AM_RANGE(0x618000, 0x619fff) AM_READ(qsound_sharedram1_r) /* Q RAM */ | |
| 867 | AM_RANGE(0x662000, 0x662001) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 868 | AM_RANGE(0x662008, 0x662009) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 869 | AM_RANGE(0x662020, 0x662021) AM_READ(MRA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 870 | AM_RANGE(0x660000, 0x663fff) AM_READ(MRA16_RAM) /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ | |
| 871 | AM_RANGE(0x664000, 0x664001) AM_READ(MRA16_RAM) /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ | |
| 872 | AM_RANGE(0x708000, 0x709fff) AM_READ(cps2_objram2_r) /* Object RAM */ | |
| 873 | AM_RANGE(0x70a000, 0x70bfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 874 | AM_RANGE(0x70c000, 0x70dfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 875 | AM_RANGE(0x70e000, 0x70ffff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 876 | AM_RANGE(0x800100, 0x8001ff) AM_READ(cps1_output_r) /* Output ports mirror (sfa) */ | |
| 877 | AM_RANGE(0x804000, 0x804001) AM_READ_PORT("IN0") /* IN0 */ | |
| 878 | AM_RANGE(0x804010, 0x804011) AM_READ_PORT("IN1") /* IN1 */ | |
| 879 | AM_RANGE(0x804020, 0x804021) AM_READ_PORT("IN2") /* IN2 + EEPROM */ | |
| 880 | AM_RANGE(0x804030, 0x804031) AM_READ(cps2_qsound_volume_r) /* Master volume. Also when bit 14=0 addon memory is present, when bit 15=0 network adapter present. */ | |
| 881 | AM_RANGE(0x8040b0, 0x8040b3) AM_READ(kludge_r) /* unknown (xmcotaj hangs if this is 0) */ | |
| 882 | AM_RANGE(0x804100, 0x8041ff) AM_READ(cps1_output_r) /* CPS1 Output ports */ | |
| 883 | AM_RANGE(0x900000, 0x92ffff) AM_READ(MRA16_RAM) /* Video RAM */ | |
| 884 | AM_RANGE(0xff0000, 0xffffff) AM_READ(MRA16_RAM) /* RAM */ | |
| 790 | 885 | ADDRESS_MAP_END |
| 791 | 886 | |
| 792 | 887 | static ADDRESS_MAP_START( cps2_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 793 | AM_RANGE(0x000000, 0x3fffff) AM_WRITE(MWA16_ROM) /* ROM */ | |
| 794 | AM_RANGE(0x400000, 0x40000b) AM_WRITE(MWA16_RAM) AM_BASE(&cps2_output) AM_SIZE(&cps2_output_size) /* CPS2 output */ | |
| 795 | AM_RANGE(0x618000, 0x619fff) AM_WRITE(qsound_sharedram1_w) /* Q RAM */ | |
| 796 | AM_RANGE(0x662000, 0x662001) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 797 | AM_RANGE(0x662008, 0x662009) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB (not sure if this port is write only yet)*/ | |
| 798 | AM_RANGE(0x662020, 0x662021) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 799 | AM_RANGE(0x660000, 0x663fff) AM_WRITE(MWA16_RAM) /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ | |
| 800 | AM_RANGE(0x664000, 0x664001) AM_WRITE(MWA16_RAM) /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ | |
| 801 | AM_RANGE(0x700000, 0x701fff) AM_WRITE(cps2_objram1_w) AM_BASE(&cps2_objram1) /* Object RAM, no game seems to use it directly */ | |
| 802 | AM_RANGE(0x708000, 0x709fff) AM_WRITE(cps2_objram2_w) AM_BASE(&cps2_objram2) /* Object RAM */ | |
| 803 | AM_RANGE(0x70a000, 0x70bfff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 804 | AM_RANGE(0x70c000, 0x70dfff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 805 | AM_RANGE(0x70e000, 0x70ffff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 806 | AM_RANGE(0x800100, 0x8001ff) AM_WRITE(cps1_output_w) /* Output ports mirror (sfa) */ | |
| 807 | AM_RANGE(0x804040, 0x804041) AM_WRITE(cps2_eeprom_port_w) /* EEPROM */ | |
| 808 | AM_RANGE(0x8040a0, 0x8040a1) AM_WRITE(MWA16_NOP) /* Unknown (reset once on startup) */ | |
| 809 | AM_RANGE(0x8040e0, 0x8040e1) AM_WRITE(cps2_objram_bank_w) /* bit 0 = Object ram bank swap */ | |
| 810 | AM_RANGE(0x804100, 0x8041ff) AM_WRITE(cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* Output ports */ | |
| 888 | AM_RANGE(0x000000, 0x3fffff) AM_WRITE(MWA16_ROM) /* ROM */ | |
| 889 | AM_RANGE(0x400000, 0x40000b) AM_WRITE(MWA16_RAM) AM_BASE(&cps2_output) AM_SIZE(&cps2_output_size) /* CPS2 output */ | |
| 890 | AM_RANGE(0x618000, 0x619fff) AM_WRITE(qsound_sharedram1_w) /* Q RAM */ | |
| 891 | AM_RANGE(0x662000, 0x662001) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 892 | AM_RANGE(0x662008, 0x662009) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB (not sure if this port is write only yet)*/ | |
| 893 | AM_RANGE(0x662020, 0x662021) AM_WRITE(MWA16_RAM) /* Network adapter related, accessed in SSF2TB */ | |
| 894 | AM_RANGE(0x660000, 0x663fff) AM_WRITE(MWA16_RAM) /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ | |
| 895 | AM_RANGE(0x664000, 0x664001) AM_WRITE(MWA16_RAM) /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ | |
| 896 | AM_RANGE(0x700000, 0x701fff) AM_WRITE(cps2_objram1_w) AM_BASE(&cps2_objram1) /* Object RAM, no game seems to use it directly */ | |
| 897 | AM_RANGE(0x708000, 0x709fff) AM_WRITE(cps2_objram2_w) AM_BASE(&cps2_objram2) /* Object RAM */ | |
| 898 | AM_RANGE(0x70a000, 0x70bfff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 899 | AM_RANGE(0x70c000, 0x70dfff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 900 | AM_RANGE(0x70e000, 0x70ffff) AM_WRITE(cps2_objram2_w) /* mirror */ | |
| 901 | AM_RANGE(0x800100, 0x8001ff) AM_WRITE(cps1_output_w) /* Output ports mirror (sfa) */ | |
| 902 | AM_RANGE(0x804040, 0x804041) AM_WRITE(cps2_eeprom_port_w) /* EEPROM */ | |
| 903 | AM_RANGE(0x8040a0, 0x8040a1) AM_WRITE(MWA16_NOP) /* Unknown (reset once on startup) */ | |
| 904 | AM_RANGE(0x8040e0, 0x8040e1) AM_WRITE(cps2_objram_bank_w) /* bit 0 = Object ram bank swap */ | |
| 905 | AM_RANGE(0x804100, 0x8041ff) AM_WRITE(cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* Output ports */ | |
| 811 | 906 | AM_RANGE(0x900000, 0x92ffff) AM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) |
| 812 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) | |
| 907 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) /* RAM */ | |
| 813 | 908 | ADDRESS_MAP_END |
| 814 | 909 | |
| 815 | 910 | |
| 911 | /************************************* | |
| 912 | * | |
| 913 | * Generic port definitions | |
| 914 | * | |
| 915 | *************************************/ | |
| 816 | 916 | |
| 817 | ||
| 818 | static INPUT_PORTS_START( 19xx ) | |
| 819 | PORT_START /* IN0 (0x00) */ | |
| 917 | static INPUT_PORTS_START( cps2 ) | |
| 918 | PORT_START_TAG("IN0") /* IN0 (0x00) */ | |
| 820 | 919 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 821 | 920 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 822 | 921 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 823 | 922 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 824 | 923 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 825 | 924 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 826 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 827 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 828 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 829 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 830 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 831 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 832 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 833 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 834 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 835 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 836 | ||
| 837 | PORT_START /* IN1 (0x10) */ | |
| 838 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 839 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 840 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 841 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 842 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 843 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 844 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 845 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 846 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 847 | ||
| 848 | PORT_START /* IN2 (0x20) */ | |
| 849 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 850 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 851 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 852 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 853 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 854 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 855 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 856 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 857 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 858 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 859 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 860 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 861 | INPUT_PORTS_END | |
| 862 | ||
| 863 | static INPUT_PORTS_START( cybots ) | |
| 864 | PORT_START /* IN0 (0x00) */ | |
| 865 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 866 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 867 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 868 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 869 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 870 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 871 | 925 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 872 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 873 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 874 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 875 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 876 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 877 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 878 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 879 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 880 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 881 | ||
| 882 | PORT_START /* IN1 (0x10) */ | |
| 883 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 884 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 885 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 886 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 887 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 888 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 889 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 890 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 891 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 892 | ||
| 893 | PORT_START /* IN2 (0x20) */ | |
| 894 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 895 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 896 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 897 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 898 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 899 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 900 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 901 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 902 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 903 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 904 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 905 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 906 | INPUT_PORTS_END | |
| 907 | ||
| 908 | static INPUT_PORTS_START( ssf2 ) | |
| 909 | PORT_START /* IN0 (0x00) */ | |
| 910 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 911 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 912 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 913 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 914 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 915 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 916 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 917 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 918 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 919 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 920 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 921 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 922 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 923 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 924 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 925 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 926 | ||
| 927 | PORT_START /* IN1 (0x10) */ | |
| 928 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 929 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) | |
| 930 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) | |
| 931 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 932 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 933 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) | |
| 934 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 935 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 936 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 937 | ||
| 938 | PORT_START /* IN2 (0x20) */ | |
| 939 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 940 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 941 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 942 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 943 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 944 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 945 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 946 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 947 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 948 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 949 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) | |
| 950 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 951 | INPUT_PORTS_END | |
| 952 | ||
| 953 | static INPUT_PORTS_START( ddtod ) | |
| 954 | PORT_START /* IN0 (0x00) */ | |
| 955 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 956 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 957 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 958 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 959 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 960 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 961 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 962 | 926 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 963 | 927 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 964 | 928 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| r1679 | r1680 | |
| 969 | 933 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 970 | 934 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 971 | 935 | |
| 972 | PORT_START /* IN1 (0x10) */ | |
| 936 | PORT_START_TAG("IN1") /* IN1 (0x10) */ | |
| 973 | 937 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| 974 | 938 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 975 | 939 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| r1679 | r1680 | |
| 987 | 951 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) |
| 988 | 952 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) |
| 989 | 953 | |
| 990 | PORT_START /* IN2 (0x20) */ | |
| 991 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 992 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 954 | PORT_START_TAG("IN2") /* IN2 (0x20) */ | |
| 955 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cps2_eeprom_port_r, NULL) | |
| 956 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW ) | |
| 993 | 957 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 994 | 958 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 995 | 959 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| r1679 | r1680 | |
| 1002 | 966 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 1003 | 967 | INPUT_PORTS_END |
| 1004 | 968 | |
| 1005 | static INPUT_PORTS_START( avsp ) | |
| 1006 | PORT_START /* IN0 (0x00) */ | |
| 1007 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1008 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1009 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1010 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1011 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1012 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1013 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1014 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1015 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1016 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1017 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1018 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1019 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1020 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1021 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1022 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 969 | /* 4 players and 4 buttons */ | |
| 970 | static INPUT_PORTS_START( cps2_4p4b ) | |
| 971 | PORT_INCLUDE(cps2) | |
| 972 | INPUT_PORTS_END | |
| 1023 | 973 | |
| 1024 | PORT_START /* IN1 (0x10) */ | |
| 1025 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 1026 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 1027 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 1028 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 1029 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 1030 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 1031 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 1032 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1033 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 974 | /* 4 players and 3 buttons */ | |
| 975 | static INPUT_PORTS_START( cps2_4p3b ) | |
| 976 | PORT_INCLUDE(cps2_4p4b) | |
| 1034 | 977 | |
| 1035 | PORT_START /* IN2 (0x20) */ | |
| 1036 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1037 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1038 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1039 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1040 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1041 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1042 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) | |
| 1043 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1044 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1045 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1046 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 1047 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 978 | PORT_MODIFY("IN0") | |
| 979 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */ | |
| 980 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */ | |
| 981 | ||
| 982 | PORT_MODIFY("IN1") | |
| 983 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */ | |
| 984 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(4) */ | |
| 1048 | 985 | INPUT_PORTS_END |
| 1049 | 986 | |
| 1050 | static INPUT_PORTS_START( qndream ) | |
| 1051 | PORT_START /* IN0 (0x00) */ | |
| 1052 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1053 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1054 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1055 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1056 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1057 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1058 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1059 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1060 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1061 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1062 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1063 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1064 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1065 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1066 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1067 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 987 | /* 4 players and 2 buttons */ | |
| 988 | static INPUT_PORTS_START( cps2_4p2b ) | |
| 989 | PORT_INCLUDE(cps2_4p3b) | |
| 1068 | 990 | |
| 1069 | PORT_START /* IN1 (0x10) */ | |
| 1070 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 991 | PORT_MODIFY("IN0") | |
| 992 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */ | |
| 993 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */ | |
| 1071 | 994 | |
| 1072 | PORT_START /* IN2 (0x20) */ | |
| 1073 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1074 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1075 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1076 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1077 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1078 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1079 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1080 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1081 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1082 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1083 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1084 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 995 | PORT_MODIFY("IN1") | |
| 996 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */ | |
| 997 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(4) */ | |
| 1085 | 998 | INPUT_PORTS_END |
| 1086 | 999 | |
| 1087 | static INPUT_PORTS_START( batcir ) | |
| 1088 | PORT_START /* IN0 (0x00) */ | |
| 1089 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1090 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1091 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1092 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1093 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1094 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1095 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1096 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1097 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1098 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1099 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1100 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1101 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1102 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1103 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1104 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1000 | /* 3 players and 4 buttons */ | |
| 1001 | static INPUT_PORTS_START( cps2_3p4b ) | |
| 1002 | PORT_INCLUDE(cps2_4p4b) | |
| 1105 | 1003 | |
| 1106 | PORT_START /* IN1 (0x10) */ | |
| 1107 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 1108 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 1109 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 1110 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 1111 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 1112 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 1113 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1114 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1115 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) | |
| 1116 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) | |
| 1117 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) | |
| 1118 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) | |
| 1119 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) | |
| 1120 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) | |
| 1121 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1122 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1004 | PORT_MODIFY("IN1") | |
| 1005 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(4) inputs */ | |
| 1123 | 1006 | |
| 1124 | PORT_START /* IN2 (0x20) */ | |
| 1125 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1126 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1127 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1128 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1129 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1130 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1131 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) | |
| 1132 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 ) | |
| 1133 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1134 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1135 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 1136 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) | |
| 1007 | PORT_MODIFY("IN2") | |
| 1008 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* START4 */ | |
| 1009 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN4 */ | |
| 1137 | 1010 | INPUT_PORTS_END |
| 1138 | 1011 | |
| 1139 | static INPUT_PORTS_START( sgemf ) | |
| 1140 | PORT_START /* IN0 (0x00) */ | |
| 1141 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1142 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1143 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1144 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1145 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1146 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1147 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1148 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1149 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1150 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1151 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1152 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1153 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1154 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1155 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1156 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1012 | /* 3 players and 3 buttons */ | |
| 1013 | static INPUT_PORTS_START( cps2_3p3b ) | |
| 1014 | PORT_INCLUDE(cps2_3p4b) | |
| 1157 | 1015 | |
| 1158 | PORT_START /* IN1 (0x10) */ | |
| 1159 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1160 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1161 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1162 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1163 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1164 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1165 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1166 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1167 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1016 | PORT_MODIFY("IN0") | |
| 1017 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */ | |
| 1018 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */ | |
| 1168 | 1019 | |
| 1169 | PORT_START /* IN2 (0x20) */ | |
| 1170 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1171 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1172 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1173 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1174 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1175 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1176 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1177 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1178 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1179 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1180 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1181 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1020 | PORT_MODIFY("IN1") | |
| 1021 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(3) */ | |
| 1182 | 1022 | INPUT_PORTS_END |
| 1183 | 1023 | |
| 1184 | static INPUT_PORTS_START( cps2 ) | |
| 1185 | PORT_START /* IN0 (0x00) */ | |
| 1186 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1187 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1188 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1189 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1190 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1191 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1192 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1193 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1194 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1195 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1196 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1197 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1198 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1199 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1200 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1201 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1024 | /* 3 players and 2 buttons */ | |
| 1025 | static INPUT_PORTS_START( cps2_3p2b ) | |
| 1026 | PORT_INCLUDE(cps2_3p3b) | |
| 1202 | 1027 | |
| 1203 | PORT_START /* IN1 (0x10) */ | |
| 1028 | PORT_MODIFY("IN0") | |
| 1029 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */ | |
| 1030 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */ | |
| 1031 | ||
| 1032 | PORT_MODIFY("IN1") | |
| 1033 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(3) */ | |
| 1034 | INPUT_PORTS_END | |
| 1035 | ||
| 1036 | /* 2 players and 4 buttons */ | |
| 1037 | static INPUT_PORTS_START( cps2_2p4b ) | |
| 1038 | PORT_INCLUDE(cps2_3p4b) | |
| 1039 | ||
| 1040 | PORT_MODIFY("IN1") | |
| 1041 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(3) inputs */ | |
| 1042 | ||
| 1043 | PORT_MODIFY("IN2") | |
| 1044 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) /* START3 */ | |
| 1045 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN3 */ | |
| 1046 | INPUT_PORTS_END | |
| 1047 | ||
| 1048 | /* 2 players and 3 buttons */ | |
| 1049 | static INPUT_PORTS_START( cps2_2p3b ) | |
| 1050 | PORT_INCLUDE(cps2_2p4b) | |
| 1051 | ||
| 1052 | PORT_MODIFY("IN0") | |
| 1053 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */ | |
| 1054 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(2) */ | |
| 1055 | INPUT_PORTS_END | |
| 1056 | ||
| 1057 | /* 2 players and 2 buttons */ | |
| 1058 | static INPUT_PORTS_START( cps2_2p2b ) | |
| 1059 | PORT_INCLUDE(cps2_2p3b) | |
| 1060 | ||
| 1061 | PORT_MODIFY("IN0") | |
| 1062 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */ | |
| 1063 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(2) */ | |
| 1064 | INPUT_PORTS_END | |
| 1065 | ||
| 1066 | /* 2 players and 1 button */ | |
| 1067 | static INPUT_PORTS_START( cps2_2p1b ) | |
| 1068 | PORT_INCLUDE(cps2_2p2b) | |
| 1069 | ||
| 1070 | PORT_MODIFY("IN0") | |
| 1071 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(1) */ | |
| 1072 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON2 PORT_PLAYER(2) */ | |
| 1073 | INPUT_PORTS_END | |
| 1074 | ||
| 1075 | /* 2 players and 6 buttons (2 rows of 3 buttons) */ | |
| 1076 | static INPUT_PORTS_START( cps2_2p6b ) | |
| 1077 | PORT_INCLUDE(cps2_2p3b) | |
| 1078 | ||
| 1079 | PORT_MODIFY("IN1") | |
| 1204 | 1080 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 1205 | 1081 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 1206 | 1082 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 1207 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1208 | 1083 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 1209 | 1084 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 1210 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1211 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1212 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1213 | 1085 | |
| 1214 | PORT_START /* IN2 (0x20) */ | |
| 1215 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1216 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1217 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1218 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1219 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1220 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1221 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1222 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1223 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1224 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1086 | PORT_MODIFY("IN2") | |
| 1225 | 1087 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 1226 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1227 | 1088 | INPUT_PORTS_END |
| 1228 | 1089 | |
| 1090 | /* 1 player and 4 buttons */ | |
| 1091 | static INPUT_PORTS_START( cps2_1p4b ) | |
| 1092 | PORT_INCLUDE(cps2_2p4b) | |
| 1229 | 1093 | |
| 1230 | static INPUT_PORTS_START( puzloop2 ) | |
| 1231 | PORT_START /* IN0 (0x00) */ | |
| 1232 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 1233 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 1234 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 1235 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 1236 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1237 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1238 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1239 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1240 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1241 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1242 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1243 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1244 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1245 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1246 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1247 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1094 | PORT_MODIFY("IN0") | |
| 1095 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) /* PORT_PLAYER(2) inputs */ | |
| 1248 | 1096 | |
| 1249 | PORT_START /* IN1 (0x10) */ | |
| 1250 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1251 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1252 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1253 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1254 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1255 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1256 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1257 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1258 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1097 | PORT_MODIFY("IN2") | |
| 1098 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) /* START2 */ | |
| 1099 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* COIN2 */ | |
| 1100 | INPUT_PORTS_END | |
| 1259 | 1101 | |
| 1260 | PORT_START /* IN2 (0x20) */ | |
| 1261 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM bit */ | |
| 1262 | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1263 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1264 | PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1265 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1266 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1267 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1268 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1269 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1270 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1271 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1272 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1102 | /* 1 player and 3 buttons */ | |
| 1103 | static INPUT_PORTS_START( cps2_1p3b ) | |
| 1104 | PORT_INCLUDE(cps2_1p4b) | |
| 1273 | 1105 | |
| 1274 | PORT_START /* Paddles */ | |
| 1106 | PORT_MODIFY("IN0") | |
| 1107 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON4 PORT_PLAYER(1) */ | |
| 1108 | INPUT_PORTS_END | |
| 1109 | ||
| 1110 | /* 1 player and 2 buttons */ | |
| 1111 | static INPUT_PORTS_START( cps2_1p2b ) | |
| 1112 | PORT_INCLUDE(cps2_1p3b) | |
| 1113 | ||
| 1114 | PORT_MODIFY("IN0") | |
| 1115 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON3 PORT_PLAYER(1) */ | |
| 1116 | INPUT_PORTS_END | |
| 1117 | ||
| 1118 | ||
| 1119 | /************************************* | |
| 1120 | * | |
| 1121 | * Game-specific port definitions | |
| 1122 | * | |
| 1123 | *************************************/ | |
| 1124 | ||
| 1125 | /* According to the "test mode", buttons layout look like a 2 players 6 buttons machine where buttons have been removed */ | |
| 1126 | static INPUT_PORTS_START( cybots ) | |
| 1127 | PORT_INCLUDE(cps2_2p6b) | |
| 1128 | ||
| 1129 | PORT_MODIFY("IN1") | |
| 1130 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1131 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(1) */ | |
| 1132 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(1) */ | |
| 1133 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1134 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON5 PORT_PLAYER(2) */ | |
| 1135 | ||
| 1136 | PORT_MODIFY("IN2") | |
| 1137 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) /* BUTTON6 PORT_PLAYER(2) */ | |
| 1138 | INPUT_PORTS_END | |
| 1139 | ||
| 1140 | /* 2 players, no joysticks which are replaced with 4 buttons, no other buttons */ | |
| 1141 | static INPUT_PORTS_START( qndream ) | |
| 1142 | PORT_INCLUDE(cps2_2p4b) | |
| 1143 | ||
| 1144 | PORT_MODIFY("IN0") | |
| 1145 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 1146 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 1147 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 1148 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 1149 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1150 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1151 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1152 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1153 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1154 | PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 1155 | INPUT_PORTS_END | |
| 1156 | ||
| 1157 | /* 2 players and 1 button - either 2 8-way joysticks, 2 2-way joysticks, or 2 paddles */ | |
| 1158 | static INPUT_PORTS_START( pzloop2 ) | |
| 1159 | PORT_INCLUDE(cps2_2p1b) | |
| 1160 | ||
| 1161 | PORT_START_TAG("PADDLE1") | |
| 1275 | 1162 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| 1276 | 1163 | |
| 1277 | PORT_START | |
| 1164 | PORT_START_TAG("PADDLE2") | |
| 1278 | 1165 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(2) |
| 1279 | ||
| 1280 | 1166 | INPUT_PORTS_END |
| 1281 | 1167 | |
| 1282 | static READ16_HANDLER( pl2_port_0_word_r ) | |
| 1283 | { | |
| 1284 | if(readpaddle != 0) | |
| 1285 | return readinputport(0); | |
| 1286 | else | |
| 1287 | return readinputport(3) + (readinputport(4) << 8); | |
| 1288 | } | |
| 1168 | /* 1 player and 3 buttons, but 2 coins slots */ | |
| 1169 | static INPUT_PORTS_START( choko ) | |
| 1170 | PORT_INCLUDE(cps2_1p3b) | |
| 1289 | 1171 | |
| 1172 | PORT_MODIFY("IN2") | |
| 1173 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1174 | INPUT_PORTS_END | |
| 1290 | 1175 | |
| 1291 | 1176 | |
| 1177 | /************************************* | |
| 1178 | * | |
| 1179 | * Graphics layouts | |
| 1180 | * | |
| 1181 | *************************************/ | |
| 1182 | ||
| 1292 | 1183 | static const gfx_layout cps1_layout8x8 = |
| 1293 | 1184 | { |
| 1294 | 1185 | 8,8, |
| r1679 | r1680 | |
| 1322 | 1213 | GFXDECODE_END |
| 1323 | 1214 | |
| 1324 | 1215 | |
| 1216 | /************************************* | |
| 1217 | * | |
| 1218 | * M68K encryption interface | |
| 1219 | * | |
| 1220 | *************************************/ | |
| 1325 | 1221 | |
| 1326 | 1222 | static const struct m68k_encryption_interface cps2_encryption = |
| 1327 | 1223 | { |
| 1328 | CPS2_Read8, CPS2_Read16, CPS2_Read32, | |
| 1329 | CPS2_Read16, CPS2_Read32 | |
| 1224 | cps2_read8, cps2_read16, cps2_read32, | |
| 1225 | cps2_read16, cps2_read32 | |
| 1330 | 1226 | }; |
| 1331 | 1227 | |
| 1228 | ||
| 1229 | /************************************* | |
| 1230 | * | |
| 1231 | * Machine driver | |
| 1232 | * | |
| 1233 | *************************************/ | |
| 1234 | ||
| 1332 | 1235 | static MACHINE_DRIVER_START( cps2 ) |
| 1333 | 1236 | |
| 1334 | 1237 | /* basic machine hardware */ |
| r1679 | r1680 | |
| 1368 | 1271 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 1369 | 1272 | MACHINE_DRIVER_END |
| 1370 | 1273 | |
| 1274 | ||
| 1275 | /************************************* | |
| 1276 | * | |
| 1277 | * ROM definitions | |
| 1278 | * | |
| 1279 | *************************************/ | |
| 1280 | ||
| 1371 | 1281 | ROM_START( 1944 ) |
| 1372 | 1282 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 1373 | 1283 | ROM_LOAD16_WORD_SWAP( "nffu.03", 0x000000, 0x80000, CRC(9693cf8f) SHA1(c296cb008e282f77b44374d1c3638a3f4d5d5d4e) ) |
| r1679 | r1680 | |
| 7183 | 7093 | ROM_END |
| 7184 | 7094 | |
| 7185 | 7095 | |
| 7096 | /************************************* | |
| 7097 | * | |
| 7098 | * Games initialisation | |
| 7099 | * | |
| 7100 | *************************************/ | |
| 7186 | 7101 | |
| 7187 | ||
| 7188 | ||
| 7189 | 7102 | static DRIVER_INIT( cps2 ) |
| 7190 | 7103 | { |
| 7191 | 7104 | /* Decrypt the game - see machine/cps2crpt.c */ |
| r1679 | r1680 | |
| 7206 | 7119 | |
| 7207 | 7120 | } |
| 7208 | 7121 | |
| 7209 | static DRIVER_INIT ( p | |
| 7122 | static DRIVER_INIT ( p | |
| 7210 | 7123 | { |
| 7211 | 7124 | DRIVER_INIT_CALL(cps2); |
| 7212 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x804000, 0x804001, 0, 0, | |
| 7125 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x804000, 0x804001, 0, 0, j | |
| 7213 | 7126 | } |
| 7214 | 7127 | |
| 7215 | GAME( 1993, ssf2, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (World 930911)", 0 ) | |
| 7216 | GAME( 1993, ssf2u, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (USA 930911)", 0 ) | |
| 7217 | GAME( 1993, ssf2a, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Asia 931005)", 0 ) | |
| 7218 | GAME( 1993, ssf2ar1, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Asia 930914)", 0 ) | |
| 7219 | GAME( 1993, ssf2j, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 931005)", 0 ) | |
| 7220 | GAME( 1993, ssf2jr1, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 930911)", 0 ) | |
| 7221 | GAME( 1993, ssf2jr2, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 930910)", 0 ) | |
| 7222 | GAME( 1993, ssf2tb, ssf2, cps2, ssf2, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 931119)", 0 ) // works, but not in tournament mode | |
| 7223 | GAME( 1993, ssf2tbr1, ssf2, cps2, ssf2, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 930911)", 0 ) // works, but not in tournament mode | |
| 7224 | GAME( 1993, ssf2tbj, ssf2, cps2, ssf2, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (Japan 930911)", 0 ) // works, but not in tournament mode | |
| 7225 | GAME( 1993, ddtod, 0, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940412)", 0 ) | |
| 7226 | GAME( 1993, ddtodr1, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940113)", 0 ) | |
| 7227 | GAME( 1993, ddtodu, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (USA 940125)", 0 ) | |
| 7228 | GAME( 1993, ddtodur1, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (USA 940113)", 0 ) | |
| 7229 | GAME( 1993, ddtodj, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Japan 940125)", 0 ) | |
| 7230 | GAME( 1993, ddtodjr1, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Japan 940113)", 0 ) | |
| 7231 | GAME( 1993, ddtoda, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Asia 940113)", 0 ) | |
| 7232 | GAME( 1993, ddtodh, ddtod, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Hispanic 940125)", 0 ) | |
| 7233 | GAME( 1993, ecofghtr, 0, cps2, sgemf, cps2, ROT0, "Capcom", "Eco Fighters (World 931203)", 0 ) | |
| 7234 | GAME( 1993, ecofghtu, ecofghtr,cps2, sgemf, cps2, ROT0, "Capcom", "Eco Fighters (USA 940215)", 0 ) | |
| 7235 | GAME( 1993, ecofgtu1, ecofghtr,cps2, sgemf, cps2, ROT0, "Capcom", "Eco Fighters (USA 931203)", 0 ) | |
| 7236 | GAME( 1993, uecology, ecofghtr,cps2, sgemf, cps2, ROT0, "Capcom", "Ultimate Ecology (Japan 931203)", 0 ) | |
| 7237 | GAME( 1993, ecofghta, ecofghtr,cps2, sgemf, cps2, ROT0, "Capcom", "Eco Fighters (Asia 931203)", 0 ) | |
| 7238 | GAME( 1994, ssf2t, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (World 940223)", 0 ) | |
| 7239 | GAME( 1994, ssf2ta, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (Asia 940223)", 0 ) | |
| 7240 | GAME( 1994, ssf2tu, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940323)", 0 ) | |
| 7241 | GAME( 1994, ssf2tur1, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940223)", 0 ) | |
| 7242 | GAME( 1994, ssf2xj, ssf2, cps2, ssf2, cps2, ROT0, "Capcom", "Super Street Fighter II X: Grand Master Challenge (Japan 940223)", 0 ) | |
| 7243 | GAME( 1994, xmcota, 0, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Euro 950105)", 0 ) | |
| 7244 | GAME( 1994, xmcotau, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (USA 950105)", 0 ) | |
| 7245 | GAME( 1994, xmcotah, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Hispanic 950331)", 0 ) | |
| 7246 | GAME( 1994, xmcotaj, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941222)", 0 ) | |
| 7247 | GAME( 1994, xmcotaj1, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941219)", 0 ) | |
| 7248 | GAME( 1994, xmcotaj2, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941217)", 0 ) | |
| 7249 | GAME( 1994, xmcotajr, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941208 rent version)", 0 ) | |
| 7250 | GAME( 1994, xmcotaa, xmcota, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Asia 941217)", 0 ) | |
| 7251 | GAME( 1994, armwar, 0, cps2, avsp, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941024)", 0 ) | |
| 7252 | GAME( 1994, armwarr1, armwar, cps2, avsp, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941011)", 0 ) | |
| 7253 | GAME( 1994, armwaru, armwar, cps2, avsp, cps2, ROT0, "Capcom", "Armored Warriors (USA 941024)", 0 ) | |
| 7254 | GAME( 1994, pgear, armwar, cps2, avsp, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 941024)", 0 ) | |
| 7255 | GAME( 1994, pgearr1, armwar, cps2, avsp, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 940916)", 0 ) | |
| 7256 | GAME( 1994, armwara, armwar, cps2, avsp, cps2, ROT0, "Capcom", "Armored Warriors (Asia 940920)", 0 ) | |
| 7257 | GAME( 1994, avsp, 0, cps2, avsp, cps2, ROT0, "Capcom", "Alien vs. Predator (Euro 940520)", 0 ) | |
| 7258 | GAME( 1994, avspu, avsp, cps2, avsp, cps2, ROT0, "Capcom", "Alien vs. Predator (USA 940520)", 0 ) | |
| 7259 | GAME( 1994, avspj, avsp, cps2, avsp, cps2, ROT0, "Capcom", "Alien vs. Predator (Japan 940520)", 0 ) | |
| 7260 | GAME( 1994, avspa, avsp, cps2, avsp, cps2, ROT0, "Capcom", "Alien vs. Predator (Asia 940520)", 0 ) | |
| 7261 | GAME( 1994, avsph, avsp, cps2, avsp, cps2, ROT0, "Capcom", "Alien vs. Predator (Hispanic 940520)", 0 ) | |
| 7262 | GAME( 1994, dstlk, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (Euro 940705)", 0 ) | |
| 7263 | GAME( 1994, dstlku, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (USA 940818)", 0 ) | |
| 7264 | GAME( 1994, dstlkur1, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (USA 940705)", 0 ) | |
| 7265 | GAME( 1994, dstlka, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (Asia 940705)", 0 ) | |
| 7266 | GAME( 1994, vampj, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940705)", 0 ) // one of these two must be a bad dump | |
| 7267 | GAME( 1994, vampja, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940705 alt)", 0 ) | |
| 7268 | GAME( 1994, vampjr1, dstlk, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940630)", 0 ) | |
| 7269 | GAME( 1994, ringdest, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Ring of Destruction: Slammasters II (Euro 940902)", 0 ) | |
| 7270 | GAME( 1994, smbomb, ringdest,cps2, ssf2, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940831)", 0 ) | |
| 7271 | GAME( 1994, smbombr1, ringdest,cps2, ssf2, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940808)", 0 ) | |
| 7272 | GAME( 1995, cybots, 0, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Euro 950424)", 0 ) | |
| 7273 | GAME( 1995, cybotsu, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (USA 950424)", 0 ) | |
| 7274 | GAME( 1995, cybotsj, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Japan 950420)", 0 ) | |
| 7275 | GAME( 1995, msh, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Euro 951024)", 0 ) | |
| 7276 | GAME( 1995, mshu, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (USA 951024)", 0 ) | |
| 7277 | GAME( 1995, mshj, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951117)", 0 ) | |
| 7278 | GAME( 1995, mshjr1, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951024)", 0 ) | |
| 7279 | GAME( 1995, msha, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Asia 951024)", 0 ) | |
| 7280 | GAME( 1995, mshh, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Hispanic 951117)", 0 ) | |
| 7281 | GAME( 1995, mshb, msh, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes (Brazil 951117)", 0 ) | |
| 7282 | GAME( 1995, nwarr, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Euro 950316)", 0 ) | |
| 7283 | GAME( 1995, nwarru, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (USA 950406)", 0 ) | |
| 7284 | GAME( 1995, nwarrh, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Hispanic 950403)", 0 ) | |
| 7285 | GAME( 1995, nwarrb, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Brazil 950403)", 0 ) | |
| 7286 | GAME( 1995, vhuntj, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950316)", 0 ) | |
| 7287 | GAME( 1995, vhuntjr1, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950307)", 0 ) | |
| 7288 | GAME( 1995, vhuntjr2, nwarr, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950302)", 0 ) | |
| 7289 | GAME( 1995, sfa, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950727)", 0 ) | |
| 7290 | GAME( 1995, sfar1, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950718)", 0 ) | |
| 7291 | GAME( 1995, sfar2, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950627)", 0 ) | |
| 7292 | GAME( 1995, sfar3, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950605)", 0 ) | |
| 7293 | GAME( 1995, sfau, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (USA 950627)", 0 ) | |
| 7294 | GAME( 1995, sfza, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Asia 950627)", 0 ) | |
| 7295 | GAME( 1995, sfzj, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950727)", 0 ) | |
| 7296 | GAME( 1995, sfzjr1, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950627)", 0 ) | |
| 7297 | GAME( 1995, sfzjr2, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950605)", 0 ) | |
| 7298 | GAME( 1995, sfzh, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Hispanic 950627)", 0 ) | |
| 7299 | GAME( 1995, sfzb, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Brazil 951109)", 0 ) | |
| 7300 | GAME( 1995, sfzbr1, sfa, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero (Brazil 950727)", 0 ) | |
| 7301 | GAME( 1995, mmancp2u, megaman, cps2, sgemf, cps2, ROT0, "Capcom", "Mega Man - The Power Battle (CPS2, USA 951006, SAMPLE Version)", 0 ) | |
| 7302 | GAME( 1995, rmancp2j, megaman, cps2, sgemf, cps2, ROT0, "Capcom", "Rockman: The Power Battle (CPS2, Japan 950922)", 0 ) | |
| 7303 | GAME( 1996, 19xx, 0, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (USA 951207)", 0 ) | |
| 7304 | GAME( 1996, 19xxa, 19xx, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Asia 951207)", 0 ) | |
| 7305 | GAME( 1996, 19xxj, 19xx, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Japan 951225)", 0 ) | |
| 7306 | GAME( 1996, 19xxjr1, 19xx, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Japan 951207)", 0 ) | |
| 7307 | GAME( 1996, 19xxh, 19xx, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Hispanic 951218)", 0 ) | |
| 7308 | GAME( 1996, 19xxb, 19xx, cps2, 19xx, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Brazil 951218)", 0 ) | |
| 7309 | GAME( 1996, ddsom, 0, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960619)", 0 ) | |
| 7310 | GAME( 1996, ddsomr1, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960223)", 0 ) | |
| 7311 | GAME( 1996, ddsomr2, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960209)", 0 ) | |
| 7312 | GAME( 1996, ddsomr3, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960208)", 0 ) | |
| 7313 | GAME( 1996, ddsomu, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (USA 960619)", 0 ) | |
| 7314 | GAME( 1996, ddsomur1, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (USA 960209)", 0 ) | |
| 7315 | GAME( 1996, ddsomj, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960619)", 0 ) | |
| 7316 | GAME( 1996, ddsomjr1, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960206)", 0 ) | |
| 7317 | GAME( 1996, ddsoma, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Asia 960619)", 0 ) | |
| 7318 | GAME( 1996, ddsomb, ddsom, cps2, ddtod, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Brazil 960223)", 0 ) | |
| 7319 | GAME( 1996, megaman2, 0, cps2, sgemf, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (USA 960708)", 0 ) | |
| 7320 | GAME( 1996, megamn2a, megaman2,cps2, sgemf, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (Asia 960708)", 0 ) | |
| 7321 | GAME( 1996, rckman2j, megaman2,cps2, sgemf, cps2, ROT0, "Capcom", "Rockman 2: The Power Fighters (Japan 960708)", 0 ) | |
| 7322 | GAME( 1996, qndream, 0, cps2, qndream, cps2, ROT0, "Capcom", "Quiz Nanairo Dreams: Nijiirochou no Kiseki (Japan 960826)", 0 ) | |
| 7323 | GAME( 1996, sfa2, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha 2 (USA 960306)", 0 ) | |
| 7324 | GAME( 1996, sfz2j, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Japan 960227)", 0 ) | |
| 7325 | GAME( 1996, sfz2a, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Asia 960227)", 0 ) | |
| 7326 | GAME( 1996, sfz2b, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Brazil 960531)", 0 ) | |
| 7327 | GAME( 1996, sfz2br1, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Brazil 960304)", 0 ) | |
| 7328 | GAME( 1996, sfz2h, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Hispanic 960304)", 0 ) | |
| 7329 | GAME( 1996, sfz2n, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Oceania 960229)", 0 ) | |
| 7330 | GAME( 1996, sfz2aj, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Japan 960805)", 0 ) | |
| 7331 | GAME( 1996, sfz2ah, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Hispanic 960813)", 0 ) | |
| 7332 | GAME( 1996, sfz2ab, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Brazil 960813)", 0 ) | |
| 7333 | GAME( 1996, sfz2aa, sfa2, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Asia 960826)", 0 ) | |
| 7334 | GAME( 1996, spf2t, 0, cps2, 19xx, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (USA 960620)", 0 ) | |
| 7335 | GAME( 1996, spf2xj, spf2t, cps2, 19xx, cps2, ROT0, "Capcom", "Super Puzzle Fighter II X (Japan 960531)", 0 ) | |
| 7336 | GAME( 1996, spf2ta, spf2t, cps2, 19xx, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (Asia 960529)", 0 ) | |
| 7337 | GAME( 1996, xmvsf, 0, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 961004)", 0 ) | |
| 7338 | GAME( 1996, xmvsfr1, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 960910)", 0 ) | |
| 7339 | GAME( 1996, xmvsfu, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (USA 961023)", 0 ) | |
| 7340 | GAME( 1996, xmvsfur1, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (USA 961004)", 0 ) | |
| 7341 | GAME( 1996, xmvsfj, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 961004)", 0 ) | |
| 7342 | GAME( 1996, xmvsfjr1, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 960910)", 0 ) | |
| 7343 | GAME( 1996, xmvsfjr2, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 960909)", 0 ) | |
| 7344 | GAME( 1996, xmvsfa, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Asia 961023)", 0 ) | |
| 7345 | GAME( 1996, xmvsfar1, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Asia 960919)", 0 ) | |
| 7346 | GAME( 1996, xmvsfh, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Hispanic 961004)", 0 ) | |
| 7347 | GAME( 1996, xmvsfb, xmvsf, cps2, ssf2, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Brazil 961023)", 0 ) | |
| 7348 | GAME( 1997, batcir, 0, cps2, batcir, cps2, ROT0, "Capcom", "Battle Circuit (Euro 970319)", 0 ) | |
| 7349 | GAME( 1997, batcira, batcir, cps2, batcir, cps2, ROT0, "Capcom", "Battle Circuit (Asia 970319)", 0 ) | |
| 7350 | GAME( 1997, batcirj, batcir, cps2, batcir, cps2, ROT0, "Capcom", "Battle Circuit (Japan 970319)", 0 ) | |
| 7351 | GAME( 1997, csclub, 0, cps2, sgemf, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7352 | GAME( 1997, cscluba, csclub, cps2, sgemf, cps2, ROT0, "Capcom", "Capcom Sports Club (Asia 970722)", 0 ) | |
| 7353 | GAME( 1997, csclubj, csclub, cps2, sgemf, cps2, ROT0, "Capcom", "Capcom Sports Club (Japan 970722)", 0 ) | |
| 7354 | GAME( 1997, csclubh, csclub, cps2, sgemf, cps2, ROT0, "Capcom", "Capcom Sports Club (Hispanic 970722)", 0 ) | |
| 7355 | GAME( 1997, mshvsf, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Euro 970625)", 0 ) | |
| 7356 | GAME( 1997, mshvsfu, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970827)", 0 ) | |
| 7357 | GAME( 1997, mshvsfu1, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970625)", 0 ) | |
| 7358 | GAME( 1997, mshvsfj, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970707)", 0 ) | |
| 7359 | GAME( 1997, mshvsfj1, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970702)", 0 ) | |
| 7360 | GAME( 1997, mshvsfj2, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970625)", 0 ) | |
| 7361 | GAME( 1997, mshvsfh, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Hispanic 970625)", 0 ) | |
| 7362 | GAME( 1997, mshvsfa, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970625)", 0 ) | |
| 7363 | GAME( 1997, mshvsfa1, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970620)", 0 ) | |
| 7364 | GAME( 1997, mshvsfb, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970827)", 0 ) | |
| 7365 | GAME( 1997, mshvsfb1, mshvsf, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970625)", 0 ) | |
| 7366 | GAME( 1997, sgemf, 0, cps2, sgemf, cps2, ROT0, "Capcom", "Super Gem Fighter Mini Mix (USA 970904)", 0 ) | |
| 7367 | GAME( 1997, pfghtj, sgemf, cps2, sgemf, cps2, ROT0, "Capcom", "Pocket Fighter (Japan 970904)", 0 ) | |
| 7368 | GAME( 1997, sgemfa, sgemf, cps2, sgemf, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Asia 970904)", 0 ) | |
| 7369 | GAME( 1997, sgemfh, sgemf, cps2, sgemf, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Hispanic 970904)", 0 ) | |
| 7370 | GAME( 1997, vhunt2, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970929)", 0 ) | |
| 7371 | GAME( 1997, vhunt2r1, vhunt2, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970913)", 0 ) | |
| 7372 | GAME( 1997, vsav, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Euro 970519)", 0 ) | |
| 7373 | GAME( 1997, vsavu, vsav, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (USA 970519)", 0 ) | |
| 7374 | GAME( 1997, vsavj, vsav, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Japan 970519)", 0 ) | |
| 7375 | GAME( 1997, vsava, vsav, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Asia 970519)", 0 ) | |
| 7376 | GAME( 1997, vsavh, vsav, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Hispanic 970519)", 0 ) | |
| 7377 | GAME( 1997, vsav2, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Vampire Savior 2: The Lord of Vampire (Japan 970913)", 0 ) | |
| 7378 | GAME( 1998, mvsc, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Euro 980112)", 0 ) | |
| 7379 | GAME( 1998, mvscu, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (USA 980123)", 0 ) | |
| 7380 | GAME( 1998, mvscj, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Japan 980123)", 0 ) | |
| 7381 | GAME( 1998, mvscjr1, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Japan 980112)", 0 ) | |
| 7382 | GAME( 1998, mvsca, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Asia 980123)", 0 ) | |
| 7383 | GAME( 1998, mvscar1, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Asia 980112)", 0 ) | |
| 7384 | GAME( 1998, mvsch, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Hispanic 980123)", 0 ) | |
| 7385 | GAME( 1998, mvscb, mvsc, cps2, ssf2, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Brazil 980123)", 0 ) | |
| 7386 | GAME( 1998, sfa3, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (Euro 980904)", 0 ) | |
| 7387 | GAME( 1998, sfa3u, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (USA 980904)", 0 ) | |
| 7388 | GAME( 1998, sfa3ur1, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (USA 980629)", 0 ) | |
| 7389 | GAME( 1998, sfa3b, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (Brazil 980629)", 0 ) | |
| 7390 | GAME( 1998, sfz3j, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980904)", 0 ) | |
| 7391 | GAME( 1998, sfz3jr1, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980727)", 0 ) | |
| 7392 | GAME( 1998, sfz3jr2, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980629)", 0 ) | |
| 7393 | GAME( 1998, sfz3a, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Asia 980904)", 0 ) | |
| 7394 | GAME( 1998, sfz3ar1, sfa3, cps2, ssf2, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Asia 980701)", 0 ) | |
| 7395 | GAME( 1999, jyangoku, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Jyangokushi: Haoh no Saihai (Japan 990527)", 0 ) | |
| 7396 | GAME( 2004, hsf2, 0, cps2, ssf2, cps2, ROT0, "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Asia 040202)", 0 ) | |
| 7397 | GAME( 2004, hsf2j, hsf2, cps2, ssf2, cps2, ROT0, "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Japan 031222)", 0 ) | |
| 7398 | 7128 | |
| 7129 | /************************************* | |
| 7130 | * | |
| 7131 | * Game drivers | |
| 7132 | * | |
| 7133 | *************************************/ | |
| 7134 | ||
| 7135 | GAME( 1993, ssf2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (World 930911)", 0 ) | |
| 7136 | GAME( 1993, ssf2u, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (USA 930911)", 0 ) | |
| 7137 | GAME( 1993, ssf2a, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Asia 931005)", 0 ) | |
| 7138 | GAME( 1993, ssf2ar1, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Asia 930914)", 0 ) | |
| 7139 | GAME( 1993, ssf2j, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 931005)", 0 ) | |
| 7140 | GAME( 1993, ssf2jr1, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 930911)", 0 ) | |
| 7141 | GAME( 1993, ssf2jr2, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II: The New Challengers (Japan 930910)", 0 ) | |
| 7142 | GAME( 1993, ssf2tb, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 931119)", 0 ) // works, but not in tournament mode | |
| 7143 | GAME( 1993, ssf2tbr1, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 930911)", 0 ) // works, but not in tournament mode | |
| 7144 | GAME( 1993, ssf2tbj, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (Japan 930911)", 0 ) // works, but not in tournament mode | |
| 7145 | GAME( 1993, ddtod, 0, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940412)", 0 ) | |
| 7146 | GAME( 1993, ddtodr1, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940113)", 0 ) | |
| 7147 | GAME( 1993, ddtodu, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (USA 940125)", 0 ) | |
| 7148 | GAME( 1993, ddtodur1, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (USA 940113)", 0 ) | |
| 7149 | GAME( 1993, ddtodj, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Japan 940125)", 0 ) | |
| 7150 | GAME( 1993, ddtodjr1, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Japan 940113)", 0 ) | |
| 7151 | GAME( 1993, ddtoda, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Asia 940113)", 0 ) | |
| 7152 | GAME( 1993, ddtodh, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Hispanic 940125)", 0 ) | |
| 7153 | GAME( 1993, ecofghtr, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (World 931203)", 0 ) | |
| 7154 | GAME( 1993, ecofghtu, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 940215)", 0 ) | |
| 7155 | GAME( 1993, ecofgtu1, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 931203)", 0 ) | |
| 7156 | GAME( 1993, uecology, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Ultimate Ecology (Japan 931203)", 0 ) | |
| 7157 | GAME( 1993, ecofghta, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (Asia 931203)", 0 ) | |
| 7158 | GAME( 1994, ssf2t, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (World 940223)", 0 ) | |
| 7159 | GAME( 1994, ssf2ta, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (Asia 940223)", 0 ) | |
| 7160 | GAME( 1994, ssf2tu, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940323)", 0 ) | |
| 7161 | GAME( 1994, ssf2tur1, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940223)", 0 ) | |
| 7162 | GAME( 1994, ssf2xj, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II X: Grand Master Challenge (Japan 940223)", 0 ) | |
| 7163 | GAME( 1994, xmcota, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Euro 950105)", 0 ) | |
| 7164 | GAME( 1994, xmcotau, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (USA 950105)", 0 ) | |
| 7165 | GAME( 1994, xmcotah, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Hispanic 950331)", 0 ) | |
| 7166 | GAME( 1994, xmcotaj, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941222)", 0 ) | |
| 7167 | GAME( 1994, xmcotaj1, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941219)", 0 ) | |
| 7168 | GAME( 1994, xmcotaj2, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941217)", 0 ) | |
| 7169 | GAME( 1994, xmcotajr, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941208 rent version)", 0 ) | |
| 7170 | GAME( 1994, xmcotaa, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Asia 941217)", 0 ) | |
| 7171 | GAME( 1994, armwar, 0, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941024)", 0 ) | |
| 7172 | GAME( 1994, armwarr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941011)", 0 ) | |
| 7173 | GAME( 1994, armwaru, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (USA 941024)", 0 ) | |
| 7174 | GAME( 1994, pgear, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 941024)", 0 ) | |
| 7175 | GAME( 1994, pgearr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 940916)", 0 ) | |
| 7176 | GAME( 1994, armwara, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Asia 940920)", 0 ) | |
| 7177 | GAME( 1994, avsp, 0, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Euro 940520)", 0 ) | |
| 7178 | GAME( 1994, avspu, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (USA 940520)", 0 ) | |
| 7179 | GAME( 1994, avspj, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Japan 940520)", 0 ) | |
| 7180 | GAME( 1994, avspa, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Asia 940520)", 0 ) | |
| 7181 | GAME( 1994, avsph, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Hispanic 940520)", 0 ) | |
| 7182 | GAME( 1994, dstlk, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (Euro 940705)", 0 ) | |
| 7183 | GAME( 1994, dstlku, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (USA 940818)", 0 ) | |
| 7184 | GAME( 1994, dstlkur1, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (USA 940705)", 0 ) | |
| 7185 | GAME( 1994, dstlka, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Darkstalkers: The Night Warriors (Asia 940705)", 0 ) | |
| 7186 | GAME( 1994, vampj, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940705)", 0 ) // one of these two must be a bad dump | |
| 7187 | GAME( 1994, vampja, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940705 alt)", 0 ) | |
| 7188 | GAME( 1994, vampjr1, dstlk, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire: The Night Warriors (Japan 940630)", 0 ) | |
| 7189 | GAME( 1994, ringdest, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Ring of Destruction: Slammasters II (Euro 940902)", 0 ) | |
| 7190 | GAME( 1994, smbomb, ringdest, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940831)", 0 ) | |
| 7191 | GAME( 1994, smbombr1, ringdest, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940808)", 0 ) | |
| 7192 | GAME( 1995, cybots, 0, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Euro 950424)", 0 ) | |
| 7193 | GAME( 1995, cybotsu, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (USA 950424)", 0 ) | |
| 7194 | GAME( 1995, cybotsj, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Japan 950420)", 0 ) | |
| 7195 | GAME( 1995, msh, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Euro 951024)", 0 ) | |
| 7196 | GAME( 1995, mshu, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (USA 951024)", 0 ) | |
| 7197 | GAME( 1995, mshj, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951117)", 0 ) | |
| 7198 | GAME( 1995, mshjr1, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951024)", 0 ) | |
| 7199 | GAME( 1995, msha, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Asia 951024)", 0 ) | |
| 7200 | GAME( 1995, mshh, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Hispanic 951117)", 0 ) | |
| 7201 | GAME( 1995, mshb, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Brazil 951117)", 0 ) | |
| 7202 | GAME( 1995, nwarr, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Euro 950316)", 0 ) | |
| 7203 | GAME( 1995, nwarru, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (USA 950406)", 0 ) | |
| 7204 | GAME( 1995, nwarrh, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Hispanic 950403)", 0 ) | |
| 7205 | GAME( 1995, nwarrb, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Brazil 950403)", 0 ) | |
| 7206 | GAME( 1995, vhuntj, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950316)", 0 ) | |
| 7207 | GAME( 1995, vhuntjr1, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950307)", 0 ) | |
| 7208 | GAME( 1995, vhuntjr2, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950302)", 0 ) | |
| 7209 | GAME( 1995, sfa, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950727)", 0 ) | |
| 7210 | GAME( 1995, sfar1, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950718)", 0 ) | |
| 7211 | GAME( 1995, sfar2, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950627)", 0 ) | |
| 7212 | GAME( 1995, sfar3, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950605)", 0 ) | |
| 7213 | GAME( 1995, sfau, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (USA 950627)", 0 ) | |
| 7214 | GAME( 1995, sfza, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Asia 950627)", 0 ) | |
| 7215 | GAME( 1995, sfzj, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950727)", 0 ) | |
| 7216 | GAME( 1995, sfzjr1, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950627)", 0 ) | |
| 7217 | GAME( 1995, sfzjr2, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Japan 950605)", 0 ) | |
| 7218 | GAME( 1995, sfzh, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Hispanic 950627)", 0 ) | |
| 7219 | GAME( 1995, sfzb, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Brazil 951109)", 0 ) | |
| 7220 | GAME( 1995, sfzbr1, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Brazil 950727)", 0 ) | |
| 7221 | GAME( 1995, mmancp2u, megaman, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man - The Power Battle (CPS2, USA 951006, SAMPLE Version)", 0 ) | |
| 7222 | GAME( 1995, rmancp2j, megaman, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Rockman: The Power Battle (CPS2, Japan 950922)", 0 ) | |
| 7223 | GAME( 1996, 19xx, 0, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (USA 951207)", 0 ) | |
| 7224 | GAME( 1996, 19xxa, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Asia 951207)", 0 ) | |
| 7225 | GAME( 1996, 19xxj, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Japan 951225)", 0 ) | |
| 7226 | GAME( 1996, 19xxjr1, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Japan 951207)", 0 ) | |
| 7227 | GAME( 1996, 19xxh, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Hispanic 951218)", 0 ) | |
| 7228 | GAME( 1996, 19xxb, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Brazil 951218)", 0 ) | |
| 7229 | GAME( 1996, ddsom, 0, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960619)", 0 ) | |
| 7230 | GAME( 1996, ddsomr1, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960223)", 0 ) | |
| 7231 | GAME( 1996, ddsomr2, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960209)", 0 ) | |
| 7232 | GAME( 1996, ddsomr3, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Euro 960208)", 0 ) | |
| 7233 | GAME( 1996, ddsomu, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (USA 960619)", 0 ) | |
| 7234 | GAME( 1996, ddsomur1, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (USA 960209)", 0 ) | |
| 7235 | GAME( 1996, ddsomj, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960619)", 0 ) | |
| 7236 | GAME( 1996, ddsomjr1, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960206)", 0 ) | |
| 7237 | GAME( 1996, ddsoma, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Asia 960619)", 0 ) | |
| 7238 | GAME( 1996, ddsomb, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Brazil 960223)", 0 ) | |
| 7239 | GAME( 1996, megaman2, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (USA 960708)", 0 ) | |
| 7240 | GAME( 1996, megamn2a, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (Asia 960708)", 0 ) | |
| 7241 | GAME( 1996, rckman2j, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Rockman 2: The Power Fighters (Japan 960708)", 0 ) | |
| 7242 | GAME( 1996, qndream, 0, cps2, qndream, cps2, ROT0, "Capcom", "Quiz Nanairo Dreams: Nijiirochou no Kiseki (Japan 960826)", 0 ) | |
| 7243 | GAME( 1996, sfa2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 2 (USA 960306)", 0 ) | |
| 7244 | GAME( 1996, sfz2j, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Japan 960227)", 0 ) | |
| 7245 | GAME( 1996, sfz2a, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Asia 960227)", 0 ) | |
| 7246 | GAME( 1996, sfz2b, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Brazil 960531)", 0 ) | |
| 7247 | GAME( 1996, sfz2br1, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Brazil 960304)", 0 ) | |
| 7248 | GAME( 1996, sfz2h, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Hispanic 960304)", 0 ) | |
| 7249 | GAME( 1996, sfz2n, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Oceania 960229)", 0 ) | |
| 7250 | GAME( 1996, sfz2aj, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Japan 960805)", 0 ) | |
| 7251 | GAME( 1996, sfz2ah, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Hispanic 960813)", 0 ) | |
| 7252 | GAME( 1996, sfz2ab, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Brazil 960813)", 0 ) | |
| 7253 | GAME( 1996, sfz2aa, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 Alpha (Asia 960826)", 0 ) | |
| 7254 | GAME( 1996, spf2t, 0, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (USA 960620)", 0 ) | |
| 7255 | GAME( 1996, spf2xj, spf2t, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II X (Japan 960531)", 0 ) | |
| 7256 | GAME( 1996, spf2ta, spf2t, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (Asia 960529)", 0 ) | |
| 7257 | GAME( 1996, xmvsf, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 961004)", 0 ) | |
| 7258 | GAME( 1996, xmvsfr1, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 960910)", 0 ) | |
| 7259 | GAME( 1996, xmvsfu, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (USA 961023)", 0 ) | |
| 7260 | GAME( 1996, xmvsfur1, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (USA 961004)", 0 ) | |
| 7261 | GAME( 1996, xmvsfj, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 961004)", 0 ) | |
| 7262 | GAME( 1996, xmvsfjr1, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 960910)", 0 ) | |
| 7263 | GAME( 1996, xmvsfjr2, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Japan 960909)", 0 ) | |
| 7264 | GAME( 1996, xmvsfa, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Asia 961023)", 0 ) | |
| 7265 | GAME( 1996, xmvsfar1, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Asia 960919)", 0 ) | |
| 7266 | GAME( 1996, xmvsfh, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Hispanic 961004)", 0 ) | |
| 7267 | GAME( 1996, xmvsfb, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Brazil 961023)", 0 ) | |
| 7268 | GAME( 1997, batcir, 0, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Euro 970319)", 0 ) | |
| 7269 | GAME( 1997, batcira, batcir, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Asia 970319)", 0 ) | |
| 7270 | GAME( 1997, batcirj, batcir, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Japan 970319)", 0 ) | |
| 7271 | GAME( 1997, csclub, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7272 | GAME( 1997, cscluba, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Asia 970722)", 0 ) | |
| 7273 | GAME( 1997, csclubj, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Japan 970722)", 0 ) | |
| 7274 | GAME( 1997, csclubh, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Hispanic 970722)", 0 ) | |
| 7275 | GAME( 1997, mshvsf, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Euro 970625)", 0 ) | |
| 7276 | GAME( 1997, mshvsfu, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970827)", 0 ) | |
| 7277 | GAME( 1997, mshvsfu1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970625)", 0 ) | |
| 7278 | GAME( 1997, mshvsfj, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970707)", 0 ) | |
| 7279 | GAME( 1997, mshvsfj1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970702)", 0 ) | |
| 7280 | GAME( 1997, mshvsfj2, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Japan 970625)", 0 ) | |
| 7281 | GAME( 1997, mshvsfh, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Hispanic 970625)", 0 ) | |
| 7282 | GAME( 1997, mshvsfa, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970625)", 0 ) | |
| 7283 | GAME( 1997, mshvsfa1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970620)", 0 ) | |
| 7284 | GAME( 1997, mshvsfb, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970827)", 0 ) | |
| 7285 | GAME( 1997, mshvsfb1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970625)", 0 ) | |
| 7286 | GAME( 1997, sgemf, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter Mini Mix (USA 970904)", 0 ) | |
| 7287 | GAME( 1997, pfghtj, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Pocket Fighter (Japan 970904)", 0 ) | |
| 7288 | GAME( 1997, sgemfa, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Asia 970904)", 0 ) | |
| 7289 | GAME( 1997, sgemfh, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Hispanic 970904)", 0 ) | |
| 7290 | GAME( 1997, vhunt2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970929)", 0 ) | |
| 7291 | GAME( 1997, vhunt2r1, vhunt2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970913)", 0 ) | |
| 7292 | GAME( 1997, vsav, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Euro 970519)", 0 ) | |
| 7293 | GAME( 1997, vsavu, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (USA 970519)", 0 ) | |
| 7294 | GAME( 1997, vsavj, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Japan 970519)", 0 ) | |
| 7295 | GAME( 1997, vsava, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Asia 970519)", 0 ) | |
| 7296 | GAME( 1997, vsavh, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Hispanic 970519)", 0 ) | |
| 7297 | GAME( 1997, vsav2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior 2: The Lord of Vampire (Japan 970913)", 0 ) | |
| 7298 | GAME( 1998, mvsc, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Euro 980112)", 0 ) | |
| 7299 | GAME( 1998, mvscu, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (USA 980123)", 0 ) | |
| 7300 | GAME( 1998, mvscj, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Japan 980123)", 0 ) | |
| 7301 | GAME( 1998, mvscjr1, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Japan 980112)", 0 ) | |
| 7302 | GAME( 1998, mvsca, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Asia 980123)", 0 ) | |
| 7303 | GAME( 1998, mvscar1, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Asia 980112)", 0 ) | |
| 7304 | GAME( 1998, mvsch, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Hispanic 980123)", 0 ) | |
| 7305 | GAME( 1998, mvscb, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Brazil 980123)", 0 ) | |
| 7306 | GAME( 1998, sfa3, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (Euro 980904)", 0 ) | |
| 7307 | GAME( 1998, sfa3u, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (USA 980904)", 0 ) | |
| 7308 | GAME( 1998, sfa3ur1, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (USA 980629)", 0 ) | |
| 7309 | GAME( 1998, sfa3b, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 3 (Brazil 980629)", 0 ) | |
| 7310 | GAME( 1998, sfz3j, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980904)", 0 ) | |
| 7311 | GAME( 1998, sfz3jr1, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980727)", 0 ) | |
| 7312 | GAME( 1998, sfz3jr2, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Japan 980629)", 0 ) | |
| 7313 | GAME( 1998, sfz3a, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Asia 980904)", 0 ) | |
| 7314 | GAME( 1998, sfz3ar1, sfa3, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 3 (Asia 980701)", 0 ) | |
| 7315 | GAME( 1999, jyangoku, 0, cps2, cps2_1p2b, cps2, ROT0, "Capcom", "Jyangokushi: Haoh no Saihai (Japan 990527)", 0 ) | |
| 7316 | GAME( 2004, hsf2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Asia 040202)", 0 ) | |
| 7317 | GAME( 2004, hsf2j, hsf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Japan 031222)", 0 ) | |
| 7318 | ||
| 7399 | 7319 | /* Games released on CPS-2 hardware by Takumi */ |
| 7400 | 7320 | |
| 7401 | GAME( 1999, gigawing, 0, cps2, 19xx, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (USA 990222)", 0 ) | |
| 7402 | GAME( 1999, gwingj, gigawing,cps2, 19xx, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (Japan 990223)", 0 ) | |
| 7403 | GAME( 1999, gwinga, gigawing,cps2, 19xx, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (Asia 990222)", 0 ) | |
| 7404 | GAME( 2000, mmatrix, 0, cps2, 19xx, cps2, ROT0, "Capcom, supported by Takumi", "Mars Matrix: Hyper Solid Shooting (USA 000412)", 0 ) | |
| 7405 | GAME( 2000, mmatrixj, mmatrix, cps2, 19xx, cps2, ROT0, "Capcom, supported by Takumi", "Mars Matrix: Hyper Solid Shooting (Japan 000412)", 0 ) | |
| 7321 | GAME( 1999, gigawing, 0, cps2, cps2_2p2b, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (USA 990222)", 0 ) | |
| 7322 | GAME( 1999, gwingj, gigawing, cps2, cps2_2p2b, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (Japan 990223)", 0 ) | |
| 7323 | GAME( 1999, gwinga, gigawing, cps2, cps2_2p2b, cps2, ROT0, "Capcom, supported by Takumi", "Giga Wing (Asia 990222)", 0 ) | |
| 7324 | GAME( 2000, mmatrix, 0, cps2, cps2_2p1b, cps2, ROT0, "Capcom, supported by Takumi", "Mars Matrix: Hyper Solid Shooting (USA 000412)", 0 ) | |
| 7325 | GAME( 2000, mmatrixj, mmatrix, cps2, cps2_2p1b, cps2, ROT0, "Capcom, supported by Takumi", "Mars Matrix: Hyper Solid Shooting (Japan 000412)", 0 ) | |
| 7406 | 7326 | |
| 7407 | 7327 | /* Games released on CPS-2 hardware by Mitchell */ |
| 7408 | 7328 | |
| 7409 | GAME( 2000, mpang, 0, cps2, ssf2, cps2, ROT0, "Mitchell, distributed by Capcom", "Mighty! Pang (USA 001010)", 0 ) | |
| 7410 | GAME( 2000, mpangj, mpang, cps2, ssf2, cps2, ROT0, "Mitchell, distributed by Capcom", "Mighty! Pang (Japan 001011)", 0 ) | |
| 7411 | GAME( 2001, pzloop2, 0, cps2, puzloop2,puzloop2,ROT0,"Mitchell, distributed by Capcom", "Puzz Loop 2 (Euro 010302)", 0 ) | |
| 7412 | GAME( 2001, pzloop2j, pzloop2, cps2, puzloop2,puzloop2,ROT0,"Mitchell, distributed by Capcom", "Puzz Loop 2 (Japan 010205)", 0 ) | |
| 7413 | GAME( 2001, choko, 0, cps2, cps2, cps2, ROT0, "Mitchell, distributed by Capcom", "Choko (Japan 010820)", 0 ) | |
| 7329 | GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2, ROT0, "Mitchell, distributed by Capcom", "Mighty! Pang (USA 001010)", 0 ) | |
| 7330 | GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2, ROT0, "Mitchell, distributed by Capcom", "Mighty! Pang (Japan 001011)", 0 ) | |
| 7331 | GAME( 2001, pzloop2, 0, cps2, pzloop2, pzloop2, ROT0, "Mitchell, distributed by Capcom", "Puzz Loop 2 (Euro 010302)", 0 ) | |
| 7332 | GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, pzloop2, ROT0, "Mitchell, distributed by Capcom", "Puzz Loop 2 (Japan 010205)", 0 ) | |
| 7333 | GAME( 2001, choko, 0, cps2, choko, cps2, ROT0, "Mitchell, distributed by Capcom", "Choko (Japan 010820)", 0 ) | |
| 7414 | 7334 | |
| 7415 | 7335 | /* Games released on CPS-2 hardware by Eighting/Raizing */ |
| 7416 | 7336 | |
| 7417 | GAME( 2000, dimahoo, 0, cps2, sgemf, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Dimahoo (Euro 000121)", 0 ) | |
| 7418 | GAME( 2000, dimahoou, dimahoo, cps2, sgemf, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Dimahoo (USA 000121)", 0 ) | |
| 7419 | GAME( 2000, gmahou, dimahoo, cps2, sgemf, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Great Mahou Daisakusen (Japan 000121)", 0 ) | |
| 7420 | GAME( 2000, 1944, 0, cps2, 19xx, cps2, ROT0, "Capcom, supported by Eighting/Raizing", "1944: The Loop Master (USA 000620)", 0 ) | |
| 7421 | GAME( 2000, 1944j, 1944, cps2, 19xx, cps2, ROT0, "Capcom, supported by Eighting/Raizing", "1944: The Loop Master (Japan 000620)", 0 ) | |
| 7337 | GAME( 2000, dimahoo, 0, cps2, cps2_2p3b, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Dimahoo (Euro 000121)", 0 ) | |
| 7338 | GAME( 2000, dimahoou, dimahoo, cps2, cps2_2p3b, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Dimahoo (USA 000121)", 0 ) | |
| 7339 | GAME( 2000, gmahou, dimahoo, cps2, cps2_2p3b, cps2, ROT270, "Eighting/Raizing, distributed by Capcom", "Great Mahou Daisakusen (Japan 000121)", 0 ) | |
| 7340 | GAME( 2000, 1944, 0, cps2, cps2_2p2b, cps2, ROT0, "Capcom, supported by Eighting/Raizing", "1944: The Loop Master (USA 000620)", 0 ) | |
| 7341 | GAME( 2000, 1944j, 1944, cps2, cps2_2p2b, cps2, ROT0, "Capcom, supported by Eighting/Raizing", "1944: The Loop Master (Japan 000620)", 0 ) | |
| 7422 | 7342 | |
| 7423 | 7343 | /* Games released on CPS-2 hardware by Cave */ |
| 7424 | 7344 | |
| 7425 | GAME( 2001, progear, 0, cps2, sgemf, cps2, ROT0, "Capcom, supported by Cave", "Progear (USA 010117)", 0 ) | |
| 7426 | GAME( 2001, progearj, progear, cps2, sgemf, cps2, ROT0, "Capcom, supported by Cave", "Progear no Arashi (Japan 010117)", 0 ) | |
| 7427 | GAME( 2001, progeara, progear, cps2, sgemf, cps2, ROT0, "Capcom, supported by Cave", "Progear (Asia 010117)", 0 ) | |
| 7345 | GAME( 2001, progear, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom, supported by Cave", "Progear (USA 010117)", 0 ) | |
| 7346 | GAME( 2001, progearj, progear, cps2, cps2_2p3b, cps2, ROT0, "Capcom, supported by Cave", "Progear no Arashi (Japan 010117)", 0 ) | |
| 7347 | GAME( 2001, progeara, progear, cps2, cps2_2p3b, cps2, ROT0, "Capcom, supported by Cave", "Progear (Asia 010117)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 414 | 414 | }; |
| 415 | 415 | |
| 416 | 416 | static GFXDECODE_START( hyperspt ) |
| 417 | GFXDECODE_ENTRY( REGION_GFX1, 0, hyperspt_charlayout, 0, 16 ) | |
| 418 | GFXDECODE_ENTRY( REGION_GFX2, 0, hyperspt_spritelayout, 16*16, 16 ) | |
| 417 | GFXDECODE_ENTRY( REGION_GFX1, 0, hyperspt_spritelayout, 0, 16 ) | |
| 418 | GFXDECODE_ENTRY( REGION_GFX2, 0, hyperspt_charlayout, 16*16, 16 ) | |
| 419 | 419 | GFXDECODE_END |
| 420 | 420 | |
| 421 | 421 | |
| r1679 | r1680 | |
| 444 | 444 | }; |
| 445 | 445 | |
| 446 | 446 | static GFXDECODE_START( roadf ) |
| 447 | GFXDECODE_ENTRY( REGION_GFX1, 0, roadf_charlayout, 0, 16 ) | |
| 448 | GFXDECODE_ENTRY( REGION_GFX2, 0, roadf_spritelayout, 16*16, 16 ) | |
| 447 | GFXDECODE_ENTRY( REGION_GFX1, 0, roadf_spritelayout, 0, 16 ) | |
| 448 | GFXDECODE_ENTRY( REGION_GFX2, 0, roadf_charlayout, 16*16, 16 ) | |
| 449 | 449 | GFXDECODE_END |
| 450 | 450 | |
| 451 | 451 | |
| r1679 | r1680 | |
| 479 | 479 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 480 | 480 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 481 | 481 | MDRV_GFXDECODE(hyperspt) |
| 482 | MDRV_PALETTE_LENGTH(32) | |
| 483 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 482 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 484 | 483 | |
| 485 | 484 | MDRV_PALETTE_INIT(hyperspt) |
| 486 | 485 | MDRV_VIDEO_START(hyperspt) |
| r1679 | r1680 | |
| 528 | 527 | ROM_LOAD( "c10", 0x0000, 0x2000, CRC(3dc1a6ff) SHA1(1e67cac46b6c8a9a0bb1560e135983435520f1fc) ) |
| 529 | 528 | ROM_LOAD( "c09", 0x2000, 0x2000, CRC(9b525c3e) SHA1(d8775ec3b4f12117431a2b7c7eaa038c1255241b) ) |
| 530 | 529 | |
| 531 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 532 | ROM_LOAD( "c26", 0x00000, 0x2000, CRC(a6897eac) SHA1(a1dd950c29885f7bb4784fed46810ae47bff87dd) ) | |
| 533 | ROM_LOAD( "c24", 0x02000, 0x2000, CRC(5fb230c0) SHA1(8caebf3788c1fb71c1ba72b0045503d45936d4ce) ) | |
| 534 | ROM_LOAD( "c22", 0x04000, 0x2000, CRC(ed9271a0) SHA1(a458ad79922383f45f6522775e19cf693e226883) ) | |
| 535 | ROM_LOAD( "c20", 0x06000, 0x2000, CRC(183f4324) SHA1(f6bcd03c25dea300876ace950f118a971557168f) ) | |
| 536 | ||
| 537 | ROM_REGION( 0x10000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 530 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 538 | 531 | ROM_LOAD( "c14", 0x00000, 0x2000, CRC(c72d63be) SHA1(0677b4f7196551ebc1bbbecd0e15d79f8e32857d) ) |
| 539 | 532 | ROM_LOAD( "c13", 0x02000, 0x2000, CRC(76565608) SHA1(418fb9a81c0583d0214afb27fea28794563b8460) ) |
| 540 | 533 | ROM_LOAD( "c12", 0x04000, 0x2000, CRC(74d2cc69) SHA1(684b65455217f243b3690822d445efdcb18211bb) ) |
| r1679 | r1680 | |
| 544 | 537 | ROM_LOAD( "c16", 0x0c000, 0x2000, CRC(d7ff9f2b) SHA1(b0e6a056db96027ba0c10d3ee3bfdef145a236e2) ) |
| 545 | 538 | ROM_LOAD( "c15", 0x0e000, 0x2000, CRC(f3d454e6) SHA1(9d04dcd1b0354e01773923295bba2602e00467f9) ) |
| 546 | 539 | |
| 540 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 541 | ROM_LOAD( "c26", 0x00000, 0x2000, CRC(a6897eac) SHA1(a1dd950c29885f7bb4784fed46810ae47bff87dd) ) | |
| 542 | ROM_LOAD( "c24", 0x02000, 0x2000, CRC(5fb230c0) SHA1(8caebf3788c1fb71c1ba72b0045503d45936d4ce) ) | |
| 543 | ROM_LOAD( "c22", 0x04000, 0x2000, CRC(ed9271a0) SHA1(a458ad79922383f45f6522775e19cf693e226883) ) | |
| 544 | ROM_LOAD( "c20", 0x06000, 0x2000, CRC(183f4324) SHA1(f6bcd03c25dea300876ace950f118a971557168f) ) | |
| 545 | ||
| 547 | 546 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 548 | 547 | ROM_LOAD( "c03_c27.bin", 0x0000, 0x0020, CRC(bc8a5956) SHA1(90746145d9f380c29919edea3ef7a8434c48c9d9) ) |
| 549 | 548 | ROM_LOAD( "j12_c28.bin", 0x0020, 0x0100, CRC(2c891d59) SHA1(79050fbe058c24349927edc7937ec68a77f450f1) ) |
| r1679 | r1680 | |
| 566 | 565 | ROM_LOAD( "c10", 0x0000, 0x2000, CRC(3dc1a6ff) SHA1(1e67cac46b6c8a9a0bb1560e135983435520f1fc) ) |
| 567 | 566 | ROM_LOAD( "c09", 0x2000, 0x2000, CRC(9b525c3e) SHA1(d8775ec3b4f12117431a2b7c7eaa038c1255241b) ) |
| 568 | 567 | |
| 569 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 570 | ROM_LOAD( "c26", 0x00000, 0x2000, CRC(a6897eac) SHA1(a1dd950c29885f7bb4784fed46810ae47bff87dd) ) | |
| 571 | ROM_LOAD( "330e24.bin", 0x02000, 0x2000, CRC(f9bbfe1d) SHA1(f24a0c3e10e727e3e9fd123cda8bb557af1fea12) ) | |
| 572 | ROM_LOAD( "c22", 0x04000, 0x2000, CRC(ed9271a0) SHA1(a458ad79922383f45f6522775e19cf693e226883) ) | |
| 573 | ROM_LOAD( "330e20.bin", 0x06000, 0x2000, CRC(29969b92) SHA1(baf394c56b8a2855f32b9e6d7346faf50e75bcf2) ) | |
| 574 | ||
| 575 | ROM_REGION( 0x10000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 568 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 576 | 569 | ROM_LOAD( "c14", 0x00000, 0x2000, CRC(c72d63be) SHA1(0677b4f7196551ebc1bbbecd0e15d79f8e32857d) ) |
| 577 | 570 | ROM_LOAD( "c13", 0x02000, 0x2000, CRC(76565608) SHA1(418fb9a81c0583d0214afb27fea28794563b8460) ) |
| 578 | 571 | ROM_LOAD( "c12", 0x04000, 0x2000, CRC(74d2cc69) SHA1(684b65455217f243b3690822d445efdcb18211bb) ) |
| r1679 | r1680 | |
| 582 | 575 | ROM_LOAD( "c16", 0x0c000, 0x2000, CRC(d7ff9f2b) SHA1(b0e6a056db96027ba0c10d3ee3bfdef145a236e2) ) |
| 583 | 576 | ROM_LOAD( "c15", 0x0e000, 0x2000, CRC(f3d454e6) SHA1(9d04dcd1b0354e01773923295bba2602e00467f9) ) |
| 584 | 577 | |
| 578 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 579 | ROM_LOAD( "c26", 0x00000, 0x2000, CRC(a6897eac) SHA1(a1dd950c29885f7bb4784fed46810ae47bff87dd) ) | |
| 580 | ROM_LOAD( "330e24.bin", 0x02000, 0x2000, CRC(f9bbfe1d) SHA1(f24a0c3e10e727e3e9fd123cda8bb557af1fea12) ) | |
| 581 | ROM_LOAD( "c22", 0x04000, 0x2000, CRC(ed9271a0) SHA1(a458ad79922383f45f6522775e19cf693e226883) ) | |
| 582 | ROM_LOAD( "330e20.bin", 0x06000, 0x2000, CRC(29969b92) SHA1(baf394c56b8a2855f32b9e6d7346faf50e75bcf2) ) | |
| 583 | ||
| 585 | 584 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 586 | 585 | ROM_LOAD( "c03_c27.bin", 0x0000, 0x0020, CRC(bc8a5956) SHA1(90746145d9f380c29919edea3ef7a8434c48c9d9) ) |
| 587 | 586 | ROM_LOAD( "j12_c28.bin", 0x0020, 0x0100, CRC(2c891d59) SHA1(79050fbe058c24349927edc7937ec68a77f450f1) ) |
| r1679 | r1680 | |
| 603 | 602 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 604 | 603 | ROM_LOAD( "a17_d10.bin", 0x0000, 0x2000, CRC(c33c927e) SHA1(f1a8522e3bfc3a07bb42408d2937a4129e4c3fee) ) |
| 605 | 604 | |
| 606 | ROM_REGION( 0x0c000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 605 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 606 | ROM_LOAD( "j19_e14.bin", 0x00000, 0x4000, CRC(16d2bcff) SHA1(37c63faaaca43909bfb1e2ccb370efe4b276d8a9) ) | |
| 607 | ROM_LOAD( "g19_e18.bin", 0x04000, 0x4000, CRC(490685ff) SHA1(5ca0aa3771d60688671aae196f10f9feecb15106) ) | |
| 608 | ||
| 609 | ROM_REGION( 0x0c000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 607 | 610 | ROM_LOAD( "a14_e26.bin", 0x00000, 0x4000, CRC(f5c738e2) SHA1(9f10be775791dee9801b1167f838a9110084842d) ) |
| 608 | 611 | ROM_LOAD( "a12_d24.bin", 0x04000, 0x2000, CRC(2d82c930) SHA1(fea26c00ad3acb1f44a5fdc79a7dd8ddce17d317) ) |
| 609 | 612 | ROM_LOAD( "c14_e22.bin", 0x06000, 0x4000, CRC(fbcfbeb9) SHA1(e5a938fc2fe2378d836dfe8ba516994cd5cf0bb5) ) |
| 610 | 613 | ROM_LOAD( "c12_d20.bin", 0x0a000, 0x2000, CRC(5e0cf994) SHA1(c81274d809c685ccf24108f56a4fa54146d4f493) ) |
| 611 | 614 | |
| 612 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 613 | ROM_LOAD( "j19_e14.bin", 0x00000, 0x4000, CRC(16d2bcff) SHA1(37c63faaaca43909bfb1e2ccb370efe4b276d8a9) ) | |
| 614 | ROM_LOAD( "g19_e18.bin", 0x04000, 0x4000, CRC(490685ff) SHA1(5ca0aa3771d60688671aae196f10f9feecb15106) ) | |
| 615 | ||
| 616 | 615 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 617 | 616 | ROM_LOAD( "c03_c27.bin", 0x0000, 0x0020, CRC(45d5e352) SHA1(0f4d358aaffcb68193247090e82f093752730518) ) |
| 618 | 617 | ROM_LOAD( "j12_c28.bin", 0x0020, 0x0100, CRC(2955e01f) SHA1(b0652d177a45571edc5978143d4023e7b173b383) ) |
| r1679 | r1680 | |
| 631 | 630 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 632 | 631 | ROM_LOAD( "a17_d10.bin", 0x0000, 0x2000, CRC(c33c927e) SHA1(f1a8522e3bfc3a07bb42408d2937a4129e4c3fee) ) |
| 633 | 632 | |
| 634 | ROM_REGION( 0x0c000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 633 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 634 | ROM_LOAD( "j19_e14.bin", 0x00000, 0x4000, CRC(16d2bcff) SHA1(37c63faaaca43909bfb1e2ccb370efe4b276d8a9) ) | |
| 635 | ROM_LOAD( "g19_e18.bin", 0x04000, 0x4000, CRC(490685ff) SHA1(5ca0aa3771d60688671aae196f10f9feecb15106) ) | |
| 636 | ||
| 637 | ROM_REGION( 0x0c000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 635 | 638 | ROM_LOAD( "a14_e26.bin", 0x00000, 0x4000, CRC(f5c738e2) SHA1(9f10be775791dee9801b1167f838a9110084842d) ) |
| 636 | 639 | ROM_LOAD( "a12_d24.bin", 0x04000, 0x2000, CRC(2d82c930) SHA1(fea26c00ad3acb1f44a5fdc79a7dd8ddce17d317) ) |
| 637 | 640 | ROM_LOAD( "c14_e22.bin", 0x06000, 0x4000, CRC(fbcfbeb9) SHA1(e5a938fc2fe2378d836dfe8ba516994cd5cf0bb5) ) |
| 638 | 641 | ROM_LOAD( "c12_d20.bin", 0x0a000, 0x2000, CRC(5e0cf994) SHA1(c81274d809c685ccf24108f56a4fa54146d4f493) ) |
| 639 | 642 | |
| 640 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 641 | ROM_LOAD( "j19_e14.bin", 0x00000, 0x4000, CRC(16d2bcff) SHA1(37c63faaaca43909bfb1e2ccb370efe4b276d8a9) ) | |
| 642 | ROM_LOAD( "g19_e18.bin", 0x04000, 0x4000, CRC(490685ff) SHA1(5ca0aa3771d60688671aae196f10f9feecb15106) ) | |
| 643 | ||
| 644 | 643 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 645 | 644 | ROM_LOAD( "c03_c27.bin", 0x0000, 0x0020, CRC(45d5e352) SHA1(0f4d358aaffcb68193247090e82f093752730518) ) |
| 646 | 645 | ROM_LOAD( "j12_c28.bin", 0x0020, 0x0100, CRC(2955e01f) SHA1(b0652d177a45571edc5978143d4023e7b173b383) ) |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | hellfir1 B90 HellFire (1 Player version) Uses Taito rom ID number |
| 20 | 20 | hellfir2 B90 HellFire (2 Player, ealier version) Uses Taito rom ID number |
| 21 | 21 | zerowing TP-015 Zero Wing |
| 22 | zerowng2 TP-015 Zero Wing (2 player simultaneous version, Williams Electronics Games, Inc) | |
| 22 | 23 | demonwld TP-016 Demon's World/Horror Story [1990] |
| 23 | 24 | demonwl1 TP-016 Demon's World/Horror Story [1989] (Taito license) |
| 24 | 25 | fireshrk TP-017 Fire Shark (World) [1990] |
| r1679 | r1680 | |
| 545 | 546 | |
| 546 | 547 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, ) |
| 547 | 548 | |
| 548 | PORT_START /* DSW A */ | |
| 549 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 549 | 550 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) |
| 550 | 551 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 551 | 552 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 567 | 568 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 568 | 569 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 569 | 570 | |
| 570 | PORT_START /* DSWB */ | |
| 571 | PORT_START_TAG("DSWB") /* DSWB */ | |
| 571 | 572 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 572 | 573 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 573 | 574 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 592 | 593 | |
| 593 | 594 | TOAPLAN1_SYSTEM_INPUTS |
| 594 | 595 | |
| 595 | PORT_START /* Territory Jumper block */ | |
| 596 | PORT_START_TAG("TJUMP") /* Territory Jumper block */ | |
| 596 | 597 | PORT_DIPNAME( 0x03, 0x02, "Territory" ) |
| 597 | 598 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) |
| 598 | 599 | // PORT_DIPSETTING( 0x03, DEF_STR( Europe ) ) |
| r1679 | r1680 | |
| 608 | 609 | INPUT_PORTS_END |
| 609 | 610 | |
| 610 | 611 | static INPUT_PORTS_START( hellfir1 ) |
| 611 | | |
| 612 | | |
| 612 | 613 | |
| 613 | TOAPLAN1_PLAYER_INPUT( 1, IPT_UNKNOWN, ) | |
| 614 | ||
| 615 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, ) | |
| 616 | ||
| 617 | PORT_START /* DSW A */ | |
| 614 | PORT_MODIFY("DSWA") | |
| 618 | 615 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 619 | 616 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 620 | 617 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 621 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 622 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 623 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 624 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 625 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 626 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 627 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 628 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 629 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 630 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 631 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 632 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 633 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 634 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 635 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 636 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 637 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 638 | ||
| 639 | PORT_START /* DSWB */ | |
| 640 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 641 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 642 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 643 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 644 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 645 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 646 | PORT_DIPSETTING( 0x00, "70K, every 200K" ) | |
| 647 | PORT_DIPSETTING( 0x04, "100K, every 250K" ) | |
| 648 | PORT_DIPSETTING( 0x08, "100K" ) | |
| 649 | PORT_DIPSETTING( 0x0c, "200K" ) | |
| 650 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 651 | PORT_DIPSETTING( 0x30, "2" ) | |
| 652 | PORT_DIPSETTING( 0x00, "3" ) | |
| 653 | PORT_DIPSETTING( 0x20, "4" ) | |
| 654 | PORT_DIPSETTING( 0x10, "5" ) | |
| 655 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 656 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 657 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 658 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) | |
| 659 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 660 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 661 | ||
| 662 | TOAPLAN1_SYSTEM_INPUTS | |
| 663 | ||
| 664 | PORT_START /* Territory Jumper block */ | |
| 665 | PORT_DIPNAME( 0x03, 0x02, "Territory" ) | |
| 666 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) | |
| 667 | // PORT_DIPSETTING( 0x03, DEF_STR( Europe ) ) | |
| 668 | PORT_DIPSETTING( 0x01, "US" ) | |
| 669 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) | |
| 670 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) | |
| 671 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 672 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 673 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) | |
| 674 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 675 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 676 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 677 | 618 | INPUT_PORTS_END |
| 678 | 619 | |
| 679 | 620 | static INPUT_PORTS_START( zerowing ) |
| r1679 | r1680 | |
| 683 | 624 | |
| 684 | 625 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, PORT_COCKTAIL ) |
| 685 | 626 | |
| 686 | PORT_START /* DSW A */ | |
| 627 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 687 | 628 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 688 | 629 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 689 | 630 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r1679 | r1680 | |
| 705 | 646 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 706 | 647 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 707 | 648 | |
| 708 | PORT_START /* DSW B */ | |
| 649 | PORT_START_TAG("DSWB") /* DSW B */ | |
| 709 | 650 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 710 | 651 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 711 | 652 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 730 | 671 | |
| 731 | 672 | TOAPLAN1_SYSTEM_INPUTS |
| 732 | 673 | |
| 733 | PORT_START /* Territory Jumper block */ | |
| 674 | PORT_START_TAG("TJUMP") /* Territory Jumper block */ | |
| 734 | 675 | PORT_DIPNAME( 0x03, 0x02, "Territory" ) |
| 735 | 676 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) |
| 736 | 677 | // PORT_DIPSETTING( 0x03, DEF_STR( Europe ) ) |
| r1679 | r1680 | |
| 745 | 686 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 746 | 687 | INPUT_PORTS_END |
| 747 | 688 | |
| 689 | ||
| 690 | static INPUT_PORTS_START( zerowng2 ) /* Always shows "Williams Electronics Games, Inc" */ | |
| 691 | PORT_INCLUDE( zerowing ) | |
| 692 | ||
| 693 | PORT_MODIFY("TJUMP") /* Territory Jumper block */ | |
| 694 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 695 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 696 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 697 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) ) | |
| 698 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 699 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 700 | INPUT_PORTS_END | |
| 701 | ||
| 748 | 702 | static INPUT_PORTS_START( demonwld ) |
| 749 | 703 | TOAPLAN1_VBLANK_INPUT |
| 750 | 704 | |
| r1679 | r1680 | |
| 752 | 706 | |
| 753 | 707 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) |
| 754 | 708 | |
| 755 | PORT_START /* DSW A */ | |
| 709 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 756 | 710 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) |
| 757 | 711 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 758 | 712 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 774 | 728 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 775 | 729 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 776 | 730 | |
| 777 | PORT_START /* DSW B */ | |
| 731 | PORT_START_TAG("DSWB") /* DSW B */ | |
| 778 | 732 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 779 | 733 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 780 | 734 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 799 | 753 | |
| 800 | 754 | TOAPLAN1_SYSTEM_INPUTS |
| 801 | 755 | |
| 802 | PORT_START /* Territory Jumper Block */ | |
| 756 | PORT_START_TAG("TJUMP") /* Territory Jumper Block */ | |
| 803 | 757 | PORT_DIPNAME( 0x01, 0x01, "Territory/Copyright" ) |
| 804 | 758 | PORT_DIPSETTING( 0x01, "Toaplan" ) |
| 805 | 759 | PORT_DIPSETTING( 0x00, "Japan/Taito Corp" ) |
| r1679 | r1680 | |
| 816 | 770 | INPUT_PORTS_END |
| 817 | 771 | |
| 818 | 772 | static INPUT_PORTS_START( demonwl1 ) |
| 819 | | |
| 773 | | |
| 820 | 774 | |
| 821 | TOAPLAN1_PLAYER_INPUT( 1, IPT_BUTTON3, ) | |
| 822 | ||
| 823 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) | |
| 824 | ||
| 825 | PORT_START /* DSW A */ | |
| 826 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 827 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 828 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 829 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 830 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 831 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 832 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 833 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 834 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 835 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 836 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 837 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 838 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 839 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 840 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 841 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 842 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 843 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 844 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 845 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 846 | ||
| 847 | PORT_START /* DSW B */ | |
| 848 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 849 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 850 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 851 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 852 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 853 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 854 | PORT_DIPSETTING( 0x00, "30K, every 100K" ) | |
| 855 | PORT_DIPSETTING( 0x04, "50K and 100K" ) | |
| 856 | PORT_DIPSETTING( 0x08, "100K only" ) | |
| 857 | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) | |
| 858 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 859 | PORT_DIPSETTING( 0x30, "1" ) | |
| 860 | PORT_DIPSETTING( 0x20, "2" ) | |
| 861 | PORT_DIPSETTING( 0x00, "3" ) | |
| 862 | PORT_DIPSETTING( 0x10, "5" ) | |
| 863 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 864 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 865 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 866 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 867 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 868 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 869 | ||
| 870 | TOAPLAN1_SYSTEM_INPUTS | |
| 871 | ||
| 872 | PORT_START /* Territory Jumper Block */ | |
| 775 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 873 | 776 | PORT_DIPNAME( 0x03, 0x02, "Territory/Copyright" ) |
| 874 | 777 | PORT_DIPSETTING( 0x02, "World/Taito Japan" ) |
| 875 | 778 | PORT_DIPSETTING( 0x03, "US/Toaplan" ) |
| 876 | 779 | PORT_DIPSETTING( 0x01, "US/Taito America" ) |
| 877 | 780 | PORT_DIPSETTING( 0x00, "Japan/Taito Corp" ) |
| 878 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 879 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 880 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 881 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 882 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 883 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 884 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 885 | 781 | INPUT_PORTS_END |
| 886 | 782 | |
| 887 | 783 | static INPUT_PORTS_START( samesame ) |
| r1679 | r1680 | |
| 891 | 787 | |
| 892 | 788 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, PORT_COCKTAIL ) |
| 893 | 789 | |
| 894 | PORT_START /* DSW A */ | |
| 790 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 895 | 791 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 896 | 792 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 897 | 793 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r1679 | r1680 | |
| 927 | 823 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| 928 | 824 | */ |
| 929 | 825 | |
| 930 | PORT_START /* DSW B */ | |
| 826 | PORT_START_TAG("DSWB") /* DSW B */ | |
| 931 | 827 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 932 | 828 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 933 | 829 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 952 | 848 | |
| 953 | 849 | TOAPLAN1_SYSTEM_INPUTS |
| 954 | 850 | |
| 955 | PORT_START /* Territory Jumper Block */ | |
| 851 | PORT_START_TAG("TJUMP") /* Territory Jumper Block */ | |
| 956 | 852 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 957 | 853 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 958 | 854 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 969 | 865 | INPUT_PORTS_END |
| 970 | 866 | |
| 971 | 867 | static INPUT_PORTS_START( samesam2 ) |
| 972 | | |
| 868 | | |
| 973 | 869 | |
| 974 | TOAPLAN1_PLAYER_INPUT( 1, IPT_UNKNOWN, ) | |
| 975 | ||
| 976 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, ) | |
| 977 | ||
| 978 | PORT_START /* DSW A */ | |
| 979 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 980 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 981 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 982 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 983 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 984 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 985 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 986 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 987 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 988 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 989 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) | |
| 990 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 991 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 992 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) | |
| 993 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 994 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 995 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) | |
| 996 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 997 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 998 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 999 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1000 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1001 | /* settings listed in service mode, but not actually used ??? | |
| 1002 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 1003 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) | |
| 1004 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1005 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) | |
| 1006 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) | |
| 1007 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 1008 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) | |
| 1009 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1010 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) | |
| 1011 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) | |
| 1012 | */ | |
| 1013 | ||
| 1014 | PORT_START /* DSW B */ | |
| 1015 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1016 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1017 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1018 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1019 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1020 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1021 | PORT_DIPSETTING( 0x04, "50K, every 150K" ) | |
| 1022 | PORT_DIPSETTING( 0x00, "70K, every 200K" ) | |
| 1023 | PORT_DIPSETTING( 0x08, "100K" ) | |
| 1024 | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) | |
| 1025 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 1026 | PORT_DIPSETTING( 0x30, "2" ) | |
| 1027 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1028 | PORT_DIPSETTING( 0x20, "4" ) | |
| 1029 | PORT_DIPSETTING( 0x10, "5" ) | |
| 1030 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1031 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1032 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1033 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 1034 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1035 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1036 | ||
| 1037 | TOAPLAN1_SYSTEM_INPUTS | |
| 1038 | ||
| 1039 | PORT_START /* Territory Jumper Block */ | |
| 870 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1040 | 871 | /* settings listed in service mode, but not actually used |
| 1041 | 872 | PORT_DIPNAME( 0x03, 0x00, "Territory" ) |
| 1042 | 873 | // PORT_DIPSETTING( 0x01, DEF_STR( Europe ) ) |
| r1679 | r1680 | |
| 1050 | 881 | // PORT_DIPNAME( 0x02, 0x00, "Show Territory Notice" ) /* Same as Bit 1 */ |
| 1051 | 882 | // PORT_DIPSETTING( 0x02, DEF_STR( No ) ) |
| 1052 | 883 | // PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1053 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) | |
| 1054 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1055 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 1056 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1057 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1058 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1059 | 884 | PORT_BIT( 0xf2, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Mask bit 2 aswell */ |
| 1060 | 885 | INPUT_PORTS_END |
| 1061 | 886 | |
| 1062 | 887 | static INPUT_PORTS_START( fireshrk ) |
| 1063 | | |
| 888 | | |
| 1064 | 889 | |
| 1065 | TOAPLAN1_PLAYER_INPUT( 1, IPT_UNKNOWN, ) | |
| 1066 | ||
| 1067 | TOAPLAN1_PLAYER_INPUT( 2, IPT_UNKNOWN, ) | |
| 1068 | ||
| 1069 | PORT_START /* DSW A */ | |
| 1070 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 1071 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1072 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1073 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1074 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1075 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1076 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 1077 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1078 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1079 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 890 | PORT_MODIFY("DSWA") /* DSW A */ | |
| 1080 | 891 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) |
| 1081 | 892 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) |
| 1082 | 893 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) |
| r1679 | r1680 | |
| 1088 | 899 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 1089 | 900 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1090 | 901 | |
| 1091 | PORT_START /* DSW B */ | |
| 1092 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1093 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1094 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1095 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1096 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1097 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1098 | PORT_DIPSETTING( 0x04, "50K, every 150K" ) | |
| 1099 | PORT_DIPSETTING( 0x00, "70K, every 200K" ) | |
| 1100 | PORT_DIPSETTING( 0x08, "100K" ) | |
| 1101 | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) | |
| 1102 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 1103 | PORT_DIPSETTING( 0x30, "2" ) | |
| 1104 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1105 | PORT_DIPSETTING( 0x20, "4" ) | |
| 1106 | PORT_DIPSETTING( 0x10, "5" ) | |
| 1107 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1108 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1109 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1110 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 1111 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1112 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1113 | ||
| 1114 | TOAPLAN1_SYSTEM_INPUTS | |
| 1115 | ||
| 1116 | PORT_START /* Territory Jumper Block */ | |
| 1117 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) | |
| 1118 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1119 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 902 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1120 | 903 | PORT_DIPNAME( 0x06, 0x02, "Territory" ) |
| 1121 | 904 | PORT_DIPSETTING( 0x02, DEF_STR( Europe ) ) |
| 1122 | 905 | PORT_DIPSETTING( 0x04, DEF_STR( USA ) ) |
| 1123 | 906 | PORT_DIPSETTING( 0x00, "USA (Romstar)" ) |
| 1124 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 1125 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1126 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 1127 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1128 | 907 | INPUT_PORTS_END |
| 1129 | 908 | |
| 1130 | 909 | static INPUT_PORTS_START( outzone ) |
| r1679 | r1680 | |
| 1134 | 913 | |
| 1135 | 914 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) |
| 1136 | 915 | |
| 1137 | PORT_START /* DSW A */ | |
| 916 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 1138 | 917 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) |
| 1139 | 918 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1140 | 919 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 1156 | 935 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 1157 | 936 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1158 | 937 | |
| 1159 | PORT_START /* DSW B */ | |
| 938 | PORT_START_TAG("DSWB") /* DSW B */ | |
| 1160 | 939 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 1161 | 940 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 1162 | 941 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 1181 | 960 | |
| 1182 | 961 | TOAPLAN1_SYSTEM_INPUTS |
| 1183 | 962 | |
| 1184 | PORT_START /* Territory Jumper Block */ | |
| 963 | PORT_START_TAG("TJUMP") /* Territory Jumper Block */ | |
| 1185 | 964 | PORT_DIPNAME( 0x0f, 0x02, "Territory" ) |
| 1186 | 965 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) |
| 1187 | 966 | PORT_DIPSETTING( 0x01, "US" ) |
| r1679 | r1680 | |
| 1189 | 968 | PORT_DIPSETTING( 0x03, "Hong Kong" ) |
| 1190 | 969 | PORT_DIPSETTING( 0x04, "Korea" ) |
| 1191 | 970 | PORT_DIPSETTING( 0x05, "Taiwan" ) |
| 1192 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy License)" ) | |
| 971 | PORT_DIPSETTING( 0x06, "Taiwan (Spacy Co License)" ) | |
| 1193 | 972 | PORT_DIPSETTING( 0x07, "US (Romstar License)" ) |
| 1194 | 973 | PORT_DIPSETTING( 0x08, "Hong Kong (Honest Trading License)" ) |
| 1195 | 974 | // PORT_DIPSETTING( 0x09, DEF_STR( Japan ) ) |
| r1679 | r1680 | |
| 1203 | 982 | INPUT_PORTS_END |
| 1204 | 983 | |
| 1205 | 984 | static INPUT_PORTS_START( outzoneb ) |
| 1206 | | |
| 985 | | |
| 1207 | 986 | |
| 1208 | TOAPLAN1_PLAYER_INPUT( 1, IPT_BUTTON3, ) | |
| 1209 | ||
| 1210 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) | |
| 1211 | ||
| 1212 | PORT_START /* DSW A */ | |
| 1213 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 1214 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1215 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1216 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1217 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1218 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1219 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 1220 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1221 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1222 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1223 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 1224 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 1225 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1226 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1227 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1228 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 1229 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 1230 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1231 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 1232 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 1233 | ||
| 1234 | PORT_START /* DSW B */ | |
| 1235 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1236 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1237 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1238 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1239 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1240 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1241 | PORT_DIPSETTING( 0x00, "Every 300K" ) | |
| 1242 | PORT_DIPSETTING( 0x04, "200K and 500K" ) | |
| 1243 | PORT_DIPSETTING( 0x08, "300K only" ) | |
| 1244 | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) | |
| 1245 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 1246 | PORT_DIPSETTING( 0x30, "1" ) | |
| 1247 | PORT_DIPSETTING( 0x20, "2" ) | |
| 1248 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1249 | PORT_DIPSETTING( 0x10, "5" ) | |
| 1250 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1251 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1252 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1253 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 1254 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1255 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1256 | ||
| 1257 | TOAPLAN1_SYSTEM_INPUTS | |
| 1258 | ||
| 1259 | PORT_START /* Territory Jumper Block */ | |
| 987 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1260 | 988 | PORT_DIPNAME( 0x07, 0x02, "Territory" ) |
| 1261 | 989 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) |
| 1262 | 990 | PORT_DIPSETTING( 0x01, "US" ) |
| r1679 | r1680 | |
| 1269 | 997 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) // doesn't seem to matter on this set |
| 1270 | 998 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1271 | 999 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1272 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1273 | 1000 | INPUT_PORTS_END |
| 1274 | 1001 | |
| 1275 | 1002 | static INPUT_PORTS_START( outzonec ) |
| 1276 | | |
| 1003 | | |
| 1277 | 1004 | |
| 1278 | TOAPLAN1_PLAYER_INPUT( 1, IPT_BUTTON3, ) | |
| 1279 | ||
| 1280 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) | |
| 1281 | ||
| 1282 | PORT_START /* DSW A */ | |
| 1283 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 1284 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1285 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1286 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1287 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1288 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1289 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 1290 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1291 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 1292 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1293 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) | |
| 1294 | PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) | |
| 1295 | PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) | |
| 1296 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 1297 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 1298 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) | |
| 1299 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) | |
| 1300 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) | |
| 1301 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) | |
| 1302 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) | |
| 1303 | ||
| 1304 | PORT_START /* DSW B */ | |
| 1305 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1306 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1307 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1308 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1309 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1310 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1311 | PORT_DIPSETTING( 0x00, "Every 300K" ) | |
| 1312 | PORT_DIPSETTING( 0x04, "200K and 500K" ) | |
| 1313 | PORT_DIPSETTING( 0x08, "300K only" ) | |
| 1314 | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) | |
| 1315 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 1316 | PORT_DIPSETTING( 0x30, "1" ) | |
| 1317 | PORT_DIPSETTING( 0x20, "2" ) | |
| 1318 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1319 | PORT_DIPSETTING( 0x10, "5" ) | |
| 1320 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1321 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1322 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1323 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 1324 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1325 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1326 | ||
| 1327 | TOAPLAN1_SYSTEM_INPUTS | |
| 1328 | ||
| 1329 | PORT_START /* Territory Jumper Block */ | |
| 1005 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1330 | 1006 | PORT_DIPNAME( 0x0f, 0x02, "Territory" ) |
| 1331 | 1007 | PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) |
| 1332 | 1008 | PORT_DIPSETTING( 0x01, "US" ) |
| r1679 | r1680 | |
| 1344 | 1020 | // PORT_DIPSETTING( 0x0d, DEF_STR( Japan ) ) |
| 1345 | 1021 | // PORT_DIPSETTING( 0x0e, DEF_STR( Japan ) ) |
| 1346 | 1022 | // PORT_DIPSETTING( 0x0f, DEF_STR( Japan ) ) |
| 1347 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1348 | 1023 | INPUT_PORTS_END |
| 1349 | 1024 | |
| 1025 | ||
| 1350 | 1026 | static INPUT_PORTS_START( vimana ) |
| 1351 | 1027 | TOAPLAN1_VBLANK_INPUT |
| 1352 | 1028 | |
| r1679 | r1680 | |
| 1354 | 1030 | |
| 1355 | 1031 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) |
| 1356 | 1032 | |
| 1357 | PORT_START /* DSW A */ | |
| 1033 | PORT_START_TAG("DSWA") /* DSW A */ | |
| 1358 | 1034 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) |
| 1359 | 1035 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1360 | 1036 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 1376 | 1052 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 1377 | 1053 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1378 | 1054 | |
| 1379 | PORT_START /* DSW B */ | |
| 1055 | PORT_START_TAG("DSWB") /* DSW B */ | |
| 1380 | 1056 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) |
| 1381 | 1057 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) |
| 1382 | 1058 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) |
| r1679 | r1680 | |
| 1401 | 1077 | |
| 1402 | 1078 | TOAPLAN1_SYSTEM_INPUTS |
| 1403 | 1079 | |
| 1404 | PORT_START /* Territory Jumper Block */ | |
| 1080 | PORT_START_TAG("TJUMP") /* Territory Jumper Block */ | |
| 1405 | 1081 | PORT_DIPNAME( 0x0f, 0x02, "Territory / License" ) |
| 1406 | 1082 | PORT_DIPSETTING( 0x00, "Japan (Distributed by Tecmo)" ) |
| 1407 | 1083 | PORT_DIPSETTING( 0x01, "US" ) |
| r1679 | r1680 | |
| 1423 | 1099 | INPUT_PORTS_END |
| 1424 | 1100 | |
| 1425 | 1101 | static INPUT_PORTS_START( vimanan ) |
| 1426 | | |
| 1102 | | |
| 1427 | 1103 | |
| 1428 | TOAPLAN1_PLAYER_INPUT( 1, IPT_BUTTON3, ) | |
| 1429 | ||
| 1430 | TOAPLAN1_PLAYER_INPUT( 2, IPT_BUTTON3, ) | |
| 1431 | ||
| 1432 | PORT_START /* DSW A */ | |
| 1433 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) | |
| 1434 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1435 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 1436 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) | |
| 1437 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1438 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 1439 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) | |
| 1440 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 1104 | PORT_MODIFY("DSWA") /* DSW A */ | |
| 1441 | 1105 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1442 | 1106 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1443 | 1107 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) ) |
| r1679 | r1680 | |
| 1465 | 1129 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 1466 | 1130 | */ |
| 1467 | 1131 | |
| 1468 | PORT_START /* DSW B */ | |
| 1469 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) | |
| 1470 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 1471 | PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) | |
| 1472 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 1473 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) | |
| 1474 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1475 | PORT_DIPSETTING( 0x00, "70K and 200K" ) | |
| 1476 | PORT_DIPSETTING( 0x04, "100K and 250K" ) | |
| 1477 | PORT_DIPSETTING( 0x08, "100K" ) | |
| 1478 | PORT_DIPSETTING( 0x0c, "200K" ) | |
| 1479 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) | |
| 1480 | PORT_DIPSETTING( 0x30, "2" ) | |
| 1481 | PORT_DIPSETTING( 0x00, "3" ) | |
| 1482 | PORT_DIPSETTING( 0x20, "4" ) | |
| 1483 | PORT_DIPSETTING( 0x10, "5" ) | |
| 1484 | PORT_DIPNAME( 0x40, 0x00, "Invulnerability" ) | |
| 1485 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1486 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 1487 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) | |
| 1488 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 1489 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) | |
| 1490 | ||
| 1491 | TOAPLAN1_SYSTEM_INPUTS | |
| 1492 | ||
| 1493 | PORT_START /* Territory Jumper Block */ | |
| 1132 | PORT_MODIFY("TJUMP") /* Territory Jumper Block */ | |
| 1494 | 1133 | PORT_DIPNAME( 0x0f, 0x02, "Territory / License" ) |
| 1495 | 1134 | PORT_DIPSETTING( 0x00, "Japan (Distributed by Tecmo)" ) |
| 1496 | 1135 | PORT_DIPSETTING( 0x01, "US" ) |
| r1679 | r1680 | |
| 1508 | 1147 | // PORT_DIPSETTING( 0x0d, DEF_STR( Unused ) ) |
| 1509 | 1148 | // PORT_DIPSETTING( 0x0e, DEF_STR( Unused ) ) |
| 1510 | 1149 | // PORT_DIPSETTING( 0x0f, "Japan (Distributed by Tecmo)" ) // duplicate of 0x00 |
| 1511 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1512 | 1150 | INPUT_PORTS_END |
| 1513 | 1151 | |
| 1514 | 1152 | |
| r1679 | r1680 | |
| 2034 | 1672 | ROM_LOAD( "tp015_15.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ |
| 2035 | 1673 | ROM_END |
| 2036 | 1674 | |
| 1675 | ROM_START( zerowng2 ) /* 2 player simultaneous version */ | |
| 1676 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* Main 68K code */ | |
| 1677 | ROM_LOAD16_BYTE( "o15-11iiw.bin", 0x000000, 0x08000, CRC(38b0bb5b) SHA1(e5a4c0b6c279a55701c82bf9e285a806054f8d23) ) | |
| 1678 | ROM_LOAD16_BYTE( "o15-12iiw.bin", 0x000001, 0x08000, CRC(74c91e6f) SHA1(8cf5d10a5f4efda0903a4c5d56599861ccc8f1c1) ) | |
| 1679 | ROM_LOAD16_BYTE( "o15-09.rom", 0x040000, 0x20000, CRC(13764e95) SHA1(61da49b73ba81edd951e96e9ce6673c1c3bd65f2) ) | |
| 1680 | ROM_LOAD16_BYTE( "o15-10.rom", 0x040001, 0x20000, CRC(351ba71a) SHA1(937331549140506711b08252497cc0f2efa58268) ) | |
| 1681 | ||
| 1682 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound Z80 code */ | |
| 1683 | ROM_LOAD( "o15-13.rom", 0x0000, 0x8000, CRC(e7b72383) SHA1(ea1f6f33a86d14d58bd396fd46081462f00177d5) ) | |
| 1684 | ||
| 1685 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1686 | ROM_LOAD( "o15-05.rom", 0x00000, 0x20000, CRC(4e5dd246) SHA1(5366b4a6f3c900a4f57a6583b7399163a06f42d7) ) | |
| 1687 | ROM_LOAD( "o15-06.rom", 0x20000, 0x20000, CRC(c8c6d428) SHA1(76ee5bcb8f10fe201fc5c32697beee3de9d8b751) ) | |
| 1688 | ROM_LOAD( "o15-07.rom", 0x40000, 0x20000, CRC(efc40e99) SHA1(a04fad4197a7fb4787cd9bebf43e1d9b02b2f61b) ) | |
| 1689 | ROM_LOAD( "o15-08.rom", 0x60000, 0x20000, CRC(1b019eab) SHA1(c9569ca85696825142acc5cde9ac829e82b1ca1b) ) | |
| 1690 | ||
| 1691 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 1692 | ROM_LOAD( "o15-03.rom", 0x00000, 0x20000, CRC(7f245fd3) SHA1(efbcb3663d4accc4f8128a8fee5475bc109bc17a) ) | |
| 1693 | ROM_LOAD( "o15-04.rom", 0x20000, 0x20000, CRC(0b1a1289) SHA1(ce6c06342392d11952873e3b1d6aea8dc02a551c) ) | |
| 1694 | ROM_LOAD( "o15-01.rom", 0x40000, 0x20000, CRC(70570e43) SHA1(acc9baec71b0930cb2f193677e0663efa5d5551d) ) | |
| 1695 | ROM_LOAD( "o15-02.rom", 0x60000, 0x20000, CRC(724b487f) SHA1(06af31520866eea69aebbd5d428f80e882289a15) ) | |
| 1696 | ||
| 1697 | ROM_REGION( 0x40, REGION_PROMS, 0 ) /* nibble bproms, lo/hi order to be determined */ | |
| 1698 | ROM_LOAD( "tp015_14.bpr", 0x00, 0x20, CRC(bc88cced) SHA1(5055362710c0f58823c05fb4c0e0eec638b91e3d) ) /* sprite attribute (flip/position) ?? */ | |
| 1699 | ROM_LOAD( "tp015_15.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */ | |
| 1700 | ROM_END | |
| 1701 | ||
| 2037 | 1702 | ROM_START( demonwld ) |
| 2038 | 1703 | ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* Main 68K code */ |
| 2039 | 1704 | ROM_LOAD16_BYTE( "rom10.v2", 0x000000, 0x20000, CRC(ca8194f3) SHA1(176da6739b35ba38b40150fc62380108bcae5a24) ) |
| r1679 | r1680 | |
| 2425 | 2090 | GAME( 1989, hellfir1, hellfire, hellfire, hellfir1, toaplan1, ROT0, "Toaplan (Taito license)", "Hellfire (1P Ver.)", 0 ) |
| 2426 | 2091 | GAME( 1989, hellfir2, hellfire, hellfire, hellfire, toaplan1, ROT0, "Toaplan (Taito license)", "Hellfire (2P Ver., first edition)", 0 ) |
| 2427 | 2092 | GAME( 1989, zerowing, 0, zerowing, zerowing, toaplan1, ROT0, "Toaplan", "Zero Wing", 0 ) |
| 2093 | GAME( 1989, zerowng2, zerowing, zerowing, zerowng2, toaplan1, ROT0, "[Toaplan] Williams Electronics Games, Inc", "Zero Wing (2 player simultaneous ver.)", 0 ) | |
| 2428 | 2094 | GAME( 1990, demonwld, 0, demonwld, demonwld, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story", 0 ) |
| 2429 | 2095 | GAME( 1989, demonwl1, demonwld, demonwld, demonwl1, demonwld, ROT0, "Toaplan (Taito license)", "Demon's World / Horror Story (Taito license)", 0 ) |
| 2430 | 2096 | GAME( 1989, demonwl2, demonwld, demonwld, demonwl1, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (first edition)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 295 | 295 | |
| 296 | 296 | static VIDEO_START( magic10 ) |
| 297 | 297 | { |
| 298 | layer0_tilemap = tilemap_create(get_layer0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,32,32); | |
| 299 | layer1_tilemap = tilemap_create(get_layer1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,32,32); | |
| 300 | layer2_tilemap = tilemap_create(get_layer2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 298 | layer0_tilemap = tilemap_create(get_layer0_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 299 | layer1_tilemap = tilemap_create(get_layer1_tile_info,tilemap_scan_rows,16,16,32,32); | |
| 300 | layer2_tilemap = tilemap_create(get_layer2_tile_info,tilemap_scan_rows, 8, 8,64,64); | |
| 301 | 301 | |
| 302 | 302 | tilemap_set_transparent_pen(layer1_tilemap,0); |
| 303 | 303 | tilemap_set_transparent_pen(layer2_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 1952 | 1952 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1953 | 1953 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1954 | 1954 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1955 | PORT_ | |
| 1955 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1956 | 1956 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1957 | 1957 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1958 | 1958 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* VBLANK? OBJMPX? */ |
| r1679 | r1680 | |
| 2041 | 2041 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2042 | 2042 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 2043 | 2043 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 2044 | PORT_ | |
| 2044 | PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW | |
| 2045 | 2045 | PORT_DIPNAME( 0x8000, 0x0000, "Freeze" ) /* ?? VBLANK ?? */ |
| 2046 | 2046 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 2047 | 2047 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 2082 | 2082 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* ?? TMNT2: NVBLK */ |
| 2083 | 2083 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2084 | 2084 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2085 | PORT_ | |
| 2085 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 2086 | 2086 | INPUT_PORTS_END |
| 2087 | 2087 | |
| 2088 | 2088 | static INPUT_PORTS_START( ssridr4p ) |
| r1679 | r1680 | |
| 2109 | 2109 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* ?? TMNT2: NVBLK */ |
| 2110 | 2110 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2111 | 2111 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2112 | PORT_ | |
| 2112 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 2113 | 2113 | |
| 2114 | 2114 | PORT_START /* IN2 */ |
| 2115 | 2115 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 2144 | 2144 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* ?? TMNT2: NVBLK */ |
| 2145 | 2145 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2146 | 2146 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2147 | PORT_ | |
| 2147 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 2148 | 2148 | |
| 2149 | 2149 | PORT_START /* IN2 */ |
| 2150 | 2150 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) |
| r1679 | r1680 | |
| 2175 | 2175 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2176 | 2176 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2177 | 2177 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2178 | PORT_ | |
| 2178 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 2179 | 2179 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2180 | 2180 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2181 | PORT_ | |
| 2181 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 2182 | 2182 | |
| 2183 | 2183 | PORT_START /* IN2 */ |
| 2184 | 2184 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) |
| r1679 | r1680 | |
| 2225 | 2225 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* ?? TMNT2: NVBLK (needs to be ACTIVE_HIGH to avoid problems) */ |
| 2226 | 2226 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2227 | 2227 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2228 | PORT_ | |
| 2228 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 2229 | 2229 | INPUT_PORTS_END |
| 2230 | 2230 | |
| 2231 | 2231 | static INPUT_PORTS_START( thndrx2 ) |
| r1679 | r1680 | |
| 2234 | 2234 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2235 | 2235 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2236 | 2236 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2237 | PORT_ | |
| 2237 | PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW | |
| 2238 | 2238 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2239 | 2239 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2240 | 2240 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 2256 | 2256 | PORT_START |
| 2257 | 2257 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2258 | 2258 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2259 | PORT_ | |
| 2259 | PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW | |
| 2260 | 2260 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2261 | 2261 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2262 | 2262 | PORT_DIPNAME( 0x1000, 0x0000, "Sound" ) |
| r1679 | r1680 | |
|---|---|---|
| 301 | 301 | case 0xe: |
| 302 | 302 | { |
| 303 | 303 | attotime rate = attotime_mul(ATTOTIME_IN_HZ(MC68681_1_CLOCK), 16 * duart_1.CT); |
| 304 | timer_adjust(duart_1_timer, rate, 0, rate); | |
| 304 | timer_adjust_periodic(duart_1_timer, rate, 0, rate); | |
| 305 | 305 | break; |
| 306 | 306 | } |
| 307 | 307 | case 0xf: |
| r1679 | r1680 | |
|---|---|---|
| 1554 | 1554 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1555 | 1555 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1556 | 1556 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1557 | PORT_ | |
| 1557 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW | |
| 1558 | 1558 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1559 | 1559 | INPUT_PORTS_END |
| 1560 | 1560 |
| r1679 | r1680 | |
|---|---|---|
| 252 | 252 | |
| 253 | 253 | static VIDEO_START( raiden2 ) |
| 254 | 254 | { |
| 255 | text_layer = tilemap_create(get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 64,32 ); | |
| 256 | background_layer = tilemap_create(get_back_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 ); | |
| 257 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 ); | |
| 258 | foreground_layer = tilemap_create(get_fore_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 16,16, 32,32 ); | |
| 255 | text_layer = tilemap_create(get_text_tile_info, tilemap_scan_rows, 8, 8, 64,32 ); | |
| 256 | background_layer = tilemap_create(get_back_tile_info, tilemap_scan_rows, 16,16, 32,32 ); | |
| 257 | midground_layer = tilemap_create(get_mid_tile_info, tilemap_scan_rows, 16,16, 32,32 ); | |
| 258 | foreground_layer = tilemap_create(get_fore_tile_info, tilemap_scan_rows, 16,16, 32,32 ); | |
| 259 | 259 | |
| 260 | 260 | tilemap_set_transparent_pen(midground_layer, 15); |
| 261 | 261 | tilemap_set_transparent_pen(foreground_layer, 15); |
| r1679 | r1680 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | static VIDEO_START( mogura ) |
| 57 | 57 | { |
| 58 | mogura_tilemap = tilemap_create(get_mogura_tile_info,tilemap_scan_rows, | |
| 58 | mogura_tilemap = tilemap_create(get_mogura_tile_info,tilemap_scan_rows, | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | static VIDEO_UPDATE( mogura ) |
| r1679 | r1680 | |
|---|---|---|
| 1301 | 1301 | PORT_START /* service */ |
| 1302 | 1302 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1303 | 1303 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1304 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 1305 | PORT_BIT(0x08, 0x08, IPT_TILT ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_T) | |
| 1304 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) | |
| 1305 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1306 | 1306 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1307 | 1307 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1308 | 1308 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 167 | 167 | next_v256 = irq_trigger_v256s[next_irq_number]; |
| 168 | 168 | |
| 169 | 169 | next_vpos = vysnc_chain_counter_to_vpos(next_counter, next_v256); |
| 170 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_irq_number | |
| 170 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_irq_number | |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| r1679 | r1680 | |
| 180 | 180 | static void start_irq_timer(void) |
| 181 | 181 | { |
| 182 | 182 | int vpos = vysnc_chain_counter_to_vpos(irq_trigger_counts[0], irq_trigger_v256s[0]); |
| 183 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 183 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
| r1679 | r1680 | |
| 244 | 244 | next_v256 = nmi_trigger_v256s[next_nmi_number]; |
| 245 | 245 | |
| 246 | 246 | next_vpos = vysnc_chain_counter_to_vpos(next_counter, next_v256); |
| 247 | timer_adjust(nmi_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_nmi_number | |
| 247 | timer_adjust_oneshot(nmi_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_nmi_number | |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | |
| r1679 | r1680 | |
| 257 | 257 | static void start_nmi_timer(void) |
| 258 | 258 | { |
| 259 | 259 | int vpos = vysnc_chain_counter_to_vpos(nmi_trigger_counts[0], nmi_trigger_v256s[0]); |
| 260 | timer_adjust(nmi_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 260 | timer_adjust_oneshot(nmi_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 |
| r1679 | r1680 | |
|---|---|---|
| 532 | 532 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_SPECIAL ) \ |
| 533 | 533 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 534 | 534 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 535 | PORT_ | |
| 535 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW | |
| 536 | 536 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_TILT ) \ |
| 537 | 537 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) // From Sound CPU |
| 538 | 538 |
| r1679 | r1680 | |
|---|---|---|
| 174 | 174 | static VIDEO_START( dynadice ) |
| 175 | 175 | { |
| 176 | 176 | /* pacman - style videoram layout */ |
| 177 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 178 | top_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,2,32); | |
| 177 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 178 | top_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,8,8,2,32); | |
| 179 | 179 | tilemap_set_scrollx(bg_tilemap, 0, -16 ); |
| 180 | 180 | } |
| 181 | 181 |
| r1679 | r1680 | |
|---|---|---|
| 255 | 255 | |
| 256 | 256 | static VIDEO_START( dacholer ) |
| 257 | 257 | { |
| 258 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); | |
| 259 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); | |
| 258 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 259 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,32,32); | |
| 260 | 260 | |
| 261 | 261 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 262 | 262 | } |
| r1679 | r1680 | |
|---|---|---|
| 1517 | 1517 | PORT_START_TAG("IN0") \ |
| 1518 | 1518 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \ |
| 1519 | 1519 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \ |
| 1520 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) /* Test Button */ \ | |
| 1521 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ | |
| 1520 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) /* Test Button A */ \ | |
| 1521 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service Button A */ \ | |
| 1522 | 1522 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 1523 | 1523 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) \ |
| 1524 | 1524 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1758 | 1758 | PORT_START_TAG("IN0") \ |
| 1759 | 1759 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1760 | 1760 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1761 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) /* Test Button */ \ | |
| 1762 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1761 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) /* Test Button A */ | |
| 1762 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service Button A */ | |
| 1763 | 1763 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START3 ) /* Select 3 */ |
| 1764 | 1764 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Pole Left */ |
| 1765 | 1765 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) /* Select 1 */ |
| 1766 | 1766 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) /* Select 2 */ |
| 1767 | 1767 | |
| 1768 | 1768 | PORT_START_TAG("IN1") \ |
| 1769 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button B") PORT_CODE(KEYCODE_8) \ | |
| 1770 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Button B") PORT_CODE(KEYCODE_7) \ | |
| 1769 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button B") PORT_CODE(KEYCODE_8) | |
| 1770 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Button B") PORT_CODE(KEYCODE_7) | |
| 1771 | 1771 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1772 | 1772 | |
| 1773 | 1773 | PORT_START |
| r1679 | r1680 | |
|---|---|---|
| 312 | 312 | via_0_ca1_w(0, (UINT8)param); |
| 313 | 313 | |
| 314 | 314 | if (param) |
| 315 | timer_adjust(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 315 | timer_adjust_oneshot(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 316 | 316 | else |
| 317 | timer_adjust(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBEND, 0), 1 | |
| 317 | timer_adjust_oneshot(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBEND, 0), 1 | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | |
| r1679 | r1680 | |
| 326 | 326 | |
| 327 | 327 | static void start_via_0_timer(void) |
| 328 | 328 | { |
| 329 | timer_adjust(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 329 | timer_adjust_oneshot(via_0_ca1_timer, video_screen_get_time_until_pos(0, VBSTART, 0), 0 | |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 |
| r1679 | r1680 | |
|---|---|---|
| 12 | 12 | #include "deprecat.h" |
| 13 | 13 | #include "sound/sn76496.h" |
| 14 | 14 | |
| 15 | ||
| 16 | extern UINT8 *ikki_scroll; | |
| 17 | ||
| 15 | 18 | PALETTE_INIT( ikki ); |
| 19 | VIDEO_START( ikki ); | |
| 16 | 20 | VIDEO_UPDATE( ikki ); |
| 17 | 21 | |
| 22 | ||
| 18 | 23 | /****************************************************************************/ |
| 19 | 24 | |
| 20 | WRITE8_HANDLER( ikki_scroll_w ); | |
| 21 | 25 | WRITE8_HANDLER( ikki_scrn_ctrl_w ); |
| 22 | 26 | |
| 23 | 27 | static READ8_HANDLER( ikki_e000_r ) |
| r1679 | r1680 | |
| 50 | 54 | AM_RANGE(0xe005, 0xe005) AM_READ(input_port_3_r) /* player2 */ |
| 51 | 55 | AM_RANGE(0xe008, 0xe008) AM_WRITE(ikki_scrn_ctrl_w) |
| 52 | 56 | AM_RANGE(0xe009, 0xe009) AM_WRITE(ikki_coin_counters) |
| 53 | AM_RANGE(0xe00a, 0xe00b) AM_WRITE(ikki_scroll | |
| 57 | AM_RANGE(0xe00a, 0xe00b) AM_WRITE(MWA8_RAM) AM_BASE(&ikki_scroll | |
| 54 | 58 | ADDRESS_MAP_END |
| 55 | 59 | |
| 56 | 60 | static ADDRESS_MAP_START( ikki_cpu2, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1679 | r1680 | |
| 208 | 212 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 209 | 213 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 210 | 214 | MDRV_GFXDECODE(ikki) |
| 211 | MDRV_PALETTE_LENGTH(256+1) | |
| 212 | MDRV_COLORTABLE_LENGTH(1024) | |
| 215 | MDRV_PALETTE_LENGTH(1024) | |
| 213 | 216 | |
| 214 | 217 | MDRV_PALETTE_INIT(ikki) |
| 215 | MDRV_VIDEO_START( | |
| 218 | MDRV_VIDEO_START( | |
| 216 | 219 | MDRV_VIDEO_UPDATE(ikki) |
| 217 | 220 | |
| 218 | 221 | /* sound hardware */ |
| r1679 | r1680 | |
|---|---|---|
| 319 | 319 | PORT_START /* FAKE */ |
| 320 | 320 | /* This fake input port is used to get the status of the F2 key, */ |
| 321 | 321 | /* and activate the test mode, which is triggered by a NMI */ |
| 322 | PORT_ | |
| 322 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH | |
| 323 | 323 | INPUT_PORTS_END |
| 324 | 324 | |
| 325 | 325 |
| r1679 | r1680 | |
|---|---|---|
| 23 | 23 | |
| 24 | 24 | #include "driver.h" |
| 25 | 25 | #include "sound/ay8910.h" |
| 26 | #include "video/ | |
| 26 | #include "video/m | |
| 27 | 27 | |
| 28 | static mc6845_t *mc6845; | |
| 28 | 29 | static UINT8 *ssingles_videoram; |
| 29 | 30 | static UINT8 *ssingles_colorram; |
| 30 | 31 | static UINT8 prot_data; |
| r1679 | r1680 | |
| 83 | 84 | } |
| 84 | 85 | } |
| 85 | 86 | |
| 86 | static const c | |
| 87 | static const mc | |
| 87 | 88 | { |
| 88 | 89 | 0, |
| 89 | 90 | 1000000, /* ? MHz */ |
| r1679 | r1680 | |
| 104 | 105 | ssingles_colorram[offset]=data; |
| 105 | 106 | } |
| 106 | 107 | |
| 108 | static WRITE8_HANDLER( ssingles_mc6845_address_w ) | |
| 109 | { | |
| 110 | mc6845_address_w(mc6845, data); | |
| 111 | } | |
| 112 | ||
| 113 | ||
| 114 | static WRITE8_HANDLER( ssingles_mc6845_register_w ) | |
| 115 | { | |
| 116 | mc6845_register_w(mc6845, data); | |
| 117 | } | |
| 118 | ||
| 119 | ||
| 107 | 120 | static VIDEO_START(ssingles) |
| 108 | 121 | { |
| 109 | c | |
| 122 | mc6845 = mc6845_config( | |
| 110 | 123 | |
| 111 | 124 | { |
| 112 | 125 | int i; |
| r1679 | r1680 | |
| 118 | 131 | } |
| 119 | 132 | |
| 120 | 133 | |
| 134 | static VIDEO_UPDATE( ssingles ) | |
| 135 | { | |
| 136 | mc6845_update(mc6845, bitmap, cliprect); | |
| 137 | ||
| 138 | return 0; | |
| 139 | } | |
| 140 | ||
| 141 | ||
| 121 | 142 | static READ8_HANDLER(c000_r) |
| 122 | 143 | { |
| 123 | 144 | return prot_data; |
| r1679 | r1680 | |
| 171 | 192 | AM_RANGE(0x18, 0x18) AM_READ(input_port_3_r) |
| 172 | 193 | AM_RANGE(0x1c, 0x1c) AM_READ(controls_r) |
| 173 | 194 | AM_RANGE(0x1a, 0x1a) AM_WRITENOP //video/crt related |
| 174 | AM_RANGE(0xfe, 0xfe) AM_WRITE(crtc6845_address_w) | |
| 175 | AM_RANGE(0xff, 0xff) AM_WRITE(crtc6845_register_w) | |
| 195 | AM_RANGE(0xfe, 0xfe) AM_WRITE(ssingles_mc6845_address_w) | |
| 196 | AM_RANGE(0xff, 0xff) AM_WRITE(ssingles_mc6845_register_w) | |
| 176 | 197 | |
| 177 | 198 | ADDRESS_MAP_END |
| 178 | 199 | |
| r1679 | r1680 | |
| 263 | 284 | MDRV_PALETTE_LENGTH(4) //guess |
| 264 | 285 | |
| 265 | 286 | MDRV_VIDEO_START(ssingles) |
| 266 | MDRV_VIDEO_UPDATE( | |
| 287 | MDRV_VIDEO_UPDATE(ssingles) | |
| 267 | 288 | |
| 268 | 289 | /* sound hardware */ |
| 269 | 290 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1679 | r1680 | |
|---|---|---|
| 442 | 442 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 443 | 443 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START1 ) |
| 444 | 444 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 445 | PORT_ | |
| 445 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW | |
| 446 | 446 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 447 | 447 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 448 | 448 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* door */ |
| r1679 | r1680 | |
| 546 | 546 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 547 | 547 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START1 ) |
| 548 | 548 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 549 | PORT_ | |
| 549 | PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW | |
| 550 | 550 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 551 | 551 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 552 | 552 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* door */ |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | static VIDEO_START( skyarmy ) |
| 101 | 101 | { |
| 102 | skyarmy_tilemap = tilemap_create(get_skyarmy_tile_info,tilemap_scan_rows, | |
| 102 | skyarmy_tilemap = tilemap_create(get_skyarmy_tile_info,tilemap_scan_rows, | |
| 103 | 103 | tilemap_set_scroll_cols(skyarmy_tilemap,32); |
| 104 | 104 | } |
| 105 | 105 |
| r1679 | r1680 | |
|---|---|---|
| 225 | 225 | #include "qix.h" |
| 226 | 226 | #include "cpu/m6805/m6805.h" |
| 227 | 227 | #include "machine/6821pia.h" |
| 228 | #include "video/crtc6845.h" | |
| 229 | 228 | #include "sound/sn76496.h" |
| 230 | 229 | #include "sound/discrete.h" |
| 231 | 230 | |
| r1679 | r1680 | |
| 290 | 289 | AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w) |
| 291 | 290 | AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITE(MWA8_RAM) AM_BASE(&qix_videoaddress) |
| 292 | 291 | AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READ(qix_scanline_r) |
| 293 | AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(crtc6845_0_address_w) | |
| 294 | AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(crtc6845_0_register_r, crtc6845_0_register_w) | |
| 292 | AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_mc6845_address_w) | |
| 293 | AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_mc6845_register_r, qix_mc6845_register_w) | |
| 295 | 294 | AM_RANGE(0xa000, 0xffff) AM_ROM |
| 296 | 295 | ADDRESS_MAP_END |
| 297 | 296 | |
| r1679 | r1680 | |
| 308 | 307 | AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w) |
| 309 | 308 | AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITE(MWA8_RAM) AM_BASE(&qix_videoaddress) |
| 310 | 309 | AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READ(qix_scanline_r) |
| 311 | AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(crtc6845_0_address_w) | |
| 312 | AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(crtc6845_0_register_r, crtc6845_0_register_w) | |
| 310 | AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_mc6845_address_w) | |
| 311 | AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_mc6845_register_r, qix_mc6845_register_w) | |
| 313 | 312 | AM_RANGE(0xa000, 0xbfff) AM_ROMBANK(1) |
| 314 | 313 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 315 | 314 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 631 | 630 | |
| 632 | 631 | /* video hardware */ |
| 633 | 632 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 634 | MDRV_PALETTE_LENGTH(1024) | |
| 635 | 633 | MDRV_VIDEO_START(qix) |
| 636 | MDRV_VIDEO_UPDATE( | |
| 634 | MDRV_VIDEO_UPDATE(qix | |
| 637 | 635 | |
| 638 | 636 | MDRV_SCREEN_ADD("main", 0) |
| 639 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 637 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32 | |
| 640 | 638 | MDRV_SCREEN_RAW_PARAMS(QIX_CHARACTER_CLOCK*8, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */ |
| 641 | 639 | |
| 642 | 640 | /* sound hardware */ |
| r1679 | r1680 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | static VIDEO_START( suprgolf ) |
| 64 | 64 | { |
| 65 | suprgolf_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 65 | suprgolf_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | static VIDEO_UPDATE( suprgolf ) |
| r1679 | r1680 | |
|---|---|---|
| 331 | 331 | xexex_objdma(0); |
| 332 | 332 | |
| 333 | 333 | // schedule DMA end interrupt |
| 334 | timer_adjust(dmadelay_timer, XE_DMADELAY, 0 | |
| 334 | timer_adjust_oneshot(dmadelay_timer, XE_DMADELAY, 0 | |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | // IRQ 4 is the V-blank interrupt. It controls color, sound and |
| r1679 | r1680 | |
| 438 | 438 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 439 | 439 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 440 | 440 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 441 | PORT_ | |
| 441 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 442 | 442 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 443 | 443 | |
| 444 | 444 | PORT_START |
| r1679 | r1680 | |
|---|---|---|
| 127 | 127 | |
| 128 | 128 | static VIDEO_START( wallc ) |
| 129 | 129 | { |
| 130 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y, | |
| 130 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y, | |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | static VIDEO_UPDATE( wallc ) |
| r1679 | r1680 | |
|---|---|---|
| 354 | 354 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 355 | 355 | //freezes the game before the reset |
| 356 | 356 | //doesn't seem to be done as a dip, but what about mixing with diops like this? |
| 357 | PORT_ | |
| 357 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH | |
| 358 | 358 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 359 | 359 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| 360 | 360 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r1679 | r1680 | |
| 450 | 450 | |
| 451 | 451 | static VIDEO_START( marinedt ) |
| 452 | 452 | { |
| 453 | tx_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 453 | tx_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 454 | 454 | |
| 455 | 455 | tilemap_set_transparent_pen(tx_tilemap, 0); |
| 456 | 456 | tilemap_set_scrolldx(tx_tilemap, 0, 4*8); |
| r1679 | r1680 | |
|---|---|---|
| 413 | 413 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 414 | 414 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 415 | 415 | MDRV_GFXDECODE(ironhors) |
| 416 | MDRV_PALETTE_LENGTH(256) | |
| 417 | MDRV_COLORTABLE_LENGTH(16*8*16+16*8*16) | |
| 416 | MDRV_PALETTE_LENGTH(16*8*16+16*8*16) | |
| 418 | 417 | |
| 419 | 418 | MDRV_PALETTE_INIT(ironhors) |
| 420 | 419 | MDRV_VIDEO_START(ironhors) |
| r1679 | r1680 | |
|---|---|---|
| 474 | 474 | PORT_BIT( 0x040000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 475 | 475 | PORT_BIT( 0x080000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 476 | 476 | PORT_BIT( 0x100000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 477 | PORT_ | |
| 477 | PORT_SERVICE_NO_TOGGLE( 0x200000, IP_ACTIVE_LOW | |
| 478 | 478 | PORT_BIT( 0x400000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 479 | 479 | PORT_BIT( 0x800000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 480 | 480 |
| r1679 | r1680 | |
|---|---|---|
| 2437 | 2437 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2438 | 2438 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2439 | 2439 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2440 | PORT_ | |
| 2440 | PORT_SERVICE_NO_TOGGLE( 0x00020000, IP_ACTIVE_LOW | |
| 2441 | 2441 | PORT_BIT( 0x00fc0000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2442 | 2442 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2443 | 2443 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 2522 | 2522 | { |
| 2523 | 2523 | fastboot_timer = timer_alloc(fastboot_timer_callback, NULL); |
| 2524 | 2524 | // printf("reset\n"); |
| 2525 | timer_adjust(fastboot_timer, attotime_zero, 0 | |
| 2525 | timer_adjust_oneshot(fastboot_timer, attotime_zero, 0 | |
| 2526 | 2526 | } |
| 2527 | 2527 | } |
| 2528 | 2528 |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | $0000-$1bff Video Memory (bit0) |
| 22 | 22 | $4000-$5bff Video Memory (bit1) |
| 23 | 23 | $8000-$9bff Video Memory (bit2) |
| 24 | $c000-$c001 6845 CRT Controller ( | |
| 24 | $c000-$c001 6845 CRT Controller (m | |
| 25 | 25 | $c020-$c027 NVRAM |
| 26 | 26 | $c044-$c047 MC6821 PIA 1 (Control input port - all input) |
| 27 | 27 | $c048-$c04b MC6821 PIA 2 (Sprite data port - see machine/spiders.c) |
| r1679 | r1680 | |
| 36 | 36 | $0000-$1bff Video Memory (bit0) |
| 37 | 37 | $4000-$5bff Video Memory (bit1) |
| 38 | 38 | $8000-$9bff Video Memory (bit2) |
| 39 | $c000-$c001 6845 CRT Controller ( | |
| 39 | $c000-$c001 6845 CRT Controller (m | |
| 40 | 40 | $c044-$c047 MC6821 PIA 1 |
| 41 | 41 | $c048-$c04b MC6821 PIA 2 (Video port) |
| 42 | 42 | $c050-$c053 MC6821 PIA 3 |
| r1679 | r1680 | |
| 192 | 192 | #include "deprecat.h" |
| 193 | 193 | #include "cpu/m6800/m6800.h" |
| 194 | 194 | #include "cpu/m6809/m6809.h" |
| 195 | #include "video/ | |
| 195 | #include "video/m | |
| 196 | 196 | #include "machine/6821pia.h" |
| 197 | 197 | #include "machine/74123.h" |
| 198 | 198 | #include "spiders.h" |
| r1679 | r1680 | |
| 203 | 203 | #define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16) |
| 204 | 204 | |
| 205 | 205 | |
| 206 | static mc6845_t *mc6845; | |
| 206 | 207 | static UINT8 *spiders_ram; |
| 207 | 208 | static UINT8 flipscreen; |
| 208 | 209 | static UINT16 gfx_rom_address; |
| r1679 | r1680 | |
| 409 | 410 | #define NUM_PENS (8) |
| 410 | 411 | |
| 411 | 412 | |
| 413 | static WRITE8_HANDLER( spiders_mc6845_address_w ) | |
| 414 | { | |
| 415 | mc6845_address_w(mc6845, data); | |
| 416 | } | |
| 417 | ||
| 418 | ||
| 419 | static READ8_HANDLER( spiders_mc6845_register_r ) | |
| 420 | { | |
| 421 | return mc6845_register_r(mc6845); | |
| 422 | } | |
| 423 | ||
| 424 | ||
| 425 | static WRITE8_HANDLER( spiders_mc6845_register_w ) | |
| 426 | { | |
| 427 | mc6845_register_w(mc6845, data); | |
| 428 | } | |
| 429 | ||
| 430 | ||
| 412 | 431 | static WRITE8_HANDLER( flipscreen_w ) |
| 413 | 432 | { |
| 414 | 433 | flipscreen = data; |
| 415 | 434 | } |
| 416 | 435 | |
| 417 | 436 | |
| 418 | static void *begin_update(running_machine *machine, int screen, | |
| 419 | mame_bitmap *bitmap, const rectangle *cliprect) | |
| 437 | static void *begin_update(mame_bitmap *bitmap, const rectangle *cliprect) | |
| 420 | 438 | { |
| 421 | 439 | /* create the pens */ |
| 422 | 440 | offs_t i; |
| r1679 | r1680 | |
| 497 | 515 | } |
| 498 | 516 | |
| 499 | 517 | |
| 500 | static const c | |
| 518 | static const mc | |
| 501 | 519 | { |
| 502 | 520 | 0, /* screen we are acting on */ |
| 503 | 521 | CRTC_CLOCK, /* the clock (pin 21) of the chip */ |
| r1679 | r1680 | |
| 512 | 530 | static VIDEO_START( spiders ) |
| 513 | 531 | { |
| 514 | 532 | /* configure the CRT controller */ |
| 515 | c | |
| 533 | mc6845 = mc6845_config( | |
| 516 | 534 | } |
| 517 | 535 | |
| 518 | 536 | |
| 537 | static VIDEO_UPDATE( spiders ) | |
| 538 | { | |
| 539 | mc6845_update(mc6845, bitmap, cliprect); | |
| 519 | 540 | |
| 541 | return 0; | |
| 542 | } | |
| 543 | ||
| 544 | ||
| 545 | ||
| 520 | 546 | /************************************* |
| 521 | 547 | * |
| 522 | 548 | * Graphics ROM access - see the |
| r1679 | r1680 | |
| 565 | 591 | |
| 566 | 592 | static ADDRESS_MAP_START( spiders_main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 567 | 593 | AM_RANGE(0x0000, 0xbfff) AM_RAM AM_BASE(&spiders_ram) |
| 568 | AM_RANGE(0xc000, 0xc000) AM_WRITE(crtc6845_address_w) | |
| 569 | AM_RANGE(0xc001, 0xc001) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 594 | AM_RANGE(0xc000, 0xc000) AM_WRITE(spiders_mc6845_address_w) | |
| 595 | AM_RANGE(0xc001, 0xc001) AM_READWRITE(spiders_mc6845_register_r, spiders_mc6845_register_w) | |
| 570 | 596 | AM_RANGE(0xc020, 0xc027) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 571 | 597 | AM_RANGE(0xc044, 0xc047) AM_READWRITE(pia_1_r, pia_1_w) |
| 572 | 598 | AM_RANGE(0xc048, 0xc04b) AM_READWRITE(pia_2_alt_r, pia_2_alt_w) |
| r1679 | r1680 | |
| 597 | 623 | PORT_START /* IN0 */ |
| 598 | 624 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 599 | 625 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 600 | PORT_ | |
| 626 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_HIGH | |
| 601 | 627 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 602 | 628 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 603 | 629 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| r1679 | r1680 | |
| 702 | 728 | /* video hardware */ |
| 703 | 729 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 704 | 730 | MDRV_VIDEO_START(spiders) |
| 705 | MDRV_VIDEO_UPDATE( | |
| 731 | MDRV_VIDEO_UPDATE(spiders | |
| 706 | 732 | |
| 707 | 733 | MDRV_SCREEN_ADD("main", 0) |
| 708 | 734 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| r1679 | r1680 | |
|---|---|---|
| 431 | 431 | current_bank = 2; |
| 432 | 432 | memory_set_bankptr(1, &Z80[0x10000]); |
| 433 | 433 | |
| 434 | NMK112_init(0); | |
| 434 | 435 | MACHINE_RESET_CALL(toaplan2); |
| 435 | 436 | } |
| 436 | 437 |
| r1679 | r1680 | |
|---|---|---|
| 251 | 251 | /* video hardware */ |
| 252 | 252 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 253 | 253 | MDRV_GFXDECODE(jailbrek) |
| 254 | MDRV_PALETTE_LENGTH(32) | |
| 255 | MDRV_COLORTABLE_LENGTH(512) | |
| 254 | MDRV_PALETTE_LENGTH(512) | |
| 256 | 255 | |
| 257 | 256 | MDRV_SCREEN_ADD("main", 0) |
| 258 | 257 | MDRV_SCREEN_RAW_PARAMS(MASTER_CLOCK/3, 396, 8, 248, 256, 16, 240) |
| r1679 | r1680 | |
|---|---|---|
| 36 | 36 | #include "driver.h" |
| 37 | 37 | #include "machine/8255ppi.h" |
| 38 | 38 | #include "sound/ay8910.h" |
| 39 | #include "video/ | |
| 39 | #include "video/m | |
| 40 | 40 | |
| 41 | 41 | static tilemap *bg_tilemap; |
| 42 | static mc6845_t *mc6845; | |
| 42 | 43 | static UINT8 *vram_lo,*vram_hi; |
| 43 | 44 | static UINT8 *backup_ram; |
| 44 | 45 | |
| r1679 | r1680 | |
| 53 | 54 | ---- ---- xxxx xxxx tile number |
| 54 | 55 | */ |
| 55 | 56 | |
| 57 | static WRITE8_HANDLER( couple_mc6845_address_w ) | |
| 58 | { | |
| 59 | mc6845_address_w(mc6845, data); | |
| 60 | } | |
| 61 | ||
| 62 | static WRITE8_HANDLER( couple_mc6845_register_w ) | |
| 63 | { | |
| 64 | mc6845_register_w(mc6845, data); | |
| 65 | } | |
| 66 | ||
| 56 | 67 | static TILE_GET_INFO( get_tile_info ) |
| 57 | 68 | { |
| 58 | 69 | UINT16 vram_data = (((vram_hi[tile_index] & 0xff) << 8) | (vram_lo[tile_index] & 0xff)); |
| r1679 | r1680 | |
| 65 | 76 | |
| 66 | 77 | static VIDEO_START( couple ) |
| 67 | 78 | { |
| 68 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 79 | mc6845 = mc6845_config(NULL); | |
| 80 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 69 | 81 | } |
| 70 | 82 | |
| 71 | 83 | static VIDEO_UPDATE( couple ) |
| r1679 | r1680 | |
| 146 | 158 | // AM_RANGE( 0xc000, 0xc00f ) AM_READ(dummy_inputs_r) |
| 147 | 159 | // AM_RANGE( 0xc008, 0xc008 ) AM_READ(input_port_0_r) |
| 148 | 160 | // AM_RANGE( 0xc00a, 0xc00a ) AM_READ(input_port_1_r) |
| 149 | AM_RANGE( 0xe000, 0xe000 ) AM_WRITE(crtc6845_address_w) | |
| 150 | AM_RANGE( 0xe001, 0xe001 ) AM_WRITE(crtc6845_register_w) | |
| 161 | AM_RANGE( 0xe000, 0xe000 ) AM_WRITE(couple_mc6845_address_w) | |
| 162 | AM_RANGE( 0xe001, 0xe001 ) AM_WRITE(couple_mc6845_register_w) | |
| 151 | 163 | AM_RANGE( 0xe800, 0xefff ) AM_READWRITE(MRA8_RAM, couple_vram_hi_w) AM_BASE(&vram_hi) |
| 152 | 164 | AM_RANGE( 0xf000, 0xf7ff ) AM_READWRITE(MRA8_RAM, couple_vram_lo_w) AM_BASE(&vram_lo) |
| 153 | 165 | AM_RANGE( 0xf800, 0xfbff ) AM_RAM /*extra VRAM?*/ |
| r1679 | r1680 | |
|---|---|---|
| 916 | 916 | |
| 917 | 917 | /* if we're a timer, adjust the timer to fire again */ |
| 918 | 918 | if (galileo.reg[GREG_TIMER_CONTROL] & (2 << (2 * which))) |
| 919 | timer_adjust(timer->timer, attotime_mul(TIMER_PERIOD, timer->count), which | |
| 919 | timer_adjust_oneshot(timer->timer, attotime_mul(TIMER_PERIOD, timer->count), which | |
| 920 | 920 | else |
| 921 | 921 | timer->active = timer->count = 0; |
| 922 | 922 | |
| r1679 | r1680 | |
| 1227 | 1227 | if (which != 0) |
| 1228 | 1228 | timer->count &= 0xffffff; |
| 1229 | 1229 | } |
| 1230 | timer_adjust(timer->timer, attotime_mul(TIMER_PERIOD, timer->count), which | |
| 1230 | timer_adjust_oneshot(timer->timer, attotime_mul(TIMER_PERIOD, timer->count), which | |
| 1231 | 1231 | if (LOG_TIMERS) |
| 1232 | 1232 | logerror("Adjusted timer to fire in %f secs\n", attotime_to_double(attotime_mul(TIMER_PERIOD, timer->count))); |
| 1233 | 1233 | } |
| r1679 | r1680 | |
| 1236 | 1236 | UINT32 elapsed = attotime_to_double(attotime_mul(timer_timeelapsed(timer->timer), SYSTEM_CLOCK)); |
| 1237 | 1237 | timer->active = 0; |
| 1238 | 1238 | timer->count = (timer->count > elapsed) ? (timer->count - elapsed) : 0; |
| 1239 | timer_adjust(timer->timer, attotime_never, which | |
| 1239 | timer_adjust_oneshot(timer->timer, attotime_never, which | |
| 1240 | 1240 | if (LOG_TIMERS) |
| 1241 | 1241 | logerror("Disabled timer\n"); |
| 1242 | 1242 | } |
| r1679 | r1680 | |
| 1812 | 1812 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1813 | 1813 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 1814 | 1814 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 1815 | PORT_ | |
| 1815 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 1816 | 1816 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 1817 | 1817 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1818 | 1818 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 113 | 113 | if (offset == 0x0c) |
| 114 | 114 | { |
| 115 | 115 | attotime timer = attotime_mul(ROCKN_TIMER_BASE, 4096 - data); |
| 116 | timer_adjust(rockn_timer_l4, timer, 0, timer); | |
| 116 | timer_adjust_periodic(rockn_timer_l4, timer, 0, timer); | |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | } |
| r1679 | r1680 | |
| 127 | 127 | if (offset == 0x0c) |
| 128 | 128 | { |
| 129 | 129 | attotime timer = attotime_mul(ROCKN_TIMER_BASE, 4096 - data); |
| 130 | timer_adjust(rockn_timer_sub_l4, timer, 0, timer); | |
| 130 | timer_adjust_periodic(rockn_timer_sub_l4, timer, 0, timer); | |
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | } |
| r1679 | r1680 | |
|---|---|---|
| 86 | 86 | static VIDEO_START(lucky8) |
| 87 | 87 | { |
| 88 | 88 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 89 | | |
| 89 | | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | static VIDEO_UPDATE(lucky8) |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | |
| 3 | | |
| 4 | 4 | |
| 5 | 5 | driver by Luca Elia (l.elia@tin.it) |
| 6 | 6 | |
| r1679 | r1680 | |
| 8 | 8 | CPU: 68000 |
| 9 | 9 | Video: Blitter, double framebuffer |
| 10 | 10 | Sound: OKI6295 |
| 11 | ||
| 12 | [Touch Master] | |
| 13 | ||
| 11 | 14 | Input: Pressure sensitive touch screen |
| 12 | 15 | Other: Dallas NVRAM + optional RTC |
| 13 | ||
| 14 | ||
| 15 | 16 | To Do: |
| 16 | 17 | |
| 17 | 18 | - Proper touchscreen controller emulation. Currently it's flakey and |
| r1679 | r1680 | |
| 21 | 22 | - RTC emulation (there's code to check the upper bytes of NVRAM to see if |
| 22 | 23 | the real time clock is present, and to only use it in that case) |
| 23 | 24 | |
| 25 | [Galaxy Games] | |
| 24 | 26 | |
| 27 | Input: Trackballs and buttons | |
| 28 | Other: EEPROM | |
| 29 | To Do: | |
| 30 | ||
| 31 | - Coin optics | |
| 32 | ||
| 25 | 33 | ***************************************************************************/ |
| 26 | 34 | |
| 27 | 35 | #include "driver.h" |
| 28 | 36 | #include "deprecat.h" |
| 29 | 37 | #include "sound/okim6295.h" |
| 38 | #include "machine/eeprom.h" | |
| 30 | 39 | |
| 31 | 40 | /*************************************************************************** |
| 32 | 41 | |
| r1679 | r1680 | |
| 125 | 134 | |
| 126 | 135 | Video & Blitter |
| 127 | 136 | |
| 137 | ||
| 138 | Offset: Bits: Value: | |
| 139 | ||
| 140 | 02 | |
| 141 | fedc ba-- ---- ---- | |
| 142 | ---- --9- ---- ---- Layer 1 Buffer To Display | |
| 143 | ---- ---8 ---- ---- Layer 0 Buffer To Display | |
| 144 | ---- ---- 7654 3210 | |
| 145 | ||
| 146 | 04 Width | |
| 147 | 06 X | |
| 148 | ||
| 149 | 08 Height - 1 | |
| 150 | 0A Y | |
| 151 | ||
| 152 | 0C Source Address (low) | |
| 153 | 0E Source Address (mid) | |
| 154 | ||
| 155 | 10 fedc ba98 ---- ---- | |
| 156 | ---- ---- 7--- ---- Layer | |
| 157 | ---- ---- -6-- ---- Buffer | |
| 158 | ---- ---- --5- ---- Solid Fill | |
| 159 | ---- ---- ---4 ---- flipped by lev.3 interrupt routine | |
| 160 | ---- ---- ---- 3--- flipped by lev.2 interrupt routine | |
| 161 | ---- ---- ---- -2-- flipped by lev.1 interrupt routine | |
| 162 | ---- ---- ---- --1- Flip Y | |
| 163 | ---- ---- ---- ---0 Flip X | |
| 164 | ||
| 165 | 12 fedc ba98 ---- ---- Solid Fill Pen | |
| 166 | ---- ---- 7654 3210 Source Address (high) | |
| 167 | ||
| 168 | A write to the source address (high) triggers the blit. | |
| 169 | A the end of the blit, a level 2 IRQ is issued. | |
| 170 | ||
| 128 | 171 | ***************************************************************************/ |
| 129 | 172 | |
| 130 | static mame_bitmap *tmaster_bitmap[2]; | |
| 173 | static mame_bitmap *tmaster_bitmap[2][2]; // 2 layers, 2 buffers per layer | |
| 131 | 174 | static UINT16 *tmaster_regs; |
| 132 | 175 | static UINT16 tmaster_color; |
| 133 | 176 | static UINT16 tmaster_addr; |
| 177 | static int (*compute_addr) (UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high); | |
| 134 | 178 | |
| 179 | int tmaster_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) | |
| 180 | { | |
| 181 | return (reg_low & 0xff) | ((reg_mid & 0x1ff) << 8) | (reg_high << 17); | |
| 182 | } | |
| 183 | ||
| 184 | int galgames_compute_addr(UINT16 reg_low, UINT16 reg_mid, UINT16 reg_high) | |
| 185 | { | |
| 186 | return reg_low | (reg_mid << 16); | |
| 187 | } | |
| 188 | ||
| 135 | 189 | static VIDEO_START( tmaster ) |
| 136 | 190 | { |
| 137 | int i; | |
| 138 | for (i = 0; i < 2; i++) | |
| 139 | tmaster_bitmap[i] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 191 | int layer, buffer; | |
| 192 | for (layer = 0; layer < 2; layer++) | |
| 193 | { | |
| 194 | for (buffer = 0; buffer < 2; buffer++) | |
| 195 | { | |
| 196 | tmaster_bitmap[layer][buffer] = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format); | |
| 197 | bitmap_fill(tmaster_bitmap[layer][buffer], NULL, 0xff); | |
| 198 | } | |
| 199 | } | |
| 200 | ||
| 201 | compute_addr = tmaster_compute_addr; | |
| 140 | 202 | } |
| 141 | 203 | |
| 204 | static VIDEO_START( galgames ) | |
| 205 | { | |
| 206 | VIDEO_START_CALL( tmaster ); | |
| 207 | compute_addr = galgames_compute_addr; | |
| 208 | } | |
| 209 | ||
| 142 | 210 | static VIDEO_UPDATE( tmaster ) |
| 143 | 211 | { |
| 144 | // double buffering | |
| 145 | copybitmap(bitmap,tmaster_bitmap[(tmaster_regs[0x02/2]>>8)&1],0,0,0,0,cliprect); | |
| 212 | int layers_ctrl = -1; | |
| 146 | 213 | |
| 147 | show_touchscreen(); | |
| 214 | #ifdef MAME_DEBUG | |
| 215 | if (input_code_pressed(KEYCODE_Z)) | |
| 216 | { | |
| 217 | int mask = 0; | |
| 218 | if (input_code_pressed(KEYCODE_Q)) mask |= 1; | |
| 219 | if (input_code_pressed(KEYCODE_W)) mask |= 2; | |
| 220 | if (mask != 0) layers_ctrl &= mask; | |
| 221 | } | |
| 222 | #endif | |
| 223 | ||
| 224 | ||
| 225 | if (layers_ctrl & 1) copybitmap (bitmap,tmaster_bitmap[0][(tmaster_regs[0x02/2]>>8)&1],0,0,0,0,&machine->screen[0].visarea); | |
| 226 | else fillbitmap(bitmap,get_black_pen(machine),cliprect); | |
| 227 | ||
| 228 | if (layers_ctrl & 2) copybitmap_trans (bitmap,tmaster_bitmap[1][(tmaster_regs[0x02/2]>>9)&1],0,0,0,0,&machine->screen[0].visarea,0xff); | |
| 229 | ||
| 148 | 230 | return 0; |
| 149 | 231 | } |
| 150 | 232 | |
| 151 | 233 | static WRITE16_HANDLER( tmaster_color_w ) |
| 152 | 234 | { |
| 153 | 235 | COMBINE_DATA( &tmaster_color ); |
| 236 | #if 0 | |
| 154 | 237 | if (tmaster_color & ~7) |
| 155 | 238 | logerror("%06x: color %04x\n", activecpu_get_pc(), tmaster_color); |
| 239 | #endif | |
| 156 | 240 | } |
| 157 | 241 | |
| 158 | 242 | static WRITE16_HANDLER( tmaster_addr_w ) |
| r1679 | r1680 | |
| 162 | 246 | |
| 163 | 247 | static void tmaster_draw(void) |
| 164 | 248 | { |
| 165 | int x,y,x0,x1,y0,y1,dx,dy,flipx,flipy,sx,sy,sw,sh, addr, mode, | |
| 249 | int x,y,x0,x1,y0,y1,dx,dy,flipx,flipy,sx,sy,sw,sh, addr, mode, layer,buffer, color; | |
| 166 | 250 | |
| 167 | 251 | UINT8 *gfxdata = memory_region( REGION_GFX1 ); |
| 168 | 252 | size_t size = memory_region_length( REGION_GFX1 ); |
| r1679 | r1680 | |
| 171 | 255 | |
| 172 | 256 | mame_bitmap *bitmap; |
| 173 | 257 | |
| 174 | dest = (tmaster_regs[0x02/2] >> 8) & 1; | |
| 175 | sw = tmaster_regs[0x04/2]; | |
| 176 | sx = tmaster_regs[0x06/2]; | |
| 177 | sh = tmaster_regs[0x08/2] + 1; | |
| 178 | sy = tmaster_regs[0x0a/2]; | |
| 179 | addr = ( tmaster_regs[0x0c/2] & 0xff) | | |
| 180 | ((tmaster_regs[0x0e/2] & 0x1ff) << 8) | (tmaster_addr << 17); | |
| 181 | mode = tmaster_regs[0x10/2]; | |
| 258 | buffer = (tmaster_regs[0x02/2] >> 8) & 3; // 1 bit per layer, selects the currently displayed buffer | |
| 259 | sw = tmaster_regs[0x04/2]; | |
| 260 | sx = tmaster_regs[0x06/2]; | |
| 261 | sh = tmaster_regs[0x08/2] + 1; | |
| 262 | sy = tmaster_regs[0x0a/2]; | |
| 263 | addr = compute_addr( | |
| 264 | tmaster_regs[0x0c/2], | |
| 265 | tmaster_regs[0x0e/2], tmaster_addr); | |
| 266 | mode = tmaster_regs[0x10/2]; | |
| 182 | 267 | |
| 183 | dest ^= (mode >> 6) & 1; | |
| 184 | bitmap = tmaster_bitmap[dest]; | |
| 268 | layer = (mode >> 7) & 1; // layer to draw to | |
| 269 | buffer = ((mode >> 6) & 1) ^ ((buffer >> layer) & 1); // bit 6 selects whether to use the opposite buffer to that displayed | |
| 270 | bitmap = tmaster_bitmap[layer][buffer]; | |
| 185 | 271 | |
| 186 | 272 | addr <<= 1; |
| 187 | 273 | |
| r1679 | r1680 | |
| 200 | 286 | if (flipy) { y0 = sh-1; y1 = -1; dy = -1; sy -= sh-1; } |
| 201 | 287 | else { y0 = 0; y1 = sh; dy = +1; } |
| 202 | 288 | |
| 289 | sx = (sx & 0x7fff) - (sx & 0x8000); | |
| 290 | sy = (sy & 0x7fff) - (sy & 0x8000); | |
| 291 | ||
| 292 | color = (tmaster_color & 7) << 8; | |
| 293 | ||
| 203 | 294 | switch (mode & 0x20) |
| 204 | 295 | { |
| 205 | 296 | case 0x00: // blit with transparency |
| 206 | if (addr > | |
| 297 | if (addr > | |
| 207 | 298 | { |
| 208 | 299 | logerror("%06x: blit error, addr %06x out of bounds\n", activecpu_get_pc(),addr); |
| 209 | re | |
| 300 | addr = size - sw*sh; | |
| 210 | 301 | } |
| 211 | 302 | |
| 212 | 303 | for (y = y0; y != y1; y += dy) |
| r1679 | r1680 | |
| 216 | 307 | data = gfxdata[addr++]; |
| 217 | 308 | |
| 218 | 309 | if ((data != 0xff) && (sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256)) |
| 219 | *BITMAP_ADDR16(bitmap, sy + y, sx + x) = data + | |
| 310 | *BITMAP_ADDR16(bitmap, sy + y, sx + x) = data + | |
| 220 | 311 | } |
| 221 | 312 | } |
| 222 | 313 | break; |
| 223 | 314 | |
| 224 | 315 | case 0x20: // solid fill |
| 225 | data = tmaster_addr & 0xff; | |
| 316 | data = ((tmaster_addr >> 8) & 0xff) + color; | |
| 226 | 317 | for (y = y0; y != y1; y += dy) |
| 227 | 318 | { |
| 228 | 319 | for (x = x0; x != x1; x += dx) |
| 229 | 320 | { |
| 230 | 321 | if ((sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256)) |
| 231 | *BITMAP_ADDR16(bitmap, sy + y, sx + x) = data | |
| 322 | *BITMAP_ADDR16(bitmap, sy + y, sx + x) = data | |
| 232 | 323 | } |
| 233 | 324 | } |
| 234 | 325 | break; |
| r1679 | r1680 | |
| 259 | 350 | |
| 260 | 351 | ***************************************************************************/ |
| 261 | 352 | |
| 353 | /*************************************************************************** | |
| 354 | Touch Master | |
| 355 | ***************************************************************************/ | |
| 356 | ||
| 262 | 357 | static READ16_HANDLER( tmaster_coins_r ) |
| 263 | 358 | { |
| 264 | 359 | return readinputportbytag("COIN")|(mame_rand(Machine)&0x0800); |
| r1679 | r1680 | |
| 296 | 391 | |
| 297 | 392 | |
| 298 | 393 | /*************************************************************************** |
| 394 | Galaxy Games | |
| 395 | ***************************************************************************/ | |
| 299 | 396 | |
| 397 | // NVRAM | |
| 398 | ||
| 399 | static const struct EEPROM_interface galgames_eeprom_interface = | |
| 400 | { | |
| 401 | 10, // address bits 10 | |
| 402 | 8, // data bits 8 | |
| 403 | "*1100", // read 110 0aaaaaaaaaa | |
| 404 | "*1010", // write 101 0aaaaaaaaaa dddddddd | |
| 405 | "*1110", // erase 111 0aaaaaaaaaa | |
| 406 | "*10000xxxxxxxxx", // lock 100 00xxxxxxxxx | |
| 407 | "*10011xxxxxxxxx", // unlock 100 11xxxxxxxxx | |
| 408 | 0, // multi_read | |
| 409 | 1 // reset_delay | |
| 410 | }; | |
| 411 | ||
| 412 | static READ16_HANDLER( galgames_eeprom_r ) | |
| 413 | { | |
| 414 | return EEPROM_read_bit() ? 0x80 : 0x00; | |
| 415 | } | |
| 416 | ||
| 417 | static WRITE16_HANDLER( galgames_eeprom_w ) | |
| 418 | { | |
| 419 | if (data & ~0x0003) | |
| 420 | logerror("CPU #0 PC: %06X - Unknown EEPROM bit written %04X\n",activecpu_get_pc(),data); | |
| 421 | ||
| 422 | if ( ACCESSING_LSB ) | |
| 423 | { | |
| 424 | // latch the bit | |
| 425 | EEPROM_write_bit(data & 0x0001); | |
| 426 | ||
| 427 | // clock line asserted: write latch or select next bit to read | |
| 428 | EEPROM_set_clock_line((data & 0x0002) ? ASSERT_LINE : CLEAR_LINE ); | |
| 429 | } | |
| 430 | } | |
| 431 | ||
| 432 | static NVRAM_HANDLER( galgames ) | |
| 433 | { | |
| 434 | if (read_or_write) | |
| 435 | EEPROM_save(file); | |
| 436 | else | |
| 437 | { | |
| 438 | EEPROM_init(&galgames_eeprom_interface); | |
| 439 | if (file) EEPROM_load(file); | |
| 440 | } | |
| 441 | } | |
| 442 | ||
| 443 | // BT481A Palette RAMDAC | |
| 444 | static UINT32 palette_offset; | |
| 445 | static UINT8 palette_index; | |
| 446 | static UINT8 palette_data[3]; | |
| 447 | ||
| 448 | static WRITE16_HANDLER( galgames_palette_offset_w ) | |
| 449 | { | |
| 450 | if (ACCESSING_LSB) | |
| 451 | { | |
| 452 | palette_offset = data & 0xff; | |
| 453 | palette_index = 0; | |
| 454 | } | |
| 455 | } | |
| 456 | static WRITE16_HANDLER( galgames_palette_data_w ) | |
| 457 | { | |
| 458 | if (ACCESSING_LSB) | |
| 459 | { | |
| 460 | palette_data[palette_index] = data & 0xff; | |
| 461 | if (++palette_index == 3) | |
| 462 | { | |
| 463 | palette_set_color(Machine, palette_offset, MAKE_RGB(palette_data[0], palette_data[1], palette_data[2])); | |
| 464 | palette_index = 0; | |
| 465 | palette_offset++; | |
| 466 | } | |
| 467 | } | |
| 468 | } | |
| 469 | ||
| 470 | // Sound | |
| 471 | static READ16_HANDLER( galgames_okiram_r ) | |
| 472 | { | |
| 473 | return memory_region(REGION_SOUND1)[offset] | 0xff00; | |
| 474 | } | |
| 475 | static WRITE16_HANDLER( galgames_okiram_w ) | |
| 476 | { | |
| 477 | if (ACCESSING_LSB) | |
| 478 | memory_region(REGION_SOUND1)[offset] = data & 0xff; | |
| 479 | } | |
| 480 | ||
| 481 | ||
| 482 | // Carts communication (preliminary, no cart is dumped yet) | |
| 483 | ||
| 484 | static WRITE16_HANDLER( galgames_cart_sel_w ) | |
| 485 | { | |
| 486 | // cart selection (0 1 2 3 4 7) | |
| 487 | ||
| 488 | // 7 resets the eeprom | |
| 489 | if (ACCESSING_LSB) | |
| 490 | EEPROM_set_cs_line(((data&0xff) == 0x07) ? ASSERT_LINE : CLEAR_LINE); | |
| 491 | } | |
| 492 | ||
| 493 | static READ16_HANDLER( galgames_cart_clock_r ) | |
| 494 | { | |
| 495 | return 0x0080; | |
| 496 | } | |
| 497 | ||
| 498 | static WRITE16_HANDLER( galgames_cart_clock_w ) | |
| 499 | { | |
| 500 | if (ACCESSING_LSB) | |
| 501 | { | |
| 502 | // bit 3 = clock | |
| 503 | ||
| 504 | // ROM/RAM banking | |
| 505 | if ((data & 0xf7) == 0x05) | |
| 506 | { | |
| 507 | memory_set_bank(1, 1); // ram | |
| 508 | memory_set_bank(3, 0); // rom | |
| 509 | logerror("%06x: romram bank = %04x\n", activecpu_get_pc(), data); | |
| 510 | } | |
| 511 | else | |
| 512 | { | |
| 513 | memory_set_bank(1, 0); // rom | |
| 514 | logerror("%06x: unknown romram bank = %04x\n", activecpu_get_pc(), data); | |
| 515 | } | |
| 516 | } | |
| 517 | } | |
| 518 | ||
| 519 | static READ16_HANDLER( galgames_cart_data_r ) | |
| 520 | { | |
| 521 | return 0; | |
| 522 | } | |
| 523 | static WRITE16_HANDLER( galgames_cart_data_w ) | |
| 524 | { | |
| 525 | } | |
| 526 | ||
| 527 | ||
| 528 | static READ16_HANDLER( dummy_read_01 ) | |
| 529 | { | |
| 530 | return 0x3; // Pass the check at PC = 0xfae & a later one | |
| 531 | } | |
| 532 | ||
| 533 | static ADDRESS_MAP_START( galgames_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 534 | ||
| 535 | AM_RANGE( 0x000000, 0x03ffff ) AM_READWRITE(MRA16_BANK1, MWA16_BANK2) | |
| 536 | AM_RANGE( 0x040000, 0x1fffff ) AM_ROM AM_REGION( REGION_CPU1, 0 ) | |
| 537 | AM_RANGE( 0x200000, 0x23ffff ) AM_READWRITE(MRA16_BANK3, MWA16_BANK4) | |
| 538 | AM_RANGE( 0x240000, 0x3fffff ) AM_ROM AM_REGION( REGION_CPU1, 0 ) | |
| 539 | ||
| 540 | AM_RANGE( 0x400000, 0x400011 ) AM_WRITE( tmaster_blitter_w ) AM_BASE( &tmaster_regs ) | |
| 541 | AM_RANGE( 0x400012, 0x400013 ) AM_WRITE( tmaster_addr_w ) | |
| 542 | AM_RANGE( 0x400014, 0x400015 ) AM_WRITE( tmaster_color_w ) | |
| 543 | AM_RANGE( 0x400020, 0x400021 ) AM_READ ( tmaster_blitter_r ) | |
| 544 | ||
| 545 | AM_RANGE( 0x600000, 0x600001 ) AM_READWRITE( dummy_read_01, MWA16_NOP ) | |
| 546 | AM_RANGE( 0x700000, 0x700001 ) AM_READWRITE( dummy_read_01, MWA16_NOP ) | |
| 547 | AM_RANGE( 0x800020, 0x80003f ) AM_NOP // ? | |
| 548 | AM_RANGE( 0x900000, 0x900001 ) AM_WRITE( watchdog_reset16_w ) | |
| 549 | ||
| 550 | AM_RANGE( 0xa00000, 0xa00001 ) AM_READWRITE( OKIM6295_status_0_lsb_r, OKIM6295_data_0_lsb_w ) | |
| 551 | AM_RANGE( 0xb00000, 0xb7ffff ) AM_READWRITE( galgames_okiram_r, galgames_okiram_w ) // (only low bytes tested) 4x N341024SJ-15 | |
| 552 | ||
| 553 | AM_RANGE( 0xc00000, 0xc00001 ) AM_WRITE( galgames_palette_offset_w ) | |
| 554 | AM_RANGE( 0xc00002, 0xc00003 ) AM_WRITE( galgames_palette_data_w ) | |
| 555 | ||
| 556 | AM_RANGE( 0xd00000, 0xd00001 ) AM_READ ( input_port_0_word_r ) // trackball p1 x | |
| 557 | AM_RANGE( 0xd00000, 0xd00001 ) AM_WRITE( MWA16_NOP ) | |
| 558 | AM_RANGE( 0xd00002, 0xd00003 ) AM_READ ( input_port_1_word_r ) // trackball p1 y | |
| 559 | AM_RANGE( 0xd00004, 0xd00005 ) AM_READ ( input_port_2_word_r ) // trackball p2 x | |
| 560 | AM_RANGE( 0xd00006, 0xd00007 ) AM_READ ( input_port_3_word_r ) // trackball p2 y | |
| 561 | AM_RANGE( 0xd00008, 0xd00009 ) AM_READ ( input_port_4_word_r ) | |
| 562 | AM_RANGE( 0xd0000a, 0xd0000b ) AM_READ ( input_port_5_word_r ) | |
| 563 | AM_RANGE( 0xd0000c, 0xd0000d ) AM_READWRITE( input_port_6_word_r, MWA16_NOP ) | |
| 564 | ||
| 565 | AM_RANGE( 0xd0000e, 0xd0000f ) AM_WRITE ( galgames_cart_sel_w ) | |
| 566 | AM_RANGE( 0xd00010, 0xd00011 ) AM_READWRITE( galgames_eeprom_r, galgames_eeprom_w ) | |
| 567 | AM_RANGE( 0xd00012, 0xd00013 ) AM_READWRITE( galgames_cart_data_r, galgames_cart_data_w ) | |
| 568 | AM_RANGE( 0xd00014, 0xd00015 ) AM_READWRITE( galgames_cart_clock_r, galgames_cart_clock_w ) | |
| 569 | ||
| 570 | ADDRESS_MAP_END | |
| 571 | ||
| 572 | ||
| 573 | /*************************************************************************** | |
| 574 | ||
| 300 | 575 | Input Ports |
| 301 | 576 | |
| 302 | 577 | ***************************************************************************/ |
| r1679 | r1680 | |
| 329 | 604 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) // e. coin 4 |
| 330 | 605 | INPUT_PORTS_END |
| 331 | 606 | |
| 607 | static INPUT_PORTS_START( galgames ) | |
| 608 | PORT_START_TAG("TRACKBALL_1_X") | |
| 609 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_RESET | |
| 610 | PORT_START_TAG("TRACKBALL_1_Y") | |
| 611 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_PLAYER(1) PORT_RESET | |
| 332 | 612 | |
| 613 | PORT_START_TAG("TRACKBALL_2_X") | |
| 614 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_RESET | |
| 615 | PORT_START_TAG("TRACKBALL_2_Y") | |
| 616 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_PLAYER(2) PORT_RESET | |
| 617 | ||
| 618 | PORT_START_TAG("IN4") | |
| 619 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 620 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 621 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 622 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 623 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // Button A (right) | |
| 624 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // Button B (left) | |
| 625 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 626 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 627 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 628 | ||
| 629 | PORT_START_TAG("IN5") | |
| 630 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 631 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 632 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 633 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 634 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // Button A (right) | |
| 635 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // Button B (left) | |
| 636 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1) // DBA (coin) | |
| 637 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 638 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 639 | ||
| 640 | PORT_START_TAG("IN6") | |
| 641 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) // CS 1 (coin) | |
| 642 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) // CS 2 (coin) | |
| 643 | PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW ) // System Check | |
| 644 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 645 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 646 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 647 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 648 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 649 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 650 | INPUT_PORTS_END | |
| 651 | ||
| 652 | ||
| 333 | 653 | /*************************************************************************** |
| 334 | 654 | |
| 335 | 655 | Machine Drivers |
| r1679 | r1680 | |
| 408 | 728 | MACHINE_DRIVER_END |
| 409 | 729 | |
| 410 | 730 | |
| 731 | static INTERRUPT_GEN( galgames_interrupt ) | |
| 732 | { | |
| 733 | switch (cpu_getiloops()) | |
| 734 | { | |
| 735 | case 0: cpunum_set_input_line(machine, 0, 3, HOLD_LINE); break; | |
| 736 | // lev 2 triggered at the end of a blit | |
| 737 | default: cpunum_set_input_line(machine, 0, 1, HOLD_LINE); break; | |
| 738 | } | |
| 739 | } | |
| 740 | ||
| 741 | static MACHINE_RESET( galgames ) | |
| 742 | { | |
| 743 | memory_set_bank(1, 0); // rom | |
| 744 | memory_set_bank(3, 1); // ram | |
| 745 | ||
| 746 | memory_set_bank(2, 0); // ram | |
| 747 | memory_set_bank(4, 0); // ram | |
| 748 | } | |
| 749 | ||
| 750 | static MACHINE_DRIVER_START( galgames ) | |
| 751 | MDRV_CPU_ADD_TAG("main", M68000, XTAL_24MHz / 2) | |
| 752 | MDRV_CPU_PROGRAM_MAP(galgames_map,0) | |
| 753 | MDRV_CPU_VBLANK_INT(galgames_interrupt, 1+20) // ?? | |
| 754 | ||
| 755 | MDRV_NVRAM_HANDLER( galgames ) | |
| 756 | MDRV_MACHINE_RESET( galgames ) | |
| 757 | ||
| 758 | /* video hardware */ | |
| 759 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 760 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 761 | ||
| 762 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 763 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 764 | ||
| 765 | MDRV_SCREEN_SIZE(400, 256) | |
| 766 | MDRV_SCREEN_VISIBLE_AREA(0, 400-1, 0, 256-1) | |
| 767 | MDRV_PALETTE_LENGTH(0x800) // only 0x100 used | |
| 768 | ||
| 769 | MDRV_VIDEO_START(galgames) | |
| 770 | MDRV_VIDEO_UPDATE(tmaster) | |
| 771 | ||
| 772 | /* sound hardware */ | |
| 773 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 774 | ||
| 775 | MDRV_SOUND_ADD(OKIM6295, XTAL_24MHz / 8) // ?? | |
| 776 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7low) // clock frequency & pin 7 not verified | |
| 777 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 778 | MACHINE_DRIVER_END | |
| 779 | ||
| 411 | 780 | /*************************************************************************** |
| 412 | 781 | |
| 413 | 782 | ROMs Loading |
| r1679 | r1680 | |
| 543 | 912 | ROM_LOAD( "tm4k_u8.bin", 0x00000, 0x100000, CRC(48c3782b) SHA1(bfe105ddbde8bbbd84665dfdd565d6d41926834a) ) |
| 544 | 913 | ROM_END |
| 545 | 914 | |
| 915 | /*************************************************************************** | |
| 916 | ||
| 917 | Galaxy Games BIOS v. 1.90 | |
| 918 | ||
| 919 | This is a multi-game cocktail cabinet released in 1998. Namco seems to have | |
| 920 | made some cartridges for it (or at least licensed their IP). | |
| 921 | ||
| 922 | Trackball-based. 'BIOS' has 7 built-in games. There are two LEDs on the PCB. | |
| 923 | ||
| 924 | More information here : http://www.cesgames.com/museum/galaxy/index.html | |
| 925 | ||
| 926 | ---- | |
| 927 | ||
| 928 | Board silkscreend 237-0211-00 | |
| 929 | REV.-D | |
| 930 | ||
| 931 | Cartridge based mother board | |
| 932 | Holds up to 4 cartridges | |
| 933 | Chips labeled | |
| 934 | GALAXY U1 V1.90 12/1/98 | |
| 935 | GALAXY U2 V1.90 12/1/98 | |
| 936 | ||
| 937 | NAMCO 307 Cartridge has surface mount Flash chips in it (not dumped). | |
| 938 | ||
| 939 | Motorola MC68HC000FN12 | |
| 940 | 24 MHz oscillator | |
| 941 | Xilinx XC5206 | |
| 942 | Xilinx XC5202 | |
| 943 | BT481AKPJ110 (Palette RAMDAC) | |
| 944 | NKK N341024SJ-15 x8 (128kB RAM) | |
| 945 | OKI M6295 8092352-2 | |
| 946 | ||
| 947 | PAL16V8H-15 @ U24 Blue dot on it | |
| 948 | PAL16V8H-15 @ U25 Yellow dot on it | |
| 949 | PAL16V8H-15 @ U26 Red dot on it | |
| 950 | PAL16V8H-15 @ U27 Green dot on it | |
| 951 | PAL16V8H-15 @ U45 red dot on it | |
| 952 | ||
| 953 | ***************************************************************************/ | |
| 954 | ||
| 955 | ROM_START( galgbios ) | |
| 956 | ROM_REGION( 0x200000 + 0x40000, REGION_CPU1, 0 ) | |
| 957 | ROM_LOAD16_BYTE( "galaxy.u2", 0x1c0000, 0x020000, CRC(e51ff184) SHA1(aaa795f2c15ec29b3ceeb5c917b643db0dbb7083) ) | |
| 958 | ROM_CONTINUE( 0x000000, 0x0e0000 ) | |
| 959 | ROM_LOAD16_BYTE( "galaxy.u1", 0x1c0001, 0x020000, CRC(c6d7bc6d) SHA1(93c032f9aa38cbbdda59a8a25ff9f38f7ad9c760) ) | |
| 960 | ROM_CONTINUE( 0x000001, 0x0e0000 ) | |
| 961 | ROM_FILL( 0x200000, 0x040000, 0) // RAM | |
| 962 | ||
| 963 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) | |
| 964 | ROM_LOAD16_BYTE( "galaxy.u2", 0x000000, 0x100000, CRC(e51ff184) SHA1(aaa795f2c15ec29b3ceeb5c917b643db0dbb7083) ) | |
| 965 | ROM_LOAD16_BYTE( "galaxy.u1", 0x000001, 0x100000, CRC(c6d7bc6d) SHA1(93c032f9aa38cbbdda59a8a25ff9f38f7ad9c760) ) | |
| 966 | ||
| 967 | ROM_REGION( 0x40000, REGION_SOUND1, ROMREGION_ERASE ) | |
| 968 | // RAM, filled by the 68000 and fed to the OKI | |
| 969 | ROM_END | |
| 970 | ||
| 546 | 971 | static DRIVER_INIT( tm3k ) |
| 547 | 972 | { |
| 548 | 973 | // try this if you need to calibrate |
| r1679 | r1680 | |
| 569 | 994 | ROM[0x8346C/2] = 0x6002; |
| 570 | 995 | } |
| 571 | 996 | |
| 572 | GAME( 1996, tm, 0, tm, tmaster, 0, ROT0, "Midway", "Touchmaster", GAME_NOT_WORKING ) | |
| 573 | GAME( 1997, tm3k, 0, tm3k, tmaster, tm3k, ROT0, "Midway", "Touchmaster 3000 (v5.01)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS) | |
| 574 | GAME( 1998, tm4k, 0, tm3k, tmaster, tm4k, ROT0, "Midway", "Touchmaster 4000 (v6.02)", GAME_NOT_WORKING ) | |
| 997 | static DRIVER_INIT( galgames ) | |
| 998 | { | |
| 999 | // configure memory banks | |
| 1000 | memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1)+0x1c0000, 0x40000); | |
| 1001 | memory_configure_bank(3, 0, 2, memory_region(REGION_CPU1)+0x1c0000, 0x40000); | |
| 1002 | ||
| 1003 | memory_configure_bank(2, 0, 1, memory_region(REGION_CPU1)+0x200000, 0x40000); | |
| 1004 | memory_configure_bank(4, 0, 1, memory_region(REGION_CPU1)+0x200000, 0x40000); | |
| 1005 | } | |
| 1006 | ||
| 1007 | GAME( 1996, tm, 0, tm, tmaster, 0, ROT0, "Midway", "Touchmaster", GAME_NOT_WORKING ) | |
| 1008 | GAME( 1997, tm3k, 0, tm3k, tmaster, tm3k, ROT0, "Midway", "Touchmaster 3000 (v5.01)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS) // imp. graphics due to bad dump | |
| 1009 | GAME( 1998, tm4k, 0, tm3k, tmaster, tm4k, ROT0, "Midway", "Touchmaster 4000 (v6.02)", GAME_NOT_WORKING ) | |
| 1010 | GAME( 1998, galgbios, 0, galgames, galgames, galgames, ROT0, "Creative Electonics & Software", "Galaxy Games (BIOS v1.90)", GAME_IS_BIOS_ROOT ) |
| r1679 | r1680 | |
|---|---|---|
| 3508 | 3508 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3509 | 3509 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 3510 | 3510 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3511 | PORT_ | |
| 3511 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW | |
| 3512 | 3512 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* DECISION */ |
| 3513 | 3513 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* L SELECTION */ |
| 3514 | 3514 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* R SELECTION */ |
| r1679 | r1680 | |
| 3589 | 3589 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) |
| 3590 | 3590 | // PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 3591 | 3591 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3592 | ||
| 3592 | | |
| 3593 | 3593 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Missle */ |
| 3594 | 3594 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Gun */ |
| 3595 | ||
| 3595 | | |
| 3596 | 3596 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 3597 | 3597 | // PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 3598 | 3598 | |
| r1679 | r1680 | |
| 3631 | 3631 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3632 | 3632 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3633 | 3633 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3634 | PORT_ | |
| 3634 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW | |
| 3635 | 3635 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* VIEW */ |
| 3636 | 3636 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3637 | 3637 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 3695 | 3695 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3696 | 3696 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3697 | 3697 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3698 | PORT_ | |
| 3698 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW | |
| 3699 | 3699 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3700 | 3700 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3701 | 3701 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 3774 | 3774 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3775 | 3775 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3776 | 3776 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3777 | PORT_ | |
| 3777 | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW | |
| 3778 | 3778 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3779 | 3779 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3780 | 3780 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 3825 | 3825 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3826 | 3826 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 3827 | 3827 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3828 | PORT_ | |
| 3828 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW | |
| 3829 | 3829 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* shot */ |
| 3830 | 3830 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* pedal */ |
| 3831 | 3831 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 224 | 224 | PORT_DIPSETTING( 0x4000, DEF_STR( Japan ) ) |
| 225 | 225 | PORT_DIPSETTING( 0x0000, DEF_STR( USA ) ) |
| 226 | 226 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 227 | PORT_ | |
| 227 | PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_HIGH | |
| 228 | 228 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_TILT ) |
| 229 | 229 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 230 | 230 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 265 | 265 | #include "driver.h" |
| 266 | 266 | #include "deprecat.h" |
| 267 | 267 | #include "cpu/m6502/m6502.h" |
| 268 | #include "video/crtc6845.h" | |
| 269 | 268 | #include "sound/sn76477.h" |
| 270 | 269 | #include "sound/custom.h" |
| 271 | 270 | #include "sound/samples.h" |
| r1679 | r1680 | |
| 285 | 284 | extern UINT8 *rockola_videoram2; |
| 286 | 285 | extern UINT8 *rockola_charram; |
| 287 | 286 | |
| 288 | extern WRITE8_HANDLER( rockola_videoram_w ); | |
| 289 | extern WRITE8_HANDLER( rockola_videoram2_w ); | |
| 290 | extern WRITE8_HANDLER( rockola_colorram_w ); | |
| 291 | extern WRITE8_HANDLER( rockola_charram_w ); | |
| 292 | extern WRITE8_HANDLER( rockola_flipscreen_w ); | |
| 293 | extern WRITE8_HANDLER( rockola_scrollx_w ); | |
| 294 | extern WRITE8_HANDLER( rockola_scrolly_w ); | |
| 287 | WRITE8_HANDLER( rockola_videoram_w ); | |
| 288 | WRITE8_HANDLER( rockola_videoram2_w ); | |
| 289 | WRITE8_HANDLER( rockola_colorram_w ); | |
| 290 | WRITE8_HANDLER( rockola_charram_w ); | |
| 291 | WRITE8_HANDLER( rockola_mc6845_address_w ); | |
| 292 | WRITE8_HANDLER( rockola_mc6845_register_w ); | |
| 293 | WRITE8_HANDLER( rockola_flipscreen_w ); | |
| 294 | WRITE8_HANDLER( rockola_scrollx_w ); | |
| 295 | WRITE8_HANDLER( rockola_scrolly_w ); | |
| 295 | 296 | |
| 296 | extern PALETTE_INIT( rockola ); | |
| 297 | extern VIDEO_START( rockola ); | |
| 298 | extern VIDEO_UPDATE( rockola ); | |
| 297 | PALETTE_INIT( rockola ); | |
| 298 | VIDEO_START( rockola ); | |
| 299 | VIDEO_UPDATE( rockola ); | |
| 299 | 300 | |
| 300 | extern WRITE8_HANDLER( satansat_charram_w ); | |
| 301 | extern WRITE8_HANDLER( satansat_b002_w ); | |
| 302 | extern WRITE8_HANDLER( satansat_backcolor_w ); | |
| 301 | WRITE8_HANDLER( satansat_charram_w ); | |
| 302 | WRITE8_HANDLER( satansat_b002_w ); | |
| 303 | WRITE8_HANDLER( satansat_backcolor_w ); | |
| 303 | 304 | |
| 304 | extern PALETTE_INIT( satansat ); | |
| 305 | extern VIDEO_START( satansat ); | |
| 305 | PALETTE_INIT( satansat ); | |
| 306 | VIDEO_START( satansat ); | |
| 306 | 307 | |
| 307 | 308 | /* audio */ |
| 308 | 309 | |
| r1679 | r1680 | |
| 337 | 338 | sasuke_counter = 0; |
| 338 | 339 | |
| 339 | 340 | sasuke_timer = timer_alloc(sasuke_update_counter, NULL); |
| 340 | timer_adjust(sasuke_timer, attotime_zero, 0, ATTOTIME_IN_HZ(11289000/8)); // 1.4 MHz | |
| 341 | timer_adjust_periodic(sasuke_timer, attotime_zero, 0, ATTOTIME_IN_HZ(11289000/8)); // 1.4 MHz | |
| 341 | 342 | } |
| 342 | 343 | |
| 343 | 344 | |
| r1679 | r1680 | |
| 370 | 371 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram) |
| 371 | 372 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram) |
| 372 | 373 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram) |
| 373 | AM_RANGE(0x3000, 0x3000) AM_WRITE(crtc6845_address_w) | |
| 374 | AM_RANGE(0x3001, 0x3001) AM_WRITE(crtc6845_register_w) | |
| 374 | AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_mc6845_address_w) | |
| 375 | AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_mc6845_register_w) | |
| 375 | 376 | AM_RANGE(0x4000, 0x8fff) AM_ROM |
| 376 | 377 | AM_RANGE(0xb000, 0xb001) AM_WRITE(sasuke_sound_w) |
| 377 | 378 | AM_RANGE(0xb002, 0xb002) AM_WRITE(satansat_b002_w) /* flip screen & irq enable */ |
| r1679 | r1680 | |
| 389 | 390 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram) |
| 390 | 391 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram) |
| 391 | 392 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram) |
| 392 | AM_RANGE(0x3000, 0x3000) AM_WRITE(crtc6845_address_w) | |
| 393 | AM_RANGE(0x3001, 0x3001) AM_WRITE(crtc6845_register_w) | |
| 393 | AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_mc6845_address_w) | |
| 394 | AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_mc6845_register_w) | |
| 394 | 395 | AM_RANGE(0x4000, 0x97ff) AM_ROM |
| 395 | 396 | AM_RANGE(0xb000, 0xb001) AM_WRITE(satansat_sound_w) |
| 396 | 397 | AM_RANGE(0xb002, 0xb002) AM_WRITE(satansat_b002_w) /* flip screen & irq enable */ |
| r1679 | r1680 | |
| 408 | 409 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram) |
| 409 | 410 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram) |
| 410 | 411 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram) |
| 411 | AM_RANGE(0x3000, 0x3000) AM_WRITE(crtc6845_address_w) | |
| 412 | AM_RANGE(0x3001, 0x3001) AM_WRITE(crtc6845_register_w) | |
| 412 | AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_mc6845_address_w) | |
| 413 | AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_mc6845_register_w) | |
| 413 | 414 | AM_RANGE(0x3100, 0x3102) AM_WRITE(vanguard_sound_w) |
| 414 | 415 | AM_RANGE(0x3103, 0x3103) AM_WRITE(rockola_flipscreen_w) |
| 415 | 416 | AM_RANGE(0x3104, 0x3104) AM_READ_PORT("IN0") |
| r1679 | r1680 | |
| 429 | 430 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram) |
| 430 | 431 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram) |
| 431 | 432 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram) |
| 432 | AM_RANGE(0x2000, 0x2000) AM_WRITE(crtc6845_address_w) | |
| 433 | AM_RANGE(0x2001, 0x2001) AM_WRITE(crtc6845_register_w) | |
| 433 | AM_RANGE(0x2000, 0x2000) AM_WRITE(rockola_mc6845_address_w) | |
| 434 | AM_RANGE(0x2001, 0x2001) AM_WRITE(rockola_mc6845_register_w) | |
| 434 | 435 | AM_RANGE(0x2100, 0x2103) AM_WRITE(fantasy_sound_w) |
| 435 | 436 | AM_RANGE(0x2104, 0x2104) AM_READ_PORT("IN0") |
| 436 | 437 | AM_RANGE(0x2105, 0x2105) AM_READ_PORT("IN1") |
| r1679 | r1680 | |
| 450 | 451 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram) |
| 451 | 452 | AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram) |
| 452 | 453 | AM_RANGE(0x3000, 0x9fff) AM_ROM |
| 453 | AM_RANGE(0xb000, 0xb000) AM_WRITE(crtc6845_address_w) | |
| 454 | AM_RANGE(0xb001, 0xb001) AM_WRITE(crtc6845_register_w) | |
| 454 | AM_RANGE(0xb000, 0xb000) AM_WRITE(rockola_mc6845_address_w) | |
| 455 | AM_RANGE(0xb001, 0xb001) AM_WRITE(rockola_mc6845_register_w) | |
| 455 | 456 | AM_RANGE(0xb100, 0xb103) AM_WRITE(fantasy_sound_w) |
| 456 | 457 | AM_RANGE(0xb104, 0xb104) AM_READ_PORT("IN0") |
| 457 | 458 | AM_RANGE(0xb105, 0xb105) AM_READ_PORT("IN1") |
| r1679 | r1680 | |
|---|---|---|
| 314 | 314 | #define MASTER_CLOCK 10000000 /* 10MHz */ |
| 315 | 315 | |
| 316 | 316 | #include "driver.h" |
| 317 | #include "video/ | |
| 317 | #include "video/m | |
| 318 | 318 | |
| 319 | 319 | |
| 320 | 320 | /************************* |
| 321 | 321 | * Video Hardware * |
| 322 | 322 | *************************/ |
| 323 | 323 | |
| 324 | static mc6845_t *mc6845; | |
| 324 | 325 | static tilemap *bg_tilemap; |
| 325 | 326 | |
| 326 | 327 | static WRITE8_HANDLER( magicfly_videoram_w ) |
| r1679 | r1680 | |
| 335 | 336 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 336 | 337 | } |
| 337 | 338 | |
| 339 | static WRITE8_HANDLER( magicfly_mc6845_address_w ) | |
| 340 | { | |
| 341 | mc6845_address_w(mc6845, data); | |
| 342 | } | |
| 343 | ||
| 344 | static READ8_HANDLER( magicfly_mc6845_register_r ) | |
| 345 | { | |
| 346 | return mc6845_register_r(mc6845); | |
| 347 | } | |
| 348 | ||
| 349 | static WRITE8_HANDLER( magicfly_mc6845_register_w ) | |
| 350 | { | |
| 351 | mc6845_register_w(mc6845, data); | |
| 352 | } | |
| 353 | ||
| 338 | 354 | static TILE_GET_INFO( get_magicfly_tile_info ) |
| 339 | 355 | { |
| 340 | 356 | /* - bits - |
| r1679 | r1680 | |
| 363 | 379 | |
| 364 | 380 | static VIDEO_START(magicfly) |
| 365 | 381 | { |
| 366 | bg_tilemap = tilemap_create(get_magicfly_tile_info, tilemap_scan_rows, | |
| 367 | TILEMAP_TYPE_PEN, 8, 8, 32, 29); | |
| 382 | mc6845 = mc6845_config(NULL); | |
| 383 | bg_tilemap = tilemap_create(get_magicfly_tile_info, tilemap_scan_rows, 8, 8, 32, 29); | |
| 368 | 384 | } |
| 369 | 385 | |
| 370 | 386 | static TILE_GET_INFO( get_7mezzo_tile_info ) |
| r1679 | r1680 | |
| 396 | 412 | static VIDEO_START( 7mezzo ) |
| 397 | 413 | { |
| 398 | 414 | bg_tilemap = tilemap_create(get_7mezzo_tile_info, tilemap_scan_rows, |
| 399 | | |
| 415 | | |
| 400 | 416 | } |
| 401 | 417 | |
| 402 | 418 | static VIDEO_UPDATE( magicfly ) |
| r1679 | r1680 | |
| 454 | 470 | |
| 455 | 471 | static ADDRESS_MAP_START( magicfly_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 456 | 472 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* MK48Z02B NVRAM */ |
| 457 | AM_RANGE(0x0800, 0x0800) AM_WRITE(crtc6845_address_w) /* MC6845P register addressing */ | |
| 458 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) /* MC6845P register values */ | |
| 473 | AM_RANGE(0x0800, 0x0800) AM_WRITE(magicfly_mc6845_address_w) | |
| 474 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(magicfly_mc6845_register_r, magicfly_mc6845_register_w) | |
| 459 | 475 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(magicfly_videoram_w) AM_BASE(&videoram) /* HM6116LP #1 (2K x 8) RAM (only 1st half used) */ |
| 460 | 476 | AM_RANGE(0x1800, 0x1bff) AM_RAM AM_WRITE(magicfly_colorram_w) AM_BASE(&colorram) /* HM6116LP #2 (2K x 8) RAM (only 1st half used) */ |
| 461 | 477 | AM_RANGE(0x2800, 0x2800) AM_READ(mux_port_r) /* multiplexed input port */ |
| r1679 | r1680 | |
|---|---|---|
| 456 | 456 | if (scanline >= 256) |
| 457 | 457 | scanline = 0; |
| 458 | 458 | |
| 459 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 459 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | |
| r1679 | r1680 | |
| 471 | 471 | static MACHINE_RESET( centiped ) |
| 472 | 472 | { |
| 473 | 473 | interrupt_timer = timer_alloc(generate_interrupt, NULL); |
| 474 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 474 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 475 | 475 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); |
| 476 | 476 | dsw_select = 0; |
| 477 | 477 | control_select = 0; |
| r1679 | r1680 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | /* clear any existing interrupt and set a timer for a new one */ |
| 230 | 230 | joystick_int = 0; |
| 231 | timer_adjust(joystick_timer, ATTOTIME_IN_USEC(50), newval | |
| 231 | timer_adjust_oneshot(joystick_timer, ATTOTIME_IN_USEC(50), newval | |
| 232 | 232 | atarigen_update_interrupts(); |
| 233 | 233 | |
| 234 | 234 | return joystick_value; |
| r1679 | r1680 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | static VIDEO_START(pturn) |
| 121 | 121 | { |
| 122 | pturn_fgmap = tilemap_create(get_pturn_tile_info,tilemap_scan_rows, | |
| 122 | pturn_fgmap = tilemap_create(get_pturn_tile_info,tilemap_scan_rows, | |
| 123 | 123 | tilemap_set_transparent_pen(pturn_fgmap,0); |
| 124 | pturn_bgmap = tilemap_create(get_pturn_bg_tile_info,tilemap_scan_rows, | |
| 124 | pturn_bgmap = tilemap_create(get_pturn_bg_tile_info,tilemap_scan_rows, | |
| 125 | 125 | tilemap_set_transparent_pen(pturn_bgmap,0); |
| 126 | 126 | } |
| 127 | 127 |
| r1679 | r1680 | |
|---|---|---|
| 2017 | 2017 | |
| 2018 | 2018 | PORT_START // IN3 - $21000a |
| 2019 | 2019 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2020 | PORT_ | |
| 2020 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW | |
| 2021 | 2021 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2022 | 2022 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 ) //payout |
| 2023 | 2023 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| r1679 | r1680 | |
|---|---|---|
| 462 | 462 | /* video hardware */ |
| 463 | 463 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 464 | 464 | MDRV_GFXDECODE(tceptor) |
| 465 | MDRV_PALETTE_LENGTH(1024) | |
| 466 | MDRV_COLORTABLE_LENGTH(4096) | |
| 465 | MDRV_PALETTE_LENGTH(4096) | |
| 467 | 466 | MDRV_DEFAULT_LAYOUT(layout_horizont) |
| 468 | 467 | |
| 469 | 468 | MDRV_SCREEN_ADD("2D", 0x000) |
| r1679 | r1680 | |
| 543 | 542 | ROM_LOAD( "tc1-20.10e", 0x00000, 0x08000, CRC(3e5054b7) SHA1(ed359f8659a4a46d5ff7299d0da10550b1496db8) ) |
| 544 | 543 | ROM_LOAD( "tc1-19.10d", 0x08000, 0x04000, CRC(7406e6e7) SHA1(61ad77667e94fd7e11037da2721f7bbe0130286a) ) |
| 545 | 544 | |
| 546 | ROM_REGION( 0 | |
| 545 | ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE ) // 16x16 sprites | |
| 547 | 546 | ROM_LOAD( "tc1-16.8t", 0x00000, 0x08000, CRC(7c72be33) SHA1(397e11727b86688d550c28fbdcb864bb9335d891) ) |
| 548 | 547 | ROM_LOAD( "tc1-15.10t", 0x08000, 0x08000, CRC(51268075) SHA1(75b6b935c6721adbc984795b9bf0a791fb8b209e) ) |
| 549 | 548 | |
| 550 | ROM_REGION( 0 | |
| 549 | ROM_REGION( 0x80000, REGION_GFX4, ROMREGION_DISPOSE ) // 32x32 sprites | |
| 551 | 550 | ROM_LOAD( "tc1-8.8m", 0x00000, 0x10000, CRC(192a1f1f) SHA1(8424a6a19c080da0a83e173e33915f4d9326f379) ) |
| 552 | 551 | ROM_LOAD( "tc1-10.8p", 0x10000, 0x08000, CRC(7876bcef) SHA1(09180b26d0eab51de18a13723f46d763541979fb) ) |
| 553 | 552 | ROM_RELOAD( 0x18000, 0x08000 ) |
| r1679 | r1680 | |
| 563 | 562 | ROM_LOAD( "tc1-13.10s", 0x70000, 0x08000, CRC(e67cef29) SHA1(ba8559caf498bbc1d9278d74da03ee2d910f76d8) ) |
| 564 | 563 | ROM_RELOAD( 0x78000, 0x08000 ) |
| 565 | 564 | |
| 566 | ROM_REGION( 0x3 | |
| 565 | ROM_REGION( 0x3500, REGION_PROMS, 0 ) | |
| 567 | 566 | ROM_LOAD( "tc1-3.1k", 0x00000, 0x00400, CRC(fd2fcb57) SHA1(97d5b7527714acfd729b26ac56f0a9210982c551) ) // red components |
| 568 | 567 | ROM_LOAD( "tc1-1.1h", 0x00400, 0x00400, CRC(0241cf67) SHA1(9b2b579425b72a5b1f2c632f53d1c1d172b4ed1e) ) // green components |
| 569 | 568 | ROM_LOAD( "tc1-2.1j", 0x00800, 0x00400, CRC(ea9eb3da) SHA1(0d7cfceac57afc53a063d7fe67cfc9bda0a8dbc8) ) // blue components |
| 570 | 569 | ROM_LOAD( "tc1-5.6a", 0x00c00, 0x00400, CRC(afa8eda8) SHA1(783efbcbf0bb7e4cf2e2618ddd0ef3b52a4518cc) ) // tiles color table |
| 571 | ROM_LOAD( "tc1-4.2e", 0x01000, 0x00100, CRC(a4e73d53) SHA1(df8231720e9b57cf2751f86ac3ed7433804f51ca) ) // road color table | |
| 572 | ROM_LOAD( "tc1-6.7s", 0x01100, 0x00400, CRC(72707677) SHA1(122c1b619c9efa3b7055908dda3102ee28230504) ) // sprite color table | |
| 570 | ROM_LOAD( "tc1-6.7s", 0x01000, 0x00400, CRC(72707677) SHA1(122c1b619c9efa3b7055908dda3102ee28230504) ) // sprite color table | |
| 571 | ROM_LOAD( "tc1-4.2e", 0x01400, 0x00100, CRC(a4e73d53) SHA1(df8231720e9b57cf2751f86ac3ed7433804f51ca) ) // road color table | |
| 573 | 572 | ROM_LOAD( "tc1-17.7k", 0x01500, 0x02000, CRC(90db1bf6) SHA1(dbb9e50a8efc3b4012fcf587cc87da9ef42a1b80) ) // sprite related |
| 574 | 573 | ROM_END |
| 575 | 574 | |
| r1679 | r1680 | |
| 614 | 613 | ROM_LOAD( "tc2-11.10r", 0x60000, 0x10000, CRC(40724380) SHA1(57549094fc8403f1f528e57fe3fa64844bf89e22) ) |
| 615 | 614 | ROM_LOAD( "tc2-13.10s", 0x70000, 0x10000, CRC(519ec7c1) SHA1(c4abe279d7cf6f626dcbb6f6c4dc2a138b818f51) ) |
| 616 | 615 | |
| 617 | ROM_REGION( 0x3 | |
| 616 | ROM_REGION( 0x3500, REGION_PROMS, 0 ) | |
| 618 | 617 | ROM_LOAD( "tc2-3.1k", 0x00000, 0x00400, CRC(e3504f1a) SHA1(1ac3968e993030a6b2f4719702ff870267ab6918) ) // red components |
| 619 | 618 | ROM_LOAD( "tc2-1.1h", 0x00400, 0x00400, CRC(e8a96fda) SHA1(42e5d2b351000ac0705b01ab484c5fe8e294a08b) ) // green components |
| 620 | 619 | ROM_LOAD( "tc2-2.1j", 0x00800, 0x00400, CRC(c65eda61) SHA1(c316b748daa6be68eebbb480557637efc9f44781) ) // blue components |
| 621 | 620 | ROM_LOAD( "tc1-5.6a", 0x00c00, 0x00400, CRC(afa8eda8) SHA1(783efbcbf0bb7e4cf2e2618ddd0ef3b52a4518cc) ) // tiles color table |
| 622 | ROM_LOAD( "tc2-4.2e", 0x01000, 0x00100, CRC(6b49fc30) SHA1(66ca39cd7985643acd71905111ae2d931c082465) ) // road color table | |
| 623 | ROM_LOAD( "tc2-6.7s", 0x01100, 0x00400, CRC(badcda76) SHA1(726e0019241d31716f3af9ebe900089bce771477) ) // sprite color table | |
| 621 | ROM_LOAD( "tc2-6.7s", 0x01000, 0x00400, CRC(badcda76) SHA1(726e0019241d31716f3af9ebe900089bce771477) ) // sprite color table | |
| 622 | ROM_LOAD( "tc2-4.2e", 0x01400, 0x00100, CRC(6b49fc30) SHA1(66ca39cd7985643acd71905111ae2d931c082465) ) // road color table | |
| 624 | 623 | ROM_LOAD( "tc1-17.7k", 0x01500, 0x02000, CRC(90db1bf6) SHA1(dbb9e50a8efc3b4012fcf587cc87da9ef42a1b80) ) // sprite related |
| 625 | 624 | ROM_END |
| 626 | 625 |
| r1679 | r1680 | |
|---|---|---|
| 219 | 219 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 220 | 220 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) |
| 221 | 221 | MDRV_GFXDECODE(hanaawas) |
| 222 | MDRV_PALETTE_LENGTH(16) | |
| 223 | MDRV_COLORTABLE_LENGTH(32*8) | |
| 222 | MDRV_PALETTE_LENGTH(32*8) | |
| 224 | 223 | |
| 225 | 224 | MDRV_PALETTE_INIT(hanaawas) |
| 226 | 225 | MDRV_VIDEO_START(hanaawas) |
| r1679 | r1680 | |
| 262 | 261 | |
| 263 | 262 | |
| 264 | 263 | |
| 265 | GAME( 1982, hanaawas, 0, hanaawas, hanaawas, 0, ROT0, "Seta", "Hana Awase | |
| 264 | GAME( 1982, hanaawas, 0, hanaawas, hanaawas, 0, ROT0, "Setakikaku, Ltd.", "Hana Awase |
| r1679 | r1680 | |
|---|---|---|
| 179 | 179 | #include "machine/6850acia.h" |
| 180 | 180 | #include "sound/saa1099.h" |
| 181 | 181 | //Deal 'Em |
| 182 | #include "video/ | |
| 182 | #include "video/m | |
| 183 | 183 | |
| 184 | 184 | #ifdef MAME_DEBUG |
| 185 | 185 | #define MPU4VIDVERBOSE 1 |
| r1679 | r1680 | |
| 191 | 191 | |
| 192 | 192 | #define VIDEO_MASTER_CLOCK (10000000) |
| 193 | 193 | |
| 194 | static mc6845_t *mc6845; | |
| 195 | ||
| 194 | 196 | static UINT8 m6840_irq_state; |
| 195 | 197 | static UINT8 m6850_irq_state; |
| 196 | 198 | static UINT8 scn2674_irq_state; |
| r1679 | r1680 | |
| 434 | 436 | static UINT8 IR13_scn2674_scroll_end; |
| 435 | 437 | static UINT8 IR13_scn2674_split_register_2; |
| 436 | 438 | |
| 437 | VIDEO_UPDATE( mpu4_vid ) | |
| 439 | static VIDEO_UPDATE( mpu4_vid ) | |
| 438 | 440 | { |
| 439 | 441 | int i; |
| 440 | 442 | |
| r1679 | r1680 | |
| 499 | 501 | return 0; |
| 500 | 502 | } |
| 501 | 503 | |
| 502 | READ16_HANDLER( mpu4_vid_vidram_r ) | |
| 504 | static READ16_HANDLER( mpu4_vid_vidram_r ) | |
| 503 | 505 | { |
| 504 | 506 | return mpu4_vid_vidram[offset]; |
| 505 | 507 | } |
| 506 | 508 | |
| 507 | WRITE16_HANDLER( mpu4_vid_vidram_w ) | |
| 509 | static WRITE16_HANDLER( mpu4_vid_vidram_w ) | |
| 508 | 510 | { |
| 509 | 511 | COMBINE_DATA(&mpu4_vid_vidram[offset]); |
| 510 | 512 | offset <<= 1; |
| r1679 | r1680 | |
| 877 | 879 | |
| 878 | 880 | } |
| 879 | 881 | |
| 880 | READ16_HANDLER( mpu4_vid_scn2674_r ) | |
| 882 | static READ16_HANDLER( mpu4_vid_scn2674_r ) | |
| 881 | 883 | { |
| 882 | 884 | /* |
| 883 | 885 | Offset: Purpose |
| r1679 | r1680 | |
| 925 | 927 | return 0xffff; |
| 926 | 928 | } |
| 927 | 929 | |
| 928 | WRITE16_HANDLER( mpu4_vid_scn2674_w ) | |
| 930 | static WRITE16_HANDLER( mpu4_vid_scn2674_w ) | |
| 929 | 931 | { |
| 930 | 932 | /* |
| 931 | 933 | Offset: Purpose |
| r1679 | r1680 | |
| 960 | 962 | } |
| 961 | 963 | } |
| 962 | 964 | |
| 963 | VIDEO_START( mpu4_vid ) | |
| 965 | static VIDEO_START( mpu4_vid ) | |
| 964 | 966 | { |
| 965 | 967 | /* if anything uses tile sizes other than 8x8 we can't really do it this way.. we'll have to draw tiles by hand. |
| 966 | 968 | maybe we will anyway, but for now we don't need to */ |
| r1679 | r1680 | |
| 1252 | 1254 | |
| 1253 | 1255 | INPUT_PORTS_END |
| 1254 | 1256 | |
| 1255 | INTERRUPT_GEN(mpu4_vid_irq) | |
| 1257 | static INTERRUPT_GEN(mpu4_vid_irq) | |
| 1256 | 1258 | { |
| 1257 | 1259 | LOGSTUFF(("scn2674_irq_mask %02x\n",scn2674_irq_mask)); |
| 1258 | 1260 | if (cpu_getiloops()==0) // vbl |
| r1679 | r1680 | |
| 1465 | 1467 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, dealemcharlayout, 0, 32 ) |
| 1466 | 1468 | GFXDECODE_END |
| 1467 | 1469 | |
| 1468 | UINT8 *dealem_videoram; | |
| 1470 | static UINT8 *dealem_videoram; | |
| 1469 | 1471 | |
| 1472 | static WRITE8_HANDLER( dealem_mc6845_address_w ) | |
| 1473 | { | |
| 1474 | mc6845_address_w(mc6845, data); | |
| 1475 | } | |
| 1476 | ||
| 1477 | static READ8_HANDLER( dealem_mc6845_register_r ) | |
| 1478 | { | |
| 1479 | return mc6845_register_r(mc6845); | |
| 1480 | } | |
| 1481 | ||
| 1482 | static WRITE8_HANDLER( dealem_mc6845_register_w ) | |
| 1483 | { | |
| 1484 | mc6845_register_w(mc6845, data); | |
| 1485 | } | |
| 1486 | ||
| 1470 | 1487 | /*************************************************************************** |
| 1471 | 1488 | |
| 1472 | 1489 | Convert the color PROMs into a more useable format. |
| r1679 | r1680 | |
| 1486 | 1503 | |
| 1487 | 1504 | ***************************************************************************/ |
| 1488 | 1505 | |
| 1489 | PALETTE_INIT( dealem ) | |
| 1506 | static PALETTE_INIT( dealem ) | |
| 1490 | 1507 | { |
| 1491 | 1508 | int i; |
| 1492 | 1509 | for (i = 0;i < memory_region_length(REGION_PROMS);i++) |
| r1679 | r1680 | |
| 1515 | 1532 | |
| 1516 | 1533 | } |
| 1517 | 1534 | |
| 1518 | VIDEO_START(dealem) | |
| 1535 | static VIDEO_START(dealem) | |
| 1519 | 1536 | { |
| 1537 | mc6845 = mc6845_config(NULL); | |
| 1520 | 1538 | } |
| 1521 | 1539 | |
| 1522 | VIDEO_UPDATE(dealem) | |
| 1540 | static VIDEO_UPDATE(dealem) | |
| 1523 | 1541 | { |
| 1524 | 1542 | int x,y; |
| 1525 | 1543 | int count = 0; |
| r1679 | r1680 | |
| 1541 | 1559 | |
| 1542 | 1560 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 1543 | 1561 | |
| 1544 | AM_RANGE(0x0800, 0x0800) AM_WRITE(crtc6845_address_w) | |
| 1545 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 1562 | AM_RANGE(0x0800, 0x0800) AM_WRITE(dealem_mc6845_address_w) | |
| 1563 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(dealem_mc6845_register_r, dealem_mc6845_register_w) | |
| 1546 | 1564 | |
| 1547 | 1565 | // AM_RANGE(0x0850, 0x0850) AM_WRITE(bankswitch_w) // write bank (rom page select) |
| 1548 | 1566 | |
| r1679 | r1680 | |
| 1656 | 1674 | |
| 1657 | 1675 | MACHINE_DRIVER_END |
| 1658 | 1676 | |
| 1659 | DRIVER_INIT (crmaze) | |
| 1677 | static DRIVER_INIT (crmaze) | |
| 1660 | 1678 | { |
| 1661 | 1679 | int x; |
| 1662 | 1680 | static const UINT8 chr_table[72]={0x00,0x84,0x94,0x3C,0xEC,0x5C,0xEC,0x50, |
| r1679 | r1680 | |
| 1675 | 1693 | } |
| 1676 | 1694 | } |
| 1677 | 1695 | |
| 1678 | DRIVER_INIT (mating) | |
| 1696 | static DRIVER_INIT (mating) | |
| 1679 | 1697 | { |
| 1680 | 1698 | int x; |
| 1681 | 1699 | static const UINT8 chr_table[72]={0x00,0x18,0xC8,0xA4,0x0C,0x80,0x0C,0x90, |
| r1679 | r1680 | |
|---|---|---|
| 285 | 285 | static WRITE16_HANDLER( mouja_irq_timer_ctrl_w ) |
| 286 | 286 | { |
| 287 | 287 | double freq = 58.0 + (0xff - (data & 0xff)) / 2.2; /* 0xff=58Hz, 0x80=116Hz? */ |
| 288 | timer_adjust(mouja_irq_timer, attotime_zero, 0, ATTOTIME_IN_HZ(freq)); | |
| 288 | timer_adjust_periodic(mouja_irq_timer, attotime_zero, 0, ATTOTIME_IN_HZ(freq)); | |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | static INTERRUPT_GEN( mouja_interrupt ) |
| r1679 | r1680 | |
| 5168 | 5168 | Dharma Doujou |
| 5169 | 5169 | Metro 1994 |
| 5170 | 5170 | |
| 5171 | MTR5260-A | |
| 5172 | |-----------------------------------------------| | |
| 5173 | |TA7222 3.579545MHz | | |
| 5174 | | YM3012 6116 | | |
| 5175 | |C3403 C3403 YM2151 M6295 | | |
| 5176 | | 26.666MHz JA-7 JA-8 | | |
| 5177 | | 6264 | | |
| 5178 | |J 6264 |--------| D78C10 | | |
| 5179 | |A 6264 |IMAGETEK| | | |
| 5180 | |M |14220 | | | |
| 5181 | |M MM1035 | | | | |
| 5182 | |A |------------| |--------| | | |
| 5183 | | | 68000 | JB-1 | | |
| 5184 | | |------------| | | |
| 5185 | | JB-2 | | |
| 5186 | | 24MHz | | |
| 5187 | | MACH110 JB-3 | | |
| 5188 | | 6264 | | |
| 5189 | |DSW1 6264 JB-4 | | |
| 5190 | |DSW2 JC-6 JC-5 | | |
| 5191 | |-----------------------------------------------| | |
| 5192 | Notes: | |
| 5193 | 68000 clock - 12.000MHz [24/2] | |
| 5194 | D78C10 clock - 12.000MHz [24/2] | |
| 5195 | YM2151 clock - 3.579545MHz | |
| 5196 | Oki M6295 clock - 1.200MHz [24/20], sample rate = 1200000 / 132 | |
| 5197 | VSync - 60Hz | |
| 5198 | HSync - 15.55kHz | |
| 5171 | 5199 | |
| 5172 | M6395 JA-7 JA-8 | |
| 5173 | 5200 | |
| 5174 | 26.666MHz NEC78C10 | |
| 5175 | 7C199 | |
| 5176 | 7C199 | |
| 5177 | 7C199 JB-1 | |
| 5178 | JB-2 | |
| 5179 | JB-3 | |
| 5180 | 68000-12 JB-4 | |
| 5201 | Korean version of Dharma runs on Metro hardware PCB Number - METRO CORP. MTR527 | |
| 5181 | 5202 | |
| 5182 | 24MHz | |
| 5183 | 6264 | |
| 5184 | 6264 | |
| 5185 | JC-5 JC-6 | |
| 5186 | ||
| 5187 | 5203 | ***************************************************************************/ |
| 5188 | 5204 | |
| 5189 | 5205 | ROM_START( dharma ) |
| r1679 | r1680 | |
| 5205 | 5221 | ROM_LOAD( "ja-7", 0x000000, 0x040000, CRC(7ce817eb) SHA1(9dfb79021a552877fbc26049cca853c0b93735b5) ) |
| 5206 | 5222 | ROM_END |
| 5207 | 5223 | |
| 5208 | /* | |
| 5209 | ||
| 5210 | This is a Korean version of Dharma | |
| 5211 | Runs on Metro hardware. | |
| 5212 | PCB Number - METRO CORP. MTR527 | |
| 5213 | Imagetek 14220 gfx chip | |
| 5214 | 68000 CPU | |
| 5215 | XTALs 26.666MHz, 24.0MHz, 3.579545MHz | |
| 5216 | YM2413 | |
| 5217 | OKI M6295 | |
| 5218 | D78C10 | |
| 5219 | MACH110 | |
| 5220 | 8-position DSW x2 | |
| 5221 | 6116 SRAM x1 | |
| 5222 | 6264 SRAM x5 | |
| 5223 | ||
| 5224 | */ | |
| 5225 | ||
| 5226 | 5224 | ROM_START( dharmak ) |
| 5227 | 5225 | ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 Code */ |
| 5228 | 5226 | ROM_LOAD16_BYTE( "5.bin", 0x000000, 0x020000, CRC(7dec1f77) SHA1(86cda990392e738f1bacec9d7a232d27887c1135) ) |
| r1679 | r1680 | |
| 5281 | 5279 | VSync - 60Hz |
| 5282 | 5280 | HSync - 15.55kHz |
| 5283 | 5281 | |
| 5284 | 68000 @ 12MHz | |
| 5285 | NEC D78C10 | |
| 5286 | AMD Mach110 | |
| 5287 | Imagetek 14220 | |
| 5288 | YM2151 + M6295 + YM3012 | |
| 5289 | 5282 | RAM - CY7C199 (x2), 6164 (x2), LH5168 (x2), 6116 (x1) |
| 5290 | DIPSW 8-position (x2) | |
| 5291 | XTAL - 3.579545MHz (near YM2151 & M6295) | |
| 5292 | OSC - 24MHz (near 68000 & Mach110) | |
| 5293 | OSC - 26.666MHz (near 14220) | |
| 5294 | 5283 | ROMs 5+6 = Main Prg |
| 5295 | 5284 | ROMs 7+8 = Sound Data |
| 5296 | 5285 | ROMs 1-4 = GFX Data |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | driver by Aaron Giles |
| 6 | 6 | |
| 7 | 7 | Games supported: |
| 8 | * Cruis'n USA (1994) [3 sets] | |
| 9 | * Cruis'n World (1996) [4 sets] | |
| 8 | * Cruis'n USA (1994) [3 sets] | |
| 9 | * Cruis'n World (1996) [4 sets] | |
| 10 | 10 | * War Gods (1996) |
| 11 | 11 | * Off Road Challenge (1997) |
| 12 | 12 | |
| r1679 | r1680 | |
| 298 | 298 | int which = (offset >> 4) & 1; |
| 299 | 299 | // logerror("%06X:tms32031_control_w(%02X) = %08X\n", activecpu_get_pc(), offset, data); |
| 300 | 300 | if (data & 0x40) |
| 301 | timer_adjust(timer[which], attotime_never, 0 | |
| 301 | timer_adjust_oneshot(timer[which], attotime_never, 0 | |
| 302 | 302 | |
| 303 | 303 | /* bit 0x200 selects internal clocking, which is 1/2 the main CPU clock rate */ |
| 304 | 304 | if (data & 0x200) |
| r1679 | r1680 | |
| 682 | 682 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 683 | 683 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 684 | 684 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 685 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter") PORT_CODE(KEYCODE_F2) /* Test switch */ | |
| 685 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter") PORT_CODE(KEYCODE_F2) /* Test switch */ | |
| 686 | 686 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 687 | 687 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 688 | 688 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 803 | 803 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 804 | 804 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 805 | 805 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 806 | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter") PORT_CODE(KEYCODE_F2) /* Test switch */ | |
| 806 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter") PORT_CODE(KEYCODE_F2) /* Test switch */ | |
| 807 | 807 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 808 | 808 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 809 | 809 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 955 | 955 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 956 | 956 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 957 | 957 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 958 | PORT_ | |
| 958 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 959 | 959 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 960 | 960 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 961 | 961 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 115 | 115 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 116 | 116 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 117 | 117 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 118 | PORT_ | |
| 118 | PORT_SERVICE( 0x4000, IP_ACTIVE_LOW | |
| 119 | 119 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 120 | 120 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 121 | 121 | INPUT_PORTS_END |
| r1679 | r1680 | |
|---|---|---|
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | #include "driver.h" |
| 27 | #include "video/crtc6845.h" | |
| 28 | 27 | #include "sound/ay8910.h" |
| 29 | 28 | |
| 30 | 29 | /* video */ |
| 31 | WRITE8_HANDLER( usg_videoram_w ); | |
| 32 | WRITE8_HANDLER( usg_charram_w ); | |
| 33 | VIDEO_START(usg); | |
| 34 | PALETTE_INIT(usg); | |
| 35 | VIDEO_UPDATE(usg); | |
| 36 | extern tilemap *usg_tilemap; | |
| 30 | WRITE8_HANDLER( usgames_videoram_w ); | |
| 31 | WRITE8_HANDLER( usgames_charram_w ); | |
| 32 | WRITE8_HANDLER( usgames_mc6845_address_w ); | |
| 33 | WRITE8_HANDLER( usgames_mc6845_register_w ); | |
| 34 | VIDEO_START(usgames); | |
| 35 | PALETTE_INIT(usgames); | |
| 36 | VIDEO_UPDATE(usgames); | |
| 37 | 37 | |
| 38 | 38 | |
| 39 | extern UINT8 *usg_videoram,*usg_charram; | |
| 39 | extern UINT8 *usgames_videoram,*usgames_charram; | |
| 40 | 40 | |
| 41 | 41 | |
| 42 | static WRITE8_HANDLER( usg_rombank_w ) | |
| 42 | static WRITE8_HANDLER( usgames_rombank_w ) | |
| 43 | 43 | { |
| 44 | 44 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 45 | 45 | |
| r1679 | r1680 | |
| 68 | 68 | |
| 69 | 69 | |
| 70 | 70 | |
| 71 | static ADDRESS_MAP_START( usg_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 71 | static ADDRESS_MAP_START( usgames_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 72 | 72 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_RAM) |
| 73 | 73 | |
| 74 | 74 | AM_RANGE(0x2000, 0x2000) AM_READ(input_port_1_r) |
| r1679 | r1680 | |
| 96 | 96 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_ROM) |
| 97 | 97 | ADDRESS_MAP_END |
| 98 | 98 | |
| 99 | static ADDRESS_MAP_START( usg_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 99 | static ADDRESS_MAP_START( usgames_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 100 | 100 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 101 | 101 | |
| 102 | 102 | AM_RANGE(0x2020, 0x2020) AM_WRITE(lamps1_w) |
| 103 | 103 | AM_RANGE(0x2030, 0x2030) AM_WRITE(lamps2_w) |
| 104 | 104 | |
| 105 | AM_RANGE(0x2040, 0x2040) AM_WRITE(crtc6845_address_w) | |
| 106 | AM_RANGE(0x2041, 0x2041) AM_WRITE(crtc6845_register_w) | |
| 105 | AM_RANGE(0x2040, 0x2040) AM_WRITE(usgames_mc6845_address_w) | |
| 106 | AM_RANGE(0x2041, 0x2041) AM_WRITE(usgames_mc6845_register_w) | |
| 107 | 107 | |
| 108 | 108 | AM_RANGE(0x2400, 0x2400) AM_WRITE(AY8910_control_port_0_w) |
| 109 | 109 | AM_RANGE(0x2401, 0x2401) AM_WRITE(AY8910_write_port_0_w) |
| 110 | 110 | |
| 111 | AM_RANGE(0x2060, 0x2060) AM_WRITE(usg_rombank_w) | |
| 111 | AM_RANGE(0x2060, 0x2060) AM_WRITE(usgames_rombank_w) | |
| 112 | 112 | |
| 113 | AM_RANGE(0x2800, 0x2fff) AM_WRITE(usg_charram_w) AM_BASE(&usg_charram) | |
| 114 | AM_RANGE(0x3000, 0x3fff) AM_WRITE(usg_videoram_w) AM_BASE(&usg_videoram) | |
| 113 | AM_RANGE(0x2800, 0x2fff) AM_WRITE(usgames_charram_w) AM_BASE(&usgames_charram) | |
| 114 | AM_RANGE(0x3000, 0x3fff) AM_WRITE(usgames_videoram_w) AM_BASE(&usgames_videoram) | |
| 115 | 115 | AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 116 | 116 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) |
| 117 | 117 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 122 | 122 | AM_RANGE(0x2420, 0x2420) AM_WRITE(lamps1_w) |
| 123 | 123 | AM_RANGE(0x2430, 0x2430) AM_WRITE(lamps2_w) |
| 124 | 124 | |
| 125 | AM_RANGE(0x2440, 0x2440) AM_WRITE(crtc6845_address_w) | |
| 126 | AM_RANGE(0x2441, 0x2441) AM_WRITE(crtc6845_register_w) | |
| 125 | AM_RANGE(0x2440, 0x2440) AM_WRITE(usgames_mc6845_address_w) | |
| 126 | AM_RANGE(0x2441, 0x2441) AM_WRITE(usgames_mc6845_register_w) | |
| 127 | 127 | |
| 128 | 128 | AM_RANGE(0x2000, 0x2000) AM_WRITE(AY8910_control_port_0_w) |
| 129 | 129 | AM_RANGE(0x2001, 0x2001) AM_WRITE(AY8910_write_port_0_w) |
| 130 | 130 | |
| 131 | AM_RANGE(0x2460, 0x2460) AM_WRITE(usg_rombank_w) | |
| 131 | AM_RANGE(0x2460, 0x2460) AM_WRITE(usgames_rombank_w) | |
| 132 | 132 | |
| 133 | AM_RANGE(0x2800, 0x2fff) AM_WRITE(usg_charram_w) AM_BASE(&usg_charram) | |
| 134 | AM_RANGE(0x3000, 0x3fff) AM_WRITE(usg_videoram_w) AM_BASE(&usg_videoram) | |
| 133 | AM_RANGE(0x2800, 0x2fff) AM_WRITE(usgames_charram_w) AM_BASE(&usgames_charram) | |
| 134 | AM_RANGE(0x3000, 0x3fff) AM_WRITE(usgames_videoram_w) AM_BASE(&usgames_videoram) | |
| 135 | 135 | AM_RANGE(0x4000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 136 | 136 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) |
| 137 | 137 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 286 | 286 | |
| 287 | 287 | |
| 288 | 288 | |
| 289 | static MACHINE_DRIVER_START( usg ) | |
| 289 | static MACHINE_DRIVER_START( usg32 ) | |
| 290 | 290 | |
| 291 | 291 | /* basic machine hardware */ |
| 292 | 292 | MDRV_CPU_ADD_TAG("main", M6809, 2000000) /* ?? */ |
| 293 | MDRV_CPU_PROGRAM_MAP(usg_readmem,usg_writemem) | |
| 293 | MDRV_CPU_PROGRAM_MAP(usgames_readmem,usgames_writemem) | |
| 294 | 294 | MDRV_CPU_VBLANK_INT(irq0_line_hold,5) /* ?? */ |
| 295 | 295 | |
| 296 | 296 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1679 | r1680 | |
| 307 | 307 | MDRV_PALETTE_LENGTH(16) |
| 308 | 308 | MDRV_COLORTABLE_LENGTH(2*256) |
| 309 | 309 | |
| 310 | MDRV_PALETTE_INIT(usg) | |
| 311 | MDRV_VIDEO_START(usg) | |
| 312 | MDRV_VIDEO_UPDATE(usg) | |
| 310 | MDRV_PALETTE_INIT(usgames) | |
| 311 | MDRV_VIDEO_START(usgames) | |
| 312 | MDRV_VIDEO_UPDATE(usgames) | |
| 313 | 313 | |
| 314 | 314 | /* sound hardware */ |
| 315 | 315 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r1679 | r1680 | |
| 319 | 319 | MACHINE_DRIVER_END |
| 320 | 320 | |
| 321 | 321 | static MACHINE_DRIVER_START( usg185 ) |
| 322 | MDRV_IMPORT_FROM(usg) | |
| 322 | MDRV_IMPORT_FROM(usg32) | |
| 323 | 323 | MDRV_CPU_MODIFY("main") |
| 324 | 324 | MDRV_CPU_PROGRAM_MAP(usg185_readmem,usg185_writemem) |
| 325 | 325 | MACHINE_DRIVER_END |
| r1679 | r1680 | |
| 443 | 443 | ROM_END |
| 444 | 444 | |
| 445 | 445 | |
| 446 | GAME( 1987, usg32, 0, usg, usg32, 0, ROT0, "U.S. Games", "Super Duper Casino (California V3.2)", 0 ) | |
| 447 | GAME( 1988, usg83, 0, usg, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.3", 0 ) | |
| 448 | GAME( 1988, usg83x, usg83, usg, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.3X", 0 ) | |
| 449 | GAME( 1988, usg82, usg83, usg, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.2" , 0) // "Feb.08,1988" | |
| 446 | GAME( 1987, usg32, 0, usg32, usg32, 0, ROT0, "U.S. Games", "Super Duper Casino (California V3.2)", 0 ) | |
| 447 | GAME( 1988, usg83, 0, usg32, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.3", 0 ) | |
| 448 | GAME( 1988, usg83x, usg83, usg32, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.3X", 0 ) | |
| 449 | GAME( 1988, usg82, usg83, usg32, usg83, 0, ROT0, "U.S. Games", "Super Ten V8.2" , 0) // "Feb.08,1988" | |
| 450 | 450 | GAME( 1989, usg182, 0, usg185, usg83, 0, ROT0, "U.S. Games", "Games V18.2", 0 ) |
| 451 | 451 | GAME( 1991, usg185, 0, usg185, usg83, 0, ROT0, "U.S. Games", "Games V18.7C", 0 ) |
| 452 | 452 | GAME( 1992, usg252, 0, usg185, usg83, 0, ROT0, "U.S. Games", "Games V25.4X", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 367 | 367 | #define MASTER_CLOCK 10000000 /* 10MHz */ |
| 368 | 368 | |
| 369 | 369 | #include "driver.h" |
| 370 | #include "video/ | |
| 370 | #include "video/m | |
| 371 | 371 | #include "machine/6821pia.h" |
| 372 | 372 | #include "sound/discrete.h" |
| 373 | 373 | |
| r1679 | r1680 | |
| 380 | 380 | * Video Hardware * |
| 381 | 381 | *************************/ |
| 382 | 382 | |
| 383 | static mc6845_t *mc6845; | |
| 383 | 384 | static tilemap *bg_tilemap; |
| 384 | 385 | |
| 386 | static WRITE8_HANDLER( pmpoker_mc6845_address_w ) | |
| 387 | { | |
| 388 | mc6845_address_w(mc6845, data); | |
| 389 | } | |
| 390 | ||
| 391 | static READ8_HANDLER( pmpoker_mc6845_register_r ) | |
| 392 | { | |
| 393 | return mc6845_register_r(mc6845); | |
| 394 | } | |
| 395 | ||
| 396 | static WRITE8_HANDLER( pmpoker_mc6845_register_w ) | |
| 397 | { | |
| 398 | mc6845_register_w(mc6845, data); | |
| 399 | } | |
| 400 | ||
| 385 | 401 | static WRITE8_HANDLER( pmpoker_videoram_w ) |
| 386 | 402 | { |
| 387 | 403 | videoram[offset] = data; |
| r1679 | r1680 | |
| 415 | 431 | |
| 416 | 432 | static VIDEO_START( pmpoker ) |
| 417 | 433 | { |
| 418 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 419 | TILEMAP_TYPE_PEN, 8, 8, 32, 29); | |
| 434 | mc6845 = mc6845_config(NULL); | |
| 435 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 29); | |
| 420 | 436 | } |
| 421 | 437 | |
| 422 | 438 | static VIDEO_UPDATE( pmpoker ) |
| r1679 | r1680 | |
| 468 | 484 | |
| 469 | 485 | static ADDRESS_MAP_START( pmpoker_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 470 | 486 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */ |
| 471 | AM_RANGE(0x0800, 0x0800) AM_WRITE(crtc6845_address_w) | |
| 472 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 487 | AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_mc6845_address_w) | |
| 488 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_mc6845_register_r, pmpoker_mc6845_register_w) | |
| 473 | 489 | AM_RANGE(0x0844, 0x0847) AM_READWRITE(pia_0_r, pia_0_w) |
| 474 | 490 | AM_RANGE(0x0848, 0x084b) AM_READWRITE(pia_1_r, pia_1_w) |
| 475 | 491 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram) |
| r1679 | r1680 | |
| 480 | 496 | |
| 481 | 497 | static ADDRESS_MAP_START( jokerpkr_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 482 | 498 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */ |
| 483 | AM_RANGE(0x0800, 0x0800) AM_WRITE(crtc6845_address_w) | |
| 484 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 499 | AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_mc6845_address_w) | |
| 500 | AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_mc6845_register_r, pmpoker_mc6845_register_w) | |
| 485 | 501 | AM_RANGE(0x0844, 0x0847) AM_READWRITE(pia_0_r, pia_0_w) |
| 486 | 502 | AM_RANGE(0x0848, 0x084b) AM_READWRITE(pia_1_r, pia_1_w) |
| 487 | 503 | AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram) |
| r1679 | r1680 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | static VIDEO_START( yumefuda ) |
| 75 | 75 | { |
| 76 | bg_tilemap = tilemap_create(y_get_bg_tile_info,tilemap_scan_rows, | |
| 76 | bg_tilemap = tilemap_create(y_get_bg_tile_info,tilemap_scan_rows, | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | static VIDEO_UPDATE( yumefuda ) |
| r1679 | r1680 | |
|---|---|---|
| 2292 | 2292 | { |
| 2293 | 2293 | // set keyboard timer |
| 2294 | 2294 | keyboard_timer = timer_alloc(keyboard_timer_callback, NULL); |
| 2295 | timer_adjust(keyboard_timer, ATTOTIME_IN_MSEC(10), 0, ATTOTIME_IN_MSEC(10)); | |
| 2295 | timer_adjust_periodic(keyboard_timer, ATTOTIME_IN_MSEC(10), 0, ATTOTIME_IN_MSEC(10)); | |
| 2296 | 2296 | } |
| 2297 | 2297 | |
| 2298 | 2298 | static DRIVER_INIT(kbm) |
| r1679 | r1680 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | analog_port_val = 0xff; |
| 109 | 109 | |
| 110 | timer_adjust(analog_timer_1, compute_duration(readinputportbytag("AN1")), 0x02, attotime_zero); | |
| 111 | timer_adjust(analog_timer_2, compute_duration(readinputportbytag("AN2")), 0x01, attotime_zero); | |
| 110 | timer_adjust_oneshot(analog_timer_1, compute_duration(readinputportbytag("AN1")), 0x02); | |
| 111 | timer_adjust_oneshot(analog_timer_2, compute_duration(readinputportbytag("AN2")), 0x01); | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 |
| r1679 | r1680 | |
|---|---|---|
| 370 | 370 | |
| 371 | 371 | static VIDEO_START( ss23 ) |
| 372 | 372 | { |
| 373 | bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows, | |
| 373 | bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows, | |
| 374 | 374 | tilemap_set_transparent_pen( bgtilemap, 0xf ); |
| 375 | 375 | } |
| 376 | 376 |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | static VIDEO_START( tattack ) |
| 51 | 51 | { |
| 52 | tmap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 52 | tmap = tilemap_create( get_tile_info,tilemap_scan_rows, | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | static ADDRESS_MAP_START( mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1679 | r1680 | |
|---|---|---|
| 135 | 135 | else |
| 136 | 136 | next_vpos = SPACEFB_INT_TRIGGER_COUNT_1; |
| 137 | 137 | |
| 138 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0 | |
| 138 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), 0 | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
| r1679 | r1680 | |
| 147 | 147 | |
| 148 | 148 | static void start_interrupt_timer(void) |
| 149 | 149 | { |
| 150 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, SPACEFB_INT_TRIGGER_COUNT_1, 0), 0 | |
| 150 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, SPACEFB_INT_TRIGGER_COUNT_1, 0), 0 | |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 |
| r1679 | r1680 | |
|---|---|---|
| 577 | 577 | { |
| 578 | 578 | scanline_counter++; |
| 579 | 579 | cpunum_set_input_line(machine, 0, 5, HOLD_LINE); // raster IRQ, changes scroll values for road |
| 580 | timer_adjust(scanline_timer, attotime_div(ATTOTIME_IN_HZ(60), total_scanlines), 0 | |
| 580 | timer_adjust_oneshot(scanline_timer, attotime_div(ATTOTIME_IN_HZ(60), total_scanlines), 0 | |
| 581 | 581 | |
| 582 | 582 | if (scanline_counter<256) |
| 583 | 583 | { |
| r1679 | r1680 | |
| 608 | 608 | scanline_counter = -1; |
| 609 | 609 | fillbitmap(wheelfir_tmp_bitmap[0], 0,&machine->screen[0].visarea); |
| 610 | 610 | |
| 611 | timer_adjust(frame_timer, attotime_zero, 0, attotime_zero); | |
| 612 | timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero); | |
| 611 | timer_adjust_oneshot(frame_timer, attotime_zero, 0); | |
| 612 | timer_adjust_oneshot(scanline_timer, attotime_zero, 0); | |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | static MACHINE_RESET(wheelfir) |
| 616 | 616 | { |
| 617 | 617 | frame_timer = timer_alloc(frame_timer_callback, NULL); |
| 618 | 618 | scanline_timer = timer_alloc(scanline_timer_callback, NULL); |
| 619 | timer_adjust(frame_timer, attotime_zero, 0, attotime_zero); | |
| 620 | timer_adjust(scanline_timer, attotime_zero, 0, attotime_zero); | |
| 619 | timer_adjust_oneshot(frame_timer, attotime_zero, 0); | |
| 620 | timer_adjust_oneshot(scanline_timer, attotime_zero, 0); | |
| 621 | 621 | scanline_counter = -1; |
| 622 | 622 | } |
| 623 | 623 |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | static VIDEO_START(dunhuang) |
| 96 | 96 | { |
| 97 | 97 | tmap = tilemap_create( get_tile_info, tilemap_scan_rows, |
| 98 | | |
| 98 | | |
| 99 | 99 | |
| 100 | 100 | tmap2 = tilemap_create( get_tile_info2, tilemap_scan_rows, |
| 101 | | |
| 101 | | |
| 102 | 102 | |
| 103 | 103 | tilemap_set_transparent_pen(tmap, 0); |
| 104 | 104 | tilemap_set_transparent_pen(tmap2, 0); |
| r1679 | r1680 | |
|---|---|---|
| 242 | 242 | |
| 243 | 243 | static VIDEO_START( onetwo ) |
| 244 | 244 | { |
| 245 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 245 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | static VIDEO_UPDATE( onetwo ) |
| r1679 | r1680 | |
|---|---|---|
| 303 | 303 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 304 | 304 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 305 | 305 | MDRV_GFXDECODE(gunsmoke) |
| 306 | MDRV_PALETTE_LENGTH(256) | |
| 307 | MDRV_COLORTABLE_LENGTH(32*4+16*16+16*16) | |
| 306 | MDRV_PALETTE_LENGTH(32*4+16*16+16*16) | |
| 308 | 307 | |
| 309 | 308 | MDRV_PALETTE_INIT(gunsmoke) |
| 310 | 309 | MDRV_VIDEO_START(gunsmoke) |
| r1679 | r1680 | |
|---|---|---|
| 92 | 92 | #include "cvs.h" |
| 93 | 93 | |
| 94 | 94 | |
| 95 | /* Turn to 1 so all inputs are always available (this shall only be a debug feature) */ | |
| 96 | #define CVS_SHOW_ALL_INPUTS 0 | |
| 97 | ||
| 98 | ||
| 95 | 99 | #define VERBOSE 1 |
| 96 | 100 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 97 | 101 | |
| r1679 | r1680 | |
| 121 | 125 | UINT8 *cvs_bullet_ram; |
| 122 | 126 | UINT8 *cvs_palette_ram; |
| 123 | 127 | UINT8 *cvs_character_ram; |
| 128 | UINT8 *cvs_s2636_0_ram; | |
| 129 | UINT8 *cvs_s2636_1_ram; | |
| 130 | UINT8 *cvs_s2636_2_ram; | |
| 124 | 131 | |
| 125 | 132 | static UINT8 *cvs_4_bit_dac_data; |
| 126 | 133 | static UINT8 *cvs_tms5110_ctl_data; |
| r1679 | r1680 | |
| 178 | 185 | } |
| 179 | 186 | |
| 180 | 187 | |
| 181 | READ8_HANDLER( cvs_s2636_ | |
| 188 | READ8_HANDLER( cvs_s2636_0_or_character_ram_r ) | |
| 182 | 189 | { |
| 183 | 190 | if (activecpu_get_reg(S2650_FO)) |
| 184 | 191 | return cvs_character_ram[(0 * 0x800) | 0x400 | character_ram_page_start | offset]; |
| 185 | 192 | else |
| 186 | return s2636_ | |
| 193 | return cvs_s2636_0_ram[offset]; | |
| 187 | 194 | } |
| 188 | 195 | |
| 189 | WRITE8_HANDLER( cvs_s2636_ | |
| 196 | WRITE8_HANDLER( cvs_s2636_0_or_character_ram_w ) | |
| 190 | 197 | { |
| 191 | 198 | if (activecpu_get_reg(S2650_FO)) |
| 192 | 199 | cvs_character_ram[(0 * 0x800) | 0x400 | character_ram_page_start | offset] = data; |
| 193 | 200 | else |
| 194 | s2636_ | |
| 201 | cvs_s2636_0_ram[offset] = data; | |
| 195 | 202 | } |
| 196 | 203 | |
| 197 | 204 | |
| 198 | READ8_HANDLER( cvs_s2636_ | |
| 205 | READ8_HANDLER( cvs_s2636_1_or_character_ram_r ) | |
| 199 | 206 | { |
| 200 | 207 | if (activecpu_get_reg(S2650_FO)) |
| 201 | 208 | return cvs_character_ram[(1 * 0x800) | 0x400 | character_ram_page_start | offset]; |
| 202 | 209 | else |
| 203 | return s2636_ | |
| 210 | return cvs_s2636_1_ram[offset]; | |
| 204 | 211 | } |
| 205 | 212 | |
| 206 | WRITE8_HANDLER( cvs_s2636_ | |
| 213 | WRITE8_HANDLER( cvs_s2636_1_or_character_ram_w ) | |
| 207 | 214 | { |
| 208 | 215 | if (activecpu_get_reg(S2650_FO)) |
| 209 | 216 | cvs_character_ram[(1 * 0x800) | 0x400 | character_ram_page_start | offset] = data; |
| 210 | 217 | else |
| 211 | s2636_ | |
| 218 | cvs_s2636_1_ram[offset] = data; | |
| 212 | 219 | } |
| 213 | 220 | |
| 214 | 221 | |
| 215 | READ8_HANDLER( cvs_s2636_ | |
| 222 | READ8_HANDLER( cvs_s2636_2_or_character_ram_r ) | |
| 216 | 223 | { |
| 217 | 224 | if (activecpu_get_reg(S2650_FO)) |
| 218 | 225 | return cvs_character_ram[(2 * 0x800) | 0x400 | character_ram_page_start | offset]; |
| 219 | 226 | else |
| 220 | return s2636_ | |
| 227 | return cvs_s2636_2_ram[offset]; | |
| 221 | 228 | } |
| 222 | 229 | |
| 223 | WRITE8_HANDLER( cvs_s2636_ | |
| 230 | WRITE8_HANDLER( cvs_s2636_2_or_character_ram_w ) | |
| 224 | 231 | { |
| 225 | 232 | if (activecpu_get_reg(S2650_FO)) |
| 226 | 233 | cvs_character_ram[(2 * 0x800) | 0x400 | character_ram_page_start | offset] = data; |
| 227 | 234 | else |
| 228 | s2636_ | |
| 235 | cvs_s2636_2_ram[offset] = data; | |
| 229 | 236 | } |
| 230 | 237 | |
| 231 | 238 | |
| r1679 | r1680 | |
| 480 | 487 | by allocating twice the amount, |
| 481 | 488 | we can use the same gfx_layout */ |
| 482 | 489 | /* register state save */ |
| 490 | state_save_register_global_pointer(cvs_color_ram, 0x400); | |
| 491 | state_save_register_global_pointer(cvs_palette_ram, 0x10); | |
| 492 | state_save_register_global_pointer(cvs_character_ram, 3 * 0x800); | |
| 483 | 493 | state_save_register_global(character_banking_mode); |
| 484 | 494 | state_save_register_global(character_ram_page_start); |
| 485 | 495 | state_save_register_global(speech_rom_bit_address); |
| r1679 | r1680 | |
| 497 | 507 | ADDRESS_MAP_FLAGS( AMEF_ABITS(15) ) |
| 498 | 508 | AM_RANGE(0x0000, 0x13ff) AM_ROM |
| 499 | 509 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, cvs_bullet_ram_or_palette_w) AM_BASE(&cvs_bullet_ram) |
| 500 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_3_or_character_ram_r, cvs_s2636_3_or_character_ram_w) AM_BASE(&s2636_3_ram) | |
| 501 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&s2636_2_ram) | |
| 502 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&s2636_1_ram) | |
| 510 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&cvs_s2636_2_ram) | |
| 511 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&cvs_s2636_1_ram) | |
| 512 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w) AM_BASE(&cvs_s2636_0_ram) | |
| 503 | 513 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, cvs_video_or_color_ram_w) AM_BASE(&cvs_video_ram) |
| 504 | 514 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 505 | 515 | AM_RANGE(0x2000, 0x33ff) AM_ROM |
| r1679 | r1680 | |
| 565 | 575 | |
| 566 | 576 | /************************************* |
| 567 | 577 | * |
| 568 | * Standard CVS port definition | |
| 578 | * Standard CVS port definitions | |
| 569 | 579 | * |
| 570 | 580 | *************************************/ |
| 571 | 581 | |
| 572 | 582 | static INPUT_PORTS_START( cvs ) |
| 583 | PORT_START_TAG("IN0") /* Matrix 0 */ | |
| 584 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 585 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) | |
| 586 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 587 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 588 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL /* "Red button" */ | |
| 589 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* "Red button" */ | |
| 590 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 591 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 573 | 592 | |
| 574 | PORT_START /* Matrix 0 */ | |
| 575 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) /* confirmed */ | |
| 576 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) /* confirmed */ | |
| 577 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) /* confirmed */ | |
| 578 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) /* confirmed */ | |
| 579 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 580 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* confirmed */ | |
| 581 | PORT_BIT( 0xC0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 593 | PORT_START_TAG("IN1") /* Dunno */ | |
| 594 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL /* "Green button" */ | |
| 595 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* "Green button" */ | |
| 596 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 597 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 598 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) | |
| 599 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) | |
| 600 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 601 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 582 | 602 | |
| 583 | PORT_START /* Dunno */ | |
| 584 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_COCKTAIL | |
| 585 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* confirmed */ | |
| 586 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) /* confirmed */ | |
| 587 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) /* confirmed */ | |
| 588 | PORT_BIT( 0xcc, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 589 | ||
| 590 | PORT_START /* Dunno */ | |
| 591 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) /* duplicate? */ | |
| 603 | PORT_START_TAG("IN2") /* Dunno */ | |
| 604 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* not sure it's SERVICE1 : it uses "Coin B" coinage and doesn't say "CREDIT" */ | |
| 592 | 605 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 593 | 606 | |
| 594 | PORT_START /* Dunno */ | |
| 595 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) /* confirmed */ | |
| 596 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) /* confirmed */ | |
| 597 | PORT_BIT( 0xcf, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 607 | PORT_START_TAG("IN3") /* Dunno */ | |
| 608 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 609 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 610 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL | |
| 611 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL | |
| 612 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 613 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 598 | 616 | |
| 599 | PORT_START /* SW BANK 3 */ | |
| 600 | PORT_DIPNAME( 0x01, 0x00, "Color" ) | |
| 601 | PORT_DIPSETTING( 0x00, "Option 1" ) | |
| 602 | PORT_DIPSETTING( 0x01, "Option 2" ) | |
| 603 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) | |
| 604 | PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) | |
| 605 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) | |
| 606 | PORT_DIPNAME( 0x0C, 0x00, DEF_STR( Bonus_Life ) ) | |
| 607 | PORT_DIPSETTING( 0x00, "10k only" ) | |
| 608 | PORT_DIPSETTING( 0x04, "20k only" ) | |
| 609 | PORT_DIPSETTING( 0x08, "30k and every 40k" ) | |
| 610 | PORT_DIPSETTING( 0x0c, "40k and every 80k" ) | |
| 611 | PORT_DIPNAME( 0x10, 0x00, "Registration Length" ) | |
| 612 | PORT_DIPSETTING( 0x00, "3" ) | |
| 613 | PORT_DIPSETTING( 0x10, "10" ) | |
| 614 | PORT_DIPNAME( 0x20, 0x00, "Registration" ) | |
| 615 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 616 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 617 | PORT_START_TAG("DSW3") /* SW BANK 3 */ | |
| 618 | PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 619 | PORT_DIPUNUSED( 0x02, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 620 | PORT_DIPUNUSED( 0x04, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 621 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 622 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) | |
| 623 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 624 | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) | |
| 625 | PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 617 | 626 | |
| 618 | PORT_START /* SW BANK 2 */ | |
| 619 | PORT_DIPNAME( 0x03, 0x00, "Coins for 1 Play" ) /* confirmed */ | |
| 620 | PORT_DIPSETTING( 0x00, "1" ) | |
| 621 | PORT_DIPSETTING( 0x01, "2" ) | |
| 622 | PORT_DIPSETTING( 0x02, "3" ) | |
| 623 | PORT_DIPSETTING( 0x03, "4" ) | |
| 624 | PORT_DIPNAME( 0x0C, 0x0c, "Plays for 1 Coin" ) /* confirmed */ | |
| 625 | PORT_DIPSETTING( 0x0C, "2" ) | |
| 626 | PORT_DIPSETTING( 0x08, "3" ) | |
| 627 | PORT_DIPSETTING( 0x04, "4" ) | |
| 628 | PORT_DIPSETTING( 0x00, "5" ) | |
| 629 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Lives ) ) /* confirmed */ | |
| 627 | PORT_START_TAG("DSW2") /* SW BANK 2 */ | |
| 628 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) | |
| 629 | PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) ) | |
| 630 | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) | |
| 631 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) | |
| 632 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 633 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) | |
| 634 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_2C ) ) | |
| 635 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) | |
| 636 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) ) | |
| 637 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) | |
| 638 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Lives ) ) | |
| 630 | 639 | PORT_DIPSETTING( 0x00, "3" ) |
| 631 | 640 | PORT_DIPSETTING( 0x10, "5" ) |
| 632 | PORT_DIPNAME( 0x20, 0x00, "Meter Pulses" ) | |
| 633 | PORT_DIPSETTING( 0x00, "2" ) | |
| 634 | PORT_DIPSETTING( 0x20, "5" ) | |
| 641 | PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH ) /* can't tell if it's ACTIVE_HIGH or ACTIVE_LOW */ | |
| 635 | 642 | |
| 636 | 643 | PORT_START /* SENSE */ |
| 637 | 644 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 638 | 645 | INPUT_PORTS_END |
| 639 | 646 | |
| 647 | static INPUT_PORTS_START( cvs_registration ) | |
| 648 | PORT_INCLUDE(cvs) | |
| 649 | ||
| 650 | PORT_MODIFY("DSW3") | |
| 651 | PORT_DIPNAME( 0x01, 0x01, "Registration" ) /* can't tell what shall be the default value */ | |
| 652 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 653 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 654 | PORT_DIPNAME( 0x02, 0x02, "Registration Length" ) /* can't tell what shall be the default value */ | |
| 655 | PORT_DIPSETTING( 0x02, "3" ) | |
| 656 | PORT_DIPSETTING( 0x00, "10" ) | |
| 657 | /* bits 2 and 3 determine bonus life settings but they might change from game to game - they are sometimes unused */ | |
| 658 | ||
| 659 | PORT_MODIFY("DSW2") | |
| 660 | /* Told to be "Meter Pulses" but I don't know what this means */ | |
| 661 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) /* has an effect when COIN2 is pressed (when COIN1 is pressed, value always 1 */ | |
| 662 | PORT_DIPSETTING( 0x00, "2" ) | |
| 663 | PORT_DIPSETTING( 0x20, "5" ) | |
| 664 | INPUT_PORTS_END | |
| 665 | ||
| 666 | ||
| 667 | /************************************* | |
| 668 | * | |
| 669 | * Games port definitions | |
| 670 | * | |
| 671 | *************************************/ | |
| 672 | ||
| 673 | static INPUT_PORTS_START( cosmos ) | |
| 674 | PORT_INCLUDE(cvs) | |
| 675 | ||
| 676 | #if !CVS_SHOW_ALL_INPUTS | |
| 677 | PORT_MODIFY("IN2") | |
| 678 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_SERVICE1 */ | |
| 679 | ||
| 680 | PORT_MODIFY("IN3") | |
| 681 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */ | |
| 682 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */ | |
| 683 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */ | |
| 684 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */ | |
| 685 | #endif | |
| 686 | ||
| 687 | PORT_MODIFY("DSW3") | |
| 688 | /* DSW3 bits 0 and 1 stored at 0x7d55 (0, 2, 1, 3) - code at 0x66f3 - not read back */ | |
| 689 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 690 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 691 | PORT_DIPSETTING( 0x08, "20k only" ) /* displays "20000" */ | |
| 692 | PORT_DIPSETTING( 0x04, "30k only" ) /* displays "30000" */ | |
| 693 | PORT_DIPSETTING( 0x00, "40k only" ) /* displays "40000" */ | |
| 694 | INPUT_PORTS_END | |
| 695 | ||
| 696 | static INPUT_PORTS_START( darkwar ) | |
| 697 | PORT_INCLUDE(cvs) | |
| 698 | ||
| 699 | #if !CVS_SHOW_ALL_INPUTS | |
| 700 | PORT_MODIFY("IN1") | |
| 701 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 702 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 703 | ||
| 704 | PORT_MODIFY("IN2") | |
| 705 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_SERVICE1 */ | |
| 706 | ||
| 707 | PORT_MODIFY("IN3") | |
| 708 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */ | |
| 709 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */ | |
| 710 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */ | |
| 711 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */ | |
| 712 | #endif | |
| 713 | ||
| 714 | /* DSW3 bits 0 to 3 are not read */ | |
| 715 | INPUT_PORTS_END | |
| 716 | ||
| 717 | static INPUT_PORTS_START( spacefrt ) | |
| 718 | PORT_INCLUDE(cvs) | |
| 719 | ||
| 720 | #if !CVS_SHOW_ALL_INPUTS | |
| 721 | PORT_MODIFY("IN2") | |
| 722 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_SERVICE1 */ | |
| 723 | ||
| 724 | PORT_MODIFY("IN3") | |
| 725 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */ | |
| 726 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */ | |
| 727 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */ | |
| 728 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */ | |
| 729 | #endif | |
| 730 | ||
| 731 | PORT_MODIFY("DSW3") | |
| 732 | /* DSW3 bits 0 and 1 stored at 0x7d3f (0, 2, 1, 3) - code at 0x6895 - not read back */ | |
| 733 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 734 | PORT_DIPSETTING( 0x0c, "100k only" ) /* displays "50000" */ | |
| 735 | PORT_DIPSETTING( 0x08, "150k only" ) /* displays "110000" */ | |
| 736 | PORT_DIPSETTING( 0x04, "200k only" ) /* displays "200000" */ | |
| 737 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) /* displays "200000" */ | |
| 738 | INPUT_PORTS_END | |
| 739 | ||
| 740 | ||
| 741 | static INPUT_PORTS_START( 8ball ) | |
| 742 | PORT_INCLUDE(cvs_registration) | |
| 743 | ||
| 744 | #if !CVS_SHOW_ALL_INPUTS | |
| 745 | PORT_MODIFY("IN1") | |
| 746 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 747 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 748 | #endif | |
| 749 | ||
| 750 | PORT_MODIFY("DSW3") | |
| 751 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 752 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 753 | PORT_DIPSETTING( 0x08, "20k only" ) /* displays "20000" */ | |
| 754 | PORT_DIPSETTING( 0x04, "40k only" ) /* displays "80000" */ | |
| 755 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ | |
| 756 | PORT_DIPNAME( 0x20, 0x00, "Colors" ) /* stored at 0x1ed4 - code at 0x0847 ('8ball') or 0x08af ('8ball1') */ | |
| 757 | PORT_DIPSETTING( 0x00, "Palette 1" ) /* table at 0x0781 ('8ball') or 0x07e9 ('8ball1') - 16 bytes */ | |
| 758 | PORT_DIPSETTING( 0x20, "Palette 2" ) /* table at 0x0791 ('8ball') or 0x07f9 ('8ball1') - 16 bytes */ | |
| 759 | ||
| 760 | /* DSW2 bit 5 stored at 0x1d93 - code at 0x0858 ('8ball') or 0x08c0 ('8ball1') - read back code at 0x0073 */ | |
| 761 | INPUT_PORTS_END | |
| 762 | ||
| 763 | static INPUT_PORTS_START( logger ) | |
| 764 | PORT_INCLUDE(cvs_registration) | |
| 765 | ||
| 766 | #if !CVS_SHOW_ALL_INPUTS | |
| 767 | PORT_MODIFY("IN1") | |
| 768 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 769 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 770 | #endif | |
| 771 | ||
| 772 | PORT_MODIFY("DSW3") | |
| 773 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 774 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 775 | PORT_DIPSETTING( 0x08, "20k only" ) /* displays "20000" */ | |
| 776 | PORT_DIPSETTING( 0x04, "40k only" ) /* displays "40000" */ | |
| 777 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ | |
| 778 | /* DSW3 bit 5 stored at 0x7dc8 - code at 0x6eb6 - not read back */ | |
| 779 | ||
| 780 | /* DSW2 bit 5 stored at 0x7da1 - code at 0x6ec7 - read back code at 0x0073 */ | |
| 781 | INPUT_PORTS_END | |
| 782 | ||
| 783 | static INPUT_PORTS_START( dazzler ) | |
| 784 | PORT_INCLUDE(cvs_registration) | |
| 785 | ||
| 786 | #if !CVS_SHOW_ALL_INPUTS | |
| 787 | PORT_MODIFY("IN1") | |
| 788 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 789 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 790 | #endif | |
| 791 | ||
| 792 | PORT_MODIFY("DSW3") | |
| 793 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 794 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 795 | PORT_DIPSETTING( 0x04, "20k only" ) /* displays "20000" */ | |
| 796 | PORT_DIPSETTING( 0x08, "40k only" ) /* displays "40000" */ | |
| 797 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ | |
| 798 | ||
| 799 | /* DSW2 bit 5 stored at 0x7d9c - code at 0x6b51 - read back code at 0x0099 */ | |
| 800 | INPUT_PORTS_END | |
| 801 | ||
| 802 | static INPUT_PORTS_START( wallst ) | |
| 803 | PORT_INCLUDE(cvs_registration) | |
| 804 | ||
| 805 | #if !CVS_SHOW_ALL_INPUTS | |
| 806 | PORT_MODIFY("IN1") | |
| 807 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 808 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 809 | #endif | |
| 810 | ||
| 811 | PORT_MODIFY("DSW3") | |
| 812 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 813 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 814 | PORT_DIPSETTING( 0x04, "20k only" ) /* displays "20000" */ | |
| 815 | PORT_DIPSETTING( 0x08, "40k only" ) /* displays "40000" */ | |
| 816 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ | |
| 817 | ||
| 818 | /* DSW2 bit 5 stored at 0x1e95 - code at 0x1232 - read back code at 0x6054 */ | |
| 819 | INPUT_PORTS_END | |
| 820 | ||
| 821 | static INPUT_PORTS_START( radarzon ) | |
| 822 | PORT_INCLUDE(cvs_registration) | |
| 823 | ||
| 824 | #if !CVS_SHOW_ALL_INPUTS | |
| 825 | PORT_MODIFY("IN1") | |
| 826 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 827 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 828 | #endif | |
| 829 | ||
| 830 | PORT_MODIFY("DSW3") | |
| 831 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 832 | PORT_DIPSETTING( 0x0c, "100k only" ) /* displays "100000" */ | |
| 833 | PORT_DIPSETTING( 0x04, "200k only" ) /* displays "200000" */ | |
| 834 | PORT_DIPSETTING( 0x08, "400k only" ) /* displays "400000" */ | |
| 835 | PORT_DIPSETTING( 0x00, "800k only" ) /* displays "800000" */ | |
| 836 | ||
| 837 | /* DSW2 bit 5 stored at 0x3d6e - code at 0x22aa - read back code at 0x00e4 */ | |
| 838 | INPUT_PORTS_END | |
| 839 | ||
| 840 | static INPUT_PORTS_START( goldbug ) | |
| 841 | PORT_INCLUDE(cvs_registration) | |
| 842 | ||
| 843 | #if !CVS_SHOW_ALL_INPUTS | |
| 844 | PORT_MODIFY("IN1") | |
| 845 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 846 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 847 | #endif | |
| 848 | ||
| 849 | PORT_MODIFY("DSW3") | |
| 850 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 851 | PORT_DIPSETTING( 0x0c, "100k only" ) /* displays "100000" */ | |
| 852 | PORT_DIPSETTING( 0x04, "200k only" ) /* displays "200000" */ | |
| 853 | PORT_DIPSETTING( 0x08, "400k only" ) /* displays "400000" */ | |
| 854 | PORT_DIPSETTING( 0x00, "800k only" ) /* displays "800000" */ | |
| 855 | ||
| 856 | /* DSW2 bit 5 stored at 0x3d89 - code at 0x3377 - read back code at 0x6054 */ | |
| 857 | INPUT_PORTS_END | |
| 858 | ||
| 859 | static INPUT_PORTS_START( diggerc ) | |
| 860 | PORT_INCLUDE(cvs_registration) | |
| 861 | ||
| 862 | #if !CVS_SHOW_ALL_INPUTS | |
| 863 | PORT_MODIFY("IN1") | |
| 864 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 865 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 866 | #endif | |
| 867 | ||
| 868 | PORT_MODIFY("DSW3") | |
| 869 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 870 | PORT_DIPSETTING( 0x0c, "50k only" ) /* displays "50000" */ | |
| 871 | PORT_DIPSETTING( 0x04, "100k only" ) /* displays "100000" */ | |
| 872 | PORT_DIPSETTING( 0x08, "150k only" ) /* displays "150000" */ | |
| 873 | PORT_DIPSETTING( 0x00, "200k only" ) /* displays "200000" */ | |
| 874 | ||
| 875 | /* DSW2 bit 5 stored at 0x3db3 - code at 0x22ad - read back code at 0x00e4 */ | |
| 876 | INPUT_PORTS_END | |
| 877 | ||
| 878 | static INPUT_PORTS_START( heartatk ) | |
| 879 | PORT_INCLUDE(cvs_registration) | |
| 880 | ||
| 881 | /* DSW3 bits 2 and 3 stored at 0x1c61 (0, 2, 1, 3) - code at 0x0c52 | |
| 882 | read back code at 0x2197 but untested value : bonus life always at 100000 */ | |
| 883 | ||
| 884 | /* DSW2 bit 5 stored at 0x1e76 - code at 0x0c5c - read back code at 0x00e4 */ | |
| 885 | INPUT_PORTS_END | |
| 886 | ||
| 887 | static INPUT_PORTS_START( hunchbak ) | |
| 888 | PORT_INCLUDE(cvs_registration) | |
| 889 | ||
| 890 | #if !CVS_SHOW_ALL_INPUTS | |
| 891 | PORT_MODIFY("IN1") | |
| 892 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 893 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 894 | ||
| 895 | PORT_MODIFY("IN3") | |
| 896 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */ | |
| 897 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */ | |
| 898 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */ | |
| 899 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */ | |
| 900 | #endif | |
| 901 | ||
| 902 | PORT_MODIFY("DSW3") | |
| 903 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 904 | PORT_DIPSETTING( 0x0c, "10k only" ) /* displays "10000" */ | |
| 905 | PORT_DIPSETTING( 0x04, "20k only" ) /* displays "20000" */ | |
| 906 | PORT_DIPSETTING( 0x08, "40k only" ) /* displays "40000" */ | |
| 907 | PORT_DIPSETTING( 0x00, "80k only" ) /* displays "80000" */ | |
| 908 | ||
| 909 | /* hunchbak : DSW2 bit 5 stored at 0x5e97 - code at 0x516c - read back code at 0x6054 */ | |
| 910 | /* hunchbka : DSW2 bit 5 stored at 0x1e97 - code at 0x0c0c - read back code at 0x6054 */ | |
| 911 | INPUT_PORTS_END | |
| 912 | ||
| 913 | static INPUT_PORTS_START( superbik ) | |
| 914 | PORT_INCLUDE(cvs_registration) | |
| 915 | ||
| 916 | /* DSW3 bits 2 and 3 are not read : bonus life alaways at 5000 */ | |
| 917 | ||
| 918 | /* DSW2 bit 5 stored at 0x1e79 - code at 0x060f - read back code at 0x25bf */ | |
| 919 | INPUT_PORTS_END | |
| 920 | ||
| 921 | static INPUT_PORTS_START( raiders ) | |
| 922 | PORT_INCLUDE(cvs_registration) | |
| 923 | ||
| 924 | /* DSW3 bits 2 and 3 are not read : bonus life alaways at 100000 */ | |
| 925 | ||
| 926 | PORT_MODIFY("DSW2") | |
| 927 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_HIGH ) /* always 4 lives - table at 0x4218 - 2 bytes */ | |
| 928 | /* DSW2 bit 5 stored at 0x1e79 - code at 0x1307 - read back code at 0x251d */ | |
| 929 | INPUT_PORTS_END | |
| 930 | ||
| 931 | static INPUT_PORTS_START( hero ) | |
| 932 | PORT_INCLUDE(cvs_registration) | |
| 933 | ||
| 934 | #if !CVS_SHOW_ALL_INPUTS | |
| 935 | PORT_MODIFY("IN1") | |
| 936 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 937 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 938 | #endif | |
| 939 | ||
| 940 | /* DSW3 bits 2 and 3 are not read : bonus life alaways at 150000 */ | |
| 941 | ||
| 942 | PORT_MODIFY("DSW2") | |
| 943 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_HIGH ) /* always 3 lives - table at 0x4ebb - 2 bytes */ | |
| 944 | /* DSW2 bit 5 stored at 0x1e99 - code at 0x0fdd - read back code at 0x0352 */ | |
| 945 | INPUT_PORTS_END | |
| 946 | ||
| 947 | static INPUT_PORTS_START( huncholy ) | |
| 948 | PORT_INCLUDE(cvs_registration) | |
| 949 | ||
| 950 | #if !CVS_SHOW_ALL_INPUTS | |
| 951 | PORT_MODIFY("IN1") | |
| 952 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 PORT_COCKTAIL */ | |
| 953 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_BUTTON2 */ | |
| 954 | #endif | |
| 955 | ||
| 956 | /* DSW3 bits 2 and 3 are not read : bonus life alaways at 20000 */ | |
| 957 | ||
| 958 | PORT_MODIFY("DSW2") | |
| 959 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_HIGH ) /* always 3 lives - table at 0x4531 - 2 bytes */ | |
| 960 | /* DSW2 bit 5 stored at 0x1e7c - code at 0x067d - read back code at 0x2f95 */ | |
| 961 | INPUT_PORTS_END | |
| 962 | ||
| 963 | ||
| 964 | /************************************* | |
| 965 | * | |
| 966 | * Graphics definitions | |
| 967 | * | |
| 968 | *************************************/ | |
| 969 | ||
| 640 | 970 | static const gfx_layout charlayout = |
| 641 | 971 | { |
| 642 | 972 | 8,8, /* 8*8 characters */ |
| r1679 | r1680 | |
| 649 | 979 | }; |
| 650 | 980 | |
| 651 | 981 | static GFXDECODE_START( cvs ) |
| 652 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256+3 ) /* chars */ | |
| 653 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #1 */ | |
| 654 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #2 */ | |
| 655 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, (256+3)*8, 8 ) /* s2636 #3 */ | |
| 982 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256+4 ) | |
| 656 | 983 | GFXDECODE_END |
| 657 | 984 | |
| 658 | 985 | |
| r1679 | r1680 | |
| 687 | 1014 | MDRV_VIDEO_UPDATE(cvs) |
| 688 | 1015 | |
| 689 | 1016 | MDRV_GFXDECODE(cvs) |
| 690 | MDRV_PALETTE_LENGTH(16) | |
| 691 | MDRV_COLORTABLE_LENGTH((256+3)*8+(8*2)) | |
| 1017 | MDRV_PALETTE_LENGTH((256+4)*8+8+1) | |
| 692 | 1018 | MDRV_PALETTE_INIT(cvs) |
| 693 | 1019 | |
| 694 | 1020 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| r1679 | r1680 | |
| 1287 | 1613 | * |
| 1288 | 1614 | *************************************/ |
| 1289 | 1615 | |
| 1290 | #define CVS_GAME(year, name, parent, init, company, desc) \ | |
| 1291 | GAME( year, name, parent, cvs, cvs, init, ROT90, company, desc, GAME_NO_COCKTAIL ) | |
| 1292 | ||
| 1293 | /* YEAR NAME PARENT INIT */ | |
| 1294 | CVS_GAME( 1981, cosmos, 0, 0, "Century Electronics", "Cosmos" ) | |
| 1295 | CVS_GAME( 1981, darkwar, 0, 0, "Century Electronics", "Dark Warrior" ) | |
| 1296 | CVS_GAME( 1981, spacefrt, 0, 0, "Century Electronics", "Space Fortress (CVS)" ) | |
| 1297 | CVS_GAME( 1982, 8ball, 0, 0, "Century Electronics", "Video Eight Ball" ) | |
| 1298 | CVS_GAME( 1982, 8ball1, 8ball, 0, "Century Electronics", "Video Eight Ball (Rev.1)" ) | |
| 1299 | CVS_GAME( 1982, logger, 0, 0, "Century Electronics", "Logger" ) | |
| 1300 | CVS_GAME( 1982, dazzler, 0, 0, "Century Electronics", "Dazzler" ) | |
| 1301 | CVS_GAME( 1982, wallst, 0, 0, "Century Electronics", "Wall Street" ) | |
| 1302 | CVS_GAME( 1982, radarzon, 0, 0, "Century Electronics", "Radar Zone" ) | |
| 1303 | CVS_GAME( 1982, radarzn1, radarzon, 0, "Century Electronics", "Radar Zone (Rev.1)" ) | |
| 1304 | CVS_GAME( 1982, radarznt, radarzon, 0, "Century Electronics (Tuni Electro Service Inc)", "Radar Zone (Tuni)" ) | |
| 1305 | CVS_GAME( 1982, outline, radarzon, 0, "Century Electronics", "Outline" ) | |
| 1306 | CVS_GAME( 1982, goldbug, 0, 0, "Century Electronics", "Gold Bug" ) | |
| 1307 | CVS_GAME( 1982, diggerc, 0, 0, "Century Electronics", "Digger (CVS)" ) | |
| 1308 | CVS_GAME( 1983, heartatk, 0, 0, "Century Electronics", "Heart Attack" ) | |
| 1309 | CVS_GAME( 1983, hunchbak, 0, 0, "Century Electronics", "Hunchback (set 1)" ) | |
| 1310 | CVS_GAME( 1983, hunchbka, hunchbak, hunchbka,"Century Electronics", "Hunchback (set 2)" ) | |
| 1311 | CVS_GAME( 1983, superbik, 0, superbik,"Century Electronics", "Superbike" ) | |
| 1312 | CVS_GAME( 1983, raiders, 0, raiders, "Century Electronics", "Raiders" ) | |
| 1313 | CVS_GAME( 1983, hero, 0, hero, "Seatongrove Ltd", "Hero" ) | |
| 1314 | CVS_GAME( 1984, huncholy, 0, huncholy,"Seatongrove Ltd", "Hunchback Olympic" ) | |
| 1616 | GAME( 1981, cosmos, 0, cvs, cosmos, 0, ROT90, "Century Electronics", "Cosmos", GAME_NO_COCKTAIL ) | |
| 1617 | GAME( 1981, darkwar, 0, cvs, darkwar, 0, ROT90, "Century Electronics", "Dark Warrior", GAME_NO_COCKTAIL ) | |
| 1618 | GAME( 1981, spacefrt, 0, cvs, spacefrt, 0, ROT90, "Century Electronics", "Space Fortress (CVS)", GAME_NO_COCKTAIL ) | |
| 1619 | GAME( 1982, 8ball, 0, cvs, 8ball, 0, ROT90, "Century Electronics", "Video Eight Ball", GAME_NO_COCKTAIL ) | |
| 1620 | GAME( 1982, 8ball1, 8ball, cvs, 8ball, 0, ROT90, "Century Electronics", "Video Eight Ball (Rev.1)", GAME_NO_COCKTAIL ) | |
| 1621 | GAME( 1982, logger, 0, cvs, logger, 0, ROT90, "Century Electronics", "Logger", GAME_NO_COCKTAIL ) | |
| 1622 | GAME( 1982, dazzler, 0, cvs, dazzler, 0, ROT90, "Century Electronics", "Dazzler", GAME_NO_COCKTAIL ) | |
| 1623 | GAME( 1982, wallst, 0, cvs, wallst, 0, ROT90, "Century Electronics", "Wall Street", GAME_NO_COCKTAIL ) | |
| 1624 | GAME( 1982, radarzon, 0, cvs, radarzon, 0, ROT90, "Century Electronics", "Radar Zone", GAME_NO_COCKTAIL ) | |
| 1625 | GAME( 1982, radarzn1, radarzon, cvs, radarzon, 0, ROT90, "Century Electronics", "Radar Zone (Rev.1)", GAME_NO_COCKTAIL ) | |
| 1626 | GAME( 1982, radarznt, radarzon, cvs, radarzon, 0, ROT90, "Century Electronics (Tuni Electro Service Inc)", "Radar Zone (Tuni)", GAME_NO_COCKTAIL ) | |
| 1627 | GAME( 1982, outline, radarzon, cvs, radarzon, 0, ROT90, "Century Electronics", "Outline", GAME_NO_COCKTAIL ) | |
| 1628 | GAME( 1982, goldbug, 0, cvs, goldbug, 0, ROT90, "Century Electronics", "Gold Bug", GAME_NO_COCKTAIL ) | |
| 1629 | GAME( 1982, diggerc, 0, cvs, diggerc, 0, ROT90, "Century Electronics", "Digger (CVS)", GAME_NO_COCKTAIL ) | |
| 1630 | GAME( 1983, heartatk, 0, cvs, heartatk, 0, ROT90, "Century Electronics", "Heart Attack", GAME_NO_COCKTAIL ) | |
| 1631 | GAME( 1983, hunchbak, 0, cvs, hunchbak, 0, ROT90, "Century Electronics", "Hunchback (set 1)", GAME_NO_COCKTAIL ) | |
| 1632 | GAME( 1983, hunchbka, hunchbak, cvs, hunchbak, hunchbka, ROT90, "Century Electronics", "Hunchback (set 2)", GAME_NO_COCKTAIL ) | |
| 1633 | GAME( 1983, superbik, 0, cvs, superbik, superbik, ROT90, "Century Electronics", "Superbike", GAME_NO_COCKTAIL ) | |
| 1634 | GAME( 1983, raiders, 0, cvs, raiders, raiders, ROT90, "Century Electronics", "Raiders", GAME_NO_COCKTAIL ) | |
| 1635 | GAME( 1983, hero, 0, cvs, hero, hero, ROT90, "Seatongrove Ltd", "Hero", GAME_NO_COCKTAIL ) | |
| 1636 | GAME( 1984, huncholy, 0, cvs, huncholy, huncholy, ROT90, "Seatongrove Ltd", "Hunchback Olympic", GAME_NO_COCKTAIL ) |
| r1679 | r1680 | |
|---|---|---|
| 1326 | 1326 | |
| 1327 | 1327 | if( max != 0 ) { |
| 1328 | 1328 | attotime period = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(0)), 16 * max); |
| 1329 | timer_adjust( uPD71054.timer[no], period, n | |
| 1329 | timer_adjust_oneshot( uPD71054.timer[no], period, n | |
| 1330 | 1330 | } else { |
| 1331 | timer_adjust( uPD71054.timer[no], attotime_never, no | |
| 1331 | timer_adjust_oneshot( uPD71054.timer[no], attotime_never, no | |
| 1332 | 1332 | logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n", |
| 1333 | 1333 | activecpu_get_pc(), no ); |
| 1334 | 1334 | } |
| r1679 | r1680 | |
|---|---|---|
| 31 | 31 | static tilemap *bg_tilemap; |
| 32 | 32 | static int laserbat_video_page = 0; |
| 33 | 33 | static int laserbat_input_mux = 0; |
| 34 | static s2636_t *s2636_0, *s2636_1, *s2636_2; | |
| 35 | static UINT8 *s2636_0_ram; | |
| 36 | static UINT8 *s2636_1_ram; | |
| 37 | static UINT8 *s2636_2_ram; | |
| 34 | 38 | |
| 35 | 39 | static mame_bitmap *collision_bitmap; |
| 36 | 40 | |
| r1679 | r1680 | |
| 182 | 186 | AM_RANGE(0x7800, 0x7bff) AM_ROM |
| 183 | 187 | |
| 184 | 188 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_WRITENOP // always 0 (bullet ram in Quasar) |
| 185 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_1_ram) | |
| 186 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_2_ram) | |
| 187 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_3_ram) | |
| 189 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_0_ram) | |
| 190 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_1_ram) | |
| 191 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&s2636_2_ram) | |
| 188 | 192 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_WRITE(laserbat_videoram_w) |
| 189 | 193 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 190 | 194 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 489 | 493 | |
| 490 | 494 | static GFXDECODE_START( laserbat ) |
| 491 | 495 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256 ) /* Rom chars */ |
| 492 | GFXDECODE_ENTRY( REGION_CPU1, 0x1500, s2636_gfx_layout, 0, 8 ) /* s2636 #1 */ | |
| 493 | GFXDECODE_ENTRY( REGION_CPU1, 0x1600, s2636_gfx_layout, 0, 8 ) /* s2636 #2 */ | |
| 494 | GFXDECODE_ENTRY( REGION_CPU1, 0x1700, s2636_gfx_layout, 0, 8 ) /* s2636 #3 */ | |
| 495 | 496 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, sprites_layout, 0, 8 ) /* Sprites */ |
| 496 | 497 | GFXDECODE_END |
| 497 | 498 | |
| r1679 | r1680 | |
| 503 | 504 | |
| 504 | 505 | static VIDEO_START( laserbat ) |
| 505 | 506 | { |
| 506 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 507 | bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 507 | 508 | |
| 508 | 509 | videoram = (UINT8 *)auto_malloc(0x400); |
| 509 | 510 | colorram = (UINT8 *)auto_malloc(0x400); |
| 510 | 511 | |
| 511 | 512 | collision_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,BITMAP_FORMAT_INDEXED8); |
| 512 | 513 | |
| 513 | s2636_x_offset = -19; | |
| 514 | /* configure the S2636 chips */ | |
| 515 | s2636_0 = s2636_config(s2636_0_ram, machine->screen[0].height, machine->screen[0].width, 0, -19); | |
| 516 | s2636_1 = s2636_config(s2636_1_ram, machine->screen[0].height, machine->screen[0].width, 0, -19); | |
| 517 | s2636_2 = s2636_config(s2636_2_ram, machine->screen[0].height, machine->screen[0].width, 0, -19); | |
| 514 | 518 | } |
| 515 | 519 | |
| 516 | 520 | static VIDEO_UPDATE( laserbat ) |
| 517 | 521 | { |
| 522 | int y; | |
| 523 | mame_bitmap *s2636_0_bitmap; | |
| 524 | mame_bitmap *s2636_1_bitmap; | |
| 525 | mame_bitmap *s2636_2_bitmap; | |
| 526 | ||
| 518 | 527 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| 519 | 528 | |
| 520 | s2636_update_bitmap(machine,bitmap,s2636_1_ram,1,collision_bitmap); | |
| 521 | s2636_update_bitmap(machine,bitmap,s2636_2_ram,2,collision_bitmap); | |
| 522 | s2636_update_bitmap(machine,bitmap,s2636_3_ram,3,collision_bitmap); | |
| 529 | /* update the S2636 chips */ | |
| 530 | s2636_0_bitmap = s2636_update(s2636_0, cliprect); | |
| 531 | s2636_1_bitmap = s2636_update(s2636_1, cliprect); | |
| 532 | s2636_2_bitmap = s2636_update(s2636_2, cliprect); | |
| 523 | 533 | |
| 534 | /* copy the S2636 images into the main bitmap */ | |
| 535 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 536 | { | |
| 537 | int x; | |
| 538 | ||
| 539 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) | |
| 540 | { | |
| 541 | int pixel0 = *BITMAP_ADDR8(s2636_0_bitmap, y, x); | |
| 542 | int pixel1 = *BITMAP_ADDR8(s2636_1_bitmap, y, x); | |
| 543 | int pixel2 = *BITMAP_ADDR8(s2636_2_bitmap, y, x); | |
| 544 | ||
| 545 | if (S2636_IS_PIXEL_DRAWN(pixel0)) | |
| 546 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel0)]; | |
| 547 | ||
| 548 | if (S2636_IS_PIXEL_DRAWN(pixel1)) | |
| 549 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel1)]; | |
| 550 | ||
| 551 | if (S2636_IS_PIXEL_DRAWN(pixel2)) | |
| 552 | *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel2)]; | |
| 553 | } | |
| 554 | } | |
| 555 | ||
| 524 | 556 | if(sprite_info.enable) |
| 525 | drawgfx(bitmap,machine->gfx[ | |
| 557 | drawgfx(bitmap,machine->gfx[1], | |
| 526 | 558 | sprite_info.code, |
| 527 | 559 | sprite_info.color, |
| 528 | 560 | 0,0, |
| 529 | 561 | sprite_info.x - 6,sprite_info.y, |
| 530 | 562 | cliprect,TRANSPARENCY_PEN,0); |
| 563 | ||
| 531 | 564 | return 0; |
| 532 | 565 | } |
| 533 | 566 | |
| r1679 | r1680 | |
| 677 | 710 | |
| 678 | 711 | MDRV_GFXDECODE(laserbat) |
| 679 | 712 | MDRV_PALETTE_LENGTH(1024) |
| 680 | MDRV_COLORTABLE_LENGTH(4096) | |
| 681 | 713 | |
| 682 | 714 | MDRV_VIDEO_START(laserbat) |
| 683 | 715 | MDRV_VIDEO_UPDATE(laserbat) |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | extern UINT8 *tp84_videoram2, *tp84_colorram2; |
| 91 | 91 | |
| 92 | extern WRITE8_HANDLER( tp84_videoram_w ); | |
| 93 | extern WRITE8_HANDLER( tp84_colorram_w ); | |
| 94 | extern WRITE8_HANDLER( tp84_videoram2_w ); | |
| 95 | extern WRITE8_HANDLER( tp84_colorram2_w ); | |
| 96 | extern WRITE8_HANDLER( tp84_scroll_x_w ); | |
| 97 | extern WRITE8_HANDLER( tp84_scroll_y_w ); | |
| 98 | extern WRITE8_HANDLER( tp84_flipscreen_x_w ); | |
| 99 | extern WRITE8_HANDLER( tp84_flipscreen_y_w ); | |
| 100 | extern WRITE8_HANDLER( tp84_col0_w ); | |
| 101 | extern READ8_HANDLER( tp84_scanline_r ); | |
| 92 | WRITE8_HANDLER( tp84_videoram_w ); | |
| 93 | WRITE8_HANDLER( tp84_colorram_w ); | |
| 94 | WRITE8_HANDLER( tp84_videoram2_w ); | |
| 95 | WRITE8_HANDLER( tp84_colorram2_w ); | |
| 96 | WRITE8_HANDLER( tp84_scroll_x_w ); | |
| 97 | WRITE8_HANDLER( tp84_scroll_y_w ); | |
| 98 | WRITE8_HANDLER( tp84_flipscreen_x_w ); | |
| 99 | WRITE8_HANDLER( tp84_flipscreen_y_w ); | |
| 100 | WRITE8_HANDLER( tp84_col0_w ); | |
| 101 | READ8_HANDLER( tp84_scanline_r ); | |
| 102 | 102 | |
| 103 | extern PALETTE_INIT( tp84 ); | |
| 104 | extern VIDEO_START( tp84 ); | |
| 105 | extern VIDEO_UPDATE( tp84 ); | |
| 103 | PALETTE_INIT( tp84 ); | |
| 104 | VIDEO_START( tp84 ); | |
| 105 | VIDEO_UPDATE( tp84 ); | |
| 106 | 106 | |
| 107 | ||
| 107 | ||
| 108 | 108 | |
| 109 | 109 | |
| 110 | static UINT8 *sharedram; | |
| 111 | 110 | |
| 112 | static READ8_HANDLER( sharedram_r ) | |
| 113 | { | |
| 114 | return sharedram[offset]; | |
| 115 | } | |
| 116 | ||
| 117 | static WRITE8_HANDLER( sharedram_w ) | |
| 118 | { | |
| 119 | sharedram[offset] = data; | |
| 120 | } | |
| 121 | ||
| 122 | ||
| 123 | ||
| 124 | 111 | static READ8_HANDLER( tp84_sh_timer_r ) |
| 125 | 112 | { |
| 126 | 113 | /* main xtal 14.318MHz, divided by 4 to get the CPU clock, further */ |
| r1679 | r1680 | |
| 172 | 159 | AM_RANGE(0x2860, 0x2860) AM_READ(input_port_3_r) |
| 173 | 160 | AM_RANGE(0x3000, 0x3000) AM_READ(input_port_4_r) |
| 174 | 161 | AM_RANGE(0x4000, 0x4fff) AM_READ(MRA8_RAM) |
| 175 | AM_RANGE(0x5000, 0x57ff) AM_READ( | |
| 162 | AM_RANGE(0x5000, 0x57ff) AM_READ(MRA8 | |
| 176 | 163 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_ROM) |
| 177 | 164 | ADDRESS_MAP_END |
| 178 | 165 | |
| r1679 | r1680 | |
| 191 | 178 | AM_RANGE(0x4400, 0x47ff) AM_WRITE(tp84_videoram2_w) AM_BASE(&tp84_videoram2) |
| 192 | 179 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(tp84_colorram_w) AM_BASE(&colorram) |
| 193 | 180 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(tp84_colorram2_w) AM_BASE(&tp84_colorram2) |
| 194 | AM_RANGE(0x5000, 0x57ff) AM_WRITE( | |
| 181 | AM_RANGE(0x5000, 0x57ff) AM_WRITE(MWA8 | |
| 195 | 182 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) |
| 196 | 183 | ADDRESS_MAP_END |
| 197 | 184 | |
| r1679 | r1680 | |
| 200 | 187 | AM_RANGE(0x0400, 0x07ff) AM_RAM AM_WRITE(tp84_videoram2_w) AM_BASE(&tp84_videoram2) |
| 201 | 188 | AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(tp84_colorram_w) AM_BASE(&colorram) |
| 202 | 189 | AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(tp84_colorram2_w) AM_BASE(&tp84_colorram2) |
| 203 | AM_RANGE(0x1000, 0x17ff) AM_R | |
| 190 | AM_RANGE(0x1000, 0x17ff) AM_R | |
| 204 | 191 | AM_RANGE(0x1800, 0x1800) AM_WRITE(watchdog_reset_w) |
| 205 | 192 | AM_RANGE(0x1a00, 0x1a00) AM_READWRITE(input_port_0_r, tp84_col0_w) |
| 206 | 193 | AM_RANGE(0x1a20, 0x1a20) AM_READ(input_port_1_r) |
| r1679 | r1680 | |
| 222 | 209 | // AM_RANGE(0x0000, 0x0000) AM_READ(MRA8_RAM) |
| 223 | 210 | AM_RANGE(0x2000, 0x2000) AM_READ(tp84_scanline_r) /* beam position */ |
| 224 | 211 | AM_RANGE(0x6000, 0x67ff) AM_READ(MRA8_RAM) |
| 225 | AM_RANGE(0x8000, 0x87ff) AM_READ( | |
| 212 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8 | |
| 226 | 213 | AM_RANGE(0xe000, 0xffff) AM_READ(MRA8_ROM) |
| 227 | 214 | ADDRESS_MAP_END |
| 228 | 215 | |
| r1679 | r1680 | |
| 232 | 219 | AM_RANGE(0x4000, 0x4000) AM_WRITE(interrupt_enable_w) /* IRQ enable */ |
| 233 | 220 | AM_RANGE(0x6000, 0x679f) AM_WRITE(MWA8_RAM) |
| 234 | 221 | AM_RANGE(0x67a0, 0x67ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* REAL (multiplexed) */ |
| 235 | AM_RANGE(0x8000, 0x87ff) AM_WRITE( | |
| 222 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8 | |
| 236 | 223 | AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_ROM) |
| 237 | 224 | ADDRESS_MAP_END |
| 238 | 225 | |
| r1679 | r1680 | |
| 495 | 482 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 496 | 483 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 497 | 484 | MDRV_GFXDECODE(tp84) |
| 498 | MDRV_PALETTE_LENGTH(256) | |
| 499 | MDRV_COLORTABLE_LENGTH(4096) | |
| 485 | MDRV_PALETTE_LENGTH(4096) | |
| 500 | 486 | |
| 501 | 487 | MDRV_PALETTE_INIT(tp84) |
| 502 | 488 | MDRV_VIDEO_START(tp84) |
| r1679 | r1680 | |
|---|---|---|
| 186 | 186 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 187 | 187 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 188 | 188 | MDRV_GFXDECODE(higemaru) |
| 189 | MDRV_PALETTE_LENGTH(32) | |
| 190 | MDRV_COLORTABLE_LENGTH(32*4+16*16) | |
| 189 | MDRV_PALETTE_LENGTH(32*4+16*16) | |
| 191 | 190 | |
| 192 | 191 | MDRV_PALETTE_INIT(higemaru) |
| 193 | 192 | MDRV_VIDEO_START(higemaru) |
| r1679 | r1680 | |
|---|---|---|
| 729 | 729 | PORT_START |
| 730 | 730 | |
| 731 | 731 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1) |
| 732 | PORT_ | |
| 732 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW | |
| 733 | 733 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2) |
| 734 | 734 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3) |
| 735 | 735 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1) |
| r1679 | r1680 | |
| 750 | 750 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 751 | 751 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 752 | 752 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 753 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 754 | PORT_DIPNAME(0x10, 0x00, "Monitors") | |
| 755 | PORT_DIPSETTING(0x00, "1 Monitor") | |
| 756 | PORT_DIPSETTING(0x10, "2 Monitors") | |
| 757 | // PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 753 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) | |
| 754 | PORT_DIPNAME( 0x10, 0x00, "Monitors" ) | |
| 755 | PORT_DIPSETTING( 0x00, "1 Monitor" ) | |
| 756 | PORT_DIPSETTING( 0x10, "2 Monitors" ) | |
| 758 | 757 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 759 | 758 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 760 | 759 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 503 | 503 | |
| 504 | 504 | #include "driver.h" |
| 505 | 505 | #include "video/generic.h" |
| 506 | #include "machine/eeprom.h" | |
| 507 | #include "machine/x76f100.h" | |
| 506 | 508 | #include "cpu/sh4/sh4.h" |
| 507 | 509 | #include "cpu/arm7/arm7core.h" |
| 508 | 510 | #include "dc.h" |
| r1679 | r1680 | |
| 513 | 515 | |
| 514 | 516 | static UINT32 *dc_sound_ram; |
| 515 | 517 | extern UINT64 *dc_texture_ram; |
| 516 | static UINT32 rom_offset, dma_offset; | |
| 518 | static UINT32 rom_offset, dma_count; | |
| 519 | UINT32 dma_offset; | |
| 517 | 520 | |
| 518 | 521 | static INTERRUPT_GEN( naomi_vblank ) |
| 519 | 522 | { |
| r1679 | r1680 | |
| 587 | 590 | |
| 588 | 591 | return ret; |
| 589 | 592 | } |
| 593 | else if ((offset == 15) && ((mem_mask & U64(0xffff00000000)) == 0)) // boardid read | |
| 594 | { | |
| 595 | UINT64 ret; | |
| 596 | ||
| 597 | ret = x76f100_sda_read( 0 ) << 15; | |
| 598 | ||
| 599 | return ret << 32; | |
| 600 | } | |
| 590 | 601 | else |
| 591 | 602 | { |
| 592 | 603 | mame_printf_verbose("ROM: read mask %llx @ %x (PC=%x)\n", mem_mask, offset, activecpu_get_pc()); |
| r1679 | r1680 | |
| 597 | 608 | |
| 598 | 609 | static WRITE64_HANDLER( naomi_rom_board_w ) |
| 599 | 610 | { |
| 600 | if ((offset == 1) && ((mem_mask & U64(0xffff)) == 0)) | |
| 611 | if ((offset == 1) && ((mem_mask & U64(0xffff00000000)) == 0)) | |
| 601 | 612 | { |
| 602 | 613 | // DMA_OFFSETH |
| 603 | 614 | dma_offset &= 0xffff; |
| 604 | dma_offset |= (data & 0x1fff | |
| 615 | dma_offset |= (data >> 16) & 0x1fff0000 | |
| 605 | 616 | } |
| 606 | else if ((offset == | |
| 617 | else if ((offset == 2) && ((mem_mask & U64(0xffff | |
| 607 | 618 | { |
| 608 | 619 | // DMA_OFFSETL |
| 609 | 620 | dma_offset &= 0xffff0000; |
| r1679 | r1680 | |
| 621 | 632 | rom_offset &= 0xffff0000; |
| 622 | 633 | rom_offset |= (data & 0xffff); |
| 623 | 634 | } |
| 635 | else if ((offset == 15) && ((mem_mask & 0xffff) == 0)) | |
| 636 | { | |
| 637 | // NAOMI_BOARDID_WRITE | |
| 638 | x76f100_cs_write(0, (data >> 2) & 1 ); | |
| 639 | x76f100_rst_write(0, (data >> 3) & 1 ); | |
| 640 | x76f100_scl_write(0, (data >> 1) & 1 ); | |
| 641 | x76f100_sda_write(0, (data >> 0) & 1 ); | |
| 642 | } | |
| 643 | else if ((offset == 2) && ((mem_mask & U64(0xffffffff00000000)) == 0)) | |
| 644 | { | |
| 645 | // NAOMI_DMA_COUNT | |
| 646 | dma_count = data >> 32; | |
| 647 | } | |
| 624 | 648 | else |
| 625 | 649 | { |
| 626 | 650 | mame_printf_verbose("ROM: write %llx to %x, mask %llx (PC=%x)\n", data, offset, mem_mask, activecpu_get_pc()); |
| 627 | 651 | } |
| 628 | 652 | } |
| 629 | 653 | |
| 654 | static NVRAM_HANDLER( naomi_eeproms ) | |
| 655 | { | |
| 656 | static UINT8 eeprom_romboard[20+48] = {0x19,0x00,0xaa,0x55,0,0,0,0,0,0,0,0,0x69,0x79,0x68,0x6b,0x74,0x6d,0x68,0x6d}; | |
| 657 | ||
| 658 | if (read_or_write) | |
| 659 | /*EEPROM_save(file)*/; | |
| 660 | else | |
| 661 | { | |
| 662 | EEPROM_init(&eeprom_interface_93C46); | |
| 663 | /*if (file) | |
| 664 | EEPROM_load(file); | |
| 665 | else*/ | |
| 666 | EEPROM_set_data((UINT8 *)"\011\241 0000000000000000", 48); // 2*checksum 30*unknown 16*serial | |
| 667 | x76f100_init( 0, eeprom_romboard ); | |
| 668 | memcpy(eeprom_romboard+20,"\241\011 0000000000000000",48); | |
| 669 | } | |
| 670 | } | |
| 671 | ||
| 672 | static READ64_HANDLER( eeprom_93c46a_r ) | |
| 673 | { | |
| 674 | int res; | |
| 675 | ||
| 676 | /* bit 3 is EEPROM data */ | |
| 677 | res = EEPROM_read_bit() << 4; | |
| 678 | return res; | |
| 679 | } | |
| 680 | ||
| 681 | static WRITE64_HANDLER( eeprom_93c46a_w ) | |
| 682 | { | |
| 683 | /* bit 4 is data */ | |
| 684 | /* bit 2 is clock */ | |
| 685 | /* bit 5 is cs */ | |
| 686 | EEPROM_write_bit(data & 0x8); | |
| 687 | EEPROM_set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE); | |
| 688 | EEPROM_set_clock_line((data & 0x4) ? ASSERT_LINE : CLEAR_LINE); | |
| 689 | } | |
| 690 | ||
| 630 | 691 | static ADDRESS_MAP_START( naomi_map, ADDRESS_SPACE_PROGRAM, 64 ) |
| 631 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM // BIOS | |
| 632 | AM_RANGE(0x00200000, 0x00207fff) AM_RAM // bios uses it (battery backed ram ?) | |
| 692 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM // BIOS | |
| 693 | AM_RANGE(0x00200000, 0x00207fff) AM_RAM // bios uses it (battery backed ram ?) | |
| 633 | 694 | AM_RANGE(0x005f6800, 0x005f69ff) AM_READWRITE( dc_sysctrl_r, dc_sysctrl_w ) |
| 634 | 695 | AM_RANGE(0x005f6c00, 0x005f6cff) AM_READWRITE( dc_maple_r, dc_maple_w ) |
| 635 | 696 | AM_RANGE(0x005f7000, 0x005f70ff) AM_READWRITE( naomi_rom_board_r, naomi_rom_board_w ) |
| r1679 | r1680 | |
| 640 | 701 | AM_RANGE(0x00600000, 0x006007ff) AM_READWRITE( dc_modem_r, dc_modem_w ) |
| 641 | 702 | AM_RANGE(0x00700000, 0x00707fff) AM_READWRITE( dc_aica_reg_r, dc_aica_reg_w ) |
| 642 | 703 | AM_RANGE(0x00710000, 0x0071000f) AM_READWRITE( dc_rtc_r, dc_rtc_w ) |
| 643 | AM_RANGE(0x00800000, 0x009fffff) AM_READWRITE( naomi_arm_r, naomi_arm_w ) // sound RAM | |
| 644 | AM_RANGE(0x0103ff00, 0x0103ffff) AM_READWRITE( naomi_unknown1_r, naomi_unknown1_w ) // bios uses it, actual start and end addresses not known | |
| 645 | AM_RANGE(0x04000000, 0x04ffffff) AM_RAM AM_SHARE(2) AM_BASE( &dc_texture_ram ) // texture memory | |
| 646 | AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2) // mirror of texture RAM | |
| 647 | AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_SHARE(1) | |
| 648 | AM_RANGE(0x0d000000, 0x0dffffff) AM_RAM AM_SHARE(1) // mirror of main RAM | |
| 704 | AM_RANGE(0x00800000, 0x00ffffff) AM_READWRITE( naomi_arm_r, naomi_arm_w ) // sound RAM (8 MB) | |
| 705 | AM_RANGE(0x0103ff00, 0x0103ffff) AM_READWRITE( naomi_unknown1_r, naomi_unknown1_w ) // bios uses it, actual start and end addresses not known | |
| 706 | AM_RANGE(0x04000000, 0x04ffffff) AM_RAM AM_SHARE(2) AM_BASE( &dc_texture_ram ) // texture memory 64 bit access | |
| 707 | AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2) // mirror of texture RAM 32 bit access | |
| 708 | AM_RANGE(0x0c000000, 0x0dffffff) AM_RAM | |
| 649 | 709 | AM_RANGE(0x10000000, 0x107fffff) AM_WRITE( ta_fifo_poly_w ) |
| 650 | 710 | AM_RANGE(0x10800000, 0x10ffffff) AM_WRITE( ta_fifo_yuv_w ) |
| 651 | AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2) | |
| 711 | AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2) // another mirror of texture memory | |
| 652 | 712 | AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_REGION(REGION_CPU1, 0) |
| 653 | 713 | ADDRESS_MAP_END |
| 654 | 714 | |
| 715 | static ADDRESS_MAP_START( naomi_port, ADDRESS_SPACE_IO, 64 ) | |
| 716 | AM_RANGE(0x00, 0x0f) AM_READWRITE(eeprom_93c46a_r, eeprom_93c46a_w) | |
| 717 | ADDRESS_MAP_END | |
| 718 | ||
| 655 | 719 | static READ32_HANDLER( test1 ) |
| 656 | 720 | { |
| 657 | 721 | return -1; |
| 658 | 722 | } |
| 659 | 723 | |
| 660 | 724 | static ADDRESS_MAP_START( dc_audio_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 661 | AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_BASE( &dc_sound_ram ) /* shared with SH-4 */ | |
| 662 | AM_RANGE(0x00200000, 0x002000ff) AM_READ( test1 ) // for bug (?) in sound bios | |
| 663 | AM_RANGE(0x00800000, 0x00807fff) AM_READWRITE( dc_aica_arm_r, dc_aica_arm_w ) /* shared with SH-4 */ | |
| 725 | AM_RANGE(0x00000000, 0x007fffff) AM_RAM AM_BASE( &dc_sound_ram ) /* shared with SH-4 */ | |
| 726 | AM_RANGE(0x00800000, 0x00807fff) AM_READWRITE( dc_aica_arm_r, dc_aica_arm_w ) /* shared with SH-4 */ | |
| 727 | AM_RANGE(0x00808000, 0x008080ff) AM_READ( test1 ) // for bug (?) in sound bios | |
| 664 | 728 | ADDRESS_MAP_END |
| 665 | 729 | |
| 666 | 730 | static INPUT_PORTS_START( naomi ) |
| 667 | 731 | PORT_START |
| 668 | 732 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service") |
| 669 | PORT_ | |
| 733 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 670 | 734 | INPUT_PORTS_END |
| 671 | 735 | |
| 672 | 736 | static MACHINE_DRIVER_START( naomi ) |
| r1679 | r1680 | |
| 674 | 738 | MDRV_CPU_ADD_TAG("main", SH4, CPU_CLOCK) // SH4!!! |
| 675 | 739 | MDRV_CPU_CONFIG(sh4cpu_config) |
| 676 | 740 | MDRV_CPU_PROGRAM_MAP(naomi_map,0) |
| 677 | MDRV_CPU_VBLANK_INT(naomi_vblank,479) | |
| 741 | MDRV_CPU_IO_MAP(naomi_port,0) | |
| 742 | MDRV_CPU_VBLANK_INT(naomi_vblank,1) | |
| 678 | 743 | |
| 679 | MDRV_CPU_ADD_TAG("sound", ARM7, | |
| 744 | MDRV_CPU_ADD_TAG("sound", ARM7, ((XTAL_33_8688MHz*2)/3)/8) // AICA bus clock is 2/3rds * 33.8688. ARM7 gets 1 bus cycle out of each 8. | |
| 680 | 745 | MDRV_CPU_PROGRAM_MAP(dc_audio_map, 0) |
| 681 | 746 | |
| 682 | 747 | MDRV_MACHINE_RESET( dc ) |
| r1679 | r1680 | |
| 684 | 749 | MDRV_SCREEN_REFRESH_RATE(60) |
| 685 | 750 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 686 | 751 | |
| 752 | MDRV_NVRAM_HANDLER(naomi_eeproms) | |
| 753 | ||
| 687 | 754 | /* video hardware */ |
| 688 | 755 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 689 | 756 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| r1679 | r1680 | |
| 716 | 783 | EPR-21578a - NAOMI BOOT ROM 1999 02/15 1.20 (Export) |
| 717 | 784 | EPR-21579 - No known dump (Korea) |
| 718 | 785 | EPR-21580 - No known dump (Australia) |
| 719 | EPR-22851 - NAOMI BOOT ROM 1999 08/30 1.35 (Multisystem 3 screen) | |
| 786 | EPR-22851 - NAOMI BOOT ROM 1999 08/30 1.35 (Multisystem 3 screen Ferrari F355) | |
| 720 | 787 | |
| 721 | 788 | EPR-21577e & EPR-2178e differ by 7 bytes: |
| 722 | 789 | |
| r1679 | r1680 | |
| 724 | 791 | 0x1ffffa-0x1fffff is the BIOS checksum |
| 725 | 792 | |
| 726 | 793 | |
| 794 | House of the Dead 2 specific Naomi BIOS roms: | |
| 795 | ||
| 796 | Info from roms starting at 0x1ff060 | |
| 797 | ||
| 798 | EPR-21330 - HOUSE OF THE DEAD 2 IPL ROM 1998 11/14 (USA) | |
| 799 | EPR-21331 - HOUSE OF THE DEAD 2 IPL ROM 1998 11/14 (Export) | |
| 800 | ||
| 801 | EPR-21330 & EPR-21331 differ by 7 bytes: | |
| 802 | ||
| 803 | 0x40000 is the region byte (only one region byte) | |
| 804 | 0x1ffffa-0x1fffff is the BIOS checksum | |
| 805 | ||
| 806 | ||
| 727 | 807 | Region byte encoding is as follows: |
| 728 | 808 | |
| 729 | 809 | 0x00 = Japan |
| 730 | 810 | 0x01 = USA |
| 731 | 811 | 0x02 = Export |
| 732 | ???? = Korea | |
| 733 | ???? = Australia | |
| 812 | 0x?? = Korea | |
| 813 | 0x?? = Australia | |
| 734 | 814 | |
| 735 | 815 | Scan ROM for the text string "LOADING TEST MODE NOW" back up four (4) bytes for the region byte. |
| 736 | NOTE: this doesn't work for the multi screen boot rom | |
| 816 | NOTE: this doesn't work for the HOTD2 or multi screen boot roms | |
| 737 | 817 | |
| 738 | 818 | */ |
| 739 | 819 | |
| 740 | 820 | #define NAOMI_BIOS \ |
| 741 | ROM_SYSTEM_BIOS( 0, "bios0", "epr-21578e" ) \ | |
| 821 | ROM_SYSTEM_BIOS( 0, "bios0", "epr-21578e (Export)" ) \ | |
| 742 | 822 | ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-21578e.bin", 0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \ |
| 743 | ROM_SYSTEM_BIOS( 1, "bios1", "epr-21578d" ) \ | |
| 823 | ROM_SYSTEM_BIOS( 1, "bios1", "epr-21578d (Export)" ) \ | |
| 744 | 824 | ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21578d.bin", 0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \ |
| 745 | ROM_SYSTEM_BIOS( 2, "bios2", "epr-21578a" ) \ | |
| 825 | ROM_SYSTEM_BIOS( 2, "bios2", "epr-21578a (Export)" ) \ | |
| 746 | 826 | ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21578a.bin", 0x000000, 0x200000, CRC(6c9aad83) SHA1(555918de76d8dbee2a97d8a95297ef694b3e803f) ) \ |
| 747 | ROM_SYSTEM_BIOS( 3, "bios3", "epr-21577e" ) \ | |
| 827 | ROM_SYSTEM_BIOS( 3, "bios3", "epr-21577e (USA)" ) \ | |
| 748 | 828 | ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21577e.bin", 0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \ |
| 749 | ROM_SYSTEM_BIOS( 4, "bios4", "epr-21577d" ) \ | |
| 829 | ROM_SYSTEM_BIOS( 4, "bios4", "epr-21577d (USA)" ) \ | |
| 750 | 830 | ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21577d.bin", 0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \ |
| 751 | ROM_SYSTEM_BIOS( 5, "bios5", "epr-21576g" ) \ | |
| 831 | ROM_SYSTEM_BIOS( 5, "bios5", "epr-21576g (Japan)" ) \ | |
| 752 | 832 | ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21576g.bin", 0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \ |
| 753 | ROM_SYSTEM_BIOS( 6, "bios6", "e | |
| 833 | ROM_SYSTEM_BIOS( 6, "bios6", "Fe | |
| 754 | 834 | ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-22851.bin", 0x000000, 0x200000, CRC(62483677) SHA1(3e3bcacf5f972c376b569f45307ee7fd0b5031b7) ) \ |
| 755 | ROM_SYSTEM_BIOS( 7, "bios7", "Naomi Dev BIOS" ) \ | |
| 756 | ROM_LOAD16_WORD_SWAP_BIOS( 7, "dcnaodev.bios", 0x000000, 0x080000, CRC(7a50fab9) SHA1(ef79f448e0bf735d1264ad4f051d24178822110f) ) /* This one comes from a dev / beta board. The eprom was a 27C4096 */ | |
| 835 | ROM_SYSTEM_BIOS( 7, "bios7", "HOTD2 (US)" ) \ | |
| 836 | ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21330.bin", 0x000000, 0x200000, CRC(9e3bfa1b) SHA1(b539d38c767b0551b8e7956c1ff795de8bbe2fbc) ) \ | |
| 837 | ROM_SYSTEM_BIOS( 8, "bios8", "HOTD2 (Export)" ) \ | |
| 838 | ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-21331.bin", 0x000000, 0x200000, CRC(065f8500) SHA1(49a3881e8d76f952ef5e887200d77b4a415d47fe) ) \ | |
| 839 | ROM_SYSTEM_BIOS( 9, "bios9", "Naomi Dev BIOS" ) \ | |
| 840 | ROM_LOAD16_WORD_SWAP_BIOS( 9, "dcnaodev.bios", 0x000000, 0x080000, CRC(7a50fab9) SHA1(ef79f448e0bf735d1264ad4f051d24178822110f) ) /* This one comes from a dev / beta board. The eprom was a 27C4096 */ | |
| 757 | 841 | |
| 758 | 842 | |
| 759 | 843 | /* NAOMI2 BIOS: |
| r1679 | r1680 | |
| 769 | 853 | 0x1ecf40 is a second region byte (value is the same as the first region byte ) |
| 770 | 854 | 0x1fffa-1ffff is the BIOS rom checksum |
| 771 | 855 | |
| 772 | EPR-23605 - Japan (region = 0x00) | |
| 773 | EPR-23605b - Japan (region = 0x00) | |
| 774 | EPR-23607 - USA (region = 0x01) | |
| 775 | EPR-23607b - USA (region = 0x01) | |
| 776 | EPR-23608b - Export (region = 0x02) | |
| 777 | EPR-23608 - Export (region = 0x02) | |
| 856 | EPR-23605 & EPR-23605b - Japan (region = 0x00) | |
| 857 | EPR-23607 & EPR-23607b - USA (region = 0x01) | |
| 858 | EPR-23608 & EPR-23608b - Export (region = 0x02) | |
| 778 | 859 | |
| 779 | 860 | */ |
| 780 | 861 |
| r1679 | r1680 | |
|---|---|---|
| 17 | 17 | VIDEO_UPDATE( magmax ); |
| 18 | 18 | VIDEO_START( magmax ); |
| 19 | 19 | |
| 20 | extern UINT16 magmax_vreg; | |
| 20 | extern UINT16 *magmax_vreg; | |
| 21 | 21 | extern UINT16 *magmax_scroll_x; |
| 22 | 22 | extern UINT16 *magmax_scroll_y; |
| 23 | 23 | |
| r1679 | r1680 | |
| 69 | 69 | scanline += 128; |
| 70 | 70 | scanline &= 255; |
| 71 | 71 | |
| 72 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 72 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | static MACHINE_START( magmax ) |
| r1679 | r1680 | |
| 86 | 86 | |
| 87 | 87 | static MACHINE_RESET( magmax ) |
| 88 | 88 | { |
| 89 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 64, 0), 64 | |
| 89 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 64, 0), 64 | |
| 90 | 90 | |
| 91 | 91 | #if 0 |
| 92 | 92 | { |
| r1679 | r1680 | |
| 187 | 187 | /* bit4 - sprite bank LSB (DP0) */ |
| 188 | 188 | /* bit5 - sprite bank MSB (DP1) */ |
| 189 | 189 | /* bit6 - BG display enable (BE)*/ |
| 190 | COMBINE_DATA( | |
| 190 | COMBINE_DATA( | |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | |
| r1679 | r1680 | |
| 208 | 208 | AM_RANGE(0x018000, 0x018fff) AM_WRITE(MWA16_RAM) |
| 209 | 209 | AM_RANGE(0x020000, 0x0207ff) AM_WRITE(MWA16_RAM) AM_BASE(&videoram16) AM_SIZE(&videoram_size) |
| 210 | 210 | AM_RANGE(0x028000, 0x0281ff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) |
| 211 | AM_RANGE(0x030010, 0x030011) AM_WRITE(magmax_vreg_w) | |
| 211 | AM_RANGE(0x030010, 0x030011) AM_WRITE(magmax_vreg_w) AM_BASE(&magmax_vreg) | |
| 212 | 212 | AM_RANGE(0x030012, 0x030013) AM_WRITE(MWA16_RAM) AM_BASE(&magmax_scroll_x) |
| 213 | 213 | AM_RANGE(0x030014, 0x030015) AM_WRITE(MWA16_RAM) AM_BASE(&magmax_scroll_y) |
| 214 | 214 | AM_RANGE(0x03001c, 0x03001d) AM_WRITE(magmax_sound_w) |
| r1679 | r1680 | |
| 363 | 363 | static MACHINE_DRIVER_START( magmax ) |
| 364 | 364 | |
| 365 | 365 | /* basic machine hardware */ |
| 366 | MDRV_CPU_ADD(M68000, | |
| 366 | MDRV_CPU_ADD(M68000, XTAL_16MHz/2) /* verified on pcb */ | |
| 367 | 367 | MDRV_CPU_PROGRAM_MAP(magmax_readmem,magmax_writemem) |
| 368 | 368 | MDRV_CPU_VBLANK_INT(irq1_line_hold,1) |
| 369 | 369 | |
| 370 | MDRV_CPU_ADD(Z80,10000000/4) | |
| 371 | /* audio CPU */ /* 2.5 MHz */ | |
| 370 | MDRV_CPU_ADD(Z80,XTAL_20MHz/8) /* verified on pcb */ | |
| 371 | /* audio CPU */ | |
| 372 | 372 | MDRV_CPU_PROGRAM_MAP(magmax_soundreadmem,magmax_soundwritemem) |
| 373 | 373 | MDRV_CPU_IO_MAP(magmax_soundreadport,magmax_soundwriteport) |
| 374 | 374 | |
| r1679 | r1680 | |
| 384 | 384 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 385 | 385 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 386 | 386 | MDRV_GFXDECODE(magmax) |
| 387 | MDRV_PALETTE_LENGTH(256) | |
| 388 | MDRV_COLORTABLE_LENGTH(1*16 + 16*16) | |
| 387 | MDRV_PALETTE_LENGTH(1*16 + 16*16 + 256) | |
| 389 | 388 | |
| 390 | 389 | MDRV_PALETTE_INIT(magmax) |
| 391 | 390 | MDRV_VIDEO_START(magmax) |
| r1679 | r1680 | |
| 394 | 393 | /* sound hardware */ |
| 395 | 394 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 396 | 395 | |
| 397 | MDRV_SOUND_ADD(AY8910, | |
| 396 | MDRV_SOUND_ADD(AY8910, XTAL_20MHz | |
| 398 | 397 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 399 | 398 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 400 | 399 | |
| 401 | MDRV_SOUND_ADD(AY8910, | |
| 400 | MDRV_SOUND_ADD(AY8910, XTAL_20MHz | |
| 402 | 401 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 403 | 402 | |
| 404 | MDRV_SOUND_ADD(AY8910, | |
| 403 | MDRV_SOUND_ADD(AY8910, XTAL_20MHz | |
| 405 | 404 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 406 | 405 | MACHINE_DRIVER_END |
| 407 | 406 | |
| 408 | 407 | |
| 409 | 408 | ROM_START( magmax ) |
| 410 | ROM_REGION( 0x14000, REGION_CPU1, 0 ) | |
| 409 | ROM_REGION( 0x14000, REGION_CPU1, 0 ) | |
| 411 | 410 | ROM_LOAD16_BYTE( "1.3b", 0x00001, 0x4000, CRC(33793cbb) SHA1(a0bc0e4be434d9fc8115de8d63c92e942334bc85) ) |
| 412 | 411 | ROM_LOAD16_BYTE( "6.3d", 0x00000, 0x4000, CRC(677ef450) SHA1(9003ff1c1c455970c1bd036b0b5e44dae2e379a5) ) |
| 413 | 412 | ROM_LOAD16_BYTE( "2.5b", 0x08001, 0x4000, CRC(1a0c84df) SHA1(77ff21de33392a148d7ca69a77acc654260af0db) ) |
| r1679 | r1680 | |
| 415 | 414 | ROM_LOAD16_BYTE( "3.6b", 0x10001, 0x2000, CRC(d06e6cae) SHA1(94047b2bcf030d34295ff8107f95097ce57efe6b) ) |
| 416 | 415 | ROM_LOAD16_BYTE( "8.6d", 0x10000, 0x2000, CRC(790a82be) SHA1(9a25d5a7c87aeef5e736b0f2fb8dde1c9be70039) ) |
| 417 | 416 | |
| 418 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 417 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 419 | 418 | ROM_LOAD( "15.17b", 0x00000, 0x2000, CRC(19e7b983) SHA1(b1cd0b728e7cce87d9b1039be179d0915d939a4f) ) |
| 420 | 419 | ROM_LOAD( "16.18b", 0x02000, 0x2000, CRC(055e3126) SHA1(8c9b03eb7588512ef17f8c1b731a2fd7cf372bf8) ) |
| 421 | 420 |
| r1679 | r1680 | |
|---|---|---|
| 364 | 364 | |
| 365 | 365 | static VIDEO_START( powerbal ) |
| 366 | 366 | { |
| 367 | bg_tilemap = tilemap_create(powerbal_get_bg_tile_info,tilemap_scan_rows, | |
| 367 | bg_tilemap = tilemap_create(powerbal_get_bg_tile_info,tilemap_scan_rows, | |
| 368 | 368 | |
| 369 | 369 | xoffset = -20; |
| 370 | 370 |
| r1679 | r1680 | |
|---|---|---|
| 2209 | 2209 | PORT_START |
| 2210 | 2210 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2211 | 2211 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2212 | PORT_ | |
| 2212 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 2213 | 2213 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2214 | 2214 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 2215 | 2215 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 2216 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) | |
| 2217 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) | |
| 2216 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) | |
| 2217 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) | |
| 2218 | 2218 | |
| 2219 | 2219 | /*This *might* be unused...*/ |
| 2220 | 2220 | PORT_START |
| r1679 | r1680 | |
| 2245 | 2245 | PORT_DIPSETTING( 0x0d, "Sud America Pal" ) |
| 2246 | 2246 | |
| 2247 | 2247 | PORT_START /* Pad data 1a */ |
| 2248 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("B") PORT_CODE(KEYCODE_U) | |
| 2249 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("C") PORT_CODE(KEYCODE_Y) | |
| 2250 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("A") PORT_CODE(KEYCODE_T) | |
| 2251 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Start") PORT_CODE(KEYCODE_O) | |
| 2252 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up") PORT_CODE(KEYCODE_I) | |
| 2253 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down") PORT_CODE(KEYCODE_K) | |
| 2254 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left") PORT_CODE(KEYCODE_J) | |
| 2255 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right") PORT_CODE(KEYCODE_L) | |
| 2248 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("B") PORT_CODE(KEYCODE_U) | |
| 2249 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("C") PORT_CODE(KEYCODE_Y) | |
| 2250 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("A") PORT_CODE(KEYCODE_T) | |
| 2251 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Start") PORT_CODE(KEYCODE_O) | |
| 2252 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Up") PORT_CODE(KEYCODE_I) | |
| 2253 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Down") PORT_CODE(KEYCODE_K) | |
| 2254 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left") PORT_CODE(KEYCODE_J) | |
| 2255 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right") PORT_CODE(KEYCODE_L) | |
| 2256 | 2256 | |
| 2257 | 2257 | PORT_START /* Pad data 1b */ |
| 2258 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L trig") PORT_CODE(KEYCODE_A) | |
| 2259 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Z") PORT_CODE(KEYCODE_Q) | |
| 2260 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Y") PORT_CODE(KEYCODE_W) | |
| 2261 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("X") PORT_CODE(KEYCODE_E) | |
| 2262 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R trig") PORT_CODE(KEYCODE_S) | |
| 2258 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L trig") PORT_CODE(KEYCODE_A) | |
| 2259 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Z") PORT_CODE(KEYCODE_Q) | |
| 2260 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Y") PORT_CODE(KEYCODE_W) | |
| 2261 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("X") PORT_CODE(KEYCODE_E) | |
| 2262 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R trig") PORT_CODE(KEYCODE_S) | |
| 2263 | 2263 | #endif |
| 2264 | 2264 | INPUT_PORTS_END |
| 2265 | 2265 | |
| r1679 | r1680 | |
| 2347 | 2347 | PORT_START |
| 2348 | 2348 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2349 | 2349 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2350 | PORT_ | |
| 2350 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 2351 | 2351 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2352 | 2352 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 2353 | 2353 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 2354 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) | |
| 2355 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) | |
| 2354 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) | |
| 2355 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) | |
| 2356 | 2356 | |
| 2357 | 2357 | /*This *might* be unused...*/ |
| 2358 | 2358 | PORT_START |
| r1679 | r1680 | |
| 2373 | 2373 | PORT_START/*7*/ |
| 2374 | 2374 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 2375 | 2375 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 2376 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2377 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2376 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2377 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2378 | 2378 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 2379 | 2379 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 2380 | 2380 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| r1679 | r1680 | |
| 2382 | 2382 | |
| 2383 | 2383 | PORT_START/*8*/ |
| 2384 | 2384 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 2385 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2386 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2387 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2386 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2387 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2388 | 2388 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 2389 | 2389 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 2390 | 2390 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| r1679 | r1680 | |
| 2392 | 2392 | |
| 2393 | 2393 | PORT_START/*9*/ |
| 2394 | 2394 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 2395 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2396 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2397 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2395 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2396 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2397 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2398 | 2398 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 2399 | 2399 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 2400 | 2400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 2401 | 2401 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 2402 | 2402 | |
| 2403 | 2403 | PORT_START/*10*/ |
| 2404 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2405 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2406 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2407 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2405 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2406 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2407 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2408 | 2408 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 2409 | 2409 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 2410 | 2410 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 2411 | 2411 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 2412 | 2412 | |
| 2413 | 2413 | PORT_START/*11*/ |
| 2414 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2415 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2416 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2417 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2418 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2419 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2414 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2415 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2416 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2417 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2418 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2419 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2420 | 2420 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) |
| 2421 | PORT_BIT | |
| 2421 | PORT_BIT | |
| 2422 | 2422 | |
| 2423 | 2423 | /*Mahjong panel/player 2 side*/ |
| 2424 | 2424 | PORT_START/*12*/ |
| 2425 | 2425 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) |
| 2426 | 2426 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 2427 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2428 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2427 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2428 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2429 | 2429 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) |
| 2430 | 2430 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) |
| 2431 | 2431 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2) |
| r1679 | r1680 | |
| 2433 | 2433 | |
| 2434 | 2434 | PORT_START/*13*/ |
| 2435 | 2435 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) |
| 2436 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2437 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2438 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2436 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2437 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2438 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2439 | 2439 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2) |
| 2440 | 2440 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2) |
| 2441 | 2441 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2) |
| r1679 | r1680 | |
| 2443 | 2443 | |
| 2444 | 2444 | PORT_START/*14*/ |
| 2445 | 2445 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2) |
| 2446 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2447 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2448 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2446 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2447 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2448 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2449 | 2449 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2) |
| 2450 | 2450 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2) |
| 2451 | 2451 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) |
| 2452 | 2452 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2) |
| 2453 | 2453 | |
| 2454 | 2454 | PORT_START/*15*/ |
| 2455 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2456 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2457 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2458 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2455 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2456 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2457 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2458 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2459 | 2459 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2) |
| 2460 | 2460 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2) |
| 2461 | 2461 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) |
| 2462 | 2462 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2) |
| 2463 | 2463 | |
| 2464 | 2464 | PORT_START/*16*/ |
| 2465 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2466 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2467 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2468 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2469 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2470 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2465 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2466 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2467 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2468 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2469 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2470 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2471 | 2471 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) |
| 2472 | PORT_BIT | |
| 2472 | PORT_BIT | |
| 2473 | 2473 | INPUT_PORTS_END |
| 2474 | 2474 | |
| 2475 | 2475 | static WRITE32_HANDLER ( w60ffc44_write ) |
| r1679 | r1680 | |
|---|---|---|
| 129 | 129 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) |
| 130 | 130 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) |
| 131 | 131 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 132 | PORT_ | |
| 132 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 133 | 133 | |
| 134 | 134 | PORT_START_TAG("BIOS_IN1") // port 6 |
| 135 | 135 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // a few coin inputs here |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | |
| 156 | 156 | static VIDEO_START( talbot ) |
| 157 | 157 | { |
| 158 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_rows, | |
| 158 | bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_rows, | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 526 | 526 | |
| 527 | 527 | static MACHINE_DRIVER_START( bloodbro ) |
| 528 | 528 | // basic machine hardware |
| 529 | MDRV_CPU_ADD_TAG("main", M68000, | |
| 529 | MDRV_CPU_ADD_TAG("main", M68000, XTAL_20MHz/2 | |
| 530 | 530 | MDRV_CPU_PROGRAM_MAP(bloodbro_map, 0) |
| 531 | 531 | MDRV_CPU_VBLANK_INT(irq4_line_hold, 1) |
| 532 | 532 | |
| 533 | SEIBU_SOUND_SYSTEM_CPU(1 | |
| 533 | SEIBU_SOUND_SYSTEM_CPU(XTAL_7_159 | |
| 534 | 534 | |
| 535 | 535 | MDRV_SCREEN_REFRESH_RATE(60) |
| 536 | 536 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| r1679 | r1680 | |
| 549 | 549 | MDRV_VIDEO_UPDATE(bloodbro) |
| 550 | 550 | |
| 551 | 551 | // sound hardware |
| 552 | SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(1 | |
| 552 | SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(XTAL_7_159 | |
| 553 | 553 | MACHINE_DRIVER_END |
| 554 | 554 | |
| 555 | 555 | static MACHINE_DRIVER_START( weststry ) |
| r1679 | r1680 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | /* if there's more to come, set another timer */ |
| 180 | 180 | if (laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) |
| 181 | timer_adjust(serial_timer, amiga_get_serial_char_period(), 0 | |
| 181 | timer_adjust_oneshot(serial_timer, amiga_get_serial_char_period(), 0 | |
| 182 | 182 | else |
| 183 | 183 | serial_timer_active = FALSE; |
| 184 | 184 | } |
| r1679 | r1680 | |
| 192 | 192 | /* if we have data available, set a timer to read it */ |
| 193 | 193 | if (!serial_timer_active && laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) |
| 194 | 194 | { |
| 195 | timer_adjust(serial_timer, amiga_get_serial_char_period(), 0 | |
| 195 | timer_adjust_oneshot(serial_timer, amiga_get_serial_char_period(), 0 | |
| 196 | 196 | serial_timer_active = TRUE; |
| 197 | 197 | } |
| 198 | 198 | } |
| r1679 | r1680 | |
| 206 | 206 | /* if we have data available, set a timer to read it */ |
| 207 | 207 | if (!serial_timer_active && laserdisc_line_r(discinfo, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) |
| 208 | 208 | { |
| 209 | timer_adjust(serial_timer, amiga_get_serial_char_period(), 0 | |
| 209 | timer_adjust_oneshot(serial_timer, amiga_get_serial_char_period(), 0 | |
| 210 | 210 | serial_timer_active = TRUE; |
| 211 | 211 | } |
| 212 | 212 | } |
| r1679 | r1680 | |
| 384 | 384 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 385 | 385 | |
| 386 | 386 | PORT_START_TAG("P1JOY") /* referenced by JOY0DAT */ |
| 387 | PORT_ | |
| 387 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH | |
| 388 | 388 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) |
| 389 | 389 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 390 | 390 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 192 | 192 | WRITE8_HANDLER( rallyx_scrolly_w ); |
| 193 | 193 | WRITE8_HANDLER( tactcian_starson_w ); |
| 194 | 194 | PALETTE_INIT( rallyx ); |
| 195 | PALETTE_INIT( jungler ); | |
| 195 | 196 | VIDEO_START( rallyx ); |
| 197 | VIDEO_START( jungler ); | |
| 198 | VIDEO_START( locomotn ); | |
| 199 | VIDEO_START( commsega ); | |
| 196 | 200 | VIDEO_UPDATE( rallyx ); |
| 197 | DRIVER_INIT( rallyx ); | |
| 198 | DRIVER_INIT( jungler ); | |
| 199 | DRIVER_INIT( tactcian ); | |
| 200 | DRIVER_INIT( locomotn ); | |
| 201 | DRIVER_INIT( commsega ); | |
| 201 | VIDEO_UPDATE( jungler ); | |
| 202 | VIDEO_UPDATE( locomotn ); | |
| 202 | 203 | |
| 203 | 204 | |
| 204 | 205 | static WRITE8_HANDLER( rallyx_interrupt_vector_w ) |
| r1679 | r1680 | |
| 327 | 328 | ADDRESS_MAP_END |
| 328 | 329 | |
| 329 | 330 | |
| 330 | static ADDRESS_MAP_START( | |
| 331 | static ADDRESS_MAP_START( ju | |
| 331 | 332 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 332 | 333 | AM_RANGE(0x8000, 0x8fff) AM_READWRITE(MRA8_RAM, rallyx_videoram_w) AM_BASE(&rallyx_videoram) |
| 333 | 334 | AM_RANGE(0x9800, 0x9fff) AM_RAM |
| r1679 | r1680 | |
| 850 | 851 | MDRV_SCREEN_SIZE(36*8, 32*8) |
| 851 | 852 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 2*8, 30*8-1) |
| 852 | 853 | MDRV_GFXDECODE(rallyx) |
| 853 | MDRV_PALETTE_LENGTH(32) | |
| 854 | MDRV_COLORTABLE_LENGTH(64*4+4) | |
| 854 | MDRV_PALETTE_LENGTH(64*4+4) | |
| 855 | 855 | |
| 856 | 856 | MDRV_PALETTE_INIT(rallyx) |
| 857 | 857 | MDRV_VIDEO_START(rallyx) |
| r1679 | r1680 | |
| 870 | 870 | MACHINE_DRIVER_END |
| 871 | 871 | |
| 872 | 872 | |
| 873 | static MACHINE_DRIVER_START( | |
| 873 | static MACHINE_DRIVER_START( ju | |
| 874 | 874 | |
| 875 | 875 | /* basic machine hardware */ |
| 876 | 876 | MDRV_CPU_ADD(Z80, 18432000/6) /* 3.072 MHz */ |
| 877 | MDRV_CPU_PROGRAM_MAP( | |
| 877 | MDRV_CPU_PROGRAM_MAP(ju | |
| 878 | 878 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) |
| 879 | 879 | |
| 880 | 880 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1679 | r1680 | |
| 886 | 886 | MDRV_SCREEN_SIZE(36*8, 32*8) |
| 887 | 887 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 2*8, 30*8-1) |
| 888 | 888 | MDRV_GFXDECODE(jungler) |
| 889 | MDRV_PALETTE_LENGTH(32+64) | |
| 890 | MDRV_COLORTABLE_LENGTH(64*4+4) | |
| 889 | MDRV_PALETTE_LENGTH(64*4+4+64) | |
| 891 | 890 | |
| 892 | MDRV_PALETTE_INIT(rallyx) | |
| 893 | MDRV_VIDEO_START(rallyx) | |
| 894 | MDRV_VIDEO_UPDATE(rallyx) | |
| 891 | MDRV_PALETTE_INIT(jungler) | |
| 892 | MDRV_VIDEO_START(jungler) | |
| 893 | MDRV_VIDEO_UPDATE(jungler) | |
| 895 | 894 | |
| 896 | 895 | /* sound hardware */ |
| 897 | 896 | MDRV_IMPORT_FROM(locomotn_sound) |
| 898 | 897 | MACHINE_DRIVER_END |
| 899 | 898 | |
| 900 | 899 | |
| 900 | static MACHINE_DRIVER_START( tactcian ) | |
| 901 | ||
| 902 | /* basic machine hardware */ | |
| 903 | MDRV_IMPORT_FROM(jungler) | |
| 904 | ||
| 905 | /* video hardware */ | |
| 906 | MDRV_VIDEO_START(locomotn) | |
| 907 | MDRV_VIDEO_UPDATE(locomotn) | |
| 908 | MACHINE_DRIVER_END | |
| 909 | ||
| 910 | ||
| 901 | 911 | static MACHINE_DRIVER_START( locomotn ) |
| 902 | 912 | |
| 903 | 913 | /* basic machine hardware */ |
| 904 | MDRV_IMPORT_FROM( | |
| 914 | MDRV_IMPORT_FROM(ju | |
| 905 | 915 | |
| 906 | 916 | /* video hardware */ |
| 907 | 917 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 918 | MDRV_VIDEO_START(locomotn) | |
| 919 | MDRV_VIDEO_UPDATE(locomotn) | |
| 908 | 920 | MACHINE_DRIVER_END |
| 909 | 921 | |
| 910 | 922 | |
| 923 | static MACHINE_DRIVER_START( commsega ) | |
| 911 | 924 | |
| 925 | /* basic machine hardware */ | |
| 926 | MDRV_IMPORT_FROM(jungler) | |
| 927 | ||
| 928 | /* video hardware */ | |
| 929 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 930 | MDRV_VIDEO_START(commsega) | |
| 931 | MDRV_VIDEO_UPDATE(locomotn) | |
| 932 | MACHINE_DRIVER_END | |
| 933 | ||
| 934 | ||
| 935 | ||
| 912 | 936 | /*************************************************************************** |
| 913 | 937 | |
| 914 | 938 | Game driver(s) |
| r1679 | r1680 | |
| 1193 | 1217 | |
| 1194 | 1218 | |
| 1195 | 1219 | |
| 1196 | GAME( 1980, rallyx, 0, rallyx, rallyx, rallyx, ROT0, "Namco", "Rally X", 0 ) | |
| 1197 | GAME( 1980, rallyxm, rallyx, rallyx, rallyx, rallyx, ROT0, "[Namco] (Midway license)", "Rally X (Midway)", 0 ) | |
| 1198 | GAME( 1981, nrallyx, 0, rallyx, nrallyx, rallyx, ROT0, "Namco", "New Rally X", 0 ) | |
| 1199 | ||
| 1200 | GAME( 1981, jungler, 0, tactcian, jungler, jungler, ROT90, "Konami", "Jungler", 0 ) | |
| 1201 | GAME( 1981, junglers, jungler, tactcian, jungler, jungler, ROT90, "[Konami] (Stern license)", "Jungler (Stern)", 0 ) | |
| 1202 | GAME( 1982, tactcian, 0, tactcian, tactcian, tactcian, ROT90, "[Konami] (Sega license)", "Tactician (set 1)", 0 ) | |
| 1203 | GAME( 1981, tactcan2, tactcian, tactcian, tactcian, tactcian, ROT90, "[Konami] (Sega license)", "Tactician (set 2)", 0 ) | |
| 1204 | GAME( 1982, locomotn, 0, locomotn, locomotn, locomotn, ROT90, "Konami (Centuri license)", "Loco-Motion", 0 ) | |
| 1205 | GAME( 1982, gutangtn, locomotn, locomotn, locomotn, locomotn, ROT90, "Konami (Sega license)", "Guttang Gottong", 0 ) | |
| 1206 | GAME( 1982, cottong, locomotn, locomotn, locomotn, locomotn, ROT90, "bootleg", "Cotocoto Cottong", 0 ) | |
| 1207 | GAME( 1983, commsega, 0, locomotn, commsega, commsega, ROT90, "Sega", "Commando (Sega)", GAME_IMPERFECT_SOUND ) | |
| 1220 | GAME( 1980, rallyx, 0, rallyx, rallyx, 0, ROT0, "Namco", "Rally X", 0 ) | |
| 1221 | GAME( 1980, rallyxm, rallyx, rallyx, rallyx, 0, ROT0, "[Namco] (Midway license)", "Rally X (Midway)", 0 ) | |
| 1222 | GAME( 1981, nrallyx, 0, rallyx, nrallyx, 0, ROT0, "Namco", "New Rally X", 0 ) | |
| 1223 | GAME( 1981, jungler, 0, jungler, jungler, 0, ROT90, "Konami", "Jungler", 0 ) | |
| 1224 | GAME( 1981, junglers, jungler, jungler, jungler, 0, ROT90, "[Konami] (Stern license)", "Jungler (Stern)", 0 ) | |
| 1225 | GAME( 1982, tactcian, 0, tactcian, tactcian, 0, ROT90, "[Konami] (Sega license)", "Tactician (set 1)", 0 ) | |
| 1226 | GAME( 1981, tactcan2, tactcian, tactcian, tactcian, 0, ROT90, "[Konami] (Sega license)", "Tactician (set 2)", 0 ) | |
| 1227 | GAME( 1982, locomotn, 0, locomotn, locomotn, 0, ROT90, "Konami (Centuri license)", "Loco-Motion", 0 ) | |
| 1228 | GAME( 1982, gutangtn, locomotn, locomotn, locomotn, 0, ROT90, "Konami (Sega license)", "Guttang Gottong", 0 ) | |
| 1229 | GAME( 1982, cottong, locomotn, locomotn, locomotn, 0, ROT90, "bootleg", "Cotocoto Cottong", 0 ) | |
| 1230 | GAME( 1983, commsega, 0, commsega, commsega, 0, ROT90, "Sega", "Commando (Sega)", GAME_IMPERFECT_SOUND ) |
| r1679 | r1680 | |
|---|---|---|
| 467 | 467 | |
| 468 | 468 | static VIDEO_START(bnstars) |
| 469 | 469 | { |
| 470 | ms32_tx_tilemap[0] = tilemap_create(get_ms32_tx0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 471 | ms32_tx_tilemap[1] = tilemap_create(get_ms32_tx1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,64); | |
| 470 | ms32_tx_tilemap[0] = tilemap_create(get_ms32_tx0_tile_info,tilemap_scan_rows, 8, 8,64,64); | |
| 471 | ms32_tx_tilemap[1] = tilemap_create(get_ms32_tx1_tile_info,tilemap_scan_rows, 8, 8,64,64); | |
| 472 | 472 | tilemap_set_transparent_pen(ms32_tx_tilemap[0],0); |
| 473 | 473 | tilemap_set_transparent_pen(ms32_tx_tilemap[1],0); |
| 474 | 474 | |
| 475 | ms32_bg_tilemap[0] = tilemap_create(get_ms32_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 476 | ms32_bg_tilemap[1] = tilemap_create(get_ms32_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 475 | ms32_bg_tilemap[0] = tilemap_create(get_ms32_bg0_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 476 | ms32_bg_tilemap[1] = tilemap_create(get_ms32_bg1_tile_info,tilemap_scan_rows,16,16,64,64); | |
| 477 | 477 | tilemap_set_transparent_pen(ms32_bg_tilemap[0],0); |
| 478 | 478 | tilemap_set_transparent_pen(ms32_bg_tilemap[1],0); |
| 479 | 479 | |
| 480 | ms32_roz_tilemap[0] = tilemap_create(get_ms32_roz0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,128,128); | |
| 481 | ms32_roz_tilemap[1] = tilemap_create(get_ms32_roz1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,128,128); | |
| 480 | ms32_roz_tilemap[0] = tilemap_create(get_ms32_roz0_tile_info,tilemap_scan_rows,16,16,128,128); | |
| 481 | ms32_roz_tilemap[1] = tilemap_create(get_ms32_roz1_tile_info,tilemap_scan_rows,16,16,128,128); | |
| 482 | 482 | tilemap_set_transparent_pen(ms32_roz_tilemap[0],0); |
| 483 | 483 | tilemap_set_transparent_pen(ms32_roz_tilemap[1],0); |
| 484 | 484 |
| r1679 | r1680 | |
|---|---|---|
| 396 | 396 | |
| 397 | 397 | static VIDEO_START(varia) |
| 398 | 398 | { |
| 399 | vmetal_texttilemap = tilemap_create(get_vmetal_texttilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8, 256,256); | |
| 400 | vmetal_mid1tilemap = tilemap_create(get_vmetal_mid1tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16, 256,256); | |
| 401 | vmetal_mid2tilemap = tilemap_create(get_vmetal_mid2tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16, 256,256); | |
| 399 | vmetal_texttilemap = tilemap_create(get_vmetal_texttilemap_tile_info,tilemap_scan_rows, 8, 8, 256,256); | |
| 400 | vmetal_mid1tilemap = tilemap_create(get_vmetal_mid1tilemap_tile_info,tilemap_scan_rows,16,16, 256,256); | |
| 401 | vmetal_mid2tilemap = tilemap_create(get_vmetal_mid2tilemap_tile_info,tilemap_scan_rows,16,16, 256,256); | |
| 402 | 402 | tilemap_set_transparent_pen(vmetal_texttilemap,0); |
| 403 | 403 | tilemap_set_transparent_pen(vmetal_mid1tilemap,0); |
| 404 | 404 | tilemap_set_transparent_pen(vmetal_mid2tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 279 | 279 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 280 | 280 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 281 | 281 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) /* Freeze input */ |
| 282 | PORT_ | |
| 282 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 283 | 283 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 284 | 284 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 285 | 285 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
|---|---|---|
| 259 | 259 | |
| 260 | 260 | MDRV_PALETTE_INIT(flower) |
| 261 | 261 | MDRV_PALETTE_LENGTH(256) |
| 262 | MDRV_COLORTABLE_LENGTH(384) | |
| 263 | 262 | |
| 264 | 263 | MDRV_VIDEO_START(flower) |
| 265 | 264 | MDRV_VIDEO_UPDATE(flower) |
| r1679 | r1680 | |
|---|---|---|
| 143 | 143 | |
| 144 | 144 | static VIDEO_START(dreamwld) |
| 145 | 145 | { |
| 146 | dreamwld_bg_tilemap = tilemap_create(get_dreamwld_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16, 64,32); | |
| 147 | dreamwld_bg2_tilemap = tilemap_create(get_dreamwld_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16, 64,32); | |
| 146 | dreamwld_bg_tilemap = tilemap_create(get_dreamwld_bg_tile_info,tilemap_scan_rows, 16, 16, 64,32); | |
| 147 | dreamwld_bg2_tilemap = tilemap_create(get_dreamwld_bg2_tile_info,tilemap_scan_rows, 16, 16, 64,32); | |
| 148 | 148 | tilemap_set_transparent_pen(dreamwld_bg2_tilemap,0); |
| 149 | 149 | dreamwld_tilebankold[0] = dreamwld_tilebankold[1] = -1; |
| 150 | 150 | dreamwld_tilebank[0] = dreamwld_tilebank[1] = 0; |
| r1679 | r1680 | |
|---|---|---|
| 280 | 280 | }; |
| 281 | 281 | |
| 282 | 282 | static GFXDECODE_START( megazone ) |
| 283 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 284 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*16, 16 ) | |
| 283 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0, 16 ) | |
| 284 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 16*16, 16 ) | |
| 285 | 285 | GFXDECODE_END |
| 286 | 286 | |
| 287 | 287 | |
| r1679 | r1680 | |
| 323 | 323 | MDRV_SCREEN_SIZE(36*8, 32*8) |
| 324 | 324 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 2*8, 30*8-1) |
| 325 | 325 | MDRV_GFXDECODE(megazone) |
| 326 | MDRV_PALETTE_LENGTH(32) | |
| 327 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 326 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 328 | 327 | |
| 329 | 328 | MDRV_PALETTE_INIT(megazone) |
| 330 | 329 | MDRV_VIDEO_START(megazone) |
| r1679 | r1680 | |
| 372 | 371 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for the 8039 DAC CPU */ |
| 373 | 372 | ROM_LOAD( "319e01.bin", 0x0000, 0x1000, CRC(ed5725a0) SHA1(64f54621487291fbfe827fb4cecca299fd0db781) ) |
| 374 | 373 | |
| 375 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 376 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) | |
| 377 | ROM_LOAD( "319e13.bin", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) | |
| 378 | ||
| 379 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 374 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 380 | 375 | ROM_LOAD( "319e11.bin", 0x0000, 0x2000, CRC(965a7ff6) SHA1(210aae91a3838e5f7c78747d9b7419d266538ffc) ) |
| 381 | 376 | ROM_LOAD( "319e09.bin", 0x2000, 0x2000, CRC(5eaa7f3e) SHA1(4c038e80d575988407252897a1f1bc6b76af597c) ) |
| 382 | 377 | ROM_LOAD( "319e10.bin", 0x4000, 0x2000, CRC(7bb1aeee) SHA1(be2dd46cd0121cedad6dab90a22643798a3176ab) ) |
| 383 | 378 | ROM_LOAD( "319e08.bin", 0x6000, 0x2000, CRC(6add71b1) SHA1(fc8c0ecd3b7f03d63b6c3143143986883345fa38) ) |
| 384 | 379 | |
| 380 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 381 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) | |
| 382 | ROM_LOAD( "319e13.bin", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) | |
| 383 | ||
| 385 | 384 | ROM_REGION( 0x0260, REGION_PROMS, 0 ) |
| 386 | 385 | ROM_LOAD( "319b18.a16", 0x0000, 0x020, CRC(23cb02af) SHA1(aba459826a75ec07bc6d97580e934f58aa22f4f4) ) /* palette */ |
| 387 | 386 | ROM_LOAD( "319b16.c6", 0x0020, 0x100, CRC(5748e933) SHA1(c1478c31533a11421cd4579ccfdbb430e193d17b) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 404 | 403 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for the 8039 DAC CPU */ |
| 405 | 404 | ROM_LOAD( "319e01.bin", 0x0000, 0x1000, CRC(ed5725a0) SHA1(64f54621487291fbfe827fb4cecca299fd0db781) ) |
| 406 | 405 | |
| 407 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 408 | ROM_LOAD( "ic40_vid.bin", 0x0000, 0x2000, CRC(07b8b24b) SHA1(faadcb20ee8b26b9ab0692df6a81e5423514863e) ) | |
| 409 | ROM_LOAD( "319e13.bin", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) | |
| 410 | ||
| 411 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 406 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 412 | 407 | ROM_LOAD( "319e11.bin", 0x0000, 0x2000, CRC(965a7ff6) SHA1(210aae91a3838e5f7c78747d9b7419d266538ffc) ) |
| 413 | 408 | ROM_LOAD( "319e09.bin", 0x2000, 0x2000, CRC(5eaa7f3e) SHA1(4c038e80d575988407252897a1f1bc6b76af597c) ) |
| 414 | 409 | ROM_LOAD( "319e10.bin", 0x4000, 0x2000, CRC(7bb1aeee) SHA1(be2dd46cd0121cedad6dab90a22643798a3176ab) ) |
| 415 | 410 | ROM_LOAD( "319e08.bin", 0x6000, 0x2000, CRC(6add71b1) SHA1(fc8c0ecd3b7f03d63b6c3143143986883345fa38) ) |
| 416 | 411 | |
| 412 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 413 | ROM_LOAD( "ic40_vid.bin", 0x0000, 0x2000, CRC(07b8b24b) SHA1(faadcb20ee8b26b9ab0692df6a81e5423514863e) ) | |
| 414 | ROM_LOAD( "319e13.bin", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) | |
| 415 | ||
| 417 | 416 | ROM_REGION( 0x0260, REGION_PROMS, 0 ) |
| 418 | 417 | ROM_LOAD( "319b18.a16", 0x0000, 0x020, CRC(23cb02af) SHA1(aba459826a75ec07bc6d97580e934f58aa22f4f4) ) /* palette */ |
| 419 | 418 | ROM_LOAD( "319b16.c6", 0x0020, 0x100, CRC(5748e933) SHA1(c1478c31533a11421cd4579ccfdbb430e193d17b) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 487 | 486 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for the 8039 DAC CPU */ |
| 488 | 487 | ROM_LOAD( "319-h01", 0x0000, 0x1000, CRC(ed5725a0) SHA1(64f54621487291fbfe827fb4cecca299fd0db781) ) // same as e01? |
| 489 | 488 | |
| 490 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 491 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 492 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 493 | ||
| 494 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 489 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 495 | 490 | ROM_LOAD( "319e11.bin", 0x0000, 0x2000, CRC(965a7ff6) SHA1(210aae91a3838e5f7c78747d9b7419d266538ffc) ) |
| 496 | 491 | ROM_LOAD( "319e09.bin", 0x2000, 0x2000, CRC(5eaa7f3e) SHA1(4c038e80d575988407252897a1f1bc6b76af597c) ) |
| 497 | 492 | ROM_LOAD( "319e10.bin", 0x4000, 0x2000, CRC(7bb1aeee) SHA1(be2dd46cd0121cedad6dab90a22643798a3176ab) ) |
| 498 | 493 | ROM_LOAD( "319e08.bin", 0x6000, 0x2000, CRC(6add71b1) SHA1(fc8c0ecd3b7f03d63b6c3143143986883345fa38) ) |
| 499 | 494 | |
| 495 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 496 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 497 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 498 | ||
| 500 | 499 | ROM_REGION( 0x0260, REGION_PROMS, 0 ) |
| 501 | 500 | ROM_LOAD( "319b18.a16", 0x0000, 0x020, CRC(23cb02af) SHA1(aba459826a75ec07bc6d97580e934f58aa22f4f4) ) /* palette */ |
| 502 | 501 | ROM_LOAD( "319b16.c6", 0x0020, 0x100, CRC(5748e933) SHA1(c1478c31533a11421cd4579ccfdbb430e193d17b) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 519 | 518 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for the 8039 DAC CPU */ |
| 520 | 519 | ROM_LOAD( "319-h01", 0x0000, 0x1000, CRC(ed5725a0) SHA1(64f54621487291fbfe827fb4cecca299fd0db781) ) // same as e01? |
| 521 | 520 | |
| 522 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 523 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 524 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 525 | ||
| 526 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 521 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 527 | 522 | ROM_LOAD( "319e11.bin", 0x0000, 0x2000, CRC(965a7ff6) SHA1(210aae91a3838e5f7c78747d9b7419d266538ffc) ) |
| 528 | 523 | ROM_LOAD( "319e09.bin", 0x2000, 0x2000, CRC(5eaa7f3e) SHA1(4c038e80d575988407252897a1f1bc6b76af597c) ) |
| 529 | 524 | ROM_LOAD( "319e10.bin", 0x4000, 0x2000, CRC(7bb1aeee) SHA1(be2dd46cd0121cedad6dab90a22643798a3176ab) ) |
| 530 | 525 | ROM_LOAD( "319e08.bin", 0x6000, 0x2000, CRC(6add71b1) SHA1(fc8c0ecd3b7f03d63b6c3143143986883345fa38) ) |
| 531 | 526 | |
| 527 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 528 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 529 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 530 | ||
| 532 | 531 | ROM_REGION( 0x0260, REGION_PROMS, 0 ) |
| 533 | 532 | ROM_LOAD( "319b18.a16", 0x0000, 0x020, CRC(23cb02af) SHA1(aba459826a75ec07bc6d97580e934f58aa22f4f4) ) /* palette */ |
| 534 | 533 | ROM_LOAD( "319b16.c6", 0x0020, 0x100, CRC(5748e933) SHA1(c1478c31533a11421cd4579ccfdbb430e193d17b) ) /* sprite lookup table */ |
| r1679 | r1680 | |
| 551 | 550 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for the 8039 DAC CPU */ |
| 552 | 551 | ROM_LOAD( "319-h01", 0x0000, 0x1000, CRC(ed5725a0) SHA1(64f54621487291fbfe827fb4cecca299fd0db781) ) // same as e01? |
| 553 | 552 | |
| 554 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 555 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 556 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 557 | ||
| 558 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 553 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 559 | 554 | ROM_LOAD( "319e11.bin", 0x0000, 0x2000, CRC(965a7ff6) SHA1(210aae91a3838e5f7c78747d9b7419d266538ffc) ) |
| 560 | 555 | ROM_LOAD( "319e09.bin", 0x2000, 0x2000, CRC(5eaa7f3e) SHA1(4c038e80d575988407252897a1f1bc6b76af597c) ) |
| 561 | 556 | ROM_LOAD( "319e10.bin", 0x4000, 0x2000, CRC(7bb1aeee) SHA1(be2dd46cd0121cedad6dab90a22643798a3176ab) ) |
| 562 | 557 | ROM_LOAD( "319e08.bin", 0x6000, 0x2000, CRC(6add71b1) SHA1(fc8c0ecd3b7f03d63b6c3143143986883345fa38) ) |
| 563 | 558 | |
| 559 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 560 | ROM_LOAD( "319e12.bin", 0x0000, 0x2000, CRC(e0fb7835) SHA1(44ccaaf92bdb83323f45e08dbe118697720e9105) ) // 12.9c | |
| 561 | ROM_LOAD( "319-g13", 0x2000, 0x2000, CRC(3d8f3743) SHA1(1f6fbf804dacfa44cd11b4cf41d0bedb7f2ff6b6) ) // same as e13? | |
| 562 | ||
| 564 | 563 | ROM_REGION( 0x0260, REGION_PROMS, 0 ) |
| 565 | 564 | ROM_LOAD( "319b18.a16", 0x0000, 0x020, CRC(23cb02af) SHA1(aba459826a75ec07bc6d97580e934f58aa22f4f4) ) /* palette */ |
| 566 | 565 | ROM_LOAD( "319b16.c6", 0x0020, 0x100, CRC(5748e933) SHA1(c1478c31533a11421cd4579ccfdbb430e193d17b) ) /* sprite lookup table */ |
| r1679 | r1680 | |
|---|---|---|
| 303 | 303 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 304 | 304 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 305 | 305 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 306 | PORT_ | |
| 306 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 307 | 307 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 308 | 308 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 309 | 309 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
| 341 | 341 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 342 | 342 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 343 | 343 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 344 | PORT_ | |
| 344 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 345 | 345 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 346 | 346 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 347 | 347 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
|---|---|---|
| 436 | 436 | static MACHINE_DRIVER_START( toki ) /* KOYO 20.000MHz near the cpu */ |
| 437 | 437 | |
| 438 | 438 | /* basic machine hardware */ |
| 439 | MDRV_CPU_ADD(M68000,20 | |
| 439 | MDRV_CPU_ADD(M68000,XTAL_20MHz | |
| 440 | 440 | MDRV_CPU_PROGRAM_MAP(toki_map,0) |
| 441 | 441 | MDRV_CPU_VBLANK_INT(irq1_line_hold,1)/* VBL */ |
| 442 | 442 | |
| 443 | SEIBU_SOUND_SYSTEM_CPU(1431818 | |
| 443 | SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verifed on pcb */ | |
| 444 | 444 | |
| 445 | 445 | MDRV_SCREEN_REFRESH_RATE(60) |
| 446 | 446 | MDRV_MACHINE_RESET(seibu_sound_1) |
| r1679 | r1680 | |
| 458 | 458 | MDRV_VIDEO_UPDATE(toki) |
| 459 | 459 | |
| 460 | 460 | /* sound hardware */ |
| 461 | SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(1431818 | |
| 461 | SEIBU_SOUND_SYSTEM_YM3812_RAIDEN_INTERFACE(XTAL_14_31818MHz/4,XTAL_12MHz/12 ,1) /* verifed on pcb */ | |
| 462 | 462 | MACHINE_DRIVER_END |
| 463 | 463 | |
| 464 | 464 |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | { |
| 72 | 72 | int i; |
| 73 | 73 | |
| 74 | /* allocate the colortable */ | |
| 75 | machine->colortable = colortable_alloc(machine, 0x100); | |
| 74 | 76 | |
| 75 | PALETTE_INIT_CALL(RRRR_GGGG_BBBB); | |
| 76 | color_prom += 256*3; | |
| 77 | /* create a lookup table for the palette */ | |
| 78 | for (i = 0; i < 0x100; i++) | |
| 79 | { | |
| 80 | int r = pal4bit(color_prom[i + 0x000]); | |
| 81 | int g = pal4bit(color_prom[i + 0x100]); | |
| 82 | int b = pal4bit(color_prom[i + 0x200]); | |
| 77 | 83 | |
| 84 | colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b)); | |
| 85 | } | |
| 86 | ||
| 87 | /* color_prom now points to the beginning of the lookup table */ | |
| 88 | color_prom += 0x300; | |
| 89 | ||
| 78 | 90 | // txt lookup table |
| 79 | for (i = 0;i < | |
| 91 | for (i = 0; i < 0x100; i++) | |
| 80 | 92 | { |
| 81 | if (*color_prom & 0x40) | |
| 82 | *(colortable++) = 0; | |
| 93 | UINT8 ctabentry; | |
| 94 | ||
| 95 | if (color_prom[i] & 0x40) | |
| 96 | ctabentry = 0; | |
| 83 | 97 | else |
| 84 | *(colortable++) = (*color_prom & 0x3f) + 0x80; | |
| 85 | color_prom++; | |
| 98 | ctabentry = (color_prom[i] & 0x3f) | 0x80; | |
| 99 | ||
| 100 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 86 | 101 | } |
| 87 | 102 | |
| 88 | 103 | // tile lookup table |
| 89 | for (i = 0;i < 2 | |
| 104 | for (i = 0x100; i < 0x200; i++) | |
| 90 | 105 | { |
| 91 | *(colortable++) = (*color_prom & 0x3f) + 0x00; | |
| 92 | color_prom++; | |
| 106 | UINT8 ctabentry = (color_prom[i] & 0x3f) | 0x00; | |
| 107 | ||
| 108 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 93 | 109 | } |
| 94 | 110 | |
| 95 | 111 | // sprite lookup table |
| 96 | for (i = 0;i < | |
| 112 | for (i = 0x200; i < 0x300; i++) | |
| 97 | 113 | { |
| 98 | if (*color_prom & 0x40) | |
| 99 | *(colortable++) = 0; | |
| 114 | UINT8 ctabentry; | |
| 115 | ||
| 116 | if (color_prom[i] & 0x40) | |
| 117 | ctabentry = 0; | |
| 100 | 118 | else |
| 101 | *(colortable++) = (*color_prom & 0x3f) + 0x40; | |
| 102 | color_prom++; | |
| 119 | ctabentry = (color_prom[i] & 0x3f) | 0x40; | |
| 120 | ||
| 121 | colortable_entry_set_value(machine->colortable, i, ctabentry); | |
| 103 | 122 | } |
| 104 | 123 | } |
| 105 | 124 | |
| r1679 | r1680 | |
| 119 | 138 | |
| 120 | 139 | static TILE_GET_INFO( get_txttile_info ) |
| 121 | 140 | { |
| 122 | int code,attr; | |
| 141 | int code=videoram[tile_index*4]; | |
| 142 | int attr=videoram[tile_index*4+2]; | |
| 143 | int color = attr & 0x07; | |
| 123 | 144 | |
| 124 | code=videoram[tile_index*4]; | |
| 125 | attr=videoram[tile_index*4+2]; | |
| 145 | tileinfo->group = color; | |
| 146 | ||
| 126 | 147 | SET_TILE_INFO( |
| 127 | 148 | 0, |
| 128 | 149 | code + ((attr & 8) << 5), |
| 129 | | |
| 150 | color | |
| 130 | 151 | 0); |
| 131 | 152 | } |
| 132 | 153 | |
| r1679 | r1680 | |
| 167 | 188 | |
| 168 | 189 | static VIDEO_START( panicr ) |
| 169 | 190 | { |
| 170 | bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,1024,16 ); | |
| 171 | txttilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TYPE_COLORTABLE,8,8,32,32 ); | |
| 172 | tilemap_set_transparent_pen(txttilemap, 0); | |
| 191 | bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,16,16,1024,16 ); | |
| 192 | ||
| 193 | txttilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,8,8,32,32 ); | |
| 194 | colortable_configure_tilemap_groups(machine->colortable, txttilemap, machine->gfx[0], 0); | |
| 173 | 195 | } |
| 174 | 196 | |
| 175 | 197 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect ) |
| r1679 | r1680 | |
| 191 | 213 | drawgfx(bitmap,machine->gfx[2], |
| 192 | 214 | sprite, |
| 193 | 215 | color,fx,fy,x,y, |
| 194 | cliprect,TRANSPARENCY_COLOR,0); | |
| 216 | cliprect,TRANSPARENCY_PENS, | |
| 217 | colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0)); | |
| 195 | 218 | } |
| 196 | 219 | } |
| 197 | 220 | |
| r1679 | r1680 | |
| 348 | 371 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 349 | 372 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 350 | 373 | MDRV_GFXDECODE(panicr) |
| 351 | MDRV_PALETTE_LENGTH(256) | |
| 352 | MDRV_COLORTABLE_LENGTH(256*3) | |
| 374 | MDRV_PALETTE_LENGTH(256*3) | |
| 353 | 375 | MDRV_PALETTE_INIT(panicr) |
| 354 | 376 | |
| 355 | 377 | MDRV_VIDEO_START(panicr) |
| r1679 | r1680 | |
|---|---|---|
| 103 | 103 | static VIDEO_START(sbowling) |
| 104 | 104 | { |
| 105 | 105 | tmpbitmap = auto_bitmap_alloc(32*8,32*8,machine->screen[0].format); |
| 106 | sb_tilemap = tilemap_create(get_sb_tile_info, tilemap_scan_rows, | |
| 106 | sb_tilemap = tilemap_create(get_sb_tile_info, tilemap_scan_rows, | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | static WRITE8_HANDLER( pix_shift_w ) |
| r1679 | r1680 | |
|---|---|---|
| 70 | 70 | |
| 71 | 71 | static VIDEO_START( good ) |
| 72 | 72 | { |
| 73 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16, 32,32); | |
| 74 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16, 16, 32,32); | |
| 73 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 16, 16, 32,32); | |
| 74 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, 16, 16, 32,32); | |
| 75 | 75 | tilemap_set_transparent_pen(fg_tilemap,0xf); |
| 76 | 76 | } |
| 77 | 77 |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | /* because according to KLOV, Midway was only allowed to make minor */ |
| 14 | 14 | /* modifications of the Taito code. */ |
| 15 | 15 | /* */ |
| 16 | /* - DIP Locations verified from manual for: */ | |
| 17 | /* -sitv */ | |
| 18 | /* -sicv */ | |
| 19 | /* -invadpt2 */ | |
| 20 | /* -lrescue */ | |
| 21 | /* -invasion */ | |
| 16 | 22 | /* */ |
| 17 | 23 | /* To Do: */ |
| 18 | 24 | /* ----- */ |
| r1679 | r1680 | |
| 112 | 118 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 113 | 119 | |
| 114 | 120 | PORT_START_TAG("DSW0") |
| 115 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 121 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 116 | 122 | PORT_DIPSETTING( 0x00, "3" ) |
| 117 | 123 | PORT_DIPSETTING( 0x01, "4" ) |
| 118 | 124 | PORT_DIPSETTING( 0x02, "5" ) |
| 119 | 125 | PORT_DIPSETTING( 0x03, "6" ) |
| 120 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 121 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 126 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) PORT_DIPLOCATION("SW1:3") | |
| 127 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") | |
| 122 | 128 | PORT_DIPSETTING( 0x08, "1000" ) |
| 123 | 129 | PORT_DIPSETTING( 0x00, "1500" ) |
| 124 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 125 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) | |
| 130 | /* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun. | |
| 131 | Be sure these are always ON */ | |
| 132 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */ | |
| 133 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8") | |
| 126 | 134 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 127 | 135 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 128 | 136 | |
| r1679 | r1680 | |
| 177 | 185 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 178 | 186 | |
| 179 | 187 | PORT_START_TAG("DSW0") |
| 180 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 188 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 181 | 189 | PORT_DIPSETTING( 0x00, "3" ) |
| 182 | 190 | PORT_DIPSETTING( 0x01, "4" ) |
| 183 | 191 | PORT_DIPSETTING( 0x02, "5" ) |
| 184 | 192 | PORT_DIPSETTING( 0x03, "6" ) |
| 185 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 186 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 193 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) PORT_DIPLOCATION("SW1:3") | |
| 194 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") | |
| 187 | 195 | PORT_DIPSETTING( 0x08, "1000" ) |
| 188 | 196 | PORT_DIPSETTING( 0x00, "1500" ) |
| 189 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 190 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) | |
| 197 | /* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun. | |
| 198 | Be sure these are always ON */ | |
| 199 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */ | |
| 200 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8") | |
| 191 | 201 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 192 | 202 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 193 | 203 | |
| r1679 | r1680 | |
| 240 | 250 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 241 | 251 | |
| 242 | 252 | PORT_START_TAG("DSW0") |
| 243 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 253 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 244 | 254 | PORT_DIPSETTING( 0x00, "3" ) |
| 245 | 255 | PORT_DIPSETTING( 0x01, "4" ) |
| 246 | 256 | PORT_DIPSETTING( 0x02, "5" ) |
| 247 | 257 | PORT_DIPSETTING( 0x03, "6" ) |
| 248 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 249 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 258 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) PORT_DIPLOCATION("SW1:3") | |
| 259 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") | |
| 250 | 260 | PORT_DIPSETTING( 0x00, "1500" ) |
| 251 | 261 | PORT_DIPSETTING( 0x08, "3000" ) /* This is different to invaders */ |
| 252 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 253 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) | |
| 262 | /* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun. | |
| 263 | Be sure these are always ON */ | |
| 264 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */ | |
| 265 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8") | |
| 254 | 266 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 255 | 267 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 256 | 268 | |
| r1679 | r1680 | |
| 314 | 326 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 315 | 327 | |
| 316 | 328 | PORT_START_TAG("DSW0") |
| 317 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) | |
| 329 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") | |
| 318 | 330 | PORT_DIPSETTING( 0x00, "3" ) |
| 319 | 331 | PORT_DIPSETTING( 0x01, "4" ) |
| 320 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) | |
| 332 | /* SW1:2 doesn't seem to work? */ | |
| 333 | PORT_DIPNAME( 0x02, 0x00, "Rotate Images" ) PORT_DIPLOCATION("SW1:2") /* "When ON, the images on screen will be rotated. Default is ON." */ | |
| 334 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 335 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 336 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) PORT_DIPLOCATION("SW1:3") | |
| 337 | PORT_DIPNAME( 0x08, 0x00, "Preset Mode" ) PORT_DIPLOCATION("SW1:4") /* Preset Mode: "Switch for checking, when OFF checking can be done." */ | |
| 321 | 338 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 322 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 323 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 324 | PORT_DIPNAME( 0x08, 0x00, "High Score Preset Mode" ) | |
| 325 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 326 | 339 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 327 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 328 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) | |
| 340 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") | |
| 341 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8") | |
| 329 | 342 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 330 | 343 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 331 | 344 | |
| r1679 | r1680 | |
| 945 | 958 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 946 | 959 | |
| 947 | 960 | PORT_START_TAG("DSW0") |
| 948 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 961 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 949 | 962 | PORT_DIPSETTING( 0x00, "3" ) |
| 950 | 963 | PORT_DIPSETTING( 0x01, "4" ) |
| 951 | 964 | PORT_DIPSETTING( 0x02, "5" ) |
| 952 | 965 | PORT_DIPSETTING( 0x03, "6" ) |
| 953 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 954 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) | |
| 955 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 956 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 957 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 958 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) | |
| 959 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 960 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 966 | /* SW1:3-8 Unused according to manual: "Factory Adjustments". Default is ON. */ | |
| 967 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) PORT_DIPLOCATION("SW1:3") | |
| 968 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW1:4" ) | |
| 969 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") | |
| 970 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW1:8" ) | |
| 961 | 971 | |
| 962 | 972 | /* Dummy controls port, P1 */ |
| 963 | 973 | PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG) |
| r1679 | r1680 | |
| 1086 | 1096 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1087 | 1097 | |
| 1088 | 1098 | PORT_START_TAG("IN1") |
| 1089 | PORT_BIT( 0x01, IP_ACTIVE_ | |
| 1099 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, | |
| 1090 | 1100 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1091 | 1101 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1092 | 1102 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1093 | 1103 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1094 | 1104 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1095 | 1105 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1096 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_ | |
| 1106 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_C | |
| 1097 | 1107 | |
| 1098 | 1108 | PORT_START_TAG("DSW0") |
| 1099 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 1109 | /* SW1:5-8 Unused according to manual. */ | |
| 1110 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:3,4") /* Default is OFF, OFF (6) */ | |
| 1100 | 1111 | PORT_DIPSETTING( 0x00, "3" ) |
| 1101 | 1112 | PORT_DIPSETTING( 0x01, "4" ) |
| 1102 | 1113 | PORT_DIPSETTING( 0x02, "5" ) |
| 1103 | 1114 | PORT_DIPSETTING( 0x03, "6" ) |
| 1104 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 1105 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 1115 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:8" ) /* Default OFF */ | |
| 1116 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2") /* Default is ON (2500) */ | |
| 1106 | 1117 | PORT_DIPSETTING( 0x08, "1500" ) |
| 1107 | 1118 | PORT_DIPSETTING( 0x00, "2500" ) |
| 1108 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) | |
| 1109 | PORT_DIPNAME( 0x80, 0x00, "Laser Bonus Info" ) | |
| 1110 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 1111 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1119 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, 0) PORT_DIPLOCATION("SW1:5,6,7") /* Default ON */ | |
| 1120 | PORT_DIPNAME( 0x80, 0x00, "Laser Bonus Info" ) PORT_DIPLOCATION("SW1:1") /* Default is OFF (Info on) */ | |
| 1121 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 1122 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 1112 | 1123 | |
| 1113 | 1124 | /* Dummy controls port, P1 */ |
| 1114 | 1125 | PORT_START_TAG(INVADERS_P1_CONTROL_PORT_TAG) |
| r1679 | r1680 | |
| 1149 | 1160 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1150 | 1161 | |
| 1151 | 1162 | PORT_START_TAG("IN1") |
| 1152 | PORT_BIT( 0x01, IP_ACTIVE_ | |
| 1163 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, | |
| 1153 | 1164 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1154 | 1165 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1155 | 1166 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1156 | 1167 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 1157 | 1168 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1158 | 1169 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1159 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_ | |
| 1170 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_C | |
| 1160 | 1171 | |
| 1161 | 1172 | PORT_START_TAG("DSW0") |
| 1162 | 1173 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | extern UINT8 *quasar_effectram; |
| 74 | extern | |
| 74 | extern UINT8 quasar_effectcontrol; | |
| 75 | 75 | |
| 76 | static int page = 0; | |
| 77 | static int IOpage = 8; | |
| 76 | static UINT8 page = 0; | |
| 77 | static UINT8 IOpage = 8; | |
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | /************************************************************************ |
| r1679 | r1680 | |
| 87 | 87 | |
| 88 | 88 | ************************************************************************/ |
| 89 | 89 | |
| 90 | static WRITE8_HANDLER( page_ | |
| 90 | static WRITE8_HANDLER( video_page_select_w ) | |
| 91 | 91 | { |
| 92 | page = 0; | |
| 92 | page = offset & 0x03; | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | static WRITE8_HANDLER( page_ | |
| 95 | static WRITE8_HANDLER( io_page_select_w ) | |
| 96 | 96 | { |
| 97 | page = | |
| 97 | IOpage = offset & 0x03; | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | static WRITE8_HANDLER( page_2_w ) | |
| 101 | { | |
| 102 | page = 2; | |
| 103 | } | |
| 104 | ||
| 105 | static WRITE8_HANDLER( page_3_w ) | |
| 106 | { | |
| 107 | page = 3; | |
| 108 | } | |
| 109 | ||
| 110 | static WRITE8_HANDLER( page_8_w ) | |
| 111 | { | |
| 112 | IOpage = 8; | |
| 113 | } | |
| 114 | ||
| 115 | static WRITE8_HANDLER( page_9_w ) | |
| 116 | { | |
| 117 | IOpage = 9; | |
| 118 | } | |
| 119 | ||
| 120 | static WRITE8_HANDLER( page_A_w ) | |
| 121 | { | |
| 122 | IOpage = 10; | |
| 123 | } | |
| 124 | ||
| 125 | static WRITE8_HANDLER( page_B_w ) | |
| 126 | { | |
| 127 | IOpage = 11; | |
| 128 | } | |
| 129 | ||
| 130 | 100 | static WRITE8_HANDLER( quasar_video_w ) |
| 131 | 101 | { |
| 132 | 102 | switch (page) |
| r1679 | r1680 | |
| 140 | 110 | |
| 141 | 111 | static READ8_HANDLER( quasar_IO_r ) |
| 142 | 112 | { |
| 143 | UINT | |
| 113 | UINT8 | |
| 144 | 114 | |
| 145 | if (IOpage == 8) ans = input_port_0_r(0); | |
| 146 | if (IOpage == 9) ans = input_port_1_r(0); | |
| 147 | if (IOpage == 10) ans = input_port_2_r(0); | |
| 148 | if (IOpage == 11) ans = input_port_3_r(0); | |
| 115 | if (IOpage == 0) ans = input_port_0_r(0); | |
| 116 | if (IOpage == 1) ans = input_port_1_r(0); | |
| 117 | if (IOpage == 2) ans = input_port_2_r(0); | |
| 118 | if (IOpage == 3) ans = input_port_3_r(0); | |
| 149 | 119 | |
| 150 | 120 | return ans; |
| 151 | 121 | } |
| r1679 | r1680 | |
| 198 | 168 | static ADDRESS_MAP_START( quasar, ADDRESS_SPACE_PROGRAM, 8 ) |
| 199 | 169 | AM_RANGE(0x0000, 0x13ff) AM_ROM |
| 200 | 170 | AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_bullet_ram_or_palette_r, quasar_bullet_w) AM_BASE(&cvs_bullet_ram) |
| 201 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&s2636_1_ram) | |
| 202 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&s2636_2_ram) | |
| 203 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_3_or_character_ram_r, cvs_s2636_3_or_character_ram_w) AM_BASE(&s2636_3_ram) | |
| 171 | AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_0_or_character_ram_r, cvs_s2636_0_or_character_ram_w) AM_BASE(&cvs_s2636_0_ram) | |
| 172 | AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_1_or_character_ram_r, cvs_s2636_1_or_character_ram_w) AM_BASE(&cvs_s2636_1_ram) | |
| 173 | AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_READWRITE(cvs_s2636_2_or_character_ram_r, cvs_s2636_2_or_character_ram_w) AM_BASE(&cvs_s2636_2_ram) | |
| 204 | 174 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x6000) AM_READWRITE(cvs_video_or_color_ram_r, quasar_video_w) AM_BASE(&cvs_video_ram) |
| 205 | 175 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM |
| 206 | 176 | AM_RANGE(0x2000, 0x33ff) AM_ROM |
| r1679 | r1680 | |
| 209 | 179 | ADDRESS_MAP_END |
| 210 | 180 | |
| 211 | 181 | static ADDRESS_MAP_START( quasar_io, ADDRESS_SPACE_IO, 8 ) |
| 212 | AM_RANGE(0x00, 0x00) AM_READWRITE(quasar_IO_r, page_0_w) | |
| 213 | AM_RANGE(0x01, 0x01) AM_WRITE(page_1_w) | |
| 214 | AM_RANGE(0x02, 0x02) AM_WRITE(page_2_w) | |
| 215 | AM_RANGE(0x03, 0x03) AM_WRITE(page_3_w) | |
| 216 | AM_RANGE(0x08, 0x08) AM_WRITE(page_8_w) | |
| 217 | AM_RANGE(0x09, 0x09) AM_WRITE(page_9_w) | |
| 218 | AM_RANGE(0x0A, 0x0A) AM_WRITE(page_A_w) | |
| 219 | AM_RANGE(0x0B, 0x0B) AM_WRITE(page_B_w) | |
| 182 | AM_RANGE(0x00, 0x03) AM_READWRITE(quasar_IO_r, video_page_select_w) | |
| 183 | AM_RANGE(0x08, 0x0b) AM_WRITE(io_page_select_w) | |
| 220 | 184 | AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(cvs_collision_clear, quasar_sh_command_w) |
| 221 | 185 | AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_READWRITE(cvs_collision_r, MWA8_NOP) |
| 222 | 186 | AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) |
| r1679 | r1680 | |
| 364 | 328 | /* S2636 Mappings */ |
| 365 | 329 | |
| 366 | 330 | static GFXDECODE_START( quasar ) |
| 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 256 ) /* Rom chars */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #1 */ | |
| 369 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #2 */ | |
| 370 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, s2636_gfx_layout, 2072, 8 ) /* s2636 #3 */ | |
| 331 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 64+1 ) /* ROM chars */ | |
| 371 | 332 | GFXDECODE_END |
| 372 | 333 | |
| 373 | 334 | static INTERRUPT_GEN( quasar_interrupt ) |
| r1679 | r1680 | |
| 404 | 365 | MDRV_SCREEN_VISIBLE_AREA(1*8+1, 29*8-1, 2*8, 32*8-1) |
| 405 | 366 | |
| 406 | 367 | MDRV_GFXDECODE(quasar) |
| 407 | MDRV_PALETTE_LENGTH(1024) | |
| 408 | MDRV_COLORTABLE_LENGTH(4096) | |
| 368 | MDRV_PALETTE_LENGTH((64+1)*8+(4*256)) | |
| 409 | 369 | |
| 410 | 370 | MDRV_PALETTE_INIT(quasar) |
| 411 | 371 | MDRV_VIDEO_START(quasar) |
| r1679 | r1680 | |
|---|---|---|
| 1020 | 1020 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 1021 | 1021 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1022 | 1022 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1023 | PORT_BIT( 0x80, 0x00, IPT_DIPSWITCH_NAME ) PORT_NAME("Service Mode (Left Side) PORT_TOGGLE | |
| 1023 | PORT_BIT( 0x80, 0x00, IPT_DIPSWITCH_NAME ) PORT_NAME("Service Mode (Left Side)") PORT_TOGGLE | |
| 1024 | 1024 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1025 | 1025 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1026 | 1026 | |
| r1679 | r1680 | |
| 1047 | 1047 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 1048 | 1048 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1049 | 1049 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1050 | PORT_BIT( 0x80, 0x00, IPT_DIPSWITCH_NAME ) PORT_NAME("Service Mode (Right Side) PORT_TOGGLE | |
| 1050 | PORT_BIT( 0x80, 0x00, IPT_DIPSWITCH_NAME ) PORT_NAME("Service Mode (Right Side)") PORT_TOGGLE | |
| 1051 | 1051 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1052 | 1052 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 1053 | 1053 | INPUT_PORTS_END |
| r1679 | r1680 | |
|---|---|---|
| 174 | 174 | AM_RANGE(0xe0, 0xe0) AM_WRITE(xyonix_io_w) |
| 175 | 175 | AM_RANGE(0x40, 0x40) AM_WRITE(MWA8_NOP) // NMI ack? |
| 176 | 176 | AM_RANGE(0x50, 0x50) AM_WRITE(xyonix_irqack_w) |
| 177 | AM_RANGE(0x60, 0x61) AM_WRITE(MWA8_NOP) // | |
| 177 | AM_RANGE(0x60, 0x61) AM_WRITE(MWA8_NOP) // m | |
| 178 | 178 | ADDRESS_MAP_END |
| 179 | 179 | |
| 180 | 180 | /* Inputs Ports **************************************************************/ |
| r1679 | r1680 | |
|---|---|---|
| 85 | 85 | deco16_raster_display_list[deco16_raster_display_position++]=deco16_pf34_control[4]&0xffff; |
| 86 | 86 | |
| 87 | 87 | cpunum_set_input_line(machine, 0, (cninja_irq_mask&0x10) ? 3 : 4, ASSERT_LINE); |
| 88 | timer_adjust(raster_irq_timer,attotime_never,0 | |
| 88 | timer_adjust_oneshot(raster_irq_timer,attotime_never,0 | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | static READ16_HANDLER( cninja_irq_r ) |
| r1679 | r1680 | |
| 121 | 121 | case 1: /* Raster IRQ scanline position, only valid for values between 1 & 239 (0 and 240-256 do NOT generate IRQ's) */ |
| 122 | 122 | cninja_scanline=data&0xff; |
| 123 | 123 | if ((cninja_irq_mask&0x2)==0 && cninja_scanline>0 && cninja_scanline<240) |
| 124 | timer_adjust(raster_irq_timer, video_screen_get_time_until_pos(0, cninja_scanline, 0), cninja_scanline | |
| 124 | timer_adjust_oneshot(raster_irq_timer, video_screen_get_time_until_pos(0, cninja_scanline, 0), cninja_scanline | |
| 125 | 125 | else |
| 126 | timer_adjust(raster_irq_timer,attotime_never,0 | |
| 126 | timer_adjust_oneshot(raster_irq_timer,attotime_never,0 | |
| 127 | 127 | return; |
| 128 | 128 | |
| 129 | 129 | case 2: /* VBL irq ack */ |
| r1679 | r1680 | |
|---|---|---|
| 125 | 125 | |
| 126 | 126 | #include "driver.h" |
| 127 | 127 | #include "deprecat.h" |
| 128 | #include "video/crtc6845.h" | |
| 129 | 128 | #include "cpu/tms32010/tms32010.h" |
| 130 | 129 | #include "twincobr.h" |
| 131 | 130 | #include "sound/3812intf.h" |
| r1679 | r1680 | |
|---|---|---|
| 306 | 306 | curv = ((curv + 32) & 0xff) & ~0x10; |
| 307 | 307 | |
| 308 | 308 | /* next one at the start of this scanline */ |
| 309 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, v_to_scanline(curv), 0), curv | |
| 309 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, v_to_scanline(curv), 0), curv | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
| r1679 | r1680 | |
| 352 | 352 | |
| 353 | 353 | /* scanline for the next run */ |
| 354 | 354 | curv ^= 224; |
| 355 | timer_adjust(cpu_timer, video_screen_get_time_until_pos(0, v_to_scanline(curv), 0), curv | |
| 355 | timer_adjust_oneshot(cpu_timer, video_screen_get_time_until_pos(0, v_to_scanline(curv), 0), curv | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | |
| r1679 | r1680 | |
| 393 | 393 | |
| 394 | 394 | /* create a timer to speed/slow the CPU */ |
| 395 | 395 | cpu_timer = timer_alloc(adjust_cpu_speed, NULL); |
| 396 | timer_adjust(cpu_timer, video_screen_get_time_until_pos(0, v_to_scanline(0), 0), 0 | |
| 396 | timer_adjust_oneshot(cpu_timer, video_screen_get_time_until_pos(0, v_to_scanline(0), 0), 0 | |
| 397 | 397 | |
| 398 | 398 | /* create a timer for IRQs and set up the first callback */ |
| 399 | 399 | irq_timer = timer_alloc(clock_irq, NULL); |
| r1679 | r1680 | |
|---|---|---|
| 579 | 579 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 580 | 580 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 581 | 581 | MDRV_GFXDECODE(galivan) |
| 582 | MDRV_PALETTE_LENGTH(256) | |
| 583 | MDRV_COLORTABLE_LENGTH(8*16+16*16+256*16) | |
| 582 | MDRV_PALETTE_LENGTH(8*16+16*16+256*16) | |
| 584 | 583 | |
| 585 | 584 | MDRV_PALETTE_INIT(galivan) |
| 586 | 585 | MDRV_VIDEO_START(galivan) |
| r1679 | r1680 | |
| 624 | 623 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 625 | 624 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 626 | 625 | MDRV_GFXDECODE(ninjemak) |
| 627 | MDRV_PALETTE_LENGTH(256) | |
| 628 | MDRV_COLORTABLE_LENGTH(8*16+16*16+256*16) | |
| 626 | MDRV_PALETTE_LENGTH(8*16+16*16+256*16) | |
| 629 | 627 | |
| 630 | 628 | MDRV_PALETTE_INIT(galivan) |
| 631 | 629 | MDRV_VIDEO_START(ninjemak) |
| r1679 | r1680 | |
| 678 | 676 | ROM_LOAD( "gv6.19d", 0x0000, 0x4000, CRC(da38168b) SHA1(a12decd55fd1cf32fd192f13bd33d2f1f4129d2c) ) |
| 679 | 677 | ROM_LOAD( "gv5.17d", 0x4000, 0x4000, CRC(22492d2a) SHA1(c8d36949abc2fcc8f2b12276eb82b330a940bc38) ) |
| 680 | 678 | |
| 681 | ROM_REGION( 0x0 | |
| 679 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) | |
| 682 | 680 | ROM_LOAD( "mb7114e.9f", 0x0000, 0x0100, CRC(de782b3e) SHA1(c76da7d5cbd9170be93c9591e525646a4360203c) ) /* red */ |
| 683 | 681 | ROM_LOAD( "mb7114e.10f", 0x0100, 0x0100, CRC(0ae2a857) SHA1(cdf84c0c75d483a81013dbc050e7aa8c8503c74c) ) /* green */ |
| 684 | 682 | ROM_LOAD( "mb7114e.11f", 0x0200, 0x0100, CRC(7ba8b9d1) SHA1(5942b403eda046e2f2584062443472cbf559db5c) ) /* blue */ |
| 685 | 683 | ROM_LOAD( "mb7114e.2d", 0x0300, 0x0100, CRC(75466109) SHA1(6196d12ab7103f6ef991b826d8b93303a61d4c48) ) /* sprite lookup table */ |
| 686 | ROM_LOAD( "mb7114e.7f", 0x0400, 0x0100, CRC(06538736) SHA1(a2fb2ecb768686839f3087e691102e2dc2eb65b5) ) /* sprite palette bank */ | |
| 684 | ||
| 685 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 686 | ROM_LOAD( "mb7114e.7f", 0x0000, 0x0100, CRC(06538736) SHA1(a2fb2ecb768686839f3087e691102e2dc2eb65b5) ) /* sprite palette bank */ | |
| 687 | 687 | ROM_END |
| 688 | 688 | |
| 689 | 689 | ROM_START( galivan2 ) |
| r1679 | r1680 | |
| 713 | 713 | ROM_LOAD( "gv6.19d", 0x0000, 0x4000, CRC(da38168b) SHA1(a12decd55fd1cf32fd192f13bd33d2f1f4129d2c) ) |
| 714 | 714 | ROM_LOAD( "gv5.17d", 0x4000, 0x4000, CRC(22492d2a) SHA1(c8d36949abc2fcc8f2b12276eb82b330a940bc38) ) |
| 715 | 715 | |
| 716 | ROM_REGION( 0x0 | |
| 716 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) | |
| 717 | 717 | ROM_LOAD( "mb7114e.9f", 0x0000, 0x0100, CRC(de782b3e) SHA1(c76da7d5cbd9170be93c9591e525646a4360203c) ) /* red */ |
| 718 | 718 | ROM_LOAD( "mb7114e.10f", 0x0100, 0x0100, CRC(0ae2a857) SHA1(cdf84c0c75d483a81013dbc050e7aa8c8503c74c) ) /* green */ |
| 719 | 719 | ROM_LOAD( "mb7114e.11f", 0x0200, 0x0100, CRC(7ba8b9d1) SHA1(5942b403eda046e2f2584062443472cbf559db5c) ) /* blue */ |
| 720 | 720 | ROM_LOAD( "mb7114e.2d", 0x0300, 0x0100, CRC(75466109) SHA1(6196d12ab7103f6ef991b826d8b93303a61d4c48) ) /* sprite lookup table */ |
| 721 | ROM_LOAD( "mb7114e.7f", 0x0400, 0x0100, CRC(06538736) SHA1(a2fb2ecb768686839f3087e691102e2dc2eb65b5) ) /* sprite palette bank */ | |
| 721 | ||
| 722 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 723 | ROM_LOAD( "mb7114e.7f", 0x0000, 0x0100, CRC(06538736) SHA1(a2fb2ecb768686839f3087e691102e2dc2eb65b5) ) /* sprite palette bank */ | |
| 722 | 724 | ROM_END |
| 723 | 725 | |
| 724 | 726 | ROM_START( dangar ) |
| r1679 | r1680 | |
| 748 | 750 | ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, CRC(6dba32cf) SHA1(e6433f291364202c1291b137d6ee1840ecf7d72d) ) |
| 749 | 751 | ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, CRC(6c899071) SHA1(9a776aae897d57e66ebdbcf79f3c673da8b78b05) ) |
| 750 | 752 | |
| 751 | ROM_REGION( 0x0 | |
| 753 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) | |
| 752 | 754 | ROM_LOAD( "82s129.9f", 0x0000, 0x0100, CRC(b29f6a07) SHA1(17c82f439f314c212470bafd917b3f7e12462d16) ) /* red */ |
| 753 | 755 | ROM_LOAD( "82s129.10f", 0x0100, 0x0100, CRC(c6de5ecb) SHA1(d5b6cb784b5df16332c5e2b19b763c8858a0b6a7) ) /* green */ |
| 754 | 756 | ROM_LOAD( "82s129.11f", 0x0200, 0x0100, CRC(a5bbd6dc) SHA1(5587844900a24d833500d204f049c05493c4a25a) ) /* blue */ |
| 755 | 757 | ROM_LOAD( "82s129.2d", 0x0300, 0x0100, CRC(a4ac95a5) SHA1(3b31cd3fd6caedd89d1bedc606a978081fc5431f) ) /* sprite lookup table */ |
| 756 | ROM_LOAD( "82s129.7f", 0x0400, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 758 | ||
| 759 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 760 | ROM_LOAD( "82s129.7f", 0x0000, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 757 | 761 | ROM_END |
| 758 | 762 | |
| 759 | 763 | ROM_START( dangar2 ) |
| r1679 | r1680 | |
| 783 | 787 | ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, CRC(6dba32cf) SHA1(e6433f291364202c1291b137d6ee1840ecf7d72d) ) |
| 784 | 788 | ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, CRC(6c899071) SHA1(9a776aae897d57e66ebdbcf79f3c673da8b78b05) ) |
| 785 | 789 | |
| 786 | ROM_REGION( 0x0 | |
| 790 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) | |
| 787 | 791 | ROM_LOAD( "82s129.9f", 0x0000, 0x0100, CRC(b29f6a07) SHA1(17c82f439f314c212470bafd917b3f7e12462d16) ) /* red */ |
| 788 | 792 | ROM_LOAD( "82s129.10f", 0x0100, 0x0100, CRC(c6de5ecb) SHA1(d5b6cb784b5df16332c5e2b19b763c8858a0b6a7) ) /* green */ |
| 789 | 793 | ROM_LOAD( "82s129.11f", 0x0200, 0x0100, CRC(a5bbd6dc) SHA1(5587844900a24d833500d204f049c05493c4a25a) ) /* blue */ |
| 790 | 794 | ROM_LOAD( "82s129.2d", 0x0300, 0x0100, CRC(a4ac95a5) SHA1(3b31cd3fd6caedd89d1bedc606a978081fc5431f) ) /* sprite lookup table */ |
| 791 | ROM_LOAD( "82s129.7f", 0x0400, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 795 | ||
| 796 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 797 | ROM_LOAD( "82s129.7f", 0x0000, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 792 | 798 | ROM_END |
| 793 | 799 | |
| 794 | 800 | ROM_START( dangarb ) |
| r1679 | r1680 | |
| 818 | 824 | ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, CRC(6dba32cf) SHA1(e6433f291364202c1291b137d6ee1840ecf7d72d) ) |
| 819 | 825 | ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, CRC(6c899071) SHA1(9a776aae897d57e66ebdbcf79f3c673da8b78b05) ) |
| 820 | 826 | |
| 821 | ROM_REGION( 0x0 | |
| 827 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) | |
| 822 | 828 | ROM_LOAD( "82s129.9f", 0x0000, 0x0100, CRC(b29f6a07) SHA1(17c82f439f314c212470bafd917b3f7e12462d16) ) /* red */ |
| 823 | 829 | ROM_LOAD( "82s129.10f", 0x0100, 0x0100, CRC(c6de5ecb) SHA1(d5b6cb784b5df16332c5e2b19b763c8858a0b6a7) ) /* green */ |
| 824 | 830 | ROM_LOAD( "82s129.11f", 0x0200, 0x0100, CRC(a5bbd6dc) SHA1(5587844900a24d833500d204f049c05493c4a25a) ) /* blue */ |
| 825 | 831 | ROM_LOAD( "82s129.2d", 0x0300, 0x0100, CRC(a4ac95a5) SHA1(3b31cd3fd6caedd89d1bedc606a978081fc5431f) ) /* sprite lookup table */ |
| 826 | ROM_LOAD( "82s129.7f", 0x0400, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 832 | ||
| 833 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 834 | ROM_LOAD( "82s129.7f", 0x0000, 0x0100, CRC(29bc6216) SHA1(1d7864ad06ad0cd5e3d1905fc6066bee1cd90995) ) /* sprite palette bank */ | |
| 827 | 835 | ROM_END |
| 828 | 836 | |
| 829 | 837 | ROM_START( ninjemak ) |
| r1679 | r1680 | |
| 858 | 866 | ROM_REGION( 0x4000, REGION_GFX5, 0 ) /* data for mcu/blitter? */ |
| 859 | 867 | ROM_LOAD( "ninjemak.5", 0x0000, 0x4000, CRC(5f91dd30) SHA1(3513c0a2e4ca83f602cacad6af9c07fe9e4b16a1) ) /* text layer data */ |
| 860 | 868 | |
| 861 | ROM_REGION( 0x0 | |
| 869 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* Region 3 - color data */ | |
| 862 | 870 | ROM_LOAD( "ninjemak.pr1", 0x0000, 0x0100, CRC(8a62d4e4) SHA1(99ca4da01ea1b5585f6e3ebf162c3f988ab317e5) ) /* red */ |
| 863 | 871 | ROM_LOAD( "ninjemak.pr2", 0x0100, 0x0100, CRC(2ccf976f) SHA1(b804ee761793697087fbe3372352f301a22feeab) ) /* green */ |
| 864 | 872 | ROM_LOAD( "ninjemak.pr3", 0x0200, 0x0100, CRC(16b2a7a4) SHA1(53c410b439c8a835447f15f2ab250b363b3f7888) ) /* blue */ |
| 865 | 873 | ROM_LOAD( "yncp-2d.bin", 0x0300, 0x0100, BAD_DUMP CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ |
| 866 | ROM_LOAD( "yncp-7f.bin", 0x0400, 0x0100, BAD_DUMP CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 874 | ||
| 875 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 876 | ROM_LOAD( "yncp-7f.bin", 0x0000, 0x0100, BAD_DUMP CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 867 | 877 | ROM_END |
| 868 | 878 | |
| 869 | 879 | ROM_START( youma ) |
| r1679 | r1680 | |
| 898 | 908 | ROM_REGION( 0x4000, REGION_GFX5, 0 ) /* data for mcu/blitter? */ |
| 899 | 909 | ROM_LOAD( "ync-5.bin", 0x0000, 0x4000, CRC(993e4ab2) SHA1(aceafc83b36db4db923d27f77ad045e626678bae) ) /* text layer data */ |
| 900 | 910 | |
| 901 | ROM_REGION( 0x0 | |
| 911 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* Region 3 - color data */ | |
| 902 | 912 | ROM_LOAD( "yncp-6e.bin", 0x0000, 0x0100, CRC(ea47b91a) SHA1(9921aa1ef882fb664d85d3e065223610262ca112) ) /* red */ |
| 903 | 913 | ROM_LOAD( "yncp-7e.bin", 0x0100, 0x0100, CRC(e94c0fed) SHA1(68581c91e9aa485f78af6b6a5c98612372cd5b17) ) /* green */ |
| 904 | 914 | ROM_LOAD( "yncp-8e.bin", 0x0200, 0x0100, CRC(ffb4b287) SHA1(c3c7018e6d5e18cc2db135812d0dc3824710ab4c) ) /* blue */ |
| 905 | 915 | ROM_LOAD( "yncp-2d.bin", 0x0300, 0x0100, CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ |
| 906 | ROM_LOAD( "yncp-7f.bin", 0x0400, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 916 | ||
| 917 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 918 | ROM_LOAD( "yncp-7f.bin", 0x0000, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 907 | 919 | ROM_END |
| 908 | 920 | |
| 909 | 921 | ROM_START( youmab ) |
| r1679 | r1680 | |
| 911 | 923 | ROM_LOAD( "electric1.3u", 0x00000, 0x8000, CRC(cc4fdb92) SHA1(9ce963db23f91f91e775a0b9a819f00db869120f) ) |
| 912 | 924 | ROM_LOAD( "electric3.3r", 0x10000, 0x8000, CRC(c1bc7387) SHA1(ad05bff02ece515465a9506e09c252c446c8f81d) ) |
| 913 | 925 | |
| 914 | ROM_REGION( 0x10000, REGION_USER | |
| 926 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* main cpu code */ | |
| 915 | 927 | /* This rom is double the size of the original one, appears to have extra (banked) code for 0x8000 */ |
| 916 | 928 | ROM_LOAD( "electric2.3t", 0x00000, 0x8000, CRC(99aee3bc) SHA1(5ffd60b959dda3fd41609c89a3486a989b1e2530) ) |
| 917 | 929 | |
| r1679 | r1680 | |
| 939 | 951 | ROM_LOAD( "electric7.3a", 0x0000, 0x4000, CRC(80c20d36) SHA1(f20724754824030d62059388f3ea2224f5b7a60e) ) |
| 940 | 952 | ROM_LOAD( "electric6.3b", 0x4000, 0x4000, CRC(1da7a651) SHA1(5307452058164a0bc39d144dd204627a9ead7543) ) |
| 941 | 953 | |
| 942 | ROM_REGION( 0x0 | |
| 954 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* Region 3 - color data */ | |
| 943 | 955 | ROM_LOAD( "prom82s129.2n", 0x0000, 0x0100, CRC(ea47b91a) SHA1(9921aa1ef882fb664d85d3e065223610262ca112) ) /* red */ |
| 944 | 956 | ROM_LOAD( "prom82s129.2m", 0x0100, 0x0100, CRC(e94c0fed) SHA1(68581c91e9aa485f78af6b6a5c98612372cd5b17) ) /* green */ |
| 945 | 957 | ROM_LOAD( "prom82s129.2l", 0x0200, 0x0100, CRC(ffb4b287) SHA1(c3c7018e6d5e18cc2db135812d0dc3824710ab4c) ) /* blue */ |
| 946 | 958 | ROM_LOAD( "prom82s129.3s", 0x0300, 0x0100, CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ |
| 947 | ROM_LOAD( "prom82s129.1l", 0x0400, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 959 | ||
| 960 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 961 | ROM_LOAD( "prom82s129.1l", 0x0000, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 948 | 962 | ROM_END |
| 949 | 963 | |
| 950 | 964 | |
| r1679 | r1680 | |
| 953 | 967 | ROM_LOAD( "1.1d", 0x00000, 0x8000, CRC(692ae497) SHA1(572e5a1eae9b0bb48f65dce5de2df5c5ae95a3bd) ) |
| 954 | 968 | ROM_LOAD( "3.4d", 0x10000, 0x8000, CRC(ebf61afc) SHA1(30235a90e8316f5033d44d31f02cca97c64f2d5e) ) |
| 955 | 969 | |
| 956 | ROM_REGION( 0x10000, REGION_USER | |
| 970 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* main cpu code */ | |
| 957 | 971 | /* This rom is double the size of the original one, appears to have extra (banked) code for 0x8000 */ |
| 958 | 972 | ROM_LOAD( "2.2d", 0x00000, 0x8000, CRC(99aee3bc) SHA1(5ffd60b959dda3fd41609c89a3486a989b1e2530) ) // same as first bootleg |
| 959 | 973 | |
| r1679 | r1680 | |
| 980 | 994 | ROM_LOAD( "6.18d", 0x0000, 0x4000, CRC(80c20d36) SHA1(f20724754824030d62059388f3ea2224f5b7a60e) ) |
| 981 | 995 | ROM_LOAD( "5.17d", 0x4000, 0x4000, CRC(1da7a651) SHA1(5307452058164a0bc39d144dd204627a9ead7543) ) |
| 982 | 996 | |
| 983 | ROM_REGION( 0x0 | |
| 997 | ROM_REGION( 0x0400, REGION_PROMS, 0 ) /* Region 3 - color data */ | |
| 984 | 998 | ROM_LOAD( "pr.6e", 0x0000, 0x0100, CRC(ea47b91a) SHA1(9921aa1ef882fb664d85d3e065223610262ca112) ) /* red */ |
| 985 | 999 | ROM_LOAD( "pr.7e", 0x0100, 0x0100, CRC(6d66da81) SHA1(ffdd1778ce5b7614b90b5da85589c5871405d3fe) ) /* green */ // different (bad?) |
| 986 | 1000 | ROM_LOAD( "pr.8e", 0x0200, 0x0100, CRC(ffb4b287) SHA1(c3c7018e6d5e18cc2db135812d0dc3824710ab4c) ) /* blue */ |
| 987 | 1001 | ROM_LOAD( "pr.2e", 0x0300, 0x0100, CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ |
| 988 | ROM_LOAD( "pr.7h", 0x0400, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 1002 | ||
| 1003 | ROM_REGION( 0x0100, REGION_USER1, 0 ) | |
| 1004 | ROM_LOAD( "pr.7h", 0x0000, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ | |
| 989 | 1005 | ROM_END |
| 990 | 1006 | |
| 991 | 1007 | |
| r1679 | r1680 | |
| 993 | 1009 | { |
| 994 | 1010 | if (data==0xff) |
| 995 | 1011 | { |
| 996 | memory_set_bankptr( 2, memory_region(REGION_USER | |
| 1012 | memory_set_bankptr( 2, memory_region(REGION_USER2)+0x4000 ); | |
| 997 | 1013 | } |
| 998 | 1014 | else if (data==0x00) |
| 999 | 1015 | { |
| 1000 | memory_set_bankptr( 2, memory_region(REGION_USER | |
| 1016 | memory_set_bankptr( 2, memory_region(REGION_USER2) ); | |
| 1001 | 1017 | } |
| 1002 | 1018 | else |
| 1003 | 1019 | { |
| r1679 | r1680 | |
| 1024 | 1040 | { |
| 1025 | 1041 | memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x82, 0x82, 0, 0, youmab_extra_bank_w); // banks rom at 0x8000? writes 0xff and 0x00 before executing code there |
| 1026 | 1042 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, MRA8_BANK2); |
| 1027 | memory_set_bankptr( 2, memory_region(REGION_USER | |
| 1043 | memory_set_bankptr( 2, memory_region(REGION_USER2) ); | |
| 1028 | 1044 | |
| 1029 | 1045 | memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x81, 0x81, 0, 0, youmab_81_w); // ?? often, alternating values |
| 1030 | 1046 | memory_install_write8_handler(0, ADDRESS_SPACE_IO, 0x84, 0x84, 0, 0, youmab_84_w); // ?? often, sequence.. |
| r1679 | r1680 | |
|---|---|---|
| 132 | 132 | |
| 133 | 133 | static VIDEO_START(igs_majhong) |
| 134 | 134 | { |
| 135 | igs_tx_tilemap= tilemap_create(get_tx_tilemap_tile_info,tilemap_scan_rows, | |
| 135 | igs_tx_tilemap= tilemap_create(get_tx_tilemap_tile_info,tilemap_scan_rows, | |
| 136 | 136 | tilemap_set_transparent_pen(igs_tx_tilemap,15); |
| 137 | igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows,0, 8, 8,64,32); | |
| 138 | //igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 137 | igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 138 | //igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 139 | 139 | //tilemap_set_transparent_pen(igs_bg_tilemap,15); |
| 140 | 140 | logerror("Video START OK!\n"); |
| 141 | 141 | } |
| r1679 | r1680 | |
|---|---|---|
| 194 | 194 | |
| 195 | 195 | static VIDEO_START( ettrivia ) |
| 196 | 196 | { |
| 197 | bg_tilemap = tilemap_create( get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32 ); | |
| 198 | fg_tilemap = tilemap_create( get_tile_info_fg,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,32 ); | |
| 197 | bg_tilemap = tilemap_create( get_tile_info_bg,tilemap_scan_rows,8,8,64,32 ); | |
| 198 | fg_tilemap = tilemap_create( get_tile_info_fg,tilemap_scan_rows,8,8,64,32 ); | |
| 199 | 199 | |
| 200 | 200 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 201 | 201 | } |
| r1679 | r1680 | |
| 244 | 244 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) |
| 245 | 245 | MDRV_GFXDECODE(ettrivia) |
| 246 | 246 | MDRV_PALETTE_LENGTH(256) |
| 247 | MDRV_COLORTABLE_LENGTH(32*4+32*4) | |
| 248 | 247 | |
| 249 | 248 | MDRV_PALETTE_INIT(naughtyb) |
| 250 | 249 | MDRV_VIDEO_START(ettrivia) |
| r1679 | r1680 | |
|---|---|---|
| 180 | 180 | |
| 181 | 181 | static VIDEO_START( jalmah ) |
| 182 | 182 | { |
| 183 | sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 184 | sc1_tilemap = tilemap_create(get_sc1_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 185 | sc2_tilemap = tilemap_create(get_sc2_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,32); | |
| 186 | sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,256,32); | |
| 183 | sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,16,16,256,32); | |
| 184 | sc1_tilemap = tilemap_create(get_sc1_tile_info,bg_scan,16,16,256,32); | |
| 185 | sc2_tilemap = tilemap_create(get_sc2_tile_info,bg_scan,16,16,256,32); | |
| 186 | sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,8,8,256,32); | |
| 187 | 187 | |
| 188 | 188 | jm_scrollram = auto_malloc(0x80); |
| 189 | 189 | jm_vregs = auto_malloc(0x40); |
| r1679 | r1680 | |
|---|---|---|
| 251 | 251 | |
| 252 | 252 | static VIDEO_START( supdrapo ) |
| 253 | 253 | { |
| 254 | fg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 254 | fg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | static VIDEO_UPDATE( supdrapo ) |
| r1679 | r1680 | |
|---|---|---|
| 208 | 208 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 209 | 209 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 210 | 210 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 211 | PORT_ | |
| 211 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 212 | 212 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 213 | 213 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 214 | 214 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 317 | 317 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 318 | 318 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 319 | 319 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 320 | PORT_ | |
| 320 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 321 | 321 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 322 | 322 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 323 | 323 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 410 | 410 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 411 | 411 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 412 | 412 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 413 | PORT_ | |
| 413 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 414 | 414 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 415 | 415 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 416 | 416 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 503 | 503 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 504 | 504 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 505 | 505 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 506 | PORT_ | |
| 506 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 507 | 507 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 508 | 508 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 509 | 509 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
| 589 | 589 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 590 | 590 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 591 | 591 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 592 | PORT_ | |
| 592 | PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW | |
| 593 | 593 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 594 | 594 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 595 | 595 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1679 | r1680 | |
|---|---|---|
| 401 | 401 | |
| 402 | 402 | static VIDEO_START(deroon) |
| 403 | 403 | { |
| 404 | txt_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 404 | txt_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, | |
| 405 | 405 | tilemap_set_transparent_pen(txt_tilemap,0); |
| 406 | 406 | } |
| 407 | 407 |
| r1679 | r1680 | |
|---|---|---|
| 245 | 245 | static WRITE8_HANDLER( polyplay_start_timer2 ) |
| 246 | 246 | { |
| 247 | 247 | if (data == 0x03) |
| 248 | timer_adjust(polyplay_timer, attotime_never, 0 | |
| 248 | timer_adjust_oneshot(polyplay_timer, attotime_never, 0 | |
| 249 | 249 | |
| 250 | 250 | if (data == 0xb5) |
| 251 | timer_adjust(polyplay_timer, ATTOTIME_IN_HZ(40), 0, ATTOTIME_IN_HZ(40)); | |
| 251 | timer_adjust_periodic(polyplay_timer, ATTOTIME_IN_HZ(40), 0, ATTOTIME_IN_HZ(40)); | |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | static READ8_HANDLER( polyplay_random_read ) |
| r1679 | r1680 | |
|---|---|---|
| 173 | 173 | PORT_START_TAG("PPI_PORTC") |
| 174 | 174 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 175 | 175 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 176 | PORT_ | |
| 176 | PORT_SERVICE( 0x04, IP_ACTIVE_HIGH | |
| 177 | 177 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) PORT_TOGGLE |
| 178 | 178 | |
| 179 | 179 | PORT_START_TAG("PPI_PORTD") |
| r1679 | r1680 | |
| 278 | 278 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 279 | 279 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) |
| 280 | 280 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) PORT_TOGGLE |
| 281 | PORT_ | |
| 281 | PORT_SERVICE( 0x80, IP_ACTIVE_HIGH | |
| 282 | 282 | |
| 283 | 283 | PORT_START_TAG("PPI_PORTC") |
| 284 | 284 | PORT_DIPNAME( 0xff, 0x80, "Sound PCB Jumper:" ) |
| r1679 | r1680 | |
| 362 | 362 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 363 | 363 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) |
| 364 | 364 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) PORT_TOGGLE |
| 365 | PORT_ | |
| 365 | PORT_SERVICE( 0x80, IP_ACTIVE_HIGH | |
| 366 | 366 | |
| 367 | 367 | /* Wire jumper setting on sound PCB */ |
| 368 | 368 | PORT_START_TAG("YM2149_IC19_B") |
| r1679 | r1680 | |
|---|---|---|
| 732 | 732 | |
| 733 | 733 | static VIDEO_START( merit ) |
| 734 | 734 | { |
| 735 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 735 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 736 | 736 | } |
| 737 | 737 | |
| 738 | 738 | static VIDEO_UPDATE( merit ) |
| r1679 | r1680 | |
|---|---|---|
| 201 | 201 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 202 | 202 | MDRV_GFXDECODE(dambustr) |
| 203 | 203 | MDRV_PALETTE_LENGTH(32+2+64+8) /* 32 for the characters, 2 for the bullets, 64 for the stars, 8 for the background */ |
| 204 | MDRV_COLORTABLE_LENGTH(8*4) | |
| 205 | 204 | |
| 206 | 205 | MDRV_PALETTE_INIT(dambustr) |
| 207 | 206 | MDRV_VIDEO_START(dambustr) |
| r1679 | r1680 | |
|---|---|---|
| 468 | 468 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 469 | 469 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 470 | 470 | MDRV_GFXDECODE(pingpong) |
| 471 | MDRV_PALETTE_LENGTH(32) | |
| 472 | MDRV_COLORTABLE_LENGTH(64*4+64*4) | |
| 471 | MDRV_PALETTE_LENGTH(64*4+64*4) | |
| 473 | 472 | |
| 474 | 473 | MDRV_PALETTE_INIT(pingpong) |
| 475 | 474 | MDRV_VIDEO_START(pingpong) |
| r1679 | r1680 | |
| 512 | 511 | |
| 513 | 512 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 514 | 513 | ROM_LOAD( "pingpong.3j", 0x0000, 0x0020, CRC(3e04f06e) SHA1(a642c350f148e062d56eb2a2fc53c470603000e3) ) /* palette (this might be bad) */ |
| 515 | ROM_LOAD( "pingpong.11j", 0x0020, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 516 | ROM_LOAD( "pingpong.5h", 0x0120, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 514 | ROM_LOAD( "pingpong.5h", 0x0020, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 515 | ROM_LOAD( "pingpong.11j", 0x0120, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 517 | 516 | ROM_END |
| 518 | 517 | |
| 519 | 518 | ROM_START( merlinmm ) |
| r1679 | r1680 | |
| 528 | 527 | |
| 529 | 528 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 530 | 529 | ROM_LOAD( "merlinmm.3j", 0x0000, 0x0020, CRC(d56e91f4) SHA1(152d88e4d168f697030d96c02ab9aeb220cc765d) ) /* palette */ |
| 531 | ROM_LOAD( "pingpong.11j", 0x0020, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 532 | ROM_LOAD( "pingpong.5h", 0x0120, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 530 | ROM_LOAD( "pingpong.5h", 0x0020, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 531 | ROM_LOAD( "pingpong.11j", 0x0120, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 533 | 532 | ROM_END |
| 534 | 533 | |
| 535 | 534 | ROM_START( cashquiz ) |
| r1679 | r1680 | |
| 564 | 563 | |
| 565 | 564 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 566 | 565 | ROM_LOAD( "cashquiz.3j", 0x0000, 0x0020, CRC(dc70e23b) SHA1(90948f76d5c61eb57838e013aa93d733913a2d92) ) /* palette */ |
| 567 | ROM_LOAD( "pingpong.11j", 0x0020, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 568 | ROM_LOAD( "pingpong.5h", 0x0120, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 566 | ROM_LOAD( "pingpong.5h", 0x0020, 0x0100, CRC(8456046a) SHA1(8226f1325c14eb8aed5cd3c3d6bad9f9fd88c5fa) ) /* characters */ | |
| 567 | ROM_LOAD( "pingpong.11j", 0x0120, 0x0100, CRC(09d96b08) SHA1(81405e33eacc47f91ea4c7221d122f7e6f5b1e5d) ) /* sprites */ | |
| 569 | 568 | ROM_END |
| 570 | 569 | |
| 571 | 570 | static DRIVER_INIT( merlinmm ) |
| r1679 | r1680 | |
| 613 | 612 | } |
| 614 | 613 | |
| 615 | 614 | |
| 616 | GAME( 1985, pingpong, 0, pingpong, pingpong, 0, ROT0, "Konami", "Ping | |
| 615 | GAME( 1985, pingpong, 0, pingpong, pingpong, 0, ROT0, "Konami", "Konami's Ping-Pong", 0 ) | |
| 617 | 616 | GAME( 1986, merlinmm, 0, merlinmm, merlinmm, merlinmm, ROT90,"Zilec - Zenitone", "Merlins Money Maze", 0 ) |
| 618 | 617 | GAME( 1986, cashquiz, 0, merlinmm, cashquiz, cashquiz, ROT0, "Zilec - Zenitone", "Cash Quiz (Type B, Version 5)", GAME_IMPERFECT_GRAPHICS ) |
| r1679 | r1680 | |
|---|---|---|
| 364 | 364 | |
| 365 | 365 | static INPUT_PORTS_START( apache3 ) |
| 366 | 366 | PORT_START |
| 367 | PORT_ | |
| 367 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 368 | 368 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Trigger" ) |
| 369 | 369 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Power" ) |
| 370 | 370 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
| 440 | 440 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 441 | 441 | |
| 442 | 442 | PORT_START |
| 443 | PORT_ | |
| 443 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 444 | 444 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 445 | 445 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 446 | 446 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r1679 | r1680 | |
|---|---|---|
| 356 | 356 | |
| 357 | 357 | static GFXDECODE_START( retofinv ) |
| 358 | 358 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 256 ) |
| 359 | GFXDECODE_ENTRY( REGION_GFX2, 0, bglayout, 64*16+256*2, 64 ) | |
| 360 | GFXDECODE_ENTRY( REGION_GFX3, 0, spritelayout, 256*2, 64 ) | |
| 359 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 256*2, 64 ) | |
| 360 | GFXDECODE_ENTRY( REGION_GFX3, 0, bglayout, 64*16+256*2, 64 ) | |
| 361 | 361 | GFXDECODE_END |
| 362 | 362 | |
| 363 | 363 | |
| r1679 | r1680 | |
| 390 | 390 | MDRV_SCREEN_SIZE(36*8, 28*8) |
| 391 | 391 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) |
| 392 | 392 | MDRV_GFXDECODE(retofinv) |
| 393 | MDRV_PALETTE_LENGTH(256) | |
| 394 | MDRV_COLORTABLE_LENGTH(256*2+64*16+64*16) | |
| 393 | MDRV_PALETTE_LENGTH(256*2+64*16+64*16) | |
| 395 | 394 | |
| 396 | 395 | MDRV_PALETTE_INIT(retofinv) |
| 397 | 396 | MDRV_VIDEO_START(retofinv) |
| r1679 | r1680 | |
| 442 | 441 | ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 443 | 442 | ROM_LOAD( "a37-16.61", 0x0000, 0x2000, CRC(4e3f501c) SHA1(2d832f4038ae65bfdeedfab870f6f1176ec6b676) ) |
| 444 | 443 | |
| 445 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 446 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 447 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 448 | ||
| 449 | ROM_REGION( 0x08000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 444 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 450 | 445 | ROM_LOAD( "a37-10.8", 0x0000, 0x2000, CRC(6afdeec8) SHA1(782fe0a8aea48c3c270318b7ba011fc6fce0db7a) ) |
| 451 | 446 | ROM_LOAD( "a37-11.9", 0x2000, 0x2000, CRC(d3dc9da3) SHA1(0d98d6e993b5a4845a23802751023b7a593dce29) ) |
| 452 | 447 | ROM_LOAD( "a37-12.10", 0x4000, 0x2000, CRC(d10b2eed) SHA1(3809a0adf935a119f9ee0d4c24f1456c35d2a6fa) ) |
| 453 | 448 | ROM_LOAD( "a37-13.11", 0x6000, 0x2000, CRC(00ca6b3d) SHA1(08ce5b13d5ebc79cc803949f4ba9e630e6cd92b8) ) |
| 454 | 449 | |
| 450 | ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 451 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 452 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 453 | ||
| 455 | 454 | ROM_REGION( 0x0b00, REGION_PROMS, 0 ) |
| 456 | 455 | ROM_LOAD( "a37-06.13", 0x0000, 0x0100, CRC(e9643b8b) SHA1(7bbb92a42e7c3effb701fc7b2c24f2470f31b063) ) /* palette red bits */ |
| 457 | 456 | ROM_LOAD( "a37-07.4", 0x0100, 0x0100, CRC(e8f34e11) SHA1(8f438561b8d46ffff00747ed8baf0ebb6a081615) ) /* palette green bits */ |
| r1679 | r1680 | |
| 474 | 473 | ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 475 | 474 | ROM_LOAD( "a37-16.61", 0x0000, 0x2000, CRC(4e3f501c) SHA1(2d832f4038ae65bfdeedfab870f6f1176ec6b676) ) |
| 476 | 475 | |
| 477 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 478 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 479 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 480 | ||
| 481 | ROM_REGION( 0x08000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 476 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 482 | 477 | ROM_LOAD( "a37-10.8", 0x0000, 0x2000, CRC(6afdeec8) SHA1(782fe0a8aea48c3c270318b7ba011fc6fce0db7a) ) |
| 483 | 478 | ROM_LOAD( "a37-11.9", 0x2000, 0x2000, CRC(d3dc9da3) SHA1(0d98d6e993b5a4845a23802751023b7a593dce29) ) |
| 484 | 479 | ROM_LOAD( "a37-12.10", 0x4000, 0x2000, CRC(d10b2eed) SHA1(3809a0adf935a119f9ee0d4c24f1456c35d2a6fa) ) |
| 485 | 480 | ROM_LOAD( "a37-13.11", 0x6000, 0x2000, CRC(00ca6b3d) SHA1(08ce5b13d5ebc79cc803949f4ba9e630e6cd92b8) ) |
| 486 | 481 | |
| 482 | ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 483 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 484 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 485 | ||
| 487 | 486 | ROM_REGION( 0x0b00, REGION_PROMS, 0 ) |
| 488 | 487 | ROM_LOAD( "a37-06.13", 0x0000, 0x0100, CRC(e9643b8b) SHA1(7bbb92a42e7c3effb701fc7b2c24f2470f31b063) ) /* palette red bits */ |
| 489 | 488 | ROM_LOAD( "a37-07.4", 0x0100, 0x0100, CRC(e8f34e11) SHA1(8f438561b8d46ffff00747ed8baf0ebb6a081615) ) /* palette green bits */ |
| r1679 | r1680 | |
| 506 | 505 | ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 507 | 506 | ROM_LOAD( "a37-16.61", 0x0000, 0x2000, CRC(4e3f501c) SHA1(2d832f4038ae65bfdeedfab870f6f1176ec6b676) ) |
| 508 | 507 | |
| 509 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 510 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 511 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 512 | ||
| 513 | ROM_REGION( 0x08000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 508 | ROM_REGION( 0x08000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 514 | 509 | ROM_LOAD( "a37-10.8", 0x0000, 0x2000, CRC(6afdeec8) SHA1(782fe0a8aea48c3c270318b7ba011fc6fce0db7a) ) |
| 515 | 510 | ROM_LOAD( "a37-11.9", 0x2000, 0x2000, CRC(d3dc9da3) SHA1(0d98d6e993b5a4845a23802751023b7a593dce29) ) |
| 516 | 511 | ROM_LOAD( "a37-12.10", 0x4000, 0x2000, CRC(d10b2eed) SHA1(3809a0adf935a119f9ee0d4c24f1456c35d2a6fa) ) |
| 517 | 512 | ROM_LOAD( "a37-13.11", 0x6000, 0x2000, CRC(00ca6b3d) SHA1(08ce5b13d5ebc79cc803949f4ba9e630e6cd92b8) ) |
| 518 | 513 | |
| 514 | ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 515 | ROM_LOAD( "a37-14.55", 0x0000, 0x2000, CRC(ef7f8651) SHA1(2d91057501e5e9c4255e0d55fff0d99c2a5be7e8) ) | |
| 516 | ROM_LOAD( "a37-15.56", 0x2000, 0x2000, CRC(03b40905) SHA1(c10d87796e8a6e6a2a37c6fb713821cc87299cc8) ) | |
| 517 | ||
| 519 | 518 | ROM_REGION( 0x0b00, REGION_PROMS, 0 ) |
| 520 | 519 | ROM_LOAD( "a37-06.13", 0x0000, 0x0100, CRC(e9643b8b) SHA1(7bbb92a42e7c3effb701fc7b2c24f2470f31b063) ) /* palette red bits */ |
| 521 | 520 | ROM_LOAD( "a37-07.4", 0x0100, 0x0100, CRC(e8f34e11) SHA1(8f438561b8d46ffff00747ed8baf0ebb6a081615) ) /* palette green bits */ |
| r1679 | r1680 | |
|---|---|---|
| 126 | 126 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 4") PORT_CODE(KEYCODE_T) \ |
| 127 | 127 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 5") PORT_CODE(KEYCODE_Y) \ |
| 128 | 128 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 6") PORT_CODE(KEYCODE_U) \ |
| 129 | PORT_ | |
| 129 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 130 | 130 | |
| 131 | 131 | #define MEGAPLAY_COIN \ |
| 132 | 132 | PORT_START \ |
| r1679 | r1680 | |
| 184 | 184 | MEGAPLAY_COIN |
| 185 | 185 | MEGAPLAY_DSWA |
| 186 | 186 | MEGAPLAY_DSWB |
| 187 | ||
| 188 | 187 | INPUT_PORTS_END |
| 189 | 188 | |
| 190 | 189 | static INPUT_PORTS_START ( mp_sonic ) |
| r1679 | r1680 | |
| 201 | 200 | PORT_DIPSETTING( 0x01, "3" ) |
| 202 | 201 | PORT_DIPSETTING( 0x02, "2" ) |
| 203 | 202 | PORT_DIPSETTING( 0x03, "1" ) |
| 204 | ||
| 205 | 203 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 206 | 204 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 207 | 205 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| r1679 | r1680 | |
| 212 | 210 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| 213 | 211 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 6") PORT_CODE(KEYCODE_J) |
| 214 | 212 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 7") PORT_CODE(KEYCODE_K) |
| 215 | ||
| 216 | 213 | INPUT_PORTS_END |
| 217 | 214 | |
| 218 | 215 | static INPUT_PORTS_START ( mp_gaxe2 ) |
| r1679 | r1680 | |
| 227 | 224 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:1") |
| 228 | 225 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 229 | 226 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 230 | ||
| 231 | 227 | PORT_DIPNAME( 0x02, 0x00, "Life" ) PORT_DIPLOCATION("SW3:2") |
| 232 | 228 | PORT_DIPSETTING( 0x02, "1" ) |
| 233 | 229 | PORT_DIPSETTING( 0x00, "2" ) |
| 234 | ||
| 235 | 230 | PORT_DIPNAME( 0x04, 0x04, "Initial Players" ) PORT_DIPLOCATION("SW3:3") |
| 236 | 231 | PORT_DIPSETTING( 0x00, "1" ) |
| 237 | 232 | PORT_DIPSETTING( 0x04, "2" ) |
| 238 | ||
| 239 | 233 | PORT_DIPNAME( 0x08, 0x00, "Timer" ) PORT_DIPLOCATION("SW3:4") |
| 240 | 234 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 241 | 235 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 242 | ||
| 243 | 236 | // Who knows... |
| 244 | 237 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) |
| 245 | 238 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| 246 | 239 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 6") PORT_CODE(KEYCODE_J) |
| 247 | 240 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 7") PORT_CODE(KEYCODE_K) |
| 248 | ||
| 249 | 241 | INPUT_PORTS_END |
| 250 | 242 | |
| 251 | 243 | static INPUT_PORTS_START ( mp_col3 ) |
| r1679 | r1680 | |
| 260 | 252 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW3:1") |
| 261 | 253 | PORT_DIPSETTING( 0x01, DEF_STR( English ) ) |
| 262 | 254 | PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) ) |
| 263 | ||
| 264 | 255 | PORT_DIPNAME( 0x02, 0x02, "2P Mode Games" ) PORT_DIPLOCATION("SW3:2") |
| 265 | 256 | PORT_DIPSETTING( 0x02, "1" ) |
| 266 | 257 | PORT_DIPSETTING( 0x00, "3" ) |
| 267 | ||
| 268 | 258 | PORT_DIPNAME( 0x0c, 0x0c, "Speed / Difficulty" ) PORT_DIPLOCATION("SW3:3,4") |
| 269 | 259 | PORT_DIPSETTING( 0x08, "Slow" ) |
| 270 | 260 | PORT_DIPSETTING( 0x0c, "Middle" ) |
| 271 | 261 | PORT_DIPSETTING( 0x04, "Fast" ) |
| 272 | 262 | PORT_DIPSETTING( 0x00, "Max" ) |
| 273 | ||
| 274 | 263 | // Who knows... |
| 275 | 264 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) |
| 276 | 265 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) |
| 277 | 266 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 6") PORT_CODE(KEYCODE_J) |
| 278 | 267 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 7") PORT_CODE(KEYCODE_K) |
| 279 | ||
| 280 | 268 | INPUT_PORTS_END |
| 281 | 269 | |
| 282 | 270 | static INPUT_PORTS_START ( mp_twc ) |
| r1679 | r1680 | |
| 291 | 279 | PORT_DIPNAME( 0x01, 0x01, "Time" ) PORT_DIPLOCATION("SW3:1") |
| 292 | 280 | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 293 | 281 | PORT_DIPSETTING( 0x00, "Short" ) |
| 294 | ||
| 295 | 282 | PORT_DIPNAME( 0x0e, 0x08, "Level" ) PORT_DIPLOCATION("SW3:2,3,4") |
| 296 | 283 | PORT_DIPSETTING( 0x00, "0" ) |
| 297 | 284 | PORT_DIPSETTING( 0x02, "0" ) |
| r1679 | r1680 | |
| 301 | 288 | PORT_DIPSETTING( 0x0a, "2" ) |
| 302 | 289 | PORT_DIPSETTING( 0x0c, "1" ) |
| 303 | 290 | PORT_DIPSETTING( 0x0e, "0" ) |
| 304 | ||
| 305 | 291 | INPUT_PORTS_END |
| 306 | 292 | |
| 307 | 293 | static INPUT_PORTS_START ( mp_sor2 ) |
| r1679 | r1680 | |
| 318 | 304 | PORT_DIPSETTING( 0x01, "3" ) |
| 319 | 305 | PORT_DIPSETTING( 0x02, "2" ) |
| 320 | 306 | PORT_DIPSETTING( 0x03, "1" ) |
| 321 | ||
| 322 | 307 | PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 323 | 308 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) |
| 324 | 309 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) |
| 325 | 310 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) |
| 326 | 311 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) |
| 327 | ||
| 328 | 312 | INPUT_PORTS_END |
| 329 | 313 | |
| 330 | 314 | static INPUT_PORTS_START ( mp_bio ) |
| r1679 | r1680 | |
| 341 | 325 | PORT_DIPSETTING( 0x01, "4" ) |
| 342 | 326 | PORT_DIPSETTING( 0x02, "2" ) |
| 343 | 327 | PORT_DIPSETTING( 0x03, "3" ) |
| 344 | ||
| 345 | 328 | PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") |
| 346 | 329 | PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) |
| 347 | 330 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) |
| 348 | 331 | PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) |
| 349 | 332 | PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) |
| 350 | ||
| 351 | 333 | INPUT_PORTS_END |
| 352 | 334 | |
| 353 | 335 | static INPUT_PORTS_START ( mp_gslam ) |
| r1679 | r1680 | |
| 368 | 350 | PORT_DIPSETTING( 0x05, "2:30" ) |
| 369 | 351 | PORT_DIPSETTING( 0x06, "2:00" ) |
| 370 | 352 | PORT_DIPSETTING( 0x07, "1:30" ) |
| 371 | ||
| 372 | ||
| 373 | 353 | PORT_DIPNAME( 0x08, 0x08, "2P-Play Continue" ) PORT_DIPLOCATION("SW3:4") |
| 374 | 354 | PORT_DIPSETTING( 0x00, "1 Credit" ) |
| 375 | 355 | PORT_DIPSETTING( 0x08, "2 Credits" ) |
| 376 | ||
| 377 | 356 | INPUT_PORTS_END |
| 378 | 357 | |
| 379 | 358 | static INPUT_PORTS_START ( mp_mazin ) |
| r1679 | r1680 | |
| 388 | 367 | PORT_DIPNAME( 0x01, 0x01, "Initial Player" ) PORT_DIPLOCATION("SW3:1") |
| 389 | 368 | PORT_DIPSETTING( 0x01, "2" ) |
| 390 | 369 | PORT_DIPSETTING( 0x00, "1" ) |
| 391 | ||
| 392 | 370 | PORT_DIPNAME( 0x02, 0x02, "Initial Player" ) PORT_DIPLOCATION("SW3:2") |
| 393 | 371 | PORT_DIPSETTING( 0x02, "1" ) |
| 394 | 372 | PORT_DIPSETTING( 0x00, "4" ) |
| 395 | ||
| 396 | 373 | PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3") |
| 397 | 374 | PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) |
| 398 | 375 | PORT_DIPSETTING( 0x00, DEF_STR ( Normal ) ) |
| 399 | ||
| 400 | 376 | PORT_DIPNAME( 0x08, 0x08, "Title" ) PORT_DIPLOCATION("SW3:4") |
| 401 | 377 | PORT_DIPSETTING( 0x08, "EUROPE" ) |
| 402 | 378 | PORT_DIPSETTING( 0x00, "U.S.A" ) |
| 403 | ||
| 404 | 379 | INPUT_PORTS_END |
| 405 | 380 | |
| 406 | 381 | static INPUT_PORTS_START ( mp_soni2 ) |
| r1679 | r1680 | |
| 417 | 392 | PORT_DIPSETTING( 0x01, "3" ) |
| 418 | 393 | PORT_DIPSETTING( 0x02, "2" ) |
| 419 | 394 | PORT_DIPSETTING( 0x03, "1" ) |
| 420 | ||
| 421 | 395 | PORT_DIPNAME( 0x0c, 0x0c, "Initial Players (Dual mode)" ) PORT_DIPLOCATION("SW3:3,4") |
| 422 | 396 | PORT_DIPSETTING( 0x00, "4" ) |
| 423 | 397 | PORT_DIPSETTING( 0x04, "2" ) |
| 424 | 398 | PORT_DIPSETTING( 0x08, "1" ) |
| 425 | 399 | PORT_DIPSETTING( 0x0c, "3" ) |
| 426 | ||
| 427 | 400 | INPUT_PORTS_END |
| 428 | 401 | |
| 429 | 402 | /*MEGAPLAY specific*/ |
| r1679 | r1680 | |
|---|---|---|
| 99 | 99 | { |
| 100 | 100 | m72_irq_base = 0x20; |
| 101 | 101 | MACHINE_RESET_CALL(m72_sound); |
| 102 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 102 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | static MACHINE_RESET( xmultipl ) |
| 106 | 106 | { |
| 107 | 107 | m72_irq_base = 0x08; |
| 108 | 108 | MACHINE_RESET_CALL(m72_sound); |
| 109 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 109 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | static MACHINE_RESET( kengo ) |
| 113 | 113 | { |
| 114 | 114 | m72_irq_base = 0x18; |
| 115 | 115 | MACHINE_RESET_CALL(m72_sound); |
| 116 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 116 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | static TIMER_CALLBACK( m72_scanline_interrupt ) |
| r1679 | r1680 | |
| 137 | 137 | /* adjust for next scanline */ |
| 138 | 138 | if (++scanline >= machine->screen[0].height) |
| 139 | 139 | scanline = 0; |
| 140 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 140 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 |
| r1679 | r1680 | |
|---|---|---|
| 35 | 35 | #include "rescap.h" |
| 36 | 36 | #include "machine/6821pia.h" |
| 37 | 37 | #include "machine/74123.h" |
| 38 | #include "video/ | |
| 38 | #include "video/m | |
| 39 | 39 | #include "cpu/m6800/m6800.h" |
| 40 | 40 | #include "cpu/m6809/m6809.h" |
| 41 | 41 | #include "sound/ay8910.h" |
| r1679 | r1680 | |
| 48 | 48 | #define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16) |
| 49 | 49 | |
| 50 | 50 | |
| 51 | static mc6845_t *mc6845; | |
| 51 | 52 | static UINT8 *r2dtank_videoram; |
| 52 | 53 | static UINT8 *r2dtank_colorram; |
| 53 | 54 | static UINT8 flipscreen; |
| r1679 | r1680 | |
| 303 | 304 | #define NUM_PENS (8) |
| 304 | 305 | |
| 305 | 306 | |
| 307 | static WRITE8_HANDLER( r2dtank_mc6845_address_w ) | |
| 308 | { | |
| 309 | mc6845_address_w(mc6845, data); | |
| 310 | } | |
| 311 | ||
| 312 | ||
| 313 | static WRITE8_HANDLER( r2dtank_mc6845_register_w ) | |
| 314 | { | |
| 315 | mc6845_register_w(mc6845, data); | |
| 316 | } | |
| 317 | ||
| 318 | ||
| 306 | 319 | static WRITE8_HANDLER( flipscreen_w ) |
| 307 | 320 | { |
| 308 | 321 | flipscreen = !data; |
| 309 | 322 | } |
| 310 | 323 | |
| 311 | 324 | |
| 312 | static void *begin_update(running_machine *machine, int screen, | |
| 313 | mame_bitmap *bitmap, const rectangle *cliprect) | |
| 325 | static void *begin_update(mame_bitmap *bitmap, const rectangle *cliprect) | |
| 314 | 326 | { |
| 315 | 327 | /* create the pens */ |
| 316 | 328 | offs_t i; |
| r1679 | r1680 | |
| 381 | 393 | } |
| 382 | 394 | |
| 383 | 395 | |
| 384 | static const c | |
| 396 | static const mc | |
| 385 | 397 | { |
| 386 | 398 | 0, /* screen we are acting on */ |
| 387 | 399 | CRTC_CLOCK, /* the clock (pin 21) of the chip */ |
| r1679 | r1680 | |
| 396 | 408 | static VIDEO_START( r2dtank ) |
| 397 | 409 | { |
| 398 | 410 | /* configure the CRT controller */ |
| 399 | c | |
| 411 | mc6845 = mc6845_config( | |
| 400 | 412 | } |
| 401 | 413 | |
| 402 | 414 | |
| 415 | static VIDEO_UPDATE( r2dtank ) | |
| 416 | { | |
| 417 | mc6845_update(mc6845, bitmap, cliprect); | |
| 403 | 418 | |
| 419 | return 0; | |
| 420 | } | |
| 421 | ||
| 422 | ||
| 423 | ||
| 404 | 424 | /************************************* |
| 405 | 425 | * |
| 406 | 426 | * Memory handlers |
| r1679 | r1680 | |
| 420 | 440 | AM_RANGE(0x6000, 0x7fff) AM_RAM |
| 421 | 441 | AM_RANGE(0x8000, 0x8003) AM_READWRITE(pia_0_r, pia_comp_0_w) |
| 422 | 442 | AM_RANGE(0x8004, 0x8004) AM_READWRITE(audio_answer_r, audio_command_w) |
| 423 | AM_RANGE(0xb000, 0xb000) AM_WRITE(crtc6845_address_w) | |
| 424 | AM_RANGE(0xb001, 0xb001) AM_WRITE(crtc6845_register_w) | |
| 443 | AM_RANGE(0xb000, 0xb000) AM_WRITE(r2dtank_mc6845_address_w) | |
| 444 | AM_RANGE(0xb001, 0xb001) AM_WRITE(r2dtank_mc6845_register_w) | |
| 425 | 445 | AM_RANGE(0xc000, 0xc007) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 426 | 446 | AM_RANGE(0xc800, 0xffff) AM_ROM |
| 427 | 447 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 540 | 560 | /* video hardware */ |
| 541 | 561 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 542 | 562 | MDRV_VIDEO_START(r2dtank) |
| 543 | MDRV_VIDEO_UPDATE( | |
| 563 | MDRV_VIDEO_UPDATE( | |
| 544 | 564 | |
| 545 | 565 | MDRV_SCREEN_ADD("main", 0) |
| 546 | 566 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| r1679 | r1680 | |
|---|---|---|
| 105 | 105 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 106 | 106 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 107 | 107 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 108 | PORT_ | |
| 108 | PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW | |
| 109 | 109 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 110 | 110 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 111 | 111 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 205 | 205 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 206 | 206 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 207 | 207 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 208 | PORT_ | |
| 208 | PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW | |
| 209 | 209 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 210 | 210 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 211 | 211 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "deprecat.h" |
| 11 | #include "video/ | |
| 11 | #include "video/m | |
| 12 | 12 | #include "sound/ay8910.h" |
| 13 | 13 | |
| 14 | 14 | #define MAIN_CLOCK 10595000 |
| r1679 | r1680 | |
| 30 | 30 | static UINT8 madalien_shift_count; |
| 31 | 31 | static UINT8 madalien_shift_data; |
| 32 | 32 | |
| 33 | static mc6845_t *mc6845; | |
| 34 | ||
| 33 | 35 | static tilemap* tilemap_fg; |
| 34 | 36 | |
| 35 | 37 | static tilemap* tilemap_edge1[4]; |
| r1679 | r1680 | |
| 85 | 87 | } |
| 86 | 88 | |
| 87 | 89 | |
| 90 | static WRITE8_HANDLER( madalien_mc6845_address_w ) | |
| 91 | { | |
| 92 | mc6845_address_w(mc6845, data); | |
| 93 | } | |
| 94 | ||
| 95 | static READ8_HANDLER( madalien_mc6845_register_r ) | |
| 96 | { | |
| 97 | return mc6845_register_r(mc6845); | |
| 98 | } | |
| 99 | ||
| 100 | static WRITE8_HANDLER( madalien_mc6845_register_w ) | |
| 101 | { | |
| 102 | mc6845_register_w(mc6845, data); | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 88 | 106 | static void update_edges(int area) |
| 89 | 107 | { |
| 90 | 108 | UINT8* map = memory_region(REGION_GFX2) + 0x200 * area; |
| r1679 | r1680 | |
| 161 | 179 | { |
| 162 | 180 | rectangle rect = { 0, 127, 0, 127 }; |
| 163 | 181 | |
| 164 | static const c | |
| 182 | static const mc | |
| 165 | 183 | { |
| 166 | 184 | 0, /* screen we are acting on */ |
| 167 | 185 | PIXEL_CLOCK / 8, /* the clock of the chip */ |
| r1679 | r1680 | |
| 172 | 190 | NULL /* call back for display state changes */ |
| 173 | 191 | }; |
| 174 | 192 | |
| 175 | c | |
| 193 | mc6845 = mc6845_config( | |
| 176 | 194 | |
| 177 | 195 | tilemap_fg = tilemap_create(get_tile_info_FG, |
| 178 | tilemap_scan_cols_flip_x, | |
| 196 | tilemap_scan_cols_flip_x, | |
| 179 | 197 | |
| 180 | 198 | tilemap_set_transparent_pen(tilemap_fg, 0); |
| 181 | 199 | |
| 182 | 200 | tilemap_edge1[0] = tilemap_create(get_tile_info_BG, |
| 183 | scan_mode0, | |
| 201 | scan_mode0, | |
| 184 | 202 | tilemap_edge1[1] = tilemap_create(get_tile_info_BG, |
| 185 | scan_mode1, | |
| 203 | scan_mode1, | |
| 186 | 204 | tilemap_edge1[2] = tilemap_create(get_tile_info_BG, |
| 187 | scan_mode2, | |
| 205 | scan_mode2, | |
| 188 | 206 | tilemap_edge1[3] = tilemap_create(get_tile_info_BG, |
| 189 | scan_mode3, | |
| 207 | scan_mode3, | |
| 190 | 208 | |
| 191 | 209 | tilemap_edge2[0] = tilemap_create(get_tile_info_BG, |
| 192 | scan_mode0, | |
| 210 | scan_mode0, | |
| 193 | 211 | tilemap_edge2[1] = tilemap_create(get_tile_info_BG, |
| 194 | scan_mode1, | |
| 212 | scan_mode1, | |
| 195 | 213 | tilemap_edge2[2] = tilemap_create(get_tile_info_BG, |
| 196 | scan_mode2, | |
| 214 | scan_mode2, | |
| 197 | 215 | tilemap_edge2[3] = tilemap_create(get_tile_info_BG, |
| 198 | scan_mode3, | |
| 216 | scan_mode3, | |
| 199 | 217 | |
| 200 | 218 | update_edges(0); |
| 201 | 219 | |
| r1679 | r1680 | |
| 497 | 515 | AM_RANGE(0x6400, 0x67ff) AM_RAM |
| 498 | 516 | AM_RANGE(0x6800, 0x7fff) AM_RAM AM_BASE(&madalien_charram) |
| 499 | 517 | |
| 500 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0ff0) AM_WRITE(crtc6845_address_w) | |
| 501 | AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x0ff0) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 518 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0ff0) AM_WRITE(madalien_mc6845_address_w) | |
| 519 | AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x0ff0) AM_READWRITE(madalien_mc6845_register_r, madalien_mc6845_register_w) | |
| 502 | 520 | AM_RANGE(0x8004, 0x8004) AM_MIRROR(0x0ff0) AM_WRITE(madalien_screen_control_w) |
| 503 | 521 | AM_RANGE(0x8005, 0x8005) AM_MIRROR(0x0ff0) AM_WRITE(madalien_output_w) |
| 504 | 522 | AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x0ff0) AM_READWRITE(soundlatch2_r, madalien_sound_command_w) |
| r1679 | r1680 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | static VIDEO_START(igs_180) |
| 20 | 20 | { |
| 21 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 21 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows, | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | static VIDEO_UPDATE(igs_180) |
| r1679 | r1680 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Formation Z / Aeroboto |
| 4 | 4 | |
| 5 | PCB ID: JALECO FZ-8420 | |
| 6 | ||
| 5 | 7 | Driver by Carlos A. Lozano |
| 6 | 8 | |
| 7 | ||
| 8 | 9 | TODO: |
| 9 | 10 | - star field |
| 10 | 11 | Uki's report: |
| r1679 | r1680 | |
| 253 | 254 | static MACHINE_DRIVER_START( formatz ) |
| 254 | 255 | |
| 255 | 256 | /* basic machine hardware */ |
| 256 | MDRV_CPU_ADD(M6809, 1 | |
| 257 | MDRV_CPU_ADD(M6809, XTAL_1 | |
| 257 | 258 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 258 | 259 | MDRV_CPU_VBLANK_INT(aeroboto_interrupt,1) |
| 259 | 260 | |
| 260 | MDRV_CPU_ADD(M6809, | |
| 261 | MDRV_CPU_ADD(M6809, XTAL_10MHz/16) /* verified on pcb */ | |
| 261 | 262 | /* audio CPU */ |
| 262 | 263 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) |
| 263 | 264 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| r1679 | r1680 | |
| 281 | 282 | /* sound hardware */ |
| 282 | 283 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 283 | 284 | |
| 284 | MDRV_SOUND_ADD(AY8910, 1 | |
| 285 | MDRV_SOUND_ADD(AY8910, XTAL_1 | |
| 285 | 286 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 286 | 287 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 287 | 288 | |
| 288 | MDRV_SOUND_ADD(AY8910, 1 | |
| 289 | MDRV_SOUND_ADD(AY8910, XTAL_1 | |
| 289 | 290 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 290 | 291 | MACHINE_DRIVER_END |
| 291 | 292 |
| r1679 | r1680 | |
|---|---|---|
| 395 | 395 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_START1 ) |
| 396 | 396 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 397 | 397 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 398 | PORT_ | |
| 398 | PORT_SERVICE_NO_TOGGLE( 0x00001000, IP_ACTIVE_LOW | |
| 399 | 399 | PORT_BIT( 0x00002000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( eeprom_bit_r, 0 ) |
| 400 | 400 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 401 | 401 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 59 | 59 | static VIDEO_START( rmhaihai ) |
| 60 | 60 | { |
| 61 | 61 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 62 | | |
| 62 | | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | static VIDEO_UPDATE( rmhaihai ) |
| r1679 | r1680 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | static VIDEO_UPDATE( jetwave ) |
| 93 | 93 | { |
| 94 | fillbitmap(bitmap, machine-> | |
| 94 | fillbitmap(bitmap, machine-> | |
| 95 | 95 | |
| 96 | 96 | K001604_tile_update(machine, 0); |
| 97 | 97 | K001005_draw(bitmap, cliprect); |
| r1679 | r1680 | |
| 138 | 138 | |
| 139 | 139 | static VIDEO_UPDATE( zr107 ) |
| 140 | 140 | { |
| 141 | fillbitmap(bitmap, machine-> | |
| 141 | fillbitmap(bitmap, machine-> | |
| 142 | 142 | |
| 143 | 143 | K056832_set_LayerOffset(0, -29, -27); |
| 144 | 144 | K056832_set_LayerOffset(1, -29, -27); |
| r1679 | r1680 | |
| 427 | 427 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 428 | 428 | |
| 429 | 429 | PORT_START |
| 430 | PORT_ | |
| 430 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 431 | 431 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 432 | 432 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 433 | 433 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 470 | 470 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 471 | 471 | |
| 472 | 472 | PORT_START |
| 473 | PORT_ | |
| 473 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 474 | 474 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 475 | 475 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 476 | 476 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
| 513 | 513 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 514 | 514 | |
| 515 | 515 | PORT_START |
| 516 | PORT_ | |
| 516 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW | |
| 517 | 517 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) |
| 518 | 518 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 519 | 519 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 726 | 726 | /* stop timer and clear ram.. used on megatech when we switch between genesis and sms mode */ |
| 727 | 727 | void segae_md_sms_stop_scanline_timer(void) |
| 728 | 728 | { |
| 729 | timer_adjust(md_sms_vdp->sms_scanline_timer, attotime_never, 0 | |
| 729 | timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime_never, 0 | |
| 730 | 730 | memset(md_sms_vdp->vram,0x00,0x4000); |
| 731 | 731 | } |
| 732 | 732 | |
| r1679 | r1680 | |
| 1293 | 1293 | if (chip->sms_scanline_counter<(chip->sms_total_scanlines-1)) |
| 1294 | 1294 | { |
| 1295 | 1295 | chip->sms_scanline_counter++; |
| 1296 | timer_adjust(chip->sms_scanline_timer, ATTOTIME_IN_HZ(chip->sms_framerate * chip->sms_total_scanlines), 0 | |
| 1296 | timer_adjust_oneshot(chip->sms_scanline_timer, ATTOTIME_IN_HZ(chip->sms_framerate * chip->sms_total_scanlines), 0 | |
| 1297 | 1297 | |
| 1298 | 1298 | if (chip->sms_scanline_counter>sms_mode_table[chip->screen_mode].sms2_height) |
| 1299 | 1299 | { |
| r1679 | r1680 | |
| 1458 | 1458 | |
| 1459 | 1459 | chip->sms_scanline_counter = -1; |
| 1460 | 1460 | chip->yscroll = chip->regs[0x9]; // this can't change mid-frame |
| 1461 | timer_adjust(chip->sms_scanline_timer, attotime_zero, 0 | |
| 1461 | timer_adjust_oneshot(chip->sms_scanline_timer, attotime_zero, 0 | |
| 1462 | 1462 | } |
| 1463 | 1463 | |
| 1464 | 1464 | #ifdef UNUSED_FUNCTION |
| r1679 | r1680 | |
| 1480 | 1480 | #ifdef UNUSED_FUNCTION |
| 1481 | 1481 | MACHINE_RESET(sms) |
| 1482 | 1482 | { |
| 1483 | timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0 | |
| 1483 | timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime_zero, 0 | |
| 1484 | 1484 | } |
| 1485 | 1485 | #endif |
| 1486 | 1486 | |
| r1679 | r1680 | |
| 1938 | 1938 | |
| 1939 | 1939 | static MACHINE_RESET(systeme) |
| 1940 | 1940 | { |
| 1941 | timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0, attotime_zero); | |
| 1942 | timer_adjust(vdp2->sms_scanline_timer, attotime_zero, 0, attotime_zero); | |
| 1941 | timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime_zero, 0); | |
| 1942 | timer_adjust_oneshot(vdp2->sms_scanline_timer, attotime_zero, 0); | |
| 1943 | 1943 | } |
| 1944 | 1944 | |
| 1945 | 1945 | MACHINE_RESET(megatech_md_sms) |
| 1946 | 1946 | { |
| 1947 | timer_adjust(md_sms_vdp->sms_scanline_timer, attotime_zero, 0 | |
| 1947 | timer_adjust_oneshot(md_sms_vdp->sms_scanline_timer, attotime_zero, 0 | |
| 1948 | 1948 | } |
| 1949 | 1949 | |
| 1950 | 1950 | MACHINE_RESET(megatech_bios) |
| 1951 | 1951 | { |
| 1952 | timer_adjust(vdp1->sms_scanline_timer, attotime_zero, 0 | |
| 1952 | timer_adjust_oneshot(vdp1->sms_scanline_timer, attotime_zero, 0 | |
| 1953 | 1953 | } |
| 1954 | 1954 | |
| 1955 | 1955 | static VIDEO_EOF(systeme) |
| r1679 | r1680 | |
|---|---|---|
| 463 | 463 | int i, n_this; |
| 464 | 464 | UINT8 sector_buffer[ 4096 ]; |
| 465 | 465 | |
| 466 | timer_adjust(atapi_timer, attotime_never, 0 | |
| 466 | timer_adjust_oneshot(atapi_timer, attotime_never, 0 | |
| 467 | 467 | |
| 468 | 468 | // verboselog( 2, "atapi_xfer_end( %d ) atapi_xferlen = %d, atapi_xfermod=%d\n", x, atapi_xfermod, atapi_xferlen ); |
| 469 | 469 | |
| r1679 | r1680 | |
| 508 | 508 | atapi_regs[ATAPI_REG_COUNTLOW] = atapi_xferlen & 0xff; |
| 509 | 509 | atapi_regs[ATAPI_REG_COUNTHIGH] = (atapi_xferlen>>8)&0xff; |
| 510 | 510 | |
| 511 | timer_adjust(atapi_timer, ATTOTIME_IN_CYCLES((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048)), 0), 0 | |
| 511 | timer_adjust_oneshot(atapi_timer, ATTOTIME_IN_CYCLES((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048)), 0), 0 | |
| 512 | 512 | } |
| 513 | 513 | else |
| 514 | 514 | { |
| r1679 | r1680 | |
| 734 | 734 | |
| 735 | 735 | case 0x45: // PLAY |
| 736 | 736 | atapi_regs[ATAPI_REG_CMDSTATUS] = ATAPI_STAT_BSY; |
| 737 | timer_adjust( atapi_timer, ATTOTIME_IN_CYCLES( ATAPI_CYCLES_PER_SECTOR, 0 ), 0 | |
| 737 | timer_adjust_oneshot( atapi_timer, ATTOTIME_IN_CYCLES( ATAPI_CYCLES_PER_SECTOR, 0 ), 0 | |
| 738 | 738 | break; |
| 739 | 739 | } |
| 740 | 740 | |
| r1679 | r1680 | |
| 906 | 906 | atapi_cdata_wait = 0; |
| 907 | 907 | |
| 908 | 908 | atapi_timer = timer_alloc( atapi_xfer_end , NULL); |
| 909 | timer_adjust(atapi_timer, attotime_never, 0 | |
| 909 | timer_adjust_oneshot(atapi_timer, attotime_never, 0 | |
| 910 | 910 | |
| 911 | 911 | for( i = 0; i < 2; i++ ) |
| 912 | 912 | { |
| r1679 | r1680 | |
| 973 | 973 | verboselog( 2, "atapi_xfer_end: %d %d\n", atapi_xferlen, atapi_xfermod ); |
| 974 | 974 | |
| 975 | 975 | // set a transfer complete timer (Note: CYCLES_PER_SECTOR can't be lower than 2000 or the BIOS ends up "out of order") |
| 976 | timer_adjust(atapi_timer, ATTOTIME_IN_CYCLES((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048)), 0), 0 | |
| 976 | timer_adjust_oneshot(atapi_timer, ATTOTIME_IN_CYCLES((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048)), 0), 0 | |
| 977 | 977 | } |
| 978 | 978 | |
| 979 | 979 | static UINT32 m_n_security_control; |
| r1679 | r1680 | |
| 1185 | 1185 | { |
| 1186 | 1186 | if( ( m_p_n_root_mode[ n_counter ] & RC_STOP ) != 0 ) |
| 1187 | 1187 | { |
| 1188 | timer_adjust( m_p_timer_root[ n_counter ], attotime_never, n_counter | |
| 1188 | timer_adjust_oneshot( m_p_timer_root[ n_counter ], attotime_never, n_counter | |
| 1189 | 1189 | } |
| 1190 | 1190 | else |
| 1191 | 1191 | { |
| r1679 | r1680 | |
| 1199 | 1199 | |
| 1200 | 1200 | n_duration *= root_divider( n_counter ); |
| 1201 | 1201 | |
| 1202 | timer_adjust( m_p_timer_root[ n_counter ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_duration), n_counter | |
| 1202 | timer_adjust_oneshot( m_p_timer_root[ n_counter ], attotime_mul(ATTOTIME_IN_HZ(33868800), n_duration), n_counter | |
| 1203 | 1203 | } |
| 1204 | 1204 | } |
| 1205 | 1205 | |
| r1679 | r1680 | |
| 2826 | 2826 | PORT_START_TAG("IN3") |
| 2827 | 2827 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2828 | 2828 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 2829 | PORT_ | |
| 2829 | PORT_SERVICE_NO_TOGGLE( 0x00000400, IP_ACTIVE_LOW | |
| 2830 | 2830 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 2831 | 2831 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 2832 | 2832 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| r1679 | r1680 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | static MACHINE_RESET( sbrkout ) |
| 99 | 99 | { |
| 100 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 100 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
| r1679 | r1680 | |
| 126 | 126 | if (scanline == machine->screen[0].visarea.max_y + 1) |
| 127 | 127 | { |
| 128 | 128 | UINT8 potvalue = readinputportbytag("PADDLE"); |
| 129 | timer_adjust(pot_timer, video_screen_get_time_until_pos(0, 72 + (potvalue / 2), (potvalue % 2) * 128), 0 | |
| 129 | timer_adjust_oneshot(pot_timer, video_screen_get_time_until_pos(0, 72 + (potvalue / 2), (potvalue % 2) * 128), 0 | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /* call us back in 4 scanlines */ |
| 133 | 133 | scanline += 4; |
| 134 | 134 | if (scanline >= machine->screen[0].height) |
| 135 | 135 | scanline = 0; |
| 136 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 136 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | |
| r1679 | r1680 | |
| 286 | 286 | |
| 287 | 287 | static VIDEO_START( sbrkout ) |
| 288 | 288 | { |
| 289 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 289 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | static VIDEO_START( livequiz ) |
| 68 | 68 | { |
| 69 | 69 | tmap = tilemap_create( get_tile_info, tilemap_scan_cols, |
| 70 | | |
| 70 | | |
| 71 | 71 | |
| 72 | 72 | tilemap_set_transparent_pen(tmap, 0); |
| 73 | 73 | } |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | /********************************************************************************** |
| 2 | 2 | |
| 3 | 3 | |
| 4 | FUNWORLD. | |
| 4 | FUNWORLD / TAB. | |
| 5 | 5 | |
| 6 | ||
| 7 | 6 | Original preliminary driver: Curt Coder, Peter Trauner. |
| 8 | 7 | Rewrite and aditional work: Roberto Fresca. |
| 9 | 8 | |
| 10 | 9 | |
| 10 | ||
| 11 | 11 | Games running in this hardware: |
| 12 | 12 | |
| 13 | * Jolly Card (Austria), TAB-Austria, 1985. | |
| 14 | * Jolly Card (Austria, encrypted), TAB-Austria, 1985. | |
| 15 | * Jolly Card (Croatia), Soft Design, 1993. | |
| 16 | * Jolly Card (Italia, encrypted), bootleg, 199?. | |
| 17 | * Jolly Card (Austria, Fun World, bootleg), Inter Games, 1995. | |
| 18 | * Big Deal (Hungary, set 1), Fun World, 1990. | |
| 19 | * Big Deal (Hungary, set 2), Fun World, 1990. | |
| 20 | * Jolly Card (Austria, Fun World), Fun World, 1990. | |
| 21 | * Cuore 1 (Italia), C.M.C., 1996. | |
| 22 | * Elephant Family (Italia, new), C.M.C., 1997. | |
| 23 | * Elephant Family (Italia, old), C.M.C., 1996. | |
| 24 | * Pool 10 (Italia, set 1), C.M.C., 1996. | |
| 25 | * Pool 10 (Italia, set 2), C.M.C., 1996. | |
| 26 | * Tortuga Family (Italia), C.M.C., 1997. | |
| 27 | * Royal Card (Austria, set 1), TAB-Austria, 1991. | |
| 28 | * Royal Card (Austria, set 2), TAB-Austria, 1991. | |
| 29 | * Royal Card (Slovakia, encrypted), Evona Electronic, 1991. | |
| 30 | * Magic Card II (Bulgaria, bootleg), Impera, 1996. | |
| 31 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. | |
| 32 | * Mongolfier New (Italia), bootleg, 199?. | |
| 33 | * Soccer New (Italia), bootleg, 199?. | |
| 34 | * Snooker 10 (Ver 1.11), Sandiy, 1998. | |
| 35 | * Saloon (France, encrypted), unknown, 199?. | |
| 13 | * Jolly Card (austrian), TAB-Austria, 1985. | |
| 14 | * Jolly Card (austrian, encrypted), TAB-Austria, 1985. | |
| 15 | * Jolly Card (3x3 deal), TAB-Austria, 1985. | |
| 16 | * Jolly Card Professional 2.0, Spale-Soft, 2000. | |
| 17 | * Jolly Card (croatian), Soft Design, 1993. | |
| 18 | * Jolly Card (italian, blue TAB board, encrypted), bootleg, 199?. | |
| 19 | * Jolly Card (austrian, Funworld, bootleg), Inter Games, 1986. | |
| 20 | * Big Deal (hungarian, set 1), Funworld, 1986. | |
| 21 | * Big Deal (hungarian, set 2), Funworld, 1986. | |
| 22 | * Jolly Card (austrian, Funworld), Funworld, 1986. | |
| 23 | * Cuore 1 (italian), C.M.C., 1996. | |
| 24 | * Elephant Family (italian, new), C.M.C., 1997. | |
| 25 | * Elephant Family (italian, old), C.M.C., 1996. | |
| 26 | * Pool 10 (italian, set 1), C.M.C., 1996. | |
| 27 | * Pool 10 (italian, set 2), C.M.C., 1996. | |
| 28 | * Tortuga Family (italian), C.M.C., 1997. | |
| 29 | * Royal Card (austrian, set 1), TAB-Austria, 1991. | |
| 30 | * Royal Card (austrian, set 2), TAB-Austria, 1991. | |
| 31 | * Royal Card (slovak, encrypted), Evona Electronic, 1991. | |
| 32 | * Lucky Lady (3x3 deal), TAB-Austria, 1991. | |
| 33 | * Lucky Lady (4x1 aces), TAB-Austria, 1991. | |
| 34 | * Magic Card II (bulgarian), Impera, 1996. | |
| 35 | * Magic Card II (green TAB or Impera board), Impera, 1996. | |
| 36 | * Magic Card II (blue TAB board, encrypted), Impera, 1996. | |
| 37 | * Royal Vegas Joker Card (slow deal), Funworld, 1993. | |
| 38 | * Royal Vegas Joker Card (fast deal), Soft Design, 1993. | |
| 39 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. | |
| 40 | * Mongolfier New (italian), bootleg, 199?. | |
| 41 | * Soccer New (italian), bootleg, 199?. | |
| 42 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 43 | * Saloon (french, encrypted), unknown, 199?. | |
| 36 | 44 | |
| 37 | 45 | |
| 38 | 46 | *********************************************************************************** |
| r1679 | r1680 | |
| 93 | 101 | |
| 94 | 102 | - Encryption. |
| 95 | 103 | |
| 96 | A) Encrypted CPU. At least two Fun | |
| 104 | A) Encrypted CPU. At least two Funw | |
| 97 | 105 | |
| 98 | 106 | - Joker Card from Vesely Svet use a custom unknown CPU and use encrypted prg roms. |
| 99 | - Royal Card ( | |
| 107 | - Royal Card (slovak | |
| 100 | 108 | with CPU + extras (ICs, TTL, etc) to manage the encryption. |
| 101 | 109 | |
| 102 | 110 | B) General encryption. Managed through hardware: |
| 103 | 111 | |
| 104 | - Jolly Card (Italia, encrypted GFXs) use substitution for each byte nibble. See DRIVER_INIT for the algorythm. | |
| 105 | - Jolly Card (Austria, encrypted) use simple XOR with a fixed value. | |
| 112 | - Jolly Card (italian, blue TAB board, encrypted) & Magic Card II (Impera, Blue TAB board) | |
| 113 | use substitution for each byte nibble. See DRIVER_INIT for the algorithm. | |
| 114 | - Jolly Card (austrian, encrypted) use simple XOR with a fixed value. | |
| 106 | 115 | |
| 107 | 116 | - Microcontroller. Some games are using an extra microcontroller mainly for protection. |
| 108 | 117 | |
| r1679 | r1680 | |
| 157 | 166 | the supported set is the program rom that is double sized, having identical halves. |
| 158 | 167 | |
| 159 | 168 | |
| 160 | - Jolly Card ( | |
| 169 | - Jolly Card (austrian, Funw | |
| 161 | 170 | |
| 162 | 171 | This one seems to have normal RAM instead of NVRAM. |
| 163 | 172 | Going through the code, there's not any NVRAM initialization routine through service 1 & 2. |
| 164 | 173 | |
| 165 | 174 | |
| 175 | - Jolly Card Professional 2.0 (Spale-Soft) | |
| 176 | ||
| 177 | Each 1st boot, this game show a generated code. You must enter this code in a DOS program to | |
| 178 | get the input codes necessary to allow boot the game. | |
| 179 | ||
| 180 | ||
| 181 | - Magic Card II (Impera) | |
| 182 | ||
| 183 | Impera made 2 graphics sets for this game. One of them is encrypted, and meant for the TAB blue board. | |
| 184 | This board has two HY18CV85 (electrically-erasable PLD) that handle the encryption. | |
| 185 | In another hand, the sound has some weir things. | |
| 186 | ||
| 187 | ||
| 166 | 188 | - Mongolfier New |
| 167 | 189 | - Soccer New |
| 168 | 190 | |
| r1679 | r1680 | |
| 176 | 198 | a complete Royal Card set, so... Is possible the existence of a shortcut,'easter egg', |
| 177 | 199 | simple hack or DIP switches combination to enable the Royal Card game. |
| 178 | 200 | |
| 201 | These games should be moved to a new driver in a near future, as soon as we know a bit more | |
| 202 | about them and start to implement the missing pieces for an accurate emulation. | |
| 179 | 203 | |
| 204 | ||
| 180 | 205 | - Snooker 10 |
| 181 | 206 | |
| 182 | 207 | This game is running in a complete different hardware. |
| r1679 | r1680 | |
| 322 | 347 | --------------------------------------------------- |
| 323 | 348 | |
| 324 | 349 | |
| 325 | Jolly Card ( | |
| 350 | Jolly Card (austrian, Funw | |
| 326 | 351 | ---------------------------------------- |
| 327 | 352 | |
| 328 | 353 | - 1x G65SC02P (CPU) |
| r1679 | r1680 | |
| 350 | 375 | - 1x Crystal : 16.000 MHz |
| 351 | 376 | |
| 352 | 377 | |
| 353 | Jolly Card (Italia) | |
| 354 | ------------------- | |
| 378 | Jolly Card (italian, blue Tab board, encrypted) | |
| 379 | ----------------------------------------------- | |
| 355 | 380 | |
| 356 | 381 | - 1x HY6264LP |
| 357 | 382 | - 1x MC6845P |
| r1679 | r1680 | |
| 364 | 389 | 1x M5M27256 (jn) |
| 365 | 390 | - 1x prom N82S147 |
| 366 | 391 | - 1x GAL16V8B |
| 392 | - 2x HY18CV85 (electrically-erasable PLD) | |
| 367 | 393 | - 1x 8 DIP switches |
| 368 | 394 | - 1x 22x2 edge connector |
| 369 | 395 | - 1x 18x2 edge connector |
| 370 | 396 | - 1x trimmer (volume)(missing) |
| 371 | 397 | |
| 372 | 398 | |
| 373 | Big Deal ( | |
| 399 | Big Deal (hungarian) | |
| 374 | 400 | ------------------ |
| 375 | 401 | |
| 376 | 402 | - 1x MC6845P |
| r1679 | r1680 | |
| 379 | 405 | - 1x Crystal 16.000 MHz |
| 380 | 406 | |
| 381 | 407 | |
| 382 | Magic Card II ( | |
| 408 | Magic Card II (bulgarian | |
| 383 | 409 | --------------------------------- |
| 384 | 410 | |
| 385 | 411 | - 1x Special CPU with CM602 (??) on it |
| r1679 | r1680 | |
| 387 | 413 | - 1x YM2149F |
| 388 | 414 | - 2x MC6821P |
| 389 | 415 | - 1x Crystal 16.000 MHz |
| 416 | - 2x HY18CV85 (electrically-erasable PLD) | |
| 390 | 417 | |
| 391 | 418 | |
| 392 | Cuore Uno (Italia) | |
| 393 | ------------------ | |
| 419 | Cuore Uno (italian) | |
| 420 | ----------------------------------- | |
| 394 | 421 | |
| 395 | 422 | - CPU 1x G65SC02P |
| 396 | 423 | - 1x MC68B45P (CRT controller) |
| r1679 | r1680 | |
| 408 | 435 | - 1x battery |
| 409 | 436 | |
| 410 | 437 | |
| 411 | Elephant Family ( | |
| 438 | Elephant Family (italian, old) | |
| 412 | 439 | ----------------------------- |
| 413 | 440 | |
| 414 | 441 | - CPU 1x R65C02P2 |
| r1679 | r1680 | |
| 427 | 454 | - 1x battery |
| 428 | 455 | |
| 429 | 456 | |
| 430 | Pool 10 (Italia) | |
| 431 | ---------------- | |
| 457 | Pool 10 (italian) | |
| 458 | ----------------- | |
| 432 | 459 | |
| 433 | 460 | - 1x R65C02P2 (main) |
| 434 | 461 | - 1x YM2149F (sound) |
| r1679 | r1680 | |
| 448 | 475 | - 1x battery |
| 449 | 476 | |
| 450 | 477 | |
| 451 | Tortuga Family (Italia) | |
| 452 | ----------------------- | |
| 478 | Tortuga Family (italian) | |
| 479 | ------------------------ | |
| 453 | 480 | |
| 454 | 481 | - 1x G65SC02P2 (main) |
| 455 | 482 | - 1x 95101 (sound) |
| r1679 | r1680 | |
| 555 | 582 | - 1x green led |
| 556 | 583 | |
| 557 | 584 | |
| 558 | Soccer New (Italia) | |
| 559 | ------------------- | |
| 585 | Soccer New (italian) | |
| 586 | -------------------- | |
| 560 | 587 | |
| 561 | 588 | - 1x G65SC02P2 (main) |
| 562 | 589 | - 1x KC89C72 (sound) |
| r1679 | r1680 | |
| 736 | 763 | - Added new game: Saloon (France, encrypted). Preliminary. |
| 737 | 764 | - Updated technical notes. |
| 738 | 765 | |
| 766 | 2008/02/10 | |
| 767 | - Switched to XTAL def. | |
| 768 | - Fixed Magic Card II graphics issues. | |
| 769 | - Fixed Magic Card II inputs. | |
| 770 | - Fixed screen and visible area to snooker10. | |
| 771 | - Renamed set monglfir to mongolnw. | |
| 772 | - Renamed sets description based on languages instead of countries. | |
| 773 | - Added new game: Magic Card II (green TAB or Impera board). Not working yet. | |
| 774 | - Added new game: Magic Card II (blue TAB board, encrypted). Not working yet. | |
| 775 | - Added new game: Jolly Card (3x3 deal). | |
| 776 | - Added new game: Jolly Card Professional 2.0 (with 'enter code' screen to boot). | |
| 777 | - Added new game: Lucky Lady (3x3 deal). | |
| 778 | - Added new game: Lucky Lady (4x1 aces). | |
| 779 | - Added new game: Royal Vegas Joker Card (fast deal). | |
| 780 | - Added new game: Royal Vegas Joker Card (slow deal). | |
| 781 | - Fixed some years and manufacturers. | |
| 782 | - Updated technical notes. | |
| 783 | - Cleaned up the driver. | |
| 739 | 784 | |
| 740 | 785 | |
| 741 | 786 | *** TO DO *** |
| 742 | 787 | |
| 743 | - Fix the last 2 GFX planes in magiccrd. | |
| 744 | 788 | - Figure out the royalcdc, jokercrd and saloon encryption. |
| 789 | - Fix the imperfect sound in Magic Card II. | |
| 790 | - Reverse-engineering the boot code of Jolly Card Professional 2.0 to get the proper input codes to boot. | |
| 745 | 791 | - Analyze the unknown writes to $2000/$4000 in some games. |
| 746 | 792 | - Check for the reads to the ay8910 output ports in some games. |
| 747 | 793 | - Figure out the MCU in monglfir and soccernw. |
| r1679 | r1680 | |
| 751 | 797 | ***********************************************************************************/ |
| 752 | 798 | |
| 753 | 799 | |
| 754 | #define MASTER_CLOCK 16 | |
| 800 | #define MASTER_CLOCK XTAL_16MHz | |
| 755 | 801 | |
| 756 | 802 | #include "driver.h" |
| 757 | 803 | #include "sound/ay8910.h" |
| 758 | #include "video/crtc6845.h" | |
| 759 | 804 | #include "machine/6821pia.h" |
| 760 | 805 | |
| 761 | 806 | #include "funworld.lh" |
| 762 | 807 | |
| 763 | 808 | /* from video */ |
| 764 | extern WRITE8_HANDLER( funworld_videoram_w ); | |
| 765 | extern WRITE8_HANDLER( funworld_colorram_w ); | |
| 766 | extern PALETTE_INIT( funworld ); | |
| 767 | extern VIDEO_START( funworld ); | |
| 768 | extern VIDEO_START( magiccrd ); | |
| 769 | extern VIDEO_UPDATE( funworld ); | |
| 809 | WRITE8_HANDLER( funworld_videoram_w ); | |
| 810 | WRITE8_HANDLER( funworld_colorram_w ); | |
| 811 | WRITE8_HANDLER( funworld_mc6845_address_w ); | |
| 812 | READ8_HANDLER( funworld_mc6845_register_r ); | |
| 813 | WRITE8_HANDLER( funworld_mc6845_register_w ); | |
| 814 | PALETTE_INIT( funworld ); | |
| 815 | VIDEO_START( funworld ); | |
| 816 | VIDEO_START( magiccrd ); | |
| 817 | VIDEO_START( snookr10 ); | |
| 818 | VIDEO_UPDATE( funworld ); | |
| 770 | 819 | |
| 771 | 820 | |
| 772 | 821 | /********************** |
| r1679 | r1680 | |
| 804 | 853 | AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w) |
| 805 | 854 | AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w) |
| 806 | 855 | AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w) |
| 807 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(crtc6845_address_w) | |
| 808 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 856 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_mc6845_address_w) | |
| 857 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_mc6845_register_r, funworld_mc6845_register_w) | |
| 809 | 858 | AM_RANGE(0x2000, 0x2fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| 810 | 859 | AM_RANGE(0x3000, 0x3fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) |
| 811 | 860 | AM_RANGE(0x4000, 0x4000) AM_READNOP |
| r1679 | r1680 | |
| 819 | 868 | AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w) |
| 820 | 869 | AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w) |
| 821 | 870 | AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w) |
| 822 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(crtc6845_address_w) | |
| 823 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 871 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_mc6845_address_w) | |
| 872 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_mc6845_register_r, funworld_mc6845_register_w) | |
| 824 | 873 | AM_RANGE(0x3600, 0x36ff) AM_RAM // some games use $3603-05 range for protection. |
| 825 | 874 | AM_RANGE(0x4000, 0x4fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| 826 | 875 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) |
| r1679 | r1680 | |
| 833 | 882 | AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w) |
| 834 | 883 | AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w) |
| 835 | 884 | AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w) |
| 836 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(crtc6845_address_w) | |
| 837 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 885 | AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_mc6845_address_w) | |
| 886 | AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_mc6845_register_r, funworld_mc6845_register_w) | |
| 838 | 887 | AM_RANGE(0x2000, 0x2000) AM_READNOP // some unknown reads |
| 839 | 888 | AM_RANGE(0x3e00, 0x3fff) AM_RAM // some games use $3e03-05 range for protection. |
| 840 | 889 | AM_RANGE(0x6000, 0x6fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| r1679 | r1680 | |
| 848 | 897 | AM_RANGE(0x2a00, 0x2a03) AM_READWRITE(pia_1_r, pia_1_w) |
| 849 | 898 | AM_RANGE(0x2c00, 0x2c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w) |
| 850 | 899 | AM_RANGE(0x2c01, 0x2c01) AM_WRITE(AY8910_write_port_0_w) |
| 851 | AM_RANGE(0x2e00, 0x2e00) AM_WRITE(crtc6845_address_w) | |
| 852 | AM_RANGE(0x2e01, 0x2e01) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 900 | AM_RANGE(0x2e00, 0x2e00) AM_WRITE(funworld_mc6845_address_w) | |
| 901 | AM_RANGE(0x2e01, 0x2e01) AM_READWRITE(funworld_mc6845_register_r, funworld_mc6845_register_w) | |
| 853 | 902 | AM_RANGE(0x4000, 0x4fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| 854 | 903 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) |
| 855 | 904 | AM_RANGE(0x6000, 0xffff) AM_ROM |
| r1679 | r1680 | |
| 1134 | 1183 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C) |
| 1135 | 1184 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1136 | 1185 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1137 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_ | |
| 1186 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hopper SW") PORT_CODE(KEYCODE_8) | |
| 1138 | 1187 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1139 | 1188 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1140 | 1189 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) |
| r1679 | r1680 | |
| 1156 | 1205 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") // remote credits settings are always 10 Points/Pulse. |
| 1157 | 1206 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1158 | 1207 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1159 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_ | |
| 1208 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:6") | |
| 1160 | 1209 | PORT_DIPSETTING( 0x00, "5 Points/Coin" ) |
| 1161 | 1210 | PORT_DIPSETTING( 0x04, "10 Points/Coin" ) |
| 1162 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Coin_ | |
| 1211 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5") | |
| 1163 | 1212 | PORT_DIPSETTING( 0x00, "5 Points/Coin" ) |
| 1164 | 1213 | PORT_DIPSETTING( 0x08, "10 Points/Coin" ) |
| 1165 | 1214 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") |
| r1679 | r1680 | |
| 1422 | 1471 | MDRV_DEFAULT_LAYOUT(layout_funworld) |
| 1423 | 1472 | |
| 1424 | 1473 | MDRV_PALETTE_LENGTH(0x200) |
| 1425 | MDRV_COLORTABLE_LENGTH(0x200) | |
| 1426 | 1474 | MDRV_PALETTE_INIT(funworld) |
| 1427 | 1475 | MDRV_VIDEO_START(funworld) |
| 1428 | 1476 | MDRV_VIDEO_UPDATE(funworld) |
| r1679 | r1680 | |
| 1450 | 1498 | MDRV_CPU_PROGRAM_MAP(magiccrd_map, 0) |
| 1451 | 1499 | |
| 1452 | 1500 | MDRV_SCREEN_SIZE((123+1)*4, (36+1)*8) // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). |
| 1453 | MDRV_SCREEN_VISIBLE_AREA(0*4, 112*4-1, 0*8, 34*8-1) // Taken from MC6845 init, registers 01 & 06. | |
| 1454 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 98*4-1, 0*8, 32*8-1) // adjusted to screen for testing purposes. | |
| 1501 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 112*4-1, 0*8, 34*8-1) // Taken from MC6845 init, registers 01 & 06. | |
| 1502 | MDRV_SCREEN_VISIBLE_AREA(0*4, 98*4-1, 0*8, 32*8-1) // adjusted to screen for testing purposes. | |
| 1455 | 1503 | |
| 1456 | 1504 | MDRV_GFXDECODE(funworld) |
| 1457 | 1505 | MDRV_VIDEO_START(magiccrd) |
| r1679 | r1680 | |
| 1493 | 1541 | // video hardware |
| 1494 | 1542 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 1495 | 1543 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1496 | MDRV_SCREEN_SIZE((124+1)*4, (30+1)*8) | |
| 1497 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) | |
| 1544 | MDRV_SCREEN_SIZE((128+1)*4, (30+1)*8) | |
| 1545 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 30*8-1) | |
| 1546 | // MDRV_SCREEN_SIZE((124+1)*4, (30+1)*8) | |
| 1547 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) | |
| 1498 | 1548 | |
| 1499 | 1549 | MDRV_GFXDECODE(sn10) |
| 1500 | 1550 | |
| 1501 | 1551 | // MDRV_DEFAULT_LAYOUT(layout_funworld) |
| 1502 | 1552 | |
| 1503 | 1553 | MDRV_PALETTE_LENGTH(0x200) |
| 1504 | MDRV_COLORTABLE_LENGTH(0x200) | |
| 1505 | 1554 | MDRV_PALETTE_INIT(funworld) |
| 1506 | MDRV_VIDEO_START( | |
| 1555 | MDRV_VIDEO_START(s | |
| 1507 | 1556 | MDRV_VIDEO_UPDATE(funworld) |
| 1508 | 1557 | MACHINE_DRIVER_END |
| 1509 | 1558 | |
| r1679 | r1680 | |
| 1536 | 1585 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1537 | 1586 | ROM_END |
| 1538 | 1587 | |
| 1588 | ROM_START( jolyc3x3 ) | |
| 1589 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1590 | ROM_LOAD( "jc3x3.bin", 0x8000, 0x8000, CRC(71e304ad) SHA1(238b792d841432582c94b21a674d46a95e8f3826) ) | |
| 1591 | ||
| 1592 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1593 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) | |
| 1594 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) | |
| 1595 | ||
| 1596 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1597 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1598 | ROM_END | |
| 1599 | ||
| 1600 | ROM_START( jolyc980 ) | |
| 1601 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1602 | ROM_LOAD( "j980.bin", 0x8000, 0x8000, CRC(48249fff) SHA1(390cd0eb3399446a66363dc6760458170e1970fd) ) | |
| 1603 | ||
| 1604 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1605 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) | |
| 1606 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) | |
| 1607 | ||
| 1608 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1609 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1610 | ROM_END | |
| 1611 | ||
| 1539 | 1612 | ROM_START( jolycdcr ) |
| 1540 | 1613 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1541 | 1614 | ROM_LOAD( "jollypkr.003", 0x8000, 0x8000, CRC(ea7340b4) SHA1(7dd468f28a488a4781521809d06db1d7917048ad) ) |
| r1679 | r1680 | |
| 1563 | 1636 | ROM_LOAD( "gal16v8b.bin", 0x0000, 0x0117, CRC(3ad712b1) SHA1(54214841fb178e4b59bf6051522718f7667bad28) ) |
| 1564 | 1637 | ROM_END |
| 1565 | 1638 | |
| 1566 | ROM_START( jolycdat ) // there are unused pieces of code that compare or jumps within $4000-$5000 range. | |
| 1567 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1568 | ROM_LOAD( "bonucard.cpu", 0x8000, 0x4000, CRC(da342100) SHA1(451fa6074aad19e9efd148c3d18115a20a3d344a) ) | |
| 1569 | ROM_CONTINUE( 0xc000, 0x4000 ) | |
| 1570 | ||
| 1571 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1572 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) | |
| 1573 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) | |
| 1574 | ||
| 1575 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1576 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. | |
| 1577 | ROM_END | |
| 1578 | ||
| 1579 | 1639 | ROM_START( jolycdab ) |
| 1580 | 1640 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) // program is testing/writting RAM in offset $8800-$BFFF (ROM)...?? |
| 1581 | 1641 | ROM_LOAD( "ig1poker.run", 0x8000, 0x8000, CRC(c96e6542) SHA1(ed6c0cf9fe8597dba9149b2225320d8d9c39219a) ) |
| r1679 | r1680 | |
| 1613 | 1673 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. |
| 1614 | 1674 | ROM_END |
| 1615 | 1675 | |
| 1676 | ROM_START( jolycdat ) // there are unused pieces of code that compare or jumps within $4000-$5000 range. | |
| 1677 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1678 | ROM_LOAD( "bonucard.cpu", 0x8000, 0x4000, CRC(da342100) SHA1(451fa6074aad19e9efd148c3d18115a20a3d344a) ) | |
| 1679 | ROM_CONTINUE( 0xc000, 0x4000 ) | |
| 1680 | ||
| 1681 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1682 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) | |
| 1683 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) | |
| 1684 | ||
| 1685 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1686 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. | |
| 1687 | ROM_END | |
| 1688 | ||
| 1616 | 1689 | ROM_START( cuoreuno ) |
| 1617 | 1690 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1618 | 1691 | ROM_LOAD( "cuore1a.u2", 0x8000, 0x8000, CRC(6e112184) SHA1(283ac534fc1cb33d11bbdf3447630333f2fc957f) ) |
| r1679 | r1680 | |
| 1769 | 1842 | ROM_LOAD( "2-peel18cv8p.bin", 0x0400, 0x0155, NO_DUMP ) // not present in the set. |
| 1770 | 1843 | ROM_END |
| 1771 | 1844 | |
| 1772 | ROM_START( magiccrd ) | |
| 1845 | ROM_START( lluck3x3 ) | |
| 1846 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1847 | ROM_LOAD( "l3x3.bin", 0x8000, 0x8000, CRC(dbdb07ff) SHA1(6be43aa0b2c10d83373f20f477606cb031bc6dd9) ) | |
| 1848 | ||
| 1849 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1850 | ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) | |
| 1851 | ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) | |
| 1852 | ||
| 1853 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1854 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) | |
| 1855 | ROM_END | |
| 1856 | ||
| 1857 | ROM_START( lluck4x1 ) | |
| 1858 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1859 | ROM_LOAD( "rk4x1.bin", 0x8000, 0x8000, CRC(37f8a355) SHA1(a6eb4c53464e373bdecbbaaf146f5f7cf66b4bcd) ) | |
| 1860 | ||
| 1861 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1862 | ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) | |
| 1863 | ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) | |
| 1864 | ||
| 1865 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1866 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) | |
| 1867 | ROM_END | |
| 1868 | ||
| 1869 | ROM_START( magiccrd ) /* Impera */ | |
| 1773 | 1870 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1774 | 1871 | ROM_LOAD( "magicard.004", 0x0000, 0x8000, CRC(f6e948b8) SHA1(7d5983015a508ab135ccbf69b7f3c526c229e3ef) ) // only last 16kbyte visible? |
| 1775 | 1872 | ROM_LOAD( "magicard.01", 0x8000, 0x10000, CRC(c94767d4) SHA1(171ac946bdf2575f9e4a31e534a8e641597af519) ) // 1ST AND 2ND HALF IDENTICAL |
| 1776 | 1873 | |
| 1777 | 1874 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1778 | ROM_LOAD( "magicard.03", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) | |
| 1779 | ROM_LOAD( "magicard.001", 0x8000, 0x8000, CRC(685f7a67) SHA1(fc65a9d26a5cbbe2fa08dc0f27212dae2d8bcbdc) ) // bad dump?, or sprite plane | |
| 1875 | ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) | |
| 1876 | ROM_LOAD( "mc2gr1.bin", 0x8000, 0x8000, CRC(2406b8d2) SHA1(e9d7a25562fd5adee351d7ef6ba02fff6aab021a) ) | |
| 1780 | 1877 | |
| 1781 | 1878 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 1782 | ROM_LOAD( "82s147_mc.bin", 0x0000, 0x0200, NO_DUMP ) // not present in the set. | |
| 1879 | ROM_LOAD( "mc2-82s147.bin", 0x0000, 0x0200, CRC(aa91cc35) SHA1(79f9a755441500e618c4183f524f969fffd44100) ) | |
| 1880 | ||
| 1881 | ROM_REGION( 0x0200, REGION_PLDS, 0 ) | |
| 1882 | ROM_LOAD( "gal16v8uni.bin", 0x0000, 0x0117, CRC(b81d7e0a) SHA1(7fef0b2bcea931a830d38ae0f1102434cf281d2d) ) | |
| 1783 | 1883 | ROM_END |
| 1784 | 1884 | |
| 1885 | ROM_START( magiccda ) /* for green TAB or Impera boards */ | |
| 1886 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1887 | ROM_LOAD( "mc2prgv1.bin", 0x8000, 0x8000, CRC(7f759b70) SHA1(23a1a6e8eda57c4a90c51a970302f9a7bf590083) ) | |
| 1888 | // ROM_LOAD( "mc2prgv2.bin", 0x8000, 0x8000, CRC(b0ed6b40) SHA1(7167e67608f1b0b1cd956c838dacc1310861cb4a) ) | |
| 1889 | ||
| 1890 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1891 | ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) | |
| 1892 | ROM_LOAD( "mc2gr1.bin", 0x8000, 0x8000, CRC(2406b8d2) SHA1(e9d7a25562fd5adee351d7ef6ba02fff6aab021a) ) | |
| 1893 | ||
| 1894 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1895 | ROM_LOAD( "mc2-82s147.bin", 0x0000, 0x0200, CRC(aa91cc35) SHA1(79f9a755441500e618c4183f524f969fffd44100) ) | |
| 1896 | ||
| 1897 | ROM_REGION( 0x0200, REGION_PLDS, 0 ) | |
| 1898 | ROM_LOAD( "gal16v8uni.bin", 0x0000, 0x0117, CRC(b81d7e0a) SHA1(7fef0b2bcea931a830d38ae0f1102434cf281d2d) ) | |
| 1899 | ROM_END | |
| 1900 | ||
| 1901 | ROM_START( magiccdb ) /* for blue TAB board (encrypted)*/ | |
| 1902 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1903 | // ROM_LOAD( "mc2prgv1.bin", 0x8000, 0x8000, CRC(7f759b70) SHA1(23a1a6e8eda57c4a90c51a970302f9a7bf590083) ) | |
| 1904 | ROM_LOAD( "mc2prgv2.bin", 0x8000, 0x8000, CRC(b0ed6b40) SHA1(7167e67608f1b0b1cd956c838dacc1310861cb4a) ) | |
| 1905 | ||
| 1906 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1907 | ROM_LOAD( "mc2gr1b.bin", 0x0000, 0x8000, CRC(ce2629a7) SHA1(84767ed5da8dcee44a210255537e10372bcc264b) ) | |
| 1908 | ROM_LOAD( "mc2gr2b.bin", 0x8000, 0x8000, CRC(d2bf8bde) SHA1(975b8f43a0396c09e357b96d5ae7381b12152b9e) ) | |
| 1909 | ||
| 1910 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1911 | ROM_LOAD( "mc2-82s147.bin", 0x0000, 0x0200, CRC(aa91cc35) SHA1(79f9a755441500e618c4183f524f969fffd44100) ) | |
| 1912 | ||
| 1913 | ROM_REGION( 0x0200, REGION_PLDS, 0 ) | |
| 1914 | ROM_LOAD( "gal16v8uni.bin", 0x0000, 0x0117, CRC(b81d7e0a) SHA1(7fef0b2bcea931a830d38ae0f1102434cf281d2d) ) | |
| 1915 | ROM_END | |
| 1916 | ||
| 1917 | ROM_START( vegasslw ) | |
| 1918 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1919 | ROM_LOAD( "vslow.bin", 0x8000, 0x8000, CRC(9cb7861a) SHA1(f934eacd5b3573a6bbeaa827f521b4a498e5bcdf) ) | |
| 1920 | ||
| 1921 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1922 | ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) | |
| 1923 | ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) | |
| 1924 | ||
| 1925 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1926 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1927 | ROM_END | |
| 1928 | ||
| 1929 | ROM_START( vegasfst ) | |
| 1930 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1931 | ROM_LOAD( "vfast.bin", 0x8000, 0x8000, CRC(87dfb28d) SHA1(9a06e695e59722b6c97e5a9fd2c8b238661e5a4a) ) | |
| 1932 | ||
| 1933 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1934 | ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) | |
| 1935 | ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) | |
| 1936 | ||
| 1937 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1938 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1939 | ROM_END | |
| 1940 | ||
| 1785 | 1941 | ROM_START( jokercrd ) |
| 1786 | 1942 | /* (Multi) Joker Card from Vesely Svet (Sprightly World). Czech poker game. |
| 1787 | Program roms seems encrypted. Custom Fun | |
| 1943 | Program roms seems encrypted. Custom Funw | |
| 1788 | 1944 | Seems to be a Big Deal clone. |
| 1789 | 1945 | */ |
| 1790 | 1946 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| r1679 | r1680 | |
| 1800 | 1956 | ROM_LOAD( "ic13.bin", 0x0000, 0x0200, CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) |
| 1801 | 1957 | ROM_END |
| 1802 | 1958 | |
| 1803 | ROM_START( mongl | |
| 1959 | ROM_START( mongolnw | |
| 1804 | 1960 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) |
| 1805 | 1961 | ROM_LOAD( "prgteov.2.3m.u16", 0x10000, 0x10000, CRC(996b851a) SHA1(ef4e3d036ca10b33c83749024d04c4d4c09feeb7) ) |
| 1806 | 1962 | ROM_COPY( REGION_CPU1, 0x18000, 0x8000, 0x8000 ) |
| r1679 | r1680 | |
| 1883 | 2039 | pia_config(1, &pia1_intf); |
| 1884 | 2040 | } |
| 1885 | 2041 | |
| 1886 | static DRIVER_INIT( | |
| 2042 | static DRIVER_INIT( | |
| 1887 | 2043 | { |
| 1888 | /* The encryption seems to be... | |
| 2044 | /* +----------------------------------------------------------------------+ | |
| 2045 | | For TAB blue colored PCB with 2 HY18CV85 (electrically-erasable PLD) | | |
| 2046 | +----------------------------------------------------------------------+ | |
| 1889 | 2047 | |
| 2048 | The encryption seems to be... | |
| 2049 | ||
| 1890 | 2050 | For each nibble: |
| 1891 | 2051 | |
| 1892 | 2052 | xe = (3 * xd) & 0f ; where xe = encrypted value, xd = decrypted value. |
| r1679 | r1680 | |
| 2003 | 2163 | * Game Drivers * |
| 2004 | 2164 | *************************/ |
| 2005 | 2165 | |
| 2006 | // YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME | |
| 2007 | GAME( 1985, jollycrd, 0, funworld, funworld, funworld, ROT0, "TAB-Austria", "Jolly Card (Austria)", 0 ) | |
| 2008 | GAME( 1985, jolycdae, jollycrd, funworld, funworld, jolycdae, ROT0, "TAB-Austria", "Jolly Card (Austria, encrypted)", 0 ) | |
| 2009 | GAME( 1993, jolycdcr, jollycrd, cuoreuno, jolycdcr, funworld, ROT0, "Soft Design", "Jolly Card (Croatia)", 0 ) | |
| 2010 | GAME( 199?, jolycdit, jollycrd, cuoreuno, jolycdit, jolycdit, ROT0, "bootleg", "Jolly Card (Italia, encrypted)", 0 ) | |
| 2011 | GAME( 1990, jolycdab, jollycrd, funworld, funworld, funworld, ROT0, "Inter Games", "Jolly Card (Austria, Fun World, bootleg)", GAME_NOT_WORKING ) | |
| 2012 | GAME( 1986, bigdeal, 0, bigdeal, bigdeal, funworld, ROT0, "Fun World", "Big Deal (Hungary, set 1)", GAME_IMPERFECT_COLORS ) | |
| 2013 | GAME( 1986, bigdealb, bigdeal, bigdeal, bigdeal, funworld, ROT0, "Fun World", "Big Deal (Hungary, set 2)", GAME_IMPERFECT_COLORS ) | |
| 2014 | GAME( 1986, jolycdat, bigdeal, bigdeal, bigdeal, funworld, ROT0, "Fun World", "Jolly Card (Austria, Fun World)", GAME_IMPERFECT_COLORS ) | |
| 2015 | GAME( 1996, cuoreuno, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Cuore 1 (Italia)", 0 ) | |
| 2016 | GAME( 1997, elephfam, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Elephant Family (Italia, new)", 0 ) | |
| 2017 | GAME( 1996, elephfmb, elephfam, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Elephant Family (Italia, old)", 0 ) | |
| 2018 | GAME( 1996, pool10, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Pool 10 (Italia, set 1)", 0 ) | |
| 2019 | GAME( 1996, pool10b, pool10, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Pool 10 (Italia, set 2)", 0 ) | |
| 2020 | GAME( 1997, tortufam, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Tortuga Family (Italia)", 0 ) | |
| 2021 | GAME( 1991, royalcrd, 0, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Royal Card (Austria, set 1)", 0 ) | |
| 2022 | GAME( 1991, royalcdb, royalcrd, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Royal Card (Austria, set 2)", 0 ) | |
| 2023 | GAME( 1991, royalcdc, royalcrd, royalcrd, royalcrd, funworld, ROT0, "Evona Electronic","Royal Card (Slovakia, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 2024 | GAME( 1996, magiccrd, 0, magiccrd, magiccrd, funworld, ROT0, "Impera", "Magic Card II (Bulgaria, bootleg)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 2025 | GAME( 1993, jokercrd, 0, funworld, funworld, funworld, ROT0, "Vesely Svet", "Joker Card (Ver.A267BC, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 2026 | GAME( 199?, monglfir, 0, royalmcu, royalcrd, funworld, ROT0, "bootleg", "Mongolfier New (Italia)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2027 | GAME( 199?, soccernw, 0, royalcrd, royalcrd, soccernw, ROT0, "bootleg", "Soccer New (Italia)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2028 | GAME( 1998, snookr10, 0, snookr10, snookr10, 0, ROT0, "Sandiy", "Snooker 10 (Ver 1.11)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2029 | GAME( 198?, saloon, 0, funworld, funworld, funworld, ROT0, "Unknown", "Saloon (France, encrypted)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2166 | /* YEAR NAME PARENT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 2167 | GAME( 1985, jollycrd, 0, funworld, funworld, funworld, ROT0, "TAB-Austria", "Jolly Card (austrian)", 0 ) | |
| 2168 | GAME( 1985, jolycdae, jollycrd, funworld, funworld, jolycdae, ROT0, "TAB-Austria", "Jolly Card (austrian, encrypted)", 0 ) | |
| 2169 | GAME( 1985, jolyc3x3, jollycrd, funworld, funworld, funworld, ROT0, "TAB-Austria", "Jolly Card (3x3 deal)", 0 ) | |
| 2170 | GAME( 2000, jolyc980, jollycrd, cuoreuno, funworld, funworld, ROT0, "Spale-Soft", "Jolly Card Professional 2.0", 0 ) | |
| 2171 | GAME( 1993, jolycdcr, jollycrd, cuoreuno, jolycdcr, funworld, ROT0, "Soft Design", "Jolly Card (croatian)", 0 ) | |
| 2172 | GAME( 199?, jolycdit, jollycrd, cuoreuno, jolycdit, tabblue, ROT0, "bootleg", "Jolly Card (italian, blue TAB board, encrypted)", 0 ) | |
| 2173 | GAME( 1986, jolycdab, jollycrd, funworld, funworld, funworld, ROT0, "Inter Games", "Jolly Card (austrian, Funworld, bootleg)", GAME_NOT_WORKING ) | |
| 2174 | GAME( 1986, bigdeal, 0, bigdeal, bigdeal, funworld, ROT0, "Funworld", "Big Deal (hungarian, set 1)", GAME_IMPERFECT_COLORS ) | |
| 2175 | GAME( 1986, bigdealb, bigdeal, bigdeal, bigdeal, funworld, ROT0, "Funworld", "Big Deal (hungarian, set 2)", GAME_IMPERFECT_COLORS ) | |
| 2176 | GAME( 1986, jolycdat, bigdeal, bigdeal, bigdeal, funworld, ROT0, "Funworld", "Jolly Card (austrian, Funworld)", GAME_IMPERFECT_COLORS ) | |
| 2177 | GAME( 1996, cuoreuno, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Cuore 1 (italian)", 0 ) | |
| 2178 | GAME( 1997, elephfam, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Elephant Family (italian, new)", 0 ) | |
| 2179 | GAME( 1996, elephfmb, elephfam, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Elephant Family (italian, old)", 0 ) | |
| 2180 | GAME( 1996, pool10, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Pool 10 (italian, set 1)", 0 ) | |
| 2181 | GAME( 1996, pool10b, pool10, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Pool 10 (italian, set 2)", 0 ) | |
| 2182 | GAME( 1997, tortufam, 0, cuoreuno, cuoreuno, funworld, ROT0, "C.M.C.", "Tortuga Family (italian)", 0 ) | |
| 2183 | GAME( 1991, royalcrd, 0, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Royal Card (austrian, set 1)", 0 ) | |
| 2184 | GAME( 1991, royalcdb, royalcrd, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Royal Card (austrian, set 2)", 0 ) | |
| 2185 | GAME( 1991, royalcdc, royalcrd, royalcrd, royalcrd, funworld, ROT0, "Evona Electronic","Royal Card (slovak, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 2186 | GAME( 1991, lluck3x3, royalcrd, cuoreuno, royalcrd, funworld, ROT0, "TAB-Austria", "Lucky Lady (3x3 deal)", 0 ) | |
| 2187 | GAME( 1991, lluck4x1, royalcrd, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Lucky Lady (4x1 aces)", 0 ) | |
| 2188 | GAME( 1996, magiccrd, 0, magiccrd, magiccrd, funworld, ROT0, "Impera", "Magic Card II (bulgarian)", GAME_IMPERFECT_SOUND ) | |
| 2189 | GAME( 1996, magiccda, magiccrd, magiccrd, magiccrd, funworld, ROT0, "Impera", "Magic Card II (green TAB or Impera board)", GAME_NOT_WORKING ) | |
| 2190 | GAME( 1996, magiccdb, magiccrd, magiccrd, magiccrd, tabblue, ROT0, "Impera", "Magic Card II (blue TAB board, encrypted)", GAME_NOT_WORKING ) | |
| 2191 | GAME( 1993, vegasslw, 0, funworld, funworld, funworld, ROT0, "Funworld", "Royal Vegas Joker Card (slow deal)", 0 ) | |
| 2192 | GAME( 1993, vegasfst, vegasslw, funworld, funworld, funworld, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal)", 0 ) | |
| 2193 | GAME( 1993, jokercrd, 0, funworld, funworld, funworld, ROT0, "Vesely Svet", "Joker Card (Ver.A267BC, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 2194 | GAME( 199?, mongolnw, 0, royalmcu, royalcrd, funworld, ROT0, "bootleg", "Mongolfier New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2195 | GAME( 199?, soccernw, 0, royalcrd, royalcrd, soccernw, ROT0, "bootleg", "Soccer New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2196 | GAME( 1998, snookr10, 0, snookr10, snookr10, 0, ROT0, "Sandii'", "Snooker 10 (Ver 1.11)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2197 | GAME( 198?, saloon, 0, funworld, funworld, funworld, ROT0, "Unknown", "Saloon (french, encrypted)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r1679 | r1680 | |
|---|---|---|
| 357 | 357 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 358 | 358 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| 359 | 359 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 360 | PORT_ | |
| 360 | PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW | |
| 361 | 361 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 362 | 362 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 363 | 363 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // ? |
| r1679 | r1680 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | static VIDEO_START(jackpool) |
| 144 | 144 | { |
| 145 | jackpool_layer0_tilemap = tilemap_create(get_jackpool_layer0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 146 | jackpool_layer1_tilemap = tilemap_create(get_jackpool_layer1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 147 | jackpool_layer2_tilemap = tilemap_create(get_jackpool_layer2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8, 8,64,32); | |
| 145 | jackpool_layer0_tilemap = tilemap_create(get_jackpool_layer0_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 146 | jackpool_layer1_tilemap = tilemap_create(get_jackpool_layer1_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 147 | jackpool_layer2_tilemap = tilemap_create(get_jackpool_layer2_tile_info,tilemap_scan_rows, 8, 8,64,32); | |
| 148 | 148 | |
| 149 | 149 | tilemap_set_transparent_pen(jackpool_layer0_tilemap,0); |
| 150 | 150 | tilemap_set_transparent_pen(jackpool_layer2_tilemap,0); |
| r1679 | r1680 | |
|---|---|---|
| 162 | 162 | PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL |
| 163 | 163 | PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 164 | 164 | PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 165 | PORT_ | |
| 165 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 166 | 166 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 167 | 167 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 168 | 168 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK ) |
| r1679 | r1680 | |
| 206 | 206 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 207 | 207 | |
| 208 | 208 | PORT_START /* IN1 */ |
| 209 | PORT_ | |
| 209 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 210 | 210 | PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 211 | 211 | INPUT_PORTS_END |
| 212 | 212 |
| r1679 | r1680 | |
|---|---|---|
| 719 | 719 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 720 | 720 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 721 | 721 | MDRV_GFXDECODE(gsword) |
| 722 | MDRV_PALETTE_LENGTH(256) | |
| 723 | MDRV_COLORTABLE_LENGTH(64*4+64*4) | |
| 722 | MDRV_PALETTE_LENGTH(64*4+64*4) | |
| 724 | 723 | |
| 725 | 724 | MDRV_PALETTE_INIT(gsword) |
| 726 | 725 | MDRV_VIDEO_START(gsword) |
| r1679 | r1680 | |
| 767 | 766 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 768 | 767 | |
| 769 | 768 | MDRV_GFXDECODE(gsword) |
| 770 | MDRV_PALETTE_LENGTH(256) | |
| 771 | MDRV_COLORTABLE_LENGTH(64*4+64*4) | |
| 769 | MDRV_PALETTE_LENGTH(64*4+64*4) | |
| 772 | 770 | |
| 773 | 771 | MDRV_PALETTE_INIT(josvolly) |
| 774 | 772 | MDRV_VIDEO_START(gsword) |
| r1679 | r1680 | |
| 957 | 955 | #endif |
| 958 | 956 | } |
| 959 | 957 | |
| 960 | static DRIVER_INIT(josvolly) | |
| 961 | { | |
| 962 | } | |
| 963 | 958 | |
| 964 | GAME( 1984, gsword, 0, gsword, gsword, gsword, ROT0, "Taito Corporation", "Great Swordsman (World?)", 0 ) | |
| 965 | GAME( 1984, gsword2, gsword, gsword, gsword, gsword2, ROT0, "Taito Corporation", "Great Swordsman (Japan?)", 0 ) | |
| 966 | GAME( 1983, josvolly, 0, josvolly, josvolly, josvolly, ROT90, "Taito Corporation", "Joshi Volleyball", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 959 | GAME( 1983, josvolly, 0, josvolly, josvolly, 0, ROT90, "Taito Corporation", "Joshi Volleyball", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 960 | GAME( 1984, gsword, 0, gsword, gsword, gsword, ROT0, "Taito Corporation", "Great Swordsman (World?)", 0 ) | |
| 961 | GAME( 1984, gsword2, gsword, gsword, gsword, gsword2, ROT0, "Taito Corporation", "Great Swordsman (Japan?)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 799 | 799 | |
| 800 | 800 | static VIDEO_START( nmg5 ) |
| 801 | 801 | { |
| 802 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,64,64); | |
| 803 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 802 | bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 803 | fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,8,8,64,64); | |
| 804 | 804 | |
| 805 | 805 | tilemap_set_transparent_pen(fg_tilemap,0); |
| 806 | 806 | } |
| r1679 | r1680 | |
|---|---|---|
| 175 | 175 | AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w) |
| 176 | 176 | AM_RANGE(0x7e85, 0x7e85) AM_WRITE(z80dma_0_rdy_w) /* ==> DMA Chip */ |
| 177 | 177 | AM_RANGE(0x7f00, 0x7f07) AM_WRITE(mario_sh3_w) /* Sound port */ |
| 178 | AM_RANGE(0x7f80, 0x7f80) AM_READ_PORT("DSW | |
| 178 | AM_RANGE(0x7f80, 0x7f80) AM_READ_PORT("DSW | |
| 179 | 179 | AM_RANGE(0x7e00, 0x7e00) AM_WRITE(mario_sh_tuneselect_w) |
| 180 | 180 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 181 | 181 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 195 | 195 | AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w) |
| 196 | 196 | AM_RANGE(0x7e85, 0x7e85) AM_WRITE(z80dma_0_rdy_w) /* ==> DMA Chip */ |
| 197 | 197 | AM_RANGE(0x7f00, 0x7f00) AM_WRITE(masao_sh_irqtrigger_w) |
| 198 | AM_RANGE(0x7f80, 0x7f80) AM_READ_PORT("DSW | |
| 198 | AM_RANGE(0x7f80, 0x7f80) AM_READ_PORT("DSW | |
| 199 | 199 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 200 | 200 | ADDRESS_MAP_END |
| 201 | 201 |
| r1679 | r1680 | |
|---|---|---|
| 368 | 368 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) |
| 369 | 369 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 ) |
| 370 | 370 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 371 | PORT_ | |
| 371 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW | |
| 372 | 372 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 373 | 373 | INPUT_PORTS_END |
| 374 | 374 | |
| r1679 | r1680 | |
| 419 | 419 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 ) |
| 420 | 420 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START5 ) /* not verified */ |
| 421 | 421 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */ |
| 422 | PORT_ | |
| 422 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW | |
| 423 | 423 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* screen indicator? */ |
| 424 | 424 | |
| 425 | 425 | /* players 5+6 */ |
| r1679 | r1680 | |
| 494 | 494 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 495 | 495 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 496 | 496 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 497 | PORT_ | |
| 497 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW | |
| 498 | 498 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 499 | 499 | INPUT_PORTS_END |
| 500 | 500 |
| r1679 | r1680 | |
|---|---|---|
| 284 | 284 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 285 | 285 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 ) |
| 286 | 286 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 287 | PORT_ | |
| 287 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW | |
| 288 | 288 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Not mentioned in the "test mode" */ |
| 289 | 289 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) /* See notes - Stephh*/ |
| 290 | 290 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // this input makes the 020 lock up...- RB |
| r1679 | r1680 | |
|---|---|---|
| 270 | 270 | |
| 271 | 271 | static VIDEO_START( wink ) |
| 272 | 272 | { |
| 273 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 273 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | static VIDEO_UPDATE( wink ) |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | |
| 3 | 3 | Champion Poker by IGS (documented by Mirko Buffoni) |
| 4 | Is this a Konami board? | |
| 5 | 4 | --- |
| 6 | 5 | |
| 7 | 6 | Memory Layout (refers to CSK227IT. Others may have different addresses) |
| r1679 | r1680 | |
| 89 | 88 | |
| 90 | 89 | Unknown: 5080 (RW) (possibly related to ticket/hopper) |
| 91 | 90 | 5090-5091 (RW) (possibly related to eprom counters) |
| 92 | 50b0-50b1 (W) ( | |
| 91 | 50b0-50b1 (W) (OPL2 compatibl | |
| 93 | 92 | 5083 (W) (used only at reset, maybe) |
| 94 | 93 | 1000-10ff (W) ??? |
| 95 | 94 | 6000-67ff (W) ??? |
| r1679 | r1680 | |
| 130 | 129 | |
| 131 | 130 | #include "driver.h" |
| 132 | 131 | #include "cpu/z80/z80.h" |
| 132 | #include "sound/2413intf.h" | |
| 133 | 133 | |
| 134 | 134 | |
| 135 | 135 | extern UINT8 * cpk_colorram; |
| r1679 | r1680 | |
| 200 | 200 | AM_RANGE(0x5082, 0x5082) AM_READ(input_port_6_r) /* Coing & Kbd */ |
| 201 | 201 | AM_RANGE(0x5091, 0x5091) AM_READ(input_port_7_r) /* Keyboard */ |
| 202 | 202 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */ |
| 203 | AM_RANGE(0x50b0, 0x50b0) AM_WRITE(YM2413_register_port_0_w) | |
| 204 | AM_RANGE(0x50b1, 0x50b1) AM_WRITE(YM2413_data_port_0_w) | |
| 203 | 205 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram) |
| 204 | 206 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram) |
| 205 | 207 | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram) |
| r1679 | r1680 | |
| 219 | 221 | AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w) |
| 220 | 222 | AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) /* used for protection and other */ |
| 221 | 223 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_8_r) /* Not connected */ |
| 224 | AM_RANGE(0x50b0, 0x50b0) AM_WRITE(YM2413_register_port_0_w) | |
| 225 | AM_RANGE(0x50b1, 0x50b1) AM_WRITE(YM2413_data_port_0_w) | |
| 222 | 226 | AM_RANGE(0x6800, 0x6fff) AM_WRITE(MWA8_RAM) AM_BASE(&cpk_expram) |
| 223 | 227 | AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&cpk_videoram) |
| 224 | 228 | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE(&cpk_colorram) |
| r1679 | r1680 | |
| 569 | 573 | static MACHINE_DRIVER_START( csk227it ) |
| 570 | 574 | |
| 571 | 575 | /* basic machine hardware */ |
| 572 | MDRV_CPU_ADD_TAG("main",Z80, 3579545) | |
| 576 | MDRV_CPU_ADD_TAG("main",Z80, 3579545) | |
| 573 | 577 | MDRV_CPU_PROGRAM_MAP(map,0) |
| 574 | 578 | MDRV_CPU_IO_MAP(csk227_map,0) |
| 575 | MDRV_CPU_VBLANK_INT(cska_interrupt, | |
| 579 | MDRV_CPU_VBLANK_INT(cska_interrupt,8) | |
| 576 | 580 | |
| 577 | 581 | MDRV_SCREEN_REFRESH_RATE(57) |
| 578 | 582 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| r1679 | r1680 | |
| 585 | 589 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 32*8-1) |
| 586 | 590 | MDRV_GFXDECODE(csk) |
| 587 | 591 | MDRV_PALETTE_LENGTH(2048) |
| 588 | MDRV_COLORTABLE_LENGTH(2048) | |
| 589 | 592 | |
| 590 | 593 | MDRV_VIDEO_START(cska) |
| 591 | 594 | MDRV_VIDEO_UPDATE(cska) |
| 592 | 595 | |
| 593 | 596 | /* sound hardware */ |
| 597 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 598 | ||
| 599 | MDRV_SOUND_ADD(YM2413, 3579545) | |
| 600 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 601 | ||
| 594 | 602 | MACHINE_DRIVER_END |
| 595 | 603 | |
| 596 | 604 | static MACHINE_DRIVER_START( csk234it ) |
| r1679 | r1680 | |
| 599 | 607 | MDRV_CPU_MODIFY("main") |
| 600 | 608 | /* basic machine hardware */ |
| 601 | 609 | MDRV_CPU_IO_MAP(csk234_map,0) |
| 602 | MACHINE_DRIVER_END | |
| 603 | 610 | |
| 611 | MACHINE_DRIVER_END | |
| 612 | ||
| 604 | 613 | /* ROM Regions definition |
| 605 | 614 | */ |
| 606 | 615 | |
| r1679 | r1680 | |
| 701 | 710 | } |
| 702 | 711 | } |
| 703 | 712 | |
| 704 | GAME( 198?, csk227it, 0, csk227it, csk227, cska, ROT0, "IGS", "Champion Skill (with Ability)", GAME_NO_SOUND ) /* SU 062 */ | |
| 705 | GAME( 198?, csk234it, csk227it, csk234it, csk234, cska, ROT0, "IGS", "Champion Skill (Ability, Poker & Symbols)", GAME_NO_SOUND ) /* SU 062 */ | |
| 713 | GAME( 198?, csk227it, 0, csk227it, csk227, cska, ROT0, "IGS", "Champion Skill (with Ability)", 0 ) /* SU 062 */ | |
| 714 | GAME( 198?, csk234it, csk227it, csk234it, csk234, cska, ROT0, "IGS", "Champion Skill (Ability, Poker & Symbols)", 0 ) /* SU 062 */ | |
| 706 | 715 | |
| 707 | GAME( 1998, stellecu, 0, csk234it, csk234, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING | |
| 716 | GAME( 1998, stellecu, 0, csk234it, csk234, 0, ROT0, "Sure", "Stelle e Cubi (Italy)", GAME_NOT_WORKING |
| r1679 | r1680 | |
|---|---|---|
| 393 | 393 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) |
| 394 | 394 | MDRV_GFXDECODE(naughtyb) |
| 395 | 395 | MDRV_PALETTE_LENGTH(256) |
| 396 | MDRV_COLORTABLE_LENGTH(32*4+32*4) | |
| 397 | 396 | |
| 398 | 397 | MDRV_PALETTE_INIT(naughtyb) |
| 399 | 398 | MDRV_VIDEO_START(naughtyb) |
| r1679 | r1680 | |
| 431 | 430 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) |
| 432 | 431 | MDRV_GFXDECODE(naughtyb) |
| 433 | 432 | MDRV_PALETTE_LENGTH(256) |
| 434 | MDRV_COLORTABLE_LENGTH(32*4+32*4) | |
| 435 | 433 | |
| 436 | 434 | MDRV_PALETTE_INIT(naughtyb) |
| 437 | 435 | MDRV_VIDEO_START(naughtyb) |
| r1679 | r1680 | |
|---|---|---|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | static void draw_char(mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 40 | static void draw_char(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 41 | 41 | { |
| 42 | 42 | int i,j; |
| 43 | 43 | UINT8 *dp; |
| r1679 | r1680 | |
| 51 | 51 | { |
| 52 | 52 | UINT8 pen = dp[index++]; |
| 53 | 53 | if (pen) |
| 54 | { | |
| 55 | p[i] = Machine->remapped_colortable[gfx->color_base + (att & 0xf)]; | |
| 56 | } | |
| 54 | p[i] = machine->pens[gfx->color_base + (att & 0xf)]; | |
| 57 | 55 | else |
| 58 | { | |
| 59 | p[i] = Machine->remapped_colortable[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 60 | } | |
| 56 | p[i] = machine->pens[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 61 | 57 | } |
| 62 | 58 | } |
| 63 | 59 | } |
| r1679 | r1680 | |
| 80 | 76 | int att1 = (cga[index] >> 24) & 0xff; |
| 81 | 77 | int ch1 = (cga[index] >> 16) & 0xff; |
| 82 | 78 | |
| 83 | draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 84 | draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 79 | draw_char(machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 80 | draw_char(machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 85 | 81 | index++; |
| 86 | 82 | } |
| 87 | 83 | } |
| r1679 | r1680 | |
|---|---|---|
| 462 | 462 | MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1) |
| 463 | 463 | MDRV_GFXDECODE(kchamp) |
| 464 | 464 | MDRV_PALETTE_LENGTH(256) |
| 465 | MDRV_COLORTABLE_LENGTH(256) | |
| 466 | 465 | |
| 467 | 466 | MDRV_PALETTE_INIT(kchamp) |
| 468 | 467 | MDRV_VIDEO_START(kchamp) |
| r1679 | r1680 | |
| 511 | 510 | MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1) |
| 512 | 511 | MDRV_GFXDECODE(kchamp) |
| 513 | 512 | MDRV_PALETTE_LENGTH(256) |
| 514 | MDRV_COLORTABLE_LENGTH(256) | |
| 515 | 513 | |
| 516 | 514 | MDRV_PALETTE_INIT(kchamp) |
| 517 | 515 | MDRV_VIDEO_START(kchamp) |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | static VIDEO_START( olibochu ) |
| 90 | 90 | { |
| 91 | 91 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 92 | | |
| 92 | | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | |
| 60 | /* see | |
| 60 | /* see m | |
| 61 | 61 | because I need the start_addr register to handle scrolling */ |
| 62 | 62 | static WRITE8_HANDLER( tugboat_hd46505_0_w ) |
| 63 | 63 | { |
| r1679 | r1680 | |
|---|---|---|
| 259 | 259 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 260 | 260 | |
| 261 | 261 | PORT_START /* IN2 */ |
| 262 | PORT_ | |
| 262 | PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW | |
| 263 | 263 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 264 | 264 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 265 | 265 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 242 | 242 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 243 | 243 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 244 | 244 | MDRV_GFXDECODE(scotrsht) |
| 245 | MDRV_PALETTE_LENGTH(256) | |
| 246 | MDRV_COLORTABLE_LENGTH(16*8*16+16*8*16) | |
| 245 | MDRV_PALETTE_LENGTH(16*8*16+16*8*16) | |
| 247 | 246 | |
| 248 | 247 | MDRV_PALETTE_INIT(scotrsht) |
| 249 | 248 | MDRV_VIDEO_START(scotrsht) |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "sound/sn76496.h" |
| 13 | 13 | |
| 14 | extern WRITE8_HANDLER( markham_videoram_w ); | |
| 15 | extern WRITE8_HANDLER( markham_scroll_x_w ); | |
| 16 | extern WRITE8_HANDLER( markham_flipscreen_w ); | |
| 14 | WRITE8_HANDLER( markham_videoram_w ); | |
| 15 | WRITE8_HANDLER( markham_flipscreen_w ); | |
| 17 | 16 | |
| 18 | extern PALETTE_INIT( markham ); | |
| 19 | extern VIDEO_START( markham ); | |
| 20 | extern VIDEO_UPDATE( markham ); | |
| 17 | PALETTE_INIT( markham ); | |
| 18 | VIDEO_START( markham ); | |
| 19 | VIDEO_UPDATE( markham ); | |
| 21 | 20 | |
| 22 | ||
| 21 | extern | |
| 23 | 22 | |
| 24 | /****************************************************************************/ | |
| 25 | 23 | |
| 26 | ||
| 27 | static WRITE8_HANDLER( markham_sharedram_w ) | |
| 28 | { | |
| 29 | markham_sharedram[offset] = data; | |
| 30 | } | |
| 31 | ||
| 32 | static READ8_HANDLER( markham_sharedram_r ) | |
| 33 | { | |
| 34 | return markham_sharedram[offset]; | |
| 35 | } | |
| 36 | ||
| 37 | 24 | static READ8_HANDLER( markham_e004_r ) |
| 38 | 25 | { |
| 39 | 26 | return 0; |
| r1679 | r1680 | |
| 47 | 34 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) |
| 48 | 35 | AM_RANGE(0xc800, 0xcfff) AM_READ(MRA8_RAM) |
| 49 | 36 | AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) |
| 50 | AM_RANGE(0xd800, 0xdfff) AM_READ( | |
| 37 | AM_RANGE(0xd800, 0xdfff) AM_READ(MRA8 | |
| 51 | 38 | |
| 52 | 39 | AM_RANGE(0xe000, 0xe000) AM_READ(input_port_1_r) /* dsw 1 */ |
| 53 | 40 | AM_RANGE(0xe001, 0xe001) AM_READ(input_port_0_r) /* dsw 2 */ |
| r1679 | r1680 | |
| 66 | 53 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) |
| 67 | 54 | AM_RANGE(0xc800, 0xcfff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 68 | 55 | AM_RANGE(0xd000, 0xd7ff) AM_WRITE(markham_videoram_w) AM_BASE(&videoram) |
| 69 | AM_RANGE(0xd800, 0xdfff) AM_WRITE( | |
| 56 | AM_RANGE(0xd800, 0xdfff) AM_WRITE(MWA8 | |
| 70 | 57 | |
| 71 | 58 | AM_RANGE(0xe008, 0xe008) AM_WRITE(MWA8_NOP) /* coin counter? */ |
| 72 | 59 | |
| 73 | 60 | AM_RANGE(0xe009, 0xe009) AM_WRITE(MWA8_NOP) /* to CPU2 busreq */ |
| 74 | 61 | |
| 75 | AM_RANGE(0xe00c, 0xe00d) AM_WRITE(markham_scroll | |
| 62 | AM_RANGE(0xe00c, 0xe00d) AM_WRITE(MWA8_RAM) AM_BASE(&markham_xscroll | |
| 76 | 63 | AM_RANGE(0xe00e, 0xe00e) AM_WRITE(markham_flipscreen_w) |
| 77 | 64 | ADDRESS_MAP_END |
| 78 | 65 | |
| 79 | 66 | static ADDRESS_MAP_START( readmem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 80 | 67 | AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM) |
| 81 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) | |
| 68 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) AM_SHARE(1) | |
| 82 | 69 | ADDRESS_MAP_END |
| 83 | 70 | |
| 84 | 71 | static ADDRESS_MAP_START( writemem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 85 | 72 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM) |
| 86 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_ | |
| 73 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) AM_ | |
| 87 | 74 | |
| 88 | 75 | AM_RANGE(0xc000, 0xc000) AM_WRITE(SN76496_0_w) |
| 89 | 76 | AM_RANGE(0xc001, 0xc001) AM_WRITE(SN76496_1_w) |
| r1679 | r1680 | |
| 229 | 216 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 230 | 217 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 231 | 218 | MDRV_GFXDECODE(markham) |
| 232 | MDRV_PALETTE_LENGTH(256) | |
| 233 | MDRV_COLORTABLE_LENGTH(1024) | |
| 219 | MDRV_PALETTE_LENGTH(1024) | |
| 234 | 220 | |
| 235 | 221 | MDRV_PALETTE_INIT(markham) |
| 236 | 222 | MDRV_VIDEO_START(markham) |
| r1679 | r1680 | |
|---|---|---|
| 269 | 269 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) |
| 270 | 270 | MDRV_GFXDECODE(dday) |
| 271 | 271 | MDRV_PALETTE_LENGTH(256) |
| 272 | MDRV_COLORTABLE_LENGTH(256)//8*8+8*4+8*4, | |
| 273 | 272 | MDRV_PALETTE_INIT(dday) |
| 274 | 273 | |
| 275 | 274 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS) |
| r1679 | r1680 | |
|---|---|---|
| 156 | 156 | |
| 157 | 157 | static VIDEO_START( safarir ) |
| 158 | 158 | { |
| 159 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 160 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32); | |
| 159 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 160 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); | |
| 161 | 161 | |
| 162 | 162 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| 163 | 163 | } |
| r1679 | r1680 | |
|---|---|---|
| 173 | 173 | gijoe_objdma(); |
| 174 | 174 | |
| 175 | 175 | // 42.7us(clr) + 341.3us(xfer) delay at 6Mhz dotclock |
| 176 | timer_adjust(dmadelay_timer, JOE_DMADELAY, 0 | |
| 176 | timer_adjust_oneshot(dmadelay_timer, JOE_DMADELAY, 0 | |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | // trigger V-blank interrupt |
| r1679 | r1680 | |
| 277 | 277 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START4 ) |
| 278 | 278 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) // EEPROM data |
| 279 | 279 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) // EEPROM ready (always 1) |
| 280 | PORT_ | |
| 280 | PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW | |
| 281 | 281 | |
| 282 | 282 | PORT_START |
| 283 | 283 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
|---|---|---|
| 155 | 155 | static VIDEO_START( wilytowr ) |
| 156 | 156 | { |
| 157 | 157 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 158 | | |
| 158 | | |
| 159 | 159 | |
| 160 | 160 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, |
| 161 | | |
| 161 | | |
| 162 | 162 | |
| 163 | 163 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| 164 | 164 | tilemap_set_transparent_pen(fg_tilemap, 0); |
| r1679 | r1680 | |
|---|---|---|
| 175 | 175 | { |
| 176 | 176 | looping_state *state = machine->driver_data; |
| 177 | 177 | |
| 178 | state->bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 178 | state->bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 179 | 179 | |
| 180 | 180 | tilemap_set_scroll_cols(state->bg_tilemap, 0x20); |
| 181 | 181 | } |
| r1679 | r1680 | |
|---|---|---|
| 482 | 482 | if (duration) |
| 483 | 483 | { |
| 484 | 484 | attotime period = attotime_make(0, attotime_to_attoseconds(ATTOTIME_IN_HZ(TIMER_0_CLOCK)) * duration); |
| 485 | timer_adjust(v60_irq_timer[0], period, MAIN_IRQ_TIMER0 | |
| 485 | timer_adjust_oneshot(v60_irq_timer[0], period, MAIN_IRQ_TIMER0 | |
| 486 | 486 | } |
| 487 | 487 | break; |
| 488 | 488 | |
| r1679 | r1680 | |
| 493 | 493 | if (duration) |
| 494 | 494 | { |
| 495 | 495 | attotime period = attotime_make(0, attotime_to_attoseconds(ATTOTIME_IN_HZ(TIMER_1_CLOCK)) * duration); |
| 496 | timer_adjust(v60_irq_timer[1], period, MAIN_IRQ_TIMER1 | |
| 496 | timer_adjust_oneshot(v60_irq_timer[1], period, MAIN_IRQ_TIMER1 | |
| 497 | 497 | } |
| 498 | 498 | break; |
| 499 | 499 |
| r1679 | r1680 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | static VIDEO_START(k3) |
| 78 | 78 | { |
| 79 | k3_bg_tilemap = tilemap_create(get_k3_bg_tile_info,tilemap_scan_rows, | |
| 79 | k3_bg_tilemap = tilemap_create(get_k3_bg_tile_info,tilemap_scan_rows, | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) |
| r1679 | r1680 | |
|---|---|---|
| 459 | 459 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) |
| 460 | 460 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 461 | 461 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 462 | PORT_BIT( 0x40, 0x40, IPT_DIPSWITCH_NAME ) PORT_NAME("Dipswitch Test") PORT_CODE(KEYCODE_F2) PORT_TOGGLE | |
| 463 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 464 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 462 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 465 | 463 | /* Actually, the following DIPSW doesnt seem to do anything */ |
| 466 | 464 | PORT_BIT( 0x20, 0x20, IPT_DIPSWITCH_NAME ) PORT_NAME("Screen Test") PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 467 | 465 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| r1679 | r1680 | |
| 530 | 528 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 531 | 529 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 532 | 530 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 533 | PORT_BIT( 0x40, 0x40, IPT_DIPSWITCH_NAME ) PORT_NAME("Dipswitch Test") PORT_CODE(KEYCODE_F2) PORT_TOGGLE | |
| 534 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 535 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 531 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 536 | 532 | PORT_DIPNAME( 0x80, 0x80, "Player Speed" ) |
| 537 | 533 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) |
| 538 | 534 | PORT_DIPSETTING( 0x00, "Fast" ) |
| r1679 | r1680 | |
| 592 | 588 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 593 | 589 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 594 | 590 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 595 | PORT_BIT( 0x02, 0x02, IPT_DIPSWITCH_NAME ) PORT_NAME("Dipswitch Test") PORT_CODE(KEYCODE_F2) PORT_TOGGLE | |
| 596 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 597 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 591 | PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) | |
| 598 | 592 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) |
| 599 | 593 | PORT_DIPSETTING( 0x08, "1" ) |
| 600 | 594 | PORT_DIPSETTING( 0x00, "2" ) |
| r1679 | r1680 | |
| 652 | 646 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 653 | 647 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 654 | 648 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 655 | PORT_BIT( 0x40, 0x40, IPT_DIPSWITCH_NAME ) PORT_NAME("Dipswitch Test") PORT_CODE(KEYCODE_F2) PORT_TOGGLE | |
| 656 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 657 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 649 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 658 | 650 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 659 | 651 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 660 | 652 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 723 | 715 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 724 | 716 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 725 | 717 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 726 | PORT_BIT( 0x40, 0x40, IPT_DIPSWITCH_NAME ) PORT_NAME("Dipswitch Test") PORT_CODE(KEYCODE_F2) PORT_TOGGLE | |
| 727 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 728 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 718 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) | |
| 729 | 719 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 730 | 720 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 731 | 721 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1679 | r1680 | |
| 936 | 926 | static MACHINE_DRIVER_START( tigerh ) |
| 937 | 927 | |
| 938 | 928 | /* basic machine hardware */ |
| 939 | MDRV_CPU_ADD(Z80, 6 | |
| 929 | MDRV_CPU_ADD(Z80, XTAL_36MHz/6 | |
| 940 | 930 | MDRV_CPU_PROGRAM_MAP(tigerh_readmem,writemem) |
| 941 | 931 | MDRV_CPU_IO_MAP(tigerh_readport,tigerh_writeport) |
| 942 | 932 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 943 | 933 | |
| 944 | MDRV_CPU_ADD(Z80, 6 | |
| 934 | MDRV_CPU_ADD(Z80, XTAL_36MHz/12) /* verified on pcb */ | |
| 945 | 935 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 946 | 936 | MDRV_CPU_VBLANK_INT(nmi_line_pulse,6) /* ??? */ |
| 947 | 937 | |
| 948 | MDRV_CPU_ADD(M68705, | |
| 938 | MDRV_CPU_ADD(M68705,XTAL_36MHz/12) /* verified on pcb */ | |
| 949 | 939 | MDRV_CPU_PROGRAM_MAP(m68705_readmem,m68705_writemem) |
| 950 | 940 | |
| 951 | 941 | MDRV_SCREEN_REFRESH_RATE(60) |
| r1679 | r1680 | |
| 970 | 960 | /* sound hardware */ |
| 971 | 961 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 972 | 962 | |
| 973 | MDRV_SOUND_ADD(AY8910, | |
| 963 | MDRV_SOUND_ADD(AY8910, XTAL_36MHz/24) /* verified on pcb */ | |
| 974 | 964 | MDRV_SOUND_CONFIG(ay8910_interface_1) |
| 975 | 965 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 976 | 966 | |
| 977 | MDRV_SOUND_ADD(AY8910, | |
| 967 | MDRV_SOUND_ADD(AY8910, XTAL_36MHz/24) /* verified on pcb */ | |
| 978 | 968 | MDRV_SOUND_CONFIG(ay8910_interface_2) |
| 979 | 969 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 980 | 970 | MACHINE_DRIVER_END |
| r1679 | r1680 | |
| 982 | 972 | static MACHINE_DRIVER_START( slapfigh ) |
| 983 | 973 | |
| 984 | 974 | /* basic machine hardware */ |
| 985 | MDRV_CPU_ADD_TAG("main",Z80, 6 | |
| 975 | MDRV_CPU_ADD_TAG("main",Z80, XTAL_36MHz/6 | |
| 986 | 976 | MDRV_CPU_PROGRAM_MAP(readmem,writemem) |
| 987 | 977 | MDRV_CPU_IO_MAP(readport,writeport) |
| 988 | 978 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 989 | 979 | |
| 990 | MDRV_CPU_ADD(Z80, 6 | |
| 980 | MDRV_CPU_ADD(Z80, XTAL_36MHz/12) /* verified on pcb */ | |
| 991 | 981 | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 992 | 982 | MDRV_CPU_VBLANK_INT(getstar_interrupt, 3) |
| 993 | 983 | |
| r1679 | r1680 | |
| 1013 | 1003 | /* sound hardware */ |
| 1014 | 1004 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1015 | 1005 | |
| 1016 | MDRV_SOUND_ADD(AY8910, | |
| 1006 | MDRV_SOUND_ADD(AY8910, XTAL_36MHz/24) /* verified on pcb */ | |
| 1017 | 1007 | MDRV_SOUND_CONFIG(ay8910_interface_1) |
| 1018 | 1008 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1019 | 1009 | |
| 1020 | MDRV_SOUND_ADD(AY8910, | |
| 1010 | MDRV_SOUND_ADD(AY8910, XTAL_36MHz/24) /* verified on pcb */ | |
| 1021 | 1011 | MDRV_SOUND_CONFIG(ay8910_interface_2) |
| 1022 | 1012 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1023 | 1013 | MACHINE_DRIVER_END |
| r1679 | r1680 | |
|---|---|---|
| 183 | 183 | /* interrupts are asserted on every state change of the 128V line */ |
| 184 | 184 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); |
| 185 | 185 | param ^= 128; |
| 186 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 186 | timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(0, param, 0), param | |
| 187 | 187 | |
| 188 | 188 | /* an RC circuit turns the interrupt off after a short amount of time */ |
| 189 | 189 | timer_set(double_to_attotime(300 * 0.1e-6), NULL, 0, kamikaze_int_off); |
| r1679 | r1680 | |
| 194 | 194 | { |
| 195 | 195 | ppi8255_init(&ppi8255_intf); |
| 196 | 196 | int_timer = timer_alloc(kamizake_int_gen, NULL); |
| 197 | timer_adjust(int_timer, video_screen_get_time_until_pos(0, 128, 0), 128 | |
| 197 | timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(0, 128, 0), 128 | |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 |
| r1679 | r1680 | |
|---|---|---|
| 139 | 139 | static VIDEO_START( darkhors ) |
| 140 | 140 | { |
| 141 | 141 | darkhors_tmap = tilemap_create( get_tile_info_0, tilemap_scan_rows, |
| 142 | | |
| 142 | | |
| 143 | 143 | |
| 144 | 144 | darkhors_tmap2 = tilemap_create( get_tile_info_1, tilemap_scan_rows, |
| 145 | | |
| 145 | | |
| 146 | 146 | |
| 147 | 147 | tilemap_set_transparent_pen(darkhors_tmap, 0); |
| 148 | 148 | tilemap_set_transparent_pen(darkhors_tmap2, 0); |
| r1679 | r1680 | |
|---|---|---|
| 68 | 68 | static VIDEO_START(bishjan) |
| 69 | 69 | { |
| 70 | 70 | tmap1 = tilemap_create( get_tile_info1, tilemap_scan_rows, |
| 71 | | |
| 71 | | |
| 72 | 72 | |
| 73 | 73 | tmap2 = tilemap_create( get_tile_info2, tilemap_scan_rows, |
| 74 | | |
| 74 | | |
| 75 | 75 | |
| 76 | 76 | tilemap_set_transparent_pen(tmap1, 0); |
| 77 | 77 | tilemap_set_transparent_pen(tmap2, 0); |
| r1679 | r1680 | |
|---|---|---|
| 1084 | 1084 | PORT_START |
| 1085 | 1085 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1086 | 1086 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 1087 | PORT_ | |
| 1087 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1088 | 1088 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* game loops if this is set */ |
| 1089 | 1089 | PORT_DIPNAME( 0x10, 0x00, "Sound Output") |
| 1090 | 1090 | PORT_DIPSETTING( 0x10, DEF_STR( Mono )) |
| r1679 | r1680 | |
| 1153 | 1153 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1154 | 1154 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 1155 | 1155 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 1156 | PORT_ | |
| 1156 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1157 | 1157 | PORT_DIPNAME( 0x10, 0x00, "Sound Output") |
| 1158 | 1158 | PORT_DIPSETTING( 0x10, DEF_STR( Mono )) |
| 1159 | 1159 | PORT_DIPSETTING( 0x00, DEF_STR( Stereo )) |
| r1679 | r1680 | |
| 1223 | 1223 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1224 | 1224 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 1225 | 1225 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 1226 | PORT_ | |
| 1226 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1227 | 1227 | PORT_DIPNAME( 0x10, 0x00, "Sound Output") |
| 1228 | 1228 | PORT_DIPSETTING( 0x10, DEF_STR( Mono )) |
| 1229 | 1229 | PORT_DIPSETTING( 0x00, DEF_STR( Stereo )) |
| r1679 | r1680 | |
| 1283 | 1283 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1284 | 1284 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1285 | 1285 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1286 | PORT_ | |
| 1286 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1287 | 1287 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1288 | 1288 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 1289 | 1289 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1293 | 1293 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1294 | 1294 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 1295 | 1295 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 1296 | PORT_ | |
| 1296 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1297 | 1297 | PORT_DIPNAME( 0x10, 0x00, "Sound Output") |
| 1298 | 1298 | PORT_DIPSETTING( 0x10, DEF_STR( Mono )) |
| 1299 | 1299 | PORT_DIPSETTING( 0x00, DEF_STR( Stereo )) |
| r1679 | r1680 | |
| 1358 | 1358 | PORT_START |
| 1359 | 1359 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1360 | 1360 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM ready (always 1) */ |
| 1361 | PORT_ | |
| 1361 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW | |
| 1362 | 1362 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* game loops if this is set */ |
| 1363 | 1363 | PORT_DIPNAME( 0x10, 0x00, "Sound Output") |
| 1364 | 1364 | PORT_DIPSETTING( 0x10, DEF_STR( Mono )) |
| r1679 | r1680 | |
|---|---|---|
| 273 | 273 | |
| 274 | 274 | static VIDEO_START( jollyjgr ) |
| 275 | 275 | { |
| 276 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 276 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 277 | 277 | |
| 278 | 278 | tilemap_set_transparent_pen(bg_tilemap, 0); |
| 279 | 279 | tilemap_set_scroll_cols(bg_tilemap, 32); |
| r1679 | r1680 | |
|---|---|---|
| 473 | 473 | MDRV_SCREEN_SIZE(36*8, 28*8) |
| 474 | 474 | MDRV_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) |
| 475 | 475 | MDRV_GFXDECODE(skykid) |
| 476 | MDRV_PALETTE_LENGTH(256) | |
| 477 | MDRV_COLORTABLE_LENGTH(64*4+128*4+64*8) | |
| 476 | MDRV_PALETTE_LENGTH(64*4+128*4+64*8) | |
| 478 | 477 | |
| 479 | 478 | MDRV_PALETTE_INIT(skykid) |
| 480 | 479 | MDRV_VIDEO_START(skykid) |
| r1679 | r1680 | |
| 658 | 657 | } |
| 659 | 658 | |
| 660 | 659 | GAME( 1984, drgnbstr, 0, skykid, drgnbstr, skykid, ROT0, "Namco", "Dragon Buster", GAME_SUPPORTS_SAVE ) |
| 661 | GAME( 1985, skykid, 0, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (New Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */ | |
| 662 | GAME( 1985, skykido, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (Old Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */ | |
| 663 | GAME( 1985, skykidd, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (CUS60 Ver.)", GAME_SUPPORTS_SAVE ) /* Uses CUS60 aka 60a1 */ | |
| 660 | GAME( 1985, skykid, 0, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (new version)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */ | |
| 661 | GAME( 1985, skykido, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (old version)", GAME_SUPPORTS_SAVE ) /* Uses CUS63 aka 63a1 */ | |
| 662 | GAME( 1985, skykidd, skykid, skykid, skykid, skykid, ROT180, "Namco", "Sky Kid (CUS60 version)", GAME_SUPPORTS_SAVE ) /* Uses CUS60 aka 60a1 */ | |
| 664 | 663 | |
| 665 | 664 | // no license text is displayed but the PCB was licensed by Namco for production by Sipem (formerly Sidam) with Namco supplying the Custom chips (MCU etc.) |
| 666 | 665 | // the level select is handled in a much more user-friendly way in this set and the dip for it is inverted (although this is displayed incorrectly in the test mode) |
| 667 | GAME( 1985, skykids, skykid, skykid, skykids, skykid, ROT180, "Namco [Sipem license]", "Sky Kid ( | |
| 666 | GAME( 1985, skykids, skykid, skykid, skykids, skykid, ROT180, "Namco [Sipem license]", "Sky Kid ( |
| r1679 | r1680 | |
|---|---|---|
| 241 | 241 | GFXDECODE_END |
| 242 | 242 | |
| 243 | 243 | |
| 244 | static MACHINE_RESET( quizpani ) | |
| 245 | { | |
| 246 | NMK112_init(0); | |
| 247 | } | |
| 248 | ||
| 244 | 249 | static MACHINE_DRIVER_START( quizpani ) |
| 245 | 250 | MDRV_CPU_ADD(M68000, 10000000) |
| 246 | 251 | MDRV_CPU_PROGRAM_MAP(quizpani_readmem,quizpani_writemem) |
| 247 | 252 | MDRV_CPU_VBLANK_INT(irq4_line_hold,1) |
| 248 | 253 | MDRV_CPU_PERIODIC_INT(irq1_line_hold,164) // music tempo |
| 249 | 254 | |
| 255 | MDRV_MACHINE_RESET( quizpani ) | |
| 256 | ||
| 250 | 257 | MDRV_SCREEN_REFRESH_RATE(60) |
| 251 | 258 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 252 | 259 |
| r1679 | r1680 | |
|---|---|---|
| 1007 | 1007 | else |
| 1008 | 1008 | { |
| 1009 | 1009 | blitter_busy = 1; |
| 1010 | timer_adjust(blitter_reset_timer, ATTOTIME_IN_CYCLES(100, 0), 0 | |
| 1010 | timer_adjust_oneshot(blitter_reset_timer, ATTOTIME_IN_CYCLES(100, 0), 0 | |
| 1011 | 1011 | } |
| 1012 | 1012 | } |
| 1013 | 1013 | } |
| r1679 | r1680 | |
|---|---|---|
| 268 | 268 | int val=((PS7500_IO[T0low]&0xff)|((PS7500_IO[T0high]&0xff)<<8))>>1; |
| 269 | 269 | |
| 270 | 270 | if(val==0) |
| 271 | timer_adjust(PS7500timer0, attotime_never, 0 | |
| 271 | timer_adjust_oneshot(PS7500timer0, attotime_never, 0 | |
| 272 | 272 | else |
| 273 | timer_adjust(PS7500timer0, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val )); | |
| 273 | timer_adjust_periodic(PS7500timer0, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val )); | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | static TIMER_CALLBACK( PS7500_Timer1_callback ) |
| r1679 | r1680 | |
| 286 | 286 | { |
| 287 | 287 | int val=((PS7500_IO[T1low]&0xff)|((PS7500_IO[T1high]&0xff)<<8))>>1; |
| 288 | 288 | if(val==0) |
| 289 | timer_adjust(PS7500timer1, attotime_never, 0 | |
| 289 | timer_adjust_oneshot(PS7500timer1, attotime_never, 0 | |
| 290 | 290 | else |
| 291 | timer_adjust(PS7500timer1, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val )); | |
| 291 | timer_adjust_periodic(PS7500timer1, ATTOTIME_IN_USEC(val ), 0, ATTOTIME_IN_USEC(val )); | |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | static INTERRUPT_GEN( ssfindo_interrupt ) |
| r1679 | r1680 | |
| 305 | 305 | PS7500_IO[IOCR] = 0x3f; |
| 306 | 306 | PS7500_IO[VIDCR] = 0; |
| 307 | 307 | |
| 308 | timer_adjust( PS7500timer0, attotime_never, 0, attotime_never); | |
| 309 | timer_adjust( PS7500timer1, attotime_never, 0, attotime_never); | |
| 308 | timer_adjust_oneshot( PS7500timer0, attotime_never, 0); | |
| 309 | timer_adjust_oneshot( PS7500timer1, attotime_never, 0); | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | static READ32_HANDLER(PS7500_IO_r) |
| r1679 | r1680 | |
|---|---|---|
| 623 | 623 | |
| 624 | 624 | static VIDEO_START( peplus ) |
| 625 | 625 | { |
| 626 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 626 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 627 | 627 | palette_ram = auto_malloc(0x3000); |
| 628 | 628 | memset(palette_ram, 0, 0x3000); |
| 629 | 629 | } |
| r1679 | r1680 | |
|---|---|---|
| 846 | 846 | int freq = (irq_timerb << 12) | irq_timera; |
| 847 | 847 | freq &= 0x1fff; |
| 848 | 848 | |
| 849 | timer_adjust(irq_timer, ATTOTIME_IN_HZ(freq), 0, ATTOTIME_IN_HZ(freq)); | |
| 849 | timer_adjust_periodic(irq_timer, ATTOTIME_IN_HZ(freq), 0, ATTOTIME_IN_HZ(freq)); | |
| 850 | 850 | logerror("New timer frequency: %0d [%02x %04x]\n", freq, irq_timerb, irq_timera); |
| 851 | 851 | } |
| 852 | 852 |
| r1679 | r1680 | |
|---|---|---|
| 62 | 62 | mTilemapInfo.videoram = auto_malloc( 0x10000*2 ); |
| 63 | 63 | |
| 64 | 64 | /* four scrolling tilemaps */ |
| 65 | mTilemapInfo.tmap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 66 | mTilemapInfo.tmap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 67 | mTilemapInfo.tmap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 68 | mTilemapInfo.tmap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 65 | mTilemapInfo.tmap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,8,8,64,64); | |
| 66 | mTilemapInfo.tmap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,8,8,64,64); | |
| 67 | mTilemapInfo.tmap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,8,8,64,64); | |
| 68 | mTilemapInfo.tmap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,8,8,64,64); | |
| 69 | 69 | |
| 70 | 70 | /* two non-scrolling tilemaps */ |
| 71 | mTilemapInfo.tmap[4] = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 72 | mTilemapInfo.tmap[5] = tilemap_create(get_tile_info5,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,36,28); | |
| 71 | mTilemapInfo.tmap[4] = tilemap_create(get_tile_info4,tilemap_scan_rows,8,8,36,28); | |
| 72 | mTilemapInfo.tmap[5] = tilemap_create(get_tile_info5,tilemap_scan_rows,8,8,36,28); | |
| 73 | 73 | |
| 74 | 74 | /* define offsets for scrolling */ |
| 75 | 75 | for( i=0; i<4; i++ ) |
| r1679 | r1680 | |
| 277 | 277 | if( gfx ) |
| 278 | 278 | { |
| 279 | 279 | int shadow_offset = (machine->drv->video_attributes&VIDEO_HAS_SHADOWS)?machine->drv->total_colors:0; |
| 280 | const pen_t *pal = &machine-> | |
| 280 | const pen_t *pal = &machine-> | |
| 281 | 281 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 282 | 282 | int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; |
| 283 | 283 | int sprite_screen_width = (scalex*gfx->width+0x8000)>>16; |
| r1679 | r1680 | |
| 1136 | 1136 | mRozTilemap[i] = tilemap_create( |
| 1137 | 1137 | roz_info[i], |
| 1138 | 1138 | namco_roz_scan, |
| 1139 | TILEMAP_TYPE_PEN, | |
| 1140 | 1139 | 16,16, |
| 1141 | 1140 | 256,256 ); |
| 1142 | 1141 | } |
| r1679 | r1680 | |
| 1624 | 1623 | machine->gfx[gfxbank] = pGfx; |
| 1625 | 1624 | mpRoadTilemap = tilemap_create( |
| 1626 | 1625 | get_road_info,tilemap_scan_rows, |
| 1627 | TILEMAP_TYPE_PEN, | |
| 1628 | 1626 | ROAD_TILE_SIZE,ROAD_TILE_SIZE, |
| 1629 | 1627 | ROAD_COLS,ROAD_ROWS); |
| 1630 | 1628 |
| r1679 | r1680 | |
|---|---|---|
| 342 | 342 | |
| 343 | 343 | static VIDEO_START( ddayjlc ) |
| 344 | 344 | { |
| 345 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 345 | bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows, | |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | static VIDEO_UPDATE( ddayjlc ) |
| r1679 | r1680 | |
|---|---|---|
| 165 | 165 | attotime period = attotime_mul(ATTOTIME_IN_HZ(NEOGEO_PIXEL_CLOCK), display_counter + 1); |
| 166 | 166 | if (LOG_VIDEO_SYSTEM) logerror("adjust_display_position_interrupt_timer current y: %02x current x: %02x target y: %x target x: %x\n", video_screen_get_vpos(0), video_screen_get_hpos(0), (display_counter + 1) / NEOGEO_HTOTAL, (display_counter + 1) % NEOGEO_HTOTAL); |
| 167 | 167 | |
| 168 | timer_adjust(display_position_interrupt_timer, period, 0 | |
| 168 | timer_adjust_oneshot(display_position_interrupt_timer, period, 0 | |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
| r1679 | r1680 | |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /* set timer for next screen */ |
| 256 | timer_adjust(display_position_vblank_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, NEOGEO_VBLANK_RELOAD_HPOS), 0 | |
| 256 | timer_adjust_oneshot(display_position_vblank_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, NEOGEO_VBLANK_RELOAD_HPOS), 0 | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
| r1679 | r1680 | |
| 269 | 269 | update_interrupts(machine); |
| 270 | 270 | |
| 271 | 271 | /* set timer for next screen */ |
| 272 | timer_adjust(vblank_interrupt_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, 0), 0 | |
| 272 | timer_adjust_oneshot(vblank_interrupt_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, 0), 0 | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | |
| r1679 | r1680 | |
| 283 | 283 | |
| 284 | 284 | static void start_interrupt_timers(void) |
| 285 | 285 | { |
| 286 | timer_adjust(vblank_interrupt_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, 0), 0, attotime_zero); | |
| 287 | timer_adjust(display_position_vblank_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, NEOGEO_VBLANK_RELOAD_HPOS), 0, attotime_zero); | |
| 286 | timer_adjust_oneshot(vblank_interrupt_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, 0), 0); | |
| 287 | timer_adjust_oneshot(display_position_vblank_timer, video_screen_get_time_until_pos(0, NEOGEO_VBSTART, NEOGEO_VBLANK_RELOAD_HPOS), 0); | |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 |
| r1679 | r1680 | |
|---|---|---|
| 683 | 683 | } |
| 684 | 684 | |
| 685 | 685 | // simulate DMA delay |
| 686 | timer_adjust(dmadelay_timer, ATTOTIME_IN_USEC(120), 0 | |
| 686 | timer_adjust_oneshot(dmadelay_timer, ATTOTIME_IN_USEC(120), 0 | |
| 687 | 687 | } |
| 688 | 688 | |
| 689 | 689 | |
| r1679 | r1680 | |
| 1450 | 1450 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1451 | 1451 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1452 | 1452 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */ |
| 1453 | PORT_ | |
| 1453 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1454 | 1454 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1455 | 1455 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1456 | 1456 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1565 | 1565 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1566 | 1566 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1567 | 1567 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */ |
| 1568 | PORT_ | |
| 1568 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1569 | 1569 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1570 | 1570 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1571 | 1571 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1687 | 1687 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1688 | 1688 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1689 | 1689 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */ |
| 1690 | PORT_ | |
| 1690 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1691 | 1691 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1692 | 1692 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1693 | 1693 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1800 | 1800 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1801 | 1801 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1802 | 1802 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1803 | PORT_ | |
| 1803 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1804 | 1804 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1805 | 1805 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1806 | 1806 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1888 | 1888 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1889 | 1889 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1890 | 1890 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1891 | PORT_ | |
| 1891 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1892 | 1892 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1893 | 1893 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1894 | 1894 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 1977 | 1977 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1978 | 1978 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1979 | 1979 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1980 | PORT_ | |
| 1980 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 1981 | 1981 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1982 | 1982 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1983 | 1983 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
| 2066 | 2066 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2067 | 2067 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2068 | 2068 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2069 | PORT_ | |
| 2069 | PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW | |
| 2070 | 2070 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2071 | 2071 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2072 | 2072 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 322 | 322 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 323 | 323 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 324 | 324 | MDRV_GFXDECODE(sprcros2) |
| 325 | MDRV_PALETTE_LENGTH(18) | |
| 326 | MDRV_COLORTABLE_LENGTH(768) | |
| 325 | MDRV_PALETTE_LENGTH(768) | |
| 327 | 326 | |
| 328 | 327 | MDRV_PALETTE_INIT(sprcros2) |
| 329 | 328 | MDRV_VIDEO_START(sprcros2) |
| r1679 | r1680 | |
| 415 | 414 | ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut |
| 416 | 415 | ROM_END |
| 417 | 416 | |
| 418 | GAME( 1986, sprcros2, 0, sprcros2, sprcros2, 0, ROT0, "GM Shoji", "Super Cross 2 (Japan set 1)", 0 ) | |
| 419 | GAME( 1986, sprcrs2a, sprcros2, sprcros2, sprcros2, 0, ROT0, "GM Shoji", "Super Cross 2 (Japan set 2)", 0 ) | |
| 417 | GAME( 1986, sprcros2, 0, sprcros2, sprcros2, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", 0 ) | |
| 418 | GAME( 1986, sprcrs2a, sprcros2, sprcros2, sprcros2, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 126 | 126 | |
| 127 | 127 | static VIDEO_START (statriv2) |
| 128 | 128 | { |
| 129 | statriv2_tilemap = tilemap_create(get_statriv2_tile_info,tilemap_scan_rows, | |
| 129 | statriv2_tilemap = tilemap_create(get_statriv2_tile_info,tilemap_scan_rows, | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | static VIDEO_UPDATE (statriv2) |
| r1679 | r1680 | |
|---|---|---|
| 44 | 44 | #include "driver.h" |
| 45 | 45 | #include "deprecat.h" |
| 46 | 46 | #include "sound/ay8910.h" |
| 47 | #include "video/ | |
| 47 | #include "video/m | |
| 48 | 48 | |
| 49 | 49 | static UINT8* carrera_tileram; |
| 50 | static mc6845_t *mc6845; | |
| 50 | 51 | |
| 52 | ||
| 53 | ||
| 54 | static WRITE8_HANDLER( carrera_mc6845_address_w ) | |
| 55 | { | |
| 56 | mc6845_address_w(mc6845, data); | |
| 57 | } | |
| 58 | ||
| 59 | static WRITE8_HANDLER( carrera_mc6845_register_w ) | |
| 60 | { | |
| 61 | mc6845_register_w(mc6845, data); | |
| 62 | } | |
| 63 | ||
| 64 | ||
| 51 | 65 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 52 | 66 | AM_RANGE(0x0000, 0x4fff) AM_READ(MRA8_ROM) |
| 53 | 67 | AM_RANGE(0xe000, 0xe7ff) AM_READ(MRA8_RAM) |
| r1679 | r1680 | |
| 57 | 71 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 58 | 72 | AM_RANGE(0x0000, 0x4fff) AM_WRITE(MWA8_ROM) |
| 59 | 73 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM) |
| 60 | AM_RANGE(0xe800, 0xe800) AM_WRITE(crtc6845_address_w) | |
| 61 | AM_RANGE(0xe801, 0xe801) AM_WRITE(crtc6845_register_w) | |
| 74 | AM_RANGE(0xe800, 0xe800) AM_WRITE(carrera_mc6845_address_w) | |
| 75 | AM_RANGE(0xe801, 0xe801) AM_WRITE(carrera_mc6845_register_w) | |
| 62 | 76 | AM_RANGE(0xf000, 0xffff) AM_WRITE(MWA8_RAM) AM_BASE(&carrera_tileram) |
| 63 | 77 | ADDRESS_MAP_END |
| 64 | 78 | |
| r1679 | r1680 | |
| 245 | 259 | |
| 246 | 260 | static VIDEO_START(carrera) |
| 247 | 261 | { |
| 262 | mc6845 = mc6845_config(NULL); | |
| 248 | 263 | } |
| 249 | 264 | |
| 250 | 265 | static VIDEO_UPDATE(carrera) |
| r1679 | r1680 | |
|---|---|---|
| 244 | 244 | if (boost) |
| 245 | 245 | { |
| 246 | 246 | boost = 0; |
| 247 | timer_adjust(combasc_interleave_timer, attotime_zero, 0, ATTOTIME_IN_CYCLES(80,1)); | |
| 247 | timer_adjust_periodic(combasc_interleave_timer, attotime_zero, 0, ATTOTIME_IN_CYCLES(80,1)); | |
| 248 | 248 | } |
| 249 | 249 | else if (status & 2) |
| 250 | 250 | { |
| 251 | 251 | boost = 1; |
| 252 | timer_adjust(combasc_interleave_timer, attotime_zero, 0 | |
| 252 | timer_adjust_oneshot(combasc_interleave_timer, attotime_zero, 0 | |
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 |
| r1679 | r1680 | |
|---|---|---|
| 145 | 145 | |
| 146 | 146 | static VIDEO_START(egghunt) |
| 147 | 147 | { |
| 148 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 148 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, | |
| 149 | 149 | egghunt_bgram = auto_malloc(0x1000); |
| 150 | 150 | egghunt_spram = auto_malloc(0x1000); |
| 151 | 151 | } |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | static int firq_old_data_a, firq_old_data_b; |
| 26 | 26 | static int i8039_status; |
| 27 | 27 | |
| 28 | UINT8 *pandoras_sharedram; | |
| 29 | static UINT8 *pandoras_sharedram2; | |
| 30 | ||
| 31 | 28 | /* from video */ |
| 32 | 29 | PALETTE_INIT( pandoras ); |
| 33 | READ8_HANDLER( pandoras_vram_r ); | |
| 34 | READ8_HANDLER( pandoras_cram_r ); | |
| 35 | 30 | WRITE8_HANDLER( pandoras_vram_w ); |
| 36 | 31 | WRITE8_HANDLER( pandoras_cram_w ); |
| 37 | 32 | WRITE8_HANDLER( pandoras_flipscreen_w ); |
| r1679 | r1680 | |
| 49 | 44 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, HOLD_LINE); |
| 50 | 45 | } |
| 51 | 46 | |
| 52 | static READ8_HANDLER( pandoras_sharedram_r ){ | |
| 53 | return pandoras_sharedram[offset]; | |
| 54 | } | |
| 55 | ||
| 56 | static WRITE8_HANDLER( pandoras_sharedram_w ){ | |
| 57 | pandoras_sharedram[offset] = data; | |
| 58 | } | |
| 59 | ||
| 60 | static READ8_HANDLER( pandoras_sharedram2_r ){ | |
| 61 | return pandoras_sharedram2[offset]; | |
| 62 | } | |
| 63 | ||
| 64 | static WRITE8_HANDLER( pandoras_sharedram2_w ){ | |
| 65 | pandoras_sharedram2[offset] = data; | |
| 66 | } | |
| 67 | ||
| 68 | 47 | static WRITE8_HANDLER( pandoras_int_control_w ){ |
| 69 | 48 | /* byte 0: irq enable (CPU A) |
| 70 | 49 | byte 2: coin counter 1 |
| r1679 | r1680 | |
| 135 | 114 | |
| 136 | 115 | |
| 137 | 116 | static ADDRESS_MAP_START( pandoras_readmem_a, ADDRESS_SPACE_PROGRAM, 8 ) |
| 138 | AM_RANGE(0x0000, 0x0fff) AM_READ(pandoras_sharedram_r) /* Work RAM (Shared with CPU B) */ | |
| 139 | AM_RANGE(0x1000, 0x13ff) AM_READ(pandoras_cram_r) /* Color RAM (shared with CPU B) */ | |
| 140 | AM_RANGE(0x1400, 0x17ff) AM_READ(pandoras_vram_r) /* Video RAM (shared with CPU B) */ | |
| 117 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_RAM) AM_SHARE(1) /* Work RAM (Shared with CPU B) */ | |
| 118 | AM_RANGE(0x1000, 0x13ff) AM_READ(MRA8_RAM) AM_SHARE(2) /* Color RAM (shared with CPU B) */ | |
| 119 | AM_RANGE(0x1400, 0x17ff) AM_READ(MRA8_RAM) AM_SHARE(3) /* Video RAM (shared with CPU B) */ | |
| 141 | 120 | AM_RANGE(0x4000, 0x5fff) AM_READ(MRA8_ROM) /* space for diagnostic ROM */ |
| 142 | AM_RANGE(0x6000, 0x67ff) AM_READ( | |
| 121 | AM_RANGE(0x6000, 0x67ff) AM_READ(MRA8 | |
| 143 | 122 | AM_RANGE(0x8000, 0xffff) AM_READ(MRA8_ROM) /* ROM */ |
| 144 | 123 | ADDRESS_MAP_END |
| 145 | 124 | |
| 146 | 125 | static ADDRESS_MAP_START( pandoras_writemem_a, ADDRESS_SPACE_PROGRAM, 8 ) |
| 147 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(pandoras_sharedram_w) AM_BASE(&pandoras_sharedram) /* Work RAM (Shared with CPU B) */ | |
| 148 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(pandoras_cram_w) AM_BASE(&colorram) /* Color RAM (shared with CPU B) */ | |
| 149 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(pandoras_vram_w) AM_BASE(&videoram) /* Video RAM (shared with CPU B) */ | |
| 126 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_RAM) AM_SHARE(1) AM_BASE(&spriteram) /* Work RAM (Shared with CPU B) */ | |
| 127 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(pandoras_cram_w) AM_SHARE(2) AM_BASE(&colorram) /* Color RAM (shared with CPU B) */ | |
| 128 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(pandoras_vram_w) AM_SHARE(3) AM_BASE(&videoram) /* Video RAM (shared with CPU B) */ | |
| 150 | 129 | AM_RANGE(0x1800, 0x1807) AM_WRITE(pandoras_int_control_w) /* INT control */ |
| 151 | 130 | AM_RANGE(0x1a00, 0x1a00) AM_WRITE(pandoras_scrolly_w) /* bg scroll */ |
| 152 | 131 | AM_RANGE(0x1c00, 0x1c00) AM_WRITE(pandoras_z80_irqtrigger_w) /* cause INT on the Z80 */ |
| r1679 | r1680 | |
| 154 | 133 | AM_RANGE(0x2000, 0x2000) AM_WRITE(pandoras_cpub_irqtrigger_w) /* cause FIRQ on CPU B */ |
| 155 | 134 | AM_RANGE(0x2001, 0x2001) AM_WRITE(watchdog_reset_w) /* watchdog reset */ |
| 156 | 135 | AM_RANGE(0x4000, 0x5fff) AM_WRITE(MWA8_ROM) /* see notes */ |
| 157 | AM_RANGE(0x6000, 0x67ff) AM_WRITE( | |
| 136 | AM_RANGE(0x6000, 0x67ff) AM_WRITE(MWA8 | |
| 158 | 137 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) /* ROM */ |
| 159 | 138 | ADDRESS_MAP_END |
| 160 | 139 | |
| 161 | 140 | static ADDRESS_MAP_START( pandoras_readmem_b, ADDRESS_SPACE_PROGRAM, 8 ) |
| 162 | AM_RANGE(0x0000, 0x0fff) AM_READ(pandoras_sharedram_r) /* Work RAM (Shared with CPU A) */ | |
| 163 | AM_RANGE(0x1000, 0x13ff) AM_READ(pandoras_cram_r) /* Color RAM (shared with CPU A) */ | |
| 164 | AM_RANGE(0x1400, 0x17ff) AM_READ(pandoras_vram_r) /* Video RAM (shared with CPU A) */ | |
| 141 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_RAM) AM_SHARE(1)/* Work RAM (Shared with CPU A) */ | |
| 142 | AM_RANGE(0x1000, 0x13ff) AM_READ(MRA8_RAM) AM_SHARE(2) /* Color RAM (shared with CPU A) */ | |
| 143 | AM_RANGE(0x1400, 0x17ff) AM_READ(MRA8_RAM) AM_SHARE(3) /* Video RAM (shared with CPU A) */ | |
| 165 | 144 | AM_RANGE(0x1800, 0x1800) AM_READ(input_port_0_r) /* DIPSW #1 */ |
| 166 | 145 | AM_RANGE(0x1a00, 0x1a00) AM_READ(input_port_3_r) /* COINSW */ |
| 167 | 146 | AM_RANGE(0x1a01, 0x1a01) AM_READ(input_port_4_r) /* 1P inputs */ |
| r1679 | r1680 | |
| 169 | 148 | AM_RANGE(0x1a03, 0x1a03) AM_READ(input_port_2_r) /* DIPSW #3 */ |
| 170 | 149 | AM_RANGE(0x1c00, 0x1c00) AM_READ(input_port_1_r) /* DISPW #2 */ |
| 171 | 150 | // AM_RANGE(0x1e00, 0x1e00) AM_READ(MRA8_NOP) /* ??? seems to be important */ |
| 172 | AM_RANGE(0xc000, 0xc7ff) AM_READ( | |
| 151 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8 | |
| 173 | 152 | AM_RANGE(0xe000, 0xffff) AM_READ(MRA8_ROM) /* ROM */ |
| 174 | 153 | ADDRESS_MAP_END |
| 175 | 154 | |
| 176 | 155 | static ADDRESS_MAP_START( pandoras_writemem_b, ADDRESS_SPACE_PROGRAM, 8 ) |
| 177 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(pandoras_sharedram_w) /* Work RAM (Shared with CPU A) */ | |
| 178 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(pandoras_cram_w) /* Color RAM (shared with CPU A) */ | |
| 179 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(pandoras_vram_w) /* Video RAM (shared with CPU A) */ | |
| 156 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_RAM) AM_SHARE(1) /* Work RAM (Shared with CPU A) */ | |
| 157 | AM_RANGE(0x1000, 0x13ff) AM_WRITE(pandoras_cram_w) AM_SHARE(2) /* Color RAM (shared with CPU A) */ | |
| 158 | AM_RANGE(0x1400, 0x17ff) AM_WRITE(pandoras_vram_w) AM_SHARE(3) /* Video RAM (shared with CPU A) */ | |
| 180 | 159 | AM_RANGE(0x1800, 0x1807) AM_WRITE(pandoras_int_control_w) /* INT control */ |
| 181 | 160 | AM_RANGE(0x8000, 0x8000) AM_WRITE(watchdog_reset_w) /* watchdog reset */ |
| 182 | 161 | AM_RANGE(0xa000, 0xa000) AM_WRITE(pandoras_cpua_irqtrigger_w)/* cause FIRQ on CPU A */ |
| 183 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE( | |
| 162 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8 | |
| 184 | 163 | AM_RANGE(0xe000, 0xffff) AM_WRITE(MWA8_ROM) /* ROM */ |
| 185 | 164 | ADDRESS_MAP_END |
| 186 | 165 | |
| r1679 | r1680 | |
| 363 | 342 | }; |
| 364 | 343 | |
| 365 | 344 | static GFXDECODE_START( pandoras ) |
| 366 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) | |
| 367 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*16, 16 ) | |
| 345 | GFXDECODE_ENTRY( REGION_GFX1, 0, spritelayout, 0, 16 ) | |
| 346 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 16*16, 16 ) | |
| 368 | 347 | GFXDECODE_END |
| 369 | 348 | |
| 370 | 349 | /*************************************************************************** |
| r1679 | r1680 | |
| 427 | 406 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 428 | 407 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 429 | 408 | MDRV_GFXDECODE(pandoras) |
| 430 | MDRV_PALETTE_LENGTH(32) | |
| 431 | MDRV_COLORTABLE_LENGTH(16*16+16*16) | |
| 409 | MDRV_PALETTE_LENGTH(16*16+16*16) | |
| 432 | 410 | |
| 433 | 411 | MDRV_PALETTE_INIT(pandoras) |
| 434 | 412 | MDRV_VIDEO_START(pandoras) |
| r1679 | r1680 | |
| 468 | 446 | ROM_REGION( 0x1000, REGION_CPU4, 0 ) /* 4K for the Sound CPU 2 */ |
| 469 | 447 | ROM_LOAD( "pand_7e.snd", 0x00000, 0x01000, CRC(18b0f9d0) SHA1(2a6119423222577a4c2b99ed78f61ba387eec7f8) ) |
| 470 | 448 | |
| 471 | ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 472 | ROM_LOAD( "pand_a18.cpu", 0x00000, 0x02000, CRC(23706d4a) SHA1(cca92e6ff90e3006a79a214f1211fd659771de53) ) /* tiles */ | |
| 473 | ROM_LOAD( "pand_a19.cpu", 0x02000, 0x02000, CRC(a463b3f9) SHA1(549b7ee6e47325b80186441da11879fb8b1b47be) ) | |
| 474 | ||
| 475 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 449 | ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 476 | 450 | ROM_LOAD( "pand_j18.cpu", 0x00000, 0x02000, CRC(99a696c5) SHA1(35a27cd5ecc51a9a1acf01eb8078a1028f03be32) ) /* sprites */ |
| 477 | 451 | ROM_LOAD( "pand_j17.cpu", 0x02000, 0x02000, CRC(38a03c21) SHA1(b0c8f642787bab3cd1d76657e56f07f4f6f9073c) ) |
| 478 | 452 | ROM_LOAD( "pand_j16.cpu", 0x04000, 0x02000, CRC(e0708a78) SHA1(9dbd08b6ca8a66a61e128d1806888696273de848) ) |
| 479 | 453 | |
| 454 | ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 455 | ROM_LOAD( "pand_a18.cpu", 0x00000, 0x02000, CRC(23706d4a) SHA1(cca92e6ff90e3006a79a214f1211fd659771de53) ) /* tiles */ | |
| 456 | ROM_LOAD( "pand_a19.cpu", 0x02000, 0x02000, CRC(a463b3f9) SHA1(549b7ee6e47325b80186441da11879fb8b1b47be) ) | |
| 457 | ||
| 480 | 458 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 481 | 459 | ROM_LOAD( "pandora.2a", 0x0000, 0x020, CRC(4d56f939) SHA1(a8dac604bfdaf4b153b75dbf165de113152b6daa) ) /* palette */ |
| 482 | 460 | ROM_LOAD( "pandora.17g", 0x0020, 0x100, CRC(c1a90cfc) SHA1(c6581f2d543e38f1de399774183cf0698e61dab5) ) /* sprite lookup table */ |
| r1679 | r1680 | |
|---|---|---|
| 563 | 563 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 564 | 564 | MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) |
| 565 | 565 | MDRV_GFXDECODE(gberet) |
| 566 | MDRV_PALETTE_LENGTH(32) | |
| 567 | MDRV_COLORTABLE_LENGTH(2*16*16) | |
| 566 | MDRV_PALETTE_LENGTH(2*16*16) | |
| 568 | 567 | |
| 569 | 568 | MDRV_PALETTE_INIT(gberet) |
| 570 | 569 | MDRV_VIDEO_START(gberet) |
| r1679 | r1680 | |
| 625 | 624 | |
| 626 | 625 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 627 | 626 | ROM_LOAD( "577h09.2f", 0x0000, 0x0020, CRC(c15e7c80) SHA1(c0e8a01e63ed8cf20b33456b68890313b387ad23) ) // palette |
| 628 | ROM_LOAD( "577h10.5f", 0x0020, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 629 | ROM_LOAD( "577h11.6f", 0x0120, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 627 | ROM_LOAD( "577h11.6f", 0x0020, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 628 | ROM_LOAD( "577h10.5f", 0x0120, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 630 | 629 | ROM_END |
| 631 | 630 | |
| 632 | 631 | ROM_START( rushatck ) |
| r1679 | r1680 | |
| 646 | 645 | |
| 647 | 646 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 648 | 647 | ROM_LOAD( "577h09.2f", 0x0000, 0x0020, CRC(c15e7c80) SHA1(c0e8a01e63ed8cf20b33456b68890313b387ad23) ) // palette |
| 649 | ROM_LOAD( "577h10.5f", 0x0020, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 650 | ROM_LOAD( "577h11.6f", 0x0120, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 648 | ROM_LOAD( "577h11.6f", 0x0020, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 649 | ROM_LOAD( "577h10.5f", 0x0120, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 651 | 650 | ROM_END |
| 652 | 651 | |
| 653 | 652 | ROM_START( gberetb ) |
| r1679 | r1680 | |
| 666 | 665 | |
| 667 | 666 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 668 | 667 | ROM_LOAD( "577h09", 0x0000, 0x0020, CRC(c15e7c80) SHA1(c0e8a01e63ed8cf20b33456b68890313b387ad23) ) // palette |
| 669 | ROM_LOAD( "577h10", 0x0020, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 670 | ROM_LOAD( "577h11", 0x0120, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 668 | ROM_LOAD( "577h11.6f", 0x0020, 0x0100, CRC(2a1a992b) SHA1(77cff7c9c8433f999a87776021935864cf9dccb4) ) // characters | |
| 669 | ROM_LOAD( "577h10.5f", 0x0120, 0x0100, CRC(e9de1e53) SHA1(406b8dfe54e6176082005cc5545e79c098672547) ) // sprites | |
| 671 | 670 | ROM_END |
| 672 | 671 | |
| 673 | 672 | ROM_START( mrgoemon ) |
| r1679 | r1680 | |
| 685 | 684 | |
| 686 | 685 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 687 | 686 | ROM_LOAD( "621a06.5f", 0x0000, 0x0020, CRC(7c90de5f) SHA1(8ac5708e72e32f3d79ccde0cbaedefc34f8ac57e) ) // palette |
| 688 | ROM_LOAD( "621a07.6f", 0x0020, 0x0100, CRC(3980acdc) SHA1(f4e0bd74bccd77b84096c38bc70cf488a42d9562) ) // sprites | |
| 689 | ROM_LOAD( "621a08.7f", 0x0120, 0x0100, CRC(2fb244dd) SHA1(ceb909ad96c0dabc8684e69b028f4287e227c351) ) // characters | |
| 687 | ROM_LOAD( "621a08.7f", 0x0020, 0x0100, CRC(2fb244dd) SHA1(ceb909ad96c0dabc8684e69b028f4287e227c351) ) // characters | |
| 688 | ROM_LOAD( "621a07.6f", 0x0120, 0x0100, CRC(3980acdc) SHA1(f4e0bd74bccd77b84096c38bc70cf488a42d9562) ) // sprites | |
| 690 | 689 | ROM_END |
| 691 | 690 | |
| 692 | 691 | /* Game Drivers */ |
| r1679 | r1680 | |
|---|---|---|
| 280 | 280 | static ADDRESS_MAP_START( writemem_cpu1, ADDRESS_SPACE_PROGRAM, 8 ) |
| 281 | 281 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 282 | 282 | AM_RANGE(0x8000, 0xbfff) AM_WRITE(MWA8_BANK1) /* sf02.bin */ |
| 283 | AM_RANGE(0xc000, 0xc0ff) AM_WRITE(paletteram_xxxxBBBBRRRRGGGG_split1_w) AM_BASE(&paletteram) | |
| 284 | AM_RANGE(0xc100, 0xc1ff) AM_WRITE(paletteram_xxxxBBBBRRRRGGGG_split2_w) AM_BASE(&paletteram_2) | |
| 283 | AM_RANGE(0xc000, 0xc0ff) AM_WRITE(MWA8_RAM) AM_BASE(&paletteram) | |
| 284 | AM_RANGE(0xc100, 0xc1ff) AM_WRITE(MWA8_RAM) AM_BASE(&paletteram_2) | |
| 285 | 285 | AM_RANGE(0xc500, 0xc500) AM_WRITE(stfight_fm_w) /* play fm sound */ |
| 286 | 286 | AM_RANGE(0xc600, 0xc600) AM_WRITE(stfight_adpcm_control_w) /* voice control */ |
| 287 | 287 | AM_RANGE(0xc700, 0xc700) AM_WRITE(stfight_coin_w) /* coin mech */ |
| r1679 | r1680 | |
| 506 | 506 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 507 | 507 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 508 | 508 | MDRV_GFXDECODE(stfight) |
| 509 | MDRV_PALETTE_LENGTH(256+1) | |
| 510 | MDRV_COLORTABLE_LENGTH(16*4+16*16+16*16+16*16) | |
| 509 | MDRV_PALETTE_LENGTH(16*4+16*16+16*16+16*16) | |
| 511 | 510 | |
| 512 | 511 | MDRV_PALETTE_INIT(stfight) |
| 513 | 512 | MDRV_VIDEO_START(stfight) |
| r1679 | r1680 | |
|---|---|---|
| 1 | /* | |
| 1 | /* | |
| 2 | 2 | |
| 3 | Sand Scorpion | |
| 3 | Sand Scorpion | |
| 4 | 4 | |
| 5 | (C) 1992 FACE | |
| 6 | ||
| 7 | PCB Number: Z03VA-001 | |
| 8 | ||
| 9 | CPU: TMP68HC000N-12 | |
| 10 | Sound CPU: Z8400AB1 (Z80A) | |
| 11 | Sound: OKI6295, YM2203C & Y3014B | |
| 12 | OSC: 16.000mhz & 12.000mhz | |
| 13 | Dips: Two 8-way dipswitch banks | |
| 14 | ||
| 15 | Kaneko custom (surfaced scratched): | |
| 16 | PX79C480FP-3 PANDORA-CHIP (160pin PQFP) <- Sprites | |
| 17 | VIEW2-CHIP (144pin PQFP) <- Tilemaps | |
| 18 | HELP1-CHIP (64pin PQFP) | |
| 19 | CALC1-CHIP (40pin DIP) <- Collision Detection etc. | |
| 20 | ||
| 21 | ||
| 22 | +-------------------------------------+ | |
| 23 | | VOL M6295 7.IC55 Z80A HELP1 | | |
| 24 | | Y3014B YM2203C 8.IC51 | | |
| 25 | | DSW1 DSW2 LH5168D 4.IC32| | |
| 26 | | 12MHz 16MHz LH5168D 3.IC33| | |
| 27 | |J LH5168D IC30*| | |
| 28 | |A VIEW2 IC31*| | |
| 29 | |M LH5116D M51257AL | | |
| 30 | |M LH5116D PAL M51257AL | | |
| 31 | |A 2.IC5| | |
| 32 | | PAL 1.IC4| | |
| 33 | | IC15* PANDORA 68000| | |
| 34 | | IC14* 5.IC16 M41464 M41464 CALC1| | |
| 35 | | IC18* 6.IC17 M41464 M41464 | | |
| 36 | +-------------------------------------+ | |
| 37 | ||
| 38 | IC18 unpopulated 28 pin socket (silkscreened EPROM) | |
| 39 | IC14 & IC15 unpopulated 32 pin socket (silkscreened MASK) | |
| 40 | IC30 & IC31 unpopulated 42 pin socket (silkscreened MASK) | |
| 41 | ||
| 42 | RAM: | |
| 43 | OKI M41464C-10 (x4) | |
| 44 | OKI M51257AL-10 (x2) | |
| 45 | Sharp LH5116D-10 (x2) | |
| 46 | Sharp LH5168D-10L (x3) | |
| 47 | ||
| 48 | PALS: | |
| 49 | AMI 18CV8PC-25 (Stamped IC25D located at IC25) | |
| 50 | AMI 18CV8PC-25 (Stamped IC26 located at IC26) | |
| 51 | ||
| 52 | Chips simply labeled 1 through 8 | |
| 53 | ||
| 54 | ROM ID ROM Type | |
| 55 | =================== | |
| 56 | 1.ic4 27C2001 | |
| 57 | 2.ic5 27C2001 | |
| 58 | 3.ic33 27C040 | |
| 59 | 4.ic32 27C040 | |
| 60 | 5.ic16 27C040 | |
| 61 | 6.ic17 27C040 | |
| 62 | 7.ic55 27C2001 | |
| 63 | 8.ic51 27C1001 | |
| 64 | ||
| 65 | Alternate Program roms: | |
| 66 | 11.ic4 27C2001 | |
| 67 | 12.ic5 27C2001 | |
| 68 | ||
| 69 | Is there an other alt program roms set labeled 9 & 10? | |
| 70 | ||
| 5 | 71 | */ |
| 6 | 72 | |
| 7 | 73 | #include "driver.h" |
| r1679 | r1680 | |
| 413 | 479 | |
| 414 | 480 | Sand Scorpion |
| 415 | 481 | |
| 416 | (C) FACE | |
| 417 | 68HC000N-12 | |
| 418 | Z8400AB1 | |
| 419 | OKI6295, YM2203C | |
| 420 | OSC: 16.000mhz, 12.000mhz | |
| 482 | ***************************************************************************/ | |
| 421 | 483 | |
| 422 | SANDSC03.BIN 27C040 | |
| 423 | SANDSC04.BIN 27C040 | |
| 424 | SANDSC05.BIN 27C040 | |
| 425 | SANDSC06.BIN 27C040 | |
| 426 | SANDSC07.BIN 27C2001 | |
| 427 | SANDSC08.BIN 27C1001 | |
| 428 | SANDSC11.BIN 27C2001 | |
| 429 | SANDSC12.BIN 27C2001 | |
| 484 | ROM_START( sandscrp ) /* Z03VA-003 PCB */ | |
| 485 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 486 | ROM_LOAD16_BYTE( "11.bin", 0x000000, 0x040000, CRC(9b24ab40) SHA1(3187422dbe8b15d8053be4cb20e56d3e6afbd5f2) ) /* Location is IC4 */ | |
| 487 | ROM_LOAD16_BYTE( "12.bin", 0x000001, 0x040000, CRC(ad12caee) SHA1(83267445b89c3cf4dc317106aa68763d2f29eff7) ) /* Location is IC5 */ | |
| 430 | 488 | |
| 431 | ***************************************************************************/ | |
| 489 | ROM_REGION( 0x24000, REGION_CPU2, 0 ) /* Z80 Code */ | |
| 490 | ROM_LOAD( "8.ic51", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) ) | |
| 491 | ROM_CONTINUE( 0x10000, 0x14000 ) | |
| 432 | 492 | |
| 433 | ROM_START( sandscrp ) | |
| 493 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 494 | ROM_LOAD( "5.ic16", 0x000000, 0x080000, CRC(9bb675f6) SHA1(c3f6768cfd99a0e19ca2224fff9aa4e27ec0da24) ) | |
| 495 | ROM_LOAD( "6.ic17", 0x080000, 0x080000, CRC(7df2f219) SHA1(e2a59e201bfededa92d6c86f8dc1b212527ef66f) ) | |
| 496 | ||
| 497 | ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE ) /* Layers */ | |
| 498 | ROM_LOAD16_BYTE( "4.ic32", 0x000000, 0x080000, CRC(b9222ff2) SHA1(a445da3f7f5dea5ff64bb0b048f624f947875a39) ) | |
| 499 | ROM_LOAD16_BYTE( "3.ic33", 0x000001, 0x080000, CRC(adf20fa0) SHA1(67a7a2be774c86916cbb97e4c9b16c2e48125780) ) | |
| 500 | ||
| 501 | ROM_REGION( 0x040000, REGION_SOUND1, 0 ) /* Samples */ | |
| 502 | ROM_LOAD( "7.ic55", 0x000000, 0x040000, CRC(9870ab12) SHA1(5ea3412cbc57bfaa32a1e2552b2eb46f4ceb5fa8) ) | |
| 503 | ROM_END | |
| 504 | ||
| 505 | ROM_START( sandscra ) /* Z03VA-003 PCB, earlier program version */ | |
| 434 | 506 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 Code */ |
| 435 | ROM_LOAD16_BYTE( "sandsc11.bin", 0x000000, 0x040000, CRC(9b24ab40) SHA1(3187422dbe8b15d8053be4cb20e56d3e6afbd5f2) ) | |
| 436 | ROM_LOAD16_BYTE( "sandsc12.bin", 0x000001, 0x040000, CRC(ad12caee) SHA1(83267445b89c3cf4dc317106aa68763d2f29eff7) ) | |
| 507 | ROM_LOAD16_BYTE( "1.ic4", 0x000000, 0x040000, CRC(c0943ae2) SHA1(04dac4e1f116cd96d6292daa61ef40efc7eba919) ) | |
| 508 | ROM_LOAD16_BYTE( "2.ic5", 0x000001, 0x040000, CRC(6a8e0012) SHA1(2350b11c9bd545c8ba4b3c25cd6547ba2ad474b5) ) | |
| 437 | 509 | |
| 438 | 510 | ROM_REGION( 0x24000, REGION_CPU2, 0 ) /* Z80 Code */ |
| 439 | ROM_LOAD( "sandsc08.bin", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) ) | |
| 440 | ROM_CONTINUE( 0x10000, 0x14000 ) | |
| 511 | ROM_LOAD( "8.ic51", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) ) | |
| 512 | ROM_CONTINUE( 0x10000, 0x14000 ) | |
| 441 | 513 | |
| 442 | 514 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ |
| 443 | ROM_LOAD( "sandsc05.bin", 0x000000, 0x080000, CRC(9bb675f6) SHA1(c3f6768cfd99a0e19ca2224fff9aa4e27ec0da24) ) | |
| 444 | ROM_LOAD( "sandsc06.bin", 0x080000, 0x080000, CRC(7df2f219) SHA1(e2a59e201bfededa92d6c86f8dc1b212527ef66f) ) | |
| 515 | ROM_LOAD( "5.ic16", 0x000000, 0x080000, CRC(9bb675f6) SHA1(c3f6768cfd99a0e19ca2224fff9aa4e27ec0da24) ) | |
| 516 | ROM_LOAD( "6.ic17", 0x080000, 0x080000, CRC(7df2f219) SHA1(e2a59e201bfededa92d6c86f8dc1b212527ef66f) ) | |
| 445 | 517 | |
| 446 | 518 | ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE ) /* Layers */ |
| 447 | ROM_LOAD16_BYTE( "sandsc04.bin", 0x000000, 0x080000, CRC(b9222ff2) SHA1(a445da3f7f5dea5ff64bb0b048f624f947875a39) ) | |
| 448 | ROM_LOAD16_BYTE( "sandsc03.bin", 0x000001, 0x080000, CRC(adf20fa0) SHA1(67a7a2be774c86916cbb97e4c9b16c2e48125780) ) | |
| 519 | ROM_LOAD16_BYTE( "4.ic32", 0x000000, 0x080000, CRC(b9222ff2) SHA1(a445da3f7f5dea5ff64bb0b048f624f947875a39) ) | |
| 520 | ROM_LOAD16_BYTE( "3.ic33", 0x000001, 0x080000, CRC(adf20fa0) SHA1(67a7a2be774c86916cbb97e4c9b16c2e48125780) ) | |
| 449 | 521 | |
| 450 | 522 | ROM_REGION( 0x040000, REGION_SOUND1, 0 ) /* Samples */ |
| 451 | ROM_LOAD( " | |
| 523 | ROM_LOAD( " | |
| 452 | 524 | ROM_END |
| 453 | 525 | |
| 454 | 526 | |
| 455 | ROM_START( sandscr | |
| 527 | ROM_START( sandscrb ) /* Different rev PCB */ | |
| 456 | 528 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 Code */ |
| 457 | 529 | ROM_LOAD16_BYTE( "11.ic4", 0x000000, 0x040000, CRC(80020cab) SHA1(4f1f4d8ea07ad745f2d6d3f800686f07fe4bf20f) ) |
| 458 | 530 | ROM_LOAD16_BYTE( "12.ic5", 0x000001, 0x040000, CRC(8df1d42f) SHA1(2a9db5c4b99a8a3f62bffa9ddd96a95e2042602b) ) |
| 459 | 531 | |
| 460 | 532 | ROM_REGION( 0x24000, REGION_CPU2, 0 ) /* Z80 Code */ |
| 461 | ROM_LOAD( "sandsc08.bin", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) ) | |
| 462 | ROM_CONTINUE( 0x10000, 0x14000 ) | |
| 533 | ROM_LOAD( "8.ic51", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) ) | |
| 534 | ROM_CONTINUE( 0x10000, 0x14000 ) | |
| 463 | 535 | |
| 464 | 536 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ |
| 465 | 537 | ROM_LOAD( "ss502.ic16", 0x000000, 0x100000, CRC(d8012ebb) SHA1(975bbb3b57a09e41d2257d4fa3a64097144de554) ) |
| r1679 | r1680 | |
| 468 | 540 | ROM_LOAD16_WORD_SWAP( "ss501.ic30", 0x000000, 0x100000, CRC(0cf9f99d) SHA1(47f7f120d2bc075bedaff0a44306a8f46a1d848c) ) |
| 469 | 541 | |
| 470 | 542 | ROM_REGION( 0x040000, REGION_SOUND1, 0 ) /* Samples */ |
| 471 | ROM_LOAD( " | |
| 543 | ROM_LOAD( " | |
| 472 | 544 | ROM_END |
| 473 | 545 | |
| 474 | 546 | |
| 475 | GAME( 1992, sandscrp, 0, sandscrp, sandscrp, 0, ROT90, "Face", "Sand Scorpion (set 1)", 0 ) | |
| 476 | GAME( 1992, sandscra, sandscrp, sandscrp, sandscrp, 0, ROT90, "Face", "Sand Scorpion (set 2)", 0 ) | |
| 547 | GAME( 1992, sandscrp, 0, sandscrp, sandscrp, 0, ROT90, "Face", "Sand Scorpion", 0 ) | |
| 548 | GAME( 1992, sandscra, sandscrp, sandscrp, sandscrp, 0, ROT90, "Face", "Sand Scorpion (Earlier)", 0 ) | |
| 549 | GAME( 1992, sandscrb, sandscrp, sandscrp, sandscrp, 0, ROT90, "Face", "Sand Scorpion (Revised Hardware)", 0 ) |
| r1679 | r1680 | |
|---|---|---|
| 158 | 158 | /* adjust for next scanline */ |
| 159 | 159 | if (++scanline >= machine->screen[0].height) |
| 160 | 160 | scanline = 0; |
| 161 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 161 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
| r1679 | r1680 | |
| 192 | 192 | { |
| 193 | 193 | dd_sub_cpu_busy = 1; |
| 194 | 194 | adpcm_idle[0] = adpcm_idle[1] = 1; |
| 195 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 195 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 |
| r1679 | r1680 | |
|---|---|---|
| 148 | 148 | |
| 149 | 149 | static VIDEO_START( acommand ) |
| 150 | 150 | { |
| 151 | tx_tilemap = tilemap_create(ac_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,512,32); | |
| 152 | bg_tilemap = tilemap_create(ac_get_bg_tile_info,bg_scan,TILEMAP_TYPE_PEN,16,16,256,16); | |
| 151 | tx_tilemap = tilemap_create(ac_get_tx_tile_info,tilemap_scan_cols,8,8,512,32); | |
| 152 | bg_tilemap = tilemap_create(ac_get_bg_tile_info,bg_scan,16,16,256,16); | |
| 153 | 153 | |
| 154 | 154 | ac_vregs = auto_malloc(0x80); |
| 155 | 155 |
| r1679 | r1680 | |
|---|---|---|
| 329 | 329 | if (scanline>=264) |
| 330 | 330 | scanline=0; |
| 331 | 331 | |
| 332 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 332 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | |
| r1679 | r1680 | |
| 361 | 361 | |
| 362 | 362 | static MACHINE_RESET( tubep ) |
| 363 | 363 | { |
| 364 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 364 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | |
| r1679 | r1680 | |
| 510 | 510 | if (scanline>=264) |
| 511 | 511 | scanline=0; |
| 512 | 512 | |
| 513 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 513 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | |
| r1679 | r1680 | |
| 524 | 524 | |
| 525 | 525 | static MACHINE_RESET( rjammer ) |
| 526 | 526 | { |
| 527 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 527 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 528 | 528 | } |
| 529 | 529 | |
| 530 | 530 |
| r1679 | r1680 | |
|---|---|---|
| 329 | 329 | |
| 330 | 330 | static VIDEO_START( ppmast93 ) |
| 331 | 331 | { |
| 332 | ppmast93_bg_tilemap = tilemap_create(get_ppmast93_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32, 32); | |
| 333 | ppmast93_fg_tilemap = tilemap_create(get_ppmast93_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32, 32); | |
| 332 | ppmast93_bg_tilemap = tilemap_create(get_ppmast93_bg_tile_info,tilemap_scan_rows,8,8,32, 32); | |
| 333 | ppmast93_fg_tilemap = tilemap_create(get_ppmast93_fg_tile_info,tilemap_scan_rows,8,8,32, 32); | |
| 334 | 334 | |
| 335 | 335 | tilemap_set_transparent_pen(ppmast93_fg_tilemap,0); |
| 336 | 336 | } |
| r1679 | r1680 | |
|---|---|---|
| 780 | 780 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 781 | 781 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) // doesn't work in all games |
| 782 | 782 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 783 | PORT_ | |
| 783 | PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW | |
| 784 | 784 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 785 | 785 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 786 | 786 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1679 | r1680 | |
|---|---|---|
| 321 | 321 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 322 | 322 | |
| 323 | 323 | PORT_START /* IN2 */ |
| 324 | PORT_ | |
| 324 | PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW | |
| 325 | 325 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 326 | 326 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 327 | 327 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | { |
| 68 | 68 | int i; |
| 69 | 69 | for (i=0; i < 16; i++) |
| 70 | { | |
| 71 | 70 | palette_set_color(machine, i, cga_palette[i]); |
| 72 | } | |
| 73 | 71 | } |
| 74 | 72 | |
| 75 | static void draw_char(mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 73 | static void draw_char(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) | |
| 76 | 74 | { |
| 77 | 75 | int i,j; |
| 78 | 76 | UINT8 *dp; |
| r1679 | r1680 | |
| 82 | 80 | for (j=y; j < y+8; j++) |
| 83 | 81 | { |
| 84 | 82 | UINT16 *p = BITMAP_ADDR16(bitmap, j, 0); |
| 83 | ||
| 85 | 84 | for (i=x; i < x+8; i++) |
| 86 | 85 | { |
| 87 | 86 | UINT8 pen = dp[index++]; |
| 88 | 87 | if (pen) |
| 89 | { | |
| 90 | p[i] = Machine->remapped_colortable[gfx->color_base + (att & 0xf)]; | |
| 91 | } | |
| 88 | p[i] = machine->pens[gfx->color_base + (att & 0xf)]; | |
| 92 | 89 | else |
| 93 | { | |
| 94 | p[i] = Machine->remapped_colortable[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 95 | } | |
| 90 | p[i] = machine->pens[gfx->color_base + ((att >> 4) & 0x7)]; | |
| 96 | 91 | } |
| 97 | 92 | } |
| 98 | 93 | } |
| r1679 | r1680 | |
| 115 | 110 | int att1 = (cga[index] >> 24) & 0xff; |
| 116 | 111 | int ch1 = (cga[index] >> 16) & 0xff; |
| 117 | 112 | |
| 118 | draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 119 | draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 113 | draw_char(machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8); | |
| 114 | draw_char(machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); | |
| 120 | 115 | index++; |
| 121 | 116 | } |
| 122 | 117 | } |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | int beamx, beamy; |
| 73 | 73 | |
| 74 | 74 | /* set a timer to do this again next frame */ |
| 75 | timer_adjust(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 75 | timer_adjust_oneshot(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 76 | 76 | |
| 77 | 77 | /* only do work if the palette is flashed */ |
| 78 | 78 | if (!tickee_control[2]) |
| r1679 | r1680 | |
| 101 | 101 | { |
| 102 | 102 | /* start a timer going on the first scanline of every frame */ |
| 103 | 103 | setup_gun_timer = timer_alloc(setup_gun_interrupts, NULL); |
| 104 | timer_adjust(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 104 | timer_adjust_oneshot(setup_gun_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 |
| r1679 | r1680 | |
|---|---|---|
| 231 | 231 | |
| 232 | 232 | static MACHINE_RESET( m92 ) |
| 233 | 233 | { |
| 234 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 234 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | /*****************************************************************************/ |
| r1679 | r1680 | |
| 257 | 257 | /* adjust for next scanline */ |
| 258 | 258 | if (++scanline >= machine->screen[0].height) |
| 259 | 259 | scanline = 0; |
| 260 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 260 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /*****************************************************************************/ |
| r1679 | r1680 | |
|---|---|---|
| 322 | 322 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 323 | 323 | MDRV_SCREEN_RAW_PARAMS(FCOMBAT_PIXEL_CLOCK, FCOMBAT_HTOTAL, FCOMBAT_HBEND, FCOMBAT_HBSTART, FCOMBAT_VTOTAL, FCOMBAT_VBEND, FCOMBAT_VBSTART) |
| 324 | 324 | MDRV_GFXDECODE(fcombat) |
| 325 | MDRV_PALETTE_LENGTH(32) | |
| 326 | MDRV_COLORTABLE_LENGTH(256*3) | |
| 325 | MDRV_PALETTE_LENGTH(256*3) | |
| 327 | 326 | |
| 328 | 327 | MDRV_PALETTE_INIT(fcombat) |
| 329 | 328 | MDRV_VIDEO_START(fcombat) |
| r1679 | r1680 | |
|---|---|---|
| 3279 | 3279 | MDRV_MACHINE_RESET(atomicp) |
| 3280 | 3280 | |
| 3281 | 3281 | /* sound hardware */ |
| 3282 | MDRV_SOUND_REPLACE("2151", YM2413, | |
| 3282 | MDRV_SOUND_REPLACE("2151", YM2413, 5000000) /* 20MHz OSC divided by 4 */ | |
| 3283 | 3283 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 3284 | 3284 | |
| 3285 | 3285 | MDRV_SOUND_REMOVE("7759") |
| r1679 | r1680 | |
| 3709 | 3709 | ************************************************************************************************************************** |
| 3710 | 3710 | ************************************************************************************************************************** |
| 3711 | 3711 | Atomic Point |
| 3712 | CPU: 68000 | |
| 3713 | Custom Korean Board - NOT Sega | |
| 3712 | ||
| 3713 | Custom Korean Board - NOT Sega: | |
| 3714 | ||
| 3715 | CPU: TMP68000P-10 | |
| 3716 | OSC: 25.1748MHz & 20MHz | |
| 3717 | Chips: Philko PK8702 | |
| 3718 | Philko PK8811 | |
| 3719 | Dips: Two 8-way dipswitch banks | |
| 3720 | Sound: Yamaha YM2413 | |
| 3721 | ||
| 3714 | 3722 | */ |
| 3715 | 3723 | ROM_START( atomicp ) |
| 3716 | 3724 | ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */ |
| r1679 | r1680 | |
|---|---|---|
| 70 | 70 | UINT16 new_data = COMBINE_DATA(&fuuki16_vregs[offset]); |
| 71 | 71 | if ((offset == 0x1c/2) && old_data != new_data) |
| 72 | 72 | { |
| 73 | timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, new_data, Machine->screen[0].visarea.max_x + 1), 0, video_screen_get_frame_period(0)); | |
| 73 | timer_adjust_periodic(raster_interrupt_timer, video_screen_get_time_until_pos(0, new_data, Machine->screen[0].visarea.max_x + 1), 0, video_screen_get_frame_period(0)); | |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| r1679 | r1680 | |
| 538 | 538 | { |
| 539 | 539 | cpunum_set_input_line(machine, 0, 5, PULSE_LINE); // Raster Line IRQ |
| 540 | 540 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 541 | timer_adjust(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 541 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 542 | 542 | } |
| 543 | 543 | |
| 544 | 544 | |
| r1679 | r1680 | |
| 552 | 552 | { |
| 553 | 553 | timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback); |
| 554 | 554 | timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback); |
| 555 | timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0 | |
| 555 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0 | |
| 556 | 556 | } |
| 557 | 557 | |
| 558 | 558 |
| r1679 | r1680 | |
|---|---|---|
| 248 | 248 | { |
| 249 | 249 | int roz_tile_size = K001604_roz_size[chip] ? 16 : 8; |
| 250 | 250 | int roz_width = K001604_layer_size ? 64 : 128; |
| 251 | K001604_layer_8x8[chip][0] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 252 | K001604_layer_8x8[chip][1] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 251 | K001604_layer_8x8[chip][0] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_0, 8, 8, 64, 64); | |
| 252 | K001604_layer_8x8[chip][1] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_1, 8, 8, 64, 64); | |
| 253 | 253 | |
| 254 | K001604_layer_roz[chip][0] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_TYPE_PEN, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 255 | K001604_layer_roz[chip][1] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_TYPE_PEN, roz_tile_size, roz_tile_size, 64, 64); | |
| 254 | K001604_layer_roz[chip][0] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_0, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 255 | K001604_layer_roz[chip][1] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_1, roz_tile_size, roz_tile_size, 64, 64); | |
| 256 | 256 | } |
| 257 | 257 | else |
| 258 | 258 | { |
| 259 | 259 | int roz_tile_size = K001604_roz_size[chip] ? 16 : 8; |
| 260 | 260 | int roz_width = K001604_layer_size ? 64 : 128; |
| 261 | K001604_layer_8x8[chip][0] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 262 | K001604_layer_8x8[chip][1] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TYPE_PEN, 8, 8, 64, 64); | |
| 261 | K001604_layer_8x8[chip][0] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_0, 8, 8, 64, 64); | |
| 262 | K001604_layer_8x8[chip][1] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_1, 8, 8, 64, 64); | |
| 263 | 263 | |
| 264 | K001604_layer_roz[chip][0] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_TYPE_PEN, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 265 | K001604_layer_roz[chip][1] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_TYPE_PEN, roz_tile_size, roz_tile_size, 64, 64); | |
| 264 | K001604_layer_roz[chip][0] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_0, roz_tile_size, roz_tile_size, roz_width, 64); | |
| 265 | K001604_layer_roz[chip][1] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_1, roz_tile_size, roz_tile_size, 64, 64); | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | tilemap_set_transparent_pen(K001604_layer_8x8[chip][0], 0); |
| r1679 | r1680 | |
| 545 | 545 | |
| 546 | 546 | static VIDEO_UPDATE( nwktr ) |
| 547 | 547 | { |
| 548 | fillbitmap(bitmap, machine-> | |
| 548 | fillbitmap(bitmap, machine-> | |
| 549 | 549 | |
| 550 | 550 | voodoo_update(0, bitmap, cliprect); |
| 551 | 551 | |
| r1679 | r1680 | |
| 838 | 838 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 839 | 839 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 840 | 840 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_7) |
| 841 | PORT_ | |
| 841 | PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW | |
| 842 | 842 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 843 | 843 | |
| 844 | 844 | PORT_START |
| r1679 | r1680 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | #include "tinv2650.lh" |
| 16 | 16 | |
| 17 | extern UINT8 *zac2650_s2636_0_ram; | |
| 17 | 18 | WRITE8_HANDLER( tinvader_videoram_w ); |
| 18 | 19 | static WRITE8_HANDLER( tinvader_sound_w ); |
| 19 | 20 | READ8_HANDLER( zac_s2636_r ); |
| r1679 | r1680 | |
| 43 | 44 | AM_RANGE(0x1d00, 0x1dff) AM_WRITE(MWA8_RAM) |
| 44 | 45 | AM_RANGE(0x1e80, 0x1e80) AM_WRITE(tinvader_sound_w) |
| 45 | 46 | AM_RANGE(0x1e86, 0x1e86) AM_WRITE(MWA8_NOP) /* Dodgem Only */ |
| 46 | AM_RANGE(0x1f00, 0x1fff) AM_WRITE(MWA8_RAM) AM_BASE(&s2636_ | |
| 47 | AM_RANGE(0x1f00, 0x1fff) AM_WRITE(MWA8_RAM) AM_BASE(&zac2650_s2636_0_ram) | |
| 47 | 48 | ADDRESS_MAP_END |
| 48 | 49 | |
| 49 | 50 | static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) |
| r1679 | r1680 | |
| 236 | 237 | |
| 237 | 238 | static PALETTE_INIT( zac2650 ) |
| 238 | 239 | { |
| 239 | palette_set_color(machine,0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */ | |
| 240 | palette_set_color(machine,1,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */ | |
| 241 | colortable[0] = 0; | |
| 242 | colortable[1] = 1; | |
| 243 | colortable[2] = 0; | |
| 244 | colortable[3] = 0; | |
| 240 | palette_set_color(machine,0,RGB_BLACK); | |
| 241 | palette_set_color(machine,1,RGB_WHITE); | |
| 242 | palette_set_color(machine,2,RGB_BLACK); | |
| 243 | palette_set_color(machine,3,RGB_BLACK); | |
| 245 | 244 | } |
| 246 | 245 | |
| 247 | 246 | /************************************************************************************************ |
| r1679 | r1680 | |
| 333 | 332 | MDRV_SCREEN_SIZE(30*24, 32*24) |
| 334 | 333 | MDRV_SCREEN_VISIBLE_AREA(0, 719, 0, 767) |
| 335 | 334 | MDRV_GFXDECODE(tinvader) |
| 336 | MDRV_PALETTE_LENGTH(2) | |
| 337 | MDRV_COLORTABLE_LENGTH(4) | |
| 335 | MDRV_PALETTE_LENGTH(4) | |
| 338 | 336 | |
| 339 | 337 | MDRV_PALETTE_INIT(zac2650) |
| 340 | 338 | MDRV_VIDEO_START(tinvader) |
| r0 | r1680 | |
|---|---|---|
| 1 | /* | |
| 2 | Virtual Combat hardware games. | |
| 3 | ||
| 4 | ---- | |
| 5 | ||
| 6 | There are two known games on this hardware. Both are developed by | |
| 7 | Kyle Hodgetts. | |
| 8 | ||
| 9 | Virtual Combat (c) VR8 Inc. 1993 | |
| 10 | http://arcade.sonzogni.com/VRCombat/ | |
| 11 | ||
| 12 | Shadow Fighters (German) (c) Sega? 1989? | |
| 13 | ||
| 14 | ---- | |
| 15 | ||
| 16 | There are two boards to this hardware. The upper, which contains the | |
| 17 | graphics ROMs and the i860, and the lower which contains the main | |
| 18 | and sound CPU's. Virtual Combat sports two upper boards which presumably | |
| 19 | output a different rasterization of the scene for each stereo eye. | |
| 20 | ||
| 21 | UPPER: | |
| 22 | Intel I860 XR processor | |
| 23 | MB8298-25P-SK RAMS x12 (silkscreen said 62256) | |
| 24 | Analog device ADV476KN50E (silkscreen said BT476) | |
| 25 | 20 MHZ Oscillator | |
| 26 | 8-way DIP switch | |
| 27 | 574200D x4 | |
| 28 | PAL palce24v10 x2 (next to the i860) | |
| 29 | ||
| 30 | LOWER: | |
| 31 | Motorola MC68000P12 x2 | |
| 32 | 12 MHz Oscillator x2 | |
| 33 | Harris ADC0804LCN x2 | |
| 34 | 4 MB8298-25P-SK RAMS (in groups of 2 off by themselves) | |
| 35 | 1 CXK58257SP-10L at each end of the SNDCPU ROMS and the CPU ROMS (4 chips total) | |
| 36 | Motorola MC6845P CRT controller | |
| 37 | 2x 27C010A containing sound code | |
| 38 | Xx 27C040 containing sound data (VOC files) | |
| 39 | Dallas DS1220Y - closest to pin 64 of CPU - read as a 2716 - (silkscreened "6116") | |
| 40 | Xx 27c040 containing program code, etc. | |
| 41 | ||
| 42 | ---- | |
| 43 | ||
| 44 | NOTES : Shadow Fighters appears to have been dumped from an earlier | |
| 45 | revision of the hardware. There are no IC labels, and | |
| 46 | lots of factory rework has been done to the bottom board. | |
| 47 | Because the board was so early for Shadow Fighters, there were | |
| 48 | no IC locations silkscreened on the PCB. The locations | |
| 49 | from Virtual Combat have been used. | |
| 50 | The Shadow Fighters bottom board has an extra 20 mhz xtal on it. | |
| 51 | The data stored in REGION_SOUND1 is simply a series of | |
| 52 | Creative Media VOC files concatenated to eachother. | |
| 53 | The sound program (REGION_CPU2) is about 640 bytes long. | |
| 54 | The graphics ROMs have had images successfully extracted from | |
| 55 | them. Pictures for Shadow Fighters can be found online. | |
| 56 | The hardware is said to run at medium resolution. | |
| 57 | The SRAM module dump can likely be thrown away for both games. | |
| 58 | The PAL that's dumped for Shadow Fighters looks pretty bad. | |
| 59 | Websites seem to say Shadow Fighters is a SEGA game, but I | |
| 60 | couldn't find a SEGA string anywhere in the ROMs. I also, | |
| 61 | however, could not find a VR8 string in the Virtual Combat | |
| 62 | ROMs, so who knows... Kyle's name is easily found in both | |
| 63 | though :). | |
| 64 | ||
| 65 | TODO : This is a skeleton driver. Nearly everything. | |
| 66 | i860XR-25 CPU core! | |
| 67 | ||
| 68 | */ | |
| 69 | ||
| 70 | #include <stdio.h> | |
| 71 | #include "driver.h" | |
| 72 | #include "video/generic.h" | |
| 73 | ||
| 74 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 75 | AM_RANGE(0x000000, 0xfffff) AM_ROM | |
| 76 | ADDRESS_MAP_END | |
| 77 | ||
| 78 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 79 | AM_RANGE(0x000000, 0x3ffff) AM_ROM | |
| 80 | ADDRESS_MAP_END | |
| 81 | ||
| 82 | /* | |
| 83 | static ADDRESS_MAP_START( video_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 84 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 85 | ADDRESS_MAP_END | |
| 86 | */ | |
| 87 | ||
| 88 | static INPUT_PORTS_START( vcombat ) | |
| 89 | INPUT_PORTS_END | |
| 90 | ||
| 91 | ||
| 92 | static MACHINE_DRIVER_START( vcombat ) | |
| 93 | MDRV_CPU_ADD_TAG("main", M68000, XTAL_12MHz) | |
| 94 | MDRV_CPU_PROGRAM_MAP(main_map,0) | |
| 95 | ||
| 96 | MDRV_CPU_ADD_TAG("sound", M68000, XTAL_12MHz) | |
| 97 | MDRV_CPU_PROGRAM_MAP(sound_map,0) | |
| 98 | /* | |
| 99 | Virtual combat has an i860 on each of its two upper boards. | |
| 100 | MDRV_CPU_ADD_TAG("video", i860, XTAL_20MHz) | |
| 101 | MDRV_CPU_PROGRAM_MAP(video_map,0) | |
| 102 | */ | |
| 103 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 104 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 105 | ||
| 106 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 107 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 108 | ||
| 109 | MDRV_SCREEN_SIZE(640, 480) | |
| 110 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) | |
| 111 | MDRV_PALETTE_LENGTH(0x100) | |
| 112 | ||
| 113 | MDRV_VIDEO_START(generic_bitmapped) | |
| 114 | MDRV_VIDEO_UPDATE(generic_bitmapped) | |
| 115 | MACHINE_DRIVER_END | |
| 116 | ||
| 117 | ||
| 118 | ROM_START( vcombat ) | |
| 119 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) | |
| 120 | ROM_LOAD16_BYTE( "ep8v2.b49", 0x00000, 0x80000, CRC(98d5a45d) SHA1(099e314f11c93ad6e642ceaa311e2a5b6fd7193c) ) | |
| 121 | ROM_LOAD16_BYTE( "ep7v2.b51", 0x00001, 0x80000, CRC(06185bcb) SHA1(855b11ae7644d6c7c1c935b2f5aec484071ca870) ) | |
| 122 | ||
| 123 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 124 | ROM_LOAD16_BYTE( "ep1v2.b42", 0x00000, 0x20000, CRC(560b2e6c) SHA1(e35c0466a1e14beab080e3155f873e9c2a1c028b) ) | |
| 125 | ROM_LOAD16_BYTE( "ep6v2.b33", 0x00001, 0x20000, CRC(37928a5d) SHA1(7850be26dbd356cdeef2a0d87738de16420f6291) ) | |
| 126 | ||
| 127 | ROM_REGION( 0x180000, REGION_SOUND1, 0 ) | |
| 128 | ROM_LOAD16_BYTE( "ep2v2.b41", 0x000000, 0x80000, CRC(7dad3458) SHA1(deae5ebef0346250d3f9744933423253a336bb67) ) | |
| 129 | ROM_LOAD16_BYTE( "ep4v2.b37", 0x000001, 0x80000, CRC(b0be2e91) SHA1(66f3a9f5abeb4b95ac806e4bb165f938dca38b2d) ) | |
| 130 | ROM_LOAD16_BYTE( "ep3v2.b40", 0x100000, 0x40000, CRC(8c491526) SHA1(95c6bcbe0adcfffb12fd2b86c9f4ca26aa188bbf) ) | |
| 131 | ROM_LOAD16_BYTE( "ep5v2.b36", 0x100001, 0x40000, CRC(7592b2eb) SHA1(92a540726306d7adbf207fe86a4c4fa66958f90b) ) | |
| 132 | ||
| 133 | ROM_REGION( 0x800, REGION_USER1, 0 ) /* The SRAM module */ | |
| 134 | ROM_LOAD( "ds1220y.b53", 0x000, 0x800, CRC(b21cfe5f) SHA1(898ace3cd0913ea4b0dc84320219777773ef856f) ) | |
| 135 | ||
| 136 | /* These roms are identical on both of the upper boards */ | |
| 137 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) | |
| 138 | ROM_LOAD( "9.u54", 0x000000, 0x80000, CRC(a276e18b) SHA1(6d60e519196a4858b82241504592413df498e12f) ) | |
| 139 | ROM_LOAD( "10.u55", 0x080000, 0x80000, CRC(8921f20e) SHA1(6e9ca2eaad3e1108ba0e1d7792fd5d0305bec201) ) | |
| 140 | ROM_LOAD( "11.u56", 0x100000, 0x80000, CRC(a83094ce) SHA1(c3512375fecdb5e7eb02a4aa140ae4efe0233cb8) ) | |
| 141 | ROM_LOAD( "12.u57", 0x180000, 0x80000, CRC(0cdffd4f) SHA1(65ace78711b3ef6e0ff9a7ad7343b5558e652f6c) ) | |
| 142 | ||
| 143 | ROM_REGION( 0x400, REGION_PLDS, 0 ) | |
| 144 | ROM_LOAD( "pal1_w2.u51", 0x000, 0x1f1, CRC(af497420) SHA1(03aa82189d91ae194dd5a6e7b9dbdb7cd473ddb6) ) | |
| 145 | ROM_LOAD( "pal2_w2.u52", 0x200, 0x1f1, CRC(4a6df05d) SHA1(236b951e5daf927c050d0f35558c171a020156ab) ) | |
| 146 | ROM_END | |
| 147 | ||
| 148 | ROM_START( shadfgtr ) | |
| 149 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) | |
| 150 | ROM_LOAD16_BYTE( "shadfgtr.b49", 0x00000, 0x80000, CRC(2d9d31a1) SHA1(45854915bcb9db2e4076a7f26a0a349077cd10bc) ) | |
| 151 | ROM_LOAD16_BYTE( "shadfgtr.b51", 0x00001, 0x80000, CRC(03d0f075) SHA1(06013a4363305a23d7e8ba8fe2fa961cd540391d) ) | |
| 152 | ||
| 153 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 154 | ROM_LOAD16_BYTE( "shadfgtr.b42", 0x00000, 0x20000, CRC(f8605dcd) SHA1(1b29f47856ccc757bc96674682ae48f87e6b0e54) ) | |
| 155 | ROM_LOAD16_BYTE( "shadfgtr.b33", 0x00001, 0x20000, CRC(291d59ac) SHA1(cc4904c2ac8ef6a12033c10893246a438ac44014) ) | |
| 156 | ||
| 157 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) | |
| 158 | ROM_LOAD16_BYTE( "shadfgtr.b41", 0x00000, 0x80000, CRC(9e4b4df3) SHA1(8101197275e9f728acdeef85737eecbdec132b27) ) | |
| 159 | ROM_LOAD16_BYTE( "shadfgtr.b37", 0x00001, 0x80000, CRC(98446ba2) SHA1(1c8cc0d9c5de54d9e53699a5ab281579d15edc96) ) | |
| 160 | ||
| 161 | ROM_REGION( 0x800, REGION_USER1, 0 ) /* The SRAM module */ | |
| 162 | ROM_LOAD( "shadfgtr.b53", 0x000, 0x800, CRC(e766a3ab) SHA1(e7696ec08d5c86f64d768480f43edbd19ded162d) ) | |
| 163 | ||
| 164 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) | |
| 165 | ROM_LOAD( "shadfgtr.u54", 0x000000, 0x80000, CRC(c45d68d6) SHA1(a133e4f13d3af18bccf0d060a659d64ac699b159) ) | |
| 166 | ROM_LOAD( "shadfgtr.u55", 0x080000, 0x80000, CRC(e807631d) SHA1(9027ff7dc60b808434dac292c08f0630d3d52186) ) | |
| 167 | ROM_LOAD( "shadfgtr.u56", 0x100000, 0x80000, CRC(fb76db5a) SHA1(fa546f465df113c13037abed1162bfa6f9b1dc9b) ) | |
| 168 | ROM_LOAD( "shadfgtr.u57", 0x180000, 0x80000, CRC(60d701d7) SHA1(936473b5e3b2e9e9e3b50cf977fc5a670a097850) ) | |
| 169 | ||
| 170 | ROM_REGION( 0x200, REGION_PLDS, 0 ) | |
| 171 | ROM_LOAD( "shadfgtr.u51", 0x000, 0x1f1, CRC(bab58337) SHA1(c4a79c8e53aeadb7f64d49d214b607b5b36f144e) ) | |
| 172 | /* The second upper-board PAL couldn't be read */ | |
| 173 | ROM_END | |
| 174 | ||
| 175 | /* YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME FLAGS */ | |
| 176 | GAME( 1993, vcombat, 0, vcombat, vcombat, 0, ROT0, "VR8 Inc.", "Virtual Combat", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 177 | GAME( 1989, shadfgtr, 0, vcombat, vcombat, 0, ROT0, "Sega?", "Shadow Fighters", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| r1679 | r1680 | |
|---|---|---|
| 212 | 212 | { |
| 213 | 213 | if (out&0x2000) |
| 214 | 214 | cpunum_set_input_line(machine, 0, 1, ASSERT_LINE); |
| 215 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, param+1, 0), param+1 | |
| 215 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, param+1, 0), param+1 | |
| 216 | 216 | interrupt_line_active = 1; |
| 217 | 217 | } |
| 218 | 218 | else |
| 219 | 219 | { |
| 220 | 220 | if (interrupt_line_active) |
| 221 | 221 | cpunum_set_input_line(machine, 0, 1, CLEAR_LINE); |
| 222 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, interrupt_scanline, 0), interrupt_scanline | |
| 222 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, interrupt_scanline, 0), interrupt_scanline | |
| 223 | 223 | interrupt_line_active = 0; |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | static VIDEO_START( pkscramble ) |
| 228 | 228 | { |
| 229 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 230 | md_tilemap = tilemap_create(get_md_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 231 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8,32,32); | |
| 229 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 230 | md_tilemap = tilemap_create(get_md_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 231 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8,32,32); | |
| 232 | 232 | |
| 233 | 233 | tilemap_set_transparent_pen(md_tilemap,15); |
| 234 | 234 | tilemap_set_transparent_pen(fg_tilemap,15); |
| r1679 | r1680 | |
| 275 | 275 | out = 0; |
| 276 | 276 | interrupt_line_active=0; |
| 277 | 277 | scanline_timer = timer_alloc(scanline_callback, NULL); |
| 278 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, interrupt_scanline, 0), interrupt_scanline | |
| 278 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, interrupt_scanline, 0), interrupt_scanline | |
| 279 | 279 | |
| 280 | 280 | state_save_register_global(out); |
| 281 | 281 | state_save_register_global(interrupt_line_active); |
| r1679 | r1680 | |
|---|---|---|
| 219 | 219 | |
| 220 | 220 | PORT_START |
| 221 | 221 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Eprom data bit */ |
| 222 | PORT_ | |
| 222 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW | |
| 223 | 223 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 224 | 224 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* Another service mode */ |
| 225 | 225 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
| 285 | 285 | |
| 286 | 286 | PORT_START |
| 287 | 287 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Eprom data bit */ |
| 288 | PORT_ | |
| 288 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW | |
| 289 | 289 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 290 | 290 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* Another service mode */ |
| 291 | 291 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1679 | r1680 | |
|---|---|---|
| 87 | 87 | next_interrupt_number = (interrupt_number + 1) % INTERRUPTS_PER_FRAME; |
| 88 | 88 | next_vpos = interrupt_lines[next_interrupt_number]; |
| 89 | 89 | |
| 90 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_interrupt_number | |
| 90 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, next_vpos, 0), next_interrupt_number | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| r1679 | r1680 | |
| 100 | 100 | static void start_interrupt_timer(void) |
| 101 | 101 | { |
| 102 | 102 | int vpos = interrupt_lines[0]; |
| 103 | timer_adjust(interrupt_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 103 | timer_adjust_oneshot(interrupt_timer, video_screen_get_time_until_pos(0, vpos, 0), 0 | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 |
| r1679 | r1680 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | static MACHINE_RESET( m107 ) |
| 53 | 53 | { |
| 54 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 54 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0 | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /*****************************************************************************/ |
| r1679 | r1680 | |
| 77 | 77 | /* adjust for next scanline */ |
| 78 | 78 | if (++scanline >= machine->screen[0].height) |
| 79 | 79 | scanline = 0; |
| 80 | timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 80 | timer_adjust_oneshot(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 |
| r1679 | r1680 | |
|---|---|---|
| 608 | 608 | static INPUT_PORTS_START( ark1ball ) |
| 609 | 609 | PORT_INCLUDE(arknoidj) |
| 610 | 610 | |
| 611 | PORT_ | |
| 611 | PORT_MODIFY | |
| 612 | 612 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) /* "ld a,$60" at 0x93bd and "ld a,$60" at 0x9c7f and 0x9c9b */ |
| 613 | 613 | PORT_DIPSETTING( 0x10, "60K 100K 60K+" ) |
| 614 | 614 | PORT_DIPSETTING( 0x00, "60K" ) |
| r1679 | r1680 | |
| 672 | 672 | static INPUT_PORTS_START( arktayt2 ) |
| 673 | 673 | PORT_INCLUDE(arknoidj) |
| 674 | 674 | |
| 675 | PORT_ | |
| 675 | PORT_MODIFY | |
| 676 | 676 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) /* "ld a,$60" at 0x93bd and "ld a,$60" at 0x9c7f and 0x9c9b */ |
| 677 | 677 | PORT_DIPSETTING( 0x10, "60K 100K 60K+" ) |
| 678 | 678 | PORT_DIPSETTING( 0x00, "60K" ) |
| r1679 | r1680 | |
|---|---|---|
| 617 | 617 | PORT_BIT ( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 618 | 618 | PORT_BIT ( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) |
| 619 | 619 | PORT_BIT ( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) |
| 620 | PORT_ | |
| 620 | PORT_SERVICE_NO_TOGGLE( 0x0100, IP_ACTIVE_LOW | |
| 621 | 621 | |
| 622 | 622 | PORT_START |
| 623 | 623 | PORT_BIT ( 0xfe41, IP_ACTIVE_LOW, IPT_UNUSED ) // explicitely discarded |
| r1679 | r1680 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | static VIDEO_START( cball ) |
| 30 | 30 | { |
| 31 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 31 | bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 |
| r1679 | r1680 | |
|---|---|---|
| 1672 | 1672 | PORT_MODIFY("IN0") // IN0 - Player 1 |
| 1673 | 1673 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 1674 | 1674 | |
| 1675 | PORT_MODIFY("IN | |
| 1675 | PORT_MODIFY("IN1") // IN1 - Player 2 | |
| 1676 | 1676 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 1677 | 1677 | INPUT_PORTS_END |
| 1678 | 1678 | |
| r1679 | r1680 | |
| 4094 | 4094 | time_vblank_irq = 100; |
| 4095 | 4095 | |
| 4096 | 4096 | irq_level = 1; |
| 4097 | ||
| 4098 | NMK112_init(0); | |
| 4097 | 4099 | } |
| 4098 | 4100 | |
| 4099 | 4101 | static DRIVER_INIT( agallet ) |
| r1679 | r1680 | |
| 4161 | 4163 | cave_spritetype = 1; // "different" sprites (no zooming?) |
| 4162 | 4164 | time_vblank_irq = 90; |
| 4163 | 4165 | |
| 4164 | NMK112_ | |
| 4166 | NMK112_init | |
| 4165 | 4167 | } |
| 4166 | 4168 | |
| 4167 | 4169 | static DRIVER_INIT( esprade ) |
| r1679 | r1680 | |
|---|---|---|
| 148 | 148 | |
| 149 | 149 | ***************************************************************************/ |
| 150 | 150 | |
| 151 | /* Define clocks based on actual OSC on the PCB */ | |
| 152 | ||
| 153 | #define CPU_CLOCK (XTAL_40MHz / 2) /* clock for 68020 */ | |
| 154 | #define SOUND_CPU_CLOCK (XTAL_12MHz / 2) /* clock for Z80 sound CPU */ | |
| 155 | #define FM_SOUND_CLOCK (XTAL_33_8688MHz / 2) /* FM clock */ | |
| 156 | ||
| 157 | /* NOTE: YMF278B_STD_CLOCK is defined in /src/emu/sound/ymf278b.h */ | |
| 158 | ||
| 159 | ||
| 151 | 160 | #include "driver.h" |
| 152 | 161 | #include "deprecat.h" |
| 153 | 162 | #include "sound/262intf.h" |
| r1679 | r1680 | |
| 250 | 259 | COMBINE_DATA(&fuuki32_vregs[offset]); |
| 251 | 260 | if (offset == 0x1c/4) |
| 252 | 261 | { |
| 253 | timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, fuuki32_vregs[0x1c/4]>>16, Machine->screen[0].visarea.max_x + 1), 0, video_screen_get_frame_period(0)); | |
| 262 | timer_adjust_periodic(raster_interrupt_timer, video_screen_get_time_until_pos(0, fuuki32_vregs[0x1c/4]>>16, Machine->screen[0].visarea.max_x + 1), 0, video_screen_get_frame_period(0)); | |
| 254 | 263 | } |
| 255 | 264 | } |
| 256 | 265 | } |
| r1679 | r1680 | |
| 555 | 564 | { |
| 556 | 565 | cpunum_set_input_line(machine, 0, 5, PULSE_LINE); // Raster Line IRQ |
| 557 | 566 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| 558 | timer_adjust(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 567 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(0), 0 | |
| 559 | 568 | } |
| 560 | 569 | |
| 561 | 570 | |
| r1679 | r1680 | |
| 569 | 578 | { |
| 570 | 579 | timer_set(video_screen_get_time_until_pos(0, 248, 0), NULL, 0, level_1_interrupt_callback); |
| 571 | 580 | timer_set(video_screen_get_time_until_pos(0, machine->screen[0].visarea.max_y + 1, 0), NULL, 0, vblank_interrupt_callback); |
| 572 | timer_adjust(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0 | |
| 581 | timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_time_until_pos(0, 0, machine->screen[0].visarea.max_x + 1), 0 | |
| 573 | 582 | } |
| 574 | 583 | |
| 575 | 584 | |
| r1679 | r1680 | |
| 591 | 600 | static MACHINE_DRIVER_START( fuuki32 ) |
| 592 | 601 | |
| 593 | 602 | /* basic machine hardware */ |
| 594 | MDRV_CPU_ADD(M68EC020, | |
| 603 | MDRV_CPU_ADD(M68EC020, CPU_CLOCK) /* 20MHz verified */ | |
| 595 | 604 | MDRV_CPU_PROGRAM_MAP(fuuki32_readmem,fuuki32_writemem) |
| 596 | 605 | |
| 597 | MDRV_CPU_ADD_TAG("sound", Z80, | |
| 606 | MDRV_CPU_ADD_TAG("sound", Z80, SOUND_CPU_CLOCK) /* 6MHz verified */ | |
| 598 | 607 | MDRV_CPU_PROGRAM_MAP(fuuki32_sound_readmem,fuuki32_sound_writemem) |
| 599 | 608 | MDRV_CPU_IO_MAP(fuuki32_sound_readport,fuuki32_sound_writeport) |
| 600 | 609 | |
| r1679 | r1680 | |
| 618 | 627 | /* sound hardware */ |
| 619 | 628 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 620 | 629 | |
| 621 | MDRV_SOUND_ADD(YMF262, | |
| 630 | MDRV_SOUND_ADD(YMF262, FM_SOUND_CLOCK) /* 33.8688MHz OSC divided by 2 is 16.9344MHz */ | |
| 622 | 631 | MDRV_SOUND_CONFIG(ymf262_interface) |
| 623 | 632 | MDRV_SOUND_ROUTE(0, "left", 0.50) |
| 624 | 633 | MDRV_SOUND_ROUTE(1, "right", 0.50) |
| 625 | 634 | MDRV_SOUND_ROUTE(2, "left", 0.50) |
| 626 | 635 | MDRV_SOUND_ROUTE(3, "right", 0.50) |
| 627 | 636 | |
| 628 | MDRV_SOUND_ADD(YMF278B, YMF278B_STD_CLOCK) | |
| 637 | MDRV_SOUND_ADD(YMF278B, YMF278B_STD_CLOCK) /* YMF278B_STD_CLOCK = OSC 33.8688MHz */ | |
| 629 | 638 | MDRV_SOUND_CONFIG(ymf278b_interface) |
| 630 | 639 | MDRV_SOUND_ROUTE(0, "left", 0.50) |
| 631 | 640 | MDRV_SOUND_ROUTE(1, "right", 0.50) |
| r1679 | r1680 | |
| 641 | 650 | |
| 642 | 651 | /*************************************************************************** |
| 643 | 652 | |
| 644 | Asura Blade | |
| 645 | Fuuki, 1999 | |
| 653 | Asura Blade - Sword of Dynasty (Japan) | |
| 646 | 654 | |
| 647 | This dump is taken from a ROM board with number FG-3J ROM-J | |
| 648 | There's nothing on the board except some 4M EPROMs and several | |
| 649 | surface mounted MASK ROMs. | |
| 655 | Fuuki, 1999 Consists of a FG-3J MAIN-J mainboard & FG-3J ROM-J combo | |
| 650 | 656 | |
| 651 | The connectors on the board and the size of the board is similar | |
| 652 | to Jaleco Megasys32, however it's not compatible with it due to the | |
| 653 | connector spacing being different. The physical size of the board | |
| 654 | is too large to fit an SSV board. | |
| 655 | So, I have no idea what the main hardware is, the game probably | |
| 656 | runs on a custom Fuuki system board named 'FG-3'? | |
| 657 | ||
| 658 | 657 | ***************************************************************************/ |
| 659 | 658 | |
| 660 | 659 | ROM_START( asurabld ) |
| r1679 | r1680 | |
| 692 | 691 | ROM_LOAD( "pcm.u6", 0x00000, 0x400000, CRC(ac72225a) SHA1(8d16399ed34ac5bd69dbf43b2de2b0db9ac1c610) ) |
| 693 | 692 | ROM_END |
| 694 | 693 | |
| 694 | /*************************************************************************** | |
| 695 | ||
| 696 | Asura Buster - Eternal Warriors (Japan) | |
| 697 | ||
| 698 | Fuuki, 2000 Consists of a FG-3J MAIN-J mainboard & FG-3J ROM-J combo | |
| 699 | ||
| 700 | ***************************************************************************/ | |
| 701 | ||
| 695 | 702 | ROM_START( asurabus ) |
| 696 | 703 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* M68020 */ |
| 697 | 704 | ROM_LOAD32_BYTE( "pgm3.u1", 0x000000, 0x80000, CRC(2c6b5271) SHA1(188371f1f003823ac719e962e048719d76696b2f) ) |
| r1679 | r1680 | |
|---|---|---|
| 54 | 54 | static VIDEO_START(cm2) |
| 55 | 55 | { |
| 56 | 56 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 57 | | |
| 57 | | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | static VIDEO_UPDATE(cm2) |
| r1679 | r1680 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | static VIDEO_START( bigfghtr ) |
| 164 | 164 | { |
| 165 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 166 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,16,16,64,32); | |
| 167 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_PEN,8,8,64,32); | |
| 165 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 166 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,16,16,64,32); | |
| 167 | tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,8,8,64,32); | |
| 168 | 168 | |
| 169 | 169 | tilemap_set_transparent_pen(fg_tilemap,0xf); |
| 170 | 170 | tilemap_set_transparent_pen(tx_tilemap,0xf); |
| r1679 | r1680 | |
|---|---|---|
| 115 | 115 | scanline = 0; |
| 116 | 116 | |
| 117 | 117 | /* set a timer */ |
| 118 | timer_adjust(scan_timer, video_screen_get_time_until_pos(0, scanline, 320), scanline | |
| 118 | timer_adjust_oneshot(scan_timer, video_screen_get_time_until_pos(0, scanline, 320), scanline | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | |
| r1679 | r1680 | |
| 174 | 174 | |
| 175 | 175 | /* set the first scanline 0 timer to go off */ |
| 176 | 176 | scan_timer = timer_alloc(vdp_reload_counter, NULL); |
| 177 | timer_adjust(scan_timer, video_screen_get_time_until_pos(0, 0, 320), 0 | |
| 177 | timer_adjust_oneshot(scan_timer, video_screen_get_time_until_pos(0, 0, 320), 0 | |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 |
| r1679 | r1680 | |
|---|---|---|
| 264 | 264 | |
| 265 | 265 | static VIDEO_START( trvmadns ) |
| 266 | 266 | { |
| 267 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 267 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 268 | 268 | |
| 269 | 269 | tilemap_set_transparent_pen(bg_tilemap,1); |
| 270 | 270 | } |
| r1679 | r1680 | |
|---|---|---|
| 132 | 132 | curscanline = (curscanline + 64) & 255; |
| 133 | 133 | |
| 134 | 134 | /* next one at the start of this scanline */ |
| 135 | timer_adjust(irq_timer, video_screen_get_time_until_pos(0, curscanline, 0), curscanline | |
| 135 | timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(0, curscanline, 0), curscanline | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 |
| r1679 | r1680 | |
|---|---|---|
| 346 | 346 | memset(rabbit_tilemap_ram[2], 0, 0x20000); |
| 347 | 347 | memset(rabbit_tilemap_ram[3], 0, 0x20000); |
| 348 | 348 | |
| 349 | rabbit_tilemap[0] = tilemap_create(get_rabbit_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 128,32); | |
| 350 | rabbit_tilemap[1] = tilemap_create(get_rabbit_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 128,32); | |
| 351 | rabbit_tilemap[2] = tilemap_create(get_rabbit_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 128,32); | |
| 352 | rabbit_tilemap[3] = tilemap_create(get_rabbit_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 8, 8, 128,32); | |
| 349 | rabbit_tilemap[0] = tilemap_create(get_rabbit_tilemap0_tile_info,tilemap_scan_rows,16, 16, 128,32); | |
| 350 | rabbit_tilemap[1] = tilemap_create(get_rabbit_tilemap1_tile_info,tilemap_scan_rows,16, 16, 128,32); | |
| 351 | rabbit_tilemap[2] = tilemap_create(get_rabbit_tilemap2_tile_info,tilemap_scan_rows,16, 16, 128,32); | |
| 352 | rabbit_tilemap[3] = tilemap_create(get_rabbit_tilemap3_tile_info,tilemap_scan_rows, 8, 8, 128,32); | |
| 353 | 353 | tilemap_set_transparent_pen(rabbit_tilemap[0],0x0); |
| 354 | 354 | tilemap_set_transparent_pen(rabbit_tilemap[1],0x0); |
| 355 | 355 | tilemap_set_transparent_pen(rabbit_tilemap[2],0x0); |
| r1679 | r1680 | |
| 1136 | 1136 | memset(rabbit_tilemap_ram[2], 0, 0x20000); |
| 1137 | 1137 | memset(rabbit_tilemap_ram[3], 0, 0x20000); |
| 1138 | 1138 | |
| 1139 | rabbit_tilemap[0] = tilemap_create(get_tmmjprd_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 8, 8, 64, 64); | |
| 1140 | rabbit_tilemap[1] = tilemap_create(get_tmmjprd_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 64, 64); | |
| 1141 | rabbit_tilemap[2] = tilemap_create(get_tmmjprd_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 64, 64); | |
| 1142 | rabbit_tilemap[3] = tilemap_create(get_tmmjprd_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN , 16, 16, 64, 64); | |
| 1139 | rabbit_tilemap[0] = tilemap_create(get_tmmjprd_tilemap0_tile_info,tilemap_scan_rows, 8, 8, 64, 64); | |
| 1140 | rabbit_tilemap[1] = tilemap_create(get_tmmjprd_tilemap1_tile_info,tilemap_scan_rows,16, 16, 64, 64); | |
| 1141 | rabbit_tilemap[2] = tilemap_create(get_tmmjprd_tilemap2_tile_info,tilemap_scan_rows,16, 16, 64, 64); | |
| 1142 | rabbit_tilemap[3] = tilemap_create(get_tmmjprd_tilemap3_tile_info,tilemap_scan_rows,16, 16, 64, 64); | |
| 1143 | 1143 | tilemap_set_transparent_pen(rabbit_tilemap[0],0x0); |
| 1144 | 1144 | tilemap_set_transparent_pen(rabbit_tilemap[1],0x0); |
| 1145 | 1145 | tilemap_set_transparent_pen(rabbit_tilemap[2],0x0); |
| r1679 | r1680 | |
|---|---|---|
| 267 | 267 | |
| 268 | 268 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 269 | 269 | ROM_LOAD( "pooyan.pr1", 0x0000, 0x0020, CRC(a06a6d0e) SHA1(ae131320b66d76d4bc9108da6708f6f874b2e123) ) /* palette */ |
| 270 | ROM_LOAD( "pooyan.pr2", 0x0020, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 271 | ROM_LOAD( "pooyan.pr3", 0x0120, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 270 | ROM_LOAD( "pooyan.pr3", 0x0020, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 271 | ROM_LOAD( "pooyan.pr2", 0x0120, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 272 | 272 | ROM_END |
| 273 | 273 | |
| 274 | 274 | ROM_START( pooyans ) |
| r1679 | r1680 | |
| 292 | 292 | |
| 293 | 293 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 294 | 294 | ROM_LOAD( "pooyan.pr1", 0x0000, 0x0020, CRC(a06a6d0e) SHA1(ae131320b66d76d4bc9108da6708f6f874b2e123) ) /* palette */ |
| 295 | ROM_LOAD( "pooyan.pr2", 0x0020, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 296 | ROM_LOAD( "pooyan.pr3", 0x0120, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 295 | ROM_LOAD( "pooyan.pr3", 0x0020, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 296 | ROM_LOAD( "pooyan.pr2", 0x0120, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 297 | 297 | ROM_END |
| 298 | 298 | |
| 299 | 299 | ROM_START( pootan ) |
| r1679 | r1680 | |
| 317 | 317 | |
| 318 | 318 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 319 | 319 | ROM_LOAD( "pooyan.pr1", 0x0000, 0x0020, CRC(a06a6d0e) SHA1(ae131320b66d76d4bc9108da6708f6f874b2e123) ) /* palette */ |
| 320 | ROM_LOAD( "pooyan.pr2", 0x0020, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 321 | ROM_LOAD( "pooyan.pr3", 0x0120, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 320 | ROM_LOAD( "pooyan.pr3", 0x0020, 0x0100, CRC(8cd4cd60) SHA1(e0188ecd5b53a8e6e28c1de80def676740772334) ) /* characters */ | |
| 321 | ROM_LOAD( "pooyan.pr2", 0x0120, 0x0100, CRC(82748c0b) SHA1(9ce8eb92e482eba5a9077e9db99841d65b011346) ) /* sprites */ | |
| 322 | 322 | ROM_END |
| 323 | 323 | |
| 324 | 324 |
| r1679 | r1680 | |
|---|---|---|
| 384 | 384 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 385 | 385 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 386 | 386 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 387 | PORT_ | |
| 387 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 388 | 388 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 389 | 389 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 390 | 390 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1679 | r1680 | |
| 402 | 402 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 403 | 403 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 404 | 404 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 405 | PORT_ | |
| 405 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW | |
| 406 | 406 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 407 | 407 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */ |
| 408 | 408 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| r1679 | r1680 | |
|---|---|---|
| 211 | 211 | |
| 212 | 212 | static INPUT_PORTS_START( pirates ) |
| 213 | 213 | PORT_START // IN0 - 0x300000.w |
| 214 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 215 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 216 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 217 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 218 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 219 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 220 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 221 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 222 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 223 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 224 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 225 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 226 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 227 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 228 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 229 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) | |
| 214 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 215 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 216 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 217 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 218 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 219 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 220 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 221 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 222 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 223 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 224 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 225 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 226 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 227 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 228 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 229 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) | |
| 230 | 230 | |
| 231 | 231 | PORT_START // IN1 - 0x400000.w |
| 232 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 233 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 234 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 235 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 236 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH,IPT_SPECIAL ) // EEPROM data | |
| 237 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" | |
| 238 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" | |
| 239 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) // protection (see pirates_in1_r) | |
| 232 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 233 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 234 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 235 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) | |
| 236 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH,IPT_SPECIAL ) // EEPROM data | |
| 237 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" | |
| 238 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" | |
| 239 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) // protection (see pirates_in1_r) | |
| 240 | 240 | /* What do these bits do ? */ |
| 241 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 242 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 243 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 244 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 245 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 246 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 247 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 248 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 241 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 242 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 243 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 244 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 245 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 246 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 247 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 248 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 249 | 249 | INPUT_PORTS_END |
| 250 | 250 | |
| 251 | 251 |
| r1679 | r1680 | |
|---|---|---|
| 89 | 89 | int flipy = attr & 0x20; |
| 90 | 90 | |
| 91 | 91 | drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, |
| 92 | cliprect, TRANSPARENCY_ | |
| 92 | cliprect, TRANSPARENCY_PEN | |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | } |
| r1679 | r1680 | |
| 98 | 98 | static VIDEO_START(cm) |
| 99 | 99 | { |
| 100 | 100 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 101 | | |
| 101 | | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | static VIDEO_UPDATE(cm) |
| r1679 | r1680 | |
|---|---|---|
| 291 | 291 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 292 | 292 | MDRV_SCREEN_RAW_PARAMS(EXERION_PIXEL_CLOCK, EXERION_HTOTAL, EXERION_HBEND, EXERION_HBSTART, EXERION_VTOTAL, EXERION_VBEND, EXERION_VBSTART) |
| 293 | 293 | MDRV_GFXDECODE(exerion) |
| 294 | MDRV_PALETTE_LENGTH(32) | |
| 295 | MDRV_COLORTABLE_LENGTH(256*3) | |
| 294 | MDRV_PALETTE_LENGTH(256*3) | |
| 296 | 295 | |
| 297 | 296 | MDRV_PALETTE_INIT(exerion) |
| 298 | 297 | MDRV_VIDEO_START(exerion) |
| r1679 | r1680 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | static VIDEO_START(ltcasino) |
| 38 | 38 | { |
| 39 | ltcasino_tilemap = tilemap_create(get_ltcasino_tile_info,tilemap_scan_rows, | |
| 39 | ltcasino_tilemap = tilemap_create(get_ltcasino_tile_info,tilemap_scan_rows, | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 |
| r1679 | r1680 | |
|---|---|---|
| 2437 | 2437 | PORT_DIPNAME( 0x02, 0x02, "Unknown 3-1" ) |
| 2438 | 2438 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2439 | 2439 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2440 | PORT_DIPNAME( 0x04, 0x04, " | |
| 2440 | PORT_DIPNAME( 0x04, 0x04, "F | |
| 2441 | 2441 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2442 | 2442 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2443 | 2443 | PORT_DIPNAME( 0x08, 0x08, "Unknown 3-3" ) |
| 2444 | 2444 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2445 | 2445 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2446 | PORT_DIPNAME( 0x10, 0x10, " | |
| 2446 | PORT_DIPNAME( 0x10, 0x10, "Bye-Byte Bo | |
| 2447 | 2447 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2448 | 2448 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2449 | 2449 | PORT_DIPNAME( 0x20, 0x20, "Unknown 3-5" ) |
| 2450 | 2450 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2451 | 2451 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2452 | PORT_DIPNAME( 0x40, 0x40, " | |
| 2452 | PORT_DIPNAME( 0x40, 0x40, "Aut | |
| 2453 | 2453 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2454 | 2454 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2455 | PORT_DIPNAME( 0x80, 0x80, "Unknown 3-7" ) | |
| 2456 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2457 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2455 | PORT_DIPNAME( 0x80, 0x80, "Background Color" ) | |
| 2456 | PORT_DIPSETTING( 0x80, "Black" ) | |
| 2457 | PORT_DIPSETTING( 0x00, "Blue" ) | |
| 2458 | 2458 | |
| 2459 | 2459 | PORT_START // IN14 - DSW4 ($8000) |
| 2460 | 2460 | PORT_DIPNAME( 0x01, 0x01, "Unknown 4-0" ) |
| r1679 | r1680 | |
| 2466 | 2466 | PORT_DIPNAME( 0x04, 0x04, "Unknown 4-2" ) |
| 2467 | 2467 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2468 | 2468 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2469 | PORT_DIPNAME( 0x08, 0x08, "Unknown 4-3" ) | |
| 2470 | PORT_DIPSETTING( 0x08, "129" ) | |
| 2471 | PORT_DIPSETTING( 0x00, "212" ) | |
| 2469 | PORT_DIPNAME( 0x08, 0x08, "Flip-Flop" ) | |
| 2470 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2471 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2472 | 2472 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) |
| 2473 | 2473 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2474 | 2474 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 2475 | 2475 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 2476 | 2476 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2477 | 2477 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2478 | PORT_DIPNAME( 0x40, 0x40, " | |
| 2478 | PORT_DIPNAME( 0x40, 0x40, "Animatio | |
| 2479 | 2479 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2480 | 2480 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2481 | 2481 | PORT_DIPNAME( 0x80, 0x80, "Full Tests" ) |
| r1679 | r1680 | |
|---|---|---|
| 122 | 122 | PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 123 | 123 | PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 124 | 124 | PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 125 | PORT_ | |
| 125 | PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW | |
| 126 | 126 | PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 127 | 127 | |
| 128 | 128 | PORT_START /* IN3 */ |
| r1679 | r1680 | |
|---|---|---|
| 28 | 28 | #include "audio/t5182.h" |
| 29 | 29 | |
| 30 | 30 | |
| 31 | READ8_HANDLER(darkmist_palette_r); | |
| 32 | WRITE8_HANDLER(darkmist_palette_w); | |
| 33 | WRITE8_HANDLER(darkmist_spritebank_w); | |
| 34 | 31 | VIDEO_START(darkmist); |
| 35 | 32 | VIDEO_UPDATE(darkmist); |
| 36 | 33 | PALETTE_INIT(darkmist); |
| 37 | 34 | |
| 38 | UINT8 * darkmist_scroll; | |
| 35 | extern UINT8 *darkmist_scroll; | |
| 36 | extern UINT8 *darkmist_spritebank; | |
| 39 | 37 | static UINT8 * darkmist_workram; |
| 40 | 38 | |
| 41 | 39 | int darkmist_hw; |
| r1679 | r1680 | |
| 66 | 64 | AM_RANGE(0xc802, 0xc802) AM_READ(input_port_1_r) |
| 67 | 65 | AM_RANGE(0xc803, 0xc803) AM_READ(input_port_2_r) |
| 68 | 66 | AM_RANGE(0xc804, 0xc804) AM_WRITE(darkmist_hw_w) |
| 69 | AM_RANGE(0xc805, 0xc805) AM_WRITE(darkmist_spritebank | |
| 67 | AM_RANGE(0xc805, 0xc805) AM_WRITE(MWA8_RAM) AM_BASE(&darkmist_spritebank | |
| 70 | 68 | AM_RANGE(0xc806, 0xc806) AM_READ(input_port_3_r) |
| 71 | 69 | AM_RANGE(0xc807, 0xc807) AM_READ(input_port_4_r) |
| 72 | 70 | AM_RANGE(0xc808, 0xc808) AM_READ(input_port_5_r) |
| 73 | AM_RANGE(0xd000, 0xd3ff) AM_ | |
| 71 | AM_RANGE(0xd000, 0xd3ff) AM_ | |
| 74 | 72 | AM_RANGE(0xd400, 0xd41f) AM_RAM AM_BASE(&darkmist_scroll) |
| 75 | 73 | AM_RANGE(0xd600, 0xd67f) AM_READWRITE(t5182shared_r, t5182shared_w) |
| 76 | 74 | AM_RANGE(0xd680, 0xd680) AM_WRITE(t5182_sound_irq_w) |
| r1679 | r1680 | |
| 266 | 264 | MDRV_SCREEN_SIZE(256, 256) |
| 267 | 265 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1) |
| 268 | 266 | MDRV_GFXDECODE(darkmist) |
| 269 | MDRV_PALETTE_LENGTH(0x100+1) | |
| 270 | 267 | MDRV_PALETTE_INIT(darkmist) |
| 271 | MDRV_ | |
| 268 | MDRV_P | |
| 272 | 269 | MDRV_VIDEO_START(darkmist) |
| 273 | 270 | MDRV_VIDEO_UPDATE(darkmist) |
| 274 | 271 |
| r1679 | r1680 | |
|---|---|---|
| 364 | 364 | }; |
| 365 | 365 | |
| 366 | 366 | static GFXDECODE_START( exctsccr ) |
| 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout1, 0, 32 ) /* chars */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX1, 0x2000, charlayout2, 0, 32 ) /* chars */ | |
| 367 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout1, 0, 16 ) /* chars */ | |
| 368 | GFXDECODE_ENTRY( REGION_GFX1, 0x2000, charlayout2, 0, 16 ) /* chars */ | |
| 369 | 369 | GFXDECODE_ENTRY( REGION_GFX1, 0x1000, spritelayout1, 16*8, 32 ) /* sprites */ |
| 370 | 370 | GFXDECODE_ENTRY( REGION_GFX1, 0x3000, spritelayout2, 16*8, 32 ) /* sprites */ |
| 371 | 371 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 16*8, 32 ) /* sprites */ |
| r1679 | r1680 | |
| 406 | 406 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 407 | 407 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 408 | 408 | MDRV_GFXDECODE(exctsccr) |
| 409 | MDRV_PALETTE_LENGTH(32) | |
| 410 | MDRV_COLORTABLE_LENGTH(64*8) | |
| 409 | MDRV_PALETTE_LENGTH(48*8) | |
| 411 | 410 | |
| 412 | 411 | MDRV_PALETTE_INIT(exctsccr) |
| 413 | 412 | MDRV_VIDEO_START(exctsccr) |
| r1679 | r1680 | |
| 455 | 454 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 456 | 455 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 457 | 456 | MDRV_GFXDECODE(exctsccr) |
| 458 | MDRV_PALETTE_LENGTH(32) | |
| 459 | MDRV_COLORTABLE_LENGTH(64*8) | |
| 457 | MDRV_PALETTE_LENGTH(48*8) | |
| 460 | 458 | |
| 461 | 459 | MDRV_PALETTE_INIT(exctsccr) |
| 462 | 460 | MDRV_VIDEO_START(exctsccr) |
| r1679 | r1680 | |
|---|---|---|
| 259 | 259 | |
| 260 | 260 | static MACHINE_RESET( nmk16 ) |
| 261 | 261 | { |
| 262 | NMK112_init(0); | |
| 262 | 263 | } |
| 263 | 264 | |
| 264 | 265 | static MACHINE_RESET( NMK004 ) |
| r1679 | r1680 | |
|---|---|---|
| 124 | 124 | #define MASTER_CLOCK 10000000 /* 10MHz */ |
| 125 | 125 | |
| 126 | 126 | #include "driver.h" |
| 127 | #include "video/ | |
| 127 | #include "video/m | |
| 128 | 128 | |
| 129 | 129 | |
| 130 | 130 | /************************* |
| 131 | 131 | * Video Hardware * |
| 132 | 132 | *************************/ |
| 133 | 133 | |
| 134 | static mc6845_t *mc6845; | |
| 134 | 135 | static tilemap *bg_tilemap; |
| 135 | 136 | |
| 136 | 137 | static WRITE8_HANDLER( miniboy7_videoram_w ) |
| r1679 | r1680 | |
| 145 | 146 | tilemap_mark_tile_dirty(bg_tilemap, offset); |
| 146 | 147 | } |
| 147 | 148 | |
| 149 | static WRITE8_HANDLER( miniboy7_mc6845_address_w ) | |
| 150 | { | |
| 151 | mc6845_address_w(mc6845, data); | |
| 152 | } | |
| 153 | ||
| 154 | static READ8_HANDLER( miniboy7_mc6845_register_r ) | |
| 155 | { | |
| 156 | return mc6845_register_r(mc6845); | |
| 157 | } | |
| 158 | ||
| 159 | static WRITE8_HANDLER( miniboy7_mc6845_register_w ) | |
| 160 | { | |
| 161 | mc6845_register_w(mc6845, data); | |
| 162 | } | |
| 163 | ||
| 148 | 164 | static TILE_GET_INFO( get_bg_tile_info ) |
| 149 | 165 | { |
| 150 | 166 | /* - bits - |
| r1679 | r1680 | |
| 166 | 182 | |
| 167 | 183 | static VIDEO_START( miniboy7 ) |
| 168 | 184 | { |
| 169 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 170 | TILEMAP_TYPE_PEN, 8, 8, 37, 37); | |
| 185 | mc6845 = mc6845_config(NULL); | |
| 186 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 37, 37); | |
| 171 | 187 | } |
| 172 | 188 | |
| 173 | 189 | static VIDEO_UPDATE( miniboy7 ) |
| r1679 | r1680 | |
| 187 | 203 | AM_RANGE(0x1000, 0x17ff) AM_RAM AM_WRITE(miniboy7_colorram_w) AM_BASE(&colorram) |
| 188 | 204 | AM_RANGE(0x1800, 0x25ff) AM_RAM /* looks like videoram */ |
| 189 | 205 | AM_RANGE(0x2600, 0x27ff) AM_RAM |
| 190 | AM_RANGE(0x2800, 0x2800) AM_WRITE(crtc6845_address_w) | |
| 191 | AM_RANGE(0x2801, 0x2801) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) | |
| 206 | AM_RANGE(0x2800, 0x2800) AM_WRITE(miniboy7_mc6845_address_w) | |
| 207 | AM_RANGE(0x2801, 0x2801) AM_READWRITE(miniboy7_mc6845_register_r, miniboy7_mc6845_register_w) | |
| 192 | 208 | // AM_RANGE(0x3000, 0x3001) ????? R/W |
| 193 | 209 | // AM_RANGE(0x3080, 0x3083) AM_READWRITE(pia_0_r, pia_0_w) |
| 194 | 210 | // AM_RANGE(0x3800, 0x3800) ????? R |
| r0 | r1680 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | Irem M10/M11/M15 hardware | |
| 4 | ||
| 5 | **************************************************************************** | |
| 6 | ||
| 7 | (c) 12/2/1998 Lee Taylor | |
| 8 | ||
| 9 | Notes: | |
| 10 | - Colors are close to screen shots for IPM Invader. The other games have not | |
| 11 | been verified. | |
| 12 | - The bitmap strips in IPM Invader might be slightly misplaced | |
| 13 | ||
| 14 | TODO: | |
| 15 | - Dip switches | |
| 16 | ||
| 17 | Head On | |
| 18 | ------- | |
| 19 | Irem, 1979? / 1980? | |
| 20 | ||
| 21 | PCB Layout | |
| 22 | ---------- | |
| 23 | ||
| 24 | M-15L | |
| 25 | |---------------------------------------------------------------------------------| | |
| 26 | | | | |
| 27 | | DSW(8) 74175 74175 7400 74LS08 74121 M53214 |-------| E1.9A | | |
| 28 | | | 6502 | | | |
| 29 | | 7432 74175 7404 7427 7442 74LS241 |-------| | | |
| 30 | | E2.9B | | |
| 31 | | | | |
| 32 | | 74LS74 7432 74161 74161 7442 74LS241 74LS367 74LS367 | | |
| 33 | |-| E3.9C | | |
| 34 | | M53214 74LS367 7442 7486 8216 2114 74LS157 74LS367 | | |
| 35 | | | | |
| 36 | |4 M53214 74LS367 74161 7486 8216 2114 74LS157 2111 E4.9D | | |
| 37 | |4 | | |
| 38 | |W M53214 74LS367 74161 7486 8216 2114 74LS157 2111 | | |
| 39 | |A E5.9F | | |
| 40 | |Y M53214 74LS367 74161 7486 8216 74166 2114 74LS157 | | |
| 41 | | 11.73MHz | | |
| 42 | | 7400 7432 7404 74161 8216 74166 2114 74LS157 E6.9G | | |
| 43 | |-| | | |
| 44 | | VR3 VR2 VR1 7432 7404 7400 *74173 7400 74LS139 74LS157 | | |
| 45 | | *74S04 | | |
| 46 | | | | |
| 47 | |---------------------------------------------------------------------------------| | |
| 48 | Notes: | |
| 49 | All IC's are listed | |
| 50 | All ROMs type 2708 (1K x8) | |
| 51 | ||
| 52 | 6502 clock: 1.173MHz | |
| 53 | *: These 2 IC's piggybacked. 74S04 on top | |
| 54 | VR1/2/3: 5K potentiometers | |
| 55 | 2114: 1K x4 SRAM | |
| 56 | 2111: 256bytes x4 SRAM | |
| 57 | 8216: 256bytes x1 SRAM | |
| 58 | ||
| 59 | Sound PCB | |
| 60 | --------- | |
| 61 | ||
| 62 | M-15S | |
| 63 | |---------------------------| | |
| 64 | | | | |
| 65 | | NE555 NE555 | | |
| 66 | | | | |
| 67 | | NE555 NE555 | | |
| 68 | | LM3900 VR1| | |
| 69 | | | | |
| 70 | | c1815x9 VR2| | |
| 71 | | | | |
| 72 | | LM3900 VR3| | |
| 73 | | | | |
| 74 | | VR4| | |
| 75 | | | | |
| 76 | | VR5| | |
| 77 | | TA7222 | | |
| 78 | |---------------------------| | |
| 79 | Notes: | |
| 80 | PCB contains lots of resistors, capacitors, transistors etc. | |
| 81 | ||
| 82 | VR1/2/3/4/5: Potentiometers for volume of each sound | |
| 83 | C1815: Transistor (x9) | |
| 84 | TA7222: Power Amp | |
| 85 | ||
| 86 | ***************************************************************************/ | |
| 87 | ||
| 88 | /*************************************************************************** | |
| 89 | Notes (couriersud) | |
| 90 | ||
| 91 | From http://www.crazykong.com/tech/IremBoardList.txt | |
| 92 | ||
| 93 | skychut: M-11 | |
| 94 | andromed: N/A | |
| 95 | ipminvad: N/A | |
| 96 | spacbeam: not listed | |
| 97 | headon: not listed | |
| 98 | greenber: N/A | |
| 99 | ||
| 100 | M10-Board: Has SN76477 | |
| 101 | ||
| 102 | ***************************************************************************/ | |
| 103 | #include "driver.h" | |
| 104 | #include "deprecat.h" | |
| 105 | #include "sound/samples.h" | |
| 106 | #include "m10.h" | |
| 107 | ||
| 108 | ||
| 109 | /************************************* | |
| 110 | * | |
| 111 | * Defines | |
| 112 | * | |
| 113 | *************************************/ | |
| 114 | ||
| 115 | #define DEBUG (0) | |
| 116 | ||
| 117 | /************************************* | |
| 118 | * | |
| 119 | * Initialization | |
| 120 | * | |
| 121 | *************************************/ | |
| 122 | ||
| 123 | static PALETTE_INIT( m10 ) | |
| 124 | { | |
| 125 | int i; | |
| 126 | ||
| 127 | for (i = 0; i < 0x10; i++) | |
| 128 | { | |
| 129 | rgb_t color; | |
| 130 | ||
| 131 | if (i & 0x01) | |
| 132 | color = MAKE_RGB(pal1bit(~i >> 3), pal1bit(~i >> 2), pal1bit(~i >> 1)); | |
| 133 | else | |
| 134 | color = RGB_BLACK; | |
| 135 | ||
| 136 | palette_set_color(machine, i, color); | |
| 137 | } | |
| 138 | } | |
| 139 | ||
| 140 | static MACHINE_RESET( irem ) | |
| 141 | { | |
| 142 | m10_state *state = Machine->driver_data; | |
| 143 | ||
| 144 | state_save_register_global(state->bottomline); | |
| 145 | state_save_register_global(state->flip); | |
| 146 | } | |
| 147 | ||
| 148 | /************************************* | |
| 149 | * | |
| 150 | * I/O handling | |
| 151 | * | |
| 152 | *************************************/ | |
| 153 | ||
| 154 | /* | |
| 155 | * M10 Ctrl Port | |
| 156 | * | |
| 157 | * 76543210 | |
| 158 | * ======== | |
| 159 | * e------- ACTIVE LOW Demo mode | |
| 160 | * -?------ ???? | |
| 161 | * --b----- ACTIVE LOW Bottom line | |
| 162 | * ---f---- ACTIVE LOW Flip screen | |
| 163 | * ----u--- ACTIVE LOW Ufo sound enable (SN76477) | |
| 164 | * -----sss Sound #sss start | |
| 165 | * 0x01: MISSILE | |
| 166 | * 0x02: EXPLOSION | |
| 167 | * 0x03: INVADER HIT | |
| 168 | * 0x04: BONUS BASE | |
| 169 | * 0x05: FLEET MOVE | |
| 170 | * 0x06: SAUCER HIT | |
| 171 | */ | |
| 172 | ||
| 173 | static WRITE8_HANDLER( m10_ctrl_w ) | |
| 174 | { | |
| 175 | m10_state *state = Machine->driver_data; | |
| 176 | ||
| 177 | #if DEBUG | |
| 178 | if (data & 0x40) | |
| 179 | popmessage("ctrl: %02x",data); | |
| 180 | #endif | |
| 181 | ||
| 182 | /* I have NO IDEA if this is correct or not */ | |
| 183 | state->bottomline = ~data & 0x20; | |
| 184 | ||
| 185 | if (readinputportbytag("CAB") & 0x01) | |
| 186 | state->flip = ~data & 0x10; | |
| 187 | ||
| 188 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 189 | sound_global_enable(~data & 0x80); | |
| 190 | ||
| 191 | /* sound command in lower 4 bytes */ | |
| 192 | switch (data & 0x07) | |
| 193 | { | |
| 194 | case 0x00: | |
| 195 | /* no sound mapped */ | |
| 196 | break; | |
| 197 | case 0x01: | |
| 198 | /* MISSILE sound */ | |
| 199 | sample_start_n(0, 0, 0, 0); | |
| 200 | break; | |
| 201 | case 0x02: | |
| 202 | /* EXPLOSION sound */ | |
| 203 | sample_start_n(0, 1, 1, 0); | |
| 204 | break; | |
| 205 | case 0x03: | |
| 206 | /* INVADER HIT sound */ | |
| 207 | sample_start_n(0, 2, 2, 0); | |
| 208 | break; | |
| 209 | case 0x04: | |
| 210 | /* BONUS BASE sound */ | |
| 211 | sample_start_n(0, 3, 8, 0); | |
| 212 | break; | |
| 213 | case 0x05: | |
| 214 | /* FLEET MOVE sound */ | |
| 215 | sample_start_n(0, 3, 3, 0); | |
| 216 | break; | |
| 217 | case 0x06: | |
| 218 | /* SAUCER HIT SOUND */ | |
| 219 | sample_start_n(0, 2, 7, 0); | |
| 220 | break; | |
| 221 | default: | |
| 222 | popmessage("Unknown sound M10: %02x\n", data & 0x07); | |
| 223 | break; | |
| 224 | } | |
| 225 | /* UFO SOUND */ | |
| 226 | if (data & 0x08) | |
| 227 | sample_stop_n(0, 4); | |
| 228 | else | |
| 229 | sample_start_n(0, 4, 9, 1); | |
| 230 | ||
| 231 | } | |
| 232 | ||
| 233 | /* | |
| 234 | * M11 Ctrl Port | |
| 235 | * | |
| 236 | * 76543210 | |
| 237 | * ======== | |
| 238 | * e------- ACTIVE LOW Demo mode | |
| 239 | * -?------ ???? | |
| 240 | * --b----- ACTIVE LOW Bottom line | |
| 241 | * ---f---- ACTIVE LOW Flip screen | |
| 242 | * ----??-- ???? | |
| 243 | * ------cc Credits indicator ? | |
| 244 | * 0x03: 0 Credits | |
| 245 | * 0x02: 1 Credit | |
| 246 | * 0x00: 2 or more credits | |
| 247 | * Will be updated only in attract mode | |
| 248 | */ | |
| 249 | ||
| 250 | static WRITE8_HANDLER( m11_ctrl_w ) | |
| 251 | { | |
| 252 | m10_state *state = Machine->driver_data; | |
| 253 | ||
| 254 | #if DEBUG | |
| 255 | if (data & 0x4C) | |
| 256 | popmessage("M11 ctrl: %02x",data); | |
| 257 | #endif | |
| 258 | ||
| 259 | state->bottomline = ~data & 0x20; | |
| 260 | ||
| 261 | if (readinputportbytag("CAB") & 0x01) | |
| 262 | state->flip = ~data & 0x10; | |
| 263 | ||
| 264 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 265 | sound_global_enable(~data & 0x80); | |
| 266 | } | |
| 267 | ||
| 268 | /* | |
| 269 | * M15 Ctrl Port | |
| 270 | * | |
| 271 | * 76543210 | |
| 272 | * ======== | |
| 273 | * ????---- ???? | |
| 274 | * ----e--- ACTIVE LOW Demo mode | |
| 275 | * -----f-- ACTIVE LOW Flip screen | |
| 276 | * ------cc Credits indicator ? | |
| 277 | * 0x03: 0 Credits | |
| 278 | * 0x02: 1 Credit | |
| 279 | * 0x00: 2 or more credits | |
| 280 | * Will be updated only in attract mode | |
| 281 | */ | |
| 282 | ||
| 283 | static WRITE8_HANDLER( m15_ctrl_w ) | |
| 284 | { | |
| 285 | m10_state *state = Machine->driver_data; | |
| 286 | ||
| 287 | #if DEBUG | |
| 288 | if (data & 0xF0) | |
| 289 | popmessage("M15 ctrl: %02x",data); | |
| 290 | #endif | |
| 291 | if (readinputportbytag("CAB") & 0x01) | |
| 292 | state->flip = ~data & 0x04; | |
| 293 | if (!(readinputportbytag("CAB") & 0x02)) | |
| 294 | sound_global_enable(~data & 0x08); | |
| 295 | } | |
| 296 | ||
| 297 | ||
| 298 | /* | |
| 299 | * M10 A500 | |
| 300 | * | |
| 301 | * 76543210 | |
| 302 | * ======== | |
| 303 | * ??????-- Always 111111 | |
| 304 | * ------cc Credits indicator ? | |
| 305 | * 0x03: 0 Credits | |
| 306 | * 0x02: 1 Credit | |
| 307 | * 0x00: 2 or more credits | |
| 308 | * Will be updated only in attract mode | |
| 309 | */ | |
| 310 | ||
| 311 | static WRITE8_HANDLER( m10_a500_w ) | |
| 312 | { | |
| 313 | #if DEBUG | |
| 314 | if (data & 0xFC) | |
| 315 | popmessage("a500: %02x",data); | |
| 316 | #endif | |
| 317 | } | |
| 318 | ||
| 319 | static WRITE8_HANDLER( m11_a100_w ) | |
| 320 | { | |
| 321 | static int last = 0x00; | |
| 322 | int raising_bits = data & ~last; | |
| 323 | //int falling_bits = ~data & last; | |
| 324 | ||
| 325 | // should a falling bit stop a sample? | |
| 326 | // This port is written to about 20x per vblank | |
| 327 | #if DEBUG | |
| 328 | if ((last & 0xE8) != (data & 0xE8)) | |
| 329 | popmessage("A100: %02x\n", data); | |
| 330 | #endif | |
| 331 | last = data; | |
| 332 | // audio control! | |
| 333 | /* MISSILE sound */ | |
| 334 | if (raising_bits & 0x01) | |
| 335 | sample_start_n(0, 0, 0, 0); | |
| 336 | ||
| 337 | /* EXPLOSION sound */ | |
| 338 | if (raising_bits & 0x02) | |
| 339 | sample_start_n(0, 1, 1, 0); | |
| 340 | ||
| 341 | /* Rapidly falling parachute */ | |
| 342 | if (raising_bits & 0x04) | |
| 343 | sample_start_n(0, 3, 8, 0); | |
| 344 | ||
| 345 | /* Background sound ? */ | |
| 346 | if (data & 0x10) | |
| 347 | sample_start_n(0, 4, 9, 1); | |
| 348 | else | |
| 349 | sample_stop_n(0, 4); | |
| 350 | ||
| 351 | } | |
| 352 | ||
| 353 | static WRITE8_HANDLER( m15_a100_w ) | |
| 354 | { | |
| 355 | static int last = 0x00; | |
| 356 | //int raising_bits = data & ~last; | |
| 357 | int falling_bits = ~data & last; | |
| 358 | ||
| 359 | // should a falling bit stop a sample? | |
| 360 | // Bit 4 is used | |
| 361 | // Bit 5 is used 0xef | |
| 362 | // Bit 7 is used | |
| 363 | ||
| 364 | // headoni | |
| 365 | // 0x01: Acceleration | |
| 366 | // 0x04: background (motor) ? | |
| 367 | // 0x08: explosion | |
| 368 | // 0x10: player changes lane | |
| 369 | // 0x20: computer car changes lane | |
| 370 | // 0x40: dot | |
| 371 | ||
| 372 | #if DEBUG | |
| 373 | if ((last & 0x82) != (data & 0x82)) | |
| 374 | popmessage("A100: %02x\n", data); | |
| 375 | #endif | |
| 376 | /* DOT sound */ | |
| 377 | if (falling_bits & 0x40) | |
| 378 | sample_start_n(0, 0, 0, 0); | |
| 379 | #if 0 | |
| 380 | if (raising_bits & 0x40) | |
| 381 | sample_stop_n(0, 0); | |
| 382 | #endif | |
| 383 | ||
| 384 | /* EXPLOSION sound */ | |
| 385 | if (falling_bits & 0x08) | |
| 386 | sample_start_n(0, 1, 1, 0); | |
| 387 | #if 0 | |
| 388 | if (raising_bits & 0x08) | |
| 389 | sample_stop_n(0, 1); | |
| 390 | #endif | |
| 391 | ||
| 392 | /* player changes lane */ | |
| 393 | if (falling_bits & 0x10) | |
| 394 | sample_start_n(0, 3, 3, 0); | |
| 395 | #if 0 | |
| 396 | if (raising_bits & 0x10) | |
| 397 | sample_stop_n(0, 3); | |
| 398 | #endif | |
| 399 | ||
| 400 | /* computer car changes lane */ | |
| 401 | if (falling_bits & 0x20) | |
| 402 | sample_start_n(0, 4, 4, 0); | |
| 403 | #if 0 | |
| 404 | if (raising_bits & 0x20) | |
| 405 | sample_stop_n(0, 4); | |
| 406 | #endif | |
| 407 | ||
| 408 | last = data; | |
| 409 | } | |
| 410 | ||
| 411 | static READ8_HANDLER( m10_a700_r ) | |
| 412 | { | |
| 413 | //printf("rd:%d\n",video_screen_get_vpos(0)); | |
| 414 | cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE); | |
| 415 | return 0x00; | |
| 416 | } | |
| 417 | ||
| 418 | static READ8_HANDLER( m11_a700_r ) | |
| 419 | { | |
| 420 | //printf("rd:%d\n",video_screen_get_vpos(0)); | |
| 421 | return 0x00; | |
| 422 | } | |
| 423 | ||
| 424 | /************************************* | |
| 425 | * | |
| 426 | * Interrupt handling | |
| 427 | * | |
| 428 | *************************************/ | |
| 429 | ||
| 430 | static TIMER_CALLBACK( interrupt_callback ) | |
| 431 | { | |
| 432 | if (param==0) | |
| 433 | { | |
| 434 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 435 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+16, 0), NULL, 1,interrupt_callback); | |
| 436 | } | |
| 437 | if (param==1) | |
| 438 | { | |
| 439 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 440 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+24, 0), NULL, 2,interrupt_callback); | |
| 441 | } | |
| 442 | if (param==-1) | |
| 443 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 444 | ||
| 445 | } | |
| 446 | ||
| 447 | static INTERRUPT_GEN( m11_interrupt ) | |
| 448 | { | |
| 449 | if (readinputport(2) & 1) /* Left Coin */ | |
| 450 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 451 | else | |
| 452 | { | |
| 453 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 454 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBEND, 0), NULL, -1,interrupt_callback); | |
| 455 | } | |
| 456 | } | |
| 457 | ||
| 458 | static INTERRUPT_GEN( m10_interrupt ) | |
| 459 | { | |
| 460 | if (readinputport(2) & 1) /* Left Coin */ | |
| 461 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 462 | else | |
| 463 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 464 | } | |
| 465 | ||
| 466 | static INTERRUPT_GEN( m15_interrupt ) | |
| 467 | { | |
| 468 | if (readinputport(2) & 1) /* Left Coin */ | |
| 469 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 470 | else | |
| 471 | { | |
| 472 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 473 | timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+1, 80), NULL, -1,interrupt_callback); | |
| 474 | } | |
| 475 | } | |
| 476 | ||
| 477 | /************************************* | |
| 478 | * | |
| 479 | * Main CPU memory handlers | |
| 480 | * | |
| 481 | *************************************/ | |
| 482 | ||
| 483 | static ADDRESS_MAP_START( m10_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 484 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(m10_state, memory) /* scratch ram */ | |
| 485 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(m10_state, rom) | |
| 486 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 487 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, m10_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 488 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(m10_state, chargen) /* background ????? */ | |
| 489 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) | |
| 490 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) | |
| 491 | AM_RANGE(0xa400, 0xa400) AM_WRITE(m10_ctrl_w) /* line at bottom of screen?, sound, flip screen */ | |
| 492 | AM_RANGE(0xa500, 0xa500) AM_WRITE(m10_a500_w) /* ??? */ | |
| 493 | AM_RANGE(0xa700, 0xa700) AM_READ(m10_a700_r) | |
| 494 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ | |
| 495 | ADDRESS_MAP_END | |
| 496 | ||
| 497 | static ADDRESS_MAP_START( m11_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 498 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(m10_state, memory) /* scratch ram */ | |
| 499 | AM_RANGE(0x1000, 0x2fff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(m10_state, rom) | |
| 500 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 501 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, m10_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 502 | AM_RANGE(0x5000, 0x53ff) AM_RAM AM_BASE_MEMBER(m10_state, chargen) /* background ????? */ | |
| 503 | AM_RANGE(0xa100, 0xa100) AM_WRITE(m11_a100_w) /* sound writes ???? */ | |
| 504 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) | |
| 505 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) | |
| 506 | AM_RANGE(0xa400, 0xa400) AM_WRITE(m11_ctrl_w) /* line at bottom of screen?, sound, flip screen */ | |
| 507 | AM_RANGE(0xa700, 0xa700) AM_READ(m11_a700_r) | |
| 508 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ | |
| 509 | ADDRESS_MAP_END | |
| 510 | ||
| 511 | static ADDRESS_MAP_START( m15_main, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 512 | AM_RANGE(0x0000, 0x02ff) AM_RAM AM_BASE_MEMBER(m10_state, memory) /* scratch ram */ | |
| 513 | AM_RANGE(0x1000, 0x33ff) AM_READ(MRA8_ROM) AM_BASE_MEMBER(m10_state, rom) | |
| 514 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) | |
| 515 | AM_RANGE(0x4800, 0x4bff) AM_READWRITE(MRA8_RAM, m10_colorram_w) AM_BASE(&colorram) /* foreground colour */ | |
| 516 | AM_RANGE(0x5000, 0x57ff) AM_READWRITE(MRA8_RAM, m15_chargen_w) AM_BASE_MEMBER(m10_state, chargen) /* background ????? */ | |
| 517 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_3_r) | |
| 518 | AM_RANGE(0xa100, 0xa100) AM_WRITE(m15_a100_w) /* sound writes ???? */ | |
| 519 | AM_RANGE(0xa200, 0xa200) AM_READ(input_port_1_r) | |
| 520 | AM_RANGE(0xa300, 0xa300) AM_READ(input_port_0_r) | |
| 521 | AM_RANGE(0xa400, 0xa400) AM_WRITE(m15_ctrl_w) /* sound, flip screen */ | |
| 522 | AM_RANGE(0xfc00, 0xffff) AM_READ(MRA8_ROM) /* for the reset / interrupt vectors */ | |
| 523 | ADDRESS_MAP_END | |
| 524 | ||
| 525 | /************************************* | |
| 526 | * | |
| 527 | * Port definitions | |
| 528 | * | |
| 529 | *************************************/ | |
| 530 | ||
| 531 | #define CAB_PORTENV \ | |
| 532 | /* fake port for cabinet type */ \ | |
| 533 | PORT_START_TAG("CAB") \ | |
| 534 | PORT_CONFNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) \ | |
| 535 | PORT_CONFSETTING( 0x00, DEF_STR( Upright ) ) \ | |
| 536 | PORT_CONFSETTING( 0x01, DEF_STR( Cocktail ) ) \ | |
| 537 | PORT_CONFNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) \ | |
| 538 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) \ | |
| 539 | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) \ | |
| 540 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 541 | ||
| 542 | ||
| 543 | static INPUT_PORTS_START( skychut ) | |
| 544 | PORT_START | |
| 545 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 546 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 547 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 548 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_COCKTAIL | |
| 549 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 550 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 551 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 552 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 553 | ||
| 554 | PORT_START /* IN1 */ | |
| 555 | PORT_DIPNAME(0x03, 0x00, DEF_STR( Lives ) ) | |
| 556 | PORT_DIPSETTING ( 0x00, "3" ) | |
| 557 | PORT_DIPSETTING ( 0x01, "4" ) | |
| 558 | PORT_DIPSETTING ( 0x02, "5" ) | |
| 559 | PORT_DIPNAME( 0x04, 0x00, "Unknown 1" ) | |
| 560 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 561 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 562 | PORT_DIPNAME( 0x08, 0x00, "Unknown 2" ) | |
| 563 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 564 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 565 | PORT_DIPNAME( 0x10, 0x00, "Unknown 3" ) | |
| 566 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 567 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 568 | PORT_DIPNAME( 0x20, 0x00, "Unknown 4" ) | |
| 569 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 570 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 571 | PORT_DIPNAME( 0x40, 0x00, "Unknown 5" ) | |
| 572 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 573 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 574 | PORT_DIPNAME( 0x80, 0x00, "Unknown 6" ) | |
| 575 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 576 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 577 | ||
| 578 | PORT_START /* FAKE */ | |
| 579 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 580 | ||
| 581 | CAB_PORTENV | |
| 582 | INPUT_PORTS_END | |
| 583 | ||
| 584 | static INPUT_PORTS_START( ipminvad ) | |
| 585 | PORT_START | |
| 586 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 587 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 588 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 589 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_COCKTAIL | |
| 590 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 591 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 592 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 593 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 594 | ||
| 595 | PORT_START /* IN1 */ | |
| 596 | PORT_DIPNAME(0x03, 0x00, DEF_STR( Lives ) ) | |
| 597 | PORT_DIPSETTING ( 0x00, "3" ) | |
| 598 | PORT_DIPSETTING ( 0x01, "4" ) | |
| 599 | PORT_DIPSETTING ( 0x02, "5" ) | |
| 600 | PORT_DIPNAME( 0x04, 0x00, "Capsules" ) | |
| 601 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 602 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) | |
| 603 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) | |
| 604 | PORT_DIPSETTING( 0x00, "1500" ) | |
| 605 | PORT_DIPSETTING( 0x08, "1000" ) | |
| 606 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) ) | |
| 607 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) | |
| 608 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 609 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) // Verified with debugger | |
| 610 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 611 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 612 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) | |
| 613 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 614 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 615 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) | |
| 616 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 617 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 618 | ||
| 619 | PORT_START /* FAKE */ | |
| 620 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 621 | ||
| 622 | CAB_PORTENV | |
| 623 | INPUT_PORTS_END | |
| 624 | ||
| 625 | static INPUT_PORTS_START( spacbeam ) | |
| 626 | PORT_START | |
| 627 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 628 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 629 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 630 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 631 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 632 | ||
| 633 | PORT_START /* IN1 */ | |
| 634 | PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) | |
| 635 | PORT_DIPSETTING ( 0x00, "2" ) | |
| 636 | PORT_DIPSETTING ( 0x01, "3" ) | |
| 637 | PORT_DIPSETTING ( 0x02, "4" ) | |
| 638 | PORT_DIPSETTING ( 0x03, "5" ) | |
| 639 | PORT_DIPNAME(0x08, 0x00, "Replay" ) | |
| 640 | PORT_DIPSETTING ( 0x00, "30000" ) | |
| 641 | PORT_DIPSETTING ( 0x08, DEF_STR( None ) ) | |
| 642 | PORT_DIPNAME(0x30, 0x10, DEF_STR( Coinage ) ) | |
| 643 | PORT_DIPSETTING ( 0x00, "Testmode" ) | |
| 644 | PORT_DIPSETTING ( 0x10, "1 Coin 1 Play" ) | |
| 645 | PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" ) | |
| 646 | ||
| 647 | PORT_START /* FAKE */ | |
| 648 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 649 | ||
| 650 | PORT_START /* IN3 */ | |
| 651 | PORT_BIT( 0x03, 0, IPT_UNUSED ) | |
| 652 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 653 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 654 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 655 | ||
| 656 | CAB_PORTENV | |
| 657 | INPUT_PORTS_END | |
| 658 | ||
| 659 | static INPUT_PORTS_START( headoni ) | |
| 660 | PORT_START | |
| 661 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 662 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 663 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 664 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) | |
| 665 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) | |
| 666 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) | |
| 667 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) | |
| 668 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 669 | ||
| 670 | PORT_START /* IN1 */ | |
| 671 | PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) | |
| 672 | PORT_DIPSETTING ( 0x00, "2" ) | |
| 673 | PORT_DIPSETTING ( 0x01, "3" ) | |
| 674 | PORT_DIPSETTING ( 0x02, "4" ) | |
| 675 | PORT_DIPSETTING ( 0x03, "5" ) | |
| 676 | PORT_DIPNAME(0x08, 0x00, "Replay" ) | |
| 677 | PORT_DIPSETTING ( 0x00, "30000" ) | |
| 678 | PORT_DIPSETTING ( 0x08, DEF_STR( None ) ) | |
| 679 | PORT_DIPNAME(0x30, 0x10, DEF_STR( Coinage ) ) | |
| 680 | PORT_DIPSETTING ( 0x00, "Testmode" ) | |
| 681 | PORT_DIPSETTING ( 0x10, "1 Coin 1 Play" ) | |
| 682 | PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" ) | |
| 683 | ||
| 684 | PORT_START /* FAKE */ | |
| 685 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) | |
| 686 | ||
| 687 | PORT_START /* IN3 */ | |
| 688 | PORT_BIT( 0x03, 0, IPT_UNUSED ) | |
| 689 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 690 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL | |
| 691 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL | |
| 692 | CAB_PORTENV | |
| 693 | INPUT_PORTS_END | |
| 694 | ||
| 695 | ||
| 696 | ||
| 697 | /************************************* | |
| 698 | * | |
| 699 | * Graphics definitions | |
| 700 | * | |
| 701 | *************************************/ | |
| 702 | ||
| 703 | ||
| 704 | static const gfx_layout charlayout = | |
| 705 | { | |
| 706 | 8,8, /* 8*8 characters */ | |
| 707 | 256, /* 256 characters */ | |
| 708 | 1, /* 1 bits per pixel */ | |
| 709 | { 0 }, | |
| 710 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 711 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 712 | 8*8 /* every char takes 8 consecutive bytes */ | |
| 713 | }; | |
| 714 | ||
| 715 | ||
| 716 | static GFXDECODE_START( m10 ) | |
| 717 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 8 ) | |
| 718 | GFXDECODE_END | |
| 719 | ||
| 720 | /************************************* | |
| 721 | * | |
| 722 | * Sound definitions | |
| 723 | * | |
| 724 | *************************************/ | |
| 725 | ||
| 726 | static const char *m10_sample_names[] = | |
| 727 | { | |
| 728 | "*ipminvad", | |
| 729 | "1.wav", /* shot/missle */ | |
| 730 | "2.wav", /* base hit/explosion */ | |
| 731 | "3.wav", /* invader hit */ | |
| 732 | "4.wav", /* fleet move 1 */ | |
| 733 | "5.wav", /* fleet move 2 */ | |
| 734 | "6.wav", /* fleet move 3 */ | |
| 735 | "7.wav", /* fleet move 4 */ | |
| 736 | "8.wav", /* UFO/saucer hit */ | |
| 737 | "9.wav", /* bonus base */ | |
| 738 | "0.wav", /* UFO sound */ | |
| 739 | 0 | |
| 740 | }; | |
| 741 | ||
| 742 | ||
| 743 | static struct Samplesinterface m10_samples_interface = | |
| 744 | { | |
| 745 | 6, /* 6 channels */ | |
| 746 | m10_sample_names | |
| 747 | }; | |
| 748 | ||
| 749 | /************************************* | |
| 750 | * | |
| 751 | * Machine driver | |
| 752 | * | |
| 753 | *************************************/ | |
| 754 | ||
| 755 | static MACHINE_DRIVER_START( m10 ) | |
| 756 | ||
| 757 | MDRV_DRIVER_DATA(m10_state) | |
| 758 | ||
| 759 | /* basic machine hardware */ | |
| 760 | MDRV_CPU_ADD_TAG("main", M6502,IREMM10_CPU_CLOCK) | |
| 761 | MDRV_CPU_PROGRAM_MAP(m10_main,0) | |
| 762 | ||
| 763 | MDRV_MACHINE_RESET(irem) | |
| 764 | ||
| 765 | MDRV_CPU_VBLANK_INT(m10_interrupt,1) | |
| 766 | ||
| 767 | MDRV_SCREEN_RAW_PARAMS(IREMM10_PIXEL_CLOCK, IREMM10_HTOTAL, IREMM10_HBEND, IREMM10_HBSTART, IREMM10_VTOTAL, IREMM10_VBEND, IREMM10_VBSTART) | |
| 768 | ||
| 769 | /* video hardware */ | |
| 770 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 771 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 772 | MDRV_GFXDECODE(m10) | |
| 773 | MDRV_PALETTE_LENGTH(2*8) | |
| 774 | ||
| 775 | MDRV_PALETTE_INIT(m10) | |
| 776 | MDRV_VIDEO_START(m10) | |
| 777 | MDRV_VIDEO_UPDATE(m10) | |
| 778 | ||
| 779 | /* sound hardware */ | |
| 780 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 781 | ||
| 782 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 783 | MDRV_SOUND_CONFIG(m10_samples_interface) | |
| 784 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 785 | ||
| 786 | MACHINE_DRIVER_END | |
| 787 | ||
| 788 | static MACHINE_DRIVER_START( m11 ) | |
| 789 | ||
| 790 | MDRV_DRIVER_DATA(m10_state) | |
| 791 | ||
| 792 | /* basic machine hardware */ | |
| 793 | MDRV_IMPORT_FROM(m10) | |
| 794 | MDRV_CPU_REPLACE("main", M6502,IREMM10_CPU_CLOCK / 2) | |
| 795 | //MDRV_CPU_MODIFY("main") | |
| 796 | MDRV_CPU_PROGRAM_MAP(m11_main,0) | |
| 797 | MDRV_CPU_VBLANK_INT(m11_interrupt,1) | |
| 798 | ||
| 799 | /* sound hardware */ | |
| 800 | MACHINE_DRIVER_END | |
| 801 | ||
| 802 | static MACHINE_DRIVER_START( m15 ) | |
| 803 | ||
| 804 | MDRV_DRIVER_DATA(m10_state) | |
| 805 | ||
| 806 | /* basic machine hardware */ | |
| 807 | MDRV_CPU_ADD_TAG("main", M6502,IREMM15_CPU_CLOCK) | |
| 808 | MDRV_CPU_PROGRAM_MAP(m15_main,0) | |
| 809 | ||
| 810 | MDRV_MACHINE_RESET(irem) | |
| 811 | ||
| 812 | MDRV_CPU_VBLANK_INT(m15_interrupt,1) | |
| 813 | ||
| 814 | MDRV_SCREEN_RAW_PARAMS(IREMM15_PIXEL_CLOCK, IREMM15_HTOTAL, IREMM15_HBEND, IREMM15_HBSTART, IREMM15_VTOTAL, IREMM15_VBEND, IREMM15_VBSTART) | |
| 815 | ||
| 816 | /* video hardware */ | |
| 817 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 818 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 819 | MDRV_PALETTE_LENGTH(2*8) | |
| 820 | ||
| 821 | MDRV_PALETTE_INIT(m10) | |
| 822 | MDRV_VIDEO_START( m15 ) | |
| 823 | MDRV_VIDEO_UPDATE(m15) | |
| 824 | ||
| 825 | /* sound hardware */ | |
| 826 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 827 | ||
| 828 | MDRV_SOUND_ADD(SAMPLES, 0) | |
| 829 | MDRV_SOUND_CONFIG(m10_samples_interface) | |
| 830 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 831 | ||
| 832 | MACHINE_DRIVER_END | |
| 833 | ||
| 834 | ||
| 835 | static MACHINE_DRIVER_START( headoni ) | |
| 836 | MDRV_IMPORT_FROM(m15) | |
| 837 | MDRV_CPU_REPLACE("main", M6502,11730000/16) | |
| 838 | MACHINE_DRIVER_END | |
| 839 | ||
| 840 | static DRIVER_INIT( andromed ) | |
| 841 | { | |
| 842 | int i; | |
| 843 | m10_state *state = machine->driver_data; | |
| 844 | ||
| 845 | for (i=0x1c00;i<0x2000;i++) | |
| 846 | state->rom[i]=0x60; | |
| 847 | } | |
| 848 | ||
| 849 | ||
| 850 | /*************************************************************************** | |
| 851 | ||
| 852 | Game driver(s) | |
| 853 | ||
| 854 | ***************************************************************************/ | |
| 855 | ||
| 856 | ROM_START( andromed )//Jumps to an unmapped sub-routine at $2fc9 | |
| 857 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 858 | ROM_LOAD( "am1", 0x1000, 0x0400, CRC(53df0152) SHA1(d27113740094d219b0e05a930d8daa4c22129183) ) | |
| 859 | ROM_LOAD( "am2", 0x1400, 0x0400, CRC(dab64957) SHA1(77ced520f8e78bb08ddab4213646cf55d834e63e) ) | |
| 860 | ROM_LOAD( "am3", 0x1800, 0x0400, CRC(f983f35c) SHA1(1bfee6cf7d18b56594831f2efa7dcc53b47d7e30) ) | |
| 861 | ROM_LOAD( "am4", 0x1c00, 0x0400, CRC(09f20717) SHA1(c54c9b7d16b40a7ab49eac255906b43b03939d2b) ) | |
| 862 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 863 | ROM_LOAD( "am5", 0x2000, 0x0400, CRC(518a3b88) SHA1(5e20c905c2190b381a105327e112fcc0a127bb2f) ) | |
| 864 | ROM_LOAD( "am6", 0x2400, 0x0400, CRC(ce3d5fff) SHA1(c34178aca9ffb8b2dd468d9e3369a985f52daf9a) ) | |
| 865 | ROM_LOAD( "am7", 0x2800, 0x0400, CRC(30d3366f) SHA1(aa73bba194fa6d1f3909f8df517a0bff07583ea9) ) | |
| 866 | ROM_LOAD( "am8", 0x2c00, 0x0400, NO_DUMP ) // $60 entries | |
| 867 | ||
| 868 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 869 | ROM_LOAD( "am9", 0x0000, 0x0400, CRC(a1c8f4db) SHA1(bedf5d7126c7e9b91ad595188c69aa2c043c71e8) ) | |
| 870 | ROM_LOAD( "am10", 0x0400, 0x0400, CRC(be2de8f3) SHA1(7eb3d1eb88b4481b0dcb7d001207f516a5db32b3) ) | |
| 871 | ROM_END | |
| 872 | ||
| 873 | ROM_START( ipminvad ) | |
| 874 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 875 | ROM_LOAD( "b1r", 0x1000, 0x0400, CRC(f9a7eb9b) SHA1(93ac65d3ac725d3e4c2fb769816ee808ab609911) ) | |
| 876 | ROM_LOAD( "b2r", 0x1400, 0x0400, CRC(af11c1aa) SHA1(6a74fcc7cb1627b1c427a77da89b69ccf3175800) ) | |
| 877 | ROM_LOAD( "b3r", 0x1800, 0x0400, CRC(ed49e481) SHA1(8771a34f432e6d88acc5f7529f16c980a77485db) ) | |
| 878 | ROM_LOAD( "b4r", 0x1c00, 0x0400, CRC(6d5db95b) SHA1(135500fc17524e8608c3bcfe26321144aa0afb91) ) | |
| 879 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 880 | ROM_LOAD( "b5r", 0x2000, 0x0400, CRC(eabba7aa) SHA1(75e47eacd429f48f0a3a4539e5ecb4b1ea7281b1) ) | |
| 881 | ROM_LOAD( "b6r", 0x2400, 0x0400, CRC(3d0e7fa6) SHA1(14903bfc9506cb8e37807fb397be79f5eab99e3b) ) | |
| 882 | ROM_LOAD( "b7r", 0x2800, 0x0400, CRC(cf04864f) SHA1(6fe3ce208334321b63ada779fed69ec7cf4051ad) ) | |
| 883 | ||
| 884 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 885 | ROM_LOAD( "b9r", 0x0000, 0x0400, CRC(56942cab) SHA1(ba13a856477fc6cf7fd36996e47a3724f862f888) ) | |
| 886 | ROM_LOAD( "b10r", 0x0400, 0x0400, CRC(be4b8585) SHA1(0154eae62585e154cf20edcf4599bda8bd333aa9) ) | |
| 887 | ROM_END | |
| 888 | ||
| 889 | ROM_START( skychut ) | |
| 890 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 891 | ROM_LOAD( "sc1d", 0x1000, 0x0400, CRC(30b5ded1) SHA1(3a8b4fa344522404661b062808a2ea1d5858fdd0) ) | |
| 892 | ROM_LOAD( "sc2d", 0x1400, 0x0400, CRC(fd1f4b9e) SHA1(e5606979abe1fa4cc9eae0c4f61516769db35c39) ) | |
| 893 | ROM_LOAD( "sc3d", 0x1800, 0x0400, CRC(67ed201e) SHA1(589b1efdc1bbccff296f6420e2b320cd54b4ac8e) ) | |
| 894 | ROM_LOAD( "sc4d", 0x1c00, 0x0400, CRC(9b23a679) SHA1(a101f9b0fdde927a43e53e9b7d0dffb9dcca9e16) ) | |
| 895 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 896 | ROM_LOAD( "sc5a", 0x2000, 0x0400, CRC(51d975e6) SHA1(7d345025ef28c8a81f599cde445eeb336c368fce) ) | |
| 897 | ROM_LOAD( "sc6e", 0x2400, 0x0400, CRC(617f302f) SHA1(4277ef97279eb63fc68b6c40f8545b31abaab474) ) | |
| 898 | ROM_LOAD( "sc7", 0x2800, 0x0400, CRC(dd4c8e1a) SHA1(b5a141d8ac256ba6522308e5f194bfaf5c75fa5b) ) | |
| 899 | ROM_LOAD( "sc8d", 0x2c00, 0x0400, CRC(aca8b798) SHA1(d9048d060314d8f20ab1967fee846d35c22ac693) ) | |
| 900 | ||
| 901 | ROM_REGION( 0x0800, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 902 | ROM_LOAD( "sc9d", 0x0000, 0x0400, CRC(2101029e) SHA1(34cddf076d3d860aa03043db14837f42449aefe7) ) | |
| 903 | ROM_LOAD( "sc10d", 0x0400, 0x0400, CRC(2f81c70c) SHA1(504935c89a4158a067cbf1dcdb27f7421678915d) ) | |
| 904 | ROM_END | |
| 905 | ||
| 906 | ROM_START( spacbeam ) | |
| 907 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 908 | ROM_LOAD( "m1b", 0x1000, 0x0400, CRC(5a1c3e0b) SHA1(1c9c58359d74b14ce96934fcc6acefbdfaf1e1be) ) | |
| 909 | ROM_LOAD( "m2b", 0x1400, 0x0400, CRC(a02bd9d7) SHA1(d25dfa66b422bdbb29b1922007c84f1947fe9be1) ) | |
| 910 | ROM_LOAD( "m3b", 0x1800, 0x0400, CRC(78040843) SHA1(0b8a3ab09dff951aa527649f82b8877cf01126c1) ) | |
| 911 | ROM_LOAD( "m4b", 0x1c00, 0x0400, CRC(74705a44) SHA1(8fa9d22a58f08086bf2d89e3d92eca097cdd2cbf) ) | |
| 912 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 913 | ROM_LOAD( "m5b", 0x2000, 0x0400, CRC(afdf1242) SHA1(e26a8e91edb3d8ba96b3d225813760f42238b003) ) | |
| 914 | ROM_LOAD( "m6b", 0x2400, 0x0400, CRC(12afb0c2) SHA1(bf6ed90cf4815f0fb41d435954d4c346a55098f5) ) | |
| 915 | ROM_END | |
| 916 | ||
| 917 | ROM_START( headoni ) | |
| 918 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 919 | ROM_LOAD( "e1.9a", 0x1000, 0x0400, CRC(05da5265) SHA1(17e0c9261978770325a0befdcdd8a1b07ed39df0) ) | |
| 920 | ROM_LOAD( "e2.9b", 0x1400, 0x0400, CRC(dada26a8) SHA1(1368ade1c0c57d33d15594370cf1edf95fc44fd1) ) | |
| 921 | ROM_LOAD( "e3.9c", 0x1800, 0x0400, CRC(61ff24f5) SHA1(0e68aedd01b765fb2af76f914b3d287ecf30f716) ) | |
| 922 | ROM_LOAD( "e4.9d", 0x1c00, 0x0400, CRC(ce4c5a67) SHA1(8db493d43f311a29127405aad7693bc08b570b14) ) | |
| 923 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 924 | ROM_LOAD( "e5.9f", 0x2000, 0x0400, CRC(b5232439) SHA1(39b8fb4bbd00a73b9a2b68bc3e88fb45d3f62d7c) ) | |
| 925 | ROM_LOAD( "e6.9g", 0x2400, 0x0400, CRC(99acd1a6) SHA1(799382c1b079aad3034a1cc738dc06954978a0ac) ) | |
| 926 | ROM_END | |
| 927 | ||
| 928 | ROM_START( greenber ) | |
| 929 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 930 | ROM_LOAD( "gb1", 0x1000, 0x0400, CRC(018ff672) SHA1(54d082a332831afc28b47704a5656da0a8a902fa) ) // ok | |
| 931 | ROM_LOAD( "gb2", 0x1400, 0x0400, CRC(ea8f2267) SHA1(ad5bb38a80fbc7c70c8fa6f41086a7ade81655bc) ) // ok | |
| 932 | ROM_LOAD( "gb3", 0x1800, 0x0400, CRC(8f337920) SHA1(ac3d76eb368645ba23f5823b39c04fae49d481e1) ) // ok | |
| 933 | ROM_LOAD( "gb4", 0x1c00, 0x0400, CRC(7eeac4eb) SHA1(c668ad45ebc4aca558371539031efc4ec3990e44) ) // ok | |
| 934 | ROM_RELOAD( 0xfc00, 0x0400 ) /* for the reset and interrupt vectors */ | |
| 935 | ROM_LOAD( "gb5", 0x2000, 0x0400, CRC(b2f8e69a) SHA1(44295e58da890a8c4aba6fe90defe9c578c95592) ) | |
| 936 | ROM_LOAD( "gb6", 0x2400, 0x0400, CRC(50ea8bd3) SHA1(a816c5fcc603b28c2ae59f217871a7e85fb794e1) ) | |
| 937 | ROM_LOAD( "gb7", 0x2800, 0x0400, NO_DUMP ) // 2be8 entry | |
| 938 | ROM_LOAD( "gb8", 0x2c00, 0x0400, CRC(34700b31) SHA1(c148e2475eaaa0e9d1e2412eea359a7ba744e563) ) | |
| 939 | ROM_LOAD( "gb9", 0x3000, 0x0400, CRC(c27b9ba3) SHA1(a2f4f0c4b61eb03bba13ae5d25dc01009a4f86ee) ) // ok ? | |
| 940 | ROM_END | |
| 941 | ||
| 942 | GAME( 1979, andromed, 0, m11, skychut, andromed, ROT270, "Irem", "Andromeda (Japan?)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) | |
| 943 | GAME( 1979?,ipminvad, 0, m10, ipminvad, 0, ROT270, "Irem", "I P M Invader", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 944 | GAME( 1980, skychut, 0, m11, skychut, 0, ROT270, "Irem", "Sky Chuter", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 945 | GAME( 1979, spacbeam, 0, m15, spacbeam, 0, ROT270, "Irem", "Space Beam", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 946 | GAME( 1979?,headoni, 0, headoni, headoni, 0, ROT270, "Irem", "Head On (Irem, M-15 Hardware)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS ) | |
| 947 | GAME( 1980, greenber, 0, m15, spacbeam, 0, ROT270, "Irem", "Green Beret (Irem)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_IMPERFECT_COLORS | GAME_NOT_WORKING ) |
| r1679 | r1680 | |
|---|---|---|
| 286 | 286 | |
| 287 | 287 | |
| 288 | 288 | #------------------------------------------------- |
| 289 | # rule for making the verinfo tool | |
| 290 | #------------------------------------------------- | |
| 291 | ||
| 292 | VERINFO = $(WINOBJ)/verinfo$(EXE) | |
| 293 | ||
| 294 | ifneq ($(CROSS_BUILD),1) | |
| 295 | BUILD += $(VERINFO) | |
| 296 | ||
| 297 | VERINFOOBJS = \ | |
| 298 | $(WINOBJ)/verinfo.o | |
| 299 | ||
| 300 | $(VERINFO): $(VERINFOOBJS) $(LIBOCORE) | |
| 301 | @echo Linking $@... | |
| 302 | $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ | |
| 303 | endif | |
| 304 | ||
| 305 | ||
| 306 | ||
| 307 | #------------------------------------------------- | |
| 308 | 289 | # generic rule for the resource compiler |
| 309 | 290 | #------------------------------------------------- |
| 310 | 291 | |
| r1679 | r1680 | |
| 320 | 301 | |
| 321 | 302 | $(RESFILE): $(WINSRC)/mame.rc $(WINOBJ)/mamevers.rc |
| 322 | 303 | |
| 323 | $(WINOBJ)/mamevers.rc: $( | |
| 304 | $(WINOBJ)/mamevers.rc: $( | |
| 324 | 305 | @echo Emitting $@... |
| 325 | @$( | |
| 306 | @$( |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | #ifndef WINUI | |
| 14 | 14 | #define WINUI |
| 15 | #endif | |
| 15 | 16 | |
| 16 | 17 | // import the main() from MAME, but rename it so we can call it indirectly |
| 17 | 18 | #undef main |
| r1679 | r1680 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | OBJDIRS += $(UIOBJ) |
| 69 | 69 | |
| 70 | DEFS += -DWINUI | |
| 70 | 71 | |
| 71 | ||
| 72 | 72 | #------------------------------------------------- |
| 73 | 73 | # configure the resource compiler |
| 74 | 74 | #------------------------------------------------- |
| r1679 | r1680 | |
| 351 | 351 | # rule for making the verinfo tool |
| 352 | 352 | #------------------------------------------------- |
| 353 | 353 | |
| 354 | VERINFO = $(UIOBJ)/verinfo$(EXE) | |
| 354 | #VERINFO = $(UIOBJ)/verinfo$(EXE) | |
| 355 | 355 | |
| 356 | $(VERINFO): $(UIOBJ)/verinfo.o $(LIBOCORE) | |
| 357 | @echo Linking $@... | |
| 358 | $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ | |
| 356 | #$(VERINFO): $(UIOBJ)/verinfo.o $(LIBOCORE) | |
| 357 | # @echo Linking $@... | |
| 358 | # $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ | |
| 359 | 359 | |
| 360 | BUILD += $(VERINFO) | |
| 360 | #BUILD += $(VERINFO) | |
| 361 | 361 | |
| 362 | 362 | |
| 363 | 363 | |
| r1679 | r1680 | |
| 365 | 365 | # Specific rele to compile verinfo util. |
| 366 | 366 | #------------------------------------------------- |
| 367 | 367 | |
| 368 | $(UIOBJ)/verinfo.o : $(WINSRC)/verinfo.c | |
| 369 | @echo Compiling $<... | |
| 370 | $(CC) -DWINUI $(CDEFS) $(CFLAGS) -c $< -o $@ | |
| 368 | #$(BUILDOBJ)/verinfo.o : $(BUILDSRC)/verinfo.c | |
| 369 | # @echo Compiling $<... | |
| 370 | # @echo $(CC) -DWINUI $(CDEFS) $(CFLAGS) -c $< -o $@ | |
| 371 | # $(CC) -DWINUI $(CDEFS) $(CFLAGS) -c $< -o $@ | |
| 371 | 372 | |
| 372 | 373 | |
| 373 | 374 | |
| r1679 | r1680 | |
| 375 | 376 | # generic rule for the resource compiler for UI |
| 376 | 377 | #------------------------------------------------- |
| 377 | 378 | |
| 378 | $( | |
| 379 | $(RESFILE | |
| 379 | 380 | @echo Compiling mameui resources $<... |
| 380 | 381 | $(RC) $(RCDEFS) $(RCFLAGS) -o $@ -i $< |
| 381 | 382 | |
| r1679 | r1680 | |
| 385 | 386 | # rules for resource file |
| 386 | 387 | #------------------------------------------------- |
| 387 | 388 | |
| 388 | #$(UIOBJ)/mameui.res: $(UISRC)/mameui.rc $(UIOBJ)/mamevers.rc | |
| 389 | ||
| 390 | $(UIOBJ)/mamevers.rc: $(VERINFO) $(SRC)/version.c | |
| 389 | $(UIOBJ)/mamevers.rc: $(OBJ)/build/verinfo$(EXE) $(SRC)/version.c | |
| 391 | 390 | @echo Emitting $@... |
| 392 | @$( | |
| 391 | @$( | |
| 393 | 392 | |
| 394 | 393 | |
| 395 | 394 |
| r1679 | r1680 | |
|---|---|---|
| 34 | 34 | |
| 35 | 35 | static TIMER_CALLBACK( h8itu_timer_0_cb ) |
| 36 | 36 | { |
| 37 | timer_adjust(h8.timer[0], attotime_never, 0 | |
| 37 | timer_adjust_oneshot(h8.timer[0], attotime_never, 0 | |
| 38 | 38 | h8.h8TCNT0 = 0; |
| 39 | 39 | h8.per_regs[TSR0] |= 4; |
| 40 | 40 | // interrupt on overflow ? |
| r1679 | r1680 | |
| 46 | 46 | |
| 47 | 47 | static TIMER_CALLBACK( h8itu_timer_1_cb ) |
| 48 | 48 | { |
| 49 | timer_adjust(h8.timer[1], attotime_never, 0 | |
| 49 | timer_adjust_oneshot(h8.timer[1], attotime_never, 0 | |
| 50 | 50 | h8.h8TCNT1 = 0; |
| 51 | 51 | h8.per_regs[TSR1] |= 4; |
| 52 | 52 | // interrupt on overflow ? |
| r1679 | r1680 | |
| 58 | 58 | |
| 59 | 59 | static TIMER_CALLBACK( h8itu_timer_2_cb ) |
| 60 | 60 | { |
| 61 | timer_adjust(h8.timer[2], attotime_never, 0 | |
| 61 | timer_adjust_oneshot(h8.timer[2], attotime_never, 0 | |
| 62 | 62 | h8.h8TCNT2 = 0; |
| 63 | 63 | h8.per_regs[TSR2] |= 4; |
| 64 | 64 | // interrupt on overflow ? |
| r1679 | r1680 | |
| 70 | 70 | |
| 71 | 71 | static TIMER_CALLBACK( h8itu_timer_3_cb ) |
| 72 | 72 | { |
| 73 | timer_adjust(h8.timer[3], attotime_never, 0 | |
| 73 | timer_adjust_oneshot(h8.timer[3], attotime_never, 0 | |
| 74 | 74 | h8.h8TCNT3 = 0; |
| 75 | 75 | h8.per_regs[TSR3] |= 4; |
| 76 | 76 | // interrupt on overflow ? |
| r1679 | r1680 | |
| 82 | 82 | |
| 83 | 83 | static TIMER_CALLBACK( h8itu_timer_4_cb ) |
| 84 | 84 | { |
| 85 | timer_adjust(h8.timer[4], attotime_never, 0 | |
| 85 | timer_adjust_oneshot(h8.timer[4], attotime_never, 0 | |
| 86 | 86 | h8.h8TCNT4 = 0; |
| 87 | 87 | h8.per_regs[TSR4] |= 4; |
| 88 | 88 | // interrupt on overflow ? |
| r1679 | r1680 | |
| 130 | 130 | logerror("H8/3002: Timer %d is using an external clock. Unsupported!\n", tnum); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | timer_adjust(h8.timer[tnum], period, 0 | |
| 133 | timer_adjust_oneshot(h8.timer[tnum], period, 0 | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | static void h8_itu_sync_timers(int tnum) |
| r1679 | r1680 | |
| 523 | 523 | logerror("H8/3007: Timer %d is using an external clock. Unsupported!\n", tnum); |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | timer_adjust(h8.timer[tnum], period, 0 | |
| 526 | timer_adjust_oneshot(h8.timer[tnum], period, 0 | |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | INLINE void h8itu_3007_timer_cb(int tnum) |
| r1679 | r1680 | |
| 546 | 546 | else |
| 547 | 547 | { |
| 548 | 548 | // logerror("h8/3007 timer %d GRA match, stopping\n",tnum); |
| 549 | timer_adjust(h8.timer[tnum], attotime_never, 0 | |
| 549 | timer_adjust_oneshot(h8.timer[tnum], attotime_never, 0 | |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | h8.per_regs[0x64] |= 1<<tnum; |
| r1679 | r1680 | |
| 568 | 568 | else |
| 569 | 569 | { |
| 570 | 570 | // logerror("h8/3007 timer %d GRB match, stopping\n",tnum); |
| 571 | timer_adjust(h8.timer[tnum], attotime_never, 0 | |
| 571 | timer_adjust_oneshot(h8.timer[tnum], attotime_never, 0 | |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | h8.per_regs[0x65] |= 1<<tnum; |
| r1679 | r1680 | |
| 839 | 839 | void h8_itu_reset(void) |
| 840 | 840 | { |
| 841 | 841 | // stop all the timers |
| 842 | timer_adjust(h8.timer[0], attotime_never, 0, attotime_zero); | |
| 843 | timer_adjust(h8.timer[1], attotime_never, 0, attotime_zero); | |
| 844 | timer_adjust(h8.timer[2], attotime_never, 0, attotime_zero); | |
| 845 | timer_adjust(h8.timer[3], attotime_never, 0, attotime_zero); | |
| 846 | timer_adjust(h8.timer[4], attotime_never, 0, attotime_zero); | |
| 842 | timer_adjust_oneshot(h8.timer[0], attotime_never, 0); | |
| 843 | timer_adjust_oneshot(h8.timer[1], attotime_never, 0); | |
| 844 | timer_adjust_oneshot(h8.timer[2], attotime_never, 0); | |
| 845 | timer_adjust_oneshot(h8.timer[3], attotime_never, 0); | |
| 846 | timer_adjust_oneshot(h8.timer[4], attotime_never, 0); | |
| 847 | 847 | } |
| r1679 | r1680 | |
|---|---|---|
| 645 | 645 | |
| 646 | 646 | /* allocate a scanline timer and set it to go off at the start */ |
| 647 | 647 | state.scantimer = timer_alloc(scanline_callback, NULL); |
| 648 | timer_adjust(state.scantimer, attotime_zero, index | |
| 648 | timer_adjust_oneshot(state.scantimer, attotime_zero, index | |
| 649 | 649 | |
| 650 | 650 | /* allocate the shiftreg */ |
| 651 | 651 | state.shiftreg = auto_malloc(SHIFTREG_SIZE); |
| r1679 | r1680 | |
| 1065 | 1065 | |
| 1066 | 1066 | /* note that we add !master (0 or 1) as a attoseconds value; this makes no practical difference */ |
| 1067 | 1067 | /* but helps ensure that masters are updated first before slaves */ |
| 1068 | timer_adjust(state.scantimer, attotime_add_attoseconds(video_screen_get_time_until_pos(state.config->scrnum, vcount, 0), !master), cpunum | (vcount << 8) | |
| 1068 | timer_adjust_oneshot(state.scantimer, attotime_add_attoseconds(video_screen_get_time_until_pos(state.config->scrnum, vcount, 0), !master), cpunum | (vcount << 8) | |
| 1069 | 1069 | |
| 1070 | 1070 | /* restore the context */ |
| 1071 | 1071 | cpuintrf_pop_context(); |
| r1679 | r1680 | |
|---|---|---|
| 534 | 534 | CPUDEFS += -DHAS_MB8884=$(if $(filter MB8884,$(CPUS)),1,0) |
| 535 | 535 | CPUDEFS += -DHAS_M58715=$(if $(filter M58715,$(CPUS)),1,0) |
| 536 | 536 | |
| 537 | ifneq ($(filter I8035 I8039 I8048 N7751,$(CPUS)),) | |
| 537 | ifneq ($(filter I8035 I8039 I8048 N7751 MB8884 M58715,$(CPUS)),) | |
| 538 | 538 | OBJDIRS += $(CPUOBJ)/i8039 |
| 539 | 539 | CPUOBJS += $(CPUOBJ)/i8039/i8039.o |
| 540 | 540 | DBGOBJS += $(CPUOBJ)/i8039/8039dasm.o |
| r1679 | r1680 | |
|---|---|---|
| 272 | 272 | int cpunum = param; |
| 273 | 273 | |
| 274 | 274 | cpuintrf_push_context(cpunum); |
| 275 | timer_adjust(m37710i_cpu.timers[0], m37710i_cpu.reload[0], cpunum | |
| 275 | timer_adjust_oneshot(m37710i_cpu.timers[0], m37710i_cpu.reload[0], cpunum | |
| 276 | 276 | |
| 277 | 277 | m37710i_cpu.m37710_regs[m37710_irq_levels[12]] |= 0x04; |
| 278 | 278 | m37710_set_irq_line(M37710_LINE_TIMERA0, PULSE_LINE); |
| r1679 | r1680 | |
| 285 | 285 | int cpunum = param; |
| 286 | 286 | |
| 287 | 287 | cpuintrf_push_context(cpunum); |
| 288 | timer_adjust(m37710i_cpu.timers[1], m37710i_cpu.reload[1], cpunum | |
| 288 | timer_adjust_oneshot(m37710i_cpu.timers[1], m37710i_cpu.reload[1], cpunum | |
| 289 | 289 | |
| 290 | 290 | m37710i_cpu.m37710_regs[m37710_irq_levels[11]] |= 0x04; |
| 291 | 291 | m37710_set_irq_line(M37710_LINE_TIMERA1, PULSE_LINE); |
| r1679 | r1680 | |
| 298 | 298 | int cpunum = param; |
| 299 | 299 | |
| 300 | 300 | cpuintrf_push_context(cpunum); |
| 301 | timer_adjust(m37710i_cpu.timers[2], m37710i_cpu.reload[2], cpunum | |
| 301 | timer_adjust_oneshot(m37710i_cpu.timers[2], m37710i_cpu.reload[2], cpunum | |
| 302 | 302 | |
| 303 | 303 | m37710i_cpu.m37710_regs[m37710_irq_levels[10]] |= 0x04; |
| 304 | 304 | m37710_set_irq_line(M37710_LINE_TIMERA2, PULSE_LINE); |
| r1679 | r1680 | |
| 311 | 311 | int cpunum = param; |
| 312 | 312 | |
| 313 | 313 | cpuintrf_push_context(cpunum); |
| 314 | timer_adjust(m37710i_cpu.timers[3], m37710i_cpu.reload[3], cpunum | |
| 314 | timer_adjust_oneshot(m37710i_cpu.timers[3], m37710i_cpu.reload[3], cpunum | |
| 315 | 315 | |
| 316 | 316 | m37710i_cpu.m37710_regs[m37710_irq_levels[9]] |= 0x04; |
| 317 | 317 | m37710_set_irq_line(M37710_LINE_TIMERA3, PULSE_LINE); |
| r1679 | r1680 | |
| 324 | 324 | int cpunum = param; |
| 325 | 325 | |
| 326 | 326 | cpuintrf_push_context(cpunum); |
| 327 | timer_adjust(m37710i_cpu.timers[4], m37710i_cpu.reload[4], cpunum | |
| 327 | timer_adjust_oneshot(m37710i_cpu.timers[4], m37710i_cpu.reload[4], cpunum | |
| 328 | 328 | |
| 329 | 329 | m37710i_cpu.m37710_regs[m37710_irq_levels[8]] |= 0x04; |
| 330 | 330 | m37710_set_irq_line(M37710_LINE_TIMERA4, PULSE_LINE); |
| r1679 | r1680 | |
| 337 | 337 | int cpunum = param; |
| 338 | 338 | |
| 339 | 339 | cpuintrf_push_context(cpunum); |
| 340 | timer_adjust(m37710i_cpu.timers[5], m37710i_cpu.reload[5], cpunum | |
| 340 | timer_adjust_oneshot(m37710i_cpu.timers[5], m37710i_cpu.reload[5], cpunum | |
| 341 | 341 | |
| 342 | 342 | m37710i_cpu.m37710_regs[m37710_irq_levels[7]] |= 0x04; |
| 343 | 343 | m37710_set_irq_line(M37710_LINE_TIMERB0, PULSE_LINE); |
| r1679 | r1680 | |
| 350 | 350 | int cpunum = param; |
| 351 | 351 | |
| 352 | 352 | cpuintrf_push_context(cpunum); |
| 353 | timer_adjust(m37710i_cpu.timers[6], m37710i_cpu.reload[6], cpunum | |
| 353 | timer_adjust_oneshot(m37710i_cpu.timers[6], m37710i_cpu.reload[6], cpunum | |
| 354 | 354 | |
| 355 | 355 | m37710i_cpu.m37710_regs[m37710_irq_levels[6]] |= 0x04; |
| 356 | 356 | m37710_set_irq_line(M37710_LINE_TIMERB1, PULSE_LINE); |
| r1679 | r1680 | |
| 363 | 363 | int cpunum = param; |
| 364 | 364 | |
| 365 | 365 | cpuintrf_push_context(cpunum); |
| 366 | timer_adjust(m37710i_cpu.timers[7], m37710i_cpu.reload[7], cpunum | |
| 366 | timer_adjust_oneshot(m37710i_cpu.timers[7], m37710i_cpu.reload[7], cpunum | |
| 367 | 367 | |
| 368 | 368 | m37710i_cpu.m37710_regs[m37710_irq_levels[5]] |= 0x04; |
| 369 | 369 | m37710_set_irq_line(M37710_LINE_TIMERB2, PULSE_LINE); |
| r1679 | r1680 | |
| 433 | 433 | mame_printf_debug("Timer %d in timer mode, %f Hz\n", timer, 1.0 / attotime_to_double(time)); |
| 434 | 434 | #endif |
| 435 | 435 | |
| 436 | timer_adjust(m37710i_cpu.timers[timer], time, cpunum | |
| 436 | timer_adjust_oneshot(m37710i_cpu.timers[timer], time, cpunum | |
| 437 | 437 | m37710i_cpu.reload[timer] = time; |
| 438 | 438 | break; |
| 439 | 439 | |
| r1679 | r1680 | |
| 468 | 468 | mame_printf_debug("Timer %d in timer mode, %f Hz\n", timer, 1.0 / attotime_to_double(time)); |
| 469 | 469 | #endif |
| 470 | 470 | |
| 471 | timer_adjust(m37710i_cpu.timers[timer], time, cpunum | |
| 471 | timer_adjust_oneshot(m37710i_cpu.timers[timer], time, cpunum | |
| 472 | 472 | m37710i_cpu.reload[timer] = time; |
| 473 | 473 | break; |
| 474 | 474 |
| r1679 | r1680 | |
|---|---|---|
| 43 | 43 | * |
| 44 | 44 | *****************************************************************************/ |
| 45 | 45 | |
| 46 | /***************************************************************************** | |
| 47 | ||
| 48 | Z180 Info: | |
| 49 | ||
| 50 | Known clock speeds (from ZiLOG): 6, 8, 10, 20 & 33MHz | |
| 51 | ||
| 52 | ZiLOG Z180 codes: | |
| 53 | ||
| 54 | Speed: 10 = 10MHZ | |
| 55 | 20 = 20MHz | |
| 56 | 33 = 33MHz | |
| 57 | Package: P = 60-Pin Plastic DIP | |
| 58 | V = 68-Pin PLCC | |
| 59 | F = 80-Pin QFP | |
| 60 | Temp: S = 0C to +70C | |
| 61 | E = -40C to +85C | |
| 62 | ||
| 63 | Environmanetal Flow: C = Plastic Standard | |
| 64 | ||
| 65 | ||
| 66 | Example from Ms.Pac-Man/Galaga - 20 year Reunion hardare (see src/mame/drivers/20pacgal.c): | |
| 67 | ||
| 68 | CPU is Z8S18020VSC = Z180, 20MHz, 68-Pin PLCC, 0C to +70C, Plastic Standard | |
| 69 | ||
| 70 | ||
| 71 | Other CPUs that use a compatible Z180 core: | |
| 72 | ||
| 73 | Hitachi HD647180 series: | |
| 74 | Available in QFP80, PLCC84 & DIP90 packages (the QFP80 is not pinout compatible) | |
| 75 | The HD647180 also has an internal ROM | |
| 76 | ||
| 77 | *****************************************************************************/ | |
| 78 | ||
| 46 | 79 | #include "debugger.h" |
| 47 | 80 | #include "deprecat.h" |
| 48 | 81 | #include "z180.h" |
| r1679 | r1680 | |
|---|---|---|
| 620 | 620 | R.timer = 0; |
| 621 | 621 | } |
| 622 | 622 | |
| 623 | #if (HAS_I8035) | |
| 623 | #if (HAS_I8035||HAS_I8048||HAS_MB8884) | |
| 624 | 624 | static void i8035_init (int index, int clock, const void *config, int (*irqcallback)(int)) |
| 625 | 625 | { |
| 626 | 626 | i8039_init(index, clock, config, irqcallback); |
| 627 | 627 | R.ram_mask = 0x3F; |
| 628 | 628 | R.int_rom_size = 0x400; |
| 629 | 629 | } |
| 630 | #endif | |
| 630 | #endif | |
| 631 | 631 | |
| 632 | 632 | #if (HAS_M58715) |
| 633 | 633 | static void m58715_init (int index, int clock, const void *config, int (*irqcallback)(int)) |
| r1679 | r1680 | |
|---|---|---|
| 2345 | 2345 | |
| 2346 | 2346 | period = attotime_mul(T90.timer_period, prescaler); |
| 2347 | 2347 | |
| 2348 | timer_adjust(T90.timer[i], period, i, period); | |
| 2348 | timer_adjust_periodic(T90.timer[i], period, i, period); | |
| 2349 | 2349 | |
| 2350 | 2350 | logerror("%04X: CPU Timer %d started at %lf Hz\n", activecpu_get_pc(), i, 1.0 / attotime_to_double(period)); |
| 2351 | 2351 | } |
| r1679 | r1680 | |
| 2367 | 2367 | |
| 2368 | 2368 | period = attotime_mul(T90.timer_period, prescaler); |
| 2369 | 2369 | |
| 2370 | timer_adjust(T90.timer[4], period, 4, period); | |
| 2370 | timer_adjust_periodic(T90.timer[4], period, 4, period); | |
| 2371 | 2371 | |
| 2372 | 2372 | logerror("%04X: CPU Timer 4 started at %lf Hz\n", activecpu_get_pc(), 1.0 / attotime_to_double(period)); |
| 2373 | 2373 | } |
| r1679 | r1680 | |
| 2375 | 2375 | |
| 2376 | 2376 | static void t90_stop_timer(int i) |
| 2377 | 2377 | { |
| 2378 | timer_adjust(T90.timer[i], attotime_never, i | |
| 2378 | timer_adjust_oneshot(T90.timer[i], attotime_never, i | |
| 2379 | 2379 | logerror("%04X: CPU Timer %d stopped\n", activecpu_get_pc(), i); |
| 2380 | 2380 | } |
| 2381 | 2381 |
| r1679 | r1680 | |
|---|---|---|
| 637 | 637 | { |
| 638 | 638 | UINT64 clocks_until_int = hyperstone.tr_clocks_per_tick - (clocks_since_base % hyperstone.tr_clocks_per_tick); |
| 639 | 639 | UINT64 cycles_until_int = (clocks_until_int << hyperstone.clock_scale) + cycles_until_next_clock; |
| 640 | timer_adjust(hyperstone.timer, ATTOTIME_IN_CYCLES(cycles_until_int + 1, cpunum), cpunum * 2 + 1 | |
| 640 | timer_adjust_oneshot(hyperstone.timer, ATTOTIME_IN_CYCLES(cycles_until_int + 1, cpunum), cpunum * 2 + 1 | |
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | /* else if the timer interrupt is enabled, configure it to fire at the appropriate time */ |
| r1679 | r1680 | |
| 648 | 648 | if (delta > 0x80000000) |
| 649 | 649 | { |
| 650 | 650 | if (!hyperstone.timer_int_pending) |
| 651 | timer_adjust(hyperstone.timer, attotime_zero, cpunum * 2 + 0 | |
| 651 | timer_adjust_oneshot(hyperstone.timer, attotime_zero, cpunum * 2 + 0 | |
| 652 | 652 | } |
| 653 | 653 | else |
| 654 | 654 | { |
| 655 | 655 | UINT64 clocks_until_int = mulu_32x32(delta, hyperstone.tr_clocks_per_tick); |
| 656 | 656 | UINT64 cycles_until_int = (clocks_until_int << hyperstone.clock_scale) + cycles_until_next_clock; |
| 657 | timer_adjust(hyperstone.timer, ATTOTIME_IN_CYCLES(cycles_until_int, cpunum), cpunum * 2 + 0 | |
| 657 | timer_adjust_oneshot(hyperstone.timer, ATTOTIME_IN_CYCLES(cycles_until_int, cpunum), cpunum * 2 + 0 | |
| 658 | 658 | } |
| 659 | 659 | } |
| 660 | 660 | |
| 661 | 661 | /* otherwise, disable the timer */ |
| 662 | 662 | else |
| 663 | timer_adjust(hyperstone.timer, attotime_never, 0 | |
| 663 | timer_adjust_oneshot(hyperstone.timer, attotime_never, 0 | |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | 666 | static TIMER_CALLBACK( e132xs_timer_callback ) |
| r1679 | r1680 | |
| 1598 | 1598 | |
| 1599 | 1599 | hyperstone_init(index, clock, config, irqcallback, scale_mask); |
| 1600 | 1600 | } |
| 1601 | #endif | |
| 1601 | 1602 | |
| 1603 | #if (HAS_E116T) | |
| 1602 | 1604 | static void e116t_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1603 | 1605 | { |
| 1604 | 1606 | e116_init(index, clock, config, irqcallback, 0); |
| 1605 | 1607 | } |
| 1608 | #endif | |
| 1606 | 1609 | |
| 1610 | #if (HAS_E116XT) | |
| 1607 | 1611 | static void e116xt_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1608 | 1612 | { |
| 1609 | 1613 | e116_init(index, clock, config, irqcallback, 3); |
| 1610 | 1614 | } |
| 1615 | #endif | |
| 1611 | 1616 | |
| 1617 | #if (HAS_E116XS) | |
| 1612 | 1618 | static void e116xs_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1613 | 1619 | { |
| 1614 | 1620 | e116_init(index, clock, config, irqcallback, 7); |
| 1615 | 1621 | } |
| 1622 | #endif | |
| 1616 | 1623 | |
| 1624 | #if (HAS_E116XSR) | |
| 1617 | 1625 | static void e116xsr_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1618 | 1626 | { |
| 1619 | 1627 | e116_init(index, clock, config, irqcallback, 7); |
| 1620 | 1628 | } |
| 1629 | #endif | |
| 1621 | 1630 | |
| 1631 | #if (HAS_GMS30C2116) | |
| 1622 | 1632 | static void gms30c2116_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1623 | 1633 | { |
| 1624 | 1634 | e116_init(index, clock, config, irqcallback, 0); |
| 1625 | 1635 | } |
| 1636 | #endif | |
| 1626 | 1637 | |
| 1638 | #if (HAS_GMS30C2216) | |
| 1627 | 1639 | static void gms30c2216_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1628 | 1640 | { |
| 1629 | 1641 | e116_init(index, clock, config, irqcallback, 0); |
| r1679 | r1680 | |
| 1647 | 1659 | |
| 1648 | 1660 | hyperstone_init(index, clock, config, irqcallback, scale_mask); |
| 1649 | 1661 | } |
| 1662 | #endif | |
| 1650 | 1663 | |
| 1664 | #if (HAS_E132N) | |
| 1651 | 1665 | static void e132n_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1652 | 1666 | { |
| 1653 | 1667 | e132_init(index, clock, config, irqcallback, 0); |
| 1654 | 1668 | } |
| 1669 | #endif | |
| 1655 | 1670 | |
| 1671 | #if (HAS_E132T) | |
| 1656 | 1672 | static void e132t_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1657 | 1673 | { |
| 1658 | 1674 | e132_init(index, clock, config, irqcallback, 0); |
| 1659 | 1675 | } |
| 1676 | #endif | |
| 1660 | 1677 | |
| 1678 | #if (HAS_E132XN) | |
| 1661 | 1679 | static void e132xn_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1662 | 1680 | { |
| 1663 | 1681 | e132_init(index, clock, config, irqcallback, 3); |
| 1664 | 1682 | } |
| 1683 | #endif | |
| 1665 | 1684 | |
| 1685 | #if (HAS_E132XT) | |
| 1666 | 1686 | static void e132xt_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1667 | 1687 | { |
| 1668 | 1688 | e132_init(index, clock, config, irqcallback, 3); |
| 1669 | 1689 | } |
| 1690 | #endif | |
| 1670 | 1691 | |
| 1692 | #if (HAS_E132XS) | |
| 1671 | 1693 | static void e132xs_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1672 | 1694 | { |
| 1673 | 1695 | e132_init(index, clock, config, irqcallback, 7); |
| 1674 | 1696 | } |
| 1697 | #endif | |
| 1675 | 1698 | |
| 1699 | #if (HAS_E132XSR) | |
| 1676 | 1700 | static void e132xsr_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1677 | 1701 | { |
| 1678 | 1702 | e132_init(index, clock, config, irqcallback, 7); |
| 1679 | 1703 | } |
| 1704 | #endif | |
| 1680 | 1705 | |
| 1706 | #if (HAS_GMS30C2132) | |
| 1681 | 1707 | static void gms30c2132_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1682 | 1708 | { |
| 1683 | 1709 | e132_init(index, clock, config, irqcallback, 0); |
| 1684 | 1710 | } |
| 1711 | #endif | |
| 1685 | 1712 | |
| 1713 | #if (HAS_GMS30C2232) | |
| 1686 | 1714 | static void gms30c2232_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1687 | 1715 | { |
| 1688 | 1716 | e132_init(index, clock, config, irqcallback, 0); |
| r1679 | r1680 | |
|---|---|---|
| 2071 | 2071 | } |
| 2072 | 2072 | } |
| 2073 | 2073 | |
| 2074 | #if (HAS_ADSP2104||HAS_ADSP2105||HAS_ADSP2115||HAS_ADSP2181) | |
| 2074 | 2075 | static void adsp21xx_load_boot_data(UINT8 *srcdata, UINT32 *dstdata) |
| 2075 | 2076 | { |
| 2076 | 2077 | /* see how many words we need to copy */ |
| r1679 | r1680 | |
| 2082 | 2083 | dstdata[i] = opcode; |
| 2083 | 2084 | } |
| 2084 | 2085 | } |
| 2086 | #endif | |
| 2085 | 2087 | |
| 2086 | 2088 | #if (HAS_ADSP2100) |
| 2087 | 2089 | /************************************************************************** |
| r1679 | r1680 | |
|---|---|---|
| 288 | 288 | t1=RDOPARG(); \ |
| 289 | 289 | t2=RDOPARG(); \ |
| 290 | 290 | t3=RDOPARG(); \ |
| 291 | logerror("m65ce02 at pc:%.4x reserved op aug %.2x %.2x %.2x\n", t1,t2,t3); | |
| 291 | logerror("m65ce02 at pc:%.4x reserved op aug %.2x %.2x %.2x\n", activecpu_get_pc(),t1,t2,t3); | |
| 292 | 292 | |
| 293 | 293 | /* 65ce02 ****************************************************** |
| 294 | 294 | * BBR Branch if bit is reset |
| r1679 | r1680 | |
|---|---|---|
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #include "debugger.h" |
| 41 | #include "deprecat.h" | |
| 41 | 42 | #include "m65ce02.h" |
| 42 | 43 | |
| 43 | 44 | #include "mincce02.h" |
| 44 | 45 | #include "opsce02.h" |
| 45 | 46 | |
| 47 | #define M6502_NMI_VEC 0xfffa | |
| 48 | #define M6502_RST_VEC 0xfffc | |
| 49 | #define M6502_IRQ_VEC 0xfffe | |
| 50 | #define M65CE02_RST_VEC M6502_RST_VEC | |
| 51 | #define M65CE02_IRQ_VEC M6502_IRQ_VEC | |
| 52 | #define M65CE02_NMI_VEC M6502_NMI_VEC | |
| 53 | ||
| 46 | 54 | #define VERBOSE 0 |
| 47 | 55 | |
| 48 | 56 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 49 | 57 | |
| 50 | 58 | |
| 51 | /* Layout of the registers in the debugger */ | |
| 52 | static UINT8 m65ce02_reg_layout[] = { | |
| 53 | M65CE02_A,M65CE02_X,M65CE02_Y,M65CE02_Z,M65CE02_S,M65CE02_PC, | |
| 54 | M65CE02_P, | |
| 55 | -1, | |
| 56 | M65CE02_EA,M65CE02_ZP,M65CE02_NMI_STATE,M65CE02_IRQ_STATE, M65CE02_B, | |
| 57 | 0 | |
| 58 | }; | |
| 59 | ||
| 60 | /* Layout of the debugger windows x,y,w,h */ | |
| 61 | static UINT8 m65ce02_win_layout[] = { | |
| 62 | 25, 0,55, 2, /* register window (top, right rows) */ | |
| 63 | 0, 0,24,22, /* disassembler window (left colums) */ | |
| 64 | 25, 3,55, 9, /* memory #1 window (right, upper middle) */ | |
| 65 | 25,13,55, 9, /* memory #2 window (right, lower middle) */ | |
| 66 | 0,23,80, 1, /* command line window (bottom rows) */ | |
| 67 | }; | |
| 68 | ||
| 69 | 59 | typedef struct { |
| 70 | void (**insn)(void); /* pointer to the function pointer table */ | |
| 60 | void (*const *insn)(void); /* pointer to the function pointer table */ | |
| 71 | 61 | PAIR ppc; /* previous program counter */ |
| 72 | PAIR pc; /* program counter */ | |
| 73 | PAIR sp; /* stack pointer (always 100 - 1FF) */ | |
| 74 | PAIR zp; /* zero page address */ | |
| 62 | PAIR pc; /* program counter */ | |
| 63 | PAIR sp; /* stack pointer (always 100 - 1FF) */ | |
| 64 | PAIR zp; /* zero page address */ | |
| 75 | 65 | /* contains B register zp.b.h */ |
| 76 | PAIR ea; | |
| 66 | PAIR ea; /* effective address */ | |
| 77 | 67 | UINT8 a; /* Accumulator */ |
| 78 | 68 | UINT8 x; /* X index register */ |
| 79 | 69 | UINT8 y; /* Y index register */ |
| r1679 | r1680 | |
| 84 | 74 | UINT8 nmi_state; |
| 85 | 75 | UINT8 irq_state; |
| 86 | 76 | int (*irq_callback)(int irqline); /* IRQ callback */ |
| 77 | read8_handler rdmem_id; /* readmem callback for indexed instructions */ | |
| 78 | write8_handler wrmem_id; /* writemem callback for indexed instructions */ | |
| 87 | 79 | } m65ce02_Regs; |
| 88 | 80 | |
| 89 | 81 | |
| 90 | int m65ce02_ICount = 0; | |
| 82 | static int m65ce02_ICount = 0; | |
| 91 | 83 | |
| 92 | 84 | static m65ce02_Regs m65ce02; |
| 93 | 85 | |
| r1679 | r1680 | |
| 97 | 89 | |
| 98 | 90 | #include "t65ce02.c" |
| 99 | 91 | |
| 100 | void m65ce02_ | |
| 92 | static void m65ce02_init(int index, int clock, cons | |
| 101 | 93 | { |
| 94 | m65ce02.rdmem_id = program_read_byte_8; | |
| 95 | m65ce02.wrmem_id = program_write_byte_8; | |
| 96 | m65ce02.irq_callback = irqcallback; | |
| 97 | } | |
| 98 | ||
| 99 | static void m65ce02_reset(void) | |
| 100 | { | |
| 102 | 101 | m65ce02.insn = insn65ce02; |
| 103 | 102 | |
| 104 | 103 | /* wipe out the rest of the m65ce02 structure */ |
| r1679 | r1680 | |
| 119 | 118 | change_pc(PCD); |
| 120 | 119 | } |
| 121 | 120 | |
| 122 | void m65ce02_exit(void) | |
| 121 | static void m65ce02_exit(void) | |
| 123 | 122 | { |
| 124 | 123 | /* nothing to do yet */ |
| 125 | 124 | } |
| 126 | 125 | |
| 127 | ||
| 126 | ||
| 128 | 127 | { |
| 129 | 128 | if( dst ) |
| 130 | 129 | *(m65ce02_Regs*)dst = m65ce02; |
| 131 | return sizeof(m65ce02_Regs); | |
| 132 | 130 | } |
| 133 | 131 | |
| 134 | void m65ce02_set_context (void *src) | |
| 132 | static void m65ce02_set_context (void *src) | |
| 135 | 133 | { |
| 136 | 134 | if( src ) |
| 137 | 135 | { |
| r1679 | r1680 | |
| 140 | 138 | } |
| 141 | 139 | } |
| 142 | 140 | |
| 143 | unsigned m65ce02_get_reg (int regnum) | |
| 144 | { | |
| 145 | switch( regnum ) | |
| 146 | { | |
| 147 | case REG_PC: return PCD; | |
| 148 | case M65CE02_PC: return m65ce02.pc.w.l; | |
| 149 | case REG_SP: return S; | |
| 150 | case M65CE02_S: return m65ce02.sp.w.l; | |
| 151 | case M65CE02_P: return m65ce02.p; | |
| 152 | case M65CE02_A: return m65ce02.a; | |
| 153 | case M65CE02_X: return m65ce02.x; | |
| 154 | case M65CE02_Y: return m65ce02.y; | |
| 155 | case M65CE02_Z: return m65ce02.z; | |
| 156 | case M65CE02_B: return m65ce02.zp.b.h; | |
| 157 | case M65CE02_EA: return m65ce02.ea.w.l; | |
| 158 | case M65CE02_ZP: return m65ce02.zp.b.l; | |
| 159 | case M65CE02_NMI_STATE: return m65ce02.nmi_state; | |
| 160 | case M65CE02_IRQ_STATE: return m65ce02.irq_state; | |
| 161 | case REG_PREVIOUSPC: return m65ce02.ppc.w.l; | |
| 162 | } | |
| 163 | return 0; | |
| 164 | } | |
| 165 | ||
| 166 | void m65ce02_set_reg (int regnum, unsigned val) | |
| 167 | { | |
| 168 | switch( regnum ) | |
| 169 | { | |
| 170 | case REG_PC: PCW = val; change_pc(PCD); break; | |
| 171 | case M65CE02_PC: m65ce02.pc.w.l = val; break; | |
| 172 | case REG_SP: S = val; break; | |
| 173 | case M65CE02_S: m65ce02.sp.w.l = val; break; | |
| 174 | case M65CE02_P: m65ce02.p = val; break; | |
| 175 | case M65CE02_A: m65ce02.a = val; break; | |
| 176 | case M65CE02_X: m65ce02.x = val; break; | |
| 177 | case M65CE02_Y: m65ce02.y = val; break; | |
| 178 | case M65CE02_Z: m65ce02.z = val; break; | |
| 179 | case M65CE02_B: m65ce02.zp.b.h = val; break; | |
| 180 | case M65CE02_EA: m65ce02.ea.w.l = val; break; | |
| 181 | case M65CE02_ZP: m65ce02.zp.b.l = val; break; | |
| 182 | case M65CE02_NMI_STATE: m65ce02_set_irq_line( INPUT_LINE_NMI, val ); break; | |
| 183 | case M65CE02_IRQ_STATE: m65ce02_set_irq_line( 0, val ); break; | |
| 184 | } | |
| 185 | } | |
| 186 | ||
| 187 | 141 | INLINE void m65ce02_take_irq(void) |
| 188 | 142 | { |
| 189 | 143 | if( !(P & F_I) ) |
| r1679 | r1680 | |
| 204 | 158 | m65ce02.pending_irq = 0; |
| 205 | 159 | } |
| 206 | 160 | |
| 207 | int m65ce02_execute(int cycles) | |
| 161 | static int m65ce02_execute(int cycles) | |
| 208 | 162 | { |
| 209 | 163 | m65ce02_ICount = cycles; |
| 210 | 164 | |
| r1679 | r1680 | |
| 248 | 202 | return cycles - m65ce02_ICount; |
| 249 | 203 | } |
| 250 | 204 | |
| 251 | void m65ce02_set_irq_line(int irqline, int state) | |
| 205 | static void m65ce02_set_irq_line(int irqline, int state) | |
| 252 | 206 | { |
| 253 | 207 | if (irqline == INPUT_LINE_NMI) |
| 254 | 208 | { |
| r1679 | r1680 | |
| 280 | 234 | } |
| 281 | 235 | } |
| 282 | 236 | |
| 283 | void m65ce02_set_irq_callback(int (*callback)(int)) | |
| 284 | { | |
| 285 | m65ce02.irq_callback = callback; | |
| 286 | } | |
| 237 | /************************************************************************** | |
| 238 | * Generic set_info | |
| 239 | **************************************************************************/ | |
| 287 | 240 | |
| 288 | void m65ce02_s | |
| 241 | static void m65ce02_s | |
| 289 | 242 | { |
| 290 | int cpu = cpu_getactivecpu(); | |
| 291 | /* insn is set at restore since it's a pointer */ | |
| 292 | state_save_UINT16(file,"m65ce02",cpu,"PC",&m65ce02.pc.w.l,2); | |
| 293 | state_save_UINT16(file,"m65ce02",cpu,"SP",&m65ce02.sp.w.l,2); | |
| 294 | state_save_UINT8(file,"m65ce02",cpu,"P",&m65ce02.p,1); | |
| 295 | state_save_UINT8(file,"m65ce02",cpu,"A",&m65ce02.a,1); | |
| 296 | state_save_UINT8(file,"m65ce02",cpu,"X",&m65ce02.x,1); | |
| 297 | state_save_UINT8(file,"m65ce02",cpu,"Y",&m65ce02.y,1); | |
| 298 | state_save_UINT8(file,"m65ce02",cpu,"Z",&m65ce02.z,1); | |
| 299 | state_save_UINT8(file,"m65ce02",cpu,"B",&m65ce02.zp.b.h,1); | |
| 300 | state_save_UINT8(file,"m65ce02",cpu,"PENDING",&m65ce02.pending_irq,1); | |
| 301 | state_save_UINT8(file,"m65ce02",cpu,"AFTER_CLI",&m65ce02.after_cli,1); | |
| 302 | state_save_UINT8(file,"m65ce02",cpu,"NMI_STATE",&m65ce02.nmi_state,1); | |
| 303 | state_save_UINT8(file,"m65ce02",cpu,"IRQ_STATE",&m65ce02.irq_state,1); | |
| 304 | } | |
| 243 | switch( state ) | |
| 244 | { | |
| 245 | /* --- the following bits of info are set as 64-bit signed integers --- */ | |
| 246 | case CPUINFO_INT_INPUT_STATE + M65CE02_IRQ_STATE: m65ce02_set_irq_line( M65CE02_IRQ_LINE, info->i ); break; | |
| 247 | case CPUINFO_INT_INPUT_STATE + M65CE02_NMI_STATE: m65ce02_set_irq_line( INPUT_LINE_NMI, info->i ); break; | |
| 305 | 248 | |
| 306 | void m65ce02_state_load(void *file) | |
| 307 | { | |
| 308 | int cpu = cpu_getactivecpu(); | |
| 309 | m65ce02.insn = insn65ce02; | |
| 310 | state_load_UINT16(file,"m65ce02",cpu,"PC",&m65ce02.pc.w.l,2); | |
| 311 | state_load_UINT16(file,"m65ce02",cpu,"SP",&m65ce02.sp.w.l,2); | |
| 312 | state_load_UINT8(file,"m65ce02",cpu,"P",&m65ce02.p,1); | |
| 313 | state_load_UINT8(file,"m65ce02",cpu,"A",&m65ce02.a,1); | |
| 314 | state_load_UINT8(file,"m65ce02",cpu,"X",&m65ce02.x,1); | |
| 315 | state_load_UINT8(file,"m65ce02",cpu,"Y",&m65ce02.y,1); | |
| 316 | state_load_UINT8(file,"m65ce02",cpu,"Z",&m65ce02.z,1); | |
| 317 | state_load_UINT8(file,"m65ce02",cpu,"B",&m65ce02.zp.b.h,1); | |
| 318 | state_load_UINT8(file,"m65ce02",cpu,"PENDING",&m65ce02.pending_irq,1); | |
| 319 | state_load_UINT8(file,"m65ce02",cpu,"AFTER_CLI",&m65ce02.after_cli,1); | |
| 320 | state_load_UINT8(file,"m65ce02",cpu,"NMI_STATE",&m65ce02.nmi_state,1); | |
| 321 | state_load_UINT8(file,"m65ce02",cpu,"IRQ_STATE",&m65ce02.irq_state,1); | |
| 249 | case CPUINFO_INT_PC: PCW = info->i; change_pc(PCD); break; | |
| 250 | case CPUINFO_INT_REGISTER + M65CE02_PC: m65ce02.pc.w.l = info->i; break; | |
| 251 | case CPUINFO_INT_SP: m65ce02.sp.b.l = info->i; break; | |
| 252 | case CPUINFO_INT_REGISTER + M65CE02_S: m65ce02.sp.w.l = info->i; break; | |
| 253 | case CPUINFO_INT_REGISTER + M65CE02_P: m65ce02.p = info->i; break; | |
| 254 | case CPUINFO_INT_REGISTER + M65CE02_A: m65ce02.a = info->i; break; | |
| 255 | case CPUINFO_INT_REGISTER + M65CE02_X: m65ce02.x = info->i; break; | |
| 256 | case CPUINFO_INT_REGISTER + M65CE02_Y: m65ce02.y = info->i; break; | |
| 257 | case CPUINFO_INT_REGISTER + M65CE02_Z: m65ce02.z = info->i; break; | |
| 258 | case CPUINFO_INT_REGISTER + M65CE02_B: m65ce02.zp.b.h = info->i; break; | |
| 259 | case CPUINFO_INT_REGISTER + M65CE02_EA: m65ce02.ea.w.l = info->i; break; | |
| 260 | case CPUINFO_INT_REGISTER + M65CE02_ZP: m65ce02.zp.b.l = info->i; break; | |
| 261 | ||
| 262 | /* --- the following bits of info are set as pointers to data or functions --- */ | |
| 263 | case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: m65ce02.rdmem_id = (read8_handler) info->f; break; | |
| 264 | case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: m65ce02.wrmem_id = (write8_handler) info->f; break; | |
| 265 | } | |
| 322 | 266 | } |
| 323 | 267 | |
| 324 | /**************************************************************************** | |
| 325 | * Return a formatted string for a register | |
| 326 | ****************************************************************************/ | |
| 327 | const char *m65ce02_info(void *context, int regnum) | |
| 268 | /************************************************************************** | |
| 269 | * Generic get_info | |
| 270 | **************************************************************************/ | |
| 271 | ||
| 272 | void m65ce02_get_info(UINT32 state, cpuinfo *info) | |
| 328 | 273 | { |
| 329 | char *buffer = cpuintrf_temp_str(); | |
| 330 | m65ce02_Regs *r = context; | |
| 274 | switch( state ) | |
| 275 | { | |
| 276 | /* --- the following bits of info are returned as 64-bit signed integers --- */ | |
| 277 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(m65ce02); break; | |
| 278 | case CPUINFO_INT_INPUT_LINES: info->i = 2; break; | |
| 279 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; | |
| 280 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; | |
| 281 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; | |
| 282 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; | |
| 283 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; | |
| 284 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; | |
| 285 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; | |
| 286 | case CPUINFO_INT_MAX_CYCLES: info->i = 10; break; | |
| 331 | 287 | |
| 332 | if( !context ) | |
| 333 | r = &m65ce02; | |
| 288 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 8; break; | |
| 289 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 20; break; | |
| 290 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 0; break; | |
| 291 | case CPUINFO_INT_LOGADDR_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 16; break; | |
| 292 | case CPUINFO_INT_PAGE_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 13; break; | |
| 293 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 294 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 295 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = 0; break; | |
| 296 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 297 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 298 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 334 | 299 | |
| 335 | switch( regnum ) | |
| 336 | { | |
| 337 | case CPU_INFO_REG+M65CE02_PC: sprintf(buffer, "PC:%04X", r->pc.w.l); break; | |
| 338 | case CPU_INFO_REG+M65CE02_S: sprintf(buffer, "S:%04X", r->sp.w.l); break; | |
| 339 | case CPU_INFO_REG+M65CE02_P: sprintf(buffer, "P:%02X", r->p); break; | |
| 340 | case CPU_INFO_REG+M65CE02_A: sprintf(buffer, "A:%02X", r->a); break; | |
| 341 | case CPU_INFO_REG+M65CE02_X: sprintf(buffer, "X:%02X", r->x); break; | |
| 342 | case CPU_INFO_REG+M65CE02_Y: sprintf(buffer, "Y:%02X", r->y); break; | |
| 343 | case CPU_INFO_REG+M65CE02_Z: sprintf(buffer, "Z:%02X", r->z); break; | |
| 344 | case CPU_INFO_REG+M65CE02_B: sprintf(buffer, "B:%02X", r->zp.b.h); break; | |
| 345 | case CPU_INFO_REG+M65CE02_EA: sprintf(buffer, "EA:%04X", r->ea.w.l); break; | |
| 346 | case CPU_INFO_REG+M65CE02_ZP: sprintf(buffer, "ZP:%04X", r->zp.w.l); break; | |
| 347 | case CPU_INFO_REG+M65CE02_NMI_STATE: sprintf(buffer, "NMI:%X", r->nmi_state); break; | |
| 348 | case CPU_INFO_REG+M65CE02_IRQ_STATE: sprintf(buffer, "IRQ:%X", r->irq_state); break; | |
| 349 | case CPU_INFO_FLAGS: | |
| 350 | sprintf(buffer, "%c%c%c%c%c%c%c%c", | |
| 351 | r->p & 0x80 ? 'N':'.', | |
| 352 | r->p & 0x40 ? 'V':'.', | |
| 353 | r->p & 0x20 ? 'E':'.', | |
| 354 | r->p & 0x10 ? 'B':'.', | |
| 355 | r->p & 0x08 ? 'D':'.', | |
| 356 | r->p & 0x04 ? 'I':'.', | |
| 357 | r->p & 0x02 ? 'Z':'.', | |
| 358 | r->p & 0x01 ? 'C':'.'); | |
| 359 | break; | |
| 360 | case CPU_INFO_NAME: return "M65CE02"; | |
| 361 | case CPU_INFO_FAMILY: return "CBM Semiconductor Group CSG 65CE02"; | |
| 362 | case CPU_INFO_VERSION: return "1.0beta"; | |
| 363 | case CPU_INFO_CREDITS: | |
| 364 | return "Copyright Juergen Buchmueller\n" | |
| 365 | "Copyright Peter Trauner\n" | |
| 366 | "all rights reserved."; | |
| 367 | case CPU_INFO_FILE: return __FILE__; | |
| 368 | case CPU_INFO_REG_LAYOUT: return (const char*)m65ce02_reg_layout; | |
| 369 | case CPU_INFO_WIN_LAYOUT: return (const char*)m65ce02_win_layout; | |
| 370 | } | |
| 371 | return buffer; | |
| 372 | } | |
| 300 | case CPUINFO_INT_INPUT_STATE+M65CE02_NMI_STATE: info->i = m65ce02.nmi_state; break; | |
| 301 | case CPUINFO_INT_INPUT_STATE+M65CE02_IRQ_STATE: info->i = m65ce02.irq_state; break; | |
| 373 | 302 | |
| 374 | unsigned int m65ce02_dasm(char *buffer, unsigned pc) | |
| 375 | { | |
| 303 | case CPUINFO_INT_PREVIOUSPC: info->i = m65ce02.ppc.w.l; break; | |
| 304 | ||
| 305 | case CPUINFO_INT_PC: info->i = PCD; break; | |
| 306 | case CPUINFO_INT_REGISTER+M65CE02_PC: info->i = m65ce02.pc.w.l; break; | |
| 307 | case CPUINFO_INT_SP: info->i = m65ce02.sp.b.l; break; | |
| 308 | case CPUINFO_INT_REGISTER+M65CE02_S: info->i = m65ce02.sp.w.l; break; | |
| 309 | case CPUINFO_INT_REGISTER+M65CE02_P: info->i = m65ce02.p; break; | |
| 310 | case CPUINFO_INT_REGISTER+M65CE02_A: info->i = m65ce02.a; break; | |
| 311 | case CPUINFO_INT_REGISTER+M65CE02_X: info->i = m65ce02.x; break; | |
| 312 | case CPUINFO_INT_REGISTER+M65CE02_Y: info->i = m65ce02.y; break; | |
| 313 | case CPUINFO_INT_REGISTER+M65CE02_Z: info->i = m65ce02.z; break; | |
| 314 | case CPUINFO_INT_REGISTER+M65CE02_B: info->i = m65ce02.zp.b.h; break; | |
| 315 | case CPUINFO_INT_REGISTER+M65CE02_EA: info->i = m65ce02.ea.w.l; break; | |
| 316 | case CPUINFO_INT_REGISTER+M65CE02_ZP: info->i = m65ce02.zp.w.l; break; | |
| 317 | ||
| 318 | /* --- the following bits of info are returned as pointers to data or functions --- */ | |
| 319 | case CPUINFO_PTR_SET_INFO: info->setinfo = m65ce02_set_info; break; | |
| 320 | case CPUINFO_PTR_GET_CONTEXT: info->getcontext = m65ce02_get_context; break; | |
| 321 | case CPUINFO_PTR_SET_CONTEXT: info->setcontext = m65ce02_set_context; break; | |
| 322 | case CPUINFO_PTR_INIT: info->init = m65ce02_init; break; | |
| 323 | case CPUINFO_PTR_RESET: info->reset = m65ce02_reset; break; | |
| 324 | case CPUINFO_PTR_EXIT: info->exit = m65ce02_exit; break; | |
| 325 | case CPUINFO_PTR_EXECUTE: info->execute = m65ce02_execute; break; | |
| 326 | case CPUINFO_PTR_BURN: info->burn = NULL; break; | |
| 376 | 327 | #ifdef ENABLE_DEBUGGER |
| 377 | return Dasm65ce02( buffer, pc ); | |
| 378 | #else | |
| 379 | sprintf( buffer, "$%02X", cpu_readop(pc) ); | |
| 380 | return 1; | |
| 328 | case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65ce02_dasm; break; | |
| 381 | 329 | #endif |
| 382 | } | |
| 330 | case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m65ce02_ICount; break; | |
| 331 | case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: info->f = (genf *) m65ce02.rdmem_id; break; | |
| 332 | case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: info->f = (genf *) m65ce02.wrmem_id; break; | |
| 383 | 333 | |
| 334 | /* --- the following bits of info are returned as NULL-terminated strings --- */ | |
| 335 | case CPUINFO_STR_NAME: strcpy(info->s, "M65CE02"); break; | |
| 336 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s,"CBM Semiconductor Group CSG 65CE02"); break; | |
| 337 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s,"1.0beta"); break; | |
| 338 | case CPUINFO_STR_CORE_FILE: strcpy(info->s,__FILE__); | |
| 339 | case CPUINFO_STR_CORE_CREDITS: | |
| 340 | strcpy(info->s, "Copyright Juergen Buchmueller\n" | |
| 341 | "Copyright Peter Trauner\n" | |
| 342 | "all rights reserved."); break; | |
| 343 | case CPUINFO_STR_FLAGS: | |
| 344 | sprintf(info->s, "%c%c%c%c%c%c%c%c", | |
| 345 | m65ce02.p & 0x80 ? 'N':'.', | |
| 346 | m65ce02.p & 0x40 ? 'V':'.', | |
| 347 | m65ce02.p & 0x20 ? 'E':'.', | |
| 348 | m65ce02.p & 0x10 ? 'B':'.', | |
| 349 | m65ce02.p & 0x08 ? 'D':'.', | |
| 350 | m65ce02.p & 0x04 ? 'I':'.', | |
| 351 | m65ce02.p & 0x02 ? 'Z':'.', | |
| 352 | m65ce02.p & 0x01 ? 'C':'.'); | |
| 353 | break; | |
| 384 | 354 | |
| 385 | ||
| 355 | case CPUINFO_STR_REGISTER + M65CE02_PC: sprintf(info->s, "PC:%04X", m65ce02.pc.w.l); break; | |
| 356 | case CPUINFO_STR_REGISTER + M65CE02_S: sprintf(info->s, "S:%02X", m65ce02.sp.b.l); break; | |
| 357 | case CPUINFO_STR_REGISTER + M65CE02_P: sprintf(info->s, "P:%02X", m65ce02.p); break; | |
| 358 | case CPUINFO_STR_REGISTER + M65CE02_A: sprintf(info->s, "A:%02X", m65ce02.a); break; | |
| 359 | case CPUINFO_STR_REGISTER + M65CE02_X: sprintf(info->s, "X:%02X", m65ce02.x); break; | |
| 360 | case CPUINFO_STR_REGISTER + M65CE02_Y: sprintf(info->s, "Y:%02X", m65ce02.y); break; | |
| 361 | case CPUINFO_STR_REGISTER + M65CE02_Z: sprintf(info->s, "Z:%02X", m65ce02.z); break; | |
| 362 | case CPUINFO_STR_REGISTER + M65CE02_B: sprintf(info->s, "B:%02X", m65ce02.zp.b.h); break; | |
| 363 | case CPUINFO_STR_REGISTER + M65CE02_EA: sprintf(info->s, "EA:%04X", m65ce02.ea.w.l); break; | |
| 364 | case CPUINFO_STR_REGISTER + M65CE02_ZP: sprintf(info->s, "ZP:%03X", m65ce02.zp.w.l); break; | |
| 365 | } | |
| 366 | } |
| r1679 | r1680 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | #define M65CE02_IRQ_LINE M6502_IRQ_LINE |
| 34 | 34 | |
| 35 | ||
| 35 | vo | |
| 36 | 36 | |
| 37 | extern void m65ce02_reset(void *param); | |
| 38 | extern void m65ce02_exit(void); | |
| 39 | extern int m65ce02_execute(int cycles); | |
| 40 | extern unsigned m65ce02_get_context (void *dst); | |
| 41 | extern void m65ce02_set_context (void *src); | |
| 42 | extern unsigned m65ce02_get_reg (int regnum); | |
| 43 | extern void m65ce02_set_reg (int regnum, unsigned val); | |
| 44 | extern void m65ce02_set_irq_line(int irqline, int state); | |
| 45 | extern void m65ce02_set_irq_callback(int (*callback)(int irqline)); | |
| 46 | extern void m65ce02_state_save(void *file); | |
| 47 | extern void m65ce02_state_load(void *file); | |
| 48 | extern const char *m65ce02_info(void *context, int regnum); | |
| 49 | extern unsigned m65ce02_dasm(char *buffer, unsigned pc); | |
| 50 | ||
| 51 | 37 | #ifdef ENABLE_DEBUGGER |
| 52 | extern unsigned | |
| 38 | extern unsigned | |
| 53 | 39 | #endif |
| 54 | 40 | |
| 55 | 41 | #endif /* _M65CE02_H */ |
| r1679 | r1680 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | /***********************************************************************/ |
| 68 | 68 | |
| 69 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 69 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 70 | 70 | static UINT16 ppc_read16_unaligned(UINT32 a) |
| 71 | 71 | { |
| 72 | 72 | return ((UINT16)ppc.read8(a+0) << 8) | ((UINT16)ppc.read8(a+1) << 0); |
| r1679 | r1680 | |
| 372 | 372 | |
| 373 | 373 | /***********************************************************************/ |
| 374 | 374 | |
| 375 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 375 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 376 | 376 | static int ppc_readop(UINT32 offset, int size, UINT64 *value) |
| 377 | 377 | { |
| 378 | 378 | if (!(ppc.msr & MSR_IR)) |
| r1679 | r1680 | |
|---|---|---|
| 1785 | 1785 | |
| 1786 | 1786 | |
| 1787 | 1787 | |
| 1788 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 1788 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 1789 | 1789 | static void ppc_lfs(UINT32 op) |
| 1790 | 1790 | { |
| 1791 | 1791 | UINT32 ea = SIMM16; |
| r1679 | r1680 | |
|---|---|---|
| 2714 | 2714 | |
| 2715 | 2715 | /* PowerPC 60x Recompilers */ |
| 2716 | 2716 | |
| 2717 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 2717 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240) | |
| 2718 | 2718 | static UINT32 recompile_lfs(drc_core *drc,UINT32 op) |
| 2719 | 2719 | { |
| 2720 | 2720 | emit_mov_m32_r32(DRCTOP, MABS(&ppc_icount), REG_EBP); |
| r1679 | r1680 | |
| 3798 | 3798 | { |
| 3799 | 3799 | return RECOMPILE_SUCCESSFUL_CP(1,4); |
| 3800 | 3800 | } |
| 3801 | #endif | |
| 3801 | 3802 | |
| 3803 | #if (HAS_PPC602||HAS_PPC604||HAS_MPC8240) | |
| 3802 | 3804 | static UINT32 recompile_tlbld(drc_core *drc, UINT32 op) |
| 3803 | 3805 | { |
| 3804 | 3806 | return RECOMPILE_SUCCESSFUL_CP(1,4); |
| r1679 | r1680 | |
|---|---|---|
| 2408 | 2408 | int max_delta = 0xfffff; |
| 2409 | 2409 | UINT16 frc; |
| 2410 | 2410 | |
| 2411 | timer_adjust(sh2.timer, attotime_never, 0 | |
| 2411 | timer_adjust_oneshot(sh2.timer, attotime_never, 0 | |
| 2412 | 2412 | |
| 2413 | 2413 | frc = sh2.frc; |
| 2414 | 2414 | if(!(sh2.m[4] & OCFA)) { |
| r1679 | r1680 | |
| 2434 | 2434 | if(divider) { |
| 2435 | 2435 | max_delta <<= divider; |
| 2436 | 2436 | sh2.frc_base = cpunum_gettotalcycles(sh2.cpu_number); |
| 2437 | timer_adjust(sh2.timer, ATTOTIME_IN_CYCLES(max_delta, sh2.cpu_number), sh2.cpu_number | |
| 2437 | timer_adjust_oneshot(sh2.timer, ATTOTIME_IN_CYCLES(max_delta, sh2.cpu_number), sh2.cpu_number | |
| 2438 | 2438 | } else { |
| 2439 | 2439 | logerror("SH2.%d: Timer event in %d cycles of external clock", sh2.cpu_number, max_delta); |
| 2440 | 2440 | } |
| r1679 | r1680 | |
| 2554 | 2554 | LOG(("SH2: DMA %d start %x, %x, %x, %04x, %d, %d, %d\n", dma, src, dst, count, sh2.m[0x63+4*dma], incs, incd, size)); |
| 2555 | 2555 | |
| 2556 | 2556 | sh2.dma_timer_active[dma] = 1; |
| 2557 | timer_adjust(sh2.dma_timer[dma], ATTOTIME_IN_CYCLES(2*count+1, sh2.cpu_number), (sh2.cpu_number<<1)|dma | |
| 2557 | timer_adjust_oneshot(sh2.dma_timer[dma], ATTOTIME_IN_CYCLES(2*count+1, sh2.cpu_number), (sh2.cpu_number<<1)|dma | |
| 2558 | 2558 | |
| 2559 | 2559 | src &= AM; |
| 2560 | 2560 | dst &= AM; |
| r1679 | r1680 | |
| 2633 | 2633 | if(sh2.dma_timer_active[dma]) |
| 2634 | 2634 | { |
| 2635 | 2635 | logerror("SH2: DMA %d cancelled in-flight", dma); |
| 2636 | timer_adjust(sh2.dma_timer[dma], attotime_never, 0 | |
| 2636 | timer_adjust_oneshot(sh2.dma_timer[dma], attotime_never, 0 | |
| 2637 | 2637 | sh2.dma_timer_active[dma] = 0; |
| 2638 | 2638 | } |
| 2639 | 2639 | } |
| r1679 | r1680 | |
| 2933 | 2933 | const struct sh2_config *conf = config; |
| 2934 | 2934 | |
| 2935 | 2935 | sh2.timer = timer_alloc(sh2_timer_callback, NULL); |
| 2936 | timer_adjust(sh2.timer, attotime_never, 0 | |
| 2936 | timer_adjust_oneshot(sh2.timer, attotime_never, 0 | |
| 2937 | 2937 | |
| 2938 | 2938 | sh2.dma_timer[0] = timer_alloc(sh2_dmac_callback, NULL); |
| 2939 | timer_adjust(sh2.dma_timer[0], attotime_never, 0 | |
| 2939 | timer_adjust_oneshot(sh2.dma_timer[0], attotime_never, 0 | |
| 2940 | 2940 | |
| 2941 | 2941 | sh2.dma_timer[1] = timer_alloc(sh2_dmac_callback, NULL); |
| 2942 | timer_adjust(sh2.dma_timer[1], attotime_never, 0 | |
| 2942 | timer_adjust_oneshot(sh2.dma_timer[1], attotime_never, 0 | |
| 2943 | 2943 | |
| 2944 | 2944 | sh2.m = auto_malloc(0x200); |
| 2945 | 2945 |
| r1679 | r1680 | |
|---|---|---|
| 97 | 97 | int is_slave, cpu_number; |
| 98 | 98 | int cpu_clock, bus_clock, pm_clock; |
| 99 | 99 | int fpu_sz, fpu_pr; |
| 100 | int ioport16_pullup, ioport16_direction; | |
| 101 | int ioport4_pullup, ioport4_direction; | |
| 100 | 102 | |
| 101 | 103 | void (*ftcsr_read_callback)(UINT32 data); |
| 102 | 104 | } SH4; |
| r1679 | r1680 | |
| 3517 | 3519 | sh4_default_exception_priorities(); |
| 3518 | 3520 | memset(sh4.exception_requesting, 0, sizeof(sh4.exception_requesting)); |
| 3519 | 3521 | |
| 3520 | timer_adjust(sh4.rtc_timer, ATTOTIME_IN_HZ(128), cpunum | |
| 3522 | timer_adjust_oneshot(sh4.rtc_timer, ATTOTIME_IN_HZ(128), cpunum | |
| 3521 | 3523 | sh4.m[RCR2] = 0x09; |
| 3522 | 3524 | sh4.m[TCOR0] = 0xffffffff; |
| 3523 | 3525 | sh4.m[TCNT0] = 0xffffffff; |
| r1679 | r1680 | |
| 3629 | 3631 | if (ticks < 0) |
| 3630 | 3632 | ticks = 256 + ticks; |
| 3631 | 3633 | //((double)rtcnt_div[(sh4.m[RTCSR] >> 3) & 7] / (double)100000000)*ticks |
| 3632 | timer_adjust(sh4.refresh_timer, attotime_mul(attotime_mul(ATTOTIME_IN_HZ(sh4.bus_clock), rtcnt_div[(sh4.m[RTCSR] >> 3) & 7]), ticks), sh4.cpu_number | |
| 3634 | timer_adjust_oneshot(sh4.refresh_timer, attotime_mul(attotime_mul(ATTOTIME_IN_HZ(sh4.bus_clock), rtcnt_div[(sh4.m[RTCSR] >> 3) & 7]), ticks), sh4.cpu_number | |
| 3633 | 3635 | sh4.refresh_timer_base = sh4.m[RTCNT]; |
| 3634 | 3636 | } |
| 3635 | 3637 | |
| r1679 | r1680 | |
| 3656 | 3658 | double ticks; |
| 3657 | 3659 | |
| 3658 | 3660 | ticks = sh4.m[TCNT0]; |
| 3659 | timer_adjust(sh4.timer0, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR0] & 7]), ticks), sh4.cpu_number | |
| 3661 | timer_adjust_oneshot(sh4.timer0, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR0] & 7]), ticks), sh4.cpu_number | |
| 3660 | 3662 | } |
| 3661 | 3663 | |
| 3662 | 3664 | static void sh4_timer1_recompute(void) |
| r1679 | r1680 | |
| 3664 | 3666 | double ticks; |
| 3665 | 3667 | |
| 3666 | 3668 | ticks = sh4.m[TCNT1]; |
| 3667 | timer_adjust(sh4.timer1, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR1] & 7]), ticks), sh4.cpu_number | |
| 3669 | timer_adjust_oneshot(sh4.timer1, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR1] & 7]), ticks), sh4.cpu_number | |
| 3668 | 3670 | } |
| 3669 | 3671 | |
| 3670 | 3672 | static void sh4_timer2_recompute(void) |
| r1679 | r1680 | |
| 3672 | 3674 | double ticks; |
| 3673 | 3675 | |
| 3674 | 3676 | ticks = sh4.m[TCNT2]; |
| 3675 | timer_adjust(sh4.timer2, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR2] & 7]), ticks), sh4.cpu_number | |
| 3677 | timer_adjust_oneshot(sh4.timer2, sh4_scale_up_mame_time(attotime_mul(ATTOTIME_IN_HZ(sh4.pm_clock), tcnt_div[sh4.m[TCR2] & 7]), ticks), sh4.cpu_number | |
| 3676 | 3678 | } |
| 3677 | 3679 | |
| 3678 | 3680 | static TIMER_CALLBACK( sh4_refresh_timer_callback ) |
| r1679 | r1680 | |
| 3742 | 3744 | sh4.m[RWKCNT] = 0; |
| 3743 | 3745 | } |
| 3744 | 3746 | |
| 3747 | days = 0; | |
| 3745 | 3748 | year = (sh4.m[RYRCNT] & 0xf) + ((sh4.m[RYRCNT] & 0xf0) >> 4)*10 + ((sh4.m[RYRCNT] & 0xf00) >> 8)*100 + ((sh4.m[RYRCNT] & 0xf000) >> 12)*1000; |
| 3746 | 3749 | leap = 0; |
| 3747 | 3750 | if (!(year%100)) |
| r1679 | r1680 | |
| 3753 | 3756 | leap = 1; |
| 3754 | 3757 | if (sh4.m[RMONCNT] != 2) |
| 3755 | 3758 | leap = 0; |
| 3756 | days = daysmonth[(sh4.m[RMONCNT] & 0xf) + ((sh4.m[RMONCNT] & 0xf0) >> 4)*10 - 1]; | |
| 3759 | if (sh4.m[RMONCNT]) | |
| 3760 | days = daysmonth[(sh4.m[RMONCNT] & 0xf) + ((sh4.m[RMONCNT] & 0xf0) >> 4)*10 - 1]; | |
| 3757 | 3761 | |
| 3758 | 3762 | sh4.m[RDAYCNT] = sh4.m[RDAYCNT] + carry; |
| 3759 | 3763 | if ((sh4.m[RDAYCNT] & 0xf) == 0xa) |
| r1679 | r1680 | |
| 3791 | 3795 | int cpunum = param; |
| 3792 | 3796 | |
| 3793 | 3797 | cpuintrf_push_context(cpunum); |
| 3794 | timer_adjust(sh4.rtc_timer, ATTOTIME_IN_HZ(128), cpunum | |
| 3798 | timer_adjust_oneshot(sh4.rtc_timer, ATTOTIME_IN_HZ(128), cpunum | |
| 3795 | 3799 | sh4.m[R64CNT] = (sh4.m[R64CNT]+1) & 0x7f; |
| 3796 | 3800 | if (sh4.m[R64CNT] == 64) |
| 3797 | 3801 | { |
| r1679 | r1680 | |
| 3903 | 3907 | if (timermode == 1) |
| 3904 | 3908 | { |
| 3905 | 3909 | sh4.dma_timer_active[channel] = 1; |
| 3906 | timer_adjust(sh4.dma_timer[channel], ATTOTIME_IN_CYCLES(2*count+1, sh4.cpu_number), (sh4.cpu_number << 8) | channel | |
| 3910 | timer_adjust_oneshot(sh4.dma_timer[channel], ATTOTIME_IN_CYCLES(2*count+1, sh4.cpu_number), (sh4.cpu_number << 8) | channel | |
| 3907 | 3911 | } |
| 3908 | 3912 | else if (timermode == 2) |
| 3909 | 3913 | { |
| 3910 | 3914 | sh4.dma_timer_active[channel] = 1; |
| 3911 | timer_adjust(sh4.dma_timer[channel], attotime_zero, (sh4.cpu_number << 8) | channel | |
| 3915 | timer_adjust_oneshot(sh4.dma_timer[channel], attotime_zero, (sh4.cpu_number << 8) | channel | |
| 3912 | 3916 | } |
| 3913 | 3917 | |
| 3914 | 3918 | src &= AM; |
| r1679 | r1680 | |
| 4051 | 4055 | if (sh4.dma_timer_active[channel]) |
| 4052 | 4056 | { |
| 4053 | 4057 | logerror("SH4: DMA %d cancelled in-flight but all data transferred", channel); |
| 4054 | timer_adjust(sh4.dma_timer[channel], attotime_never, 0 | |
| 4058 | timer_adjust_oneshot(sh4.dma_timer[channel], attotime_never, 0 | |
| 4055 | 4059 | sh4.dma_timer_active[channel] = 0; |
| 4056 | 4060 | } |
| 4057 | 4061 | } |
| r1679 | r1680 | |
| 4067 | 4071 | if (sh4.dma_timer_active[s]) |
| 4068 | 4072 | { |
| 4069 | 4073 | logerror("SH4: DMA %d cancelled due to NMI but all data transferred", s); |
| 4070 | timer_adjust(sh4.dma_timer[s], attotime_never, 0 | |
| 4074 | timer_adjust_oneshot(sh4.dma_timer[s], attotime_never, 0 | |
| 4071 | 4075 | sh4.dma_timer_active[s] = 0; |
| 4072 | 4076 | } |
| 4073 | 4077 | } |
| r1679 | r1680 | |
| 4075 | 4079 | |
| 4076 | 4080 | WRITE32_HANDLER( sh4_internal_w ) |
| 4077 | 4081 | { |
| 4082 | int a; | |
| 4078 | 4083 | UINT32 old = sh4.m[offset]; |
| 4079 | 4084 | COMBINE_DATA(sh4.m+offset); |
| 4080 | 4085 | |
| r1679 | r1680 | |
| 4093 | 4098 | } |
| 4094 | 4099 | else |
| 4095 | 4100 | { |
| 4096 | timer_adjust(sh4.refresh_timer, attotime_never, 0 | |
| 4101 | timer_adjust_oneshot(sh4.refresh_timer, attotime_never, 0 | |
| 4097 | 4102 | } |
| 4098 | 4103 | break; |
| 4099 | 4104 | |
| r1679 | r1680 | |
| 4139 | 4144 | } |
| 4140 | 4145 | if ((sh4.m[RCR2] & 8) && (~old & 8)) |
| 4141 | 4146 | { // 0 -> 1 |
| 4142 | timer_adjust(sh4.rtc_timer, ATTOTIME_IN_HZ(128), sh4.cpu_number | |
| 4147 | timer_adjust_oneshot(sh4.rtc_timer, ATTOTIME_IN_HZ(128), sh4.cpu_number | |
| 4143 | 4148 | } |
| 4144 | 4149 | else if (~(sh4.m[RCR2]) & 8) |
| 4145 | 4150 | { // 0 |
| 4146 | timer_adjust(sh4.rtc_timer, attotime_never, 0 | |
| 4151 | timer_adjust_oneshot(sh4.rtc_timer, attotime_never, 0 | |
| 4147 | 4152 | } |
| 4148 | 4153 | break; |
| 4149 | 4154 | |
| r1679 | r1680 | |
| 4152 | 4157 | if (old & 1) |
| 4153 | 4158 | sh4.m[TCNT0] = compute_ticks_timer(sh4.timer0, sh4.pm_clock, tcnt_div[sh4.m[TCR0] & 7]); |
| 4154 | 4159 | if ((sh4.m[TSTR] & 1) == 0) { |
| 4155 | timer_adjust(sh4.timer0, attotime_never, 0 | |
| 4160 | timer_adjust_oneshot(sh4.timer0, attotime_never, 0 | |
| 4156 | 4161 | } else |
| 4157 | 4162 | sh4_timer0_recompute(); |
| 4158 | 4163 | |
| 4159 | 4164 | if (old & 2) |
| 4160 | 4165 | sh4.m[TCNT1] = compute_ticks_timer(sh4.timer1, sh4.pm_clock, tcnt_div[sh4.m[TCR1] & 7]); |
| 4161 | 4166 | if ((sh4.m[TSTR] & 2) == 0) { |
| 4162 | timer_adjust(sh4.timer1, attotime_never, 0 | |
| 4167 | timer_adjust_oneshot(sh4.timer1, attotime_never, 0 | |
| 4163 | 4168 | } else |
| 4164 | 4169 | sh4_timer1_recompute(); |
| 4165 | 4170 | |
| 4166 | 4171 | if (old & 4) |
| 4167 | 4172 | sh4.m[TCNT2] = compute_ticks_timer(sh4.timer2, sh4.pm_clock, tcnt_div[sh4.m[TCR2] & 7]); |
| 4168 | 4173 | if ((sh4.m[TSTR] & 4) == 0) { |
| 4169 | timer_adjust(sh4.timer2, attotime_never, 0 | |
| 4174 | timer_adjust_oneshot(sh4.timer2, attotime_never, 0 | |
| 4170 | 4175 | } else |
| 4171 | 4176 | sh4_timer2_recompute(); |
| 4172 | 4177 | break; |
| r1679 | r1680 | |
| 4272 | 4277 | sh4_exception_recompute(); |
| 4273 | 4278 | break; |
| 4274 | 4279 | |
| 4275 | // DMA | |
| 4280 | // DMA | |
| 4276 | 4281 | case SAR0: |
| 4277 | 4282 | case SAR1: |
| 4278 | 4283 | case SAR2: |
| r1679 | r1680 | |
| 4314 | 4319 | case QACR1: |
| 4315 | 4320 | break; |
| 4316 | 4321 | |
| 4322 | // I/O ports | |
| 4323 | case PCTRA: | |
| 4324 | sh4.ioport16_pullup = 0; | |
| 4325 | sh4.ioport16_direction = 0; | |
| 4326 | for (a=0;a < 16;a++) { | |
| 4327 | sh4.ioport16_direction |= (sh4.m[PCTRA] & (1 << (a*2))) >> a; | |
| 4328 | sh4.ioport16_pullup |= (sh4.m[PCTRA] & (1 << (a*2+1))) >> (a+1); | |
| 4329 | } | |
| 4330 | sh4.ioport16_direction &= 0xffff; | |
| 4331 | sh4.ioport16_pullup = (sh4.ioport16_pullup | sh4.ioport16_direction) ^ 0xffff; | |
| 4332 | if (sh4.m[BCR2] & 1) | |
| 4333 | io_write_dword_64le(SH4_IOPORT_16, sh4.m[PDTRA] & sh4.ioport16_direction); | |
| 4334 | break; | |
| 4335 | case PDTRA: | |
| 4336 | if (sh4.m[BCR2] & 1) | |
| 4337 | io_write_dword_64le(SH4_IOPORT_16, sh4.m[PDTRA] & sh4.ioport16_direction); | |
| 4338 | break; | |
| 4339 | case PCTRB: | |
| 4340 | sh4.ioport4_pullup = 0; | |
| 4341 | sh4.ioport4_direction = 0; | |
| 4342 | for (a=0;a < 4;a++) { | |
| 4343 | sh4.ioport4_direction |= (sh4.m[PCTRB] & (1 << (a*2))) >> a; | |
| 4344 | sh4.ioport4_pullup |= (sh4.m[PCTRB] & (1 << (a*2+1))) >> (a+1); | |
| 4345 | } | |
| 4346 | sh4.ioport4_direction &= 0xf; | |
| 4347 | sh4.ioport4_pullup = (sh4.ioport4_pullup | sh4.ioport4_direction) ^ 0xf; | |
| 4348 | if (sh4.m[BCR2] & 1) | |
| 4349 | io_write_dword_64le(SH4_IOPORT_4, sh4.m[PDTRB] & sh4.ioport4_direction); | |
| 4350 | break; | |
| 4351 | case PDTRB: | |
| 4352 | if (sh4.m[BCR2] & 1) | |
| 4353 | io_write_dword_64le(SH4_IOPORT_4, sh4.m[PDTRB] & sh4.ioport4_direction); | |
| 4354 | break; | |
| 4355 | ||
| 4317 | 4356 | case SCBRR2: |
| 4318 | 4357 | break; |
| 4319 | 4358 | |
| r1679 | r1680 | |
| 4357 | 4396 | else |
| 4358 | 4397 | return sh4.m[TCNT2]; |
| 4359 | 4398 | break; |
| 4399 | ||
| 4400 | // I/O ports | |
| 4401 | case PDTRA: | |
| 4402 | if (sh4.m[BCR2] & 1) | |
| 4403 | return (io_read_dword_64le(SH4_IOPORT_16) & ~sh4.ioport16_direction) | (sh4.m[PDTRA] & sh4.ioport16_direction); | |
| 4404 | break; | |
| 4405 | case PDTRB: | |
| 4406 | if (sh4.m[BCR2] & 1) | |
| 4407 | return (io_read_dword_64le(SH4_IOPORT_4) & ~sh4.ioport4_direction) | (sh4.m[PDTRB] & sh4.ioport4_direction); | |
| 4408 | break; | |
| 4360 | 4409 | } |
| 4361 | 4410 | return sh4.m[offset]; |
| 4362 | 4411 | } |
| r1679 | r1680 | |
| 4539 | 4588 | const struct sh4_config *conf = config; |
| 4540 | 4589 | |
| 4541 | 4590 | sh4.timer0 = timer_alloc(sh4_timer0_callback, NULL); |
| 4542 | timer_adjust(sh4.timer0, attotime_never, 0 | |
| 4591 | timer_adjust_oneshot(sh4.timer0, attotime_never, 0 | |
| 4543 | 4592 | sh4.timer1 = timer_alloc(sh4_timer1_callback, NULL); |
| 4544 | timer_adjust(sh4.timer1, attotime_never, 0 | |
| 4593 | timer_adjust_oneshot(sh4.timer1, attotime_never, 0 | |
| 4545 | 4594 | sh4.timer2 = timer_alloc(sh4_timer2_callback, NULL); |
| 4546 | timer_adjust(sh4.timer2, attotime_never, 0 | |
| 4595 | timer_adjust_oneshot(sh4.timer2, attotime_never, 0 | |
| 4547 | 4596 | |
| 4548 | 4597 | sh4.dma_timer[0] = timer_alloc(sh4_dmac_callback, NULL); |
| 4549 | timer_adjust(sh4.dma_timer[0], attotime_never, 0 | |
| 4598 | timer_adjust_oneshot(sh4.dma_timer[0], attotime_never, 0 | |
| 4550 | 4599 | sh4.dma_timer[1] = timer_alloc(sh4_dmac_callback, NULL); |
| 4551 | timer_adjust(sh4.dma_timer[1], attotime_never, 0 | |
| 4600 | timer_adjust_oneshot(sh4.dma_timer[1], attotime_never, 0 | |
| 4552 | 4601 | sh4.dma_timer[2] = timer_alloc(sh4_dmac_callback, NULL); |
| 4553 | timer_adjust(sh4.dma_timer[2], attotime_never, 0 | |
| 4602 | timer_adjust_oneshot(sh4.dma_timer[2], attotime_never, 0 | |
| 4554 | 4603 | sh4.dma_timer[3] = timer_alloc(sh4_dmac_callback, NULL); |
| 4555 | timer_adjust(sh4.dma_timer[3], attotime_never, 0 | |
| 4604 | timer_adjust_oneshot(sh4.dma_timer[3], attotime_never, 0 | |
| 4556 | 4605 | |
| 4557 | 4606 | sh4.refresh_timer = timer_alloc(sh4_refresh_timer_callback, NULL); |
| 4558 | timer_adjust(sh4.refresh_timer, attotime_never, 0 | |
| 4607 | timer_adjust_oneshot(sh4.refresh_timer, attotime_never, 0 | |
| 4559 | 4608 | sh4.refresh_timer_base = 0; |
| 4560 | 4609 | |
| 4561 | 4610 | sh4.rtc_timer = timer_alloc(sh4_rtc_timer_callback, NULL); |
| 4562 | timer_adjust(sh4.rtc_timer, attotime_never, 0 | |
| 4611 | timer_adjust_oneshot(sh4.rtc_timer, attotime_never, 0 | |
| 4563 | 4612 | |
| 4564 | 4613 | sh4.m = auto_malloc(16384*4); |
| 4565 | 4614 | |
| r1679 | r1680 | |
| 4642 | 4691 | { |
| 4643 | 4692 | UINT32 chcr; |
| 4644 | 4693 | UINT32 *p32bits; |
| 4694 | UINT64 *p32bytes; | |
| 4645 | 4695 | UINT32 pos,len,siz; |
| 4646 | 4696 | |
| 4647 | 4697 | if (sh4.dma_timer_active[s->channel]) |
| r1679 | r1680 | |
| 4722 | 4772 | return; |
| 4723 | 4773 | sh4_dma_transfer(s->channel, 0, chcr, &s->source, &s->destination, &len); |
| 4724 | 4774 | } else { |
| 4725 | if ((s->direction) == 0) { | |
| 4726 | len = s->length; | |
| 4727 | p32bits = (UINT32 *)(s->buffer); | |
| 4728 | for (pos = 0;pos < len;pos++) { | |
| 4729 | *p32bits = program_read_dword_64le(s->source); | |
| 4730 | p32bits++; | |
| 4731 | s->source = s->source + 4; | |
| 4775 | if (s->size == 4) { | |
| 4776 | if ((s->direction) == 0) { | |
| 4777 | len = s->length; | |
| 4778 | p32bits = (UINT32 *)(s->buffer); | |
| 4779 | for (pos = 0;pos < len;pos++) { | |
| 4780 | *p32bits = program_read_dword_64le(s->source); | |
| 4781 | p32bits++; | |
| 4782 | s->source = s->source + 4; | |
| 4783 | } | |
| 4784 | } else { | |
| 4785 | len = s->length; | |
| 4786 | p32bits = (UINT32 *)(s->buffer); | |
| 4787 | for (pos = 0;pos < len;pos++) { | |
| 4788 | program_write_dword_64le(s->destination, *p32bits); | |
| 4789 | p32bits++; | |
| 4790 | s->destination = s->destination + 4; | |
| 4791 | } | |
| 4732 | 4792 | } |
| 4733 | } else { | |
| 4734 | len = s->length; | |
| 4735 | p32bits = (UINT32 *)(s->buffer); | |
| 4736 | for (pos = 0;pos < len;pos++) { | |
| 4737 | program_write_dword_64le(s->destination, *p32bits); | |
| 4738 | p32bits++; | |
| 4739 | s->destination = s->destination + 4; | |
| 4793 | } | |
| 4794 | if (s->size == 32) { | |
| 4795 | if ((s->direction) == 0) { | |
| 4796 | len = s->length * 4; | |
| 4797 | p32bytes = (UINT64 *)(s->buffer); | |
| 4798 | for (pos = 0;pos < len;pos++) { | |
| 4799 | #ifdef LSB_FIRST | |
| 4800 | *p32bytes = program_read_qword_64le(s->source); | |
| 4801 | #else | |
| 4802 | *p32bytes = program_read_qword_64be(s->source); | |
| 4803 | #endif | |
| 4804 | p32bytes++; | |
| 4805 | s->destination = s->destination + 8; | |
| 4806 | } | |
| 4807 | } else { | |
| 4808 | len = s->length * 4; | |
| 4809 | p32bytes = (UINT64 *)(s->buffer); | |
| 4810 | for (pos = 0;pos < len;pos++) { | |
| 4811 | #ifdef LSB_FIRST | |
| 4812 | program_write_qword_64le(s->destination, *p32bytes); | |
| 4813 | #else | |
| 4814 | program_write_qword_64be(s->destination, *p32bytes); | |
| 4815 | #endif | |
| 4816 | p32bytes++; | |
| 4817 | s->destination = s->destination + 8; | |
| 4818 | } | |
| 4740 | 4819 | } |
| 4741 | 4820 | } |
| 4742 | 4821 | } |
| r1679 | r1680 | |
| 4931 | 5010 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 4932 | 5011 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 4933 | 5012 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 4934 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 4935 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; | |
| 5013 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 64; break; | |
| 5014 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break; | |
| 4936 | 5015 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; |
| 4937 | 5016 | |
| 4938 | 5017 | case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = construct_map_sh4_internal_map; break; |
| r1679 | r1680 | |
|---|---|---|
| 54 | 54 | CPUINFO_PTR_SH4_EXTERNAL_DDT_DMA, |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | enum | |
| 58 | { | |
| 59 | SH4_IOPORT_16=8*0, | |
| 60 | SH4_IOPORT_4=8*1, | |
| 61 | // future use | |
| 62 | SH4_IOPORT_SCI=8*2, | |
| 63 | SH4_IOPORT_SCIF=8*3 | |
| 64 | }; | |
| 65 | ||
| 57 | 66 | struct sh4_config |
| 58 | 67 | { |
| 59 | 68 | int md2; |
| r1679 | r1680 | |
|---|---|---|
| 185 | 185 | UINT32 compare = mips->cpr[0][COP0_Compare]; |
| 186 | 186 | UINT32 cyclesleft = compare - count; |
| 187 | 187 | attotime newtime = ATTOTIME_IN_CYCLES(((INT64)cyclesleft * 2), cpu_getactivecpu()); |
| 188 | timer_adjust(mips->compare_int_timer, newtime, cpu_getactivecpu() | |
| 188 | timer_adjust_oneshot(mips->compare_int_timer, newtime, cpu_getactivecpu() | |
| 189 | 189 | } |
| 190 | 190 | else |
| 191 | timer_adjust(mips->compare_int_timer, attotime_never, cpu_getactivecpu() | |
| 191 | timer_adjust_oneshot(mips->compare_int_timer, attotime_never, cpu_getactivecpu() | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 |
| r1679 | r1680 | |
|---|---|---|
| 58 | 58 | { |
| 59 | 59 | attotime period = (value != 0xff) ? attotime_mul(ATTOTIME_IN_HZ(f3853.config.frequency), f3853_value_to_cycle[value]*31) : attotime_never; |
| 60 | 60 | |
| 61 | timer_adjust(f3853.timer, period, 0 | |
| 61 | timer_adjust_oneshot(f3853.timer, period, 0 | |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | static TIMER_CALLBACK( f3853_timer_callback ) |
| r1679 | r1680 | |
|---|---|---|
| 1815 | 1815 | */ |
| 1816 | 1816 | static void reset_decrementer(void) |
| 1817 | 1817 | { |
| 1818 | timer_adjust(I.timer, attotime_never, 0 | |
| 1818 | timer_adjust_oneshot(I.timer, attotime_never, 0 | |
| 1819 | 1819 | |
| 1820 | 1820 | /* reload count */ |
| 1821 | 1821 | I.decrementer_count = I.decrementer_interval; |
| r1679 | r1680 | |
| 1826 | 1826 | if (I.decrementer_enabled && ! (I.flag & 1)) |
| 1827 | 1827 | { /* timer */ |
| 1828 | 1828 | attotime period = ATTOTIME_IN_CYCLES(I.decrementer_interval * 16L, cpu_getactivecpu()); |
| 1829 | timer_adjust(I.timer, period, 0, period); | |
| 1829 | timer_adjust_periodic(I.timer, period, 0, period); | |
| 1830 | 1830 | } |
| 1831 | 1831 | } |
| 1832 | 1832 |
| r1679 | r1680 | |
|---|---|---|
| 322 | 322 | if( k == 0 ) /* Register shift by 0 is a no-op */ |
| 323 | 323 | { |
| 324 | 324 | // LOG(("%08x: NO-OP Regshift\n",R15)); |
| 325 | /* TODO this is wrong for at least ROR by reg with with lower | |
| 326 | * 5 bits 0 but lower 8 bits non zero */ | |
| 325 | 327 | if (pCarry) *pCarry = GET_CPSR & C_MASK; |
| 326 | 328 | return rm; |
| 327 | 329 | } |
| r1679 | r1680 | |
| 387 | 389 | if (k) |
| 388 | 390 | { |
| 389 | 391 | while (k > 32) k -= 32; |
| 390 | if (pCarry) *pCarry = rm & | |
| 392 | if (pCarry) *pCarry = rm & (1 << (k - 1)); | |
| 391 | 393 | return ROR(rm, k); |
| 392 | 394 | } |
| 393 | 395 | else |
| 394 | 396 | { |
| 397 | /* RRX */ | |
| 395 | 398 | if (pCarry) *pCarry = (rm & 1); |
| 396 | 399 | return LSR(rm, 1) | ((GET_CPSR & C_MASK) << 2); |
| 397 | 400 | } |
| r1679 | r1680 | |
| 408 | 411 | int i,result; |
| 409 | 412 | |
| 410 | 413 | result = 0; |
| 414 | rbv &= ~3; | |
| 411 | 415 | for( i=0; i<16; i++ ) |
| 412 | 416 | { |
| 413 | 417 | if( (pat>>i)&1 ) |
| r1679 | r1680 | |
| 431 | 435 | int i,result; |
| 432 | 436 | |
| 433 | 437 | result = 0; |
| 438 | rbv &= ~3; | |
| 434 | 439 | for( i=15; i>=0; i-- ) |
| 435 | 440 | { |
| 436 | 441 | if( (pat>>i)&1 ) |
| r1679 | r1680 | |
| 514 | 519 | |
| 515 | 520 | /* start up in SVC mode with interrupts disabled. */ |
| 516 | 521 | SwitchMode(eARM7_MODE_SVC); |
| 517 | SET_CPSR(GET_CPSR | I_MASK | F_MASK); | |
| 522 | SET_CPSR(GET_CPSR | I_MASK | F_MASK | 0x10); | |
| 518 | 523 | R15 = 0; |
| 519 | 524 | change_pc(R15); |
| 520 | 525 | } |
| r1679 | r1680 | |
| 544 | 549 | SwitchMode(eARM7_MODE_ABT); /* Set ABT mode so PC is saved to correct R14 bank */ |
| 545 | 550 | SET_REGISTER( 14, pc ); /* save PC to R14 */ |
| 546 | 551 | SET_REGISTER( SPSR, cpsr ); /* Save current CPSR */ |
| 552 | SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */ | |
| 547 | 553 | SET_CPSR(GET_CPSR & ~T_MASK); |
| 548 | 554 | R15 = 0x10; /* IRQ Vector address */ |
| 549 | 555 | change_pc(R15); |
| r1679 | r1680 | |
| 551 | 557 | return; |
| 552 | 558 | } |
| 553 | 559 | |
| 554 | //FI | |
| 560 | //FI | |
| 555 | 561 | if (ARM7.pendingFiq && (cpsr & F_MASK)==0) { |
| 556 | 562 | SwitchMode(eARM7_MODE_FIQ); /* Set FIQ mode so PC is saved to correct R14 bank */ |
| 557 | 563 | SET_REGISTER( 14, pc ); /* save PC to R14 */ |
| 558 | 564 | SET_REGISTER( SPSR, cpsr ); /* Save current CPSR */ |
| 559 | SET_CPSR(GET_CPSR | I_MASK | F_MASK); /* Mask both IRQ & FI | |
| 565 | SET_CPSR(GET_CPSR | I_MASK | F_MASK); /* Mask both IRQ & FI | |
| 560 | 566 | SET_CPSR(GET_CPSR & ~T_MASK); |
| 561 | 567 | R15 = 0x1c; /* IRQ Vector address */ |
| 562 | 568 | change_pc(R15); |
| r1679 | r1680 | |
| 580 | 586 | SwitchMode(eARM7_MODE_ABT); /* Set ABT mode so PC is saved to correct R14 bank */ |
| 581 | 587 | SET_REGISTER( 14, pc ); /* save PC to R14 */ |
| 582 | 588 | SET_REGISTER( SPSR, cpsr ); /* Save current CPSR */ |
| 589 | SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */ | |
| 583 | 590 | SET_CPSR(GET_CPSR & ~T_MASK); |
| 584 | 591 | R15 = 0x0c; /* IRQ Vector address */ |
| 585 | 592 | change_pc(R15); |
| r1679 | r1680 | |
| 592 | 599 | SwitchMode(eARM7_MODE_UND); /* Set UND mode so PC is saved to correct R14 bank */ |
| 593 | 600 | SET_REGISTER( 14, pc ); /* save PC to R14 */ |
| 594 | 601 | SET_REGISTER( SPSR, cpsr ); /* Save current CPSR */ |
| 602 | SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */ | |
| 595 | 603 | SET_CPSR(GET_CPSR & ~T_MASK); |
| 596 | 604 | R15 = 0x04; /* IRQ Vector address */ |
| 597 | 605 | change_pc(R15); |
| r1679 | r1680 | |
| 612 | 620 | SET_REGISTER( 14, pc ); /* save PC to R14 */ |
| 613 | 621 | } |
| 614 | 622 | SET_REGISTER( SPSR, cpsr ); /* Save current CPSR */ |
| 623 | SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */ | |
| 615 | 624 | SET_CPSR(GET_CPSR & ~T_MASK); /* Go to ARM mode */ |
| 616 | 625 | R15 = 0x08; /* Jump to the SWI vector */ |
| 617 | 626 | change_pc(R15); |
| r1679 | r1680 | |
| 845 | 854 | { |
| 846 | 855 | R15 = READ32(rnv); |
| 847 | 856 | R15 -= 4; |
| 848 | | |
| 857 | | |
| 849 | 858 | //LDR, PC takes 2S + 2N + 1I (5 total cycles) |
| 850 | 859 | ARM7_ICOUNT -= 2; |
| 851 | 860 | } |
| r1679 | r1680 | |
| 1126 | 1135 | //MSR ( bit 21 set ) - Copy value to CPSR/SPSR |
| 1127 | 1136 | if( (insn & 0x00200000) ) |
| 1128 | 1137 | { |
| 1129 | //MSR (register transfer)? | |
| 1130 | if(insn & 0x10000) | |
| 1131 | { | |
| 1132 | val = GET_REGISTER(insn & 0x0f); | |
| 1138 | //Immediate Value? | |
| 1139 | if(insn & INSN_I) { | |
| 1140 | //Value can be specified for a Right Rotate, 2x the value specified. | |
| 1141 | int by = (insn & INSN_OP2_ROTATE) >> INSN_OP2_ROTATE_SHIFT; | |
| 1142 | if (by) | |
| 1143 | val = ROR(insn & INSN_OP2_IMM, by << 1); | |
| 1144 | else | |
| 1145 | val = insn & INSN_OP2_IMM; | |
| 1133 | 1146 | } |
| 1134 | // | |
| 1147 | //V | |
| 1135 | 1148 | else |
| 1136 | { | |
| 1137 | //Immediate Value? | |
| 1138 | if(insn & INSN_I) { | |
| 1139 | //Value can be specified for a Right Rotate, 2x the value specified. | |
| 1140 | int by = (insn & INSN_OP2_ROTATE) >> INSN_OP2_ROTATE_SHIFT; | |
| 1141 | if (by) | |
| 1142 | val = ROR(insn & INSN_OP2_IMM, by << 1); | |
| 1143 | else | |
| 1144 | val = insn & INSN_OP2_IMM; | |
| 1145 | } | |
| 1146 | //Value from Register | |
| 1147 | else | |
| 1148 | { | |
| 1149 | val = GET_REGISTER(insn & 0x0f); | |
| 1150 | } | |
| 1149 | { | |
| 1150 | val = GET_REGISTER(insn & 0x0f); | |
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | 1153 | // apply field code bits |
| 1154 | 1154 | if (reg == eCPSR) |
| 1155 | 1155 | { |
| 1156 | if ( | |
| 1156 | if (oldmode != eARM7_MODE | |
| 1157 | 1157 | { |
| 1158 | 1158 | if (insn & 0x00010000) |
| 1159 | 1159 | { |
| r1679 | r1680 | |
| 1172 | 1172 | // status flags can be modified regardless of mode |
| 1173 | 1173 | if (insn & 0x00080000) |
| 1174 | 1174 | { |
| 1175 | newval = (newval & 0x00ffffff) | (val & 0xff000000); | |
| 1175 | // TODO for non ARMv5E mask should be 0xf0000000 (ie mask Q bit) | |
| 1176 | newval = (newval & 0x00ffffff) | (val & 0xf8000000); | |
| 1176 | 1177 | } |
| 1177 | 1178 | } |
| 1178 | 1179 | else // SPSR has stricter requirements |
| r1679 | r1680 | |
| 1193 | 1194 | } |
| 1194 | 1195 | if (insn & 0x00080000) |
| 1195 | 1196 | { |
| 1196 | newval = (newval & 0x00ffffff) | (val & 0xff000000); | |
| 1197 | // TODO for non ARMv5E mask should be 0xf0000000 (ie mask Q bit) | |
| 1198 | newval = (newval & 0x00ffffff) | (val & 0xf8000000); | |
| 1197 | 1199 | } |
| 1198 | 1200 | } |
| 1199 | 1201 | } |
| r1679 | r1680 | |
|---|---|---|
| 374 | 374 | } |
| 375 | 375 | else |
| 376 | 376 | { |
| 377 | if ((rrd>>(rs-1))&1) | |
| 377 | if ((rrd>>(rrs-1))&1) | |
| 378 | 378 | { |
| 379 | 379 | SET_CPSR(GET_CPSR | C_MASK); |
| 380 | 380 | } |
| r1679 | r1680 | |
| 926 | 926 | } |
| 927 | 927 | break; |
| 928 | 928 | case 0xc: /* Multiple Load/Store */ |
| 929 | if( insn & THUMB_MULTLS ) /* Load */ | |
| 930 | 929 | { |
| 930 | UINT32 ld_st_address; | |
| 931 | ||
| 931 | 932 | rd = ( insn & THUMB_MULTLS_BASE ) >> THUMB_MULTLS_BASE_SHIFT; |
| 932 | for( offs = 0; offs < 8; offs++ ) | |
| 933 | ld_st_address = GET_REGISTER(rd) & 0xfffffffc; | |
| 934 | ||
| 935 | if( insn & THUMB_MULTLS ) /* Load */ | |
| 933 | 936 | { |
| 934 | if( insn & ( 1 << offs ) ) | |
| 937 | int rd_in_list; | |
| 938 | ||
| 939 | rd_in_list = insn & (1 << rd); | |
| 940 | for( offs = 0; offs < 8; offs++ ) | |
| 935 | 941 | { |
| 936 | SET_REGISTER( offs, READ32( (GET_REGISTER(rd)&0xfffffffc) ) ); | |
| 937 | SET_REGISTER( rd, GET_REGISTER(rd) + 4 ); | |
| 942 | if( insn & ( 1 << offs ) ) | |
| 943 | { | |
| 944 | SET_REGISTER(offs, READ32(ld_st_address)); | |
| 945 | ld_st_address += 4; | |
| 946 | } | |
| 938 | 947 | } |
| 948 | if (!rd_in_list) | |
| 949 | SET_REGISTER(rd, ld_st_address); | |
| 950 | R15 += 2; | |
| 939 | 951 | } |
| 940 | R15 += 2; | |
| 941 | } | |
| 942 | else /* Store */ | |
| 943 | { | |
| 944 | rd = ( insn & THUMB_MULTLS_BASE ) >> THUMB_MULTLS_BASE_SHIFT; | |
| 945 | for( offs = 0; offs < 8; offs++ ) | |
| 952 | else /* Store */ | |
| 946 | 953 | { |
| 947 | | |
| 954 | | |
| 948 | 955 | { |
| 949 | WRITE32( (GET_REGISTER(rd)&0xfffffffc), GET_REGISTER(offs) ); | |
| 950 | SET_REGISTER( rd, GET_REGISTER(rd) + 4 ); | |
| 956 | if( insn & ( 1 << offs ) ) | |
| 957 | { | |
| 958 | WRITE32(ld_st_address, GET_REGISTER(offs)); | |
| 959 | ld_st_address += 4; | |
| 960 | } | |
| 951 | 961 | } |
| 962 | SET_REGISTER(rd, ld_st_address); | |
| 963 | R15 += 2; | |
| 952 | 964 | } |
| 953 | R15 += 2; | |
| 954 | 965 | } |
| 955 | 966 | break; |
| 956 | 967 | case 0xd: /* Conditional Branch */ |
| r1679 | r1680 | |
| 1268 | 1279 | if( (insn & 0x0c000000) ==0 ) //bits 27-26 == 00 - This check can only exist properly after Multiplication check above |
| 1269 | 1280 | { |
| 1270 | 1281 | /* PSR Transfer (MRS & MSR) */ |
| 1271 | if( ((insn&0x0100000)==0) && ((insn&0x01800000)==0x01000000) ) //( S bit must be clear, and bit 24,23 = 10 ) | |
| 1282 | if( ((insn&0x00100000)==0) && ((insn&0x01800000)==0x01000000) ) //( S bit must be clear, and bit 24,23 = 10 ) | |
| 1272 | 1283 | { |
| 1273 | 1284 | HandlePSRTransfer(insn); |
| 1274 | 1285 | ARM7_ICOUNT += 2; //PSR only takes 1 - S Cycle, so we add + 2, since at end, we -3.. |
| r1679 | r1680 | |
|---|---|---|
| 2528 | 2528 | { |
| 2529 | 2529 | int divisor = M6800_RMCR_SS[m6800.rmcr & M6800_RMCR_SS_MASK]; |
| 2530 | 2530 | |
| 2531 | timer_adjust(m6800_rx_timer, attotime_zero, cpu_getactivecpu(), ATTOTIME_IN_HZ(m6800.clock / divisor)); | |
| 2532 | timer_adjust(m6800_tx_timer, attotime_zero, cpu_getactivecpu(), ATTOTIME_IN_HZ(m6800.clock / divisor)); | |
| 2531 | timer_adjust_periodic(m6800_rx_timer, attotime_zero, cpu_getactivecpu(), ATTOTIME_IN_HZ(m6800.clock / divisor)); | |
| 2532 | timer_adjust_periodic(m6800_tx_timer, attotime_zero, cpu_getactivecpu(), ATTOTIME_IN_HZ(m6800.clock / divisor)); | |
| 2533 | 2533 | } |
| 2534 | 2534 | break; |
| 2535 | 2535 | } |
| r1679 | r1680 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | Motorola 6845 CRT controller emulation | |
| 4 | ||
| 5 | **********************************************************************/ | |
| 6 | ||
| 7 | #include "driver.h" | |
| 8 | #include "crtc6845.h" | |
| 9 | ||
| 10 | ||
| 11 | #define LOG (0) | |
| 12 | ||
| 13 | ||
| 14 | typedef struct _crtc6845_state crtc6845_state; | |
| 15 | ||
| 16 | struct _crtc6845_state | |
| 17 | { | |
| 18 | const crtc6845_interface *intf; | |
| 19 | ||
| 20 | /* internal registers */ | |
| 21 | UINT8 address_latch; | |
| 22 | UINT8 horiz_total; | |
| 23 | UINT8 horiz_disp; | |
| 24 | UINT8 horiz_sync_pos; | |
| 25 | UINT8 sync_width; | |
| 26 | UINT8 vert_total; | |
| 27 | UINT8 vert_total_adj; | |
| 28 | UINT8 vert_disp; | |
| 29 | UINT8 vert_sync_pos; | |
| 30 | UINT8 intl_skew; | |
| 31 | UINT8 max_ras_addr; | |
| 32 | UINT8 cursor_start_ras; | |
| 33 | UINT8 cursor_end_ras; | |
| 34 | UINT16 start_addr; | |
| 35 | UINT16 cursor; | |
| 36 | UINT16 light_pen; | |
| 37 | ||
| 38 | emu_timer *display_enable_changed_timer; | |
| 39 | ||
| 40 | /* saved screen parameters so we don't call | |
| 41 | video_screen_configure() unneccessarily. | |
| 42 | Do NOT state save these! */ | |
| 43 | UINT16 last_horiz_total; | |
| 44 | UINT16 last_vert_total; | |
| 45 | UINT16 last_max_x; | |
| 46 | UINT16 last_max_y; | |
| 47 | UINT16 current_ma; /* the MA address currently drawn */ | |
| 48 | int has_valid_parameters; | |
| 49 | }; | |
| 50 | ||
| 51 | static crtc6845_state crtc6845; | |
| 52 | ||
| 53 | ||
| 54 | static void crtc6845_state_save_postload(void *param); | |
| 55 | static void configure_screen(crtc6845_state *chip, int postload); | |
| 56 | static void update_timer(crtc6845_state *chip); | |
| 57 | static TIMER_CALLBACK( display_enable_changed_timer_cb ); | |
| 58 | ||
| 59 | ||
| 60 | void crtc6845_init(void) | |
| 61 | { | |
| 62 | crtc6845_state *chip = &crtc6845; | |
| 63 | int which = 0; | |
| 64 | ||
| 65 | state_save_register_func_postload_ptr(crtc6845_state_save_postload, chip); | |
| 66 | ||
| 67 | state_save_register_item("crtc6845", which, chip->address_latch); | |
| 68 | state_save_register_item("crtc6845", which, chip->horiz_total); | |
| 69 | state_save_register_item("crtc6845", which, chip->horiz_disp); | |
| 70 | state_save_register_item("crtc6845", which, chip->horiz_sync_pos); | |
| 71 | state_save_register_item("crtc6845", which, chip->sync_width); | |
| 72 | state_save_register_item("crtc6845", which, chip->vert_total); | |
| 73 | state_save_register_item("crtc6845", which, chip->vert_total_adj); | |
| 74 | state_save_register_item("crtc6845", which, chip->vert_disp); | |
| 75 | state_save_register_item("crtc6845", which, chip->vert_sync_pos); | |
| 76 | state_save_register_item("crtc6845", which, chip->intl_skew); | |
| 77 | state_save_register_item("crtc6845", which, chip->max_ras_addr); | |
| 78 | state_save_register_item("crtc6845", which, chip->cursor_start_ras); | |
| 79 | state_save_register_item("crtc6845", which, chip->cursor_end_ras); | |
| 80 | state_save_register_item("crtc6845", which, chip->start_addr); | |
| 81 | state_save_register_item("crtc6845", which, chip->cursor); | |
| 82 | state_save_register_item("crtc6845", which, chip->light_pen); | |
| 83 | ||
| 84 | /* do not configure the screen */ | |
| 85 | chip->intf = 0; | |
| 86 | chip->has_valid_parameters = FALSE; | |
| 87 | } | |
| 88 | ||
| 89 | ||
| 90 | void crtc6845_config(int which, const crtc6845_interface *intf) | |
| 91 | { | |
| 92 | crtc6845_state *chip = &crtc6845; | |
| 93 | ||
| 94 | memset(chip, 0, sizeof(*chip)); | |
| 95 | crtc6845_init(); | |
| 96 | ||
| 97 | chip->intf = intf; | |
| 98 | ||
| 99 | /* create the timer if the user is interested in getting display enable | |
| 100 | notifications */ | |
| 101 | if (intf->display_enable_changed) | |
| 102 | chip->display_enable_changed_timer = timer_alloc(display_enable_changed_timer_cb, chip); | |
| 103 | } | |
| 104 | ||
| 105 | ||
| 106 | static void crtc6845_state_save_postload(void *param) | |
| 107 | { | |
| 108 | crtc6845_state *chip = (crtc6845_state *)param; | |
| 109 | ||
| 110 | configure_screen(chip, TRUE); | |
| 111 | } | |
| 112 | ||
| 113 | ||
| 114 | READ8_HANDLER( crtc6845_register_r ) | |
| 115 | { | |
| 116 | crtc6845_state *chip = &crtc6845; | |
| 117 | ||
| 118 | UINT8 ret = 0xff; | |
| 119 | ||
| 120 | switch (chip->address_latch) | |
| 121 | { | |
| 122 | case 14: | |
| 123 | ret = chip->cursor >> 8; | |
| 124 | break; | |
| 125 | case 15: | |
| 126 | ret = chip->cursor; | |
| 127 | break; | |
| 128 | case 16: | |
| 129 | ret = chip->light_pen >> 8; | |
| 130 | break; | |
| 131 | case 17: | |
| 132 | ret = chip->light_pen; | |
| 133 | break; | |
| 134 | default: | |
| 135 | /* all other registers are write only */ | |
| 136 | break; | |
| 137 | } | |
| 138 | return ret; | |
| 139 | } | |
| 140 | ||
| 141 | ||
| 142 | WRITE8_HANDLER( crtc6845_address_w ) | |
| 143 | { | |
| 144 | crtc6845_state *chip = &crtc6845; | |
| 145 | ||
| 146 | chip->address_latch = data & 0x1f; | |
| 147 | } | |
| 148 | ||
| 149 | ||
| 150 | WRITE8_HANDLER( crtc6845_register_w ) | |
| 151 | { | |
| 152 | crtc6845_state *chip = &crtc6845; | |
| 153 | ||
| 154 | int call_configure_screen = FALSE; | |
| 155 | if (LOG) logerror("CRT #0 PC %04x: CRTC6845 reg 0x%02x = 0x%02x\n", activecpu_get_pc(), chip->address_latch, data); | |
| 156 | ||
| 157 | switch (chip->address_latch) | |
| 158 | { | |
| 159 | case 0: | |
| 160 | chip->horiz_total = data; | |
| 161 | call_configure_screen = TRUE; | |
| 162 | break; | |
| 163 | case 1: | |
| 164 | chip->horiz_disp = data; | |
| 165 | call_configure_screen = TRUE; | |
| 166 | break; | |
| 167 | case 2: | |
| 168 | chip->horiz_sync_pos = data; | |
| 169 | break; | |
| 170 | case 3: | |
| 171 | chip->sync_width = data & 0x0f; | |
| 172 | break; | |
| 173 | case 4: | |
| 174 | chip->vert_total = data & 0x7f; | |
| 175 | call_configure_screen = TRUE; | |
| 176 | break; | |
| 177 | case 5: | |
| 178 | chip->vert_total_adj = data & 0x1f; | |
| 179 | call_configure_screen = TRUE; | |
| 180 | break; | |
| 181 | case 6: | |
| 182 | chip->vert_disp = data & 0x7f; | |
| 183 | call_configure_screen = TRUE; | |
| 184 | break; | |
| 185 | case 7: | |
| 186 | chip->vert_sync_pos = data & 0x7f; | |
| 187 | break; | |
| 188 | case 8: | |
| 189 | chip->intl_skew = data & 0x03; | |
| 190 | break; | |
| 191 | case 9: | |
| 192 | chip->max_ras_addr = data & 0x1f; | |
| 193 | call_configure_screen = TRUE; | |
| 194 | break; | |
| 195 | case 10: | |
| 196 | chip->cursor_start_ras = data & 0x7f; | |
| 197 | break; | |
| 198 | case 11: | |
| 199 | chip->cursor_end_ras = data & 0x1f; | |
| 200 | break; | |
| 201 | case 12: | |
| 202 | chip->start_addr &= 0x00ff; | |
| 203 | chip->start_addr |= (data & 0x3f) << 8; | |
| 204 | call_configure_screen = TRUE; | |
| 205 | break; | |
| 206 | case 13: | |
| 207 | chip->start_addr &= 0xff00; | |
| 208 | chip->start_addr |= data; | |
| 209 | call_configure_screen = TRUE; | |
| 210 | break; | |
| 211 | case 14: | |
| 212 | chip->cursor &= 0x00ff; | |
| 213 | chip->cursor |= (data & 0x3f) << 8; | |
| 214 | break; | |
| 215 | case 15: | |
| 216 | chip->cursor &= 0xff00; | |
| 217 | chip->cursor |= data; | |
| 218 | break; | |
| 219 | case 16: /* read-only */ | |
| 220 | break; | |
| 221 | case 17: /* read-only */ | |
| 222 | break; | |
| 223 | default: | |
| 224 | break; | |
| 225 | } | |
| 226 | ||
| 227 | if (call_configure_screen) | |
| 228 | configure_screen(chip, FALSE); | |
| 229 | } | |
| 230 | ||
| 231 | ||
| 232 | static void configure_screen(crtc6845_state *chip, int postload) | |
| 233 | { | |
| 234 | if (chip->intf) | |
| 235 | { | |
| 236 | /* compute the screen sizes */ | |
| 237 | UINT16 horiz_total = (chip->horiz_total + 1) * chip->intf->hpixels_per_column; | |
| 238 | UINT16 vert_total = (chip->vert_total + 1) * (chip->max_ras_addr + 1) + chip->vert_total_adj; | |
| 239 | ||
| 240 | /* determine the visible area, avoid division by 0 */ | |
| 241 | UINT16 max_x = chip->horiz_disp * chip->intf->hpixels_per_column - 1; | |
| 242 | UINT16 max_y = chip->vert_disp * (chip->max_ras_addr + 1) - 1; | |
| 243 | ||
| 244 | /* update only if screen parameters changed, unless we are coming here after loading the saved state */ | |
| 245 | if (postload || | |
| 246 | (horiz_total != chip->last_horiz_total) || (vert_total != chip->last_vert_total) || | |
| 247 | (max_x != chip->last_max_x) || (max_y != chip->last_max_y)) | |
| 248 | { | |
| 249 | /* update the screen only if we have valid data */ | |
| 250 | if ((chip->horiz_total > 0) && (max_x < horiz_total) && (chip->vert_total > 0) && (max_y < vert_total)) | |
| 251 | { | |
| 252 | rectangle visarea; | |
| 253 | ||
| 254 | attoseconds_t refresh = HZ_TO_ATTOSECONDS(chip->intf->clock) * (chip->horiz_total + 1) * vert_total; | |
| 255 | ||
| 256 | visarea.min_x = 0; | |
| 257 | visarea.min_y = 0; | |
| 258 | visarea.max_x = max_x; | |
| 259 | visarea.max_y = max_y; | |
| 260 | ||
| 261 | if (LOG) logerror("CRTC6845 config screen: HTOTAL: %x VTOTAL: %x MAX_X: %x MAX_Y: %x FPS: %f\n", | |
| 262 | horiz_total, vert_total, max_x, max_y, 1 / ATTOSECONDS_TO_DOUBLE(refresh)); | |
| 263 | ||
| 264 | video_screen_configure(chip->intf->scrnum, horiz_total, vert_total, &visarea, refresh); | |
| 265 | ||
| 266 | chip->has_valid_parameters = TRUE; | |
| 267 | } | |
| 268 | else | |
| 269 | chip->has_valid_parameters = FALSE; | |
| 270 | ||
| 271 | chip->last_horiz_total = horiz_total; | |
| 272 | chip->last_vert_total = vert_total; | |
| 273 | chip->last_max_x = max_x; | |
| 274 | chip->last_max_y = max_y; | |
| 275 | ||
| 276 | update_timer(chip); | |
| 277 | } | |
| 278 | } | |
| 279 | } | |
| 280 | ||
| 281 | ||
| 282 | static int is_display_enabled(crtc6845_state *chip) | |
| 283 | { | |
| 284 | UINT16 y = video_screen_get_vpos(chip->intf->scrnum); | |
| 285 | UINT16 x = video_screen_get_hpos(chip->intf->scrnum); | |
| 286 | ||
| 287 | return (y <= chip->last_max_y) && (x <= chip->last_max_x); | |
| 288 | } | |
| 289 | ||
| 290 | ||
| 291 | static void update_timer(crtc6845_state *chip) | |
| 292 | { | |
| 293 | INT16 next_y; | |
| 294 | UINT16 next_x; | |
| 295 | attotime duration; | |
| 296 | ||
| 297 | if (chip->has_valid_parameters && (chip->display_enable_changed_timer != 0)) | |
| 298 | { | |
| 299 | if (is_display_enabled(chip)) | |
| 300 | { | |
| 301 | /* we are in a display region, | |
| 302 | get the location of the next blanking start */ | |
| 303 | ||
| 304 | /* normally, it's at end the current raster line */ | |
| 305 | next_y = video_screen_get_vpos(chip->intf->scrnum); | |
| 306 | next_x = chip->last_max_x + 1; | |
| 307 | ||
| 308 | /* but if visible width = horiz_total, then we need | |
| 309 | to go to the beginning of VBLANK */ | |
| 310 | if (next_x == chip->last_horiz_total) | |
| 311 | { | |
| 312 | next_y = chip->last_max_y + 1; | |
| 313 | next_x = 0; | |
| 314 | ||
| 315 | /* abnormal case, no vertical blanking, either */ | |
| 316 | if (next_y == chip->last_vert_total) | |
| 317 | next_y = -1; | |
| 318 | } | |
| 319 | } | |
| 320 | else | |
| 321 | { | |
| 322 | /* we are in a blanking region, | |
| 323 | get the location of the next display start */ | |
| 324 | next_x = 0; | |
| 325 | next_y = (video_screen_get_vpos(chip->intf->scrnum) + 1) % chip->last_vert_total; | |
| 326 | ||
| 327 | /* if we would now fall in the vertical blanking, we need | |
| 328 | to go to the top of the screen */ | |
| 329 | if (next_y > chip->last_max_y) | |
| 330 | next_y = 0; | |
| 331 | } | |
| 332 | ||
| 333 | if (next_y != -1) | |
| 334 | duration = video_screen_get_time_until_pos(chip->intf->scrnum, next_y, next_x); | |
| 335 | else | |
| 336 | duration = attotime_never; | |
| 337 | ||
| 338 | timer_adjust(chip->display_enable_changed_timer, duration, 0, attotime_never); | |
| 339 | } | |
| 340 | } | |
| 341 | ||
| 342 | ||
| 343 | static TIMER_CALLBACK( display_enable_changed_timer_cb ) | |
| 344 | { | |
| 345 | crtc6845_state *chip = ptr; | |
| 346 | ||
| 347 | /* call the callback function -- we know it exists */ | |
| 348 | chip->intf->display_enable_changed(is_display_enabled(chip)); | |
| 349 | ||
| 350 | update_timer(chip); | |
| 351 | } | |
| 352 | ||
| 353 | ||
| 354 | UINT16 crtc6845_get_ma(int which) | |
| 355 | { | |
| 356 | crtc6845_state *chip = &crtc6845; | |
| 357 | ||
| 358 | UINT16 ret; | |
| 359 | ||
| 360 | if (chip->has_valid_parameters) | |
| 361 | { | |
| 362 | /* get the current raster positions and clamp them to the visible region */ | |
| 363 | int y = video_screen_get_vpos(0); | |
| 364 | int x = video_screen_get_hpos(0); | |
| 365 | ||
| 366 | /* since the MA counter stops in the blanking regions, if we are in a | |
| 367 | VBLANK, both X and Y are at their max */ | |
| 368 | if ((y > chip->last_max_y) || (x > chip->last_max_x)) | |
| 369 | x = chip->last_max_x; | |
| 370 | ||
| 371 | if (y > chip->last_max_y) | |
| 372 | y = chip->last_max_y; | |
| 373 | ||
| 374 | ret = (chip->start_addr + | |
| 375 | (y / (chip->max_ras_addr + 1)) * chip->horiz_disp + | |
| 376 | (x / chip->intf->hpixels_per_column)) & 0x3fff; | |
| 377 | } | |
| 378 | else | |
| 379 | ret = 0; | |
| 380 | ||
| 381 | return ret; | |
| 382 | } | |
| 383 | ||
| 384 | ||
| 385 | UINT8 crtc6845_get_ra(int which) | |
| 386 | { | |
| 387 | crtc6845_state *chip = &crtc6845; | |
| 388 | ||
| 389 | UINT8 ret; | |
| 390 | ||
| 391 | if (chip->has_valid_parameters) | |
| 392 | { | |
| 393 | /* get the current vertical raster position and clamp it to the visible region */ | |
| 394 | int y = video_screen_get_vpos(0); | |
| 395 | ||
| 396 | if (y > chip->last_max_y) | |
| 397 | y = chip->last_max_y; | |
| 398 | ||
| 399 | ret = y % (chip->max_ras_addr + 1); | |
| 400 | } | |
| 401 | else | |
| 402 | ret = 0; | |
| 403 | ||
| 404 | return ret; | |
| 405 | } | |
| 406 | ||
| 407 | ||
| 408 | VIDEO_UPDATE( crtc6845 ) | |
| 409 | { | |
| 410 | crtc6845_state *chip = &crtc6845; | |
| 411 | ||
| 412 | if (chip->has_valid_parameters) | |
| 413 | { | |
| 414 | UINT16 y; | |
| 415 | ||
| 416 | /* call the set up function if any */ | |
| 417 | void *param = 0; | |
| 418 | ||
| 419 | if (chip->intf->begin_update) | |
| 420 | param = chip->intf->begin_update(machine, screen, bitmap, cliprect); | |
| 421 | ||
| 422 | /* read the start address at the beginning of the frame */ | |
| 423 | if (cliprect->min_y == 0) | |
| 424 | chip->current_ma = chip->start_addr; | |
| 425 | ||
| 426 | /* for each row in the visible region */ | |
| 427 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 428 | { | |
| 429 | UINT8 ra = y % (chip->max_ras_addr + 1); | |
| 430 | ||
| 431 | /* call the external system to draw it */ | |
| 432 | chip->intf->update_row(bitmap, cliprect, chip->current_ma, ra, y, chip->horiz_disp, param); | |
| 433 | ||
| 434 | /* update MA if the last raster address */ | |
| 435 | if (ra == chip->max_ras_addr) | |
| 436 | chip->current_ma = (chip->current_ma + chip->horiz_disp) & 0x3fff; | |
| 437 | } | |
| 438 | ||
| 439 | /* call the tear down function if any */ | |
| 440 | if (chip->intf->end_update) | |
| 441 | chip->intf->end_update(bitmap, cliprect, param); | |
| 442 | } | |
| 443 | ||
| 444 | return 0; | |
| 445 | } |
| r1679 | r1680 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | Motorola 6845 CRT controller emulation | |
| 4 | ||
| 5 | **********************************************************************/ | |
| 6 | ||
| 7 | ||
| 8 | typedef struct _crtc6845_interface crtc6845_interface; | |
| 9 | struct _crtc6845_interface | |
| 10 | { | |
| 11 | int scrnum; /* screen we are acting on */ | |
| 12 | int clock; /* the clock (pin 21) of the chip */ | |
| 13 | int hpixels_per_column; /* number of pixels per video memory address */ | |
| 14 | ||
| 15 | /* if specified, this gets called before any pixel update, | |
| 16 | optionally return a pointer that will be passed to the | |
| 17 | update and tear down callbacks */ | |
| 18 | void * (*begin_update)(running_machine *machine, int screen, | |
| 19 | mame_bitmap *bitmap, const rectangle *cliprect); | |
| 20 | ||
| 21 | /* this gets called for every row, the driver must output | |
| 22 | x_count * hpixels_per_column pixels */ | |
| 23 | void (*update_row)(mame_bitmap *bitmap, const rectangle *cliprect, | |
| 24 | UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, void *param); | |
| 25 | ||
| 26 | /* if specified, this gets called after all row updating is complete */ | |
| 27 | void (*end_update)(mame_bitmap *bitmap, const rectangle *cliprect, void *param); | |
| 28 | ||
| 29 | /* if specified, this gets called for every change of the disply enable (DT pin 18) */ | |
| 30 | void (*display_enable_changed)(int display_enabled); | |
| 31 | }; | |
| 32 | ||
| 33 | ||
| 34 | /* Deprectated - use crtc6845_init to set up for save states only, but not to configure the screen */ | |
| 35 | void crtc6845_init(void); | |
| 36 | ||
| 37 | /* use crtc6845_init to set up for save states AND to configure the screen | |
| 38 | the 'which' argument is currently a dummy as only one instance is supported */ | |
| 39 | void crtc6845_config(int which, const crtc6845_interface *intf); | |
| 40 | ||
| 41 | /* selects one of the registers for reading or writing */ | |
| 42 | WRITE8_HANDLER( crtc6845_address_w ); | |
| 43 | #define crtc6845_0_address_w crtc6845_address_w | |
| 44 | ||
| 45 | /* reads the currently selected register */ | |
| 46 | READ8_HANDLER( crtc6845_register_r ); | |
| 47 | #define crtc6845_0_register_r crtc6845_register_r | |
| 48 | ||
| 49 | /* writes the currently selected register */ | |
| 50 | WRITE8_HANDLER( crtc6845_register_w ); | |
| 51 | #define crtc6845_0_register_w crtc6845_register_w | |
| 52 | ||
| 53 | /* return the current value on the MA0-MA13 pins */ | |
| 54 | UINT16 crtc6845_get_ma(int which); | |
| 55 | ||
| 56 | /* return the current value on the RA0-RA4 pins */ | |
| 57 | UINT8 crtc6845_get_ra(int which); | |
| 58 | ||
| 59 | /* updates the screen -- this will call begin_update(), | |
| 60 | followed by update_row() reapeatedly and after all row | |
| 61 | updating is complete, end_update() */ | |
| 62 | VIDEO_UPDATE( crtc6845 ); |
| r1679 | r1680 | |
|---|---|---|
| 147 | 147 | static TIMER_CALLBACK( tms34061_interrupt ) |
| 148 | 148 | { |
| 149 | 149 | /* set timer for next frame */ |
| 150 | timer_adjust(tms34061.timer, video_screen_get_frame_period(tms34061.intf.scrnum), 0 | |
| 150 | timer_adjust_oneshot(tms34061.timer, video_screen_get_frame_period(tms34061.intf.scrnum), 0 | |
| 151 | 151 | |
| 152 | 152 | /* set the interrupt bit in the status reg */ |
| 153 | 153 | tms34061.regs[TMS34061_STATUS] |= 1; |
| r1679 | r1680 | |
| 193 | 193 | if (scanline < 0) |
| 194 | 194 | scanline += tms34061.regs[TMS34061_VERTOTAL]; |
| 195 | 195 | |
| 196 | timer_adjust(tms34061.timer, video_screen_get_time_until_pos(tms34061.intf.scrnum, scanline, tms34061.regs[TMS34061_HORSTARTBLNK]), 0 | |
| 196 | timer_adjust_oneshot(tms34061.timer, video_screen_get_time_until_pos(tms34061.intf.scrnum, scanline, tms34061.regs[TMS34061_HORSTARTBLNK]), 0 | |
| 197 | 197 | break; |
| 198 | 198 | |
| 199 | 199 | /* XY offset: set the X and Y masks */ |
| r1679 | r1680 | |
|---|---|---|
| 1087 | 1087 | /* if zero, adjust to next frame, otherwise we may get stuck in an infinite loop */ |
| 1088 | 1088 | if (attotime_compare(vblank_period, attotime_zero) == 0) |
| 1089 | 1089 | vblank_period = video_screen_get_frame_period(v->scrnum); |
| 1090 | timer_adjust(v->fbi.vblank_timer, vblank_period, 0 | |
| 1090 | timer_adjust_oneshot(v->fbi.vblank_timer, vblank_period, 0 | |
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | 1093 | |
| r1679 | r1680 | |
| 2194 | 2194 | /* if not, set a timer for the next one */ |
| 2195 | 2195 | else |
| 2196 | 2196 | { |
| 2197 | timer_adjust(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0 | |
| 2197 | timer_adjust_oneshot(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0 | |
| 2198 | 2198 | } |
| 2199 | 2199 | } |
| 2200 | 2200 | |
| r1679 | r1680 | |
| 2215 | 2215 | cpu_spinuntil_trigger(v->trigger); |
| 2216 | 2216 | |
| 2217 | 2217 | /* set a timer to clear the stall */ |
| 2218 | timer_adjust(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0 | |
| 2218 | timer_adjust_oneshot(v->pci.continue_timer, attotime_sub(v->pci.op_end_time, current_time), 0 | |
| 2219 | 2219 | } |
| 2220 | 2220 | |
| 2221 | 2221 |
| r1679 | r1680 | |
|---|---|---|
| 1 | /************************************************************* | |
| 2 | * * | |
| 3 | * Signetics 2636 video chip * | |
| 4 | * * | |
| 5 | ************************************************************* | |
| 1 | /********************************************************************** | |
| 6 | 2 | |
| 7 | PVI REGISTER DESCRIPTION | |
| 8 | ------------------------ | |
| 3 | Signetics 2636 video chip | |
| 9 | 4 | |
| 10 | | bit |R/W| description | |
| 11 | byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | |
| 12 | | | | | |
| 13 | FC0 | size 4| size 3| size 2| size 1| W | size of the 4 objects(=sprites) | |
| 14 | | | | | |
| 15 | FC1 | |C1 |C2 |C3 |C1 |C2 |C3 | W | colours of the 4 objects | |
| 16 | | | colour 1 | colour 2 | | | |
| 17 | FC2 | |C1 |C2 |C3 |C1 |C2 |C3 | W | | |
| 18 | | | colour 3 | colour 4 | | | |
| 19 | | | | | |
| 20 | FC3 | |sh |pos| W | 1=shape 0=position | |
| 21 | | | | display format and position | |
| 22 | FC4 | (free) | | | |
| 23 | FC5 | (free) | | | |
| 24 | | | | | |
| 25 | FC6 | |C1 |C2 |C3 |BG |scrn colr | W | background lock and colour | |
| 26 | | |backg colr |enb|C1 |C2 |C3 | | 3="enable" | |
| 27 | | | | | |
| 28 | FC7 | sound | W | squarewave output | |
| 29 | | | | | |
| 30 | FC8 | N1 | N2 | W | range of the 4 display digits | |
| 31 | FC9 | N3 | N4 | W | | |
| 32 | | | | | |
| 33 | |obj/backgrnd |complete object| R | | |
| 34 | FCA | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | | | |
| 35 | | | | | |
| 36 | FCB | |VR-| object collisions | R | Composition of object and back- | |
| 37 | | |LE |1/2|1/3|1/3|1/4|2/4|3/4| | ground,collision detection and | |
| 38 | | | | object display as a state display | |
| 39 | | | | for the status register.Set VRLE. | |
| 40 | | | | wait for VRST.Read out or transmit | |
| 41 | | | | [copy?] all bits until reset by | |
| 42 | | | | VRST. | |
| 43 | | | | | |
| 44 | FCC | PORT1 | R | PORT1 and PORT2 for the range of | |
| 45 | FCD | PORT2 | | the A/D conversion.Cleared by VRST | |
| 46 | FCE | (free) | | | |
| 47 | FCF | (free) | | | |
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 48 | 7 | |
| 49 | 8 | |
| 50 | Size control by byte FC0 | |
| 9 | PVI REGISTER DESCRIPTION | |
| 10 | ------------------------ | |
| 51 | 11 | |
| 52 | bit matrix | |
| 53 | |0|0| 8x10 | |
| 54 | |0|1| 16x20 | |
| 55 | |1|0| 32x40 | |
| 56 | |1|1| 64x80 | |
| 12 | | bit |R/W| description | |
| 13 | byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | |
| 14 | | | | | |
| 15 | FC0 | size 4| size 3| size 2| size 1| W | size of the 4 objects(=sprites) | |
| 16 | | | | | |
| 17 | FC1 | |C1 |C2 |C3 |C1 |C2 |C3 | W | colors of the 4 objects | |
| 18 | | | color 1 | color 2 | | | |
| 19 | FC2 | |C1 |C2 |C3 |C1 |C2 |C3 | W | | |
| 20 | | | color 3 | color 4 | | | |
| 21 | | | | | |
| 22 | FC3 | |sh |pos| W | 1=shape 0=position | |
| 23 | | | | display format and position | |
| 24 | FC4 | (free) | | | |
| 25 | FC5 | (free) | | | |
| 26 | | | | | |
| 27 | FC6 | |C1 |C2 |C3 |BG |scrn colr | W | background lock and color | |
| 28 | | |backg colr |enb|C1 |C2 |C3 | | 3="enable" | |
| 29 | | | | | |
| 30 | FC7 | sound | W | squarewave output | |
| 31 | | | | | |
| 32 | FC8 | N1 | N2 | W | range of the 4 display digits | |
| 33 | FC9 | N3 | N4 | W | | |
| 34 | | | | | |
| 35 | |obj/backgrnd |complete object| R | | |
| 36 | FCA | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | | | |
| 37 | | | | | |
| 38 | FCB | |VR-| object collisions | R | Composition of object and back- | |
| 39 | | |LE |1/2|1/3|1/3|1/4|2/4|3/4| | ground,collision detection and | |
| 40 | | | | object display as a state display | |
| 41 | | | | for the status register.Set VRLE. | |
| 42 | | | | wait for VRST.Read out or transmit | |
| 43 | | | | [copy?] all bits until reset by | |
| 44 | | | | VRST. | |
| 45 | | | | | |
| 46 | FCC | PORT1 | R | PORT1 and PORT2 for the range of | |
| 47 | FCD | PORT2 | | the A/D conversion.Cleared by VRST | |
| 48 | FCE | (free) | | | |
| 49 | FCF | (free) | | | |
| 57 | 50 | |
| 58 | CE1 and not-CE2 are outputs from the PVI.$E80..$EFF also controls the | |
| 59 | analogue multiplexer. | |
| 60 | 51 | |
| 52 | Size control by byte FC0 | |
| 61 | 53 | |
| 62 | SPRITES | |
| 63 | ------- | |
| 54 | bit matrix | |
| 55 | |0|0| 8x10 | |
| 56 | |0|1| 16x20 | |
| 57 | |1|0| 32x40 | |
| 58 | |1|1| 64x80 | |
| 64 | 59 | |
| 65 | each object field: (=sprite data structure) | |
| 60 | CE1 and not-CE2 are outputs from the PVI.$E80..$EFF also controls the | |
| 61 | analog multiplexer. | |
| 66 | 62 | |
| 67 | 0 \ 10 bytes of bitmap (Each object is 8 pixels wide.) | |
| 68 | 9 / | |
| 69 | A HC horizontal object coordinate | |
| 70 | B HCB horizontal dublicate coordinate | |
| 71 | C VC vertical object coordinate | |
| 72 | D VCB vertical dublicate coordinate | |
| 73 | 63 | |
| 74 | *************************************************************/ | |
| 64 | SPRITES | |
| 65 | ------- | |
| 75 | 66 | |
| 67 | each object field: (=sprite data structure) | |
| 68 | ||
| 69 | 0 \ 10 bytes of bitmap (Each object is 8 pixels wide.) | |
| 70 | 9 / | |
| 71 | A HC horizontal object coordinate | |
| 72 | B HCB horizontal duplicate coordinate | |
| 73 | C VC vertical object coordinate | |
| 74 | D VCB vertical duplicate coordinate | |
| 75 | ||
| 76 | *************************************************************/ | |
| 77 | ||
| 76 | 78 | #include "driver.h" |
| 77 | 79 | #include "s2636.h" |
| 78 | 80 | |
| 79 | static const int sprite_offsets[4] = { 0x00, 0x10, 0x20, 0x40}; | |
| 80 | 81 | |
| 81 | /* To adjust sprites against bitmap */ | |
| 82 | 82 | |
| 83 | UINT8 *s2636_1_ram; | |
| 84 | UINT8 *s2636_2_ram; | |
| 85 | UINT8 *s2636_3_ram; | |
| 83 | /************************************* | |
| 84 | * | |
| 85 | * Constants | |
| 86 | * | |
| 87 | *************************************/ | |
| 86 | 88 | |
| 87 | mame_bitmap *s2636_1_bitmap; | |
| 88 | mame_bitmap *s2636_2_bitmap; | |
| 89 | mame_bitmap *s2636_3_bitmap; | |
| 89 | #define SPRITE_WIDTH (8) | |
| 90 | #define SPRITE_HEIGHT (10) | |
| 90 | 91 | |
| 91 | int s2636_x_offset; | |
| 92 | int s2636_y_offset; | |
| 92 | static const int sprite_offsets[4] = { 0x00, 0x10, 0x20, 0x40 }; | |
| 93 | 93 | |
| 94 | const gfx_layout s2636_gfx_layout = | |
| 94 | ||
| 95 | ||
| 96 | /************************************* | |
| 97 | * | |
| 98 | * Internal S2636 data structure | |
| 99 | * | |
| 100 | *************************************/ | |
| 101 | ||
| 102 | struct _s2636_t | |
| 95 | 103 | { |
| 96 | 8,10, | |
| 97 | 5, | |
| 98 | 1, | |
| 99 | { 0 }, | |
| 100 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 101 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 }, | |
| 102 | 8*16 | |
| 104 | UINT8 *work_ram; | |
| 105 | int y_offset; | |
| 106 | int x_offset; | |
| 107 | ||
| 108 | mame_bitmap *bitmap; | |
| 109 | mame_bitmap *collision_bitmap; | |
| 103 | 110 | }; |
| 104 | 111 | |
| 105 | 112 | |
| 106 | /*****************************************/ | |
| 107 | /* Check for Collision between 2 sprites */ | |
| 108 | /*****************************************/ | |
| 109 | 113 | |
| 110 | static int SpriteCheck(running_machine *machine, int first,int second,UINT8 *workram,int Graphics_Bank,mame_bitmap *collision_bitmap) | |
| 114 | /************************************* | |
| 115 | * | |
| 116 | * Configuration | |
| 117 | * | |
| 118 | *************************************/ | |
| 119 | ||
| 120 | s2636_t *s2636_config(UINT8 *work_ram, int screen_height, int screen_width, int y_offset, int x_offset) | |
| 111 | 121 | { |
| 112 | int Checksum=0; | |
| 113 | int x,y; | |
| 122 | s2636_t *s2636; | |
| 114 | 123 | |
| 115 | // Does not check shadow sprites yet | |
| 124 | /* allocate the object that holds the state */ | |
| 125 | s2636 = auto_malloc(sizeof(*s2636)); | |
| 116 | 126 | |
| 117 | if((workram[sprite_offsets[first] + 10] != 0xff) && (workram[sprite_offsets[second] + 10] != 0xff)) | |
| 118 | { | |
| 119 | int fx1 = workram[sprite_offsets[first] + 10] + s2636_x_offset; | |
| 120 | int fy1 = workram[sprite_offsets[first] + 12] + s2636_y_offset; | |
| 121 | int fx2 = workram[sprite_offsets[second] + 10] + s2636_x_offset; | |
| 122 | int fy2 = workram[sprite_offsets[second] + 12] + s2636_y_offset; | |
| 127 | s2636->work_ram = work_ram; | |
| 128 | s2636->y_offset = y_offset; | |
| 129 | s2636->x_offset = x_offset; | |
| 123 | 130 | |
| 124 | if((fx1>=0) && (fy1>=0) && (fx2>=0) && (fy2>=0)) | |
| 131 | s2636->bitmap = auto_bitmap_alloc(screen_width, screen_height, BITMAP_FORMAT_INDEXED8); | |
| 132 | s2636->collision_bitmap = auto_bitmap_alloc(screen_width, screen_height, BITMAP_FORMAT_INDEXED8); | |
| 133 | ||
| 134 | return s2636; | |
| 135 | } | |
| 136 | ||
| 137 | ||
| 138 | ||
| 139 | /************************************* | |
| 140 | * | |
| 141 | * Draw a sprite | |
| 142 | * | |
| 143 | *************************************/ | |
| 144 | ||
| 145 | static void draw_sprite(UINT8 *gfx, int color, int y, int x, int expand, | |
| 146 | int or_mode, mame_bitmap *bitmap, const rectangle *cliprect) | |
| 147 | { | |
| 148 | int sy; | |
| 149 | ||
| 150 | /* for each row */ | |
| 151 | for (sy = 0; sy < SPRITE_HEIGHT; sy++) | |
| 152 | { | |
| 153 | int sx; | |
| 154 | ||
| 155 | /* for each pixel on the row */ | |
| 156 | for (sx = 0; sx < SPRITE_WIDTH; sx++) | |
| 125 | 157 | { |
| 126 | int expand1 = 1 << (16+((workram[0xC0]>>(first<<1)) & 3)); | |
| 127 | int expand2 = 1 << (16+((workram[0xC0]>>(second<<1)) & 3)); | |
| 158 | int ey; | |
| 128 | 159 | |
| 129 | int char1 = sprite_offsets[first]>>4; | |
| 130 | int char2 = sprite_offsets[second]>>4; | |
| 160 | /* each pixel can be expanded */ | |
| 161 | for (ey = 0; ey <= expand; ey++) | |
| 162 | { | |
| 163 | int ex; | |
| 131 | 164 | |
| 132 | /* Draw first sprite */ | |
| 165 | for (ex = 0; ex <= expand; ex++) | |
| 166 | { | |
| 167 | /* compute effective destination pixel */ | |
| 168 | int ty = y + sy * (expand + 1) + ey; | |
| 169 | int tx = x + sx * (expand + 1) + ex; | |
| 133 | 170 | |
| 134 | drawgfxzoom(collision_bitmap,machine->gfx[Graphics_Bank], | |
| 135 | char1, | |
| 136 | 1, | |
| 137 | 0,0, | |
| 138 | fx1,fy1, | |
| 139 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0, | |
| 140 | expand1,expand1); | |
| 171 | /* get out if outside the drawing region */ | |
| 172 | if ((tx < cliprect->min_x) || | |
| 173 | (tx > cliprect->max_x) || | |
| 174 | (ty < cliprect->min_y) || | |
| 175 | (ty > cliprect->max_y)) | |
| 176 | continue; | |
| 141 | 177 | |
| 142 | /* Get fingerprint */ | |
| 178 | /* get out if current image bit is transparent */ | |
| 179 | if (((gfx[sy] << sx) & 0x80) == 0x00) | |
| 180 | continue; | |
| 143 | 181 | |
| 144 | for (x = fx1; x < fx1 + machine->gfx[Graphics_Bank]->width; x++) | |
| 145 | { | |
| 146 | for (y = fy1; y < fy1 + machine->gfx[Graphics_Bank]->height; y++) | |
| 147 | { | |
| 148 | if ((x < machine->screen[0].visarea.min_x) || | |
| 149 | (x > machine->screen[0].visarea.max_x) || | |
| 150 | (y < machine->screen[0].visarea.min_y) || | |
| 151 | (y > machine->screen[0].visarea.max_y)) | |
| 152 | { | |
| 153 | continue; | |
| 154 | } | |
| 182 | if (or_mode) | |
| 183 | *BITMAP_ADDR8(bitmap, ty, tx) = 0x08 | *BITMAP_ADDR8(bitmap, ty, tx) | color; | |
| 184 | else | |
| 185 | *BITMAP_ADDR8(bitmap, ty, tx) = 0x08 | color; | |
| 186 | } | |
| 187 | } | |
| 188 | } | |
| 189 | } | |
| 190 | } | |
| 155 | 191 | |
| 156 | Checksum += *BITMAP_ADDR8(collision_bitmap, y, x); | |
| 157 | } | |
| 158 | } | |
| 159 | 192 | |
| 160 | /* Blackout second sprite */ | |
| 161 | 193 | |
| 162 | drawgfxzoom(collision_bitmap,machine->gfx[Graphics_Bank], | |
| 163 | char2, | |
| 164 | 0, | |
| 165 | 0,0, | |
| 166 | fx2,fy2, | |
| 167 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0, | |
| 168 | expand2,expand2); | |
| 194 | /************************************* | |
| 195 | * | |
| 196 | * Collision detection | |
| 197 | * | |
| 198 | *************************************/ | |
| 169 | 199 | |
| 170 | /* Remove fingerprint */ | |
| 200 | static int check_collision(s2636_t *s2636, int spriteno1, int spriteno2, const rectangle *cliprect) | |
| 201 | { | |
| 202 | int checksum = 0; | |
| 171 | 203 | |
| 172 | for (x = fx1; x < fx1 + machine->gfx[Graphics_Bank]->width; x++) | |
| 173 | { | |
| 174 | for (y = fy1; y < fy1 + machine->gfx[Graphics_Bank]->height; y++) | |
| 175 | { | |
| 176 | if ((x < machine->screen[0].visarea.min_x) || | |
| 177 | (x > machine->screen[0].visarea.max_x) || | |
| 178 | (y < machine->screen[0].visarea.min_y) || | |
| 179 | (y > machine->screen[0].visarea.max_y)) | |
| 180 | { | |
| 181 | continue; | |
| 182 | } | |
| 204 | UINT8* attr1 = &s2636->work_ram[sprite_offsets[spriteno1]]; | |
| 205 | UINT8* attr2 = &s2636->work_ram[sprite_offsets[spriteno2]]; | |
| 183 | 206 | |
| 184 | Checksum -= *BITMAP_ADDR8(collision_bitmap, y, x); | |
| 185 | } | |
| 186 | } | |
| 207 | /* TODO: does not check shadow sprites yet */ | |
| 187 | 208 | |
| 188 | ||
| 209 | fillbitmap(s2636->collision_bitmap, 0, cliprect); | |
| 189 | 210 | |
| 190 | drawgfxzoom(collision_bitmap,machine->gfx[Graphics_Bank], | |
| 191 | char1, | |
| 192 | 0, | |
| 193 | 0,0, | |
| 194 | fx1,fy1, | |
| 195 | &machine->screen[0].visarea, TRANSPARENCY_PEN, 0, | |
| 196 | expand1,expand1); | |
| 197 | } | |
| 198 | } | |
| 211 | if ((attr1[0x0a] != 0xff) && (attr2[0x0a] != 0xff)) | |
| 212 | { | |
| 213 | int x, y; | |
| 199 | 214 | |
| 200 | return Checksum; | |
| 215 | int x1 = attr1[0x0a] + s2636->x_offset; | |
| 216 | int y1 = attr1[0x0c] + s2636->y_offset; | |
| 217 | int x2 = attr2[0x0a] + s2636->x_offset; | |
| 218 | int y2 = attr2[0x0c] + s2636->y_offset; | |
| 219 | ||
| 220 | int expand1 = (s2636->work_ram[0xc0] >> (spriteno1 << 1)) & 0x03; | |
| 221 | int expand2 = (s2636->work_ram[0xc0] >> (spriteno2 << 1)) & 0x03; | |
| 222 | ||
| 223 | /* draw first sprite */ | |
| 224 | draw_sprite(attr1, 1, y1, x1, expand1, FALSE, s2636->collision_bitmap, cliprect); | |
| 225 | ||
| 226 | /* get fingerprint */ | |
| 227 | for (x = x1; x < x1 + SPRITE_WIDTH; x++) | |
| 228 | for (y = y1; y < y1 + SPRITE_HEIGHT; y++) | |
| 229 | { | |
| 230 | if ((x < cliprect->min_x) || | |
| 231 | (x > cliprect->max_x) || | |
| 232 | (y < cliprect->min_y) || | |
| 233 | (y > cliprect->max_y)) | |
| 234 | continue; | |
| 235 | ||
| 236 | checksum = checksum + *BITMAP_ADDR8(s2636->collision_bitmap, y, x); | |
| 237 | } | |
| 238 | ||
| 239 | /* black out second sprite */ | |
| 240 | draw_sprite(attr2, 0, y2, x2, expand2, FALSE, s2636->collision_bitmap, cliprect); | |
| 241 | ||
| 242 | /* remove fingerprint */ | |
| 243 | for (x = x1; x < x1 + SPRITE_WIDTH; x++) | |
| 244 | for (y = y1; y < y1 + SPRITE_HEIGHT; y++) | |
| 245 | { | |
| 246 | if ((x < cliprect->min_x) || | |
| 247 | (x > cliprect->max_x) || | |
| 248 | (y < cliprect->min_y) || | |
| 249 | (y > cliprect->max_y)) | |
| 250 | continue; | |
| 251 | ||
| 252 | checksum = checksum - *BITMAP_ADDR8(s2636->collision_bitmap, y, x); | |
| 253 | } | |
| 254 | } | |
| 255 | ||
| 256 | return (checksum != 0); | |
| 201 | 257 | } |
| 202 | 258 | |
| 203 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram,int Graphics_Bank,mame_bitmap *collision_bitmap) | |
| 259 | ||
| 260 | ||
| 261 | /************************************* | |
| 262 | * | |
| 263 | * Main drawing | |
| 264 | * | |
| 265 | *************************************/ | |
| 266 | ||
| 267 | mame_bitmap *s2636_update(s2636_t *s2636, const rectangle *cliprect) | |
| 204 | 268 | { |
| 205 | int CollisionSprite = 0; | |
| 206 | int spriteno; | |
| 207 | int offs; | |
| 269 | UINT8 collision = 0; | |
| 270 | int spriteno; | |
| 208 | 271 | |
| 209 | for(spriteno=0;spriteno<4;spriteno++) | |
| 210 | { | |
| 211 | offs = sprite_offsets[spriteno]; | |
| 272 | fillbitmap(s2636->bitmap, 0, cliprect); | |
| 212 | 273 | |
| 213 | if(workram[offs+10]!=0xFF) | |
| 214 | { | |
| 215 | int charno = offs>>4; | |
| 216 | int expand = 1 << (16+((workram[0xC0]>>(spriteno<<1)) & 3)); | |
| 217 | int bx = workram[offs+10] + s2636_x_offset; | |
| 218 | int by = workram[offs+12] + s2636_y_offset; | |
| 274 | for (spriteno = 0; spriteno < 4; spriteno++) | |
| 275 | { | |
| 276 | int color, expand, x, y; | |
| 219 | 277 | |
| 220 | if((bx >= 0) && (by >= 0)) | |
| 221 | { | |
| 222 | /* Get colour and mask correct bits */ | |
| 278 | UINT8* attr = &s2636->work_ram[sprite_offsets[spriteno]]; | |
| 223 | 279 | |
| 224 | int colour = workram[0xC1 + (spriteno >> 1)]; | |
| 280 | /* get out if sprite is turned off */ | |
| 281 | if (attr[0x0a] == 0xff) | |
| 282 | continue; | |
| 225 | 283 | |
| 226 | if((spriteno & 1)==0) colour >>= 3; | |
| 284 | x = attr[0x0a] + s2636->x_offset; | |
| 285 | y = attr[0x0c] + s2636->y_offset; | |
| 227 | 286 | |
| 228 | colour = (colour & 7) + 7; | |
| 287 | color = (s2636->work_ram[0xc1 + (spriteno >> 1)] >> ((spriteno & 1) ? 0 : 3)) & 0x07; | |
| 288 | expand = (s2636->work_ram[0xc0] >> (spriteno << 1)) & 0x03; | |
| 229 | 289 | |
| 230 | | |
| 290 | | |
| 231 | 291 | |
| 232 | drawgfxzoom(bitmap,machine->gfx[Graphics_Bank], | |
| 233 | charno, | |
| 234 | colour, | |
| 235 | 0,0, | |
| 236 | bx,by, | |
| 237 | &machine->screen[0].visarea, | |
| 238 | TRANSPARENCY_BLEND_RAW, 0, | |
| 239 | expand,expand); | |
| 292 | /* bail if no shadow sprites */ | |
| 293 | if ((attr[0x0b] == 0xff) || (attr[0x0d] == 0xfe)) | |
| 294 | continue; | |
| 240 | 295 | |
| 241 | | |
| 296 | x = attr[0x0b] + s2636->x_ | |
| 242 | 297 | |
| 243 | if((workram[offs+11]!=0xff) && (workram[offs+13]!=0xfe)) | |
| 244 | { | |
| 245 | bx=workram[offs+11] + s2636_x_offset; | |
| 298 | while (y < 0xff) | |
| 299 | { | |
| 300 | y = y + SPRITE_HEIGHT + attr[0x0d]; | |
| 246 | 301 | |
| 247 | if(bx >= 0) | |
| 248 | { | |
| 249 | for(;by < 255;) | |
| 250 | { | |
| 251 | by=by+10+workram[offs+13]; | |
| 302 | draw_sprite(attr, color, y, x, expand, TRUE, s2636->bitmap, cliprect); | |
| 303 | } | |
| 304 | } | |
| 252 | 305 | |
| 253 | drawgfxzoom(bitmap,machine->gfx[Graphics_Bank], | |
| 254 | charno, | |
| 255 | colour, | |
| 256 | 0,0, | |
| 257 | bx,by, | |
| 258 | &machine->screen[0].visarea, | |
| 259 | TRANSPARENCY_BLEND_RAW, 0, | |
| 260 | expand,expand); | |
| 261 | } | |
| 262 | } | |
| 263 | } | |
| 264 | } | |
| 265 | } | |
| 266 | } | |
| 306 | /* collision detection */ | |
| 307 | if (check_collision(s2636, 0, 1, cliprect)) collision |= 0x20; | |
| 308 | if (check_collision(s2636, 0, 2, cliprect)) collision |= 0x10; | |
| 309 | if (check_collision(s2636, 0, 3, cliprect)) collision |= 0x08; | |
| 310 | if (check_collision(s2636, 1, 2, cliprect)) collision |= 0x04; | |
| 311 | if (check_collision(s2636, 1, 3, cliprect)) collision |= 0x02; | |
| 312 | if (check_collision(s2636, 2, 3, cliprect)) collision |= 0x01; | |
| 267 | 313 | |
| 268 | ||
| 314 | s2636 | |
| 269 | 315 | |
| 270 | if(SpriteCheck(machine,0,1,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x20; | |
| 271 | if(SpriteCheck(machine,0,2,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x10; | |
| 272 | if(SpriteCheck(machine,0,3,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x08; | |
| 273 | if(SpriteCheck(machine,1,2,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x04; | |
| 274 | if(SpriteCheck(machine,1,3,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x02; | |
| 275 | if(SpriteCheck(machine,2,3,workram,Graphics_Bank,collision_bitmap)) CollisionSprite |= 0x01; | |
| 276 | ||
| 277 | workram[0xCB] = CollisionSprite; | |
| 316 | return s2636->bitmap; | |
| 278 | 317 | } |
| r0 | r1680 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | Motorola MC6845 and compatible CRT controller emulation | |
| 4 | ||
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ||
| 8 | The following variations exist that are different in | |
| 9 | functionality and not just in speed rating(1): | |
| 10 | * Motorola 6845, 6845-1 | |
| 11 | * Hitachi 46505 | |
| 12 | * Rockwell 6545, 6545-1 (= Synertek SY6545-1) | |
| 13 | * Commodore 6545-1 | |
| 14 | ||
| 15 | (1) as per the document at | |
| 16 | http://www.6502.org/users/andre/hwinfo/crtc/diffs.html | |
| 17 | ||
| 18 | **********************************************************************/ | |
| 19 | ||
| 20 | #include "driver.h" | |
| 21 | #include "mc6845.h" | |
| 22 | ||
| 23 | ||
| 24 | #define LOG (0) | |
| 25 | ||
| 26 | ||
| 27 | struct _mc6845_t | |
| 28 | { | |
| 29 | const mc6845_interface *intf; | |
| 30 | ||
| 31 | /* internal registers */ | |
| 32 | UINT8 address_latch; | |
| 33 | UINT8 horiz_total; | |
| 34 | UINT8 horiz_disp; | |
| 35 | UINT8 horiz_sync_pos; | |
| 36 | UINT8 sync_width; | |
| 37 | UINT8 vert_total; | |
| 38 | UINT8 vert_total_adj; | |
| 39 | UINT8 vert_disp; | |
| 40 | UINT8 vert_sync_pos; | |
| 41 | UINT8 intl_skew; | |
| 42 | UINT8 max_ras_addr; | |
| 43 | UINT8 cursor_start_ras; | |
| 44 | UINT8 cursor_end_ras; | |
| 45 | UINT16 start_addr; | |
| 46 | UINT16 cursor; | |
| 47 | UINT16 light_pen; | |
| 48 | ||
| 49 | emu_timer *display_enable_changed_timer; | |
| 50 | ||
| 51 | /* saved screen parameters so we don't call | |
| 52 | video_screen_configure() unneccessarily. | |
| 53 | Do NOT state save these! */ | |
| 54 | UINT16 last_horiz_total; | |
| 55 | UINT16 last_vert_total; | |
| 56 | UINT16 last_max_x; | |
| 57 | UINT16 last_max_y; | |
| 58 | UINT16 current_ma; /* the MA address currently drawn */ | |
| 59 | int has_valid_parameters; | |
| 60 | }; | |
| 61 | ||
| 62 | ||
| 63 | static void mc6845_state_save_postload(void *param); | |
| 64 | static void configure_screen(mc6845_t *mc6845, int postload); | |
| 65 | static void update_timer(mc6845_t *mc6845); | |
| 66 | static TIMER_CALLBACK( display_enable_changed_timer_cb ); | |
| 67 | ||
| 68 | ||
| 69 | mc6845_t *mc6845_config(const mc6845_interface *intf) | |
| 70 | { | |
| 71 | mc6845_t *mc6845; | |
| 72 | ||
| 73 | /* allocate the object that holds the state */ | |
| 74 | mc6845 = auto_malloc(sizeof(*mc6845)); | |
| 75 | memset(mc6845, 0, sizeof(*mc6845)); | |
| 76 | ||
| 77 | mc6845->intf = intf; | |
| 78 | ||
| 79 | /* create the timer if the user is interested in getting display enable | |
| 80 | notifications */ | |
| 81 | if (intf && intf->display_enable_changed) | |
| 82 | mc6845->display_enable_changed_timer = timer_alloc(display_enable_changed_timer_cb, mc6845); | |
| 83 | ||
| 84 | /* register for state saving */ | |
| 85 | state_save_register_func_postload_ptr(mc6845_state_save_postload, mc6845); | |
| 86 | ||
| 87 | state_save_register_item("mc6845", 0, mc6845->address_latch); | |
| 88 | state_save_register_item("mc6845", 0, mc6845->horiz_total); | |
| 89 | state_save_register_item("mc6845", 0, mc6845->horiz_disp); | |
| 90 | state_save_register_item("mc6845", 0, mc6845->horiz_sync_pos); | |
| 91 | state_save_register_item("mc6845", 0, mc6845->sync_width); | |
| 92 | state_save_register_item("mc6845", 0, mc6845->vert_total); | |
| 93 | state_save_register_item("mc6845", 0, mc6845->vert_total_adj); | |
| 94 | state_save_register_item("mc6845", 0, mc6845->vert_disp); | |
| 95 | state_save_register_item("mc6845", 0, mc6845->vert_sync_pos); | |
| 96 | state_save_register_item("mc6845", 0, mc6845->intl_skew); | |
| 97 | state_save_register_item("mc6845", 0, mc6845->max_ras_addr); | |
| 98 | state_save_register_item("mc6845", 0, mc6845->cursor_start_ras); | |
| 99 | state_save_register_item("mc6845", 0, mc6845->cursor_end_ras); | |
| 100 | state_save_register_item("mc6845", 0, mc6845->start_addr); | |
| 101 | state_save_register_item("mc6845", 0, mc6845->cursor); | |
| 102 | state_save_register_item("mc6845", 0, mc6845->light_pen); | |
| 103 | ||
| 104 | return mc6845; | |
| 105 | } | |
| 106 | ||
| 107 | ||
| 108 | static void mc6845_state_save_postload(void *param) | |
| 109 | { | |
| 110 | mc6845_t *mc6845 = (mc6845_t *)param; | |
| 111 | ||
| 112 | configure_screen(mc6845, TRUE); | |
| 113 | } | |
| 114 | ||
| 115 | ||
| 116 | void mc6845_address_w(mc6845_t *mc6845, UINT8 data) | |
| 117 | { | |
| 118 | mc6845->address_latch = data & 0x1f; | |
| 119 | } | |
| 120 | ||
| 121 | ||
| 122 | UINT8 mc6845_register_r(mc6845_t *mc6845) | |
| 123 | { | |
| 124 | UINT8 ret = 0; | |
| 125 | ||
| 126 | switch (mc6845->address_latch) | |
| 127 | { | |
| 128 | case 12: | |
| 129 | /* Motorola version only */ | |
| 130 | ret = mc6845->start_addr >> 8; | |
| 131 | break; | |
| 132 | case 13: | |
| 133 | /* Motorola version only */ | |
| 134 | ret = mc6845->start_addr; | |
| 135 | break; | |
| 136 | case 14: | |
| 137 | ret = mc6845->cursor >> 8; | |
| 138 | break; | |
| 139 | case 15: | |
| 140 | ret = mc6845->cursor; | |
| 141 | break; | |
| 142 | case 16: | |
| 143 | ret = mc6845->light_pen >> 8; | |
| 144 | break; | |
| 145 | case 17: | |
| 146 | ret = mc6845->light_pen; | |
| 147 | break; | |
| 148 | default: | |
| 149 | /* all other registers are write only */ | |
| 150 | break; | |
| 151 | } | |
| 152 | ||
| 153 | return ret; | |
| 154 | } | |
| 155 | ||
| 156 | ||
| 157 | void mc6845_register_w(mc6845_t *mc6845, UINT8 data) | |
| 158 | { | |
| 159 | int call_configure_screen = FALSE; | |
| 160 | if (LOG) logerror("CRT #0 PC %04x: CRTC6845 reg 0x%02x = 0x%02x\n", activecpu_get_pc(), mc6845->address_latch, data); | |
| 161 | ||
| 162 | switch (mc6845->address_latch) | |
| 163 | { | |
| 164 | case 0: | |
| 165 | mc6845->horiz_total = data; | |
| 166 | call_configure_screen = TRUE; | |
| 167 | break; | |
| 168 | case 1: | |
| 169 | mc6845->horiz_disp = data; | |
| 170 | call_configure_screen = TRUE; | |
| 171 | break; | |
| 172 | case 2: | |
| 173 | mc6845->horiz_sync_pos = data; | |
| 174 | break; | |
| 175 | case 3: | |
| 176 | mc6845->sync_width = data & 0x0f; | |
| 177 | break; | |
| 178 | case 4: | |
| 179 | mc6845->vert_total = data & 0x7f; | |
| 180 | call_configure_screen = TRUE; | |
| 181 | break; | |
| 182 | case 5: | |
| 183 | mc6845->vert_total_adj = data & 0x1f; | |
| 184 | call_configure_screen = TRUE; | |
| 185 | break; | |
| 186 | case 6: | |
| 187 | mc6845->vert_disp = data & 0x7f; | |
| 188 | call_configure_screen = TRUE; | |
| 189 | break; | |
| 190 | case 7: | |
| 191 | mc6845->vert_sync_pos = data & 0x7f; | |
| 192 | break; | |
| 193 | case 8: | |
| 194 | mc6845->intl_skew = data & 0x03; | |
| 195 | break; | |
| 196 | case 9: | |
| 197 | mc6845->max_ras_addr = data & 0x1f; | |
| 198 | call_configure_screen = TRUE; | |
| 199 | break; | |
| 200 | case 10: | |
| 201 | mc6845->cursor_start_ras = data & 0x7f; | |
| 202 | break; | |
| 203 | case 11: | |
| 204 | mc6845->cursor_end_ras = data & 0x1f; | |
| 205 | break; | |
| 206 | case 12: | |
| 207 | mc6845->start_addr &= 0x00ff; | |
| 208 | mc6845->start_addr |= (data & 0x3f) << 8; | |
| 209 | call_configure_screen = TRUE; | |
| 210 | break; | |
| 211 | case 13: | |
| 212 | mc6845->start_addr &= 0xff00; | |
| 213 | mc6845->start_addr |= data; | |
| 214 | call_configure_screen = TRUE; | |
| 215 | break; | |
| 216 | case 14: | |
| 217 | mc6845->cursor &= 0x00ff; | |
| 218 | mc6845->cursor |= (data & 0x3f) << 8; | |
| 219 | break; | |
| 220 | case 15: | |
| 221 | mc6845->cursor &= 0xff00; | |
| 222 | mc6845->cursor |= data; | |
| 223 | break; | |
| 224 | case 16: /* read-only */ | |
| 225 | break; | |
| 226 | case 17: /* read-only */ | |
| 227 | break; | |
| 228 | default: | |
| 229 | break; | |
| 230 | } | |
| 231 | ||
| 232 | if (call_configure_screen) | |
| 233 | configure_screen(mc6845, FALSE); | |
| 234 | } | |
| 235 | ||
| 236 | ||
| 237 | static void configure_screen(mc6845_t *mc6845, int postload) | |
| 238 | { | |
| 239 | if (mc6845->intf) | |
| 240 | { | |
| 241 | /* compute the screen sizes */ | |
| 242 | UINT16 horiz_total = (mc6845->horiz_total + 1) * mc6845->intf->hpixels_per_column; | |
| 243 | UINT16 vert_total = (mc6845->vert_total + 1) * (mc6845->max_ras_addr + 1) + mc6845->vert_total_adj; | |
| 244 | ||
| 245 | /* determine the visible area, avoid division by 0 */ | |
| 246 | UINT16 max_x = mc6845->horiz_disp * mc6845->intf->hpixels_per_column - 1; | |
| 247 | UINT16 max_y = mc6845->vert_disp * (mc6845->max_ras_addr + 1) - 1; | |
| 248 | ||
| 249 | /* update only if screen parameters changed, unless we are coming here after loading the saved state */ | |
| 250 | if (postload || | |
| 251 | (horiz_total != mc6845->last_horiz_total) || (vert_total != mc6845->last_vert_total) || | |
| 252 | (max_x != mc6845->last_max_x) || (max_y != mc6845->last_max_y)) | |
| 253 | { | |
| 254 | /* update the screen only if we have valid data */ | |
| 255 | if ((mc6845->horiz_total > 0) && (max_x < horiz_total) && (mc6845->vert_total > 0) && (max_y < vert_total)) | |
| 256 | { | |
| 257 | rectangle visarea; | |
| 258 | ||
| 259 | attoseconds_t refresh = HZ_TO_ATTOSECONDS(mc6845->intf->clock) * (mc6845->horiz_total + 1) * vert_total; | |
| 260 | ||
| 261 | visarea.min_x = 0; | |
| 262 | visarea.min_y = 0; | |
| 263 | visarea.max_x = max_x; | |
| 264 | visarea.max_y = max_y; | |
| 265 | ||
| 266 | if (LOG) logerror("CRTC6845 config screen: HTOTAL: %x VTOTAL: %x MAX_X: %x MAX_Y: %x FPS: %f\n", | |
| 267 | horiz_total, vert_total, max_x, max_y, 1 / ATTOSECONDS_TO_DOUBLE(refresh)); | |
| 268 | ||
| 269 | video_screen_configure(mc6845->intf->scrnum, horiz_total, vert_total, &visarea, refresh); | |
| 270 | ||
| 271 | mc6845->has_valid_parameters = TRUE; | |
| 272 | } | |
| 273 | else | |
| 274 | mc6845->has_valid_parameters = FALSE; | |
| 275 | ||
| 276 | mc6845->last_horiz_total = horiz_total; | |
| 277 | mc6845->last_vert_total = vert_total; | |
| 278 | mc6845->last_max_x = max_x; | |
| 279 | mc6845->last_max_y = max_y; | |
| 280 | ||
| 281 | update_timer(mc6845); | |
| 282 | } | |
| 283 | } | |
| 284 | } | |
| 285 | ||
| 286 | ||
| 287 | static int is_display_enabled(mc6845_t *mc6845) | |
| 288 | { | |
| 289 | UINT16 y = video_screen_get_vpos(mc6845->intf->scrnum); | |
| 290 | UINT16 x = video_screen_get_hpos(mc6845->intf->scrnum); | |
| 291 | ||
| 292 | return (y <= mc6845->last_max_y) && (x <= mc6845->last_max_x); | |
| 293 | } | |
| 294 | ||
| 295 | ||
| 296 | static void update_timer(mc6845_t *mc6845) | |
| 297 | { | |
| 298 | INT16 next_y; | |
| 299 | UINT16 next_x; | |
| 300 | attotime duration; | |
| 301 | ||
| 302 | if (mc6845->has_valid_parameters && (mc6845->display_enable_changed_timer != 0)) | |
| 303 | { | |
| 304 | if (is_display_enabled(mc6845)) | |
| 305 | { | |
| 306 | /* we are in a display region, | |
| 307 | get the location of the next blanking start */ | |
| 308 | ||
| 309 | /* normally, it's at end the current raster line */ | |
| 310 | next_y = video_screen_get_vpos(mc6845->intf->scrnum); | |
| 311 | next_x = mc6845->last_max_x + 1; | |
| 312 | ||
| 313 | /* but if visible width = horiz_total, then we need | |
| 314 | to go to the beginning of VBLANK */ | |
| 315 | if (next_x == mc6845->last_horiz_total) | |
| 316 | { | |
| 317 | next_y = mc6845->last_max_y + 1; | |
| 318 | next_x = 0; | |
| 319 | ||
| 320 | /* abnormal case, no vertical blanking, either */ | |
| 321 | if (next_y == mc6845->last_vert_total) | |
| 322 | next_y = -1; | |
| 323 | } | |
| 324 | } | |
| 325 | else | |
| 326 | { | |
| 327 | /* we are in a blanking region, | |
| 328 | get the location of the next display start */ | |
| 329 | next_x = 0; | |
| 330 | next_y = (video_screen_get_vpos(mc6845->intf->scrnum) + 1) % mc6845->last_vert_total; | |
| 331 | ||
| 332 | /* if we would now fall in the vertical blanking, we need | |
| 333 | to go to the top of the screen */ | |
| 334 | if (next_y > mc6845->last_max_y) | |
| 335 | next_y = 0; | |
| 336 | } | |
| 337 | ||
| 338 | if (next_y != -1) | |
| 339 | duration = video_screen_get_time_until_pos(mc6845->intf->scrnum, next_y, next_x); | |
| 340 | else | |
| 341 | duration = attotime_never; | |
| 342 | ||
| 343 | timer_adjust_oneshot(mc6845->display_enable_changed_timer, duration, 0); | |
| 344 | } | |
| 345 | } | |
| 346 | ||
| 347 | ||
| 348 | static TIMER_CALLBACK( display_enable_changed_timer_cb ) | |
| 349 | { | |
| 350 | mc6845_t *mc6845 = ptr; | |
| 351 | ||
| 352 | /* call the callback function -- we know it exists */ | |
| 353 | mc6845->intf->display_enable_changed(is_display_enabled(mc6845)); | |
| 354 | ||
| 355 | update_timer(mc6845); | |
| 356 | } | |
| 357 | ||
| 358 | ||
| 359 | UINT16 mc6845_get_ma(mc6845_t *mc6845) | |
| 360 | { | |
| 361 | UINT16 ret; | |
| 362 | ||
| 363 | if (mc6845->has_valid_parameters) | |
| 364 | { | |
| 365 | /* get the current raster positions and clamp them to the visible region */ | |
| 366 | int y = video_screen_get_vpos(0); | |
| 367 | int x = video_screen_get_hpos(0); | |
| 368 | ||
| 369 | /* since the MA counter stops in the blanking regions, if we are in a | |
| 370 | VBLANK, both X and Y are at their max */ | |
| 371 | if ((y > mc6845->last_max_y) || (x > mc6845->last_max_x)) | |
| 372 | x = mc6845->last_max_x; | |
| 373 | ||
| 374 | if (y > mc6845->last_max_y) | |
| 375 | y = mc6845->last_max_y; | |
| 376 | ||
| 377 | ret = (mc6845->start_addr + | |
| 378 | (y / (mc6845->max_ras_addr + 1)) * mc6845->horiz_disp + | |
| 379 | (x / mc6845->intf->hpixels_per_column)) & 0x3fff; | |
| 380 | } | |
| 381 | else | |
| 382 | ret = 0; | |
| 383 | ||
| 384 | return ret; | |
| 385 | } | |
| 386 | ||
| 387 | ||
| 388 | UINT8 mc6845_get_ra(mc6845_t *mc6845) | |
| 389 | { | |
| 390 | UINT8 ret; | |
| 391 | ||
| 392 | if (mc6845->has_valid_parameters) | |
| 393 | { | |
| 394 | /* get the current vertical raster position and clamp it to the visible region */ | |
| 395 | int y = video_screen_get_vpos(0); | |
| 396 | ||
| 397 | if (y > mc6845->last_max_y) | |
| 398 | y = mc6845->last_max_y; | |
| 399 | ||
| 400 | ret = y % (mc6845->max_ras_addr + 1); | |
| 401 | } | |
| 402 | else | |
| 403 | ret = 0; | |
| 404 | ||
| 405 | return ret; | |
| 406 | } | |
| 407 | ||
| 408 | ||
| 409 | void mc6845_update(mc6845_t *mc6845, mame_bitmap *bitmap, const rectangle *cliprect) | |
| 410 | { | |
| 411 | if (mc6845->has_valid_parameters) | |
| 412 | { | |
| 413 | UINT16 y; | |
| 414 | ||
| 415 | /* call the set up function if any */ | |
| 416 | void *param = 0; | |
| 417 | ||
| 418 | if (mc6845->intf->begin_update) | |
| 419 | param = mc6845->intf->begin_update(bitmap, cliprect); | |
| 420 | ||
| 421 | /* read the start address at the beginning of the frame */ | |
| 422 | if (cliprect->min_y == 0) | |
| 423 | mc6845->current_ma = mc6845->start_addr; | |
| 424 | ||
| 425 | /* for each row in the visible region */ | |
| 426 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) | |
| 427 | { | |
| 428 | UINT8 ra = y % (mc6845->max_ras_addr + 1); | |
| 429 | ||
| 430 | /* call the external system to draw it */ | |
| 431 | mc6845->intf->update_row(bitmap, cliprect, mc6845->current_ma, ra, y, mc6845->horiz_disp, param); | |
| 432 | ||
| 433 | /* update MA if the last raster address */ | |
| 434 | if (ra == mc6845->max_ras_addr) | |
| 435 | mc6845->current_ma = (mc6845->current_ma + mc6845->horiz_disp) & 0x3fff; | |
| 436 | } | |
| 437 | ||
| 438 | /* call the tear down function if any */ | |
| 439 | if (mc6845->intf->end_update) | |
| 440 | mc6845->intf->end_update(bitmap, cliprect, param); | |
| 441 | } | |
| 442 | } |
| r1679 | r1680 | |
|---|---|---|
| 1 | extern UINT8 *s2636_1_ram; | |
| 2 | extern UINT8 *s2636_2_ram; | |
| 3 | extern UINT8 *s2636_3_ram; | |
| 1 | /********************************************************************** | |
| 4 | 2 | |
| 5 | extern mame_bitmap *s2636_1_bitmap; | |
| 6 | extern mame_bitmap *s2636_2_bitmap; | |
| 7 | extern mame_bitmap *s2636_3_bitmap; | |
| 3 | Signetics 2636 video chip | |
| 8 | 4 | |
| 9 | extern int s2636_x_offset; | |
| 10 | extern int s2636_y_offset; | |
| 5 | **********************************************************************/ | |
| 11 | 6 | |
| 12 | extern const gfx_layout s2636_gfx_layout; | |
| 7 | #ifndef S2636 | |
| 8 | #define S2636 | |
| 13 | 9 | |
| 14 | void s2636_update_bitmap(running_machine *machine,mame_bitmap *bitmap,UINT8 *workram,int Graphics_Bank,mame_bitmap *collision_bitmap); | |
| 15 | 10 | |
| 11 | typedef struct _s2636_t s2636_t; | |
| 12 | ||
| 13 | /* helpful macros to parse the bitmap returned by s2636_update */ | |
| 14 | #define S2636_IS_PIXEL_DRAWN(p) (((p) & 0x08) ? TRUE : FALSE) | |
| 15 | #define S2636_PIXEL_COLOR(p) ((p) & 0x07) | |
| 16 | ||
| 17 | s2636_t *s2636_config(UINT8 *work_ram, int screen_height, int screen_width, int y_offset, int x_offset); | |
| 18 | ||
| 19 | /* returns a BITMAP_FORMAT_INDEXED8 bitmap the size of the screen | |
| 20 | D0-D2 of each pixel is the pixel color | |
| 21 | D3 indicates whether the S2636 drew this pixel - 0 = not drawn, 1 = drawn */ | |
| 22 | mame_bitmap *s2636_update(s2636_t *s2636, const rectangle *cliprect); | |
| 23 | ||
| 24 | #endif |
| r0 | r1680 | |
|---|---|---|
| 1 | /********************************************************************** | |
| 2 | ||
| 3 | Motorola MC6845 and compatible CRT controller emulation | |
| 4 | ||
| 5 | Copyright Nicola Salmoria and the MAME Team. | |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 7 | ||
| 8 | The following variations exist that are different in | |
| 9 | functionality and not just in speed rating(1): | |
| 10 | * Motorola 6845, 6845-1 | |
| 11 | * Hitachi 46505 | |
| 12 | * Rockwell 6545, 6545-1 (= Synertek SY6545-1) | |
| 13 | * Commodore 6545-1 | |
| 14 | ||
| 15 | (1) as per the document at | |
| 16 | http://www.6502.org/users/andre/hwinfo/crtc/diffs.html | |
| 17 | ||
| 18 | **********************************************************************/ | |
| 19 | ||
| 20 | #ifndef MC6845 | |
| 21 | #define MC6845 | |
| 22 | ||
| 23 | ||
| 24 | typedef struct _mc6845_t mc6845_t; | |
| 25 | typedef struct _mc6845_interface mc6845_interface; | |
| 26 | ||
| 27 | struct _mc6845_interface | |
| 28 | { | |
| 29 | int scrnum; /* screen we are acting on */ | |
| 30 | int clock; /* the clock (pin 21) of the chip */ | |
| 31 | int hpixels_per_column; /* number of pixels per video memory address */ | |
| 32 | ||
| 33 | /* if specified, this gets called before any pixel update, | |
| 34 | optionally return a pointer that will be passed to the | |
| 35 | update and tear down callbacks */ | |
| 36 | void * (*begin_update)(mame_bitmap *bitmap, const rectangle *cliprect); | |
| 37 | ||
| 38 | /* this gets called for every row, the driver must output | |
| 39 | x_count * hpixels_per_column pixels */ | |
| 40 | void (*update_row)(mame_bitmap *bitmap, const rectangle *cliprect, | |
| 41 | UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, void *param); | |
| 42 | ||
| 43 | /* if specified, this gets called after all row updating is complete */ | |
| 44 | void (*end_update)(mame_bitmap *bitmap, const rectangle *cliprect, void *param); | |
| 45 | ||
| 46 | /* if specified, this gets called for every change of the disply enable (DT pin 18) */ | |
| 47 | void (*display_enable_changed)(int display_enabled); | |
| 48 | }; | |
| 49 | ||
| 50 | ||
| 51 | /* use mc6845_init to set up for save states. | |
| 52 | if intf is NULL, the emulator will NOT call video_configure_screen() */ | |
| 53 | mc6845_t *mc6845_config(const mc6845_interface *intf); | |
| 54 | ||
| 55 | /* selects one of the registers for reading or writing */ | |
| 56 | void mc6845_address_w(mc6845_t *mc6845, UINT8 data); | |
| 57 | ||
| 58 | /* reads the currently selected register */ | |
| 59 | UINT8 mc6845_register_r(mc6845_t *mc6845); | |
| 60 | ||
| 61 | /* writes the currently selected register */ | |
| 62 | void mc6845_register_w(mc6845_t *mc6845, UINT8 data); | |
| 63 | ||
| 64 | /* return the current value on the MA0-MA13 pins */ | |
| 65 | UINT16 mc6845_get_ma(mc6845_t *mc6845); | |
| 66 | ||
| 67 | /* return the current value on the RA0-RA4 pins */ | |
| 68 | UINT8 mc6845_get_ra(mc6845_t *mc6845); | |
| 69 | ||
| 70 | /* updates the screen -- this will call begin_update(), | |
| 71 | followed by update_row() reapeatedly and after all row | |
| 72 | updating is complete, end_update() */ | |
| 73 | void mc6845_update(mc6845_t *mc6845, mame_bitmap *bitmap, const rectangle *cliprect); | |
| 74 | ||
| 75 | #endif |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | /* invalid logical index */ |
| 26 | 26 | #define INVALID_LOGICAL_INDEX ((tilemap_logical_index)~0) |
| 27 | 27 | |
| 28 | /* maximum index in each array */ | |
| 29 | #define MAX_PEN_TO_FLAGS 256 | |
| 28 | 30 | |
| 29 | 31 | |
| 30 | 32 | /*************************************************************************** |
| r1679 | r1680 | |
| 69 | 71 | tilemap * next; /* pointer to next tilemap */ |
| 70 | 72 | |
| 71 | 73 | /* basic tilemap metrics */ |
| 72 | tilemap_type type; /* type of tilemap */ | |
| 73 | 74 | UINT32 rows; /* number of tile rows */ |
| 74 | 75 | UINT32 cols; /* number of tile columns */ |
| 75 | 76 | UINT32 tilewidth; /* width of a single tile in pixels */ |
| r1679 | r1680 | |
| 113 | 114 | mame_bitmap * flagsmap; /* per-pixel flags */ |
| 114 | 115 | UINT8 * tileflags; /* per-tile flags */ |
| 115 | 116 | UINT8 * pen_to_flags; /* mapping of pens to flags */ |
| 116 | UINT32 max_pen_to_flags; /* maximum index in each array */ | |
| 117 | 117 | }; |
| 118 | 118 | |
| 119 | 119 | |
| r1679 | r1680 | |
| 150 | 150 | static void tile_update(tilemap *tmap, tilemap_logical_index logindex, UINT32 cached_col, UINT32 cached_row); |
| 151 | 151 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags); |
| 152 | 152 | static UINT8 tile_draw_colortable(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags); |
| 153 | static UINT8 tile_draw_colortrans(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags); | |
| 154 | 153 | static UINT8 tile_apply_bitmask(tilemap *tmap, const UINT8 *maskdata, UINT32 x0, UINT32 y0, UINT8 category, UINT8 flags); |
| 155 | 154 | |
| 156 | 155 | /* drawing helpers */ |
| r1679 | r1680 | |
| 289 | 288 | tilemap_create - allocate a new tilemap |
| 290 | 289 | -------------------------------------------------*/ |
| 291 | 290 | |
| 292 | tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, | |
| 291 | tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, | |
| 293 | 292 | { |
| 294 | 293 | tilemap *tmap; |
| 295 | 294 | int group; |
| r1679 | r1680 | |
| 299 | 298 | memset(tmap, 0, sizeof(tilemap)); |
| 300 | 299 | |
| 301 | 300 | /* fill in the basic metrics */ |
| 302 | tmap->type = type; | |
| 303 | 301 | tmap->rows = rows; |
| 304 | 302 | tmap->cols = cols; |
| 305 | 303 | tmap->tilewidth = tilewidth; |
| r1679 | r1680 | |
| 332 | 330 | /* allocate transparency mapping data */ |
| 333 | 331 | tmap->tileflags = malloc_or_die(tmap->max_logical_index); |
| 334 | 332 | tmap->flagsmap = bitmap_alloc(tmap->width, tmap->height, BITMAP_FORMAT_INDEXED8); |
| 335 | tmap->max_pen_to_flags = (tmap->type != TILEMAP_TYPE_COLORTABLE) ? 256 : Machine->drv->color_table_len; | |
| 336 | tmap->pen_to_flags = malloc_or_die(sizeof(tmap->pen_to_flags[0]) * tmap->max_pen_to_flags * TILEMAP_NUM_GROUPS); | |
| 333 | tmap->pen_to_flags = malloc_or_die(sizeof(tmap->pen_to_flags[0]) * MAX_PEN_TO_FLAGS * TILEMAP_NUM_GROUPS); | |
| 337 | 334 | for (group = 0; group < TILEMAP_NUM_GROUPS; group++) |
| 338 | 335 | tilemap_map_pens_to_layer(tmap, group, 0, 0, TILEMAP_PIXEL_LAYER0); |
| 339 | 336 | |
| r1679 | r1680 | |
| 487 | 484 | |
| 488 | 485 | void tilemap_map_pens_to_layer(tilemap *tmap, int group, pen_t pen, pen_t mask, UINT8 layermask) |
| 489 | 486 | { |
| 490 | UINT8 *array = tmap->pen_to_flags + group * | |
| 487 | UINT8 *array = tmap->pen_to_flags + group * MAX | |
| 491 | 488 | pen_t start, stop, cur; |
| 492 | 489 | UINT8 changed = FALSE; |
| 493 | 490 | |
| r1679 | r1680 | |
| 501 | 498 | stop = start | ~mask; |
| 502 | 499 | |
| 503 | 500 | /* clamp to the number of entries actually there */ |
| 504 | stop = MIN(stop, | |
| 501 | stop = MIN(stop, MAX | |
| 505 | 502 | |
| 506 | 503 | /* iterate and set */ |
| 507 | 504 | for (cur = start; cur <= stop; cur++) |
| r1679 | r1680 | |
| 1251 | 1248 | |
| 1252 | 1249 | /* draw the tile, using either direct or transparent */ |
| 1253 | 1250 | if (Machine->game_colortable != NULL) |
| 1254 | { | |
| 1255 | if (tmap->type != TILEMAP_TYPE_COLORTABLE) | |
| 1256 | tmap->tileflags[logindex] = tile_draw_colortable(tmap, tmap->tileinfo.pen_data, x0, y0, tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags); | |
| 1257 | else | |
| 1258 | tmap->tileflags[logindex] = tile_draw_colortrans(tmap, tmap->tileinfo.pen_data, x0, y0, tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags); | |
| 1259 | } | |
| 1251 | tmap->tileflags[logindex] = tile_draw_colortable(tmap, tmap->tileinfo.pen_data, x0, y0, tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags); | |
| 1260 | 1252 | else |
| 1261 | 1253 | tmap->tileflags[logindex] = tile_draw(tmap, tmap->tileinfo.pen_data, x0, y0, tmap->tileinfo.palette_base, tmap->tileinfo.category, tmap->tileinfo.group, flags); |
| 1262 | 1254 | |
| r1679 | r1680 | |
| 1277 | 1269 | |
| 1278 | 1270 | static UINT8 tile_draw(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags) |
| 1279 | 1271 | { |
| 1280 | const UINT8 *penmap = tmap->pen_to_flags + group * | |
| 1272 | const UINT8 *penmap = tmap->pen_to_flags + group * MAX | |
| 1281 | 1273 | mame_bitmap *flagsmap = tmap->flagsmap; |
| 1282 | 1274 | mame_bitmap *pixmap = tmap->pixmap; |
| 1283 | 1275 | int height = tmap->tileheight; |
| r1679 | r1680 | |
| 1374 | 1366 | |
| 1375 | 1367 | static UINT8 tile_draw_colortable(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags) |
| 1376 | 1368 | { |
| 1377 | const UINT8 *penmap = tmap->pen_to_flags + group * | |
| 1369 | const UINT8 *penmap = tmap->pen_to_flags + group * MAX | |
| 1378 | 1370 | const pen_t *palette_lookup = Machine->remapped_colortable + palette_base; |
| 1379 | 1371 | mame_bitmap *flagsmap = tmap->flagsmap; |
| 1380 | 1372 | mame_bitmap *pixmap = tmap->pixmap; |
| r1679 | r1680 | |
| 1465 | 1457 | |
| 1466 | 1458 | |
| 1467 | 1459 | /*------------------------------------------------- |
| 1468 | tile_draw_colortrans - draw a single tile to | |
| 1469 | the tilemap's internal pixmap, using the | |
| 1470 | remapped pen as the pen_to_flags lookup value | |
| 1471 | -------------------------------------------------*/ | |
| 1472 | ||
| 1473 | static UINT8 tile_draw_colortrans(tilemap *tmap, const UINT8 *pendata, UINT32 x0, UINT32 y0, UINT32 palette_base, UINT8 category, UINT8 group, UINT8 flags) | |
| 1474 | { | |
| 1475 | const UINT8 *penmap = tmap->pen_to_flags + group * tmap->max_pen_to_flags; | |
| 1476 | const pen_t *palette_lookup = Machine->remapped_colortable + palette_base; | |
| 1477 | mame_bitmap *flagsmap = tmap->flagsmap; | |
| 1478 | mame_bitmap *pixmap = tmap->pixmap; | |
| 1479 | int height = tmap->tileheight; | |
| 1480 | int width = tmap->tilewidth; | |
| 1481 | UINT8 andmask = ~0, ormask = 0; | |
| 1482 | int dx0 = 1, dy0 = 1; | |
| 1483 | int tx, ty; | |
| 1484 | ||
| 1485 | /* OR in the force layer flags */ | |
| 1486 | category |= flags & (TILE_FORCE_LAYER0 | TILE_FORCE_LAYER1 | TILE_FORCE_LAYER2); | |
| 1487 | ||
| 1488 | /* if we're vertically flipped, point to the bottom row and work backwards */ | |
| 1489 | if (flags & TILE_FLIPY) | |
| 1490 | { | |
| 1491 | y0 += height - 1; | |
| 1492 | dy0 = -1; | |
| 1493 | } | |
| 1494 | ||
| 1495 | /* if we're horizontally flipped, point to the rightmost column and work backwards */ | |
| 1496 | if (flags & TILE_FLIPX) | |
| 1497 | { | |
| 1498 | x0 += width - 1; | |
| 1499 | dx0 = -1; | |
| 1500 | } | |
| 1501 | ||
| 1502 | /* in 4bpp mode, we draw in groups of 2 pixels, so halve the width now */ | |
| 1503 | if (flags & TILE_4BPP) | |
| 1504 | { | |
| 1505 | assert(width % 2 == 0); | |
| 1506 | width /= 2; | |
| 1507 | } | |
| 1508 | ||
| 1509 | /* iterate over rows */ | |
| 1510 | for (ty = 0; ty < height; ty++) | |
| 1511 | { | |
| 1512 | UINT16 *pixptr = BITMAP_ADDR16(pixmap, y0, x0); | |
| 1513 | UINT8 *flagsptr = BITMAP_ADDR8(flagsmap, y0, x0); | |
| 1514 | int xoffs = 0; | |
| 1515 | ||
| 1516 | /* pre-advance to the next row */ | |
| 1517 | y0 += dy0; | |
| 1518 | ||
| 1519 | /* 8bpp data */ | |
| 1520 | if (!(flags & TILE_4BPP)) | |
| 1521 | { | |
| 1522 | for (tx = 0; tx < width; tx++) | |
| 1523 | { | |
| 1524 | pen_t pen = palette_lookup[*pendata++]; | |
| 1525 | UINT8 map = penmap[pen]; | |
| 1526 | pixptr[xoffs] = pen; | |
| 1527 | flagsptr[xoffs] = map | category; | |
| 1528 | andmask &= map; | |
| 1529 | ormask |= map; | |
| 1530 | xoffs += dx0; | |
| 1531 | } | |
| 1532 | } | |
| 1533 | ||
| 1534 | /* 4bpp data */ | |
| 1535 | else | |
| 1536 | { | |
| 1537 | for (tx = 0; tx < width; tx++) | |
| 1538 | { | |
| 1539 | UINT8 data = *pendata++; | |
| 1540 | pen_t pen; | |
| 1541 | UINT8 map; | |
| 1542 | ||
| 1543 | pen = palette_lookup[data & 0x0f]; | |
| 1544 | map = penmap[pen]; | |
| 1545 | pixptr[xoffs] = pen; | |
| 1546 | flagsptr[xoffs] = map | category; | |
| 1547 | andmask &= map; | |
| 1548 | ormask |= map; | |
| 1549 | xoffs += dx0; | |
| 1550 | ||
| 1551 | pen = palette_lookup[data >> 4]; | |
| 1552 | map = penmap[pen]; | |
| 1553 | pixptr[xoffs] = pen; | |
| 1554 | flagsptr[xoffs] = map | category; | |
| 1555 | andmask &= map; | |
| 1556 | ormask |= map; | |
| 1557 | xoffs += dx0; | |
| 1558 | } | |
| 1559 | } | |
| 1560 | } | |
| 1561 | return andmask ^ ormask; | |
| 1562 | } | |
| 1563 | ||
| 1564 | ||
| 1565 | /*------------------------------------------------- | |
| 1566 | 1460 | tile_apply_bitmask - apply a bitmask to an |
| 1567 | 1461 | already-rendered tile by modifying the |
| 1568 | 1462 | flagsmap appropriately |
| r1679 | r1680 | |
|---|---|---|
| 104 | 104 | column and row to a memory index; several standard mappers |
| 105 | 105 | are provided, with tilemap_scan_rows being the most common |
| 106 | 106 | |
| 107 | type = the type of tilemap this is; | |
| 108 | ||
| 109 | TILEMAP_TYPE_PEN - this is the most common type, | |
| 110 | and means that transparency is determined by taking the | |
| 111 | raw pen value and looking it up in a table to determine | |
| 112 | which layer(s) each pixel belongs to | |
| 113 | ||
| 114 | TILEMAP_TYPE_COLORTABLE - this is less common and | |
| 115 | will eventually be deprecated; it means that transparency | |
| 116 | is determined by taking the raw pen value, looking it up | |
| 117 | in the machine's colortable, and then looking that value | |
| 118 | up in a table to determine which layer(s) each pixel | |
| 119 | belongs to | |
| 120 | ||
| 121 | 107 | tilewidth = the width, in pixels, of each individual tile |
| 122 | 108 | |
| 123 | 109 | tileheight = the height, in pixels, of each individual tile |
| r1679 | r1680 | |
| 205 | 191 | tmap = tilemap_create( |
| 206 | 192 | my_get_info, // pointer to your get_info |
| 207 | 193 | tilemap_scan_rows, // standard row-major mapper |
| 208 | TILEMAP_TYPE_PEN, // transparency from pens | |
| 209 | 194 | 8,8, // 8x8 tiles |
| 210 | 195 | 64,32); // 64 columns, 32 rows |
| 211 | 196 | |
| r1679 | r1680 | |
| 255 | 240 | transparent pen for them; this no longer works. |
| 256 | 241 | |
| 257 | 242 | TILEMAP_TRANSPARENT: This described a tilemap with a single |
| 258 | transparent pen. To create the same effect, make a new tilemap | |
| 259 | of type TILEMAP_TYPE_PEN, and then call | |
| 243 | transparent pen. To create the same effect, call | |
| 260 | 244 | tilemap_set_transparent_pen() to specify which pen is |
| 261 | 245 | transparent; all other pens will map to layer 0. |
| 262 | 246 | |
| 263 | TILEMAP_TRANSPARENT_COLOR: This works just like before and | |
| 264 | even has the same type name. Create a tilemap of type | |
| 265 | TILEMAP_TYPE_COLORTABLE and call | |
| 266 | tilemap_set_transparent_pen() to specify which remapped pen | |
| 267 | is transparent. | |
| 268 | ||
| 269 | 247 | TILEMAP_BITMASK: This type is no longer special; with the new |
| 270 | 248 | code, any tile_get_info callback can specify a bitmask which |
| 271 | 249 | will be processed after rendering to make some pixels |
| r1679 | r1680 | |
| 276 | 254 | also allowed for you to choose one of 4 mappings on a per-tile |
| 277 | 255 | basis. All of this functionality is now expanded: you can |
| 278 | 256 | specify one of 3 layers and can choose from one of 256 mappings |
| 279 | on a per-tile basis. You just create a tilemap of type | |
| 280 | TILEMAP_TYPE_PEN and call tilemap_set_transmask(), | |
| 257 | on a per-tile basis. You just call tilemap_set_transmask(), | |
| 281 | 258 | which still exists but maps onto the new behavior. The "front" |
| 282 | 259 | layer is now "layer 0" and the "back" layer is now "layer 1". |
| 283 | 260 | |
| r1679 | r1680 | |
| 406 | 383 | typedef struct _tilemap tilemap; |
| 407 | 384 | |
| 408 | 385 | |
| 409 | /* tilemap types */ | |
| 410 | enum _tilemap_type | |
| 411 | { | |
| 412 | TILEMAP_TYPE_PEN, /* pen-to-layer mapping is determined by pen lookup */ | |
| 413 | TILEMAP_TYPE_COLORTABLE /* pen-to-layer mapping is determined by colortable[pen] lookup */ | |
| 414 | }; | |
| 415 | typedef enum _tilemap_type tilemap_type; | |
| 416 | ||
| 417 | ||
| 418 | 386 | /* tile_data is filled in by the get_tile_info callback */ |
| 419 | 387 | typedef struct _tile_data tile_data; |
| 420 | 388 | struct _tile_data |
| 421 | 389 | { |
| 422 | 390 | const UINT8 * pen_data; /* required */ |
| 423 | const UINT8 * mask_data; /* required | |
| 391 | const UINT8 * mask_data; /* required | |
| 424 | 392 | pen_t palette_base; /* defaults to 0 */ |
| 425 | 393 | UINT8 category; /* defaults to 0; range from 0..15 */ |
| 426 | 394 | UINT8 group; /* defaults to 0; range from 0..TILEMAP_NUM_GROUPS */ |
| r1679 | r1680 | |
| 459 | 427 | /* ----- tilemap creation and configuration ----- */ |
| 460 | 428 | |
| 461 | 429 | /* create a new tilemap; note that tilemaps are tracked by the core so there is no dispose */ |
| 462 | tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, | |
| 430 | tilemap *tilemap_create(tile_get_info_callback tile_get_info, tilemap_mapper_callback mapper, | |
| 463 | 431 | |
| 464 | 432 | /* specify a parameter to be passed into the tile_get_info callback */ |
| 465 | 433 | void tilemap_set_user_data(tilemap *tmap, void *user_data); |
| r1679 | r1680 | |
|---|---|---|
| 333 | 333 | if (machine->drv->video_attributes & VIDEO_UPDATE_SCANLINE) |
| 334 | 334 | { |
| 335 | 335 | info->scanline_timer = timer_alloc(scanline_update_callback, NULL); |
| 336 | timer_adjust(info->scanline_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 336 | timer_adjust_oneshot(info->scanline_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | /* register for save states */ |
| r1679 | r1680 | |
| 774 | 774 | /* if we are on scanline 0 already, reset the update timer immediately */ |
| 775 | 775 | /* otherwise, defer until the next scanline 0 */ |
| 776 | 776 | if (video_screen_get_vpos(scrnum) == 0) |
| 777 | timer_adjust(info->scanline0_timer, attotime_zero, scrnum | |
| 777 | timer_adjust_oneshot(info->scanline0_timer, attotime_zero, scrnum | |
| 778 | 778 | else |
| 779 | timer_adjust(info->scanline0_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 779 | timer_adjust_oneshot(info->scanline0_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | |
| r1679 | r1680 | |
| 1038 | 1038 | viddata->scrinfo[scrnum].last_partial_scan = 0; |
| 1039 | 1039 | global.partial_updates_this_frame = 0; |
| 1040 | 1040 | |
| 1041 | timer_adjust(viddata->scrinfo[scrnum].scanline0_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 1041 | timer_adjust_oneshot(viddata->scrinfo[scrnum].scanline0_timer, video_screen_get_time_until_pos(scrnum, 0, 0), scrnum | |
| 1042 | 1042 | } |
| 1043 | 1043 | |
| 1044 | 1044 | |
| r1679 | r1680 | |
| 1060 | 1060 | scanline++; |
| 1061 | 1061 | if (scanline > machine->screen[scrnum].visarea.max_y) |
| 1062 | 1062 | scanline = machine->screen[scrnum].visarea.min_y; |
| 1063 | timer_adjust(viddata->scrinfo[scrnum].scanline_timer, video_screen_get_time_until_pos(scrnum, scanline, 0), (scanline << 8) | scrnum | |
| 1063 | timer_adjust_oneshot(viddata->scrinfo[scrnum].scanline_timer, video_screen_get_time_until_pos(scrnum, scanline, 0), (scanline << 8) | scrnum | |
| 1064 | 1064 | } |
| 1065 | 1065 | |
| 1066 | 1066 |
| r1679 | r1680 | |
|---|---|---|
| 541 | 541 | opbasefunc = cpudata[activecpu].opbase; |
| 542 | 542 | |
| 543 | 543 | #ifdef ENABLE_DEBUGGER |
| 544 | if (activecpu != -1) | |
| 544 | if (activecpu != -1 && Machine->debug_mode) | |
| 545 | 545 | debug_get_memory_hooks(activecpu, &debug_hook_read, &debug_hook_write); |
| 546 | 546 | else |
| 547 | 547 | { |
| r1679 | r1680 | |
|---|---|---|
| 166 | 166 | |
| 167 | 167 | EMUVIDEOOBJS = \ |
| 168 | 168 | $(EMUVIDEO)/cdp1869.o \ |
| 169 | $(EMUVIDEO)/crtc6845.o \ | |
| 170 | 169 | $(EMUVIDEO)/generic.o \ |
| 170 | $(EMUVIDEO)/mc6845.o \ | |
| 171 | 171 | $(EMUVIDEO)/poly.o \ |
| 172 | 172 | $(EMUVIDEO)/resnet.o \ |
| 173 | 173 | $(EMUVIDEO)/s2636.o \ |
| r1679 | r1680 | |
|---|---|---|
| 642 | 642 | { |
| 643 | 643 | mame_private *mame = machine->mame_data; |
| 644 | 644 | |
| 645 | timer_adjust(mame->soft_reset_timer, attotime_zero, 0 | |
| 645 | timer_adjust_oneshot(mame->soft_reset_timer, attotime_zero, 0 | |
| 646 | 646 | |
| 647 | 647 | /* we can't be paused since the timer needs to fire */ |
| 648 | 648 | mame_pause(machine, FALSE); |
| r1679 | r1680 | |
|---|---|---|
| 1167 | 1167 | |
| 1168 | 1168 | /* Check if input file is an eXtended INP file */ |
| 1169 | 1169 | extended_inp = (memcmp(check, "XINP\0\0\0", 7) == 0); |
| 1170 | if (extended_inp) | |
| 1170 | if (!extended_inp) | |
| 1171 | 1171 | { |
| 1172 | 1172 | /* read playback header */ |
| 1173 | 1173 | mame_fread(machine->playback_file, &inpheader, sizeof(inpheader)); |
| r1679 | r1680 | |
|---|---|---|
| 316 | 316 | |
| 317 | 317 | timer = timer_alloc( timekeeper_tick, c ); |
| 318 | 318 | duration = ATTOTIME_IN_SEC(1); |
| 319 | timer_adjust( timer, duration, 0, duration ); | |
| 319 | timer_adjust_periodic( timer, duration, 0, duration ); | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | static void timekeeper_nvram( int chip, mame_file *file, int read_or_write ) |
| r1679 | r1680 | |
|---|---|---|
| 324 | 324 | { |
| 325 | 325 | /* timer is on and is connected to clock */ |
| 326 | 326 | attotime period = attotime_mul(ATTOTIME_IN_HZ(timer->cia->clock), (timer->count ? timer->count : 0x10000)); |
| 327 | timer_adjust(timer->timer, period, 0 | |
| 327 | timer_adjust_oneshot(timer->timer, period, 0 | |
| 328 | 328 | } |
| 329 | 329 | else |
| 330 | 330 | { |
| 331 | 331 | /* timer is off or not connected to clock */ |
| 332 | timer_adjust(timer->timer, attotime_never, 0 | |
| 332 | timer_adjust_oneshot(timer->timer, attotime_never, 0 | |
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | 335 |
| r1679 | r1680 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | if (attotime_compare(timer_timeelapsed(chip->timer), delay_time) >= 0) |
| 131 | 131 | { |
| 132 | timer_adjust(chip->timer, duration, 0 | |
| 132 | timer_adjust_oneshot(chip->timer, duration, 0 | |
| 133 | 133 | |
| 134 | 134 | if (LOG) logerror("74123 #%d: Retriggering pulse. Duration: %f\n", chip->which, attotime_to_double(duration)); |
| 135 | 135 | } |
| r1679 | r1680 | |
| 141 | 141 | else |
| 142 | 142 | { |
| 143 | 143 | /* starting */ |
| 144 | timer_adjust(chip->timer, duration, 0 | |
| 144 | timer_adjust_oneshot(chip->timer, duration, 0 | |
| 145 | 145 | |
| 146 | 146 | set_output(chip); |
| 147 | 147 | |
| r1679 | r1680 | |
| 181 | 181 | /* clear the output if A=LO, B=HI and falling edge on clear */ |
| 182 | 182 | if (!data && chip->clear && chip->B && !chip->A && !chip->clear) |
| 183 | 183 | { |
| 184 | timer_adjust(chip->timer, attotime_zero, 0 | |
| 184 | timer_adjust_oneshot(chip->timer, attotime_zero, 0 | |
| 185 | 185 | |
| 186 | 186 | if (LOG) logerror("74123 #%d: Cleared\n", which); |
| 187 | 187 | } |
| r1679 | r1680 | |
|---|---|---|
| 299 | 299 | { |
| 300 | 300 | attotime rx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->rx_clock), acia_p->divide); |
| 301 | 301 | attotime tx_period = attotime_mul(ATTOTIME_IN_HZ(acia_p->tx_clock), acia_p->divide); |
| 302 | timer_adjust(acia_p->rx_timer, rx_period, which, rx_period); | |
| 303 | timer_adjust(acia_p->tx_timer, tx_period, which, tx_period); | |
| 302 | timer_adjust_periodic(acia_p->rx_timer, rx_period, which, rx_period); | |
| 303 | timer_adjust_periodic(acia_p->tx_timer, tx_period, which, tx_period); | |
| 304 | 304 | } |
| 305 | 305 | } |
| 306 | 306 |
| r1679 | r1680 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | static void reset_timer( void ) |
| 21 | 21 | { |
| 22 | timer_adjust( watchdog_timer, ATTOTIME_IN_SEC( 5 ), 0 | |
| 22 | timer_adjust_oneshot( watchdog_timer, ATTOTIME_IN_SEC( 5 ), 0 | |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | void mb3773_set_ck( UINT8 new_ck ) |
| r1679 | r1680 | |
|---|---|---|
| 1388 | 1388 | if (attotime_compare(timer_timeelapsed(ide->last_status_timer), TIME_PER_ROTATION) > 0) |
| 1389 | 1389 | { |
| 1390 | 1390 | result |= IDE_STATUS_HIT_INDEX; |
| 1391 | timer_adjust(ide->last_status_timer, attotime_never, 0 | |
| 1391 | timer_adjust_oneshot(ide->last_status_timer, attotime_never, 0 | |
| 1392 | 1392 | } |
| 1393 | 1393 | |
| 1394 | 1394 | /* clear interrutps only when reading the real status */ |
| r1679 | r1680 | |
| 1554 | 1554 | { |
| 1555 | 1555 | ide->status |= IDE_STATUS_BUSY; |
| 1556 | 1556 | ide->status &= ~IDE_STATUS_DRIVE_READY; |
| 1557 | timer_adjust(ide->reset_timer, ATTOTIME_IN_MSEC(5), 0 | |
| 1557 | timer_adjust_oneshot(ide->reset_timer, ATTOTIME_IN_MSEC(5), 0 | |
| 1558 | 1558 | } |
| 1559 | 1559 | break; |
| 1560 | 1560 | } |
| r1679 | r1680 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | INLINE void r6532_set_timer(int which, UINT8 count) |
| 48 | 48 | { |
| 49 | timer_adjust( r6532[which].counter_timer, attotime_mul(ATTOTIME_IN_HZ(r6532[which].clock), (count << r6532[which].shift) + 1), which | |
| 49 | timer_adjust_oneshot( r6532[which].counter_timer, attotime_mul(ATTOTIME_IN_HZ(r6532[which].clock), (count << r6532[which].shift) + 1), which | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 |
| r1679 | r1680 | |
|---|---|---|
| 322 | 322 | { |
| 323 | 323 | if (T1_SET_PB7(v->acr)) |
| 324 | 324 | v->out_b ^= 0x80; |
| 325 | timer_adjust(v->t1, v_cycles_to_time(v, TIMER1_VALUE(v) + IFR_DELAY), which | |
| 325 | timer_adjust_oneshot(v->t1, v_cycles_to_time(v, TIMER1_VALUE(v) + IFR_DELAY), which | |
| 326 | 326 | } |
| 327 | 327 | else |
| 328 | 328 | { |
| r1679 | r1680 | |
| 719 | 719 | logerror("6522VIA chip %d: Port B is being written to but has no handler. PC: %08X - %02X\n", which, safe_activecpu_get_pc(), write_data); |
| 720 | 720 | } |
| 721 | 721 | } |
| 722 | timer_adjust(v->t1, v_cycles_to_time(v, TIMER1_VALUE(v) + IFR_DELAY), which | |
| 722 | timer_adjust_oneshot(v->t1, v_cycles_to_time(v, TIMER1_VALUE(v) + IFR_DELAY), which | |
| 723 | 723 | v->t1_active = 1; |
| 724 | 724 | break; |
| 725 | 725 | |
| r1679 | r1680 | |
| 735 | 735 | |
| 736 | 736 | if (!T2_COUNT_PB6(v->acr)) |
| 737 | 737 | { |
| 738 | timer_adjust(v->t2, v_cycles_to_time(v, TIMER2_VALUE(v) + IFR_DELAY), which | |
| 738 | timer_adjust_oneshot(v->t2, v_cycles_to_time(v, TIMER2_VALUE(v) + IFR_DELAY), which | |
| 739 | 739 | v->t2_active = 1; |
| 740 | 740 | } |
| 741 | 741 | else |
| r1679 | r1680 | |
| 802 | 802 | } |
| 803 | 803 | if (T1_CONTINUOUS(data)) |
| 804 | 804 | { |
| 805 | timer_adjust(v->t1, v_cycles_to_time(v, counter1 + IFR_DELAY), which | |
| 805 | timer_adjust_oneshot(v->t1, v_cycles_to_time(v, counter1 + IFR_DELAY), which | |
| 806 | 806 | v->t1_active = 1; |
| 807 | 807 | } |
| 808 | 808 | } |
| r1679 | r1680 | |
|---|---|---|
| 287 | 287 | static void wd33c93_complete_cmd( UINT8 status ) |
| 288 | 288 | { |
| 289 | 289 | /* fire off a timer to complete the command */ |
| 290 | timer_adjust( scsi_data.cmd_timer, ATTOTIME_IN_USEC(1), status | |
| 290 | timer_adjust_oneshot( scsi_data.cmd_timer, ATTOTIME_IN_USEC(1), status | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | /* command handlers */ |
| r1679 | r1680 | |
|---|---|---|
| 128 | 128 | |
| 129 | 129 | static void pic8259_set_timer(int which) |
| 130 | 130 | { |
| 131 | timer_adjust(pic[which].timer, attotime_zero, which | |
| 131 | timer_adjust_oneshot(pic[which].timer, attotime_zero, which | |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 |
| r1679 | r1680 | |
|---|---|---|
| 335 | 335 | c->status = 1 << 3; |
| 336 | 336 | c->flash_mode = FM_ERASEAMD4; |
| 337 | 337 | |
| 338 | timer_adjust( c->timer, ATTOTIME_IN_SEC( 17 ), 0 | |
| 338 | timer_adjust_oneshot( c->timer, ATTOTIME_IN_SEC( 17 ), 0 | |
| 339 | 339 | } |
| 340 | 340 | else if( ( data & 0xff ) == 0x30 ) |
| 341 | 341 | { |
| r1679 | r1680 | |
| 360 | 360 | c->status = 1 << 3; |
| 361 | 361 | c->flash_mode = FM_ERASEAMD4; |
| 362 | 362 | |
| 363 | timer_adjust( c->timer, ATTOTIME_IN_SEC( 1 ), 0 | |
| 363 | timer_adjust_oneshot( c->timer, ATTOTIME_IN_SEC( 1 ), 0 | |
| 364 | 364 | } |
| 365 | 365 | else |
| 366 | 366 | { |
| r1679 | r1680 | |
| 429 | 429 | c->status = 0x00; |
| 430 | 430 | c->flash_mode = FM_READSTATUS; |
| 431 | 431 | |
| 432 | timer_adjust( c->timer, ATTOTIME_IN_SEC( 1 ), 0 | |
| 432 | timer_adjust_oneshot( c->timer, ATTOTIME_IN_SEC( 1 ), 0 | |
| 433 | 433 | break; |
| 434 | 434 | } |
| 435 | 435 | else |
| r1679 | r1680 | |
|---|---|---|
| 72 | 72 | verboselog( 1, "ds2401_reset(%d)\n", which ); |
| 73 | 73 | |
| 74 | 74 | c->state = STATE_RESET; |
| 75 | timer_adjust( c->timer, attotime_never, which | |
| 75 | timer_adjust_oneshot( c->timer, attotime_never, which | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | static TIMER_CALLBACK( ds2401_tick ) |
| r1679 | r1680 | |
| 86 | 86 | verboselog( 2, "ds2401_tick(%d) state_reset1 %d\n", which, c->rx ); |
| 87 | 87 | c->tx = 0; |
| 88 | 88 | c->state = STATE_RESET2; |
| 89 | timer_adjust( c->timer, c->t_pdl, which | |
| 89 | timer_adjust_oneshot( c->timer, c->t_pdl, which | |
| 90 | 90 | break; |
| 91 | 91 | case STATE_RESET2: |
| 92 | 92 | verboselog( 2, "ds2401_tick(%d) state_reset2 %d\n", which, c->rx ); |
| r1679 | r1680 | |
| 181 | 181 | break; |
| 182 | 182 | case STATE_COMMAND: |
| 183 | 183 | verboselog( 2, "ds2401_write(%d) state_command\n", which ); |
| 184 | timer_adjust( c->timer, c->t_samp, which | |
| 184 | timer_adjust_oneshot( c->timer, c->t_samp, which | |
| 185 | 185 | break; |
| 186 | 186 | case STATE_READROM: |
| 187 | 187 | if( c->bit == 0 ) |
| r1679 | r1680 | |
| 198 | 198 | c->byte++; |
| 199 | 199 | } |
| 200 | 200 | verboselog( 2, "ds2401_write(%d) state_readrom %d\n", which, c->tx ); |
| 201 | timer_adjust( c->timer, c->t_rdv, which | |
| 201 | timer_adjust_oneshot( c->timer, c->t_rdv, which | |
| 202 | 202 | break; |
| 203 | 203 | default: |
| 204 | 204 | verboselog( 0, "ds2401_write(%d) state not handled: %d\n", which, c->state ); |
| 205 | 205 | break; |
| 206 | 206 | } |
| 207 | timer_adjust( c->reset_timer, c->t_rstl, which | |
| 207 | timer_adjust_oneshot( c->reset_timer, c->t_rstl, which | |
| 208 | 208 | } |
| 209 | 209 | else if( data == 1 && c->rx == 0 ) |
| 210 | 210 | { |
| r1679 | r1680 | |
| 212 | 212 | { |
| 213 | 213 | case STATE_RESET: |
| 214 | 214 | c->state = STATE_RESET1; |
| 215 | timer_adjust( c->timer, c->t_pdh, which | |
| 215 | timer_adjust_oneshot( c->timer, c->t_pdh, which | |
| 216 | 216 | break; |
| 217 | 217 | } |
| 218 | timer_adjust( c->reset_timer, attotime_never, which | |
| 218 | timer_adjust_oneshot( c->reset_timer, attotime_never, which | |
| 219 | 219 | } |
| 220 | 220 | c->rx = data; |
| 221 | 221 | } |
| r1679 | r1680 | |
|---|---|---|
| 171 | 171 | |
| 172 | 172 | /* store the result */ |
| 173 | 173 | currptr->counter[counter] = (msb << 8) | lsb; |
| 174 | timer_adjust(currptr->timer[counter], attotime_mul(ATTOTIME_IN_HZ(clock), currptr->counter[counter]), which | |
| 174 | timer_adjust_oneshot(currptr->timer[counter], attotime_mul(ATTOTIME_IN_HZ(clock), currptr->counter[counter]), which | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /* word mode */ |
| r1679 | r1680 | |
| 197 | 197 | currptr->counter[counter] = word; |
| 198 | 198 | duration = attotime_mul(ATTOTIME_IN_HZ(clock), currptr->counter[counter]); |
| 199 | 199 | if (counter == 2) duration = attotime_mul(duration, currptr->t3_divisor); |
| 200 | timer_adjust(currptr->timer[counter], duration, which | |
| 200 | timer_adjust_oneshot(currptr->timer[counter], duration, which | |
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
| r1679 | r1680 | |
| 321 | 321 | |
| 322 | 322 | duration = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 323 | 323 | if (idx == 2) duration = attotime_mul(duration, currptr->t3_divisor); |
| 324 | timer_adjust(currptr->timer[idx], duration, which | |
| 324 | timer_adjust_oneshot(currptr->timer[idx], duration, which | |
| 325 | 325 | PLOG(("MC6840 #%d: reload_count(%d): output = %lf\n", which, idx, attotime_to_double(duration))); |
| 326 | 326 | |
| 327 | 327 | if (!currptr->control_reg[idx] & 0x02) |
| r1679 | r1680 | |
|---|---|---|
| 297 | 297 | dma[which].is_read = 1; |
| 298 | 298 | dma[which].cur_cycle = (PORTA_IS_SOURCE(cntx) ? PORTA_CYCLE_LEN(cntx) : PORTB_CYCLE_LEN(cntx)); |
| 299 | 299 | next = ATTOTIME_IN_HZ(dma[which].intf->clockhz); |
| 300 | timer_adjust(dma[which].timer, | |
| 300 | timer_adjust_periodic(dma[which].timer, | |
| 301 | 301 | attotime_zero, |
| 302 | 302 | which, |
| 303 | 303 | /* 1 byte transferred in 4 clock cycles */ |
| r1679 | r1680 | |
|---|---|---|
| 152 | 152 | ch->pending_interrupt |= IRQ_TX_HOLDING_REG_EMPTY; |
| 153 | 153 | check_interrupts(chip, channel); |
| 154 | 154 | |
| 155 | timer_adjust(duart[chip].ch[channel].tx_fifo_timer, attotime_never, (chip * 2) + channel | |
| 155 | timer_adjust_oneshot(duart[chip].ch[channel].tx_fifo_timer, attotime_never, (chip * 2) + channel | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | static void duart_push_tx_fifo(int chip, int channel, UINT8 data) |
| r1679 | r1680 | |
| 164 | 164 | |
| 165 | 165 | period = attotime_mul(ATTOTIME_IN_HZ(duart[chip].frequency), ch->divisor * 16 * 16 * 8); |
| 166 | 166 | |
| 167 | timer_adjust(duart[chip].ch[channel].tx_fifo_timer, period, (chip * 2) + channel | |
| 167 | timer_adjust_oneshot(duart[chip].ch[channel].tx_fifo_timer, period, (chip * 2) + channel | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | #ifdef UNUSED_FUNCTION |
| r1679 | r1680 | |
| 395 | 395 | |
| 396 | 396 | // allocate transmit timers |
| 397 | 397 | duart[chip].ch[0].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback, NULL); |
| 398 | timer_adjust(duart[chip].ch[0].tx_fifo_timer, attotime_never, (chip * 2) + 0 | |
| 398 | timer_adjust_oneshot(duart[chip].ch[0].tx_fifo_timer, attotime_never, (chip * 2) + 0 | |
| 399 | 399 | |
| 400 | 400 | duart[chip].ch[1].tx_fifo_timer = timer_alloc(tx_fifo_timer_callback, NULL); |
| 401 | timer_adjust(duart[chip].ch[1].tx_fifo_timer, attotime_never, (chip * 2) + 1 | |
| 401 | timer_adjust_oneshot(duart[chip].ch[1].tx_fifo_timer, attotime_never, (chip * 2) + 1 | |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | void pc16552d_rx_data(int chip, int channel, UINT8 data) |
| r1679 | r1680 | |
|---|---|---|
| 196 | 196 | dma[which].status |= 0x10 << channel; |
| 197 | 197 | dma[which].status &= ~(0x01 << channel); |
| 198 | 198 | |
| 199 | timer_adjust(dma[which].timer, | |
| 199 | timer_adjust_periodic(dma[which].timer, | |
| 200 | 200 | attotime_zero, |
| 201 | 201 | which * 4 + channel, |
| 202 | 202 | double_to_attotime(dma[which].intf->bus_speed)); |
| r1679 | r1680 | |
| 237 | 237 | |
| 238 | 238 | static void prepare_msb_flip(int which) |
| 239 | 239 | { |
| 240 | timer_adjust(dma[which].msbflip_timer, attotime_zero, which | |
| 240 | timer_adjust_oneshot(dma[which].msbflip_timer, attotime_zero, which | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 |
| r1679 | r1680 | |
|---|---|---|
| 220 | 220 | if (pending_transfer) |
| 221 | 221 | { |
| 222 | 222 | next = ATTOTIME_IN_HZ(dma[which].intf->clockhz / 4 ); |
| 223 | timer_adjust(dma[which].timer, | |
| 223 | timer_adjust_periodic(dma[which].timer, | |
| 224 | 224 | attotime_zero, |
| 225 | 225 | which, |
| 226 | 226 | /* 1 byte transferred in 4 clock cycles */ |
| r1679 | r1680 | |
| 247 | 247 | |
| 248 | 248 | static void prepare_msb_flip(int which) |
| 249 | 249 | { |
| 250 | timer_adjust(dma[which].msbflip_timer, attotime_zero, which | |
| 250 | timer_adjust_oneshot(dma[which].msbflip_timer, attotime_zero, which | |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 |
| r1679 | r1680 | |
|---|---|---|
| 329 | 329 | interrupt_check(sio); |
| 330 | 330 | |
| 331 | 331 | /* start the receive timer running */ |
| 332 | timer_adjust(chan->receive_timer, tpc, ((sio - sios) << 1) | ch, tpc); | |
| 332 | timer_adjust_periodic(chan->receive_timer, tpc, ((sio - sios) << 1) | ch, tpc); | |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | int max = 0; |
| 72 | 72 | attotime duration = attotime_zero; |
| 73 | 73 | |
| 74 | timer_adjust(tmp68301_timer[i],attotime_never,i | |
| 74 | timer_adjust_oneshot(tmp68301_timer[i],attotime_never,i | |
| 75 | 75 | |
| 76 | 76 | // timers 1&2 only |
| 77 | 77 | switch( (TCR & 0x0030)>>4 ) // MR2..1 |
| r1679 | r1680 | |
| 101 | 101 | if (!(TCR & 0x0002)) // CS |
| 102 | 102 | { |
| 103 | 103 | if (attotime_compare(duration, attotime_zero)) |
| 104 | timer_adjust(tmp68301_timer[i],duration,i | |
| 104 | timer_adjust_oneshot(tmp68301_timer[i],duration,i | |
| 105 | 105 | else |
| 106 | 106 | logerror("CPU #0 PC %06X: TMP68301 error, timer %d duration is 0\n",activecpu_get_pc(),i); |
| 107 | 107 | } |
| r1679 | r1680 | |
|---|---|---|
| 188 | 188 | { |
| 189 | 189 | ctc->mode[i] = RESET_ACTIVE; |
| 190 | 190 | ctc->tconst[i] = 0x100; |
| 191 | timer_adjust(ctc->timer[i], attotime_never, 0 | |
| 191 | timer_adjust_oneshot(ctc->timer[i], attotime_never, 0 | |
| 192 | 192 | ctc->int_state[i] = 0; |
| 193 | 193 | } |
| 194 | 194 | interrupt_check(which); |
| r1679 | r1680 | |
| 256 | 256 | attotime period = ((mode & PRESCALER) == PRESCALER_16) ? ctc->period16 : ctc->period256; |
| 257 | 257 | period = attotime_mul(period, ctc->tconst[ch]); |
| 258 | 258 | |
| 259 | timer_adjust(ctc->timer[ch], period, (which << 2) + ch, period); | |
| 259 | timer_adjust_periodic(ctc->timer[ch], period, (which << 2) + ch, period); | |
| 260 | 260 | } |
| 261 | 261 | else |
| 262 | timer_adjust(ctc->timer[ch], attotime_never, 0 | |
| 262 | timer_adjust_oneshot(ctc->timer[ch], attotime_never, 0 | |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | /* else set the bit indicating that we're waiting for the appropriate trigger */ |
| r1679 | r1680 | |
| 298 | 298 | /* if we're being reset, clear out any pending timers for this channel */ |
| 299 | 299 | if ((data & RESET) == RESET_ACTIVE) |
| 300 | 300 | { |
| 301 | timer_adjust(ctc->timer[ch], attotime_never, 0 | |
| 301 | timer_adjust_oneshot(ctc->timer[ch], attotime_never, 0 | |
| 302 | 302 | /* note that we don't clear the interrupt state here! */ |
| 303 | 303 | } |
| 304 | 304 | |
| r1679 | r1680 | |
| 371 | 371 | period = attotime_mul(period, ctc->tconst[ch]); |
| 372 | 372 | |
| 373 | 373 | VPRINTF(("CTC period %s\n", attotime_string(period, 9))); |
| 374 | timer_adjust(ctc->timer[ch], period, (which << 2) + ch, period); | |
| 374 | timer_adjust_periodic(ctc->timer[ch], period, (which << 2) + ch, period); | |
| 375 | 375 | } |
| 376 | 376 | else |
| 377 | 377 | { |
| 378 | 378 | VPRINTF(("CTC disabled\n")); |
| 379 | 379 | |
| 380 | timer_adjust(ctc->timer[ch], attotime_never, 0 | |
| 380 | timer_adjust_oneshot(ctc->timer[ch], attotime_never, 0 | |
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 |
| r1679 | r1680 | |
|---|---|---|
| 774 | 774 | else |
| 775 | 775 | { |
| 776 | 776 | timer->outputtimer = timer_alloc(outputcallback, NULL); |
| 777 | timer_adjust(timer->outputtimer, attotime_never, i | (timerno<<4) | |
| 777 | timer_adjust_oneshot(timer->outputtimer, attotime_never, i | (timerno<<4) | |
| 778 | 778 | } |
| 779 | 779 | if (timer->freq_callback == NULL) |
| 780 | 780 | timer->freqtimer = NULL; |
| 781 | 781 | else |
| 782 | 782 | { |
| 783 | 783 | timer->freqtimer = timer_alloc(freqcallback, NULL); |
| 784 | timer_adjust(timer->freqtimer, attotime_never, i | (timerno<<4) | |
| 784 | timer_adjust_oneshot(timer->freqtimer, attotime_never, i | (timerno<<4) | |
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | /* set up state save values */ |
| r1679 | r1680 | |
|---|---|---|
| 306 | 306 | ds2404.rtc[ 4 ] = ( current_time >> 24 ) & 0xff; |
| 307 | 307 | |
| 308 | 308 | timer = timer_alloc( DS2404_tick , NULL); |
| 309 | timer_adjust( timer, ATTOTIME_IN_HZ( 256 ), 0, ATTOTIME_IN_HZ( 256 ) ); | |
| 309 | timer_adjust_periodic( timer, ATTOTIME_IN_HZ( 256 ), 0, ATTOTIME_IN_HZ( 256 ) ); | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | void DS2404_load(mame_file *file) |
| r1679 | r1680 | |
|---|---|---|
| 318 | 318 | rtc.xram = xram; |
| 319 | 319 | |
| 320 | 320 | rtc.update_timer = timer_alloc(rtc_begin_update_callback, NULL); |
| 321 | timer_adjust(rtc.update_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1)); | |
| 321 | timer_adjust_periodic(rtc.update_timer, ATTOTIME_IN_SEC(1), 0, ATTOTIME_IN_SEC(1)); | |
| 322 | 322 | rtc.SQW_timer = timer_alloc(rtc_SQW_callback, NULL); |
| 323 | 323 | rtc.interrupt_callback = interrupt_callback; |
| 324 | 324 | } |
| r1679 | r1680 | |
| 410 | 410 | attotime elapsed = timer_timeelapsed(rtc.update_timer); |
| 411 | 411 | |
| 412 | 412 | if (attotime_compare(half_period, elapsed) > 0) |
| 413 | timer_adjust(rtc.SQW_timer, attotime_sub(half_period, elapsed), 0 | |
| 413 | timer_adjust_oneshot(rtc.SQW_timer, attotime_sub(half_period, elapsed), 0 | |
| 414 | 414 | else |
| 415 | timer_adjust(rtc.SQW_timer, half_period, 0 | |
| 415 | timer_adjust_oneshot(rtc.SQW_timer, half_period, 0 | |
| 416 | 416 | } |
| 417 | 417 | else |
| 418 | 418 | { |
| 419 | 419 | rtc.SQW_internal_state = 0; /* right??? */ |
| 420 | 420 | |
| 421 | 421 | /* Stop the divider used for SQW and periodic interrupts. */ |
| 422 | timer_adjust(rtc.SQW_timer, attotime_never, 0 | |
| 422 | timer_adjust_oneshot(rtc.SQW_timer, attotime_never, 0 | |
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | /* The UIP bit is read-only */ |
| r1679 | r1680 | |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | half_period = attotime_div(ATTOTIME_IN_HZ(SQW_freq_table[rtc.regs[reg_A] & reg_A_RS]), 2); |
| 492 | timer_adjust(rtc.SQW_timer, half_period, 0 | |
| 492 | timer_adjust_oneshot(rtc.SQW_timer, half_period, 0 | |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | /* |
| r1679 | r1680 | |
|---|---|---|
| 415 | 415 | LOG(("cpu_boost_interleave(%s, %s)\n", attotime_string(timeslice_time, 9), attotime_string(boost_duration, 9))); |
| 416 | 416 | |
| 417 | 417 | /* adjust the interleave timer */ |
| 418 | timer_adjust(interleave_boost_timer, timeslice_time, 0, timeslice_time); | |
| 418 | timer_adjust_periodic(interleave_boost_timer, timeslice_time, 0, timeslice_time); | |
| 419 | 419 | |
| 420 | 420 | /* adjust the end timer, but only if we are going to extend it */ |
| 421 | 421 | if (!timer_enabled(interleave_boost_timer_end) || attotime_compare(timer_timeleft(interleave_boost_timer_end), boost_duration) < 0) |
| 422 | timer_adjust(interleave_boost_timer_end, boost_duration, 0 | |
| 422 | timer_adjust_oneshot(interleave_boost_timer_end, boost_duration, 0 | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
| r1679 | r1680 | |
| 823 | 823 | { |
| 824 | 824 | /* if we're not enabled, skip it */ |
| 825 | 825 | if (!watchdog_enabled) |
| 826 | timer_adjust(watchdog_timer, attotime_never, 0 | |
| 826 | timer_adjust_oneshot(watchdog_timer, attotime_never, 0 | |
| 827 | 827 | |
| 828 | 828 | /* VBLANK-based watchdog? */ |
| 829 | 829 | else if (machine->drv->watchdog_vblank_count != 0) |
| r1679 | r1680 | |
| 831 | 831 | |
| 832 | 832 | /* timer-based watchdog? */ |
| 833 | 833 | else if (attotime_compare(machine->drv->watchdog_time, attotime_zero) != 0) |
| 834 | timer_adjust(watchdog_timer, machine->drv->watchdog_time, 0 | |
| 834 | timer_adjust_oneshot(watchdog_timer, machine->drv->watchdog_time, 0 | |
| 835 | 835 | |
| 836 | 836 | /* default to an obscene amount of time (3 seconds) */ |
| 837 | 837 | else |
| 838 | timer_adjust(watchdog_timer, ATTOTIME_IN_SEC(3), 0 | |
| 838 | timer_adjust_oneshot(watchdog_timer, ATTOTIME_IN_SEC(3), 0 | |
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | |
| r1679 | r1680 | |
| 875 | 875 | attotime remaining = timer_timeleft(vblank_timer); |
| 876 | 876 | if (remaining.seconds == 0 && remaining.attoseconds == 0) |
| 877 | 877 | remaining = vblank_period; |
| 878 | timer_adjust(vblank_timer, remaining, 0, vblank_period); | |
| 878 | timer_adjust_periodic(vblank_timer, remaining, 0, vblank_period); | |
| 879 | 879 | } |
| 880 | 880 | |
| 881 | 881 | LOG(("cpu_compute_vblank_timing: refresh=%s vblank=%s\n", attotime_string(refresh_period, 9), attotime_string(vblank_period, 9))); |
| r1679 | r1680 | |
| 981 | 981 | static TIMER_CALLBACK( cpu_firstvblankcallback ) |
| 982 | 982 | { |
| 983 | 983 | /* now that we're synced up, pulse from here on out */ |
| 984 | timer_adjust(vblank_timer, vblank_period, param, vblank_period); | |
| 984 | timer_adjust_periodic(vblank_timer, vblank_period, param, vblank_period); | |
| 985 | 985 | |
| 986 | 986 | /* but we need to call the standard routine as well */ |
| 987 | 987 | cpu_vblankcallback(machine, NULL, param); |
| r1679 | r1680 | |
| 1026 | 1026 | |
| 1027 | 1027 | /* reset the countdown and timer */ |
| 1028 | 1028 | cpu[cpunum].vblankint_countdown = cpu[cpunum].vblankint_multiplier; |
| 1029 | timer_adjust(cpu[cpunum].vblankint_timer, attotime_never, 0 | |
| 1029 | timer_adjust_oneshot(cpu[cpunum].vblankint_timer, attotime_never, 0 | |
| 1030 | 1030 | } |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | 1033 | /* else reset the VBLANK timer if this is going to be a real VBLANK */ |
| 1034 | 1034 | else if (vblank_countdown == 1) |
| 1035 | timer_adjust(cpu[cpunum].vblankint_timer, attotime_never, 0 | |
| 1035 | timer_adjust_oneshot(cpu[cpunum].vblankint_timer, attotime_never, 0 | |
| 1036 | 1036 | } |
| 1037 | 1037 | |
| 1038 | 1038 | /* is it a real VBLANK? */ |
| r1679 | r1680 | |
| 1043 | 1043 | video_frame_update(machine, FALSE); |
| 1044 | 1044 | |
| 1045 | 1045 | /* Set the timer to update the screen */ |
| 1046 | timer_adjust(update_timer, attotime_make(0, machine->screen[0].vblank), 0 | |
| 1046 | timer_adjust_oneshot(update_timer, attotime_make(0, machine->screen[0].vblank), 0 | |
| 1047 | 1047 | |
| 1048 | 1048 | /* reset the globals */ |
| 1049 | 1049 | cpu_vblankreset(machine); |
| r1679 | r1680 | |
| 1078 | 1078 | current_frame++; |
| 1079 | 1079 | |
| 1080 | 1080 | /* reset the refresh timer */ |
| 1081 | timer_adjust(refresh_timer, attotime_never, 0 | |
| 1081 | timer_adjust_oneshot(refresh_timer, attotime_never, 0 | |
| 1082 | 1082 | } |
| 1083 | 1083 | |
| 1084 | 1084 | |
| r1679 | r1680 | |
| 1117 | 1117 | |
| 1118 | 1118 | static TIMER_CALLBACK( end_interleave_boost ) |
| 1119 | 1119 | { |
| 1120 | timer_adjust(interleave_boost_timer, attotime_never, 0 | |
| 1120 | timer_adjust_oneshot(interleave_boost_timer, attotime_never, 0 | |
| 1121 | 1121 | LOG(("end_interleave_boost\n")); |
| 1122 | 1122 | } |
| 1123 | 1123 | |
| r1679 | r1680 | |
| 1173 | 1173 | ipf = 1; |
| 1174 | 1174 | timeslice_period = attotime_make(0, machine->screen[0].refresh / ipf); |
| 1175 | 1175 | timeslice_timer = timer_alloc(cpu_timeslicecallback, NULL); |
| 1176 | timer_adjust(timeslice_timer, timeslice_period, 0, timeslice_period); | |
| 1176 | timer_adjust_periodic(timeslice_timer, timeslice_period, 0, timeslice_period); | |
| 1177 | 1177 | |
| 1178 | 1178 | /* allocate timers to handle interleave boosts */ |
| 1179 | 1179 | interleave_boost_timer = timer_alloc(NULL, NULL); |
| r1679 | r1680 | |
| 1246 | 1246 | { |
| 1247 | 1247 | cpu[cpunum].timedint_period = attotime_make(0, machine->drv->cpu[cpunum].timed_interrupt_period); |
| 1248 | 1248 | cpu[cpunum].timedint_timer = timer_alloc(cpu_timedintcallback, NULL); |
| 1249 | timer_adjust(cpu[cpunum].timedint_timer, cpu[cpunum].timedint_period, cpunum, cpu[cpunum].timedint_period); | |
| 1249 | timer_adjust_periodic(cpu[cpunum].timedint_timer, cpu[cpunum].timedint_period, cpunum, cpu[cpunum].timedint_period); | |
| 1250 | 1250 | } |
| 1251 | 1251 | } |
| 1252 | 1252 | |
| r1679 | r1680 | |
| 1262 | 1262 | timer_set(first_time, NULL, 0, cpu_firstvblankcallback); |
| 1263 | 1263 | |
| 1264 | 1264 | /* reset the refresh timer to get ourself back in sync */ |
| 1265 | timer_adjust(refresh_timer, attotime_never, 0 | |
| 1265 | timer_adjust_oneshot(refresh_timer, attotime_never, 0 | |
| 1266 | 1266 | } |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | ** Version 1.0 |
| 9 | 9 | ** |
| 10 | 10 | |
| 11 | Features as listed in LSI-212413A2 data sheet: | |
| 12 | 1. FM Sound Generator for real sound creation. | |
| 13 | 2. Two Selectable modes: 9 simultaneous sounds or 6 melody sounds plus 5 rhythm sounds | |
| 14 | (different tones can be used together in either case). | |
| 15 | 3. Built-in Instruments data (15 melody tones, 5 rhythm tones, "CAPTAIN and TELETEXT applicalbe tones). | |
| 16 | 4. Built-in DA Converter. | |
| 17 | 5. Built-in Quartz Oscillator. | |
| 18 | 6. Built-in Vibrato Oscillator/AM Oscillator | |
| 19 | 7. TTL Compatible Input. | |
| 20 | 8. Si-Gate NMOS LSI | |
| 21 | 9. A single 5V power source. | |
| 11 | 22 | |
| 12 | 23 | to do: |
| 13 | 24 |
| r1679 | r1680 | |
|---|---|---|
| 57 | 57 | { /* Start FM Timer */ |
| 58 | 58 | attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 59 | 59 | if (!timer_enable(info->timer[c], 1)) |
| 60 | timer_adjust(info->timer[c], period, 0 | |
| 60 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 |
| r1679 | r1680 | |
|---|---|---|
| 268 | 268 | if( prescaler ) |
| 269 | 269 | { |
| 270 | 270 | attotime period = attotime_mul(ATTOTIME_IN_HZ(voice->clock), prescaler); |
| 271 | timer_adjust(voice->timer, period, 0, period); | |
| 271 | timer_adjust_periodic(voice->timer, period, 0, period); | |
| 272 | 272 | } |
| 273 | 273 | else |
| 274 | timer_adjust(voice->timer, attotime_never, 0 | |
| 274 | timer_adjust_oneshot(voice->timer, attotime_never, 0 | |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | if( voice->bitwidth != bitwidth ) |
| r1679 | r1680 | |
|---|---|---|
| 60 | 60 | } |
| 61 | 61 | else |
| 62 | 62 | { /* Start FM Timer */ |
| 63 | timer_adjust(info->timer[c], period, 0 | |
| 63 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| r1679 | r1680 | |
| 229 | 229 | } |
| 230 | 230 | else |
| 231 | 231 | { /* Start FM Timer */ |
| 232 | timer_adjust(info->timer[c], period, 0 | |
| 232 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | |
| r1679 | r1680 | |
| 394 | 394 | } |
| 395 | 395 | else |
| 396 | 396 | { /* Start FM Timer */ |
| 397 | timer_adjust(info->timer[c], period, 0 | |
| 397 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 398 | 398 | } |
| 399 | 399 | } |
| 400 | 400 |
| r1679 | r1680 | |
|---|---|---|
| 14 | 14 | - thanks to Olivier Galibert and Chris Hardy for YMF262 and YAC512 chips |
| 15 | 15 | - thanks to Stiletto for the datasheets |
| 16 | 16 | |
| 17 | Features as listed in 4MF262A6 data sheet: | |
| 18 | 1. Registers are compatible with YM3812 (OPL2) FM sound source. | |
| 19 | 2. Up to six sounds can be used as four-operator melody sounds for variety. | |
| 20 | 3. 18 simultaneous melody sounds, or 15 melody sounds with 5 rhythm sounds (with two operators). | |
| 21 | 4. 6 four-operator melody sounds and 6 two-operator melody sounds, or 6 four-operator melody | |
| 22 | sounds, 3 two-operator melody sounds and 5 rhythm sounds (with four operators). | |
| 23 | 5. 8 selectable waveforms. | |
| 24 | 6. 4-channel sound output. | |
| 25 | 7. YMF262 compabile DAC (YAC512) is available. | |
| 26 | 8. LFO for vibrato and tremolo effedts. | |
| 27 | 9. 2 programable timers. | |
| 28 | 10. Shorter register access time compared with YM3812. | |
| 29 | 11. 5V single supply silicon gate CMOS process. | |
| 30 | 12. 24 Pin SOP Package (YMF262-M), 48 Pin SQFP Package (YMF262-S). | |
| 17 | 31 | |
| 18 | 32 | |
| 19 | 33 | differences between OPL2 and OPL3 not documented in Yamaha datahasheets: |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | * CassetteWave interface |
| 6 | 6 | *****************************************************************************/ |
| 7 | 7 | |
| 8 | #ifdef MESS | |
| 8 | 9 | #include "messdrv.h" |
| 10 | #endif | |
| 9 | 11 | |
| 10 | 12 | |
| 11 | 13 |
| r1679 | r1680 | |
|---|---|---|
| 540 | 540 | |
| 541 | 541 | /* set a timer to go off when that is done */ |
| 542 | 542 | if (chip->state != STATE_IDLE) |
| 543 | timer_adjust(chip->timer, attotime_mul(chip->clock_period, chip->clocks_left), 0 | |
| 543 | timer_adjust_oneshot(chip->timer, attotime_mul(chip->clock_period, chip->clocks_left), 0 | |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | |
| r1679 | r1680 | |
| 575 | 575 | |
| 576 | 576 | /* turn off any timer */ |
| 577 | 577 | if (chip->timer) |
| 578 | timer_adjust(chip->timer, attotime_never, 0 | |
| 578 | timer_adjust_oneshot(chip->timer, attotime_never, 0 | |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
| r1679 | r1680 | |
| 702 | 702 | |
| 703 | 703 | /* for slave mode, start the timer going */ |
| 704 | 704 | if (chip->timer) |
| 705 | timer_adjust(chip->timer, attotime_zero, 0 | |
| 705 | timer_adjust_oneshot(chip->timer, attotime_zero, 0 | |
| 706 | 706 | } |
| 707 | 707 | } |
| 708 | 708 |
| r1679 | r1680 | |
|---|---|---|
| 1457 | 1457 | //period = (double)(256.0 - chip->timerAVal ) * ( 384.0 * 4.0 / (double)CLOCK); |
| 1458 | 1458 | period = attotime_mul(ATTOTIME_IN_HZ(chip->clock), 384 * (1024 - chip->timerAVal)); |
| 1459 | 1459 | |
| 1460 | timer_adjust(chip->timA, period, 0, period); | |
| 1460 | timer_adjust_periodic(chip->timA, period, 0, period); | |
| 1461 | 1461 | } |
| 1462 | 1462 | if (data & 0x20) |
| 1463 | 1463 | { // timer B reset |
| r1679 | r1680 | |
| 1468 | 1468 | |
| 1469 | 1469 | period = attotime_mul(ATTOTIME_IN_HZ(chip->clock), 384 * 16 * (256 - chip->timerBVal)); |
| 1470 | 1470 | |
| 1471 | timer_adjust(chip->timB, period, 0, period); | |
| 1471 | timer_adjust_periodic(chip->timB, period, 0, period); | |
| 1472 | 1472 | } |
| 1473 | 1473 | |
| 1474 | 1474 | break; |
| r1679 | r1680 | |
|---|---|---|
| 466 | 466 | PROCESS_SAMPLE(chip); \ |
| 467 | 467 | } \ |
| 468 | 468 | } \ |
| 469 | timer_adjust(chip->rtimer, attotime_never, 0 | |
| 469 | timer_adjust_oneshot(chip->rtimer, attotime_never, 0 | |
| 470 | 470 | |
| 471 | 471 | #else /* no HEAVY_MACRO_USAGE */ |
| 472 | 472 | /* |
| r1679 | r1680 | |
| 517 | 517 | PROCESS_CHANNEL(chip,channel); \ |
| 518 | 518 | } \ |
| 519 | 519 | } \ |
| 520 | timer_adjust(chip->rtimer, attotime_never, 0 | |
| 520 | timer_adjust_oneshot(chip->rtimer, attotime_never, 0 | |
| 521 | 521 | |
| 522 | 522 | #endif |
| 523 | 523 | |
| r1679 | r1680 | |
| 819 | 819 | |
| 820 | 820 | /* final value */ |
| 821 | 821 | p->POTx[pot] = r; |
| 822 | timer_adjust(p->ptimer[pot], attotime_mul(AD_TIME, r), pot | |
| 822 | timer_adjust_oneshot(p->ptimer[pot], attotime_mul(AD_TIME, r), pot | |
| 823 | 823 | } |
| 824 | 824 | } |
| 825 | 825 | } |
| r1679 | r1680 | |
| 925 | 925 | LOG_RAND(("POKEY #%d adjust %u rand17[$%05x]: $%02x\n", chip, adjust, p->r17, p->RANDOM)); |
| 926 | 926 | } |
| 927 | 927 | if (adjust > 0) |
| 928 | timer_adjust(p->rtimer, attotime_never, 0 | |
| 928 | timer_adjust_oneshot(p->rtimer, attotime_never, 0 | |
| 929 | 929 | data = p->RANDOM ^ 0xff; |
| 930 | 930 | break; |
| 931 | 931 | |
| r1679 | r1680 | |
| 1086 | 1086 | /* first remove any existing timers */ |
| 1087 | 1087 | LOG_TIMER(("POKEY #%d STIMER $%02x\n", chip, data)); |
| 1088 | 1088 | |
| 1089 | timer_adjust(p->timer[TIMER1], attotime_never, p->timer_param[TIMER1], attotime_zero); | |
| 1090 | timer_adjust(p->timer[TIMER2], attotime_never, p->timer_param[TIMER2], attotime_zero); | |
| 1091 | timer_adjust(p->timer[TIMER4], attotime_never, p->timer_param[TIMER4], attotime_zero); | |
| 1089 | timer_adjust_oneshot(p->timer[TIMER1], attotime_never, p->timer_param[TIMER1]); | |
| 1090 | timer_adjust_oneshot(p->timer[TIMER2], attotime_never, p->timer_param[TIMER2]); | |
| 1091 | timer_adjust_oneshot(p->timer[TIMER4], attotime_never, p->timer_param[TIMER4]); | |
| 1092 | 1092 | |
| 1093 | 1093 | /* reset all counters to zero (side effect) */ |
| 1094 | 1094 | p->polyadjust = 0; |
| r1679 | r1680 | |
| 1106 | 1106 | /* set timer #1 _and_ #2 event after timer_div clocks of joined CHAN1+CHAN2 */ |
| 1107 | 1107 | p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]); |
| 1108 | 1108 | p->timer_param[TIMER2] = (chip<<3)|IRQ_TIMR2|IRQ_TIMR1; |
| 1109 | timer_adjust(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1109 | timer_adjust_periodic(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1110 | 1110 | } |
| 1111 | 1111 | } |
| 1112 | 1112 | else |
| r1679 | r1680 | |
| 1117 | 1117 | /* set timer #1 event after timer_div clocks of CHAN1 */ |
| 1118 | 1118 | p->timer_period[TIMER1] = attotime_mul(p->clock_period, p->divisor[CHAN1]); |
| 1119 | 1119 | p->timer_param[TIMER1] = (chip<<3)|IRQ_TIMR1; |
| 1120 | timer_adjust(p->timer[TIMER1], p->timer_period[TIMER1], p->timer_param[TIMER1], p->timer_period[TIMER1]); | |
| 1120 | timer_adjust_periodic(p->timer[TIMER1], p->timer_period[TIMER1], p->timer_param[TIMER1], p->timer_period[TIMER1]); | |
| 1121 | 1121 | } |
| 1122 | 1122 | |
| 1123 | 1123 | if( p->divisor[CHAN2] > 4 ) |
| r1679 | r1680 | |
| 1126 | 1126 | /* set timer #2 event after timer_div clocks of CHAN2 */ |
| 1127 | 1127 | p->timer_period[TIMER2] = attotime_mul(p->clock_period, p->divisor[CHAN2]); |
| 1128 | 1128 | p->timer_param[TIMER2] = (chip<<3)|IRQ_TIMR2; |
| 1129 | timer_adjust(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1129 | timer_adjust_periodic(p->timer[TIMER2], p->timer_period[TIMER2], p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1130 | 1130 | } |
| 1131 | 1131 | } |
| 1132 | 1132 | |
| r1679 | r1680 | |
| 1143 | 1143 | /* set timer #4 event after timer_div clocks of CHAN4 */ |
| 1144 | 1144 | p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]); |
| 1145 | 1145 | p->timer_param[TIMER4] = (chip<<3)|IRQ_TIMR4; |
| 1146 | timer_adjust(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1146 | timer_adjust_periodic(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1147 | 1147 | } |
| 1148 | 1148 | } |
| 1149 | 1149 | } |
| r1679 | r1680 | |
| 1155 | 1155 | /* set timer #4 event after timer_div clocks of CHAN4 */ |
| 1156 | 1156 | p->timer_period[TIMER4] = attotime_mul(p->clock_period, p->divisor[CHAN4]); |
| 1157 | 1157 | p->timer_param[TIMER4] = (chip<<3)|IRQ_TIMR4; |
| 1158 | timer_adjust(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1158 | timer_adjust_periodic(p->timer[TIMER4], p->timer_period[TIMER4], p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1159 | 1159 | } |
| 1160 | 1160 | } |
| 1161 | 1161 | |
| r1679 | r1680 | |
| 1252 | 1252 | if( new_val < p->counter[CHAN1] ) |
| 1253 | 1253 | p->counter[CHAN1] = new_val; |
| 1254 | 1254 | if( p->interrupt_cb && p->timer[TIMER1] ) |
| 1255 | timer_adjust(p->timer[TIMER1], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER1], p->timer_period[TIMER1]); | |
| 1255 | timer_adjust_periodic(p->timer[TIMER1], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER1], p->timer_period[TIMER1]); | |
| 1256 | 1256 | p->audible[CHAN1] = !( |
| 1257 | 1257 | (p->AUDC[CHAN1] & VOLUME_ONLY) || |
| 1258 | 1258 | (p->AUDC[CHAN1] & VOLUME_MASK) == 0 || |
| r1679 | r1680 | |
| 1288 | 1288 | if( new_val < p->counter[CHAN2] ) |
| 1289 | 1289 | p->counter[CHAN2] = new_val; |
| 1290 | 1290 | if( p->interrupt_cb && p->timer[TIMER2] ) |
| 1291 | timer_adjust(p->timer[TIMER2], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1291 | timer_adjust_periodic(p->timer[TIMER2], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER2], p->timer_period[TIMER2]); | |
| 1292 | 1292 | p->audible[CHAN2] = !( |
| 1293 | 1293 | (p->AUDC[CHAN2] & VOLUME_ONLY) || |
| 1294 | 1294 | (p->AUDC[CHAN2] & VOLUME_MASK) == 0 || |
| r1679 | r1680 | |
| 1353 | 1353 | if( new_val < p->counter[CHAN4] ) |
| 1354 | 1354 | p->counter[CHAN4] = new_val; |
| 1355 | 1355 | if( p->interrupt_cb && p->timer[TIMER4] ) |
| 1356 | timer_adjust(p->timer[TIMER4], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1356 | timer_adjust_periodic(p->timer[TIMER4], attotime_mul(p->clock_period, new_val), p->timer_param[TIMER4], p->timer_period[TIMER4]); | |
| 1357 | 1357 | p->audible[CHAN4] = !( |
| 1358 | 1358 | (p->AUDC[CHAN4] & VOLUME_ONLY) || |
| 1359 | 1359 | (p->AUDC[CHAN4] & VOLUME_MASK) == 0 || |
| r1679 | r1680 | |
|---|---|---|
| 826 | 826 | static TIMER_CALLBACK( timer_callback_a ) |
| 827 | 827 | { |
| 828 | 828 | YM2151 *chip = ptr; |
| 829 | timer_adjust(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0 | |
| 829 | timer_adjust_oneshot(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0 | |
| 830 | 830 | chip->timer_A_index_old = chip->timer_A_index; |
| 831 | 831 | if (chip->irq_enable & 0x04) |
| 832 | 832 | { |
| r1679 | r1680 | |
| 839 | 839 | static TIMER_CALLBACK( timer_callback_b ) |
| 840 | 840 | { |
| 841 | 841 | YM2151 *chip = ptr; |
| 842 | timer_adjust(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0 | |
| 842 | timer_adjust_oneshot(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0 | |
| 843 | 843 | chip->timer_B_index_old = chip->timer_B_index; |
| 844 | 844 | if (chip->irq_enable & 0x08) |
| 845 | 845 | { |
| r1679 | r1680 | |
| 1133 | 1133 | /* start timer _only_ if it wasn't already started (it will reload time value next round) */ |
| 1134 | 1134 | if (!timer_enable(chip->timer_B, 1)) |
| 1135 | 1135 | { |
| 1136 | timer_adjust(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0 | |
| 1136 | timer_adjust_oneshot(chip->timer_B, chip->timer_B_time[ chip->timer_B_index ], 0 | |
| 1137 | 1137 | chip->timer_B_index_old = chip->timer_B_index; |
| 1138 | 1138 | } |
| 1139 | 1139 | #else |
| r1679 | r1680 | |
| 1158 | 1158 | /* start timer _only_ if it wasn't already started (it will reload time value next round) */ |
| 1159 | 1159 | if (!timer_enable(chip->timer_A, 1)) |
| 1160 | 1160 | { |
| 1161 | timer_adjust(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0 | |
| 1161 | timer_adjust_oneshot(chip->timer_A, chip->timer_A_time[ chip->timer_A_index ], 0 | |
| 1162 | 1162 | chip->timer_A_index_old = chip->timer_A_index; |
| 1163 | 1163 | } |
| 1164 | 1164 | #else |
| r1679 | r1680 | |
|---|---|---|
| 22 | 22 | Enabled DSP again. |
| 23 | 23 | * December 16, 2007 (kingshriek) Many EG bug fixes, implemented effects mixer, |
| 24 | 24 | implemented FM. |
| 25 | * January 5, 200 | |
| 25 | * January 5, 2008 (kingshriek+RB) Working, good-sounding FM, removed obsolete non-USEDSP code. | |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | #include "sndintrf.h" |
| r1679 | r1680 | |
| 735 | 735 | time = (44100 / SCSP->TimPris[0]) / (255-(SCSP->udata.data[0x18/2]&0xff)); |
| 736 | 736 | if (time) |
| 737 | 737 | { |
| 738 | timer_adjust(SCSP->timerA, ATTOTIME_IN_HZ(time), 0 | |
| 738 | timer_adjust_oneshot(SCSP->timerA, ATTOTIME_IN_HZ(time), 0 | |
| 739 | 739 | } |
| 740 | 740 | } |
| 741 | 741 | } |
| r1679 | r1680 | |
| 754 | 754 | time = (44100 / SCSP->TimPris[1]) / (255-(SCSP->udata.data[0x1A/2]&0xff)); |
| 755 | 755 | if (time) |
| 756 | 756 | { |
| 757 | timer_adjust(SCSP->timerB, ATTOTIME_IN_HZ(time), 0 | |
| 757 | timer_adjust_oneshot(SCSP->timerB, ATTOTIME_IN_HZ(time), 0 | |
| 758 | 758 | } |
| 759 | 759 | } |
| 760 | 760 | } |
| r1679 | r1680 | |
| 773 | 773 | time = (44100 / SCSP->TimPris[2]) / (255-(SCSP->udata.data[0x1C/2]&0xff)); |
| 774 | 774 | if (time) |
| 775 | 775 | { |
| 776 | timer_adjust(SCSP->timerC, ATTOTIME_IN_HZ(time), 0 | |
| 776 | timer_adjust_oneshot(SCSP->timerC, ATTOTIME_IN_HZ(time), 0 | |
| 777 | 777 | } |
| 778 | 778 | } |
| 779 | 779 | } |
| r1679 | r1680 | |
|---|---|---|
| 93 | 93 | attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 94 | 94 | |
| 95 | 95 | if (!timer_enable(info->timer[c], 1)) |
| 96 | timer_adjust(info->timer[c], period, 0 | |
| 96 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 |
| r1679 | r1680 | |
|---|---|---|
| 195 | 195 | if(chip->timer[timer].period != period) { |
| 196 | 196 | chip->timer[timer].period = period; |
| 197 | 197 | if(period) |
| 198 | timer_adjust(chip->timer[timer].timer, ATTOTIME_IN_NSEC(period), 0, ATTOTIME_IN_NSEC(period)); | |
| 198 | timer_adjust_periodic(chip->timer[timer].timer, ATTOTIME_IN_NSEC(period), 0, ATTOTIME_IN_NSEC(period)); | |
| 199 | 199 | else |
| 200 | timer_adjust(chip->timer[timer].timer, attotime_never, 0 | |
| 200 | timer_adjust_oneshot(chip->timer[timer].timer, attotime_never, 0 | |
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
| r1679 | r1680 | |
| 532 | 532 | chip->irq_en = 0; |
| 533 | 533 | chip->irq_pend = 0; |
| 534 | 534 | memset(chip->voice, 0, sizeof(chip->voice)); |
| 535 | timer_adjust(chip->timer[0].timer, attotime_never, 0, attotime_zero); | |
| 536 | timer_adjust(chip->timer[1].timer, attotime_never, 0, attotime_zero); | |
| 535 | timer_adjust_oneshot(chip->timer[0].timer, attotime_never, 0); | |
| 536 | timer_adjust_oneshot(chip->timer[1].timer, attotime_never, 0); | |
| 537 | 537 | chip->timer[0].period = 0; |
| 538 | 538 | chip->timer[1].period = 0; |
| 539 | 539 | recalc_irq(chip); |
| r1679 | r1680 | |
|---|---|---|
| 92 | 92 | { /* Start FM Timer */ |
| 93 | 93 | attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 94 | 94 | if (!timer_enable(info->timer[c], 1)) |
| 95 | timer_adjust(info->timer[c], period, 0 | |
| 95 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 |
| r1679 | r1680 | |
|---|---|---|
| 373 | 373 | if (chip->clock != YMF278B_STD_CLOCK) |
| 374 | 374 | period = attotime_div(attotime_mul(period, chip->clock), YMF278B_STD_CLOCK); |
| 375 | 375 | |
| 376 | timer_adjust(chip->timer_a, period, 0, period); | |
| 376 | timer_adjust_periodic(chip->timer_a, period, 0, period); | |
| 377 | 377 | } |
| 378 | 378 | else |
| 379 | timer_adjust(chip->timer_a, attotime_never, 0 | |
| 379 | timer_adjust_oneshot(chip->timer_a, attotime_never, 0 | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | static void ymf278b_timer_b_reset(YMF278BChip *chip) |
| r1679 | r1680 | |
| 388 | 388 | if (chip->clock != YMF278B_STD_CLOCK) |
| 389 | 389 | period = attotime_div(attotime_mul(period, chip->clock), YMF278B_STD_CLOCK); |
| 390 | 390 | |
| 391 | timer_adjust(chip->timer_a, period, 0, period); | |
| 391 | timer_adjust_periodic(chip->timer_a, period, 0, period); | |
| 392 | 392 | } |
| 393 | 393 | else |
| 394 | timer_adjust(chip->timer_b, attotime_never, 0 | |
| 394 | timer_adjust_oneshot(chip->timer_b, attotime_never, 0 | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | static void ymf278b_A_w(YMF278BChip *chip, UINT8 reg, UINT8 data) |
| r1679 | r1680 | |
|---|---|---|
| 592 | 592 | SOUNDDEFS += -DHAS_TMS5200=$(if $(filter TMS5200,$(SOUNDS)),1,0) |
| 593 | 593 | SOUNDDEFS += -DHAS_TMS5220=$(if $(filter TMS5220,$(SOUNDS)),1,0) |
| 594 | 594 | |
| 595 | ifneq ($(filter TMS5110,$(SOUNDS)),) | |
| 595 | ifneq ($(filter TMS5100 TMS5110 TMS5110A CD2801 TMC0281 CD2802 M58817,$(SOUNDS)),) | |
| 596 | 596 | SOUNDOBJS += $(SOUNDOBJ)/tms5110.o $(SOUNDOBJ)/5110intf.o |
| 597 | 597 | endif |
| 598 | 598 |
| r1679 | r1680 | |
|---|---|---|
| 86 | 86 | { /* Start FM Timer */ |
| 87 | 87 | attotime period = attotime_mul(ATTOTIME_IN_HZ(clock), count); |
| 88 | 88 | if (!timer_enable(info->timer[c], 1)) |
| 89 | timer_adjust(info->timer[c], period, 0 | |
| 89 | timer_adjust_oneshot(info->timer[c], period, 0 | |
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 |
| r1679 | r1680 | |
|---|---|---|
| 460 | 460 | // ok, we run for this long |
| 461 | 461 | period = attotime_mul(ATTOTIME_IN_HZ(chip->output_rate), length); |
| 462 | 462 | |
| 463 | timer_adjust(chip->oscillators[osc].timer, period, 0, period); | |
| 463 | timer_adjust_periodic(chip->oscillators[osc].timer, period, 0, period); | |
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | else if (!(chip->oscillators[osc].control & 1) && (data&1)) |
| 467 | 467 | { |
| 468 | 468 | // key off |
| 469 | timer_adjust(chip->oscillators[osc].timer, attotime_never, 0 | |
| 469 | timer_adjust_oneshot(chip->oscillators[osc].timer, attotime_never, 0 | |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | chip->oscillators[osc].control = data; |
| r1679 | r1680 | |
|---|---|---|
| 49 | 49 | } |
| 50 | 50 | else |
| 51 | 51 | { /* Start FM Timer */ |
| 52 | timer_adjust(info->timer[timer], period, 0 | |
| 52 | timer_adjust_oneshot(info->timer[timer], period, 0 | |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 |
| r1679 | r1680 | |
|---|---|---|
| 192 | 192 | |
| 193 | 193 | /* allocate a global timer for sound timing */ |
| 194 | 194 | sound_update_timer = timer_alloc(sound_update, NULL); |
| 195 | timer_adjust(sound_update_timer, update_frequency, 0, update_frequency); | |
| 195 | timer_adjust_periodic(sound_update_timer, update_frequency, 0, update_frequency); | |
| 196 | 196 | |
| 197 | 197 | /* initialize the streams engine */ |
| 198 | 198 | VPRINTF(("streams_init\n")); |
| r1679 | r1680 | |
|---|---|---|
| 925 | 925 | transparency. |
| 926 | 926 | transparency == TRANSPARENCY_PENS - as above, but transparent_color is a mask of |
| 927 | 927 | transparent pens. |
| 928 | transparency == TRANSPARENCY_COLOR - bits whose _remapped_ palette index (taken from | |
| 929 | machine->game_colortable) is == transparent_color | |
| 930 | ||
| 931 | 928 | transparency == TRANSPARENCY_PEN_TABLE - the transparency condition is same as TRANSPARENCY_PEN |
| 932 | 929 | A special drawing is done according to gfx_drawmode_table[source pixel]. |
| 933 | 930 | DRAWMODE_NONE transparent |
| r1679 | r1680 | |
| 945 | 942 | |
| 946 | 943 | code %= gfx->total_elements; |
| 947 | 944 | |
| 948 | if ( | |
| 945 | if ( | |
| 949 | 946 | color %= gfx->total_colors; |
| 950 | 947 | |
| 951 | 948 | if ((dest->format == BITMAP_FORMAT_INDEXED8 || dest->format == BITMAP_FORMAT_INDEXED16 || dest->format == BITMAP_FORMAT_INDEXED32) && |
| r1679 | r1680 | |
| 1320 | 1317 | transparent_color = -1; |
| 1321 | 1318 | } |
| 1322 | 1319 | |
| 1323 | /* if necessary, remap the transparent color */ | |
| 1324 | if (transparency == TRANSPARENCY_COLOR) | |
| 1325 | { | |
| 1326 | transparency = TRANSPARENCY_PEN; | |
| 1327 | transparent_color = Machine->pens[transparent_color]; | |
| 1328 | } | |
| 1329 | ||
| 1330 | 1320 | if (transparency != TRANSPARENCY_PEN) |
| 1331 | 1321 | { |
| 1332 | 1322 | popmessage("copyrozbitmap unsupported trans %02x",transparency); |
| r1679 | r1680 | |
| 1364 | 1354 | return; |
| 1365 | 1355 | } |
| 1366 | 1356 | |
| 1367 | if (transparency != TRANSPARENCY_PEN && transparency != TRANSPARENCY_PEN_RAW | |
| 1368 | && transparency != TRANSPARENCY_PENS && transparency != TRANSPARENCY_COLOR | |
| 1369 | && transparency != TRANSPARENCY_PEN_TABLE | |
| 1370 | && transparency != TRANSPARENCY_BLEND_RAW | |
| 1371 | && transparency != TRANSPARENCY_ALPHA && transparency != TRANSPARENCY_ALPHARANGE | |
| 1372 | && transparency != TRANSPARENCY_NONE) | |
| 1373 | { | |
| 1374 | popmessage("drawgfxzoom unsupported trans %02x",transparency); | |
| 1375 | return; | |
| 1376 | } | |
| 1377 | ||
| 1378 | 1357 | if ((dest_bmp->format == BITMAP_FORMAT_INDEXED8 || dest_bmp->format == BITMAP_FORMAT_INDEXED16 || dest_bmp->format == BITMAP_FORMAT_INDEXED32) && |
| 1379 | 1358 | (transparency == TRANSPARENCY_ALPHA || transparency == TRANSPARENCY_ALPHARANGE)) |
| 1380 | 1359 | { |
| r1679 | r1680 | |
| 1382 | 1361 | transparent_color &= 0xff; |
| 1383 | 1362 | } |
| 1384 | 1363 | |
| 1385 | if (transparency == TRANSPARENCY_COLOR) | |
| 1386 | transparent_color = Machine->pens[transparent_color]; | |
| 1387 | ||
| 1388 | ||
| 1389 | 1364 | /* |
| 1390 | 1365 | scalex and scaley are 16.16 fixed point numbers |
| 1391 | 1366 | 1<<15 : shrink to 50% |
| r1679 | r1680 | |
| 1711 | 1686 | } |
| 1712 | 1687 | } |
| 1713 | 1688 | |
| 1714 | /* case 1c: TRANSPARENCY_BLEND_RAW */ | |
| 1715 | if (transparency == TRANSPARENCY_BLEND_RAW) | |
| 1716 | { | |
| 1717 | if (pri_buffer) | |
| 1718 | { | |
| 1719 | for( y=sy; y<ey; y++ ) | |
| 1720 | { | |
| 1721 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 1722 | UINT8 *dest = BITMAP_ADDR8(dest_bmp, y, 0); | |
| 1723 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 1724 | ||
| 1725 | int x, x_index = x_index_base; | |
| 1726 | for( x=sx; x<ex; x++ ) | |
| 1727 | { | |
| 1728 | int c = source[x_index>>16]; | |
| 1729 | if( c != transparent_color ) | |
| 1730 | { | |
| 1731 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 1732 | dest[x] |= (color + c); | |
| 1733 | pri[x] = 31; | |
| 1734 | } | |
| 1735 | x_index += dx; | |
| 1736 | } | |
| 1737 | ||
| 1738 | y_index += dy; | |
| 1739 | } | |
| 1740 | } | |
| 1741 | else | |
| 1742 | { | |
| 1743 | for( y=sy; y<ey; y++ ) | |
| 1744 | { | |
| 1745 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 1746 | UINT8 *dest = BITMAP_ADDR8(dest_bmp, y, 0); | |
| 1747 | ||
| 1748 | int x, x_index = x_index_base; | |
| 1749 | for( x=sx; x<ex; x++ ) | |
| 1750 | { | |
| 1751 | int c = source[x_index>>16]; | |
| 1752 | if( c != transparent_color ) dest[x] |= (color + c); | |
| 1753 | x_index += dx; | |
| 1754 | } | |
| 1755 | ||
| 1756 | y_index += dy; | |
| 1757 | } | |
| 1758 | } | |
| 1759 | } | |
| 1760 | ||
| 1761 | 1689 | /* case 2: TRANSPARENCY_PENS */ |
| 1762 | 1690 | if (transparency == TRANSPARENCY_PENS) |
| 1763 | 1691 | { |
| r1679 | r1680 | |
| 1806 | 1734 | } |
| 1807 | 1735 | } |
| 1808 | 1736 | |
| 1809 | /* case 3: TRANSPARENCY_COLOR */ | |
| 1810 | else if (transparency == TRANSPARENCY_COLOR) | |
| 1811 | { | |
| 1812 | if (pri_buffer) | |
| 1813 | { | |
| 1814 | for( y=sy; y<ey; y++ ) | |
| 1815 | { | |
| 1816 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 1817 | UINT8 *dest = BITMAP_ADDR8(dest_bmp, y, 0); | |
| 1818 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 1819 | ||
| 1820 | int x, x_index = x_index_base; | |
| 1821 | for( x=sx; x<ex; x++ ) | |
| 1822 | { | |
| 1823 | int c = pal[source[x_index>>16]]; | |
| 1824 | if( c != transparent_color ) | |
| 1825 | { | |
| 1826 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 1827 | dest[x] = c; | |
| 1828 | pri[x] = 31; | |
| 1829 | } | |
| 1830 | x_index += dx; | |
| 1831 | } | |
| 1832 | ||
| 1833 | y_index += dy; | |
| 1834 | } | |
| 1835 | } | |
| 1836 | else | |
| 1837 | { | |
| 1838 | for( y=sy; y<ey; y++ ) | |
| 1839 | { | |
| 1840 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 1841 | UINT8 *dest = BITMAP_ADDR8(dest_bmp, y, 0); | |
| 1842 | ||
| 1843 | int x, x_index = x_index_base; | |
| 1844 | for( x=sx; x<ex; x++ ) | |
| 1845 | { | |
| 1846 | int c = pal[source[x_index>>16]]; | |
| 1847 | if( c != transparent_color ) dest[x] = c; | |
| 1848 | x_index += dx; | |
| 1849 | } | |
| 1850 | ||
| 1851 | y_index += dy; | |
| 1852 | } | |
| 1853 | } | |
| 1854 | } | |
| 1855 | ||
| 1856 | /* case 4: TRANSPARENCY_PEN_TABLE */ | |
| 1737 | /* case 3: TRANSPARENCY_PEN_TABLE */ | |
| 1857 | 1738 | if (transparency == TRANSPARENCY_PEN_TABLE) |
| 1858 | 1739 | { |
| 1859 | 1740 | pen_t *palette_shadow_table = Machine->shadow_table; |
| r1679 | r1680 | |
| 2232 | 2113 | } |
| 2233 | 2114 | } |
| 2234 | 2115 | |
| 2235 | /* case 1c: TRANSPARENCY_BLEND_RAW */ | |
| 2236 | if (transparency == TRANSPARENCY_BLEND_RAW) | |
| 2237 | { | |
| 2238 | if (pri_buffer) | |
| 2239 | { | |
| 2240 | for( y=sy; y<ey; y++ ) | |
| 2241 | { | |
| 2242 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2243 | UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); | |
| 2244 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 2245 | ||
| 2246 | int x, x_index = x_index_base; | |
| 2247 | for( x=sx; x<ex; x++ ) | |
| 2248 | { | |
| 2249 | int c = source[x_index>>16]; | |
| 2250 | if( c != transparent_color ) | |
| 2251 | { | |
| 2252 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 2253 | dest[x] |= color + c; | |
| 2254 | pri[x] = 31; | |
| 2255 | } | |
| 2256 | x_index += dx; | |
| 2257 | } | |
| 2258 | ||
| 2259 | y_index += dy; | |
| 2260 | } | |
| 2261 | } | |
| 2262 | else | |
| 2263 | { | |
| 2264 | for( y=sy; y<ey; y++ ) | |
| 2265 | { | |
| 2266 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2267 | UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); | |
| 2268 | ||
| 2269 | int x, x_index = x_index_base; | |
| 2270 | for( x=sx; x<ex; x++ ) | |
| 2271 | { | |
| 2272 | int c = source[x_index>>16]; | |
| 2273 | if( c != transparent_color ) dest[x] |= color + c; | |
| 2274 | x_index += dx; | |
| 2275 | } | |
| 2276 | ||
| 2277 | y_index += dy; | |
| 2278 | } | |
| 2279 | } | |
| 2280 | } | |
| 2281 | ||
| 2282 | 2116 | /* case 2: TRANSPARENCY_PENS */ |
| 2283 | 2117 | if (transparency == TRANSPARENCY_PENS) |
| 2284 | 2118 | { |
| r1679 | r1680 | |
| 2327 | 2161 | } |
| 2328 | 2162 | } |
| 2329 | 2163 | |
| 2330 | /* case 3: TRANSPARENCY_COLOR */ | |
| 2331 | else if (transparency == TRANSPARENCY_COLOR) | |
| 2332 | { | |
| 2333 | if (pri_buffer) | |
| 2334 | { | |
| 2335 | for( y=sy; y<ey; y++ ) | |
| 2336 | { | |
| 2337 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2338 | UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); | |
| 2339 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 2340 | ||
| 2341 | int x, x_index = x_index_base; | |
| 2342 | for( x=sx; x<ex; x++ ) | |
| 2343 | { | |
| 2344 | int c = pal[source[x_index>>16]]; | |
| 2345 | if( c != transparent_color ) | |
| 2346 | { | |
| 2347 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 2348 | dest[x] = c; | |
| 2349 | pri[x] = 31; | |
| 2350 | } | |
| 2351 | x_index += dx; | |
| 2352 | } | |
| 2353 | ||
| 2354 | y_index += dy; | |
| 2355 | } | |
| 2356 | } | |
| 2357 | else | |
| 2358 | { | |
| 2359 | for( y=sy; y<ey; y++ ) | |
| 2360 | { | |
| 2361 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2362 | UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); | |
| 2363 | ||
| 2364 | int x, x_index = x_index_base; | |
| 2365 | for( x=sx; x<ex; x++ ) | |
| 2366 | { | |
| 2367 | int c = pal[source[x_index>>16]]; | |
| 2368 | if( c != transparent_color ) dest[x] = c; | |
| 2369 | x_index += dx; | |
| 2370 | } | |
| 2371 | ||
| 2372 | y_index += dy; | |
| 2373 | } | |
| 2374 | } | |
| 2375 | } | |
| 2376 | ||
| 2377 | /* case 4: TRANSPARENCY_PEN_TABLE */ | |
| 2164 | /* case 3: TRANSPARENCY_PEN_TABLE */ | |
| 2378 | 2165 | if (transparency == TRANSPARENCY_PEN_TABLE) |
| 2379 | 2166 | { |
| 2380 | 2167 | pen_t *palette_shadow_table = Machine->shadow_table; |
| r1679 | r1680 | |
| 2769 | 2556 | } |
| 2770 | 2557 | } |
| 2771 | 2558 | |
| 2772 | /* case 1c: TRANSPARENCY_BLEND_RAW */ | |
| 2773 | if (transparency == TRANSPARENCY_BLEND_RAW) | |
| 2774 | { | |
| 2775 | if (pri_buffer) | |
| 2776 | { | |
| 2777 | for( y=sy; y<ey; y++ ) | |
| 2778 | { | |
| 2779 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2780 | UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); | |
| 2781 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 2782 | ||
| 2783 | int x, x_index = x_index_base; | |
| 2784 | for( x=sx; x<ex; x++ ) | |
| 2785 | { | |
| 2786 | int c = source[x_index>>16]; | |
| 2787 | if( c != transparent_color ) | |
| 2788 | { | |
| 2789 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 2790 | dest[x] |= color + c; | |
| 2791 | pri[x] = 31; | |
| 2792 | } | |
| 2793 | x_index += dx; | |
| 2794 | } | |
| 2795 | ||
| 2796 | y_index += dy; | |
| 2797 | } | |
| 2798 | } | |
| 2799 | else | |
| 2800 | { | |
| 2801 | for( y=sy; y<ey; y++ ) | |
| 2802 | { | |
| 2803 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2804 | UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); | |
| 2805 | ||
| 2806 | int x, x_index = x_index_base; | |
| 2807 | for( x=sx; x<ex; x++ ) | |
| 2808 | { | |
| 2809 | int c = source[x_index>>16]; | |
| 2810 | if( c != transparent_color ) dest[x] |= color + c; | |
| 2811 | x_index += dx; | |
| 2812 | } | |
| 2813 | ||
| 2814 | y_index += dy; | |
| 2815 | } | |
| 2816 | } | |
| 2817 | } | |
| 2818 | ||
| 2819 | 2559 | /* case 2: TRANSPARENCY_PENS */ |
| 2820 | 2560 | if (transparency == TRANSPARENCY_PENS) |
| 2821 | 2561 | { |
| r1679 | r1680 | |
| 2864 | 2604 | } |
| 2865 | 2605 | } |
| 2866 | 2606 | |
| 2867 | /* case 3: TRANSPARENCY_COLOR */ | |
| 2868 | else if (transparency == TRANSPARENCY_COLOR) | |
| 2869 | { | |
| 2870 | if (pri_buffer) | |
| 2871 | { | |
| 2872 | for( y=sy; y<ey; y++ ) | |
| 2873 | { | |
| 2874 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2875 | UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); | |
| 2876 | UINT8 *pri = BITMAP_ADDR8(pri_buffer, y, 0); | |
| 2877 | ||
| 2878 | int x, x_index = x_index_base; | |
| 2879 | for( x=sx; x<ex; x++ ) | |
| 2880 | { | |
| 2881 | int c = pal[source[x_index>>16]]; | |
| 2882 | if( c != transparent_color ) | |
| 2883 | { | |
| 2884 | if (((1 << pri[x]) & pri_mask) == 0) | |
| 2885 | dest[x] = c; | |
| 2886 | pri[x] = 31; | |
| 2887 | } | |
| 2888 | x_index += dx; | |
| 2889 | } | |
| 2890 | ||
| 2891 | y_index += dy; | |
| 2892 | } | |
| 2893 | } | |
| 2894 | else | |
| 2895 | { | |
| 2896 | for( y=sy; y<ey; y++ ) | |
| 2897 | { | |
| 2898 | UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; | |
| 2899 | UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); | |
| 2900 | ||
| 2901 | int x, x_index = x_index_base; | |
| 2902 | for( x=sx; x<ex; x++ ) | |
| 2903 | { | |
| 2904 | int c = pal[source[x_index>>16]]; | |
| 2905 | if( c != transparent_color ) dest[x] = c; | |
| 2906 | x_index += dx; | |
| 2907 | } | |
| 2908 | ||
| 2909 | y_index += dy; | |
| 2910 | } | |
| 2911 | } | |
| 2912 | } | |
| 2913 | ||
| 2914 | /* case 4: TRANSPARENCY_PEN_TABLE */ | |
| 2607 | /* case 3: TRANSPARENCY_PEN_TABLE */ | |
| 2915 | 2608 | if (transparency == TRANSPARENCY_PEN_TABLE) |
| 2916 | 2609 | { |
| 2917 | 2610 | pen_t *palette_shadow_table = Machine->shadow_table; |
| r1679 | r1680 | |
| 3548 | 3241 | } |
| 3549 | 3242 | }) |
| 3550 | 3243 | |
| 3551 | #if (RAW == 1) | |
| 3552 | DECLARE_SWAP_RAW_PRI(blockmove_8toN_transblend,(COMMON_ARGS, | |
| 3553 | COLOR_ARG,int transpen), | |
| 3554 | { | |
| 3555 | pen_t *palette_shadow_table = Machine->shadow_table; | |
| 3556 | ADJUST_8 | |
| 3557 | 3244 | |
| 3558 | (void)palette_shadow_table; | |
| 3559 | ||
| 3560 | if (flipx) | |
| 3561 | { | |
| 3562 | DATA_TYPE *end; | |
| 3563 | int trans4; | |
| 3564 | UINT32 *sd4; | |
| 3565 | ||
| 3566 | trans4 = transpen * 0x01010101; | |
| 3567 | ||
| 3568 | while (dstheight) | |
| 3569 | { | |
| 3570 | end = dstdata - dstwidth*HMODULO; | |
| 3571 | while (((FPTR)srcdata & 3) && dstdata > end) /* longword align */ | |
| 3572 | { | |
| 3573 | int col; | |
| 3574 | ||
| 3575 | col = *(srcdata++); | |
| 3576 | if (col != transpen) SETPIXELCOLOR(0,*dstdata | LOOKUP(col)) | |
| 3577 | INCREMENT_DST(-HMODULO); | |
| 3578 | } | |
| 3579 | sd4 = (UINT32 *)srcdata; | |
| 3580 | while (dstdata >= end + 4*HMODULO) | |
| 3581 | { | |
| 3582 | UINT32 col4; | |
| 3583 | ||
| 3584 | INCREMENT_DST(-4*HMODULO); | |
| 3585 | if ((col4 = *(sd4++)) != trans4) | |
| 3586 | { | |
| 3587 | UINT32 xod4; | |
| 3588 | ||
| 3589 | xod4 = col4 ^ trans4; | |
| 3590 | if (xod4 & (0xff<<SHIFT0)) SETPIXELCOLOR(4*HMODULO,dstdata[4*HMODULO] | LOOKUP((col4>>SHIFT0) & 0xff)) | |
| 3591 | if (xod4 & (0xff<<SHIFT1)) SETPIXELCOLOR(3*HMODULO,dstdata[3*HMODULO] | LOOKUP((col4>>SHIFT1) & 0xff)) | |
| 3592 | if (xod4 & (0xff<<SHIFT2)) SETPIXELCOLOR(2*HMODULO,dstdata[2*HMODULO] | LOOKUP((col4>>SHIFT2) & 0xff)) | |
| 3593 | if (xod4 & (0xff<<SHIFT3)) SETPIXELCOLOR(1*HMODULO,dstdata[1*HMODULO] | LOOKUP((col4>>SHIFT3) & 0xff)) | |
| 3594 | } | |
| 3595 | } | |
| 3596 | srcdata = (UINT8 *)sd4; | |
| 3597 | while (dstdata > end) | |
| 3598 | { | |
| 3599 | int col; | |
| 3600 | ||
| 3601 | col = *(srcdata++); | |
| 3602 | if (col != transpen) SETPIXELCOLOR(0,*dstdata | LOOKUP(col)) | |
| 3603 | INCREMENT_DST(-HMODULO); | |
| 3604 | } | |
| 3605 | ||
| 3606 | srcdata += srcmodulo; | |
| 3607 | INCREMENT_DST(ydir*VMODULO + dstwidth*HMODULO); | |
| 3608 | dstheight--; | |
| 3609 | } | |
| 3610 | } | |
| 3611 | else | |
| 3612 | { | |
| 3613 | DATA_TYPE *end; | |
| 3614 | int trans4; | |
| 3615 | UINT32 *sd4; | |
| 3616 | ||
| 3617 | trans4 = transpen * 0x01010101; | |
| 3618 | ||
| 3619 | while (dstheight) | |
| 3620 | { | |
| 3621 | end = dstdata + dstwidth*HMODULO; | |
| 3622 | while (((FPTR)srcdata & 3) && dstdata < end) /* longword align */ | |
| 3623 | { | |
| 3624 | int col; | |
| 3625 | ||
| 3626 | col = *(srcdata++); | |
| 3627 | if (col != transpen) SETPIXELCOLOR(0,*dstdata | LOOKUP(col)) | |
| 3628 | INCREMENT_DST(HMODULO); | |
| 3629 | } | |
| 3630 | sd4 = (UINT32 *)srcdata; | |
| 3631 | while (dstdata <= end - 4*HMODULO) | |
| 3632 | { | |
| 3633 | UINT32 col4; | |
| 3634 | ||
| 3635 | if ((col4 = *(sd4++)) != trans4) | |
| 3636 | { | |
| 3637 | UINT32 xod4; | |
| 3638 | ||
| 3639 | xod4 = col4 ^ trans4; | |
| 3640 | if (xod4 & (0xff<<SHIFT0)) SETPIXELCOLOR(0*HMODULO,dstdata[0*HMODULO] | LOOKUP((col4>>SHIFT0) & 0xff)) | |
| 3641 | if (xod4 & (0xff<<SHIFT1)) SETPIXELCOLOR(1*HMODULO,dstdata[1*HMODULO] | LOOKUP((col4>>SHIFT1) & 0xff)) | |
| 3642 | if (xod4 & (0xff<<SHIFT2)) SETPIXELCOLOR(2*HMODULO,dstdata[2*HMODULO] | LOOKUP((col4>>SHIFT2) & 0xff)) | |
| 3643 | if (xod4 & (0xff<<SHIFT3)) SETPIXELCOLOR(3*HMODULO,dstdata[3*HMODULO] | LOOKUP((col4>>SHIFT3) & 0xff)) | |
| 3644 | } | |
| 3645 | INCREMENT_DST(4*HMODULO); | |
| 3646 | } | |
| 3647 | srcdata = (UINT8 *)sd4; | |
| 3648 | while (dstdata < end) | |
| 3649 | { | |
| 3650 | int col; | |
| 3651 | ||
| 3652 | col = *(srcdata++); | |
| 3653 | if (col != transpen) SETPIXELCOLOR(0,*dstdata | LOOKUP(col)) | |
| 3654 | INCREMENT_DST(HMODULO); | |
| 3655 | } | |
| 3656 | ||
| 3657 | srcdata += srcmodulo; | |
| 3658 | INCREMENT_DST(ydir*VMODULO - dstwidth*HMODULO); | |
| 3659 | dstheight--; | |
| 3660 | } | |
| 3661 | } | |
| 3662 | }) | |
| 3663 | #endif | |
| 3664 | ||
| 3665 | ||
| 3666 | 3245 | #if (RAW == 0) |
| 3667 | 3246 | #define PEN_IS_OPAQUE ((1<<col)&transmask) == 0 |
| 3668 | 3247 | |
| r1679 | r1680 | |
| 3774 | 3353 | #endif |
| 3775 | 3354 | |
| 3776 | 3355 | #if (RAW == 0) |
| 3777 | DECLARE_SWAP_RAW_PRI(blockmove_8toN_transcolor,(COMMON_ARGS, | |
| 3778 | COLOR_ARG,const UINT16 *colortable,int transcolor), | |
| 3779 | { | |
| 3780 | pen_t *palette_shadow_table = Machine->shadow_table; | |
| 3781 | ADJUST_8 | |
| 3782 | ||
| 3783 | (void)palette_shadow_table; | |
| 3784 | ||
| 3785 | if (flipx) | |
| 3786 | { | |
| 3787 | DATA_TYPE *end; | |
| 3788 | ||
| 3789 | while (dstheight) | |
| 3790 | { | |
| 3791 | end = dstdata - dstwidth*HMODULO; | |
| 3792 | while (dstdata > end) | |
| 3793 | { | |
| 3794 | if (colortable[*srcdata] != transcolor) SETPIXELCOLOR(0,LOOKUP(*srcdata)) | |
| 3795 | srcdata++; | |
| 3796 | INCREMENT_DST(-HMODULO) | |
| 3797 | } | |
| 3798 | ||
| 3799 | srcdata += srcmodulo; | |
| 3800 | INCREMENT_DST(ydir*VMODULO + dstwidth*HMODULO) | |
| 3801 | dstheight--; | |
| 3802 | } | |
| 3803 | } | |
| 3804 | else | |
| 3805 | { | |
| 3806 | DATA_TYPE *end; | |
| 3807 | ||
| 3808 | while (dstheight) | |
| 3809 | { | |
| 3810 | end = dstdata + dstwidth*HMODULO; | |
| 3811 | while (dstdata < end) | |
| 3812 | { | |
| 3813 | if (colortable[*srcdata] != transcolor) SETPIXELCOLOR(0,LOOKUP(*srcdata)) | |
| 3814 | srcdata++; | |
| 3815 | INCREMENT_DST(HMODULO) | |
| 3816 | } | |
| 3817 | ||
| 3818 | srcdata += srcmodulo; | |
| 3819 | INCREMENT_DST(ydir*VMODULO - dstwidth*HMODULO) | |
| 3820 | dstheight--; | |
| 3821 | } | |
| 3822 | } | |
| 3823 | }) | |
| 3824 | ||
| 3825 | DECLARE_SWAP_RAW_PRI(blockmove_4toN_transcolor,(COMMON_ARGS, | |
| 3826 | COLOR_ARG,const UINT16 *colortable,int transcolor), | |
| 3827 | { | |
| 3828 | pen_t *palette_shadow_table = Machine->shadow_table; | |
| 3829 | ADJUST_4 | |
| 3830 | ||
| 3831 | (void)palette_shadow_table; | |
| 3832 | ||
| 3833 | if (flipx) | |
| 3834 | { | |
| 3835 | DATA_TYPE *end; | |
| 3836 | ||
| 3837 | while (dstheight) | |
| 3838 | { | |
| 3839 | int col; | |
| 3840 | ||
| 3841 | end = dstdata - dstwidth*HMODULO; | |
| 3842 | if (leftskip) | |
| 3843 | { | |
| 3844 | col = *(srcdata++)>>4; | |
| 3845 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3846 | INCREMENT_DST(-HMODULO) | |
| 3847 | } | |
| 3848 | while (dstdata > end) | |
| 3849 | { | |
| 3850 | col = *(srcdata)&0x0f; | |
| 3851 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3852 | INCREMENT_DST(-HMODULO) | |
| 3853 | if (dstdata > end) | |
| 3854 | { | |
| 3855 | col = *(srcdata++)>>4; | |
| 3856 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3857 | INCREMENT_DST(-HMODULO) | |
| 3858 | } | |
| 3859 | } | |
| 3860 | ||
| 3861 | srcdata += srcmodulo; | |
| 3862 | INCREMENT_DST(ydir*VMODULO + dstwidth*HMODULO) | |
| 3863 | dstheight--; | |
| 3864 | } | |
| 3865 | } | |
| 3866 | else | |
| 3867 | { | |
| 3868 | DATA_TYPE *end; | |
| 3869 | ||
| 3870 | while (dstheight) | |
| 3871 | { | |
| 3872 | int col; | |
| 3873 | ||
| 3874 | end = dstdata + dstwidth*HMODULO; | |
| 3875 | if (leftskip) | |
| 3876 | { | |
| 3877 | col = *(srcdata++)>>4; | |
| 3878 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3879 | INCREMENT_DST(HMODULO) | |
| 3880 | } | |
| 3881 | while (dstdata < end) | |
| 3882 | { | |
| 3883 | col = *(srcdata)&0x0f; | |
| 3884 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3885 | INCREMENT_DST(HMODULO) | |
| 3886 | if (dstdata < end) | |
| 3887 | { | |
| 3888 | col = *(srcdata++)>>4; | |
| 3889 | if (colortable[col] != transcolor) SETPIXELCOLOR(0,LOOKUP(col)) | |
| 3890 | INCREMENT_DST(HMODULO) | |
| 3891 | } | |
| 3892 | } | |
| 3893 | ||
| 3894 | srcdata += srcmodulo; | |
| 3895 | INCREMENT_DST(ydir*VMODULO - dstwidth*HMODULO) | |
| 3896 | dstheight--; | |
| 3897 | } | |
| 3898 | } | |
| 3899 | }) | |
| 3900 | #endif | |
| 3901 | ||
| 3902 | #if (RAW == 0) | |
| 3903 | 3356 | #if DEPTH == 32 |
| 3904 | 3357 | DECLARE_SWAP_RAW_PRI(blockmove_8toN_pen_table,(COMMON_ARGS, |
| 3905 | 3358 | COLOR_ARG,int transcolor), |
| r1679 | r1680 | |
| 4406 | 3859 | BLOCKMOVELU(8toN_transmask,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,transparent_color)); |
| 4407 | 3860 | break; |
| 4408 | 3861 | |
| 4409 | case TRANSPARENCY_COLOR: | |
| 4410 | if (gfx->flags & GFX_ELEMENT_PACKED) | |
| 4411 | { | |
| 4412 | if (pribuf) | |
| 4413 | BLOCKMOVEPRI(4toN_transcolor,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,pribuf,pri_mask,Machine->game_colortable + (paldata - Machine->remapped_colortable),transparent_color)); | |
| 4414 | else | |
| 4415 | BLOCKMOVELU(4toN_transcolor,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,Machine->game_colortable + (paldata - Machine->remapped_colortable),transparent_color)); | |
| 4416 | } | |
| 4417 | else | |
| 4418 | { | |
| 4419 | if (pribuf) | |
| 4420 | BLOCKMOVEPRI(8toN_transcolor,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,pribuf,pri_mask,Machine->game_colortable + (paldata - Machine->remapped_colortable),transparent_color)); | |
| 4421 | else | |
| 4422 | BLOCKMOVELU(8toN_transcolor,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,Machine->game_colortable + (paldata - Machine->remapped_colortable),transparent_color)); | |
| 4423 | } | |
| 4424 | break; | |
| 4425 | ||
| 4426 | 3862 | case TRANSPARENCY_PEN_TABLE: |
| 4427 | 3863 | if (pribuf) |
| 4428 | 3864 | BLOCKMOVEPRI(8toN_pen_table,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,pribuf,pri_mask,transparent_color)); |
| r1679 | r1680 | |
| 4430 | 3866 | BLOCKMOVELU(8toN_pen_table,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,transparent_color)); |
| 4431 | 3867 | break; |
| 4432 | 3868 | |
| 4433 | case TRANSPARENCY_BLEND_RAW: | |
| 4434 | if (pribuf) | |
| 4435 | BLOCKMOVERAWPRI(8toN_transblend,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,color,pribuf,pri_mask,transparent_color)); | |
| 4436 | else | |
| 4437 | BLOCKMOVERAW(8toN_transblend,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,color,transparent_color)); | |
| 4438 | break; | |
| 4439 | ||
| 4440 | 3869 | case TRANSPARENCY_ALPHA: |
| 4441 | 3870 | if (pribuf) |
| 4442 | 3871 | BLOCKMOVEPRI(8toN_alpha,(sd,sw,sh,sm,ls,ts,flipx,flipy,dd,dw,dh,dm,paldata,pribuf,pri_mask,transparent_color)); |
| r1679 | r1680 | |
|---|---|---|
| 54 | 54 | TRANSPARENCY_PEN, /* single pen transparency with remapping */ |
| 55 | 55 | TRANSPARENCY_PEN_RAW, /* single pen transparency with no remapping */ |
| 56 | 56 | TRANSPARENCY_PENS, /* multiple pen transparency with remapping */ |
| 57 | TRANSPARENCY_COLOR, /* single remapped pen transparency with remapping */ | |
| 58 | 57 | TRANSPARENCY_PEN_TABLE, /* special pen remapping modes (see DRAWMODE_xxx below) with remapping */ |
| 59 | TRANSPARENCY_BLEND_RAW, /* blend two bitmaps, shifting the source and ORing to the dest with no remapping */ | |
| 60 | 58 | TRANSPARENCY_ALPHA, /* single pen transparency, other pens alpha */ |
| 61 | 59 | TRANSPARENCY_ALPHARANGE, /* single pen transparency, multiple pens alpha depending on array, see psikyosh.c */ |
| 62 | 60 |
| r1679 | r1680 | |
|---|---|---|
| 526 | 526 | ***************************************************************************/ |
| 527 | 527 | |
| 528 | 528 | /*------------------------------------------------- |
| 529 | timer_adjust - adjust the time when this | |
| 530 | timer will fire, and whether or not it will | |
| 531 | fire periodically | |
| 529 | timer_adjust_oneshot - adjust the time when this timer | |
| 530 | will fire and disable any periodic firings | |
| 532 | 531 | -------------------------------------------------*/ |
| 533 | 532 | |
| 534 | void timer_adjust(emu_timer *which, attotime duration, INT32 param | |
| 533 | void timer_adjust_oneshot(emu_timer *which, attotime duration, INT32 param | |
| 535 | 534 | { |
| 535 | timer_adjust_periodic(which, duration, param, attotime_never); | |
| 536 | } | |
| 537 | ||
| 538 | ||
| 539 | /*------------------------------------------------- | |
| 540 | timer_adjust_periodic - adjust the time when | |
| 541 | this timer will fire and specify a period for | |
| 542 | subsequent firings | |
| 543 | -------------------------------------------------*/ | |
| 544 | ||
| 545 | void timer_adjust_periodic(emu_timer *which, attotime duration, INT32 param, attotime period) | |
| 546 | { | |
| 536 | 547 | attotime time = get_current_time(); |
| 537 | 548 | |
| 538 | 549 | /* if this is the callback timer, mark it modified */ |
| r1679 | r1680 | |
| 557 | 568 | timer_list_insert(which); |
| 558 | 569 | |
| 559 | 570 | /* if this was inserted as the head, abort the current timeslice and resync */ |
| 560 | LOG(("timer_adjust %s.%s:%d to expire @ %s\n", which->file, which->func, which->line, attotime_string(which->expire, 9))); | |
| 571 | LOG(("timer_adjust_oneshot %s.%s:%d to expire @ %s\n", which->file, which->func, which->line, attotime_string(which->expire, 9))); | |
| 561 | 572 | if (which == timer_head && cpu_getexecutingcpu() >= 0) |
| 562 | 573 | activecpu_abort_timeslice(); |
| 563 | 574 | } |
| r1679 | r1680 | |
| 577 | 588 | void _timer_pulse_internal(attotime period, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func) |
| 578 | 589 | { |
| 579 | 590 | emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, FALSE); |
| 580 | timer_adjust(timer, period, param, period); | |
| 591 | timer_adjust_periodic(timer, period, param, period); | |
| 581 | 592 | } |
| 582 | 593 | |
| 583 | 594 | |
| r1679 | r1680 | |
| 589 | 600 | void _timer_set_internal(attotime duration, void *ptr, INT32 param, timer_callback callback, const char *file, int line, const char *func) |
| 590 | 601 | { |
| 591 | 602 | emu_timer *timer = _timer_alloc_common(callback, ptr, file, line, func, TRUE); |
| 592 | timer_adjust(timer, duration, param | |
| 603 | timer_adjust_oneshot(timer, duration, param | |
| 593 | 604 | } |
| 594 | 605 | |
| 595 | 606 | |
| r1679 | r1680 | |
| 604 | 615 | |
| 605 | 616 | void timer_reset(emu_timer *which, attotime duration) |
| 606 | 617 | { |
| 607 | timer_adjust(which, duration, which->param, which->period); | |
| 618 | timer_adjust_periodic(which, duration, which->param, which->period); | |
| 608 | 619 | } |
| 609 | 620 | |
| 610 | 621 |
| r1679 | r1680 | |
|---|---|---|
| 1500 | 1500 | InitStringTable(); |
| 1501 | 1501 | |
| 1502 | 1502 | periodic_timer = timer_alloc(cheat_periodic, NULL); |
| 1503 | timer_adjust(periodic_timer, attotime_make(0, machine->screen[0].refresh), 0, attotime_make(0, machine->screen[0].refresh)); | |
| 1503 | timer_adjust_periodic(periodic_timer, attotime_make(0, machine->screen[0].refresh), 0, attotime_make(0, machine->screen[0].refresh)); | |
| 1504 | 1504 | |
| 1505 | 1505 | add_exit_callback(machine, cheat_exit); |
| 1506 | 1506 | } |
| r1679 | r1680 | |
|---|---|---|
| 106 | 106 | /* allocate a permament timer that isn't primed yet */ |
| 107 | 107 | emu_timer *_timer_alloc_internal(timer_callback callback, void *param, const char *file, int line, const char *func); |
| 108 | 108 | |
| 109 | /* adjust the time when this timer will fire, and whether or not it will fire periodically */ | |
| 110 | void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period); | |
| 109 | /* adjust the time when this timer will fire and disable any periodic firings */ | |
| 110 | void timer_adjust_oneshot(emu_timer *which, attotime duration, INT32 param); | |
| 111 | 111 | |
| 112 | /* adjust the time when this timer will fire and specify a period for subsequent firings */ | |
| 113 | void timer_adjust_periodic(emu_timer *which, attotime duration, INT32 param, attotime period); | |
| 112 | 114 | |
| 113 | 115 | |
| 116 | ||
| 114 | 117 | /* ----- anonymous timer management ----- */ |
| 115 | 118 | |
| 116 | 119 | /* allocate a one-shot timer, which calls the callback after the given duration */ |
| r1679 | r1680 | |
|---|---|---|
| 54 | 54 | XTAL_5MHz = 5000000, /* Mutant Night */ |
| 55 | 55 | XTAL_6MHz = 6000000, |
| 56 | 56 | XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board */ |
| 57 | XTAL_7_15909MHz = 7159090, /* Blood Bros */ | |
| 57 | 58 | XTAL_7_3728MHz = 7372800, |
| 58 | 59 | XTAL_8MHz = 8000000, |
| 59 | 60 | XTAL_9_987MHz = 9987000, /* Crazy Balloon */ |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "mslegacy.h" | |
| 19 | 20 | #include "flopdrv.h" |
| 20 | 21 | |
| 21 | 22 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | **********************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "mslegacy.h" | |
| 10 | 11 | #include "includes/thomson.h" |
| 11 | 12 | #include "machine/wd17xx.h" |
| 12 | 13 | #include "devices/flopdrv.h" |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "mslegacy.h" |
| 12 | #include "video/mc6845.h" | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | static const char *const mess_default_text[] = |
| r1679 | r1680 | |
| 100 | 101 | { |
| 101 | 102 | return mess_default_text[string_num]; |
| 102 | 103 | } |
| 104 | ||
| 105 | ||
| 106 | ||
| 107 | /*************************************************************************** | |
| 108 | TIMER | |
| 109 | ***************************************************************************/ | |
| 110 | ||
| 111 | void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period) | |
| 112 | { | |
| 113 | if (attotime_compare(period, attotime_zero) == 0) | |
| 114 | timer_adjust_oneshot(which, duration, param); | |
| 115 | else | |
| 116 | timer_adjust_periodic(which, duration, param, period); | |
| 117 | } | |
| 118 | ||
| 119 | ||
| 120 | ||
| 121 | /*************************************************************************** | |
| 122 | MC6845 | |
| 123 | ***************************************************************************/ | |
| 124 | ||
| 125 | mc6845_t *mslegacy_mc6845; | |
| 126 | ||
| 127 | void crtc6845_config(int index, const mc6845_interface *intf) | |
| 128 | { | |
| 129 | assert(index == 0); | |
| 130 | mslegacy_mc6845 = mc6845_config(intf); | |
| 131 | } | |
| 132 | ||
| 133 | ||
| 134 | ||
| 135 | WRITE8_HANDLER(crtc6845_0_address_w) | |
| 136 | { | |
| 137 | mc6845_address_w(mslegacy_mc6845, data); | |
| 138 | } | |
| 139 | ||
| 140 | ||
| 141 | ||
| 142 | READ8_HANDLER(crtc6845_0_register_r) | |
| 143 | { | |
| 144 | return mc6845_register_r(mslegacy_mc6845); | |
| 145 | } | |
| 146 | ||
| 147 | ||
| 148 | ||
| 149 | WRITE8_HANDLER(crtc6845_0_register_w) | |
| 150 | { | |
| 151 | mc6845_register_w(mslegacy_mc6845, data); | |
| 152 | } | |
| 153 | ||
| 154 | ||
| 155 | ||
| 156 | VIDEO_UPDATE(crtc6845) | |
| 157 | { | |
| 158 | mc6845_update(mslegacy_mc6845, bitmap, cliprect); | |
| 159 | return 0; | |
| 160 | } | |
| 161 |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | #ifndef MSLEGACY_H |
| 11 | 11 | #define MSLEGACY_H |
| 12 | 12 | |
| 13 | #include "driver.h" | |
| 13 | 14 | |
| 14 | 15 | enum |
| 15 | 16 | { |
| r1679 | r1680 | |
| 83 | 84 | const char * ui_getstring (int string_num); |
| 84 | 85 | |
| 85 | 86 | |
| 87 | /* timer */ | |
| 88 | void timer_adjust(emu_timer *which, attotime duration, INT32 param, attotime period); | |
| 89 | ||
| 90 | ||
| 91 | /* mc6845 */ | |
| 92 | struct _mc6845_t; | |
| 93 | struct _mc6845_interface; | |
| 94 | ||
| 95 | extern struct _mc6845_t *mslegacy_mc6845; | |
| 96 | ||
| 97 | WRITE8_HANDLER(crtc6845_0_address_w); | |
| 98 | READ8_HANDLER(crtc6845_0_register_r); | |
| 99 | WRITE8_HANDLER(crtc6845_0_register_w); | |
| 100 | VIDEO_UPDATE(crtc6845); | |
| 101 | void crtc6845_config(int index, const struct _mc6845_interface *intf); | |
| 102 | ||
| 103 | ||
| 104 | ||
| 86 | 105 | #endif /* MSLEGACY_H */ |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | #include <ctype.h> |
| 17 | 17 | #include "driver.h" |
| 18 | #include "mslegacy.h" | |
| 18 | 19 | #include "cpu/m6502/m6502.h" |
| 19 | 20 | |
| 20 | 21 | #define VERBOSE_DBG 1 |
| r1679 | r1680 | |
|---|---|---|
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "deprecat.h" |
| 9 | 9 | #include "includes/cbmb.h" |
| 10 | #include "video/ | |
| 10 | #include "video/m | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | static int cbmb_font=0; |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | 15 | #include "deprecat.h" |
| 16 | #include "mslegacy.h" | |
| 16 | 17 | #include "includes/gb.h" |
| 17 | 18 | #include "cpu/z80gb/z80gb.h" |
| 18 | 19 | #include "profiler.h" |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include <math.h> |
| 2 | 2 | #include "driver.h" |
| 3 | 3 | #include "deprecat.h" |
| 4 | #include "mslegacy.h" | |
| 4 | 5 | #include "includes/vectrex.h" |
| 5 | 6 | #include "video/vector.h" |
| 6 | 7 | #include "machine/6522via.h" |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | ******************************************************************************/ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | |
| 10 | 11 | #include "includes/aim65.h" |
| 11 | 12 | #include "machine/6522via.h" |
| r1679 | r1680 | |
|---|---|---|
| 66 | 66 | #include "driver.h" |
| 67 | 67 | #include "m6847.h" |
| 68 | 68 | #include "deprecat.h" |
| 69 | #include "mslegacy.h" | |
| 69 | 70 | |
| 70 | 71 | #ifdef ENABLE_DEBUGGER |
| 71 | 72 | #include "debug/debugcpu.h" |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | #include <math.h> |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "deprecat.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | #include "includes/thomson.h" |
| 13 | 14 | #include "cpu/m6809/m6809.h" |
| 14 | 15 | #include "machine/6821pia.h" |
| r1679 | r1680 | |
|---|---|---|
| 27 | 27 | aquarius_tilemap = tilemap_create( |
| 28 | 28 | aquarius_gettileinfo, |
| 29 | 29 | tilemap_scan_rows, |
| 30 | TILEMAP_TYPE_PEN, | |
| 31 | 30 | 8, 8, |
| 32 | 31 | 40, 24); |
| 33 | 32 | } |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "mslegacy.h" | |
| 8 | 9 | #include "includes/abc80.h" |
| 9 | 10 | |
| 10 | 11 | |
| r1679 | r1680 | |
| 73 | 74 | timer_adjust(abc80_blink_timer, attotime_zero, 0, ATTOTIME_IN_HZ(ABC80_XTAL/2/6/64/312/16)); |
| 74 | 75 | |
| 75 | 76 | tx_tilemap = tilemap_create(abc80_get_tile_info, abc80_tilemap_scan, |
| 76 | | |
| 77 | | |
| 77 | 78 | |
| 78 | 79 | tilemap_set_scrolldx(tx_tilemap, ABC80_HDSTART, ABC80_HDSTART); |
| 79 | 80 | tilemap_set_scrolldy(tx_tilemap, ABC80_VDSTART, ABC80_VDSTART); |
| r1679 | r1680 | |
|---|---|---|
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | #include "driver.h" |
| 29 | #include "mslegacy.h" | |
| 29 | 30 | #include "includes/x68k.h" |
| 30 | 31 | #include "machine/68901mfp.h" |
| 31 | 32 | |
| r1679 | r1680 | |
| 966 | 967 | machine->gfx[gfx_index]->total_colors = 32; |
| 967 | 968 | |
| 968 | 969 | /* Tilemaps */ |
| 969 | x68k_bg0_8 = tilemap_create(x68k_get_bg0_tile,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 970 | x68k_bg1_8 = tilemap_create(x68k_get_bg1_tile,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,64,64); | |
| 971 | x68k_bg0_16 = tilemap_create(x68k_get_bg0_tile_16,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 972 | x68k_bg1_16 = tilemap_create(x68k_get_bg1_tile_16,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,64,64); | |
| 970 | x68k_bg0_8 = tilemap_create(x68k_get_bg0_tile,tilemap_scan_rows,8,8,64,64); | |
| 971 | x68k_bg1_8 = tilemap_create(x68k_get_bg1_tile,tilemap_scan_rows,8,8,64,64); | |
| 972 | x68k_bg0_16 = tilemap_create(x68k_get_bg0_tile_16,tilemap_scan_rows,16,16,64,64); | |
| 973 | x68k_bg1_16 = tilemap_create(x68k_get_bg1_tile_16,tilemap_scan_rows,16,16,64,64); | |
| 973 | 974 | |
| 974 | 975 | tilemap_set_transparent_pen(x68k_bg0_8,0); |
| 975 | 976 | tilemap_set_transparent_pen(x68k_bg1_8,0); |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | #include "cpu/m68000/m68000.h" |
| 16 | 16 | #include "machine/68901mfp.h" |
| 17 | 17 | #include "video/atarist.h" |
| 18 | #include "mslegacy.h" | |
| 18 | 19 | |
| 19 | 20 | static struct SHIFTER |
| 20 | 21 | { |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | VIDEO_START( sb2m600 ) |
| 22 | 22 | { |
| 23 | 23 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 24 | | |
| 24 | | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | VIDEO_START( uk101 ) |
| 28 | 28 | { |
| 29 | 29 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 30 | | |
| 30 | | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | VIDEO_UPDATE( sb2m600 ) |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "deprecat.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | #include "zx8301.h" |
| 10 | 11 | |
| 11 | 12 |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "includes/abc80x.h" |
| 9 | #include "video/ | |
| 9 | #include "video/m | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | static tilemap *tx_tilemap; |
| r1679 | r1680 | |
| 37 | 37 | palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff); // white |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | static const | |
| 40 | static const m | |
| 41 | 41 | { |
| 42 | 42 | 0, /* screen we are acting on */ |
| 43 | 43 | ABC800_X01/6, /* the clock (pin 21) of the chip */ |
| r1679 | r1680 | |
| 61 | 61 | VIDEO_START( abc800m ) |
| 62 | 62 | { |
| 63 | 63 | tx_tilemap = tilemap_create(abc800_get_tile_info, tilemap_scan_rows, |
| 64 | | |
| 64 | | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | static TILE_GET_INFO(abc800c_get_tile_info) |
| r1679 | r1680 | |
| 75 | 75 | VIDEO_START( abc800c ) |
| 76 | 76 | { |
| 77 | 77 | tx_tilemap = tilemap_create(abc800c_get_tile_info, tilemap_scan_rows, |
| 78 | | |
| 78 | | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | VIDEO_UPDATE( abc800 ) |
| r1679 | r1680 | |
| 109 | 109 | VIDEO_START( abc802 ) |
| 110 | 110 | { |
| 111 | 111 | tx_tilemap_40 = tilemap_create(abc802_get_tile_info_40, tilemap_scan_rows, |
| 112 | | |
| 112 | | |
| 113 | 113 | |
| 114 | 114 | tx_tilemap = tilemap_create(abc802_get_tile_info_80, tilemap_scan_rows, |
| 115 | | |
| 115 | | |
| 116 | 116 | |
| 117 | 117 | abc802_columns = 80; |
| 118 | 118 | } |
| r1679 | r1680 | |
|---|---|---|
| 32 | 32 | #include "machine/6883sam.h" |
| 33 | 33 | #include "video/m6847.h" |
| 34 | 34 | #include "includes/coco.h" |
| 35 | #include "mslegacy.h" | |
| 35 | 36 | |
| 36 | 37 | |
| 37 | 38 | #if defined(__GNUC__) && (__GNUC__ >= 3) |
| r1679 | r1680 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | #include "driver.h" |
| 40 | 40 | #include "deprecat.h" |
| 41 | #include "mslegacy.h" | |
| 41 | 42 | #include "video/smsvdp.h" |
| 42 | 43 | #include "includes/sms.h" |
| 43 | 44 |
| r1679 | r1680 | |
|---|---|---|
| 42 | 42 | VIDEO_START( microtan ) |
| 43 | 43 | { |
| 44 | 44 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 45 | | |
| 45 | | |
| 46 | 46 | |
| 47 | 47 | microtan_chunky_buffer = auto_malloc(videoram_size); |
| 48 | 48 | memset(microtan_chunky_buffer, 0, videoram_size); |
| r1679 | r1680 | |
|---|---|---|
| 3 | 3 | #include "cpu/cdp1802/cdp1802.h" |
| 4 | 4 | #include "sound/beep.h" |
| 5 | 5 | #include "video/cdp1864.h" |
| 6 | #include "mslegacy.h" | |
| 6 | 7 | |
| 7 | 8 | static mame_bitmap *cdptmpbitmap; |
| 8 | 9 |
| r1679 | r1680 | |
|---|---|---|
| 952 | 952 | yloc += rect.min_y; |
| 953 | 953 | decodechar(Machine->gfx[0],spr,amstrad_plus_asic_ram); |
| 954 | 954 | drawgfxzoom(scr_bitmap,Machine->gfx[0],spr,0,0,0,xloc,yloc,&rect, |
| 955 | TRANSPARENCY_ | |
| 955 | TRANSPARENCY_PEN | |
| 956 | 956 | } |
| 957 | 957 | } |
| 958 | 958 | } |
| r1679 | r1680 | |
|---|---|---|
| 52 | 52 | dblwidth_tilemap = tilemap_create( |
| 53 | 53 | dblwidth_gettileinfo, |
| 54 | 54 | tilemap_scan_rows, |
| 55 | TILEMAP_TYPE_PEN, | |
| 56 | 55 | FW * 2, FH, |
| 57 | 56 | 64, videoram_size / 64); |
| 58 | 57 | |
| 59 | 58 | normwidth_tilemap = tilemap_create( |
| 60 | 59 | normwidth_gettileinfo, |
| 61 | 60 | tilemap_scan_rows, |
| 62 | TILEMAP_TYPE_PEN, | |
| 63 | 61 | FW, FH, |
| 64 | 62 | 64, videoram_size / 64); |
| 65 | 63 |
| r1679 | r1680 | |
|---|---|---|
| 347 | 347 | text_tilemap = tilemap_create( |
| 348 | 348 | apple2_text_gettileinfo, |
| 349 | 349 | apple2_text_getmemoryoffset, |
| 350 | TILEMAP_TYPE_PEN, | |
| 351 | 350 | 7*2, 8, |
| 352 | 351 | 40, 24); |
| 353 | 352 | |
| 354 | 353 | dbltext_tilemap = tilemap_create( |
| 355 | 354 | apple2_dbltext_gettileinfo, |
| 356 | 355 | apple2_dbltext_getmemoryoffset, |
| 357 | TILEMAP_TYPE_PEN, | |
| 358 | 356 | 7, 8, |
| 359 | 357 | 80, 24); |
| 360 | 358 | |
| 361 | 359 | lores_tilemap = tilemap_create( |
| 362 | 360 | apple2_lores_gettileinfo, |
| 363 | 361 | apple2_text_getmemoryoffset, |
| 364 | TILEMAP_TYPE_PEN, | |
| 365 | 362 | 14, 8, |
| 366 | 363 | 40, 24); |
| 367 | 364 |
| r1679 | r1680 | |
|---|---|---|
| 356 | 356 | #include <stdio.h> |
| 357 | 357 | #include "driver.h" |
| 358 | 358 | #include "deprecat.h" |
| 359 | #include "mslegacy.h" | |
| 359 | 360 | #include "utils.h" |
| 360 | 361 | #include "sound/custom.h" |
| 361 | 362 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "deprecat.h" |
| 3 | #include "mslegacy.h" | |
| 3 | 4 | #include "cpu/cdp1802/cdp1802.h" |
| 4 | 5 | #include "video/cdp1861.h" |
| 5 | 6 |
| r1679 | r1680 | |
|---|---|---|
| 793 | 793 | /* need to start up the timer? */ |
| 794 | 794 | if (keybuf->begin_pos == keybuf->end_pos) |
| 795 | 795 | { |
| 796 | timer_adjust(inputx_timer, choose_delay(ch), 0 | |
| 796 | timer_adjust_oneshot(inputx_timer, choose_delay(ch), 0 | |
| 797 | 797 | keybuf->status_keydown = 0; |
| 798 | 798 | } |
| 799 | 799 | |
| r1679 | r1680 | |
| 909 | 909 | if (keybuf->begin_pos != keybuf->end_pos) |
| 910 | 910 | { |
| 911 | 911 | delay = choose_delay(keybuf->buffer[keybuf->begin_pos]); |
| 912 | timer_adjust(inputx_timer, delay, 0 | |
| 912 | timer_adjust_oneshot(inputx_timer, delay, 0 | |
| 913 | 913 | } |
| 914 | 914 | } |
| 915 | 915 |
| r1679 | r1680 | |
|---|---|---|
| 123 | 123 | @echo Compiling resources $<... |
| 124 | 124 | $(RC) $(RCDEFS) $(RCFLAGS) --include-dir $(WINUISRC) --include-dir $(MESS_WINUISRC) --include-dir $(WINUIOBJ) -o $@ -i $(MESS_WINUISRC)/messui.rc |
| 125 | 125 | |
| 126 | $(WINUIOBJ)/mamevers.rc: $( | |
| 126 | $(WINUIOBJ)/mamevers.rc: $( | |
| 127 | 127 | @echo Emitting $@... |
| 128 | 128 | @$(VERINFO) $(SRC)/version.c > $@ |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | #include "cpu/z80/z80.h" |
| 12 | 12 | #include "includes/zx.h" |
| 13 | 13 | #include "devices/cassette.h" |
| 14 | #include "mslegacy.h" | |
| 14 | 15 | |
| 15 | 16 | #define DEBUG_ZX81_PORTS 1 |
| 16 | 17 | #define DEBUG_ZX81_VSYNC 1 |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | 15 | #include "deprecat.h" |
| 16 | #include "mslegacy.h" | |
| 16 | 17 | |
| 17 | 18 | #include "cpu/pdp1/pdp1.h" |
| 18 | 19 | #include "includes/pdp1.h" |
| r1679 | r1680 | |
|---|---|---|
| 21 | 21 | ***************************************************************************/ |
| 22 | 22 | |
| 23 | 23 | #include "driver.h" |
| 24 | #include "mslegacy.h" | |
| 24 | 25 | #include "machine/nec765.h" |
| 25 | 26 | |
| 26 | 27 | typedef enum |
| r1679 | r1680 | |
|---|---|---|
| 107 | 107 | #include <assert.h> |
| 108 | 108 | #include "driver.h" |
| 109 | 109 | #include "deprecat.h" |
| 110 | #include "mslegacy.h" | |
| 110 | 111 | |
| 111 | 112 | #include "includes/apple2gs.h" |
| 112 | 113 | #include "includes/apple2.h" |
| r1679 | r1680 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | #include "applefdc.h" |
| 39 | 39 | #include "deprecat.h" |
| 40 | #include "mslegacy.h" | |
| 40 | 41 | |
| 41 | 42 | /* logging */ |
| 42 | 43 | #define LOG_IWM 0 |
| r1679 | r1680 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | #include "driver.h" |
| 41 | 41 | #include "deprecat.h" |
| 42 | #include "mslegacy.h" | |
| 42 | 43 | #include "machine/6522via.h" |
| 43 | 44 | #include "machine/8530scc.h" |
| 44 | 45 | #include "cpu/m68000/m68000.h" |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "pcf8593.h" |
| 10 | 10 | #include "deprecat.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | |
| 12 | 13 | #include <time.h> |
| 13 | 14 |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | #include "sound/sid6581.h" |
| 11 | 11 | #include "machine/6526cia.h" |
| 12 | 12 | #include "deprecat.h" |
| 13 | #include "mslegacy.h" | |
| 13 | 14 | |
| 14 | 15 | #define VERBOSE_DBG 1 |
| 15 | 16 | #include "includes/cbm.h" |
| r1679 | r1680 | |
| 19 | 20 | #include "includes/vc20tape.h" |
| 20 | 21 | #include "includes/cbmieeeb.h" |
| 21 | 22 | #include "video/vic6567.h" |
| 22 | #include "video/ | |
| 23 | #include "video/m | |
| 23 | 24 | |
| 24 | 25 | |
| 25 | 26 | static TIMER_CALLBACK(cbmb_frame_interrupt); |
| r1679 | r1680 | |
| 252 | 253 | } |
| 253 | 254 | |
| 254 | 255 | //static const struct mscrtc6845_config cbm600_crtc= { 1600000 /*?*/, cbmb_vh_cursor }; |
| 255 | static const | |
| 256 | static const m | |
| 256 | 257 | 0, |
| 257 | 258 | 1600000 /*?*/, |
| 258 | 259 | 8 /*?*/, |
| r1679 | r1680 | |
| 286 | 287 | } |
| 287 | 288 | |
| 288 | 289 | //static const struct mscrtc6845_config cbm700_crtc= { 2000000 /*?*/, cbmb_vh_cursor }; |
| 289 | static const | |
| 290 | static const m | |
| 290 | 291 | 0, |
| 291 | 292 | 2000000 /*?*/, |
| 292 | 293 | 9 /*?*/, |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | #include "driver.h" |
| 16 | 16 | #include "i8271.h" |
| 17 | 17 | #include "devices/flopdrv.h" |
| 18 | #include "mslegacy.h" | |
| 18 | 19 | |
| 19 | 20 | |
| 20 | 21 | I8271_STATE_t I8271_STATE; |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "mslegacy.h" | |
| 2 | 3 | #include "includes/pokemini.h" |
| 3 | 4 | #include "cpu/minx/minx.h" |
| 4 | 5 |
| r1679 | r1680 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | #include "rp5c15.h" |
| 71 | 71 | #include "deprecat.h" |
| 72 | #include "mslegacy.h" | |
| 72 | 73 | |
| 73 | 74 | static struct rp5c15 rtc; |
| 74 | 75 |
| r1679 | r1680 | |
|---|---|---|
| 98 | 98 | #include "sound/dac.h" |
| 99 | 99 | #include "sound/ay8910.h" |
| 100 | 100 | #include "devices/cococart.h" |
| 101 | #include "mslegacy.h" | |
| 101 | 102 | |
| 102 | 103 | /*common vars/calls */ |
| 103 | 104 | static UINT8 *coco_rom; |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | #include "machine/wd33c93.h" |
| 17 | 17 | #include "machine/tpi6525.h" |
| 18 | 18 | #include "matsucd.h" |
| 19 | #include "mslegacy.h" | |
| 19 | 20 | |
| 20 | 21 | |
| 21 | 22 | #define VERBOSE_DMAC 0 |
| r1679 | r1680 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | 39 | #include "deprecat.h" |
| 40 | #include "mslegacy.h" | |
| 40 | 41 | #include "includes/gb.h" |
| 41 | 42 | #include "cpu/z80gb/z80gb.h" |
| 42 | 43 | #include "image.h" |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | ******************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | #include "cpu/m6502/m6502.h" |
| 12 | 13 | #include "includes/kim1.h" |
| 13 | 14 | #include "sound/dac.h" |
| r1679 | r1680 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | #include "driver.h" |
| 27 | 27 | #include "deprecat.h" |
| 28 | #include "mslegacy.h" | |
| 28 | 29 | #include "machine/wd17xx.h" |
| 29 | 30 | #include "smc92x4.h" |
| 30 | 31 | #include "ti99_4x.h" |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "mslegacy.h" | |
| 13 | 14 | #include "at29040.h" |
| 14 | 15 | |
| 15 | 16 | #define MAX_AT29C040A 4 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | |
| 2 | 2 | #include "driver.h" |
| 3 | 3 | #include "deprecat.h" |
| 4 | #include "mslegacy.h" | |
| 4 | 5 | #include "includes/gamecom.h" |
| 5 | 6 | #include "cpu/sm8500/sm8500.h" |
| 6 | 7 | #include "image.h" |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "deprecat.h" |
| 15 | 15 | #include "includes/mz700.h" |
| 16 | #include "mslegacy.h" | |
| 16 | 17 | |
| 17 | 18 | /* Components */ |
| 18 | 19 | #include "cpu/z80/z80.h" |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | 32 | #include "driver.h" |
| 33 | #include "mslegacy.h" | |
| 33 | 34 | #include "includes/serial.h" |
| 34 | 35 | |
| 35 | 36 | #define VERBOSE 0 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "deprecat.h" |
| 3 | #include "mslegacy.h" | |
| 3 | 4 | #include "video/vector.h" |
| 4 | 5 | #include "machine/6522via.h" |
| 5 | 6 | #include "cpu/m6809/m6809.h" |
| 6 | 7 | #include "sound/ay8910.h" |
| 7 | 8 | #include "image.h" |
| 9 | #include "mslegacy.h" | |
| 8 | 10 | |
| 9 | 11 | #include "includes/vectrex.h" |
| 10 | 12 |
| r1679 | r1680 | |
|---|---|---|
| 30 | 30 | #include "osdepend.h" |
| 31 | 31 | #include "deprecat.h" |
| 32 | 32 | #include "driver.h" |
| 33 | #include "mslegacy.h" | |
| 33 | 34 | #include "includes/nes.h" |
| 34 | 35 | #include "nes_mmc.h" |
| 35 | 36 | #include "sound/nes_apu.h" |
| r1679 | r1680 | |
|---|---|---|
| 102 | 102 | |
| 103 | 103 | #include "driver.h" |
| 104 | 104 | #include "deprecat.h" |
| 105 | #include "mslegacy.h" | |
| 105 | 106 | #include "image.h" |
| 106 | 107 | #include "cpu/m6502/m6502.h" |
| 107 | 108 | #include "machine/6522via.h" |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "deprecat.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | #include "includes/thomson.h" |
| 12 | 13 | #include "cpu/m6809/m6809.h" |
| 13 | 14 | #include "machine/6821pia.h" |
| r1679 | r1680 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | #include "driver.h" |
| 40 | 40 | #include "deprecat.h" |
| 41 | #include "mslegacy.h" | |
| 41 | 42 | #include "includes/lisa.h" |
| 42 | 43 | #include "machine/6522via.h" |
| 43 | 44 | #include "machine/applefdc.h" |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "deprecat.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | #include "includes/sym1.h" |
| 13 | 14 | |
| 14 | 15 | /* M6502 CPU */ |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | #include "driver.h" |
| 6 | 6 | #include "includes/lynx.h" |
| 7 | 7 | #include "deprecat.h" |
| 8 | #include "mslegacy.h" | |
| 8 | 9 | |
| 9 | 10 | #include "cpu/m6502/m6502.h" |
| 10 | 11 |
| r1679 | r1680 | |
|---|---|---|
| 12 | 12 | #include <stdarg.h> |
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "deprecat.h" |
| 15 | #include "mslegacy.h" | |
| 15 | 16 | #include "devices/cassette.h" |
| 16 | 17 | #include "cpu/i8085/i8085.h" |
| 17 | 18 | #include "includes/pmd85.h" |
| r1679 | r1680 | |
|---|---|---|
| 12 | 12 | **********************************************************************/ |
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "rriot.h" |
| 15 | #include "mslegacy.h" | |
| 15 | 16 | |
| 16 | 17 | #define VERBOSE 0 |
| 17 | 18 |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | #include "cpu/pdp1/tx0.h" |
| 10 | 10 | #include "includes/tx0.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | #include "video/crt.h" |
| 12 | 13 | |
| 13 | 14 |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include <math.h> |
| 8 | 8 | #include "driver.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | |
| 10 | 11 | #include "tms9901.h" |
| 11 | 12 |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "deprecat.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | #include "cpu/m6502/m6502.h" |
| 10 | 11 | #include "cpu/m6809/m6809.h" |
| 11 | 12 | |
| r1679 | r1680 | |
| 17 | 18 | #include "includes/pet.h" |
| 18 | 19 | #include "includes/cbmserb.h" |
| 19 | 20 | #include "includes/cbmieeeb.h" |
| 20 | #include "video/ | |
| 21 | #include "video/m | |
| 21 | 22 | |
| 22 | 23 | /* keyboard lines */ |
| 23 | 24 | static int pet_basic1=0; /* basic version 1 for quickloader */ |
| r1679 | r1680 | |
| 497 | 498 | static void pet_display_enable_changed(int display_enabled) { |
| 498 | 499 | } |
| 499 | 500 | |
| 500 | static const | |
| 501 | static const m | |
| 501 | 502 | 0, |
| 502 | 503 | 800000 /*?*/, |
| 503 | 504 | 8 /*?*/, |
| r1679 | r1680 | |
| 507 | 508 | pet_display_enable_changed |
| 508 | 509 | }; |
| 509 | 510 | |
| 510 | static const | |
| 511 | static const m | |
| 511 | 512 | 0, |
| 512 | 513 | 800000 /*?*/, |
| 513 | 514 | 16 /*?*/, |
| r1679 | r1680 | |
|---|---|---|
| 5 | 5 | #include "video/pc_aga.h" |
| 6 | 6 | #include "audio/pc.h" |
| 7 | 7 | #include "deprecat.h" |
| 8 | #include "mslegacy.h" | |
| 8 | 9 | |
| 9 | 10 | /* |
| 10 | 11 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "6551.h" |
| 3 | 3 | #include "includes/serial.h" |
| 4 | #include "mslegacy.h" | |
| 4 | 5 | |
| 5 | 6 | static void acia_6551_receive_char(unsigned char ch); |
| 6 | 7 | static void acia_6551_refresh_ints(void); |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "deprecat.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | #include "includes/electron.h" |
| 13 | 14 | #include "sound/beep.h" |
| 14 | 15 | #include "devices/cassette.h" |
| r1679 | r1680 | |
|---|---|---|
| 24 | 24 | #include "machine/8237dma.h" |
| 25 | 25 | #include "devices/harddriv.h" |
| 26 | 26 | #include "memconv.h" |
| 27 | #include "mslegacy.h" | |
| 27 | 28 | |
| 28 | 29 | |
| 29 | 30 | #define LOG_HDC_STATUS 0 |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "centroni.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | #include "devices/printer.h" |
| 10 | 11 | |
| 11 | 12 | typedef struct { |
| r1679 | r1680 | |
|---|---|---|
| 33 | 33 | #include "driver.h" |
| 34 | 34 | #include "mc6843.h" |
| 35 | 35 | #include "devices/flopdrv.h" |
| 36 | #include "mslegacy.h" | |
| 36 | 37 | |
| 37 | 38 | |
| 38 | 39 | /******************* parameters ******************/ |
| r1679 | r1680 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | #include "driver.h" |
| 22 | 22 | #include "deprecat.h" |
| 23 | #include "mslegacy.h" | |
| 23 | 24 | #include "mm58274c.h" |
| 24 | 25 | |
| 25 | 26 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "memconv.h" |
| 3 | #include "mslegacy.h" | |
| 3 | 4 | #include "includes/ibmpc.h" |
| 4 | 5 | |
| 5 | 6 | #include "machine/pcshare.h" |
| r1679 | r1680 | |
|---|---|---|
| 34 | 34 | */ |
| 35 | 35 | |
| 36 | 36 | #include "68901mfp.h" |
| 37 | #include "mslegacy.h" | |
| 37 | 38 | |
| 38 | 39 | typedef struct |
| 39 | 40 | { |
| r1679 | r1680 | |
|---|---|---|
| 15 | 15 | #include "amiga.h" |
| 16 | 16 | #include "amigafdc.h" |
| 17 | 17 | #include "machine/6526cia.h" |
| 18 | #include "mslegacy.h" | |
| 18 | 19 | |
| 19 | 20 | |
| 20 | 21 | #define MAX_TRACK_BYTES 12500 |
| r1679 | r1680 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | #include "z80dart.h" |
| 12 | 13 | #include "cpu/z80/z80.h" |
| 13 | 14 | #include "cpu/z80/z80daisy.h" |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | #include "amiga.h" |
| 10 | 10 | #include "amigakbd.h" |
| 11 | 11 | #include "machine/6526cia.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | #define KEYBOARD_BUFFER_SIZE 256 |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | #include "devices/chd_cd.h" |
| 17 | 17 | #include "sound/cdda.h" |
| 18 | 18 | #include "machine/matsucd.h" |
| 19 | #include "mslegacy.h" | |
| 19 | 20 | |
| 20 | 21 | |
| 21 | 22 | #define MATSU_STATUS_READY ( 1 << 0 ) /* driver ready */ |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include <math.h> |
| 8 | 8 | #include "driver.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | |
| 10 | 11 | #include "tms9902.h" |
| 11 | 12 |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | 18 | #include "deprecat.h" |
| 19 | #include "mslegacy.h" | |
| 19 | 20 | #include "cpu/z80/z80.h" |
| 20 | 21 | #include "machine/6821pia.h" |
| 21 | 22 | #include "machine/6850acia.h" |
| r1679 | r1680 | |
|---|---|---|
| 2 | 2 | #include "driver.h" |
| 3 | 3 | #include "image.h" |
| 4 | 4 | #include "deprecat.h" |
| 5 | #include "mslegacy.h" | |
| 5 | 6 | #include "includes/sms.h" |
| 6 | 7 | #include "video/smsvdp.h" |
| 7 | 8 | #include "sound/2413intf.h" |
| r1679 | r1680 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | 39 | #include "deprecat.h" |
| 40 | #include "mslegacy.h" | |
| 40 | 41 | #include "machine/wd17xx.h" |
| 41 | 42 | #include "devices/flopdrv.h" |
| 42 | 43 |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "machine/uart8250.h" |
| 11 | 11 | #include "includes/pc_mouse.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | static struct { |
| r1679 | r1680 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "machine/hd63450.h" |
| 8 | 8 | #include "deprecat.h" |
| 9 | #include "mslegacy.h" | |
| 9 | 10 | |
| 10 | 11 | static struct hd63450 dmac; |
| 11 | 12 |
| r1679 | r1680 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "deprecat.h" |
| 13 | #include "mslegacy.h" | |
| 13 | 14 | #include "includes/svi318.h" |
| 14 | 15 | #include "cpu/z80/z80.h" |
| 15 | #include "video/ | |
| 16 | #include "video/m | |
| 16 | 17 | #include "video/tms9928a.h" |
| 17 | 18 | #include "machine/8255ppi.h" |
| 18 | 19 | #include "machine/uart8250.h" |
| r1679 | r1680 | |
| 443 | 444 | } |
| 444 | 445 | } |
| 445 | 446 | |
| 446 | static const | |
| 447 | static const m | |
| 447 | 448 | 1, |
| 448 | 449 | 3579545 /*?*/, |
| 449 | 450 | 8 /*?*/, |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | |
| 2 | 2 | #include "driver.h" |
| 3 | 3 | #include "deprecat.h" |
| 4 | #include "mslegacy.h" | |
| 4 | 5 | #include "video/vdc.h" |
| 5 | 6 | #include "cpu/h6280/h6280.h" |
| 6 | 7 | #include "includes/pce.h" |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | 18 | #include "tms5501.h" |
| 19 | #include "mslegacy.h" | |
| 19 | 20 | |
| 20 | 21 | #define DEBUG_TMS5501 0 |
| 21 | 22 |
| r1679 | r1680 | |
|---|---|---|
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "sgi.h" |
| 11 | 11 | #include "deprecat.h" |
| 12 | #include "mslegacy.h" | |
| 12 | 13 | |
| 13 | 14 | #define VERBOSE_LEVEL ( 1 ) |
| 14 | 15 |
| r1679 | r1680 | |
|---|---|---|
| 11 | 11 | #include "ctype.h" |
| 12 | 12 | #include "driver.h" |
| 13 | 13 | #include "deprecat.h" |
| 14 | #include "mslegacy.h" | |
| 14 | 15 | #include "cpu/m6502/m6502.h" |
| 15 | 16 | #include "machine/6522via.h" |
| 16 | 17 | #include "machine/wd17xx.h" |
| r1679 | r1680 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | #include "driver.h" |
| 16 | 16 | #include "deprecat.h" |
| 17 | #include "mslegacy.h" | |
| 17 | 18 | #include "cpu/i86/i186intf.h" |
| 18 | 19 | #include "video/i82720.h" |
| 19 | 20 | #include "machine/8255ppi.h" |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | /* Core includes */ |
| 2 | 2 | #include "driver.h" |
| 3 | 3 | #include "deprecat.h" |
| 4 | #include "mslegacy.h" | |
| 4 | 5 | #include "includes/kc.h" |
| 5 | 6 | |
| 6 | 7 | /* Components */ |
| r1679 | r1680 | |
|---|---|---|
| 64 | 64 | // |
| 65 | 65 | |
| 66 | 66 | #include "driver.h" |
| 67 | #include "mslegacy.h" | |
| 67 | 68 | #include "devices/harddriv.h" |
| 68 | 69 | #include "includes/corvushd.h" |
| 69 | 70 | #include <ctype.h> |
| r1679 | r1680 | |
|---|---|---|
| 69 | 69 | + (num_cols * num_rows * sizeof(termchar_t))); |
| 70 | 70 | |
| 71 | 71 | term->tm = tilemap_create(terminal_gettileinfo, tilemap_scan_rows, |
| 72 | | |
| 72 | | |
| 73 | 73 | |
| 74 | 74 | term->gfx = gfx; |
| 75 | 75 | term->blank_char = blank_char; |
| r1679 | r1680 | |
|---|---|---|
| 95 | 95 | |
| 96 | 96 | #include "driver.h" |
| 97 | 97 | #include "deprecat.h" |
| 98 | #include "mslegacy.h" | |
| 98 | 99 | #include "includes/nc.h" |
| 99 | 100 | #include "includes/serial.h" /* for serial data transfers */ |
| 100 | 101 | #include "machine/msm8251.h" /* for NC100 uart */ |
| r1679 | r1680 | |
|---|---|---|
| 167 | 167 | #include "includes/cbm.h" |
| 168 | 168 | #include "machine/tpi6525.h" |
| 169 | 169 | #include "video/vic6567.h" |
| 170 | #include "video/ | |
| 170 | #include "video/m | |
| 171 | 171 | #include "includes/cbmserb.h" |
| 172 | 172 | #include "includes/vc1541.h" |
| 173 | 173 | #include "includes/vc20tape.h" |
| r1679 | r1680 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | static UINT64 *dc_sound_ram; |
| 18 | 18 | |
| 19 | UINT32 dma_offset; /* silly MAME global variable */ | |
| 20 | ||
| 19 | 21 | static ADDRESS_MAP_START( dc_map, ADDRESS_SPACE_PROGRAM, 64 ) |
| 20 | 22 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM // BIOS |
| 21 | 23 | AM_RANGE(0x00200000, 0x0021ffff) AM_ROM AM_REGION(REGION_CPU1, 0x200000) // flash |
| r1679 | r1680 | |
|---|---|---|
| 79 | 79 | #include "machine/z80pio.h" |
| 80 | 80 | #include "sound/sn76477.h" |
| 81 | 81 | #include "machine/abcbus.h" |
| 82 | #include "mslegacy.h" | |
| 82 | 83 | |
| 83 | 84 | /* Devices */ |
| 84 | 85 | #include "devices/basicdsk.h" |
| r1679 | r1680 | |
|---|---|---|
| 127 | 127 | #include "driver.h" |
| 128 | 128 | #include "render.h" |
| 129 | 129 | #include "deprecat.h" |
| 130 | #include "mslegacy.h" | |
| 130 | 131 | #include "cpu/m68000/m68000.h" |
| 131 | 132 | #include "machine/68901mfp.h" |
| 132 | 133 | #include "machine/8255ppi.h" |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "deprecat.h" |
| 3 | #include "mslegacy.h" | |
| 3 | 4 | #include "video/atarist.h" |
| 4 | 5 | #include "cpu/m68000/m68k.h" |
| 5 | 6 | #include "cpu/m68000/m68000.h" |
| r1679 | r1680 | |
|---|---|---|
| 94 | 94 | #include "devices/printer.h" |
| 95 | 95 | #include "devices/z80bin.h" |
| 96 | 96 | #include "sound/speaker.h" |
| 97 | #include "mslegacy.h" | |
| 97 | 98 | |
| 98 | 99 | |
| 99 | 100 | static int device_load_exidy_floppy(mess_image *image) |
| r1679 | r1680 | |
|---|---|---|
| 120 | 120 | #include "machine/6821pia.h" |
| 121 | 121 | #include "machine/6522via.h" |
| 122 | 122 | #include "includes/pet.h" |
| 123 | #include "video/ | |
| 123 | #include "video/m | |
| 124 | 124 | #include "includes/cbmserb.h" |
| 125 | 125 | #include "includes/cbmieeeb.h" |
| 126 | 126 | /*#include "includes/vc1541.h" */ |
| r1679 | r1680 | |
|---|---|---|
| 13 | 13 | #include "formats/a26_cas.h" |
| 14 | 14 | #include "video/tia.h" |
| 15 | 15 | #include "deprecat.h" |
| 16 | #include "mslegacy.h" | |
| 16 | 17 | |
| 17 | 18 | #define CART memory_region(REGION_USER1) |
| 18 | 19 |
| r1679 | r1680 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "deprecat.h" |
| 3 | #include "mslegacy.h" | |
| 3 | 4 | #include "cpu/i8039/i8039.h" |
| 4 | 5 | #include "cpu/m68000/m68000.h" |
| 5 | 6 | #include "devices/cartslot.h" |
| r1679 | r1680 | |
|---|---|---|
| 71 | 71 | /* Core includes */ |
| 72 | 72 | #include "driver.h" |
| 73 | 73 | #include "includes/abc80x.h" |
| 74 | #include "mslegacy.h" | |
| 74 | 75 | |
| 75 | 76 | /* Components */ |
| 76 | 77 | #include "cpu/z80/z80daisy.h" |
| r1679 | r1680 | |
| 81 | 82 | #include "machine/z80sio.h" |
| 82 | 83 | #include "machine/z80dart.h" |
| 83 | 84 | #include "machine/abcbus.h" |
| 84 | #include "video/ | |
| 85 | #include "video/m | |
| 85 | 86 | |
| 86 | 87 | /* Devices */ |
| 87 | 88 | #include "devices/basicdsk.h" |
| r1679 | r1680 | |
| 276 | 277 | AM_RANGE(0x07, 0x07) AM_READWRITE(abcbus_reset_r, hrc_w) |
| 277 | 278 | AM_RANGE(0x20, 0x23) AM_READWRITE(dart_r, dart_w) |
| 278 | 279 | AM_RANGE(0x30, 0x32) AM_WRITE(ram_ctrl_w) |
| 279 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_register_r) | |
| 280 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_address_w) | |
| 281 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_register_w) | |
| 280 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_0_register_r) | |
| 281 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_0_address_w) | |
| 282 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_0_register_w) | |
| 282 | 283 | AM_RANGE(0x40, 0x43) AM_READWRITE(sio2_r, sio2_w) |
| 283 | 284 | AM_RANGE(0x50, 0x53) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) |
| 284 | 285 | AM_RANGE(0x80, 0xff) AM_READWRITE(abcbus_strobe_r, abcbus_strobe_w) |
| r1679 | r1680 | |
| 314 | 315 | AM_RANGE(0x06, 0x06) AM_WRITE(hrs_w) |
| 315 | 316 | AM_RANGE(0x07, 0x07) AM_READWRITE(abcbus_reset_r, hrc_w) |
| 316 | 317 | AM_RANGE(0x20, 0x23) AM_READWRITE(dart_r, dart_w) |
| 317 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_register_r) | |
| 318 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_0_register_r) | |
| 318 | 319 | AM_RANGE(0x32, 0x35) AM_READWRITE(sio2_r, sio2_w) |
| 319 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_address_w) | |
| 320 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_register_w) | |
| 320 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_0_address_w) | |
| 321 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_0_register_w) | |
| 321 | 322 | AM_RANGE(0x60, 0x63) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) |
| 322 | 323 | AM_RANGE(0x80, 0xff) AM_READWRITE(abcbus_strobe_r, abcbus_strobe_w) |
| 323 | 324 | ADDRESS_MAP_END |
| r1679 | r1680 | |
| 339 | 340 | AM_RANGE(0x06, 0x06) AM_WRITE(hrs_w) |
| 340 | 341 | AM_RANGE(0x07, 0x07) AM_READWRITE(abcbus_reset_r, hrc_w) |
| 341 | 342 | AM_RANGE(0x20, 0x23) AM_READWRITE(dart_r, dart_w) |
| 342 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_register_r) | |
| 343 | AM_RANGE(0x31, 0x31) AM_READ(crtc6845_0_register_r) | |
| 343 | 344 | AM_RANGE(0x34, 0x34) AM_READWRITE(bankswitch_r, bankswitch_w) |
| 344 | 345 | AM_RANGE(0x35, 0x35) AM_READWRITE(attribute_r, attribute_w) |
| 345 | 346 | AM_RANGE(0x37, 0x37) AM_READWRITE(sync_r, fgctlprom_w) |
| 346 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_address_w) | |
| 347 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_register_w) | |
| 347 | AM_RANGE(0x38, 0x38) AM_WRITE(crtc6845_0_address_w) | |
| 348 | AM_RANGE(0x39, 0x39) AM_WRITE(crtc6845_0_register_w) | |
| 348 | 349 | AM_RANGE(0x40, 0x41) AM_READWRITE(sio2_r, sio2_w) |
| 349 | 350 | AM_RANGE(0x60, 0x63) AM_READWRITE(z80ctc_0_r, z80ctc_0_w) |
| 350 | 351 | AM_RANGE(0x80, 0xff) AM_READWRITE(abcbus_strobe_r, abcbus_strobe_w) |
| r1679 | r1680 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | #include "driver.h" |
| 82 | 82 | #include "deprecat.h" |
| 83 | #include "mslegacy.h" | |
| 83 | 84 | #include "machine/z80ctc.h" |
| 84 | 85 | #include "machine/z80pio.h" |
| 85 | 86 | #include "machine/z80sio.h" |
| r1679 | r1680 | |
| 93 | 94 | #include "devices/basicdsk.h" |
| 94 | 95 | #include "devices/printer.h" |
| 95 | 96 | #include "sound/ay8910.h" |
| 96 | #include "video/ | |
| 97 | #include "video/m | |
| 97 | 98 | |
| 98 | 99 | #define EINSTEIN_SYSTEM_CLOCK 4000000 |
| 99 | 100 | |
| r1679 | r1680 | |
| 253 | 254 | } |
| 254 | 255 | } |
| 255 | 256 | |
| 256 | static const | |
| 257 | static const m | |
| 257 | 258 | 0, |
| 258 | 259 | EINSTEIN_SYSTEM_CLOCK /*?*/, |
| 259 | 260 | 8 /*?*/, |
| r1679 | r1680 | |
|---|---|---|
| 35 | 35 | #include "cpu/arm/arm.h" |
| 36 | 36 | #include "sound/dac.h" |
| 37 | 37 | #include "deprecat.h" |
| 38 | #include "mslegacy.h" | |
| 38 | 39 | |
| 39 | 40 | |
| 40 | 41 | // interrupt register stuff |
| r1679 | r1680 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | #include "driver.h" |
| 76 | 76 | #include "deprecat.h" |
| 77 | #include "mslegacy.h" | |
| 77 | 78 | #include "cpu/tms9900/tms9900.h" |
| 78 | 79 | #include "video/tms9928a.h" |
| 79 | 80 | #include "devices/cartslot.h" |
| r1679 | r1680 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | Source Changes: |
| 28 | 28 | ---------------- |
| 29 | (none) | |
| 29 | - The core is based on MAME 0.123u1. This incorporates all features of the | |
| 30 | update to this core. [MAME team] | |
| 30 | 31 | |
| 31 | 32 | |
| 32 | 33 |
| Previous | 15994 Revisions | Next |