Previous | 199869 Revisions | Next |
r17989 Tuesday 18th September, 2012 at 08:43:04 UTC by Miodrag Milanović |
---|
changed most of screen.machine() to machine() (no whatsnew) |
[src/mame/drivers] | 1945kiii.c ace.c acefruit.c acommand.c adp.c albazc.c amaticmg.c aristmk4.c aristmk6.c astinvad.c astrocorp.c astrof.c atarisy4.c avt.c backfire.c berzerk.c bestleag.c bfcobra.c bingor.c blackt96.c blitz68k.c bmcbowl.c bmcpokr.c bnstars.c boxer.c buster.c cabaret.c calorie.c cardline.c carrera.c cb2001.c cball.c cham24.c champbas.c champbwl.c chanbara.c chihiro.c chinsan.c cmmb.c cntsteer.c cobra.c coinmvga.c coolridr.c cps3.c crystal.c cshooter.c cubeqst.c dacholer.c dblewing.c ddayjlc.c ddealer.c ddenlovr.c dec8.c deco156.c deco_ld.c destroyr.c discoboy.c diverboy.c dlair.c dmndrby.c dominob.c dreamwld.c drtomy.c dunhuang.c dwarfd.c egghunt.c esh.c expro02.c famibox.c fcrash.c feversoc.c firefox.c flipjack.c flyball.c fortecar.c funkball.c gal3.c galaxi.c galgame.c galpani3.c galpanic.c gamecstl.c go2000.c gpworld.c gstream.c guab.c halleys.c highvdeo.c hitme.c hitpoker.c hornet.c hotblock.c hvyunit.c igs009.c igs011.c igs017.c igs_m027.c igspoker.c intrscti.c istellar.c itgambl2.c itgambl3.c itgamble.c jackie.c jackpool.c jalmah.c jangou.c jantotsu.c jchan.c jclub2.c jollyjgr.c jpmsys5.c kingdrby.c laserbat.c lastfght.c lgp.c limenko.c looping.c luckgrln.c m63.c magicard.c majorpkr.c marinedt.c mastboy.c maygayv1.c mazerbla.c mediagx.c meritm.c mgolf.c midas.c mirage.c mirax.c missb2.c mjsister.c mlanding.c monzagp.c mpoker.c mpu4dealem.c mpu4vid.c multfish.c multigam.c murogem.c murogmbl.c mwarr.c namcos23.c neoprint.c nightgal.c nmg5.c norautp.c nwk-tr.c olibochu.c panicr.c pcxt.c photon.c pinkiri8.c poker72.c poo.c popobear.c powerbal.c progolf.c pturn.c pzletime.c quizpun2.c r2dx_v33.c rabbit.c raiden2.c rbmk.c rgum.c sandscrp.c sbrkout.c segac2.c segald.c seta.c sfbonus.c shanghai.c sigmab52.c sigmab98.c silvmil.c skyarmy.c snowbros.c speglsht.c spoker.c srmp5.c srmp6.c statriv2.c sub.c subsino2.c summit.c supdrapo.c superwng.c suprgolf.c taitotz.c taitowlf.c tasman.c tmaster.c tmmjprd.c trvmadns.c ttchamp.c tugboat.c twins.c umipoker.c vega.c viper.c vmetal.c vpoker.c vroulet.c witch.c zr107.c |
[src/mame/machine] | slikshot.c |
[src/mame/video] | 1942.c 1943.c 20pacgal.c 40love.c 8080bw.c actfancr.c aeroboto.c aerofgt.c ajax.c aliens.c alpha68k.c ambush.c amiga.c amigaaga.c amspdwy.c angelkds.c appoooh.c aquarium.c arabian.c arcadecl.c argus.c arkanoid.c armedf.c asterix.c asuka.c atarifb.c atarig42.c atarigx2.c atarisy2.c bagman.c balsente.c baraduke.c batman.c battlane.c battlera.c battlex.c battlnts.c bbusters.c bigevglf.c bigstrkb.c bionicc.c bishi.c bking.c bladestl.c blktiger.c blmbycar.c blockhl.c bloodbro.c blueprnt.c bogeyman.c bombjack.c boogwing.c bosco.c brkthru.c bsktball.c btime.c bublbobl.c buggychl.c bwing.c cabal.c canyon.c capbowl.c carjmbre.c carpolo.c cave.c cbasebal.c cbuster.c ccastles.c cclimber.c centiped.c chaknpop.c champbas.c changela.c cheekyms.c cinemat.c circus.c circusc.c citycon.c cloak.c cloud9.c clshroad.c cninja.c combatsc.c commando.c compgolf.c contra.c cop01.c copsnrob.c cosmic.c cps1.c crbaloon.c crgolf.c crospang.c crshrace.c cvs.c darkmist.c darkseal.c dassault.c dbz.c dc.c dcon.c dday.c ddragon.c ddragon3.c ddribble.c deadang.c dec0.c dec8.c deco32.c deco_mlc.c decocass.c deniam.c dietgo.c digdug.c djmain.c dkong.c docastle.c dogfgt.c dooyong.c drgnmst.c dribling.c drmicro.c dynax.c dynduke.c epos.c eprom.c equites.c esd16.c espial.c exedexes.c exerion.c exidy.c exidy440.c exprraid.c exzisus.c f1gp.c fantland.c fastfred.c fastlane.c fcombat.c fgoal.c finalizr.c firetrap.c firetrk.c fitfight.c flkatck.c flower.c flstory.c foodf.c freekick.c funkybee.c funkyjet.c funybubl.c fuukifg2.c fuukifg3.c gaelco.c gaelco3d.c gaiden.c galaga.c galastrm.c galaxia.c galaxian.c galaxold.c galivan.c galpani2.c galpanic.c galspnbl.c gaplus.c gberet.c gcpinbal.c gijoe.c ginganin.c gladiatr.c glass.c gng.c goal92.c goindol.c goldstar.c gomoku.c gotcha.c gottlieb.c gotya.c gradius3.c grchamp.c gridlee.c groundfx.c gstriker.c gsword.c gunbustr.c gunsmoke.c gyruss.c hcastle.c higemaru.c himesiki.c hnayayoi.c hng64.c holeland.c homedata.c homerun.c hyperspt.c hyprduel.c ikki.c inufuku.c irobot.c ironhors.c itech8.c jack.c jackal.c jailbrek.c jedi.c kan_panb.c kaneko16.c karnov.c kchamp.c kickgoal.c kingobox.c kncljoe.c konamigx.c ksayakyu.c kyugo.c labyrunr.c ladybug.c ladyfrog.c lasso.c lastduel.c lazercmd.c legionna.c leland.c lemmings.c lethal.c liberate.c lkage.c lockon.c lordgun.c lsasquad.c lwings.c m10.c m107.c m52.c m57.c m58.c m62.c m72.c m90.c m92.c macrossp.c madalien.c madmotor.c magmax.c mainevt.c mainsnk.c malzak.c mappy.c marineb.c mario.c markham.c matmania.c mcatadv.c mcr.c mcr3.c mcr68.c meadows.c megasys1.c megazone.c mermaid.c metlclsh.c metro.c mexico86.c midzeus.c midzeus2.c mikie.c mitchell.c mjkjidai.c model1.c model2.c model3.c momoko.c moo.c mouser.c mrdo.c mrflea.c mrjong.c ms32.c msisaac.c mugsmash.c munchmo.c mustache.c mystston.c mystwarr.c n64.c n8080.c namcofl.c namcona1.c namconb1.c namcos1.c namcos21.c namcos22.c namcos86.c naughtyb.c nbmj8891.c nbmj8900.c nbmj8991.c nbmj9195.c nemesis.c neogeo.c ninjakd2.c ninjaw.c nitedrvr.c niyanpai.c nmk16.c nova2001.c nycaptor.c ohmygod.c ojankohs.c oneshot.c opwolf.c orbit.c othldrby.c othunder.c overdriv.c pacland.c pacman.c pandoras.c paradise.c parodius.c pbaction.c pcktgal.c pgm.c pingpong.c pirates.c pitnrun.c pktgaldx.c playch10.c playmark.c plygonet.c pokechmp.c polepos.c polyplay.c poolshrk.c pooyan.c popeye.c popper.c portrait.c powerins.c prehisle.c psikyo.c psikyo4.c psikyosh.c psychic5.c punchout.c pushman.c qdrmfgp.c quasar.c quizdna.c raiden.c rainbow.c rallyx.c rampart.c rastan.c realbrk.c redalert.c redclash.c relief.c renegade.c retofinv.c rockrage.c rocnrope.c rohga.c rollerg.c rollrace.c route16.c rpunch.c runaway.c rungun.c sauro.c sbasketb.c scotrsht.c sderby.c segag80r.c segag80v.c segas18.c segas24.c segas32.c seibuspi.c seicross.c senjyo.c seta.c seta2.c sf.c shadfrce.c shangkid.c shaolins.c shisen.c shootout.c sidearms.c sidepckt.c silkroad.c simpl156.c simpsons.c skydiver.c skyfox.c skykid.c skyraid.c slapfght.c slapshot.c snes.c snk.c snk68.c solomon.c sonson.c spacefb.c spbactn.c spcforce.c spdodgeb.c speedatk.c speedbal.c speedspn.c splash.c sprcros2.c sprint2.c sprint4.c sprint8.c spy.c srmp2.c srumbler.c sshangha.c sslam.c ssozumo.c sspeedr.c ssrj.c ssv.c st0016.c stactics.c stadhero.c starcrus.c starshp1.c stfight.c stlforce.c strnskil.c stvvdp2.c subs.c suna16.c suna8.c supbtime.c superchs.c superqix.c suprloco.c suprnova.c suprridr.c suprslam.c surpratk.c system16.c tagteam.c tail2nos.c taito_b.c taito_f2.c taito_f3.c taito_h.c taito_l.c taito_o.c taito_z.c taitoair.c taitojc.c taitosj.c tank8.c tankbatt.c tankbust.c taotaido.c targeth.c tatsumi.c taxidriv.c tbowl.c tceptor.c tecmo.c tecmo16.c tecmosys.c tehkanwc.c terracre.c tetrisp2.c thedeep.c thepit.c thief.c thoop2.c thunderj.c thunderx.c tiamc1.c tigeroad.c timelimt.c timeplt.c tmnt.c tnzs.c toaplan1.c toaplan2.c toki.c toobin.c topspeed.c toypop.c tp84.c trackfld.c travrusa.c triplhnt.c tryout.c tsamurai.c tubep.c tumbleb.c tumblep.c tunhunt.c turbo.c tutankhm.c twin16.c twincobr.c tx1.c ultratnk.c undrfire.c unico.c vaportra.c vastar.c vball.c vectrex.c vendetta.c vicdual.c victory.c videopin.c vigilant.c volfied.c vulgus.c warpwarp.c warriorb.c wc90.c wc90b.c wecleman.c welltris.c wgp.c williams.c wiping.c wiz.c wolfpack.c wrally.c wwfsstar.c wwfwfest.c xain.c xevious.c xexex.c xmen.c xorworld.c xxmissio.c yiear.c yunsun16.c yunsung8.c zac2650.c zaccaria.c zaxxon.c |
[src/mess/drivers] | apexc.c bml3.c c65.c cybiko.c einstein.c fp6000.c interact.c ipds.c itt3030.c jr200.c m20.c mbc200.c multi16.c multi8.c myb3k.c mz2000.c mz2500.c paso1600.c pasogo.c pasopia7.c pc100.c pc6001.c pc8801.c pc88va.c pk8000.c pv1000.c rainbow.c sm1800.c smc777.c ssem.c supracan.c svision.c ti99_2.c tk80bs.c vboy.c vii.c vt100.c x1.c z100.c |
[src/mess/machine] | amstrad.c lisa.c sms.c |
[src/mess/video] | ac1.c apple1.c apple2.c apple3.c b2m.c bbc.c cgenie.c dai.c fmtowns.c galeb.c hec2video.c hp48.c intv.c kramermc.c mac.c mz700.c nascom1.c nc.c nes.c ondra.c oric.c orion.c p2000m.c pcw.c pcw16.c pdp1.c pet.c pk8020.c pp01.c primo.c radio86.c spectrum.c ssystem3.c super80.c timex.c tx0.c ut88.c vector06.c vtech2.c x68k.c |
r17988 | r17989 | |
---|---|---|
593 | 593 | if (temp >= 0x90) temp = 0x90; |
594 | 594 | m_curx = temp; |
595 | 595 | |
596 | compute_sensors( | |
596 | compute_sensors( | |
597 | 597 | // popmessage("V=%02x,%02x X=%02x", m_curvx, m_curvy, m_curx); |
598 | 598 | m_crosshair_vis = 0; |
599 | 599 | } |
r17988 | r17989 | |
---|---|---|
139 | 139 | |
140 | 140 | m_pant[1]->draw(bitmap, cliprect, 0,0); |
141 | 141 | m_pant[0]->draw(bitmap, cliprect, 0,0); |
142 | draw_sprites( | |
142 | draw_sprites( | |
143 | 143 | |
144 | 144 | return 0; |
145 | 145 | } |
r17988 | r17989 | |
---|---|---|
241 | 241 | { |
242 | 242 | |
243 | 243 | #if NYCAPTOR_DEBUG |
244 | nycaptor_setmask( | |
244 | nycaptor_setmask( | |
245 | 245 | if (m_mask & 0x1000) |
246 | 246 | { |
247 | 247 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
r17988 | r17989 | |
252 | 252 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
253 | 253 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
254 | 254 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
255 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
256 | draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
257 | draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
258 | draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
259 | draw_sprites(screen.machine(), bitmap, cliprect, 4); | |
260 | draw_sprites(screen.machine(), bitmap, cliprect, 5); | |
261 | draw_sprites(screen.machine(), bitmap, cliprect, 6); | |
262 | draw_sprites(screen.machine(), bitmap, cliprect, 7); | |
255 | draw_sprites(machine(), bitmap, cliprect, 0); | |
256 | draw_sprites(machine(), bitmap, cliprect, 1); | |
257 | draw_sprites(machine(), bitmap, cliprect, 2); | |
258 | draw_sprites(machine(), bitmap, cliprect, 3); | |
259 | draw_sprites(machine(), bitmap, cliprect, 4); | |
260 | draw_sprites(machine(), bitmap, cliprect, 5); | |
261 | draw_sprites(machine(), bitmap, cliprect, 6); | |
262 | draw_sprites(machine(), bitmap, cliprect, 7); | |
263 | 263 | } |
264 | 264 | else |
265 | 265 | #endif |
266 | switch (nycaptor_spot( | |
266 | switch (nycaptor_spot( | |
267 | 267 | { |
268 | 268 | case 0: |
269 | 269 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
270 | draw_sprites( | |
270 | draw_sprites( | |
271 | 271 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0); |
272 | 272 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0); |
273 | 273 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0); |
274 | 274 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
275 | draw_sprites( | |
275 | draw_sprites( | |
276 | 276 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
277 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
278 | draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
277 | draw_sprites(machine(), bitmap, cliprect, 0); | |
278 | draw_sprites(machine(), bitmap, cliprect, 2); | |
279 | 279 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
280 | draw_sprites( | |
280 | draw_sprites( | |
281 | 281 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
282 | 282 | break; |
283 | 283 | |
284 | 284 | case 1: |
285 | 285 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
286 | draw_sprites( | |
286 | draw_sprites( | |
287 | 287 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0); |
288 | draw_sprites( | |
288 | draw_sprites( | |
289 | 289 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0); |
290 | 290 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
291 | draw_sprites( | |
291 | draw_sprites( | |
292 | 292 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
293 | 293 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0); |
294 | draw_sprites( | |
294 | draw_sprites( | |
295 | 295 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
296 | 296 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
297 | 297 | break; |
r17988 | r17989 | |
300 | 300 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
301 | 301 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0); |
302 | 302 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
303 | draw_sprites( | |
303 | draw_sprites( | |
304 | 304 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
305 | 305 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0); |
306 | 306 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0); |
307 | draw_sprites( | |
307 | draw_sprites( | |
308 | 308 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
309 | 309 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
310 | 310 | break; |
311 | 311 | |
312 | 312 | case 3: |
313 | 313 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
314 | draw_sprites( | |
314 | draw_sprites( | |
315 | 315 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
316 | draw_sprites( | |
316 | draw_sprites( | |
317 | 317 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
318 | 318 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
319 | 319 | break; |
r17988 | r17989 | |
---|---|---|
49 | 49 | layer[0] = 0; |
50 | 50 | layer[1] = 1; |
51 | 51 | |
52 | | |
52 | | |
53 | 53 | |
54 | 54 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1); |
55 | 55 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
97 | 97 | layer[0] = 0; |
98 | 98 | layer[1] = 1; |
99 | 99 | |
100 | | |
100 | | |
101 | 101 | |
102 | 102 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); |
103 | 103 | |
r17988 | r17989 | |
105 | 105 | for (offs = m_spriteram.bytes() / 2 - 8; offs >= 0; offs -= 8) |
106 | 106 | { |
107 | 107 | int tile = spriteram[offs]; |
108 | if (tile < | |
108 | if (tile < | |
109 | 109 | { |
110 | 110 | int sx,sy,color,data1; |
111 | 111 | |
r17988 | r17989 | |
117 | 117 | data1 = spriteram[offs + 3]; |
118 | 118 | color = (spriteram[offs + 4] & 0x0f) | sprite_colbank; |
119 | 119 | |
120 | drawgfx_transpen(bitmap,cliprect, | |
120 | drawgfx_transpen(bitmap,cliprect, | |
121 | 121 | tile, |
122 | 122 | color, |
123 | 123 | data1 & 0x40, data1 & 0x80, |
r17988 | r17989 | |
---|---|---|
315 | 315 | |
316 | 316 | bitmap.fill(0, cliprect); |
317 | 317 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
318 | draw_sprites( | |
318 | draw_sprites( | |
319 | 319 | return 0; |
320 | 320 | } |
r17988 | r17989 | |
---|---|---|
499 | 499 | { |
500 | 500 | |
501 | 501 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
502 | draw_sprites( | |
502 | draw_sprites( | |
503 | 503 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
504 | 504 | return 0; |
505 | 505 | } |
r17988 | r17989 | |
---|---|---|
105 | 105 | { |
106 | 106 | int offs; |
107 | 107 | |
108 | draw_background( | |
108 | draw_background( | |
109 | 109 | |
110 | draw_sprites( | |
110 | draw_sprites( | |
111 | 111 | |
112 | 112 | for (offs = 0; offs < 0x1000 / 2; offs++) |
113 | 113 | { |
r17988 | r17989 | |
122 | 122 | /* What is this? A priority/half transparency marker? */ |
123 | 123 | if (!(attr & 0x0008)) |
124 | 124 | { |
125 | drawgfx_transpen(bitmap,cliprect, | |
125 | drawgfx_transpen(bitmap,cliprect, | |
126 | 126 | code, |
127 | 127 | color, |
128 | 128 | 0,0, |
r17988 | r17989 | |
131 | 131 | } |
132 | 132 | } |
133 | 133 | |
134 | draw_sprites( | |
134 | draw_sprites( | |
135 | 135 | return 0; |
136 | 136 | } |
r17988 | r17989 | |
---|---|---|
227 | 227 | (m_screen_layout ? m_bg_tilemap8x4 : m_bg_tilemap4x8)->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
228 | 228 | |
229 | 229 | if (m_objon) |
230 | draw_sprites( | |
230 | draw_sprites( | |
231 | 231 | |
232 | 232 | if (m_bgon) |
233 | 233 | (m_screen_layout ? m_bg_tilemap8x4 : m_bg_tilemap4x8)->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
r17988 | r17989 | |
---|---|---|
228 | 228 | m_tx_layer->enable(m_txt_enable); |
229 | 229 | |
230 | 230 | |
231 | draw_background(screen.machine(), bitmap, cliprect,0x00); | |
232 | draw_sprites(screen.machine(),bitmap,cliprect,0); // Untested: does anything use it? Could be behind background | |
233 | draw_sprites(screen.machine(),bitmap,cliprect,1); | |
234 | draw_background(screen.machine(), bitmap, cliprect,0x20); | |
231 | draw_background(machine(), bitmap, cliprect,0x00); | |
232 | draw_sprites(machine(),bitmap,cliprect,0); // Untested: does anything use it? Could be behind background | |
233 | draw_sprites(machine(),bitmap,cliprect,1); | |
234 | draw_background(machine(), bitmap, cliprect,0x20); | |
235 | 235 | |
236 | draw_sprites( | |
236 | draw_sprites( | |
237 | 237 | m_fg_layer->draw(bitmap, cliprect, 0,0); |
238 | draw_sprites( | |
238 | draw_sprites( | |
239 | 239 | m_tx_layer->draw(bitmap, cliprect, 0,0); |
240 | 240 | |
241 | 241 | return 0; |
r17988 | r17989 | |
---|---|---|
510 | 510 | UINT32 deco_mlc_state::screen_update_mlc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
511 | 511 | { |
512 | 512 | // temp_bitmap->fill(0, cliprect); |
513 | bitmap.fill(screen.machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */ | |
514 | draw_sprites(screen.machine(),bitmap,cliprect); | |
513 | bitmap.fill(machine().pens[0], cliprect); /* Pen 0 fill colour confirmed from Skull Fang level 2 */ | |
514 | draw_sprites(machine(),bitmap,cliprect); | |
515 | 515 | return 0; |
516 | 516 | } |
r17988 | r17989 | |
---|---|---|
376 | 376 | |
377 | 377 | UINT32 tunhunt_state::screen_update_tunhunt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
378 | 378 | { |
379 | set_pens( | |
379 | set_pens( | |
380 | 380 | |
381 | draw_box( | |
381 | draw_box( | |
382 | 382 | |
383 | draw_motion_object( | |
383 | draw_motion_object( | |
384 | 384 | |
385 | draw_shell( | |
385 | draw_shell( | |
386 | 386 | m_workram[SHL0PC], /* picture code */ |
387 | 387 | m_workram[SHEL0H], /* hposition */ |
388 | 388 | m_workram[SHL0V], /* vstart */ |
r17988 | r17989 | |
390 | 390 | m_workram[SHL0ST], /* vstretch */ |
391 | 391 | m_control&0x08 ); /* hstretch */ |
392 | 392 | |
393 | draw_shell( | |
393 | draw_shell( | |
394 | 394 | m_workram[SHL1PC], /* picture code */ |
395 | 395 | m_workram[SHEL1H], /* hposition */ |
396 | 396 | m_workram[SHL1V], /* vstart */ |
r17988 | r17989 | |
---|---|---|
247 | 247 | if(!(m_gfx_control[0] & 0x8)) // screen disable |
248 | 248 | { |
249 | 249 | /* TODO: Color might be different, needs a video from an original pcb. */ |
250 | bitmap.fill( | |
250 | bitmap.fill( | |
251 | 251 | } |
252 | 252 | else |
253 | 253 | { |
254 | 254 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
255 | 255 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
256 | draw_sprites( | |
256 | draw_sprites( | |
257 | 257 | } |
258 | 258 | |
259 | 259 | // popmessage("%02x %02x %02x %02x",m_gfx_control[0],m_gfx_control[1],m_gfx_control[2],scrollx); |
r17988 | r17989 | |
---|---|---|
100 | 100 | UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
101 | 101 | { |
102 | 102 | |
103 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
104 | screen.machine().priority_bitmap.fill(0, cliprect); | |
103 | bitmap.fill(get_black_pen(machine()), cliprect); | |
104 | machine().priority_bitmap.fill(0, cliprect); | |
105 | 105 | |
106 | 106 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_936_tilemap, 0, 0, 1); |
107 | 107 |
r17988 | r17989 | |
---|---|---|
237 | 237 | |
238 | 238 | if (m_video_disable) |
239 | 239 | { |
240 | bitmap.fill(get_black_pen( | |
240 | bitmap.fill(get_black_pen( | |
241 | 241 | return 0; |
242 | 242 | } |
243 | 243 | |
244 | update_palette( | |
244 | update_palette( | |
245 | 245 | |
246 | 246 | /* draw the playfield */ |
247 | 247 | m_playfield_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
391 | 391 | |
392 | 392 | if (m_video_disable) |
393 | 393 | { |
394 | bitmap.fill(get_black_pen( | |
394 | bitmap.fill(get_black_pen( | |
395 | 395 | return 0; |
396 | 396 | } |
397 | 397 | |
398 | update_palette( | |
398 | update_palette( | |
399 | 399 | |
400 | 400 | /* draw the playfield */ |
401 | 401 | m_playfield_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
24 | 24 | |
25 | 25 | UINT32 madmotor_state::screen_update_madmotor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
26 | 26 | { |
27 | flip_screen_set( | |
27 | flip_screen_set( | |
28 | 28 | |
29 | // | |
29 | // | |
30 | 30 | |
31 | screen.machine().device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
32 | screen.machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
33 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f); | |
34 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
31 | machine().device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
32 | machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
33 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f); | |
34 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
35 | 35 | return 0; |
36 | 36 | } |
r17988 | r17989 | |
---|---|---|
283 | 283 | UINT32 skyfox_state::screen_update_skyfox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
284 | 284 | { |
285 | 285 | bitmap.fill(255, cliprect); // the bg is black |
286 | draw_background(screen.machine(), bitmap, cliprect); | |
287 | draw_sprites(screen.machine(), bitmap, cliprect); | |
286 | draw_background(machine(), bitmap, cliprect); | |
287 | draw_sprites(machine(), bitmap, cliprect); | |
288 | 288 | return 0; |
289 | 289 | } |
r17988 | r17989 | |
---|---|---|
80 | 80 | flipy = !flipy; |
81 | 81 | } |
82 | 82 | |
83 | drawgfx_transpen(bitmap,cliprect, | |
83 | drawgfx_transpen(bitmap,cliprect, | |
84 | 84 | code, |
85 | 85 | color, |
86 | 86 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
821 | 821 | m_bg1_tilemap->set_scrollx((i + scrolly) & 0xff, m_rasterram[i]); |
822 | 822 | m_bg1_tilemap->set_scrolly(0, scrolly); |
823 | 823 | |
824 | | |
824 | | |
825 | 825 | |
826 | 826 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
827 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); | |
828 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); | |
827 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, -1); | |
828 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, 0); | |
829 | 829 | return 0; |
830 | 830 | } |
831 | 831 | |
r17988 | r17989 | |
840 | 840 | m_bg1_tilemap->set_scrolly(0, scrolly); |
841 | 841 | |
842 | 842 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
843 | pspikesb_draw_sprites( | |
843 | pspikesb_draw_sprites( | |
844 | 844 | return 0; |
845 | 845 | } |
846 | 846 | |
r17988 | r17989 | |
849 | 849 | int i, scrolly; |
850 | 850 | int y, x; |
851 | 851 | int count; |
852 | gfx_element *gfx = | |
852 | gfx_element *gfx = | |
853 | 853 | |
854 | 854 | m_bg1_tilemap->set_scroll_rows(256); |
855 | 855 | scrolly = m_bg1scrolly; |
r17988 | r17989 | |
859 | 859 | m_bg1_tilemap->set_scrolly(0, scrolly); |
860 | 860 | |
861 | 861 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
862 | spikes91_draw_sprites( | |
862 | spikes91_draw_sprites( | |
863 | 863 | |
864 | 864 | /* we could use a tilemap, but it's easier to just do it here */ |
865 | 865 | count = 0; |
r17988 | r17989 | |
891 | 891 | m_bg2_tilemap->set_scrollx(0, m_bg2scrollx - 4); |
892 | 892 | m_bg2_tilemap->set_scrolly(0, m_bg2scrolly); |
893 | 893 | |
894 | | |
894 | | |
895 | 895 | |
896 | 896 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
897 | 897 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
898 | 898 | |
899 | 899 | /* we use the priority buffer so sprites are drawn front to back */ |
900 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 1, -1); | |
901 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0); | |
902 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); | |
903 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); | |
900 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 1, -1); | |
901 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 1, 0); | |
902 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, -1); | |
903 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, 0); | |
904 | 904 | return 0; |
905 | 905 | } |
906 | 906 | |
r17988 | r17989 | |
916 | 916 | m_bg2_tilemap->set_scrollx(0, m_bg2scrollx - 4); |
917 | 917 | // m_bg2_tilemap->set_scrolly(0, m_bg2scrolly); |
918 | 918 | |
919 | | |
919 | | |
920 | 920 | |
921 | 921 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
922 | 922 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); |
923 | 923 | |
924 | 924 | /* we use the priority buffer so sprites are drawn front to back */ |
925 | spinlbrk_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); | |
926 | spinlbrk_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); | |
927 | spinlbrk_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0); | |
928 | spinlbrk_draw_sprites(screen.machine(), bitmap, cliprect, 1, -1); | |
925 | spinlbrk_draw_sprites(machine(), bitmap, cliprect, 0, 0); | |
926 | spinlbrk_draw_sprites(machine(), bitmap, cliprect, 0, -1); | |
927 | spinlbrk_draw_sprites(machine(), bitmap, cliprect, 1, 0); | |
928 | spinlbrk_draw_sprites(machine(), bitmap, cliprect, 1, -1); | |
929 | 929 | return 0; |
930 | 930 | } |
931 | 931 | |
r17988 | r17989 | |
942 | 942 | m_bg2_tilemap->set_scrollx(0, m_bg2scrollx - 7); |
943 | 943 | m_bg2_tilemap->set_scrolly(0, m_bg2scrolly + 2); |
944 | 944 | |
945 | | |
945 | | |
946 | 946 | |
947 | 947 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
948 | 948 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); |
949 | 949 | |
950 | 950 | /* we use the priority buffer so sprites are drawn front to back */ |
951 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 1, -1); //ship | |
952 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0); //intro | |
953 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); //enemy | |
954 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); //enemy | |
951 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 1, -1); //ship | |
952 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 1, 0); //intro | |
953 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, -1); //enemy | |
954 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, 0); //enemy | |
955 | 955 | return 0; |
956 | 956 | } |
957 | 957 | |
r17988 | r17989 | |
962 | 962 | m_bg2_tilemap->set_scrollx(0, m_rasterram[0x0200] - 20); |
963 | 963 | m_bg2_tilemap->set_scrolly(0, m_bg2scrolly); |
964 | 964 | |
965 | | |
965 | | |
966 | 966 | |
967 | 967 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
968 | 968 | |
969 | aerofgt_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
970 | aerofgt_draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
969 | aerofgt_draw_sprites(machine(), bitmap, cliprect, 0); | |
970 | aerofgt_draw_sprites(machine(), bitmap, cliprect, 1); | |
971 | 971 | |
972 | 972 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
973 | 973 | |
974 | aerofgt_draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
975 | aerofgt_draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
974 | aerofgt_draw_sprites(machine(), bitmap, cliprect, 2); | |
975 | aerofgt_draw_sprites(machine(), bitmap, cliprect, 3); | |
976 | 976 | return 0; |
977 | 977 | } |
978 | 978 | |
r17988 | r17989 | |
989 | 989 | m_bg2_tilemap->set_scrollx(0, m_bg2scrollx + 172); |
990 | 990 | m_bg2_tilemap->set_scrolly(0, m_bg2scrolly + 2); |
991 | 991 | |
992 | | |
992 | | |
993 | 993 | |
994 | 994 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
995 | 995 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); |
996 | 996 | |
997 | 997 | /* we use the priority buffer so sprites are drawn front to back */ |
998 | aerfboot_draw_sprites( | |
998 | aerfboot_draw_sprites( | |
999 | 999 | return 0; |
1000 | 1000 | } |
1001 | 1001 | |
r17988 | r17989 | |
1012 | 1012 | m_bg2_tilemap->set_scrollx(0, m_bg2scrollx - 7); |
1013 | 1013 | m_bg2_tilemap->set_scrolly(0, m_bg2scrolly + 2); |
1014 | 1014 | |
1015 | | |
1015 | | |
1016 | 1016 | |
1017 | 1017 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
1018 | 1018 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 1); |
1019 | 1019 | |
1020 | 1020 | /* we use the priority buffer so sprites are drawn front to back */ |
1021 | aerfboo2_draw_sprites(screen.machine(), bitmap, cliprect, 1, -1); //ship | |
1022 | aerfboo2_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0); //intro | |
1023 | aerfboo2_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); //enemy | |
1024 | aerfboo2_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); //enemy | |
1021 | aerfboo2_draw_sprites(machine(), bitmap, cliprect, 1, -1); //ship | |
1022 | aerfboo2_draw_sprites(machine(), bitmap, cliprect, 1, 0); //intro | |
1023 | aerfboo2_draw_sprites(machine(), bitmap, cliprect, 0, -1); //enemy | |
1024 | aerfboo2_draw_sprites(machine(), bitmap, cliprect, 0, 0); //enemy | |
1025 | 1025 | return 0; |
1026 | 1026 | } |
1027 | 1027 | |
r17988 | r17989 | |
1035 | 1035 | m_bg1_tilemap->set_scrollx((i + scrolly) & 0xff, m_rasterram[i]); |
1036 | 1036 | m_bg1_tilemap->set_scrolly(0, scrolly); |
1037 | 1037 | |
1038 | | |
1038 | | |
1039 | 1039 | |
1040 | 1040 | if (m_wbbc97_bitmap_enable) |
1041 | 1041 | { |
1042 | wbbc97_draw_bitmap( | |
1042 | wbbc97_draw_bitmap( | |
1043 | 1043 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
1044 | 1044 | } |
1045 | 1045 | else |
r17988 | r17989 | |
1047 | 1047 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
1048 | 1048 | } |
1049 | 1049 | |
1050 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, -1); | |
1051 | turbofrc_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0); | |
1050 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, -1); | |
1051 | turbofrc_draw_sprites(machine(), bitmap, cliprect, 0, 0); | |
1052 | 1052 | return 0; |
1053 | 1053 | } |
r17988 | r17989 | |
---|---|---|
142 | 142 | UINT32 rocnrope_state::screen_update_rocnrope(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
143 | 143 | { |
144 | 144 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
46 | 46 | |
47 | 47 | /* draw color overlay foreground and background */ |
48 | 48 | |
49 | if (m_fgoal_player == 1 && ( | |
49 | if (m_fgoal_player == 1 && ( | |
50 | 50 | { |
51 | drawgfxzoom_opaque(m_fgbitmap, cliprect, | |
51 | drawgfxzoom_opaque(m_fgbitmap, cliprect, | |
52 | 52 | 0, (m_fgoal_player << 2) | m_current_color, |
53 | 53 | 1, 1, |
54 | 54 | 0, 16, |
55 | 55 | 0x40000, |
56 | 56 | 0x40000); |
57 | 57 | |
58 | drawgfxzoom_opaque(m_bgbitmap, cliprect, | |
58 | drawgfxzoom_opaque(m_bgbitmap, cliprect, | |
59 | 59 | 0, 0, |
60 | 60 | 1, 1, |
61 | 61 | 0, 16, |
r17988 | r17989 | |
64 | 64 | } |
65 | 65 | else |
66 | 66 | { |
67 | drawgfxzoom_opaque(m_fgbitmap, cliprect, | |
67 | drawgfxzoom_opaque(m_fgbitmap, cliprect, | |
68 | 68 | 0, (m_fgoal_player << 2) | m_current_color, |
69 | 69 | 0, 0, |
70 | 70 | 0, 0, |
71 | 71 | 0x40000, |
72 | 72 | 0x40000); |
73 | 73 | |
74 | drawgfxzoom_opaque(m_bgbitmap, cliprect, | |
74 | drawgfxzoom_opaque(m_bgbitmap, cliprect, | |
75 | 75 | 0, 0, |
76 | 76 | 0, 0, |
77 | 77 | 0, 0, |
r17988 | r17989 | |
---|---|---|
222 | 222 | { |
223 | 223 | |
224 | 224 | m_do_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | m_do_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
227 | 227 | return 0; |
228 | 228 | } |
r17988 | r17989 | |
---|---|---|
167 | 167 | { |
168 | 168 | |
169 | 169 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
170 | draw_sprites( | |
170 | draw_sprites( | |
171 | 171 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
172 | 172 | |
173 | 173 | return 0; |
r17988 | r17989 | |
---|---|---|
252 | 252 | UINT32 mystston_state::screen_update_mystston(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
253 | 253 | { |
254 | 254 | |
255 | int flip = (*m_video_control & 0x80) ^ (( | |
255 | int flip = (*m_video_control & 0x80) ^ (( | |
256 | 256 | |
257 | set_palette( | |
257 | set_palette( | |
258 | 258 | |
259 | | |
259 | | |
260 | 260 | m_bg_tilemap->set_scrolly(0, *m_scroll); |
261 | | |
261 | | |
262 | 262 | |
263 | 263 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
264 | draw_sprites(bitmap, cliprect, | |
264 | draw_sprites(bitmap, cliprect, | |
265 | 265 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
266 | 266 | |
267 | 267 | return 0; |
r17988 | r17989 | |
---|---|---|
79 | 79 | int x, y, r; |
80 | 80 | |
81 | 81 | /* draw the playfield */ |
82 | rampart_bitmap_render( | |
82 | rampart_bitmap_render( | |
83 | 83 | |
84 | 84 | /* draw and merge the MO */ |
85 | 85 | mobitmap = atarimo_render(0, cliprect, &rectlist); |
r17988 | r17989 | |
---|---|---|
282 | 282 | |
283 | 283 | |
284 | 284 | /* two colors for the radar dots (verified on the real board) */ |
285 | palette_set_color(screen.machine(),512,MAKE_RGB(0xff,0x00,0x00)); /* red for enemies */ | |
286 | palette_set_color(screen.machine(),513,MAKE_RGB(0xff,0xff,0x00)); /* yellow for player */ | |
285 | palette_set_color(machine(),512,MAKE_RGB(0xff,0x00,0x00)); /* red for enemies */ | |
286 | palette_set_color(machine(),513,MAKE_RGB(0xff,0xff,0x00)); /* yellow for player */ | |
287 | 287 | |
288 | 288 | { |
289 | 289 | int flip = flip_screen(); |
r17988 | r17989 | |
319 | 319 | m_bg3_tilemap->set_scrolly(0, scrolly); |
320 | 320 | } |
321 | 321 | |
322 | draw_bgbitmap(screen.machine(), bitmap, cliprect); | |
323 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
322 | draw_bgbitmap(machine(), bitmap, cliprect); | |
323 | draw_sprites(machine(), bitmap, cliprect, 0); | |
324 | 324 | m_bg3_tilemap->draw(bitmap, cliprect, 0, 0); |
325 | draw_sprites( | |
325 | draw_sprites( | |
326 | 326 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
327 | draw_sprites( | |
327 | draw_sprites( | |
328 | 328 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
329 | draw_sprites( | |
329 | draw_sprites( | |
330 | 330 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
331 | draw_radar( | |
331 | draw_radar( | |
332 | 332 | |
333 | 333 | #if 0 |
334 | 334 | { |
r17988 | r17989 | |
---|---|---|
142 | 142 | { |
143 | 143 | |
144 | 144 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
454 | 454 | for (y = 0; y < height; y++) |
455 | 455 | for (x = 0; x < width; x++) |
456 | 456 | { |
457 | update_pixel( | |
457 | update_pixel( | |
458 | 458 | |
459 | 459 | if (m_gfxdraw_mode) |
460 | update_pixel( | |
460 | update_pixel( | |
461 | 461 | } |
462 | 462 | } |
463 | 463 |
r17988 | r17989 | |
---|---|---|
174 | 174 | UINT32 sonson_state::screen_update_sonson(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
175 | 175 | { |
176 | 176 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
177 | draw_sprites( | |
177 | draw_sprites( | |
178 | 178 | return 0; |
179 | 179 | } |
r17988 | r17989 | |
---|---|---|
186 | 186 | |
187 | 187 | if (!(m_regs[6] & 1)) |
188 | 188 | { |
189 | bitmap.fill(get_black_pen( | |
189 | bitmap.fill(get_black_pen( | |
190 | 190 | return 0; |
191 | 191 | } |
192 | 192 | |
r17988 | r17989 | |
215 | 215 | m_md_tilemap->draw(bitmap, cliprect, 0,0); |
216 | 216 | } |
217 | 217 | |
218 | draw_sprites( | |
218 | draw_sprites( | |
219 | 219 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
220 | 220 | return 0; |
221 | 221 | } |
r17988 | r17989 | |
225 | 225 | |
226 | 226 | if (!(m_regs[6] & 1)) |
227 | 227 | { |
228 | bitmap.fill(get_black_pen( | |
228 | bitmap.fill(get_black_pen( | |
229 | 229 | return 0; |
230 | 230 | } |
231 | 231 | |
r17988 | r17989 | |
233 | 233 | m_bg_tilemap->set_scrolly(0, m_regs[1]-240); |
234 | 234 | |
235 | 235 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
236 | draw_sprites( | |
236 | draw_sprites( | |
237 | 237 | return 0; |
238 | 238 | } |
r17988 | r17989 | |
---|---|---|
28 | 28 | UINT32 simpl156_state::screen_update_simpl156(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
29 | 29 | { |
30 | 30 | |
31 | | |
31 | | |
32 | 32 | |
33 | 33 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
34 | 34 | |
r17988 | r17989 | |
40 | 40 | //FIXME: flip_screen_x should not be written! |
41 | 41 | flip_screen_set_no_update(1); |
42 | 42 | |
43 | | |
43 | | |
44 | 44 | return 0; |
45 | 45 | } |
r17988 | r17989 | |
---|---|---|
149 | 149 | m_pf2_layer->enable(!(m_scroll_ram[0x34]&4)); |
150 | 150 | flip_screen_set(m_scroll_ram[0x34]&0x40 ); |
151 | 151 | |
152 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
153 | screen.machine().priority_bitmap.fill(0, cliprect); | |
152 | bitmap.fill(get_black_pen(machine()), cliprect); | |
153 | machine().priority_bitmap.fill(0, cliprect); | |
154 | 154 | m_pf3_layer->draw(bitmap, cliprect, 0,1); |
155 | 155 | m_pf1_layer->draw(bitmap, cliprect, 0,2); |
156 | 156 | m_pf2_layer->draw(bitmap, cliprect, 0,4); |
157 | if (!(m_scroll_ram[0x34]&0x10)) draw_sprites( | |
157 | if (!(m_scroll_ram[0x34]&0x10)) draw_sprites( | |
158 | 158 | m_text_layer->draw(bitmap, cliprect, 0,0); |
159 | 159 | return 0; |
160 | 160 | } |
r17988 | r17989 | |
---|---|---|
217 | 217 | |
218 | 218 | UINT32 hcastle_state::screen_update_hcastle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
219 | 219 | { |
220 | address_space &space = | |
220 | address_space &space = | |
221 | 221 | |
222 | 222 | UINT8 ctrl_1_0 = k007121_ctrlram_r(m_k007121_1, space, 0); |
223 | 223 | UINT8 ctrl_1_1 = k007121_ctrlram_r(m_k007121_1, space, 1); |
r17988 | r17989 | |
228 | 228 | UINT8 ctrl_2_2 = k007121_ctrlram_r(m_k007121_2, space, 2); |
229 | 229 | UINT8 ctrl_2_3 = k007121_ctrlram_r(m_k007121_2, space, 3); |
230 | 230 | |
231 | set_pens( | |
231 | set_pens( | |
232 | 232 | |
233 | 233 | m_pf1_bankbase = 0x0000; |
234 | 234 | m_pf2_bankbase = 0x4000 * ((m_gfx_bank & 2) >> 1); |
r17988 | r17989 | |
257 | 257 | if ((m_gfx_bank & 0x04) == 0) |
258 | 258 | { |
259 | 259 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
260 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram->buffer(), 0); | |
261 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram2->buffer(), 1); | |
260 | draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0); | |
261 | draw_sprites(machine(), bitmap, cliprect, m_spriteram2->buffer(), 1); | |
262 | 262 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
263 | 263 | } |
264 | 264 | else |
265 | 265 | { |
266 | 266 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
267 | 267 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
268 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram->buffer(), 0); | |
269 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram2->buffer(), 1); | |
268 | draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0); | |
269 | draw_sprites(machine(), bitmap, cliprect, m_spriteram2->buffer(), 1); | |
270 | 270 | } |
271 | 271 | return 0; |
272 | 272 | } |
r17988 | r17989 | |
---|---|---|
21 | 21 | sx = 31 - (offs % 32); |
22 | 22 | sy = offs / 32; |
23 | 23 | |
24 | drawgfx_opaque(bitmap,cliprect, | |
24 | drawgfx_opaque(bitmap,cliprect, | |
25 | 25 | m_videoram[offs] & 0x3f,0, |
26 | 26 | 0,0, |
27 | 27 | 8*sx,8*sy); |
r17988 | r17989 | |
30 | 30 | |
31 | 31 | /* Draw the cars. Positioning was based on a screen shot */ |
32 | 32 | if (m_cary[0]) |
33 | drawgfx_transpen(bitmap,cliprect, | |
33 | drawgfx_transpen(bitmap,cliprect, | |
34 | 34 | m_carimage[0],0, |
35 | 35 | 1,0, |
36 | 36 | 0xe4,256 - m_cary[0],0); |
37 | 37 | |
38 | 38 | if (m_cary[1]) |
39 | drawgfx_transpen(bitmap,cliprect, | |
39 | drawgfx_transpen(bitmap,cliprect, | |
40 | 40 | m_carimage[1],0, |
41 | 41 | 1,0, |
42 | 42 | 0xc4,256 - m_cary[1],0); |
43 | 43 | |
44 | 44 | if (m_cary[2]) |
45 | drawgfx_transpen(bitmap,cliprect, | |
45 | drawgfx_transpen(bitmap,cliprect, | |
46 | 46 | m_carimage[2],0, |
47 | 47 | 0,0, |
48 | 48 | 0x24,256 - m_cary[2],0); |
49 | 49 | |
50 | 50 | if (m_cary[3]) |
51 | drawgfx_transpen(bitmap,cliprect, | |
51 | drawgfx_transpen(bitmap,cliprect, | |
52 | 52 | m_carimage[3],0, |
53 | 53 | 0,0, |
54 | 54 | 0x04,256 - m_cary[3],0); |
r17988 | r17989 | |
77 | 77 | { |
78 | 78 | /* We've hit a truck's back end, so draw the truck. The front |
79 | 79 | end may be off the top of the screen, but we don't care. */ |
80 | drawgfx_transpen(bitmap,cliprect, | |
80 | drawgfx_transpen(bitmap,cliprect, | |
81 | 81 | 0,0, |
82 | 82 | 0,0, |
83 | 83 | 0x80,256 - (y + 31),0); |
r17988 | r17989 | |
89 | 89 | { |
90 | 90 | /* We missed a truck's back end (it was off the bottom of the |
91 | 91 | screen) but have hit its front end, so draw the truck. */ |
92 | drawgfx_transpen(bitmap,cliprect, | |
92 | drawgfx_transpen(bitmap,cliprect, | |
93 | 93 | 0,0, |
94 | 94 | 0,0, |
95 | 95 | 0x80,256 - y,0); |
r17988 | r17989 | |
---|---|---|
495 | 495 | |
496 | 496 | UINT32 twincobr_state::screen_update_toaplan0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
497 | 497 | { |
498 | twincobr_log_vram( | |
498 | twincobr_log_vram( | |
499 | 499 | |
500 | if (m_wardner_sprite_hack) wardner_sprite_priority_hack( | |
500 | if (m_wardner_sprite_hack) wardner_sprite_priority_hack( | |
501 | 501 | |
502 | 502 | bitmap.fill(0, cliprect); |
503 | 503 | |
504 | 504 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
505 | draw_sprites( | |
505 | draw_sprites( | |
506 | 506 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
507 | draw_sprites( | |
507 | draw_sprites( | |
508 | 508 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
509 | draw_sprites( | |
509 | draw_sprites( | |
510 | 510 | return 0; |
511 | 511 | } |
512 | 512 |
r17988 | r17989 | |
---|---|---|
239 | 239 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
240 | 240 | |
241 | 241 | /* draw the balls */ |
242 | drawgfx_transpen(bitmap, cliprect, | |
242 | drawgfx_transpen(bitmap, cliprect, | |
243 | 243 | m_ball1_pic, |
244 | 244 | m_palette_bank, |
245 | 245 | 0, 0, |
246 | 246 | m_xld1, m_yld1, 0); |
247 | 247 | |
248 | drawgfx_transpen(bitmap, cliprect, | |
248 | drawgfx_transpen(bitmap, cliprect, | |
249 | 249 | m_ball2_pic, |
250 | 250 | m_palette_bank, |
251 | 251 | 0, 0, |
252 | 252 | m_xld2, m_yld2, 0); |
253 | 253 | |
254 | 254 | /* draw the crow */ |
255 | drawgfx_transpen(bitmap, cliprect, | |
255 | drawgfx_transpen(bitmap, cliprect, | |
256 | 256 | m_crow_pic, |
257 | 257 | m_palette_bank, |
258 | 258 | m_crow_flip, m_crow_flip, |
r17988 | r17989 | |
278 | 278 | xld = m_xld1; |
279 | 279 | yld = m_yld1; |
280 | 280 | |
281 | drawgfx_opaque(m_tmp_bitmap2, rect, | |
281 | drawgfx_opaque(m_tmp_bitmap2, rect, | |
282 | 282 | m_ball1_pic, |
283 | 283 | 0, |
284 | 284 | 0, 0, |
r17988 | r17989 | |
292 | 292 | xld = m_xld2; |
293 | 293 | yld = m_yld2; |
294 | 294 | |
295 | drawgfx_opaque(m_tmp_bitmap2, rect, | |
295 | drawgfx_opaque(m_tmp_bitmap2, rect, | |
296 | 296 | m_ball2_pic, |
297 | 297 | 0, |
298 | 298 | 0, 0, |
r17988 | r17989 | |
311 | 311 | |
312 | 312 | if (latch != 0) |
313 | 313 | { |
314 | const UINT8* MASK = | |
314 | const UINT8* MASK = | |
315 | 315 | |
316 | 316 | int x; |
317 | 317 | int y; |
r17988 | r17989 | |
---|---|---|
48 | 48 | k007342_tilemap_update(m_k007342); |
49 | 49 | |
50 | 50 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE ,0); |
51 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
51 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
52 | 52 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, 1 | TILEMAP_DRAW_OPAQUE ,0); |
53 | 53 | return 0; |
54 | 54 | } |
r17988 | r17989 | |
---|---|---|
142 | 142 | int layers_ctrl = -1; |
143 | 143 | |
144 | 144 | #ifdef MAME_DEBUG |
145 | if ( | |
145 | if ( | |
146 | 146 | { |
147 | 147 | int msk = 0; |
148 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
149 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
150 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
151 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
148 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
149 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
150 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
151 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
152 | 152 | if (msk != 0) layers_ctrl &= msk; |
153 | 153 | } |
154 | 154 | #endif |
155 | 155 | |
156 | 156 | bitmap.fill(0, cliprect); |
157 | | |
157 | | |
158 | 158 | |
159 | 159 | if (layers_ctrl & 0x1) |
160 | 160 | { |
r17988 | r17989 | |
189 | 189 | cliprect,0x4000 + 0); |
190 | 190 | } |
191 | 191 | |
192 | if (layers_ctrl & 0x8) m_kaneko_spr->kaneko16_render_sprites( | |
192 | if (layers_ctrl & 0x8) m_kaneko_spr->kaneko16_render_sprites( | |
193 | 193 | return 0; |
194 | 194 | } |
r17988 | r17989 | |
---|---|---|
367 | 367 | |
368 | 368 | UINT32 arabian_state::screen_update_arabian(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
369 | 369 | { |
370 | const pen_t *pens = & | |
370 | const pen_t *pens = & | |
371 | 371 | int y; |
372 | 372 | |
373 | 373 | /* render the screen from the bitmap */ |
r17988 | r17989 | |
---|---|---|
178 | 178 | |
179 | 179 | UINT32 labyrunr_state::screen_update_labyrunr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
180 | 180 | { |
181 | address_space &space = | |
181 | address_space &space = | |
182 | 182 | UINT8 ctrl_0 = k007121_ctrlram_r(m_k007121, space, 0); |
183 | 183 | rectangle finalclip0, finalclip1; |
184 | 184 | |
185 | set_pens( | |
185 | set_pens( | |
186 | 186 | |
187 | screen.machine().priority_bitmap.fill(0, cliprect); | |
188 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
187 | machine().priority_bitmap.fill(0, cliprect); | |
188 | bitmap.fill(get_black_pen(machine()), cliprect); | |
189 | 189 | |
190 | 190 | if (~k007121_ctrlram_r(m_k007121, space, 3) & 0x20) |
191 | 191 | { |
r17988 | r17989 | |
210 | 210 | } |
211 | 211 | |
212 | 212 | m_layer0->draw(bitmap, finalclip0, TILEMAP_DRAW_OPAQUE, 0); |
213 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
213 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
214 | 214 | /* we ignore the transparency because layer1 is drawn only at the top of the screen also covering sprites */ |
215 | 215 | m_layer1->draw(bitmap, finalclip1, TILEMAP_DRAW_OPAQUE, 0); |
216 | 216 | } |
r17988 | r17989 | |
280 | 280 | if(use_clip3[1]) |
281 | 281 | m_layer1->draw(bitmap, finalclip3, 0, 1); |
282 | 282 | |
283 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
283 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
284 | 284 | } |
285 | 285 | return 0; |
286 | 286 | } |
r17988 | r17989 | |
---|---|---|
148 | 148 | |
149 | 149 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
150 | 150 | |
151 | parentj_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
152 | parentj_draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
151 | parentj_draw_sprites(machine(), bitmap, cliprect, 0); | |
152 | parentj_draw_sprites(machine(), bitmap, cliprect, 1); | |
153 | 153 | |
154 | 154 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
155 | 155 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0); |
r17988 | r17989 | |
---|---|---|
105 | 105 | int flipscreen = m_video_control&1; |
106 | 106 | const UINT8 *source = videoram; |
107 | 107 | |
108 | if (tms9927_screen_reset( | |
108 | if (tms9927_screen_reset( | |
109 | 109 | { |
110 | bitmap.fill(get_black_pen( | |
110 | bitmap.fill(get_black_pen( | |
111 | 111 | return 0; |
112 | 112 | } |
113 | 113 |
r17988 | r17989 | |
---|---|---|
261 | 261 | { |
262 | 262 | UINT8 *spriteaddr = &m_spriteram[m_video_control[7] * 0x100]; /* BUF1/BUF2 */ |
263 | 263 | int flip = m_video_control[4] ? 0xff : 0x00; /* PLAYER2 */ |
264 | pen_t black = get_black_pen( | |
264 | pen_t black = get_black_pen( | |
265 | 265 | int x, y, offs; |
266 | 266 | |
267 | 267 | /* draw the sprites */ |
r17988 | r17989 | |
273 | 273 | int which = spriteaddr[offs]; |
274 | 274 | int color = spriteaddr[offs + 2] >> 7; |
275 | 275 | |
276 | drawgfx_transpen(m_spritebitmap, cliprect, | |
276 | drawgfx_transpen(m_spritebitmap, cliprect, | |
277 | 277 | } |
278 | 278 | |
279 | 279 | /* draw the bitmap to the screen, looping over Y */ |
r17988 | r17989 | |
---|---|---|
125 | 125 | |
126 | 126 | for (i = 0; i < 4; i++) |
127 | 127 | { |
128 | drawgfx_transpen(bitmap, cliprect, | |
128 | drawgfx_transpen(bitmap, cliprect, | |
129 | 129 | get_sprite_code(video_ram, i), |
130 | 130 | i, |
131 | 131 | 0, 0, |
r17988 | r17989 | |
144 | 144 | UINT8 *video_ram = m_video_ram; |
145 | 145 | int i; |
146 | 146 | int j; |
147 | const rectangle &visarea = | |
147 | const rectangle &visarea = | |
148 | 148 | |
149 | 149 | /* |
150 | 150 | * Collisions are detected for both player cars: |
r17988 | r17989 | |
160 | 160 | |
161 | 161 | rect.min_x = get_sprite_x(video_ram, i); |
162 | 162 | rect.min_y = get_sprite_y(video_ram, i); |
163 | rect.max_x = get_sprite_x(video_ram, i) + screen.machine().gfx[1]->width() - 1; | |
164 | rect.max_y = get_sprite_y(video_ram, i) + screen.machine().gfx[1]->height() - 1; | |
163 | rect.max_x = get_sprite_x(video_ram, i) + machine().gfx[1]->width() - 1; | |
164 | rect.max_y = get_sprite_y(video_ram, i) + machine().gfx[1]->height() - 1; | |
165 | 165 | |
166 | 166 | rect &= visarea; |
167 | 167 | |
r17988 | r17989 | |
169 | 169 | |
170 | 170 | m_bg_tilemap->draw(m_helper, rect, 0, 0); |
171 | 171 | |
172 | drawgfx_transpen(m_helper, rect, | |
172 | drawgfx_transpen(m_helper, rect, | |
173 | 173 | get_sprite_code(video_ram, i), |
174 | 174 | 0, |
175 | 175 | 0, 0, |
176 | 176 | get_sprite_x(video_ram, i), |
177 | 177 | get_sprite_y(video_ram, i), 1); |
178 | 178 | |
179 | m_collision[i] |= collision_check(this, | |
179 | m_collision[i] |= collision_check(this, | |
180 | 180 | |
181 | 181 | /* check for sprite-sprite collisions */ |
182 | 182 | |
183 | 183 | for (j = 0; j < 4; j++) |
184 | 184 | if (j != i) |
185 | 185 | { |
186 | drawgfx_transpen(m_helper, rect, | |
186 | drawgfx_transpen(m_helper, rect, | |
187 | 187 | get_sprite_code(video_ram, j), |
188 | 188 | 1, |
189 | 189 | 0, 0, |
r17988 | r17989 | |
191 | 191 | get_sprite_y(video_ram, j), 0); |
192 | 192 | } |
193 | 193 | |
194 | drawgfx_transpen(m_helper, rect, | |
194 | drawgfx_transpen(m_helper, rect, | |
195 | 195 | get_sprite_code(video_ram, i), |
196 | 196 | 0, |
197 | 197 | 0, 0, |
198 | 198 | get_sprite_x(video_ram, i), |
199 | 199 | get_sprite_y(video_ram, i), 1); |
200 | 200 | |
201 | m_collision[i] |= collision_check(this, | |
201 | m_collision[i] |= collision_check(this, | |
202 | 202 | } |
203 | 203 | } |
204 | 204 | } |
r17988 | r17989 | |
---|---|---|
167 | 167 | { |
168 | 168 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
169 | 169 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
170 | draw_sprites( | |
170 | draw_sprites( | |
171 | 171 | } |
172 | 172 | else if ((m_vreg & 0x60) == 0x60) |
173 | 173 | { |
174 | 174 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
175 | 175 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
176 | draw_sprites( | |
176 | draw_sprites( | |
177 | 177 | } |
178 | 178 | else |
179 | 179 | { |
180 | 180 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
181 | draw_sprites( | |
181 | draw_sprites( | |
182 | 182 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
183 | 183 | } |
184 | 184 | return 0; |
r17988 | r17989 | |
195 | 195 | if(m_vreg & 8) |
196 | 196 | { |
197 | 197 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
198 | draw_sprites( | |
198 | draw_sprites( | |
199 | 199 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
200 | 200 | } |
201 | 201 | else |
202 | 202 | { |
203 | 203 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
204 | 204 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
205 | draw_sprites( | |
205 | draw_sprites( | |
206 | 206 | } |
207 | 207 | return 0; |
208 | 208 | } |
r17988 | r17989 | |
---|---|---|
95 | 95 | bitmap.fill(0, cliprect); |
96 | 96 | |
97 | 97 | /* Draw the characters */ |
98 | draw_chars( | |
98 | draw_chars( | |
99 | 99 | |
100 | 100 | /* Draw the sprites. */ |
101 | 101 | for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
r17988 | r17989 | |
146 | 146 | flipy = !flipy; |
147 | 147 | } |
148 | 148 | |
149 | drawgfx_transpen(bitmap,cliprect, | |
149 | drawgfx_transpen(bitmap,cliprect, | |
150 | 150 | code, col | ((*m_colorbank & 0x03) << 4), |
151 | 151 | flipx, flipy, |
152 | 152 | sx,sy,0); |
153 | 153 | } |
154 | 154 | |
155 | 155 | /* Draw the foreground priority characters over the sprites */ |
156 | draw_chars( | |
156 | draw_chars( | |
157 | 157 | return 0; |
158 | 158 | } |
r17988 | r17989 | |
---|---|---|
79 | 79 | UINT32 orbit_state::screen_update_orbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
80 | 80 | { |
81 | 81 | |
82 | m_flip_screen = | |
82 | m_flip_screen = | |
83 | 83 | |
84 | 84 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
85 | 85 | |
86 | draw_sprites( | |
86 | draw_sprites( | |
87 | 87 | return 0; |
88 | 88 | } |
r17988 | r17989 | |
---|---|---|
608 | 608 | bitmap.fill(0, cliprect); |
609 | 609 | |
610 | 610 | if (!(m_layer_enable & 0x1)) |
611 | combine_tilemap( | |
611 | combine_tilemap( | |
612 | 612 | |
613 | draw_sprites( | |
613 | draw_sprites( | |
614 | 614 | |
615 | 615 | // if fore layer is enabled, draw priority 1 sprites behind mid layer |
616 | 616 | if (!(m_layer_enable & 0x4)) |
617 | draw_sprites( | |
617 | draw_sprites( | |
618 | 618 | |
619 | 619 | if (!(m_layer_enable & 0x2)) |
620 | combine_tilemap( | |
620 | combine_tilemap( | |
621 | 621 | |
622 | 622 | // if fore layer is disabled, draw priority 1 sprites above mid layer |
623 | 623 | if ((m_layer_enable & 0x4)) |
624 | draw_sprites( | |
624 | draw_sprites( | |
625 | 625 | |
626 | draw_sprites( | |
626 | draw_sprites( | |
627 | 627 | |
628 | 628 | if (!(m_layer_enable & 0x4)) |
629 | combine_tilemap( | |
629 | combine_tilemap( | |
630 | 630 | |
631 | draw_sprites( | |
631 | draw_sprites( | |
632 | 632 | |
633 | combine_tilemap( | |
633 | combine_tilemap( | |
634 | 634 | return 0; |
635 | 635 | } |
636 | 636 | |
r17988 | r17989 | |
655 | 655 | UINT32 seibuspi_state::screen_update_sys386f2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
656 | 656 | { |
657 | 657 | bitmap.fill(0, cliprect); |
658 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
659 | draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
660 | draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
661 | draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
658 | draw_sprites(machine(), bitmap, cliprect, 0); | |
659 | draw_sprites(machine(), bitmap, cliprect, 1); | |
660 | draw_sprites(machine(), bitmap, cliprect, 2); | |
661 | draw_sprites(machine(), bitmap, cliprect, 3); | |
662 | 662 | return 0; |
663 | 663 | } |
r17988 | r17989 | |
---|---|---|
149 | 149 | |
150 | 150 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
151 | 151 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
152 | sauro_draw_sprites( | |
152 | sauro_draw_sprites( | |
153 | 153 | return 0; |
154 | 154 | } |
155 | 155 | |
r17988 | r17989 | |
221 | 221 | UINT32 sauro_state::screen_update_trckydoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
222 | 222 | { |
223 | 223 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
224 | trckydoc_draw_sprites( | |
224 | trckydoc_draw_sprites( | |
225 | 225 | return 0; |
226 | 226 | } |
r17988 | r17989 | |
---|---|---|
310 | 310 | |
311 | 311 | bitmap.fill(0, cliprect); |
312 | 312 | |
313 | starfield_render( | |
313 | starfield_render( | |
314 | 314 | |
315 | 315 | /* draw the low priority characters */ |
316 | 316 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
317 | 317 | |
318 | draw_sprites( | |
318 | draw_sprites( | |
319 | 319 | |
320 | 320 | /* draw the high priority characters */ |
321 | 321 | /* (I don't know if this feature is used by Gaplus, but it's shown in the schematics) */ |
r17988 | r17989 | |
332 | 332 | struct star *stars = m_stars; |
333 | 333 | int i; |
334 | 334 | |
335 | int width = screen.machine().primary_screen->width(); | |
336 | int height = screen.machine().primary_screen->height(); | |
335 | int width = machine().primary_screen->width(); | |
336 | int height = machine().primary_screen->height(); | |
337 | 337 | |
338 | 338 | /* check if we're running */ |
339 | 339 | if ( ( m_starfield_control[0] & 1 ) == 0 ) |
r17988 | r17989 | |
---|---|---|
231 | 231 | bitmap.plot_box(0,TOP_BORDER,RIGHT_BORDER+1,BOTTOM_BORDER-TOP_BORDER+1,FIELD_PEN); |
232 | 232 | |
233 | 233 | /* car 1 */ |
234 | draw_sprite( | |
234 | draw_sprite( | |
235 | 235 | m_spriteram[0x00], m_spriteram[0x01], |
236 | 236 | 0, m_spriteram[0x0c] & 0x0f, CAR1_COLOR); |
237 | 237 | |
r17988 | r17989 | |
242 | 242 | bitmap.plot_box(RIGHT_BORDER,TOP_BORDER,1,BOTTOM_BORDER-TOP_BORDER+1,LINE_PEN); |
243 | 243 | |
244 | 244 | /* car 4 */ |
245 | draw_sprite( | |
245 | draw_sprite( | |
246 | 246 | m_spriteram[0x06], m_spriteram[0x07], |
247 | 247 | 0, m_spriteram[0x0d] >> 4, CAR4_COLOR); |
248 | 248 | |
249 | 249 | /* car 3 */ |
250 | draw_sprite( | |
250 | draw_sprite( | |
251 | 251 | m_spriteram[0x04], m_spriteram[0x05], |
252 | 252 | 0, m_spriteram[0x0d] & 0x0f, CAR3_COLOR); |
253 | 253 | |
254 | 254 | /* car 2 */ |
255 | draw_sprite( | |
255 | draw_sprite( | |
256 | 256 | m_spriteram[0x02], m_spriteram[0x03], |
257 | 257 | 0, m_spriteram[0x0c] >> 4, CAR2_COLOR); |
258 | 258 | |
259 | 259 | /* ball */ |
260 | draw_sprite( | |
260 | draw_sprite( | |
261 | 261 | m_spriteram[0x08], m_spriteram[0x09], |
262 | 262 | 1, m_spriteram[0x0e] & 0x0f, BALL_COLOR); |
263 | 263 | |
264 | 264 | /* left goal - position determined by bit 6 of the |
265 | 265 | horizontal and vertical timing PROMs */ |
266 | drawgfxzoom_transpen(bitmap,cliprect, | |
266 | drawgfxzoom_transpen(bitmap,cliprect, | |
267 | 267 | 0,0, |
268 | 268 | 0,0, |
269 | 269 | LEFT_GOAL_X,GOAL_Y, |
270 | 270 | 0x20000,0x20000,0); |
271 | 271 | |
272 | 272 | /* right goal */ |
273 | drawgfxzoom_transpen(bitmap,cliprect, | |
273 | drawgfxzoom_transpen(bitmap,cliprect, | |
274 | 274 | 0,1, |
275 | 275 | 1,0, |
276 | 276 | RIGHT_GOAL_X,GOAL_Y, |
r17988 | r17989 | |
282 | 282 | popmessage("WIDE!\n"); |
283 | 283 | |
284 | 284 | if (m_spriteram[0x0f] & 0x01) |
285 | draw_sprite( | |
285 | draw_sprite( | |
286 | 286 | m_spriteram[0x0a], m_spriteram[0x0b], |
287 | 287 | 1, m_spriteram[0x0e] >> 4, SPECIAL_CHAR_COLOR); |
288 | 288 | |
r17988 | r17989 | |
293 | 293 | and bit 3 of the vertical timing PROM controls in |
294 | 294 | which quadrant the line will actually appear */ |
295 | 295 | |
296 | draw_alpha_line(screen.machine(), bitmap, cliprect, 0, (0*4+0)*2 ); | |
297 | draw_alpha_line(screen.machine(), bitmap, cliprect, 1, (0*4+0)*2+1); | |
298 | draw_alpha_line(screen.machine(), bitmap, cliprect, 2, (3*4+1)*2 ); | |
299 | draw_alpha_line(screen.machine(), bitmap, cliprect, 3, (3*4+1)*2+1); | |
300 | draw_alpha_line(screen.machine(), bitmap, cliprect, 4, (1*4+2)*2 ); | |
301 | draw_alpha_line(screen.machine(), bitmap, cliprect, 5, (1*4+2)*2+1); | |
302 | draw_alpha_line(screen.machine(), bitmap, cliprect, 6, (0*4+3)*2 ); | |
303 | draw_alpha_line(screen.machine(), bitmap, cliprect, 7, (0*4+3)*2+1); | |
296 | draw_alpha_line(machine(), bitmap, cliprect, 0, (0*4+0)*2 ); | |
297 | draw_alpha_line(machine(), bitmap, cliprect, 1, (0*4+0)*2+1); | |
298 | draw_alpha_line(machine(), bitmap, cliprect, 2, (3*4+1)*2 ); | |
299 | draw_alpha_line(machine(), bitmap, cliprect, 3, (3*4+1)*2+1); | |
300 | draw_alpha_line(machine(), bitmap, cliprect, 4, (1*4+2)*2 ); | |
301 | draw_alpha_line(machine(), bitmap, cliprect, 5, (1*4+2)*2+1); | |
302 | draw_alpha_line(machine(), bitmap, cliprect, 6, (0*4+3)*2 ); | |
303 | draw_alpha_line(machine(), bitmap, cliprect, 7, (0*4+3)*2+1); | |
304 | 304 | |
305 | 305 | return 0; |
306 | 306 | } |
r17988 | r17989 | |
563 | 563 | |
564 | 564 | car1_x = m_spriteram[0x00]; |
565 | 565 | car1_y = m_spriteram[0x01]; |
566 | remap_sprite_code( | |
566 | remap_sprite_code( | |
567 | 567 | |
568 | 568 | car2_x = m_spriteram[0x02]; |
569 | 569 | car2_y = m_spriteram[0x03]; |
570 | remap_sprite_code( | |
570 | remap_sprite_code( | |
571 | 571 | |
572 | 572 | car3_x = m_spriteram[0x04]; |
573 | 573 | car3_y = m_spriteram[0x05]; |
574 | remap_sprite_code( | |
574 | remap_sprite_code( | |
575 | 575 | |
576 | 576 | car4_x = m_spriteram[0x06]; |
577 | 577 | car4_y = m_spriteram[0x07]; |
578 | remap_sprite_code( | |
578 | remap_sprite_code( | |
579 | 579 | |
580 | 580 | ball_x = m_spriteram[0x08]; |
581 | 581 | ball_y = m_spriteram[0x09]; |
582 | remap_sprite_code( | |
582 | remap_sprite_code( | |
583 | 583 | |
584 | 584 | |
585 | 585 | /* cars 1 and 2 */ |
586 | if (check_sprite_sprite_collision( | |
586 | if (check_sprite_sprite_collision( | |
587 | 587 | car1_x, car1_y, car1_code, car1_flipy, |
588 | 588 | car2_x, car2_y, car2_code, car2_flipy, |
589 | 589 | &col_x, &col_y)) |
590 | carpolo_generate_car_car_interrupt( | |
590 | carpolo_generate_car_car_interrupt( | |
591 | 591 | |
592 | 592 | /* cars 1 and 3 */ |
593 | else if (check_sprite_sprite_collision( | |
593 | else if (check_sprite_sprite_collision( | |
594 | 594 | car1_x, car1_y, car1_code, car1_flipy, |
595 | 595 | car3_x, car3_y, car3_code, car3_flipy, |
596 | 596 | &col_x, &col_y)) |
597 | carpolo_generate_car_car_interrupt( | |
597 | carpolo_generate_car_car_interrupt( | |
598 | 598 | |
599 | 599 | /* cars 1 and 4 */ |
600 | else if (check_sprite_sprite_collision( | |
600 | else if (check_sprite_sprite_collision( | |
601 | 601 | car1_x, car1_y, car1_code, car1_flipy, |
602 | 602 | car4_x, car4_y, car4_code, car4_flipy, |
603 | 603 | &col_x, &col_y)) |
604 | carpolo_generate_car_car_interrupt( | |
604 | carpolo_generate_car_car_interrupt( | |
605 | 605 | |
606 | 606 | /* cars 2 and 3 */ |
607 | else if (check_sprite_sprite_collision( | |
607 | else if (check_sprite_sprite_collision( | |
608 | 608 | car2_x, car2_y, car2_code, car2_flipy, |
609 | 609 | car3_x, car3_y, car3_code, car3_flipy, |
610 | 610 | &col_x, &col_y)) |
611 | carpolo_generate_car_car_interrupt( | |
611 | carpolo_generate_car_car_interrupt( | |
612 | 612 | |
613 | 613 | /* cars 2 and 4 */ |
614 | else if (check_sprite_sprite_collision( | |
614 | else if (check_sprite_sprite_collision( | |
615 | 615 | car2_x, car2_y, car2_code, car2_flipy, |
616 | 616 | car4_x, car4_y, car4_code, car4_flipy, |
617 | 617 | &col_x, &col_y)) |
618 | carpolo_generate_car_car_interrupt( | |
618 | carpolo_generate_car_car_interrupt( | |
619 | 619 | |
620 | 620 | /* cars 3 and 4 */ |
621 | else if (check_sprite_sprite_collision( | |
621 | else if (check_sprite_sprite_collision( | |
622 | 622 | car3_x, car3_y, car3_code, car3_flipy, |
623 | 623 | car4_x, car4_y, car4_code, car4_flipy, |
624 | 624 | &col_x, &col_y)) |
625 | carpolo_generate_car_car_interrupt( | |
625 | carpolo_generate_car_car_interrupt( | |
626 | 626 | |
627 | 627 | |
628 | 628 | |
629 | 629 | /* check car-ball collision */ |
630 | if (check_sprite_sprite_collision( | |
630 | if (check_sprite_sprite_collision( | |
631 | 631 | car1_x, car1_y, car1_code, car1_flipy, |
632 | 632 | ball_x, ball_y, ball_code, ball_flipy, |
633 | 633 | &col_x, &col_y)) |
634 | carpolo_generate_car_ball_interrupt( | |
634 | carpolo_generate_car_ball_interrupt( | |
635 | 635 | |
636 | else if (check_sprite_sprite_collision( | |
636 | else if (check_sprite_sprite_collision( | |
637 | 637 | car2_x, car2_y, car2_code, car2_flipy, |
638 | 638 | ball_x, ball_y, ball_code, ball_flipy, |
639 | 639 | &col_x, &col_y)) |
640 | carpolo_generate_car_ball_interrupt( | |
640 | carpolo_generate_car_ball_interrupt( | |
641 | 641 | |
642 | else if (check_sprite_sprite_collision( | |
642 | else if (check_sprite_sprite_collision( | |
643 | 643 | car3_x, car3_y, car3_code, car3_flipy, |
644 | 644 | ball_x, ball_y, ball_code, ball_flipy, |
645 | 645 | &col_x, &col_y)) |
646 | carpolo_generate_car_ball_interrupt( | |
646 | carpolo_generate_car_ball_interrupt( | |
647 | 647 | |
648 | else if (check_sprite_sprite_collision( | |
648 | else if (check_sprite_sprite_collision( | |
649 | 649 | car4_x, car4_y, car4_code, car4_flipy, |
650 | 650 | ball_x, ball_y, ball_code, ball_flipy, |
651 | 651 | &col_x, &col_y)) |
652 | carpolo_generate_car_ball_interrupt( | |
652 | carpolo_generate_car_ball_interrupt( | |
653 | 653 | |
654 | 654 | |
655 | 655 | /* check car-goal collision */ |
656 | if (check_sprite_left_goal_collision(screen.machine(), car1_x, car1_y, car1_code, car1_flipy, 1)) | |
657 | carpolo_generate_car_goal_interrupt(screen.machine(), 0, 0); | |
656 | if (check_sprite_left_goal_collision(machine(), car1_x, car1_y, car1_code, car1_flipy, 1)) | |
657 | carpolo_generate_car_goal_interrupt(machine(), 0, 0); | |
658 | 658 | |
659 | else if (check_sprite_right_goal_collision(screen.machine(), car1_x, car1_y, car1_code, car1_flipy, 1)) | |
660 | carpolo_generate_car_goal_interrupt(screen.machine(), 0, 1); | |
659 | else if (check_sprite_right_goal_collision(machine(), car1_x, car1_y, car1_code, car1_flipy, 1)) | |
660 | carpolo_generate_car_goal_interrupt(machine(), 0, 1); | |
661 | 661 | |
662 | else if (check_sprite_left_goal_collision(screen.machine(), car2_x, car2_y, car2_code, car2_flipy, 1)) | |
663 | carpolo_generate_car_goal_interrupt(screen.machine(), 1, 0); | |
662 | else if (check_sprite_left_goal_collision(machine(), car2_x, car2_y, car2_code, car2_flipy, 1)) | |
663 | carpolo_generate_car_goal_interrupt(machine(), 1, 0); | |
664 | 664 | |
665 | else if (check_sprite_right_goal_collision(screen.machine(), car2_x, car2_y, car2_code, car2_flipy, 1)) | |
666 | carpolo_generate_car_goal_interrupt(screen.machine(), 1, 1); | |
665 | else if (check_sprite_right_goal_collision(machine(), car2_x, car2_y, car2_code, car2_flipy, 1)) | |
666 | carpolo_generate_car_goal_interrupt(machine(), 1, 1); | |
667 | 667 | |
668 | else if (check_sprite_left_goal_collision(screen.machine(), car3_x, car3_y, car3_code, car3_flipy, 1)) | |
669 | carpolo_generate_car_goal_interrupt(screen.machine(), 2, 0); | |
668 | else if (check_sprite_left_goal_collision(machine(), car3_x, car3_y, car3_code, car3_flipy, 1)) | |
669 | carpolo_generate_car_goal_interrupt(machine(), 2, 0); | |
670 | 670 | |
671 | else if (check_sprite_right_goal_collision(screen.machine(), car3_x, car3_y, car3_code, car3_flipy, 1)) | |
672 | carpolo_generate_car_goal_interrupt(screen.machine(), 2, 1); | |
671 | else if (check_sprite_right_goal_collision(machine(), car3_x, car3_y, car3_code, car3_flipy, 1)) | |
672 | carpolo_generate_car_goal_interrupt(machine(), 2, 1); | |
673 | 673 | |
674 | else if (check_sprite_left_goal_collision(screen.machine(), car4_x, car4_y, car4_code, car4_flipy, 1)) | |
675 | carpolo_generate_car_goal_interrupt(screen.machine(), 3, 0); | |
674 | else if (check_sprite_left_goal_collision(machine(), car4_x, car4_y, car4_code, car4_flipy, 1)) | |
675 | carpolo_generate_car_goal_interrupt(machine(), 3, 0); | |
676 | 676 | |
677 | else if (check_sprite_right_goal_collision(screen.machine(), car4_x, car4_y, car4_code, car4_flipy, 1)) | |
678 | carpolo_generate_car_goal_interrupt(screen.machine(), 3, 1); | |
677 | else if (check_sprite_right_goal_collision(machine(), car4_x, car4_y, car4_code, car4_flipy, 1)) | |
678 | carpolo_generate_car_goal_interrupt(machine(), 3, 1); | |
679 | 679 | |
680 | 680 | |
681 | 681 | /* check ball collision with static screen elements */ |
682 | 682 | { |
683 | 683 | int col; |
684 | 684 | |
685 | col = check_sprite_left_goal_collision( | |
685 | col = check_sprite_left_goal_collision( | |
686 | 686 | |
687 | if (col == 1) carpolo_generate_ball_screen_interrupt(screen.machine(), 0x05); | |
688 | if (col == 2) carpolo_generate_ball_screen_interrupt(screen.machine(), 0x03); | |
687 | if (col == 1) carpolo_generate_ball_screen_interrupt(machine(), 0x05); | |
688 | if (col == 2) carpolo_generate_ball_screen_interrupt(machine(), 0x03); | |
689 | 689 | |
690 | 690 | |
691 | col = check_sprite_right_goal_collision( | |
691 | col = check_sprite_right_goal_collision( | |
692 | 692 | |
693 | if (col == 1) carpolo_generate_ball_screen_interrupt(screen.machine(), 0x05 | 0x08); | |
694 | if (col == 2) carpolo_generate_ball_screen_interrupt(screen.machine(), 0x03 | 0x08); | |
693 | if (col == 1) carpolo_generate_ball_screen_interrupt(machine(), 0x05 | 0x08); | |
694 | if (col == 2) carpolo_generate_ball_screen_interrupt(machine(), 0x03 | 0x08); | |
695 | 695 | |
696 | 696 | |
697 | if (check_sprite_border_collision(screen.machine(), ball_x, ball_y, ball_code, ball_flipy)) | |
698 | carpolo_generate_ball_screen_interrupt(screen.machine(), 0x06); | |
697 | if (check_sprite_border_collision(machine(), ball_x, ball_y, ball_code, ball_flipy)) | |
698 | carpolo_generate_ball_screen_interrupt(machine(), 0x06); | |
699 | 699 | } |
700 | 700 | |
701 | 701 | |
r17988 | r17989 | |
703 | 703 | { |
704 | 704 | int col; |
705 | 705 | |
706 | col = check_sprite_border_collision( | |
706 | col = check_sprite_border_collision( | |
707 | 707 | |
708 | 708 | if (col) |
709 | carpolo_generate_car_border_interrupt( | |
709 | carpolo_generate_car_border_interrupt( | |
710 | 710 | else |
711 | 711 | { |
712 | col = check_sprite_border_collision( | |
712 | col = check_sprite_border_collision( | |
713 | 713 | |
714 | 714 | if (col) |
715 | carpolo_generate_car_border_interrupt( | |
715 | carpolo_generate_car_border_interrupt( | |
716 | 716 | else |
717 | 717 | { |
718 | col = check_sprite_border_collision( | |
718 | col = check_sprite_border_collision( | |
719 | 719 | |
720 | 720 | if (col) |
721 | carpolo_generate_car_border_interrupt( | |
721 | carpolo_generate_car_border_interrupt( | |
722 | 722 | else |
723 | 723 | { |
724 | col = check_sprite_border_collision( | |
724 | col = check_sprite_border_collision( | |
725 | 725 | |
726 | 726 | if (col) |
727 | carpolo_generate_car_border_interrupt( | |
727 | carpolo_generate_car_border_interrupt( | |
728 | 728 | } |
729 | 729 | } |
730 | 730 | } |
r17988 | r17989 | |
---|---|---|
146 | 146 | else |
147 | 147 | x = (240 - x) & 0xff; |
148 | 148 | |
149 | drawgfx_transpen(bitmap,cliprect, | |
149 | drawgfx_transpen(bitmap,cliprect, | |
150 | 150 | chr, |
151 | 151 | col, |
152 | 152 | fx,fy, |
r17988 | r17989 | |
154 | 154 | |
155 | 155 | if (x > 240) |
156 | 156 | { |
157 | drawgfx_transpen(bitmap,cliprect, | |
157 | drawgfx_transpen(bitmap,cliprect, | |
158 | 158 | chr, |
159 | 159 | col, |
160 | 160 | fx,fy, |
r17988 | r17989 | |
---|---|---|
106 | 106 | color = m_colorram[count] & 0x1f; |
107 | 107 | region = (m_colorram[count] & 0x10) >> 4; |
108 | 108 | |
109 | drawgfx_opaque(bitmap,cliprect, | |
109 | drawgfx_opaque(bitmap,cliprect, | |
110 | 110 | |
111 | 111 | count = (m_flip_scr) ? count-1 : count+1; |
112 | 112 | count&=0x3ff; |
r17988 | r17989 | |
---|---|---|
339 | 339 | m_tilemap_1->set_scrolly(0, 0x00); |
340 | 340 | |
341 | 341 | #ifdef MAME_DEBUG |
342 | if ( | |
342 | if ( | |
343 | 343 | { |
344 | 344 | int msk = 0; |
345 | 345 | |
346 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
347 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
348 | // if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
349 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
346 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
347 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
348 | // if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
349 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
350 | 350 | if (msk != 0) layers_ctrl &= msk; |
351 | 351 | } |
352 | 352 | #endif |
353 | 353 | |
354 | 354 | if (layers_ctrl&1) m_tilemap_0->draw(bitmap, cliprect, 0, 0); |
355 | 355 | else bitmap.fill(0, cliprect); |
356 | if (layers_ctrl&8) draw_sprites( | |
356 | if (layers_ctrl&8) draw_sprites( | |
357 | 357 | if (layers_ctrl&2) m_tilemap_1->draw(bitmap, cliprect, 0, 0); |
358 | 358 | return 0; |
359 | 359 | } |
r17988 | r17989 | |
---|---|---|
398 | 398 | for (y = 0; y < height; y++) |
399 | 399 | for (x = 0; x < width; x++) |
400 | 400 | { |
401 | update_pixel(screen.machine(), 0, x, y); | |
402 | update_pixel(screen.machine(), 1, x, y); | |
403 | update_pixel(screen.machine(), 2, x, y); | |
401 | update_pixel(machine(), 0, x, y); | |
402 | update_pixel(machine(), 1, x, y); | |
403 | update_pixel(machine(), 2, x, y); | |
404 | 404 | } |
405 | 405 | } |
406 | 406 |
r17988 | r17989 | |
---|---|---|
6638 | 6638 | |
6639 | 6639 | UINT32 saturn_state::screen_update_stv_vdp2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
6640 | 6640 | { |
6641 | saturn_state *state = | |
6641 | saturn_state *state = | |
6642 | 6642 | |
6643 | stv_vdp2_fade_effects( | |
6643 | stv_vdp2_fade_effects( | |
6644 | 6644 | |
6645 | stv_vdp2_draw_back( | |
6645 | stv_vdp2_draw_back( | |
6646 | 6646 | |
6647 | 6647 | #if DEBUG_MODE |
6648 | if( | |
6648 | if( | |
6649 | 6649 | { |
6650 | 6650 | vdpdebug.l_en^=1; |
6651 | 6651 | popmessage("NBG3 %sabled",vdpdebug.l_en & 1 ? "en" : "dis"); |
6652 | 6652 | } |
6653 | if( | |
6653 | if( | |
6654 | 6654 | { |
6655 | 6655 | vdpdebug.l_en^=2; |
6656 | 6656 | popmessage("NBG2 %sabled",vdpdebug.l_en & 2 ? "en" : "dis"); |
6657 | 6657 | } |
6658 | if( | |
6658 | if( | |
6659 | 6659 | { |
6660 | 6660 | vdpdebug.l_en^=4; |
6661 | 6661 | popmessage("NBG1 %sabled",vdpdebug.l_en & 4 ? "en" : "dis"); |
6662 | 6662 | } |
6663 | if( | |
6663 | if( | |
6664 | 6664 | { |
6665 | 6665 | vdpdebug.l_en^=8; |
6666 | 6666 | popmessage("NBG0 %sabled",vdpdebug.l_en & 8 ? "en" : "dis"); |
6667 | 6667 | } |
6668 | if( | |
6668 | if( | |
6669 | 6669 | { |
6670 | 6670 | vdpdebug.l_en^=0x10; |
6671 | 6671 | popmessage("RBG0 %sabled",vdpdebug.l_en & 0x10 ? "en" : "dis"); |
6672 | 6672 | } |
6673 | if( | |
6673 | if( | |
6674 | 6674 | { |
6675 | 6675 | vdpdebug.l_en^=0x20; |
6676 | 6676 | popmessage("SPRITE %sabled",vdpdebug.l_en & 0x20 ? "en" : "dis"); |
r17988 | r17989 | |
6688 | 6688 | /*If a plane has a priority value of zero it isn't shown at all.*/ |
6689 | 6689 | for(pri=1;pri<8;pri++) |
6690 | 6690 | { |
6691 | if (vdpdebug.l_en & 1) { if(pri==STV_VDP2_N3PRIN) stv_vdp2_draw_NBG3(screen.machine(), m_tmpbitmap,cliprect); } | |
6692 | if (vdpdebug.l_en & 2) { if(pri==STV_VDP2_N2PRIN) stv_vdp2_draw_NBG2(screen.machine(), m_tmpbitmap,cliprect); } | |
6693 | if (vdpdebug.l_en & 4) { if(pri==STV_VDP2_N1PRIN) stv_vdp2_draw_NBG1(screen.machine(), m_tmpbitmap,cliprect); } | |
6694 | if (vdpdebug.l_en & 8) { if(pri==STV_VDP2_N0PRIN) stv_vdp2_draw_NBG0(screen.machine(), m_tmpbitmap,cliprect); } | |
6695 | if (vdpdebug.l_en & 0x10) { if(pri==STV_VDP2_R0PRIN) stv_vdp2_draw_RBG0(screen.machine(), m_tmpbitmap,cliprect); } | |
6696 | if (vdpdebug.l_en & 0x20) { draw_sprites(screen.machine(),m_tmpbitmap,cliprect,pri); } | |
6691 | if (vdpdebug.l_en & 1) { if(pri==STV_VDP2_N3PRIN) stv_vdp2_draw_NBG3(machine(), m_tmpbitmap,cliprect); } | |
6692 | if (vdpdebug.l_en & 2) { if(pri==STV_VDP2_N2PRIN) stv_vdp2_draw_NBG2(machine(), m_tmpbitmap,cliprect); } | |
6693 | if (vdpdebug.l_en & 4) { if(pri==STV_VDP2_N1PRIN) stv_vdp2_draw_NBG1(machine(), m_tmpbitmap,cliprect); } | |
6694 | if (vdpdebug.l_en & 8) { if(pri==STV_VDP2_N0PRIN) stv_vdp2_draw_NBG0(machine(), m_tmpbitmap,cliprect); } | |
6695 | if (vdpdebug.l_en & 0x10) { if(pri==STV_VDP2_R0PRIN) stv_vdp2_draw_RBG0(machine(), m_tmpbitmap,cliprect); } | |
6696 | if (vdpdebug.l_en & 0x20) { draw_sprites(machine(),m_tmpbitmap,cliprect,pri); } | |
6697 | 6697 | } |
6698 | 6698 | } |
6699 | 6699 | |
r17988 | r17989 | |
6704 | 6704 | ,STV_VDP2_N1ZMXI,STV_VDP2_N1ZMXD |
6705 | 6705 | ,STV_VDP2_N1ZMYI,STV_VDP2_N1ZMYD);*/ |
6706 | 6706 | |
6707 | if ( | |
6707 | if ( | |
6708 | 6708 | { |
6709 | 6709 | int tilecode; |
6710 | 6710 | |
6711 | 6711 | for (tilecode = 0;tilecode<0x8000;tilecode++) |
6712 | 6712 | { |
6713 | | |
6713 | | |
6714 | 6714 | } |
6715 | 6715 | |
6716 | 6716 | for (tilecode = 0;tilecode<0x2000;tilecode++) |
6717 | 6717 | { |
6718 | | |
6718 | | |
6719 | 6719 | } |
6720 | 6720 | |
6721 | 6721 | for (tilecode = 0;tilecode<0x4000;tilecode++) |
6722 | 6722 | { |
6723 | | |
6723 | | |
6724 | 6724 | } |
6725 | 6725 | |
6726 | 6726 | for (tilecode = 0;tilecode<0x1000;tilecode++) |
6727 | 6727 | { |
6728 | | |
6728 | | |
6729 | 6729 | } |
6730 | 6730 | |
6731 | 6731 | /* vdp 1 ... doesn't have to be tile based */ |
6732 | 6732 | |
6733 | 6733 | for (tilecode = 0;tilecode<0x8000;tilecode++) |
6734 | 6734 | { |
6735 | | |
6735 | | |
6736 | 6736 | } |
6737 | 6737 | for (tilecode = 0;tilecode<0x2000;tilecode++) |
6738 | 6738 | { |
6739 | | |
6739 | | |
6740 | 6740 | } |
6741 | 6741 | for (tilecode = 0;tilecode<0x4000;tilecode++) |
6742 | 6742 | { |
6743 | | |
6743 | | |
6744 | 6744 | } |
6745 | 6745 | for (tilecode = 0;tilecode<0x1000;tilecode++) |
6746 | 6746 | { |
6747 | | |
6747 | | |
6748 | 6748 | } |
6749 | 6749 | } |
6750 | 6750 | |
6751 | if ( | |
6751 | if ( | |
6752 | 6752 | { |
6753 | 6753 | FILE *fp; |
6754 | 6754 | |
r17988 | r17989 | |
6760 | 6760 | } |
6761 | 6761 | } |
6762 | 6762 | |
6763 | if ( | |
6763 | if ( | |
6764 | 6764 | { |
6765 | 6765 | FILE *fp; |
6766 | 6766 | |
r17988 | r17989 | |
7190 | 7190 | |
7191 | 7191 | UINT32 saturn_state::screen_update_saturn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
7192 | 7192 | { |
7193 | saturn_state *state = | |
7193 | saturn_state *state = | |
7194 | 7194 | static UINT8 disclaimer; |
7195 | 7195 | |
7196 | vdp2_draw_back( | |
7196 | vdp2_draw_back( | |
7197 | 7197 | |
7198 | 7198 | if(STV_VDP2_DISP) |
7199 | 7199 | { |
7200 | copy_plane( | |
7200 | copy_plane( | |
7201 | 7201 | |
7202 | draw_normal_screen( | |
7202 | draw_normal_screen( | |
7203 | 7203 | } |
7204 | 7204 | |
7205 | 7205 | if(disclaimer == 0) |
r17988 | r17989 | |
---|---|---|
222 | 222 | else |
223 | 223 | bitmap.fill(0, cliprect); |
224 | 224 | |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | |
227 | 227 | if (m_sc1on) |
228 | 228 | { |
r17988 | r17989 | |
231 | 231 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
232 | 232 | } |
233 | 233 | |
234 | draw_sprites( | |
234 | draw_sprites( | |
235 | 235 | |
236 | 236 | if (m_chon) |
237 | 237 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
334 | 334 | { |
335 | 335 | /* draw the background/text layers, followed by the sprites |
336 | 336 | - it needs to be done in this order*/ |
337 | draw_background_and_text(screen.machine(), this, bitmap, cliprect); | |
338 | draw_sprites(screen.machine(), this, bitmap, cliprect); | |
337 | draw_background_and_text(machine(), this, bitmap, cliprect); | |
338 | draw_sprites(machine(), this, bitmap, cliprect); | |
339 | 339 | do_pen_lookup(this, bitmap, cliprect); |
340 | 340 | } |
341 | 341 |
r17988 | r17989 | |
---|---|---|
447 | 447 | UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
448 | 448 | { |
449 | 449 | |
450 | palette_update( | |
450 | palette_update( | |
451 | 451 | |
452 | bitmap.fill(get_black_pen( | |
452 | bitmap.fill(get_black_pen( | |
453 | 453 | m_tilemap_bitmap_lower.fill(0); |
454 | 454 | m_tilemap_bitmapflags_lower.fill(0); |
455 | 455 | m_tilemap_bitmap_higher.fill(0); |
r17988 | r17989 | |
466 | 466 | //popmessage("pri %d %d\n", supernova_pri_a, supernova_pri_b); |
467 | 467 | |
468 | 468 | /*if (!supernova_pri_b) { */ |
469 | supernova_draw_b(screen.machine(), m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1; | |
470 | supernova_draw_a(screen.machine(), m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1; | |
469 | supernova_draw_b(machine(), m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1; | |
470 | supernova_draw_a(machine(), m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1; | |
471 | 471 | |
472 | 472 | { |
473 | 473 | int x,y; |
r17988 | r17989 | |
476 | 476 | UINT32* dst; |
477 | 477 | UINT16 pri, pri2, pri3; |
478 | 478 | UINT16 bgpri; |
479 | const pen_t *clut = & | |
479 | const pen_t *clut = & | |
480 | 480 | // int drawpri; |
481 | 481 | |
482 | 482 | |
r17988 | r17989 | |
621 | 621 | m_sprite_bitmap.fill(0x0000, cliprect); |
622 | 622 | |
623 | 623 | if (m_alt_enable_sprites) |
624 | m_spritegen->skns_draw_sprites( | |
624 | m_spritegen->skns_draw_sprites( | |
625 | 625 | |
626 | 626 | |
627 | 627 | return 0; |
r17988 | r17989 | |
---|---|---|
479 | 479 | { |
480 | 480 | |
481 | 481 | // Black or pen 0? |
482 | bitmap.fill( | |
482 | bitmap.fill( | |
483 | 483 | |
484 | 484 | if ( (m_vregs[0x30/2] & 1) == 0 ) // 1 = BLANK SCREEN |
485 | draw_sprites( | |
485 | draw_sprites( | |
486 | 486 | |
487 | 487 | return 0; |
488 | 488 | } |
r17988 | r17989 | |
---|---|---|
84 | 84 | { |
85 | 85 | int pri; |
86 | 86 | |
87 | namcofl_install_palette( | |
87 | namcofl_install_palette( | |
88 | 88 | |
89 | bitmap.fill(get_black_pen( | |
89 | bitmap.fill(get_black_pen( | |
90 | 90 | |
91 | 91 | for( pri=0; pri<16; pri++ ) |
92 | 92 | { |
r17988 | r17989 | |
---|---|---|
132 | 132 | rectangle clip[2]; |
133 | 133 | const rectangle &visarea = screen.visible_area(); |
134 | 134 | |
135 | address_space &space = | |
135 | address_space &space = | |
136 | 136 | if (m_flipscreen) |
137 | 137 | { |
138 | 138 | clip[0] = visarea; |
r17988 | r17989 | |
165 | 165 | |
166 | 166 | /* draw the graphics */ |
167 | 167 | m_k007121_tilemap[0]->draw(bitmap, clip[0], 0, 0); |
168 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
168 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
169 | 169 | m_k007121_tilemap[1]->draw(bitmap, clip[1], 0, 0); |
170 | 170 | return 0; |
171 | 171 | } |
r17988 | r17989 | |
---|---|---|
1243 | 1243 | int layers_ctrl = ~m_layer_enable; |
1244 | 1244 | int lay[4]; |
1245 | 1245 | |
1246 | if (debug_viewer( | |
1246 | if (debug_viewer( | |
1247 | 1247 | return 0; |
1248 | 1248 | |
1249 | layers_ctrl &= debug_mask( | |
1249 | layers_ctrl &= debug_mask( | |
1250 | 1250 | |
1251 | 1251 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 1) * 256, cliprect); |
1252 | 1252 | |
r17988 | r17989 | |
1265 | 1265 | case 0x15: lay[0] = 0; lay[1] = 2; lay[2] = 3; lay[3] = 1; break; |
1266 | 1266 | } |
1267 | 1267 | |
1268 | if (BIT(layers_ctrl, lay[0])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[0]); | |
1269 | if (BIT(layers_ctrl, lay[1])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[1]); | |
1270 | if (BIT(layers_ctrl, lay[2])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[2]); | |
1271 | if (BIT(layers_ctrl, lay[3])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[3]); | |
1268 | if (BIT(layers_ctrl, lay[0])) hanamai_copylayer(machine(), bitmap, cliprect, lay[0]); | |
1269 | if (BIT(layers_ctrl, lay[1])) hanamai_copylayer(machine(), bitmap, cliprect, lay[1]); | |
1270 | if (BIT(layers_ctrl, lay[2])) hanamai_copylayer(machine(), bitmap, cliprect, lay[2]); | |
1271 | if (BIT(layers_ctrl, lay[3])) hanamai_copylayer(machine(), bitmap, cliprect, lay[3]); | |
1272 | 1272 | return 0; |
1273 | 1273 | } |
1274 | 1274 | |
r17988 | r17989 | |
1279 | 1279 | int lay[4]; |
1280 | 1280 | int pri; |
1281 | 1281 | |
1282 | if (debug_viewer( | |
1282 | if (debug_viewer( | |
1283 | 1283 | return 0; |
1284 | 1284 | |
1285 | layers_ctrl &= debug_mask( | |
1285 | layers_ctrl &= debug_mask( | |
1286 | 1286 | |
1287 | 1287 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 0x0f) * 256, cliprect); |
1288 | 1288 | |
r17988 | r17989 | |
1300 | 1300 | lay[2] = (pri >> 4) & 3; |
1301 | 1301 | lay[3] = (pri >> 0) & 3; |
1302 | 1302 | |
1303 | if (BIT(layers_ctrl, lay[0])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[0]); | |
1304 | if (BIT(layers_ctrl, lay[1])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[1]); | |
1305 | if (BIT(layers_ctrl, lay[2])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[2]); | |
1306 | if (BIT(layers_ctrl, lay[3])) hanamai_copylayer(screen.machine(), bitmap, cliprect, lay[3]); | |
1303 | if (BIT(layers_ctrl, lay[0])) hanamai_copylayer(machine(), bitmap, cliprect, lay[0]); | |
1304 | if (BIT(layers_ctrl, lay[1])) hanamai_copylayer(machine(), bitmap, cliprect, lay[1]); | |
1305 | if (BIT(layers_ctrl, lay[2])) hanamai_copylayer(machine(), bitmap, cliprect, lay[2]); | |
1306 | if (BIT(layers_ctrl, lay[3])) hanamai_copylayer(machine(), bitmap, cliprect, lay[3]); | |
1307 | 1307 | |
1308 | 1308 | return 0; |
1309 | 1309 | } |
r17988 | r17989 | |
1313 | 1313 | { |
1314 | 1314 | int layers_ctrl = ~m_layer_enable; |
1315 | 1315 | |
1316 | if (debug_viewer( | |
1316 | if (debug_viewer( | |
1317 | 1317 | return 0; |
1318 | 1318 | |
1319 | layers_ctrl &= debug_mask( | |
1319 | layers_ctrl &= debug_mask( | |
1320 | 1320 | |
1321 | 1321 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 1) * 256, cliprect); |
1322 | 1322 | |
1323 | if (BIT(layers_ctrl, 0)) hanamai_copylayer(screen.machine(), bitmap, cliprect, 0); | |
1324 | if (BIT(layers_ctrl, 1)) hanamai_copylayer(screen.machine(), bitmap, cliprect, 1); | |
1325 | if (BIT(layers_ctrl, 2)) hanamai_copylayer(screen.machine(), bitmap, cliprect, 2); | |
1323 | if (BIT(layers_ctrl, 0)) hanamai_copylayer(machine(), bitmap, cliprect, 0); | |
1324 | if (BIT(layers_ctrl, 1)) hanamai_copylayer(machine(), bitmap, cliprect, 1); | |
1325 | if (BIT(layers_ctrl, 2)) hanamai_copylayer(machine(), bitmap, cliprect, 2); | |
1326 | 1326 | return 0; |
1327 | 1327 | } |
1328 | 1328 | |
r17988 | r17989 | |
1330 | 1330 | { |
1331 | 1331 | int layers_ctrl = m_layer_enable; |
1332 | 1332 | |
1333 | if (debug_viewer( | |
1333 | if (debug_viewer( | |
1334 | 1334 | return 0; |
1335 | 1335 | |
1336 | layers_ctrl &= debug_mask( | |
1336 | layers_ctrl &= debug_mask( | |
1337 | 1337 | |
1338 | 1338 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 1) * 256, cliprect); |
1339 | 1339 | |
1340 | // if (BIT(layers_ctrl, 0)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 3, 0); | |
1341 | if (BIT(layers_ctrl, 1)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 2, 0); | |
1342 | if (BIT(layers_ctrl, 2)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 1, 0); | |
1343 | if (BIT(layers_ctrl, 3)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 0, 0); | |
1340 | // if (BIT(layers_ctrl, 0)) jantouki_copylayer(machine(), bitmap, cliprect, 3, 0); | |
1341 | if (BIT(layers_ctrl, 1)) jantouki_copylayer(machine(), bitmap, cliprect, 2, 0); | |
1342 | if (BIT(layers_ctrl, 2)) jantouki_copylayer(machine(), bitmap, cliprect, 1, 0); | |
1343 | if (BIT(layers_ctrl, 3)) jantouki_copylayer(machine(), bitmap, cliprect, 0, 0); | |
1344 | 1344 | return 0; |
1345 | 1345 | } |
1346 | 1346 | |
r17988 | r17989 | |
1348 | 1348 | { |
1349 | 1349 | int layers_ctrl = m_layer_enable; |
1350 | 1350 | |
1351 | if (debug_viewer( | |
1351 | if (debug_viewer( | |
1352 | 1352 | return 0; |
1353 | 1353 | |
1354 | layers_ctrl &= debug_mask( | |
1354 | layers_ctrl &= debug_mask( | |
1355 | 1355 | |
1356 | 1356 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 1) * 256, cliprect); |
1357 | 1357 | |
1358 | if (BIT(layers_ctrl, 0)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 3, 0); | |
1359 | if (BIT(layers_ctrl, 4)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 7, 0); | |
1360 | if (BIT(layers_ctrl, 5)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 6, 0); | |
1361 | if (BIT(layers_ctrl, 6)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 5, 0); | |
1362 | if (BIT(layers_ctrl, 7)) jantouki_copylayer(screen.machine(), bitmap, cliprect, 4, 0); | |
1358 | if (BIT(layers_ctrl, 0)) jantouki_copylayer(machine(), bitmap, cliprect, 3, 0); | |
1359 | if (BIT(layers_ctrl, 4)) jantouki_copylayer(machine(), bitmap, cliprect, 7, 0); | |
1360 | if (BIT(layers_ctrl, 5)) jantouki_copylayer(machine(), bitmap, cliprect, 6, 0); | |
1361 | if (BIT(layers_ctrl, 6)) jantouki_copylayer(machine(), bitmap, cliprect, 5, 0); | |
1362 | if (BIT(layers_ctrl, 7)) jantouki_copylayer(machine(), bitmap, cliprect, 4, 0); | |
1363 | 1363 | return 0; |
1364 | 1364 | } |
1365 | 1365 | |
r17988 | r17989 | |
1368 | 1368 | { |
1369 | 1369 | int layers_ctrl = ~m_layer_enable; |
1370 | 1370 | |
1371 | if (debug_viewer( | |
1371 | if (debug_viewer( | |
1372 | 1372 | return 0; |
1373 | 1373 | |
1374 | layers_ctrl &= debug_mask( | |
1374 | layers_ctrl &= debug_mask( | |
1375 | 1375 | |
1376 | 1376 | bitmap.fill((m_blit_backpen & 0xff) + (m_blit_palbank & 1) * 256, cliprect); |
1377 | 1377 | |
1378 | if (BIT(layers_ctrl, 0)) mjdialq2_copylayer(screen.machine(), bitmap, cliprect, 0); | |
1379 | if (BIT(layers_ctrl, 1)) mjdialq2_copylayer(screen.machine(), bitmap, cliprect, 1); | |
1378 | if (BIT(layers_ctrl, 0)) mjdialq2_copylayer(machine(), bitmap, cliprect, 0); | |
1379 | if (BIT(layers_ctrl, 1)) mjdialq2_copylayer(machine(), bitmap, cliprect, 1); | |
1380 | 1380 | return 0; |
1381 | 1381 | } |
1382 | 1382 | |
r17988 | r17989 | |
1397 | 1397 | for (layer = 0; layer < 4; layer++) |
1398 | 1398 | { |
1399 | 1399 | bitmap.fill(0, cliprect); |
1400 | hanamai_copylayer( | |
1400 | hanamai_copylayer( | |
1401 | 1401 | |
1402 | 1402 | for (y = 0; y < 256; y++) |
1403 | 1403 | for (x = 0; x < 512; x++) |
r17988 | r17989 | |
---|---|---|
170 | 170 | UINT32 shootout_state::screen_update_shootout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
171 | 171 | { |
172 | 172 | |
173 | | |
173 | | |
174 | 174 | |
175 | 175 | m_background->draw(bitmap, cliprect, 0,0); |
176 | 176 | m_foreground->draw(bitmap, cliprect, 0,1); |
177 | draw_sprites( | |
177 | draw_sprites( | |
178 | 178 | return 0; |
179 | 179 | } |
180 | 180 | |
181 | 181 | UINT32 shootout_state::screen_update_shootouj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
182 | 182 | { |
183 | 183 | |
184 | | |
184 | | |
185 | 185 | |
186 | 186 | m_background->draw(bitmap, cliprect, 0,0); |
187 | 187 | m_foreground->draw(bitmap, cliprect, 0,1); |
188 | draw_sprites( | |
188 | draw_sprites( | |
189 | 189 | return 0; |
190 | 190 | } |
r17988 | r17989 | |
---|---|---|
308 | 308 | |
309 | 309 | UINT32 contra_state::screen_update_contra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
310 | 310 | { |
311 | address_space &space = | |
311 | address_space &space = | |
312 | 312 | UINT8 ctrl_1_0 = k007121_ctrlram_r(m_k007121_1, space, 0); |
313 | 313 | UINT8 ctrl_1_2 = k007121_ctrlram_r(m_k007121_1, space, 2); |
314 | 314 | UINT8 ctrl_2_0 = k007121_ctrlram_r(m_k007121_2, space, 0); |
r17988 | r17989 | |
321 | 321 | fg_finalclip &= cliprect; |
322 | 322 | tx_finalclip &= cliprect; |
323 | 323 | |
324 | set_pens( | |
324 | set_pens( | |
325 | 325 | |
326 | 326 | m_fg_tilemap->set_scrollx(0, ctrl_1_0 - 40); |
327 | 327 | m_fg_tilemap->set_scrolly(0, ctrl_1_2); |
r17988 | r17989 | |
330 | 330 | |
331 | 331 | m_bg_tilemap->draw(bitmap, bg_finalclip, 0 ,0); |
332 | 332 | m_fg_tilemap->draw(bitmap, fg_finalclip, 0 ,0); |
333 | draw_sprites(screen.machine(),bitmap,cliprect, 0); | |
334 | draw_sprites(screen.machine(),bitmap,cliprect, 1); | |
333 | draw_sprites(machine(),bitmap,cliprect, 0); | |
334 | draw_sprites(machine(),bitmap,cliprect, 1); | |
335 | 335 | m_tx_tilemap->draw(bitmap, tx_finalclip, 0 ,0); |
336 | 336 | return 0; |
337 | 337 | } |
r17988 | r17989 | |
---|---|---|
235 | 235 | int layers_ctrl = -1; |
236 | 236 | |
237 | 237 | #ifdef MAME_DEBUG |
238 | if ( | |
238 | if ( | |
239 | 239 | { |
240 | 240 | int mask = 0; |
241 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
242 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
243 | if (screen.machine().input().code_pressed(KEYCODE_E)) mask |= 4; | |
244 | if (screen.machine().input().code_pressed(KEYCODE_R)) mask |= 8; | |
245 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 16; | |
241 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
242 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
243 | if (machine().input().code_pressed(KEYCODE_E)) mask |= 4; | |
244 | if (machine().input().code_pressed(KEYCODE_R)) mask |= 8; | |
245 | if (machine().input().code_pressed(KEYCODE_A)) mask |= 16; | |
246 | 246 | if (mask != 0) layers_ctrl &= mask; |
247 | 247 | } |
248 | 248 | #endif |
249 | 249 | |
250 | bitmap.fill(get_black_pen( | |
250 | bitmap.fill(get_black_pen( | |
251 | 251 | |
252 | 252 | if (!(m_priority & 4)) /* Screen blanking */ |
253 | 253 | return 0; |
r17988 | r17989 | |
283 | 283 | UINT32 paradise_state::screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
284 | 284 | { |
285 | 285 | |
286 | bitmap.fill(get_black_pen( | |
286 | bitmap.fill(get_black_pen( | |
287 | 287 | |
288 | 288 | if (!(m_priority & 2)) /* Screen blanking */ |
289 | 289 | return 0; |
290 | 290 | |
291 | 291 | if (m_priority & 1) |
292 | draw_sprites( | |
292 | draw_sprites( | |
293 | 293 | |
294 | 294 | m_tilemap_1->draw(bitmap, cliprect, 0,0); |
295 | 295 | |
296 | 296 | if (m_priority & 4) |
297 | 297 | { |
298 | 298 | if (!(m_priority & 1)) |
299 | draw_sprites( | |
299 | draw_sprites( | |
300 | 300 | |
301 | 301 | m_tilemap_2->draw(bitmap, cliprect, 0, 0); |
302 | 302 | } |
r17988 | r17989 | |
305 | 305 | m_tilemap_2->draw(bitmap, cliprect, 0, 0); |
306 | 306 | |
307 | 307 | if (!(m_priority & 1)) |
308 | draw_sprites( | |
308 | draw_sprites( | |
309 | 309 | } |
310 | 310 | return 0; |
311 | 311 | } |
r17988 | r17989 | |
314 | 314 | UINT32 paradise_state::screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
315 | 315 | { |
316 | 316 | |
317 | bitmap.fill(get_black_pen( | |
317 | bitmap.fill(get_black_pen( | |
318 | 318 | m_tilemap_0->draw(bitmap, cliprect, 0, 0); |
319 | 319 | m_tilemap_1->draw(bitmap, cliprect, 0, 0); |
320 | 320 | m_tilemap_2->draw(bitmap, cliprect, 0, 0); |
321 | draw_sprites( | |
321 | draw_sprites( | |
322 | 322 | return 0; |
323 | 323 | } |
r17988 | r17989 | |
---|---|---|
125 | 125 | UINT32 volfied_state::screen_update_volfied(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
126 | 126 | { |
127 | 127 | |
128 | screen.machine().priority_bitmap.fill(0, cliprect); | |
129 | refresh_pixel_layer(screen.machine(), bitmap); | |
128 | machine().priority_bitmap.fill(0, cliprect); | |
129 | refresh_pixel_layer(machine(), bitmap); | |
130 | 130 | pc090oj_draw_sprites(m_pc090oj, bitmap, cliprect, 0); |
131 | 131 | return 0; |
132 | 132 | } |
r17988 | r17989 | |
---|---|---|
59 | 59 | |
60 | 60 | UINT32 dribling_state::screen_update_dribling(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
61 | 61 | { |
62 | UINT8 *prombase = | |
62 | UINT8 *prombase = | |
63 | 63 | UINT8 *gfxbase = memregion("gfx1")->base(); |
64 | 64 | int x, y; |
65 | 65 |
r17988 | r17989 | |
---|---|---|
208 | 208 | |
209 | 209 | UINT32 balsente_state::screen_update_balsente(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
210 | 210 | { |
211 | const pen_t *pens = & | |
211 | const pen_t *pens = & | |
212 | 212 | int y, i; |
213 | 213 | |
214 | 214 | /* draw scanlines from the VRAM directly */ |
r17988 | r17989 | |
217 | 217 | |
218 | 218 | /* draw the sprite images */ |
219 | 219 | for (i = 0; i < 40; i++) |
220 | draw_one_sprite( | |
220 | draw_one_sprite( | |
221 | 221 | |
222 | 222 | return 0; |
223 | 223 | } |
r17988 | r17989 | |
---|---|---|
86 | 86 | x = (sx + xc * 8) & 0xff; |
87 | 87 | y = (sy + yc * 8) & 0xff; |
88 | 88 | |
89 | drawgfx_transpen(bitmap,cliprect, | |
89 | drawgfx_transpen(bitmap,cliprect, | |
90 | 90 | code, |
91 | 91 | color, |
92 | 92 | flipx,flipy, |
r17988 | r17989 | |
106 | 106 | int goffs, code, color, y; |
107 | 107 | int tx, ty; |
108 | 108 | |
109 | bitmap.fill(get_black_pen( | |
109 | bitmap.fill(get_black_pen( | |
110 | 110 | sx = 0; |
111 | 111 | for (offs = 0; offs < m_objectram.bytes(); offs += 4) |
112 | 112 | { |
r17988 | r17989 | |
144 | 144 | color = (m_videoram[goffs + 1] & 0xe0) >> 5; |
145 | 145 | goffs += 0x40; |
146 | 146 | |
147 | drawgfx_transpen(bitmap,cliprect, | |
147 | drawgfx_transpen(bitmap,cliprect, | |
148 | 148 | code, |
149 | 149 | color, |
150 | 150 | 0,0, |
r17988 | r17989 | |
153 | 153 | code = m_videoram[goffs] + ((m_videoram[goffs + 1] & 0x1f) << 8); |
154 | 154 | color = (m_videoram[goffs + 1] & 0xe0) >> 5; |
155 | 155 | |
156 | drawgfx_transpen(bitmap,cliprect, | |
156 | drawgfx_transpen(bitmap,cliprect, | |
157 | 157 | code, |
158 | 158 | color, |
159 | 159 | 0,0, |
r17988 | r17989 | |
---|---|---|
257 | 257 | { |
258 | 258 | |
259 | 259 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
260 | draw_sprites(screen.machine(), bitmap, cliprect); | |
261 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
260 | draw_sprites(machine(), bitmap, cliprect); | |
261 | draw_bitmap(machine(), bitmap, cliprect); | |
262 | 262 | return 0; |
263 | 263 | } |
r17988 | r17989 | |
---|---|---|
118 | 118 | vblank = (m_fof_700000[0] & 0x8000); |
119 | 119 | |
120 | 120 | if (vblank > 0) |
121 | bitmap.fill(get_black_pen( | |
121 | bitmap.fill(get_black_pen( | |
122 | 122 | else { |
123 | // if ( | |
123 | // if ( | |
124 | 124 | // scrollbak = ((m_fof_a00000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x0038) >> 3); |
125 | // else if ( | |
125 | // else if ( | |
126 | 126 | // scrollbak = ((m_fof_a00000[0] & 0xff00) >> 5) + ((m_fof_700000[0] & 0x01c0) >> 6); |
127 | // else if ( | |
127 | // else if ( | |
128 | 128 | // scrollbak = ((m_fof_a00000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x01c0) >> 6); |
129 | // else if ( | |
129 | // else if ( | |
130 | 130 | // scrollbak = ((m_fof_a00000[0] & 0xff00) >> 5) + ((m_fof_700000[0] & 0x0038) >> 3); |
131 | 131 | // else |
132 | 132 | scrollbak = ((m_fof_a00000[0] & 0xffe0) >> 5); |
r17988 | r17989 | |
134 | 134 | m_fof_bak_tilemap->set_scrolly(0, m_fof_a00000[0] & 0xff); |
135 | 135 | m_fof_bak_tilemap->draw(bitmap, cliprect, 0, 0); |
136 | 136 | |
137 | draw_sprites( | |
137 | draw_sprites( | |
138 | 138 | |
139 | // if ( | |
139 | // if ( | |
140 | 140 | // scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x01c0) >> 6); |
141 | // else if ( | |
141 | // else if ( | |
142 | 142 | // scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) + ((m_fof_700000[0] & 0x0038) >> 3); |
143 | // else if ( | |
143 | // else if ( | |
144 | 144 | // scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x0038) >> 3); |
145 | // else if ( | |
145 | // else if ( | |
146 | 146 | // scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) + ((m_fof_700000[0] & 0x01c0) >> 6); |
147 | 147 | // else |
148 | 148 | scrollmid = ((m_fof_900000[0] & 0xffe0) >> 5); |
149 | 149 | m_fof_mid_tilemap->set_scrollx(0, scrollmid ); |
150 | 150 | m_fof_mid_tilemap->set_scrolly(0, m_fof_900000[0] & 0xff); |
151 | // if (! | |
151 | // if (! | |
152 | 152 | m_fof_mid_tilemap->draw(bitmap, cliprect, 0, 0); |
153 | 153 | |
154 | draw_sprites( | |
154 | draw_sprites( | |
155 | 155 | |
156 | 156 | m_fof_txt_tilemap->draw(bitmap, cliprect, 0, 0); |
157 | 157 | } |
r17988 | r17989 | |
---|---|---|
247 | 247 | |
248 | 248 | UINT32 sspeedr_state::screen_update_sspeedr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
249 | 249 | { |
250 | draw_track(screen.machine(), bitmap); | |
251 | draw_drones(screen.machine(), bitmap, cliprect); | |
252 | draw_driver(screen.machine(), bitmap, cliprect); | |
250 | draw_track(machine(), bitmap); | |
251 | draw_drones(machine(), bitmap, cliprect); | |
252 | draw_driver(machine(), bitmap, cliprect); | |
253 | 253 | return 0; |
254 | 254 | } |
255 | 255 |
r17988 | r17989 | |
---|---|---|
246 | 246 | |
247 | 247 | UINT32 ddribble_state::screen_update_ddribble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
248 | 248 | { |
249 | set_pens( | |
249 | set_pens( | |
250 | 250 | |
251 | 251 | m_fg_tilemap->set_flip((m_vregs[0][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); |
252 | 252 | m_bg_tilemap->set_flip((m_vregs[1][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); |
r17988 | r17989 | |
258 | 258 | m_bg_tilemap->set_scrolly(0, m_vregs[1][0]); |
259 | 259 | |
260 | 260 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
261 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram_1, 0x07d, 2, m_vregs[0][4] & 0x08); | |
262 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram_2, 0x140, 3, m_vregs[1][4] & 0x08); | |
261 | draw_sprites(machine(), bitmap, cliprect, m_spriteram_1, 0x07d, 2, m_vregs[0][4] & 0x08); | |
262 | draw_sprites(machine(), bitmap, cliprect, m_spriteram_2, 0x140, 3, m_vregs[1][4] & 0x08); | |
263 | 263 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
264 | 264 | return 0; |
265 | 265 | } |
r17988 | r17989 | |
---|---|---|
197 | 197 | UINT32 terracre_state::screen_update_amazon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
198 | 198 | { |
199 | 199 | if( m_xscroll&0x2000 ) |
200 | bitmap.fill(get_black_pen( | |
200 | bitmap.fill(get_black_pen( | |
201 | 201 | else |
202 | 202 | m_background->draw(bitmap, cliprect, 0, 0 ); |
203 | 203 | |
204 | draw_sprites( | |
204 | draw_sprites( | |
205 | 205 | m_foreground->draw(bitmap, cliprect, 0, 0 ); |
206 | 206 | return 0; |
207 | 207 | } |
r17988 | r17989 | |
---|---|---|
90 | 90 | /* Note: this is _not_ dependant on flipping */ |
91 | 91 | color_offs = offs % 32 + ((256 + 8 * (offs / 32) - spriteram[offs % 32] )% 256) / 8 * 32; |
92 | 92 | |
93 | drawgfx_opaque(bitmap,cliprect, | |
93 | drawgfx_opaque(bitmap,cliprect, | |
94 | 94 | m_videoram[offs] | (m_colorram[color_offs] >> 5) * 256 | ((m_colorram[color_offs] >> 4) & 1) * 512, |
95 | 95 | m_colorram[color_offs]%16, |
96 | 96 | flip_screen_x(),flip_screen_y(), |
r17988 | r17989 | |
121 | 121 | } |
122 | 122 | |
123 | 123 | if (BIT(spriteram[offs + 1], 4)) |
124 | drawgfx_transpen(bitmap,cliprect, | |
124 | drawgfx_transpen(bitmap,cliprect, | |
125 | 125 | spriteram[offs]&0x3f, |
126 | 126 | spriteram[offs+1]%16, |
127 | 127 | flipx,flipy, |
r17988 | r17989 | |
150 | 150 | } |
151 | 151 | |
152 | 152 | if (BIT(spriteram[offs + 1], 4)) |
153 | drawgfx_transpen(bitmap,cliprect, | |
153 | drawgfx_transpen(bitmap,cliprect, | |
154 | 154 | spriteram[offs]&0x3f, |
155 | 155 | spriteram[offs+1]%16, |
156 | 156 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
348 | 348 | |
349 | 349 | UINT32 undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
350 | 350 | { |
351 | device_t *tc0100scn = screen.machine().device("tc0100scn"); | |
352 | device_t *tc0480scp = screen.machine().device("tc0480scp"); | |
353 | address_space &space = screen.machine().driver_data()->generic_space(); | |
351 | device_t *tc0100scn = machine().device("tc0100scn"); | |
352 | device_t *tc0480scp = machine().device("tc0480scp"); | |
353 | address_space &space = machine().driver_data()->generic_space(); | |
354 | 354 | UINT8 layer[5]; |
355 | 355 | UINT8 pivlayer[3]; |
356 | 356 | UINT16 priority; |
357 | 357 | |
358 | 358 | #ifdef MAME_DEBUG |
359 | if ( | |
359 | if ( | |
360 | 360 | { |
361 | 361 | m_dislayer[5] ^= 1; |
362 | 362 | popmessage("piv text: %01x",m_dislayer[5]); |
363 | 363 | } |
364 | if ( | |
364 | if ( | |
365 | 365 | { |
366 | 366 | m_dislayer[0] ^= 1; |
367 | 367 | popmessage("bg0: %01x",m_dislayer[0]); |
368 | 368 | } |
369 | 369 | |
370 | if ( | |
370 | if ( | |
371 | 371 | { |
372 | 372 | m_dislayer[1] ^= 1; |
373 | 373 | popmessage("bg1: %01x",m_dislayer[1]); |
374 | 374 | } |
375 | 375 | |
376 | if ( | |
376 | if ( | |
377 | 377 | { |
378 | 378 | m_dislayer[2] ^= 1; |
379 | 379 | popmessage("bg2: %01x",m_dislayer[2]); |
380 | 380 | } |
381 | 381 | |
382 | if ( | |
382 | if ( | |
383 | 383 | { |
384 | 384 | m_dislayer[3] ^= 1; |
385 | 385 | popmessage("bg3: %01x",m_dislayer[3]); |
386 | 386 | } |
387 | 387 | |
388 | if ( | |
388 | if ( | |
389 | 389 | { |
390 | 390 | m_dislayer[4] ^= 1; |
391 | 391 | popmessage("sprites: %01x",m_dislayer[4]); |
r17988 | r17989 | |
407 | 407 | pivlayer[1] = pivlayer[0] ^ 1; |
408 | 408 | pivlayer[2] = 2; |
409 | 409 | |
410 | | |
410 | | |
411 | 411 | bitmap.fill(0, cliprect); /* wrong color? */ |
412 | 412 | |
413 | 413 | |
r17988 | r17989 | |
448 | 448 | if ((tc0480scp_pri_reg_r(tc0480scp, space, 0) & 0x3) == 3) /* on road levels kludge sprites up 1 priority */ |
449 | 449 | { |
450 | 450 | static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0}; |
451 | draw_sprites( | |
451 | draw_sprites( | |
452 | 452 | } |
453 | 453 | else |
454 | 454 | { |
455 | 455 | static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; |
456 | draw_sprites( | |
456 | draw_sprites( | |
457 | 457 | } |
458 | 458 | } |
459 | 459 | |
r17988 | r17989 | |
467 | 467 | /* See if we should draw artificial gun targets */ |
468 | 468 | /* (not yet implemented...) */ |
469 | 469 | |
470 | if ( | |
470 | if ( | |
471 | 471 | { |
472 | 472 | popmessage("Gunsights on"); |
473 | 473 | } |
r17988 | r17989 | |
491 | 491 | |
492 | 492 | UINT32 undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
493 | 493 | { |
494 | device_t *tc0100scn = screen.machine().device("tc0100scn"); | |
495 | device_t *tc0480scp = screen.machine().device("tc0480scp"); | |
496 | address_space &space = screen.machine().driver_data()->generic_space(); | |
494 | device_t *tc0100scn = machine().device("tc0100scn"); | |
495 | device_t *tc0480scp = machine().device("tc0480scp"); | |
496 | address_space &space = machine().driver_data()->generic_space(); | |
497 | 497 | UINT8 layer[5]; |
498 | 498 | UINT8 pivlayer[3]; |
499 | 499 | UINT16 priority; |
500 | 500 | |
501 | 501 | #ifdef MAME_DEBUG |
502 | if ( | |
502 | if ( | |
503 | 503 | { |
504 | 504 | m_dislayer[5] ^= 1; |
505 | 505 | popmessage("piv text: %01x",m_dislayer[5]); |
506 | 506 | } |
507 | if ( | |
507 | if ( | |
508 | 508 | { |
509 | 509 | m_dislayer[0] ^= 1; |
510 | 510 | popmessage("bg0: %01x",m_dislayer[0]); |
511 | 511 | } |
512 | 512 | |
513 | if ( | |
513 | if ( | |
514 | 514 | { |
515 | 515 | m_dislayer[1] ^= 1; |
516 | 516 | popmessage("bg1: %01x",m_dislayer[1]); |
517 | 517 | } |
518 | 518 | |
519 | if ( | |
519 | if ( | |
520 | 520 | { |
521 | 521 | m_dislayer[2] ^= 1; |
522 | 522 | popmessage("bg2: %01x",m_dislayer[2]); |
523 | 523 | } |
524 | 524 | |
525 | if ( | |
525 | if ( | |
526 | 526 | { |
527 | 527 | m_dislayer[3] ^= 1; |
528 | 528 | popmessage("bg3: %01x",m_dislayer[3]); |
529 | 529 | } |
530 | 530 | |
531 | if ( | |
531 | if ( | |
532 | 532 | { |
533 | 533 | m_dislayer[4] ^= 1; |
534 | 534 | popmessage("sprites: %01x",m_dislayer[4]); |
r17988 | r17989 | |
550 | 550 | pivlayer[1] = pivlayer[0] ^ 1; |
551 | 551 | pivlayer[2] = 2; |
552 | 552 | |
553 | | |
553 | | |
554 | 554 | bitmap.fill(0, cliprect); /* wrong color? */ |
555 | 555 | |
556 | 556 | |
r17988 | r17989 | |
591 | 591 | if ((tc0480scp_pri_reg_r(tc0480scp, space, 0) & 0x3) == 3) /* on road levels kludge sprites up 1 priority */ |
592 | 592 | { |
593 | 593 | static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0}; |
594 | draw_sprites_cbombers( | |
594 | draw_sprites_cbombers( | |
595 | 595 | } |
596 | 596 | else |
597 | 597 | { |
598 | 598 | static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; |
599 | draw_sprites_cbombers( | |
599 | draw_sprites_cbombers( | |
600 | 600 | } |
601 | 601 | } |
602 | 602 |
r17988 | r17989 | |
---|---|---|
1005 | 1005 | |
1006 | 1006 | /* render each scanline in the visible region */ |
1007 | 1007 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
1008 | amiga_render_scanline( | |
1008 | amiga_render_scanline( | |
1009 | 1009 | |
1010 | 1010 | return 0; |
1011 | 1011 | } |
r17988 | r17989 | |
---|---|---|
573 | 573 | |
574 | 574 | UINT32 deco32_state::screen_update_captaven(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
575 | 575 | { |
576 | m_deco_tilegen1 = screen.machine().device("tilegen1"); | |
577 | m_deco_tilegen2 = screen.machine().device("tilegen2"); | |
576 | m_deco_tilegen1 = machine().device("tilegen1"); | |
577 | m_deco_tilegen2 = machine().device("tilegen2"); | |
578 | 578 | |
579 | | |
579 | | |
580 | 580 | |
581 | screen.machine().priority_bitmap.fill(0, cliprect); | |
582 | bitmap.fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed | |
581 | machine().priority_bitmap.fill(0, cliprect); | |
582 | bitmap.fill(machine().pens[0x000], cliprect); // Palette index not confirmed | |
583 | 583 | |
584 | 584 | deco16ic_set_pf1_8bpp_mode(m_deco_tilegen2, 1); |
585 | 585 | |
r17988 | r17989 | |
601 | 601 | |
602 | 602 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 4); |
603 | 603 | |
604 | screen.machine().device<decospr_device>("spritegen")->set_alt_format(true); | |
605 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x400); | |
604 | machine().device<decospr_device>("spritegen")->set_alt_format(true); | |
605 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x400); | |
606 | 606 | |
607 | 607 | return 0; |
608 | 608 | } |
609 | 609 | |
610 | 610 | UINT32 dragngun_state::screen_update_dragngun(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
611 | 611 | { |
612 | m_deco_tilegen1 = screen.machine().device("tilegen1"); | |
613 | m_deco_tilegen2 = screen.machine().device("tilegen2"); | |
612 | m_deco_tilegen1 = machine().device("tilegen1"); | |
613 | m_deco_tilegen2 = machine().device("tilegen2"); | |
614 | 614 | |
615 | bitmap.fill(get_black_pen( | |
615 | bitmap.fill(get_black_pen( | |
616 | 616 | |
617 | 617 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
618 | 618 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
r17988 | r17989 | |
637 | 637 | { |
638 | 638 | rectangle clip(cliprect.min_x, cliprect.max_x, 8, 247); |
639 | 639 | |
640 | dragngun_draw_sprites( | |
640 | dragngun_draw_sprites( | |
641 | 641 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, clip, 0, 0); |
642 | 642 | |
643 | 643 | } |
r17988 | r17989 | |
648 | 648 | |
649 | 649 | UINT32 deco32_state::screen_update_fghthist(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
650 | 650 | { |
651 | m_deco_tilegen1 = screen.machine().device("tilegen1"); | |
652 | m_deco_tilegen2 = screen.machine().device("tilegen2"); | |
651 | m_deco_tilegen1 = machine().device("tilegen1"); | |
652 | m_deco_tilegen2 = machine().device("tilegen2"); | |
653 | 653 | |
654 | screen.machine().priority_bitmap.fill(0, cliprect); | |
655 | bitmap.fill(screen.machine().pens[0x000], cliprect); // Palette index not confirmed | |
654 | machine().priority_bitmap.fill(0, cliprect); | |
655 | bitmap.fill(machine().pens[0x000], cliprect); // Palette index not confirmed | |
656 | 656 | |
657 | 657 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
658 | 658 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
659 | 659 | |
660 | | |
660 | | |
661 | 661 | |
662 | 662 | /* Draw screen */ |
663 | 663 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1); |
r17988 | r17989 | |
665 | 665 | if(m_pri&1) |
666 | 666 | { |
667 | 667 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
668 | | |
668 | | |
669 | 669 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 4); |
670 | 670 | } |
671 | 671 | else |
672 | 672 | { |
673 | 673 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); |
674 | | |
674 | | |
675 | 675 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 4); |
676 | 676 | } |
677 | 677 | |
678 | | |
678 | | |
679 | 679 | |
680 | 680 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
681 | 681 | return 0; |
r17988 | r17989 | |
825 | 825 | UINT32 deco32_state::screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
826 | 826 | { |
827 | 827 | int alphaTilemap=0; |
828 | m_deco_tilegen1 = screen.machine().device("tilegen1"); | |
829 | m_deco_tilegen2 = screen.machine().device("tilegen2"); | |
828 | m_deco_tilegen1 = machine().device("tilegen1"); | |
829 | m_deco_tilegen2 = machine().device("tilegen2"); | |
830 | 830 | |
831 | 831 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
832 | 832 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
r17988 | r17989 | |
836 | 836 | alphaTilemap=1; |
837 | 837 | |
838 | 838 | if (m_ace_ram_dirty) |
839 | updateAceRam( | |
839 | updateAceRam( | |
840 | 840 | |
841 | | |
841 | | |
842 | 842 | |
843 | bitmap.fill( | |
843 | bitmap.fill( | |
844 | 844 | |
845 | 845 | /* Draw sprites to temporary bitmaps, saving alpha & priority info for later mixing */ |
846 | screen.machine().device<decospr_device>("spritegen1")->set_pix_raw_shift(8); | |
847 | screen.machine().device<decospr_device>("spritegen2")->set_pix_raw_shift(8); | |
846 | machine().device<decospr_device>("spritegen1")->set_pix_raw_shift(8); | |
847 | machine().device<decospr_device>("spritegen2")->set_pix_raw_shift(8); | |
848 | 848 | |
849 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true); | |
850 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true); | |
849 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true); | |
850 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true); | |
851 | 851 | |
852 | 852 | |
853 | 853 | /* Render alpha-blended tilemap to separate buffer for proper mixing */ |
r17988 | r17989 | |
880 | 880 | } |
881 | 881 | } |
882 | 882 | |
883 | mixDualAlphaSprites(bitmap, cliprect, | |
883 | mixDualAlphaSprites(bitmap, cliprect, | |
884 | 884 | |
885 | 885 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
886 | 886 | return 0; |
r17988 | r17989 | |
---|---|---|
39 | 39 | if (sx < -15*2) |
40 | 40 | sx += 256*2; |
41 | 41 | |
42 | drawgfxzoom_transpen(bitmap,cliprect, | |
42 | drawgfxzoom_transpen(bitmap,cliprect, | |
43 | 43 | } |
44 | 44 | |
45 | 45 | /* update the S2636 chips */ |
r17988 | r17989 | |
---|---|---|
336 | 336 | poly_wait(poly, "VIDEO_UPDATE"); |
337 | 337 | |
338 | 338 | /* normal update case */ |
339 | if (! | |
339 | if (! | |
340 | 340 | { |
341 | 341 | const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0xcc]); |
342 | 342 | int xoffs = screen.visible_area().min_x; |
r17988 | r17989 | |
353 | 353 | { |
354 | 354 | const void *base; |
355 | 355 | |
356 | if (screen.machine().input().code_pressed(KEYCODE_DOWN)) yoffs += screen.machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
357 | if (screen.machine().input().code_pressed(KEYCODE_UP)) yoffs -= screen.machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
358 | if (screen.machine().input().code_pressed(KEYCODE_LEFT) && texel_width > 4) { texel_width >>= 1; while (screen.machine().input().code_pressed(KEYCODE_LEFT)) ; } | |
359 | if (screen.machine().input().code_pressed(KEYCODE_RIGHT) && texel_width < 512) { texel_width <<= 1; while (screen.machine().input().code_pressed(KEYCODE_RIGHT)) ; } | |
356 | if (machine().input().code_pressed(KEYCODE_DOWN)) yoffs += machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
357 | if (machine().input().code_pressed(KEYCODE_UP)) yoffs -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
358 | if (machine().input().code_pressed(KEYCODE_LEFT) && texel_width > 4) { texel_width >>= 1; while (machine().input().code_pressed(KEYCODE_LEFT)) ; } | |
359 | if (machine().input().code_pressed(KEYCODE_RIGHT) && texel_width < 512) { texel_width <<= 1; while (machine().input().code_pressed(KEYCODE_RIGHT)) ; } | |
360 | 360 | |
361 | 361 | if (yoffs < 0) yoffs = 0; |
362 | 362 | base = waveram0_ptr_from_block_addr(yoffs << 12); |
r17988 | r17989 | |
---|---|---|
357 | 357 | MAKE_RGB(RGB_MAX,RGB_MAX,RGB_MAX) |
358 | 358 | }; |
359 | 359 | |
360 | const UINT8 *amedata = screen.machine().root_device().memregion("gfx5")->base(); | |
361 | const UINT8 *headdata = screen.machine().root_device().memregion("gfx6")->base(); | |
360 | const UINT8 *amedata = machine().root_device().memregion("gfx5")->base(); | |
361 | const UINT8 *headdata = machine().root_device().memregion("gfx6")->base(); | |
362 | 362 | const UINT8 *pldata = memregion("gfx7")->base(); |
363 | 363 | bitmap_ind16 &lpixmap = m_left_tilemap->pixmap(); |
364 | 364 | bitmap_ind16 &rpixmap = m_right_tilemap->pixmap(); |
r17988 | r17989 | |
399 | 399 | UINT8 objdata[256]; |
400 | 400 | |
401 | 401 | /* draw the objects for this scanline */ |
402 | draw_objects( | |
402 | draw_objects( | |
403 | 403 | |
404 | 404 | /* iterate over columns */ |
405 | 405 | for (x = cliprect.min_x; x <= cliprect.max_x; x++) |
r17988 | r17989 | |
---|---|---|
1156 | 1156 | |
1157 | 1157 | UINT32 argus_state::screen_update_argus(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1158 | 1158 | { |
1159 | bg_setting( | |
1159 | bg_setting( | |
1160 | 1160 | |
1161 | 1161 | /* scroll BG0 and render tile at proper position */ |
1162 | argus_bg0_scroll_handle( | |
1162 | argus_bg0_scroll_handle( | |
1163 | 1163 | |
1164 | 1164 | m_bg0_tilemap->draw(bitmap, cliprect, 0, 0); |
1165 | argus_draw_sprites( | |
1165 | argus_draw_sprites( | |
1166 | 1166 | if (m_bg_status & 1) /* Backgound enable */ |
1167 | 1167 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
1168 | argus_draw_sprites( | |
1168 | argus_draw_sprites( | |
1169 | 1169 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
1170 | 1170 | return 0; |
1171 | 1171 | } |
1172 | 1172 | |
1173 | 1173 | UINT32 argus_state::screen_update_valtric(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1174 | 1174 | { |
1175 | bg_setting( | |
1175 | bg_setting( | |
1176 | 1176 | |
1177 | 1177 | if (m_bg_status & 1) /* Backgound enable */ |
1178 | 1178 | valtric_draw_mosaic(screen, bitmap, cliprect); |
1179 | 1179 | else |
1180 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
1181 | valtric_draw_sprites(screen.machine(), bitmap, cliprect); | |
1180 | bitmap.fill(get_black_pen(machine()), cliprect); | |
1181 | valtric_draw_sprites(machine(), bitmap, cliprect); | |
1182 | 1182 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
1183 | 1183 | return 0; |
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | UINT32 argus_state::screen_update_butasan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1187 | 1187 | { |
1188 | bg_setting( | |
1188 | bg_setting( | |
1189 | 1189 | |
1190 | 1190 | if (m_bg_status & 1) /* Backgound enable */ |
1191 | 1191 | m_bg0_tilemap->draw(bitmap, cliprect, 0, 0); |
1192 | 1192 | else |
1193 | bitmap.fill(get_black_pen( | |
1193 | bitmap.fill(get_black_pen( | |
1194 | 1194 | if (m_butasan_bg1_status & 1) m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
1195 | butasan_draw_sprites( | |
1195 | butasan_draw_sprites( | |
1196 | 1196 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
1197 | 1197 | |
1198 | butasan_log_vram( | |
1198 | butasan_log_vram( | |
1199 | 1199 | return 0; |
1200 | 1200 | } |
r17988 | r17989 | |
---|---|---|
209 | 209 | m_bg_tilemap->set_scrollx(0, m_scroll[4]); |
210 | 210 | m_bg_tilemap->set_scrolly(0, m_scroll[5]); |
211 | 211 | |
212 | | |
212 | | |
213 | 213 | if ((m_vreg[2] & 0xf0) == 0xf0) |
214 | 214 | { |
215 | 215 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
216 | 216 | m_fg_tilemap->draw(bitmap, cliprect, 0, (m_vreg[1] & 2) ? 2 : 4); |
217 | 217 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
218 | draw_sprites( | |
218 | draw_sprites( | |
219 | 219 | } |
220 | 220 | else |
221 | 221 | { |
r17988 | r17989 | |
---|---|---|
463 | 463 | UINT32 zaxxon_state::screen_update_zaxxon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
464 | 464 | { |
465 | 465 | |
466 | draw_background(screen.machine(), bitmap, cliprect, TRUE); | |
467 | draw_sprites(screen.machine(), bitmap, cliprect, 0x140, 0x180); | |
466 | draw_background(machine(), bitmap, cliprect, TRUE); | |
467 | draw_sprites(machine(), bitmap, cliprect, 0x140, 0x180); | |
468 | 468 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
469 | 469 | return 0; |
470 | 470 | } |
r17988 | r17989 | |
473 | 473 | UINT32 zaxxon_state::screen_update_futspy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
474 | 474 | { |
475 | 475 | |
476 | draw_background(screen.machine(), bitmap, cliprect, TRUE); | |
477 | draw_sprites(screen.machine(), bitmap, cliprect, 0x180, 0x180); | |
476 | draw_background(machine(), bitmap, cliprect, TRUE); | |
477 | draw_sprites(machine(), bitmap, cliprect, 0x180, 0x180); | |
478 | 478 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
479 | 479 | return 0; |
480 | 480 | } |
r17988 | r17989 | |
483 | 483 | UINT32 zaxxon_state::screen_update_razmataz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
484 | 484 | { |
485 | 485 | |
486 | draw_background(screen.machine(), bitmap, cliprect, FALSE); | |
487 | draw_sprites(screen.machine(), bitmap, cliprect, 0x140, 0x180); | |
486 | draw_background(machine(), bitmap, cliprect, FALSE); | |
487 | draw_sprites(machine(), bitmap, cliprect, 0x140, 0x180); | |
488 | 488 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
489 | 489 | return 0; |
490 | 490 | } |
r17988 | r17989 | |
493 | 493 | UINT32 zaxxon_state::screen_update_congo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
494 | 494 | { |
495 | 495 | |
496 | draw_background(screen.machine(), bitmap, cliprect, TRUE); | |
497 | draw_sprites(screen.machine(), bitmap, cliprect, 0x280, 0x180); | |
496 | draw_background(machine(), bitmap, cliprect, TRUE); | |
497 | draw_sprites(machine(), bitmap, cliprect, 0x280, 0x180); | |
498 | 498 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
499 | 499 | return 0; |
500 | 500 | } |
r17988 | r17989 | |
---|---|---|
643 | 643 | |
644 | 644 | UINT32 gaiden_state::screen_update_gaiden(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
645 | 645 | { |
646 | | |
646 | | |
647 | 647 | |
648 | 648 | m_tile_bitmap_bg.fill(0x200, cliprect); |
649 | 649 | m_tile_bitmap_fg.fill(0, cliprect); |
r17988 | r17989 | |
658 | 658 | m_text_layer->draw(m_tile_bitmap_fg, cliprect, 0, 4); |
659 | 659 | |
660 | 660 | /* draw sprites into a 16-bit bitmap */ |
661 | gaiden_draw_sprites( | |
661 | gaiden_draw_sprites( | |
662 | 662 | |
663 | 663 | /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ |
664 | blendbitmaps( | |
664 | blendbitmaps( | |
665 | 665 | return 0; |
666 | 666 | |
667 | 667 | } |
668 | 668 | |
669 | 669 | UINT32 gaiden_state::screen_update_raiga(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
670 | 670 | { |
671 | | |
671 | | |
672 | 672 | |
673 | 673 | m_tile_bitmap_bg.fill(0x200, cliprect); |
674 | 674 | m_tile_bitmap_fg.fill(0, cliprect); |
r17988 | r17989 | |
683 | 683 | m_text_layer->draw(m_tile_bitmap_fg, cliprect, 0, 4); |
684 | 684 | |
685 | 685 | /* draw sprites into a 16-bit bitmap */ |
686 | raiga_draw_sprites( | |
686 | raiga_draw_sprites( | |
687 | 687 | |
688 | 688 | /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ |
689 | blendbitmaps( | |
689 | blendbitmaps( | |
690 | 690 | return 0; |
691 | 691 | } |
692 | 692 | |
693 | 693 | UINT32 gaiden_state::screen_update_drgnbowl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
694 | 694 | { |
695 | | |
695 | | |
696 | 696 | |
697 | 697 | m_background->draw(bitmap, cliprect, 0, 1); |
698 | 698 | m_foreground->draw(bitmap, cliprect, 0, 2); |
699 | 699 | m_text_layer->draw(bitmap, cliprect, 0, 4); |
700 | drgnbowl_draw_sprites( | |
700 | drgnbowl_draw_sprites( | |
701 | 701 | return 0; |
702 | 702 | } |
r17988 | r17989 | |
---|---|---|
190 | 190 | m_background->set_scrolly(0,m_videoreg[2]+0x10 ); |
191 | 191 | |
192 | 192 | m_background->draw(bitmap, cliprect, 0,0 ); |
193 | shangkid_draw_sprites( | |
193 | shangkid_draw_sprites( | |
194 | 194 | m_background->draw(bitmap, cliprect, 1,0 ); /* high priority tiles */ |
195 | 195 | return 0; |
196 | 196 | } |
r17988 | r17989 | |
320 | 320 | |
321 | 321 | UINT32 shangkid_state::screen_update_dynamski(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
322 | 322 | { |
323 | dynamski_draw_background(screen.machine(), bitmap,cliprect, 0 ); | |
324 | dynamski_draw_sprites(screen.machine(), bitmap,cliprect ); | |
325 | dynamski_draw_background(screen.machine(), bitmap,cliprect, 1 ); | |
323 | dynamski_draw_background(machine(), bitmap,cliprect, 0 ); | |
324 | dynamski_draw_sprites(machine(), bitmap,cliprect ); | |
325 | dynamski_draw_background(machine(), bitmap,cliprect, 1 ); | |
326 | 326 | return 0; |
327 | 327 | } |
r17988 | r17989 | |
---|---|---|
255 | 255 | } |
256 | 256 | |
257 | 257 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
258 | draw_sprites( | |
258 | draw_sprites( | |
259 | 259 | return 0; |
260 | 260 | } |
261 | 261 |
r17988 | r17989 | |
---|---|---|
299 | 299 | { |
300 | 300 | bitmap.fill(*m_background_color, cliprect); |
301 | 301 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
302 | draw_sprites( | |
302 | draw_sprites( | |
303 | 303 | |
304 | 304 | return 0; |
305 | 305 | } |
r17988 | r17989 | |
364 | 364 | UINT32 fastfred_state::screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
365 | 365 | { |
366 | 366 | m_web_tilemap->draw(bitmap, cliprect, 0,0); |
367 | galaxold_draw_stars( | |
367 | galaxold_draw_stars( | |
368 | 368 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
369 | draw_sprites( | |
369 | draw_sprites( | |
370 | 370 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
371 | 371 | |
372 | 372 | return 0; |
r17988 | r17989 | |
---|---|---|
126 | 126 | |
127 | 127 | UINT32 karnov_state::screen_update_karnov(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
128 | 128 | { |
129 | draw_background(screen.machine(), bitmap, cliprect); | |
130 | screen.machine().device<deco_karnovsprites_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram->buffer(), 0x800, 0); | |
129 | draw_background(machine(), bitmap, cliprect); | |
130 | machine().device<deco_karnovsprites_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0x800, 0); | |
131 | 131 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
132 | 132 | return 0; |
133 | 133 | } |
r17988 | r17989 | |
---|---|---|
261 | 261 | { |
262 | 262 | |
263 | 263 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
264 | lwings_draw_sprites( | |
264 | lwings_draw_sprites( | |
265 | 265 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
266 | 266 | return 0; |
267 | 267 | } |
r17988 | r17989 | |
271 | 271 | |
272 | 272 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
273 | 273 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
274 | trojan_draw_sprites( | |
274 | trojan_draw_sprites( | |
275 | 275 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
276 | 276 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
277 | 277 | return 0; |
r17988 | r17989 | |
---|---|---|
354 | 354 | UINT32 punchout_state::screen_update_punchout_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
355 | 355 | { |
356 | 356 | |
357 | punchout_copy_top_palette( | |
357 | punchout_copy_top_palette( | |
358 | 358 | |
359 | 359 | m_bg_top_tilemap->draw(bitmap, cliprect, 0, 0); |
360 | 360 | |
361 | 361 | if (m_spr1_ctrlram[7] & 1) /* display in top monitor */ |
362 | draw_big_sprite( | |
362 | draw_big_sprite( | |
363 | 363 | |
364 | 364 | return 0; |
365 | 365 | } |
r17988 | r17989 | |
368 | 368 | { |
369 | 369 | int offs; |
370 | 370 | |
371 | punchout_copy_bot_palette( | |
371 | punchout_copy_bot_palette( | |
372 | 372 | |
373 | 373 | /* copy the character mapped graphics */ |
374 | 374 | for (offs = 0;offs < 32;offs++) |
r17988 | r17989 | |
377 | 377 | m_bg_bot_tilemap->draw(bitmap, cliprect, 0, 0); |
378 | 378 | |
379 | 379 | if (m_spr1_ctrlram[7] & 2) /* display in bottom monitor */ |
380 | draw_big_sprite(screen.machine(), bitmap, cliprect, 1); | |
381 | drawbs2(screen.machine(), bitmap, cliprect); | |
380 | draw_big_sprite(machine(), bitmap, cliprect, 1); | |
381 | drawbs2(machine(), bitmap, cliprect); | |
382 | 382 | |
383 | 383 | return 0; |
384 | 384 | } |
r17988 | r17989 | |
387 | 387 | UINT32 punchout_state::screen_update_armwrest_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
388 | 388 | { |
389 | 389 | |
390 | punchout_copy_top_palette( | |
390 | punchout_copy_top_palette( | |
391 | 391 | |
392 | 392 | m_bg_top_tilemap->draw(bitmap, cliprect, 0, 0); |
393 | 393 | |
394 | 394 | if (m_spr1_ctrlram[7] & 1) /* display in top monitor */ |
395 | armwrest_draw_big_sprite( | |
395 | armwrest_draw_big_sprite( | |
396 | 396 | |
397 | 397 | return 0; |
398 | 398 | } |
r17988 | r17989 | |
400 | 400 | UINT32 punchout_state::screen_update_armwrest_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
401 | 401 | { |
402 | 402 | |
403 | punchout_copy_bot_palette( | |
403 | punchout_copy_bot_palette( | |
404 | 404 | |
405 | 405 | m_bg_bot_tilemap->draw(bitmap, cliprect, 0, 0); |
406 | 406 | |
407 | 407 | if (m_spr1_ctrlram[7] & 2) /* display in bottom monitor */ |
408 | armwrest_draw_big_sprite(screen.machine(), bitmap, cliprect, 1); | |
409 | drawbs2(screen.machine(), bitmap, cliprect); | |
408 | armwrest_draw_big_sprite(machine(), bitmap, cliprect, 1); | |
409 | drawbs2(machine(), bitmap, cliprect); | |
410 | 410 | |
411 | 411 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
412 | 412 |
r17988 | r17989 | |
---|---|---|
239 | 239 | |
240 | 240 | UINT32 tecmo_state::screen_update_tecmo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
241 | 241 | { |
242 | | |
242 | | |
243 | 243 | bitmap.fill(0x100, cliprect); |
244 | 244 | m_bg_tilemap->draw(bitmap, cliprect, 0,1); |
245 | 245 | m_fg_tilemap->draw(bitmap, cliprect, 0,2); |
246 | 246 | m_tx_tilemap->draw(bitmap, cliprect, 0,4); |
247 | 247 | |
248 | draw_sprites( | |
248 | draw_sprites( | |
249 | 249 | return 0; |
250 | 250 | } |
r17988 | r17989 | |
---|---|---|
94 | 94 | |
95 | 95 | /* Draw the sprites. */ |
96 | 96 | { |
97 | gfx_element *gfx1 = screen.machine().gfx[1]; | |
98 | gfx_element *gfx2 = screen.machine().gfx[2]; | |
97 | gfx_element *gfx1 = machine().gfx[1]; | |
98 | gfx_element *gfx2 = machine().gfx[2]; | |
99 | 99 | |
100 | 100 | UINT8 *sr = m_spriterambank ? m_spriteram_2 : m_spriteram; |
101 | 101 |
r17988 | r17989 | |
---|---|---|
102 | 102 | |
103 | 103 | UINT32 galpanic_state::screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
104 | 104 | { |
105 | device_t *pandora = | |
105 | device_t *pandora = | |
106 | 106 | |
107 | 107 | /* copy the temporary bitmap to the screen */ |
108 | 108 | copybitmap(bitmap,m_bitmap,0,0,0,0,cliprect); |
109 | 109 | |
110 | draw_fgbitmap( | |
110 | draw_fgbitmap( | |
111 | 111 | |
112 | 112 | pandora_update(pandora, bitmap, cliprect); |
113 | 113 | |
r17988 | r17989 | |
119 | 119 | /* copy the temporary bitmap to the screen */ |
120 | 120 | copybitmap(bitmap,m_bitmap,0,0,0,0,cliprect); |
121 | 121 | |
122 | draw_fgbitmap( | |
122 | draw_fgbitmap( | |
123 | 123 | |
124 | 124 | |
125 | 125 | // if(galpanic_clear_sprites) |
126 | 126 | { |
127 | 127 | m_sprites_bitmap.fill(0, cliprect); |
128 | comad_draw_sprites( | |
128 | comad_draw_sprites( | |
129 | 129 | } |
130 | 130 | // else |
131 | 131 | // { |
132 | 132 | // /* keep sprites on the bitmap without clearing them */ |
133 | // comad_draw_sprites( | |
133 | // comad_draw_sprites( | |
134 | 134 | // copybitmap_trans(bitmap,m_sprites_bitmap,0,0,0,0,cliprect,0); |
135 | 135 | // } |
136 | 136 | return 0; |
r17988 | r17989 | |
---|---|---|
658 | 658 | UINT32 cclimber_state::screen_update_cclimber(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
659 | 659 | { |
660 | 660 | bitmap.fill(CCLIMBER_BG_PEN, cliprect); |
661 | draw_playfield( | |
661 | draw_playfield( | |
662 | 662 | |
663 | 663 | /* draw the "big sprite" under the regular sprites */ |
664 | 664 | if ((m_bigsprite_control[0] & 0x01)) |
665 | 665 | { |
666 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
667 | cclimber_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
666 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
667 | cclimber_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
668 | 668 | } |
669 | 669 | |
670 | 670 | /* draw the "big sprite" over the regular sprites */ |
671 | 671 | else |
672 | 672 | { |
673 | cclimber_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
674 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
673 | cclimber_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
674 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
675 | 675 | } |
676 | 676 | |
677 | 677 | return 0; |
r17988 | r17989 | |
680 | 680 | |
681 | 681 | UINT32 cclimber_state::screen_update_yamato(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
682 | 682 | { |
683 | cclimber_state *state = | |
683 | cclimber_state *state = | |
684 | 684 | int i; |
685 | 685 | UINT8 *sky_rom = memregion("user1")->base() + 0x1200; |
686 | 686 | |
r17988 | r17989 | |
693 | 693 | bitmap.pix16(j, (i - 8) & 0xff) = pen; |
694 | 694 | } |
695 | 695 | |
696 | draw_playfield( | |
696 | draw_playfield( | |
697 | 697 | |
698 | 698 | /* draw the "big sprite" under the regular sprites */ |
699 | 699 | if ((m_bigsprite_control[0] & 0x01)) |
700 | 700 | { |
701 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
702 | toprollr_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
701 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
702 | toprollr_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
703 | 703 | } |
704 | 704 | |
705 | 705 | /* draw the "big sprite" over the regular sprites */ |
706 | 706 | else |
707 | 707 | { |
708 | toprollr_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
709 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
708 | toprollr_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
709 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
710 | 710 | } |
711 | 711 | |
712 | 712 | return 0; |
r17988 | r17989 | |
715 | 715 | |
716 | 716 | UINT32 cclimber_state::screen_update_swimmer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
717 | 717 | { |
718 | cclimber_state *state = screen.machine().driver_data<cclimber_state>(); | |
719 | swimmer_set_background_pen(screen.machine()); | |
718 | cclimber_state *state = machine().driver_data<cclimber_state>(); | |
719 | swimmer_set_background_pen(machine()); | |
720 | 720 | |
721 | 721 | if (*m_swimmer_side_background_enabled & 0x01) |
722 | 722 | { |
r17988 | r17989 | |
746 | 746 | else |
747 | 747 | bitmap.fill(CCLIMBER_BG_PEN, cliprect); |
748 | 748 | |
749 | draw_playfield( | |
749 | draw_playfield( | |
750 | 750 | |
751 | 751 | /* draw the "big sprite" under the regular sprites */ |
752 | 752 | if ((m_bigsprite_control[0] & 0x01)) |
753 | 753 | { |
754 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
755 | swimmer_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
754 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
755 | swimmer_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
756 | 756 | } |
757 | 757 | |
758 | 758 | /* draw the "big sprite" over the regular sprites */ |
759 | 759 | else |
760 | 760 | { |
761 | swimmer_draw_sprites(bitmap, cliprect, screen.machine().gfx[1]); | |
762 | cclimber_draw_bigsprite(screen.machine(), bitmap, cliprect); | |
761 | swimmer_draw_sprites(bitmap, cliprect, machine().gfx[1]); | |
762 | cclimber_draw_bigsprite(machine(), bitmap, cliprect); | |
763 | 763 | } |
764 | 764 | |
765 | 765 | return 0; |
r17988 | r17989 | |
768 | 768 | |
769 | 769 | UINT32 cclimber_state::screen_update_toprollr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
770 | 770 | { |
771 | cclimber_state *state = | |
771 | cclimber_state *state = | |
772 | 772 | rectangle scroll_area_clip = cliprect; |
773 | 773 | scroll_area_clip.min_x = 4*8; |
774 | 774 | scroll_area_clip.max_x = 29*8-1; |
r17988 | r17989 | |
784 | 784 | /* draw the "big sprite" over the regular sprites */ |
785 | 785 | if ((m_bigsprite_control[1] & 0x20)) |
786 | 786 | { |
787 | toprollr_draw_sprites(bitmap, scroll_area_clip, screen.machine().gfx[1]); | |
788 | toprollr_draw_bigsprite(screen.machine(), bitmap, scroll_area_clip); | |
787 | toprollr_draw_sprites(bitmap, scroll_area_clip, machine().gfx[1]); | |
788 | toprollr_draw_bigsprite(machine(), bitmap, scroll_area_clip); | |
789 | 789 | } |
790 | 790 | |
791 | 791 | /* draw the "big sprite" under the regular sprites */ |
792 | 792 | else |
793 | 793 | { |
794 | toprollr_draw_bigsprite(screen.machine(), bitmap, scroll_area_clip); | |
795 | toprollr_draw_sprites(bitmap, scroll_area_clip, screen.machine().gfx[1]); | |
794 | toprollr_draw_bigsprite(machine(), bitmap, scroll_area_clip); | |
795 | toprollr_draw_sprites(bitmap, scroll_area_clip, machine().gfx[1]); | |
796 | 796 | } |
797 | 797 | |
798 | 798 | m_pf_tilemap->mark_all_dirty(); |
r17988 | r17989 | |
---|---|---|
114 | 114 | UINT32 xorworld_state::screen_update_xorworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
115 | 115 | { |
116 | 116 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
117 | draw_sprites( | |
117 | draw_sprites( | |
118 | 118 | return 0; |
119 | 119 | } |
r17988 | r17989 | |
---|---|---|
90 | 90 | { |
91 | 91 | if (m_display_disable) |
92 | 92 | { |
93 | bitmap.fill(get_black_pen( | |
93 | bitmap.fill(get_black_pen( | |
94 | 94 | return 0; |
95 | 95 | } |
96 | 96 | |
r17988 | r17989 | |
104 | 104 | #endif |
105 | 105 | m_tilemap->set_scrollx(0, 0x100); // verify |
106 | 106 | m_tilemap->draw(bitmap, cliprect, 0,0); |
107 | draw_sprites( | |
107 | draw_sprites( | |
108 | 108 | return 0; |
109 | 109 | } |
r17988 | r17989 | |
---|---|---|
865 | 865 | |
866 | 866 | /* render each scanline in the visible region */ |
867 | 867 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
868 | amiga_aga_render_scanline( | |
868 | amiga_aga_render_scanline( | |
869 | 869 | |
870 | 870 | return 0; |
871 | 871 | } |
r17988 | r17989 | |
---|---|---|
224 | 224 | |
225 | 225 | UINT32 cloak_state::screen_update_cloak(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
226 | 226 | { |
227 | set_pens( | |
227 | set_pens( | |
228 | 228 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
229 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
230 | draw_sprites(screen.machine(), bitmap, cliprect); | |
229 | draw_bitmap(machine(), bitmap, cliprect); | |
230 | draw_sprites(machine(), bitmap, cliprect); | |
231 | 231 | return 0; |
232 | 232 | } |
r17988 | r17989 | |
---|---|---|
644 | 644 | /* palette updates are delayed when graphics are disabled */ |
645 | 645 | for( which=0; which<0x1000; which++ ) |
646 | 646 | { |
647 | UpdatePalette( | |
647 | UpdatePalette( | |
648 | 648 | } |
649 | 649 | m_palette_is_dirty = 0; |
650 | 650 | } |
651 | UpdateGfx( | |
651 | UpdateGfx( | |
652 | 652 | for( which=0; which<NAMCONA1_NUM_TILEMAPS; which++ ) |
653 | 653 | { |
654 | 654 | int tilemap_color = m_vreg[0xb0/2+(which&3)]&0xf; |
r17988 | r17989 | |
668 | 668 | } |
669 | 669 | } |
670 | 670 | |
671 | | |
671 | | |
672 | 672 | |
673 | 673 | bitmap.fill(0xff, cliprect ); /* background color? */ |
674 | 674 | |
r17988 | r17989 | |
687 | 687 | } |
688 | 688 | if( pri == priority ) |
689 | 689 | { |
690 | draw_background( | |
690 | draw_background( | |
691 | 691 | } |
692 | 692 | } /* next tilemap */ |
693 | 693 | } /* next priority level */ |
694 | 694 | |
695 | draw_sprites( | |
695 | draw_sprites( | |
696 | 696 | } /* gfx enabled */ |
697 | 697 | return 0; |
698 | 698 | } |
r17988 | r17989 | |
---|---|---|
114 | 114 | UINT32 foodf_state::screen_update_foodf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
115 | 115 | { |
116 | 116 | int offs; |
117 | gfx_element *gfx = screen.machine().gfx[1]; | |
118 | bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap; | |
117 | gfx_element *gfx = machine().gfx[1]; | |
118 | bitmap_ind8 &priority_bitmap = machine().priority_bitmap; | |
119 | 119 | UINT16 *spriteram16 = m_spriteram; |
120 | 120 | |
121 | 121 | /* first draw the playfield opaquely */ |
r17988 | r17989 | |
---|---|---|
54 | 54 | { |
55 | 55 | |
56 | 56 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
57 | draw_sprites( | |
57 | draw_sprites( | |
58 | 58 | return 0; |
59 | 59 | } |
r17988 | r17989 | |
---|---|---|
398 | 398 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
399 | 399 | |
400 | 400 | if (sprite_enable) |
401 | draw_sprites( | |
401 | draw_sprites( | |
402 | 402 | |
403 | 403 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
404 | 404 | |
405 | 405 | if (sprite_enable) |
406 | draw_sprites( | |
406 | draw_sprites( | |
407 | 407 | |
408 | 408 | if (sprite_enable) |
409 | draw_sprites( | |
409 | draw_sprites( | |
410 | 410 | |
411 | 411 | m_tx_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(0), 0); |
412 | 412 |
r17988 | r17989 | |
---|---|---|
955 | 955 | UINT32 dkong_state::screen_update_dkong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
956 | 956 | { |
957 | 957 | |
958 | | |
958 | | |
959 | 959 | m_bg_tilemap->set_scrollx(0, m_flip ? 0 : 0); |
960 | 960 | m_bg_tilemap->set_scrolly(0, m_flip ? -8 : 0); |
961 | 961 | |
r17988 | r17989 | |
963 | 963 | { |
964 | 964 | case HARDWARE_TKG02: |
965 | 965 | case HARDWARE_TKG04: |
966 | check_palette( | |
966 | check_palette( | |
967 | 967 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
968 | draw_sprites( | |
968 | draw_sprites( | |
969 | 969 | break; |
970 | 970 | case HARDWARE_TRS01: |
971 | 971 | case HARDWARE_TRS02: |
972 | 972 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
973 | draw_sprites(screen.machine(), bitmap, cliprect, 0x40, 1); | |
974 | radarscp_draw_background(screen.machine(), this, bitmap, cliprect); | |
973 | draw_sprites(machine(), bitmap, cliprect, 0x40, 1); | |
974 | radarscp_draw_background(machine(), this, bitmap, cliprect); | |
975 | 975 | break; |
976 | 976 | default: |
977 | 977 | fatalerror("Invalid hardware type in dkong_video_update\n"); |
r17988 | r17989 | |
990 | 990 | { |
991 | 991 | if (m_sprite_ram[offs]) |
992 | 992 | { |
993 | drawgfx_transpen(bitmap,cliprect, | |
993 | drawgfx_transpen(bitmap,cliprect, | |
994 | 994 | m_sprite_ram[offs + 2], |
995 | 995 | (m_sprite_ram[offs + 1] & 0x0f) + 16 * m_palette_bank, |
996 | 996 | m_sprite_ram[offs + 1] & 0x80,m_sprite_ram[offs + 1] & 0x40, |
r17988 | r17989 | |
1006 | 1006 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
1007 | 1007 | |
1008 | 1008 | /* it uses sprite_ram[offs + 2] & 0x10 for sprite bank */ |
1009 | draw_sprites( | |
1009 | draw_sprites( | |
1010 | 1010 | return 0; |
1011 | 1011 | } |
r17988 | r17989 | |
---|---|---|
74 | 74 | if (i & 1) |
75 | 75 | bank = 32; |
76 | 76 | |
77 | drawgfx_transpen(bitmap, cliprect, | |
77 | drawgfx_transpen(bitmap, cliprect, | |
78 | 78 | (code >> 3) | bank, |
79 | 79 | (attr & 0x80) ? 4 : i, |
80 | 80 | 0, 0, |
r17988 | r17989 | |
95 | 95 | |
96 | 96 | /* check for sprite-playfield collisions */ |
97 | 97 | |
98 | device_t *discrete = | |
98 | device_t *discrete = | |
99 | 99 | |
100 | 100 | for (i = 0; i < 4; i++) |
101 | 101 | { |
r17988 | r17989 | |
112 | 112 | |
113 | 113 | rect.min_x = horz - 15; |
114 | 114 | rect.min_y = vert - 15; |
115 | rect.max_x = horz - 15 + screen.machine().gfx[1]->width() - 1; | |
116 | rect.max_y = vert - 15 + screen.machine().gfx[1]->height() - 1; | |
115 | rect.max_x = horz - 15 + machine().gfx[1]->width() - 1; | |
116 | rect.max_y = vert - 15 + machine().gfx[1]->height() - 1; | |
117 | 117 | |
118 | rect &= | |
118 | rect &= | |
119 | 119 | |
120 | 120 | m_playfield->draw(m_helper, rect, 0, 0); |
121 | 121 | |
122 | 122 | if (i & 1) |
123 | 123 | bank = 32; |
124 | 124 | |
125 | drawgfx_transpen(m_helper, rect, | |
125 | drawgfx_transpen(m_helper, rect, | |
126 | 126 | (code >> 3) | bank, |
127 | 127 | 4, |
128 | 128 | 0, 0, |
r17988 | r17989 | |
131 | 131 | |
132 | 132 | for (y = rect.min_y; y <= rect.max_y; y++) |
133 | 133 | for (x = rect.min_x; x <= rect.max_x; x++) |
134 | if (colortable_entry_get_value( | |
134 | if (colortable_entry_get_value( | |
135 | 135 | m_collision[i] = 1; |
136 | 136 | } |
137 | 137 | |
138 | 138 | /* update sound status */ |
139 | 139 | |
140 | address_space &space = | |
140 | address_space &space = | |
141 | 141 | discrete_sound_w(discrete, space, SPRINT4_MOTOR_DATA_1, videoram[0x391] & 15); |
142 | 142 | discrete_sound_w(discrete, space, SPRINT4_MOTOR_DATA_2, videoram[0x393] & 15); |
143 | 143 | discrete_sound_w(discrete, space, SPRINT4_MOTOR_DATA_3, videoram[0x395] & 15); |
r17988 | r17989 | |
---|---|---|
276 | 276 | if (m_priority == 1) |
277 | 277 | { |
278 | 278 | /* sprite set #1 */ |
279 | appoooh_draw_sprites(bitmap, cliprect, | |
279 | appoooh_draw_sprites(bitmap, cliprect, | |
280 | 280 | /* sprite set #2 */ |
281 | appoooh_draw_sprites(bitmap, cliprect, | |
281 | appoooh_draw_sprites(bitmap, cliprect, | |
282 | 282 | } |
283 | 283 | else |
284 | 284 | { |
285 | 285 | /* sprite set #2 */ |
286 | appoooh_draw_sprites(bitmap, cliprect, | |
286 | appoooh_draw_sprites(bitmap, cliprect, | |
287 | 287 | /* sprite set #1 */ |
288 | appoooh_draw_sprites(bitmap, cliprect, | |
288 | appoooh_draw_sprites(bitmap, cliprect, | |
289 | 289 | } |
290 | 290 | |
291 | 291 | if (m_priority != 0) /* fg in front of sprites */ |
r17988 | r17989 | |
305 | 305 | if (m_priority == 1) |
306 | 306 | { |
307 | 307 | /* sprite set #1 */ |
308 | robowres_draw_sprites(bitmap, cliprect, | |
308 | robowres_draw_sprites(bitmap, cliprect, | |
309 | 309 | /* sprite set #2 */ |
310 | robowres_draw_sprites(bitmap, cliprect, | |
310 | robowres_draw_sprites(bitmap, cliprect, | |
311 | 311 | } |
312 | 312 | else |
313 | 313 | { |
314 | 314 | /* sprite set #2 */ |
315 | robowres_draw_sprites(bitmap, cliprect, | |
315 | robowres_draw_sprites(bitmap, cliprect, | |
316 | 316 | /* sprite set #1 */ |
317 | robowres_draw_sprites(bitmap, cliprect, | |
317 | robowres_draw_sprites(bitmap, cliprect, | |
318 | 318 | } |
319 | 319 | |
320 | 320 | if (m_priority != 0) /* fg in front of sprites */ |
r17988 | r17989 | |
---|---|---|
140 | 140 | rectangle helper_clip = cliprect; |
141 | 141 | helper_clip &= m_helper.cliprect(); |
142 | 142 | |
143 | draw_terrain(screen.machine(), m_helper, helper_clip); | |
144 | draw_sprites(screen.machine(), m_helper, helper_clip); | |
145 | draw_missiles(screen.machine(), m_helper, helper_clip); | |
146 | draw_trapezoid(screen.machine(), bitmap, m_helper); | |
147 | draw_text(screen.machine(), bitmap, cliprect); | |
143 | draw_terrain(machine(), m_helper, helper_clip); | |
144 | draw_sprites(machine(), m_helper, helper_clip); | |
145 | draw_missiles(machine(), m_helper, helper_clip); | |
146 | draw_trapezoid(machine(), bitmap, m_helper); | |
147 | draw_text(machine(), bitmap, cliprect); | |
148 | 148 | return 0; |
149 | 149 | } |
r17988 | r17989 | |
---|---|---|
332 | 332 | UINT32 travrusa_state::screen_update_travrusa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
333 | 333 | { |
334 | 334 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
335 | draw_sprites( | |
335 | draw_sprites( | |
336 | 336 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
337 | 337 | return 0; |
338 | 338 | } |
r17988 | r17989 | |
---|---|---|
249 | 249 | m_bg_tilemap->set_scrollx(0, m_scrollx[1] + ((m_scrollx[0] & 0x02) << 7) ); |
250 | 250 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
251 | 251 | } |
252 | draw_sprites( | |
252 | draw_sprites( | |
253 | 253 | m_fg_tilemap->draw(bitmap, cliprect, 2, 0); // high priority tiles of foreground |
254 | 254 | |
255 | 255 | // popmessage("%02X", m_scrollx[0]); |
r17988 | r17989 | |
---|---|---|
77 | 77 | |
78 | 78 | k052109_tilemap_update(m_k052109); |
79 | 79 | |
80 | | |
80 | | |
81 | 81 | bitmap.fill(m_layer_colorbase[1] * 16, cliprect); |
82 | 82 | |
83 | 83 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 1, 0, 1); |
r17988 | r17989 | |
---|---|---|
129 | 129 | |
130 | 130 | konami_sortlayers5(layer, m_layerpri); |
131 | 131 | |
132 | | |
132 | | |
133 | 133 | |
134 | 134 | for (plane = 0; plane < 5; plane++) |
135 | 135 | { |
r17988 | r17989 | |
---|---|---|
366 | 366 | { |
367 | 367 | int i; |
368 | 368 | |
369 | bitmap.fill(get_black_pen( | |
369 | bitmap.fill(get_black_pen( | |
370 | 370 | |
371 | 371 | if (!(m_cm_enable_reg &0x01)) |
372 | 372 | return 0; |
r17988 | r17989 | |
393 | 393 | |
394 | 394 | if (m_cm_enable_reg &0x04) |
395 | 395 | { |
396 | if ( | |
396 | if ( | |
397 | 397 | { |
398 | gfx_element *gfx = | |
398 | gfx_element *gfx = | |
399 | 399 | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
400 | 400 | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
401 | 401 | |
r17988 | r17989 | |
416 | 416 | { |
417 | 417 | int i; |
418 | 418 | |
419 | bitmap.fill(get_black_pen( | |
419 | bitmap.fill(get_black_pen( | |
420 | 420 | |
421 | 421 | if (!(m_cm_enable_reg &0x01)) |
422 | 422 | return 0; |
r17988 | r17989 | |
435 | 435 | |
436 | 436 | if (m_cm_enable_reg &0x04) |
437 | 437 | { |
438 | if ( | |
438 | if ( | |
439 | 439 | { |
440 | gfx_element *gfx = | |
440 | gfx_element *gfx = | |
441 | 441 | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
442 | 442 | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
443 | 443 | |
r17988 | r17989 | |
458 | 458 | { |
459 | 459 | int i; |
460 | 460 | |
461 | bitmap.fill(get_black_pen( | |
461 | bitmap.fill(get_black_pen( | |
462 | 462 | |
463 | 463 | if (!(m_cm_enable_reg &0x01)) |
464 | 464 | return 0; |
r17988 | r17989 | |
516 | 516 | { |
517 | 517 | int i; |
518 | 518 | |
519 | bitmap.fill(get_black_pen( | |
519 | bitmap.fill(get_black_pen( | |
520 | 520 | |
521 | 521 | if (!(m_cm_enable_reg &0x01)) |
522 | 522 | return 0; |
r17988 | r17989 | |
569 | 569 | { |
570 | 570 | int i; |
571 | 571 | |
572 | bitmap.fill(get_black_pen( | |
572 | bitmap.fill(get_black_pen( | |
573 | 573 | |
574 | 574 | if (!(m_cm_enable_reg &0x01)) |
575 | 575 | return 0; |
r17988 | r17989 | |
604 | 604 | { |
605 | 605 | int i; |
606 | 606 | |
607 | bitmap.fill(get_black_pen( | |
607 | bitmap.fill(get_black_pen( | |
608 | 608 | |
609 | 609 | if (!(m_cm_enable_reg &0x01)) |
610 | 610 | return 0; |
r17988 | r17989 | |
---|---|---|
48 | 48 | { |
49 | 49 | int i; |
50 | 50 | |
51 | | |
51 | | |
52 | 52 | |
53 | 53 | if (m_view2_0) m_view2_0->kaneko16_prepare(bitmap, cliprect); |
54 | 54 | if (m_view2_1) m_view2_1->kaneko16_prepare(bitmap, cliprect); |
r17988 | r17989 | |
68 | 68 | |
69 | 69 | UINT32 kaneko16_state::screen_update_kaneko16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
70 | 70 | { |
71 | kaneko16_fill_bitmap( | |
71 | kaneko16_fill_bitmap( | |
72 | 72 | |
73 | 73 | // if the display is disabled, do nothing? |
74 | 74 | if (!m_disp_enable) return 0; |
75 | 75 | |
76 | 76 | SCREEN_UPDATE16_CALL_MEMBER(common); |
77 | m_kaneko_spr->kaneko16_render_sprites( | |
77 | m_kaneko_spr->kaneko16_render_sprites( | |
78 | 78 | return 0; |
79 | 79 | } |
80 | 80 | |
r17988 | r17989 | |
192 | 192 | UINT32 kaneko16_berlwall_state::screen_update_berlwall(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
193 | 193 | { |
194 | 194 | // berlwall uses a 15bpp bitmap as a bg, not a solid fill |
195 | kaneko16_render_15bpp_bitmap( | |
195 | kaneko16_render_15bpp_bitmap( | |
196 | 196 | |
197 | 197 | // if the display is disabled, do nothing? |
198 | 198 | if (!m_disp_enable) return 0; |
199 | 199 | |
200 | 200 | SCREEN_UPDATE16_CALL_MEMBER(common); |
201 | m_kaneko_spr->kaneko16_render_sprites( | |
201 | m_kaneko_spr->kaneko16_render_sprites( | |
202 | 202 | return 0; |
203 | 203 | } |
r17988 | r17989 | |
---|---|---|
344 | 344 | m_tx_tilemap->set_scrollx(0,m_scroll0xlo[0] + 256 * m_scroll0xhi[0]); |
345 | 345 | m_tx_tilemap->set_scrolly(0,m_scroll0ylo[0] + 256 * m_scroll0yhi[0]); |
346 | 346 | |
347 | // draw_sprites( | |
347 | // draw_sprites( | |
348 | 348 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
349 | draw_sprites( | |
349 | draw_sprites( | |
350 | 350 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
351 | draw_sprites( | |
351 | draw_sprites( | |
352 | 352 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
353 | draw_sprites( | |
353 | draw_sprites( | |
354 | 354 | return 0; |
355 | 355 | } |
r17988 | r17989 | |
---|---|---|
366 | 366 | int i; |
367 | 367 | |
368 | 368 | for (i = 0;i < 0x10000;i++) // colors 0x3000-0x3fff are not used |
369 | update_color( | |
369 | update_color( | |
370 | 370 | |
371 | 371 | scrollx = m_tx_scroll[0x00/4] + m_tx_scroll[0x08/4] + 0x18; |
372 | 372 | scrolly = m_tx_scroll[0x0c/4] + m_tx_scroll[0x14/4]; |
r17988 | r17989 | |
381 | 381 | m_bg_tilemap_alt->set_scrolly(0, scrolly); |
382 | 382 | |
383 | 383 | |
384 | | |
384 | | |
385 | 385 | |
386 | 386 | |
387 | 387 | |
r17988 | r17989 | |
393 | 393 | m_temp_bitmap_sprites.fill(0, cliprect); |
394 | 394 | m_temp_bitmap_sprites_pri.fill(0, cliprect); |
395 | 395 | |
396 | draw_sprites( | |
396 | draw_sprites( | |
397 | 397 | |
398 | 398 | |
399 | 399 | |
r17988 | r17989 | |
416 | 416 | rot_pri++; |
417 | 417 | |
418 | 418 | if (rot_pri == 0) |
419 | draw_roz( | |
419 | draw_roz( | |
420 | 420 | else if (scr_pri == 0) |
421 | 421 | if (m_tilemaplayoutcontrol&1) |
422 | 422 | { |
r17988 | r17989 | |
430 | 430 | m_tx_tilemap->draw(m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2); |
431 | 431 | |
432 | 432 | if (rot_pri == 1) |
433 | draw_roz( | |
433 | draw_roz( | |
434 | 434 | else if (scr_pri == 1) |
435 | 435 | if (m_tilemaplayoutcontrol&1) |
436 | 436 | { |
r17988 | r17989 | |
444 | 444 | m_tx_tilemap->draw(m_temp_bitmap_tilemaps, cliprect, 0, 1 << 2); |
445 | 445 | |
446 | 446 | if (rot_pri == 2) |
447 | draw_roz( | |
447 | draw_roz( | |
448 | 448 | else if (scr_pri == 2) |
449 | 449 | if (m_tilemaplayoutcontrol&1) |
450 | 450 | { |
r17988 | r17989 | |
465 | 465 | int xx, yy; |
466 | 466 | int width = screen.width(); |
467 | 467 | int height = screen.height(); |
468 | const pen_t *paldata = | |
468 | const pen_t *paldata = | |
469 | 469 | |
470 | 470 | UINT16* srcptr_tile; |
471 | 471 | UINT8* srcptr_tilepri; |
r17988 | r17989 | |
479 | 479 | for (yy=0;yy<height;yy++) |
480 | 480 | { |
481 | 481 | srcptr_tile = &m_temp_bitmap_tilemaps.pix16(yy); |
482 | srcptr_tilepri = & | |
482 | srcptr_tilepri = & | |
483 | 483 | srcptr_spri = &m_temp_bitmap_sprites.pix16(yy); |
484 | 484 | //srcptr_spripri = &m_temp_bitmap_sprites_pri.pix8(yy); |
485 | 485 | dstptr_bitmap = &bitmap.pix32(yy); |
r17988 | r17989 | |
568 | 568 | } |
569 | 569 | else if (primask == 0xc0) |
570 | 570 | { |
571 | dstptr_bitmap[xx] = paldata[ | |
571 | dstptr_bitmap[xx] = paldata[ | |
572 | 572 | } |
573 | 573 | else if (primask == 0xf0) |
574 | 574 | { |
r17988 | r17989 | |
652 | 652 | } |
653 | 653 | else if (src_tilepri==0x06) |
654 | 654 | { |
655 | //dstptr_bitmap[xx] = paldata[ | |
655 | //dstptr_bitmap[xx] = paldata[ | |
656 | 656 | dstptr_bitmap[xx] = paldata[src_tile]; // assumed |
657 | 657 | } |
658 | 658 | else if (src_tilepri==0x07) |
659 | 659 | { |
660 | //dstptr_bitmap[xx] = paldata[ | |
660 | //dstptr_bitmap[xx] = paldata[ | |
661 | 661 | dstptr_bitmap[xx] = paldata[src_tile]; // assumed |
662 | 662 | } |
663 | 663 | } |
r17988 | r17989 | |
---|---|---|
62 | 62 | |
63 | 63 | UINT32 darkseal_state::screen_update_darkseal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
64 | 64 | { |
65 | | |
65 | | |
66 | 66 | |
67 | bitmap.fill(get_black_pen( | |
67 | bitmap.fill(get_black_pen( | |
68 | 68 | |
69 | 69 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf1_rowscroll); |
70 | 70 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf3_rowscroll); |
r17988 | r17989 | |
73 | 73 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
74 | 74 | |
75 | 75 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
76 | | |
76 | | |
77 | 77 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
78 | 78 | |
79 | 79 | return 0; |
r17988 | r17989 | |
---|---|---|
412 | 412 | bitmap.fill(0, cliprect); |
413 | 413 | draw_stars(this, bitmap,cliprect); |
414 | 414 | draw_chars(this, bitmap); |
415 | draw_sprites(screen.machine(),this, bitmap); | |
416 | do_pen_lookup(screen.machine(), this, bitmap, cliprect); | |
415 | draw_sprites(machine(),this, bitmap); | |
416 | do_pen_lookup(machine(), this, bitmap, cliprect); | |
417 | 417 | |
418 | 418 | return 0; |
419 | 419 | } |
r17988 | r17989 | |
---|---|---|
130 | 130 | |
131 | 131 | color = ((attr & 0x00f0) >> 4) | 0x80; |
132 | 132 | |
133 | drawgfx_transpen_raw(m_tile_bitmap_bg, cliprect, | |
133 | drawgfx_transpen_raw(m_tile_bitmap_bg, cliprect, | |
134 | 134 | code, |
135 | | |
135 | | |
136 | 136 | 0, 0, |
137 | 137 | 16 * sx, 8 * sy, |
138 | 138 | (UINT32)-1); |
r17988 | r17989 | |
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
148 | if (draw_sprites( | |
148 | if (draw_sprites( | |
149 | 149 | { |
150 | 150 | /* kludge: draw table bg gfx again if priority 0 sprites are enabled */ |
151 | 151 | for (sx = sy = offs = 0; offs < 0x4000 / 2; offs++) |
r17988 | r17989 | |
157 | 157 | |
158 | 158 | color = ((attr & 0x00f0) >> 4) | 0x80; |
159 | 159 | |
160 | drawgfx_transpen_raw(m_tile_bitmap_bg, cliprect, | |
160 | drawgfx_transpen_raw(m_tile_bitmap_bg, cliprect, | |
161 | 161 | code, |
162 | | |
162 | | |
163 | 163 | 0, 0, |
164 | 164 | 16 * sx, 8 * sy, |
165 | 165 | 0); |
r17988 | r17989 | |
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | draw_sprites( | |
176 | draw_sprites( | |
177 | 177 | |
178 | 178 | /* draw table fg gfx */ |
179 | 179 | for (sx = sy = offs = 0; offs < 0x4000 / 2; offs++) |
r17988 | r17989 | |
191 | 191 | else |
192 | 192 | color |= 0x0080; |
193 | 193 | |
194 | drawgfx_transpen_raw(m_tile_bitmap_fg, cliprect, | |
194 | drawgfx_transpen_raw(m_tile_bitmap_fg, cliprect, | |
195 | 195 | code, |
196 | | |
196 | | |
197 | 197 | 0, 0, |
198 | 198 | 16 * sx, 8 * sy, |
199 | 199 | 0); |
r17988 | r17989 | |
206 | 206 | } |
207 | 207 | } |
208 | 208 | |
209 | draw_sprites(screen.machine(), m_tile_bitmap_fg, cliprect, 2); | |
210 | draw_sprites(screen.machine(), m_tile_bitmap_fg, cliprect, 3); | |
209 | draw_sprites(machine(), m_tile_bitmap_fg, cliprect, 2); | |
210 | draw_sprites(machine(), m_tile_bitmap_fg, cliprect, 3); | |
211 | 211 | |
212 | 212 | /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ |
213 | blendbitmaps( | |
213 | blendbitmaps( | |
214 | 214 | return 0; |
215 | 215 | } |
r17988 | r17989 | |
---|---|---|
142 | 142 | m_bg_tilemap->set_scrolly(col, m_row_scroll[col]); |
143 | 143 | |
144 | 144 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
615 | 615 | int offset_bg0x = 187; |
616 | 616 | int offset_bg0y = 0; |
617 | 617 | |
618 | bitmap.fill(get_black_pen( | |
618 | bitmap.fill(get_black_pen( | |
619 | 619 | |
620 | 620 | // start the sprites drawing |
621 | 621 | m_sprites->draw_async(cliprect); |
r17988 | r17989 | |
664 | 664 | { |
665 | 665 | UINT16 *dest = &bitmap.pix(y); |
666 | 666 | UINT16 *src = &sprites.pix(y); |
667 | // UINT8 *pri = & | |
667 | // UINT8 *pri = & | |
668 | 668 | for (int x = rect->min_x; x <= rect->max_x; x++) |
669 | 669 | { |
670 | 670 | // only process written pixels |
r17988 | r17989 | |
677 | 677 | { |
678 | 678 | // if the color is set to maximum, shadow pixels underneath us |
679 | 679 | if ((pix & 0x03f0) == 0x03f0) |
680 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
680 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
681 | 681 | |
682 | 682 | // otherwise, just add in sprite palette base |
683 | 683 | else |
r17988 | r17989 | |
703 | 703 | int offset_bg0x = 5; |
704 | 704 | int offset_bg0y = 32; |
705 | 705 | |
706 | bitmap.fill(get_black_pen( | |
706 | bitmap.fill(get_black_pen( | |
707 | 707 | |
708 | 708 | // start the sprites drawing |
709 | 709 | m_sprites->draw_async(cliprect); |
r17988 | r17989 | |
735 | 735 | { |
736 | 736 | UINT16 *dest = &bitmap.pix(y); |
737 | 737 | UINT16 *src = &sprites.pix(y); |
738 | // UINT8 *pri = & | |
738 | // UINT8 *pri = & | |
739 | 739 | for (int x = rect->min_x; x <= rect->max_x; x++) |
740 | 740 | { |
741 | 741 | // only process written pixels |
r17988 | r17989 | |
748 | 748 | { |
749 | 749 | // if the color is set to maximum, shadow pixels underneath us |
750 | 750 | if ((pix & 0x03f0) == 0x03f0) |
751 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
751 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
752 | 752 | |
753 | 753 | // otherwise, just add in sprite palette base |
754 | 754 | else |
r17988 | r17989 | |
777 | 777 | // start the sprites drawing |
778 | 778 | m_sprites->draw_async(cliprect); |
779 | 779 | |
780 | update_page( | |
780 | update_page( | |
781 | 781 | |
782 | | |
782 | | |
783 | 783 | |
784 | 784 | m_background->set_scrollx(0, -320 - m_bg_scrollx); |
785 | 785 | m_background->set_scrolly(0, -256 + m_bg_scrolly + m_back_yscroll); |
r17988 | r17989 | |
805 | 805 | |
806 | 806 | m_text_layer->draw(bitmap, cliprect, 0, 0xf); |
807 | 807 | |
808 | //draw_sprites( | |
808 | //draw_sprites( | |
809 | 809 | |
810 | 810 | |
811 | 811 | // mix in sprites |
r17988 | r17989 | |
815 | 815 | { |
816 | 816 | UINT16 *dest = &bitmap.pix(y); |
817 | 817 | UINT16 *src = &sprites.pix(y); |
818 | // UINT8 *pri = & | |
818 | // UINT8 *pri = & | |
819 | 819 | for (int x = rect->min_x; x <= rect->max_x; x++) |
820 | 820 | { |
821 | 821 | // only process written pixels |
r17988 | r17989 | |
828 | 828 | { |
829 | 829 | // if the color is set to maximum, shadow pixels underneath us |
830 | 830 | if ((pix & 0x03f0) == 0x03f0) |
831 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
831 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
832 | 832 | |
833 | 833 | // otherwise, just add in sprite palette base |
834 | 834 | else |
r17988 | r17989 | |
847 | 847 | |
848 | 848 | if (!m_refreshenable) |
849 | 849 | { |
850 | bitmap.fill(get_black_pen( | |
850 | bitmap.fill(get_black_pen( | |
851 | 851 | return 0; |
852 | 852 | } |
853 | 853 | |
854 | 854 | // start the sprites drawing |
855 | 855 | m_sprites->draw_async(cliprect); |
856 | 856 | |
857 | update_page( | |
857 | update_page( | |
858 | 858 | |
859 | | |
859 | | |
860 | 860 | |
861 | 861 | bitmap.fill(0, cliprect); |
862 | 862 | |
r17988 | r17989 | |
879 | 879 | { |
880 | 880 | UINT16 *dest = &bitmap.pix(y); |
881 | 881 | UINT16 *src = &sprites.pix(y); |
882 | // UINT8 *pri = & | |
882 | // UINT8 *pri = & | |
883 | 883 | for (int x = rect->min_x; x <= rect->max_x; x++) |
884 | 884 | { |
885 | 885 | // only process written pixels |
r17988 | r17989 | |
892 | 892 | { |
893 | 893 | // if the color is set to maximum, shadow pixels underneath us |
894 | 894 | if ((pix & 0x03f0) == 0x03f0) |
895 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
895 | dest[x] += (m_paletteram[dest[x]] & 0x8000) ? | |
896 | 896 | |
897 | 897 | // otherwise, just add in sprite palette base |
898 | 898 | else |
r17988 | r17989 | |
---|---|---|
373 | 373 | bg_scrollx = m_textram[m_bg_scrollx_reg] - m_bg_scrollx_offs; |
374 | 374 | bg_scrolly = (m_textram[m_bg_scrolly_reg] & 0xff) - m_bg_scrolly_offs; |
375 | 375 | page = m_textram[m_bg_page_reg]; |
376 | set_bg_page(screen.machine(), 3, (page >>12) & 0x0f); | |
377 | set_bg_page(screen.machine(), 2, (page >> 8) & 0x0f); | |
378 | set_bg_page(screen.machine(), 1, (page >> 4) & 0x0f); | |
379 | set_bg_page(screen.machine(), 0, (page >> 0) & 0x0f); | |
376 | set_bg_page(machine(), 3, (page >>12) & 0x0f); | |
377 | set_bg_page(machine(), 2, (page >> 8) & 0x0f); | |
378 | set_bg_page(machine(), 1, (page >> 4) & 0x0f); | |
379 | set_bg_page(machine(), 0, (page >> 0) & 0x0f); | |
380 | 380 | |
381 | 381 | fg_scrollx = m_textram[m_fg_scrollx_reg] - m_fg_scrollx_offs; |
382 | 382 | fg_scrolly = (m_textram[m_fg_scrolly_reg] & 0xff) - m_fg_scrolly_offs; |
383 | 383 | page = m_textram[m_fg_page_reg]; |
384 | set_fg_page(screen.machine(), 3, (page >>12) & 0x0f); | |
385 | set_fg_page(screen.machine(), 2, (page >> 8) & 0x0f); | |
386 | set_fg_page(screen.machine(), 1, (page >> 4) & 0x0f); | |
387 | set_fg_page(screen.machine(), 0, (page >> 0) & 0x0f); | |
384 | set_fg_page(machine(), 3, (page >>12) & 0x0f); | |
385 | set_fg_page(machine(), 2, (page >> 8) & 0x0f); | |
386 | set_fg_page(machine(), 1, (page >> 4) & 0x0f); | |
387 | set_fg_page(machine(), 0, (page >> 0) & 0x0f); | |
388 | 388 | |
389 | 389 | m_bg_tilemap->set_scrollx(0, bg_scrollx & 0x1ff); |
390 | 390 | m_bg_tilemap->set_scrolly(0, bg_scrolly & 0x0ff); |
391 | 391 | m_fg_tilemap->set_scrollx(0, fg_scrollx & 0x1ff); |
392 | 392 | m_fg_tilemap->set_scrolly(0, fg_scrolly & 0x0ff); |
393 | 393 | |
394 | | |
394 | | |
395 | 395 | |
396 | 396 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
397 | 397 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
398 | 398 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
399 | 399 | |
400 | draw_sprites( | |
400 | draw_sprites( | |
401 | 401 | return 0; |
402 | 402 | } |
r17988 | r17989 | |
---|---|---|
188 | 188 | pen_t pens[NUM_CHARMAP_PENS + NUM_BITMAP_PENS + 1]; |
189 | 189 | offs_t offs; |
190 | 190 | |
191 | get_pens( | |
191 | get_pens( | |
192 | 192 | |
193 | 193 | for (offs = 0; offs < 0x2000; offs++) |
194 | 194 | { |
r17988 | r17989 | |
260 | 260 | pen_t pens[NUM_CHARMAP_PENS + NUM_BITMAP_PENS + 1]; |
261 | 261 | offs_t offs; |
262 | 262 | |
263 | get_pens( | |
263 | get_pens( | |
264 | 264 | |
265 | 265 | for (offs = 0; offs < 0x2000; offs++) |
266 | 266 | { |
r17988 | r17989 | |
334 | 334 | pen_t pens[NUM_CHARMAP_PENS + NUM_BITMAP_PENS + 1]; |
335 | 335 | offs_t offs; |
336 | 336 | |
337 | get_panther_pens( | |
337 | get_panther_pens( | |
338 | 338 | |
339 | 339 | for (offs = 0; offs < 0x2000; offs++) |
340 | 340 | { |
r17988 | r17989 | |
---|---|---|
278 | 278 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
279 | 279 | |
280 | 280 | /* draw the sprites */ |
281 | mcr3_update_sprites( | |
281 | mcr3_update_sprites( | |
282 | 282 | return 0; |
283 | 283 | } |
284 | 284 | |
r17988 | r17989 | |
292 | 292 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
293 | 293 | |
294 | 294 | /* draw the sprites */ |
295 | mcr3_update_sprites( | |
295 | mcr3_update_sprites( | |
296 | 296 | |
297 | 297 | /* render any characters on top */ |
298 | 298 | m_alpha_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
21 | 21 | |
22 | 22 | UINT32 stadhero_state::screen_update_stadhero(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
23 | 23 | { |
24 | // | |
24 | // | |
25 | 25 | |
26 | screen.machine().device<deco_bac06_device>("tilegen1")->set_bppmultmask(0x8, 0x7); | |
27 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
28 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f); | |
26 | machine().device<deco_bac06_device>("tilegen1")->set_bppmultmask(0x8, 0x7); | |
27 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
28 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f); | |
29 | 29 | m_pf1_tilemap->draw(bitmap, cliprect, 0,0); |
30 | 30 | return 0; |
31 | 31 | } |
r17988 | r17989 | |
---|---|---|
161 | 161 | { |
162 | 162 | |
163 | 163 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
164 | draw_sprites( | |
164 | draw_sprites( | |
165 | 165 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
166 | draw_sprites( | |
166 | draw_sprites( | |
167 | 167 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
168 | 168 | return 0; |
169 | 169 | } |
r17988 | r17989 | |
---|---|---|
139 | 139 | |
140 | 140 | konami_sortlayers3(layer, m_layerpri); |
141 | 141 | |
142 | | |
142 | | |
143 | 143 | bitmap.fill(16 * bg_colorbase, cliprect); |
144 | 144 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[0], 0, 1); |
145 | 145 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
222 | 222 | m_bg0_tilemap->set_scrollx(0, m_scrollx ); |
223 | 223 | |
224 | 224 | m_bg0_tilemap->draw(bitmap, cliprect, 0,0); |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | m_fg0_tilemap->draw(bitmap, cliprect, 0,0); |
227 | 227 | |
228 | 228 | return 0; |
r17988 | r17989 | |
---|---|---|
503 | 503 | rectangle clip = cliprect; |
504 | 504 | clip.max_y = 127; |
505 | 505 | m_bg_tilemap->draw(bitmap, clip, 0,0); |
506 | draw_road(screen.machine(), bitmap); | |
507 | draw_sprites(screen.machine(), bitmap,cliprect); | |
506 | draw_road(machine(), bitmap); | |
507 | draw_sprites(machine(), bitmap,cliprect); | |
508 | 508 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
509 | 509 | return 0; |
510 | 510 | } |
r17988 | r17989 | |
---|---|---|
29 | 29 | |
30 | 30 | /* Draw playfield */ |
31 | 31 | //m_flipscreen = m_control_2[0] & 0x80; |
32 | // | |
32 | // | |
33 | 33 | |
34 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
35 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f); | |
36 | screen.machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
34 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
35 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f); | |
36 | machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
37 | 37 | |
38 | 38 | return 0; |
39 | 39 | } |
r17988 | r17989 | |
---|---|---|
367 | 367 | |
368 | 368 | UINT32 taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
369 | 369 | { |
370 | address_space &space = | |
370 | address_space &space = | |
371 | 371 | UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0); |
372 | 372 | |
373 | 373 | if ((video_control & 0x20) == 0) |
r17988 | r17989 | |
379 | 379 | /* Draw playfields */ |
380 | 380 | tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 0, 1); |
381 | 381 | |
382 | draw_framebuffer( | |
382 | draw_framebuffer( | |
383 | 383 | |
384 | 384 | tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 1, 0); |
385 | 385 | |
r17988 | r17989 | |
392 | 392 | copyscrollbitmap_trans(bitmap, *m_pixel_bitmap, 1, &scrollx, 1, &scrolly, cliprect, m_b_fg_color_base * 16); |
393 | 393 | } |
394 | 394 | |
395 | draw_framebuffer( | |
395 | draw_framebuffer( | |
396 | 396 | |
397 | 397 | tc0180vcu_tilemap_draw(m_tc0180vcu, bitmap, cliprect, 2, 0); |
398 | 398 | |
r17988 | r17989 | |
403 | 403 | |
404 | 404 | UINT32 taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
405 | 405 | { |
406 | address_space &space = screen.machine().driver_data()->generic_space(); | |
407 | const rgb_t *palette = palette_entry_list_adjusted(screen.machine().palette); | |
406 | address_space &space = machine().driver_data()->generic_space(); | |
407 | const rgb_t *palette = palette_entry_list_adjusted(machine().palette); | |
408 | 408 | UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0); |
409 | 409 | int x, y; |
410 | 410 | |
r17988 | r17989 | |
418 | 418 | /* Draw the palettized playfields to an indexed bitmap */ |
419 | 419 | tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 0, 1); |
420 | 420 | |
421 | draw_framebuffer( | |
421 | draw_framebuffer( | |
422 | 422 | |
423 | 423 | tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 1, 0); |
424 | 424 | |
425 | 425 | if (m_realpunc_video_ctrl & 0x0001) |
426 | draw_framebuffer( | |
426 | draw_framebuffer( | |
427 | 427 | |
428 | 428 | /* Copy the intermediate bitmap to the output bitmap, applying the palette */ |
429 | 429 | for (y = 0; y <= cliprect.max_y; y++) |
r17988 | r17989 | |
433 | 433 | /* Draw the 15bpp raw CRTC frame buffer directly to the output bitmap */ |
434 | 434 | if (m_realpunc_video_ctrl & 0x0002) |
435 | 435 | { |
436 | device_t *hd63484 = | |
436 | device_t *hd63484 = | |
437 | 437 | |
438 | 438 | int base = (hd63484_regs_r(hd63484, space, 0xcc/2, 0xffff) << 16) + hd63484_regs_r(hd63484, space, 0xce/2, 0xffff); |
439 | 439 | int stride = hd63484_regs_r(hd63484, space, 0xca/2, 0xffff); |
r17988 | r17989 | |
474 | 474 | m_realpunc_bitmap->fill(0, cliprect); |
475 | 475 | |
476 | 476 | if (!(m_realpunc_video_ctrl & 0x0001)) |
477 | draw_framebuffer( | |
477 | draw_framebuffer( | |
478 | 478 | |
479 | 479 | tc0180vcu_tilemap_draw(m_tc0180vcu, *m_realpunc_bitmap, cliprect, 2, 0); |
480 | 480 | |
r17988 | r17989 | |
498 | 498 | // rising edge |
499 | 499 | if (state) |
500 | 500 | { |
501 | address_space &space = | |
501 | address_space &space = | |
502 | 502 | UINT8 video_control = tc0180vcu_get_videoctrl(m_tc0180vcu, space, 0); |
503 | 503 | UINT8 framebuffer_page = tc0180vcu_get_fb_page(m_tc0180vcu, space, 0); |
504 | 504 | |
505 | 505 | if (~video_control & 0x01) |
506 | m_framebuffer[framebuffer_page]->fill(0, | |
506 | m_framebuffer[framebuffer_page]->fill(0, | |
507 | 507 | |
508 | 508 | if (~video_control & 0x80) |
509 | 509 | { |
r17988 | r17989 | |
511 | 511 | tc0180vcu_set_fb_page(m_tc0180vcu, space, 0, framebuffer_page); |
512 | 512 | } |
513 | 513 | |
514 | draw_sprites( | |
514 | draw_sprites( | |
515 | 515 | } |
516 | 516 | } |
r17988 | r17989 | |
---|---|---|
1474 | 1474 | double delta; |
1475 | 1475 | delta = 1; |
1476 | 1476 | |
1477 | if( | |
1477 | if( | |
1478 | 1478 | mod = 1; |
1479 | 1479 | view->vxx -= delta; |
1480 | 1480 | } |
1481 | if( | |
1481 | if( | |
1482 | 1482 | mod = 1; |
1483 | 1483 | view->vxx += delta; |
1484 | 1484 | } |
1485 | if( | |
1485 | if( | |
1486 | 1486 | mod = 1; |
1487 | 1487 | view->vyy -= delta; |
1488 | 1488 | } |
1489 | if( | |
1489 | if( | |
1490 | 1490 | mod = 1; |
1491 | 1491 | view->vyy += delta; |
1492 | 1492 | } |
1493 | if( | |
1493 | if( | |
1494 | 1494 | mod = 1; |
1495 | 1495 | view->vzz -= delta; |
1496 | 1496 | } |
1497 | if( | |
1497 | if( | |
1498 | 1498 | mod = 1; |
1499 | 1499 | view->vzz += delta; |
1500 | 1500 | } |
1501 | if( | |
1501 | if( | |
1502 | 1502 | mod = 1; |
1503 | 1503 | view->ayy -= 0.05; |
1504 | 1504 | } |
1505 | if( | |
1505 | if( | |
1506 | 1506 | mod = 1; |
1507 | 1507 | view->ayy += 0.05; |
1508 | 1508 | } |
r17988 | r17989 | |
1514 | 1514 | view->ayyc = cos(view->ayy); |
1515 | 1515 | view->ayys = sin(view->ayy); |
1516 | 1516 | |
1517 | screen.machine().priority_bitmap.fill(0); | |
1518 | bitmap.fill(screen.machine().pens[0], cliprect); | |
1517 | machine().priority_bitmap.fill(0); | |
1518 | bitmap.fill(machine().pens[0], cliprect); | |
1519 | 1519 | |
1520 | segas24_tile *tile = | |
1520 | segas24_tile *tile = | |
1521 | 1521 | tile->draw(bitmap, cliprect, 6, 0, 0); |
1522 | 1522 | tile->draw(bitmap, cliprect, 4, 0, 0); |
1523 | 1523 | tile->draw(bitmap, cliprect, 2, 0, 0); |
1524 | 1524 | tile->draw(bitmap, cliprect, 0, 0, 0); |
1525 | 1525 | |
1526 | tgp_render( | |
1526 | tgp_render( | |
1527 | 1527 | |
1528 | 1528 | tile->draw(bitmap, cliprect, 7, 0, 0); |
1529 | 1529 | tile->draw(bitmap, cliprect, 5, 0, 0); |
r17988 | r17989 | |
1538 | 1538 | // on rising edge |
1539 | 1539 | if (state) |
1540 | 1540 | { |
1541 | tgp_scan(screen.machine()); | |
1542 | end_frame(screen.machine()); | |
1541 | tgp_scan(machine()); | |
1542 | end_frame(machine()); | |
1543 | 1543 | LOG_TGP(("TGP: vsync\n")); |
1544 | 1544 | } |
1545 | 1545 | } |
r17988 | r17989 | |
---|---|---|
176 | 176 | |
177 | 177 | UINT32 tank8_state::screen_update_tank8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
178 | 178 | { |
179 | set_pens(this, | |
179 | set_pens(this, | |
180 | 180 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
181 | 181 | |
182 | draw_sprites(screen.machine(), bitmap, cliprect); | |
183 | draw_bullets(screen.machine(), bitmap, cliprect); | |
182 | draw_sprites(machine(), bitmap, cliprect); | |
183 | draw_bullets(machine(), bitmap, cliprect); | |
184 | 184 | return 0; |
185 | 185 | } |
186 | 186 | |
r17988 | r17989 | |
192 | 192 | { |
193 | 193 | int x; |
194 | 194 | int y; |
195 | const rectangle &visarea = | |
195 | const rectangle &visarea = | |
196 | 196 | |
197 | 197 | m_tilemap->draw(m_helper1, visarea, 0, 0); |
198 | 198 | |
199 | 199 | m_helper2.fill(8, visarea); |
200 | 200 | m_helper3.fill(8, visarea); |
201 | 201 | |
202 | draw_sprites(screen.machine(), m_helper2, visarea); | |
203 | draw_bullets(screen.machine(), m_helper3, visarea); | |
202 | draw_sprites(machine(), m_helper2, visarea); | |
203 | draw_bullets(machine(), m_helper3, visarea); | |
204 | 204 | |
205 | 205 | for (y = visarea.min_y; y <= visarea.max_y; y++) |
206 | 206 | { |
r17988 | r17989 | |
210 | 210 | const UINT16* p2 = &m_helper2.pix16(y); |
211 | 211 | const UINT16* p3 = &m_helper3.pix16(y); |
212 | 212 | |
213 | if (y % 2 != | |
213 | if (y % 2 != | |
214 | 214 | continue; /* video display is interlaced */ |
215 | 215 | |
216 | 216 | for (x = visarea.min_x; x <= visarea.max_x; x++) |
r17988 | r17989 | |
269 | 269 | index |= 0x80; /* collision on right side */ |
270 | 270 | } |
271 | 271 | |
272 | | |
272 | | |
273 | 273 | |
274 | 274 | _state = 1; |
275 | 275 | } |
r17988 | r17989 | |
---|---|---|
225 | 225 | |
226 | 226 | UINT32 jackal_state::screen_update_jackal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
227 | 227 | { |
228 | set_pens(screen.machine()); | |
229 | draw_background(screen.machine(), bitmap, cliprect); | |
230 | draw_sprites(screen.machine(), bitmap, cliprect); | |
228 | set_pens(machine()); | |
229 | draw_background(machine(), bitmap, cliprect); | |
230 | draw_sprites(machine(), bitmap, cliprect); | |
231 | 231 | return 0; |
232 | 232 | } |
r17988 | r17989 | |
---|---|---|
434 | 434 | |
435 | 435 | #ifdef MAME_DEBUG |
436 | 436 | #if TILEMAPS |
437 | if ( | |
437 | if ( | |
438 | 438 | { |
439 | 439 | int max_tiles = memregion("gfx1")->bytes() / (0x400 * 0x20); |
440 | 440 | |
441 | if (screen.machine().input().code_pressed_once(KEYCODE_Q)) { m_page--; screen.machine().tilemap().mark_all_dirty(); } | |
442 | if (screen.machine().input().code_pressed_once(KEYCODE_W)) { m_page++; screen.machine().tilemap().mark_all_dirty(); } | |
443 | if (screen.machine().input().code_pressed_once(KEYCODE_E)) { m_tiles--; screen.machine().tilemap().mark_all_dirty(); } | |
444 | if (screen.machine().input().code_pressed_once(KEYCODE_R)) { m_tiles++; screen.machine().tilemap().mark_all_dirty(); } | |
445 | if (screen.machine().input().code_pressed_once(KEYCODE_A)) { m_trombank--; screen.machine().tilemap().mark_all_dirty(); } | |
446 | if (screen.machine().input().code_pressed_once(KEYCODE_S)) { m_trombank++; screen.machine().tilemap().mark_all_dirty(); } | |
441 | if (machine().input().code_pressed_once(KEYCODE_Q)) { m_page--; machine().tilemap().mark_all_dirty(); } | |
442 | if (machine().input().code_pressed_once(KEYCODE_W)) { m_page++; machine().tilemap().mark_all_dirty(); } | |
443 | if (machine().input().code_pressed_once(KEYCODE_E)) { m_tiles--; machine().tilemap().mark_all_dirty(); } | |
444 | if (machine().input().code_pressed_once(KEYCODE_R)) { m_tiles++; machine().tilemap().mark_all_dirty(); } | |
445 | if (machine().input().code_pressed_once(KEYCODE_A)) { m_trombank--; machine().tilemap().mark_all_dirty(); } | |
446 | if (machine().input().code_pressed_once(KEYCODE_S)) { m_trombank++; machine().tilemap().mark_all_dirty(); } | |
447 | 447 | |
448 | 448 | m_rombank &= 0xf; |
449 | 449 | m_page &= (m_text_dim > 0)?3:7; |
r17988 | r17989 | |
463 | 463 | #endif |
464 | 464 | #endif |
465 | 465 | { |
466 | draw_normal_sprites(screen.machine() ,bitmap,cliprect); | |
467 | draw_text_sprites(screen.machine(), bitmap,cliprect); | |
466 | draw_normal_sprites(machine() ,bitmap,cliprect); | |
467 | draw_text_sprites(machine(), bitmap,cliprect); | |
468 | 468 | } |
469 | 469 | return 0; |
470 | 470 | } |
r17988 | r17989 | |
---|---|---|
356 | 356 | /* flip screen is embedded in the sprite control registers */ |
357 | 357 | /* can't use flip_screen_set() because the visible area is asymmetrical */ |
358 | 358 | flip_screen_set_no_update(m_spriteram[0x07f6] & 1); |
359 | screen.machine().tilemap().set_flip_all(flip_screen() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); | |
360 | set_scroll(screen.machine(), 0); | |
361 | set_scroll(screen.machine(), 1); | |
362 | set_scroll(screen.machine(), 2); | |
363 | set_scroll(screen.machine(), 3); | |
359 | machine().tilemap().set_flip_all(flip_screen() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); | |
360 | set_scroll(machine(), 0); | |
361 | set_scroll(machine(), 1); | |
362 | set_scroll(machine(), 2); | |
363 | set_scroll(machine(), 3); | |
364 | 364 | |
365 | | |
365 | | |
366 | 366 | |
367 | bitmap.fill( | |
367 | bitmap.fill( | |
368 | 368 | |
369 | 369 | for (layer = 0;layer < 8;layer++) |
370 | 370 | { |
r17988 | r17989 | |
377 | 377 | } |
378 | 378 | } |
379 | 379 | |
380 | draw_sprites( | |
380 | draw_sprites( | |
381 | 381 | return 0; |
382 | 382 | } |
383 | 383 |
r17988 | r17989 | |
---|---|---|
52 | 52 | |
53 | 53 | UINT32 vaportra_state::screen_update_vaportra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
54 | 54 | { |
55 | address_space &space = | |
55 | address_space &space = | |
56 | 56 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
57 | 57 | int pri = m_priority[0] & 0x03; |
58 | 58 | |
r17988 | r17989 | |
60 | 60 | deco16ic_pf_update(m_deco_tilegen1, 0, 0); |
61 | 61 | deco16ic_pf_update(m_deco_tilegen2, 0, 0); |
62 | 62 | |
63 | | |
63 | | |
64 | 64 | |
65 | 65 | /* Draw playfields */ |
66 | 66 | if (pri == 0) |
67 | 67 | { |
68 | 68 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
69 | 69 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
70 | | |
70 | | |
71 | 71 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
72 | 72 | } |
73 | 73 | else if (pri == 1) |
74 | 74 | { |
75 | 75 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
76 | 76 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
77 | | |
77 | | |
78 | 78 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
79 | 79 | } |
80 | 80 | else if (pri == 2) |
81 | 81 | { |
82 | 82 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
83 | 83 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
84 | | |
84 | | |
85 | 85 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
86 | 86 | } |
87 | 87 | else |
88 | 88 | { |
89 | 89 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
90 | 90 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
91 | | |
91 | | |
92 | 92 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
93 | 93 | } |
94 | 94 | |
95 | | |
95 | | |
96 | 96 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
97 | 97 | return 0; |
98 | 98 | } |
r17988 | r17989 | |
---|---|---|
429 | 429 | start = (start + 1) & 0x03; |
430 | 430 | } |
431 | 431 | |
432 | draw_background(screen.machine(), bitmap, cliprect, m_btime_tilemap, 0); | |
433 | draw_chars(screen.machine(), bitmap, cliprect, TRUE, 0, -1); | |
432 | draw_background(machine(), bitmap, cliprect, m_btime_tilemap, 0); | |
433 | draw_chars(machine(), bitmap, cliprect, TRUE, 0, -1); | |
434 | 434 | } |
435 | 435 | else |
436 | draw_chars( | |
436 | draw_chars( | |
437 | 437 | |
438 | draw_sprites( | |
438 | draw_sprites( | |
439 | 439 | |
440 | 440 | return 0; |
441 | 441 | } |
r17988 | r17989 | |
443 | 443 | |
444 | 444 | UINT32 btime_state::screen_update_eggs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
445 | 445 | { |
446 | draw_chars(screen.machine(), bitmap, cliprect, FALSE, 0, -1); | |
447 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
446 | draw_chars(machine(), bitmap, cliprect, FALSE, 0, -1); | |
447 | draw_sprites(machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
448 | 448 | |
449 | 449 | return 0; |
450 | 450 | } |
r17988 | r17989 | |
452 | 452 | |
453 | 453 | UINT32 btime_state::screen_update_lnc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
454 | 454 | { |
455 | draw_chars(screen.machine(), bitmap, cliprect, FALSE, 0, -1); | |
456 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 1, 2, m_videoram, 0x20); | |
455 | draw_chars(machine(), bitmap, cliprect, FALSE, 0, -1); | |
456 | draw_sprites(machine(), bitmap, cliprect, 0, 1, 2, m_videoram, 0x20); | |
457 | 457 | |
458 | 458 | return 0; |
459 | 459 | } |
r17988 | r17989 | |
463 | 463 | { |
464 | 464 | if (m_bnj_scroll1 & 0x04) |
465 | 465 | { |
466 | draw_background(screen.machine(), bitmap, cliprect, m_zoar_scrollram, m_btime_palette); | |
467 | draw_chars(screen.machine(), bitmap, cliprect, TRUE, m_btime_palette + 1, -1); | |
466 | draw_background(machine(), bitmap, cliprect, m_zoar_scrollram, m_btime_palette); | |
467 | draw_chars(machine(), bitmap, cliprect, TRUE, m_btime_palette + 1, -1); | |
468 | 468 | } |
469 | 469 | else |
470 | draw_chars( | |
470 | draw_chars( | |
471 | 471 | |
472 | 472 | /* The order is important for correct priorities */ |
473 | draw_sprites(screen.machine(), bitmap, cliprect, m_btime_palette + 1, 1, 2, m_videoram + 0x1f, 0x20); | |
474 | draw_sprites(screen.machine(), bitmap, cliprect, m_btime_palette + 1, 1, 2, m_videoram, 0x20); | |
473 | draw_sprites(machine(), bitmap, cliprect, m_btime_palette + 1, 1, 2, m_videoram + 0x1f, 0x20); | |
474 | draw_sprites(machine(), bitmap, cliprect, m_btime_palette + 1, 1, 2, m_videoram, 0x20); | |
475 | 475 | |
476 | 476 | return 0; |
477 | 477 | } |
r17988 | r17989 | |
497 | 497 | sy = 256 - sy; |
498 | 498 | } |
499 | 499 | |
500 | drawgfx_opaque(*m_background_bitmap, m_background_bitmap->cliprect(), | |
500 | drawgfx_opaque(*m_background_bitmap, m_background_bitmap->cliprect(), | |
501 | 501 | (m_bnj_backgroundram[offs] >> 4) + ((offs & 0x80) >> 3) + 32, |
502 | 502 | 0, |
503 | 503 | flip_screen(), flip_screen(), |
r17988 | r17989 | |
512 | 512 | |
513 | 513 | /* copy the low priority characters followed by the sprites |
514 | 514 | then the high priority characters */ |
515 | draw_chars(screen.machine(), bitmap, cliprect, TRUE, 0, 1); | |
516 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
517 | draw_chars(screen.machine(), bitmap, cliprect, TRUE, 0, 0); | |
515 | draw_chars(machine(), bitmap, cliprect, TRUE, 0, 1); | |
516 | draw_sprites(machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
517 | draw_chars(machine(), bitmap, cliprect, TRUE, 0, 0); | |
518 | 518 | } |
519 | 519 | else |
520 | 520 | { |
521 | draw_chars(screen.machine(), bitmap, cliprect, FALSE, 0, -1); | |
522 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
521 | draw_chars(machine(), bitmap, cliprect, FALSE, 0, -1); | |
522 | draw_sprites(machine(), bitmap, cliprect, 0, 0, 0, m_videoram, 0x20); | |
523 | 523 | } |
524 | 524 | |
525 | 525 | return 0; |
r17988 | r17989 | |
543 | 543 | sy = 33 - sy; |
544 | 544 | } |
545 | 545 | |
546 | drawgfx_opaque(bitmap, cliprect, | |
546 | drawgfx_opaque(bitmap, cliprect, | |
547 | 547 | m_bnj_backgroundram[offs], |
548 | 548 | 0, |
549 | 549 | flip_screen(), flip_screen(), |
550 | 550 | 8*sx,8*sy); |
551 | 551 | } |
552 | 552 | |
553 | draw_chars(screen.machine(), bitmap, cliprect, TRUE, 0, -1); | |
554 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 1, 0, m_videoram, 0x20); | |
553 | draw_chars(machine(), bitmap, cliprect, TRUE, 0, -1); | |
554 | draw_sprites(machine(), bitmap, cliprect, 0, 1, 0, m_videoram, 0x20); | |
555 | 555 | |
556 | 556 | return 0; |
557 | 557 | } |
r17988 | r17989 | |
559 | 559 | |
560 | 560 | UINT32 btime_state::screen_update_disco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
561 | 561 | { |
562 | draw_chars(screen.machine(), bitmap, cliprect, FALSE, m_btime_palette, -1); | |
563 | draw_sprites(screen.machine(), bitmap, cliprect, m_btime_palette, 0, 0, m_spriteram, 1); | |
562 | draw_chars(machine(), bitmap, cliprect, FALSE, m_btime_palette, -1); | |
563 | draw_sprites(machine(), bitmap, cliprect, m_btime_palette, 0, 0, m_spriteram, 1); | |
564 | 564 | |
565 | 565 | return 0; |
566 | 566 | } |
r17988 | r17989 | |
---|---|---|
59 | 59 | |
60 | 60 | UINT32 qdrmfgp_state::screen_update_qdrmfgp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
61 | 61 | { |
62 | device_t *k056832 = screen.machine().device("k056832"); | |
63 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
62 | device_t *k056832 = machine().device("k056832"); | |
63 | bitmap.fill(get_black_pen(machine()), cliprect); | |
64 | 64 | |
65 | 65 | k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 1); |
66 | 66 | k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 2); |
r17988 | r17989 | |
---|---|---|
343 | 343 | { |
344 | 344 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
345 | 345 | |
346 | nova2001_draw_sprites( | |
346 | nova2001_draw_sprites( | |
347 | 347 | |
348 | 348 | // according to the schematics, fg category 0 should be drawn behind sprites, |
349 | 349 | // but it doesn't look right that way |
r17988 | r17989 | |
357 | 357 | { |
358 | 358 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
359 | 359 | |
360 | pkunwar_draw_sprites( | |
360 | pkunwar_draw_sprites( | |
361 | 361 | |
362 | 362 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
363 | 363 | |
r17988 | r17989 | |
370 | 370 | |
371 | 371 | m_fg_tilemap->draw(bitmap, cliprect, 1, 0); |
372 | 372 | |
373 | nova2001_draw_sprites( | |
373 | nova2001_draw_sprites( | |
374 | 374 | |
375 | 375 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
376 | 376 | |
r17988 | r17989 | |
381 | 381 | { |
382 | 382 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
383 | 383 | |
384 | pkunwar_draw_sprites( | |
384 | pkunwar_draw_sprites( | |
385 | 385 | |
386 | 386 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
387 | 387 |
r17988 | r17989 | |
---|---|---|
408 | 408 | /* Draw ship 1 */ |
409 | 409 | drawgfx_transpen(bitmap, |
410 | 410 | cliprect, |
411 | | |
411 | | |
412 | 412 | (m_s1_sprite&0x03)^0x03, |
413 | 413 | 0, |
414 | 414 | (m_s1_sprite&0x08)>>3, (m_s1_sprite&0x10)>>4, |
r17988 | r17989 | |
418 | 418 | /* Draw ship 2 */ |
419 | 419 | drawgfx_transpen(bitmap, |
420 | 420 | cliprect, |
421 | | |
421 | | |
422 | 422 | (m_s2_sprite&0x03)^0x03, |
423 | 423 | 0, |
424 | 424 | (m_s2_sprite&0x08)>>3, (m_s2_sprite&0x10)>>4, |
r17988 | r17989 | |
428 | 428 | /* Draw score/projectile 1 */ |
429 | 429 | drawgfx_transpen(bitmap, |
430 | 430 | cliprect, |
431 | | |
431 | | |
432 | 432 | (m_p1_sprite&0x03)^0x03, |
433 | 433 | 0, |
434 | 434 | 0,0, |
r17988 | r17989 | |
438 | 438 | /* Draw score/projectile 2 */ |
439 | 439 | drawgfx_transpen(bitmap, |
440 | 440 | cliprect, |
441 | | |
441 | | |
442 | 442 | (m_p2_sprite&0x03)^0x03, |
443 | 443 | 0, |
444 | 444 | 0,0, |
r17988 | r17989 | |
451 | 451 | m_collision_reg = 0x00; |
452 | 452 | |
453 | 453 | /* Check for collisions between ship1 and ship2 */ |
454 | if (collision_check_s1s2( | |
454 | if (collision_check_s1s2( | |
455 | 455 | { |
456 | 456 | m_collision_reg |= 0x08; |
457 | 457 | } |
458 | 458 | /* Check for collisions between ship1 and projectiles */ |
459 | if (collision_check_s1p1p2( | |
459 | if (collision_check_s1p1p2( | |
460 | 460 | { |
461 | 461 | m_collision_reg |= 0x02; |
462 | 462 | } |
463 | 463 | /* Check for collisions between ship1 and projectiles */ |
464 | if (collision_check_s2p1p2( | |
464 | if (collision_check_s2p1p2( | |
465 | 465 | { |
466 | 466 | m_collision_reg |= 0x01; |
467 | 467 | } |
468 | 468 | /* Check for collisions between ship1 and projectiles */ |
469 | 469 | /* Note: I don't think this is used by the game */ |
470 | if (collision_check_p1p2( | |
470 | if (collision_check_p1p2( | |
471 | 471 | { |
472 | 472 | m_collision_reg |= 0x04; |
473 | 473 | } |
r17988 | r17989 | |
---|---|---|
2800 | 2800 | layercontrol = m_cps_b_regs[m_game_config->layer_control / 2]; |
2801 | 2801 | |
2802 | 2802 | /* Get video memory base registers */ |
2803 | cps1_get_video_base( | |
2803 | cps1_get_video_base( | |
2804 | 2804 | |
2805 | 2805 | /* Find the offset of the last sprite in the sprite table */ |
2806 | cps1_find_last_sprite( | |
2806 | cps1_find_last_sprite( | |
2807 | 2807 | |
2808 | 2808 | if (m_cps_version == 2) |
2809 | 2809 | { |
2810 | cps2_find_last_sprite( | |
2810 | cps2_find_last_sprite( | |
2811 | 2811 | } |
2812 | 2812 | |
2813 | cps1_update_transmasks( | |
2813 | cps1_update_transmasks( | |
2814 | 2814 | |
2815 | 2815 | m_bg_tilemap[0]->set_scrollx(0, m_scroll1x); |
2816 | 2816 | m_bg_tilemap[0]->set_scrolly(0, m_scroll1y); |
r17988 | r17989 | |
2852 | 2852 | // Maybe Capcom changed the background handling due to the problems that |
2853 | 2853 | // it caused on several monitors (because the background extended into the |
2854 | 2854 | // blanking area instead of going black, causing the monitor to clip). |
2855 | bitmap.fill(get_black_pen( | |
2855 | bitmap.fill(get_black_pen( | |
2856 | 2856 | } |
2857 | 2857 | |
2858 | 2858 | cps1_render_stars(screen, bitmap, cliprect); |
r17988 | r17989 | |
2862 | 2862 | l1 = (layercontrol >> 0x08) & 03; |
2863 | 2863 | l2 = (layercontrol >> 0x0a) & 03; |
2864 | 2864 | l3 = (layercontrol >> 0x0c) & 03; |
2865 | | |
2865 | | |
2866 | 2866 | |
2867 | 2867 | if (m_cps_version == 1) |
2868 | 2868 | { |
2869 | cps1_render_layer( | |
2869 | cps1_render_layer( | |
2870 | 2870 | |
2871 | 2871 | if (l1 == 0) |
2872 | cps1_render_high_layer( | |
2872 | cps1_render_high_layer( | |
2873 | 2873 | |
2874 | cps1_render_layer( | |
2874 | cps1_render_layer( | |
2875 | 2875 | |
2876 | 2876 | if (l2 == 0) |
2877 | cps1_render_high_layer( | |
2877 | cps1_render_high_layer( | |
2878 | 2878 | |
2879 | cps1_render_layer( | |
2879 | cps1_render_layer( | |
2880 | 2880 | |
2881 | 2881 | if (l3 == 0) |
2882 | cps1_render_high_layer( | |
2882 | cps1_render_high_layer( | |
2883 | 2883 | |
2884 | cps1_render_layer( | |
2884 | cps1_render_layer( | |
2885 | 2885 | } |
2886 | 2886 | else |
2887 | 2887 | { |
r17988 | r17989 | |
2893 | 2893 | l3pri = (m_pri_ctrl >> 4 * l3) & 0x0f; |
2894 | 2894 | |
2895 | 2895 | #if 0 |
2896 | if ( (cps2_port(screen.machine(), CPS2_OBJ_BASE) != 0x7080 && cps2_port(screen.machine(), CPS2_OBJ_BASE) != 0x7000) || | |
2897 | cps2_port(screen.machine(), CPS2_OBJ_UK1) != 0x807d || | |
2898 | (cps2_port(screen.machine(), CPS2_OBJ_UK2) != 0x0000 && cps2_port(screen.machine(), CPS2_OBJ_UK2) != 0x1101 && cps2_port(screen.machine(), CPS2_OBJ_UK2) != 0x0001)) | |
2896 | if ( (cps2_port(machine(), CPS2_OBJ_BASE) != 0x7080 && cps2_port(machine(), CPS2_OBJ_BASE) != 0x7000) || | |
2897 | cps2_port(machine(), CPS2_OBJ_UK1) != 0x807d || | |
2898 | (cps2_port(machine(), CPS2_OBJ_UK2) != 0x0000 && cps2_port(machine(), CPS2_OBJ_UK2) != 0x1101 && cps2_port(machine(), CPS2_OBJ_UK2) != 0x0001)) | |
2899 | 2899 | popmessage("base %04x uk1 %04x uk2 %04x", |
2900 | cps2_port(screen.machine(), CPS2_OBJ_BASE), | |
2901 | cps2_port(screen.machine(), CPS2_OBJ_UK1), | |
2902 | cps2_port(screen.machine(), CPS2_OBJ_UK2)); | |
2900 | cps2_port(machine(), CPS2_OBJ_BASE), | |
2901 | cps2_port(machine(), CPS2_OBJ_UK1), | |
2902 | cps2_port(machine(), CPS2_OBJ_UK2)); | |
2903 | 2903 | |
2904 | if (0 && | |
2904 | if (0 && | |
2905 | 2905 | popmessage("order: %d (%d) %d (%d) %d (%d) %d (%d)",l0,l0pri,l1,l1pri,l2,l2pri,l3,l3pri); |
2906 | 2906 | #endif |
2907 | 2907 | |
r17988 | r17989 | |
2932 | 2932 | } |
2933 | 2933 | } |
2934 | 2934 | |
2935 | cps1_render_layer(screen.machine(), bitmap, cliprect, l0, 1); | |
2936 | cps1_render_layer(screen.machine(), bitmap, cliprect, l1, 2); | |
2937 | cps1_render_layer(screen.machine(), bitmap, cliprect, l2, 4); | |
2938 | cps2_render_sprites(screen.machine(), bitmap, cliprect, primasks); | |
2935 | cps1_render_layer(machine(), bitmap, cliprect, l0, 1); | |
2936 | cps1_render_layer(machine(), bitmap, cliprect, l1, 2); | |
2937 | cps1_render_layer(machine(), bitmap, cliprect, l2, 4); | |
2938 | cps2_render_sprites(machine(), bitmap, cliprect, primasks); | |
2939 | 2939 | } |
2940 | 2940 | |
2941 | 2941 | return 0; |
r17988 | r17989 | |
2948 | 2948 | { |
2949 | 2949 | |
2950 | 2950 | /* Get video memory base registers */ |
2951 | cps1_get_video_base( | |
2951 | cps1_get_video_base( | |
2952 | 2952 | |
2953 | 2953 | if (m_cps_version == 1) |
2954 | 2954 | { |
r17988 | r17989 | |
---|---|---|
206 | 206 | |
207 | 207 | //popmessage("%04X", *m_priorityram); |
208 | 208 | |
209 | | |
209 | | |
210 | 210 | |
211 | 211 | if ((*m_priorityram & 0x0c) == 4) |
212 | 212 | { |
r17988 | r17989 | |
223 | 223 | m_tilemap_0->draw(bitmap, cliprect, 0, 2); |
224 | 224 | } |
225 | 225 | |
226 | draw_sprites( | |
226 | draw_sprites( | |
227 | 227 | return 0; |
228 | 228 | } |
r17988 | r17989 | |
---|---|---|
204 | 204 | UINT32 wiz_state::screen_update_kungfut(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
205 | 205 | { |
206 | 206 | bitmap.fill(m_bgpen, cliprect); |
207 | draw_background(screen.machine(), bitmap, cliprect, 2 + m_char_bank[0] , 0); | |
208 | draw_foreground(screen.machine(), bitmap, cliprect, 0); | |
209 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram2, 4); | |
210 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram , 5); | |
207 | draw_background(machine(), bitmap, cliprect, 2 + m_char_bank[0] , 0); | |
208 | draw_foreground(machine(), bitmap, cliprect, 0); | |
209 | draw_sprites(machine(), bitmap, cliprect, m_spriteram2, 4); | |
210 | draw_sprites(machine(), bitmap, cliprect, m_spriteram , 5); | |
211 | 211 | return 0; |
212 | 212 | } |
213 | 213 | |
r17988 | r17989 | |
216 | 216 | int bank; |
217 | 217 | |
218 | 218 | bitmap.fill(m_bgpen, cliprect); |
219 | draw_background(screen.machine(), bitmap, cliprect, 2 + ((m_char_bank[0] << 1) | m_char_bank[1]), 0); | |
220 | draw_foreground(screen.machine(), bitmap, cliprect, 0); | |
219 | draw_background(machine(), bitmap, cliprect, 2 + ((m_char_bank[0] << 1) | m_char_bank[1]), 0); | |
220 | draw_foreground(machine(), bitmap, cliprect, 0); | |
221 | 221 | |
222 | 222 | const rectangle spritevisiblearea(2*8, 32*8-1, 2*8, 30*8-1); |
223 | 223 | const rectangle spritevisibleareaflipx(0*8, 30*8-1, 2*8, 30*8-1); |
r17988 | r17989 | |
225 | 225 | |
226 | 226 | bank = 7 + *m_sprite_bank; |
227 | 227 | |
228 | draw_sprites(screen.machine(), bitmap, visible_area, m_spriteram2, 6); | |
229 | draw_sprites(screen.machine(), bitmap, visible_area, m_spriteram , bank); | |
228 | draw_sprites(machine(), bitmap, visible_area, m_spriteram2, 6); | |
229 | draw_sprites(machine(), bitmap, visible_area, m_spriteram , bank); | |
230 | 230 | return 0; |
231 | 231 | } |
232 | 232 | |
r17988 | r17989 | |
234 | 234 | UINT32 wiz_state::screen_update_stinger(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
235 | 235 | { |
236 | 236 | bitmap.fill(m_bgpen, cliprect); |
237 | draw_background(screen.machine(), bitmap, cliprect, 2 + m_char_bank[0], 1); | |
238 | draw_foreground(screen.machine(), bitmap, cliprect, 1); | |
239 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram2, 4); | |
240 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram , 5); | |
237 | draw_background(machine(), bitmap, cliprect, 2 + m_char_bank[0], 1); | |
238 | draw_foreground(machine(), bitmap, cliprect, 1); | |
239 | draw_sprites(machine(), bitmap, cliprect, m_spriteram2, 4); | |
240 | draw_sprites(machine(), bitmap, cliprect, m_spriteram , 5); | |
241 | 241 | return 0; |
242 | 242 | } |
r17988 | r17989 | |
---|---|---|
386 | 386 | |
387 | 387 | update_beam(this); |
388 | 388 | draw_background(this, bitmap, cliprect); |
389 | update_artwork( | |
389 | update_artwork( | |
390 | 390 | |
391 | 391 | m_frame_count = (m_frame_count + 1) & 0x0f; |
392 | 392 |
r17988 | r17989 | |
---|---|---|
226 | 226 | |
227 | 227 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
228 | 228 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
229 | draw_sprites( | |
229 | draw_sprites( | |
230 | 230 | return 0; |
231 | 231 | } |
232 | 232 | |
r17988 | r17989 | |
257 | 257 | // rising edge |
258 | 258 | if (state) |
259 | 259 | { |
260 | const rectangle &visarea = | |
260 | const rectangle &visarea = | |
261 | 261 | UINT8 *spriteram = m_spriteram; |
262 | 262 | |
263 | 263 | int offs, offs2; |
r17988 | r17989 | |
302 | 302 | |
303 | 303 | rect.min_x = sx; |
304 | 304 | rect.min_y = sy; |
305 | rect.max_x = sx + screen.machine().gfx[1]->width() - 1; | |
306 | rect.max_y = sy + screen.machine().gfx[1]->height() - 1; | |
305 | rect.max_x = sx + machine().gfx[1]->width() - 1; | |
306 | rect.max_y = sy + machine().gfx[1]->height() - 1; | |
307 | 307 | |
308 | 308 | rect &= visarea; |
309 | 309 | |
r17988 | r17989 | |
314 | 314 | |
315 | 315 | m_bg_tilemap->draw(m_helper, rect, 0, 0); |
316 | 316 | |
317 | drawgfx_transpen(m_helper2, rect, | |
317 | drawgfx_transpen(m_helper2, rect, | |
318 | 318 | |
319 | m_coll_bit2 |= collision_check( | |
319 | m_coll_bit2 |= collision_check( | |
320 | 320 | |
321 | 321 | // check collision sprite - foreground |
322 | 322 | |
r17988 | r17989 | |
325 | 325 | |
326 | 326 | m_fg_tilemap->draw(m_helper, rect, 0, 0); |
327 | 327 | |
328 | drawgfx_transpen(m_helper2, rect, | |
328 | drawgfx_transpen(m_helper2, rect, | |
329 | 329 | |
330 | m_coll_bit1 |= collision_check( | |
330 | m_coll_bit1 |= collision_check( | |
331 | 331 | |
332 | 332 | // check collision sprite - sprite |
333 | 333 | |
r17988 | r17989 | |
363 | 363 | sy2 = 240 - sy2; |
364 | 364 | } |
365 | 365 | |
366 | drawgfx_transpen(m_helper, rect, | |
366 | drawgfx_transpen(m_helper, rect, | |
367 | 367 | } |
368 | 368 | |
369 | drawgfx_transpen(m_helper2, rect, | |
369 | drawgfx_transpen(m_helper2, rect, | |
370 | 370 | |
371 | m_coll_bit0 |= collision_check( | |
371 | m_coll_bit0 |= collision_check( | |
372 | 372 | } |
373 | 373 | |
374 | 374 | // check for bit 3 (sprite-sprite) |
r17988 | r17989 | |
405 | 405 | |
406 | 406 | rect.min_x = sx; |
407 | 407 | rect.min_y = sy; |
408 | rect.max_x = sx + screen.machine().gfx[1]->width() - 1; | |
409 | rect.max_y = sy + screen.machine().gfx[1]->height() - 1; | |
408 | rect.max_x = sx + machine().gfx[1]->width() - 1; | |
409 | rect.max_y = sy + machine().gfx[1]->height() - 1; | |
410 | 410 | |
411 | 411 | rect &= visarea; |
412 | 412 | |
r17988 | r17989 | |
444 | 444 | sy2 = 240 - sy2; |
445 | 445 | } |
446 | 446 | |
447 | drawgfx_transpen(m_helper, rect, | |
447 | drawgfx_transpen(m_helper, rect, | |
448 | 448 | } |
449 | 449 | |
450 | drawgfx_transpen(m_helper2, rect, | |
450 | drawgfx_transpen(m_helper2, rect, | |
451 | 451 | |
452 | m_coll_bit3 |= collision_check( | |
452 | m_coll_bit3 |= collision_check( | |
453 | 453 | } |
454 | 454 | |
455 | 455 | // check for bit 6 |
r17988 | r17989 | |
486 | 486 | |
487 | 487 | rect.min_x = sx; |
488 | 488 | rect.min_y = sy; |
489 | rect.max_x = sx + screen.machine().gfx[1]->width() - 1; | |
490 | rect.max_y = sy + screen.machine().gfx[1]->height() - 1; | |
489 | rect.max_x = sx + machine().gfx[1]->width() - 1; | |
490 | rect.max_y = sy + machine().gfx[1]->height() - 1; | |
491 | 491 | |
492 | 492 | rect &= visarea; |
493 | 493 | |
r17988 | r17989 | |
525 | 525 | sy2 = 240 - sy2; |
526 | 526 | } |
527 | 527 | |
528 | drawgfx_transpen(m_helper, rect, | |
528 | drawgfx_transpen(m_helper, rect, | |
529 | 529 | } |
530 | 530 | |
531 | drawgfx_transpen(m_helper2, rect, | |
531 | drawgfx_transpen(m_helper2, rect, | |
532 | 532 | |
533 | m_coll_bit6 |= collision_check( | |
533 | m_coll_bit6 |= collision_check( | |
534 | 534 | } |
535 | 535 | } |
536 | 536 | } |
r17988 | r17989 | |
---|---|---|
432 | 432 | int ret; |
433 | 433 | |
434 | 434 | /* |
435 | if (DISPLAY_TEXTURE && ( | |
435 | if (DISPLAY_TEXTURE && ( | |
436 | 436 | { |
437 | 437 | static int xv = 0, yv = 0x1000; |
438 | 438 | UINT8 *base = m_texture; |
439 | 439 | int length = m_texture_size; |
440 | 440 | |
441 | if ( | |
441 | if ( | |
442 | 442 | { |
443 | 443 | base = m_texmask; |
444 | 444 | length = m_texmask_size; |
445 | 445 | } |
446 | 446 | |
447 | if ( | |
447 | if ( | |
448 | 448 | xv -= 4; |
449 | if ( | |
449 | if ( | |
450 | 450 | xv += 4; |
451 | 451 | |
452 | if ( | |
452 | if ( | |
453 | 453 | yv -= 4; |
454 | if ( | |
454 | if ( | |
455 | 455 | yv += 4; |
456 | 456 | |
457 | 457 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
r17988 | r17989 | |
---|---|---|
267 | 267 | |
268 | 268 | UINT32 dcon_state::screen_update_dcon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
269 | 269 | { |
270 | | |
270 | | |
271 | 271 | |
272 | 272 | /* Setup the tilemaps */ |
273 | 273 | m_background_layer->set_scrollx(0, m_scroll_ram[0] ); |
r17988 | r17989 | |
286 | 286 | m_foreground_layer->draw(bitmap, cliprect, 0,2); |
287 | 287 | m_text_layer->draw(bitmap, cliprect, 0,4); |
288 | 288 | |
289 | draw_sprites( | |
289 | draw_sprites( | |
290 | 290 | return 0; |
291 | 291 | } |
292 | 292 | |
293 | 293 | UINT32 dcon_state::screen_update_sdgndmps(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
294 | 294 | { |
295 | 295 | |
296 | | |
296 | | |
297 | 297 | |
298 | 298 | /* Gfx banking */ |
299 | 299 | if (m_last_gfx_bank!=m_gfx_bank_select) |
r17988 | r17989 | |
321 | 321 | m_foreground_layer->draw(bitmap, cliprect, 0,2); |
322 | 322 | m_text_layer->draw(bitmap, cliprect, 0,4); |
323 | 323 | |
324 | draw_sprites( | |
324 | draw_sprites( | |
325 | 325 | return 0; |
326 | 326 | } |
r17988 | r17989 | |
---|---|---|
607 | 607 | struct tms34061_display &tms_state = m_tms_state; |
608 | 608 | UINT32 page_offset; |
609 | 609 | int x, y; |
610 | const rgb_t *pens = tlc34076_get_pens( | |
610 | const rgb_t *pens = tlc34076_get_pens( | |
611 | 611 | |
612 | 612 | /* first get the current display state */ |
613 | 613 | tms34061_get_display_state(&tms_state); |
r17988 | r17989 | |
615 | 615 | /* if we're blanked, just fill with black */ |
616 | 616 | if (tms_state.blanked) |
617 | 617 | { |
618 | bitmap.fill(get_black_pen( | |
618 | bitmap.fill(get_black_pen( | |
619 | 619 | return 0; |
620 | 620 | } |
621 | 621 | |
r17988 | r17989 | |
651 | 651 | /* if we're blanked, just fill with black */ |
652 | 652 | if (tms_state.blanked) |
653 | 653 | { |
654 | bitmap.fill(get_black_pen( | |
654 | bitmap.fill(get_black_pen( | |
655 | 655 | return 0; |
656 | 656 | } |
657 | 657 | |
r17988 | r17989 | |
692 | 692 | struct tms34061_display &tms_state = m_tms_state; |
693 | 693 | UINT32 page_offset; |
694 | 694 | int x, y; |
695 | const rgb_t *pens = tlc34076_get_pens( | |
695 | const rgb_t *pens = tlc34076_get_pens( | |
696 | 696 | |
697 | 697 | /* first get the current display state */ |
698 | 698 | tms34061_get_display_state(&tms_state); |
r17988 | r17989 | |
700 | 700 | /* if we're blanked, just fill with black */ |
701 | 701 | if (tms_state.blanked) |
702 | 702 | { |
703 | bitmap.fill(get_black_pen( | |
703 | bitmap.fill(get_black_pen( | |
704 | 704 | return 0; |
705 | 705 | } |
706 | 706 | |
r17988 | r17989 | |
724 | 724 | struct tms34061_display &tms_state = m_tms_state; |
725 | 725 | UINT32 page_offset; |
726 | 726 | int x, y; |
727 | const rgb_t *pens = tlc34076_get_pens( | |
727 | const rgb_t *pens = tlc34076_get_pens( | |
728 | 728 | |
729 | 729 | /* first get the current display state */ |
730 | 730 | tms34061_get_display_state(&tms_state); |
r17988 | r17989 | |
732 | 732 | /* if we're blanked, just fill with black */ |
733 | 733 | if (tms_state.blanked) |
734 | 734 | { |
735 | bitmap.fill(get_black_pen( | |
735 | bitmap.fill(get_black_pen( | |
736 | 736 | return 0; |
737 | 737 | } |
738 | 738 |
r17988 | r17989 | |
---|---|---|
175 | 175 | m_bg2tm->draw(bitmap, cliprect, 0, 0); |
176 | 176 | m_bgtm->draw(bitmap, cliprect, 0, 0); |
177 | 177 | |
178 | kickgoal_draw_sprites( | |
178 | kickgoal_draw_sprites( | |
179 | 179 | |
180 | 180 | m_fgtm->draw(bitmap, cliprect, 0, 0); |
181 | 181 |
r17988 | r17989 | |
---|---|---|
453 | 453 | UINT32 galaxian_state::screen_update_galaxian(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
454 | 454 | { |
455 | 455 | /* draw the background layer (including stars) */ |
456 | (*m_draw_background_ptr)( | |
456 | (*m_draw_background_ptr)( | |
457 | 457 | |
458 | 458 | /* draw the tilemap characters over top */ |
459 | 459 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
460 | 460 | |
461 | 461 | /* render the sprites next. Some custom pcbs (eg. zigzag, fantastc) have more than one sprite generator (ideally, this should be rendered in parallel) */ |
462 | 462 | for (int i = 0; i < m_numspritegens; i++) |
463 | sprites_draw( | |
463 | sprites_draw( | |
464 | 464 | |
465 | 465 | /* if we have bullets to draw, render them following */ |
466 | 466 | if (m_draw_bullet_ptr != NULL) |
467 | bullets_draw( | |
467 | bullets_draw( | |
468 | 468 | |
469 | 469 | return 0; |
470 | 470 | } |
r17988 | r17989 | |
---|---|---|
194 | 194 | } |
195 | 195 | } |
196 | 196 | |
197 | | |
197 | | |
198 | 198 | |
199 | 199 | bitmap.fill(0, cliprect); |
200 | 200 | |
201 | 201 | for (layer = 0; layer < 3; layer++) |
202 | 202 | m_bg_tilemap[layer]->draw(bitmap, cliprect, 0, 0); |
203 | draw_sprites( | |
203 | draw_sprites( | |
204 | 204 | |
205 | 205 | for (layer = 0; layer < 3; layer++) |
206 | 206 | m_bg_tilemap[layer]->draw(bitmap, cliprect, 1, 0); |
207 | draw_sprites( | |
207 | draw_sprites( | |
208 | 208 | |
209 | 209 | for (layer = 0; layer < 3; layer++) |
210 | 210 | m_bg_tilemap[layer]->draw(bitmap, cliprect, 2, 0); |
211 | draw_sprites( | |
211 | draw_sprites( | |
212 | 212 | |
213 | 213 | for (layer = 0; layer < 3; layer++) |
214 | 214 | m_bg_tilemap[layer]->draw(bitmap, cliprect, 3, 0); |
215 | draw_sprites( | |
215 | draw_sprites( | |
216 | 216 | |
217 | 217 | return 0; |
218 | 218 | } |
r17988 | r17989 | |
---|---|---|
280 | 280 | m_pf2_tilemap->set_scrolly(0, m_pf2_scroll_data[1]); |
281 | 281 | |
282 | 282 | m_pf2_tilemap->draw(bitmap, cliprect, 0, 0); |
283 | //draw_sprites( | |
283 | //draw_sprites( | |
284 | 284 | m_pf1_tilemap->draw(bitmap, cliprect, 0, 0); |
285 | draw_sprites(screen.machine(), bitmap, m_spriteram2->buffer(), 2, 0, 0); | |
286 | draw_sprites(screen.machine(), bitmap, m_spriteram->buffer(), 1, 0, 0); | |
285 | draw_sprites(machine(), bitmap, m_spriteram2->buffer(), 2, 0, 0); | |
286 | draw_sprites(machine(), bitmap, m_spriteram->buffer(), 1, 0, 0); | |
287 | 287 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
288 | 288 | return 0; |
289 | 289 | } |
r17988 | r17989 | |
298 | 298 | |
299 | 299 | m_pf2_tilemap->draw(bitmap, cliprect, 0, 0); |
300 | 300 | m_pf1_tilemap->draw(bitmap, cliprect, 0, 0); |
301 | draw_sprites( | |
301 | draw_sprites( | |
302 | 302 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
303 | 303 | return 0; |
304 | 304 | } |
r17988 | r17989 | |
---|---|---|
527 | 527 | |
528 | 528 | UINT32 gstriker_state::screen_update_gstriker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
529 | 529 | { |
530 | bitmap.fill(get_black_pen( | |
530 | bitmap.fill(get_black_pen( | |
531 | 531 | |
532 | 532 | // Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably |
533 | 533 | // needs sprite orthogonality |
534 | MB60553_draw( | |
534 | MB60553_draw( | |
535 | 535 | |
536 | CG10103_draw( | |
536 | CG10103_draw( | |
537 | 537 | |
538 | 538 | VS920A_draw(this, 0, bitmap, cliprect, 0); |
539 | 539 | |
540 | CG10103_draw( | |
540 | CG10103_draw( | |
541 | 541 | |
542 | 542 | #if 0 |
543 | 543 | popmessage("%04x %04x %04x %04x %04x %04x %04x %04x", |
r17988 | r17989 | |
---|---|---|
949 | 949 | m_fg_tilemap->set_scrolly(0, m_fg_scrolly); |
950 | 950 | |
951 | 951 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
952 | marvins_draw_sprites( | |
952 | marvins_draw_sprites( | |
953 | 953 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
954 | marvins_draw_sprites( | |
954 | marvins_draw_sprites( | |
955 | 955 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
956 | 956 | |
957 | 957 | return 0; |
r17988 | r17989 | |
965 | 965 | m_bg_tilemap->set_scrolly(0, m_bg_scrolly); |
966 | 966 | |
967 | 967 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
968 | tnk3_draw_sprites( | |
968 | tnk3_draw_sprites( | |
969 | 969 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
970 | 970 | |
971 | 971 | return 0; |
r17988 | r17989 | |
980 | 980 | |
981 | 981 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
982 | 982 | |
983 | ikari_draw_sprites(screen.machine(), bitmap, cliprect, 0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 ); | |
984 | ikari_draw_sprites(screen.machine(), bitmap, cliprect, 0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3 ); | |
985 | ikari_draw_sprites(screen.machine(), bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 ); | |
983 | ikari_draw_sprites(machine(), bitmap, cliprect, 0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 ); | |
984 | ikari_draw_sprites(machine(), bitmap, cliprect, 0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3 ); | |
985 | ikari_draw_sprites(machine(), bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 ); | |
986 | 986 | |
987 | 987 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
988 | 988 | return 0; |
r17988 | r17989 | |
997 | 997 | |
998 | 998 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
999 | 999 | |
1000 | tdfever_draw_sprites(screen.machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point ); | |
1001 | tdfever_draw_sprites(screen.machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3, 0, 0, 32 ); | |
1002 | tdfever_draw_sprites(screen.machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 ); | |
1000 | tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point ); | |
1001 | tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3, 0, 0, 32 ); | |
1002 | tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 ); | |
1003 | 1003 | |
1004 | 1004 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
1005 | 1005 | |
r17988 | r17989 | |
1015 | 1015 | |
1016 | 1016 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
1017 | 1017 | |
1018 | tdfever_draw_sprites( | |
1018 | tdfever_draw_sprites( | |
1019 | 1019 | |
1020 | 1020 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
1021 | 1021 |
r17988 | r17989 | |
---|---|---|
694 | 694 | |
695 | 695 | if (dirty) |
696 | 696 | { |
697 | dirty_tiles(screen.machine(), 0, m_vram_0); | |
698 | dirty_tiles(screen.machine(), 1, m_vram_1); | |
699 | dirty_tiles(screen.machine(), 2, m_vram_2); | |
697 | dirty_tiles(machine(), 0, m_vram_0); | |
698 | dirty_tiles(machine(), 1, m_vram_1); | |
699 | dirty_tiles(machine(), 2, m_vram_2); | |
700 | 700 | } |
701 | 701 | } |
702 | 702 | |
r17988 | r17989 | |
704 | 704 | m_sprite_yoffs = m_videoregs[0x04 / 2] - screen.height() / 2 - m_sprite_yoffs_sub; |
705 | 705 | |
706 | 706 | /* The background color is selected by a register */ |
707 | | |
707 | | |
708 | 708 | bitmap.fill((m_videoregs[0x12 / 2] & 0x0fff) + 0x1000, cliprect); |
709 | 709 | |
710 | 710 | /* Screen Control Register: |
r17988 | r17989 | |
723 | 723 | flip_screen_set(screenctrl & 1); |
724 | 724 | |
725 | 725 | #if 0 |
726 | if ( | |
726 | if ( | |
727 | 727 | { int msk = 0; |
728 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 0x01; | |
729 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 0x02; | |
730 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 0x04; | |
731 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 0x08; | |
728 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 0x01; | |
729 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 0x02; | |
730 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 0x04; | |
731 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 0x08; | |
732 | 732 | if (msk != 0) |
733 | 733 | { |
734 | 734 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
743 | 743 | #endif |
744 | 744 | |
745 | 745 | for (pri = 3; pri >= 0; pri--) |
746 | draw_layers( | |
746 | draw_layers( | |
747 | 747 | |
748 | 748 | if (layers_ctrl & 0x08) |
749 | draw_sprites( | |
749 | draw_sprites( | |
750 | 750 | |
751 | 751 | return 0; |
752 | 752 | } |
r17988 | r17989 | |
---|---|---|
146 | 146 | /* intersect with master clip rectangle */ |
147 | 147 | clip &= cliprect; |
148 | 148 | |
149 | bitmap.fill(get_black_pen( | |
149 | bitmap.fill(get_black_pen( | |
150 | 150 | |
151 | video_update_common( | |
151 | video_update_common( | |
152 | 152 | |
153 | 153 | return 0; |
154 | 154 | } |
r17988 | r17989 | |
183 | 183 | /* intersect with master clip rectangle */ |
184 | 184 | clip &= cliprect; |
185 | 185 | |
186 | bitmap.fill(get_black_pen( | |
186 | bitmap.fill(get_black_pen( | |
187 | 187 | |
188 | 188 | if( memcmp(m_tilemap_tile_bank,m_tilebank32,sizeof(m_tilemap_tile_bank))!=0 ) |
189 | 189 | { |
190 | 190 | namco_tilemap_invalidate(); |
191 | 191 | memcpy(m_tilemap_tile_bank,m_tilebank32,sizeof(m_tilemap_tile_bank)); |
192 | 192 | } |
193 | video_update_common( | |
193 | video_update_common( | |
194 | 194 | return 0; |
195 | 195 | } |
196 | 196 |
r17988 | r17989 | |
---|---|---|
81 | 81 | { |
82 | 82 | |
83 | 83 | /* draw the playfield */ |
84 | arcadecl_bitmap_render( | |
84 | arcadecl_bitmap_render( | |
85 | 85 | |
86 | 86 | /* draw and merge the MO */ |
87 | 87 | if (m_has_mo) |
r17988 | r17989 | |
---|---|---|
208 | 208 | { |
209 | 209 | m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0); |
210 | 210 | m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0); |
211 | flstory_draw_sprites( | |
211 | flstory_draw_sprites( | |
212 | 212 | m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0); |
213 | flstory_draw_sprites( | |
213 | flstory_draw_sprites( | |
214 | 214 | m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0); |
215 | 215 | return 0; |
216 | 216 | } |
r17988 | r17989 | |
263 | 263 | UINT32 flstory_state::screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
264 | 264 | { |
265 | 265 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
266 | victnine_draw_sprites( | |
266 | victnine_draw_sprites( | |
267 | 267 | return 0; |
268 | 268 | } |
269 | 269 | |
r17988 | r17989 | |
271 | 271 | { |
272 | 272 | m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0); |
273 | 273 | m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0); |
274 | victnine_draw_sprites( | |
274 | victnine_draw_sprites( | |
275 | 275 | m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0); |
276 | victnine_draw_sprites( | |
276 | victnine_draw_sprites( | |
277 | 277 | m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0); |
278 | 278 | return 0; |
279 | 279 | } |
r17988 | r17989 | |
---|---|---|
151 | 151 | { |
152 | 152 | m_screen_tilemap->set_scrollx(0, m_screen_vregs[0x04/2] ); |
153 | 153 | |
154 | bitmap.fill(get_black_pen( | |
154 | bitmap.fill(get_black_pen( | |
155 | 155 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_bg_tilemap, 0, 0, 1); |
156 | 156 | if(!(m_spr_ctrl[0] & 8)) |
157 | draw_sprites( | |
157 | draw_sprites( | |
158 | 158 | m_screen_tilemap->draw(bitmap, cliprect, 0, 0); |
159 | 159 | if(m_spr_ctrl[0] & 8) |
160 | draw_sprites( | |
160 | draw_sprites( | |
161 | 161 | return 0; |
162 | 162 | } |
163 | 163 |
r17988 | r17989 | |
---|---|---|
142 | 142 | } |
143 | 143 | |
144 | 144 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
549 | 549 | UINT32 cosmic_state::screen_update_cosmicg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
550 | 550 | { |
551 | 551 | bitmap.fill(0, cliprect); |
552 | draw_bitmap( | |
552 | draw_bitmap( | |
553 | 553 | return 0; |
554 | 554 | } |
555 | 555 | |
r17988 | r17989 | |
557 | 557 | UINT32 cosmic_state::screen_update_panic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
558 | 558 | { |
559 | 559 | bitmap.fill(0, cliprect); |
560 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
561 | draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 1); | |
560 | draw_bitmap(machine(), bitmap, cliprect); | |
561 | draw_sprites(machine(), bitmap, cliprect, 0x07, 1); | |
562 | 562 | return 0; |
563 | 563 | } |
564 | 564 | |
r17988 | r17989 | |
567 | 567 | { |
568 | 568 | bitmap.fill(0, cliprect); |
569 | 569 | cosmica_draw_starfield(screen, bitmap, cliprect); |
570 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
571 | draw_sprites(screen.machine(), bitmap, cliprect, 0x0f, 0); | |
570 | draw_bitmap(machine(), bitmap, cliprect); | |
571 | draw_sprites(machine(), bitmap, cliprect, 0x0f, 0); | |
572 | 572 | return 0; |
573 | 573 | } |
574 | 574 | |
r17988 | r17989 | |
576 | 576 | UINT32 cosmic_state::screen_update_magspot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
577 | 577 | { |
578 | 578 | bitmap.fill(0, cliprect); |
579 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
580 | draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 0); | |
579 | draw_bitmap(machine(), bitmap, cliprect); | |
580 | draw_sprites(machine(), bitmap, cliprect, 0x07, 0); | |
581 | 581 | return 0; |
582 | 582 | } |
583 | 583 | |
r17988 | r17989 | |
588 | 588 | bitmap.fill(0, cliprect); |
589 | 589 | |
590 | 590 | if (m_background_enable) |
591 | devzone_draw_grid( | |
591 | devzone_draw_grid( | |
592 | 592 | |
593 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
594 | draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 0); | |
593 | draw_bitmap(machine(), bitmap, cliprect); | |
594 | draw_sprites(machine(), bitmap, cliprect, 0x07, 0); | |
595 | 595 | return 0; |
596 | 596 | } |
597 | 597 | |
r17988 | r17989 | |
603 | 603 | have the highest priority */ |
604 | 604 | |
605 | 605 | bitmap.fill(0, cliprect); |
606 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
607 | draw_sprites(screen.machine(), bitmap, cliprect, 0x07, 0); | |
606 | draw_bitmap(machine(), bitmap, cliprect); | |
607 | draw_sprites(machine(), bitmap, cliprect, 0x07, 0); | |
608 | 608 | |
609 | 609 | if (m_background_enable) |
610 | 610 | nomnlnd_draw_background(screen, bitmap, cliprect); |
r17988 | r17989 | |
---|---|---|
190 | 190 | { |
191 | 191 | |
192 | 192 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
193 | draw_sprites( | |
193 | draw_sprites( | |
194 | 194 | return 0; |
195 | 195 | } |
r17988 | r17989 | |
---|---|---|
2721 | 2721 | { |
2722 | 2722 | logerror("--- frame ---\n"); |
2723 | 2723 | |
2724 | bitmap.fill( | |
2724 | bitmap.fill( | |
2725 | 2725 | m_sys24_bitmap.fill(0, cliprect); |
2726 | 2726 | |
2727 | segas24_tile *tile = | |
2727 | segas24_tile *tile = | |
2728 | 2728 | tile->draw(m_sys24_bitmap, cliprect, 7, 0, 0); |
2729 | 2729 | tile->draw(m_sys24_bitmap, cliprect, 6, 0, 0); |
2730 | 2730 | tile->draw(m_sys24_bitmap, cliprect, 5, 0, 0); |
r17988 | r17989 | |
---|---|---|
31 | 31 | UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
32 | 32 | { |
33 | 33 | |
34 | | |
34 | | |
35 | 35 | |
36 | 36 | // I'm pretty sure only the original has the 2nd spriteram, used for the Japanese text on the 2nd scene (non-scrolling text) in the intro of the quest (3rd in JPN) mode |
37 | 37 | if (m_spriteram2 != NULL) |
38 | | |
38 | | |
39 | 39 | |
40 | | |
40 | | |
41 | 41 | |
42 | bitmap.fill(get_black_pen( | |
42 | bitmap.fill(get_black_pen( | |
43 | 43 | |
44 | 44 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
45 | 45 | |
46 | 46 | /* the tilemap 4bpp + 4bpp = 8bpp mixing actually seems external to the tilemap, note video_control is not part of the tilemap chip */ |
47 | 47 | if ((m_video_control&4)==0) { |
48 | 48 | deco16ic_tilemap_12_combine_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0, 1); |
49 | | |
49 | | |
50 | 50 | } |
51 | 51 | else { |
52 | 52 | |
53 | 53 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
54 | | |
54 | | |
55 | 55 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
56 | 56 | } |
57 | 57 | |
58 | 58 | if (m_spriteram2 != NULL) |
59 | | |
59 | | |
60 | 60 | |
61 | | |
61 | | |
62 | 62 | return 0; |
63 | 63 | } |
r17988 | r17989 | |
---|---|---|
120 | 120 | sy = 27 - sy; |
121 | 121 | } |
122 | 122 | |
123 | drawgfx_opaque(bitmap,cliprect, | |
123 | drawgfx_opaque(bitmap,cliprect, | |
124 | 124 | m_videoram[offs], |
125 | 125 | m_colorram[offs] & 0x3f, |
126 | 126 | m_flipscreen,m_flipscreen, |
r17988 | r17989 | |
148 | 148 | flipy = !flipy; |
149 | 149 | } |
150 | 150 | |
151 | drawgfx_transmask(bitmap,cliprect, | |
151 | drawgfx_transmask(bitmap,cliprect, | |
152 | 152 | (spriteram[offs] & 0x3f) + 64 * otherbank, |
153 | 153 | color, |
154 | 154 | flipx,flipy, |
155 | 155 | sx,sy, |
156 | colortable_get_transpen_mask( | |
156 | colortable_get_transpen_mask( | |
157 | 157 | } |
158 | 158 | |
159 | 159 | /* redraw high priority chars */ |
r17988 | r17989 | |
188 | 188 | sy = 27 - sy; |
189 | 189 | } |
190 | 190 | |
191 | drawgfx_opaque(bitmap,cliprect, | |
191 | drawgfx_opaque(bitmap,cliprect, | |
192 | 192 | m_videoram[offs], |
193 | 193 | m_colorram[offs] & 0x3f, |
194 | 194 | m_flipscreen,m_flipscreen, |
r17988 | r17989 | |
---|---|---|
220 | 220 | m_bg_tilemap->set_scrolly(0, m_scroll_y); |
221 | 221 | |
222 | 222 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
223 | draw_sprites( | |
223 | draw_sprites( | |
224 | 224 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
225 | 225 | return 0; |
226 | 226 | } |
r17988 | r17989 | |
---|---|---|
389 | 389 | { |
390 | 390 | int y; |
391 | 391 | |
392 | const UINT8 *bg_prom = screen.machine().root_device().memregion("user1")->base(); | |
393 | const UINT8 *bg_gfx = screen.machine().root_device().memregion("gfx1")->base(); | |
392 | const UINT8 *bg_prom = machine().root_device().memregion("user1")->base(); | |
393 | const UINT8 *bg_gfx = machine().root_device().memregion("gfx1")->base(); | |
394 | 394 | offs_t bg_gfx_bank_page_size = memregion("gfx1")->bytes() / 3; |
395 | 395 | offs_t char_bank = (((m_gfxbank >> 4) & 0x03) * 0x2000) & (bg_gfx_bank_page_size - 1); |
396 | 396 | offs_t prom_bank = ((m_gfxbank >> 3) & 0x01) * 0x2000; |
r17988 | r17989 | |
457 | 457 | { |
458 | 458 | int y; |
459 | 459 | |
460 | const UINT8 *bg_gfx = | |
460 | const UINT8 *bg_gfx = | |
461 | 461 | offs_t bg_gfx_bank_page_size = memregion("gfx1")->bytes() / 6; |
462 | 462 | offs_t bg_gfx_offs_mask = bg_gfx_bank_page_size - 1; |
463 | 463 |
r17988 | r17989 | |
---|---|---|
54 | 54 | { |
55 | 55 | int i, x, y; |
56 | 56 | |
57 | int video_inverted = | |
57 | int video_inverted = | |
58 | 58 | |
59 | 59 | /* The first row of characters are invisible */ |
60 | 60 | for (i = 0; i < (VERT_RES - 1) * HORZ_RES; i++) |
r17988 | r17989 | |
67 | 67 | sx *= HORZ_CHR; |
68 | 68 | sy *= VERT_CHR; |
69 | 69 | |
70 | drawgfx_opaque(bitmap, cliprect, | |
70 | drawgfx_opaque(bitmap, cliprect, | |
71 | 71 | m_videoram[i], video_inverted ? 1 : 0, |
72 | 72 | 0,0, |
73 | 73 | sx,sy); |
r17988 | r17989 | |
75 | 75 | |
76 | 76 | x = m_marker_x - 1; /* normal video lags marker by 1 pixel */ |
77 | 77 | y = vert_scale(m_marker_y) - VERT_CHR; /* first line used as scratch pad */ |
78 | plot_pattern( | |
78 | plot_pattern( | |
79 | 79 | |
80 | 80 | return 0; |
81 | 81 | } |
r17988 | r17989 | |
---|---|---|
367 | 367 | |
368 | 368 | UINT32 popeye_state::screen_update_popeye(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
369 | 369 | { |
370 | draw_background(screen.machine(), bitmap, cliprect); | |
371 | draw_sprites(screen.machine(), bitmap, cliprect); | |
370 | draw_background(machine(), bitmap, cliprect); | |
371 | draw_sprites(machine(), bitmap, cliprect); | |
372 | 372 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
373 | 373 | return 0; |
374 | 374 | } |
r17988 | r17989 | |
---|---|---|
124 | 124 | |
125 | 125 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
126 | 126 | m_text_tilemap->draw(bitmap, cliprect, 0, 0); |
127 | draw_sprites( | |
127 | draw_sprites( | |
128 | 128 | return 0; |
129 | 129 | } |
r17988 | r17989 | |
---|---|---|
322 | 322 | int layers_ctrl = -1; |
323 | 323 | |
324 | 324 | #ifdef MAME_DEBUG |
325 | if ( | |
325 | if ( | |
326 | 326 | { |
327 | 327 | int msk = 0; |
328 | 328 | |
329 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
330 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
331 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
332 | if (screen.machine().input().code_pressed(KEYCODE_R)) msk |= 8; | |
333 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 16; | |
329 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
330 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
331 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
332 | if (machine().input().code_pressed(KEYCODE_R)) msk |= 8; | |
333 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 16; | |
334 | 334 | if (msk != 0) layers_ctrl &= msk; |
335 | 335 | } |
336 | 336 | #endif |
337 | 337 | |
338 | 338 | if (m_whitescreen) |
339 | 339 | { |
340 | bitmap.fill(get_white_pen( | |
340 | bitmap.fill(get_white_pen( | |
341 | 341 | return 0; |
342 | 342 | } |
343 | 343 | |
r17988 | r17989 | |
373 | 373 | if (layers_ctrl & 2) m_tilemap[1]->draw(*m_bitmaps[1], cliprect, 0, 0); |
374 | 374 | if (layers_ctrl & 4) m_tilemap[2]->draw(*m_bitmaps[2], cliprect, 0, 0); |
375 | 375 | if (layers_ctrl & 8) m_tilemap[3]->draw(*m_bitmaps[3], cliprect, 0, 0); |
376 | if (layers_ctrl & 16) draw_sprites( | |
376 | if (layers_ctrl & 16) draw_sprites( | |
377 | 377 | |
378 | 378 | // copy to screen bitmap |
379 | 379 |
r17988 | r17989 | |
---|---|---|
136 | 136 | rect.max_y = cliprect.max_y; |
137 | 137 | rect.min_y = cliprect.min_y; |
138 | 138 | |
139 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_1, 0x400, true); | |
140 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true); | |
139 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_1, 0x400, true); | |
140 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true); | |
141 | 141 | |
142 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
143 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x300, 0xff); | |
142 | bitmap.fill(get_black_pen(machine()), cliprect); | |
143 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x300, 0xff); | |
144 | 144 | |
145 | 145 | /* Pixel layer can be windowed in hardware (two player mode) */ |
146 | 146 | if ((m_control_data[6] & 2) == 0) |
147 | 147 | { |
148 | lemmings_copy_bitmap( | |
148 | lemmings_copy_bitmap( | |
149 | 149 | } |
150 | 150 | else |
151 | 151 | { |
152 | 152 | rect.max_x = 159; |
153 | 153 | rect.min_x = 0; |
154 | lemmings_copy_bitmap( | |
154 | lemmings_copy_bitmap( | |
155 | 155 | |
156 | 156 | rect.max_x = 319; |
157 | 157 | rect.min_x = 160; |
158 | lemmings_copy_bitmap( | |
158 | lemmings_copy_bitmap( | |
159 | 159 | } |
160 | 160 | |
161 | screen.machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff); | |
162 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x300, 0xff); | |
161 | machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff); | |
162 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x300, 0xff); | |
163 | 163 | m_vram_tilemap->draw(bitmap, cliprect, 0, 0); |
164 | | |
164 | | |
165 | 165 | return 0; |
166 | 166 | } |
r17988 | r17989 | |
---|---|---|
124 | 124 | m_bg_tilemap->set_scrolly(0, 0xf00 - m_control[1]); |
125 | 125 | |
126 | 126 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
127 | draw_sprites( | |
127 | draw_sprites( | |
128 | 128 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
129 | 129 | return 0; |
130 | 130 | } |
r17988 | r17989 | |
---|---|---|
229 | 229 | { |
230 | 230 | |
231 | 231 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
232 | draw_sprites( | |
232 | draw_sprites( | |
233 | 233 | return 0; |
234 | 234 | } |
r17988 | r17989 | |
---|---|---|
183 | 183 | } |
184 | 184 | |
185 | 185 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
186 | draw_sprites( | |
186 | draw_sprites( | |
187 | 187 | return 0; |
188 | 188 | } |
189 | 189 |
r17988 | r17989 | |
---|---|---|
200 | 200 | m_bg_tilemap1->draw(bitmap, cliprect, 0, 0); |
201 | 201 | |
202 | 202 | |
203 | draw_sprites( | |
203 | draw_sprites( | |
204 | 204 | |
205 | 205 | return 0; |
206 | 206 | } |
r17988 | r17989 | |
---|---|---|
1134 | 1134 | { |
1135 | 1135 | int priority; |
1136 | 1136 | |
1137 | toaplan1_log_vram( | |
1137 | toaplan1_log_vram( | |
1138 | 1138 | |
1139 | 1139 | bitmap.fill(0x120, cliprect); |
1140 | 1140 | |
r17988 | r17989 | |
1147 | 1147 | m_pf3_tilemap->draw(bitmap, cliprect, priority, 0); |
1148 | 1148 | m_pf2_tilemap->draw(bitmap, cliprect, priority, 0); |
1149 | 1149 | m_pf1_tilemap->draw(bitmap, cliprect, priority, 0); |
1150 | rallybik_draw_sprites( | |
1150 | rallybik_draw_sprites( | |
1151 | 1151 | } |
1152 | 1152 | |
1153 | 1153 | return 0; |
r17988 | r17989 | |
1157 | 1157 | { |
1158 | 1158 | int priority; |
1159 | 1159 | |
1160 | toaplan1_log_vram( | |
1160 | toaplan1_log_vram( | |
1161 | 1161 | |
1162 | | |
1162 | | |
1163 | 1163 | bitmap.fill(0x120, cliprect); |
1164 | 1164 | |
1165 | 1165 | // it's really correct? |
r17988 | r17989 | |
1174 | 1174 | m_pf1_tilemap->draw(bitmap, cliprect, priority, priority, 0); |
1175 | 1175 | } |
1176 | 1176 | |
1177 | draw_sprites( | |
1177 | draw_sprites( | |
1178 | 1178 | return 0; |
1179 | 1179 | } |
1180 | 1180 | |
r17988 | r17989 | |
1213 | 1213 | |
1214 | 1214 | memcpy(m_buffered_spriteram, m_spriteram, m_spriteram.bytes()); |
1215 | 1215 | memcpy(m_buffered_spritesizeram16, m_spritesizeram16, TOAPLAN1_SPRITESIZERAM_SIZE); |
1216 | | |
1216 | | |
1217 | 1217 | } |
1218 | 1218 | } |
r17988 | r17989 | |
---|---|---|
802 | 802 | /* background: none */ |
803 | 803 | case G80_BACKGROUND_NONE: |
804 | 804 | memset(transparent_pens, 0, 16); |
805 | draw_videoram( | |
805 | draw_videoram( | |
806 | 806 | break; |
807 | 807 | |
808 | 808 | /* foreground: visible except where black */ |
r17988 | r17989 | |
810 | 810 | /* we draw the foreground first, then the background to do collision detection */ |
811 | 811 | case G80_BACKGROUND_SPACEOD: |
812 | 812 | memset(transparent_pens, 0, 16); |
813 | draw_videoram(screen.machine(), bitmap, cliprect, transparent_pens); | |
814 | draw_background_spaceod(screen.machine(), bitmap, cliprect); | |
813 | draw_videoram(machine(), bitmap, cliprect, transparent_pens); | |
814 | draw_background_spaceod(machine(), bitmap, cliprect); | |
815 | 815 | break; |
816 | 816 | |
817 | 817 | /* foreground: visible except for pen 0 (this disagrees with schematics) */ |
818 | 818 | /* background: page-granular scrolling */ |
819 | 819 | case G80_BACKGROUND_MONSTERB: |
820 | 820 | memset(transparent_pens, 1, 16); |
821 | draw_background_page_scroll(screen.machine(), bitmap, cliprect); | |
822 | draw_videoram(screen.machine(), bitmap, cliprect, transparent_pens); | |
821 | draw_background_page_scroll(machine(), bitmap, cliprect); | |
822 | draw_videoram(machine(), bitmap, cliprect, transparent_pens); | |
823 | 823 | break; |
824 | 824 | |
825 | 825 | /* foreground: visible except for pen 0 */ |
826 | 826 | /* background: full scrolling */ |
827 | 827 | case G80_BACKGROUND_PIGNEWT: |
828 | 828 | memset(transparent_pens, 1, 16); |
829 | draw_background_full_scroll(screen.machine(), bitmap, cliprect); | |
830 | draw_videoram(screen.machine(), bitmap, cliprect, transparent_pens); | |
829 | draw_background_full_scroll(machine(), bitmap, cliprect); | |
830 | draw_videoram(machine(), bitmap, cliprect, transparent_pens); | |
831 | 831 | break; |
832 | 832 | |
833 | 833 | /* foreground: visible except for pen 0 */ |
834 | 834 | /* background: page-granular scrolling */ |
835 | 835 | case G80_BACKGROUND_SINDBADM: |
836 | 836 | memset(transparent_pens, 1, 16); |
837 | draw_background_page_scroll(screen.machine(), bitmap, cliprect); | |
838 | draw_videoram(screen.machine(), bitmap, cliprect, transparent_pens); | |
837 | draw_background_page_scroll(machine(), bitmap, cliprect); | |
838 | draw_videoram(machine(), bitmap, cliprect, transparent_pens); | |
839 | 839 | break; |
840 | 840 | } |
841 | 841 | return 0; |
r17988 | r17989 | |
---|---|---|
266 | 266 | |
267 | 267 | if (m_total_pixmaps == 4) |
268 | 268 | { |
269 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 3, 2, col1, 0); | |
270 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 1, 0, col0, 1); | |
269 | draw_layer_interleaved(machine(), bitmap, cliprect, 3, 2, col1, 0); | |
270 | draw_layer_interleaved(machine(), bitmap, cliprect, 1, 0, col0, 1); | |
271 | 271 | } |
272 | 272 | else /* total_pixmaps == 8 */ |
273 | 273 | { |
274 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 7, 6, col3, 0); | |
275 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 5, 4, col2, 1); | |
276 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 3, 2, col1, 1); | |
277 | draw_layer_interleaved(screen.machine(), bitmap, cliprect, 1, 0, col0, 1); | |
274 | draw_layer_interleaved(machine(), bitmap, cliprect, 7, 6, col3, 0); | |
275 | draw_layer_interleaved(machine(), bitmap, cliprect, 5, 4, col2, 1); | |
276 | draw_layer_interleaved(machine(), bitmap, cliprect, 3, 2, col1, 1); | |
277 | draw_layer_interleaved(machine(), bitmap, cliprect, 1, 0, col0, 1); | |
278 | 278 | } |
279 | 279 | return 0; |
280 | 280 | } |
r17988 | r17989 | |
---|---|---|
605 | 605 | |
606 | 606 | konami_sortlayers3(m_sorted_layer, m_layerpri); |
607 | 607 | |
608 | | |
608 | | |
609 | 609 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[0], TILEMAP_DRAW_OPAQUE, 1); |
610 | 610 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[1], 0, 2); |
611 | 611 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[2], 0, 4); |
r17988 | r17989 | |
636 | 636 | |
637 | 637 | konami_sortlayers3(m_sorted_layer, m_layerpri); |
638 | 638 | |
639 | | |
639 | | |
640 | 640 | bitmap.fill(16 * bg_colorbase, cliprect); |
641 | 641 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[0], 0, 1); |
642 | 642 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[1], 0, 2); |
r17988 | r17989 | |
683 | 683 | |
684 | 684 | /* not sure about the 053936 priority, but it seems to work */ |
685 | 685 | |
686 | | |
686 | | |
687 | 687 | bitmap.fill(16 * bg_colorbase, cliprect); |
688 | 688 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[0], 0, 1); |
689 | 689 | |
r17988 | r17989 | |
743 | 743 | |
744 | 744 | // dim all colors before it |
745 | 745 | for (i = 0; i < cb; i++) |
746 | palette_set_pen_contrast( | |
746 | palette_set_pen_contrast( | |
747 | 747 | |
748 | 748 | // reset all colors in range |
749 | 749 | for (i = cb; i < ce; i++) |
750 | palette_set_pen_contrast( | |
750 | palette_set_pen_contrast( | |
751 | 751 | |
752 | 752 | // dim all colors after it |
753 | 753 | for (i = ce; i < 2048; i++) |
754 | palette_set_pen_contrast( | |
754 | palette_set_pen_contrast( | |
755 | 755 | |
756 | 756 | // toggle shadow/highlight |
757 | 757 | if (~m_dim_c & 0x10) |
758 | palette_set_shadow_mode( | |
758 | palette_set_shadow_mode( | |
759 | 759 | else |
760 | palette_set_shadow_mode( | |
760 | palette_set_shadow_mode( | |
761 | 761 | } |
762 | 762 | |
763 | 763 | SCREEN_UPDATE16_CALL_MEMBER(lgtnfght); |
r17988 | r17989 | |
786 | 786 | |
787 | 787 | konami_sortlayers3(m_sorted_layer, m_layerpri); |
788 | 788 | |
789 | | |
789 | | |
790 | 790 | bitmap.fill(16 * bg_colorbase, cliprect); |
791 | 791 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[0], 0, 1); |
792 | 792 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, m_sorted_layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
2658 | 2658 | // int y,x; |
2659 | 2659 | |
2660 | 2660 | #if DEBUG_PALRAM |
2661 | debug_paletteram( | |
2661 | debug_paletteram( | |
2662 | 2662 | #endif |
2663 | 2663 | |
2664 | 2664 | // copy our fake framebuffer bitmap (where things have been rendered) to the screen |
r17988 | r17989 | |
2677 | 2677 | bitmap.fill(MAKE_ARGB(0xff,vo_border_R,vo_border_G,vo_border_B), cliprect); //FIXME: Chroma bit? |
2678 | 2678 | |
2679 | 2679 | if(!spg_blank_video) |
2680 | pvr_drawframebuffer( | |
2680 | pvr_drawframebuffer( | |
2681 | 2681 | |
2682 | 2682 | // update this here so we only do string lookup once per frame |
2683 | debug_dip_status = | |
2683 | debug_dip_status = | |
2684 | 2684 | |
2685 | 2685 | return 0; |
2686 | 2686 | } |
r17988 | r17989 | |
---|---|---|
31 | 31 | sx = offs % 32; |
32 | 32 | sy = offs / 32; |
33 | 33 | |
34 | drawgfx_opaque(bitmap,cliprect, | |
34 | drawgfx_opaque(bitmap,cliprect, | |
35 | 35 | m_vram3[offs], |
36 | 36 | 0, |
37 | 37 | 0,0, |
r17988 | r17989 | |
43 | 43 | sx = offs % 32; |
44 | 44 | sy = offs / 32; |
45 | 45 | |
46 | drawgfx_transpen(bitmap,cliprect, | |
46 | drawgfx_transpen(bitmap,cliprect, | |
47 | 47 | m_vram2[offs]+256*m_vram2[offs+0x400], |
48 | 48 | 0, |
49 | 49 | 0,0, |
r17988 | r17989 | |
109 | 109 | sx = offs % 32; |
110 | 110 | sy = offs / 32; |
111 | 111 | |
112 | drawgfx_transpen(bitmap,cliprect, | |
112 | drawgfx_transpen(bitmap,cliprect, | |
113 | 113 | m_vram1[offs], |
114 | 114 | 0, |
115 | 115 | 0,0, |
r17988 | r17989 | |
136 | 136 | sx = offs % 32; |
137 | 137 | sy = offs / 32; |
138 | 138 | |
139 | drawgfx_transpen(bitmap,cliprect, | |
139 | drawgfx_transpen(bitmap,cliprect, | |
140 | 140 | m_vram0[offs], |
141 | 141 | 0, |
142 | 142 | 0,0, |
r17988 | r17989 | |
---|---|---|
335 | 335 | bitmap.fill(0, cliprect); |
336 | 336 | |
337 | 337 | // low priority objects |
338 | draw_object_bank(screen.machine(), bitmap, cliprect, 0, 0); | |
339 | draw_object_bank(screen.machine(), bitmap, cliprect, 1, 0); | |
340 | draw_object_bank(screen.machine(), bitmap, cliprect, 2, 0); | |
338 | draw_object_bank(machine(), bitmap, cliprect, 0, 0); | |
339 | draw_object_bank(machine(), bitmap, cliprect, 1, 0); | |
340 | draw_object_bank(machine(), bitmap, cliprect, 2, 0); | |
341 | 341 | |
342 | 342 | // 3D layer |
343 | 343 | copybitmap_trans(bitmap, m_framebuffer, 0, 0, 0, 0, cliprect, 0); |
344 | 344 | |
345 | 345 | // high priority objects |
346 | draw_object_bank(screen.machine(), bitmap, cliprect, 0, 1); | |
347 | draw_object_bank(screen.machine(), bitmap, cliprect, 1, 1); | |
348 | draw_object_bank(screen.machine(), bitmap, cliprect, 2, 1); | |
346 | draw_object_bank(machine(), bitmap, cliprect, 0, 1); | |
347 | draw_object_bank(machine(), bitmap, cliprect, 1, 1); | |
348 | draw_object_bank(machine(), bitmap, cliprect, 2, 1); | |
349 | 349 | |
350 | 350 | // text layer |
351 | 351 | if (m_objlist[0xfc4/4] & 0x10000) |
r17988 | r17989 | |
---|---|---|
213 | 213 | rectangle myclip=cliprect; |
214 | 214 | |
215 | 215 | #ifdef MAME_DEBUG |
216 | if ( | |
216 | if ( | |
217 | 217 | { |
218 | 218 | UINT8 *ROM = memregion("maincpu")->base(); |
219 | 219 | ROM[0x84f6]=0; /* lap 0 - normal */ |
220 | 220 | } |
221 | 221 | |
222 | if ( | |
222 | if ( | |
223 | 223 | { |
224 | UINT8 *ROM = | |
224 | UINT8 *ROM = | |
225 | 225 | ROM[0x84f6]=6; /* lap 6 = spotlight */ |
226 | 226 | } |
227 | 227 | |
228 | if ( | |
228 | if ( | |
229 | 229 | { |
230 | UINT8 *ROM = | |
230 | UINT8 *ROM = | |
231 | 231 | ROM[0x84f6]=2; /* lap 3 (trial 2)= lightnings */ |
232 | 232 | ROM[0x8102]=1; |
233 | 233 | } |
r17988 | r17989 | |
254 | 254 | m_bg->draw(bitmap, myclip, 0,0); |
255 | 255 | } |
256 | 256 | |
257 | draw_sprites( | |
257 | draw_sprites( | |
258 | 258 | |
259 | 259 | if(m_ha&4) |
260 | 260 | copybitmap_trans(bitmap,*m_tmp_bitmap[m_ha&3],flip_screen_x(),flip_screen_y(),dx,dy,myclip, 1); |
r17988 | r17989 | |
---|---|---|
363 | 363 | |
364 | 364 | poly_wait(poly, "VIDEO_UPDATE"); |
365 | 365 | |
366 | if (screen.machine().input().code_pressed(KEYCODE_UP)) { zbase += 1.0f; popmessage("Zbase = %f", zbase); } | |
367 | if (screen.machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmessage("Zbase = %f", zbase); } | |
366 | if (machine().input().code_pressed(KEYCODE_UP)) { zbase += 1.0f; popmessage("Zbase = %f", zbase); } | |
367 | if (machine().input().code_pressed(KEYCODE_DOWN)) { zbase -= 1.0f; popmessage("Zbase = %f", zbase); } | |
368 | 368 | |
369 | 369 | /* normal update case */ |
370 | if (! | |
370 | if (! | |
371 | 371 | { |
372 | 372 | const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0x38]); |
373 | 373 | int xoffs = screen.visible_area().min_x; |
r17988 | r17989 | |
384 | 384 | { |
385 | 385 | const UINT64 *base; |
386 | 386 | |
387 | if (screen.machine().input().code_pressed(KEYCODE_DOWN)) yoffs += screen.machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
388 | if (screen.machine().input().code_pressed(KEYCODE_UP)) yoffs -= screen.machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
389 | if (screen.machine().input().code_pressed(KEYCODE_LEFT) && texel_width > 4) { texel_width >>= 1; while (screen.machine().input().code_pressed(KEYCODE_LEFT)) ; } | |
390 | if (screen.machine().input().code_pressed(KEYCODE_RIGHT) && texel_width < 512) { texel_width <<= 1; while (screen.machine().input().code_pressed(KEYCODE_RIGHT)) ; } | |
387 | if (machine().input().code_pressed(KEYCODE_DOWN)) yoffs += machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
388 | if (machine().input().code_pressed(KEYCODE_UP)) yoffs -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1; | |
389 | if (machine().input().code_pressed(KEYCODE_LEFT) && texel_width > 4) { texel_width >>= 1; while (machine().input().code_pressed(KEYCODE_LEFT)) ; } | |
390 | if (machine().input().code_pressed(KEYCODE_RIGHT) && texel_width < 512) { texel_width <<= 1; while (machine().input().code_pressed(KEYCODE_RIGHT)) ; } | |
391 | 391 | |
392 | 392 | if (yoffs < 0) yoffs = 0; |
393 | 393 | base = (const UINT64 *)waveram0_ptr_from_expanded_addr(yoffs << 16); |
r17988 | r17989 | |
---|---|---|
159 | 159 | m_bg_tilemap->set_scrollx(0, m_scroll_x[0] + 256 * m_scroll_x[1]); |
160 | 160 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
161 | 161 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
162 | draw_sprites( | |
162 | draw_sprites( | |
163 | 163 | m_fg_tilemap->draw(bitmap, cliprect, 1, 0); |
164 | gridiron_draw_led(screen.machine(), bitmap, cliprect, m_led0, 0); | |
165 | gridiron_draw_led(screen.machine(), bitmap, cliprect, m_led1, 1); | |
164 | gridiron_draw_led(machine(), bitmap, cliprect, m_led0, 0); | |
165 | gridiron_draw_led(machine(), bitmap, cliprect, m_led1, 1); | |
166 | 166 | return 0; |
167 | 167 | } |
r17988 | r17989 | |
---|---|---|
239 | 239 | UINT32 bionicc_state::screen_update_bionicc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
240 | 240 | { |
241 | 241 | |
242 | bitmap.fill(get_black_pen( | |
242 | bitmap.fill(get_black_pen( | |
243 | 243 | m_fg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0); /* nothing in FRONT */ |
244 | 244 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
245 | 245 | m_fg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0); |
246 | draw_sprites( | |
246 | draw_sprites( | |
247 | 247 | m_fg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0); |
248 | 248 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
249 | 249 | return 0; |
r17988 | r17989 | |
---|---|---|
146 | 146 | int i; |
147 | 147 | |
148 | 148 | for (i = 0; i < 4; i++) |
149 | changecolor_RRRRGGGGBBBBxxxx( | |
149 | changecolor_RRRRGGGGBBBBxxxx( | |
150 | 150 | } |
151 | 151 | |
152 | 152 | |
r17988 | r17989 | |
157 | 157 | |
158 | 158 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
159 | 159 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
160 | draw_sprites( | |
160 | draw_sprites( | |
161 | 161 | return 0; |
162 | 162 | } |
r17988 | r17989 | |
---|---|---|
206 | 206 | fy = !fy; |
207 | 207 | y = 240 - y; |
208 | 208 | } |
209 | drawgfx_transpen(bitmap, cliprect, | |
209 | drawgfx_transpen(bitmap, cliprect, | |
210 | 210 | } |
211 | 211 | return 0; |
212 | 212 | } |
r17988 | r17989 | |
---|---|---|
66 | 66 | |
67 | 67 | k052109_tilemap_update(m_k052109); |
68 | 68 | |
69 | | |
69 | | |
70 | 70 | |
71 | 71 | if (!m_video_enable) |
72 | 72 | bitmap.fill(16 * m_layer_colorbase[0], cliprect); |
r17988 | r17989 | |
---|---|---|
529 | 529 | |
530 | 530 | tilemap_t *tmptilemap0, *tmptilemap1; |
531 | 531 | |
532 | flip_screen_set(~ | |
532 | flip_screen_set(~ | |
533 | 533 | |
534 | 534 | /* Layers enable (not quite right) */ |
535 | 535 | |
r17988 | r17989 | |
564 | 564 | /* For gfx banking for s1945jn/gunbird/btlkroad */ |
565 | 565 | if (m_ka302c_banking) |
566 | 566 | { |
567 | psikyo_switch_banks(screen.machine(), 0, (layer0_ctrl & 0x400) >> 10); | |
568 | psikyo_switch_banks(screen.machine(), 1, (layer1_ctrl & 0x400) >> 10); | |
567 | psikyo_switch_banks(machine(), 0, (layer0_ctrl & 0x400) >> 10); | |
568 | psikyo_switch_banks(machine(), 1, (layer1_ctrl & 0x400) >> 10); | |
569 | 569 | } |
570 | 570 | |
571 | 571 | switch ((layer0_ctrl & 0x00c0) >> 6) |
r17988 | r17989 | |
664 | 664 | m_tilemap_1_size2->set_transparent_pen((layer1_ctrl & 8 ? 0 : 15)); |
665 | 665 | m_tilemap_1_size3->set_transparent_pen((layer1_ctrl & 8 ? 0 : 15)); |
666 | 666 | |
667 | bitmap.fill(get_black_pen( | |
667 | bitmap.fill(get_black_pen( | |
668 | 668 | |
669 | | |
669 | | |
670 | 670 | |
671 | 671 | if (layers_ctrl & 1) |
672 | 672 | tmptilemap0->draw(bitmap, cliprect, layer0_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1); |
r17988 | r17989 | |
675 | 675 | tmptilemap1->draw(bitmap, cliprect, layer1_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2); |
676 | 676 | |
677 | 677 | if (layers_ctrl & 4) |
678 | draw_sprites( | |
678 | draw_sprites( | |
679 | 679 | |
680 | 680 | return 0; |
681 | 681 | } |
r17988 | r17989 | |
702 | 702 | |
703 | 703 | tilemap_t *tmptilemap0, *tmptilemap1; |
704 | 704 | |
705 | flip_screen_set(~ | |
705 | flip_screen_set(~ | |
706 | 706 | |
707 | 707 | /* Layers enable (not quite right) */ |
708 | 708 | |
r17988 | r17989 | |
737 | 737 | /* For gfx banking for s1945jn/gunbird/btlkroad */ |
738 | 738 | if (m_ka302c_banking) |
739 | 739 | { |
740 | psikyo_switch_banks(screen.machine(), 0, (layer0_ctrl & 0x400) >> 10); | |
741 | psikyo_switch_banks(screen.machine(), 1, (layer1_ctrl & 0x400) >> 10); | |
740 | psikyo_switch_banks(machine(), 0, (layer0_ctrl & 0x400) >> 10); | |
741 | psikyo_switch_banks(machine(), 1, (layer1_ctrl & 0x400) >> 10); | |
742 | 742 | } |
743 | 743 | |
744 | 744 | switch ((layer0_ctrl & 0x00c0) >> 6) |
r17988 | r17989 | |
837 | 837 | m_tilemap_1_size2->set_transparent_pen((layer1_ctrl & 8 ? 0 : 15)); |
838 | 838 | m_tilemap_1_size3->set_transparent_pen((layer1_ctrl & 8 ? 0 : 15)); |
839 | 839 | |
840 | bitmap.fill(get_black_pen( | |
840 | bitmap.fill(get_black_pen( | |
841 | 841 | |
842 | | |
842 | | |
843 | 843 | |
844 | 844 | if (layers_ctrl & 1) |
845 | 845 | tmptilemap0->draw(bitmap, cliprect, layer0_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 1); |
r17988 | r17989 | |
848 | 848 | tmptilemap1->draw(bitmap, cliprect, layer1_ctrl & 2 ? TILEMAP_DRAW_OPAQUE : 0, 2); |
849 | 849 | |
850 | 850 | if (layers_ctrl & 4) |
851 | draw_sprites_bootleg( | |
851 | draw_sprites_bootleg( | |
852 | 852 | |
853 | 853 | return 0; |
854 | 854 | } |
r17988 | r17989 | |
---|---|---|
496 | 496 | UINT32 playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
497 | 497 | { |
498 | 498 | |
499 | | |
499 | | |
500 | 500 | |
501 | 501 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
502 | 502 | if (m_bg_enable) |
503 | draw_bitmap(screen.machine(), bitmap, cliprect); | |
504 | draw_sprites(screen.machine(), bitmap, cliprect, 4); | |
503 | draw_bitmap(machine(), bitmap, cliprect); | |
504 | draw_sprites(machine(), bitmap, cliprect, 4); | |
505 | 505 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
506 | 506 | return 0; |
507 | 507 | } |
r17988 | r17989 | |
515 | 515 | { |
516 | 516 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
517 | 517 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
518 | bigtwinb_draw_sprites( | |
518 | bigtwinb_draw_sprites( | |
519 | 519 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
520 | 520 | } |
521 | 521 | else |
522 | bitmap.fill(get_black_pen( | |
522 | bitmap.fill(get_black_pen( | |
523 | 523 | return 0; |
524 | 524 | } |
525 | 525 | |
526 | 526 | UINT32 playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
527 | 527 | { |
528 | 528 | |
529 | | |
529 | | |
530 | 530 | |
531 | 531 | m_fg_tilemap->draw(bitmap, cliprect, 0, 1); |
532 | 532 | if (m_bg_enable) |
533 | draw_bitmap( | |
533 | draw_bitmap( | |
534 | 534 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
535 | draw_sprites( | |
535 | draw_sprites( | |
536 | 536 | return 0; |
537 | 537 | } |
538 | 538 | |
r17988 | r17989 | |
553 | 553 | m_fg_tilemap->set_scrollx(0, m_fgscrollx); |
554 | 554 | } |
555 | 555 | |
556 | | |
556 | | |
557 | 557 | |
558 | 558 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
559 | 559 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
560 | draw_sprites( | |
560 | draw_sprites( | |
561 | 561 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
562 | 562 | return 0; |
563 | 563 | } |
r17988 | r17989 | |
565 | 565 | UINT32 playmark_state::screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
566 | 566 | { |
567 | 567 | |
568 | | |
568 | | |
569 | 569 | |
570 | 570 | // video enabled |
571 | 571 | if (m_scroll[6] & 1) |
572 | 572 | { |
573 | 573 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
574 | 574 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
575 | draw_sprites( | |
575 | draw_sprites( | |
576 | 576 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
577 | 577 | } |
578 | 578 | else |
579 | bitmap.fill(get_black_pen( | |
579 | bitmap.fill(get_black_pen( | |
580 | 580 | return 0; |
581 | 581 | } |
r17988 | r17989 | |
---|---|---|
167 | 167 | { |
168 | 168 | int layers_ctrl = -1; |
169 | 169 | |
170 | | |
170 | | |
171 | 171 | |
172 | 172 | #ifdef MAME_DEBUG |
173 | if ( | |
173 | if ( | |
174 | 174 | { |
175 | 175 | int msk = 0; |
176 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
177 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
178 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 4; | |
176 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
177 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
178 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 4; | |
179 | 179 | if (msk != 0) layers_ctrl &= msk; |
180 | 180 | } |
181 | 181 | #endif |
r17988 | r17989 | |
218 | 218 | |
219 | 219 | } |
220 | 220 | |
221 | if (layers_ctrl & 4) | |
221 | if (layers_ctrl & 4) | |
222 | 222 | |
223 | 223 | // popmessage("%04x %04x %04x %04x %04x",head_unknown1[0],head_layersize[0],head_unknown3[0],head_unknown4[0],head_unknown5[0]); |
224 | 224 | return 0; |
r17988 | r17989 | |
---|---|---|
643 | 643 | |
644 | 644 | bitmap.fill(0x3ff, cliprect); // ddp2 igs logo needs 0x3ff |
645 | 645 | |
646 | | |
646 | | |
647 | 647 | |
648 | 648 | m_bg_tilemap->set_scrolly(0, m_videoregs[0x2000/2]); |
649 | 649 | |
r17988 | r17989 | |
653 | 653 | |
654 | 654 | m_bg_tilemap->draw(bitmap, cliprect, 0, 2); |
655 | 655 | |
656 | draw_sprites(this, | |
656 | draw_sprites(this, | |
657 | 657 | |
658 | 658 | m_tx_tilemap->set_scrolly(0, m_videoregs[0x5000/2]); |
659 | 659 | m_tx_tilemap->set_scrollx(0, m_videoregs[0x6000/2]); // Check |
r17988 | r17989 | |
---|---|---|
170 | 170 | UINT8 *videoram = m_videoram; |
171 | 171 | int pivot = 3; |
172 | 172 | int pri; |
173 | update_palette( | |
173 | update_palette( | |
174 | 174 | bitmap.fill(0xff, cliprect ); |
175 | 175 | |
176 | 176 | if( m_gametype != NAMCOS21_WINRUN91 ) |
r17988 | r17989 | |
179 | 179 | c355_obj_draw(bitmap, cliprect, 14 ); //driver's eyes |
180 | 180 | } |
181 | 181 | |
182 | CopyVisiblePolyFrameBuffer( | |
182 | CopyVisiblePolyFrameBuffer( | |
183 | 183 | |
184 | 184 | if( m_gametype != NAMCOS21_WINRUN91 ) |
185 | 185 | { /* draw low priority 2d sprites */ |
r17988 | r17989 | |
187 | 187 | c355_obj_draw(bitmap, cliprect, 1 ); |
188 | 188 | } |
189 | 189 | |
190 | CopyVisiblePolyFrameBuffer( | |
190 | CopyVisiblePolyFrameBuffer( | |
191 | 191 | |
192 | 192 | |
193 | 193 | if( m_gametype != NAMCOS21_WINRUN91 ) |
r17988 | r17989 | |
---|---|---|
361 | 361 | if( m_tick >= 5 ) { |
362 | 362 | m_tick = 0; |
363 | 363 | |
364 | if( | |
364 | if( | |
365 | 365 | m_debug_layer_disable ^= 0x1; |
366 | if( | |
366 | if( | |
367 | 367 | m_debug_layer_disable ^= 0x2; |
368 | if( | |
368 | if( | |
369 | 369 | m_debug_layer_disable ^= 0x4; |
370 | if( | |
370 | if( | |
371 | 371 | m_debug_layer_disable ^= 0x8; |
372 | if( | |
372 | if( | |
373 | 373 | m_debug_layer_disable ^= 0x10; |
374 | 374 | } |
375 | 375 | |
376 | 376 | bitmap.fill(0, cliprect); |
377 | 377 | |
378 | 378 | if (!(m_debug_layer_disable & 0x8)) |
379 | draw_layer( | |
379 | draw_layer( | |
380 | 380 | |
381 | 381 | if (!(m_debug_layer_disable & 0x4)) |
382 | draw_layer( | |
382 | draw_layer( | |
383 | 383 | |
384 | 384 | if( !(m_debug_layer_disable & 0x10) ) |
385 | 385 | { |
r17988 | r17989 | |
387 | 387 | if(m_real3d_display_list) { |
388 | 388 | m_zbuffer.fill(0, cliprect); |
389 | 389 | m_bitmap3d.fill(0x8000, cliprect); |
390 | real3d_traverse_display_list( | |
390 | real3d_traverse_display_list( | |
391 | 391 | } |
392 | 392 | #endif |
393 | 393 | copybitmap_trans(bitmap, m_bitmap3d, 0, 0, 0, 0, cliprect, 0x8000); |
394 | 394 | } |
395 | 395 | |
396 | 396 | if (!(m_debug_layer_disable & 0x2)) |
397 | draw_layer( | |
397 | draw_layer( | |
398 | 398 | |
399 | 399 | if (!(m_debug_layer_disable & 0x1)) |
400 | draw_layer( | |
400 | draw_layer( | |
401 | 401 | |
402 | 402 | //copy_screen(bitmap, cliprect); |
403 | 403 |
r17988 | r17989 | |
---|---|---|
175 | 175 | bank = (color & 0xe0) << 3; |
176 | 176 | color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); |
177 | 177 | |
178 | drawgfx_opaque(bitmap,cliprect, | |
178 | drawgfx_opaque(bitmap,cliprect, | |
179 | 179 | m_videoram[offs * 2 + 1] + bank, |
180 | 180 | color, |
181 | 181 | m_flipscreen,m_flipscreen, |
182 | 182 | x,y); |
183 | 183 | } |
184 | 184 | |
185 | draw_sprites( | |
185 | draw_sprites( | |
186 | 186 | |
187 | 187 | /* mask sprites */ |
188 | 188 | |
r17988 | r17989 | |
210 | 210 | bank = (color & 0xe0) << 3; |
211 | 211 | color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); |
212 | 212 | |
213 | drawgfx_opaque(bitmap,cliprect, | |
213 | drawgfx_opaque(bitmap,cliprect, | |
214 | 214 | m_videoram[offs * 2 + 1] + bank, |
215 | 215 | color, |
216 | 216 | m_flipscreen,m_flipscreen, |
r17988 | r17989 | |
---|---|---|
172 | 172 | /* if we're blanked, just fill with black */ |
173 | 173 | if (state.blanked) |
174 | 174 | { |
175 | bitmap.fill(get_black_pen( | |
175 | bitmap.fill(get_black_pen( | |
176 | 176 | return 0; |
177 | 177 | } |
178 | 178 |
r17988 | r17989 | |
---|---|---|
177 | 177 | bitmap.fill(768, cliprect); |
178 | 178 | |
179 | 179 | if (m_obj_on) |
180 | draw_sprites( | |
180 | draw_sprites( | |
181 | 181 | |
182 | 182 | if (m_text_on) |
183 | 183 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
586 | 586 | |
587 | 587 | void st0016_state::st0016_draw_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
588 | 588 | { |
589 | draw_bgmap(screen.machine(), bitmap,cliprect,0); | |
590 | draw_sprites(screen.machine(), bitmap,cliprect); | |
591 | draw_bgmap(screen.machine(), bitmap,cliprect,1); | |
589 | draw_bgmap(machine(), bitmap,cliprect,0); | |
590 | draw_sprites(machine(), bitmap,cliprect); | |
591 | draw_bgmap(machine(), bitmap,cliprect,1); | |
592 | 592 | } |
593 | 593 | |
594 | 594 | UINT32 st0016_state::screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
595 | 595 | { |
596 | 596 | |
597 | 597 | #ifdef MAME_DEBUG |
598 | if( | |
598 | if( | |
599 | 599 | { |
600 | 600 | int h,j; |
601 | 601 | FILE *p=fopen("vram.bin","wb"); |
r17988 | r17989 | |
---|---|---|
176 | 176 | m_bg_tilemap->set_scrolly(col, *m_scroll); |
177 | 177 | |
178 | 178 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
179 | draw_sprites( | |
179 | draw_sprites( | |
180 | 180 | return 0; |
181 | 181 | } |
r17988 | r17989 | |
---|---|---|
13 | 13 | |
14 | 14 | UINT32 funkyjet_state::screen_update_funkyjet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
15 | 15 | { |
16 | address_space &space = | |
16 | address_space &space = | |
17 | 17 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
18 | 18 | |
19 | 19 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
22 | 22 | bitmap.fill(768, cliprect); |
23 | 23 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
24 | 24 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
25 | | |
25 | | |
26 | 26 | return 0; |
27 | 27 | } |
r17988 | r17989 | |
---|---|---|
79 | 79 | k054338_update_all_shadows(m_k054338, 0); |
80 | 80 | k054338_fill_backcolor(m_k054338, bitmap, 0); |
81 | 81 | |
82 | | |
82 | | |
83 | 83 | |
84 | 84 | for (plane = 0; plane < 4; plane++) |
85 | 85 | { |
r17988 | r17989 | |
---|---|---|
129 | 129 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
130 | 130 | |
131 | 131 | m_textmap->draw(bitmap, cliprect, 0, 0); |
132 | draw_sprites( | |
132 | draw_sprites( | |
133 | 133 | return 0; |
134 | 134 | } |
r17988 | r17989 | |
---|---|---|
118 | 118 | m_bg_tilemap->set_scrolldx(x, x); |
119 | 119 | |
120 | 120 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
121 | himesiki_draw_sprites( | |
121 | himesiki_draw_sprites( | |
122 | 122 | |
123 | 123 | return 0; |
124 | 124 | } |
r17988 | r17989 | |
---|---|---|
94 | 94 | |
95 | 95 | m_bg_tilemap->set_scrollx(0, m_scroll_lsb | (m_scroll_msb << 8)); |
96 | 96 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
97 | draw_sprites( | |
97 | draw_sprites( | |
98 | 98 | |
99 | 99 | return 0; |
100 | 100 | } |
r17988 | r17989 | |
---|---|---|
242 | 242 | m_bg_tilemap->set_scrollx(row, m_scroll[row]); |
243 | 243 | |
244 | 244 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
245 | draw_sprites( | |
245 | draw_sprites( | |
246 | 246 | return 0; |
247 | 247 | } |
248 | 248 | |
r17988 | r17989 | |
352 | 352 | m_bg_tilemap->set_scrollx(row, m_scroll[row]); |
353 | 353 | |
354 | 354 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
355 | farwest_draw_sprites( | |
355 | farwest_draw_sprites( | |
356 | 356 | return 0; |
357 | 357 | } |
358 | 358 |
r17988 | r17989 | |
---|---|---|
103 | 103 | |
104 | 104 | UINT32 mrflea_state::screen_update_mrflea(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
105 | 105 | { |
106 | draw_background(screen.machine(), bitmap, cliprect); | |
107 | draw_sprites(screen.machine(), bitmap, cliprect); | |
106 | draw_background(machine(), bitmap, cliprect); | |
107 | draw_sprites(machine(), bitmap, cliprect); | |
108 | 108 | return 0; |
109 | 109 | } |
r17988 | r17989 | |
---|---|---|
76 | 76 | pen_t pens[0x20]; |
77 | 77 | offs_t offs; |
78 | 78 | |
79 | get_pens( | |
79 | get_pens( | |
80 | 80 | |
81 | 81 | for (offs = 0; offs < m_videoram.bytes(); offs++) |
82 | 82 | { |
r17988 | r17989 | |
---|---|---|
1792 | 1792 | /*NTSC SNES draw range is 1-225. */ |
1793 | 1793 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
1794 | 1794 | { |
1795 | snes_refresh_scanline( | |
1795 | snes_refresh_scanline( | |
1796 | 1796 | } |
1797 | 1797 | return 0; |
1798 | 1798 | } |
r17988 | r17989 | |
---|---|---|
199 | 199 | m_pant[1]->set_scrollx(0, m_vregs[3]); |
200 | 200 | |
201 | 201 | /* draw layers + sprites */ |
202 | bitmap.fill(get_black_pen( | |
202 | bitmap.fill(get_black_pen( | |
203 | 203 | copybitmap(bitmap, *m_screen_bitmap, 0, 0, 0x18, 0x24, cliprect); |
204 | 204 | m_pant[1]->draw(bitmap, cliprect, 0, 0); |
205 | 205 | m_pant[0]->draw(bitmap, cliprect, 0, 0); |
206 | draw_sprites( | |
206 | draw_sprites( | |
207 | 207 | return 0; |
208 | 208 | } |
r17988 | r17989 | |
---|---|---|
202 | 202 | { |
203 | 203 | int i; |
204 | 204 | |
205 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
206 | screen.machine().priority_bitmap.fill(0, cliprect); | |
205 | bitmap.fill(get_black_pen(machine()), cliprect); | |
206 | machine().priority_bitmap.fill(0, cliprect); | |
207 | 207 | |
208 | 208 | if (m_scroll1[2] != m_palette_bank1) |
209 | 209 | { |
r17988 | r17989 | |
228 | 228 | for (i = 0; i <= 3; i++) |
229 | 229 | { |
230 | 230 | #ifdef MAME_DEBUG |
231 | if (! | |
231 | if (! | |
232 | 232 | #endif |
233 | 233 | mcatadv_draw_tilemap_part(m_scroll1, m_videoram1, i, m_tilemap1, bitmap, cliprect); |
234 | 234 | |
235 | 235 | #ifdef MAME_DEBUG |
236 | if (! | |
236 | if (! | |
237 | 237 | #endif |
238 | 238 | mcatadv_draw_tilemap_part(m_scroll2, m_videoram2, i, m_tilemap2, bitmap, cliprect); |
239 | 239 | } |
240 | 240 | |
241 | 241 | g_profiler.start(PROFILER_USER1); |
242 | 242 | #ifdef MAME_DEBUG |
243 | if (! | |
243 | if (! | |
244 | 244 | #endif |
245 | draw_sprites ( | |
245 | draw_sprites ( | |
246 | 246 | g_profiler.stop(); |
247 | 247 | return 0; |
248 | 248 | } |
r17988 | r17989 | |
---|---|---|
293 | 293 | { |
294 | 294 | bitmap.fill(0, cliprect); |
295 | 295 | m_custom_priority_bitmap.fill(0, cliprect); |
296 | m_vdp1->gp9001_render_vdp( | |
296 | m_vdp1->gp9001_render_vdp( | |
297 | 297 | } |
298 | 298 | if (m_vdp0) |
299 | 299 | { |
300 | 300 | // bitmap.fill(0, cliprect); |
301 | 301 | m_custom_priority_bitmap.fill(0, cliprect); |
302 | m_vdp0->gp9001_render_vdp( | |
302 | m_vdp0->gp9001_render_vdp( | |
303 | 303 | } |
304 | 304 | |
305 | 305 | |
r17988 | r17989 | |
318 | 318 | { |
319 | 319 | bitmap.fill(0, cliprect); |
320 | 320 | m_custom_priority_bitmap.fill(0, cliprect); |
321 | m_vdp0->gp9001_render_vdp( | |
321 | m_vdp0->gp9001_render_vdp( | |
322 | 322 | } |
323 | 323 | if (m_vdp1) |
324 | 324 | { |
325 | 325 | m_secondary_render_bitmap.fill(0, cliprect); |
326 | 326 | m_custom_priority_bitmap.fill(0, cliprect); |
327 | m_vdp1->gp9001_render_vdp( | |
327 | m_vdp1->gp9001_render_vdp( | |
328 | 328 | } |
329 | 329 | |
330 | 330 | |
r17988 | r17989 | |
414 | 414 | { |
415 | 415 | bitmap.fill(0, cliprect); |
416 | 416 | m_custom_priority_bitmap.fill(0, cliprect); |
417 | m_vdp0->gp9001_render_vdp( | |
417 | m_vdp0->gp9001_render_vdp( | |
418 | 418 | } |
419 | 419 | |
420 | 420 | return 0; |
r17988 | r17989 | |
---|---|---|
212 | 212 | SCREEN_UPDATE32_CALL(vector); |
213 | 213 | vector_clear_list(); |
214 | 214 | |
215 | ccpu_wdt_timer_trigger( | |
215 | ccpu_wdt_timer_trigger( | |
216 | 216 | |
217 | 217 | return 0; |
218 | 218 | } |
r17988 | r17989 | |
227 | 227 | |
228 | 228 | UINT32 cinemat_state::screen_update_spacewar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
229 | 229 | { |
230 | int sw_option = | |
230 | int sw_option = | |
231 | 231 | |
232 | 232 | SCREEN_UPDATE32_CALL_MEMBER(cinemat); |
233 | 233 |
r17988 | r17989 | |
---|---|---|
128 | 128 | UINT32 mjkjidai_state::screen_update_mjkjidai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
129 | 129 | { |
130 | 130 | if (!m_display_enable) |
131 | bitmap.fill(get_black_pen( | |
131 | bitmap.fill(get_black_pen( | |
132 | 132 | else |
133 | 133 | { |
134 | 134 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
135 | draw_sprites( | |
135 | draw_sprites( | |
136 | 136 | } |
137 | 137 | return 0; |
138 | 138 | } |
r17988 | r17989 | |
---|---|---|
118 | 118 | } |
119 | 119 | |
120 | 120 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
121 | draw_sprites( | |
121 | draw_sprites( | |
122 | 122 | return 0; |
123 | 123 | } |
r17988 | r17989 | |
---|---|---|
191 | 191 | m_tilemap[1]->set_scrolly(0, m_vregs[2]); |
192 | 192 | m_tilemap[1]->set_scrollx(0, m_vregs[3]); |
193 | 193 | |
194 | | |
194 | | |
195 | 195 | bitmap.fill(0, cliprect); |
196 | 196 | |
197 | 197 | m_tilemap[1]->draw(bitmap, cliprect, 3, 0); |
r17988 | r17989 | |
206 | 206 | m_tilemap[1]->draw(bitmap, cliprect, 0, 4); |
207 | 207 | m_tilemap[0]->draw(bitmap, cliprect, 0, 4); |
208 | 208 | |
209 | draw_sprites( | |
209 | draw_sprites( | |
210 | 210 | return 0; |
211 | 211 | } |
212 | 212 | |
r17988 | r17989 | |
219 | 219 | m_tilemap[1]->set_scrolly(0, m_vregs[2]); |
220 | 220 | m_tilemap[1]->set_scrollx(0, m_vregs[3]); |
221 | 221 | |
222 | | |
222 | | |
223 | 223 | bitmap.fill(0, cliprect); |
224 | 224 | |
225 | 225 | m_tilemap[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
r17988 | r17989 | |
246 | 246 | m_tilemap[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 8); |
247 | 247 | m_tilemap[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 8); |
248 | 248 | |
249 | draw_sprites( | |
249 | draw_sprites( | |
250 | 250 | return 0; |
251 | 251 | } |
r17988 | r17989 | |
---|---|---|
1022 | 1022 | int cloud_sx, cloud_sy; |
1023 | 1023 | int i, j, k; |
1024 | 1024 | |
1025 | mrct = | |
1025 | mrct = | |
1026 | 1026 | |
1027 | 1027 | video_on = m_irqctrl & 0x40; |
1028 | 1028 | |
1029 | set_led_status( | |
1029 | set_led_status( | |
1030 | 1030 | |
1031 | 1031 | fg_y = (m_txtram[0x0f24>>1] & (TILEMAP_DIMY - 1)); |
1032 | 1032 | bg_y = (m_txtram[0x0f26>>1] & (TILEMAP_DIMY - 1)); |
r17988 | r17989 | |
1054 | 1054 | /* palette hacks! */ |
1055 | 1055 | ((pen_t *)mrct)[0x27] = mrct[0x24]; |
1056 | 1056 | |
1057 | get_sprite_info( | |
1057 | get_sprite_info( | |
1058 | 1058 | |
1059 | 1059 | bitmap.fill(m_black_pen, cliprect); |
1060 | 1060 | |
1061 | 1061 | /* Draw the road (lines which have priority 0x02) */ |
1062 | if (video_on) wecleman_draw_road( | |
1062 | if (video_on) wecleman_draw_road( | |
1063 | 1063 | |
1064 | 1064 | /* Draw the background */ |
1065 | 1065 | if (video_on) m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
1073 | 1073 | if (video_on) |
1074 | 1074 | draw_cloud( |
1075 | 1075 | bitmap, |
1076 | | |
1076 | | |
1077 | 1077 | m_pageram+0x1800, |
1078 | 1078 | BMP_PAD, BMP_PAD, |
1079 | 1079 | 41, 20, |
r17988 | r17989 | |
1093 | 1093 | if (video_on) m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
1094 | 1094 | |
1095 | 1095 | /* Draw the road (lines which have priority 0x04) */ |
1096 | if (video_on) wecleman_draw_road( | |
1096 | if (video_on) wecleman_draw_road( | |
1097 | 1097 | |
1098 | 1098 | /* Draw the sprites */ |
1099 | if (video_on) sprite_draw( | |
1099 | if (video_on) sprite_draw( | |
1100 | 1100 | |
1101 | 1101 | /* Draw the text layer */ |
1102 | 1102 | if (video_on) m_txt_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
1109 | 1109 | |
1110 | 1110 | UINT32 wecleman_state::screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1111 | 1111 | { |
1112 | device_t *k051316_1 = screen.machine().device("k051316_1"); | |
1113 | device_t *k051316_2 = screen.machine().device("k051316_2"); | |
1112 | device_t *k051316_1 = machine().device("k051316_1"); | |
1113 | device_t *k051316_2 = machine().device("k051316_2"); | |
1114 | 1114 | int video_on; |
1115 | 1115 | |
1116 | 1116 | video_on = m_irqctrl & 0x40; |
1117 | 1117 | |
1118 | set_led_status( | |
1118 | set_led_status( | |
1119 | 1119 | |
1120 | get_sprite_info( | |
1120 | get_sprite_info( | |
1121 | 1121 | |
1122 | 1122 | bitmap.fill(m_black_pen, cliprect); |
1123 | 1123 | |
r17988 | r17989 | |
1127 | 1127 | |
1128 | 1128 | /* Draw the road */ |
1129 | 1129 | if (video_on) |
1130 | hotchase_draw_road( | |
1130 | hotchase_draw_road( | |
1131 | 1131 | |
1132 | 1132 | /* Draw the sprites */ |
1133 | 1133 | if (video_on) |
1134 | sprite_draw( | |
1134 | sprite_draw( | |
1135 | 1135 | |
1136 | 1136 | /* Draw the foreground (text) */ |
1137 | 1137 | if (video_on) |
r17988 | r17989 | |
---|---|---|
238 | 238 | #endif |
239 | 239 | |
240 | 240 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
241 | draw_sprites( | |
241 | draw_sprites( | |
242 | 242 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
243 | 243 | |
244 | 244 | m_txt_tilemap->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
---|---|---|
148 | 148 | { |
149 | 149 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
150 | 150 | |
151 | draw_sprite_and_check_collision( | |
151 | draw_sprite_and_check_collision( | |
152 | 152 | |
153 | 153 | return 0; |
154 | 154 | } |
r17988 | r17989 | |
---|---|---|
203 | 203 | m_background->draw(bitmap, cliprect_scroll, 0, 0); |
204 | 204 | m_foreground->draw(bitmap, cliprect_scroll, 0, 0); |
205 | 205 | |
206 | draw_sprites( | |
206 | draw_sprites( | |
207 | 207 | return 0; |
208 | 208 | } |
r17988 | r17989 | |
---|---|---|
299 | 299 | fg_clip.min_x = 28*8; |
300 | 300 | } |
301 | 301 | |
302 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
303 | draw_stars(screen.machine(),bitmap,cliprect,flip_screen()); | |
302 | bitmap.fill(get_black_pen(machine()), cliprect); | |
303 | draw_stars(machine(),bitmap,cliprect,flip_screen()); | |
304 | 304 | |
305 | 305 | m_bg_tilemap->draw(bitmap, bg_clip, 0,0); |
306 | 306 | m_fg_tilemap->draw(bitmap, fg_clip, 0,0); |
307 | 307 | |
308 | draw_sprites( | |
308 | draw_sprites( | |
309 | 309 | |
310 | 310 | /* draw the high priority characters */ |
311 | 311 | m_bg_tilemap->draw(bitmap, bg_clip, 1,0); |
312 | 312 | m_fg_tilemap->draw(bitmap, fg_clip, 1,0); |
313 | 313 | |
314 | draw_bullets( | |
314 | draw_bullets( | |
315 | 315 | |
316 | 316 | return 0; |
317 | 317 | } |
r17988 | r17989 | |
---|---|---|
150 | 150 | |
151 | 151 | UINT32 munchmo_state::screen_update_mnchmobl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
152 | 152 | { |
153 | draw_background(screen.machine(), bitmap, cliprect); | |
154 | draw_sprites(screen.machine(), bitmap, cliprect); | |
155 | draw_status(screen.machine(), bitmap, cliprect); | |
153 | draw_background(machine(), bitmap, cliprect); | |
154 | draw_sprites(machine(), bitmap, cliprect); | |
155 | draw_status(machine(), bitmap, cliprect); | |
156 | 156 | return 0; |
157 | 157 | } |
r17988 | r17989 | |
---|---|---|
158 | 158 | UINT32 funkybee_state::screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
159 | 159 | { |
160 | 160 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
161 | draw_sprites(screen.machine(), bitmap, cliprect); | |
162 | draw_columns(screen.machine(), bitmap, cliprect); | |
161 | draw_sprites(machine(), bitmap, cliprect); | |
162 | draw_columns(machine(), bitmap, cliprect); | |
163 | 163 | return 0; |
164 | 164 | } |
r17988 | r17989 | |
---|---|---|
434 | 434 | |
435 | 435 | UINT32 galastrm_state::screen_update_galastrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
436 | 436 | { |
437 | device_t *tc0100scn = screen.machine().device("tc0100scn"); | |
438 | device_t *tc0480scp = screen.machine().device("tc0480scp"); | |
437 | device_t *tc0100scn = machine().device("tc0100scn"); | |
438 | device_t *tc0480scp = machine().device("tc0480scp"); | |
439 | 439 | UINT8 layer[5]; |
440 | 440 | UINT8 pivlayer[3]; |
441 | 441 | UINT16 priority; |
442 | 442 | static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; |
443 | bitmap_ind8 &priority_bitmap = | |
443 | bitmap_ind8 &priority_bitmap = | |
444 | 444 | |
445 | 445 | rectangle clip(0, screen.width() -1, 0, screen.height() -1); |
446 | 446 | |
r17988 | r17989 | |
468 | 468 | #if 0 |
469 | 469 | if (layer[0]==0 && layer[1]==3 && layer[2]==2 && layer[3]==1) |
470 | 470 | { |
471 | if (!screen.machine().input().code_pressed(KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[0], 0, 1); | |
472 | if (!screen.machine().input().code_pressed(KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[1], 0, 4); | |
473 | if (!screen.machine().input().code_pressed(KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[2], 0, 4); | |
474 | if (!screen.machine().input().code_pressed(KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[3], 0, 4); | |
471 | if (!machine().input().code_pressed(KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[0], 0, 1); | |
472 | if (!machine().input().code_pressed(KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[1], 0, 4); | |
473 | if (!machine().input().code_pressed(KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[2], 0, 4); | |
474 | if (!machine().input().code_pressed(KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[3], 0, 4); | |
475 | 475 | } |
476 | 476 | else |
477 | 477 | { |
478 | if (!screen.machine().input().code_pressed(KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[0], 0, 1); | |
479 | if (!screen.machine().input().code_pressed(KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[1], 0, 2); | |
480 | if (!screen.machine().input().code_pressed(KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[2], 0, 4); | |
481 | if (!screen.machine().input().code_pressed(KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[3], 0, 8); | |
478 | if (!machine().input().code_pressed(KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[0], 0, 1); | |
479 | if (!machine().input().code_pressed(KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[1], 0, 2); | |
480 | if (!machine().input().code_pressed(KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[2], 0, 4); | |
481 | if (!machine().input().code_pressed(KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, m_tmpbitmaps, clip, layer[3], 0, 8); | |
482 | 482 | } |
483 | 483 | |
484 | 484 | if (layer[0]==3 && layer[1]==0 && layer[2]==1 && layer[3]==2) |
r17988 | r17989 | |
497 | 497 | } |
498 | 498 | } |
499 | 499 | |
500 | draw_sprites_pre(screen.machine(), 42-X_OFFSET, -571+Y_OFFSET); | |
501 | draw_sprites(screen.machine(),m_tmpbitmaps,clip,primasks,1); | |
500 | draw_sprites_pre(machine(), 42-X_OFFSET, -571+Y_OFFSET); | |
501 | draw_sprites(machine(),m_tmpbitmaps,clip,primasks,1); | |
502 | 502 | |
503 | 503 | copybitmap_trans(bitmap,m_polybitmap,0,0, 0,0,cliprect,0); |
504 | 504 | m_polybitmap->fill(0, clip); |
505 | tc0610_rotate_draw( | |
505 | tc0610_rotate_draw( | |
506 | 506 | |
507 | 507 | priority_bitmap.fill(0, cliprect); |
508 | draw_sprites( | |
508 | draw_sprites( | |
509 | 509 | |
510 | if (!screen.machine().input().code_pressed(KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0); | |
511 | if (!screen.machine().input().code_pressed(KEYCODE_M)) tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); | |
510 | if (!machine().input().code_pressed(KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0); | |
511 | if (!machine().input().code_pressed(KEYCODE_M)) tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); | |
512 | 512 | |
513 | 513 | |
514 | 514 | |
r17988 | r17989 | |
544 | 544 | } |
545 | 545 | } |
546 | 546 | |
547 | draw_sprites_pre(screen.machine(), 42-X_OFFSET, -571+Y_OFFSET); | |
548 | draw_sprites(screen.machine(),m_tmpbitmaps,clip,primasks,1); | |
547 | draw_sprites_pre(machine(), 42-X_OFFSET, -571+Y_OFFSET); | |
548 | draw_sprites(machine(),m_tmpbitmaps,clip,primasks,1); | |
549 | 549 | |
550 | 550 | copybitmap_trans(bitmap,m_polybitmap,0,0, 0,0,cliprect,0); |
551 | 551 | m_polybitmap.fill(0, clip); |
552 | tc0610_rotate_draw( | |
552 | tc0610_rotate_draw( | |
553 | 553 | |
554 | 554 | priority_bitmap.fill(0, cliprect); |
555 | draw_sprites( | |
555 | draw_sprites( | |
556 | 556 | |
557 | 557 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0); |
558 | 558 | tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); |
r17988 | r17989 | |
---|---|---|
431 | 431 | |
432 | 432 | /* Black background color */ |
433 | 433 | bitmap.fill(0, cliprect); |
434 | | |
434 | | |
435 | 435 | |
436 | 436 | /* Flip Screen */ |
437 | 437 | if (flipscreen != m_flipscreen_old) |
438 | 438 | { |
439 | 439 | m_flipscreen_old = flipscreen; |
440 | | |
440 | | |
441 | 441 | } |
442 | 442 | |
443 | 443 | /* Flip Screen */ |
r17988 | r17989 | |
499 | 499 | else if (asc_pri == 2) |
500 | 500 | m_tilemap_fg->draw(bitmap, cliprect, 0, 1 << 2); |
501 | 501 | |
502 | tetrisp2_draw_sprites( | |
502 | tetrisp2_draw_sprites( | |
503 | 503 | m_spriteram, m_spriteram.bytes(), 0, (m_systemregs[0x00] & 0x02) ); |
504 | 504 | return 0; |
505 | 505 | } |
r17988 | r17989 | |
516 | 516 | |
517 | 517 | /* Black background color */ |
518 | 518 | bitmap.fill(0, cliprect); |
519 | | |
519 | | |
520 | 520 | |
521 | 521 | /* Flip Screen */ |
522 | 522 | if (flipscreen != m_flipscreen_old) |
523 | 523 | { |
524 | 524 | m_flipscreen_old = flipscreen; |
525 | | |
525 | | |
526 | 526 | } |
527 | 527 | |
528 | 528 | /* Flip Screen */ |
r17988 | r17989 | |
584 | 584 | else if (asc_pri == 2) |
585 | 585 | m_tilemap_fg->draw(bitmap, cliprect, 0, 1 << 2); |
586 | 586 | |
587 | tetrisp2_draw_sprites( | |
587 | tetrisp2_draw_sprites( | |
588 | 588 | m_spriteram, m_spriteram.bytes(), 0, (m_systemregs[0x00] & 0x02) ); |
589 | 589 | return 0; |
590 | 590 | } |
r17988 | r17989 | |
605 | 605 | m_tilemap_sub_rot->set_scrollx(0, m_rocknms_sub_rotregs[ 0 ] + 0x400); |
606 | 606 | m_tilemap_sub_rot->set_scrolly(0, m_rocknms_sub_rotregs[ 2 ] + 0x400); |
607 | 607 | |
608 | bitmap.fill(screen.machine().pens[0x0000], cliprect); | |
609 | screen.machine().priority_bitmap.fill(0, cliprect); | |
608 | bitmap.fill(machine().pens[0x0000], cliprect); | |
609 | machine().priority_bitmap.fill(0, cliprect); | |
610 | 610 | |
611 | 611 | asc_pri = scr_pri = rot_pri = 0; |
612 | 612 | |
r17988 | r17989 | |
646 | 646 | else if (asc_pri == 2) |
647 | 647 | m_tilemap_sub_fg->draw(bitmap, cliprect, 0, 1 << 2); |
648 | 648 | |
649 | tetrisp2_draw_sprites( | |
649 | tetrisp2_draw_sprites( | |
650 | 650 | m_spriteram2, m_spriteram2.bytes(), 4, (m_systemregs[0x00] & 0x02) ); |
651 | 651 | |
652 | 652 | return 0; |
r17988 | r17989 | |
666 | 666 | m_tilemap_rot->set_scrolly(0, m_rotregs[ 2 ] + 0x400); |
667 | 667 | |
668 | 668 | /* Black background color */ |
669 | bitmap.fill(screen.machine().pens[0x0000], cliprect); | |
670 | screen.machine().priority_bitmap.fill(0, cliprect); | |
669 | bitmap.fill(machine().pens[0x0000], cliprect); | |
670 | machine().priority_bitmap.fill(0, cliprect); | |
671 | 671 | |
672 | 672 | asc_pri = scr_pri = rot_pri = 0; |
673 | 673 | |
r17988 | r17989 | |
707 | 707 | else if (asc_pri == 2) |
708 | 708 | m_tilemap_fg->draw(bitmap, cliprect, 0, 1 << 2); |
709 | 709 | |
710 | tetrisp2_draw_sprites( | |
710 | tetrisp2_draw_sprites( | |
711 | 711 | m_spriteram, m_spriteram.bytes(), 0, (m_systemregs[0x00] & 0x02) ); |
712 | 712 | |
713 | 713 | return 0; |
r17988 | r17989 | |
761 | 761 | { |
762 | 762 | |
763 | 763 | bitmap.fill(0, cliprect); |
764 | | |
764 | | |
765 | 765 | |
766 | tetrisp2_draw_sprites( | |
766 | tetrisp2_draw_sprites( | |
767 | 767 | m_spriteram, m_spriteram.bytes(), 1, (m_systemregs[0x00] & 0x02) ); |
768 | 768 | return 0; |
769 | 769 | } |
r17988 | r17989 | |
771 | 771 | { |
772 | 772 | |
773 | 773 | bitmap.fill(0, cliprect); |
774 | | |
774 | | |
775 | 775 | |
776 | tetrisp2_draw_sprites( | |
776 | tetrisp2_draw_sprites( | |
777 | 777 | m_spriteram3, m_spriteram3.bytes(), 1, (m_systemregs[0x00] & 0x02) ); |
778 | 778 | return 0; |
779 | 779 | } |
r17988 | r17989 | |
782 | 782 | { |
783 | 783 | |
784 | 784 | bitmap.fill(0, cliprect); |
785 | | |
785 | | |
786 | 786 | |
787 | tetrisp2_draw_sprites( | |
787 | tetrisp2_draw_sprites( | |
788 | 788 | m_spriteram2, m_spriteram2.bytes(), 0, (m_systemregs[0x00] & 0x02) ); |
789 | 789 | |
790 | 790 | m_tilemap_fg->draw(bitmap, cliprect, 0, 1 << 2); |
r17988 | r17989 | |
---|---|---|
260 | 260 | |
261 | 261 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
262 | 262 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
263 | draw_sprites( | |
263 | draw_sprites( | |
264 | 264 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
265 | draw_sprites( | |
265 | draw_sprites( | |
266 | 266 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
267 | 267 | return 0; |
268 | 268 | } |
r17988 | r17989 | |
273 | 273 | if (m_tilemap_priority) |
274 | 274 | { |
275 | 275 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | TILEMAP_DRAW_OPAQUE, 0); |
276 | draw_sprites( | |
276 | draw_sprites( | |
277 | 277 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
278 | 278 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
279 | draw_sprites( | |
279 | draw_sprites( | |
280 | 280 | } |
281 | 281 | else |
282 | 282 | { |
283 | 283 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
284 | 284 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
285 | draw_sprites( | |
285 | draw_sprites( | |
286 | 286 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
287 | draw_sprites( | |
287 | draw_sprites( | |
288 | 288 | } |
289 | 289 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
290 | 290 | return 0; |
r17988 | r17989 | |
---|---|---|
128 | 128 | { |
129 | 129 | |
130 | 130 | if (m_last_bank != m_bank_base) |
131 | | |
131 | | |
132 | 132 | |
133 | 133 | m_last_bank = m_bank_base; |
134 | | |
134 | | |
135 | 135 | |
136 | 136 | bitmap.fill(2047, cliprect); |
137 | 137 | //AT |
138 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800); | |
139 | draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800); | |
140 | draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0000, 0x0800); | |
141 | draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x0000, 0x07c0); | |
138 | draw_sprites(machine(), bitmap, cliprect, 0, 0x07c0, 0x0800); | |
139 | draw_sprites(machine(), bitmap, cliprect, 1, 0x0000, 0x0800); | |
140 | draw_sprites(machine(), bitmap, cliprect, 2, 0x0000, 0x0800); | |
141 | draw_sprites(machine(), bitmap, cliprect, 0, 0x0000, 0x07c0); | |
142 | 142 | //ZT |
143 | 143 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | 144 | return 0; |
r17988 | r17989 | |
274 | 274 | UINT16 *spriteram = m_spriteram; |
275 | 275 | |
276 | 276 | if (m_last_bank != m_bank_base) |
277 | | |
277 | | |
278 | 278 | |
279 | 279 | m_last_bank = m_bank_base; |
280 | | |
280 | | |
281 | 281 | |
282 | 282 | bitmap.fill(4095, cliprect); |
283 | 283 | |
284 | 284 | /* This appears to be correct priority */ |
285 | 285 | if (m_microcontroller_id == 0x8814) /* Sky Adventure */ |
286 | 286 | { |
287 | draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0, 0x8000, 0x7fff); | |
288 | draw_sprites_V(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0, 0x8000, 0x7fff); | |
287 | draw_sprites_V(machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0, 0x8000, 0x7fff); | |
288 | draw_sprites_V(machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0, 0x8000, 0x7fff); | |
289 | 289 | //AT: *KLUDGE* fixes priest priority in level 1(could be a game bug) |
290 | 290 | if (spriteram[0x1bde] == 0x24 && (spriteram[0x1bdf] >> 8) == 0x3b) |
291 | 291 | { |
292 | draw_sprites_V(screen.machine(), bitmap, cliprect, 2, 0x03c0, 0x0800, 0, 0x8000, 0x7fff); | |
293 | draw_sprites_V(screen.machine(), bitmap, cliprect, 2, 0x0000, 0x03c0, 0, 0x8000, 0x7fff); | |
292 | draw_sprites_V(machine(), bitmap, cliprect, 2, 0x03c0, 0x0800, 0, 0x8000, 0x7fff); | |
293 | draw_sprites_V(machine(), bitmap, cliprect, 2, 0x0000, 0x03c0, 0, 0x8000, 0x7fff); | |
294 | 294 | } |
295 | 295 | else |
296 | draw_sprites_V( | |
296 | draw_sprites_V( | |
297 | 297 | |
298 | draw_sprites_V( | |
298 | draw_sprites_V( | |
299 | 299 | } |
300 | 300 | else /* gangwars */ |
301 | 301 | { |
302 | draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x8000, 0, 0x7fff); | |
303 | draw_sprites_V(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0x8000, 0, 0x7fff); | |
304 | draw_sprites_V(screen.machine(), bitmap, cliprect, 2, 0x0000, 0x0800, 0x8000, 0, 0x7fff); | |
305 | draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x0000, 0x07c0, 0x8000, 0, 0x7fff); | |
302 | draw_sprites_V(machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x8000, 0, 0x7fff); | |
303 | draw_sprites_V(machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0x8000, 0, 0x7fff); | |
304 | draw_sprites_V(machine(), bitmap, cliprect, 2, 0x0000, 0x0800, 0x8000, 0, 0x7fff); | |
305 | draw_sprites_V(machine(), bitmap, cliprect, 0, 0x0000, 0x07c0, 0x8000, 0, 0x7fff); | |
306 | 306 | } |
307 | 307 | |
308 | 308 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
313 | 313 | { |
314 | 314 | |
315 | 315 | if (m_last_bank != m_bank_base) |
316 | | |
316 | | |
317 | 317 | |
318 | 318 | m_last_bank = m_bank_base; |
319 | | |
319 | | |
320 | 320 | |
321 | 321 | bitmap.fill(4095, cliprect); |
322 | 322 | |
323 | 323 | /* This appears to be correct priority */ |
324 | draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x4000, 0x8000, 0x3fff); | |
325 | draw_sprites_V(screen.machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0x4000, 0x8000, 0x3fff); | |
326 | draw_sprites_V(screen.machine(), bitmap, cliprect, 2, 0x0000, 0x0800, 0x4000, 0x8000, 0x3fff); | |
327 | draw_sprites_V(screen.machine(), bitmap, cliprect, 0, 0x0000, 0x07c0, 0x4000, 0x8000, 0x3fff); | |
324 | draw_sprites_V(machine(), bitmap, cliprect, 0, 0x07c0, 0x0800, 0x4000, 0x8000, 0x3fff); | |
325 | draw_sprites_V(machine(), bitmap, cliprect, 1, 0x0000, 0x0800, 0x4000, 0x8000, 0x3fff); | |
326 | draw_sprites_V(machine(), bitmap, cliprect, 2, 0x0000, 0x0800, 0x4000, 0x8000, 0x3fff); | |
327 | draw_sprites_V(machine(), bitmap, cliprect, 0, 0x0000, 0x07c0, 0x4000, 0x8000, 0x3fff); | |
328 | 328 | |
329 | 329 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
330 | 330 | return 0; |
r17988 | r17989 | |
364 | 364 | { |
365 | 365 | int yshift = (m_microcontroller_id == 0x890a) ? 1 : 0; // The Next Space is 1 pixel off |
366 | 366 | |
367 | bitmap.fill(get_black_pen( | |
367 | bitmap.fill(get_black_pen( | |
368 | 368 | |
369 | 369 | /* This appears to be correct priority */ |
370 | draw_sprites_I(screen.machine(), bitmap, cliprect, 2, 0x0800, yshift); | |
371 | draw_sprites_I(screen.machine(), bitmap, cliprect, 3, 0x0c00, yshift); | |
372 | draw_sprites_I(screen.machine(), bitmap, cliprect, 1, 0x0400, yshift); | |
370 | draw_sprites_I(machine(), bitmap, cliprect, 2, 0x0800, yshift); | |
371 | draw_sprites_I(machine(), bitmap, cliprect, 3, 0x0c00, yshift); | |
372 | draw_sprites_I(machine(), bitmap, cliprect, 1, 0x0400, yshift); | |
373 | 373 | return 0; |
374 | 374 | } |
375 | 375 | //ZT |
r17988 | r17989 | |
496 | 496 | |
497 | 497 | UINT32 alpha68k_state::screen_update_kyros(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
498 | 498 | { |
499 | colortable_entry_set_value( | |
499 | colortable_entry_set_value( | |
500 | 500 | bitmap.fill(0x100, cliprect); //AT |
501 | 501 | |
502 | kyros_draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0800); | |
503 | kyros_draw_sprites(screen.machine(), bitmap, cliprect, 3, 0x0c00); | |
504 | kyros_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x0400); | |
502 | kyros_draw_sprites(machine(), bitmap, cliprect, 2, 0x0800); | |
503 | kyros_draw_sprites(machine(), bitmap, cliprect, 3, 0x0c00); | |
504 | kyros_draw_sprites(machine(), bitmap, cliprect, 1, 0x0400); | |
505 | 505 | return 0; |
506 | 506 | } |
507 | 507 | |
r17988 | r17989 | |
555 | 555 | |
556 | 556 | UINT32 alpha68k_state::screen_update_sstingry(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
557 | 557 | { |
558 | colortable_entry_set_value( | |
558 | colortable_entry_set_value( | |
559 | 559 | bitmap.fill(0x100, cliprect); //AT |
560 | 560 | |
561 | sstingry_draw_sprites(screen.machine(), bitmap, cliprect, 2, 0x0800); | |
562 | sstingry_draw_sprites(screen.machine(), bitmap, cliprect, 3, 0x0c00); | |
563 | sstingry_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x0400); | |
561 | sstingry_draw_sprites(machine(), bitmap, cliprect, 2, 0x0800); | |
562 | sstingry_draw_sprites(machine(), bitmap, cliprect, 3, 0x0c00); | |
563 | sstingry_draw_sprites(machine(), bitmap, cliprect, 1, 0x0400); | |
564 | 564 | return 0; |
565 | 565 | } |
r17988 | r17989 | |
---|---|---|
186 | 186 | |
187 | 187 | } |
188 | 188 | |
189 | draw_sprites( | |
189 | draw_sprites( | |
190 | 190 | |
191 | 191 | // popmessage ("x %04x x %04x x %04x x %04x x %04x", m_vidregs2[0], m_vidregs[12], m_vidregs[13], m_vidregs[14], m_vidregs[15]); |
192 | 192 | // popmessage ("x %04x x %04x y %04x y %04x z %04x z %04x",m_vidregs[0],m_vidregs[1],m_vidregs[2],m_vidregs[3],m_vidregs[4],m_vidregs[5]); |
r17988 | r17989 | |
---|---|---|
134 | 134 | UINT32 freekick_state::screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
135 | 135 | { |
136 | 136 | m_freek_tilemap->draw(bitmap, cliprect, 0, 0); |
137 | gigas_draw_sprites( | |
137 | gigas_draw_sprites( | |
138 | 138 | return 0; |
139 | 139 | } |
140 | 140 | |
141 | 141 | UINT32 freekick_state::screen_update_pbillrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
142 | 142 | { |
143 | 143 | m_freek_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | pbillrd_draw_sprites( | |
144 | pbillrd_draw_sprites( | |
145 | 145 | return 0; |
146 | 146 | } |
147 | 147 | |
148 | 148 | UINT32 freekick_state::screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
149 | 149 | { |
150 | 150 | m_freek_tilemap->draw(bitmap, cliprect, 0, 0); |
151 | freekick_draw_sprites( | |
151 | freekick_draw_sprites( | |
152 | 152 | return 0; |
153 | 153 | } |
r17988 | r17989 | |
---|---|---|
2781 | 2781 | |
2782 | 2782 | UINT32 namcos22_state::screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
2783 | 2783 | { |
2784 | UpdateVideoMixer(screen.machine()); | |
2785 | UpdatePalette(screen.machine()); | |
2786 | namcos22s_recalc_czram(screen.machine()); | |
2787 | screen.machine().priority_bitmap.fill(0, cliprect); | |
2784 | UpdateVideoMixer(machine()); | |
2785 | UpdatePalette(machine()); | |
2786 | namcos22s_recalc_czram(machine()); | |
2787 | machine().priority_bitmap.fill(0, cliprect); | |
2788 | 2788 | |
2789 | 2789 | // background color |
2790 | 2790 | rgbint bg_color; |
r17988 | r17989 | |
2799 | 2799 | |
2800 | 2800 | // layers |
2801 | 2801 | UINT8 layer = nthbyte(m_gamma,0x1f); |
2802 | if (layer&4) DrawCharacterLayer(screen.machine(), bitmap, cliprect); | |
2803 | if (layer&2) DrawSprites(screen.machine(), bitmap, cliprect); | |
2804 | if (layer&1) DrawPolygons(screen.machine(), bitmap); | |
2805 | RenderScene(screen.machine(), bitmap ); | |
2806 | if (layer&4) namcos22s_mix_textlayer(screen.machine(), bitmap, cliprect, 6); | |
2807 | ApplyGamma(screen.machine(), bitmap); | |
2802 | if (layer&4) DrawCharacterLayer(machine(), bitmap, cliprect); | |
2803 | if (layer&2) DrawSprites(machine(), bitmap, cliprect); | |
2804 | if (layer&1) DrawPolygons(machine(), bitmap); | |
2805 | RenderScene(machine(), bitmap ); | |
2806 | if (layer&4) namcos22s_mix_textlayer(machine(), bitmap, cliprect, 6); | |
2807 | ApplyGamma(machine(), bitmap); | |
2808 | 2808 | |
2809 | 2809 | // debug stuff |
2810 | 2810 | #if ALLOW_MEMDUMP |
2811 | if( | |
2811 | if( | |
2812 | 2812 | { |
2813 | 2813 | FILE *f = fopen( "dump.txt", "wb" ); |
2814 | 2814 | if( f ) |
r17988 | r17989 | |
2852 | 2852 | //Dump(space, f,0xc00000, 0xc1ffff, "polygonram"); |
2853 | 2853 | fclose( f ); |
2854 | 2854 | } |
2855 | while( | |
2855 | while( | |
2856 | 2856 | } |
2857 | 2857 | #endif |
2858 | 2858 | |
r17988 | r17989 | |
2863 | 2863 | |
2864 | 2864 | UINT32 namcos22_state::screen_update_namcos22(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
2865 | 2865 | { |
2866 | UpdateVideoMixer(screen.machine()); | |
2867 | UpdatePalette(screen.machine()); | |
2868 | screen.machine().priority_bitmap.fill(0, cliprect); | |
2869 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
2870 | DrawPolygons(screen.machine(), bitmap); | |
2871 | RenderScene(screen.machine(), bitmap); | |
2872 | DrawCharacterLayer(screen.machine(), bitmap, cliprect); | |
2873 | ApplyGamma(screen.machine(), bitmap); | |
2866 | UpdateVideoMixer(machine()); | |
2867 | UpdatePalette(machine()); | |
2868 | machine().priority_bitmap.fill(0, cliprect); | |
2869 | bitmap.fill(get_black_pen(machine()), cliprect); | |
2870 | DrawPolygons(machine(), bitmap); | |
2871 | RenderScene(machine(), bitmap); | |
2872 | DrawCharacterLayer(machine(), bitmap, cliprect); | |
2873 | ApplyGamma(machine(), bitmap); | |
2874 | 2874 | |
2875 | 2875 | #if ALLOW_MEMDUMP |
2876 | if( | |
2876 | if( | |
2877 | 2877 | { |
2878 | 2878 | FILE *f = fopen( "dump.txt", "wb" ); |
2879 | 2879 | if( f ) |
r17988 | r17989 | |
2887 | 2887 | //Dump(space, f,0x70000000, 0x7001ffff, "polygonram"); |
2888 | 2888 | fclose( f ); |
2889 | 2889 | } |
2890 | while( | |
2890 | while( | |
2891 | 2891 | } |
2892 | 2892 | #endif |
2893 | 2893 |
r17988 | r17989 | |
---|---|---|
421 | 421 | { |
422 | 422 | // falling edge |
423 | 423 | if (!state) |
424 | redclash_update_stars_state( | |
424 | redclash_update_stars_state( | |
425 | 425 | } |
426 | 426 | |
427 | 427 | UINT32 ladybug_state::screen_update_redclash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
428 | 428 | { |
429 | 429 | |
430 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
431 | redclash_draw_stars(screen.machine(), bitmap, cliprect, 0x60, 0, 0x00, 0xff); | |
432 | draw_sprites(screen.machine(), bitmap, cliprect); | |
433 | draw_bullets(screen.machine(), bitmap, cliprect); | |
430 | bitmap.fill(get_black_pen(machine()), cliprect); | |
431 | redclash_draw_stars(machine(), bitmap, cliprect, 0x60, 0, 0x00, 0xff); | |
432 | draw_sprites(machine(), bitmap, cliprect); | |
433 | draw_bullets(machine(), bitmap, cliprect); | |
434 | 434 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
435 | 435 | return 0; |
436 | 436 | } |
r17988 | r17989 | |
---|---|---|
138 | 138 | |
139 | 139 | UINT32 vicdual_state::screen_update_vicdual_bw_or_color(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
140 | 140 | { |
141 | if (vicdual_is_cabinet_color( | |
141 | if (vicdual_is_cabinet_color( | |
142 | 142 | SCREEN_UPDATE32_CALL_MEMBER(vicdual_color); |
143 | 143 | else |
144 | 144 | SCREEN_UPDATE32_CALL_MEMBER(vicdual_bw); |
r17988 | r17989 | |
---|---|---|
1756 | 1756 | UINT32 galaxold_state::screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1757 | 1757 | { |
1758 | 1758 | |
1759 | (*m_draw_background)( | |
1759 | (*m_draw_background)( | |
1760 | 1760 | |
1761 | 1761 | if (m_stars_on) |
1762 | 1762 | { |
1763 | (*m_draw_stars)( | |
1763 | (*m_draw_stars)( | |
1764 | 1764 | } |
1765 | 1765 | |
1766 | 1766 | |
r17988 | r17989 | |
1768 | 1768 | |
1769 | 1769 | if (m_draw_bullets) |
1770 | 1770 | { |
1771 | draw_bullets_common( | |
1771 | draw_bullets_common( | |
1772 | 1772 | } |
1773 | 1773 | |
1774 | 1774 | |
1775 | draw_sprites( | |
1775 | draw_sprites( | |
1776 | 1776 | |
1777 | 1777 | if (m_spriteram2_present) |
1778 | 1778 | { |
1779 | draw_sprites( | |
1779 | draw_sprites( | |
1780 | 1780 | } |
1781 | 1781 | return 0; |
1782 | 1782 | } |
r17988 | r17989 | |
1787 | 1787 | int i, j; |
1788 | 1788 | UINT8 color; |
1789 | 1789 | |
1790 | (*m_draw_background)( | |
1790 | (*m_draw_background)( | |
1791 | 1791 | |
1792 | 1792 | if (m_stars_on) |
1793 | 1793 | { |
1794 | (*m_draw_stars)( | |
1794 | (*m_draw_stars)( | |
1795 | 1795 | } |
1796 | 1796 | |
1797 | 1797 | /* save the background for drawing it again later, if background has priority over characters */ |
r17988 | r17989 | |
1801 | 1801 | |
1802 | 1802 | if (m_draw_bullets) |
1803 | 1803 | { |
1804 | draw_bullets_common( | |
1804 | draw_bullets_common( | |
1805 | 1805 | } |
1806 | 1806 | |
1807 | draw_sprites( | |
1807 | draw_sprites( | |
1808 | 1808 | |
1809 | 1809 | if (m_dambustr_bg_priority) |
1810 | 1810 | { |
1811 | 1811 | /* draw the upper part of the background, as it has priority */ |
1812 | dambustr_draw_upper_background( | |
1812 | dambustr_draw_upper_background( | |
1813 | 1813 | |
1814 | 1814 | /* only rows with color code > 3 are stronger than the background */ |
1815 | 1815 | memset(m_dambustr_videoram2, 0x20, 0x0400); |
r17988 | r17989 | |
---|---|---|
442 | 442 | int x = spriteram[offs + 0x20]; |
443 | 443 | int y = 240 - spriteram[offs + 0x10]; |
444 | 444 | |
445 | drawgfx_transmask(bitmap, spriteclip, | |
445 | drawgfx_transmask(bitmap, spriteclip, | |
446 | 446 | } |
447 | 447 | return 0; |
448 | 448 | } |
r17988 | r17989 | |
451 | 451 | UINT32 centiped_state::screen_update_warlords(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
452 | 452 | { |
453 | 453 | UINT8 *spriteram = m_spriteram; |
454 | int upright_mode = | |
454 | int upright_mode = | |
455 | 455 | int offs; |
456 | 456 | |
457 | 457 | /* if the cocktail/upright switch flipped, force refresh */ |
r17988 | r17989 | |
487 | 487 | flipx = !flipx; |
488 | 488 | } |
489 | 489 | |
490 | drawgfx_transpen(bitmap, cliprect, | |
490 | drawgfx_transpen(bitmap, cliprect, | |
491 | 491 | } |
492 | 492 | return 0; |
493 | 493 | } |
r17988 | r17989 | |
518 | 518 | int x = spriteram[offs + 0x20]; |
519 | 519 | int y = 240 - spriteram[offs + 0x10]; |
520 | 520 | |
521 | drawgfx_transpen(bitmap, spriteclip, | |
521 | drawgfx_transpen(bitmap, spriteclip, | |
522 | 522 | } |
523 | 523 | return 0; |
524 | 524 | } |
r17988 | r17989 | |
555 | 555 | flipy = !flipy; |
556 | 556 | } |
557 | 557 | |
558 | drawgfx_transmask(bitmap, spriteclip, | |
558 | drawgfx_transmask(bitmap, spriteclip, | |
559 | 559 | } |
560 | 560 | return 0; |
561 | 561 | } |
r17988 | r17989 | |
---|---|---|
645 | 645 | UINT8 layer[3]; |
646 | 646 | |
647 | 647 | #ifdef MAME_DEBUG |
648 | if ( | |
648 | if ( | |
649 | 649 | { |
650 | 650 | m_dislayer[0] ^= 1; |
651 | 651 | popmessage("piv0: %01x",m_dislayer[0]); |
652 | 652 | } |
653 | 653 | |
654 | if ( | |
654 | if ( | |
655 | 655 | { |
656 | 656 | m_dislayer[1] ^= 1; |
657 | 657 | popmessage("piv1: %01x",m_dislayer[1]); |
658 | 658 | } |
659 | 659 | |
660 | if ( | |
660 | if ( | |
661 | 661 | { |
662 | 662 | m_dislayer[2] ^= 1; |
663 | 663 | popmessage("piv2: %01x",m_dislayer[2]); |
664 | 664 | } |
665 | 665 | |
666 | if ( | |
666 | if ( | |
667 | 667 | { |
668 | 668 | m_dislayer[3] ^= 1; |
669 | 669 | popmessage("TC0100SCN top bg layer: %01x",m_dislayer[3]); |
r17988 | r17989 | |
695 | 695 | #ifdef MAME_DEBUG |
696 | 696 | if (m_dislayer[layer[0]] == 0) |
697 | 697 | #endif |
698 | wgp_piv_layer_draw( | |
698 | wgp_piv_layer_draw( | |
699 | 699 | |
700 | 700 | #ifdef MAME_DEBUG |
701 | 701 | if (m_dislayer[layer[1]] == 0) |
702 | 702 | #endif |
703 | wgp_piv_layer_draw( | |
703 | wgp_piv_layer_draw( | |
704 | 704 | |
705 | 705 | #ifdef MAME_DEBUG |
706 | 706 | if (m_dislayer[layer[2]] == 0) |
707 | 707 | #endif |
708 | wgp_piv_layer_draw( | |
708 | wgp_piv_layer_draw( | |
709 | 709 | |
710 | draw_sprites( | |
710 | draw_sprites( | |
711 | 711 | |
712 | 712 | /* ... then here we should apply rotation from wgp_sate_ctrl[] to the bitmap before we draw the TC0100SCN layers on it */ |
713 | 713 | layer[0] = tc0100scn_bottomlayer(m_tc0100scn); |
r17988 | r17989 | |
---|---|---|
238 | 238 | m_char_tilemap->set_scrollx(0, m_scrollx); |
239 | 239 | m_char_tilemap->set_scrolly(0, m_scrolly); |
240 | 240 | |
241 | draw_background( | |
241 | draw_background( | |
242 | 242 | m_char_tilemap->draw(bitmap, cliprect, 0, 0); |
243 | draw_sprites( | |
243 | draw_sprites( | |
244 | 244 | return 0; |
245 | 245 | } |
r17988 | r17989 | |
---|---|---|
156 | 156 | |
157 | 157 | UINT32 sprint8_state::screen_update_sprint8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
158 | 158 | { |
159 | set_pens(this, | |
159 | set_pens(this, | |
160 | 160 | m_tilemap1->draw(bitmap, cliprect, 0, 0); |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | return 0; |
163 | 163 | } |
164 | 164 | |
r17988 | r17989 | |
170 | 170 | { |
171 | 171 | int x; |
172 | 172 | int y; |
173 | const rectangle &visarea = | |
173 | const rectangle &visarea = | |
174 | 174 | |
175 | 175 | m_tilemap2->draw(m_helper2, visarea, 0, 0); |
176 | 176 | |
177 | 177 | m_helper1.fill(0x20, visarea); |
178 | 178 | |
179 | draw_sprites( | |
179 | draw_sprites( | |
180 | 180 | |
181 | 181 | for (y = visarea.min_y; y <= visarea.max_y; y++) |
182 | 182 | { |
r17988 | r17989 | |
185 | 185 | |
186 | 186 | for (x = visarea.min_x; x <= visarea.max_x; x++) |
187 | 187 | if (p1[x] != 0x20 && p2[x] == 0x23) |
188 | | |
188 | | |
189 | 189 | FUNC(sprint8_collision_callback), |
190 | colortable_entry_get_value( | |
190 | colortable_entry_get_value( | |
191 | 191 | } |
192 | 192 | } |
193 | 193 | } |
r17988 | r17989 | |
---|---|---|
981 | 981 | SCREEN_UPDATE16_CALL_MEMBER(ssv); |
982 | 982 | |
983 | 983 | // draw zooming sprites |
984 | m_gdfs_st0020->st0020_draw_all( | |
984 | m_gdfs_st0020->st0020_draw_all( | |
985 | 985 | |
986 | 986 | m_gdfs_tmap->set_scrollx(0, m_gdfs_tmapscroll[0x0c/2]); |
987 | 987 | m_gdfs_tmap->set_scrolly(0, m_gdfs_tmapscroll[0x10/2]); |
r17988 | r17989 | |
1039 | 1039 | if (!m_enable_video) |
1040 | 1040 | return 0; |
1041 | 1041 | |
1042 | draw_layer( | |
1042 | draw_layer( | |
1043 | 1043 | |
1044 | draw_sprites( | |
1044 | draw_sprites( | |
1045 | 1045 | |
1046 | 1046 | |
1047 | 1047 | return 0; |
r17988 | r17989 | |
---|---|---|
49 | 49 | |
50 | 50 | flip_screen_set(m_tilegen1->get_flip_state()); |
51 | 51 | |
52 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
53 | m_spritegen->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f); | |
54 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
52 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
53 | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f); | |
54 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
55 | 55 | |
56 | 56 | /* HB always keeps pf2 on top of pf3, no need explicitly support priority register */ |
57 | 57 | |
58 | m_spritegen->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f); | |
59 | m_tilegen1->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
58 | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f); | |
59 | m_tilegen1->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
60 | 60 | return 0; |
61 | 61 | } |
62 | 62 | |
r17988 | r17989 | |
69 | 69 | /* WARNING: inverted wrt Midnight Resistance */ |
70 | 70 | if ((m_pri & 0x01) == 0) |
71 | 71 | { |
72 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
73 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
72 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
73 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
74 | 74 | |
75 | 75 | if (m_pri & 2) |
76 | m_tilegen2->deco_bac06_pf_draw( | |
76 | m_tilegen2->deco_bac06_pf_draw( | |
77 | 77 | |
78 | m_spritegen->draw_sprites( | |
78 | m_spritegen->draw_sprites( | |
79 | 79 | |
80 | 80 | if (m_pri & 4) |
81 | m_tilegen3->deco_bac06_pf_draw( | |
81 | m_tilegen3->deco_bac06_pf_draw( | |
82 | 82 | } |
83 | 83 | else |
84 | 84 | { |
85 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
86 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
85 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
86 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
87 | 87 | |
88 | 88 | if (m_pri & 2) |
89 | m_tilegen3->deco_bac06_pf_draw( | |
89 | m_tilegen3->deco_bac06_pf_draw( | |
90 | 90 | |
91 | m_spritegen->draw_sprites( | |
91 | m_spritegen->draw_sprites( | |
92 | 92 | |
93 | 93 | if (m_pri & 4) |
94 | m_tilegen2->deco_bac06_pf_draw( | |
94 | m_tilegen2->deco_bac06_pf_draw( | |
95 | 95 | } |
96 | 96 | |
97 | m_tilegen1->deco_bac06_pf_draw( | |
97 | m_tilegen1->deco_bac06_pf_draw( | |
98 | 98 | return 0; |
99 | 99 | } |
100 | 100 | |
r17988 | r17989 | |
117 | 117 | /* Robocop uses it only for the title screen, so this might be just */ |
118 | 118 | /* completely wrong. The top 8 bits of the register might mean */ |
119 | 119 | /* something (they are 0x80 in midres, 0x00 here) */ |
120 | m_tilegen2->deco_bac06_pf_draw( | |
120 | m_tilegen2->deco_bac06_pf_draw( | |
121 | 121 | |
122 | 122 | if (m_pri & 0x02) |
123 | m_spritegen->draw_sprites( | |
123 | m_spritegen->draw_sprites( | |
124 | 124 | |
125 | m_tilegen3->deco_bac06_pf_draw( | |
125 | m_tilegen3->deco_bac06_pf_draw( | |
126 | 126 | } |
127 | 127 | else |
128 | 128 | { |
129 | m_tilegen3->deco_bac06_pf_draw( | |
129 | m_tilegen3->deco_bac06_pf_draw( | |
130 | 130 | |
131 | 131 | if (m_pri & 0x02) |
132 | m_spritegen->draw_sprites( | |
132 | m_spritegen->draw_sprites( | |
133 | 133 | |
134 | m_tilegen2->deco_bac06_pf_draw( | |
134 | m_tilegen2->deco_bac06_pf_draw( | |
135 | 135 | } |
136 | 136 | |
137 | 137 | if (m_pri & 0x02) |
138 | m_spritegen->draw_sprites( | |
138 | m_spritegen->draw_sprites( | |
139 | 139 | else |
140 | m_spritegen->draw_sprites( | |
140 | m_spritegen->draw_sprites( | |
141 | 141 | |
142 | m_tilegen1->deco_bac06_pf_draw( | |
142 | m_tilegen1->deco_bac06_pf_draw( | |
143 | 143 | return 0; |
144 | 144 | } |
145 | 145 | |
r17988 | r17989 | |
151 | 151 | // layer enables seem different... where are they? |
152 | 152 | |
153 | 153 | // the bootleg doesn't write these registers, I think they're hardcoded?, so fake them for compatibility with our implementation.. |
154 | address_space &space = | |
154 | address_space &space = | |
155 | 155 | deco_bac06_pf_control_0_w(m_tilegen1,space,0,0x0003, 0x00ff); // 8x8 |
156 | 156 | deco_bac06_pf_control_0_w(m_tilegen1,space,1,0x0003, 0x00ff); |
157 | 157 | deco_bac06_pf_control_0_w(m_tilegen1,space,2,0x0000, 0x00ff); |
r17988 | r17989 | |
187 | 187 | |
188 | 188 | if (m_pri & 0x01) |
189 | 189 | { |
190 | m_tilegen2->deco_bac06_pf_draw( | |
190 | m_tilegen2->deco_bac06_pf_draw( | |
191 | 191 | |
192 | 192 | if (m_pri & 0x02) |
193 | m_spritegen->draw_sprites( | |
193 | m_spritegen->draw_sprites( | |
194 | 194 | |
195 | m_tilegen3->deco_bac06_pf_draw( | |
195 | m_tilegen3->deco_bac06_pf_draw( | |
196 | 196 | } |
197 | 197 | else |
198 | 198 | { |
199 | m_tilegen3->deco_bac06_pf_draw( | |
199 | m_tilegen3->deco_bac06_pf_draw( | |
200 | 200 | |
201 | 201 | if (m_pri & 0x02) |
202 | m_spritegen->draw_sprites( | |
202 | m_spritegen->draw_sprites( | |
203 | 203 | |
204 | m_tilegen2->deco_bac06_pf_draw( | |
204 | m_tilegen2->deco_bac06_pf_draw( | |
205 | 205 | } |
206 | 206 | |
207 | 207 | if (m_pri & 0x02) |
208 | m_spritegen->draw_sprites_bootleg( | |
208 | m_spritegen->draw_sprites_bootleg( | |
209 | 209 | else |
210 | m_spritegen->draw_sprites_bootleg( | |
210 | m_spritegen->draw_sprites_bootleg( | |
211 | 211 | |
212 | m_tilegen1->deco_bac06_pf_draw( | |
212 | m_tilegen1->deco_bac06_pf_draw( | |
213 | 213 | return 0; |
214 | 214 | } |
215 | 215 | |
r17988 | r17989 | |
219 | 219 | // layer enables seem different... where are they? |
220 | 220 | |
221 | 221 | // the bootleg doesn't write these registers, I think they're hardcoded?, so fake them for compatibility with our implementation.. |
222 | address_space &space = | |
222 | address_space &space = | |
223 | 223 | deco_bac06_pf_control_0_w(m_tilegen1,space,0,0x0003, 0x00ff); // 8x8 |
224 | 224 | deco_bac06_pf_control_0_w(m_tilegen1,space,1,0x0003, 0x00ff); |
225 | 225 | deco_bac06_pf_control_0_w(m_tilegen1,space,2,0x0000, 0x00ff); |
r17988 | r17989 | |
247 | 247 | |
248 | 248 | flip_screen_set(m_tilegen1->get_flip_state()); |
249 | 249 | |
250 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
251 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
250 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
251 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
252 | 252 | |
253 | m_spritegen->draw_sprites_bootleg( | |
253 | m_spritegen->draw_sprites_bootleg( | |
254 | 254 | |
255 | 255 | /* Redraw top 8 pens of top 8 palettes over sprites */ |
256 | 256 | if (m_pri&0x80) |
257 | m_tilegen2->deco_bac06_pf_draw( | |
257 | m_tilegen2->deco_bac06_pf_draw( | |
258 | 258 | |
259 | m_tilegen1->deco_bac06_pf_draw( | |
259 | m_tilegen1->deco_bac06_pf_draw( | |
260 | 260 | return 0; |
261 | 261 | } |
262 | 262 | |
r17988 | r17989 | |
270 | 270 | |
271 | 271 | /* This game doesn't have the extra playfield chip on the game board, but |
272 | 272 | the palette does show through. */ |
273 | bitmap.fill(screen.machine().pens[768], cliprect); | |
274 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
275 | m_spritegen->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); | |
276 | m_tilegen1->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
273 | bitmap.fill(machine().pens[768], cliprect); | |
274 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
275 | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); | |
276 | m_tilegen1->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
277 | 277 | return 0; |
278 | 278 | } |
279 | 279 | |
r17988 | r17989 | |
285 | 285 | |
286 | 286 | if (m_pri & 0x01) |
287 | 287 | { |
288 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
289 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
288 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
289 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
290 | 290 | } |
291 | 291 | else |
292 | 292 | { |
293 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
294 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
293 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
294 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
295 | 295 | } |
296 | 296 | |
297 | m_spritegen->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); | |
298 | m_tilegen1->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
297 | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); | |
298 | m_tilegen1->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
299 | 299 | return 0; |
300 | 300 | } |
301 | 301 | |
r17988 | r17989 | |
305 | 305 | { |
306 | 306 | flip_screen_set(m_tilegen1->get_flip_state()); |
307 | 307 | |
308 | m_tilegen3->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
309 | m_tilegen2->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
308 | m_tilegen3->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
309 | m_tilegen2->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
310 | 310 | |
311 | m_spritegen->draw_sprites( | |
311 | m_spritegen->draw_sprites( | |
312 | 312 | |
313 | 313 | /* Redraw top 8 pens of top 8 palettes over sprites */ |
314 | 314 | if (m_pri&0x80) |
315 | m_tilegen2->deco_bac06_pf_draw( | |
315 | m_tilegen2->deco_bac06_pf_draw( | |
316 | 316 | |
317 | m_tilegen1->deco_bac06_pf_draw( | |
317 | m_tilegen1->deco_bac06_pf_draw( | |
318 | 318 | return 0; |
319 | 319 | } |
320 | 320 | |
r17988 | r17989 | |
332 | 332 | |
333 | 333 | if (m_pri & 0x01) |
334 | 334 | { |
335 | m_tilegen2->deco_bac06_pf_draw( | |
335 | m_tilegen2->deco_bac06_pf_draw( | |
336 | 336 | |
337 | 337 | if (m_pri & 0x02) |
338 | m_spritegen->draw_sprites( | |
338 | m_spritegen->draw_sprites( | |
339 | 339 | |
340 | m_tilegen3->deco_bac06_pf_draw( | |
340 | m_tilegen3->deco_bac06_pf_draw( | |
341 | 341 | } |
342 | 342 | else |
343 | 343 | { |
344 | m_tilegen3->deco_bac06_pf_draw( | |
344 | m_tilegen3->deco_bac06_pf_draw( | |
345 | 345 | |
346 | 346 | if (m_pri & 0x02) |
347 | m_spritegen->draw_sprites( | |
347 | m_spritegen->draw_sprites( | |
348 | 348 | |
349 | m_tilegen2->deco_bac06_pf_draw( | |
349 | m_tilegen2->deco_bac06_pf_draw( | |
350 | 350 | } |
351 | 351 | |
352 | 352 | if (m_pri & 0x02) |
353 | m_spritegen->draw_sprites( | |
353 | m_spritegen->draw_sprites( | |
354 | 354 | else |
355 | m_spritegen->draw_sprites( | |
355 | m_spritegen->draw_sprites( | |
356 | 356 | |
357 | m_tilegen1->deco_bac06_pf_draw( | |
357 | m_tilegen1->deco_bac06_pf_draw( | |
358 | 358 | return 0; |
359 | 359 | } |
360 | 360 |
r17988 | r17989 | |
---|---|---|
601 | 601 | |
602 | 602 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, 0, 0); |
603 | 603 | |
604 | draw_sprites( | |
604 | draw_sprites( | |
605 | 605 | |
606 | 606 | copybitmap_trans(bitmap, *m_framebuffer[1], 0, 0, 0, 0, cliprect, 0); |
607 | 607 | |
608 | 608 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
609 | 609 | |
610 | draw_sprites( | |
610 | draw_sprites( | |
611 | 611 | |
612 | 612 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0); |
613 | 613 |
r17988 | r17989 | |
---|---|---|
179 | 179 | |
180 | 180 | UINT32 atarig42_state::screen_update_atarig42(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
181 | 181 | { |
182 | bitmap_ind8 &priority_bitmap = | |
182 | bitmap_ind8 &priority_bitmap = | |
183 | 183 | |
184 | 184 | /* draw the playfield */ |
185 | 185 | priority_bitmap.fill(0, cliprect); |
r17988 | r17989 | |
---|---|---|
534 | 534 | { |
535 | 535 | m_c45_road->draw(bitmap, cliprect, pri * 2); |
536 | 536 | m_c45_road->draw(bitmap, cliprect, pri * 2 + 1); |
537 | draw_sprites( | |
537 | draw_sprites( | |
538 | 538 | } |
539 | 539 | |
540 | 540 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
207 | 207 | m_bg_tilemap->set_scrolly(0, m_vreg[3]); |
208 | 208 | |
209 | 209 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
210 | draw_sprites( | |
210 | draw_sprites( | |
211 | 211 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
212 | 212 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0 ); |
213 | 213 | return 0; |
r17988 | r17989 | |
---|---|---|
163 | 163 | m_bak_tilemap->draw(bitmap, cliprect, 0, 0); |
164 | 164 | m_mid_tilemap->draw(bitmap, cliprect, 0, 0); |
165 | 165 | |
166 | draw_sprites( | |
166 | draw_sprites( | |
167 | 167 | |
168 | 168 | m_bak_tilemap->draw(bitmap, cliprect, 1, 0); |
169 | 169 | m_mid_tilemap->draw(bitmap, cliprect, 1, 0); |
r17988 | r17989 | |
---|---|---|
723 | 723 | m_sprite_yoffs = m_videoregs[0x04 / 2] - screen.height() / 2; |
724 | 724 | |
725 | 725 | /* The background color is selected by a register */ |
726 | | |
726 | | |
727 | 727 | bitmap.fill((m_videoregs[0x12/2] & 0x0fff) + 0x1000, cliprect); |
728 | 728 | |
729 | 729 | /* Screen Control Register: |
r17988 | r17989 | |
761 | 761 | |
762 | 762 | |
763 | 763 | #ifdef MAME_DEBUG |
764 | if ( | |
764 | if ( | |
765 | 765 | { |
766 | 766 | int msk = 0; |
767 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
768 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
769 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
770 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
767 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
768 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
769 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
770 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
771 | 771 | if (msk != 0) |
772 | 772 | { |
773 | 773 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
785 | 785 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_k053936_tilemap, 0, 0, 1); |
786 | 786 | |
787 | 787 | for (pri = 3; pri >= 0; pri--) |
788 | draw_layers( | |
788 | draw_layers( | |
789 | 789 | |
790 | 790 | if (layers_ctrl & 0x08) |
791 | metro_draw_sprites( | |
791 | metro_draw_sprites( | |
792 | 792 | return 0; |
793 | 793 | } |
r17988 | r17989 | |
---|---|---|
271 | 271 | if ((m_layer_ctrl & 0x80) == 0x00) |
272 | 272 | m_bgtop_tilemap->draw(bitmap, clip, 0, 0); |
273 | 273 | |
274 | draw_sprites( | |
274 | draw_sprites( | |
275 | 275 | |
276 | 276 | if ((m_layer_ctrl & 0x20) == 0x00) |
277 | 277 | m_tx_tilemap->draw(bitmap, clip, 0, 0); |
r17988 | r17989 | |
282 | 282 | if ((m_layer_ctrl & 0x40) == 0x00) |
283 | 283 | m_bgbot_tilemap->draw(bitmap, clip, 0, 0); |
284 | 284 | |
285 | draw_sprites( | |
285 | draw_sprites( | |
286 | 286 | |
287 | 287 | if ((m_layer_ctrl & 0x20) == 0x00) |
288 | 288 | m_tx_tilemap->draw(bitmap, clip, 0, 0); |
r17988 | r17989 | |
---|---|---|
206 | 206 | |
207 | 207 | bitmap.fill(0, cliprect); |
208 | 208 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
209 | draw_sprites( | |
209 | draw_sprites( | |
210 | 210 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
211 | 211 | return 0; |
212 | 212 | } |
r17988 | r17989 | |
---|---|---|
174 | 174 | UINT32 mikie_state::screen_update_mikie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
175 | 175 | { |
176 | 176 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(0), 0); |
177 | draw_sprites( | |
177 | draw_sprites( | |
178 | 178 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1), 0); |
179 | 179 | return 0; |
180 | 180 | } |
r17988 | r17989 | |
---|---|---|
44 | 44 | layer[0] = 0; |
45 | 45 | layer[1] = 1; |
46 | 46 | |
47 | | |
47 | | |
48 | 48 | |
49 | 49 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1); |
50 | 50 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
67 | 67 | |
68 | 68 | konami_sortlayers3(layer, m_layerpri); |
69 | 69 | |
70 | | |
70 | | |
71 | 71 | bitmap.fill(16 * bg_colorbase, cliprect); |
72 | 72 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[0], 0, 1); |
73 | 73 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
247 | 247 | |
248 | 248 | // 3 layers of sprites, each with their own palette and priorities |
249 | 249 | // Not perfect yet, does spriteram(1) layer have a priority bit somewhere? |
250 | draw_sprites(screen.machine(),bitmap,cliprect,m_spriteram2,2,1); | |
251 | draw_sprites(screen.machine(),bitmap,cliprect,m_spriteram,1,0); | |
252 | draw_sprites(screen.machine(),bitmap,cliprect,m_spriteram2+0x20,0,1); | |
250 | draw_sprites(machine(),bitmap,cliprect,m_spriteram2,2,1); | |
251 | draw_sprites(machine(),bitmap,cliprect,m_spriteram,1,0); | |
252 | draw_sprites(machine(),bitmap,cliprect,m_spriteram2+0x20,0,1); | |
253 | 253 | |
254 | 254 | return 0; |
255 | 255 | } |
r17988 | r17989 | |
---|---|---|
222 | 222 | |
223 | 223 | /* Suna Quiz indicates the background is the last pen */ |
224 | 224 | bitmap.fill(0xff, cliprect); |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | return 0; |
227 | 227 | } |
228 | 228 | |
r17988 | r17989 | |
231 | 231 | int layers_ctrl = -1; |
232 | 232 | |
233 | 233 | #ifdef MAME_DEBUG |
234 | if ( | |
234 | if ( | |
235 | 235 | { int msk = 0; |
236 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
237 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
236 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
237 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
238 | 238 | if (msk != 0) layers_ctrl &= msk; |
239 | 239 | } |
240 | 240 | #endif |
241 | 241 | |
242 | 242 | /* Suna Quiz indicates the background is the last pen */ |
243 | 243 | bitmap.fill(0xff, cliprect); |
244 | if (layers_ctrl & 1) draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram, 0); | |
245 | if (layers_ctrl & 2) draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram2, 1); | |
244 | if (layers_ctrl & 1) draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0); | |
245 | if (layers_ctrl & 2) draw_sprites(machine(), bitmap, cliprect, m_spriteram2, 1); | |
246 | 246 | return 0; |
247 | 247 | } |
r17988 | r17989 | |
---|---|---|
126 | 126 | { |
127 | 127 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
128 | 128 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
129 | draw_sprites( | |
129 | draw_sprites( | |
130 | 130 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
131 | 131 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
132 | 132 | return 0; |
r17988 | r17989 | |
---|---|---|
153 | 153 | |
154 | 154 | UINT32 shadfrce_state::screen_update_shadfrce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
155 | 155 | { |
156 | | |
156 | | |
157 | 157 | |
158 | 158 | if (m_video_enable) |
159 | 159 | { |
160 | 160 | m_bg1tilemap->draw(bitmap, cliprect, 0,0); |
161 | 161 | m_bg0tilemap->draw(bitmap, cliprect, 0,1); |
162 | draw_sprites( | |
162 | draw_sprites( | |
163 | 163 | m_fgtilemap->draw(bitmap, cliprect, 0,0); |
164 | 164 | } |
165 | 165 | else |
166 | 166 | { |
167 | bitmap.fill(get_black_pen( | |
167 | bitmap.fill(get_black_pen( | |
168 | 168 | } |
169 | 169 | |
170 | 170 | return 0; |
r17988 | r17989 | |
---|---|---|
189 | 189 | UINT32 tagteam_state::screen_update_tagteam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
190 | 190 | { |
191 | 191 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
192 | draw_sprites( | |
192 | draw_sprites( | |
193 | 193 | return 0; |
194 | 194 | } |
r17988 | r17989 | |
---|---|---|
149 | 149 | return 0; |
150 | 150 | |
151 | 151 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
152 | draw_sprites( | |
152 | draw_sprites( | |
153 | 153 | return 0; |
154 | 154 | } |
r17988 | r17989 | |
---|---|---|
89 | 89 | { |
90 | 90 | |
91 | 91 | copybitmap(bitmap, m_tmp_bitmap[m_plane_visible], 0, 0, 0, 0, cliprect); |
92 | draw_sprites( | |
92 | draw_sprites( | |
93 | 93 | return 0; |
94 | 94 | } |
r17988 | r17989 | |
---|---|---|
229 | 229 | { |
230 | 230 | int i; |
231 | 231 | |
232 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
233 | screen.machine().priority_bitmap.fill(0); | |
232 | bitmap.fill(get_black_pen(machine()), cliprect); | |
233 | machine().priority_bitmap.fill(0); | |
234 | 234 | |
235 | 235 | if (m_bg_raster) |
236 | 236 | { |
r17988 | r17989 | |
250 | 250 | m_tx_tilemap->set_scrolly(0, m_tx_scrolly); |
251 | 251 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
252 | 252 | |
253 | draw_sprites( | |
253 | draw_sprites( | |
254 | 254 | return 0; |
255 | 255 | } |
r17988 | r17989 | |
---|---|---|
130 | 130 | { |
131 | 131 | |
132 | 132 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
133 | draw_sprites( | |
133 | draw_sprites( | |
134 | 134 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
135 | 135 | return 0; |
136 | 136 | } |
r17988 | r17989 | |
---|---|---|
318 | 318 | |
319 | 319 | UINT32 atarisy2_state::screen_update_atarisy2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
320 | 320 | { |
321 | bitmap_ind8 &priority_bitmap = | |
321 | bitmap_ind8 &priority_bitmap = | |
322 | 322 | atarimo_rect_list rectlist; |
323 | 323 | bitmap_ind16 *mobitmap; |
324 | 324 | int x, y, r; |
r17988 | r17989 | |
---|---|---|
193 | 193 | int layers_ctrl = (~m_layers_ctrl) >> 4; |
194 | 194 | |
195 | 195 | #ifdef MAME_DEBUG |
196 | if ( | |
196 | if ( | |
197 | 197 | { |
198 | 198 | int msk = 0; |
199 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
200 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
199 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
200 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
201 | 201 | if (msk != 0) layers_ctrl &= msk; |
202 | 202 | } |
203 | 203 | #endif |
r17988 | r17989 | |
---|---|---|
204 | 204 | { |
205 | 205 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
206 | 206 | |
207 | draw_sprites( | |
207 | draw_sprites( | |
208 | 208 | return 0; |
209 | 209 | } |
r17988 | r17989 | |
---|---|---|
461 | 461 | { |
462 | 462 | // updating sprites here instead than in screen_eof avoids a palette glitch |
463 | 463 | // at the end of the "rainbow sky" screens. |
464 | update_sprites( | |
464 | update_sprites( | |
465 | 465 | m_sprites_updated = 1; |
466 | 466 | |
467 | 467 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
477 | 477 | |
478 | 478 | UINT32 ninjakd2_state::screen_update_robokid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
479 | 479 | { |
480 | update_sprites( | |
480 | update_sprites( | |
481 | 481 | m_sprites_updated = 1; |
482 | 482 | |
483 | 483 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
497 | 497 | |
498 | 498 | UINT32 ninjakd2_state::screen_update_omegaf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
499 | 499 | { |
500 | update_sprites( | |
500 | update_sprites( | |
501 | 501 | m_sprites_updated = 1; |
502 | 502 | |
503 | 503 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
522 | 522 | if (state) |
523 | 523 | { |
524 | 524 | if (!m_sprites_updated) |
525 | update_sprites( | |
525 | update_sprites( | |
526 | 526 | |
527 | 527 | m_sprites_updated = 0; |
528 | 528 | } |
r17988 | r17989 | |
---|---|---|
360 | 360 | if (!(m_bgcontrol & 0x20)) |
361 | 361 | { |
362 | 362 | if (!(m_bgcontrol & 0x10)) |
363 | draw_background( | |
363 | draw_background( | |
364 | 364 | |
365 | 365 | if (!(m_bgcontrol & 0x02)) |
366 | draw_background( | |
366 | draw_background( | |
367 | 367 | |
368 | 368 | if (!(m_bgcontrol & 0x04)) |
369 | draw_background( | |
369 | draw_background( | |
370 | 370 | } |
371 | 371 | |
372 | 372 | m_bg_tilemap->set_flip(flip_screen() ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); |
r17988 | r17989 | |
413 | 413 | clip = cliprect; |
414 | 414 | #endif |
415 | 415 | |
416 | drawgfx_transmask(bitmap, clip, | |
416 | drawgfx_transmask(bitmap, clip, | |
417 | 417 | code, color, flipx, flipy, sx, sy, |
418 | colortable_get_transpen_mask( | |
418 | colortable_get_transpen_mask( | |
419 | 419 | } |
420 | 420 | return 0; |
421 | 421 | } |
r17988 | r17989 | |
---|---|---|
239 | 239 | { |
240 | 240 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
241 | 241 | |
242 | draw_ball( | |
242 | draw_ball( | |
243 | 243 | return 0; |
244 | 244 | } |
r17988 | r17989 | |
---|---|---|
396 | 396 | |
397 | 397 | UINT32 spacefb_state::screen_update_spacefb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
398 | 398 | { |
399 | draw_objects( | |
399 | draw_objects( | |
400 | 400 | draw_starfield(screen, bitmap, cliprect); |
401 | 401 | |
402 | 402 | return 0; |
r17988 | r17989 | |
---|---|---|
50 | 50 | |
51 | 51 | UINT32 cbuster_state::screen_update_twocrude(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
52 | 52 | { |
53 | address_space &space = | |
53 | address_space &space = | |
54 | 54 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
55 | 55 | |
56 | 56 | flip_screen_set(!BIT(flip, 7)); |
57 | 57 | |
58 | | |
58 | | |
59 | 59 | |
60 | 60 | |
61 | 61 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
r17988 | r17989 | |
63 | 63 | |
64 | 64 | /* Draw playfields & sprites */ |
65 | 65 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
66 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0900, 0x100, 0x0ff); | |
67 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0900, 0x0900, 0x500, 0x0ff); | |
66 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0900, 0x100, 0x0ff); | |
67 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0900, 0x0900, 0x500, 0x0ff); | |
68 | 68 | |
69 | 69 | if (m_pri) |
70 | 70 | { |
r17988 | r17989 | |
77 | 77 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
78 | 78 | } |
79 | 79 | |
80 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0900, 0x100, 0x0ff); | |
81 | screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0100, 0x0900, 0x500, 0x0ff); | |
80 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0900, 0x100, 0x0ff); | |
81 | machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0100, 0x0900, 0x500, 0x0ff); | |
82 | 82 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
83 | 83 | return 0; |
84 | 84 | } |
r17988 | r17989 | |
---|---|---|
137 | 137 | { |
138 | 138 | |
139 | 139 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
140 | draw_sprites( | |
140 | draw_sprites( | |
141 | 141 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
142 | 142 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
143 | 143 | return 0; |
r17988 | r17989 | |
---|---|---|
307 | 307 | |
308 | 308 | if (m_screen_refresh) |
309 | 309 | { |
310 | address_space &space = * | |
310 | address_space &space = * | |
311 | 311 | |
312 | 312 | /* redraw bitmap */ |
313 | 313 | for (offs = 0; offs < 0x8000; offs++) |
r17988 | r17989 | |
---|---|---|
248 | 248 | |
249 | 249 | UINT32 n8080_state::screen_update_helifire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
250 | 250 | { |
251 | int SUN_BRIGHTNESS = screen.machine().root_device().ioport("POT0")->read(); | |
252 | int SEA_BRIGHTNESS = screen.machine().root_device().ioport("POT1")->read(); | |
251 | int SUN_BRIGHTNESS = machine().root_device().ioport("POT0")->read(); | |
252 | int SEA_BRIGHTNESS = machine().root_device().ioport("POT1")->read(); | |
253 | 253 | |
254 | 254 | static const int wave[8] = { 0, 1, 2, 2, 2, 1, 0, 0 }; |
255 | 255 | |
r17988 | r17989 | |
336 | 336 | |
337 | 337 | /* next line */ |
338 | 338 | |
339 | helifire_next_line( | |
339 | helifire_next_line( | |
340 | 340 | } |
341 | 341 | |
342 | 342 | m_helifire_mv = saved_mv; |
r17988 | r17989 | |
350 | 350 | // falling edge |
351 | 351 | if (!state) |
352 | 352 | { |
353 | int n = ( | |
353 | int n = ( | |
354 | 354 | |
355 | 355 | int i; |
356 | 356 | |
r17988 | r17989 | |
367 | 367 | G |= B; |
368 | 368 | } |
369 | 369 | |
370 | if ( | |
370 | if ( | |
371 | 371 | { |
372 | 372 | R |= G; |
373 | 373 | } |
374 | 374 | } |
375 | 375 | |
376 | palette_set_color_rgb( | |
376 | palette_set_color_rgb( | |
377 | 377 | R ? 255 : 0, |
378 | 378 | G ? 255 : 0, |
379 | 379 | B ? 255 : 0); |
r17988 | r17989 | |
381 | 381 | |
382 | 382 | for (i = 0; i < 256; i++) |
383 | 383 | { |
384 | helifire_next_line( | |
384 | helifire_next_line( | |
385 | 385 | } |
386 | 386 | } |
387 | 387 | } |
r17988 | r17989 | |
---|---|---|
519 | 519 | m_screen_refresh = 0; |
520 | 520 | for (y = 0; y < height; y++) |
521 | 521 | for (x = 0; x < width; x++) |
522 | update_pixel0( | |
522 | update_pixel0( | |
523 | 523 | |
524 | 524 | if (m_gfxdraw_mode) |
525 | 525 | for (y = 0; y < height; y++) |
526 | 526 | for (x = 0; x < width; x++) |
527 | update_pixel1( | |
527 | update_pixel1( | |
528 | 528 | } |
529 | 529 | |
530 | 530 | if (m_dispflag) |
r17988 | r17989 | |
---|---|---|
134 | 134 | |
135 | 135 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
136 | 136 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
137 | draw_sprites( | |
137 | draw_sprites( | |
138 | 138 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
139 | draw_sprites( | |
139 | draw_sprites( | |
140 | 140 | return 0; |
141 | 141 | } |
r17988 | r17989 | |
---|---|---|
238 | 238 | { |
239 | 239 | |
240 | 240 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
241 | draw_sprites( | |
241 | draw_sprites( | |
242 | 242 | return 0; |
243 | 243 | } |
r17988 | r17989 | |
---|---|---|
184 | 184 | { |
185 | 185 | /*m_bg_tilemap->mark_all_dirty(); */ |
186 | 186 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
187 | holeland_draw_sprites( | |
187 | holeland_draw_sprites( | |
188 | 188 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
189 | 189 | return 0; |
190 | 190 | } |
r17988 | r17989 | |
192 | 192 | UINT32 holeland_state::screen_update_crzrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
193 | 193 | { |
194 | 194 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
195 | crzrally_draw_sprites( | |
195 | crzrally_draw_sprites( | |
196 | 196 | return 0; |
197 | 197 | } |
r17988 | r17989 | |
---|---|---|
208 | 208 | { |
209 | 209 | m_bg_tilemap->set_scrollx(0,m_lastscroll+5); |
210 | 210 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
211 | draw_sprites( | |
211 | draw_sprites( | |
212 | 212 | return 0; |
213 | 213 | } |
r17988 | r17989 | |
---|---|---|
510 | 510 | m_back_tilemap->draw(bitmap, cliprect, 0, 0); |
511 | 511 | |
512 | 512 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
513 | prosoccr_draw_sprites( | |
513 | prosoccr_draw_sprites( | |
514 | 514 | |
515 | 515 | return 0; |
516 | 516 | } |
r17988 | r17989 | |
549 | 549 | my = (offs) % 32; |
550 | 550 | mx = (offs) / 32; |
551 | 551 | |
552 | drawgfx_transpen(bitmap, cliprect, | |
552 | drawgfx_transpen(bitmap, cliprect, | |
553 | 553 | tile, 1, 0, 0, 248 - 8 * mx, 8 * my, 0); |
554 | 554 | } |
555 | 555 | |
556 | prosport_draw_sprites( | |
556 | prosport_draw_sprites( | |
557 | 557 | |
558 | 558 | return 0; |
559 | 559 | } |
r17988 | r17989 | |
568 | 568 | else |
569 | 569 | m_back_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
570 | 570 | |
571 | boomrang_draw_sprites( | |
571 | boomrang_draw_sprites( | |
572 | 572 | if (!m_background_disable) |
573 | 573 | m_back_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
574 | 574 | |
575 | boomrang_draw_sprites( | |
575 | boomrang_draw_sprites( | |
576 | 576 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
577 | 577 | return 0; |
578 | 578 | } |
r17988 | r17989 | |
587 | 587 | else |
588 | 588 | m_back_tilemap->draw(bitmap, cliprect, 0, 0); |
589 | 589 | |
590 | liberate_draw_sprites( | |
590 | liberate_draw_sprites( | |
591 | 591 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
592 | 592 | return 0; |
593 | 593 | } |
r17988 | r17989 | |
---|---|---|
177 | 177 | if (m_bgon) |
178 | 178 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
179 | 179 | else |
180 | bitmap.fill(get_black_pen( | |
180 | bitmap.fill(get_black_pen( | |
181 | 181 | |
182 | 182 | if (m_objon) |
183 | draw_sprites( | |
183 | draw_sprites( | |
184 | 184 | |
185 | 185 | if (m_chon) |
186 | 186 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
400 | 400 | UINT32 turbo_state::screen_update_turbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
401 | 401 | { |
402 | 402 | bitmap_ind16 &fgpixmap = m_fg_tilemap->pixmap(); |
403 | const UINT8 *road_gfxdata = | |
403 | const UINT8 *road_gfxdata = | |
404 | 404 | const UINT8 *prom_base = memregion("proms")->base(); |
405 | 405 | const UINT8 *pr1114 = prom_base + 0x000; |
406 | 406 | const UINT8 *pr1115 = prom_base + 0x020; |
r17988 | r17989 | |
429 | 429 | |
430 | 430 | /* compute the sprite information; we use y-1 since this info was computed during HBLANK */ |
431 | 431 | /* on the previous scanline */ |
432 | turbo_prepare_sprites( | |
432 | turbo_prepare_sprites( | |
433 | 433 | |
434 | 434 | /* loop over columns */ |
435 | 435 | for (x = 0; x <= cliprect.max_x; x += TURBO_X_SCALE) |
r17988 | r17989 | |
769 | 769 | |
770 | 770 | /* compute the sprite information; we use y-1 since this info was computed during HBLANK */ |
771 | 771 | /* on the previous scanline */ |
772 | subroc3d_prepare_sprites( | |
772 | subroc3d_prepare_sprites( | |
773 | 773 | |
774 | 774 | /* loop over columns */ |
775 | 775 | for (x = 0; x <= cliprect.max_x; x += TURBO_X_SCALE) |
r17988 | r17989 | |
971 | 971 | UINT32 turbo_state::screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
972 | 972 | { |
973 | 973 | bitmap_ind16 &fgpixmap = m_fg_tilemap->pixmap(); |
974 | const UINT8 *bgcolor = | |
974 | const UINT8 *bgcolor = | |
975 | 975 | const UINT8 *prom_base = memregion("proms")->base(); |
976 | 976 | const UINT8 *pr5194 = prom_base + 0x000; |
977 | 977 | const UINT8 *pr5198 = prom_base + 0x500; |
r17988 | r17989 | |
987 | 987 | |
988 | 988 | /* compute the sprite information; we use y-1 since this info was computed during HBLANK */ |
989 | 989 | /* on the previous scanline */ |
990 | buckrog_prepare_sprites( | |
990 | buckrog_prepare_sprites( | |
991 | 991 | |
992 | 992 | /* loop over columns */ |
993 | 993 | for (x = 0; x <= cliprect.max_x; x += TURBO_X_SCALE) |
r17988 | r17989 | |
---|---|---|
144 | 144 | offs_t offs; |
145 | 145 | int scroll[8]; |
146 | 146 | |
147 | set_pens( | |
147 | set_pens( | |
148 | 148 | |
149 | 149 | /* draw the background */ |
150 | 150 | for (offs = 0; offs < 0x0400; offs++) |
r17988 | r17989 | |
158 | 158 | |
159 | 159 | int gfxnum = (code < ram_based_char_start_indices[m_character_banking_mode]) ? 0 : 1; |
160 | 160 | |
161 | drawgfx_opaque(m_background_bitmap, m_background_bitmap.cliprect(), | |
161 | drawgfx_opaque(m_background_bitmap, m_background_bitmap.cliprect(), | |
162 | 162 | code, color, |
163 | 163 | 0, 0, |
164 | 164 | x, y); |
r17988 | r17989 | |
174 | 174 | collision_color = 0x102; |
175 | 175 | } |
176 | 176 | |
177 | drawgfx_opaque(m_collision_background, m_collision_background.cliprect(), | |
177 | drawgfx_opaque(m_collision_background, m_collision_background.cliprect(), | |
178 | 178 | code, collision_color, |
179 | 179 | 0, 0, |
180 | 180 | x, y); |
r17988 | r17989 | |
216 | 216 | m_collision_register |= 0x08; |
217 | 217 | |
218 | 218 | /* Bullet/Background Collision */ |
219 | if (colortable_entry_get_value( | |
219 | if (colortable_entry_get_value( | |
220 | 220 | m_collision_register |= 0x80; |
221 | 221 | |
222 | 222 | bitmap.pix16(offs, bx) = BULLET_STAR_PEN; |
r17988 | r17989 | |
251 | 251 | if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel2)) m_collision_register |= 0x04; |
252 | 252 | |
253 | 253 | /* S2636 vs. background collision detection */ |
254 | if (colortable_entry_get_value( | |
254 | if (colortable_entry_get_value( | |
255 | 255 | { |
256 | 256 | if (S2636_IS_PIXEL_DRAWN(pixel0)) m_collision_register |= 0x10; |
257 | 257 | if (S2636_IS_PIXEL_DRAWN(pixel1)) m_collision_register |= 0x20; |
r17988 | r17989 | |
264 | 264 | |
265 | 265 | /* stars circuit */ |
266 | 266 | if (m_stars_on) |
267 | cvs_update_stars( | |
267 | cvs_update_stars( | |
268 | 268 | |
269 | 269 | return 0; |
270 | 270 | } |
r17988 | r17989 | |
---|---|---|
826 | 826 | /* For games without tilemaps */ |
827 | 827 | UINT32 seta_state::screen_update_seta_no_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
828 | 828 | { |
829 | set_pens( | |
829 | set_pens( | |
830 | 830 | bitmap.fill(0x1f0, cliprect); |
831 | 831 | |
832 | | |
832 | | |
833 | 833 | return 0; |
834 | 834 | } |
835 | 835 | |
r17988 | r17989 | |
1053 | 1053 | { |
1054 | 1054 | bitmap.fill(0x0, cliprect); |
1055 | 1055 | |
1056 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); | |
1057 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); | |
1056 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); | |
1057 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); | |
1058 | 1058 | |
1059 | 1059 | seta_layers_update(screen, bitmap, cliprect, 0x800, 1 ); |
1060 | 1060 | |
r17988 | r17989 | |
1065 | 1065 | { |
1066 | 1066 | // rising edge |
1067 | 1067 | if (state) |
1068 | | |
1068 | | |
1069 | 1069 | } |
1070 | 1070 | |
1071 | 1071 | |
1072 | 1072 | |
1073 | 1073 | UINT32 seta_state::screen_update_seta(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1074 | 1074 | { |
1075 | set_pens( | |
1075 | set_pens( | |
1076 | 1076 | return SCREEN_UPDATE16_CALL_MEMBER(seta_layers); |
1077 | 1077 | } |
1078 | 1078 | |
1079 | 1079 | |
1080 | 1080 | UINT32 seta_state::screen_update_usclssic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1081 | 1081 | { |
1082 | usclssic_set_pens( | |
1082 | usclssic_set_pens( | |
1083 | 1083 | return SCREEN_UPDATE16_CALL_MEMBER(seta_layers); |
1084 | 1084 | } |
1085 | 1085 |
r17988 | r17989 | |
---|---|---|
50 | 50 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); |
51 | 51 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); |
52 | 52 | |
53 | machine().device<seta001_device>("spritegen")->seta001_draw_sprites( | |
53 | machine().device<seta001_device>("spritegen")->seta001_draw_sprites( | |
54 | 54 | return 0; |
55 | 55 | } |
56 | 56 |
r17988 | r17989 | |
---|---|---|
179 | 179 | |
180 | 180 | if (cliprect.min_y == screen.visible_area().min_y) |
181 | 181 | { |
182 | | |
182 | | |
183 | 183 | |
184 | 184 | m_bg_tilemap->set_scrollx(0, *m_scroll_x); |
185 | 185 | m_bg_tilemap->set_scrolly(0, *m_scroll_y); |
186 | 186 | |
187 | | |
187 | | |
188 | 188 | ((*m_flipscreen_y & 0x01) ? TILEMAP_FLIPY : 0)); |
189 | 189 | } |
190 | 190 | |
191 | 191 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
192 | draw_sprites( | |
192 | draw_sprites( | |
193 | 193 | |
194 | 194 | /* draw top status region */ |
195 | 195 | clip.min_x = visarea.min_x; |
r17988 | r17989 | |
---|---|---|
168 | 168 | //logerror("scrollx[%d] = %d\n",i,m_vb_scrollx[i]); |
169 | 169 | } |
170 | 170 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
171 | draw_sprites( | |
171 | draw_sprites( | |
172 | 172 | return 0; |
173 | 173 | } |
r17988 | r17989 | |
---|---|---|
63 | 63 | |
64 | 64 | UINT32 rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
65 | 65 | { |
66 | address_space &space = | |
66 | address_space &space = | |
67 | 67 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
68 | 68 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
69 | 69 | |
r17988 | r17989 | |
73 | 73 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
74 | 74 | |
75 | 75 | /* Draw playfields */ |
76 | screen.machine().priority_bitmap.fill(0, cliprect); | |
77 | bitmap.fill(screen.machine().pens[768], cliprect); | |
76 | machine().priority_bitmap.fill(0, cliprect); | |
77 | bitmap.fill(machine().pens[768], cliprect); | |
78 | 78 | |
79 | 79 | switch (priority & 3) |
80 | 80 | { |
r17988 | r17989 | |
104 | 104 | break; |
105 | 105 | } |
106 | 106 | |
107 | | |
107 | | |
108 | 108 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
109 | 109 | |
110 | 110 | return 0; |
r17988 | r17989 | |
166 | 166 | |
167 | 167 | UINT32 rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
168 | 168 | { |
169 | address_space &space = | |
169 | address_space &space = | |
170 | 170 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
171 | 171 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
172 | 172 | |
173 | 173 | /* draw sprite gfx to temp bitmaps */ |
174 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
175 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
174 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
175 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
176 | 176 | |
177 | 177 | /* Update playfields */ |
178 | 178 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
180 | 180 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
181 | 181 | |
182 | 182 | /* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */ |
183 | bitmap.fill( | |
183 | bitmap.fill( | |
184 | 184 | |
185 | 185 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
186 | | |
186 | | |
187 | 187 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
188 | | |
188 | | |
189 | 189 | |
190 | 190 | if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */ |
191 | 191 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0); |
192 | 192 | else |
193 | 193 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
194 | 194 | |
195 | | |
195 | | |
196 | 196 | |
197 | mixwizdfirelayer( | |
197 | mixwizdfirelayer( | |
198 | 198 | |
199 | 199 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
200 | 200 | return 0; |
r17988 | r17989 | |
202 | 202 | |
203 | 203 | UINT32 rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
204 | 204 | { |
205 | address_space &space = | |
205 | address_space &space = | |
206 | 206 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
207 | 207 | |
208 | 208 | /* draw sprite gfx to temp bitmaps */ |
209 | screen.machine().device<decospr_device>("spritegen1")->set_alt_format(true); | |
210 | screen.machine().device<decospr_device>("spritegen2")->set_alt_format(true); | |
211 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false); | |
212 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false); | |
209 | machine().device<decospr_device>("spritegen1")->set_alt_format(true); | |
210 | machine().device<decospr_device>("spritegen2")->set_alt_format(true); | |
211 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false); | |
212 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false); | |
213 | 213 | |
214 | 214 | /* Update playfields */ |
215 | 215 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
217 | 217 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
218 | 218 | |
219 | 219 | /* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */ |
220 | bitmap.fill(screen.machine().pens[512], cliprect); | |
221 | screen.machine().priority_bitmap.fill(0); | |
220 | bitmap.fill(machine().pens[512], cliprect); | |
221 | machine().priority_bitmap.fill(0); | |
222 | 222 | |
223 | 223 | /* pf3 and pf4 are combined into a single 8bpp bitmap */ |
224 | 224 | deco16ic_tilemap_12_combine_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
r17988 | r17989 | |
226 | 226 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 16); |
227 | 227 | |
228 | 228 | /* ToDo reimplement priorities + mixing / alpha, it was busted worse than this before anyway, so no big loss that we don't do it for now ;-) */ |
229 | screen.machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff); | |
230 | screen.machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff); | |
229 | machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff); | |
230 | machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff); | |
231 | 231 | |
232 | 232 | |
233 | 233 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
118 | 118 | |
119 | 119 | UINT32 polygonet_state::screen_update_polygonet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
120 | 120 | { |
121 | device_t *k053936 = screen.machine().device("k053936"); | |
122 | screen.machine().priority_bitmap.fill(0); | |
123 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
121 | device_t *k053936 = machine().device("k053936"); | |
122 | machine().priority_bitmap.fill(0); | |
123 | bitmap.fill(get_black_pen(machine()), cliprect); | |
124 | 124 | |
125 | 125 | k053936_zoom_draw(k053936, bitmap, cliprect, m_roz_tilemap, 0, 0, 0); |
126 | 126 |
r17988 | r17989 | |
---|---|---|
144 | 144 | UINT32 higemaru_state::screen_update_higemaru(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
145 | 145 | { |
146 | 146 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
147 | draw_sprites( | |
147 | draw_sprites( | |
148 | 148 | return 0; |
149 | 149 | } |
r17988 | r17989 | |
---|---|---|
192 | 192 | |
193 | 193 | UINT32 batman_state::screen_update_batman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
194 | 194 | { |
195 | bitmap_ind8 &priority_bitmap = | |
195 | bitmap_ind8 &priority_bitmap = | |
196 | 196 | atarimo_rect_list rectlist; |
197 | 197 | bitmap_ind16 *mobitmap; |
198 | 198 | int x, y, r; |
r17988 | r17989 | |
---|---|---|
417 | 417 | int offs; |
418 | 418 | rectangle clip; |
419 | 419 | |
420 | | |
420 | | |
421 | 421 | bitmap.fill(0, cliprect); |
422 | 422 | |
423 | 423 | clip.min_x = 0; |
r17988 | r17989 | |
462 | 462 | } |
463 | 463 | } |
464 | 464 | |
465 | draw_sprites( | |
465 | draw_sprites( | |
466 | 466 | |
467 | 467 | return 0; |
468 | 468 | } |
r17988 | r17989 | |
---|---|---|
151 | 151 | int scrolly = ((*m_port_80 >> 3) & 0x07); |
152 | 152 | int flip = *m_port_80 & 0x80; |
153 | 153 | |
154 | screen.machine().tilemap().mark_all_dirty(); | |
155 | screen.machine().tilemap().set_flip_all(flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
154 | machine().tilemap().mark_all_dirty(); | |
155 | machine().tilemap().set_flip_all(flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
156 | 156 | |
157 | 157 | bitmap.fill(0, cliprect); |
158 | 158 | m_bitmap_buffer->fill(0, cliprect); |
159 | 159 | |
160 | 160 | /* sprites go under the playfield */ |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | |
163 | 163 | /* draw the tilemap to a temp bitmap */ |
164 | 164 | m_cm_tilemap->draw(*m_bitmap_buffer, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
200 | 200 | if (code & 0x80) /* sprite bankswitch */ |
201 | 201 | code += (*m_vreg & 0x30) * 0x8; |
202 | 202 | |
203 | drawgfx_transmask(bitmap, cliprect, | |
203 | drawgfx_transmask(bitmap, cliprect, | |
204 | 204 | code, |
205 | 205 | color, |
206 | 206 | flipx, flipy, |
207 | 207 | sx, sy, |
208 | colortable_get_transpen_mask( | |
208 | colortable_get_transpen_mask( | |
209 | 209 | } |
210 | 210 | } |
211 | 211 | |
r17988 | r17989 | |
230 | 230 | sy = 31 - sy; |
231 | 231 | } |
232 | 232 | |
233 | drawgfx_transpen(bitmap, cliprect, | |
233 | drawgfx_transpen(bitmap, cliprect, | |
234 | 234 | code, |
235 | 235 | 0, |
236 | 236 | m_flipscreen, m_flipscreen, |
r17988 | r17989 | |
---|---|---|
142 | 142 | m_bg_tilemap->set_scrolly(0, m_scrolly); |
143 | 143 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | 144 | |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | |
147 | 147 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
148 | 148 | return 0; |
r17988 | r17989 | |
---|---|---|
115 | 115 | return 0; |
116 | 116 | } |
117 | 117 | |
118 | UINT32 warriorb_state::screen_update_warriorb_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 40 * 8 * 0, screen.machine().driver_data<warriorb_state>()->m_tc0100scn_1); } | |
119 | UINT32 warriorb_state::screen_update_warriorb_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 40 * 8 * 1, screen.machine().driver_data<warriorb_state>()->m_tc0100scn_2); } | |
118 | UINT32 warriorb_state::screen_update_warriorb_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 40 * 8 * 0, machine().driver_data<warriorb_state>()->m_tc0100scn_1); } | |
119 | UINT32 warriorb_state::screen_update_warriorb_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 40 * 8 * 1, machine().driver_data<warriorb_state>()->m_tc0100scn_2); } |
r17988 | r17989 | |
---|---|---|
159 | 159 | m_fg_layer->set_scrolly(0, m_scrollram[3] + 8); |
160 | 160 | } |
161 | 161 | |
162 | bitmap.fill(get_black_pen( | |
162 | bitmap.fill(get_black_pen( | |
163 | 163 | |
164 | 164 | m_bg_layer->draw(bitmap, cliprect, 0, 0); |
165 | draw_sprites( | |
165 | draw_sprites( | |
166 | 166 | |
167 | 167 | if (!(m_fg_bank & 0xff)) |
168 | draw_sprites( | |
168 | draw_sprites( | |
169 | 169 | |
170 | 170 | m_fg_layer->draw(bitmap, cliprect, 0, 0); |
171 | 171 | |
172 | 172 | if(m_fg_bank & 0xff) |
173 | draw_sprites( | |
173 | draw_sprites( | |
174 | 174 | |
175 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
176 | draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
175 | draw_sprites(machine(), bitmap, cliprect, 0); | |
176 | draw_sprites(machine(), bitmap, cliprect, 3); | |
177 | 177 | m_tx_layer->draw(bitmap, cliprect, 0, 0); |
178 | 178 | return 0; |
179 | 179 | } |
r17988 | r17989 | |
---|---|---|
61 | 61 | |
62 | 62 | konami_sortlayers4(layers, layerpri); |
63 | 63 | |
64 | | |
64 | | |
65 | 65 | |
66 | 66 | for (i = 0; i < 4; i++) |
67 | 67 | { |
r17988 | r17989 | |
---|---|---|
237 | 237 | { |
238 | 238 | |
239 | 239 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
240 | draw_sprites( | |
240 | draw_sprites( | |
241 | 241 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
242 | 242 | return 0; |
243 | 243 | } |
r17988 | r17989 | |
---|---|---|
40 | 40 | int hpos = m_hpos_ram[i]; |
41 | 41 | int vpos = m_vpos_ram[i]; |
42 | 42 | |
43 | drawgfx_transpen(bitmap, cliprect, | |
43 | drawgfx_transpen(bitmap, cliprect, | |
44 | 44 | 248 - hpos, vpos - 15, 0); |
45 | 45 | } |
46 | 46 |
r17988 | r17989 | |
---|---|---|
162 | 162 | m_bg_layer->draw(bitmap, cliprect, 0,0); |
163 | 163 | |
164 | 164 | /* Draw sprites underneath foreground */ |
165 | draw_sprites( | |
165 | draw_sprites( | |
166 | 166 | m_fg_layer->draw(bitmap, cliprect, 0,0); |
167 | 167 | |
168 | 168 | /* Rest of sprites */ |
169 | draw_sprites( | |
169 | draw_sprites( | |
170 | 170 | |
171 | 171 | /* Text layer */ |
172 | 172 | m_tx_layer->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
---|---|---|
232 | 232 | m_fg_tilemap->set_scrollx(0,m_scroll[0x12]); |
233 | 233 | m_fg_tilemap->set_scrolly(0,m_scroll[0x13]); |
234 | 234 | |
235 | | |
235 | | |
236 | 236 | |
237 | 237 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
238 | 238 | m_fg_tilemap->draw(bitmap, cliprect, 0,1); |
239 | bloodbro_draw_sprites( | |
239 | bloodbro_draw_sprites( | |
240 | 240 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
241 | 241 | return 0; |
242 | 242 | } |
r17988 | r17989 | |
248 | 248 | // m_fg_tilemap->set_scrollx(0,m_scroll[0x12]); |
249 | 249 | // m_fg_tilemap->set_scrolly(0,m_scroll[0x13]); |
250 | 250 | |
251 | | |
251 | | |
252 | 252 | |
253 | 253 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
254 | 254 | m_fg_tilemap->draw(bitmap, cliprect, 0,1); |
255 | weststry_draw_sprites( | |
255 | weststry_draw_sprites( | |
256 | 256 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
257 | 257 | return 0; |
258 | 258 | } |
r17988 | r17989 | |
265 | 265 | m_fg_tilemap->set_scrollx(0,m_scroll[0x0a]); |
266 | 266 | m_fg_tilemap->set_scrolly(0,m_scroll[0x0b]); /* ? */ |
267 | 267 | |
268 | | |
268 | | |
269 | 269 | |
270 | 270 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
271 | 271 | m_fg_tilemap->draw(bitmap, cliprect, 0,1); |
272 | bloodbro_draw_sprites( | |
272 | bloodbro_draw_sprites( | |
273 | 273 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
274 | 274 | return 0; |
275 | 275 | } |
r17988 | r17989 | |
---|---|---|
111 | 111 | { |
112 | 112 | int x, y; |
113 | 113 | |
114 | bitmap_ind16 &s2636_0_bitmap = s2636_update(screen.machine().device("s2636_0"), cliprect); | |
115 | bitmap_ind16 &s2636_1_bitmap = s2636_update(screen.machine().device("s2636_1"), cliprect); | |
116 | bitmap_ind16 &s2636_2_bitmap = s2636_update(screen.machine().device("s2636_2"), cliprect); | |
114 | bitmap_ind16 &s2636_0_bitmap = s2636_update(machine().device("s2636_0"), cliprect); | |
115 | bitmap_ind16 &s2636_1_bitmap = s2636_update(machine().device("s2636_1"), cliprect); | |
116 | bitmap_ind16 &s2636_2_bitmap = s2636_update(machine().device("s2636_2"), cliprect); | |
117 | 117 | |
118 | 118 | bitmap.fill(0, cliprect); |
119 | cvs_update_stars( | |
119 | cvs_update_stars( | |
120 | 120 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
121 | 121 | |
122 | 122 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
r17988 | r17989 | |
177 | 177 | // astrowar has only one S2636 |
178 | 178 | int x, y; |
179 | 179 | |
180 | bitmap_ind16 &s2636_0_bitmap = s2636_update( | |
180 | bitmap_ind16 &s2636_0_bitmap = s2636_update( | |
181 | 181 | |
182 | 182 | bitmap.fill(0, cliprect); |
183 | cvs_update_stars( | |
183 | cvs_update_stars( | |
184 | 184 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
185 | 185 | copybitmap(m_temp_bitmap, bitmap, 0, 0, 0, 0, cliprect); |
186 | 186 |
r17988 | r17989 | |
---|---|---|
131 | 131 | { |
132 | 132 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
133 | 133 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
134 | draw_sprites( | |
134 | draw_sprites( | |
135 | 135 | return 0; |
136 | 136 | } |
r17988 | r17989 | |
---|---|---|
131 | 131 | |
132 | 132 | UINT32 gridlee_state::screen_update_gridlee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
133 | 133 | { |
134 | const pen_t *pens = & | |
134 | const pen_t *pens = & | |
135 | 135 | UINT8 *gfx; |
136 | 136 | int x, y, i; |
137 | 137 | |
r17988 | r17989 | |
156 | 156 | } |
157 | 157 | |
158 | 158 | /* draw the sprite images */ |
159 | gfx = | |
159 | gfx = | |
160 | 160 | for (i = 0; i < 32; i++) |
161 | 161 | { |
162 | 162 | UINT8 *sprite = m_spriteram + i * 4; |
r17988 | r17989 | |
---|---|---|
639 | 639 | fg_clip.min_x = 28 * 8; |
640 | 640 | } |
641 | 641 | |
642 | | |
642 | | |
643 | 643 | |
644 | 644 | m_bg_tilemap->draw(bitmap, bg_clip, 0, 0); |
645 | 645 | m_fg_tilemap->draw(bitmap, fg_clip, 0, 0); |
646 | 646 | m_bg_tilemap->draw(bitmap, bg_clip, 1, 1); |
647 | 647 | m_fg_tilemap->draw(bitmap, fg_clip, 1, 1); |
648 | 648 | |
649 | rallyx_draw_bullets(screen.machine(), bitmap, cliprect, TRUE); | |
650 | rallyx_draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
651 | rallyx_draw_bullets(screen.machine(), bitmap, cliprect, FALSE); | |
649 | rallyx_draw_bullets(machine(), bitmap, cliprect, TRUE); | |
650 | rallyx_draw_sprites(machine(), bitmap, cliprect, 1); | |
651 | rallyx_draw_bullets(machine(), bitmap, cliprect, FALSE); | |
652 | 652 | |
653 | 653 | return 0; |
654 | 654 | } |
r17988 | r17989 | |
672 | 672 | fg_clip.min_x = 28 * 8; |
673 | 673 | } |
674 | 674 | |
675 | | |
675 | | |
676 | 676 | |
677 | 677 | /* tile priority doesn't seem to be supported in Jungler */ |
678 | 678 | m_bg_tilemap->draw(bitmap, bg_clip, 0, 0); |
r17988 | r17989 | |
680 | 680 | m_bg_tilemap->draw(bitmap, bg_clip, 1, 0); |
681 | 681 | m_fg_tilemap->draw(bitmap, fg_clip, 1, 0); |
682 | 682 | |
683 | jungler_draw_bullets(screen.machine(), bitmap, cliprect, TRUE); | |
684 | rallyx_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
685 | jungler_draw_bullets(screen.machine(), bitmap, cliprect, FALSE); | |
683 | jungler_draw_bullets(machine(), bitmap, cliprect, TRUE); | |
684 | rallyx_draw_sprites(machine(), bitmap, cliprect, 0); | |
685 | jungler_draw_bullets(machine(), bitmap, cliprect, FALSE); | |
686 | 686 | |
687 | 687 | if (m_stars_enable) |
688 | draw_stars( | |
688 | draw_stars( | |
689 | 689 | |
690 | 690 | return 0; |
691 | 691 | } |
r17988 | r17989 | |
718 | 718 | fg_clip.min_x = 28 * 8; |
719 | 719 | } |
720 | 720 | |
721 | | |
721 | | |
722 | 722 | |
723 | 723 | m_bg_tilemap->draw(bitmap, bg_clip, 0, 0); |
724 | 724 | m_fg_tilemap->draw(bitmap, fg_clip, 0, 0); |
725 | 725 | m_bg_tilemap->draw(bitmap, bg_clip, 1, 1); |
726 | 726 | m_fg_tilemap->draw(bitmap, fg_clip, 1, 1); |
727 | 727 | |
728 | locomotn_draw_bullets(screen.machine(), bitmap, cliprect, TRUE); | |
729 | locomotn_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
730 | locomotn_draw_bullets(screen.machine(), bitmap, cliprect, FALSE); | |
728 | locomotn_draw_bullets(machine(), bitmap, cliprect, TRUE); | |
729 | locomotn_draw_sprites(machine(), bitmap, cliprect, 0); | |
730 | locomotn_draw_bullets(machine(), bitmap, cliprect, FALSE); | |
731 | 731 | |
732 | 732 | if (m_stars_enable) |
733 | draw_stars( | |
733 | draw_stars( | |
734 | 734 | |
735 | 735 | return 0; |
736 | 736 | } |
r17988 | r17989 | |
---|---|---|
351 | 351 | m_tilemap[2]->set_scrolly(0, m_scroll[0x02]); |
352 | 352 | |
353 | 353 | #ifdef MAME_DEBUG |
354 | if ( | |
354 | if ( | |
355 | 355 | { |
356 | 356 | int msk = 0; |
357 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
358 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
359 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
360 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
357 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
358 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
359 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
360 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
361 | 361 | if (msk != 0) layers_ctrl &= msk; |
362 | 362 | } |
363 | 363 | #endif |
364 | 364 | |
365 | 365 | /* The background color is the first of the last palette */ |
366 | 366 | bitmap.fill(0x1f00, cliprect); |
367 | | |
367 | | |
368 | 368 | |
369 | 369 | if (layers_ctrl & 1) m_tilemap[0]->draw(bitmap, cliprect, 0,1); |
370 | 370 | if (layers_ctrl & 2) m_tilemap[1]->draw(bitmap, cliprect, 0,2); |
r17988 | r17989 | |
390 | 390 | m_tilemap[2]->set_scrolly(0, m_scroll32[1] >> 16); |
391 | 391 | |
392 | 392 | #ifdef MAME_DEBUG |
393 | if ( | |
393 | if ( | |
394 | 394 | { |
395 | 395 | int msk = 0; |
396 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
397 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
398 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
399 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
396 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
397 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
398 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
399 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
400 | 400 | if (msk != 0) layers_ctrl &= msk; |
401 | 401 | } |
402 | 402 | #endif |
r17988 | r17989 | |
---|---|---|
55 | 55 | UINT32 blockhl_state::screen_update_blockhl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
56 | 56 | { |
57 | 57 | |
58 | | |
58 | | |
59 | 59 | |
60 | 60 | k052109_tilemap_update(m_k052109); |
61 | 61 |
r17988 | r17989 | |
---|---|---|
250 | 250 | UINT8 layer[3]; |
251 | 251 | |
252 | 252 | #ifdef MAME_DEBUG |
253 | if ( | |
253 | if ( | |
254 | 254 | { |
255 | 255 | m_dislayer[0] ^= 1; |
256 | 256 | popmessage("bg0: %01x", m_dislayer[0]); |
257 | 257 | } |
258 | 258 | |
259 | if ( | |
259 | if ( | |
260 | 260 | { |
261 | 261 | m_dislayer[1] ^= 1; |
262 | 262 | popmessage("bg1: %01x", m_dislayer[1]); |
263 | 263 | } |
264 | 264 | |
265 | if ( | |
265 | if ( | |
266 | 266 | { |
267 | 267 | m_dislayer[2] ^= 1; |
268 | 268 | popmessage("fg: %01x", m_dislayer[2]); |
r17988 | r17989 | |
286 | 286 | m_tilemap[i]->set_scrolly(0, m_scrolly[i]); |
287 | 287 | } |
288 | 288 | |
289 | | |
289 | | |
290 | 290 | bitmap.fill(0, cliprect); |
291 | 291 | |
292 | 292 | layer[0] = 0; |
r17988 | r17989 | |
310 | 310 | m_tilemap[layer[2]]->draw(bitmap, cliprect, 0, 4); |
311 | 311 | |
312 | 312 | |
313 | draw_sprites( | |
313 | draw_sprites( | |
314 | 314 | |
315 | 315 | #if 0 |
316 | 316 | { |
r17988 | r17989 | |
---|---|---|
494 | 494 | m_tilemap_1->set_scrollx(0, m_vregs[0x6/2]); |
495 | 495 | |
496 | 496 | #ifdef MAME_DEBUG |
497 | if ( | |
497 | if ( | |
498 | 498 | { |
499 | 499 | int msk = 0; |
500 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
501 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
502 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
503 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
500 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
501 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
502 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
503 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
504 | 504 | if (msk != 0) layers_ctrl &= msk; |
505 | 505 | } |
506 | 506 | #endif |
507 | 507 | |
508 | 508 | if (m_disable_video) |
509 | 509 | { |
510 | bitmap.fill(get_black_pen( | |
510 | bitmap.fill(get_black_pen( | |
511 | 511 | return 0; |
512 | 512 | } |
513 | 513 | else |
r17988 | r17989 | |
516 | 516 | if (layers_ctrl & 2) m_tilemap_1->draw(bitmap, cliprect, 0,0); |
517 | 517 | if (layers_ctrl & 1) m_tilemap_0->draw(bitmap, cliprect, 0,0); |
518 | 518 | |
519 | if (layers_ctrl & 8) draw_sprites( | |
519 | if (layers_ctrl & 8) draw_sprites( | |
520 | 520 | |
521 | 521 | if (layers_ctrl & 4) m_tilemap_2->draw(bitmap, cliprect, 0,0); |
522 | 522 | |
r17988 | r17989 | |
564 | 564 | m_tilemap_1->set_scrolly(0, bgy1 ); |
565 | 565 | |
566 | 566 | #ifdef MAME_DEBUG |
567 | if ( | |
567 | if ( | |
568 | 568 | { |
569 | 569 | int msk = 0; |
570 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
571 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
572 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
573 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
570 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
571 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
572 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
573 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
574 | 574 | if (msk != 0) layers_ctrl &= msk; |
575 | 575 | } |
576 | 576 | #endif |
577 | 577 | |
578 | 578 | if (m_disable_video) |
579 | 579 | { |
580 | bitmap.fill(get_black_pen( | |
580 | bitmap.fill(get_black_pen( | |
581 | 581 | return 0; |
582 | 582 | } |
583 | 583 | else |
r17988 | r17989 | |
586 | 586 | |
587 | 587 | |
588 | 588 | // spr 0 |
589 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
589 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
590 | 590 | |
591 | 591 | // bglow |
592 | 592 | if( m_vregs[8/2] & (0x8000)){ |
r17988 | r17989 | |
596 | 596 | } |
597 | 597 | |
598 | 598 | // spr 1 |
599 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
599 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
600 | 600 | |
601 | 601 | // bghigh |
602 | 602 | if( m_vregs[8/2] & (0x8000)){ |
r17988 | r17989 | |
606 | 606 | } |
607 | 607 | |
608 | 608 | // spr 2 |
609 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
609 | if (layers_ctrl & 8) dai2kaku_draw_sprites( | |
610 | 610 | |
611 | 611 | // fix |
612 | 612 | if (layers_ctrl & 4) m_tilemap_2->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
---|---|---|
336 | 336 | |
337 | 337 | UINT32 segag80v_state::screen_update_segag80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
338 | 338 | { |
339 | sega_generate_vector_list( | |
339 | sega_generate_vector_list( | |
340 | 340 | SCREEN_UPDATE32_CALL(vector); |
341 | 341 | return 0; |
342 | 342 | } |
r17988 | r17989 | |
---|---|---|
148 | 148 | flipy = !flipy; |
149 | 149 | } |
150 | 150 | |
151 | drawgfx_transpen(bitmap, cliprect, | |
151 | drawgfx_transpen(bitmap, cliprect, | |
152 | 152 | m_spriteram[troffs + 1], |
153 | 153 | m_spriteram[troffs + 2] & 0xf, |
154 | 154 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
200 | 200 | |
201 | 201 | UINT32 superchs_state::screen_update_superchs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
202 | 202 | { |
203 | device_t *tc0480scp = | |
203 | device_t *tc0480scp = | |
204 | 204 | UINT8 layer[5]; |
205 | 205 | UINT16 priority; |
206 | 206 | static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; |
r17988 | r17989 | |
214 | 214 | layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ |
215 | 215 | layer[4] = 4; /* text layer always over bg layers */ |
216 | 216 | |
217 | | |
217 | | |
218 | 218 | |
219 | 219 | /* We have to assume 2nd to bottom layer is always underneath |
220 | 220 | sprites as pdrawgfx cannot yet cope with more than 4 layers */ |
221 | 221 | |
222 | 222 | #ifdef MAME_DEBUG |
223 | if (!screen.machine().input().code_pressed (KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); | |
224 | if (!screen.machine().input().code_pressed (KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); | |
225 | if (!screen.machine().input().code_pressed (KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); | |
226 | if (!screen.machine().input().code_pressed (KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); | |
227 | if (!screen.machine().input().code_pressed (KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); | |
228 | if (!screen.machine().input().code_pressed (KEYCODE_N)) draw_sprites(screen.machine(), bitmap, cliprect, primasks, 48, -116); | |
223 | if (!machine().input().code_pressed (KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); | |
224 | if (!machine().input().code_pressed (KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); | |
225 | if (!machine().input().code_pressed (KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); | |
226 | if (!machine().input().code_pressed (KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); | |
227 | if (!machine().input().code_pressed (KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); | |
228 | if (!machine().input().code_pressed (KEYCODE_N)) draw_sprites(machine(), bitmap, cliprect, primasks, 48, -116); | |
229 | 229 | #else |
230 | 230 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); |
231 | 231 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); |
232 | 232 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); |
233 | 233 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); |
234 | 234 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); /* text layer */ |
235 | draw_sprites( | |
235 | draw_sprites( | |
236 | 236 | #endif |
237 | 237 | return 0; |
238 | 238 | } |
r17988 | r17989 | |
---|---|---|
304 | 304 | int offs,code,scrollx,scrolly,mx,my; |
305 | 305 | |
306 | 306 | /* if any tiles changed, redraw the VRAM */ |
307 | if ( | |
307 | if ( | |
308 | 308 | { |
309 | m_tile_dirtyseq = | |
309 | m_tile_dirtyseq = | |
310 | 310 | memset(m_vram_dirty, 1, 0x1000); |
311 | 311 | } |
312 | 312 | |
r17988 | r17989 | |
321 | 321 | /* If this tile was changed OR tilemap was changed, redraw */ |
322 | 322 | if (m_vram_dirty[offs/2]) { |
323 | 323 | m_vram_dirty[offs/2]=0; |
324 | drawgfx_opaque(*m_tile_bitmap,m_tile_bitmap->cliprect(), | |
324 | drawgfx_opaque(*m_tile_bitmap,m_tile_bitmap->cliprect(), | |
325 | 325 | code, |
326 | 326 | m_HuC6270_vram[offs] >> 4, |
327 | 327 | 0,0, |
328 | 328 | 8*mx,8*my); |
329 | drawgfx_opaque(*m_front_bitmap,m_tile_bitmap->cliprect(), | |
329 | drawgfx_opaque(*m_front_bitmap,m_tile_bitmap->cliprect(), | |
330 | 330 | 0, |
331 | 331 | 0, /* fill the spot with pen 256 */ |
332 | 332 | 0,0, |
333 | 333 | 8*mx,8*my); |
334 | drawgfx_transmask(*m_front_bitmap,m_tile_bitmap->cliprect(), | |
334 | drawgfx_transmask(*m_front_bitmap,m_tile_bitmap->cliprect(), | |
335 | 335 | code, |
336 | 336 | m_HuC6270_vram[offs] >> 4, |
337 | 337 | 0,0, |
r17988 | r17989 | |
348 | 348 | /* Todo: Background enable (not used anyway) */ |
349 | 349 | |
350 | 350 | /* Render low priority sprites, if enabled */ |
351 | if (m_sb_enable) draw_sprites( | |
351 | if (m_sb_enable) draw_sprites( | |
352 | 352 | |
353 | 353 | /* Render background over sprites */ |
354 | 354 | copyscrollbitmap_trans(bitmap,*m_front_bitmap,1,&scrollx,1,&scrolly,cliprect,256); |
355 | 355 | |
356 | 356 | /* Render high priority sprites, if enabled */ |
357 | if (m_sb_enable) draw_sprites( | |
357 | if (m_sb_enable) draw_sprites( | |
358 | 358 | |
359 | 359 | return 0; |
360 | 360 | } |
r17988 | r17989 | |
---|---|---|
170 | 170 | m_bg0_tilemap->draw(bitmap, cliprect, 0,0); |
171 | 171 | m_bg1_tilemap->draw(bitmap, cliprect, 0,0); |
172 | 172 | |
173 | draw_sprites( | |
173 | draw_sprites( | |
174 | 174 | |
175 | 175 | if(flip_screen()) |
176 | 176 | { |
r17988 | r17989 | |
---|---|---|
219 | 219 | case 0: |
220 | 220 | m_bgram0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
221 | 221 | m_bgram1_tilemap->draw(bitmap, cliprect, 0,0); |
222 | draw_sprites( | |
222 | draw_sprites( | |
223 | 223 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
224 | 224 | break; |
225 | 225 | case 1: |
226 | 226 | m_bgram1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
227 | 227 | m_bgram0_tilemap->draw(bitmap, cliprect, 0,0); |
228 | draw_sprites( | |
228 | draw_sprites( | |
229 | 229 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
230 | 230 | break; |
231 | 231 | case 2: |
232 | 232 | m_char_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
233 | 233 | m_bgram0_tilemap->draw(bitmap, cliprect, 0,0); |
234 | draw_sprites( | |
234 | draw_sprites( | |
235 | 235 | m_bgram1_tilemap->draw(bitmap, cliprect, 0,0); |
236 | 236 | break; |
237 | 237 | case 3: |
238 | 238 | m_char_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
239 | 239 | m_bgram1_tilemap->draw(bitmap, cliprect, 0,0); |
240 | draw_sprites( | |
240 | draw_sprites( | |
241 | 241 | m_bgram0_tilemap->draw(bitmap, cliprect, 0,0); |
242 | 242 | break; |
243 | 243 | case 4: |
244 | 244 | m_bgram0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
245 | 245 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
246 | draw_sprites( | |
246 | draw_sprites( | |
247 | 247 | m_bgram1_tilemap->draw(bitmap, cliprect, 0,0); |
248 | 248 | break; |
249 | 249 | case 5: |
250 | 250 | m_bgram1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
251 | 251 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
252 | draw_sprites( | |
252 | draw_sprites( | |
253 | 253 | m_bgram0_tilemap->draw(bitmap, cliprect, 0,0); |
254 | 254 | break; |
255 | 255 | case 6: |
256 | 256 | m_bgram0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
257 | draw_sprites( | |
257 | draw_sprites( | |
258 | 258 | m_bgram1_tilemap->draw(bitmap, cliprect, 0,0); |
259 | 259 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
260 | 260 | break; |
261 | 261 | case 7: |
262 | 262 | m_bgram1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
263 | draw_sprites( | |
263 | draw_sprites( | |
264 | 264 | m_bgram0_tilemap->draw(bitmap, cliprect, 0,0); |
265 | 265 | m_char_tilemap->draw(bitmap, cliprect, 0,0); |
266 | 266 | break; |
r17988 | r17989 | |
---|---|---|
260 | 260 | bitmap.fill(0, cliprect); |
261 | 261 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
262 | 262 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
263 | draw_sprites( | |
263 | draw_sprites( | |
264 | 264 | return 0; |
265 | 265 | } |
r17988 | r17989 | |
---|---|---|
371 | 371 | /* flip screen is embedded in the sprite control registers */ |
372 | 372 | /* can't use flip_screen_set() because the visible area is asymmetrical */ |
373 | 373 | flip_screen_set_no_update(m_spriteram[0x0ff6] & 1); |
374 | | |
374 | | |
375 | 375 | |
376 | 376 | |
377 | 377 | /* background color */ |
378 | bitmap.fill(get_black_pen( | |
378 | bitmap.fill(get_black_pen( | |
379 | 379 | |
380 | 380 | /* berabohm uses asymmetrical visibility windows to iris on the character */ |
381 | 381 | i = ((m_cus116[0] << 8) | m_cus116[1]) - 1; // min x |
r17988 | r17989 | |
414 | 414 | } |
415 | 415 | |
416 | 416 | |
417 | | |
417 | | |
418 | 418 | |
419 | 419 | /* bit 0-2 priority */ |
420 | 420 | /* bit 3 disable */ |
r17988 | r17989 | |
427 | 427 | } |
428 | 428 | } |
429 | 429 | |
430 | draw_sprites( | |
430 | draw_sprites( | |
431 | 431 | return 0; |
432 | 432 | } |
433 | 433 |
r17988 | r17989 | |
---|---|---|
96 | 96 | |
97 | 97 | k052109_tilemap_update(m_k052109); |
98 | 98 | |
99 | | |
99 | | |
100 | 100 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE, 1); |
101 | 101 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 2, 1, 2); /* low priority part of layer */ |
102 | 102 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 2, 0, 4); /* high priority part of layer */ |
r17988 | r17989 | |
---|---|---|
475 | 475 | m_bg_tilemap->set_scrollx(i, m_m62_background_hscroll); |
476 | 476 | } |
477 | 477 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
478 | draw_sprites( | |
478 | draw_sprites( | |
479 | 479 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
480 | 480 | return 0; |
481 | 481 | } |
r17988 | r17989 | |
515 | 515 | m_bg_tilemap->set_scrolly(0, m_m62_background_vscroll); |
516 | 516 | |
517 | 517 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
518 | draw_sprites( | |
518 | draw_sprites( | |
519 | 519 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
520 | draw_sprites( | |
520 | draw_sprites( | |
521 | 521 | return 0; |
522 | 522 | } |
523 | 523 | |
r17988 | r17989 | |
563 | 563 | |
564 | 564 | my_cliprect.min_y = 0 * 8; |
565 | 565 | my_cliprect.max_y = 1 * 8 - 1; |
566 | bitmap.fill(get_black_pen( | |
566 | bitmap.fill(get_black_pen( | |
567 | 567 | |
568 | 568 | my_cliprect.min_y = 31 * 8; |
569 | 569 | my_cliprect.max_y = 32 * 8 - 1; |
570 | bitmap.fill(get_black_pen( | |
570 | bitmap.fill(get_black_pen( | |
571 | 571 | } |
572 | 572 | |
573 | 573 | return 0; |
r17988 | r17989 | |
619 | 619 | m_fg_tilemap->set_transparent_pen(0); |
620 | 620 | |
621 | 621 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
622 | draw_sprites( | |
622 | draw_sprites( | |
623 | 623 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
624 | draw_sprites( | |
624 | draw_sprites( | |
625 | 625 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
626 | 626 | return 0; |
627 | 627 | } |
r17988 | r17989 | |
648 | 648 | m_bg_tilemap->set_scrollx(0, m_m62_background_hscroll - 2); |
649 | 649 | |
650 | 650 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
651 | draw_sprites( | |
651 | draw_sprites( | |
652 | 652 | return 0; |
653 | 653 | } |
654 | 654 | |
r17988 | r17989 | |
693 | 693 | |
694 | 694 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
695 | 695 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
696 | draw_sprites( | |
696 | draw_sprites( | |
697 | 697 | return 0; |
698 | 698 | } |
699 | 699 | |
r17988 | r17989 | |
756 | 756 | m_fg_tilemap->set_transparent_pen(0); |
757 | 757 | |
758 | 758 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
759 | draw_sprites( | |
759 | draw_sprites( | |
760 | 760 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
761 | 761 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
762 | 762 | return 0; |
r17988 | r17989 | |
807 | 807 | m_fg_tilemap->set_transparent_pen(0); |
808 | 808 | |
809 | 809 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
810 | draw_sprites( | |
810 | draw_sprites( | |
811 | 811 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
812 | 812 | return 0; |
813 | 813 | } |
r17988 | r17989 | |
849 | 849 | m_fg_tilemap->set_transparent_pen(0); |
850 | 850 | |
851 | 851 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
852 | draw_sprites( | |
852 | draw_sprites( | |
853 | 853 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
854 | 854 | return 0; |
855 | 855 | } |
r17988 | r17989 | |
893 | 893 | m_fg_tilemap->set_transparent_pen(0); |
894 | 894 | |
895 | 895 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
896 | draw_sprites( | |
896 | draw_sprites( | |
897 | 897 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
898 | 898 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
899 | 899 | return 0; |
r17988 | r17989 | |
934 | 934 | m_bg_tilemap->set_scrollx(i, m_scrollram[i << 1] | (m_scrollram[(i << 1) | 1] << 8)); |
935 | 935 | } |
936 | 936 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
937 | draw_sprites( | |
937 | draw_sprites( | |
938 | 938 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
939 | 939 | return 0; |
940 | 940 | } |
r17988 | r17989 | |
---|---|---|
133 | 133 | flipy = !flipy; |
134 | 134 | } |
135 | 135 | |
136 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
136 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
137 | 137 | ((int)m_videoram[offs]) + ((m_colorram[offs] & (1 << 7) ? 256 : 0) ), |
138 | 138 | (m_colorram[offs] & 0x0f) + 0x10, |
139 | 139 | flipx,flipy, |
r17988 | r17989 | |
180 | 180 | else |
181 | 181 | sx = sx + 32; |
182 | 182 | |
183 | drawgfx_transmask(bitmap,cliprect, | |
183 | drawgfx_transmask(bitmap,cliprect, | |
184 | 184 | spriteram[offs + 2], |
185 | 185 | color, |
186 | 186 | flipx,flipy, |
187 | 187 | sx,sy, |
188 | colortable_get_transpen_mask( | |
188 | colortable_get_transpen_mask( | |
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
r17988 | r17989 | |
213 | 213 | |
214 | 214 | |
215 | 215 | |
216 | drawgfx_opaque(bitmap, cliprect, | |
216 | drawgfx_opaque(bitmap, cliprect, | |
217 | 217 | ((int)m_videoram2[offs]) + ((m_colorram2[offs] & (1 << 7) ? 256 : 0) ), |
218 | 218 | (m_colorram2[offs] & 0x0f) + 0x10, |
219 | 219 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
280 | 280 | m_foreground_layer->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
281 | 281 | m_background_layer->draw(bitmap, cliprect, 0,0); |
282 | 282 | } |
283 | toki_draw_sprites( | |
283 | toki_draw_sprites( | |
284 | 284 | m_text_layer->draw(bitmap, cliprect, 0,0); |
285 | 285 | return 0; |
286 | 286 | } |
r17988 | r17989 | |
302 | 302 | m_background_layer->draw(bitmap, cliprect, 0,0); |
303 | 303 | } |
304 | 304 | |
305 | tokib_draw_sprites( | |
305 | tokib_draw_sprites( | |
306 | 306 | m_text_layer->draw(bitmap, cliprect, 0,0); |
307 | 307 | return 0; |
308 | 308 | } |
r17988 | r17989 | |
---|---|---|
352 | 352 | |
353 | 353 | UINT32 fortyl_state::screen_update_fortyl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
354 | 354 | { |
355 | draw_pixram( | |
355 | draw_pixram( | |
356 | 356 | |
357 | 357 | m_bg_tilemap->set_scrolldy(- m_video_ctrl[1] + 1, - m_video_ctrl[1] - 1 ); |
358 | 358 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
359 | 359 | |
360 | draw_sprites( | |
360 | draw_sprites( | |
361 | 361 | return 0; |
362 | 362 | } |
r17988 | r17989 | |
---|---|---|
128 | 128 | { |
129 | 129 | m_bg_tilemap->set_scrollx(0, m_scrollx); |
130 | 130 | m_bg_tilemap->draw(bitmap, cliprect, 0 , 0); |
131 | draw_sprites( | |
131 | draw_sprites( | |
132 | 132 | m_fg_tilemap->draw(bitmap, cliprect, 0 , 0); |
133 | 133 | return 0; |
134 | 134 | } |
r17988 | r17989 | |
---|---|---|
565 | 565 | UINT32 galaga_state::screen_update_galaga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
566 | 566 | { |
567 | 567 | |
568 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
569 | draw_stars(screen.machine(),bitmap,cliprect); | |
570 | draw_sprites(screen.machine(),bitmap,cliprect); | |
568 | bitmap.fill(get_black_pen(machine()), cliprect); | |
569 | draw_stars(machine(),bitmap,cliprect); | |
570 | draw_sprites(machine(),bitmap,cliprect); | |
571 | 571 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
572 | 572 | return 0; |
573 | 573 | } |
r17988 | r17989 | |
---|---|---|
361 | 361 | |
362 | 362 | UINT32 lasso_state::screen_update_lasso(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
363 | 363 | { |
364 | palette_set_color( | |
364 | palette_set_color( | |
365 | 365 | bitmap.fill(0, cliprect); |
366 | 366 | |
367 | 367 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
368 | draw_lasso(screen.machine(), bitmap, cliprect); | |
369 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
368 | draw_lasso(machine(), bitmap, cliprect); | |
369 | draw_sprites(machine(), bitmap, cliprect, 0); | |
370 | 370 | |
371 | 371 | return 0; |
372 | 372 | } |
373 | 373 | |
374 | 374 | UINT32 lasso_state::screen_update_chameleo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
375 | 375 | { |
376 | palette_set_color( | |
376 | palette_set_color( | |
377 | 377 | bitmap.fill(0, cliprect); |
378 | 378 | |
379 | 379 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
380 | draw_sprites( | |
380 | draw_sprites( | |
381 | 381 | |
382 | 382 | return 0; |
383 | 383 | } |
r17988 | r17989 | |
385 | 385 | |
386 | 386 | UINT32 lasso_state::screen_update_wwjgtin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
387 | 387 | { |
388 | colortable_palette_set_color(screen.machine().colortable, 0, get_color(*m_back_color)); | |
389 | wwjgtin_set_last_four_colors(screen.machine(), screen.machine().colortable); | |
388 | colortable_palette_set_color(machine().colortable, 0, get_color(*m_back_color)); | |
389 | wwjgtin_set_last_four_colors(machine(), machine().colortable); | |
390 | 390 | |
391 | 391 | m_track_tilemap->set_scrollx(0, m_track_scroll[0] + m_track_scroll[1] * 256); |
392 | 392 | m_track_tilemap->set_scrolly(0, m_track_scroll[2] + m_track_scroll[3] * 256); |
r17988 | r17989 | |
394 | 394 | if (m_track_enable) |
395 | 395 | m_track_tilemap->draw(bitmap, cliprect, 0, 0); |
396 | 396 | else |
397 | bitmap.fill(get_black_pen( | |
397 | bitmap.fill(get_black_pen( | |
398 | 398 | |
399 | draw_sprites( | |
399 | draw_sprites( | |
400 | 400 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
401 | 401 | |
402 | 402 | return 0; |
r17988 | r17989 | |
---|---|---|
399 | 399 | |
400 | 400 | tc0080vco_tilemap_update(m_tc0080vco); |
401 | 401 | |
402 | taitoh_log_vram( | |
402 | taitoh_log_vram( | |
403 | 403 | |
404 | 404 | bitmap.fill(0, cliprect); |
405 | 405 | |
406 | 406 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
407 | 407 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
408 | syvalion_draw_sprites( | |
408 | syvalion_draw_sprites( | |
409 | 409 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0); |
410 | 410 | |
411 | 411 | return 0; |
r17988 | r17989 | |
417 | 417 | |
418 | 418 | tc0080vco_tilemap_update(m_tc0080vco); |
419 | 419 | |
420 | taitoh_log_vram( | |
420 | taitoh_log_vram( | |
421 | 421 | |
422 | 422 | bitmap.fill(0, cliprect); |
423 | 423 | |
424 | 424 | #ifdef MAME_DEBUG |
425 | if (! | |
425 | if (! | |
426 | 426 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
427 | if (!screen.machine().input().code_pressed(KEYCODE_S)) | |
428 | recordbr_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
429 | if (!screen.machine().input().code_pressed(KEYCODE_D)) | |
427 | if (!machine().input().code_pressed(KEYCODE_S)) | |
428 | recordbr_draw_sprites(machine(), bitmap, cliprect, 0); | |
429 | if (!machine().input().code_pressed(KEYCODE_D)) | |
430 | 430 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
431 | if (!screen.machine().input().code_pressed(KEYCODE_F)) | |
432 | recordbr_draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
431 | if (!machine().input().code_pressed(KEYCODE_F)) | |
432 | recordbr_draw_sprites(machine(), bitmap, cliprect, 1); | |
433 | 433 | #else |
434 | 434 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
435 | recordbr_draw_sprites( | |
435 | recordbr_draw_sprites( | |
436 | 436 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
437 | recordbr_draw_sprites( | |
437 | recordbr_draw_sprites( | |
438 | 438 | #endif |
439 | 439 | |
440 | 440 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0); |
r17988 | r17989 | |
447 | 447 | |
448 | 448 | tc0080vco_tilemap_update(m_tc0080vco); |
449 | 449 | |
450 | taitoh_log_vram( | |
450 | taitoh_log_vram( | |
451 | 451 | |
452 | 452 | bitmap.fill(0, cliprect); |
453 | 453 | |
454 | 454 | #ifdef MAME_DEBUG |
455 | if (! | |
455 | if (! | |
456 | 456 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
457 | if (!screen.machine().input().code_pressed(KEYCODE_S)) | |
458 | dleague_draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
459 | if (!screen.machine().input().code_pressed(KEYCODE_D)) | |
457 | if (!machine().input().code_pressed(KEYCODE_S)) | |
458 | dleague_draw_sprites(machine(), bitmap, cliprect, 0); | |
459 | if (!machine().input().code_pressed(KEYCODE_D)) | |
460 | 460 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
461 | if (!screen.machine().input().code_pressed(KEYCODE_F)) | |
462 | dleague_draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
461 | if (!machine().input().code_pressed(KEYCODE_F)) | |
462 | dleague_draw_sprites(machine(), bitmap, cliprect, 1); | |
463 | 463 | #else |
464 | 464 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
465 | dleague_draw_sprites ( | |
465 | dleague_draw_sprites ( | |
466 | 466 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 1, 0, 0); |
467 | dleague_draw_sprites ( | |
467 | dleague_draw_sprites ( | |
468 | 468 | #endif |
469 | 469 | |
470 | 470 | tc0080vco_tilemap_draw(m_tc0080vco, bitmap, cliprect, 2, 0, 0); |
r17988 | r17989 | |
---|---|---|
411 | 411 | |
412 | 412 | UINT32 psychic5_state::screen_update_psychic5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
413 | 413 | { |
414 | bitmap.fill(get_black_pen( | |
414 | bitmap.fill(get_black_pen( | |
415 | 415 | if (m_bg_status & 1) /* Backgound enable */ |
416 | draw_background( | |
416 | draw_background( | |
417 | 417 | if (!(m_title_screen & 1)) |
418 | draw_sprites( | |
418 | draw_sprites( | |
419 | 419 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
420 | 420 | return 0; |
421 | 421 | } |
r17988 | r17989 | |
425 | 425 | if (m_bg_status & 1) /* Backgound enable */ |
426 | 426 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
427 | 427 | else |
428 | bitmap.fill(screen.machine().pens[0x0ff], cliprect); | |
429 | draw_sprites(screen.machine(), bitmap, cliprect); | |
428 | bitmap.fill(machine().pens[0x0ff], cliprect); | |
429 | draw_sprites(machine(), bitmap, cliprect); | |
430 | 430 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
431 | 431 | return 0; |
432 | 432 | } |
r17988 | r17989 | |
---|---|---|
133 | 133 | UINT8 data = m_main_ram[offs]; |
134 | 134 | UINT8 fore_color = m_screen_red ? 1 : color_map_base[color_address] & 0x07; |
135 | 135 | |
136 | set_8_pixels( | |
136 | set_8_pixels( | |
137 | 137 | } |
138 | 138 | |
139 | clear_extra_columns( | |
139 | clear_extra_columns( | |
140 | 140 | |
141 | 141 | return 0; |
142 | 142 | } |
r17988 | r17989 | |
165 | 165 | UINT8 fore_color = m_screen_red ? 1 : color_map_base[color_address] & 0x07; |
166 | 166 | |
167 | 167 | /* blue background */ |
168 | set_8_pixels( | |
168 | set_8_pixels( | |
169 | 169 | } |
170 | 170 | |
171 | clear_extra_columns( | |
171 | clear_extra_columns( | |
172 | 172 | |
173 | 173 | return 0; |
174 | 174 | } |
r17988 | r17989 | |
205 | 205 | back_color = (((back_data & 0x0c) == 0x0c) && m_schaser_background_select) ? 4 : 2; |
206 | 206 | } |
207 | 207 | |
208 | set_8_pixels( | |
208 | set_8_pixels( | |
209 | 209 | } |
210 | 210 | |
211 | clear_extra_columns( | |
211 | clear_extra_columns( | |
212 | 212 | |
213 | 213 | return 0; |
214 | 214 | } |
r17988 | r17989 | |
230 | 230 | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
231 | 231 | |
232 | 232 | /* blue background */ |
233 | set_8_pixels( | |
233 | set_8_pixels( | |
234 | 234 | } |
235 | 235 | |
236 | clear_extra_columns( | |
236 | clear_extra_columns( | |
237 | 237 | |
238 | 238 | return 0; |
239 | 239 | } |
r17988 | r17989 | |
254 | 254 | UINT8 data = m_main_ram[offs]; |
255 | 255 | UINT8 fore_color = m_colorram[offs & 0x1f1f] & 0x07; |
256 | 256 | |
257 | set_8_pixels( | |
257 | set_8_pixels( | |
258 | 258 | } |
259 | 259 | |
260 | clear_extra_columns( | |
260 | clear_extra_columns( | |
261 | 261 | |
262 | 262 | return 0; |
263 | 263 | } |
r17988 | r17989 | |
272 | 272 | |
273 | 273 | invadpt2_get_pens(pens); |
274 | 274 | |
275 | color_map_base = | |
275 | color_map_base = | |
276 | 276 | cloud_gfx = memregion("user1")->base(); |
277 | 277 | |
278 | 278 | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
r17988 | r17989 | |
297 | 297 | |
298 | 298 | if ((color_map_base[color_address] & 0x08) || (cloud_y >= 64)) |
299 | 299 | { |
300 | set_8_pixels( | |
300 | set_8_pixels( | |
301 | 301 | } |
302 | 302 | else |
303 | 303 | { |
r17988 | r17989 | |
320 | 320 | color = (cloud_gfx[cloud_gfx_offs] & bit) ? 7 : back_color; |
321 | 321 | } |
322 | 322 | |
323 | set_pixel( | |
323 | set_pixel( | |
324 | 324 | |
325 | 325 | x = x + 1; |
326 | 326 | data = data >> 1; |
r17988 | r17989 | |
328 | 328 | } |
329 | 329 | } |
330 | 330 | |
331 | clear_extra_columns( | |
331 | clear_extra_columns( | |
332 | 332 | |
333 | 333 | return 0; |
334 | 334 | } |
r17988 | r17989 | |
349 | 349 | UINT8 data = m_main_ram[offs]; |
350 | 350 | UINT8 fore_color = ~m_colorram[offs & 0x1f9f] & 0x07; |
351 | 351 | |
352 | set_8_pixels( | |
352 | set_8_pixels( | |
353 | 353 | } |
354 | 354 | |
355 | clear_extra_columns( | |
355 | clear_extra_columns( | |
356 | 356 | |
357 | 357 | return 0; |
358 | 358 | } |
r17988 | r17989 | |
375 | 375 | UINT8 data = m_main_ram[offs]; |
376 | 376 | UINT8 fore_color = m_colorram[color_address] & 0x07; |
377 | 377 | |
378 | set_8_pixels( | |
378 | set_8_pixels( | |
379 | 379 | } |
380 | 380 | |
381 | clear_extra_columns( | |
381 | clear_extra_columns( | |
382 | 382 | |
383 | 383 | return 0; |
384 | 384 | } |
r17988 | r17989 | |
406 | 406 | UINT8 data = m_main_ram[offs]; |
407 | 407 | UINT8 fore_color = color_map_base[color_address] & 0x07; |
408 | 408 | |
409 | set_8_pixels( | |
409 | set_8_pixels( | |
410 | 410 | } |
411 | 411 | |
412 | clear_extra_columns( | |
412 | clear_extra_columns( | |
413 | 413 | |
414 | 414 | return 0; |
415 | 415 | } |
r17988 | r17989 | |
439 | 439 | } |
440 | 440 | } |
441 | 441 | |
442 | clear_extra_columns( | |
442 | clear_extra_columns( | |
443 | 443 | |
444 | 444 | return 0; |
445 | 445 | } |
r17988 | r17989 | |
460 | 460 | UINT8 data = m_main_ram[offs]; |
461 | 461 | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
462 | 462 | |
463 | set_8_pixels( | |
463 | set_8_pixels( | |
464 | 464 | } |
465 | 465 | |
466 | clear_extra_columns( | |
466 | clear_extra_columns( | |
467 | 467 | |
468 | 468 | return 0; |
469 | 469 | } |
r17988 | r17989 | |
---|---|---|
209 | 209 | layer[1] = layer[0] ^ 1; |
210 | 210 | layer[2] = 2; |
211 | 211 | |
212 | | |
212 | | |
213 | 213 | |
214 | 214 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
215 | 215 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
221 | 221 | /* Sprites can be under/over the layer below text layer */ |
222 | 222 | { |
223 | 223 | static const int primasks[2] = {0xf0, 0xfc}; |
224 | draw_sprites( | |
224 | draw_sprites( | |
225 | 225 | } |
226 | 226 | |
227 | 227 | return 0; |
r17988 | r17989 | |
---|---|---|
244 | 244 | int layers_ctrl1 = m_layers_ctrl; |
245 | 245 | |
246 | 246 | #ifdef MAME_DEBUG |
247 | if ( | |
247 | if ( | |
248 | 248 | { |
249 | 249 | int msk = 0; |
250 | 250 | |
251 | if (screen.machine().input().code_pressed(KEYCODE_Q)) { msk |= 0xfff1;} | |
252 | if (screen.machine().input().code_pressed(KEYCODE_W)) { msk |= 0xfff2;} | |
253 | if (screen.machine().input().code_pressed(KEYCODE_E)) { msk |= 0xfff4;} | |
254 | if (screen.machine().input().code_pressed(KEYCODE_A)) { msk |= 0xfff8;} | |
251 | if (machine().input().code_pressed(KEYCODE_Q)) { msk |= 0xfff1;} | |
252 | if (machine().input().code_pressed(KEYCODE_W)) { msk |= 0xfff2;} | |
253 | if (machine().input().code_pressed(KEYCODE_E)) { msk |= 0xfff4;} | |
254 | if (machine().input().code_pressed(KEYCODE_A)) { msk |= 0xfff8;} | |
255 | 255 | if (msk != 0) layers_ctrl1 &= msk; |
256 | 256 | |
257 | 257 | #define SETSCROLL \ |
r17988 | r17989 | |
261 | 261 | m_fg_tilemap->set_scrolly(0, m_posy); \ |
262 | 262 | popmessage("B>%04X:%04X F>%04X:%04X",m_posx%(BG_NX*16),m_posy%(BG_NY*16),m_posx%(FG_NX*16),m_posy%(FG_NY*16)); |
263 | 263 | |
264 | if (screen.machine().input().code_pressed(KEYCODE_L)) { m_posx +=8; SETSCROLL } | |
265 | if (screen.machine().input().code_pressed(KEYCODE_J)) { m_posx -=8; SETSCROLL } | |
266 | if (screen.machine().input().code_pressed(KEYCODE_K)) { m_posy +=8; SETSCROLL } | |
267 | if (screen.machine().input().code_pressed(KEYCODE_I)) { m_posy -=8; SETSCROLL } | |
268 | if (screen.machine().input().code_pressed(KEYCODE_H)) { m_posx = m_posy = 0; SETSCROLL } | |
264 | if (machine().input().code_pressed(KEYCODE_L)) { m_posx +=8; SETSCROLL } | |
265 | if (machine().input().code_pressed(KEYCODE_J)) { m_posx -=8; SETSCROLL } | |
266 | if (machine().input().code_pressed(KEYCODE_K)) { m_posy +=8; SETSCROLL } | |
267 | if (machine().input().code_pressed(KEYCODE_I)) { m_posy -=8; SETSCROLL } | |
268 | if (machine().input().code_pressed(KEYCODE_H)) { m_posx = m_posy = 0; SETSCROLL } | |
269 | 269 | |
270 | 270 | } |
271 | 271 | #endif |
r17988 | r17989 | |
279 | 279 | if (layers_ctrl1 & 2) |
280 | 280 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
281 | 281 | if (layers_ctrl1 & 8) |
282 | draw_sprites( | |
282 | draw_sprites( | |
283 | 283 | if (layers_ctrl1 & 4) |
284 | 284 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
285 | 285 |
r17988 | r17989 | |
---|---|---|
177 | 177 | if (m_video_enable) |
178 | 178 | { |
179 | 179 | k051316_zoom_draw(m_k051316, bitmap, cliprect, 0, 0); |
180 | draw_sprites( | |
180 | draw_sprites( | |
181 | 181 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
182 | 182 | } |
183 | 183 | else |
r17988 | r17989 | |
---|---|---|
145 | 145 | UINT32 mrjong_state::screen_update_mrjong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
146 | 146 | { |
147 | 147 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
148 | draw_sprites( | |
148 | draw_sprites( | |
149 | 149 | return 0; |
150 | 150 | } |
r17988 | r17989 | |
---|---|---|
125 | 125 | bitmap.pix16(y + oy, x + ox) = forecolor; |
126 | 126 | |
127 | 127 | /* Main Screen */ |
128 | drawgfx_transpen(bitmap,cliprect, | |
128 | drawgfx_transpen(bitmap,cliprect, | |
129 | 129 | code, |
130 | 130 | m_color_ram[offs] & 0x3f, |
131 | 131 | 0,0, |
r17988 | r17989 | |
135 | 135 | /* background for Collision Detection (it can only hit certain items) */ |
136 | 136 | if((m_color_ram[offs] & 7) == 0) |
137 | 137 | { |
138 | drawgfx_opaque(m_collision_background,cliprect, | |
138 | drawgfx_opaque(m_collision_background,cliprect, | |
139 | 139 | code, |
140 | 140 | 64, |
141 | 141 | 0,0, |
r17988 | r17989 | |
189 | 189 | bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel); |
190 | 190 | |
191 | 191 | /* S2636 vs. background collision detection */ |
192 | if (colortable_entry_get_value( | |
192 | if (colortable_entry_get_value( | |
193 | 193 | { |
194 | 194 | if (S2636_IS_PIXEL_DRAWN(pixel0)) m_collision_register |= 0x01; |
195 | 195 | if (S2636_IS_PIXEL_DRAWN(pixel2)) m_collision_register |= 0x02; |
r17988 | r17989 | |
---|---|---|
433 | 433 | if (state) |
434 | 434 | { |
435 | 435 | |
436 | taito_update_sprites_active_area( | |
436 | taito_update_sprites_active_area( | |
437 | 437 | |
438 | 438 | m_prepare_sprites = 1; |
439 | 439 | } |
r17988 | r17989 | |
458 | 458 | |
459 | 459 | UINT32 slapshot_state::screen_update_slapshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
460 | 460 | { |
461 | address_space &space = | |
461 | address_space &space = | |
462 | 462 | UINT8 layer[5]; |
463 | 463 | UINT8 tilepri[5]; |
464 | 464 | UINT8 spritepri[4]; |
465 | 465 | UINT16 priority; |
466 | 466 | |
467 | 467 | #ifdef MAME_DEBUG |
468 | if ( | |
468 | if ( | |
469 | 469 | { |
470 | 470 | m_dislayer[0] ^= 1; |
471 | 471 | popmessage("bg0: %01x",m_dislayer[0]); |
472 | 472 | } |
473 | 473 | |
474 | if ( | |
474 | if ( | |
475 | 475 | { |
476 | 476 | m_dislayer[1] ^= 1; |
477 | 477 | popmessage("bg1: %01x",m_dislayer[1]); |
478 | 478 | } |
479 | 479 | |
480 | if ( | |
480 | if ( | |
481 | 481 | { |
482 | 482 | m_dislayer[2] ^= 1; |
483 | 483 | popmessage("bg2: %01x",m_dislayer[2]); |
484 | 484 | } |
485 | 485 | |
486 | if ( | |
486 | if ( | |
487 | 487 | { |
488 | 488 | m_dislayer[3] ^= 1; |
489 | 489 | popmessage("bg3: %01x",m_dislayer[3]); |
490 | 490 | } |
491 | 491 | |
492 | if ( | |
492 | if ( | |
493 | 493 | { |
494 | 494 | m_dislayer[4] ^= 1; |
495 | 495 | popmessage("text: %01x",m_dislayer[4]); |
496 | 496 | } |
497 | 497 | #endif |
498 | 498 | |
499 | taito_handle_sprite_buffering( | |
499 | taito_handle_sprite_buffering( | |
500 | 500 | |
501 | 501 | tc0480scp_tilemap_update(m_tc0480scp); |
502 | 502 | |
r17988 | r17989 | |
521 | 521 | spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f; |
522 | 522 | spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4; |
523 | 523 | |
524 | | |
524 | | |
525 | 525 | bitmap.fill(0, cliprect); |
526 | 526 | |
527 | 527 | #ifdef MAME_DEBUG |
r17988 | r17989 | |
556 | 556 | if (spritepri[i] < tilepri[(layer[3])]) primasks[i] |= 0xff00; |
557 | 557 | } |
558 | 558 | |
559 | draw_sprites( | |
559 | draw_sprites( | |
560 | 560 | } |
561 | 561 | |
562 | 562 | /* |
r17988 | r17989 | |
---|---|---|
1093 | 1093 | int x, y; |
1094 | 1094 | |
1095 | 1095 | /* copy the palette from palette RAM */ |
1096 | set_palette( | |
1096 | set_palette( | |
1097 | 1097 | |
1098 | 1098 | /* update the foreground & background */ |
1099 | update_foreground(screen.machine()); | |
1100 | update_background(screen.machine()); | |
1099 | update_foreground(machine()); | |
1100 | update_background(machine()); | |
1101 | 1101 | |
1102 | 1102 | /* blend the bitmaps and do collision detection */ |
1103 | 1103 | for (y = 0; y < 256; y++) |
r17988 | r17989 | |
1114 | 1114 | int bpix = bg[(x + m_scrollx) & 255]; |
1115 | 1115 | scanline[x] = bpix | (fpix << 3); |
1116 | 1116 | if (fpix && (bpix & bgcollmask) && count++ < 128) |
1117 | | |
1117 | | |
1118 | 1118 | } |
1119 | 1119 | } |
1120 | 1120 |
r17988 | r17989 | |
---|---|---|
258 | 258 | if (m_bg2_on) |
259 | 259 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
260 | 260 | else |
261 | bitmap.fill(get_black_pen( | |
261 | bitmap.fill(get_black_pen( | |
262 | 262 | |
263 | 263 | if (m_obj_on) |
264 | draw_sprites( | |
264 | draw_sprites( | |
265 | 265 | |
266 | 266 | if (m_bg1_on) |
267 | 267 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
268 | 268 | |
269 | 269 | if (m_obj_on) |
270 | draw_sprites( | |
270 | draw_sprites( | |
271 | 271 | |
272 | 272 | if (m_char_on) |
273 | 273 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
126 | 126 | |
127 | 127 | UINT32 cninja_state::screen_update_cninja(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
128 | 128 | { |
129 | address_space &space = | |
129 | address_space &space = | |
130 | 130 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
131 | 131 | |
132 | 132 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
134 | 134 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
135 | 135 | |
136 | 136 | /* Draw playfields */ |
137 | | |
137 | | |
138 | 138 | bitmap.fill(512, cliprect); |
139 | 139 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1); |
140 | 140 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); |
141 | 141 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2); |
142 | 142 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4); |
143 | | |
143 | | |
144 | 144 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
145 | 145 | return 0; |
146 | 146 | } |
147 | 147 | |
148 | 148 | UINT32 cninja_state::screen_update_cninjabl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
149 | 149 | { |
150 | address_space &space = | |
150 | address_space &space = | |
151 | 151 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
152 | 152 | |
153 | 153 | /* force layers to be enabled */ |
r17988 | r17989 | |
159 | 159 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
160 | 160 | |
161 | 161 | /* Draw playfields */ |
162 | | |
162 | | |
163 | 163 | bitmap.fill(512, cliprect); |
164 | 164 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1); |
165 | 165 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); |
166 | 166 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2); |
167 | 167 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4); |
168 | cninjabl_draw_sprites( | |
168 | cninjabl_draw_sprites( | |
169 | 169 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
170 | 170 | return 0; |
171 | 171 | } |
172 | 172 | |
173 | 173 | UINT32 cninja_state::screen_update_edrandy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
174 | 174 | { |
175 | address_space &space = | |
175 | address_space &space = | |
176 | 176 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
177 | 177 | |
178 | 178 | flip_screen_set(BIT(flip, 7)); |
179 | 179 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
180 | 180 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
181 | 181 | |
182 | | |
182 | | |
183 | 183 | bitmap.fill(0, cliprect); |
184 | 184 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1); |
185 | 185 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); |
186 | 186 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 4); |
187 | | |
187 | | |
188 | 188 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
189 | 189 | return 0; |
190 | 190 | } |
191 | 191 | |
192 | 192 | UINT32 cninja_state::screen_update_robocop2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
193 | 193 | { |
194 | address_space &space = | |
194 | address_space &space = | |
195 | 195 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
196 | 196 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
197 | 197 | |
r17988 | r17989 | |
215 | 215 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
216 | 216 | |
217 | 217 | /* Draw playfields */ |
218 | | |
218 | | |
219 | 219 | bitmap.fill(0x200, cliprect); |
220 | 220 | |
221 | 221 | if ((priority & 4) == 0) |
r17988 | r17989 | |
235 | 235 | break; |
236 | 236 | } |
237 | 237 | |
238 | | |
238 | | |
239 | 239 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
240 | 240 | return 0; |
241 | 241 | } |
r17988 | r17989 | |
248 | 248 | |
249 | 249 | UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
250 | 250 | { |
251 | address_space &space = | |
251 | address_space &space = | |
252 | 252 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
253 | 253 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
254 | 254 | |
r17988 | r17989 | |
260 | 260 | /* Draw playfields */ |
261 | 261 | bitmap.fill(0x400, cliprect); /* Confirmed */ |
262 | 262 | |
263 | screen.machine().device<decospr_device>("spritegen1")->set_alt_format(true); | |
264 | screen.machine().device<decospr_device>("spritegen2")->set_alt_format(true); | |
265 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
266 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
263 | machine().device<decospr_device>("spritegen1")->set_alt_format(true); | |
264 | machine().device<decospr_device>("spritegen2")->set_alt_format(true); | |
265 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
266 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
267 | 267 | |
268 | 268 | |
269 | 269 | /* There is no priority prom on this board, but there is a |
r17988 | r17989 | |
284 | 284 | |
285 | 285 | if (priority & 1) |
286 | 286 | { |
287 | screen.machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff); | |
288 | screen.machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer? | |
287 | machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff); | |
288 | machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer? | |
289 | 289 | } |
290 | 290 | else |
291 | 291 | { |
292 | screen.machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer? | |
293 | screen.machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff); | |
292 | machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer? | |
293 | machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff); | |
294 | 294 | } |
295 | 295 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
296 | 296 | return 0; |
r17988 | r17989 | |
---|---|---|
376 | 376 | /* draw high priority sprite pixels, setting priority bitmap to non-zero |
377 | 377 | wherever there is a high-priority pixel; note that we draw to the bitmap |
378 | 378 | which is safe because the bg_tilemap draw will overwrite everything */ |
379 | screen.machine().priority_bitmap.fill(0x00, cliprect); | |
380 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
379 | machine().priority_bitmap.fill(0x00, cliprect); | |
380 | draw_sprites(machine(), bitmap, cliprect, 0); | |
381 | 381 | |
382 | 382 | /* draw background */ |
383 | 383 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
384 | 384 | |
385 | 385 | /* draw low priority fg tiles */ |
386 | draw_fg( | |
386 | draw_fg( | |
387 | 387 | |
388 | 388 | /* draw sprites with regular transparency */ |
389 | draw_sprites( | |
389 | draw_sprites( | |
390 | 390 | |
391 | 391 | /* draw high priority fg tiles */ |
392 | draw_fg( | |
392 | draw_fg( | |
393 | 393 | |
394 | 394 | /* draw sprite pixels with colortable values >= 0xf0, which have priority over everything */ |
395 | draw_sprites( | |
395 | draw_sprites( | |
396 | 396 | return 0; |
397 | 397 | } |
r17988 | r17989 | |
---|---|---|
130 | 130 | UINT32 psikyo4_state::screen_update_psikyo4_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
131 | 131 | { |
132 | 132 | bitmap.fill(0x1000, cliprect); |
133 | draw_sprites( | |
133 | draw_sprites( | |
134 | 134 | return 0; |
135 | 135 | } |
136 | 136 | |
137 | 137 | UINT32 psikyo4_state::screen_update_psikyo4_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
138 | 138 | { |
139 | 139 | bitmap.fill(0x1001, cliprect); |
140 | draw_sprites( | |
140 | draw_sprites( | |
141 | 141 | return 0; |
142 | 142 | } |
143 | 143 |
r17988 | r17989 | |
---|---|---|
126 | 126 | sy = 31-sy ; |
127 | 127 | |
128 | 128 | drawgfx_transpen(bitmap, |
129 | cliprect, | |
129 | cliprect, | |
130 | 130 | mem[offs + ( m_ra_bkgpage * 1024 )] |
131 | 131 | + ((( mem[offs + 0x4000 + ( m_ra_bkgpage * 1024 )] & 0xc0 ) >> 6 ) * 256 ) , |
132 | 132 | m_ra_bkgcol, |
r17988 | r17989 | |
164 | 164 | if(bank) |
165 | 165 | bank += m_ra_spritebank; |
166 | 166 | |
167 | drawgfx_transpen(bitmap, cliprect, | |
167 | drawgfx_transpen(bitmap, cliprect, | |
168 | 168 | spriteram[offs+1] & 0x3f , |
169 | 169 | spriteram[offs+2] & 0x1f, |
170 | 170 | m_ra_flipx,!(s_flipy^m_ra_flipy), |
r17988 | r17989 | |
192 | 192 | |
193 | 193 | if (m_ra_flipx) sx = 31 - sx; |
194 | 194 | |
195 | drawgfx_transpen(bitmap,cliprect, | |
195 | drawgfx_transpen(bitmap,cliprect, | |
196 | 196 | m_videoram[ offs ] , |
197 | 197 | col, |
198 | 198 | m_ra_flipx,m_ra_flipy, |
r17988 | r17989 | |
---|---|---|
251 | 251 | m_ol_p123_tilemap->draw(bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0); |
252 | 252 | m_ol_p0_tilemap->draw(bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0); |
253 | 253 | |
254 | draw_sprites( | |
254 | draw_sprites( | |
255 | 255 | |
256 | 256 | m_p123_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
257 | 257 | m_p0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
r17988 | r17989 | |
---|---|---|
161 | 161 | { |
162 | 162 | |
163 | 163 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
164 | draw_sprites( | |
164 | draw_sprites( | |
165 | 165 | return 0; |
166 | 166 | } |
r17988 | r17989 | |
---|---|---|
339 | 339 | UINT32 sidearms_state::screen_update_sidearms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
340 | 340 | { |
341 | 341 | |
342 | sidearms_draw_starfield( | |
342 | sidearms_draw_starfield( | |
343 | 343 | |
344 | 344 | m_bg_tilemap->set_scrollx(0, m_bg_scrollx[0] + (m_bg_scrollx[1] << 8 & 0xf00)); |
345 | 345 | m_bg_tilemap->set_scrolly(0, m_bg_scrolly[0] + (m_bg_scrolly[1] << 8 & 0xf00)); |
r17988 | r17989 | |
348 | 348 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
349 | 349 | |
350 | 350 | if (m_objon) |
351 | draw_sprites( | |
351 | draw_sprites( | |
352 | 352 | |
353 | 353 | if (m_charon) |
354 | 354 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
21 | 21 | |
22 | 22 | UINT32 tumblep_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
23 | 23 | { |
24 | address_space &space = | |
24 | address_space &space = | |
25 | 25 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
26 | 26 | |
27 | 27 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
32 | 32 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
33 | 33 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
34 | 34 | |
35 | | |
35 | | |
36 | 36 | return 0; |
37 | 37 | } |
r17988 | r17989 | |
---|---|---|
96 | 96 | UINT32 jack_state::screen_update_jack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
97 | 97 | { |
98 | 98 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
99 | jack_draw_sprites( | |
99 | jack_draw_sprites( | |
100 | 100 | return 0; |
101 | 101 | } |
102 | 102 | |
r17988 | r17989 | |
179 | 179 | UINT32 jack_state::screen_update_joinem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
180 | 180 | { |
181 | 181 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
182 | joinem_draw_sprites( | |
182 | joinem_draw_sprites( | |
183 | 183 | return 0; |
184 | 184 | } |
r17988 | r17989 | |
---|---|---|
215 | 215 | |
216 | 216 | if (m_lastflip != flip_screen() || m_lastpixcolor != m_pixcolor) |
217 | 217 | { |
218 | address_space &space = * | |
218 | address_space &space = * | |
219 | 219 | |
220 | 220 | m_lastflip = flip_screen(); |
221 | 221 | m_lastpixcolor = m_pixcolor; |
r17988 | r17989 | |
227 | 227 | |
228 | 228 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
229 | 229 | |
230 | draw_sprites( | |
230 | draw_sprites( | |
231 | 231 | |
232 | 232 | copybitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, PIXMAP_COLOR_BASE + 8 * m_pixcolor); |
233 | 233 | return 0; |
r17988 | r17989 | |
---|---|---|
5 | 5 | |
6 | 6 | UINT32 dietgo_state::screen_update_dietgo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
7 | 7 | { |
8 | address_space &space = | |
8 | address_space &space = | |
9 | 9 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
10 | 10 | |
11 | 11 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
16 | 16 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
17 | 17 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
18 | 18 | |
19 | | |
19 | | |
20 | 20 | return 0; |
21 | 21 | } |
r17988 | r17989 | |
---|---|---|
274 | 274 | int color = (attributes & 0xF0) >> 4; |
275 | 275 | int tile_number = videoram[offs] | ((attributes & 0x0F) << 8); |
276 | 276 | |
277 | drawgfx_opaque(bitmap,cliprect, | |
277 | drawgfx_opaque(bitmap,cliprect, | |
278 | 278 | tile_number, |
279 | 279 | color, |
280 | 280 | 0,0, |
281 | 281 | sx,sy); |
282 | 282 | } |
283 | 283 | |
284 | draw_sprites( | |
284 | draw_sprites( | |
285 | 285 | return 0; |
286 | 286 | } |
287 | 287 | |
r17988 | r17989 | |
299 | 299 | g = (m_generic_paletteram_8[0x500 + 16 * m_rear_color + i] << 3) & 0xFF; |
300 | 300 | b = (m_generic_paletteram_8[0x600 + 16 * m_rear_color + i] << 3) & 0xFF; |
301 | 301 | |
302 | palette_set_color( | |
302 | palette_set_color( | |
303 | 303 | |
304 | 304 | r = (m_generic_paletteram_8[0x400 + 16 * m_rear_color + 32 + i] << 3) & 0xFF; |
305 | 305 | g = (m_generic_paletteram_8[0x500 + 16 * m_rear_color + 32 + i] << 3) & 0xFF; |
306 | 306 | b = (m_generic_paletteram_8[0x600 + 16 * m_rear_color + 32 + i] << 3) & 0xFF; |
307 | 307 | |
308 | palette_set_color( | |
308 | palette_set_color( | |
309 | 309 | } |
310 | 310 | |
311 | 311 | if (m_rear_disable) /* opaque foreground */ |
312 | 312 | { |
313 | draw_foreground(screen.machine(),bitmap,cliprect,0,1); | |
314 | draw_sprites(screen.machine(),bitmap,bottomvisiblearea); | |
315 | draw_foreground(screen.machine(),bitmap,cliprect,1,0); | |
313 | draw_foreground(machine(),bitmap,cliprect,0,1); | |
314 | draw_sprites(machine(),bitmap,bottomvisiblearea); | |
315 | draw_foreground(machine(),bitmap,cliprect,1,0); | |
316 | 316 | } |
317 | 317 | else |
318 | 318 | { |
319 | draw_background(screen.machine(),bitmap,cliprect); | |
320 | draw_foreground(screen.machine(),bitmap,cliprect,0,0); | |
321 | draw_sprites(screen.machine(),bitmap,bottomvisiblearea); | |
322 | draw_foreground(screen.machine(),bitmap,cliprect,1,0); // priority tiles | |
319 | draw_background(machine(),bitmap,cliprect); | |
320 | draw_foreground(machine(),bitmap,cliprect,0,0); | |
321 | draw_sprites(machine(),bitmap,bottomvisiblearea); | |
322 | draw_foreground(machine(),bitmap,cliprect,1,0); // priority tiles | |
323 | 323 | } |
324 | 324 | return 0; |
325 | 325 | } |
r17988 | r17989 | |
---|---|---|
744 | 744 | |
745 | 745 | UINT32 taitosj_state::screen_update_taitosj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
746 | 746 | { |
747 | return video_update_common( | |
747 | return video_update_common( | |
748 | 748 | } |
749 | 749 | |
750 | 750 | |
751 | 751 | UINT32 taitosj_state::screen_update_kikstart(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
752 | 752 | { |
753 | return video_update_common( | |
753 | return video_update_common( | |
754 | 754 | } |
r17988 | r17989 | |
---|---|---|
245 | 245 | |
246 | 246 | m_bg_tilemap->set_scrolly(0, -(*m_scroll_y)); |
247 | 247 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
248 | kingofb_draw_sprites( | |
248 | kingofb_draw_sprites( | |
249 | 249 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
250 | 250 | return 0; |
251 | 251 | } |
r17988 | r17989 | |
304 | 304 | |
305 | 305 | m_bg_tilemap->set_scrolly(0, -(*m_scroll_y)); |
306 | 306 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
307 | ringking_draw_sprites( | |
307 | ringking_draw_sprites( | |
308 | 308 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
309 | 309 | return 0; |
310 | 310 | } |
r17988 | r17989 | |
---|---|---|
351 | 351 | { |
352 | 352 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
353 | 353 | m_tx_tilemap->draw(bitmap, cliprect, 1, 0); |
354 | draw_sprites( | |
354 | draw_sprites( | |
355 | 355 | } |
356 | 356 | else |
357 | 357 | { |
358 | draw_sprites( | |
358 | draw_sprites( | |
359 | 359 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
360 | 360 | m_tx_tilemap->draw(bitmap, cliprect, 1, 0); |
361 | 361 | } |
r17988 | r17989 | |
375 | 375 | else |
376 | 376 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
377 | 377 | |
378 | draw_sprites( | |
378 | draw_sprites( | |
379 | 379 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
380 | 380 | return 0; |
381 | 381 | } |
r17988 | r17989 | |
---|---|---|
304 | 304 | |
305 | 305 | if (m_screen_refresh) |
306 | 306 | { |
307 | int width = screen.machine().primary_screen->width(); | |
308 | int height = screen.machine().primary_screen->height(); | |
307 | int width = machine().primary_screen->width(); | |
308 | int height = machine().primary_screen->height(); | |
309 | 309 | |
310 | 310 | m_screen_refresh = 0; |
311 | 311 | |
312 | 312 | for (y = 0; y < height; y++) |
313 | 313 | for (x = 0; x < width; x++) |
314 | update_pixel( | |
314 | update_pixel( | |
315 | 315 | } |
316 | 316 | |
317 | 317 | if (m_dispflag) |
r17988 | r17989 | |
350 | 350 | |
351 | 351 | for (y = 0; y < height; y++) |
352 | 352 | for (x = 0; x < width; x++) |
353 | update_pixel( | |
353 | update_pixel( | |
354 | 354 | } |
355 | 355 | |
356 | 356 | if (nb1413m3_inputport & 0x20) |
r17988 | r17989 | |
---|---|---|
208 | 208 | */ |
209 | 209 | bitmap.fill(m_bgcolor, cliprect); |
210 | 210 | m_background->draw(bitmap, cliprect, 0,0); |
211 | draw_sprites( | |
211 | draw_sprites( | |
212 | 212 | m_foreground->draw(bitmap, cliprect, 0,0); |
213 | 213 | return 0; |
214 | 214 | } |
r17988 | r17989 | |
250 | 250 | UINT32 tsamurai_state::screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
251 | 251 | { |
252 | 252 | #ifdef MAME_DEBUG |
253 | if( screen.machine().input().code_pressed( KEYCODE_Q ) ){ | |
254 | while( screen.machine().input().code_pressed( KEYCODE_Q ) ){ | |
253 | if( machine().input().code_pressed( KEYCODE_Q ) ){ | |
254 | while( machine().input().code_pressed( KEYCODE_Q ) ){ | |
255 | 255 | m_key_count++; |
256 | 256 | m_vsgongf_color = m_key_count; |
257 | 257 | m_foreground ->mark_all_dirty(); |
r17988 | r17989 | |
260 | 260 | #endif |
261 | 261 | |
262 | 262 | m_foreground->draw(bitmap, cliprect, 0,0); |
263 | draw_sprites( | |
263 | draw_sprites( | |
264 | 264 | return 0; |
265 | 265 | } |
r17988 | r17989 | |
---|---|---|
75 | 75 | |
76 | 76 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
77 | 77 | |
78 | draw_sprites( | |
78 | draw_sprites( | |
79 | 79 | |
80 | draw_bombs( | |
80 | draw_bombs( | |
81 | 81 | |
82 | 82 | /* watchdog is disabled during service mode */ |
83 | | |
83 | | |
84 | 84 | |
85 | 85 | return 0; |
86 | 86 | } |
r17988 | r17989 | |
---|---|---|
261 | 261 | m_bg_tilemap[0]->set_scrolly(0, m_vregs[0]); |
262 | 262 | m_bg_tilemap[1]->set_scrolly(0, m_vregs[1]); |
263 | 263 | |
264 | draw_bitmap( | |
264 | draw_bitmap( | |
265 | 265 | |
266 | 266 | m_bg_tilemap[1]->draw(bitmap, cliprect, 0, 0); |
267 | splash_draw_sprites( | |
267 | splash_draw_sprites( | |
268 | 268 | m_bg_tilemap[0]->draw(bitmap, cliprect, 0, 0); |
269 | 269 | return 0; |
270 | 270 | } |
r17988 | r17989 | |
276 | 276 | m_bg_tilemap[0]->set_scrolly(0, m_vregs[0]); |
277 | 277 | m_bg_tilemap[1]->set_scrolly(0, m_vregs[1]); |
278 | 278 | |
279 | draw_bitmap( | |
279 | draw_bitmap( | |
280 | 280 | |
281 | 281 | m_bg_tilemap[1]->draw(bitmap, cliprect, 0, 0); |
282 | 282 | /*Sprite chip is similar but not the same*/ |
283 | funystrp_draw_sprites( | |
283 | funystrp_draw_sprites( | |
284 | 284 | m_bg_tilemap[0]->draw(bitmap, cliprect, 0, 0); |
285 | 285 | return 0; |
286 | 286 | } |
r17988 | r17989 | |
---|---|---|
239 | 239 | UINT32 f1gp_state::screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
240 | 240 | { |
241 | 241 | |
242 | | |
242 | | |
243 | 243 | |
244 | 244 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_roz_tilemap, 0, 0, 1); |
245 | 245 | |
r17988 | r17989 | |
248 | 248 | /* quick kludge for "continue" screen priority */ |
249 | 249 | if (m_gfxctrl == 0x00) |
250 | 250 | { |
251 | f1gp_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x02); | |
252 | f1gp_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x02); | |
251 | f1gp_draw_sprites(machine(), bitmap, cliprect, 0, 0x02); | |
252 | f1gp_draw_sprites(machine(), bitmap, cliprect, 1, 0x02); | |
253 | 253 | } |
254 | 254 | else |
255 | 255 | { |
256 | f1gp_draw_sprites(screen.machine(), bitmap, cliprect, 0, 0x00); | |
257 | f1gp_draw_sprites(screen.machine(), bitmap, cliprect, 1, 0x02); | |
256 | f1gp_draw_sprites(machine(), bitmap, cliprect, 0, 0x00); | |
257 | f1gp_draw_sprites(machine(), bitmap, cliprect, 1, 0x02); | |
258 | 258 | } |
259 | 259 | return 0; |
260 | 260 | } |
r17988 | r17989 | |
341 | 341 | |
342 | 342 | m_fg_tilemap->set_scrolly(0, m_fgregs[0] + 8); |
343 | 343 | |
344 | | |
344 | | |
345 | 345 | |
346 | 346 | m_roz_tilemap->draw_roz(bitmap, cliprect, |
347 | 347 | startx << 13, starty << 13, |
r17988 | r17989 | |
350 | 350 | |
351 | 351 | m_fg_tilemap->draw(bitmap, cliprect, 0, 1); |
352 | 352 | |
353 | f1gpb_draw_sprites( | |
353 | f1gpb_draw_sprites( | |
354 | 354 | |
355 | 355 | return 0; |
356 | 356 | } |
r17988 | r17989 | |
432 | 432 | { |
433 | 433 | |
434 | 434 | if (m_gfxctrl & 4) /* blank screen */ |
435 | bitmap.fill(get_black_pen( | |
435 | bitmap.fill(get_black_pen( | |
436 | 436 | else |
437 | 437 | { |
438 | 438 | switch (m_gfxctrl & 3) |
439 | 439 | { |
440 | 440 | case 0: |
441 | 441 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_roz_tilemap, TILEMAP_DRAW_OPAQUE, 0, 1); |
442 | f1gp2_draw_sprites( | |
442 | f1gp2_draw_sprites( | |
443 | 443 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
444 | 444 | break; |
445 | 445 | case 1: |
446 | 446 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_roz_tilemap, TILEMAP_DRAW_OPAQUE, 0, 1); |
447 | 447 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
448 | f1gp2_draw_sprites( | |
448 | f1gp2_draw_sprites( | |
449 | 449 | break; |
450 | 450 | case 2: |
451 | 451 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
452 | 452 | k053936_zoom_draw(m_k053936, bitmap, cliprect, m_roz_tilemap, 0, 0, 1); |
453 | f1gp2_draw_sprites( | |
453 | f1gp2_draw_sprites( | |
454 | 454 | break; |
455 | 455 | #ifdef MAME_DEBUG |
456 | 456 | case 3: |
r17988 | r17989 | |
---|---|---|
72 | 72 | { |
73 | 73 | offs_t offs; |
74 | 74 | |
75 | UINT8 *color_prom1 = & | |
75 | UINT8 *color_prom1 = & | |
76 | 76 | UINT8 *color_prom2 = &memregion("proms")->base()[0x100]; |
77 | 77 | |
78 | 78 | for (offs = 0; offs < m_videoram1.bytes(); offs++) |
r17988 | r17989 | |
176 | 176 | |
177 | 177 | UINT32 route16_state::screen_update_stratvox(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
178 | 178 | { |
179 | return video_update_stratvox_ttmahjng( | |
179 | return video_update_stratvox_ttmahjng( | |
180 | 180 | } |
181 | 181 | |
182 | 182 | |
183 | 183 | UINT32 route16_state::screen_update_ttmahjng(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
184 | 184 | { |
185 | return video_update_stratvox_ttmahjng( | |
185 | return video_update_stratvox_ttmahjng( | |
186 | 186 | } |
r17988 | r17989 | |
---|---|---|
288 | 288 | UINT32 tecmosys_state::screen_update_tecmosys(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
289 | 289 | { |
290 | 290 | |
291 | bitmap.fill( | |
291 | bitmap.fill( | |
292 | 292 | |
293 | 293 | |
294 | 294 | m_bg0tilemap->set_scrolly(0, m_c80000regs[1]+16); |
r17988 | r17989 | |
319 | 319 | tecmosys_tilemap_copy_to_compose(this, 0xc000); |
320 | 320 | |
321 | 321 | |
322 | tecmosys_do_final_mix( | |
322 | tecmosys_do_final_mix( | |
323 | 323 | |
324 | 324 | // prepare sprites for NEXT frame - causes 1 frame palette errors, but prevents sprite lag in tkdensho, which is correct? |
325 | tecmosys_render_sprites_to_bitmap( | |
325 | tecmosys_render_sprites_to_bitmap( | |
326 | 326 | |
327 | 327 | return 0; |
328 | 328 | } |
r17988 | r17989 | |
---|---|---|
45 | 45 | sy = y; |
46 | 46 | } |
47 | 47 | |
48 | drawgfx_transpen(bitmap,cliprect, | |
48 | drawgfx_transpen(bitmap,cliprect, | |
49 | 49 | tile, |
50 | 50 | tilecolour, |
51 | 51 | flipx, flipy, |
r17988 | r17989 | |
79 | 79 | tilecolour = (tilecolour&0x03f0) >> 4; |
80 | 80 | tilecolour ^=0x3f; // unusual, but correct.. |
81 | 81 | |
82 | drawgfx_transpen(bitmap,cliprect, | |
82 | drawgfx_transpen(bitmap,cliprect, | |
83 | 83 | tile, |
84 | 84 | tilecolour, |
85 | 85 | flipx, flipy, |
r17988 | r17989 | |
134 | 134 | tilecolour = (tilecolour&0x00f0) >> 4; |
135 | 135 | tilecolour ^=0xf; // unusual, but correct.. |
136 | 136 | |
137 | drawgfx_transpen(bitmap,cliprect, | |
137 | drawgfx_transpen(bitmap,cliprect, | |
138 | 138 | tile, |
139 | 139 | tilecolour, |
140 | 140 | flipx, flipy, |
r17988 | r17989 | |
149 | 149 | UINT16 *spriteram16 = m_bootleg_spriteram16; |
150 | 150 | int offs; |
151 | 151 | |
152 | bitmap.fill(get_black_pen( | |
152 | bitmap.fill(get_black_pen( | |
153 | 153 | |
154 | 154 | for (offs = 0;offs < m_bootleg_spriteram16.bytes()/2;offs += 8) |
155 | 155 | { |
r17988 | r17989 | |
176 | 176 | |
177 | 177 | if ((xpos > -16) && (ypos > 0) && (xpos < 256) && (ypos < 240) && (disbl !=2)) |
178 | 178 | { |
179 | drawgfx_transpen(bitmap,cliprect, | |
179 | drawgfx_transpen(bitmap,cliprect, | |
180 | 180 | tilen, |
181 | 181 | colr, |
182 | 182 | flipx, flipy, |
r17988 | r17989 | |
216 | 216 | |
217 | 217 | /* This clears & redraws the entire screen each pass */ |
218 | 218 | |
219 | bitmap.fill(get_black_pen( | |
219 | bitmap.fill(get_black_pen( | |
220 | 220 | |
221 | 221 | for (offs = 0;offs < m_bootleg_spriteram16.bytes()/2;offs += 8) |
222 | 222 | { |
223 | gfx_element *gfx = | |
223 | gfx_element *gfx = | |
224 | 224 | int dx = spriteram16[offs+4] & 0xff; |
225 | 225 | int dy = spriteram16[offs+5] & 0xff; |
226 | 226 | int tilecolour = spriteram16[offs+3]; |
r17988 | r17989 | |
260 | 260 | |
261 | 261 | if (offs < 0x800) /* i guess this is the right way */ |
262 | 262 | { |
263 | gfx = | |
263 | gfx = | |
264 | 264 | tilecolour = 0x10; |
265 | 265 | } |
266 | 266 |
r17988 | r17989 | |
---|---|---|
57 | 57 | int sy = offs >> 6 << 3; |
58 | 58 | UINT8 code = videoram[offs]; |
59 | 59 | |
60 | drawgfx_opaque(bitmap,cliprect, | |
60 | drawgfx_opaque(bitmap,cliprect, | |
61 | 61 | code, 0, 0, 0, sx, sy); |
62 | 62 | } |
63 | 63 |
r17988 | r17989 | |
---|---|---|
433 | 433 | { |
434 | 434 | int i; |
435 | 435 | |
436 | int beamx = ((screen.machine().root_device().ioport("AN0")->read() & 0xff) * (HBSTART - HBEND)) >> 8; | |
437 | int beamy = ((screen.machine().root_device().ioport("AN1")->read() & 0xff) * (VBSTART - VBEND)) >> 8; | |
436 | int beamx = ((machine().root_device().ioport("AN0")->read() & 0xff) * (HBSTART - HBEND)) >> 8; | |
437 | int beamy = ((machine().root_device().ioport("AN1")->read() & 0xff) * (VBSTART - VBEND)) >> 8; | |
438 | 438 | |
439 | 439 | /* The timing of this FIRQ is very important. The games look for an FIRQ |
440 | 440 | and then wait about 650 cycles, clear the old FIRQ, and wait a |
r17988 | r17989 | |
446 | 446 | attotime time = screen.time_until_pos(beamy, beamx) - increment * 6; |
447 | 447 | for (i = 0; i <= 12; i++) |
448 | 448 | { |
449 | | |
449 | | |
450 | 450 | time += increment; |
451 | 451 | } |
452 | 452 | } |
r17988 | r17989 | |
---|---|---|
136 | 136 | y = 248 - y; |
137 | 137 | } |
138 | 138 | |
139 | drawgfx_transpen(bitmap, cliprect, | |
139 | drawgfx_transpen(bitmap, cliprect, | |
140 | 140 | code & 0x3fff, |
141 | 141 | color, |
142 | 142 | flip_screen(), flip_screen(), |
r17988 | r17989 | |
205 | 205 | y = 248 - y; |
206 | 206 | } |
207 | 207 | |
208 | drawgfx_transpen(bitmap, cliprect, | |
208 | drawgfx_transpen(bitmap, cliprect, | |
209 | 209 | code & 0x3fff, |
210 | 210 | color, |
211 | 211 | flip_screen(), flip_screen(), |
r17988 | r17989 | |
---|---|---|
1186 | 1186 | |
1187 | 1187 | memset(m_obj_bmp, 0, 768*240); |
1188 | 1188 | |
1189 | tx1_draw_char(screen.machine(), m_chr_bmp); | |
1190 | tx1_draw_road(screen.machine(), m_rod_bmp); | |
1191 | tx1_draw_objects(screen.machine(), m_obj_bmp); | |
1189 | tx1_draw_char(machine(), m_chr_bmp); | |
1190 | tx1_draw_road(machine(), m_rod_bmp); | |
1191 | tx1_draw_objects(machine(), m_obj_bmp); | |
1192 | 1192 | |
1193 | tx1_combine_layers( | |
1193 | tx1_combine_layers( | |
1194 | 1194 | return 0; |
1195 | 1195 | } |
1196 | 1196 | |
1197 | 1197 | UINT32 tx1_state::screen_update_tx1_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1198 | 1198 | { |
1199 | tx1_combine_layers( | |
1199 | tx1_combine_layers( | |
1200 | 1200 | return 0; |
1201 | 1201 | } |
1202 | 1202 | |
1203 | 1203 | UINT32 tx1_state::screen_update_tx1_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1204 | 1204 | { |
1205 | tx1_combine_layers( | |
1205 | tx1_combine_layers( | |
1206 | 1206 | return 0; |
1207 | 1207 | } |
1208 | 1208 | |
r17988 | r17989 | |
3042 | 3042 | memset(m_obj_bmp, 0, 768*240); |
3043 | 3043 | memset(m_rod_bmp, 0, 768*240); |
3044 | 3044 | |
3045 | buggyboy_draw_char(screen.machine(), m_chr_bmp, 1); | |
3046 | buggyboy_draw_road(screen.machine(), m_rod_bmp); | |
3047 | buggyboy_draw_objs(screen.machine(), m_obj_bmp, 1); | |
3045 | buggyboy_draw_char(machine(), m_chr_bmp, 1); | |
3046 | buggyboy_draw_road(machine(), m_rod_bmp); | |
3047 | buggyboy_draw_objs(machine(), m_obj_bmp, 1); | |
3048 | 3048 | |
3049 | bb_combine_layers( | |
3049 | bb_combine_layers( | |
3050 | 3050 | return 0; |
3051 | 3051 | } |
3052 | 3052 | |
3053 | 3053 | UINT32 tx1_state::screen_update_buggyboy_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
3054 | 3054 | { |
3055 | bb_combine_layers( | |
3055 | bb_combine_layers( | |
3056 | 3056 | return 0; |
3057 | 3057 | } |
3058 | 3058 | |
3059 | 3059 | UINT32 tx1_state::screen_update_buggyboy_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
3060 | 3060 | { |
3061 | bb_combine_layers( | |
3061 | bb_combine_layers( | |
3062 | 3062 | return 0; |
3063 | 3063 | } |
3064 | 3064 | |
r17988 | r17989 | |
3066 | 3066 | { |
3067 | 3067 | memset(m_obj_bmp, 0, 256*240); |
3068 | 3068 | |
3069 | buggyboy_draw_char(screen.machine(), m_chr_bmp, 0); | |
3070 | buggybjr_draw_road(screen.machine(), m_rod_bmp, 0); | |
3071 | buggyboy_draw_objs(screen.machine(), m_obj_bmp, 0); | |
3069 | buggyboy_draw_char(machine(), m_chr_bmp, 0); | |
3070 | buggybjr_draw_road(machine(), m_rod_bmp, 0); | |
3071 | buggyboy_draw_objs(machine(), m_obj_bmp, 0); | |
3072 | 3072 | |
3073 | bb_combine_layers( | |
3073 | bb_combine_layers( | |
3074 | 3074 | return 0; |
3075 | 3075 | } |
r17988 | r17989 | |
---|---|---|
76 | 76 | /* are the priorities 100% correct? they're the same as they were before conversion to DECO52 sprite device, but if (for example) you walk to the side of the crates in the first part of the game you appear over them... */ |
77 | 77 | UINT32 dassault_state::screen_update_dassault(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
78 | 78 | { |
79 | address_space &space = | |
79 | address_space &space = | |
80 | 80 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
81 | 81 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
82 | 82 | |
83 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false); | |
84 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false); | |
85 | bitmap_ind16* sprite_bitmap1 = &screen.machine().device<decospr_device>("spritegen1")->get_sprite_temp_bitmap(); | |
86 | bitmap_ind16* sprite_bitmap2 = &screen.machine().device<decospr_device>("spritegen2")->get_sprite_temp_bitmap(); | |
83 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false); | |
84 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false); | |
85 | bitmap_ind16* sprite_bitmap1 = &machine().device<decospr_device>("spritegen1")->get_sprite_temp_bitmap(); | |
86 | bitmap_ind16* sprite_bitmap2 = &machine().device<decospr_device>("spritegen2")->get_sprite_temp_bitmap(); | |
87 | 87 | |
88 | 88 | /* Update tilemaps */ |
89 | 89 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
91 | 91 | deco16ic_pf_update(m_deco_tilegen2, 0, m_pf4_rowscroll); |
92 | 92 | |
93 | 93 | /* Draw playfields/update priority bitmap */ |
94 | screen.machine().priority_bitmap.fill(0, cliprect); | |
95 | bitmap.fill(screen.machine().pens[3072], cliprect); | |
94 | machine().priority_bitmap.fill(0, cliprect); | |
95 | bitmap.fill(machine().pens[3072], cliprect); | |
96 | 96 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
97 | 97 | |
98 | 98 | /* The middle playfields can be swapped priority-wise */ |
99 | 99 | if ((priority & 3) == 0) |
100 | 100 | { |
101 | mixdassaultlayer( | |
101 | mixdassaultlayer( | |
102 | 102 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); // 2 |
103 | mixdassaultlayer( | |
103 | mixdassaultlayer( | |
104 | 104 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 16); // 16 |
105 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
106 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 64? | |
107 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0000, 0x0600, 0x400, 0xff); // 128 | |
105 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
106 | mixdassaultlayer(machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 64? | |
107 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0000, 0x0600, 0x400, 0xff); // 128 | |
108 | 108 | |
109 | 109 | } |
110 | 110 | else if ((priority & 3) == 1) |
111 | 111 | { |
112 | mixdassaultlayer( | |
112 | mixdassaultlayer( | |
113 | 113 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); // 2 |
114 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0400, 0x0600, 0x400, 0xff); // 8 | |
115 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 16? | |
116 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
114 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0400, 0x0600, 0x400, 0xff); // 8 | |
115 | mixdassaultlayer(machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 16? | |
116 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
117 | 117 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 64); // 64 |
118 | mixdassaultlayer( | |
118 | mixdassaultlayer( | |
119 | 119 | } |
120 | 120 | else if ((priority & 3) == 3) |
121 | 121 | { |
122 | mixdassaultlayer( | |
122 | mixdassaultlayer( | |
123 | 123 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 2); // 2 |
124 | mixdassaultlayer( | |
124 | mixdassaultlayer( | |
125 | 125 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 16); // 16 |
126 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
127 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 64? | |
128 | mixdassaultlayer(screen.machine(), bitmap, sprite_bitmap1, cliprect, 0x0000, 0x0600, 0x400, 0xff); // 128 | |
126 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0200, 0x0600, 0x400, 0xff); // 32 | |
127 | mixdassaultlayer(machine(), bitmap, sprite_bitmap2, cliprect, 0x0000, 0x0000, 0x800, 0x80); // 64? | |
128 | mixdassaultlayer(machine(), bitmap, sprite_bitmap1, cliprect, 0x0000, 0x0600, 0x400, 0xff); // 128 | |
129 | 129 | } |
130 | 130 | else |
131 | 131 | { |
r17988 | r17989 | |
---|---|---|
146 | 146 | UINT32 pingpong_state::screen_update_pingpong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
147 | 147 | { |
148 | 148 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
149 | draw_sprites( | |
149 | draw_sprites( | |
150 | 150 | return 0; |
151 | 151 | } |
r17988 | r17989 | |
---|---|---|
279 | 279 | m_tilemap1->set_scrollx(0, 0xff-m_scrollram[2] ); |
280 | 280 | m_tilemap1->set_scrolly(0, m_scrollram[0] ); |
281 | 281 | m_tilemap1->draw(bitmap, cliprect, 0, 0); |
282 | draw_objects( | |
282 | draw_objects( | |
283 | 283 | m_tilemap2->draw(bitmap, cliprect, 0, 0); |
284 | 284 | |
285 | 285 | if (m_scrollram[0x101] == 0xb) m_tilemap4->draw(bitmap, cliprect, 0, 0);/* hack to display 4th tilemap */ |
r17988 | r17989 | |
---|---|---|
177 | 177 | { |
178 | 178 | m_bg_tilemap->set_scrollx(0, -(*m_scroll + (m_scroll_bit_8 * 256)) - 2 * 8); |
179 | 179 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
180 | draw_sprites(screen.machine(), bitmap, cliprect); | |
181 | draw_status(screen.machine(), bitmap, cliprect); | |
180 | draw_sprites(machine(), bitmap, cliprect); | |
181 | draw_status(machine(), bitmap, cliprect); | |
182 | 182 | return 0; |
183 | 183 | } |
r17988 | r17989 | |
---|---|---|
1064 | 1064 | |
1065 | 1065 | UINT32 tatsumi_state::screen_update_apache3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1066 | 1066 | { |
1067 | update_cluts( | |
1067 | update_cluts( | |
1068 | 1068 | |
1069 | 1069 | m_tx_layer->set_scrollx(0,24); |
1070 | 1070 | |
1071 | bitmap.fill(screen.machine().pens[0], cliprect); | |
1072 | draw_sky(screen.machine(), bitmap, cliprect, 256, m_apache3_rotate_ctrl[1]); | |
1073 | // draw_ground(screen.machine(), bitmap, cliprect); | |
1074 | draw_sprites(screen.machine(), bitmap,cliprect,0, (m_sprite_control_ram[0x20]&0x1000) ? 0x1000 : 0); | |
1071 | bitmap.fill(machine().pens[0], cliprect); | |
1072 | draw_sky(machine(), bitmap, cliprect, 256, m_apache3_rotate_ctrl[1]); | |
1073 | // draw_ground(machine(), bitmap, cliprect); | |
1074 | draw_sprites(machine(), bitmap,cliprect,0, (m_sprite_control_ram[0x20]&0x1000) ? 0x1000 : 0); | |
1075 | 1075 | m_tx_layer->draw(bitmap, cliprect, 0,0); |
1076 | 1076 | return 0; |
1077 | 1077 | } |
r17988 | r17989 | |
1081 | 1081 | // UINT16 bg_x_scroll=m_roundup5_unknown1[0]; |
1082 | 1082 | // UINT16 bg_y_scroll=m_roundup5_unknown2[0]; |
1083 | 1083 | |
1084 | update_cluts( | |
1084 | update_cluts( | |
1085 | 1085 | |
1086 | 1086 | m_tx_layer->set_scrollx(0,24); |
1087 | 1087 | m_tx_layer->set_scrolly(0,0); //(((m_roundupt_crt_reg[0xe]<<8)|m_roundupt_crt_reg[0xf])>>5) + 96); |
1088 | 1088 | |
1089 | bitmap.fill(screen.machine().pens[384], cliprect); // todo | |
1090 | screen.machine().priority_bitmap.fill(0, cliprect); | |
1089 | bitmap.fill(machine().pens[384], cliprect); // todo | |
1090 | machine().priority_bitmap.fill(0, cliprect); | |
1091 | 1091 | |
1092 | draw_sprites(screen.machine(), screen.machine().priority_bitmap,cliprect,1,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only | |
1093 | draw_road(screen.machine(), bitmap,cliprect,screen.machine().priority_bitmap); | |
1094 | draw_sprites(screen.machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Full pass | |
1092 | draw_sprites(machine(), machine().priority_bitmap,cliprect,1,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only | |
1093 | draw_road(machine(), bitmap,cliprect,machine().priority_bitmap); | |
1094 | draw_sprites(machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Full pass | |
1095 | 1095 | m_tx_layer->draw(bitmap, cliprect, 0,0); |
1096 | 1096 | return 0; |
1097 | 1097 | } |
r17988 | r17989 | |
1108 | 1108 | m_bigfight_last_bank=m_bigfight_bank; |
1109 | 1109 | } |
1110 | 1110 | |
1111 | bitmap.fill( | |
1111 | bitmap.fill( | |
1112 | 1112 | |
1113 | draw_bg(screen.machine(), bitmap, m_layer3, &m_cyclwarr_videoram1[0x000], &m_cyclwarr_videoram1[0x100], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x80, 512, 4096); | |
1114 | draw_bg(screen.machine(), bitmap, m_layer2, &m_cyclwarr_videoram1[0x200], &m_cyclwarr_videoram1[0x300], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x80, 512, 4096); | |
1115 | draw_bg(screen.machine(), bitmap, m_layer1, &m_cyclwarr_videoram0[0x000], &m_cyclwarr_videoram0[0x100], m_cyclwarr_videoram0, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1116 | update_cluts(screen.machine(), 8192, 4096, 8192); | |
1117 | draw_sprites(screen.machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); | |
1118 | draw_bg(screen.machine(), bitmap, m_layer0, &m_cyclwarr_videoram0[0x200], &m_cyclwarr_videoram0[0x300], m_cyclwarr_videoram0, m_bigfight_a40000[0], 0x10, -0x80, 512, 4096); | |
1113 | draw_bg(machine(), bitmap, m_layer3, &m_cyclwarr_videoram1[0x000], &m_cyclwarr_videoram1[0x100], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x80, 512, 4096); | |
1114 | draw_bg(machine(), bitmap, m_layer2, &m_cyclwarr_videoram1[0x200], &m_cyclwarr_videoram1[0x300], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x80, 512, 4096); | |
1115 | draw_bg(machine(), bitmap, m_layer1, &m_cyclwarr_videoram0[0x000], &m_cyclwarr_videoram0[0x100], m_cyclwarr_videoram0, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1116 | update_cluts(machine(), 8192, 4096, 8192); | |
1117 | draw_sprites(machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); | |
1118 | draw_bg(machine(), bitmap, m_layer0, &m_cyclwarr_videoram0[0x200], &m_cyclwarr_videoram0[0x300], m_cyclwarr_videoram0, m_bigfight_a40000[0], 0x10, -0x80, 512, 4096); | |
1119 | 1119 | |
1120 | 1120 | return 0; |
1121 | 1121 | } |
r17988 | r17989 | |
1132 | 1132 | m_bigfight_last_bank=m_bigfight_bank; |
1133 | 1133 | } |
1134 | 1134 | |
1135 | bitmap.fill(screen.machine().pens[0], cliprect); | |
1136 | draw_bg(screen.machine(), bitmap, m_layer3, &m_cyclwarr_videoram1[0x000], &m_cyclwarr_videoram1[0x100], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1137 | draw_bg(screen.machine(), bitmap, m_layer2, &m_cyclwarr_videoram1[0x200], &m_cyclwarr_videoram1[0x300], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1138 | draw_bg(screen.machine(), bitmap, m_layer1, &m_cyclwarr_videoram0[0x000], &m_cyclwarr_videoram0[0x100], m_cyclwarr_videoram0, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1139 | update_cluts(screen.machine(), 8192, 4096, 8192); | |
1140 | draw_sprites(screen.machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); | |
1141 | draw_bg(screen.machine(), bitmap, m_layer0, &m_cyclwarr_videoram0[0x200], &m_cyclwarr_videoram0[0x300], m_cyclwarr_videoram0, m_bigfight_a40000[0], 0x10, -0x40, 1024, 2048); | |
1135 | bitmap.fill(machine().pens[0], cliprect); | |
1136 | draw_bg(machine(), bitmap, m_layer3, &m_cyclwarr_videoram1[0x000], &m_cyclwarr_videoram1[0x100], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1137 | draw_bg(machine(), bitmap, m_layer2, &m_cyclwarr_videoram1[0x200], &m_cyclwarr_videoram1[0x300], m_cyclwarr_videoram1, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1138 | draw_bg(machine(), bitmap, m_layer1, &m_cyclwarr_videoram0[0x000], &m_cyclwarr_videoram0[0x100], m_cyclwarr_videoram0, m_bigfight_a40000[0], 8, -0x40, 1024, 2048); | |
1139 | update_cluts(machine(), 8192, 4096, 8192); | |
1140 | draw_sprites(machine(), bitmap,cliprect,0,(m_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); | |
1141 | draw_bg(machine(), bitmap, m_layer0, &m_cyclwarr_videoram0[0x200], &m_cyclwarr_videoram0[0x300], m_cyclwarr_videoram0, m_bigfight_a40000[0], 0x10, -0x40, 1024, 2048); | |
1142 | 1142 | |
1143 | 1143 | return 0; |
1144 | 1144 | } |
r17988 | r17989 | |
---|---|---|
23 | 23 | |
24 | 24 | UINT32 supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
25 | 25 | { |
26 | address_space &space = | |
26 | address_space &space = | |
27 | 27 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
28 | 28 | |
29 | 29 | flip_screen_set(BIT(flip, 7)); |
r17988 | r17989 | |
32 | 32 | bitmap.fill(768, cliprect); |
33 | 33 | |
34 | 34 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
35 | | |
35 | | |
36 | 36 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
37 | 37 | return 0; |
38 | 38 | } |
r17988 | r17989 | |
---|---|---|
224 | 224 | m_tilemap_1->set_scrollx(0, m_scroll_1[1] + 5); |
225 | 225 | |
226 | 226 | #ifdef MAME_DEBUG |
227 | if ( | |
227 | if ( | |
228 | 228 | { |
229 | 229 | int msk = 0; |
230 | 230 | |
231 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
232 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
233 | // if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
234 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
231 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
232 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
233 | // if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
234 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 8; | |
235 | 235 | if (msk != 0) layers_ctrl &= msk; |
236 | 236 | } |
237 | 237 | #endif |
238 | 238 | |
239 | | |
239 | | |
240 | 240 | |
241 | 241 | if (layers_ctrl & 1) |
242 | 242 | for (i = 0; i <= 1; i++) |
r17988 | r17989 | |
249 | 249 | m_tilemap_1->draw(bitmap, cliprect, i, i); |
250 | 250 | |
251 | 251 | if (layers_ctrl & 8) |
252 | draw_sprites( | |
252 | draw_sprites( | |
253 | 253 | |
254 | 254 | return 0; |
255 | 255 | } |
r17988 | r17989 | |
---|---|---|
223 | 223 | UINT32 retofinv_state::screen_update_retofinv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
224 | 224 | { |
225 | 225 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
226 | draw_sprites( | |
226 | draw_sprites( | |
227 | 227 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
228 | 228 | return 0; |
229 | 229 | } |
r17988 | r17989 | |
---|---|---|
107 | 107 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
108 | 108 | |
109 | 109 | /* draw the sprites */ |
110 | if (screen.machine().gfx[1]) | |
111 | draw_sprites(screen.machine(), bitmap, cliprect); | |
110 | if (machine().gfx[1]) | |
111 | draw_sprites(machine(), bitmap, cliprect); | |
112 | 112 | return 0; |
113 | 113 | } |
r17988 | r17989 | |
---|---|---|
149 | 149 | { |
150 | 150 | |
151 | 151 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
152 | draw_sprites( | |
152 | draw_sprites( | |
153 | 153 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
154 | 154 | return 0; |
155 | 155 | } |
r17988 | r17989 | |
---|---|---|
56 | 56 | { |
57 | 57 | bitmap.fill(0x1ff, cliprect); |
58 | 58 | |
59 | | |
59 | | |
60 | 60 | |
61 | | |
61 | | |
62 | 62 | |
63 | screen.machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
64 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x05, 0x07 ); | |
65 | screen.machine().device<seta001_device>("spritegen")->set_bg_xoffsets( 0x00, 0x00 ); // bg not used? | |
66 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x00 ); // bg not used? | |
63 | machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
64 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x05, 0x07 ); | |
65 | machine().device<seta001_device>("spritegen")->set_bg_xoffsets( 0x00, 0x00 ); // bg not used? | |
66 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x00 ); // bg not used? | |
67 | 67 | |
68 | | |
68 | | |
69 | 69 | return 0; |
70 | 70 | } |
71 | 71 | |
r17988 | r17989 | |
73 | 73 | { |
74 | 74 | bitmap.fill(0x1f0, cliprect); |
75 | 75 | |
76 | screen.machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
77 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 ); | |
78 | screen.machine().device<seta001_device>("spritegen")->set_bg_xoffsets( -0x01, 0x10 ); | |
79 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( -0x06, 0x06 ); | |
76 | machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
77 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 ); | |
78 | machine().device<seta001_device>("spritegen")->set_bg_xoffsets( -0x01, 0x10 ); | |
79 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( -0x06, 0x06 ); | |
80 | 80 | |
81 | | |
81 | | |
82 | 82 | |
83 | | |
83 | | |
84 | 84 | return 0; |
85 | 85 | } |
86 | 86 | |
r17988 | r17989 | |
88 | 88 | { |
89 | 89 | bitmap.fill(0x1f0, cliprect); |
90 | 90 | |
91 | screen.machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
92 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 ); | |
93 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x09, 0x07 ); | |
91 | machine().device<seta001_device>("spritegen")->set_fg_xoffsets( 0x10, 0x10 ); | |
92 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x06, 0x06 ); | |
93 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x09, 0x07 ); | |
94 | 94 | |
95 | | |
95 | | |
96 | 96 | |
97 | | |
97 | | |
98 | 98 | |
99 | | |
99 | | |
100 | 100 | return 0; |
101 | 101 | } |
r17988 | r17989 | |
---|---|---|
519 | 519 | { |
520 | 520 | if (m_video_off) |
521 | 521 | { |
522 | bitmap.fill(get_black_pen( | |
522 | bitmap.fill(get_black_pen( | |
523 | 523 | return 0; |
524 | 524 | } |
525 | 525 | |
r17988 | r17989 | |
531 | 531 | |
532 | 532 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
533 | 533 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
534 | m72_draw_sprites( | |
534 | m72_draw_sprites( | |
535 | 535 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
536 | 536 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
537 | 537 | return 0; |
r17988 | r17989 | |
544 | 544 | |
545 | 545 | if (m_video_off) |
546 | 546 | { |
547 | bitmap.fill(get_black_pen( | |
547 | bitmap.fill(get_black_pen( | |
548 | 548 | return 0; |
549 | 549 | } |
550 | 550 | |
r17988 | r17989 | |
567 | 567 | |
568 | 568 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
569 | 569 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
570 | majtitle_draw_sprites(screen.machine(), bitmap,cliprect); | |
571 | m72_draw_sprites(screen.machine(), bitmap,cliprect); | |
570 | majtitle_draw_sprites(machine(), bitmap,cliprect); | |
571 | m72_draw_sprites(machine(), bitmap,cliprect); | |
572 | 572 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
573 | 573 | m_fg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
574 | 574 | return 0; |
r17988 | r17989 | |
---|---|---|
103 | 103 | { |
104 | 104 | |
105 | 105 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
106 | draw_sprites( | |
106 | draw_sprites( | |
107 | 107 | return 0; |
108 | 108 | } |
r17988 | r17989 | |
---|---|---|
75 | 75 | UINT32 pokechmp_state::screen_update_pokechmp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
76 | 76 | { |
77 | 77 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
78 | draw_sprites( | |
78 | draw_sprites( | |
79 | 79 | return 0; |
80 | 80 | } |
r17988 | r17989 | |
---|---|---|
282 | 282 | bitmap.fill(0x7ff, cliprect); |
283 | 283 | |
284 | 284 | /* This appears to be the correct priority order */ |
285 | draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
286 | draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
287 | draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
285 | draw_sprites(machine(), bitmap, cliprect, 2); | |
286 | draw_sprites(machine(), bitmap, cliprect, 3); | |
287 | draw_sprites(machine(), bitmap, cliprect, 1); | |
288 | 288 | |
289 | 289 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
290 | 290 | return 0; |
r17988 | r17989 | |
---|---|---|
214 | 214 | m_bg_tilemap->set_scrolly(0, *m_vscroll); |
215 | 215 | m_bg_tilemap->draw(bitmap, splitrect2, 0, 0); |
216 | 216 | |
217 | draw_sprites( | |
217 | draw_sprites( | |
218 | 218 | |
219 | 219 | // the status display behaves more closely to a 40-line splitscreen than an overlay |
220 | 220 | m_bg_tilemap->set_scrolly(0, 0); |
r17988 | r17989 | |
---|---|---|
251 | 251 | |
252 | 252 | UINT32 madalien_state::screen_update_madalien(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
253 | 253 | { |
254 | int flip = BIT( | |
254 | int flip = BIT( | |
255 | 255 | |
256 | 256 | // bits #0 and #1 define scrolling mode |
257 | 257 | // |
r17988 | r17989 | |
263 | 263 | int scroll_mode = *m_scroll & 3; |
264 | 264 | |
265 | 265 | bitmap.fill(0, cliprect); |
266 | draw_edges(screen.machine(), bitmap, cliprect, flip, scroll_mode); | |
267 | draw_foreground(screen.machine(), bitmap, cliprect, flip); | |
266 | draw_edges(machine(), bitmap, cliprect, flip, scroll_mode); | |
267 | draw_foreground(machine(), bitmap, cliprect, flip); | |
268 | 268 | |
269 | 269 | /* highlight section A (outside of tunnels). |
270 | 270 | * also, bit 1 of the video_flags register (6A) is |
r17988 | r17989 | |
298 | 298 | bitmap.pix16(y, x) |= 8; |
299 | 299 | } |
300 | 300 | |
301 | draw_headlight( | |
301 | draw_headlight( | |
302 | 302 | |
303 | 303 | return 0; |
304 | 304 | } |
r17988 | r17989 | |
---|---|---|
115 | 115 | offs_t offs; |
116 | 116 | pen_t pens[NUM_PENS]; |
117 | 117 | |
118 | get_pens( | |
118 | get_pens( | |
119 | 119 | |
120 | 120 | /* for each byte in the video RAM */ |
121 | 121 | for (offs = 0; offs < VIDEORAM_SIZE / 3; offs++) |
r17988 | r17989 | |
---|---|---|
265 | 265 | { |
266 | 266 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
267 | 267 | m_bg1_tilemap->draw(bitmap, cliprect, 0, 0); |
268 | draw_sprites( | |
268 | draw_sprites( | |
269 | 269 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
270 | 270 | return 0; |
271 | 271 | } |
r17988 | r17989 | |
---|---|---|
219 | 219 | m_tilemap_0->set_scrolly(x, y + scrolly); |
220 | 220 | } |
221 | 221 | |
222 | bitmap.fill(get_black_pen( | |
222 | bitmap.fill(get_black_pen( | |
223 | 223 | |
224 | 224 | m_tilemap_0->draw(bitmap, cliprect, 0,0); |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | m_tilemap_1->draw(bitmap, cliprect, 0,0); |
227 | 227 | return 0; |
228 | 228 | } |
r17988 | r17989 | |
---|---|---|
152 | 152 | UINT32 oneshot_state::screen_update_oneshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
153 | 153 | { |
154 | 154 | |
155 | bitmap.fill(get_black_pen( | |
155 | bitmap.fill(get_black_pen( | |
156 | 156 | |
157 | 157 | m_mid_tilemap->set_scrollx(0, m_scroll[0] - 0x1f5); |
158 | 158 | m_mid_tilemap->set_scrolly(0, m_scroll[1]); |
159 | 159 | |
160 | 160 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
161 | 161 | m_mid_tilemap->draw(bitmap, cliprect, 0, 0); |
162 | draw_sprites( | |
162 | draw_sprites( | |
163 | 163 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
164 | draw_crosshairs( | |
164 | draw_crosshairs( | |
165 | 165 | return 0; |
166 | 166 | } |
167 | 167 | |
168 | 168 | UINT32 oneshot_state::screen_update_maddonna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
169 | 169 | { |
170 | 170 | |
171 | bitmap.fill(get_black_pen( | |
171 | bitmap.fill(get_black_pen( | |
172 | 172 | |
173 | 173 | m_mid_tilemap->set_scrolly(0, m_scroll[1]); // other registers aren't used so we don't know which layers they relate to |
174 | 174 | |
175 | 175 | m_mid_tilemap->draw(bitmap, cliprect, 0, 0); |
176 | 176 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
177 | 177 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
178 | draw_sprites( | |
178 | draw_sprites( | |
179 | 179 | |
180 | 180 | // popmessage ("%04x %04x %04x %04x %04x %04x %04x %04x", m_scroll[0], m_scroll[1], m_scroll[2], m_scroll[3], m_scroll[4], m_scroll[5], m_scroll[6], m_scroll[7]); |
181 | 181 | return 0; |
r17988 | r17989 | |
---|---|---|
170 | 170 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
171 | 171 | m_mlow_tilemap->draw(bitmap, cliprect, 0,0); |
172 | 172 | m_mhigh_tilemap->draw(bitmap, cliprect, 0,0); |
173 | draw_sprites( | |
173 | draw_sprites( | |
174 | 174 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
175 | 175 | return 0; |
176 | 176 | } |
r17988 | r17989 | |
---|---|---|
114 | 114 | UINT8 layer[4]; |
115 | 115 | |
116 | 116 | #ifdef MAME_DEBUG |
117 | if ( | |
117 | if ( | |
118 | 118 | { |
119 | 119 | m_dislayer[0] ^= 1; |
120 | 120 | popmessage("bg: %01x", m_dislayer[0]); |
121 | 121 | } |
122 | 122 | |
123 | if ( | |
123 | if ( | |
124 | 124 | { |
125 | 125 | m_dislayer[1] ^= 1; |
126 | 126 | popmessage("fg: %01x", m_dislayer[1]); |
127 | 127 | } |
128 | 128 | |
129 | if ( | |
129 | if ( | |
130 | 130 | { |
131 | 131 | m_dislayer[2] ^= 1; |
132 | 132 | popmessage("bg2: %01x", m_dislayer[2]); |
133 | 133 | } |
134 | 134 | |
135 | if ( | |
135 | if ( | |
136 | 136 | { |
137 | 137 | m_dislayer[3] ^= 1; |
138 | 138 | popmessage("fg2: %01x", m_dislayer[3]); |
139 | 139 | } |
140 | 140 | |
141 | if ( | |
141 | if ( | |
142 | 142 | { |
143 | 143 | m_dislayer[4] ^= 1; |
144 | 144 | popmessage("sprites: %01x", m_dislayer[4]); |
r17988 | r17989 | |
154 | 154 | layer[2] = 1; |
155 | 155 | layer[3] = 0; |
156 | 156 | |
157 | | |
157 | | |
158 | 158 | bitmap.fill(0, cliprect); |
159 | 159 | |
160 | 160 | #ifdef MAME_DEBUG |
r17988 | r17989 | |
181 | 181 | if (m_dislayer[4] == 0) |
182 | 182 | #endif |
183 | 183 | |
184 | draw_sprites( | |
184 | draw_sprites( | |
185 | 185 | return 0; |
186 | 186 | } |
r17988 | r17989 | |
---|---|---|
144 | 144 | UINT32 amspdwy_state::screen_update_amspdwy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
145 | 145 | { |
146 | 146 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
147 | draw_sprites( | |
147 | draw_sprites( | |
148 | 148 | return 0; |
149 | 149 | } |
r17988 | r17989 | |
---|---|---|
142 | 142 | UINT32 fantland_state::screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
143 | 143 | { |
144 | 144 | bitmap.fill(0, cliprect); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | |
147 | 147 | return 0; |
148 | 148 | } |
r17988 | r17989 | |
---|---|---|
227 | 227 | |
228 | 228 | UINT32 toobin_state::screen_update_toobin(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
229 | 229 | { |
230 | bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap; | |
231 | const rgb_t *palette = palette_entry_list_adjusted(screen.machine().palette); | |
230 | bitmap_ind8 &priority_bitmap = machine().priority_bitmap; | |
231 | const rgb_t *palette = palette_entry_list_adjusted(machine().palette); | |
232 | 232 | atarimo_rect_list rectlist; |
233 | 233 | bitmap_ind16 *mobitmap; |
234 | 234 | int x, y; |
r17988 | r17989 | |
---|---|---|
79 | 79 | |
80 | 80 | UINT32 bladestl_state::screen_update_bladestl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
81 | 81 | { |
82 | set_pens( | |
82 | set_pens( | |
83 | 83 | |
84 | 84 | k007342_tilemap_update(m_k007342); |
85 | 85 | |
86 | 86 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE ,0); |
87 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
87 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
88 | 88 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 1, 1 | TILEMAP_DRAW_OPAQUE ,0); |
89 | 89 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, 0 ,0); |
90 | 90 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, 1 ,0); |
r17988 | r17989 | |
---|---|---|
158 | 158 | UINT32 srumbler_state::screen_update_srumbler(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
159 | 159 | { |
160 | 160 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
163 | 163 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
164 | 164 | return 0; |
r17988 | r17989 | |
---|---|---|
421 | 421 | m_text_layer->set_scrollx(0, 0/*m_scrollram16[6]*/ ); |
422 | 422 | m_text_layer->set_scrolly(0, 0/*m_scrollram16[7]*/ ); |
423 | 423 | |
424 | screen.machine().priority_bitmap.fill(0, cliprect); | |
425 | bitmap.fill(get_black_pen(screen.machine()), cliprect); /* wrong color? */ | |
424 | machine().priority_bitmap.fill(0, cliprect); | |
425 | bitmap.fill(get_black_pen(machine()), cliprect); /* wrong color? */ | |
426 | 426 | |
427 | 427 | /* m_layer_disable is a guess based on 'stage 1' screen in heatbrl */ |
428 | 428 | |
r17988 | r17989 | |
431 | 431 | if (!(m_layer_disable&0x0002)) m_background_layer->draw(bitmap, cliprect, 0, 1); |
432 | 432 | if (!(m_layer_disable&0x0001)) m_text_layer->draw(bitmap, cliprect, 0, 2); |
433 | 433 | |
434 | draw_sprites( | |
434 | draw_sprites( | |
435 | 435 | |
436 | 436 | |
437 | 437 | return 0; |
r17988 | r17989 | |
454 | 454 | |
455 | 455 | |
456 | 456 | bitmap.fill(0x0200, cliprect); |
457 | | |
457 | | |
458 | 458 | |
459 | 459 | if (!(m_layer_disable&0x0001)) m_background_layer->draw(bitmap, cliprect, 0,0); |
460 | 460 | if (!(m_layer_disable&0x0002)) m_midground_layer->draw(bitmap, cliprect, 0,0); |
461 | 461 | if (!(m_layer_disable&0x0004)) m_foreground_layer->draw(bitmap, cliprect, 0,1); |
462 | 462 | if (!(m_layer_disable&0x0008)) m_text_layer->draw(bitmap, cliprect, 0,2); |
463 | 463 | |
464 | draw_sprites( | |
464 | draw_sprites( | |
465 | 465 | |
466 | 466 | return 0; |
467 | 467 | } |
r17988 | r17989 | |
478 | 478 | m_text_layer->set_scrollx(0, 0/*m_scrollram16[6]*/ ); |
479 | 479 | m_text_layer->set_scrolly(0, 0/*m_scrollram16[7]*/ ); |
480 | 480 | |
481 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
482 | screen.machine().priority_bitmap.fill(0, cliprect); | |
481 | bitmap.fill(get_black_pen(machine()), cliprect); | |
482 | machine().priority_bitmap.fill(0, cliprect); | |
483 | 483 | |
484 | 484 | if(!(m_layer_disable & 1)) |
485 | 485 | m_background_layer->draw(bitmap, cliprect, 0,1); |
r17988 | r17989 | |
493 | 493 | if(!(m_layer_disable & 8)) |
494 | 494 | m_text_layer->draw(bitmap, cliprect, 0,8); |
495 | 495 | |
496 | draw_sprites( | |
496 | draw_sprites( | |
497 | 497 | |
498 | 498 | return 0; |
499 | 499 | } |
r17988 | r17989 | |
---|---|---|
320 | 320 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
321 | 321 | |
322 | 322 | /* draw the low-priority sprites */ |
323 | mcr68_update_sprites( | |
323 | mcr68_update_sprites( | |
324 | 324 | |
325 | 325 | /* redraw tiles with priority over sprites */ |
326 | 326 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
327 | 327 | |
328 | 328 | /* draw the high-priority sprites */ |
329 | mcr68_update_sprites( | |
329 | mcr68_update_sprites( | |
330 | 330 | return 0; |
331 | 331 | } |
332 | 332 | |
r17988 | r17989 | |
337 | 337 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
338 | 338 | |
339 | 339 | /* draw the low-priority sprites */ |
340 | zwackery_update_sprites( | |
340 | zwackery_update_sprites( | |
341 | 341 | |
342 | 342 | /* redraw tiles with priority over sprites */ |
343 | 343 | m_fg_tilemap->draw(bitmap, cliprect, 1, 0); |
344 | 344 | |
345 | 345 | /* draw the high-priority sprites */ |
346 | zwackery_update_sprites( | |
346 | zwackery_update_sprites( | |
347 | 347 | return 0; |
348 | 348 | } |
r17988 | r17989 | |
---|---|---|
128 | 128 | { |
129 | 129 | |
130 | 130 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
131 | draw_sprites( | |
131 | draw_sprites( | |
132 | 132 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
133 | 133 | return 0; |
134 | 134 | } |
r17988 | r17989 | |
---|---|---|
59 | 59 | m_zoom_colorbase[1] = k053251_get_palette_index(m_k053251, K053251_CI3); |
60 | 60 | m_zoom_colorbase[0] = k053251_get_palette_index(m_k053251, K053251_CI4); |
61 | 61 | |
62 | | |
62 | | |
63 | 63 | |
64 | 64 | k051316_zoom_draw(m_k051316_1, bitmap, cliprect, 0, 0); |
65 | 65 | k051316_zoom_draw(m_k051316_2, bitmap, cliprect, 0, 1); |
r17988 | r17989 | |
---|---|---|
70 | 70 | |
71 | 71 | k052109_tilemap_update(m_k052109); |
72 | 72 | |
73 | | |
73 | | |
74 | 74 | |
75 | 75 | /* The background color is always from layer 1 - but it's always black anyway */ |
76 | 76 | // bitmap.fill(16 * m_layer_colorbase[1], cliprect); |
r17988 | r17989 | |
---|---|---|
39 | 39 | sy = 248 - sy; |
40 | 40 | } |
41 | 41 | |
42 | drawgfx_transpen(bitmap,cliprect, | |
42 | drawgfx_transpen(bitmap,cliprect, | |
43 | 43 | code, col, |
44 | 44 | flip, flip, |
45 | 45 | sx, sy,0); |
r17988 | r17989 | |
---|---|---|
205 | 205 | UINT32 gsword_state::screen_update_gsword(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
206 | 206 | { |
207 | 207 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
208 | draw_sprites( | |
208 | draw_sprites( | |
209 | 209 | return 0; |
210 | 210 | } |
r17988 | r17989 | |
---|---|---|
396 | 396 | { |
397 | 397 | for (x = 0; x < m_screen_width; x++) |
398 | 398 | { |
399 | update_pixel0( | |
399 | update_pixel0( | |
400 | 400 | } |
401 | 401 | } |
402 | 402 | if (m_gfxdraw_mode) |
r17988 | r17989 | |
405 | 405 | { |
406 | 406 | for (x = 0; x < m_screen_width; x++) |
407 | 407 | { |
408 | update_pixel1( | |
408 | update_pixel1( | |
409 | 409 | } |
410 | 410 | } |
411 | 411 | } |
r17988 | r17989 | |
---|---|---|
91 | 91 | |
92 | 92 | konami_sortlayers3(layer, m_layerpri); |
93 | 93 | |
94 | | |
94 | | |
95 | 95 | /* note the '+1' in the background color!!! */ |
96 | 96 | bitmap.fill(16 * bg_colorbase + 1, cliprect); |
97 | 97 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[0], 0, 1); |
r17988 | r17989 | |
148 | 148 | rectangle cliprect; |
149 | 149 | int offset; |
150 | 150 | |
151 | // const rectangle *visarea = | |
151 | // const rectangle *visarea = | |
152 | 152 | // cliprect = *visarea; |
153 | 153 | |
154 | 154 | cliprect.set(0, 64 * 8 - 1, 2 * 8, 30 * 8 - 1); |
155 | 155 | |
156 | 156 | |
157 | address_space &space = screen.machine().driver_data()->generic_space(); | |
158 | if (screen.machine().primary_screen->frame_number() & 0x01) | |
157 | address_space &space = machine().driver_data()->generic_space(); | |
158 | if (machine().primary_screen->frame_number() & 0x01) | |
159 | 159 | { |
160 | 160 | |
161 | 161 | /* copy the desired spritelist to the chip */ |
r17988 | r17989 | |
212 | 212 | |
213 | 213 | konami_sortlayers3(layer, m_layerpri); |
214 | 214 | |
215 | | |
215 | | |
216 | 216 | /* note the '+1' in the background color!!! */ |
217 | 217 | renderbitmap->fill(16 * bg_colorbase + 1, cliprect); |
218 | 218 | k052109_tilemap_draw(m_k052109, *renderbitmap, cliprect, layer[0], 0, 1); |
r17988 | r17989 | |
---|---|---|
206 | 206 | { |
207 | 207 | int t; |
208 | 208 | |
209 | t = | |
209 | t = | |
210 | 210 | if (t != m_monitor) |
211 | 211 | { |
212 | 212 | m_monitor = t; |
213 | | |
213 | | |
214 | 214 | } |
215 | 215 | |
216 | 216 | m_bg_tilemap->set_scrollx(0, m_flip ? (HTOTAL-HBSTART) : 0); |
217 | 217 | m_bg_tilemap->set_scrolly(0, m_gfx_scroll - (m_flip ? 8 : 0)); |
218 | 218 | |
219 | 219 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
220 | draw_sprites( | |
220 | draw_sprites( | |
221 | 221 | |
222 | 222 | return 0; |
223 | 223 | } |
r17988 | r17989 | |
---|---|---|
175 | 175 | |
176 | 176 | UINT32 atarifb_state::screen_update_atarifb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
177 | 177 | { |
178 | draw_playfield_and_alpha( | |
178 | draw_playfield_and_alpha( | |
179 | 179 | |
180 | draw_sprites( | |
180 | draw_sprites( | |
181 | 181 | |
182 | 182 | return 0; |
183 | 183 | } |
r17988 | r17989 | |
185 | 185 | |
186 | 186 | UINT32 atarifb_state::screen_update_abaseb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
187 | 187 | { |
188 | draw_playfield_and_alpha( | |
188 | draw_playfield_and_alpha( | |
189 | 189 | |
190 | draw_sprites( | |
190 | draw_sprites( | |
191 | 191 | |
192 | 192 | return 0; |
193 | 193 | } |
r17988 | r17989 | |
195 | 195 | |
196 | 196 | UINT32 atarifb_state::screen_update_soccer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
197 | 197 | { |
198 | draw_playfield_and_alpha( | |
198 | draw_playfield_and_alpha( | |
199 | 199 | |
200 | draw_sprites( | |
200 | draw_sprites( | |
201 | 201 | |
202 | 202 | return 0; |
203 | 203 | } |
r17988 | r17989 | |
---|---|---|
136 | 136 | |
137 | 137 | UINT32 silkroad_state::screen_update_silkroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
138 | 138 | { |
139 | | |
139 | | |
140 | 140 | bitmap.fill(0x7c0, cliprect); |
141 | 141 | |
142 | 142 | m_fg_tilemap->set_scrollx(0, ((m_regs[0] & 0xffff0000) >> 16) ); |
r17988 | r17989 | |
151 | 151 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
152 | 152 | m_fg2_tilemap->draw(bitmap, cliprect, 0,1); |
153 | 153 | m_fg3_tilemap->draw(bitmap, cliprect, 0,2); |
154 | draw_sprites( | |
154 | draw_sprites( | |
155 | 155 | |
156 | 156 | if (0) |
157 | 157 | { |
r17988 | r17989 | |
---|---|---|
104 | 104 | { |
105 | 105 | |
106 | 106 | bitmap.fill(7168, cliprect); |
107 | | |
107 | | |
108 | 108 | |
109 | 109 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, 3, K056832_DRAW_FLAG_MIRROR, 1); |
110 | 110 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, 2, K056832_DRAW_FLAG_MIRROR, 2); |
r17988 | r17989 | |
---|---|---|
68 | 68 | { |
69 | 69 | for (j = 0; j < 2; j++) |
70 | 70 | { |
71 | drawgfx_transpen(bitmap, rect, | |
71 | drawgfx_transpen(bitmap, rect, | |
72 | 72 | 0, 0, |
73 | 73 | 0, 0, |
74 | 74 | x + 16 * i, |
r17988 | r17989 | |
---|---|---|
468 | 468 | |
469 | 469 | UINT32 tecmo16_state::screen_update_tecmo16(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
470 | 470 | { |
471 | | |
471 | | |
472 | 472 | |
473 | 473 | m_tile_bitmap_bg.fill(0x300, cliprect); |
474 | 474 | m_tile_bitmap_fg.fill(0, cliprect); |
r17988 | r17989 | |
483 | 483 | m_tx_tilemap->draw(m_tile_bitmap_fg, cliprect, 0, 4); |
484 | 484 | |
485 | 485 | /* draw sprites into a 16-bit bitmap */ |
486 | draw_sprites( | |
486 | draw_sprites( | |
487 | 487 | |
488 | 488 | /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ |
489 | blendbitmaps( | |
489 | blendbitmaps( | |
490 | 490 | return 0; |
491 | 491 | } |
r17988 | r17989 | |
---|---|---|
131 | 131 | UINT32 exprraid_state::screen_update_exprraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
132 | 132 | { |
133 | 133 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
134 | draw_sprites( | |
134 | draw_sprites( | |
135 | 135 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
136 | 136 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
137 | 137 | return 0; |
r17988 | r17989 | |
---|---|---|
223 | 223 | } |
224 | 224 | } |
225 | 225 | |
226 | drawgfx_opaque(tmpbitmap,tmpbitmap.cliprect(), | |
226 | drawgfx_opaque(tmpbitmap,tmpbitmap.cliprect(), | |
227 | 227 | m_videoram2[offs] + 256 * m_bankreg, |
228 | 228 | (m_videoram2[offs] >> 5) + 8 * m_palreg, |
229 | 229 | m_cocktail,m_cocktail, |
230 | 230 | 8*sx,8*sy); |
231 | 231 | |
232 | drawgfx_transpen(tmpbitmap,tmpbitmap.cliprect(), | |
232 | drawgfx_transpen(tmpbitmap,tmpbitmap.cliprect(), | |
233 | 233 | videoram[offs] + 256*m_bankreg, |
234 | 234 | (videoram[offs] >> 5) + 8 * m_palreg, |
235 | 235 | m_cocktail,m_cocktail, |
r17988 | r17989 | |
---|---|---|
101 | 101 | |
102 | 102 | code |= (m_sprite_ram[i + 0x30] << 2) & 0x1c0; |
103 | 103 | |
104 | drawgfx_transpen(bitmap, cliprect, | |
104 | drawgfx_transpen(bitmap, cliprect, | |
105 | 105 | code, |
106 | 106 | 0, |
107 | 107 | flipx, flipy, |
108 | 108 | x, 240 - y, 0); |
109 | 109 | |
110 | drawgfx_transpen(bitmap, cliprect, | |
110 | drawgfx_transpen(bitmap, cliprect, | |
111 | 111 | code, |
112 | 112 | 0, |
113 | 113 | flipx, flipy, |
r17988 | r17989 | |
135 | 135 | |
136 | 136 | code |= (m_sprite_ram[i + 0x30] << 2) & 0x1c0; |
137 | 137 | |
138 | drawgfx_transpen(bitmap, cliprect, | |
138 | drawgfx_transpen(bitmap, cliprect, | |
139 | 139 | code, |
140 | 140 | 0, |
141 | 141 | flipx, flipy, |
142 | 142 | x, 240 - y, 0); |
143 | 143 | |
144 | drawgfx_transpen(bitmap, cliprect, | |
144 | drawgfx_transpen(bitmap, cliprect, | |
145 | 145 | code, |
146 | 146 | 0, |
147 | 147 | flipx, flipy, |
r17988 | r17989 | |
---|---|---|
272 | 272 | |
273 | 273 | UINT32 toypop_state::screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
274 | 274 | { |
275 | draw_background( | |
275 | draw_background( | |
276 | 276 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
277 | draw_sprites( | |
277 | draw_sprites( | |
278 | 278 | return 0; |
279 | 279 | } |
r17988 | r17989 | |
---|---|---|
327 | 327 | int offs, offs2; |
328 | 328 | |
329 | 329 | m_flipscreen = m_control_0[0] & 0x80; |
330 | | |
330 | | |
331 | 331 | |
332 | 332 | if (m_flipscreen) |
333 | 333 | offs = 1; |
r17988 | r17989 | |
339 | 339 | else |
340 | 340 | offs2 = -5; |
341 | 341 | |
342 | tumbleb_draw_common( | |
342 | tumbleb_draw_common( | |
343 | 343 | |
344 | 344 | return 0; |
345 | 345 | } |
r17988 | r17989 | |
349 | 349 | int offs, offs2; |
350 | 350 | |
351 | 351 | m_flipscreen = m_control_0[0] & 0x80; |
352 | | |
352 | | |
353 | 353 | |
354 | 354 | if (m_flipscreen) |
355 | 355 | offs = 1; |
r17988 | r17989 | |
361 | 361 | else |
362 | 362 | offs2 = -5; |
363 | 363 | |
364 | tumbleb_draw_common( | |
364 | tumbleb_draw_common( | |
365 | 365 | return 0; |
366 | 366 | } |
367 | 367 | |
r17988 | r17989 | |
370 | 370 | int offs, offs2; |
371 | 371 | |
372 | 372 | m_flipscreen = m_control_0[0] & 0x80; |
373 | | |
373 | | |
374 | 374 | |
375 | 375 | if (m_flipscreen) |
376 | 376 | offs = 1; |
r17988 | r17989 | |
382 | 382 | else |
383 | 383 | offs2 = -5; |
384 | 384 | |
385 | tumbleb_draw_common( | |
385 | tumbleb_draw_common( | |
386 | 386 | return 0; |
387 | 387 | } |
388 | 388 | |
r17988 | r17989 | |
396 | 396 | offsy = 2; |
397 | 397 | offsx2 = -5; |
398 | 398 | |
399 | tumbleb_draw_common( | |
399 | tumbleb_draw_common( | |
400 | 400 | |
401 | 401 | return 0; |
402 | 402 | } |
r17988 | r17989 | |
406 | 406 | int offs, offs2; |
407 | 407 | |
408 | 408 | m_flipscreen = m_control_0[0] & 0x80; |
409 | | |
409 | | |
410 | 410 | |
411 | 411 | /* not sure of this */ |
412 | 412 | if (m_flipscreen) |
r17988 | r17989 | |
420 | 420 | else |
421 | 421 | offs2 = 8; |
422 | 422 | |
423 | tumbleb_draw_common( | |
423 | tumbleb_draw_common( | |
424 | 424 | return 0; |
425 | 425 | } |
426 | 426 | |
r17988 | r17989 | |
429 | 429 | int offs, offs2; |
430 | 430 | |
431 | 431 | m_flipscreen = m_control_0[0] & 0x80; |
432 | | |
432 | | |
433 | 433 | offs = -1; |
434 | 434 | offs2 = -2; |
435 | 435 | |
436 | tumbleb_draw_common( | |
436 | tumbleb_draw_common( | |
437 | 437 | |
438 | 438 | return 0; |
439 | 439 | } |
r17988 | r17989 | |
443 | 443 | int offs, offs2; |
444 | 444 | |
445 | 445 | m_flipscreen = m_control_0[0] & 0x80; |
446 | | |
446 | | |
447 | 447 | offs = -1; |
448 | 448 | offs2 = -5; // foreground scroll.. |
449 | 449 | |
450 | tumbleb_draw_common( | |
450 | tumbleb_draw_common( | |
451 | 451 | |
452 | | |
452 | | |
453 | 453 | return 0; |
454 | 454 | } |
455 | 455 | |
r17988 | r17989 | |
458 | 458 | int offs, offs2; |
459 | 459 | |
460 | 460 | m_flipscreen = m_control_0[0] & 0x80; |
461 | | |
461 | | |
462 | 462 | |
463 | 463 | if (m_flipscreen) |
464 | 464 | offs = 1; |
r17988 | r17989 | |
470 | 470 | else |
471 | 471 | offs2 = -5; |
472 | 472 | |
473 | tumbleb_draw_common( | |
473 | tumbleb_draw_common( | |
474 | 474 | |
475 | 475 | return 0; |
476 | 476 | } |
r17988 | r17989 | |
480 | 480 | int offs, offs2; |
481 | 481 | |
482 | 482 | m_flipscreen = m_control_0[0] & 0x80; |
483 | | |
483 | | |
484 | 484 | |
485 | 485 | if (m_flipscreen) |
486 | 486 | offs = 1; |
r17988 | r17989 | |
492 | 492 | else |
493 | 493 | offs2 = -5; |
494 | 494 | |
495 | tumbleb_draw_common( | |
495 | tumbleb_draw_common( | |
496 | 496 | return 0; |
497 | 497 | } |
498 | 498 | |
r17988 | r17989 | |
509 | 509 | m_pf2_tilemap->draw(bitmap, cliprect, 0, 0); |
510 | 510 | m_pf1_alt_tilemap->draw(bitmap, cliprect, 0, 0); |
511 | 511 | |
512 | | |
512 | | |
513 | 513 | return 0; |
514 | 514 | } |
515 | 515 |
r17988 | r17989 | |
---|---|---|
106 | 106 | int x, y, dx, dy, rx, ry, radr, chr, sy, fx, fy, px, py, offs, col, pri, flip ; |
107 | 107 | UINT8 *spriteram = m_spriteram; |
108 | 108 | |
109 | UINT8 *BG_MAP = screen.machine().root_device().memregion("user1")->base(); | |
110 | UINT8 *BG_COL_MAP = screen.machine().root_device().memregion("user2")->base(); | |
111 | UINT8 *FG_MAP = screen.machine().root_device().memregion("user3")->base(); | |
109 | UINT8 *BG_MAP = machine().root_device().memregion("user1")->base(); | |
110 | UINT8 *BG_COL_MAP = machine().root_device().memregion("user2")->base(); | |
111 | UINT8 *FG_MAP = machine().root_device().memregion("user3")->base(); | |
112 | 112 | UINT8 *TEXT_COLOR = memregion("proms")->base(); |
113 | 113 | |
114 | 114 | |
115 | flip = m_flipscreen ^ ( | |
115 | flip = m_flipscreen ^ ( | |
116 | 116 | |
117 | 117 | /* draw BG layer */ |
118 | 118 | dx = (7 - m_bg_scrollx[0]) & 7; |
r17988 | r17989 | |
142 | 142 | py = 248 - (8 * y + dy + 9); |
143 | 143 | } |
144 | 144 | |
145 | drawgfx_opaque(bitmap,cliprect, | |
145 | drawgfx_opaque(bitmap,cliprect, | |
146 | 146 | chr, |
147 | 147 | col, |
148 | 148 | flip,flip, |
r17988 | r17989 | |
176 | 176 | py = y + 1; |
177 | 177 | } |
178 | 178 | |
179 | drawgfx_transpen(bitmap,cliprect, | |
179 | drawgfx_transpen(bitmap,cliprect, | |
180 | 180 | chr, |
181 | 181 | col, |
182 | 182 | !fx,fy, |
r17988 | r17989 | |
210 | 210 | { |
211 | 211 | col = col & 0x0f; |
212 | 212 | chr = chr + m_bg_select * 512; |
213 | momoko_draw_bg_pri( | |
213 | momoko_draw_bg_pri( | |
214 | 214 | } |
215 | 215 | } |
216 | 216 | } |
r17988 | r17989 | |
238 | 238 | px = 248 - x; |
239 | 239 | py = y + 1; |
240 | 240 | } |
241 | drawgfx_transpen(bitmap,cliprect, | |
241 | drawgfx_transpen(bitmap,cliprect, | |
242 | 242 | chr, |
243 | 243 | col, |
244 | 244 | !fx,fy, |
r17988 | r17989 | |
271 | 271 | px = 248 - x * 8; |
272 | 272 | py = 255 - y; |
273 | 273 | } |
274 | drawgfx_transpen(bitmap,cliprect, | |
274 | drawgfx_transpen(bitmap,cliprect, | |
275 | 275 | m_videoram[(sy >> 3) * 32 + x] * 8 + dy, |
276 | 276 | col, |
277 | 277 | flip,0, |
r17988 | r17989 | |
304 | 304 | px = 248 - (8 * x + dx - 8); |
305 | 305 | py = 248 - (8 * y + dy + 9); |
306 | 306 | } |
307 | drawgfx_transpen(bitmap,cliprect, | |
307 | drawgfx_transpen(bitmap,cliprect, | |
308 | 308 | chr, |
309 | 309 | 0, /* color */ |
310 | 310 | flip,flip, /* flip */ |
r17988 | r17989 | |
---|---|---|
128 | 128 | { |
129 | 129 | |
130 | 130 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
131 | kchamp_draw_sprites( | |
131 | kchamp_draw_sprites( | |
132 | 132 | return 0; |
133 | 133 | } |
134 | 134 | |
r17988 | r17989 | |
136 | 136 | { |
137 | 137 | |
138 | 138 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
139 | kchampvs_draw_sprites( | |
139 | kchampvs_draw_sprites( | |
140 | 140 | return 0; |
141 | 141 | } |
r17988 | r17989 | |
---|---|---|
313 | 313 | |
314 | 314 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
315 | 315 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
316 | draw_sprites( | |
316 | draw_sprites( | |
317 | 317 | return 0; |
318 | 318 | } |
r17988 | r17989 | |
---|---|---|
75 | 75 | |
76 | 76 | if (!(attr & 0x80)) |
77 | 77 | { |
78 | drawgfx_transpen(bitmap, cliprect, | |
78 | drawgfx_transpen(bitmap, cliprect, | |
79 | 79 | (code >> 3) | bank, |
80 | 80 | i, |
81 | 81 | 0, 0, |
r17988 | r17989 | |
94 | 94 | if (state) |
95 | 95 | { |
96 | 96 | int i; |
97 | UINT16 BG = colortable_entry_get_value(screen.machine().colortable, 0); | |
98 | device_t *discrete = screen.machine().device("discrete"); | |
97 | UINT16 BG = colortable_entry_get_value(machine().colortable, 0); | |
98 | device_t *discrete = machine().device("discrete"); | |
99 | 99 | UINT8 *videoram = m_videoram; |
100 | 100 | |
101 | 101 | /* check for sprite-playfield collisions */ |
r17988 | r17989 | |
115 | 115 | |
116 | 116 | rect.min_x = horz - 15; |
117 | 117 | rect.min_y = vert - 15; |
118 | rect.max_x = horz - 15 + screen.machine().gfx[1]->width() - 1; | |
119 | rect.max_y = vert - 15 + screen.machine().gfx[1]->height() - 1; | |
118 | rect.max_x = horz - 15 + machine().gfx[1]->width() - 1; | |
119 | rect.max_y = vert - 15 + machine().gfx[1]->height() - 1; | |
120 | 120 | |
121 | rect &= | |
121 | rect &= | |
122 | 122 | |
123 | 123 | m_playfield->draw(m_helper, rect, 0, 0); |
124 | 124 | |
125 | 125 | if (code & 4) |
126 | 126 | bank = 32; |
127 | 127 | |
128 | drawgfx_transpen(m_helper, rect, | |
128 | drawgfx_transpen(m_helper, rect, | |
129 | 129 | (code >> 3) | bank, |
130 | 130 | 4, |
131 | 131 | 0, 0, |
r17988 | r17989 | |
134 | 134 | |
135 | 135 | for (y = rect.min_y; y <= rect.max_y; y++) |
136 | 136 | for (x = rect.min_x; x <= rect.max_x; x++) |
137 | if (colortable_entry_get_value( | |
137 | if (colortable_entry_get_value( | |
138 | 138 | m_collision[i] = 1; |
139 | 139 | } |
140 | 140 | |
141 | 141 | /* update sound status */ |
142 | 142 | |
143 | address_space &space = | |
143 | address_space &space = | |
144 | 144 | discrete_sound_w(discrete, space, ULTRATNK_MOTOR_DATA_1, videoram[0x391] & 15); |
145 | 145 | discrete_sound_w(discrete, space, ULTRATNK_MOTOR_DATA_2, videoram[0x393] & 15); |
146 | 146 | } |
r17988 | r17989 | |
---|---|---|
357 | 357 | m_pf2_wide_layer->set_scrollx(0, m_video_control_data[3]+256-2 ); |
358 | 358 | } |
359 | 359 | |
360 | | |
360 | | |
361 | 361 | |
362 | 362 | if (video_enable) |
363 | 363 | { |
r17988 | r17989 | |
448 | 448 | } |
449 | 449 | } |
450 | 450 | |
451 | draw_sprites( | |
451 | draw_sprites( | |
452 | 452 | |
453 | 453 | } else { |
454 | bitmap.fill(get_black_pen( | |
454 | bitmap.fill(get_black_pen( | |
455 | 455 | } |
456 | 456 | |
457 | 457 | return 0; |
r17988 | r17989 | |
460 | 460 | UINT32 m90_state::screen_update_bomblord(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
461 | 461 | { |
462 | 462 | int i; |
463 | screen.machine().priority_bitmap.fill(0, cliprect); | |
464 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
463 | machine().priority_bitmap.fill(0, cliprect); | |
464 | bitmap.fill(get_black_pen(machine()), cliprect); | |
465 | 465 | |
466 | 466 | /* Setup scrolling */ |
467 | 467 | if (m_video_control_data[6]&0x20) { |
r17988 | r17989 | |
504 | 504 | m_pf1_layer->draw(bitmap, cliprect, 1,1); |
505 | 505 | } |
506 | 506 | |
507 | bomblord_draw_sprites( | |
507 | bomblord_draw_sprites( | |
508 | 508 | |
509 | 509 | return 0; |
510 | 510 | } |
511 | 511 | |
512 | 512 | UINT32 m90_state::screen_update_dynablsb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
513 | 513 | { |
514 | screen.machine().priority_bitmap.fill(0, cliprect); | |
515 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
514 | machine().priority_bitmap.fill(0, cliprect); | |
515 | bitmap.fill(get_black_pen(machine()), cliprect); | |
516 | 516 | |
517 | 517 | if (!(m_video_data[0xf008/2] & 0x4000)) { |
518 | 518 | m_pf1_wide_layer->mark_all_dirty(); |
r17988 | r17989 | |
546 | 546 | m_pf2_layer->draw(bitmap, cliprect, 1,1); |
547 | 547 | } |
548 | 548 | |
549 | dynablsb_draw_sprites( | |
549 | dynablsb_draw_sprites( | |
550 | 550 | |
551 | 551 | return 0; |
552 | 552 | } |
r17988 | r17989 | |
---|---|---|
847 | 847 | layer[1] = layer[0] ^ 1; |
848 | 848 | layer[2] = 2; |
849 | 849 | |
850 | | |
850 | | |
851 | 851 | |
852 | 852 | bitmap.fill(0, cliprect); |
853 | 853 | |
r17988 | r17989 | |
856 | 856 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -3, m_road_palbank << 6, 1, 0, 1, 2); // -6 |
857 | 857 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
858 | 858 | |
859 | contcirc_draw_sprites_16x8( | |
859 | contcirc_draw_sprites_16x8( | |
860 | 860 | return 0; |
861 | 861 | } |
862 | 862 | |
r17988 | r17989 | |
873 | 873 | layer[1] = layer[0] ^ 1; |
874 | 874 | layer[2] = 2; |
875 | 875 | |
876 | | |
876 | | |
877 | 877 | |
878 | 878 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
879 | 879 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
883 | 883 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2); |
884 | 884 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
885 | 885 | |
886 | chasehq_draw_sprites_16x16( | |
886 | chasehq_draw_sprites_16x16( | |
887 | 887 | return 0; |
888 | 888 | } |
889 | 889 | |
r17988 | r17989 | |
898 | 898 | layer[1] = layer[0] ^ 1; |
899 | 899 | layer[2] = 2; |
900 | 900 | |
901 | | |
901 | | |
902 | 902 | |
903 | 903 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
904 | 904 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
908 | 908 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 1, 1, 2); |
909 | 909 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
910 | 910 | |
911 | bshark_draw_sprites_16x8( | |
911 | bshark_draw_sprites_16x8( | |
912 | 912 | return 0; |
913 | 913 | } |
914 | 914 | |
r17988 | r17989 | |
923 | 923 | layer[1] = layer[0] ^ 1; |
924 | 924 | layer[2] = 2; |
925 | 925 | |
926 | | |
926 | | |
927 | 927 | |
928 | 928 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
929 | 929 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
933 | 933 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2); |
934 | 934 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
935 | 935 | |
936 | sci_draw_sprites_16x8( | |
936 | sci_draw_sprites_16x8( | |
937 | 937 | return 0; |
938 | 938 | } |
939 | 939 | |
r17988 | r17989 | |
948 | 948 | layer[1] = layer[0] ^ 1; |
949 | 949 | layer[2] = 2; |
950 | 950 | |
951 | | |
951 | | |
952 | 952 | |
953 | 953 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
954 | 954 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
958 | 958 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0, 2, 1, 1, 2); |
959 | 959 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
960 | 960 | |
961 | aquajack_draw_sprites_16x8( | |
961 | aquajack_draw_sprites_16x8( | |
962 | 962 | return 0; |
963 | 963 | } |
964 | 964 | |
r17988 | r17989 | |
973 | 973 | layer[1] = layer[0] ^ 1; |
974 | 974 | layer[2] = 2; |
975 | 975 | |
976 | | |
976 | | |
977 | 977 | |
978 | 978 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
979 | 979 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
982 | 982 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2); |
983 | 983 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
984 | 984 | |
985 | spacegun_draw_sprites_16x8( | |
985 | spacegun_draw_sprites_16x8( | |
986 | 986 | |
987 | 987 | return 0; |
988 | 988 | } |
r17988 | r17989 | |
1003 | 1003 | layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ |
1004 | 1004 | layer[4] = 4; /* text layer always over bg layers */ |
1005 | 1005 | |
1006 | | |
1006 | | |
1007 | 1007 | |
1008 | 1008 | /* Ensure screen blanked - this shouldn't be necessary! */ |
1009 | 1009 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
1013 | 1013 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[2], 0, 1); |
1014 | 1014 | |
1015 | 1015 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2); |
1016 | bshark_draw_sprites_16x8( | |
1016 | bshark_draw_sprites_16x8( | |
1017 | 1017 | |
1018 | 1018 | /* This layer used for the big numeric displays */ |
1019 | 1019 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[3], 0, 4); |
r17988 | r17989 | |
1038 | 1038 | layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ |
1039 | 1039 | layer[4] = 4; /* text layer always over bg layers */ |
1040 | 1040 | |
1041 | | |
1041 | | |
1042 | 1042 | |
1043 | 1043 | /* Ensure screen blanked - this shouldn't be necessary! */ |
1044 | 1044 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
1049 | 1049 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[3], 0, 2); |
1050 | 1050 | |
1051 | 1051 | tc0150rod_draw(m_tc0150rod, bitmap, cliprect, -1, 0xc0, 0, 0, 1, 2); |
1052 | sci_draw_sprites_16x8( | |
1052 | sci_draw_sprites_16x8( | |
1053 | 1053 | |
1054 | 1054 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[4], 0, 4); |
1055 | 1055 | return 0; |
r17988 | r17989 | |
---|---|---|
141 | 141 | m_bg_tilemap->set_scrolly(col, m_scroll[col]); |
142 | 142 | |
143 | 143 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | draw_sprites( | |
144 | draw_sprites( | |
145 | 145 | return 0; |
146 | 146 | } |
r17988 | r17989 | |
---|---|---|
203 | 203 | |
204 | 204 | UINT32 gunbustr_state::screen_update_gunbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
205 | 205 | { |
206 | device_t *tc0480scp = | |
206 | device_t *tc0480scp = | |
207 | 207 | UINT8 layer[5]; |
208 | 208 | UINT16 priority; |
209 | 209 | static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; |
r17988 | r17989 | |
217 | 217 | layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ |
218 | 218 | layer[4] = 4; /* text layer always over bg layers */ |
219 | 219 | |
220 | | |
220 | | |
221 | 221 | |
222 | 222 | /* We have to assume 2nd to bottom layer is always underneath |
223 | 223 | sprites as pdrawgfx cannot yet cope with more than 4 layers */ |
224 | 224 | |
225 | 225 | #ifdef MAME_DEBUG |
226 | if (!screen.machine().input().code_pressed (KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0],TILEMAP_DRAW_OPAQUE, 0); | |
227 | if (!screen.machine().input().code_pressed (KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); | |
228 | if (!screen.machine().input().code_pressed (KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); | |
229 | if (!screen.machine().input().code_pressed (KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); | |
230 | if (!screen.machine().input().code_pressed (KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); | |
231 | if (!screen.machine().input().code_pressed (KEYCODE_N)) draw_sprites(screen.machine(), bitmap, cliprect, primasks, 48, -116); | |
226 | if (!machine().input().code_pressed (KEYCODE_Z)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0],TILEMAP_DRAW_OPAQUE, 0); | |
227 | if (!machine().input().code_pressed (KEYCODE_X)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); | |
228 | if (!machine().input().code_pressed (KEYCODE_C)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); | |
229 | if (!machine().input().code_pressed (KEYCODE_V)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); | |
230 | if (!machine().input().code_pressed (KEYCODE_B)) tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); | |
231 | if (!machine().input().code_pressed (KEYCODE_N)) draw_sprites(machine(), bitmap, cliprect, primasks, 48, -116); | |
232 | 232 | #else |
233 | 233 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); |
234 | 234 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 1); |
235 | 235 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 2); |
236 | 236 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 4); |
237 | 237 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 8); /* text layer */ |
238 | draw_sprites( | |
238 | draw_sprites( | |
239 | 239 | #endif |
240 | 240 | return 0; |
241 | 241 | } |
r17988 | r17989 | |
---|---|---|
219 | 219 | UINT32 superqix_state::screen_update_pbillian(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
220 | 220 | { |
221 | 221 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
222 | pbillian_draw_sprites( | |
222 | pbillian_draw_sprites( | |
223 | 223 | |
224 | 224 | return 0; |
225 | 225 | } |
r17988 | r17989 | |
228 | 228 | { |
229 | 229 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
230 | 230 | copybitmap_trans(bitmap,*m_fg_bitmap[m_show_bitmap],flip_screen(),flip_screen(),0,0,cliprect,0); |
231 | superqix_draw_sprites( | |
231 | superqix_draw_sprites( | |
232 | 232 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
233 | 233 | return 0; |
234 | 234 | } |
r17988 | r17989 | |
---|---|---|
128 | 128 | } |
129 | 129 | |
130 | 130 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
131 | draw_sprites( | |
131 | draw_sprites( | |
132 | 132 | return 0; |
133 | 133 | } |
r17988 | r17989 | |
---|---|---|
234 | 234 | { |
235 | 235 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
236 | 236 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
237 | draw_sprites( | |
237 | draw_sprites( | |
238 | 238 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
239 | 239 | return 0; |
240 | 240 | } |
r17988 | r17989 | |
---|---|---|
115 | 115 | |
116 | 116 | UINT32 playch10_state::screen_update_playch10_single(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
117 | 117 | { |
118 | ppu2c0x_device *ppu = | |
118 | ppu2c0x_device *ppu = | |
119 | 119 | |
120 | 120 | rectangle top_monitor = screen.visible_area(); |
121 | 121 | |
r17988 | r17989 | |
143 | 143 | |
144 | 144 | UINT32 playch10_state::screen_update_playch10_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
145 | 145 | { |
146 | ppu2c0x_device *ppu = | |
146 | ppu2c0x_device *ppu = | |
147 | 147 | |
148 | 148 | /* Single Monitor version */ |
149 | 149 | if (m_pc10_bios != 1) |
r17988 | r17989 | |
---|---|---|
324 | 324 | UINT16 src_pixel = m_main_bitmap.pix16(y, x); |
325 | 325 | |
326 | 326 | if (sl_bitmap.pix16(y, x) == 0xff) |
327 | src_pixel += | |
327 | src_pixel += | |
328 | 328 | |
329 | 329 | bitmap.pix16(y, x) = src_pixel; |
330 | 330 | } |
r17988 | r17989 | |
---|---|---|
926 | 926 | /* If screen output is disabled, fill with black */ |
927 | 927 | if (!BIT(m_ctrl_reg, 7)) |
928 | 928 | { |
929 | bitmap.fill(get_black_pen( | |
929 | bitmap.fill(get_black_pen( | |
930 | 930 | return 0; |
931 | 931 | } |
932 | 932 | |
933 | 933 | /* Scan out the frame buffer in rotated order */ |
934 | rotate_draw( | |
934 | rotate_draw( | |
935 | 935 | |
936 | 936 | /* Draw the character tilemap */ |
937 | 937 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
938 | 938 | |
939 | 939 | /* Draw the HUD */ |
940 | hud_draw( | |
940 | hud_draw( | |
941 | 941 | |
942 | 942 | return 0; |
943 | 943 | } |
r17988 | r17989 | |
954 | 954 | m_back_buffer = tmp; |
955 | 955 | |
956 | 956 | /* Draw the frame buffer layers */ |
957 | scene_draw(screen.machine()); | |
958 | ground_draw(screen.machine()); | |
959 | objects_draw(screen.machine()); | |
957 | scene_draw(machine()); | |
958 | ground_draw(machine()); | |
959 | objects_draw(machine()); | |
960 | 960 | } |
961 | 961 | } |
r17988 | r17989 | |
---|---|---|
541 | 541 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0); |
542 | 542 | |
543 | 543 | sprite_bitmap.fill(15, cliprect); |
544 | mappy_draw_sprites( | |
544 | mappy_draw_sprites( | |
545 | 545 | copybitmap_trans(bitmap,sprite_bitmap,0,0,0,0,cliprect,15); |
546 | 546 | |
547 | 547 | /* Redraw the high priority characters */ |
r17988 | r17989 | |
553 | 553 | for (x = 0;x < sprite_bitmap.width();x++) |
554 | 554 | { |
555 | 555 | int spr_entry = sprite_bitmap.pix16(y, x); |
556 | int spr_pen = colortable_entry_get_value( | |
556 | int spr_pen = colortable_entry_get_value( | |
557 | 557 | if (spr_pen == 0 || spr_pen == 1) |
558 | 558 | bitmap.pix16(y, x) = spr_entry; |
559 | 559 | } |
r17988 | r17989 | |
569 | 569 | |
570 | 570 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0); |
571 | 571 | |
572 | phozon_draw_sprites( | |
572 | phozon_draw_sprites( | |
573 | 573 | |
574 | 574 | /* Redraw the high priority characters */ |
575 | 575 | m_bg_tilemap->draw(bitmap, cliprect, 1,0); |
r17988 | r17989 | |
585 | 585 | |
586 | 586 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES,0); |
587 | 587 | |
588 | mappy_draw_sprites( | |
588 | mappy_draw_sprites( | |
589 | 589 | |
590 | 590 | /* Redraw the high priority characters */ |
591 | 591 | m_bg_tilemap->draw(bitmap, cliprect, 1,0); |
r17988 | r17989 | |
---|---|---|
39 | 39 | layer[0] = 0; |
40 | 40 | layer[1] = 1; |
41 | 41 | |
42 | | |
42 | | |
43 | 43 | |
44 | 44 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1); |
45 | 45 | pc080sn_tilemap_draw(m_pc080sn, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
156 | 156 | |
157 | 157 | konami_sortlayers4(layer, m_layer_pri); |
158 | 158 | |
159 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
160 | screen.machine().priority_bitmap.fill(0, cliprect); | |
159 | bitmap.fill(get_black_pen(machine()), cliprect); | |
160 | machine().priority_bitmap.fill(0, cliprect); | |
161 | 161 | |
162 | 162 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, layer[0], 0, 1); |
163 | 163 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, layer[1], 0, 2); |
r17988 | r17989 | |
---|---|---|
158 | 158 | UINT32 tigeroad_state::screen_update_tigeroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
159 | 159 | { |
160 | 160 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 1); |
163 | //draw_sprites( | |
163 | //draw_sprites( | |
164 | 164 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
165 | 165 | return 0; |
166 | 166 | } |
r17988 | r17989 | |
---|---|---|
2417 | 2417 | /* if the display is off, punt */ |
2418 | 2418 | if (!m_system32_displayenable[0]) |
2419 | 2419 | { |
2420 | bitmap.fill(get_black_pen( | |
2420 | bitmap.fill(get_black_pen( | |
2421 | 2421 | return 0; |
2422 | 2422 | } |
2423 | 2423 | |
r17988 | r17989 | |
2428 | 2428 | |
2429 | 2429 | /* debugging */ |
2430 | 2430 | #if QWERTY_LAYER_ENABLE |
2431 | if (screen.machine().input().code_pressed(KEYCODE_Q)) enablemask = 0x01; | |
2432 | if (screen.machine().input().code_pressed(KEYCODE_W)) enablemask = 0x02; | |
2433 | if (screen.machine().input().code_pressed(KEYCODE_E)) enablemask = 0x04; | |
2434 | if (screen.machine().input().code_pressed(KEYCODE_R)) enablemask = 0x08; | |
2435 | if (screen.machine().input().code_pressed(KEYCODE_T)) enablemask = 0x10; | |
2436 | if (screen.machine().input().code_pressed(KEYCODE_Y)) enablemask = 0x20; | |
2431 | if (machine().input().code_pressed(KEYCODE_Q)) enablemask = 0x01; | |
2432 | if (machine().input().code_pressed(KEYCODE_W)) enablemask = 0x02; | |
2433 | if (machine().input().code_pressed(KEYCODE_E)) enablemask = 0x04; | |
2434 | if (machine().input().code_pressed(KEYCODE_R)) enablemask = 0x08; | |
2435 | if (machine().input().code_pressed(KEYCODE_T)) enablemask = 0x10; | |
2436 | if (machine().input().code_pressed(KEYCODE_Y)) enablemask = 0x20; | |
2437 | 2437 | #endif |
2438 | 2438 | |
2439 | 2439 | /* do the mixing */ |
r17988 | r17989 | |
2441 | 2441 | mix_all_layers(this, 0, 0, bitmap, cliprect, enablemask); |
2442 | 2442 | g_profiler.stop(); |
2443 | 2443 | |
2444 | if (LOG_SPRITES && | |
2444 | if (LOG_SPRITES && | |
2445 | 2445 | { |
2446 | 2446 | const rectangle &visarea = screen.visible_area(); |
2447 | 2447 | FILE *f = fopen("sprite.txt", "w"); |
r17988 | r17989 | |
---|---|---|
188 | 188 | } |
189 | 189 | |
190 | 190 | m_pf1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
191 | draw_sprites( | |
191 | draw_sprites( | |
192 | 192 | m_pf1_tilemap->draw(bitmap, cliprect, 0,0); |
193 | draw_sprites( | |
193 | draw_sprites( | |
194 | 194 | |
195 | slapfght_log_vram( | |
195 | slapfght_log_vram( | |
196 | 196 | return 0; |
197 | 197 | } |
198 | 198 | |
r17988 | r17989 | |
202 | 202 | UINT8 *buffered_spriteram = m_spriteram->buffer(); |
203 | 203 | int offs; |
204 | 204 | |
205 | | |
205 | | |
206 | 206 | if (m_flipscreen) { |
207 | 207 | m_fix_tilemap->set_scrollx(0,296); |
208 | 208 | m_pf1_tilemap->set_scrollx(0,(*m_slapfight_scrollx_lo + 256 * *m_slapfight_scrollx_hi)+296 ); |
r17988 | r17989 | |
222 | 222 | for (offs = 0;offs < m_spriteram->bytes();offs += 4) |
223 | 223 | { |
224 | 224 | if (m_flipscreen) |
225 | drawgfx_transpen(bitmap,cliprect, | |
225 | drawgfx_transpen(bitmap,cliprect, | |
226 | 226 | buffered_spriteram[offs] + ((buffered_spriteram[offs+2] & 0xc0) << 2), |
227 | 227 | (buffered_spriteram[offs+2] & 0x1e) >> 1, |
228 | 228 | 1,1, |
229 | 229 | 288-(buffered_spriteram[offs+1] + ((buffered_spriteram[offs+2] & 0x01) << 8)) +18,240-buffered_spriteram[offs+3],0); |
230 | 230 | else |
231 | drawgfx_transpen(bitmap,cliprect, | |
231 | drawgfx_transpen(bitmap,cliprect, | |
232 | 232 | buffered_spriteram[offs] + ((buffered_spriteram[offs+2] & 0xc0) << 2), |
233 | 233 | (buffered_spriteram[offs+2] & 0x1e) >> 1, |
234 | 234 | 0,0, |
r17988 | r17989 | |
237 | 237 | |
238 | 238 | m_fix_tilemap->draw(bitmap, cliprect, 0,0); |
239 | 239 | |
240 | slapfght_log_vram( | |
240 | slapfght_log_vram( | |
241 | 241 | return 0; |
242 | 242 | } |
r17988 | r17989 | |
---|---|---|
1266 | 1266 | #ifdef DEBUG_KEYS |
1267 | 1267 | for (i = 0; i <= 7; i++) |
1268 | 1268 | { |
1269 | if( | |
1269 | if( | |
1270 | 1270 | pri_debug = true; |
1271 | 1271 | } |
1272 | 1272 | } |
1273 | if( | |
1273 | if( | |
1274 | 1274 | sprites = false; |
1275 | 1275 | } |
1276 | if( | |
1276 | if( | |
1277 | 1277 | backgrounds = false; |
1278 | 1278 | } |
1279 | 1279 | #endif |
r17988 | r17989 | |
1288 | 1288 | |
1289 | 1289 | m_z_bitmap.fill(0, cliprect); /* z-buffer */ |
1290 | 1290 | |
1291 | psikyosh_prelineblend( | |
1291 | psikyosh_prelineblend( | |
1292 | 1292 | for (i = 0; i <= 7; i++) |
1293 | 1293 | { |
1294 | if(!pri_debug || | |
1294 | if(!pri_debug || | |
1295 | 1295 | { |
1296 | 1296 | if(sprites) { |
1297 | draw_sprites( | |
1297 | draw_sprites( | |
1298 | 1298 | } |
1299 | 1299 | if(backgrounds) { |
1300 | draw_background( | |
1300 | draw_background( | |
1301 | 1301 | } |
1302 | psikyosh_postlineblend( | |
1302 | psikyosh_postlineblend( | |
1303 | 1303 | } |
1304 | 1304 | } |
1305 | 1305 | return 0; |
r17988 | r17989 | |
---|---|---|
189 | 189 | if (m_video_enable) |
190 | 190 | { |
191 | 191 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
192 | draw_sprites( | |
192 | draw_sprites( | |
193 | 193 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
194 | 194 | } |
195 | 195 | else |
196 | bitmap.fill(get_black_pen( | |
196 | bitmap.fill(get_black_pen( | |
197 | 197 | return 0; |
198 | 198 | } |
r17988 | r17989 | |
---|---|---|
180 | 180 | |
181 | 181 | UINT32 boogwing_state::screen_update_boogwing(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
182 | 182 | { |
183 | address_space &space = | |
183 | address_space &space = | |
184 | 184 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
185 | 185 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
186 | 186 | |
187 | 187 | /* Draw sprite planes to bitmaps for later mixing */ |
188 | screen.machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
189 | screen.machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
188 | machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true); | |
189 | machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true); | |
190 | 190 | |
191 | 191 | flip_screen_set(BIT(flip, 7)); |
192 | 192 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
193 | 193 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
194 | 194 | |
195 | 195 | /* Draw playfields */ |
196 | bitmap.fill(screen.machine().pens[0x400], cliprect); /* pen not confirmed */ | |
197 | screen.machine().priority_bitmap.fill(0); | |
196 | bitmap.fill(machine().pens[0x400], cliprect); /* pen not confirmed */ | |
197 | machine().priority_bitmap.fill(0); | |
198 | 198 | |
199 | 199 | // bit&0x8 is definitely some kind of palette effect |
200 | 200 | // bit&0x4 combines playfields |
r17988 | r17989 | |
225 | 225 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 32); |
226 | 226 | } |
227 | 227 | |
228 | mix_boogwing( | |
228 | mix_boogwing( | |
229 | 229 | |
230 | 230 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
231 | 231 | return 0; |
r17988 | r17989 | |
---|---|---|
455 | 455 | |
456 | 456 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
457 | 457 | |
458 | equites_draw_sprites( | |
458 | equites_draw_sprites( | |
459 | 459 | |
460 | 460 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
461 | 461 | |
r17988 | r17989 | |
466 | 466 | { |
467 | 467 | bitmap.fill(m_bgcolor, cliprect); |
468 | 468 | |
469 | splndrbt_copy_bg( | |
469 | splndrbt_copy_bg( | |
470 | 470 | |
471 | 471 | if (m_fg_char_bank) |
472 | 472 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
473 | 473 | |
474 | splndrbt_draw_sprites( | |
474 | splndrbt_draw_sprites( | |
475 | 475 | |
476 | 476 | if (!m_fg_char_bank) |
477 | 477 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
125 | 125 | { |
126 | 126 | |
127 | 127 | /* TODO: this kludge enforces the char banks. For some reason, they don't work otherwise. */ |
128 | address_space &space = | |
128 | address_space &space = | |
129 | 129 | k052109_w(m_k052109, space, 0x1d80, 0x10); |
130 | 130 | k052109_w(m_k052109, space, 0x1f00, 0x32); |
131 | 131 | |
132 | 132 | k052109_tilemap_update(m_k052109); |
133 | 133 | |
134 | | |
134 | | |
135 | 135 | if (m_priority == 0) |
136 | 136 | { |
137 | 137 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 1, TILEMAP_DRAW_OPAQUE, 2); |
r17988 | r17989 | |
---|---|---|
521 | 521 | int scrollx, scrolly_l, scrolly_r; |
522 | 522 | rectangle clip; |
523 | 523 | |
524 | if (0xc0 != ( | |
524 | if (0xc0 != ( | |
525 | 525 | m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); |
526 | 526 | |
527 | 527 | if (0 == (m_watchdog_flip & 0x04)) |
528 | | |
528 | | |
529 | 529 | else if (m_watchdog_count-- > 0) |
530 | | |
530 | | |
531 | 531 | |
532 | 532 | #ifdef MAME_DEBUG |
533 | 533 | { |
534 | if ( | |
534 | if ( | |
535 | 535 | m_showmsg ^= 1; |
536 | 536 | if (m_showmsg) |
537 | 537 | popmessage("mode:$%02x cm:$%02x ccb:$%02x h:$%02x vl:$%02x vr:$%02x ph:$%02x pv:$%02x ch:$%02x cv:$%02x", |
r17988 | r17989 | |
587 | 587 | |
588 | 588 | if (m_mode_set & 0x20) |
589 | 589 | { |
590 | draw_object(screen.machine(), bitmap, cliprect); | |
591 | draw_center(screen.machine(), bitmap, cliprect); | |
590 | draw_object(machine(), bitmap, cliprect); | |
591 | draw_center(machine(), bitmap, cliprect); | |
592 | 592 | } |
593 | 593 | else |
594 | 594 | { |
595 | draw_object(screen.machine(), bitmap, cliprect); | |
596 | draw_center(screen.machine(), bitmap, cliprect); | |
595 | draw_object(machine(), bitmap, cliprect); | |
596 | draw_center(machine(), bitmap, cliprect); | |
597 | 597 | if (m_mode_set & 0x08) /* bkg_ena on ? */ |
598 | 598 | { |
599 | 599 | clip = m_bg_tilemap_l_clip; |
r17988 | r17989 | |
606 | 606 | } |
607 | 607 | } |
608 | 608 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
609 | draw_sprites(screen.machine(), bitmap, cliprect, (m_color_center_bot >> 1) & 1, 0, 0, m_fgvideoram, 0x20); | |
610 | draw_missiles(screen.machine(), bitmap, cliprect, 1, 0, m_colorram, 0x20); | |
609 | draw_sprites(machine(), bitmap, cliprect, (m_color_center_bot >> 1) & 1, 0, 0, m_fgvideoram, 0x20); | |
610 | draw_missiles(machine(), bitmap, cliprect, 1, 0, m_colorram, 0x20); | |
611 | 611 | return 0; |
612 | 612 | } |
r17988 | r17989 | |
---|---|---|
336 | 336 | |
337 | 337 | m_sprite_colorbase = K055555_get_palette_index(4)<<5; |
338 | 338 | |
339 | konamigx_mixer( | |
339 | konamigx_mixer( | |
340 | 340 | return 0; |
341 | 341 | } |
342 | 342 | |
r17988 | r17989 | |
353 | 353 | |
354 | 354 | m_sprite_colorbase = K055555_get_palette_index(4)<<4; |
355 | 355 | |
356 | konamigx_mixer( | |
356 | konamigx_mixer( | |
357 | 357 | return 0; |
358 | 358 | } |
359 | 359 | |
r17988 | r17989 | |
376 | 376 | // not quite right |
377 | 377 | blendmode = (m_oinprion==0xef && K054338_read_register(K338_REG_PBLEND)) ? ((1<<16|GXMIX_BLEND_FORCE)<<2) : 0; |
378 | 378 | |
379 | konamigx_mixer( | |
379 | konamigx_mixer( | |
380 | 380 | return 0; |
381 | 381 | } |
382 | 382 | |
r17988 | r17989 | |
537 | 537 | popmessage("K053936: PSAC colorbase changed"); |
538 | 538 | } |
539 | 539 | |
540 | konamigx_mixer( | |
540 | konamigx_mixer( | |
541 | 541 | return 0; |
542 | 542 | } |
r17988 | r17989 | |
---|---|---|
363 | 363 | int code = videoram[offs] & 0x3f; |
364 | 364 | int color = ((videoram[offs] & 0xc0) >> 6) | (m_alphamap >> 3); |
365 | 365 | |
366 | drawgfx_transpen(bitmap,cliprect, | |
366 | drawgfx_transpen(bitmap,cliprect, | |
367 | 367 | code, color, |
368 | 368 | 0,0, |
369 | 369 | 8*x,8*y,0); |
r17988 | r17989 | |
---|---|---|
252 | 252 | // draw low priority tiles |
253 | 253 | m_tx_tilemap->draw(bitmap, cliprect, pri, 0); |
254 | 254 | |
255 | draw_sprites( | |
255 | draw_sprites( | |
256 | 256 | |
257 | 257 | // draw the other tiles |
258 | 258 | for (cat = 0; cat < 0xf; cat++) |
r17988 | r17989 | |
260 | 260 | } |
261 | 261 | else |
262 | 262 | { |
263 | draw_sprites( | |
263 | draw_sprites( | |
264 | 264 | m_tx_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_ALL_CATEGORIES, 0); |
265 | 265 | } |
266 | 266 |
r17988 | r17989 | |
---|---|---|
146 | 146 | |
147 | 147 | UINT32 gomoku_state::screen_update_gomoku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
148 | 148 | { |
149 | UINT8 *GOMOKU_BG_X = screen.machine().root_device().memregion( "user1" )->base(); | |
150 | UINT8 *GOMOKU_BG_Y = screen.machine().root_device().memregion( "user2" )->base(); | |
149 | UINT8 *GOMOKU_BG_X = machine().root_device().memregion( "user1" )->base(); | |
150 | UINT8 *GOMOKU_BG_Y = machine().root_device().memregion( "user2" )->base(); | |
151 | 151 | UINT8 *GOMOKU_BG_D = memregion( "user3" )->base(); |
152 | 152 | int x, y; |
153 | 153 | int bgram; |
r17988 | r17989 | |
---|---|---|
145 | 145 | |
146 | 146 | UINT32 djmain_state::screen_update_djmain(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
147 | 147 | { |
148 | device_t *k056832 = screen.machine().device("k056832"); | |
149 | device_t *k055555 = screen.machine().device("k055555"); | |
148 | device_t *k056832 = machine().device("k056832"); | |
149 | device_t *k055555 = machine().device("k055555"); | |
150 | 150 | int enables = k055555_read_register(k055555, K55_INPUT_ENABLES); |
151 | 151 | int pri[NUM_LAYERS + 1]; |
152 | 152 | int order[NUM_LAYERS + 1]; |
r17988 | r17989 | |
169 | 169 | order[j] = temp; |
170 | 170 | } |
171 | 171 | |
172 | bitmap.fill( | |
172 | bitmap.fill( | |
173 | 173 | |
174 | 174 | for (i = 0; i < NUM_LAYERS + 1; i++) |
175 | 175 | { |
r17988 | r17989 | |
178 | 178 | if (layer == NUM_LAYERS) |
179 | 179 | { |
180 | 180 | if (enables & K55_INP_SUB2) |
181 | draw_sprites( | |
181 | draw_sprites( | |
182 | 182 | } |
183 | 183 | else |
184 | 184 | { |
r17988 | r17989 | |
---|---|---|
349 | 349 | |
350 | 350 | UINT32 firetrk_state::screen_update_firetrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
351 | 351 | { |
352 | | |
352 | | |
353 | 353 | m_tilemap1->set_scrollx(0, *m_scroll_x - 37); |
354 | 354 | m_tilemap2->set_scrollx(0, *m_scroll_x - 37); |
355 | 355 | m_tilemap1->set_scrolly(0, *m_scroll_y); |
r17988 | r17989 | |
357 | 357 | |
358 | 358 | bitmap.fill(0, cliprect); |
359 | 359 | m_tilemap1->draw(bitmap, playfield_window, 0, 0); |
360 | firetrk_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 0, m_flash); | |
361 | firetrk_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 1, m_flash); | |
362 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10); | |
363 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10); | |
360 | firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, m_flash); | |
361 | firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, m_flash); | |
362 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10); | |
363 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10); | |
364 | 364 | |
365 | 365 | if (cliprect.max_y == screen.visible_area().max_y) |
366 | 366 | { |
367 | 367 | m_tilemap2->draw(m_helper1, playfield_window, 0, 0); |
368 | 368 | |
369 | 369 | m_helper2.fill(0xff, playfield_window); |
370 | firetrk_draw_car( | |
370 | firetrk_draw_car( | |
371 | 371 | check_collision(this, 0); |
372 | 372 | |
373 | 373 | m_helper2.fill(0xff, playfield_window); |
374 | firetrk_draw_car( | |
374 | firetrk_draw_car( | |
375 | 375 | check_collision(this, 1); |
376 | 376 | |
377 | 377 | *m_blink = FALSE; |
r17988 | r17989 | |
383 | 383 | |
384 | 384 | UINT32 firetrk_state::screen_update_superbug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
385 | 385 | { |
386 | | |
386 | | |
387 | 387 | m_tilemap1->set_scrollx(0, *m_scroll_x - 37); |
388 | 388 | m_tilemap2->set_scrollx(0, *m_scroll_x - 37); |
389 | 389 | m_tilemap1->set_scrolly(0, *m_scroll_y); |
r17988 | r17989 | |
391 | 391 | |
392 | 392 | bitmap.fill(0, cliprect); |
393 | 393 | m_tilemap1->draw(bitmap, playfield_window, 0, 0); |
394 | superbug_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, m_flash); | |
395 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10); | |
396 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10); | |
394 | superbug_draw_car(machine(), bitmap, playfield_window, machine().gfx, m_flash); | |
395 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10); | |
396 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10); | |
397 | 397 | |
398 | 398 | if (cliprect.max_y == screen.visible_area().max_y) |
399 | 399 | { |
400 | 400 | m_tilemap2->draw(m_helper1, playfield_window, 0, 0); |
401 | 401 | |
402 | 402 | m_helper2.fill(0xff, playfield_window); |
403 | superbug_draw_car( | |
403 | superbug_draw_car( | |
404 | 404 | check_collision(this, 0); |
405 | 405 | |
406 | 406 | *m_blink = FALSE; |
r17988 | r17989 | |
412 | 412 | |
413 | 413 | UINT32 firetrk_state::screen_update_montecar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
414 | 414 | { |
415 | | |
415 | | |
416 | 416 | m_tilemap1->set_scrollx(0, *m_scroll_x - 37); |
417 | 417 | m_tilemap2->set_scrollx(0, *m_scroll_x - 37); |
418 | 418 | m_tilemap1->set_scrolly(0, *m_scroll_y); |
r17988 | r17989 | |
420 | 420 | |
421 | 421 | bitmap.fill(0x2c, cliprect); |
422 | 422 | m_tilemap1->draw(bitmap, playfield_window, 0, 0); |
423 | montecar_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 0, FALSE); | |
424 | montecar_draw_car(screen.machine(), bitmap, playfield_window, screen.machine().gfx, 1, FALSE); | |
425 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x00, 24, 0x20, 0x08); | |
426 | draw_text(bitmap, cliprect, screen.machine().gfx, m_alpha_num_ram + 0x20, 16, 0x20, 0x08); | |
423 | montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, FALSE); | |
424 | montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, FALSE); | |
425 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 24, 0x20, 0x08); | |
426 | draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x20, 16, 0x20, 0x08); | |
427 | 427 | |
428 | 428 | if (cliprect.max_y == screen.visible_area().max_y) |
429 | 429 | { |
430 | 430 | m_tilemap2->draw(m_helper1, playfield_window, 0, 0); |
431 | 431 | |
432 | 432 | m_helper2.fill(0xff, playfield_window); |
433 | montecar_draw_car( | |
433 | montecar_draw_car( | |
434 | 434 | check_collision(this, 0); |
435 | 435 | |
436 | 436 | m_helper2.fill(0xff, playfield_window); |
437 | montecar_draw_car( | |
437 | montecar_draw_car( | |
438 | 438 | check_collision(this, 1); |
439 | 439 | } |
440 | 440 |
r17988 | r17989 | |
---|---|---|
266 | 266 | |
267 | 267 | UINT32 m57_state::screen_update_m57(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
268 | 268 | { |
269 | draw_background(screen.machine(), bitmap, cliprect); | |
270 | draw_sprites(screen.machine(), bitmap, cliprect); | |
269 | draw_background(machine(), bitmap, cliprect); | |
270 | draw_sprites(machine(), bitmap, cliprect); | |
271 | 271 | return 0; |
272 | 272 | } |
r17988 | r17989 | |
---|---|---|
27 | 27 | { |
28 | 28 | |
29 | 29 | if(vmixer->get_reg(13) & 1) { |
30 | bitmap.fill(get_black_pen( | |
30 | bitmap.fill(get_black_pen( | |
31 | 31 | return 0; |
32 | 32 | } |
33 | 33 | |
34 | | |
34 | | |
35 | 35 | bitmap.fill(0, cliprect); |
36 | 36 | |
37 | 37 | std::vector<int> order; |
r17988 | r17989 | |
---|---|---|
142 | 142 | UINT32 mustache_state::screen_update_mustache(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
143 | 143 | { |
144 | 144 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
145 | draw_sprites( | |
145 | draw_sprites( | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
923 | 923 | /* fill with background color first */ |
924 | 924 | bitmap.fill(m_pens[0x0fff], cliprect); |
925 | 925 | |
926 | draw_sprites( | |
926 | draw_sprites( | |
927 | 927 | |
928 | draw_fixed_layer( | |
928 | draw_fixed_layer( | |
929 | 929 | |
930 | 930 | return 0; |
931 | 931 | } |
r17988 | r17989 | |
---|---|---|
192 | 192 | { |
193 | 193 | |
194 | 194 | m_bgtilemap->draw(bitmap, cliprect, 0, 0); |
195 | draw_sprites( | |
195 | draw_sprites( | |
196 | 196 | m_fgtilemap->draw(bitmap, cliprect, 0, 0); |
197 | 197 | return 0; |
198 | 198 | } |
r17988 | r17989 | |
---|---|---|
2433 | 2433 | |
2434 | 2434 | if (gx_specialrozenable==3) |
2435 | 2435 | { |
2436 | konamigx_mixer( | |
2436 | konamigx_mixer( | |
2437 | 2437 | } |
2438 | 2438 | // hack, draw the roz tilemap if W is held |
2439 | 2439 | // todo: fix so that it works with the mixer without crashing(!) |
r17988 | r17989 | |
2448 | 2448 | else K053936_0_zoom_draw(*type3_roz_temp_bitmap, temprect,gx_psac_tilemap, 0,0,0); // soccerss playfield |
2449 | 2449 | |
2450 | 2450 | |
2451 | konamigx_mixer( | |
2451 | konamigx_mixer( | |
2452 | 2452 | } |
2453 | 2453 | else |
2454 | 2454 | { |
2455 | konamigx_mixer( | |
2455 | konamigx_mixer( | |
2456 | 2456 | } |
2457 | 2457 | |
2458 | 2458 | |
r17988 | r17989 | |
2460 | 2460 | /* Hack! draw type-1 roz layer here for testing purposes only */ |
2461 | 2461 | if (gx_specialrozenable == 1) |
2462 | 2462 | { |
2463 | const pen_t *paldata = | |
2463 | const pen_t *paldata = | |
2464 | 2464 | |
2465 | if ( | |
2465 | if ( | |
2466 | 2466 | { |
2467 | 2467 | int y,x; |
2468 | 2468 | |
r17988 | r17989 | |
2510 | 2510 | { |
2511 | 2511 | UINT32 coldat = m_generic_paletteram_32[offset]; |
2512 | 2512 | |
2513 | set_color_555(screen.machine(), offset*2, 0, 5, 10,coldat >> 16); | |
2514 | set_color_555(screen.machine(), offset*2+1, 0, 5, 10,coldat & 0xffff); | |
2513 | set_color_555(machine(), offset*2, 0, 5, 10,coldat >> 16); | |
2514 | set_color_555(machine(), offset*2+1, 0, 5, 10,coldat & 0xffff); | |
2515 | 2515 | } |
2516 | 2516 | } |
2517 | 2517 | else |
r17988 | r17989 | |
2524 | 2524 | g = (m_generic_paletteram_32[offset] >> 8) & 0xff; |
2525 | 2525 | b = (m_generic_paletteram_32[offset] >> 0) & 0xff; |
2526 | 2526 | |
2527 | palette_set_color( | |
2527 | palette_set_color( | |
2528 | 2528 | } |
2529 | 2529 | } |
2530 | 2530 | |
r17988 | r17989 | |
2557 | 2557 | { |
2558 | 2558 | UINT32 coldat = m_subpaletteram32[offset]; |
2559 | 2559 | |
2560 | set_color_555(screen.machine(), offset*2, 0, 5, 10,coldat >> 16); | |
2561 | set_color_555(screen.machine(), offset*2+1, 0, 5, 10,coldat & 0xffff); | |
2560 | set_color_555(machine(), offset*2, 0, 5, 10,coldat >> 16); | |
2561 | set_color_555(machine(), offset*2+1, 0, 5, 10,coldat & 0xffff); | |
2562 | 2562 | } |
2563 | 2563 | } |
2564 | 2564 | else |
r17988 | r17989 | |
2571 | 2571 | g = (m_subpaletteram32[offset] >> 8) & 0xff; |
2572 | 2572 | b = (m_subpaletteram32[offset] >> 0) & 0xff; |
2573 | 2573 | |
2574 | palette_set_color( | |
2574 | palette_set_color( | |
2575 | 2575 | } |
2576 | 2576 | } |
2577 | 2577 |
r17988 | r17989 | |
---|---|---|
162 | 162 | { |
163 | 163 | int i; |
164 | 164 | |
165 | vectrex_configuration( | |
165 | vectrex_configuration( | |
166 | 166 | |
167 | 167 | /* start black */ |
168 | vector_add_point( | |
168 | vector_add_point( | |
169 | 169 | m_points[m_display_start].x, |
170 | 170 | m_points[m_display_start].y, |
171 | 171 | m_points[m_display_start].col, |
r17988 | r17989 | |
173 | 173 | |
174 | 174 | for (i = m_display_start; i != m_display_end; i = (i + 1) % NVECT) |
175 | 175 | { |
176 | vector_add_point( | |
176 | vector_add_point( | |
177 | 177 | m_points[i].x, |
178 | 178 | m_points[i].y, |
179 | 179 | m_points[i].col, |
r17988 | r17989 | |
---|---|---|
120 | 120 | |
121 | 121 | UINT32 thunderj_state::screen_update_thunderj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
122 | 122 | { |
123 | bitmap_ind8 &priority_bitmap = | |
123 | bitmap_ind8 &priority_bitmap = | |
124 | 124 | atarimo_rect_list rectlist; |
125 | 125 | bitmap_ind16 *mobitmap; |
126 | 126 | int x, y, r; |
r17988 | r17989 | |
---|---|---|
66 | 66 | |
67 | 67 | konami_sortlayers3(layer, m_layerpri); |
68 | 68 | |
69 | | |
69 | | |
70 | 70 | bitmap.fill(16 * bg_colorbase, cliprect); |
71 | 71 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[0], 0,1); |
72 | 72 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[1], 0,2); |
r17988 | r17989 | |
---|---|---|
297 | 297 | } |
298 | 298 | |
299 | 299 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
300 | draw_sprites( | |
300 | draw_sprites( | |
301 | 301 | return 0; |
302 | 302 | } |
303 | 303 | |
r17988 | r17989 | |
305 | 305 | { |
306 | 306 | // falling edge |
307 | 307 | if (!state) |
308 | redclash_update_stars_state( | |
308 | redclash_update_stars_state( | |
309 | 309 | } |
310 | 310 | |
311 | 311 | UINT32 ladybug_state::screen_update_sraider(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
r17988 | r17989 | |
333 | 333 | |
334 | 334 | // draw the stars |
335 | 335 | if (flip_screen()) |
336 | redclash_draw_stars( | |
336 | redclash_draw_stars( | |
337 | 337 | else |
338 | redclash_draw_stars( | |
338 | redclash_draw_stars( | |
339 | 339 | |
340 | 340 | // draw the gridlines |
341 | colortable_palette_set_color( | |
341 | colortable_palette_set_color( | |
342 | 342 | m_grid_color & 0x20 ? 0xff : 0, |
343 | 343 | m_grid_color & 0x10 ? 0xff : 0)); |
344 | 344 | m_grid_tilemap->draw(bitmap, cliprect, 0, flip_screen()); |
r17988 | r17989 | |
361 | 361 | m_bg_tilemap->draw(bitmap, cliprect, 0, flip_screen()); |
362 | 362 | |
363 | 363 | // now the sprites |
364 | draw_sprites( | |
364 | draw_sprites( | |
365 | 365 | |
366 | 366 | return 0; |
367 | 367 | } |
r17988 | r17989 | |
---|---|---|
130 | 130 | for (i = 0; i < 32; i++) |
131 | 131 | m_bg_tilemap->set_scrolly(i, m_scrollram[30 - i]); |
132 | 132 | |
133 | bitmap.fill(get_black_pen( | |
133 | bitmap.fill(get_black_pen( | |
134 | 134 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
135 | draw_sprites( | |
135 | draw_sprites( | |
136 | 136 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
137 | 137 | return 0; |
138 | 138 | } |
r17988 | r17989 | |
---|---|---|
397 | 397 | { |
398 | 398 | int i; |
399 | 399 | |
400 | set_pens( | |
400 | set_pens( | |
401 | 401 | |
402 | address_space &space = | |
402 | address_space &space = | |
403 | 403 | if (k007121_ctrlram_r(m_k007121_1, space, 1) & 0x02) |
404 | 404 | { |
405 | 405 | m_bg_tilemap[0]->set_scroll_rows(32); |
r17988 | r17989 | |
427 | 427 | m_bg_tilemap[0]->set_scrolly(0, k007121_ctrlram_r(m_k007121_1, space, 2)); |
428 | 428 | m_bg_tilemap[1]->set_scrolly(0, k007121_ctrlram_r(m_k007121_2, space, 2)); |
429 | 429 | |
430 | | |
430 | | |
431 | 431 | |
432 | 432 | if (m_priority == 0) |
433 | 433 | { |
r17988 | r17989 | |
437 | 437 | m_bg_tilemap[0]->draw(bitmap, cliprect, 1, 2); |
438 | 438 | |
439 | 439 | /* we use the priority buffer so sprites are drawn front to back */ |
440 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram[1], 1, 0x0f00); | |
441 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram[0], 0, 0x4444); | |
440 | draw_sprites(machine(), bitmap, cliprect, m_spriteram[1], 1, 0x0f00); | |
441 | draw_sprites(machine(), bitmap, cliprect, m_spriteram[0], 0, 0x4444); | |
442 | 442 | } |
443 | 443 | else |
444 | 444 | { |
r17988 | r17989 | |
448 | 448 | m_bg_tilemap[1]->draw(bitmap, cliprect, 0, 8); |
449 | 449 | |
450 | 450 | /* we use the priority buffer so sprites are drawn front to back */ |
451 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram[1], 1, 0x0f00); | |
452 | draw_sprites(screen.machine(), bitmap, cliprect, m_spriteram[0], 0, 0x4444); | |
451 | draw_sprites(machine(), bitmap, cliprect, m_spriteram[1], 1, 0x0f00); | |
452 | draw_sprites(machine(), bitmap, cliprect, m_spriteram[0], 0, 0x4444); | |
453 | 453 | } |
454 | 454 | |
455 | 455 | if (k007121_ctrlram_r(m_k007121_1, space, 1) & 0x08) |
r17988 | r17989 | |
555 | 555 | { |
556 | 556 | int i; |
557 | 557 | |
558 | set_pens( | |
558 | set_pens( | |
559 | 559 | |
560 | 560 | for (i = 0; i < 32; i++) |
561 | 561 | { |
r17988 | r17989 | |
568 | 568 | if (m_priority == 0) |
569 | 569 | { |
570 | 570 | m_bg_tilemap[1]->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
571 | bootleg_draw_sprites( | |
571 | bootleg_draw_sprites( | |
572 | 572 | m_bg_tilemap[0]->draw(bitmap, cliprect, 0 ,0); |
573 | bootleg_draw_sprites( | |
573 | bootleg_draw_sprites( | |
574 | 574 | } |
575 | 575 | else |
576 | 576 | { |
577 | 577 | m_bg_tilemap[0]->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
578 | bootleg_draw_sprites( | |
578 | bootleg_draw_sprites( | |
579 | 579 | m_bg_tilemap[1]->draw(bitmap, cliprect, 0, 0); |
580 | bootleg_draw_sprites( | |
580 | bootleg_draw_sprites( | |
581 | 581 | } |
582 | 582 | |
583 | 583 | m_textlayer->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
99 | 99 | UINT32 rockrage_state::screen_update_rockrage(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
100 | 100 | { |
101 | 101 | |
102 | set_pens( | |
102 | set_pens( | |
103 | 103 | |
104 | 104 | k007342_tilemap_update(m_k007342); |
105 | 105 | |
106 | 106 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); |
107 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
107 | k007420_sprites_draw(m_k007420, bitmap, cliprect, | |
108 | 108 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 0, 1 | TILEMAP_DRAW_OPAQUE, 0); |
109 | 109 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 1, 0, 0); |
110 | 110 | k007342_tilemap_draw(m_k007342, bitmap, cliprect, 1, 1, 0); |
r17988 | r17989 | |
---|---|---|
238 | 238 | bitmap.fill(0, cliprect); |
239 | 239 | |
240 | 240 | if (m_bg_on) |
241 | draw_bg( | |
241 | draw_bg( | |
242 | 242 | |
243 | draw_sprites( | |
243 | draw_sprites( | |
244 | 244 | |
245 | draw_fg( | |
245 | draw_fg( | |
246 | 246 | |
247 | 247 | return 0; |
248 | 248 | } |
r17988 | r17989 | |
---|---|---|
103 | 103 | { |
104 | 104 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
105 | 105 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
106 | | |
106 | | |
107 | 107 | return 0; |
108 | 108 | } |
r17988 | r17989 | |
---|---|---|
352 | 352 | |
353 | 353 | UINT32 starshp1_state::screen_update_starshp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
354 | 354 | { |
355 | set_pens(this, | |
355 | set_pens(this, | |
356 | 356 | |
357 | 357 | bitmap.fill(0, cliprect); |
358 | 358 | |
359 | 359 | if (m_starfield_kill == 0) |
360 | 360 | draw_starfield(this, bitmap); |
361 | 361 | |
362 | draw_sprites( | |
362 | draw_sprites( | |
363 | 363 | |
364 | 364 | if (m_circle_kill == 0 && m_circle_mod != 0) |
365 | draw_circle( | |
365 | draw_circle( | |
366 | 366 | |
367 | 367 | if (m_attract == 0) |
368 | draw_spaceship( | |
368 | draw_spaceship( | |
369 | 369 | |
370 | 370 | if (m_circle_kill == 0 && m_circle_mod == 0) |
371 | draw_circle( | |
371 | draw_circle( | |
372 | 372 | |
373 | 373 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
374 | 374 | |
r17988 | r17989 | |
385 | 385 | if (state) |
386 | 386 | { |
387 | 387 | rectangle rect; |
388 | const rectangle &visarea = | |
388 | const rectangle &visarea = | |
389 | 389 | |
390 | 390 | rect.min_x = get_sprite_hpos(this, 13); |
391 | 391 | rect.min_y = get_sprite_vpos(this, 13); |
392 | rect.max_x = rect.min_x + screen.machine().gfx[1]->width() - 1; | |
393 | rect.max_y = rect.min_y + screen.machine().gfx[1]->height() - 1; | |
392 | rect.max_x = rect.min_x + machine().gfx[1]->width() - 1; | |
393 | rect.max_y = rect.min_y + machine().gfx[1]->height() - 1; | |
394 | 394 | |
395 | 395 | rect &= m_helper.cliprect(); |
396 | 396 | |
397 | 397 | m_helper.fill(0, visarea); |
398 | 398 | |
399 | 399 | if (m_attract == 0) |
400 | draw_spaceship( | |
400 | draw_spaceship( | |
401 | 401 | |
402 | 402 | if (circle_collision(this, visarea)) |
403 | 403 | m_collision_latch |= 1; |
r17988 | r17989 | |
405 | 405 | if (circle_collision(this, rect)) |
406 | 406 | m_collision_latch |= 2; |
407 | 407 | |
408 | if (spaceship_collision( | |
408 | if (spaceship_collision( | |
409 | 409 | m_collision_latch |= 4; |
410 | 410 | |
411 | if (spaceship_collision( | |
411 | if (spaceship_collision( | |
412 | 412 | m_collision_latch |= 8; |
413 | 413 | } |
414 | 414 | } |
r17988 | r17989 | |
---|---|---|
175 | 175 | UINT32 pandoras_state::screen_update_pandoras(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
176 | 176 | { |
177 | 177 | m_layer0->draw(bitmap, cliprect, 1 ,0); |
178 | draw_sprites( | |
178 | draw_sprites( | |
179 | 179 | m_layer0->draw(bitmap, cliprect, 0 ,0); |
180 | 180 | return 0; |
181 | 181 | } |
r17988 | r17989 | |
---|---|---|
124 | 124 | UINT32 bigstrkb_state::screen_update_bigstrkb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
125 | 125 | { |
126 | 126 | |
127 | // bitmap.fill(get_black_pen( | |
127 | // bitmap.fill(get_black_pen( | |
128 | 128 | |
129 | 129 | m_tilemap2->set_scrollx(0, m_vidreg1[0]+(256-14)); |
130 | 130 | m_tilemap2->set_scrolly(0, m_vidreg2[0]); |
r17988 | r17989 | |
135 | 135 | m_tilemap2->draw(bitmap, cliprect, 0,0); |
136 | 136 | m_tilemap3->draw(bitmap, cliprect, 0,0); |
137 | 137 | |
138 | draw_sprites( | |
138 | draw_sprites( | |
139 | 139 | m_tilemap->draw(bitmap, cliprect, 0,0); |
140 | 140 | |
141 | 141 | // popmessage ("Regs %08x %08x %08x %08x",bsb_vidreg2[0],bsb_vidreg2[1],bsb_vidreg2[2],bsb_vidreg2[3]); |
r17988 | r17989 | |
---|---|---|
3849 | 3849 | |
3850 | 3850 | UINT32 n64_state::screen_update_n64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
3851 | 3851 | { |
3852 | n64_periphs *n64 = | |
3852 | n64_periphs *n64 = | |
3853 | 3853 | m_rdp->visarea = screen.visible_area(); |
3854 | 3854 | |
3855 | 3855 | //UINT16 *frame_buffer = (UINT16*)&rdram[(n64->vi_origin & 0xffffff) >> 2]; |
r17988 | r17989 | |
---|---|---|
888 | 888 | if (state) |
889 | 889 | { |
890 | 890 | |
891 | taitof2_update_sprites_active_area( | |
891 | taitof2_update_sprites_active_area( | |
892 | 892 | |
893 | 893 | m_prepare_sprites = 1; |
894 | 894 | } |
r17988 | r17989 | |
902 | 902 | UINT16 *spriteram = m_spriteram; |
903 | 903 | int i; |
904 | 904 | |
905 | taitof2_update_sprites_active_area( | |
905 | taitof2_update_sprites_active_area( | |
906 | 906 | |
907 | 907 | m_prepare_sprites = 0; |
908 | 908 | memcpy(m_spriteram_buffered, m_spriteram_delayed, m_spriteram.bytes()); |
r17988 | r17989 | |
920 | 920 | UINT16 *spriteram = m_spriteram; |
921 | 921 | int i; |
922 | 922 | |
923 | taitof2_update_sprites_active_area( | |
923 | taitof2_update_sprites_active_area( | |
924 | 924 | |
925 | 925 | m_prepare_sprites = 0; |
926 | 926 | memcpy(m_spriteram_buffered, m_spriteram_delayed, m_spriteram.bytes()); |
r17988 | r17989 | |
938 | 938 | UINT16 *spriteram = m_spriteram; |
939 | 939 | int i; |
940 | 940 | |
941 | taitof2_update_sprites_active_area( | |
941 | taitof2_update_sprites_active_area( | |
942 | 942 | |
943 | 943 | m_prepare_sprites = 0; |
944 | 944 | memcpy(m_spriteram_buffered, m_spriteram_delayed, m_spriteram.bytes()); |
r17988 | r17989 | |
963 | 963 | UINT16 *spriteram = m_spriteram; |
964 | 964 | int i; |
965 | 965 | |
966 | taitof2_update_sprites_active_area( | |
966 | taitof2_update_sprites_active_area( | |
967 | 967 | |
968 | 968 | m_prepare_sprites = 0; |
969 | 969 | memcpy(m_spriteram_buffered, m_spriteram_delayed, m_spriteram.bytes()); |
r17988 | r17989 | |
984 | 984 | /* SSI */ |
985 | 985 | UINT32 taitof2_state::screen_update_taitof2_ssi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
986 | 986 | { |
987 | taitof2_handle_sprite_buffering( | |
987 | taitof2_handle_sprite_buffering( | |
988 | 988 | |
989 | 989 | /* SSI only uses sprites, the tilemap registers are not even initialized. |
990 | 990 | (they are in Majestic 12, but the tilemaps are not used anyway) */ |
991 | | |
991 | | |
992 | 992 | bitmap.fill(0, cliprect); |
993 | draw_sprites( | |
993 | draw_sprites( | |
994 | 994 | return 0; |
995 | 995 | } |
996 | 996 | |
r17988 | r17989 | |
998 | 998 | UINT32 taitof2_state::screen_update_taitof2_yesnoj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
999 | 999 | { |
1000 | 1000 | |
1001 | taitof2_handle_sprite_buffering( | |
1001 | taitof2_handle_sprite_buffering( | |
1002 | 1002 | |
1003 | 1003 | tc0100scn_tilemap_update(m_tc0100scn); |
1004 | 1004 | |
1005 | | |
1005 | | |
1006 | 1006 | bitmap.fill(0, cliprect); /* wrong color? */ |
1007 | draw_sprites( | |
1007 | draw_sprites( | |
1008 | 1008 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn), 0, 0); |
1009 | 1009 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn) ^ 1, 0, 0); |
1010 | 1010 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, 2, 0, 0); |
r17988 | r17989 | |
1015 | 1015 | UINT32 taitof2_state::screen_update_taitof2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1016 | 1016 | { |
1017 | 1017 | |
1018 | taitof2_handle_sprite_buffering( | |
1018 | taitof2_handle_sprite_buffering( | |
1019 | 1019 | |
1020 | 1020 | tc0100scn_tilemap_update(m_tc0100scn); |
1021 | 1021 | |
1022 | | |
1022 | | |
1023 | 1023 | bitmap.fill(0, cliprect); /* wrong color? */ |
1024 | 1024 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn), 0, 0); |
1025 | 1025 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(m_tc0100scn) ^ 1, 0, 0); |
1026 | draw_sprites( | |
1026 | draw_sprites( | |
1027 | 1027 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, 2, 0, 0); |
1028 | 1028 | return 0; |
1029 | 1029 | } |
r17988 | r17989 | |
1031 | 1031 | |
1032 | 1032 | UINT32 taitof2_state::screen_update_taitof2_pri(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1033 | 1033 | { |
1034 | address_space &space = | |
1034 | address_space &space = | |
1035 | 1035 | int layer[3]; |
1036 | 1036 | |
1037 | taitof2_handle_sprite_buffering( | |
1037 | taitof2_handle_sprite_buffering( | |
1038 | 1038 | |
1039 | 1039 | tc0100scn_tilemap_update(m_tc0100scn); |
1040 | 1040 | |
r17988 | r17989 | |
1052 | 1052 | |
1053 | 1053 | m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0; |
1054 | 1054 | |
1055 | | |
1055 | | |
1056 | 1056 | bitmap.fill(0, cliprect); /* wrong color? */ |
1057 | 1057 | |
1058 | 1058 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[0], 0, 1); |
1059 | 1059 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[1], 0, 2); |
1060 | 1060 | tc0100scn_tilemap_draw(m_tc0100scn, bitmap, cliprect, layer[2], 0, 4); |
1061 | 1061 | |
1062 | draw_sprites( | |
1062 | draw_sprites( | |
1063 | 1063 | return 0; |
1064 | 1064 | } |
1065 | 1065 | |
r17988 | r17989 | |
1078 | 1078 | |
1079 | 1079 | UINT32 taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1080 | 1080 | { |
1081 | address_space &space = | |
1081 | address_space &space = | |
1082 | 1082 | int tilepri[3]; |
1083 | 1083 | int rozpri; |
1084 | 1084 | int layer[3]; |
r17988 | r17989 | |
1086 | 1086 | int i,j; |
1087 | 1087 | int roz_base_color = (tc0360pri_r(m_tc0360pri, space, 1) & 0x3f) << 2; |
1088 | 1088 | |
1089 | taitof2_handle_sprite_buffering( | |
1089 | taitof2_handle_sprite_buffering( | |
1090 | 1090 | |
1091 | 1091 | if (m_tc0280grd != NULL) |
1092 | 1092 | tc0280grd_tilemap_update(m_tc0280grd, roz_base_color); |
r17988 | r17989 | |
1114 | 1114 | |
1115 | 1115 | m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0; |
1116 | 1116 | |
1117 | | |
1117 | | |
1118 | 1118 | bitmap.fill(0, cliprect); /* wrong color? */ |
1119 | 1119 | |
1120 | 1120 | drawn = 0; |
r17988 | r17989 | |
1122 | 1122 | { |
1123 | 1123 | if (rozpri == i) |
1124 | 1124 | { |
1125 | draw_roz_layer( | |
1125 | draw_roz_layer( | |
1126 | 1126 | m_tilepri[drawn] = i; |
1127 | 1127 | drawn++; |
1128 | 1128 | } |
r17988 | r17989 | |
1138 | 1138 | } |
1139 | 1139 | } |
1140 | 1140 | |
1141 | draw_sprites( | |
1141 | draw_sprites( | |
1142 | 1142 | return 0; |
1143 | 1143 | } |
1144 | 1144 | |
r17988 | r17989 | |
1147 | 1147 | /* Thunderfox */ |
1148 | 1148 | UINT32 taitof2_state::screen_update_taitof2_thundfox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1149 | 1149 | { |
1150 | address_space &space = | |
1150 | address_space &space = | |
1151 | 1151 | int tilepri[2][3]; |
1152 | 1152 | int spritepri[4]; |
1153 | 1153 | int layer[2][3]; |
1154 | 1154 | int drawn[2]; |
1155 | 1155 | |
1156 | taitof2_handle_sprite_buffering( | |
1156 | taitof2_handle_sprite_buffering( | |
1157 | 1157 | |
1158 | 1158 | tc0100scn_tilemap_update(m_tc0100scn_1); |
1159 | 1159 | tc0100scn_tilemap_update(m_tc0100scn_2); |
r17988 | r17989 | |
1177 | 1177 | spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f; |
1178 | 1178 | spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4; |
1179 | 1179 | |
1180 | | |
1180 | | |
1181 | 1181 | bitmap.fill(0, cliprect); /* wrong color? */ |
1182 | 1182 | |
1183 | 1183 | /* |
r17988 | r17989 | |
1229 | 1229 | if (spritepri[i] < tilepri[1][1]) primasks[i] |= 0xff00; |
1230 | 1230 | } |
1231 | 1231 | |
1232 | draw_sprites( | |
1232 | draw_sprites( | |
1233 | 1233 | } |
1234 | 1234 | |
1235 | 1235 | |
r17988 | r17989 | |
1284 | 1284 | |
1285 | 1285 | UINT32 taitof2_state::screen_update_taitof2_metalb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1286 | 1286 | { |
1287 | address_space &space = | |
1287 | address_space &space = | |
1288 | 1288 | UINT8 layer[5], invlayer[4]; |
1289 | 1289 | UINT16 priority; |
1290 | 1290 | |
1291 | taitof2_handle_sprite_buffering( | |
1291 | taitof2_handle_sprite_buffering( | |
1292 | 1292 | |
1293 | 1293 | tc0480scp_tilemap_update(m_tc0480scp); |
1294 | 1294 | |
r17988 | r17989 | |
1318 | 1318 | |
1319 | 1319 | m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0; |
1320 | 1320 | |
1321 | | |
1321 | | |
1322 | 1322 | bitmap.fill(0, cliprect); |
1323 | 1323 | |
1324 | 1324 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[0], 0 ,1); |
r17988 | r17989 | |
1327 | 1327 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[3], 0, 8); |
1328 | 1328 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[4], 0, 16); |
1329 | 1329 | |
1330 | draw_sprites( | |
1330 | draw_sprites( | |
1331 | 1331 | return 0; |
1332 | 1332 | } |
1333 | 1333 | |
r17988 | r17989 | |
1335 | 1335 | /* Deadconx, Footchmp */ |
1336 | 1336 | UINT32 taitof2_state::screen_update_taitof2_deadconx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1337 | 1337 | { |
1338 | address_space &space = | |
1338 | address_space &space = | |
1339 | 1339 | UINT8 layer[5]; |
1340 | 1340 | UINT8 tilepri[5]; |
1341 | 1341 | UINT8 spritepri[4]; |
1342 | 1342 | UINT16 priority; |
1343 | 1343 | |
1344 | taitof2_handle_sprite_buffering( | |
1344 | taitof2_handle_sprite_buffering( | |
1345 | 1345 | |
1346 | 1346 | tc0480scp_tilemap_update(m_tc0480scp); |
1347 | 1347 | |
r17988 | r17989 | |
1366 | 1366 | spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f; |
1367 | 1367 | spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4; |
1368 | 1368 | |
1369 | | |
1369 | | |
1370 | 1370 | bitmap.fill(0, cliprect); |
1371 | 1371 | |
1372 | 1372 | tc0480scp_tilemap_draw(m_tc0480scp, bitmap, cliprect, layer[0], 0 ,1); |
r17988 | r17989 | |
1386 | 1386 | if (spritepri[i] < tilepri[(layer[3])]) primasks[i] |= 0xff00; |
1387 | 1387 | } |
1388 | 1388 | |
1389 | draw_sprites( | |
1389 | draw_sprites( | |
1390 | 1390 | } |
1391 | 1391 | |
1392 | 1392 | /* |
r17988 | r17989 | |
---|---|---|
167 | 167 | { |
168 | 168 | |
169 | 169 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
170 | gberet_draw_sprites( | |
170 | gberet_draw_sprites( | |
171 | 171 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
172 | 172 | return 0; |
173 | 173 | } |
r17988 | r17989 | |
220 | 220 | UINT32 gberet_state::screen_update_gberetb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
221 | 221 | { |
222 | 222 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
223 | gberetb_draw_sprites( | |
223 | gberetb_draw_sprites( | |
224 | 224 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
225 | 225 | return 0; |
226 | 226 | } |
r17988 | r17989 | |
---|---|---|
290 | 290 | |
291 | 291 | UINT32 stfight_state::screen_update_stfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
292 | 292 | { |
293 | set_pens( | |
293 | set_pens( | |
294 | 294 | |
295 | | |
295 | | |
296 | 296 | |
297 | 297 | bitmap.fill(0, cliprect); /* in case m_bg_tilemap is disabled */ |
298 | 298 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
300 | 300 | |
301 | 301 | /* Draw sprites (may be obscured by foreground layer) */ |
302 | 302 | if (m_vh_latch_ram[0x07] & 0x40) |
303 | draw_sprites( | |
303 | draw_sprites( | |
304 | 304 | |
305 | 305 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
306 | 306 | return 0; |
r17988 | r17989 | |
---|---|---|
246 | 246 | if (!m_background_priority) |
247 | 247 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
248 | 248 | else |
249 | bitmap.fill( | |
249 | bitmap.fill( | |
250 | 250 | |
251 | 251 | /* draw the sprites */ |
252 | draw_sprites( | |
252 | draw_sprites( | |
253 | 253 | |
254 | 254 | /* if the background has higher priority, render it now */ |
255 | 255 | if (m_background_priority) |
r17988 | r17989 | |
---|---|---|
243 | 243 | m_bg_tilemap->set_scrolly(0, scrolly); |
244 | 244 | |
245 | 245 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
246 | draw_sprites( | |
246 | draw_sprites( | |
247 | 247 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
248 | 248 | return 0; |
249 | 249 | } |
r17988 | r17989 | |
---|---|---|
94 | 94 | |
95 | 95 | konami_sortlayers3(layer, m_layerpri); |
96 | 96 | |
97 | | |
97 | | |
98 | 98 | bitmap.fill(0, cliprect); |
99 | 99 | |
100 | 100 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, layer[0], K056832_DRAW_FLAG_MIRROR, 1); |
r17988 | r17989 | |
---|---|---|
584 | 584 | pen_t pen_base = 32; //change it later |
585 | 585 | |
586 | 586 | UINT32 v; |
587 | UINT8 *text_gfx_base = | |
587 | UINT8 *text_gfx_base = | |
588 | 588 | UINT8 *romBxx = memregion("user1")->base() + 0x2000*m_background_romsel; |
589 | 589 | |
590 | 590 | /* logerror(" update: from DISP=%i y_min=%3i y_max=%3i\n", DISP_, cliprect.min_y, cliprect.max_y+1); */ |
r17988 | r17989 | |
738 | 738 | int DISP_ = m_DISP^1; |
739 | 739 | |
740 | 740 | UINT32 v; |
741 | UINT8 *text_gfx_base = | |
741 | UINT8 *text_gfx_base = | |
742 | 742 | UINT8 *rom13D = memregion("user1")->base(); |
743 | 743 | UINT8 *rom11BD = rom13D+0x1000; |
744 | 744 | UINT8 *rom19C = rom13D+0x5000; |
r17988 | r17989 | |
---|---|---|
359 | 359 | UINT32 exidy_state::screen_update_exidy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
360 | 360 | { |
361 | 361 | /* refresh the colors from the palette (static or dynamic) */ |
362 | set_colors( | |
362 | set_colors( | |
363 | 363 | |
364 | 364 | /* update the background and draw it */ |
365 | draw_background( | |
365 | draw_background( | |
366 | 366 | copybitmap(bitmap, m_background_bitmap, 0, 0, 0, 0, cliprect); |
367 | 367 | |
368 | 368 | /* draw the sprites */ |
369 | draw_sprites( | |
369 | draw_sprites( | |
370 | 370 | |
371 | 371 | /* check for collision, this will set the appropriate bits in collision_mask */ |
372 | check_collision( | |
372 | check_collision( | |
373 | 373 | |
374 | 374 | return 0; |
375 | 375 | } |
r17988 | r17989 | |
---|---|---|
808 | 808 | /* blank screen */ |
809 | 809 | if (m_vreg[0x3] == 0xc1 && m_vreg[0x4] == 0xc0 && m_vreg[0x5] == 0xff) |
810 | 810 | { |
811 | bitmap.fill(get_black_pen( | |
811 | bitmap.fill(get_black_pen( | |
812 | 812 | return 0; |
813 | 813 | } |
814 | 814 | |
r17988 | r17989 | |
816 | 816 | if (flags != m_flipscreen) |
817 | 817 | { |
818 | 818 | m_flipscreen = flags; |
819 | | |
819 | | |
820 | 820 | } |
821 | 821 | |
822 | 822 | switch (m_vreg[0x3]) |
r17988 | r17989 | |
866 | 866 | if (flags != m_flipscreen) |
867 | 867 | { |
868 | 868 | m_flipscreen = flags; |
869 | | |
869 | | |
870 | 870 | } |
871 | 871 | |
872 | 872 | |
873 | bitmap.fill(get_black_pen( | |
873 | bitmap.fill(get_black_pen( | |
874 | 874 | |
875 | 875 | pri = (m_bank & 0x70) >> 4; |
876 | 876 | for (i = 0; i < 4; i++) |
r17988 | r17989 | |
912 | 912 | if (flags != m_flipscreen) |
913 | 913 | { |
914 | 914 | m_flipscreen = flags; |
915 | | |
915 | | |
916 | 916 | } |
917 | 917 | |
918 | 918 | |
919 | bitmap.fill(get_black_pen( | |
919 | bitmap.fill(get_black_pen( | |
920 | 920 | |
921 | 921 | pri = (m_blitter_bank & 0x70) >> 4; |
922 | 922 | for (i = 0; i < 4; i++) |
r17988 | r17989 | |
933 | 933 | /* blank screen */ |
934 | 934 | if (m_vreg[0x3] == 0xc1 && m_vreg[0x4] == 0xc0 && m_vreg[0x5] == 0xff) |
935 | 935 | { |
936 | bitmap.fill(get_black_pen( | |
936 | bitmap.fill(get_black_pen( | |
937 | 937 | return 0; |
938 | 938 | } |
939 | 939 | |
r17988 | r17989 | |
941 | 941 | if (flags != m_flipscreen) |
942 | 942 | { |
943 | 943 | m_flipscreen = flags; |
944 | | |
944 | | |
945 | 945 | } |
946 | 946 | |
947 | 947 | /* bit 2 of blitter_bank stretches characters horizontally by 3/2, |
r17988 | r17989 | |
---|---|---|
132 | 132 | |
133 | 133 | UINT32 xxmissio_state::screen_update_xxmissio(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
134 | 134 | { |
135 | screen.machine().tilemap().mark_all_dirty(); | |
136 | screen.machine().tilemap().set_flip_all(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
135 | machine().tilemap().mark_all_dirty(); | |
136 | machine().tilemap().set_flip_all(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); | |
137 | 137 | |
138 | 138 | m_bg_tilemap->set_scrollx(0, m_xscroll * 2); |
139 | 139 | m_bg_tilemap->set_scrolly(0, m_yscroll); |
140 | 140 | |
141 | 141 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
142 | draw_sprites(bitmap, cliprect, | |
142 | draw_sprites(bitmap, cliprect, | |
143 | 143 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | 144 | |
145 | 145 | return 0; |
r17988 | r17989 | |
---|---|---|
150 | 150 | |
151 | 151 | m_tilemap2->draw(bitmap, cliprect, 0, 0); |
152 | 152 | m_tilemap1->draw(bitmap, cliprect, 0, 0); |
153 | draw_sprites( | |
153 | draw_sprites( | |
154 | 154 | return 0; |
155 | 155 | } |
r17988 | r17989 | |
---|---|---|
67 | 67 | |
68 | 68 | UINT32 pcktgal_state::screen_update_pcktgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
69 | 69 | { |
70 | // flip_screen_set(screen.machine().device<deco_bac06_device>("tilegen1")->get_flip_state()); | |
71 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
72 | draw_sprites(screen.machine(), bitmap, cliprect); | |
70 | // flip_screen_set(machine().device<deco_bac06_device>("tilegen1")->get_flip_state()); | |
71 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
72 | draw_sprites(machine(), bitmap, cliprect); | |
73 | 73 | return 0; |
74 | 74 | } |
75 | 75 | |
76 | 76 | UINT32 pcktgal_state::screen_update_pcktgalb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
77 | 77 | { |
78 | 78 | // the bootleg doesn't properly set the tilemap registers, because it's on non-original hardware, which probably doesn't have the flexible tilemaps. |
79 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw_bootleg(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0, 2); | |
80 | draw_sprites(screen.machine(), bitmap, cliprect); | |
79 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw_bootleg(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0, 2); | |
80 | draw_sprites(machine(), bitmap, cliprect); | |
81 | 81 | return 0;} |
r17988 | r17989 | |
---|---|---|
1444 | 1444 | // press in sams64_2 attract mode for a nice debug screen from the game |
1445 | 1445 | // not sure how functional it is, and it doesn't appear to test everything (rowscroll modes etc.) |
1446 | 1446 | // but it could be useful |
1447 | if ( | |
1447 | if ( | |
1448 | 1448 | { |
1449 | address_space &space = * | |
1449 | address_space &space = * | |
1450 | 1450 | space.write_byte(0x2f27c8, 0x2); |
1451 | 1451 | } |
1452 | 1452 | #endif |
1453 | 1453 | |
1454 | bitmap.fill(hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen.machine()) : screen.machine().pens[0], cliprect); //FIXME: Is the register correct? check with HW tests | |
1455 | screen.machine().priority_bitmap.fill(0x00, cliprect); | |
1454 | bitmap.fill(hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(machine()) : machine().pens[0], cliprect); //FIXME: Is the register correct? check with HW tests | |
1455 | machine().priority_bitmap.fill(0x00, cliprect); | |
1456 | 1456 | |
1457 | 1457 | if (m_screen_dis) |
1458 | 1458 | return 0; |
r17988 | r17989 | |
1522 | 1522 | //hng64_mark_all_tiles_dirty(this, 2); |
1523 | 1523 | //hng64_mark_all_tiles_dirty(this, 3); |
1524 | 1524 | |
1525 | hng64_drawtilemap(screen.machine(),bitmap,cliprect, 3); | |
1526 | hng64_drawtilemap(screen.machine(),bitmap,cliprect, 2); | |
1527 | hng64_drawtilemap(screen.machine(),bitmap,cliprect, 1); | |
1528 | hng64_drawtilemap(screen.machine(),bitmap,cliprect, 0); | |
1525 | hng64_drawtilemap(machine(),bitmap,cliprect, 3); | |
1526 | hng64_drawtilemap(machine(),bitmap,cliprect, 2); | |
1527 | hng64_drawtilemap(machine(),bitmap,cliprect, 1); | |
1528 | hng64_drawtilemap(machine(),bitmap,cliprect, 0); | |
1529 | 1529 | |
1530 | 1530 | // 3d really shouldn't be last, but you don't see some cool stuff right now if it's put before sprites. |
1531 | 1531 | { |
r17988 | r17989 | |
1549 | 1549 | //printf("NEW FRAME!\n"); /* Debug - ajg */ |
1550 | 1550 | } |
1551 | 1551 | |
1552 | draw_sprites( | |
1552 | draw_sprites( | |
1553 | 1553 | |
1554 | 1554 | if(0) |
1555 | transition_control( | |
1555 | transition_control( | |
1556 | 1556 | |
1557 | 1557 | if (0) |
1558 | 1558 | popmessage("%08x %08x %08x %08x %08x", m_spriteregs[0], m_spriteregs[1], m_spriteregs[2], m_spriteregs[3], m_spriteregs[4]); |
r17988 | r17989 | |
1612 | 1612 | hng64_tcram[0x58/4], |
1613 | 1613 | hng64_tcram[0x5c/4]); |
1614 | 1614 | |
1615 | if ( | |
1615 | if ( | |
1616 | 1616 | { |
1617 | 1617 | m_additive_tilemap_debug ^= 1; |
1618 | 1618 | popmessage("blend changed %02x", m_additive_tilemap_debug); |
1619 | 1619 | } |
1620 | if ( | |
1620 | if ( | |
1621 | 1621 | { |
1622 | 1622 | m_additive_tilemap_debug ^= 2; |
1623 | 1623 | popmessage("blend changed %02x", m_additive_tilemap_debug); |
1624 | 1624 | } |
1625 | if ( | |
1625 | if ( | |
1626 | 1626 | { |
1627 | 1627 | m_additive_tilemap_debug ^= 4; |
1628 | 1628 | popmessage("blend changed %02x", m_additive_tilemap_debug); |
1629 | 1629 | } |
1630 | if ( | |
1630 | if ( | |
1631 | 1631 | { |
1632 | 1632 | m_additive_tilemap_debug ^= 8; |
1633 | 1633 | popmessage("blend changed %02x", m_additive_tilemap_debug); |
r17988 | r17989 | |
1640 | 1640 | { |
1641 | 1641 | // rising edge |
1642 | 1642 | if (state) |
1643 | clear3d( | |
1643 | clear3d( | |
1644 | 1644 | } |
1645 | 1645 | |
1646 | 1646 | void hng64_state::video_start() |
r17988 | r17989 | |
---|---|---|
104 | 104 | { |
105 | 105 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
106 | 106 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
107 | draw_sprites( | |
107 | draw_sprites( | |
108 | 108 | return 0; |
109 | 109 | } |
r17988 | r17989 | |
---|---|---|
243 | 243 | UINT32 gladiatr_state::screen_update_ppking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
244 | 244 | { |
245 | 245 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
246 | draw_sprites( | |
246 | draw_sprites( | |
247 | 247 | |
248 | 248 | /* the fg layer just selects the upper palette bank on underlying pixels */ |
249 | 249 | { |
r17988 | r17989 | |
290 | 290 | m_fg_tilemap->set_scrolly(0, m_fg_scrolly); |
291 | 291 | |
292 | 292 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
293 | draw_sprites( | |
293 | draw_sprites( | |
294 | 294 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
295 | 295 | } |
296 | 296 | else |
297 | bitmap.fill(get_black_pen( | |
297 | bitmap.fill(get_black_pen( | |
298 | 298 | return 0; |
299 | 299 | } |
r17988 | r17989 | |
---|---|---|
382 | 382 | { |
383 | 383 | int layers[3],layerpri[3]; |
384 | 384 | |
385 | bitmap.fill(get_black_pen( | |
385 | bitmap.fill(get_black_pen( | |
386 | 386 | |
387 | 387 | layers[0] = 0; |
388 | 388 | layerpri[0] = (m_scra_videoregs[0] & 0x0000c000) >> 14; |
r17988 | r17989 | |
393 | 393 | |
394 | 394 | sortlayers(layers, layerpri); |
395 | 395 | |
396 | draw_layer(screen.machine(), bitmap, cliprect, layers[0]); | |
397 | draw_sprites(screen.machine(), bitmap, cliprect, 0); | |
398 | draw_layer(screen.machine(), bitmap, cliprect, layers[1]); | |
399 | draw_sprites(screen.machine(), bitmap, cliprect, 1); | |
400 | draw_layer(screen.machine(), bitmap, cliprect, layers[2]); | |
401 | draw_sprites(screen.machine(), bitmap, cliprect, 2); | |
402 | draw_sprites(screen.machine(), bitmap, cliprect, 3); | |
396 | draw_layer(machine(), bitmap, cliprect, layers[0]); | |
397 | draw_sprites(machine(), bitmap, cliprect, 0); | |
398 | draw_layer(machine(), bitmap, cliprect, layers[1]); | |
399 | draw_sprites(machine(), bitmap, cliprect, 1); | |
400 | draw_layer(machine(), bitmap, cliprect, layers[2]); | |
401 | draw_sprites(machine(), bitmap, cliprect, 2); | |
402 | draw_sprites(machine(), bitmap, cliprect, 3); | |
403 | 403 | m_text_tilemap->draw(bitmap, cliprect, 0, 0); |
404 | 404 | |
405 | 405 | #if 0 |
r17988 | r17989 | |
---|---|---|
110 | 110 | k054338_update_all_shadows(m_k054338, 0); |
111 | 111 | k054338_fill_backcolor(m_k054338, bitmap, 0); |
112 | 112 | |
113 | | |
113 | | |
114 | 114 | |
115 | 115 | if (m_layerpri[0] < k053251_get_priority(m_k053251, K053251_CI1)) /* bucky hides back layer behind background */ |
116 | 116 | k056832_tilemap_draw(m_k056832, bitmap, cliprect, layers[0], 0, 1); |
r17988 | r17989 | |
---|---|---|
125 | 125 | |
126 | 126 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
127 | 127 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
128 | draw_sprites(screen.machine(), bitmap, cliprect, 1, m_spriteram); | |
129 | draw_sprites(screen.machine(), bitmap, cliprect, 0, m_spriteram2); | |
128 | draw_sprites(machine(), bitmap, cliprect, 1, m_spriteram); | |
129 | draw_sprites(machine(), bitmap, cliprect, 0, m_spriteram2); | |
130 | 130 | return 0; |
131 | 131 | } |
r17988 | r17989 | |
---|---|---|
297 | 297 | |
298 | 298 | if (m_cur_ctrl & 0x20) /* display enable */ |
299 | 299 | { |
300 | | |
300 | | |
301 | 301 | |
302 | 302 | m_bg19_tilemap->draw(bitmap, cliprect, 0, 0); |
303 | 303 | |
r17988 | r17989 | |
306 | 306 | else /* split priority */ |
307 | 307 | m_bg18_tilemap->draw(bitmap, cliprect, 0,1); |
308 | 308 | |
309 | draw_sprites( | |
309 | draw_sprites( | |
310 | 310 | |
311 | 311 | m_ch1a_tilemap->draw(bitmap, cliprect, 0, 0); |
312 | 312 | } |
313 | 313 | else |
314 | bitmap.fill( | |
314 | bitmap.fill( | |
315 | 315 | return 0; |
316 | 316 | } |
317 | 317 |
r17988 | r17989 | |
---|---|---|
153 | 153 | |
154 | 154 | if (cliprect.min_y == screen.visible_area().min_y) |
155 | 155 | { |
156 | screen.machine().tilemap().mark_all_dirty(); | |
157 | screen.machine().tilemap().set_flip_all((*m_flipscreen & 0x01) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); | |
156 | machine().tilemap().mark_all_dirty(); | |
157 | machine().tilemap().set_flip_all((*m_flipscreen & 0x01) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); | |
158 | 158 | } |
159 | 159 | |
160 | 160 | m_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
163 | 163 | |
164 | 164 | return 0; |
r17988 | r17989 | |
---|---|---|
197 | 197 | |
198 | 198 | UINT32 groundfx_state::screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
199 | 199 | { |
200 | address_space &space = screen.machine().driver_data()->generic_space(); | |
201 | device_t *tc0100scn = screen.machine().device("tc0100scn"); | |
202 | device_t *tc0480scp = screen.machine().device("tc0480scp"); | |
200 | address_space &space = machine().driver_data()->generic_space(); | |
201 | device_t *tc0100scn = machine().device("tc0100scn"); | |
202 | device_t *tc0480scp = machine().device("tc0480scp"); | |
203 | 203 | UINT8 layer[5]; |
204 | 204 | UINT8 pivlayer[3]; |
205 | 205 | UINT16 priority; |
r17988 | r17989 | |
219 | 219 | pivlayer[1] = pivlayer[0]^1; |
220 | 220 | pivlayer[2] = 2; |
221 | 221 | |
222 | | |
222 | | |
223 | 223 | bitmap.fill(0, cliprect); /* wrong color? */ |
224 | 224 | |
225 | 225 | tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0); |
r17988 | r17989 | |
252 | 252 | |
253 | 253 | if (tc0480scp_long_r(tc0480scp, space, 0x20 / 4, 0xffffffff) != 0x240866) /* Stupid hack for start of race */ |
254 | 254 | tc0480scp_tilemap_draw(tc0480scp, bitmap, m_hack_cliprect, layer[0], 0, 0); |
255 | draw_sprites( | |
255 | draw_sprites( | |
256 | 256 | } |
257 | 257 | else |
258 | 258 | { |
r17988 | r17989 | |
263 | 263 | |
264 | 264 | tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, pivlayer[2], 0, 0); |
265 | 265 | |
266 | draw_sprites( | |
266 | draw_sprites( | |
267 | 267 | } |
268 | 268 | |
269 | 269 | tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0); /* TC0480SCP text layer */ |
r17988 | r17989 | |
---|---|---|
159 | 159 | finalclip0 &= cliprect; |
160 | 160 | finalclip1 &= cliprect; |
161 | 161 | |
162 | set_pens( | |
162 | set_pens( | |
163 | 163 | |
164 | 164 | /* set scroll registers */ |
165 | address_space &space = | |
165 | address_space &space = | |
166 | 166 | xoffs = k007121_ctrlram_r(m_k007121, space, 0); |
167 | 167 | for (i = 0; i < 32; i++) |
168 | 168 | m_layer0->set_scrollx(i, m_k007121_regs[0x20 + i] + xoffs - 40); |
r17988 | r17989 | |
170 | 170 | m_layer0->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); |
171 | 171 | |
172 | 172 | m_layer0->draw(bitmap, finalclip0, 0, 0); |
173 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
173 | k007121_sprites_draw(m_k007121, bitmap, cliprect, | |
174 | 174 | m_layer1->draw(bitmap, finalclip1, 0, 0); |
175 | 175 | return 0; |
176 | 176 | } |
r17988 | r17989 | |
---|---|---|
143 | 143 | UINT32 cabal_state::screen_update_cabal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
144 | 144 | { |
145 | 145 | m_background_layer->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
146 | draw_sprites( | |
146 | draw_sprites( | |
147 | 147 | m_text_layer->draw(bitmap, cliprect, 0,0); |
148 | 148 | return 0; |
149 | 149 | } |
r17988 | r17989 | |
---|---|---|
262 | 262 | UINT32 suprloco_state::screen_update_suprloco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
263 | 263 | { |
264 | 264 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
265 | draw_sprites( | |
265 | draw_sprites( | |
266 | 266 | m_bg_tilemap->draw(bitmap, cliprect, 1,0); |
267 | 267 | return 0; |
268 | 268 | } |
r17988 | r17989 | |
---|---|---|
533 | 533 | |
534 | 534 | UINT32 m92_state::screen_update_m92(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
535 | 535 | { |
536 | | |
536 | | |
537 | 537 | bitmap.fill(0, cliprect); |
538 | m92_update_scroll_positions(screen.machine()); | |
539 | m92_draw_tiles(screen.machine(), bitmap, cliprect); | |
538 | m92_update_scroll_positions(machine()); | |
539 | m92_draw_tiles(machine(), bitmap, cliprect); | |
540 | 540 | |
541 | draw_sprites( | |
541 | draw_sprites( | |
542 | 542 | |
543 | 543 | /* Flipscreen appears hardwired to the dipswitch - strange */ |
544 | if ( | |
544 | if ( | |
545 | 545 | flip_screen_set(0); |
546 | 546 | else |
547 | 547 | flip_screen_set(1); |
r17988 | r17989 | |
550 | 550 | |
551 | 551 | UINT32 m92_state::screen_update_ppan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
552 | 552 | { |
553 | | |
553 | | |
554 | 554 | bitmap.fill(0, cliprect); |
555 | m92_update_scroll_positions(screen.machine()); | |
556 | m92_draw_tiles(screen.machine(), bitmap, cliprect); | |
555 | m92_update_scroll_positions(machine()); | |
556 | m92_draw_tiles(machine(), bitmap, cliprect); | |
557 | 557 | |
558 | ppan_draw_sprites( | |
558 | ppan_draw_sprites( | |
559 | 559 | |
560 | 560 | /* Flipscreen appears hardwired to the dipswitch - strange */ |
561 | if ( | |
561 | if ( | |
562 | 562 | flip_screen_set(0); |
563 | 563 | else |
564 | 564 | flip_screen_set(1); |
r17988 | r17989 | |
---|---|---|
307 | 307 | m_bg_tilemap->set_scrolly(0, *m_yard_scroll_y_low); |
308 | 308 | |
309 | 309 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
310 | draw_sprites(screen.machine(), bitmap, cliprect); | |
311 | draw_panel(screen.machine(), bitmap, cliprect); | |
310 | draw_sprites(machine(), bitmap, cliprect); | |
311 | draw_panel(machine(), bitmap, cliprect); | |
312 | 312 | return 0; |
313 | 313 | } |
r17988 | r17989 | |
---|---|---|
72 | 72 | |
73 | 73 | konami_sortlayers3(layer, m_layerpri); |
74 | 74 | |
75 | | |
75 | | |
76 | 76 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1); |
77 | 77 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[1], 0, 2); |
78 | 78 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, layer[2], 0, 4); |
r17988 | r17989 | |
---|---|---|
160 | 160 | int code2 = code; |
161 | 161 | |
162 | 162 | int color = ((flags >> 1) & 0x03) | ((code >> 5) & 0x04) | (code & 0x08) | (m_sprite_palette * 16); |
163 | gfx_element *gfx = | |
163 | gfx_element *gfx = | |
164 | 164 | |
165 | 165 | if (m_cocktail_flip) |
166 | 166 | { |
r17988 | r17989 | |
202 | 202 | int y = m_cocktail_flip ? (31 * 8 - 8 * sy) : 8 * sy; |
203 | 203 | |
204 | 204 | offs = sx + sy * 64; |
205 | drawgfx_transpen(bitmap, cliprect, | |
205 | drawgfx_transpen(bitmap, cliprect, | |
206 | 206 | m_videoram[offs] + 256 * m_char_bank, |
207 | 207 | ((m_videoram[offs] & 0xf0) >> 4) + m_char_palette * 16, |
208 | 208 | m_cocktail_flip, m_cocktail_flip, x, y, 0); |
r17988 | r17989 | |
---|---|---|
203 | 203 | m_pant[1]->set_scrolly(0, m_vregs[2]); |
204 | 204 | m_pant[1]->set_scrollx(0, m_vregs[3]); |
205 | 205 | |
206 | thoop2_sort_sprites( | |
206 | thoop2_sort_sprites( | |
207 | 207 | |
208 | 208 | bitmap.fill(0, cliprect ); |
209 | 209 | |
210 | 210 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3,0); |
211 | 211 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3,0); |
212 | draw_sprites( | |
212 | draw_sprites( | |
213 | 213 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3,0); |
214 | 214 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3,0); |
215 | 215 | |
216 | 216 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2,0); |
217 | 217 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2,0); |
218 | draw_sprites( | |
218 | draw_sprites( | |
219 | 219 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2,0); |
220 | 220 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2,0); |
221 | 221 | |
222 | 222 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1,0); |
223 | 223 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1,0); |
224 | draw_sprites( | |
224 | draw_sprites( | |
225 | 225 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1,0); |
226 | 226 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1,0); |
227 | 227 | |
228 | 228 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0,0); |
229 | 229 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0,0); |
230 | draw_sprites( | |
230 | draw_sprites( | |
231 | 231 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0,0); |
232 | 232 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0,0); |
233 | 233 | |
234 | draw_sprites( | |
234 | draw_sprites( | |
235 | 235 | return 0; |
236 | 236 | } |
r17988 | r17989 | |
---|---|---|
266 | 266 | if (m_pri == 0x007b) { |
267 | 267 | m_bg0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
268 | 268 | m_bg1_tilemap->draw(bitmap, cliprect, 0,0); |
269 | draw_sprites( | |
269 | draw_sprites( | |
270 | 270 | m_fg0_tilemap->draw(bitmap, cliprect, 0,0); |
271 | 271 | } |
272 | 272 | |
273 | 273 | if (m_pri == 0x007c) { |
274 | 274 | m_bg0_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
275 | draw_sprites( | |
275 | draw_sprites( | |
276 | 276 | m_bg1_tilemap->draw(bitmap, cliprect, 0,0); |
277 | 277 | m_fg0_tilemap->draw(bitmap, cliprect, 0,0); |
278 | 278 | } |
r17988 | r17989 | |
280 | 280 | if (m_pri == 0x0078) { |
281 | 281 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
282 | 282 | m_bg0_tilemap->draw(bitmap, cliprect, 0,0); |
283 | draw_sprites( | |
283 | draw_sprites( | |
284 | 284 | m_fg0_tilemap->draw(bitmap, cliprect, 0,0); |
285 | 285 | } |
286 | 286 | return 0; |
r17988 | r17989 | |
---|---|---|
173 | 173 | { |
174 | 174 | int offs; |
175 | 175 | |
176 | set_tilemap_scrolly( | |
176 | set_tilemap_scrolly( | |
177 | 177 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
178 | 178 | |
179 | 179 | /* draw the sprites */ |
r17988 | r17989 | |
211 | 211 | |
212 | 212 | if (!m_flipscreen_y) |
213 | 213 | { |
214 | sy = 256 - | |
214 | sy = 256 - | |
215 | 215 | flipy = !flipy; |
216 | 216 | } |
217 | 217 | |
r17988 | r17989 | |
220 | 220 | sx++; |
221 | 221 | } |
222 | 222 | |
223 | drawgfx_transpen(bitmap,cliprect, | |
223 | drawgfx_transpen(bitmap,cliprect, | |
224 | 224 | code, |
225 | 225 | col, |
226 | 226 | flipx,flipy, |
r17988 | r17989 | |
234 | 234 | { |
235 | 235 | int offs, sx, sy, code, col, flipx, flipy; |
236 | 236 | |
237 | set_tilemap_scrolly( | |
237 | set_tilemap_scrolly( | |
238 | 238 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
239 | 239 | |
240 | 240 | /* draw the small sprites */ |
r17988 | r17989 | |
253 | 253 | |
254 | 254 | if (!m_flipscreen_y) |
255 | 255 | { |
256 | sy = 256 - | |
256 | sy = 256 - | |
257 | 257 | flipy = !flipy; |
258 | 258 | } |
259 | 259 | |
r17988 | r17989 | |
262 | 262 | sx++; |
263 | 263 | } |
264 | 264 | |
265 | drawgfx_transpen(bitmap,cliprect, | |
265 | drawgfx_transpen(bitmap,cliprect, | |
266 | 266 | code >> 2, |
267 | 267 | col, |
268 | 268 | flipx,flipy, |
r17988 | r17989 | |
280 | 280 | |
281 | 281 | if (!m_flipscreen_y) |
282 | 282 | { |
283 | sy = 256 - | |
283 | sy = 256 - | |
284 | 284 | flipy = !flipy; |
285 | 285 | } |
286 | 286 | |
r17988 | r17989 | |
291 | 291 | |
292 | 292 | code >>= 4; |
293 | 293 | |
294 | drawgfx_transpen(bitmap,cliprect, | |
294 | drawgfx_transpen(bitmap,cliprect, | |
295 | 295 | code, |
296 | 296 | col, |
297 | 297 | flipx,flipy, |
r17988 | r17989 | |
299 | 299 | |
300 | 300 | /* draw again for wrap around */ |
301 | 301 | |
302 | drawgfx_transpen(bitmap,cliprect, | |
302 | drawgfx_transpen(bitmap,cliprect, | |
303 | 303 | code, |
304 | 304 | col, |
305 | 305 | flipx,flipy, |
r17988 | r17989 | |
312 | 312 | { |
313 | 313 | int offs; |
314 | 314 | |
315 | set_tilemap_scrolly( | |
315 | set_tilemap_scrolly( | |
316 | 316 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
317 | 317 | |
318 | 318 | /* draw the sprites */ |
r17988 | r17989 | |
348 | 348 | |
349 | 349 | if (!m_flipscreen_y) |
350 | 350 | { |
351 | sy = 256 - | |
351 | sy = 256 - | |
352 | 352 | flipy = !flipy; |
353 | 353 | } |
354 | 354 | |
r17988 | r17989 | |
357 | 357 | sx--; |
358 | 358 | } |
359 | 359 | |
360 | drawgfx_transpen(bitmap,cliprect, | |
360 | drawgfx_transpen(bitmap,cliprect, | |
361 | 361 | code, |
362 | 362 | col, |
363 | 363 | flipx,flipy, |
r17988 | r17989 | |
371 | 371 | { |
372 | 372 | int offs; |
373 | 373 | |
374 | set_tilemap_scrolly( | |
374 | set_tilemap_scrolly( | |
375 | 375 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
376 | 376 | |
377 | 377 | /* draw the sprites */ |
r17988 | r17989 | |
390 | 390 | |
391 | 391 | if (!m_flipscreen_y) |
392 | 392 | { |
393 | sy = 256 - | |
393 | sy = 256 - | |
394 | 394 | flipy = !flipy; |
395 | 395 | } |
396 | 396 | |
397 | 397 | if (m_flipscreen_x) |
398 | 398 | { |
399 | sx = 256 - | |
399 | sx = 256 - | |
400 | 400 | flipx = !flipx; |
401 | 401 | } |
402 | 402 | |
403 | drawgfx_transpen(bitmap,cliprect, | |
403 | drawgfx_transpen(bitmap,cliprect, | |
404 | 404 | code >> 2, |
405 | 405 | col, |
406 | 406 | flipx,flipy, |
r17988 | r17989 | |
414 | 414 | { |
415 | 415 | int offs; |
416 | 416 | |
417 | set_tilemap_scrolly( | |
417 | set_tilemap_scrolly( | |
418 | 418 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
419 | 419 | |
420 | 420 | /* draw the sprites */ |
r17988 | r17989 | |
449 | 449 | |
450 | 450 | if (!m_flipscreen_y) |
451 | 451 | { |
452 | sy = 256 - | |
452 | sy = 256 - | |
453 | 453 | flipy = !flipy; |
454 | 454 | } |
455 | 455 | |
r17988 | r17989 | |
458 | 458 | sx--; |
459 | 459 | } |
460 | 460 | |
461 | drawgfx_transpen(bitmap,cliprect, | |
461 | drawgfx_transpen(bitmap,cliprect, | |
462 | 462 | code, |
463 | 463 | col, |
464 | 464 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
7 | 7 | |
8 | 8 | UINT32 pktgaldx_state::screen_update_pktgaldx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
9 | 9 | { |
10 | address_space &space = | |
10 | address_space &space = | |
11 | 11 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
12 | 12 | |
13 | 13 | flip_screen_set(BIT(flip, 7)); |
14 | 14 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
15 | 15 | |
16 | 16 | bitmap.fill(0, cliprect); /* not Confirmed */ |
17 | | |
17 | | |
18 | 18 | |
19 | 19 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
20 | | |
20 | | |
21 | 21 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
22 | 22 | return 0; |
23 | 23 | } |
r17988 | r17989 | |
31 | 31 | int tileno; |
32 | 32 | int colour; |
33 | 33 | |
34 | bitmap.fill(get_black_pen( | |
34 | bitmap.fill(get_black_pen( | |
35 | 35 | |
36 | 36 | /* the bootleg seems to treat the tilemaps as sprites */ |
37 | 37 | for (offset = 0; offset < 0x1600 / 2; offset += 8) |
r17988 | r17989 | |
45 | 45 | y &= 0x1ff; |
46 | 46 | y -= 8; |
47 | 47 | |
48 | drawgfx_transpen(bitmap, cliprect, | |
48 | drawgfx_transpen(bitmap, cliprect, | |
49 | 49 | } |
50 | 50 | |
51 | 51 | for (offset = 0x1600/2; offset < 0x2000 / 2; offset += 8) |
r17988 | r17989 | |
59 | 59 | y &= 0x1ff; |
60 | 60 | y -= 8; |
61 | 61 | |
62 | drawgfx_transpen(bitmap, cliprect, | |
62 | drawgfx_transpen(bitmap, cliprect, | |
63 | 63 | } |
64 | 64 | |
65 | 65 | for (offset = 0x2000/2; offset < 0x4000 / 2; offset += 8) |
r17988 | r17989 | |
73 | 73 | y &= 0x1ff; |
74 | 74 | y -= 8; |
75 | 75 | |
76 | drawgfx_transpen(bitmap, cliprect, | |
76 | drawgfx_transpen(bitmap, cliprect, | |
77 | 77 | } |
78 | 78 | |
79 | 79 | return 0; |
r17988 | r17989 | |
---|---|---|
208 | 208 | { |
209 | 209 | |
210 | 210 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
211 | draw_sprites( | |
211 | draw_sprites( | |
212 | 212 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
213 | 213 | return 0; |
214 | 214 | } |
r17988 | r17989 | |
---|---|---|
177 | 177 | |
178 | 178 | UINT32 atarigx2_state::screen_update_atarigx2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
179 | 179 | { |
180 | bitmap_ind8 &priority_bitmap = | |
180 | bitmap_ind8 &priority_bitmap = | |
181 | 181 | |
182 | 182 | /* draw the playfield */ |
183 | 183 | priority_bitmap.fill(0, cliprect); |
r17988 | r17989 | |
---|---|---|
333 | 333 | /* The backmost tilemap decides the background color(s) but sprites can |
334 | 334 | go below the opaque pixels of that tilemap. We thus need to mark the |
335 | 335 | transparent pixels of this layer with a different priority value */ |
336 | // fuuki16_draw_layer( | |
336 | // fuuki16_draw_layer( | |
337 | 337 | |
338 | 338 | /* Actually, bg colour is simply the last pen i.e. 0x1fff -pjp */ |
339 | 339 | bitmap.fill((0x800 * 4) - 1, cliprect); |
340 | | |
340 | | |
341 | 341 | |
342 | fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_back, 0, 1); | |
343 | fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_middle, 0, 2); | |
344 | fuuki16_draw_layer(screen.machine(), bitmap, cliprect, tm_front, 0, 4); | |
342 | fuuki16_draw_layer(machine(), bitmap, cliprect, tm_back, 0, 1); | |
343 | fuuki16_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2); | |
344 | fuuki16_draw_layer(machine(), bitmap, cliprect, tm_front, 0, 4); | |
345 | 345 | |
346 | 346 | draw_sprites(screen, bitmap, cliprect); |
347 | 347 |
r17988 | r17989 | |
---|---|---|
218 | 218 | m_bg_tilemap->set_scrolly(0, m_scroll_low[0] + 256 * m_scroll_high[0]); |
219 | 219 | |
220 | 220 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
221 | draw_sprites( | |
221 | draw_sprites( | |
222 | 222 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
223 | 223 | return 0; |
224 | 224 | } |
r17988 | r17989 | |
---|---|---|
105 | 105 | { |
106 | 106 | |
107 | 107 | m_tilemap->draw(bitmap, cliprect, 0,0); |
108 | draw_sprites( | |
108 | draw_sprites( | |
109 | 109 | m_md_tilemap->draw(bitmap, cliprect, 0,0); |
110 | 110 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
111 | 111 | return 0; |
r17988 | r17989 | |
116 | 116 | |
117 | 117 | m_tilemap->draw(bitmap, cliprect, 0,0); |
118 | 118 | m_md_tilemap->draw(bitmap, cliprect, 0,0); |
119 | draw_sprites( | |
119 | draw_sprites( | |
120 | 120 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
121 | 121 | return 0; |
122 | 122 | } |
r17988 | r17989 | |
---|---|---|
111 | 111 | UINT32 circus_state::screen_update_circus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
112 | 112 | { |
113 | 113 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
114 | circus_draw_fg(screen.machine(), bitmap, cliprect); | |
115 | draw_sprite_collision(screen.machine(), bitmap, cliprect); | |
114 | circus_draw_fg(machine(), bitmap, cliprect); | |
115 | draw_sprite_collision(machine(), bitmap, cliprect); | |
116 | 116 | return 0; |
117 | 117 | } |
118 | 118 | |
r17988 | r17989 | |
183 | 183 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
184 | 184 | robotbwl_draw_scoreboard(bitmap, cliprect); |
185 | 185 | robotbwl_draw_bowling_alley(bitmap, cliprect); |
186 | robotbwl_draw_ball( | |
186 | robotbwl_draw_ball( | |
187 | 187 | return 0; |
188 | 188 | } |
189 | 189 | |
r17988 | r17989 | |
201 | 201 | UINT32 circus_state::screen_update_crash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
202 | 202 | { |
203 | 203 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
204 | crash_draw_car( | |
204 | crash_draw_car( | |
205 | 205 | return 0; |
206 | 206 | } |
207 | 207 | |
208 | 208 | UINT32 circus_state::screen_update_ripcord(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
209 | 209 | { |
210 | 210 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
211 | draw_sprite_collision( | |
211 | draw_sprite_collision( | |
212 | 212 | return 0; |
213 | 213 | } |
r17988 | r17989 | |
---|---|---|
204 | 204 | UINT32 zac2650_state::screen_update_tinvader(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
205 | 205 | { |
206 | 206 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
207 | draw_sprites( | |
207 | draw_sprites( | |
208 | 208 | return 0; |
209 | 209 | } |
r17988 | r17989 | |
---|---|---|
202 | 202 | { |
203 | 203 | case 0: |
204 | 204 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
205 | draw_sprites( | |
205 | draw_sprites( | |
206 | 206 | m_bg2_tilemap->draw(bitmap, cliprect, 0,0); |
207 | 207 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
208 | 208 | break; |
209 | 209 | |
210 | 210 | case 2: |
211 | 211 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
212 | draw_sprites( | |
212 | draw_sprites( | |
213 | 213 | m_bg1_tilemap->draw(bitmap, cliprect, 0,0); |
214 | 214 | m_bg2_tilemap->draw(bitmap, cliprect, 0,0); |
215 | 215 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
219 | 219 | m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
220 | 220 | m_bg2_tilemap->draw(bitmap, cliprect, 0,0); |
221 | 221 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
222 | draw_sprites( | |
222 | draw_sprites( | |
223 | 223 | break; |
224 | 224 | |
225 | 225 | default: |
r17988 | r17989 | |
---|---|---|
214 | 214 | m_bg_tilemap->draw(bitmap, clip, 0,0); |
215 | 215 | } |
216 | 216 | |
217 | draw_sprites( | |
217 | draw_sprites( | |
218 | 218 | return 0; |
219 | 219 | } |
220 | 220 |
r17988 | r17989 | |
---|---|---|
107 | 107 | |
108 | 108 | UINT32 relief_state::screen_update_relief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
109 | 109 | { |
110 | bitmap_ind8 &priority_bitmap = | |
110 | bitmap_ind8 &priority_bitmap = | |
111 | 111 | atarimo_rect_list rectlist; |
112 | 112 | bitmap_ind16 *mobitmap; |
113 | 113 | int x, y, r; |
r17988 | r17989 | |
---|---|---|
512 | 512 | { |
513 | 513 | if (m_sprite_lag==2) |
514 | 514 | { |
515 | if ( | |
515 | if ( | |
516 | 516 | { |
517 | get_sprite_info( | |
517 | get_sprite_info( | |
518 | 518 | } |
519 | 519 | memcpy(m_spriteram16_buffered,m_spriteram,0x10000); |
520 | 520 | } |
521 | 521 | else if (m_sprite_lag==1) |
522 | 522 | { |
523 | if ( | |
523 | if ( | |
524 | 524 | { |
525 | get_sprite_info( | |
525 | get_sprite_info( | |
526 | 526 | } |
527 | 527 | } |
528 | 528 | } |
r17988 | r17989 | |
3153 | 3153 | UINT32 sy_fix[5],sx_fix[5]; |
3154 | 3154 | |
3155 | 3155 | m_f3_skip_this_frame=0; |
3156 | | |
3156 | | |
3157 | 3157 | |
3158 | 3158 | /* Setup scroll */ |
3159 | 3159 | sy_fix[0]=((m_f3_control_0[4]&0xffff)<< 9) + (1<<16); |
r17988 | r17989 | |
3190 | 3190 | |
3191 | 3191 | /* sprites */ |
3192 | 3192 | if (m_sprite_lag==0) |
3193 | get_sprite_info( | |
3193 | get_sprite_info( | |
3194 | 3194 | |
3195 | 3195 | /* Update sprite buffer */ |
3196 | draw_sprites( | |
3196 | draw_sprites( | |
3197 | 3197 | |
3198 | 3198 | /* Parse sprite, alpha & clipping parts of lineram */ |
3199 | 3199 | get_spritealphaclip_info(this); |
3200 | 3200 | |
3201 | 3201 | /* Parse playfield effects */ |
3202 | get_line_ram_info(screen.machine(), m_pf1_tilemap,sx_fix[0],sy_fix[0],0,m_f3_pf_data_1); | |
3203 | get_line_ram_info(screen.machine(), m_pf2_tilemap,sx_fix[1],sy_fix[1],1,m_f3_pf_data_2); | |
3204 | get_line_ram_info(screen.machine(), m_pf3_tilemap,sx_fix[2],sy_fix[2],2,m_f3_pf_data_3); | |
3205 | get_line_ram_info(screen.machine(), m_pf4_tilemap,sx_fix[3],sy_fix[3],3,m_f3_pf_data_4); | |
3206 | get_vram_info(screen.machine(), m_vram_layer,m_pixel_layer,sx_fix[4],sy_fix[4]); | |
3202 | get_line_ram_info(machine(), m_pf1_tilemap,sx_fix[0],sy_fix[0],0,m_f3_pf_data_1); | |
3203 | get_line_ram_info(machine(), m_pf2_tilemap,sx_fix[1],sy_fix[1],1,m_f3_pf_data_2); | |
3204 | get_line_ram_info(machine(), m_pf3_tilemap,sx_fix[2],sy_fix[2],2,m_f3_pf_data_3); | |
3205 | get_line_ram_info(machine(), m_pf4_tilemap,sx_fix[3],sy_fix[3],3,m_f3_pf_data_4); | |
3206 | get_vram_info(machine(), m_vram_layer,m_pixel_layer,sx_fix[4],sy_fix[4]); | |
3207 | 3207 | |
3208 | 3208 | /* Draw final framebuffer */ |
3209 | scanline_draw( | |
3209 | scanline_draw( | |
3210 | 3210 | |
3211 | 3211 | if (VERBOSE) |
3212 | print_debug_info( | |
3212 | print_debug_info( | |
3213 | 3213 | return 0; |
3214 | 3214 | } |
r17988 | r17989 | |
---|---|---|
141 | 141 | m_tilemap->set_scrollx(0, m_scrollx); |
142 | 142 | |
143 | 143 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
144 | draw_sprites( | |
144 | draw_sprites( | |
145 | 145 | |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
311 | 311 | /* flip screen is embedded in the sprite control registers */ |
312 | 312 | /* can't use flip_screen_set() because the visible area is asymmetrical */ |
313 | 313 | flip_screen_set_no_update(spriteram[0x07f6] & 0x01); |
314 | screen.machine().tilemap().set_flip_all(flip_screen() ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); | |
315 | set_scroll(screen.machine(), 0); | |
316 | set_scroll(screen.machine(), 1); | |
314 | machine().tilemap().set_flip_all(flip_screen() ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); | |
315 | set_scroll(machine(), 0); | |
316 | set_scroll(machine(), 1); | |
317 | 317 | |
318 | 318 | if (((m_xscroll[0] & 0x0e00) >> 9) == 6) |
319 | 319 | back = 1; |
r17988 | r17989 | |
321 | 321 | back = 0; |
322 | 322 | |
323 | 323 | m_bg_tilemap[back]->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0); |
324 | draw_sprites( | |
324 | draw_sprites( | |
325 | 325 | m_bg_tilemap[back ^ 1]->draw(bitmap, cliprect, 0,0); |
326 | draw_sprites( | |
326 | draw_sprites( | |
327 | 327 | |
328 | 328 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
329 | 329 | return 0; |
r17988 | r17989 | |
---|---|---|
280 | 280 | UINT32 champbas_state::screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
281 | 281 | { |
282 | 282 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
283 | champbas_draw_sprites( | |
283 | champbas_draw_sprites( | |
284 | 284 | return 0; |
285 | 285 | } |
286 | 286 | |
287 | 287 | UINT32 champbas_state::screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
288 | 288 | { |
289 | 289 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
290 | exctsccr_draw_sprites( | |
290 | exctsccr_draw_sprites( | |
291 | 291 | return 0; |
292 | 292 | } |
r17988 | r17989 | |
---|---|---|
181 | 181 | |
182 | 182 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
183 | 183 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
184 | draw_sprites( | |
184 | draw_sprites( | |
185 | 185 | return 0; |
186 | 186 | } |
r17988 | r17989 | |
---|---|---|
401 | 401 | bg_tilemap->set_flip(mcr_cocktail_flip ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); |
402 | 402 | |
403 | 403 | /* draw the background */ |
404 | | |
404 | | |
405 | 405 | bg_tilemap->draw(bitmap, cliprect, 0, 0x00); |
406 | 406 | bg_tilemap->draw(bitmap, cliprect, 1, 0x10); |
407 | 407 | bg_tilemap->draw(bitmap, cliprect, 2, 0x20); |
r17988 | r17989 | |
411 | 411 | switch (mcr_sprite_board) |
412 | 412 | { |
413 | 413 | case 91399: |
414 | render_sprites_91399( | |
414 | render_sprites_91399( | |
415 | 415 | break; |
416 | 416 | |
417 | 417 | case 91464: |
418 | 418 | if (mcr_cpu_board == 91442) |
419 | render_sprites_91464( | |
419 | render_sprites_91464( | |
420 | 420 | else if (mcr_cpu_board == 91475) |
421 | render_sprites_91464( | |
421 | render_sprites_91464( | |
422 | 422 | else if (mcr_cpu_board == 91490) |
423 | render_sprites_91464( | |
423 | render_sprites_91464( | |
424 | 424 | else if (mcr_cpu_board == 91721) |
425 | render_sprites_91464( | |
425 | render_sprites_91464( | |
426 | 426 | break; |
427 | 427 | } |
428 | 428 | return 0; |
r17988 | r17989 | |
---|---|---|
382 | 382 | |
383 | 383 | UINT32 m107_state::screen_update_m107(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
384 | 384 | { |
385 | m107_update_scroll_positions(screen.machine()); | |
386 | m107_screenrefresh(screen.machine(), bitmap, cliprect); | |
385 | m107_update_scroll_positions(machine()); | |
386 | m107_screenrefresh(machine(), bitmap, cliprect); | |
387 | 387 | return 0; |
388 | 388 | } |
389 | 389 |
r17988 | r17989 | |
---|---|---|
127 | 127 | return 0; |
128 | 128 | } |
129 | 129 | |
130 | UINT32 ninjaw_state::screen_update_ninjaw_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 0, screen.machine().driver_data<ninjaw_state>()->m_tc0100scn_1); } | |
131 | UINT32 ninjaw_state::screen_update_ninjaw_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 1, screen.machine().driver_data<ninjaw_state>()->m_tc0100scn_2); } | |
132 | UINT32 ninjaw_state::screen_update_ninjaw_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 2, screen.machine().driver_data<ninjaw_state>()->m_tc0100scn_3); } | |
130 | UINT32 ninjaw_state::screen_update_ninjaw_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 0, machine().driver_data<ninjaw_state>()->m_tc0100scn_1); } | |
131 | UINT32 ninjaw_state::screen_update_ninjaw_middle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 1, machine().driver_data<ninjaw_state>()->m_tc0100scn_2); } | |
132 | UINT32 ninjaw_state::screen_update_ninjaw_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ return update_screen(screen, bitmap, cliprect, 36 * 8 * 2, machine().driver_data<ninjaw_state>()->m_tc0100scn_3); } |
r17988 | r17989 | |
---|---|---|
137 | 137 | int sx = 15 - offs / 32; |
138 | 138 | int sy = offs % 32; |
139 | 139 | |
140 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
140 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
141 | 141 | m_videoram[offs] + ((m_colorram[offs] & 0x08) << 5), |
142 | 142 | (m_colorram[offs] & 0x30) >> 4, |
143 | 143 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ |
r17988 | r17989 | |
150 | 150 | int sx = 15 - offs / 32; |
151 | 151 | int sy = offs % 32; |
152 | 152 | |
153 | drawgfx_opaque(*m_tmpbitmap2, m_tmpbitmap2->cliprect(), | |
153 | drawgfx_opaque(*m_tmpbitmap2, m_tmpbitmap2->cliprect(), | |
154 | 154 | m_videoram3[offs] + ((m_colorram3[offs] & 0x08) << 5), |
155 | 155 | (m_colorram3[offs] & 0x30) >> 4, |
156 | 156 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ |
r17988 | r17989 | |
172 | 172 | { |
173 | 173 | if (spriteram[offs] & 0x01) |
174 | 174 | { |
175 | drawgfx_transpen(bitmap, cliprect, | |
175 | drawgfx_transpen(bitmap, cliprect, | |
176 | 176 | spriteram[offs + 1] + ((spriteram[offs] & 0xf0) << 4), |
177 | 177 | (spriteram[offs] & 0x08) >> 3, |
178 | 178 | spriteram[offs] & 0x04, spriteram[offs] & 0x02, |
r17988 | r17989 | |
187 | 187 | int sx = 31 - offs / 32; |
188 | 188 | int sy = offs % 32; |
189 | 189 | |
190 | drawgfx_transpen(bitmap,cliprect, | |
190 | drawgfx_transpen(bitmap,cliprect, | |
191 | 191 | m_videoram2[offs] + 256 * (m_colorram2[offs] & 0x07), |
192 | 192 | (m_colorram2[offs] & 0x30) >> 4, |
193 | 193 | 0,0, |
r17988 | r17989 | |
208 | 208 | int sx = 15 - offs / 32; |
209 | 209 | int sy = offs % 32; |
210 | 210 | |
211 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
211 | drawgfx_opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), | |
212 | 212 | m_videoram[offs] + ((m_colorram[offs] & 0x03) << 8), |
213 | 213 | (m_colorram[offs] & 0x30) >> 4, |
214 | 214 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ |
r17988 | r17989 | |
221 | 221 | int sx = 15 - offs / 32; |
222 | 222 | int sy = offs % 32; |
223 | 223 | |
224 | drawgfx_opaque(*m_tmpbitmap2, m_tmpbitmap2->cliprect(), | |
224 | drawgfx_opaque(*m_tmpbitmap2, m_tmpbitmap2->cliprect(), | |
225 | 225 | m_videoram3[offs] + ((m_colorram3[offs] & 0x03) << 8), |
226 | 226 | (m_colorram3[offs] & 0x30) >> 4, |
227 | 227 | 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ |
r17988 | r17989 | |
245 | 245 | { |
246 | 246 | if (spriteram[offs] & 0x01) |
247 | 247 | { |
248 | drawgfx_transpen(bitmap,cliprect, | |
248 | drawgfx_transpen(bitmap,cliprect, | |
249 | 249 | spriteram[offs+1] + ((spriteram[offs] & 0xf0) << 4), |
250 | 250 | (spriteram[offs] & 0x08) >> 3, |
251 | 251 | spriteram[offs] & 0x04,spriteram[offs] & 0x02, |
r17988 | r17989 | |
260 | 260 | int sx = 31 - offs / 32; |
261 | 261 | int sy = offs % 32; |
262 | 262 | |
263 | drawgfx_transpen(bitmap,cliprect, | |
263 | drawgfx_transpen(bitmap,cliprect, | |
264 | 264 | m_videoram2[offs] + 256 * (m_colorram2[offs] & 0x07), |
265 | 265 | (m_colorram2[offs] & 0x30) >> 4, |
266 | 266 | 0,0, |
r17988 | r17989 | |
---|---|---|
520 | 520 | if (m_video_register&TWIN16_SCREEN_FLIPX) text_flip|=TILEMAP_FLIPX; |
521 | 521 | if (m_video_register&TWIN16_SCREEN_FLIPY) text_flip|=TILEMAP_FLIPY; |
522 | 522 | |
523 | screen.machine().priority_bitmap.fill(0, cliprect); | |
524 | draw_layer( screen.machine(), bitmap, 1 ); | |
525 | draw_layer( screen.machine(), bitmap, 0 ); | |
526 | draw_sprites( screen.machine(), bitmap ); | |
523 | machine().priority_bitmap.fill(0, cliprect); | |
524 | draw_layer( machine(), bitmap, 1 ); | |
525 | draw_layer( machine(), bitmap, 0 ); | |
526 | draw_sprites( machine(), bitmap ); | |
527 | 527 | |
528 | 528 | if (text_flip) m_text_tilemap->set_flip(text_flip); |
529 | 529 | m_text_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
535 | 535 | // rising edge |
536 | 536 | if (state) |
537 | 537 | { |
538 | twin16_set_sprite_timer( | |
538 | twin16_set_sprite_timer( | |
539 | 539 | |
540 | if (twin16_spriteram_process_enable(screen.machine())) { | |
541 | if (m_need_process_spriteram) twin16_spriteram_process(screen.machine()); | |
540 | if (twin16_spriteram_process_enable(machine())) { | |
541 | if (m_need_process_spriteram) twin16_spriteram_process(machine()); | |
542 | 542 | m_need_process_spriteram = 1; |
543 | 543 | |
544 | 544 | /* if the sprite preprocessor is used, sprite ram is copied to an external buffer first, |
r17988 | r17989 | |
---|---|---|
200 | 200 | { |
201 | 201 | |
202 | 202 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
203 | draw_sprites( | |
203 | draw_sprites( | |
204 | 204 | return 0; |
205 | 205 | } |
206 | 206 |
r17988 | r17989 | |
---|---|---|
952 | 952 | active_layers |= 1 << ((pri & 0xf0000) >> 16); // bottom layer can't be disabled |
953 | 953 | } |
954 | 954 | |
955 | | |
955 | | |
956 | 956 | |
957 | 957 | for (i = 0;i < 3;i++) |
958 | 958 | { |
r17988 | r17989 | |
965 | 965 | } |
966 | 966 | } |
967 | 967 | |
968 | | |
968 | | |
969 | 969 | |
970 | 970 | flag = TILEMAP_DRAW_OPAQUE; |
971 | 971 | primask = 0; |
r17988 | r17989 | |
1008 | 1008 | } |
1009 | 1009 | |
1010 | 1010 | if (active_layers & 0x08) |
1011 | draw_sprites( | |
1011 | draw_sprites( | |
1012 | 1012 | return 0; |
1013 | 1013 | } |
1014 | 1014 |
r17988 | r17989 | |
---|---|---|
183 | 183 | |
184 | 184 | if (m_gfxctrl & 0x04) /* display disable? */ |
185 | 185 | { |
186 | bitmap.fill(get_black_pen( | |
186 | bitmap.fill(get_black_pen( | |
187 | 187 | return 0; |
188 | 188 | } |
189 | 189 | |
r17988 | r17989 | |
192 | 192 | switch (m_gfxctrl & 0xfb) |
193 | 193 | { |
194 | 194 | case 0x00: /* high score screen */ |
195 | draw_sprites(screen.machine(), bitmap, cliprect); | |
196 | draw_bg(screen.machine(), bitmap, cliprect); | |
197 | draw_fg(screen.machine(), bitmap, cliprect); | |
195 | draw_sprites(machine(), bitmap, cliprect); | |
196 | draw_bg(machine(), bitmap, cliprect); | |
197 | draw_fg(machine(), bitmap, cliprect); | |
198 | 198 | break; |
199 | 199 | case 0x01: |
200 | 200 | case 0x02: |
201 | draw_bg(screen.machine(), bitmap, cliprect); | |
202 | draw_fg(screen.machine(), bitmap, cliprect); | |
203 | draw_sprites(screen.machine(), bitmap, cliprect); | |
201 | draw_bg(machine(), bitmap, cliprect); | |
202 | draw_fg(machine(), bitmap, cliprect); | |
203 | draw_sprites(machine(), bitmap, cliprect); | |
204 | 204 | break; |
205 | 205 | default: |
206 | 206 | popmessage("gfxctrl = %02x", m_gfxctrl); |
r17988 | r17989 | |
---|---|---|
248 | 248 | |
249 | 249 | color = ( spriteram[offs + 1] & 0x1f ) | (m_colortablebank << 5) | (m_palettebank << 6 ); |
250 | 250 | |
251 | drawgfx_transmask(bitmap,spriteclip, | |
251 | drawgfx_transmask(bitmap,spriteclip, | |
252 | 252 | ( spriteram[offs] >> 2 ) | (m_spritebank << 6), |
253 | 253 | color, |
254 | 254 | fx,fy, |
255 | 255 | sx,sy, |
256 | colortable_get_transpen_mask( | |
256 | colortable_get_transpen_mask( | |
257 | 257 | |
258 | 258 | /* also plot the sprite with wraparound (tunnel in Crush Roller) */ |
259 | drawgfx_transmask(bitmap,spriteclip, | |
259 | drawgfx_transmask(bitmap,spriteclip, | |
260 | 260 | ( spriteram[offs] >> 2 ) | (m_spritebank << 6), |
261 | 261 | color, |
262 | 262 | fx,fy, |
263 | 263 | sx - 256,sy, |
264 | colortable_get_transpen_mask( | |
264 | colortable_get_transpen_mask( | |
265 | 265 | } |
266 | 266 | /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ |
267 | 267 | /* one pixel to the left to get a more correct placement */ |
r17988 | r17989 | |
286 | 286 | fx = (spriteram[offs] & 1) ^ m_inv_spr; |
287 | 287 | fy = (spriteram[offs] & 2) ^ ((m_inv_spr) << 1); |
288 | 288 | |
289 | drawgfx_transmask(bitmap,spriteclip, | |
289 | drawgfx_transmask(bitmap,spriteclip, | |
290 | 290 | ( spriteram[offs] >> 2 ) | (m_spritebank << 6), |
291 | 291 | color, |
292 | 292 | fx,fy, |
293 | 293 | sx,sy + m_xoffsethack, |
294 | colortable_get_transpen_mask( | |
294 | colortable_get_transpen_mask( | |
295 | 295 | |
296 | 296 | /* also plot the sprite with wraparound (tunnel in Crush Roller) */ |
297 | drawgfx_transmask(bitmap,spriteclip, | |
297 | drawgfx_transmask(bitmap,spriteclip, | |
298 | 298 | ( spriteram[offs] >> 2 ) | (m_spritebank << 6), |
299 | 299 | color, |
300 | 300 | fy,fx, //FIXME: flipping bits are really supposed to be inverted here? |
301 | 301 | sx - 256,sy + m_xoffsethack, |
302 | colortable_get_transpen_mask( | |
302 | colortable_get_transpen_mask( | |
303 | 303 | } |
304 | 304 | } |
305 | 305 | |
r17988 | r17989 | |
418 | 418 | color = spriteram[offs + 1] & 0x1f; |
419 | 419 | |
420 | 420 | /* TODO: ?? */ |
421 | drawgfx_transmask(bitmap,cliprect, | |
421 | drawgfx_transmask(bitmap,cliprect, | |
422 | 422 | (spriteram[offs] >> 2) | ((m_s2650_spriteram[offs] & 3) << 6), |
423 | 423 | color, |
424 | 424 | spriteram[offs] & 1,spriteram[offs] & 2, |
425 | 425 | sx,sy, |
426 | colortable_get_transpen_mask( | |
426 | colortable_get_transpen_mask( | |
427 | 427 | } |
428 | 428 | /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ |
429 | 429 | /* one pixel to the left to get a more correct placement */ |
r17988 | r17989 | |
438 | 438 | color = spriteram[offs + 1] & 0x1f; |
439 | 439 | |
440 | 440 | /* TODO: ?? */ |
441 | drawgfx_transmask(bitmap,cliprect, | |
441 | drawgfx_transmask(bitmap,cliprect, | |
442 | 442 | (spriteram[offs] >> 2) | ((m_s2650_spriteram[offs] & 3)<<6), |
443 | 443 | color, |
444 | 444 | spriteram[offs] & 1,spriteram[offs] & 2, |
445 | 445 | sx,sy + m_xoffsethack, |
446 | colortable_get_transpen_mask( | |
446 | colortable_get_transpen_mask( | |
447 | 447 | } |
448 | 448 | return 0; |
449 | 449 | } |
r17988 | r17989 | |
---|---|---|
332 | 332 | |
333 | 333 | m_tilemap_0a->draw(bitmap, cliprect, 0,0); // Opaque |
334 | 334 | m_tilemap_0b->draw(bitmap, cliprect, 0,0); |
335 | draw_sprites( | |
335 | draw_sprites( | |
336 | 336 | m_tilemap_1->draw(bitmap, cliprect, 0,0); |
337 | 337 | return 0; |
338 | 338 | } |
r17988 | r17989 | |
---|---|---|
308 | 308 | m_bgmap->draw(bitmap, cliprect, 0, 0); |
309 | 309 | } |
310 | 310 | else |
311 | bitmap.fill(get_black_pen( | |
311 | bitmap.fill(get_black_pen( | |
312 | 312 | |
313 | 313 | // draw low priority sprites |
314 | draw_sprites( | |
314 | draw_sprites( | |
315 | 315 | |
316 | 316 | // draw foreground |
317 | 317 | if (!(m_mapmask & 2)) |
r17988 | r17989 | |
325 | 325 | } |
326 | 326 | |
327 | 327 | // draw high priority sprites |
328 | draw_sprites( | |
328 | draw_sprites( | |
329 | 329 | |
330 | 330 | // draw text layer |
331 | 331 | // if (m_mapmask & 4) |
r17988 | r17989 | |
---|---|---|
223 | 223 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
224 | 224 | |
225 | 225 | if (m_sf_active & 0x80) |
226 | draw_sprites( | |
226 | draw_sprites( | |
227 | 227 | |
228 | 228 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
229 | 229 | return 0; |
r17988 | r17989 | |
---|---|---|
202 | 202 | { |
203 | 203 | bitmap.fill(511, cliprect); |
204 | 204 | |
205 | draw_layer(screen.machine(), bitmap, cliprect, m_scrollram + 0x000); | |
206 | draw_layer(screen.machine(), bitmap, cliprect, m_scrollram + 0x080); | |
207 | draw_sprites(screen.machine(), bitmap, cliprect); | |
208 | draw_layer(screen.machine(), bitmap, cliprect, m_scrollram + 0x100); | |
205 | draw_layer(machine(), bitmap, cliprect, m_scrollram + 0x000); | |
206 | draw_layer(machine(), bitmap, cliprect, m_scrollram + 0x080); | |
207 | draw_sprites(machine(), bitmap, cliprect); | |
208 | draw_layer(machine(), bitmap, cliprect, m_scrollram + 0x100); | |
209 | 209 | return 0; |
210 | 210 | } |
211 | 211 | |
r17988 | r17989 | |
213 | 213 | UINT32 lsasquad_state::screen_update_daikaiju(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
214 | 214 | { |
215 | 215 | bitmap.fill(511, cliprect); |
216 | drawbg(screen.machine(), bitmap, cliprect, 0); // bottom | |
217 | draw_sprites(screen.machine(), bitmap, cliprect); | |
218 | drawbg(screen.machine(), bitmap, cliprect, 1); // top = palette $d ? | |
216 | drawbg(machine(), bitmap, cliprect, 0); // bottom | |
217 | draw_sprites(machine(), bitmap, cliprect); | |
218 | drawbg(machine(), bitmap, cliprect, 1); // top = palette $d ? | |
219 | 219 | return 0; |
220 | 220 | } |
r17988 | r17989 | |
---|---|---|
1532 | 1532 | int pri, pri2, GFX; |
1533 | 1533 | int layers_ctrl = -1; |
1534 | 1534 | |
1535 | set_pens( | |
1535 | set_pens( | |
1536 | 1536 | |
1537 | 1537 | m_blit.baseaddr = reinterpret_cast<UINT8 *>(bitmap.raw_pixptr(0)); |
1538 | 1538 | m_blit.line_offset = bitmap.rowbytes(); |
r17988 | r17989 | |
1553 | 1553 | |
1554 | 1554 | #ifdef MAME_DEBUG |
1555 | 1555 | { |
1556 | if ( screen.machine().input().code_pressed(KEYCODE_Z) || screen.machine().input().code_pressed(KEYCODE_X) || screen.machine().input().code_pressed(KEYCODE_C) || | |
1557 | screen.machine().input().code_pressed(KEYCODE_V) || screen.machine().input().code_pressed(KEYCODE_B) ) | |
1556 | if ( machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed(KEYCODE_X) || machine().input().code_pressed(KEYCODE_C) || | |
1557 | machine().input().code_pressed(KEYCODE_V) || machine().input().code_pressed(KEYCODE_B) ) | |
1558 | 1558 | { |
1559 | 1559 | int msk = 0, val = 0; |
1560 | 1560 | |
1561 | if (screen.machine().input().code_pressed(KEYCODE_X)) val = 1; // priority 0 only | |
1562 | if (screen.machine().input().code_pressed(KEYCODE_C)) val = 2; // "" 1 | |
1563 | if (screen.machine().input().code_pressed(KEYCODE_V)) val = 4; // "" 2 | |
1564 | if (screen.machine().input().code_pressed(KEYCODE_B)) val = 8; // "" 3 | |
1565 | if (screen.machine().input().code_pressed(KEYCODE_Z)) val = 1|2|4|8; // All of the above priorities | |
1561 | if (machine().input().code_pressed(KEYCODE_X)) val = 1; // priority 0 only | |
1562 | if (machine().input().code_pressed(KEYCODE_C)) val = 2; // "" 1 | |
1563 | if (machine().input().code_pressed(KEYCODE_V)) val = 4; // "" 2 | |
1564 | if (machine().input().code_pressed(KEYCODE_B)) val = 8; // "" 3 | |
1565 | if (machine().input().code_pressed(KEYCODE_Z)) val = 1|2|4|8; // All of the above priorities | |
1566 | 1566 | |
1567 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= val << 0; // for layer 0 | |
1568 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= val << 4; // for layer 1 | |
1569 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= val << 8; // for layer 2 | |
1570 | if (screen.machine().input().code_pressed(KEYCODE_R)) msk |= val << 12; // for layer 3 | |
1571 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= val << 16; // for sprites | |
1567 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= val << 0; // for layer 0 | |
1568 | if (machine().input().code_pressed(KEYCODE_W)) msk |= val << 4; // for layer 1 | |
1569 | if (machine().input().code_pressed(KEYCODE_E)) msk |= val << 8; // for layer 2 | |
1570 | if (machine().input().code_pressed(KEYCODE_R)) msk |= val << 12; // for layer 3 | |
1571 | if (machine().input().code_pressed(KEYCODE_A)) msk |= val << 16; // for sprites | |
1572 | 1572 | if (msk != 0) layers_ctrl &= msk; |
1573 | 1573 | |
1574 | 1574 | #if 1 |
r17988 | r17989 | |
1629 | 1629 | |
1630 | 1630 | for (pri2 = 0; pri2 <= 3; pri2++) // priority of the whole layer |
1631 | 1631 | { |
1632 | if (layers_ctrl & (1 << (pri + 0))) cave_tilemap_draw(screen.machine(), bitmap, cliprect, pri, 0, pri2, 0); | |
1633 | if (layers_ctrl & (1 << (pri + 4))) cave_tilemap_draw(screen.machine(), bitmap, cliprect, pri, 0, pri2, 1); | |
1634 | if (layers_ctrl & (1 << (pri + 8))) cave_tilemap_draw(screen.machine(), bitmap, cliprect, pri, 0, pri2, 2); | |
1635 | if (layers_ctrl & (1 << (pri + 12))) cave_tilemap_draw(screen.machine(), bitmap, cliprect, pri, 0, pri2, 3); | |
1632 | if (layers_ctrl & (1 << (pri + 0))) cave_tilemap_draw(machine(), bitmap, cliprect, pri, 0, pri2, 0); | |
1633 | if (layers_ctrl & (1 << (pri + 4))) cave_tilemap_draw(machine(), bitmap, cliprect, pri, 0, pri2, 1); | |
1634 | if (layers_ctrl & (1 << (pri + 8))) cave_tilemap_draw(machine(), bitmap, cliprect, pri, 0, pri2, 2); | |
1635 | if (layers_ctrl & (1 << (pri + 12))) cave_tilemap_draw(machine(), bitmap, cliprect, pri, 0, pri2, 3); | |
1636 | 1636 | } |
1637 | 1637 | } |
1638 | 1638 | return 0; |
r17988 | r17989 | |
---|---|---|
500 | 500 | |
501 | 501 | UINT32 dooyong_state::screen_update_lastday(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
502 | 502 | { |
503 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
504 | screen.machine().priority_bitmap.fill(0, cliprect); | |
503 | bitmap.fill(get_black_pen(machine()), cliprect); | |
504 | machine().priority_bitmap.fill(0, cliprect); | |
505 | 505 | |
506 | 506 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
507 | 507 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
508 | 508 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
509 | 509 | |
510 | 510 | if (!m_sprites_disabled) |
511 | draw_sprites( | |
511 | draw_sprites( | |
512 | 512 | return 0; |
513 | 513 | } |
514 | 514 | |
515 | 515 | UINT32 dooyong_state::screen_update_gulfstrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
516 | 516 | { |
517 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
518 | screen.machine().priority_bitmap.fill(0, cliprect); | |
517 | bitmap.fill(get_black_pen(machine()), cliprect); | |
518 | machine().priority_bitmap.fill(0, cliprect); | |
519 | 519 | |
520 | 520 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
521 | 521 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
522 | 522 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
523 | 523 | |
524 | draw_sprites( | |
524 | draw_sprites( | |
525 | 525 | return 0; |
526 | 526 | } |
527 | 527 | |
528 | 528 | UINT32 dooyong_state::screen_update_pollux(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
529 | 529 | { |
530 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
531 | screen.machine().priority_bitmap.fill(0, cliprect); | |
530 | bitmap.fill(get_black_pen(machine()), cliprect); | |
531 | machine().priority_bitmap.fill(0, cliprect); | |
532 | 532 | |
533 | 533 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
534 | 534 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
535 | 535 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
536 | 536 | |
537 | draw_sprites( | |
537 | draw_sprites( | |
538 | 538 | return 0; |
539 | 539 | } |
540 | 540 | |
541 | 541 | UINT32 dooyong_state::screen_update_flytiger(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
542 | 542 | { |
543 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
544 | screen.machine().priority_bitmap.fill(0, cliprect); | |
543 | bitmap.fill(get_black_pen(machine()), cliprect); | |
544 | machine().priority_bitmap.fill(0, cliprect); | |
545 | 545 | |
546 | 546 | if (m_flytiger_pri) |
547 | 547 | { |
r17988 | r17989 | |
555 | 555 | } |
556 | 556 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
557 | 557 | |
558 | draw_sprites( | |
558 | draw_sprites( | |
559 | 559 | return 0; |
560 | 560 | } |
561 | 561 | |
562 | 562 | |
563 | 563 | UINT32 dooyong_state::screen_update_bluehawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
564 | 564 | { |
565 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
566 | screen.machine().priority_bitmap.fill(0, cliprect); | |
565 | bitmap.fill(get_black_pen(machine()), cliprect); | |
566 | machine().priority_bitmap.fill(0, cliprect); | |
567 | 567 | |
568 | 568 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
569 | 569 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
570 | 570 | m_fg2_tilemap->draw(bitmap, cliprect, 0, 4); |
571 | 571 | m_tx_tilemap->draw(bitmap, cliprect, 0, 4); |
572 | 572 | |
573 | draw_sprites( | |
573 | draw_sprites( | |
574 | 574 | return 0; |
575 | 575 | } |
576 | 576 | |
577 | 577 | UINT32 dooyong_state::screen_update_primella(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
578 | 578 | { |
579 | bitmap.fill(get_black_pen( | |
579 | bitmap.fill(get_black_pen( | |
580 | 580 | |
581 | 581 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
582 | 582 | if (m_tx_pri) m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
587 | 587 | |
588 | 588 | UINT32 dooyong_state::screen_update_rshark(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
589 | 589 | { |
590 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
591 | screen.machine().priority_bitmap.fill(0, cliprect); | |
590 | bitmap.fill(get_black_pen(machine()), cliprect); | |
591 | machine().priority_bitmap.fill(0, cliprect); | |
592 | 592 | |
593 | 593 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
594 | 594 | m_bg2_tilemap->draw(bitmap, cliprect, 0, (m_rshark_pri ? 2 : 1)); |
595 | 595 | m_fg_tilemap->draw(bitmap, cliprect, 0, 2); |
596 | 596 | m_fg2_tilemap->draw(bitmap, cliprect, 0, 2); |
597 | 597 | |
598 | rshark_draw_sprites( | |
598 | rshark_draw_sprites( | |
599 | 599 | return 0; |
600 | 600 | } |
601 | 601 | |
602 | 602 | UINT32 dooyong_state::screen_update_popbingo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
603 | 603 | { |
604 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
605 | screen.machine().priority_bitmap.fill(0, cliprect); | |
604 | bitmap.fill(get_black_pen(machine()), cliprect); | |
605 | machine().priority_bitmap.fill(0, cliprect); | |
606 | 606 | |
607 | 607 | m_bg_tilemap->draw(bitmap, cliprect, 0, 1); |
608 | 608 | |
609 | rshark_draw_sprites( | |
609 | rshark_draw_sprites( | |
610 | 610 | return 0; |
611 | 611 | } |
612 | 612 |
r17988 | r17989 | |
---|---|---|
247 | 247 | |
248 | 248 | /* fetch the relevant pens */ |
249 | 249 | for (x = 1; x < 16; x++) |
250 | pens[x] = palette_get_color( | |
250 | pens[x] = palette_get_color( | |
251 | 251 | |
252 | 252 | /* loop over rows */ |
253 | 253 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
r17988 | r17989 | |
---|---|---|
252 | 252 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
253 | 253 | |
254 | 254 | /* low priority sprites */ |
255 | draw_sprites( | |
255 | draw_sprites( | |
256 | 256 | |
257 | 257 | /* draw background over low priority sprites */ |
258 | 258 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
259 | 259 | |
260 | 260 | /* high priority sprites */ |
261 | draw_sprites( | |
261 | draw_sprites( | |
262 | 262 | |
263 | 263 | /* fg layer */ |
264 | 264 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
268 | 268 | |
269 | 269 | flip_screen_set(m_bg_control[0] >> 7); |
270 | 270 | |
271 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
272 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03); | |
273 | screen.machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
274 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03); | |
271 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
272 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03); | |
273 | machine().device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); | |
274 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03); | |
275 | 275 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
276 | 276 | return 0; |
277 | 277 | } |
r17988 | r17989 | |
308 | 308 | |
309 | 309 | UINT32 dec8_state::screen_update_ghostb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
310 | 310 | { |
311 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
312 | screen.machine().device<deco_karnovsprites_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); | |
311 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
312 | machine().device<deco_karnovsprites_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); | |
313 | 313 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
314 | 314 | return 0; |
315 | 315 | } |
r17988 | r17989 | |
343 | 343 | flip_screen_set(m_bg_control[1] >> 7); |
344 | 344 | |
345 | 345 | // we mimic the priority scheme in dec0.c, this was originally a bit different, so this could be wrong |
346 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
347 | screen.machine().device<deco_mxc06_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f); | |
348 | screen.machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen.machine(),bitmap,cliprect,0, 0x08,0x08,0x08,0x08); | |
346 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); | |
347 | machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f); | |
348 | machine().device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(machine(),bitmap,cliprect,0, 0x08,0x08,0x08,0x08); | |
349 | 349 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
350 | 350 | return 0; |
351 | 351 | } |
r17988 | r17989 | |
382 | 382 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8)+ m_scroll2[3])); |
383 | 383 | |
384 | 384 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
385 | | |
385 | | |
386 | 386 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
387 | 387 | return 0; |
388 | 388 | } |
r17988 | r17989 | |
395 | 395 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
396 | 396 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
397 | 397 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
398 | | |
398 | | |
399 | 399 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
400 | 400 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
401 | 401 | return 0; |
r17988 | r17989 | |
464 | 464 | m_bg_tilemap->set_scrollx(0, (m_scroll2[0] << 8) + m_scroll2[1]); |
465 | 465 | |
466 | 466 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
467 | srdarwin_draw_sprites( | |
467 | srdarwin_draw_sprites( | |
468 | 468 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
469 | srdarwin_draw_sprites( | |
469 | srdarwin_draw_sprites( | |
470 | 470 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
471 | 471 | return 0; |
472 | 472 | } |
r17988 | r17989 | |
526 | 526 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3])); |
527 | 527 | |
528 | 528 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
529 | | |
529 | | |
530 | 530 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
531 | | |
531 | | |
532 | 532 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
533 | 533 | return 0; |
534 | 534 | } |
r17988 | r17989 | |
539 | 539 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3])); |
540 | 540 | |
541 | 541 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
542 | | |
542 | | |
543 | 543 | m_bg_tilemap->draw(bitmap, cliprect, 1, 0); |
544 | 544 | m_fix_tilemap->draw(bitmap, cliprect, 0, 0); |
545 | 545 | return 0; |
r17988 | r17989 | |
---|---|---|
355 | 355 | |
356 | 356 | /* The bg colour is the last pen i.e. 0x1fff */ |
357 | 357 | bitmap.fill((0x800 * 4) - 1, cliprect); |
358 | | |
358 | | |
359 | 359 | |
360 | fuuki32_draw_layer(screen.machine(), bitmap, cliprect, tm_back, 0, 1); | |
361 | fuuki32_draw_layer(screen.machine(), bitmap, cliprect, tm_middle, 0, 2); | |
362 | fuuki32_draw_layer(screen.machine(), bitmap, cliprect, tm_front, 0, 4); | |
360 | fuuki32_draw_layer(machine(), bitmap, cliprect, tm_back, 0, 1); | |
361 | fuuki32_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2); | |
362 | fuuki32_draw_layer(machine(), bitmap, cliprect, tm_front, 0, 4); | |
363 | 363 | |
364 | 364 | draw_sprites(screen, bitmap, cliprect); |
365 | 365 | return 0; |
r17988 | r17989 | |
---|---|---|
211 | 211 | |
212 | 212 | bitmap.fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */ |
213 | 213 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
214 | draw_sprites( | |
214 | draw_sprites( | |
215 | 215 | m_bg2_tilemap->draw(bitmap, cliprect, 0,0); |
216 | 216 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
217 | 217 | |
r17988 | r17989 | |
230 | 230 | |
231 | 231 | bitmap.fill(0x100, cliprect); /* is there a register controling the colour? looks odd when screen is blank */ |
232 | 232 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
233 | draw_sprites( | |
233 | draw_sprites( | |
234 | 234 | m_bg2_tilemap->draw(bitmap, cliprect, 0,0); |
235 | 235 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
236 | 236 |
r17988 | r17989 | |
---|---|---|
231 | 231 | m_bg_tilemap->mark_all_dirty(); // HACK |
232 | 232 | |
233 | 233 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
234 | draw_sprites(screen.machine(), bitmap, cliprect); | |
235 | draw_fg_bitmap(screen.machine(), bitmap); | |
234 | draw_sprites(machine(), bitmap, cliprect); | |
235 | draw_fg_bitmap(machine(), bitmap); | |
236 | 236 | return 0; |
237 | 237 | } |
r17988 | r17989 | |
---|---|---|
297 | 297 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
298 | 298 | |
299 | 299 | /* low priority sprites */ |
300 | draw_sprites( | |
300 | draw_sprites( | |
301 | 301 | |
302 | 302 | /* high priority tiles */ |
303 | 303 | m_solid_tilemap->draw(bitmap, cliprect, 1, 1); |
304 | 304 | |
305 | 305 | /* high priority sprites */ |
306 | draw_sprites( | |
306 | draw_sprites( | |
307 | 307 | |
308 | 308 | return 0; |
309 | 309 | } |
r17988 | r17989 | |
---|---|---|
271 | 271 | effbins = (m_bins > m_gins) ? m_gins : m_bins; |
272 | 272 | |
273 | 273 | m_background[0]->draw(bitmap, cliprect, 0,0); |
274 | draw_sprites( | |
274 | draw_sprites( | |
275 | 275 | m_background[1]->draw(bitmap, cliprect, 0,0); |
276 | draw_sprites( | |
276 | draw_sprites( | |
277 | 277 | if (m_bitmapram) |
278 | draw_bitmap( | |
278 | draw_bitmap( | |
279 | 279 | return 0; |
280 | 280 | } |
r17988 | r17989 | |
---|---|---|
245 | 245 | { |
246 | 246 | UINT8 *spriteaddr = m_spriteram; |
247 | 247 | int flip = m_video_control[5] ? 0xff : 0x00; /* PLAYER2 */ |
248 | pen_t black = get_black_pen( | |
248 | pen_t black = get_black_pen( | |
249 | 249 | int x, y, offs; |
250 | 250 | |
251 | 251 | /* draw the sprites */ |
r17988 | r17989 | |
260 | 260 | int which = spriteaddr[offs + 0x20]; |
261 | 261 | int color = 0; |
262 | 262 | |
263 | drawgfx_transpen(m_spritebitmap, cliprect, | |
263 | drawgfx_transpen(m_spritebitmap, cliprect, | |
264 | 264 | if (x >= 256 - 16) |
265 | drawgfx_transpen(m_spritebitmap, cliprect, | |
265 | drawgfx_transpen(m_spritebitmap, cliprect, | |
266 | 266 | } |
267 | 267 | |
268 | 268 | /* draw the bitmap to the screen, looping over Y */ |
r17988 | r17989 | |
---|---|---|
727 | 727 | copybitmap_trans(bitmap, m_obj0_bitmap, 0, 0, 0, 0, cliprect, 0); |
728 | 728 | copybitmap_trans(bitmap, m_tree0_bitmap, 0, 0, 0, 0, cliprect, 0); |
729 | 729 | copybitmap_trans(bitmap, m_tree1_bitmap, 0, 0, 0, 0, cliprect, 0); |
730 | draw_obj1( | |
730 | draw_obj1( | |
731 | 731 | |
732 | 732 | return 0; |
733 | 733 | } |
r17988 | r17989 | |
---|---|---|
28 | 28 | layer[1] = layer[0] ^ 1; |
29 | 29 | layer[2] = 2; |
30 | 30 | |
31 | | |
31 | | |
32 | 32 | |
33 | 33 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
34 | 34 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
53 | 53 | layer[1] = layer[0] ^ 1; |
54 | 54 | layer[2] = 2; |
55 | 55 | |
56 | | |
56 | | |
57 | 57 | |
58 | 58 | /* Ensure screen blanked even when bottom layer not drawn due to disable bit */ |
59 | 59 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
---|---|---|
105 | 105 | |
106 | 106 | UINT32 triplhnt_state::screen_update_triplhnt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
107 | 107 | { |
108 | device_t *discrete = | |
108 | device_t *discrete = | |
109 | 109 | |
110 | 110 | m_bg_tilemap->mark_all_dirty(); |
111 | 111 | |
112 | 112 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
113 | 113 | |
114 | draw_sprites( | |
114 | draw_sprites( | |
115 | 115 | |
116 | address_space &space = | |
116 | address_space &space = | |
117 | 117 | discrete_sound_w(discrete, space, TRIPLHNT_BEAR_ROAR_DATA, m_playfield_ram[0xfa] & 15); |
118 | 118 | discrete_sound_w(discrete, space, TRIPLHNT_SHOT_DATA, m_playfield_ram[0xfc] & 15); |
119 | 119 | return 0; |
r17988 | r17989 | |
---|---|---|
193 | 193 | { |
194 | 194 | |
195 | 195 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
196 | draw_sprites( | |
196 | draw_sprites( | |
197 | 197 | return 0; |
198 | 198 | } |
r17988 | r17989 | |
---|---|---|
141 | 141 | UINT32 sidepckt_state::screen_update_sidepckt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
142 | 142 | { |
143 | 143 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1,0); |
144 | draw_sprites( | |
144 | draw_sprites( | |
145 | 145 | m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0,0); |
146 | 146 | return 0; |
147 | 147 | } |
r17988 | r17989 | |
---|---|---|
62 | 62 | { |
63 | 63 | int bg_colorbase = 16; |
64 | 64 | |
65 | | |
65 | | |
66 | 66 | bitmap.fill(16 * bg_colorbase, cliprect); |
67 | 67 | k051316_zoom_draw(m_k051316, bitmap, cliprect, 0, 1); |
68 | 68 | k053245_sprites_draw(m_k053244, bitmap, cliprect); |
r17988 | r17989 | |
---|---|---|
248 | 248 | if (m_ship_size & 0x40) color += 0x3a; |
249 | 249 | if (m_ship_size & 0x80) color += 0x48; |
250 | 250 | |
251 | colortable_palette_set_color(screen.machine().colortable, 3, MAKE_RGB(color,color,color)); | |
252 | colortable_palette_set_color(screen.machine().colortable, 7, MAKE_RGB(color < 0xb8 ? color + 0x48 : 0xff, | |
251 | colortable_palette_set_color(machine().colortable, 3, MAKE_RGB(color,color,color)); | |
252 | colortable_palette_set_color(machine().colortable, 7, MAKE_RGB(color < 0xb8 ? color + 0x48 : 0xff, | |
253 | 253 | color < 0xb8 ? color + 0x48 : 0xff, |
254 | 254 | color < 0xb8 ? color + 0x48 : 0xff)); |
255 | 255 | |
r17988 | r17989 | |
261 | 261 | int code = m_alpha_num_ram[32 * i + j]; |
262 | 262 | |
263 | 263 | drawgfx_opaque(bitmap, cliprect, |
264 | | |
264 | | |
265 | 265 | code, |
266 | 266 | m_video_invert, |
267 | 267 | 0, 0, |
r17988 | r17989 | |
269 | 269 | 192 + 8 * i); |
270 | 270 | } |
271 | 271 | |
272 | draw_pt(screen.machine(), bitmap, cliprect); | |
273 | draw_ship(screen.machine(), bitmap, cliprect); | |
274 | draw_torpedo(screen.machine(), bitmap, cliprect); | |
275 | draw_water(screen.machine().colortable, bitmap, cliprect); | |
272 | draw_pt(machine(), bitmap, cliprect); | |
273 | draw_ship(machine(), bitmap, cliprect); | |
274 | draw_torpedo(machine(), bitmap, cliprect); | |
275 | draw_water(machine().colortable, bitmap, cliprect); | |
276 | 276 | return 0; |
277 | 277 | } |
278 | 278 | |
r17988 | r17989 | |
288 | 288 | |
289 | 289 | m_helper.fill(0); |
290 | 290 | |
291 | draw_ship( | |
291 | draw_ship( | |
292 | 292 | |
293 | 293 | for (y = 128; y < 224 - m_torpedo_v; y++) |
294 | 294 | { |
r17988 | r17989 | |
---|---|---|
106 | 106 | m_fg_tilemap->set_scrollx(0,m_scroll[0]); |
107 | 107 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
108 | 108 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
109 | draw_sprites( | |
109 | draw_sprites( | |
110 | 110 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
111 | 111 | return 0; |
112 | 112 | } |
r17988 | r17989 | |
---|---|---|
102 | 102 | UINT32 tankbatt_state::screen_update_tankbatt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
103 | 103 | { |
104 | 104 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
105 | draw_bullets( | |
105 | draw_bullets( | |
106 | 106 | return 0; |
107 | 107 | } |
r17988 | r17989 | |
---|---|---|
353 | 353 | int sx, sy, offs, i; |
354 | 354 | |
355 | 355 | /* draw background */ |
356 | draw_background( | |
356 | draw_background( | |
357 | 357 | |
358 | 358 | /* draw sprites */ |
359 | 359 | for (i = 0; i < m_spriteram.bytes(); i += 4) |
r17988 | r17989 | |
370 | 370 | int code2 = code; |
371 | 371 | |
372 | 372 | int color = ((flags >> 1) & 0x03) | ((code >> 5) & 0x04) | (code & 0x08) | (m_sprite_palette * 16); |
373 | gfx_element *gfx = doubled ? | |
373 | gfx_element *gfx = doubled ? | |
374 | 374 | |
375 | 375 | if (m_cocktail_flip) |
376 | 376 | { |
r17988 | r17989 | |
389 | 389 | code &= ~0x10, code2 |= 0x10; |
390 | 390 | |
391 | 391 | drawgfx_transmask(bitmap, cliprect, gfx, code2, color, xflip, yflip, x, y + gfx->height(), |
392 | colortable_get_transpen_mask( | |
392 | colortable_get_transpen_mask( | |
393 | 393 | } |
394 | 394 | |
395 | 395 | drawgfx_transmask(bitmap, cliprect, gfx, code, color, xflip, yflip, x, y, |
396 | colortable_get_transpen_mask( | |
396 | colortable_get_transpen_mask( | |
397 | 397 | |
398 | 398 | if (doubled) i += 4; |
399 | 399 | } |
r17988 | r17989 | |
406 | 406 | int y = m_cocktail_flip ? (31*8 - 8*sy) : 8*sy; |
407 | 407 | |
408 | 408 | offs = sx + sy * 64; |
409 | drawgfx_transpen(bitmap, cliprect, | |
409 | drawgfx_transpen(bitmap, cliprect, | |
410 | 410 | m_videoram[offs] + 256 * m_char_bank, |
411 | 411 | ((m_videoram[offs] & 0xf0) >> 4) + m_char_palette * 16, |
412 | 412 | m_cocktail_flip, m_cocktail_flip, x, y, 0); |
r17988 | r17989 | |
---|---|---|
196 | 196 | m_pant[1]->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1),0); |
197 | 197 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1) | TILEMAP_DRAW_LAYER0,0); |
198 | 198 | |
199 | draw_sprites( | |
199 | draw_sprites( | |
200 | 200 | |
201 | 201 | m_pant[0]->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1) | TILEMAP_DRAW_LAYER1,0); |
202 | 202 | |
203 | draw_sprites( | |
203 | draw_sprites( | |
204 | 204 | |
205 | 205 | return 0; |
206 | 206 | } |
r17988 | r17989 | |
---|---|---|
127 | 127 | void segas18_state::draw_vdp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority) |
128 | 128 | { |
129 | 129 | |
130 | bitmap_ind8 &priority_bitmap = | |
130 | bitmap_ind8 &priority_bitmap = | |
131 | 131 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
132 | 132 | { |
133 | 133 | // UINT16 *src = vdp->m_render_line; // can't use this because we're not in RGB32, which we'll need to be if there are palette effects |
r17988 | r17989 | |
---|---|---|
119 | 119 | { |
120 | 120 | m_bg_layer->draw(bitmap, cliprect, 0, 0); |
121 | 121 | m_fg_layer->draw(bitmap, cliprect, 0, 0); |
122 | | |
122 | | |
123 | 123 | return 0; |
124 | 124 | } |
r17988 | r17989 | |
---|---|---|
43 | 43 | UINT8 *spriteram = m_spriteram; |
44 | 44 | int offs; |
45 | 45 | |
46 | device_t *discrete = | |
46 | device_t *discrete = | |
47 | 47 | |
48 | 48 | /* for every character in the Video RAM, check if it has been modified */ |
49 | 49 | /* since last time and update it accordingly. */ |
r17988 | r17989 | |
76 | 76 | |
77 | 77 | /* draw the left screen */ |
78 | 78 | if ((left_enable || left_sonar_window) && (!right_sonar_window)) |
79 | drawgfx_opaque(bitmap,cliprect, | |
79 | drawgfx_opaque(bitmap,cliprect, | |
80 | 80 | charcode, 1, |
81 | 81 | 0,0,sx,sy); |
82 | 82 | else |
83 | drawgfx_opaque(bitmap,cliprect, | |
83 | drawgfx_opaque(bitmap,cliprect, | |
84 | 84 | 0, 1, |
85 | 85 | 0,0,sx,sy); |
86 | 86 | } |
r17988 | r17989 | |
106 | 106 | |
107 | 107 | /* left screen - special check for drawing right screen's sub */ |
108 | 108 | if ((offs!=0) || (sub_enable)) |
109 | drawgfx_transpen(bitmap,cliprect, | |
109 | drawgfx_transpen(bitmap,cliprect, | |
110 | 110 | charcode + 32 * prom_set, |
111 | 111 | 0, |
112 | 112 | 0,0,sx,sy,0); |
113 | 113 | } |
114 | 114 | |
115 | 115 | /* Update sound */ |
116 | address_space &space = | |
116 | address_space &space = | |
117 | 117 | discrete_sound_w(discrete, space, SUBS_LAUNCH_DATA, spriteram[5] & 0x0f); // Launch data |
118 | 118 | discrete_sound_w(discrete, space, SUBS_CRASH_DATA, spriteram[5] >> 4); // Crash/explode data |
119 | 119 | return 0; |
r17988 | r17989 | |
156 | 156 | |
157 | 157 | /* draw the right screen */ |
158 | 158 | if ((right_enable || right_sonar_window) && (!left_sonar_window)) |
159 | drawgfx_opaque(bitmap,cliprect, | |
159 | drawgfx_opaque(bitmap,cliprect, | |
160 | 160 | charcode, 0, |
161 | 161 | 0,0,sx,sy); |
162 | 162 | else |
163 | drawgfx_opaque(bitmap,cliprect, | |
163 | drawgfx_opaque(bitmap,cliprect, | |
164 | 164 | 0, 0, |
165 | 165 | 0,0,sx,sy); |
166 | 166 | } |
r17988 | r17989 | |
185 | 185 | charcode = (charcode >> 3) & 0x1F; |
186 | 186 | |
187 | 187 | if ((offs!=1) || (sub_enable)) |
188 | drawgfx_transpen(bitmap,cliprect, | |
188 | drawgfx_transpen(bitmap,cliprect, | |
189 | 189 | charcode + 32 * prom_set, |
190 | 190 | 0, |
191 | 191 | 0,0,sx,sy,0); |
r17988 | r17989 | |
---|---|---|
133 | 133 | |
134 | 134 | #define DM_GETSCROLL(n) (((m_scroll[(n)]<<1)&0xff) + ((m_scroll[(n)]&0x80)?1:0) +( ((m_scroll[(n)-1]<<4) | (m_scroll[(n)-1]<<12) )&0xff00)) |
135 | 135 | |
136 | set_pens( | |
136 | set_pens( | |
137 | 137 | |
138 | 138 | m_bgtilemap->set_scrollx(0, DM_GETSCROLL(0x2)); |
139 | 139 | m_bgtilemap->set_scrolly(0, DM_GETSCROLL(0x6)); |
140 | 140 | m_fgtilemap->set_scrollx(0, DM_GETSCROLL(0xa)); |
141 | 141 | m_fgtilemap->set_scrolly(0, DM_GETSCROLL(0xe)); |
142 | 142 | |
143 | bitmap.fill(get_black_pen( | |
143 | bitmap.fill(get_black_pen( | |
144 | 144 | |
145 | 145 | if(m_hw & DISPLAY_BG) |
146 | 146 | m_bgtilemap->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
175 | 175 | palette=((spriteram[i+1])>>1)&0xf; |
176 | 176 | |
177 | 177 | if(spriteram[i+1]&0x1) |
178 | palette= | |
178 | palette= | |
179 | 179 | |
180 | 180 | palette+=32; |
181 | 181 | |
182 | 182 | drawgfx_transpen( |
183 | 183 | bitmap,cliprect, |
184 | | |
184 | | |
185 | 185 | tile, |
186 | 186 | palette, |
187 | 187 | fx,fy, |
r17988 | r17989 | |
---|---|---|
91 | 91 | |
92 | 92 | k052109_tilemap_update(m_k052109); |
93 | 93 | |
94 | | |
94 | | |
95 | 95 | |
96 | bitmap.fill(get_black_pen( | |
96 | bitmap.fill(get_black_pen( | |
97 | 97 | k052109_tilemap_draw(m_k052109, bitmap, cliprect, 2, 0, 1); |
98 | 98 | if (m_priority) |
99 | 99 | { |
r17988 | r17989 | |
---|---|---|
77 | 77 | int x, y, offs; |
78 | 78 | offs = 0; |
79 | 79 | |
80 | bitmap.fill(get_black_pen( | |
80 | bitmap.fill(get_black_pen( | |
81 | 81 | |
82 | 82 | /* tilemap .. convert it .. banking makes it slightly more annoying but still easy */ |
83 | 83 | for (y = 0; y < 32; y++) |
r17988 | r17989 | |
87 | 87 | int data; |
88 | 88 | |
89 | 89 | data = m_banked_vram[offs] | (m_banked_vram[offs + 1] << 8); |
90 | drawgfx_transpen(bitmap, cliprect, | |
90 | drawgfx_transpen(bitmap, cliprect, | |
91 | 91 | offs += 2; |
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | draw_sprites( | |
95 | draw_sprites( | |
96 | 96 | |
97 | 97 | #if 0 |
98 | if ( | |
98 | if ( | |
99 | 99 | { |
100 | 100 | FILE *fp; |
101 | 101 |
r17988 | r17989 | |
---|---|---|
63 | 63 | // on Irem boards, screen flip is handled in both hardware and software. |
64 | 64 | // this game doesn't have cocktail mode so if there's software control we don't |
65 | 65 | // know where it is mapped. |
66 | flip_screen_set(~ | |
66 | flip_screen_set(~ | |
67 | 67 | |
68 | 68 | |
69 | 69 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
64 | 64 | pen_t pens[NUM_PENS]; |
65 | 65 | int x, y; |
66 | 66 | |
67 | get_pens( | |
67 | get_pens( | |
68 | 68 | |
69 | 69 | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
70 | 70 | { |
r17988 | r17989 | |
---|---|---|
990 | 990 | nmk16_draw_sprites_flipsupported(machine, bitmap,cliprect,0); |
991 | 991 | } |
992 | 992 | |
993 | UINT32 nmk16_state::screen_update_afega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(screen.machine(),bitmap,cliprect, 1, -0x100,+0x000, 0x0001); return 0; } | |
994 | UINT32 nmk16_state::screen_update_bubl2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(screen.machine(),bitmap,cliprect, 0, -0x100,+0x000, 0x0001); return 0; } // no flipscreen support, I really would confirmation from the schematics | |
995 | UINT32 nmk16_state::screen_update_redhawkb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(screen.machine(),bitmap,cliprect, 0, +0x000,+0x100, 0x0001); return 0; } | |
996 | UINT32 nmk16_state::screen_update_redhawki(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ redhawki_video_update(screen.machine(),bitmap,cliprect); return 0;} // strange scroll regs | |
993 | UINT32 nmk16_state::screen_update_afega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(machine(),bitmap,cliprect, 1, -0x100,+0x000, 0x0001); return 0; } | |
994 | UINT32 nmk16_state::screen_update_bubl2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(machine(),bitmap,cliprect, 0, -0x100,+0x000, 0x0001); return 0; } // no flipscreen support, I really would confirmation from the schematics | |
995 | UINT32 nmk16_state::screen_update_redhawkb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ video_update(machine(),bitmap,cliprect, 0, +0x000,+0x100, 0x0001); return 0; } | |
996 | UINT32 nmk16_state::screen_update_redhawki(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect){ redhawki_video_update(machine(),bitmap,cliprect); return 0;} // strange scroll regs | |
997 | 997 | |
998 | 998 | UINT32 nmk16_state::screen_update_firehawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
999 | 999 | { |
r17988 | r17989 | |
1002 | 1002 | |
1003 | 1003 | m_bg_tilemap0->draw(bitmap, cliprect, 0,0); |
1004 | 1004 | |
1005 | nmk16_draw_sprites_flipsupported(screen.machine(), bitmap,cliprect,3); | |
1006 | nmk16_draw_sprites_flipsupported(screen.machine(), bitmap,cliprect,2); | |
1007 | nmk16_draw_sprites_flipsupported(screen.machine(), bitmap,cliprect,1); | |
1008 | nmk16_draw_sprites_flipsupported(screen.machine(), bitmap,cliprect,0); | |
1005 | nmk16_draw_sprites_flipsupported(machine(), bitmap,cliprect,3); | |
1006 | nmk16_draw_sprites_flipsupported(machine(), bitmap,cliprect,2); | |
1007 | nmk16_draw_sprites_flipsupported(machine(), bitmap,cliprect,1); | |
1008 | nmk16_draw_sprites_flipsupported(machine(), bitmap,cliprect,0); | |
1009 | 1009 | |
1010 | 1010 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
1011 | 1011 | return 0; |
r17988 | r17989 | |
---|---|---|
150 | 150 | int y; |
151 | 151 | |
152 | 152 | for (y = IREMM10_VBEND; y < IREMM10_VBSTART; y++) |
153 | plot_pixel_m10( | |
153 | plot_pixel_m10( | |
154 | 154 | } |
155 | 155 | |
156 | 156 | for (offs = m_videoram.bytes() - 1; offs >= 0; offs--) |
r17988 | r17989 | |
---|---|---|
73 | 73 | { |
74 | 74 | |
75 | 75 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
76 | draw_roadway( | |
76 | draw_roadway( | |
77 | 77 | return 0; |
78 | 78 | } |
r17988 | r17989 | |
---|---|---|
412 | 412 | |
413 | 413 | if ( ( m_videomode & 0x81 ) == 1 || (m_videomode & 0x80 && pen & 0x80) ) |
414 | 414 | { |
415 | *dest++ = screen.machine().pens[hirescol[pen & 0x0f]]; | |
416 | *dest++ = screen.machine().pens[hirescol[(pen >> 4) & 0x0f]]; | |
415 | *dest++ = machine().pens[hirescol[pen & 0x0f]]; | |
416 | *dest++ = machine().pens[hirescol[(pen >> 4) & 0x0f]]; | |
417 | 417 | } |
418 | 418 | else |
419 | 419 | { |
420 | *dest++ = screen.machine().pens[lorescol[pen]]; | |
421 | *dest++ = screen.machine().pens[lorescol[pen]]; | |
420 | *dest++ = machine().pens[lorescol[pen]]; | |
421 | *dest++ = machine().pens[lorescol[pen]]; | |
422 | 422 | } |
423 | 423 | } |
424 | 424 | } |
r17988 | r17989 | |
---|---|---|
73 | 73 | /* draw sprites */ |
74 | 74 | for (i = 0; i < 2; i++) |
75 | 75 | { |
76 | drawgfx_transpen(bitmap, cliprect, | |
76 | drawgfx_transpen(bitmap, cliprect, | |
77 | 77 | m_video_ram[0x399 + 4 * i], |
78 | 78 | i, |
79 | 79 | 0, 0, |
80 | 80 | m_video_ram[0x390 + 2 * i] - 7, |
81 | 81 | m_video_ram[0x398 + 4 * i] - 16, 0); |
82 | 82 | |
83 | drawgfx_transpen(bitmap, cliprect, | |
83 | drawgfx_transpen(bitmap, cliprect, | |
84 | 84 | m_video_ram[0x39b + 4 * i], |
85 | 85 | i, |
86 | 86 | 0, 0, |
r17988 | r17989 | |
---|---|---|
199 | 199 | |
200 | 200 | UINT32 expro02_state::screen_update_galsnew(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
201 | 201 | { |
202 | // kaneko16_fill_bitmap( | |
202 | // kaneko16_fill_bitmap( | |
203 | 203 | int y,x; |
204 | 204 | int count; |
205 | 205 | |
r17988 | r17989 | |
238 | 238 | |
239 | 239 | int i; |
240 | 240 | |
241 | | |
241 | | |
242 | 242 | |
243 | 243 | m_view2_0->kaneko16_prepare(bitmap, cliprect); |
244 | 244 | |
r17988 | r17989 | |
247 | 247 | m_view2_0->render_tilemap_chip(bitmap,cliprect,i); |
248 | 248 | } |
249 | 249 | |
250 | m_kaneko_spr->kaneko16_render_sprites( | |
250 | m_kaneko_spr->kaneko16_render_sprites( | |
251 | 251 | return 0; |
252 | 252 | } |
253 | 253 |
r17988 | r17989 | |
---|---|---|
415 | 415 | |
416 | 416 | UINT32 magicard_state::screen_update_magicard(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
417 | 417 | { |
418 | magicard_state *state = | |
418 | magicard_state *state = | |
419 | 419 | int x,y; |
420 | 420 | UINT32 count; |
421 | 421 | |
422 | bitmap.fill(get_black_pen( | |
422 | bitmap.fill(get_black_pen( | |
423 | 423 | |
424 | 424 | if(!(SCC_DE_VREG)) //display enable |
425 | 425 | return 0; |
r17988 | r17989 | |
437 | 437 | color = ((m_magicram[count]) & 0x000f)>>0; |
438 | 438 | |
439 | 439 | if(cliprect.contains((x*4)+3, y)) |
440 | bitmap.pix32(y, (x*4)+3) = | |
440 | bitmap.pix32(y, (x*4)+3) = | |
441 | 441 | |
442 | 442 | color = ((m_magicram[count]) & 0x00f0)>>4; |
443 | 443 | |
444 | 444 | if(cliprect.contains((x*4)+2, y)) |
445 | bitmap.pix32(y, (x*4)+2) = | |
445 | bitmap.pix32(y, (x*4)+2) = | |
446 | 446 | |
447 | 447 | color = ((m_magicram[count]) & 0x0f00)>>8; |
448 | 448 | |
449 | 449 | if(cliprect.contains((x*4)+1, y)) |
450 | bitmap.pix32(y, (x*4)+1) = | |
450 | bitmap.pix32(y, (x*4)+1) = | |
451 | 451 | |
452 | 452 | color = ((m_magicram[count]) & 0xf000)>>12; |
453 | 453 | |
454 | 454 | if(cliprect.contains((x*4)+0, y)) |
455 | bitmap.pix32(y, (x*4)+0) = | |
455 | bitmap.pix32(y, (x*4)+0) = | |
456 | 456 | |
457 | 457 | count++; |
458 | 458 | } |
r17988 | r17989 | |
469 | 469 | color = ((m_magicram[count]) & 0x00ff)>>0; |
470 | 470 | |
471 | 471 | if(cliprect.contains((x*2)+1, y)) |
472 | bitmap.pix32(y, (x*2)+1) = | |
472 | bitmap.pix32(y, (x*2)+1) = | |
473 | 473 | |
474 | 474 | color = ((m_magicram[count]) & 0xff00)>>8; |
475 | 475 | |
476 | 476 | if(cliprect.contains((x*2)+0, y)) |
477 | bitmap.pix32(y, (x*2)+0) = | |
477 | bitmap.pix32(y, (x*2)+0) = | |
478 | 478 | |
479 | 479 | count++; |
480 | 480 | } |
r17988 | r17989 | |
---|---|---|
217 | 217 | int tileno = m_videoram[count]&0x3f; |
218 | 218 | int attr = m_videoram[count+0x400]&0x0f; |
219 | 219 | |
220 | drawgfx_transpen(bitmap,cliprect, | |
220 | drawgfx_transpen(bitmap,cliprect, | |
221 | 221 | |
222 | 222 | count++; |
223 | 223 |
r17988 | r17989 | |
---|---|---|
84 | 84 | |
85 | 85 | UINT32 snowbros_state::screen_update_snowbros(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
86 | 86 | { |
87 | device_t *pandora = | |
87 | device_t *pandora = | |
88 | 88 | |
89 | 89 | /* This clears & redraws the entire screen each pass */ |
90 | 90 | bitmap.fill(0xf0, cliprect); |
r17988 | r17989 | |
98 | 98 | // rising edge |
99 | 99 | if (state) |
100 | 100 | { |
101 | device_t *pandora = | |
101 | device_t *pandora = | |
102 | 102 | pandora_eof(pandora); |
103 | 103 | } |
104 | 104 | } |
r17988 | r17989 | |
---|---|---|
284 | 284 | { |
285 | 285 | |
286 | 286 | if (m_disable_roz) |
287 | bitmap.fill( | |
287 | bitmap.fill( | |
288 | 288 | else |
289 | 289 | { |
290 | 290 | int p1, p2, p3, p4; |
r17988 | r17989 | |
324 | 324 | 0, 0); |
325 | 325 | } |
326 | 326 | |
327 | zerotrgt_draw_sprites( | |
327 | zerotrgt_draw_sprites( | |
328 | 328 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
329 | 329 | |
330 | 330 | return 0; |
r17988 | r17989 | |
334 | 334 | { |
335 | 335 | |
336 | 336 | if (m_disable_roz) |
337 | bitmap.fill( | |
337 | bitmap.fill( | |
338 | 338 | else |
339 | 339 | { |
340 | 340 | int p1, p2, p3, p4; |
r17988 | r17989 | |
372 | 372 | 0, 0); |
373 | 373 | } |
374 | 374 | |
375 | cntsteer_draw_sprites( | |
375 | cntsteer_draw_sprites( | |
376 | 376 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
377 | 377 | |
378 | 378 | return 0; |
r17988 | r17989 | |
---|---|---|
111 | 111 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
112 | 112 | |
113 | 113 | bitmap.fill(0, cliprect); /* not Confirmed */ |
114 | | |
114 | | |
115 | 115 | |
116 | 116 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
117 | 117 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 4); |
118 | | |
118 | | |
119 | 119 | return 0; |
120 | 120 | } |
121 | 121 |
r17988 | r17989 | |
---|---|---|
424 | 424 | |
425 | 425 | UINT32 hornet_state::screen_update_hornet(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
426 | 426 | { |
427 | device_t *voodoo = screen.machine().device("voodoo0"); | |
428 | device_t *k037122 = screen.machine().device("k037122_1"); | |
427 | device_t *voodoo = machine().device("voodoo0"); | |
428 | device_t *k037122 = machine().device("k037122_1"); | |
429 | 429 | |
430 | 430 | voodoo_update(voodoo, bitmap, cliprect); |
431 | 431 | |
r17988 | r17989 | |
440 | 440 | { |
441 | 441 | if (strcmp(screen.tag(), ":lscreen") == 0) |
442 | 442 | { |
443 | device_t *k037122 = screen.machine().device("k037122_1"); | |
444 | device_t *voodoo = screen.machine().device("voodoo0"); | |
443 | device_t *k037122 = machine().device("k037122_1"); | |
444 | device_t *voodoo = machine().device("voodoo0"); | |
445 | 445 | voodoo_update(voodoo, bitmap, cliprect); |
446 | 446 | |
447 | 447 | /* TODO: tilemaps per screen */ |
r17988 | r17989 | |
449 | 449 | } |
450 | 450 | else if (strcmp(screen.tag(), ":rscreen") == 0) |
451 | 451 | { |
452 | device_t *k037122 = screen.machine().device("k037122_2"); | |
453 | device_t *voodoo = screen.machine().device("voodoo1"); | |
452 | device_t *k037122 = machine().device("k037122_2"); | |
453 | device_t *voodoo = machine().device("voodoo1"); | |
454 | 454 | voodoo_update(voodoo, bitmap, cliprect); |
455 | 455 | |
456 | 456 | /* TODO: tilemaps per screen */ |
r17988 | r17989 | |
---|---|---|
159 | 159 | g = ((pal >> 4) & 0xf) << 4; |
160 | 160 | r = ((pal >> 8) & 0xf) << 4; |
161 | 161 | |
162 | palette_set_color( | |
162 | palette_set_color( | |
163 | 163 | } |
164 | 164 | |
165 | 165 | for (i = 0; i < 0x800; i += 2) |
r17988 | r17989 | |
172 | 172 | g = ((pal >> 4) & 0xf) << 4; |
173 | 173 | r = ((pal >> 8) & 0xf) << 4; |
174 | 174 | |
175 | palette_set_color( | |
175 | palette_set_color( | |
176 | 176 | } |
177 | 177 | |
178 | 178 | bitmap.fill(0x3ff, cliprect); |
r17988 | r17989 | |
191 | 191 | tileno = 0x2000 + (tileno & 0x1fff) + 0x0000; |
192 | 192 | } |
193 | 193 | |
194 | drawgfx_opaque(bitmap, cliprect, | |
194 | drawgfx_opaque(bitmap, cliprect, | |
195 | 195 | count += 2; |
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | draw_sprites( | |
199 | draw_sprites( | |
200 | 200 | |
201 | 201 | return 0; |
202 | 202 | } |
r17988 | r17989 | |
---|---|---|
384 | 384 | { |
385 | 385 | bitmap.fill(0, cliprect); |
386 | 386 | |
387 | draw_framebuffer( | |
387 | draw_framebuffer( | |
388 | 388 | |
389 | 389 | if (m_disp_ctrl_reg[DC_OUTPUT_CFG] & 0x1) // don't show MDA text screen on 16-bit mode. this is basically a hack |
390 | 390 | { |
391 | draw_cga( | |
391 | draw_cga( | |
392 | 392 | } |
393 | 393 | return 0; |
394 | 394 | } |
r17988 | r17989 | |
---|---|---|
42 | 42 | |
43 | 43 | UINT32 summit_state::screen_update_summit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
44 | 44 | { |
45 | gfx_element *gfx = | |
45 | gfx_element *gfx = | |
46 | 46 | int count = 0x0000; |
47 | 47 | |
48 | 48 | int y,x; |
r17988 | r17989 | |
---|---|---|
485 | 485 | { |
486 | 486 | int i; |
487 | 487 | |
488 | | |
488 | | |
489 | 489 | |
490 | 490 | if (BIT(m_vidattrram[6], 0)) |
491 | 491 | { |
r17988 | r17989 | |
531 | 531 | m_mlow_tilemap->draw(bitmap, cliprect, 0, 0x02); |
532 | 532 | m_mhigh_tilemap->draw(bitmap, cliprect, 0, 0x04); |
533 | 533 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0x10); |
534 | draw_sprites( | |
534 | draw_sprites( | |
535 | 535 | return 0; |
536 | 536 | } |
537 | 537 |
r17988 | r17989 | |
---|---|---|
119 | 119 | UINT32 vroulet_state::screen_update_vroulet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
120 | 120 | { |
121 | 121 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
122 | drawgfx_transpen(bitmap, cliprect, | |
122 | drawgfx_transpen(bitmap, cliprect, | |
123 | 123 | m_ball[1], m_ball[0] - 12, 0); |
124 | 124 | return 0; |
125 | 125 | } |
r17988 | r17989 | |
---|---|---|
252 | 252 | |
253 | 253 | UINT32 coinmvga_state::screen_update_coinmvga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
254 | 254 | { |
255 | gfx_element *gfx = | |
255 | gfx_element *gfx = | |
256 | 256 | int count = 0x04000/2; |
257 | 257 | |
258 | 258 | int y,x; |
r17988 | r17989 | |
---|---|---|
124 | 124 | int i; |
125 | 125 | static const int xxx=320,yyy=204; |
126 | 126 | |
127 | bitmap.fill(get_black_pen( | |
127 | bitmap.fill(get_black_pen( | |
128 | 128 | |
129 | 129 | for (i=0;i<0x100;i++) |
130 | 130 | { |
r17988 | r17989 | |
140 | 140 | b = (dat>>10) & 0x1f; |
141 | 141 | b = BITSWAP8(b,7,6,5,0,1,2,3,4); |
142 | 142 | |
143 | palette_set_color_rgb( | |
143 | palette_set_color_rgb( | |
144 | 144 | } |
145 | 145 | |
146 | 146 | count=0; |
r17988 | r17989 | |
229 | 229 | int i; |
230 | 230 | static const int xxx=320,yyy=204; |
231 | 231 | |
232 | bitmap.fill(get_black_pen( | |
232 | bitmap.fill(get_black_pen( | |
233 | 233 | |
234 | 234 | for (i=0;i<0x1000-3;i+=3) |
235 | 235 | { |
r17988 | r17989 | |
238 | 238 | g = m_pal[i+1]; |
239 | 239 | b = m_pal[i+2]; |
240 | 240 | |
241 | palette_set_color_rgb( | |
241 | palette_set_color_rgb( | |
242 | 242 | } |
243 | 243 | |
244 | 244 | count=0; |
r17988 | r17989 | |
---|---|---|
195 | 195 | UINT16* src1; |
196 | 196 | UINT32* dst; |
197 | 197 | UINT16 pixdata1; |
198 | const pen_t *paldata = | |
198 | const pen_t *paldata = | |
199 | 199 | |
200 | 200 | bitmap.fill(0x0000, cliprect); |
201 | 201 | |
r17988 | r17989 | |
259 | 259 | UINT16 pen = dat1+0x4000; |
260 | 260 | UINT32 pal = paldata[pen]; |
261 | 261 | |
262 | if (gp3_is_alpha_pen( | |
262 | if (gp3_is_alpha_pen( | |
263 | 263 | { |
264 | 264 | int r,g,b; |
265 | 265 | r = (pal & 0x00ff0000)>>16; |
r17988 | r17989 | |
287 | 287 | UINT16 pen = dat2+0x4100; |
288 | 288 | UINT32 pal = paldata[pen]; |
289 | 289 | |
290 | if (gp3_is_alpha_pen( | |
290 | if (gp3_is_alpha_pen( | |
291 | 291 | { |
292 | 292 | int r,g,b; |
293 | 293 | r = (pal & 0x00ff0000)>>16; |
r17988 | r17989 | |
319 | 319 | /* |
320 | 320 | else if (pridat==0x2f) // area outside of the girl |
321 | 321 | { |
322 | //dst[0] = | |
322 | //dst[0] = | |
323 | 323 | } |
324 | 324 | |
325 | 325 | else if (pridat==0x00) // the initial line / box that gets drawn |
326 | 326 | { |
327 | //dst[0] = | |
327 | //dst[0] = | |
328 | 328 | } |
329 | 329 | else if (pridat==0x30) // during the 'gals boxes' on the intro |
330 | 330 | { |
331 | //dst[0] = | |
331 | //dst[0] = | |
332 | 332 | } |
333 | 333 | else if (pridat==0x0c) // 'nice' at end of level |
334 | 334 | { |
335 | //dst[0] = | |
335 | //dst[0] = | |
336 | 336 | } |
337 | 337 | else |
338 | 338 | { |
r17988 | r17989 | |
346 | 346 | |
347 | 347 | m_sprite_bitmap_1.fill(0x0000, cliprect); |
348 | 348 | |
349 | m_spritegen->skns_draw_sprites( | |
349 | m_spritegen->skns_draw_sprites( | |
350 | 350 | |
351 | 351 | // ignoring priority bits for now.. |
352 | 352 | for (y=0;y<240;y++) |
r17988 | r17989 | |
---|---|---|
90 | 90 | int x,y,count; |
91 | 91 | const UINT8 *blit_ram = memregion("gfx1")->base(); |
92 | 92 | |
93 | if( | |
93 | if( | |
94 | 94 | m_test_x++; |
95 | 95 | |
96 | if( | |
96 | if( | |
97 | 97 | m_test_x--; |
98 | 98 | |
99 | if( | |
99 | if( | |
100 | 100 | m_test_y++; |
101 | 101 | |
102 | if( | |
102 | if( | |
103 | 103 | m_test_y--; |
104 | 104 | |
105 | if( | |
105 | if( | |
106 | 106 | m_start_offs+=0x200; |
107 | 107 | |
108 | if( | |
108 | if( | |
109 | 109 | m_start_offs-=0x200; |
110 | 110 | |
111 | if( | |
111 | if( | |
112 | 112 | m_start_offs++; |
113 | 113 | |
114 | if( | |
114 | if( | |
115 | 115 | m_start_offs--; |
116 | 116 | |
117 | 117 | popmessage("%d %d %04x",m_test_x,m_test_y,m_start_offs); |
118 | 118 | |
119 | bitmap.fill(get_black_pen( | |
119 | bitmap.fill(get_black_pen( | |
120 | 120 | |
121 | 121 | count = (m_start_offs); |
122 | 122 | |
r17988 | r17989 | |
129 | 129 | color = (blit_ram[count] & 0xff)>>0; |
130 | 130 | |
131 | 131 | if(cliprect.contains(x, y)) |
132 | bitmap.pix32(y, x) = | |
132 | bitmap.pix32(y, x) = | |
133 | 133 | |
134 | 134 | count++; |
135 | 135 | } |
r17988 | r17989 | |
---|---|---|
185 | 185 | |
186 | 186 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
187 | 187 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
188 | draw_sprites( | |
188 | draw_sprites( | |
189 | 189 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
190 | 190 | return 0; |
191 | 191 | } |
r17988 | r17989 | |
201 | 201 | |
202 | 202 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
203 | 203 | m_fg_tilemap->draw(bitmap, cliprect, 0,0); |
204 | draw_sprites( | |
204 | draw_sprites( | |
205 | 205 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
206 | 206 | return 0; |
207 | 207 | } |
r17988 | r17989 | |
---|---|---|
569 | 569 | |
570 | 570 | count = 0; |
571 | 571 | |
572 | bitmap.fill( | |
572 | bitmap.fill( | |
573 | 573 | |
574 | 574 | for(y = 0; y < 8; y++) |
575 | 575 | { |
r17988 | r17989 | |
581 | 581 | int tile = m_np_vram[count] & 0x3f; |
582 | 582 | int colour = (m_np_vram[count] & 0xc0) >> 6; |
583 | 583 | |
584 | drawgfx_opaque(bitmap,cliprect, | |
584 | drawgfx_opaque(bitmap,cliprect, | |
585 | 585 | |
586 | 586 | count+=2; |
587 | 587 | } |
r17988 | r17989 | |
593 | 593 | int tile = m_np_vram[count] & 0x3f; |
594 | 594 | int colour = (m_np_vram[count] & 0xc0) >> 6; |
595 | 595 | |
596 | drawgfx_opaque(bitmap,cliprect, | |
596 | drawgfx_opaque(bitmap,cliprect, | |
597 | 597 | |
598 | 598 | count++; |
599 | 599 | } |
r17988 | r17989 | |
---|---|---|
1307 | 1307 | |
1308 | 1308 | #if 0 |
1309 | 1309 | static int base = 0x0; |
1310 | const UINT8 *gfx = | |
1310 | const UINT8 *gfx = | |
1311 | 1311 | int next; |
1312 | 1312 | memset(m_ddenlovr_pixmap[0], 0, 512 * 512); |
1313 | 1313 | memset(m_ddenlovr_pixmap[1], 0, 512 * 512); |
r17988 | r17989 | |
1318 | 1318 | m_ddenlovr_blit_pen_mode = 0; |
1319 | 1319 | m_ddenlovr_blit_y = 5; |
1320 | 1320 | m_ddenlovr_clip_ctrl = 0x0f; |
1321 | next = blit_draw( | |
1321 | next = blit_draw( | |
1322 | 1322 | popmessage("GFX %06x", base); |
1323 | if (screen.machine().input().code_pressed(KEYCODE_S)) base = next; | |
1324 | if (screen.machine().input().code_pressed_once(KEYCODE_X)) base = next; | |
1325 | if (screen.machine().input().code_pressed(KEYCODE_C)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; } | |
1326 | if (screen.machine().input().code_pressed(KEYCODE_V)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; } | |
1327 | if (screen.machine().input().code_pressed_once(KEYCODE_D)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; } | |
1328 | if (screen.machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; } | |
1323 | if (machine().input().code_pressed(KEYCODE_S)) base = next; | |
1324 | if (machine().input().code_pressed_once(KEYCODE_X)) base = next; | |
1325 | if (machine().input().code_pressed(KEYCODE_C)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; } | |
1326 | if (machine().input().code_pressed(KEYCODE_V)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; } | |
1327 | if (machine().input().code_pressed_once(KEYCODE_D)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; } | |
1328 | if (machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; } | |
1329 | 1329 | #endif |
1330 | 1330 | |
1331 | 1331 | bitmap.fill(m_ddenlovr_bgcolor, cliprect); |
1332 | 1332 | |
1333 | 1333 | #ifdef MAME_DEBUG |
1334 | if ( | |
1334 | if ( | |
1335 | 1335 | { |
1336 | 1336 | int mask, mask2; |
1337 | 1337 | |
1338 | 1338 | mask = 0; |
1339 | 1339 | |
1340 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
1341 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
1342 | if (screen.machine().input().code_pressed(KEYCODE_E)) mask |= 4; | |
1343 | if (screen.machine().input().code_pressed(KEYCODE_R)) mask |= 8; | |
1340 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
1341 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
1342 | if (machine().input().code_pressed(KEYCODE_E)) mask |= 4; | |
1343 | if (machine().input().code_pressed(KEYCODE_R)) mask |= 8; | |
1344 | 1344 | |
1345 | 1345 | mask2 = 0; |
1346 | 1346 | |
1347 | 1347 | if (m_extra_layers) |
1348 | 1348 | { |
1349 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask2 |= 1; | |
1350 | if (screen.machine().input().code_pressed(KEYCODE_S)) mask2 |= 2; | |
1351 | if (screen.machine().input().code_pressed(KEYCODE_D)) mask2 |= 4; | |
1352 | if (screen.machine().input().code_pressed(KEYCODE_F)) mask2 |= 8; | |
1349 | if (machine().input().code_pressed(KEYCODE_A)) mask2 |= 1; | |
1350 | if (machine().input().code_pressed(KEYCODE_S)) mask2 |= 2; | |
1351 | if (machine().input().code_pressed(KEYCODE_D)) mask2 |= 4; | |
1352 | if (machine().input().code_pressed(KEYCODE_F)) mask2 |= 8; | |
1353 | 1353 | } |
1354 | 1354 | |
1355 | 1355 | if (mask || mask2) |
r17988 | r17989 | |
1368 | 1368 | pri = 0; |
1369 | 1369 | } |
1370 | 1370 | |
1371 | copylayer(screen.machine(), bitmap, cliprect, order[pri][0]); | |
1372 | copylayer(screen.machine(), bitmap, cliprect, order[pri][1]); | |
1373 | copylayer(screen.machine(), bitmap, cliprect, order[pri][2]); | |
1374 | copylayer(screen.machine(), bitmap, cliprect, order[pri][3]); | |
1371 | copylayer(machine(), bitmap, cliprect, order[pri][0]); | |
1372 | copylayer(machine(), bitmap, cliprect, order[pri][1]); | |
1373 | copylayer(machine(), bitmap, cliprect, order[pri][2]); | |
1374 | copylayer(machine(), bitmap, cliprect, order[pri][3]); | |
1375 | 1375 | |
1376 | 1376 | if (m_extra_layers) |
1377 | 1377 | { |
r17988 | r17989 | |
1383 | 1383 | pri = 0; |
1384 | 1384 | } |
1385 | 1385 | |
1386 | copylayer(screen.machine(), bitmap, cliprect, order[pri][0] + 4); | |
1387 | copylayer(screen.machine(), bitmap, cliprect, order[pri][1] + 4); | |
1388 | copylayer(screen.machine(), bitmap, cliprect, order[pri][2] + 4); | |
1389 | copylayer(screen.machine(), bitmap, cliprect, order[pri][3] + 4); | |
1386 | copylayer(machine(), bitmap, cliprect, order[pri][0] + 4); | |
1387 | copylayer(machine(), bitmap, cliprect, order[pri][1] + 4); | |
1388 | copylayer(machine(), bitmap, cliprect, order[pri][2] + 4); | |
1389 | copylayer(machine(), bitmap, cliprect, order[pri][3] + 4); | |
1390 | 1390 | } |
1391 | 1391 | |
1392 | 1392 | m_ddenlovr_layer_enable = enab; |
r17988 | r17989 | |
---|---|---|
351 | 351 | |
352 | 352 | UINT32 viper_state::screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
353 | 353 | { |
354 | device_t *device = | |
354 | device_t *device = | |
355 | 355 | return voodoo_update(device, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; |
356 | 356 | } |
357 | 357 |
r17988 | r17989 | |
---|---|---|
205 | 205 | UINT32 pinkiri8_state::screen_update_pinkiri8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
206 | 206 | { |
207 | 207 | int col_bank; |
208 | gfx_element *gfx = | |
208 | gfx_element *gfx = | |
209 | 209 | |
210 | 210 | /* update palette */ |
211 | 211 | for (int pen = 0; pen < 0x800 ; pen++) |
r17988 | r17989 | |
214 | 214 | int r = (val & 0x001f) >> 0; |
215 | 215 | int g = (val & 0x03e0) >> 5; |
216 | 216 | int b = (val & 0x7c00) >> 10; |
217 | palette_set_color_rgb( | |
217 | palette_set_color_rgb( | |
218 | 218 | } |
219 | 219 | |
220 | 220 | int game_type_hack = 0; |
221 | 221 | |
222 | if (!strcmp( | |
222 | if (!strcmp( | |
223 | 223 | |
224 | if ( | |
224 | if ( | |
225 | 225 | { |
226 | 226 | int i; |
227 | 227 | int count2; |
r17988 | r17989 | |
251 | 251 | //popmessage("%02x",m_janshi_crtc_regs[0x0a]); |
252 | 252 | col_bank = (m_janshi_crtc_regs[0x0a] & 0x40) >> 6; |
253 | 253 | |
254 | bitmap.fill(get_black_pen( | |
254 | bitmap.fill(get_black_pen( | |
255 | 255 | |
256 | 256 | /* FIXME: color is a bit of a mystery */ |
257 | 257 | { |
r17988 | r17989 | |
325 | 325 | |
326 | 326 | if (bit) |
327 | 327 | { |
328 | //col = | |
328 | //col = | |
329 | 329 | width = 2; |
330 | 330 | } |
331 | 331 | else |
r17988 | r17989 | |
---|---|---|
212 | 212 | |
213 | 213 | m_bg2_tilemap->set_scrolly(0, m_scroll | (m_scrollhi << 8)); |
214 | 214 | m_bg2_tilemap->draw(bitmap, cliprect, 0, 0); |
215 | draw_sprites( | |
215 | draw_sprites( | |
216 | 216 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
217 | 217 | return 0; |
218 | 218 | } |
r17988 | r17989 | |
---|---|---|
169 | 169 | color |= (((m_bitmap[count + pen_i*0x2000]) >> (7 - i)) & 1) << pen_i; |
170 | 170 | |
171 | 171 | if (cliprect.contains(x + i, y)) |
172 | bitmap.pix32(y, x + i) = | |
172 | bitmap.pix32(y, x + i) = | |
173 | 173 | } |
174 | 174 | |
175 | 175 | count++; |
r17988 | r17989 | |
---|---|---|
152 | 152 | color = ((m_blit_ram[count]) & 0x00ff)>>0; |
153 | 153 | |
154 | 154 | if(cliprect.contains((x*2)+0, y)) |
155 | bitmap.pix32(y, (x*2)+0) = | |
155 | bitmap.pix32(y, (x*2)+0) = | |
156 | 156 | |
157 | 157 | color = ((m_blit_ram[count]) & 0xff00)>>8; |
158 | 158 | |
159 | 159 | if(cliprect.contains((x*2)+1, y)) |
160 | bitmap.pix32(y, (x*2)+1) = | |
160 | bitmap.pix32(y, (x*2)+1) = | |
161 | 161 | |
162 | 162 | count++; |
163 | 163 | } |
r17988 | r17989 | |
---|---|---|
228 | 228 | layercontrol = m_cps_b_regs[0x20 / 2]; |
229 | 229 | |
230 | 230 | /* Get video memory base registers */ |
231 | cps1_get_video_base( | |
231 | cps1_get_video_base( | |
232 | 232 | |
233 | 233 | /* Build palette */ |
234 | fcrash_build_palette( | |
234 | fcrash_build_palette( | |
235 | 235 | |
236 | fcrash_update_transmasks( | |
236 | fcrash_update_transmasks( | |
237 | 237 | |
238 | 238 | m_bg_tilemap[0]->set_scrollx(0, m_scroll1x - 62); |
239 | 239 | m_bg_tilemap[0]->set_scrolly(0, m_scroll1y); |
r17988 | r17989 | |
270 | 270 | /* Blank screen */ |
271 | 271 | bitmap.fill(0xbff, cliprect); |
272 | 272 | |
273 | | |
273 | | |
274 | 274 | l0 = (layercontrol >> 0x06) & 03; |
275 | 275 | l1 = (layercontrol >> 0x08) & 03; |
276 | 276 | l2 = (layercontrol >> 0x0a) & 03; |
277 | 277 | l3 = (layercontrol >> 0x0c) & 03; |
278 | 278 | |
279 | fcrash_render_layer( | |
279 | fcrash_render_layer( | |
280 | 280 | |
281 | 281 | if (l1 == 0) |
282 | fcrash_render_high_layer( | |
282 | fcrash_render_high_layer( | |
283 | 283 | |
284 | fcrash_render_layer( | |
284 | fcrash_render_layer( | |
285 | 285 | |
286 | 286 | if (l2 == 0) |
287 | fcrash_render_high_layer( | |
287 | fcrash_render_high_layer( | |
288 | 288 | |
289 | fcrash_render_layer( | |
289 | fcrash_render_layer( | |
290 | 290 | |
291 | 291 | if (l3 == 0) |
292 | fcrash_render_high_layer( | |
292 | fcrash_render_high_layer( | |
293 | 293 | |
294 | fcrash_render_layer( | |
294 | fcrash_render_layer( | |
295 | 295 | |
296 | 296 | return 0; |
297 | 297 | } |
r17988 | r17989 | |
307 | 307 | layercontrol = m_cps_b_regs[0x20 / 2]; |
308 | 308 | |
309 | 309 | /* Get video memory base registers */ |
310 | cps1_get_video_base( | |
310 | cps1_get_video_base( | |
311 | 311 | |
312 | 312 | /* Build palette */ |
313 | fcrash_build_palette( | |
313 | fcrash_build_palette( | |
314 | 314 | |
315 | fcrash_update_transmasks( | |
315 | fcrash_update_transmasks( | |
316 | 316 | |
317 | 317 | m_bg_tilemap[0]->set_scrollx(0, m_scroll1x); |
318 | 318 | m_bg_tilemap[0]->set_scrolly(0, m_scroll1y); |
r17988 | r17989 | |
350 | 350 | /* Blank screen */ |
351 | 351 | bitmap.fill(0xbff, cliprect); |
352 | 352 | |
353 | | |
353 | | |
354 | 354 | l0 = (layercontrol >> 0x06) & 03; |
355 | 355 | l1 = (layercontrol >> 0x08) & 03; |
356 | 356 | l2 = (layercontrol >> 0x0a) & 03; |
357 | 357 | l3 = (layercontrol >> 0x0c) & 03; |
358 | 358 | |
359 | fcrash_render_layer( | |
359 | fcrash_render_layer( | |
360 | 360 | |
361 | 361 | if (l1 == 0) |
362 | fcrash_render_high_layer( | |
362 | fcrash_render_high_layer( | |
363 | 363 | |
364 | fcrash_render_layer( | |
364 | fcrash_render_layer( | |
365 | 365 | |
366 | 366 | if (l2 == 0) |
367 | fcrash_render_high_layer( | |
367 | fcrash_render_high_layer( | |
368 | 368 | |
369 | fcrash_render_layer( | |
369 | fcrash_render_layer( | |
370 | 370 | |
371 | 371 | if (l3 == 0) |
372 | fcrash_render_high_layer( | |
372 | fcrash_render_high_layer( | |
373 | 373 | |
374 | fcrash_render_layer( | |
374 | fcrash_render_layer( | |
375 | 375 | |
376 | 376 | return 0; |
377 | 377 | } |
r17988 | r17989 | |
---|---|---|
540 | 540 | UINT32 majorpkr_state::screen_update_majorpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
541 | 541 | { |
542 | 542 | |
543 | bitmap.fill(get_black_pen( | |
543 | bitmap.fill(get_black_pen( | |
544 | 544 | |
545 | 545 | rectangle custom_clip; |
546 | 546 |
r17988 | r17989 | |
---|---|---|
526 | 526 | if (x & 0x8000) x -= 0x10000; |
527 | 527 | if (y & 0x8000) y -= 0x10000; |
528 | 528 | |
529 | drawgfx_transpen(bitmap,cliprect, | |
529 | drawgfx_transpen(bitmap,cliprect, | |
530 | 530 | } |
531 | 531 | |
532 | 532 | return 0; |
r17988 | r17989 | |
---|---|---|
415 | 415 | int layers_ctrl = -1; |
416 | 416 | |
417 | 417 | #ifdef MAME_DEBUG |
418 | if ( | |
418 | if ( | |
419 | 419 | { |
420 | 420 | int mask = 0; |
421 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
422 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
423 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
421 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
422 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
423 | if (machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
424 | 424 | if (mask != 0) layers_ctrl &= mask; |
425 | 425 | } |
426 | 426 | #endif |
427 | 427 | |
428 | if (debug_viewer( | |
428 | if (debug_viewer( | |
429 | 429 | return 0; |
430 | 430 | |
431 | bitmap.fill(get_black_pen( | |
431 | bitmap.fill(get_black_pen( | |
432 | 432 | |
433 | 433 | if (m_video_disable) |
434 | 434 | return 0; |
435 | 435 | |
436 | 436 | if (layers_ctrl & 1) m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
437 | 437 | |
438 | if (layers_ctrl & 4) draw_sprites( | |
438 | if (layers_ctrl & 4) draw_sprites( | |
439 | 439 | |
440 | 440 | if (layers_ctrl & 2) m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
441 | 441 |
r17988 | r17989 | |
---|---|---|
74 | 74 | { |
75 | 75 | int x,y; |
76 | 76 | |
77 | if( | |
77 | if( | |
78 | 78 | m_bank--; |
79 | 79 | |
80 | if( | |
80 | if( | |
81 | 81 | m_bank++; |
82 | 82 | |
83 | if( | |
83 | if( | |
84 | 84 | { |
85 | 85 | m_screenw--; |
86 | 86 | printf("%x\n",m_screenw); |
87 | 87 | } |
88 | 88 | |
89 | if( | |
89 | if( | |
90 | 90 | { |
91 | 91 | m_screenw++; |
92 | 92 | printf("%x\n",m_screenw); |
93 | 93 | } |
94 | 94 | |
95 | if( | |
95 | if( | |
96 | 96 | { |
97 | 97 | FILE * p=fopen("vram.bin","wb"); |
98 | 98 | fwrite(&m_vram[0],1,0x10000,p); |
r17988 | r17989 | |
104 | 104 | { |
105 | 105 | for(x=0;x<256;x++) |
106 | 106 | { |
107 | drawgfx_transpen(bitmap,cliprect, | |
107 | drawgfx_transpen(bitmap,cliprect, | |
108 | 108 | m_vram[y*m_screenw+x], |
109 | 109 | //(m_vram[y*m_screenw+x]&0x3f)+(m_bank>>1)*64, |
110 | 110 | 0, |
r17988 | r17989 | |
---|---|---|
78 | 78 | |
79 | 79 | UINT32 shanghai_state::screen_update_shanghai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
80 | 80 | { |
81 | device_t *hd63484 = | |
81 | device_t *hd63484 = | |
82 | 82 | int x, y, b, src; |
83 | 83 | |
84 | address_space &space = | |
84 | address_space &space = | |
85 | 85 | b = ((hd63484_regs_r(hd63484, space, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, space, 0xce/2, 0xffff); |
86 | 86 | for (y = 0; y < 280; y++) |
87 | 87 | { |
r17988 | r17989 | |
---|---|---|
467 | 467 | |
468 | 468 | UINT32 amaticmg_state::screen_update_amaticmg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
469 | 469 | { |
470 | gfx_element *gfx = | |
470 | gfx_element *gfx = | |
471 | 471 | int y,x; |
472 | 472 | int count = 0; |
473 | 473 | |
r17988 | r17989 | |
492 | 492 | |
493 | 493 | UINT32 amaticmg_state::screen_update_amaticmg2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
494 | 494 | { |
495 | gfx_element *gfx = | |
495 | gfx_element *gfx = | |
496 | 496 | int y,x; |
497 | 497 | int count = 16; |
498 | 498 |
r17988 | r17989 | |
---|---|---|
509 | 509 | { |
510 | 510 | int x,y; |
511 | 511 | int count; |
512 | gfx_element *gfx = | |
512 | gfx_element *gfx = | |
513 | 513 | |
514 | 514 | count = 0; |
515 | 515 |
r17988 | r17989 | |
---|---|---|
66 | 66 | //popmessage("%02x",(*m_bgvram) & 0x1f); |
67 | 67 | for (bg_offs = ((*m_bgvram) << 4); bg_offs < (((*m_bgvram) << 4) | 0xf); bg_offs++) |
68 | 68 | { |
69 | drawgfx_opaque(bitmap,cliprect, | |
69 | drawgfx_opaque(bitmap,cliprect, | |
70 | 70 | bg_offs, |
71 | 71 | 1, |
72 | 72 | 0,0, |
r17988 | r17989 | |
76 | 76 | |
77 | 77 | sx = 0; |
78 | 78 | |
79 | prom = | |
79 | prom = | |
80 | 80 | for (offs = 0; offs < m_objectram.bytes(); offs += 4) |
81 | 81 | { |
82 | 82 | /* skip empty sprites */ |
r17988 | r17989 | |
126 | 126 | flipy = !flipy; |
127 | 127 | } |
128 | 128 | |
129 | drawgfx_transpen(bitmap,cliprect, | |
129 | drawgfx_transpen(bitmap,cliprect, | |
130 | 130 | code, |
131 | 131 | 0, |
132 | 132 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
208 | 208 | |
209 | 209 | UINT32 photon_state::screen_update_photon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
210 | 210 | { |
211 | return pk8000_video_update(screen, bitmap, cliprect, | |
211 | return pk8000_video_update(screen, bitmap, cliprect, | |
212 | 212 | } |
213 | 213 | |
214 | 214 | static MACHINE_CONFIG_START( photon, photon_state ) |
r17988 | r17989 | |
---|---|---|
168 | 168 | |
169 | 169 | UINT32 sigmab52_state::screen_update_jwildb52(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
170 | 170 | { |
171 | device_t *hd63484 = | |
171 | device_t *hd63484 = | |
172 | 172 | |
173 | 173 | int x, y, b, src; |
174 | 174 | |
175 | address_space &space = | |
175 | address_space &space = | |
176 | 176 | b = ((hd63484_regs_r(hd63484, space, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, space, 0xce/2, 0xffff); |
177 | 177 | |
178 | 178 | //save vram to file |
179 | 179 | #if 0 |
180 | if ( | |
180 | if ( | |
181 | 181 | { |
182 | 182 | FILE *p = fopen("vram.bin", "wb"); |
183 | 183 | fwrite(&HD63484_ram[0], 1, 0x40000 * 4, p); |
r17988 | r17989 | |
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | if (! | |
204 | if (! | |
205 | 205 | if ((hd63484_regs_r(hd63484, space, 0x06/2, 0xffff) & 0x0300) == 0x0300) |
206 | 206 | { |
207 | 207 | int sy = (hd63484_regs_r(hd63484, space, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(hd63484, space, 0x88/2, 0xffff) >> 8); |
r17988 | r17989 | |
---|---|---|
158 | 158 | for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) |
159 | 159 | { |
160 | 160 | UINT32 srcpix = *src++; |
161 | *dst++ = screen.machine().pens[srcpix & 0xf]; | |
162 | *dst++ = screen.machine().pens[(srcpix >> 4) & 0xf]; | |
161 | *dst++ = machine().pens[srcpix & 0xf]; | |
162 | *dst++ = machine().pens[(srcpix >> 4) & 0xf]; | |
163 | 163 | } |
164 | 164 | } |
165 | 165 |
r17988 | r17989 | |
---|---|---|
90 | 90 | |
91 | 91 | UINT32 itgamble_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
92 | 92 | { |
93 | bitmap.fill(get_black_pen( | |
93 | bitmap.fill(get_black_pen( | |
94 | 94 | return 0; |
95 | 95 | } |
96 | 96 |
r17988 | r17989 | |
---|---|---|
142 | 142 | |
143 | 143 | UINT32 sub_state::screen_update_sub(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
144 | 144 | { |
145 | gfx_element *gfx = screen.machine().gfx[0]; | |
146 | gfx_element *gfx_1 = screen.machine().gfx[1]; | |
145 | gfx_element *gfx = machine().gfx[0]; | |
146 | gfx_element *gfx_1 = machine().gfx[1]; | |
147 | 147 | int y,x; |
148 | 148 | int count = 0; |
149 | 149 |
r17988 | r17989 | |
---|---|---|
210 | 210 | { |
211 | 211 | int y,x; |
212 | 212 | int count; |
213 | gfx_element *gfx = | |
213 | gfx_element *gfx = | |
214 | 214 | |
215 | 215 | count = 0; |
216 | 216 | for (y=0;y<32;y++) |
r17988 | r17989 | |
---|---|---|
145 | 145 | flipy = (spriteram[offs+1]&0x80)>>7; |
146 | 146 | flipx = (spriteram[offs+1]&0x40)>>6; |
147 | 147 | |
148 | drawgfx_transpen(bitmap,cliprect, | |
148 | drawgfx_transpen(bitmap,cliprect, | |
149 | 149 | spriteram[offs+1]&0x3f, |
150 | 150 | pal, |
151 | 151 | flipx,flipy, |
r17988 | r17989 | |
---|---|---|
98 | 98 | UINT32 suprgolf_state::screen_update_suprgolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
99 | 99 | { |
100 | 100 | int x,y,count,color; |
101 | bitmap.fill(get_black_pen( | |
101 | bitmap.fill(get_black_pen( | |
102 | 102 | |
103 | 103 | { |
104 | 104 | count = 0; |
r17988 | r17989 | |
110 | 110 | color = m_bg_fb[count]; |
111 | 111 | |
112 | 112 | if(x <= cliprect.max_x && y <= cliprect.max_y) |
113 | bitmap.pix16(y, x) = | |
113 | bitmap.pix16(y, x) = | |
114 | 114 | |
115 | 115 | count++; |
116 | 116 | } |
r17988 | r17989 | |
127 | 127 | color = m_fg_fb[count]; |
128 | 128 | |
129 | 129 | if(((m_fg_fb[count] & 0x0f) != 0x0f) && (x <= cliprect.max_x && y <= cliprect.max_y)) |
130 | bitmap.pix16(y, x) = | |
130 | bitmap.pix16(y, x) = | |
131 | 131 | |
132 | 132 | count++; |
133 | 133 | } |
r17988 | r17989 | |
---|---|---|
227 | 227 | b++; |
228 | 228 | } |
229 | 229 | } |
230 | if (! | |
230 | if (! | |
231 | 231 | if ((hd63484_regs_r(m_hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) |
232 | 232 | { |
233 | 233 | int sy = (hd63484_regs_r(m_hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(m_hd63484, 0x88/2, 0xffff) >> 8); |
r17988 | r17989 | |
---|---|---|
154 | 154 | color |= ((bg_rom[y*320/8+x+(pen_i*0x20000)+yi*0x400+m_bg_bank*0x2000+1] >> (7-xi)) & 1) << pen_i; |
155 | 155 | |
156 | 156 | if(cliprect.contains(x*8+xi, y*8+yi)) |
157 | bitmap.pix32(y*8+yi, x*8+xi) = | |
157 | bitmap.pix32(y*8+yi, x*8+xi) = | |
158 | 158 | } |
159 | 159 | } |
160 | 160 | } |
r17988 | r17989 | |
---|---|---|
350 | 350 | { |
351 | 351 | int x,y,count; |
352 | 352 | int off,scrolly; |
353 | gfx_element *gfx = screen.machine().gfx[0]; | |
354 | gfx_element *sprites = screen.machine().gfx[1]; | |
355 | gfx_element *track = screen.machine().gfx[2]; | |
353 | gfx_element *gfx = machine().gfx[0]; | |
354 | gfx_element *sprites = machine().gfx[1]; | |
355 | gfx_element *track = machine().gfx[2]; | |
356 | 356 | |
357 | bitmap.fill(get_black_pen( | |
357 | bitmap.fill(get_black_pen( | |
358 | 358 | |
359 | 359 | |
360 | 360 | /* Draw racetrack |
r17988 | r17989 | |
---|---|---|
78 | 78 | UINT32 cmmb_state::screen_update_cmmb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
79 | 79 | { |
80 | 80 | UINT8 *videoram = m_videoram; |
81 | gfx_element *gfx = | |
81 | gfx_element *gfx = | |
82 | 82 | int count = 0x00000; |
83 | 83 | |
84 | 84 | int y,x; |
r17988 | r17989 | |
---|---|---|
184 | 184 | UINT8 code = m_tile_ram[32 * i + j]; |
185 | 185 | |
186 | 186 | drawgfx_transpen(bitmap, cliprect, |
187 | | |
187 | | |
188 | 188 | code, |
189 | 189 | 0, |
190 | 190 | code & 0x40, code & 0x40, |
r17988 | r17989 | |
193 | 193 | } |
194 | 194 | } |
195 | 195 | |
196 | draw_boxer( | |
196 | draw_boxer( | |
197 | 197 | return 0; |
198 | 198 | } |
199 | 199 |
r17988 | r17989 | |
---|---|---|
376 | 376 | { |
377 | 377 | if(srcline[x]) |
378 | 378 | { |
379 | rgb_t color=palette_get_color( | |
379 | rgb_t color=palette_get_color( | |
380 | 380 | PLOT_PIXEL_RGB(x,y,RGB_RED(color),RGB_GREEN(color),RGB_BLUE(color)); |
381 | 381 | } |
382 | 382 | } |
r17988 | r17989 | |
---|---|---|
201 | 201 | static int pivot = 15; |
202 | 202 | int pri; |
203 | 203 | |
204 | update_palette( | |
204 | update_palette( | |
205 | 205 | |
206 | if( screen.machine().input().code_pressed_once(KEYCODE_H)&&(pivot<15) ) pivot+=1; | |
207 | if( screen.machine().input().code_pressed_once(KEYCODE_J)&&(pivot>0) ) pivot-=1; | |
206 | if( machine().input().code_pressed_once(KEYCODE_H)&&(pivot<15) ) pivot+=1; | |
207 | if( machine().input().code_pressed_once(KEYCODE_J)&&(pivot>0) ) pivot-=1; | |
208 | 208 | |
209 | 209 | for( pri=0; pri<pivot; pri++ ) |
210 | 210 | { |
r17988 | r17989 | |
---|---|---|
108 | 108 | for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) |
109 | 109 | { |
110 | 110 | UINT32 srcpix = *src++; |
111 | *dst++ = screen.machine().pens[srcpix & 0xf]; | |
112 | *dst++ = screen.machine().pens[(srcpix >> 4) & 0xf]; | |
111 | *dst++ = machine().pens[srcpix & 0xf]; | |
112 | *dst++ = machine().pens[(srcpix >> 4) & 0xf]; | |
113 | 113 | } |
114 | 114 | } |
115 | 115 |
r17988 | r17989 | |
---|---|---|
311 | 311 | /* If screen output is disabled, fill with black */ |
312 | 312 | if (!(VREG(VCR0) & VCR0_DEN)) |
313 | 313 | { |
314 | bitmap.fill(get_black_pen( | |
314 | bitmap.fill(get_black_pen( | |
315 | 315 | return 0; |
316 | 316 | } |
317 | 317 | |
r17988 | r17989 | |
453 | 453 | for (i = 0; i < 16; ++i) |
454 | 454 | { |
455 | 455 | UINT16 entry = *palbase++; |
456 | palette_set_color_rgb( | |
456 | palette_set_color_rgb( | |
457 | 457 | } |
458 | 458 | } |
459 | 459 | } |
r17988 | r17989 | |
---|---|---|
43 | 43 | UINT32 rgum_state::screen_update_royalgum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
44 | 44 | { |
45 | 45 | int x,y,count; |
46 | gfx_element *gfx = | |
46 | gfx_element *gfx = | |
47 | 47 | |
48 | 48 | count = 0; |
49 | 49 |
r17988 | r17989 | |
---|---|---|
1099 | 1099 | |
1100 | 1100 | void nv2a_renderer::vblank_callback(screen_device &screen, bool state) |
1101 | 1101 | { |
1102 | chihiro_state *chst= | |
1102 | chihiro_state *chst= | |
1103 | 1103 | |
1104 | 1104 | printf("vblank_callback\n\r"); |
1105 | 1105 | if (state == true) |
r17988 | r17989 | |
---|---|---|
2421 | 2421 | |
2422 | 2422 | UINT32 namcos23_state::screen_update_ss23(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
2423 | 2423 | { |
2424 | bitmap.fill(get_black_pen( | |
2424 | bitmap.fill(get_black_pen( | |
2425 | 2425 | |
2426 | render_run( | |
2426 | render_run( | |
2427 | 2427 | |
2428 | gfx_element *gfx = | |
2428 | gfx_element *gfx = | |
2429 | 2429 | gfx->mark_all_dirty(); |
2430 | 2430 | |
2431 | 2431 | m_bgtilemap->draw(bitmap, cliprect, 0/*flags*/, 0/*priority*/ ); /* opaque */ |
r17988 | r17989 | |
---|---|---|
139 | 139 | |
140 | 140 | for (offs = 0; offs < 0x8000; offs++) |
141 | 141 | { |
142 | mjsister_plot0(screen.machine(), offs, m_videoram0[offs]); | |
143 | mjsister_plot1(screen.machine(), offs, m_videoram1[offs]); | |
142 | mjsister_plot0(machine(), offs, m_videoram0[offs]); | |
143 | mjsister_plot1(machine(), offs, m_videoram1[offs]); | |
144 | 144 | } |
145 | 145 | m_screen_redraw = 0; |
146 | 146 | } |
r17988 | r17989 | |
155 | 155 | copybitmap_trans(bitmap, *m_tmpbitmap1, flip, flip, 2, 0, cliprect, 0); |
156 | 156 | } |
157 | 157 | else |
158 | bitmap.fill(get_black_pen( | |
158 | bitmap.fill(get_black_pen( | |
159 | 159 | return 0; |
160 | 160 | } |
161 | 161 |
r17988 | r17989 | |
---|---|---|
1600 | 1600 | // rising edge |
1601 | 1601 | if (state) |
1602 | 1602 | { |
1603 | | |
1603 | | |
1604 | 1604 | } |
1605 | 1605 | } |
1606 | 1606 |
r17988 | r17989 | |
---|---|---|
528 | 528 | } |
529 | 529 | |
530 | 530 | if (m_sprite_enable) |
531 | drawgfx_transpen(bitmap,cliprect, | |
531 | drawgfx_transpen(bitmap,cliprect, | |
532 | 532 | m_sprite_code, |
533 | 533 | m_sprite_color, |
534 | 534 | 0,0, |
r17988 | r17989 | |
---|---|---|
460 | 460 | { |
461 | 461 | bitmap.fill(0x1f0, cliprect); |
462 | 462 | |
463 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); | |
464 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); | |
463 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); | |
464 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); | |
465 | 465 | |
466 | | |
466 | | |
467 | 467 | return 0; |
468 | 468 | } |
469 | 469 | |
r17988 | r17989 | |
471 | 471 | { |
472 | 472 | // rising edge |
473 | 473 | if (state) |
474 | | |
474 | | |
475 | 475 | } |
476 | 476 | |
477 | 477 | |
r17988 | r17989 | |
519 | 519 | { |
520 | 520 | bitmap.fill(0x1f0, cliprect); |
521 | 521 | |
522 | screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 ); | |
523 | screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 ); | |
522 | machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 ); | |
523 | machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 ); | |
524 | 524 | |
525 | | |
525 | | |
526 | 526 | return 0; |
527 | 527 | } |
528 | 528 | |
r17988 | r17989 | |
530 | 530 | { |
531 | 531 | // rising edge |
532 | 532 | if (state) |
533 | | |
533 | | |
534 | 534 | } |
535 | 535 | |
536 | 536 | MACHINE_START_MEMBER(champbwl_state,doraemon) |
r17988 | r17989 | |
---|---|---|
535 | 535 | UINT32 bnstars_state::screen_update_bnstars_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
536 | 536 | { |
537 | 537 | |
538 | | |
538 | | |
539 | 539 | |
540 | 540 | bitmap.fill(0, cliprect); /* bg color */ |
541 | 541 | |
r17988 | r17989 | |
544 | 544 | m_ms32_bg_tilemap[0]->set_scrolly(0, m_ms32_bg0_scroll[0x0c/4] + m_ms32_bg0_scroll[0x14/4] ); |
545 | 545 | m_ms32_bg_tilemap[0]->draw(bitmap, cliprect, 0,1); |
546 | 546 | |
547 | draw_roz( | |
547 | draw_roz( | |
548 | 548 | |
549 | 549 | m_ms32_tx_tilemap[0]->set_scrollx(0, m_ms32_tx0_scroll[0x00/4] + m_ms32_tx0_scroll[0x08/4] + 0x18); |
550 | 550 | m_ms32_tx_tilemap[0]->set_scrolly(0, m_ms32_tx0_scroll[0x0c/4] + m_ms32_tx0_scroll[0x14/4]); |
551 | 551 | m_ms32_tx_tilemap[0]->draw(bitmap, cliprect, 0,4); |
552 | 552 | |
553 | 553 | |
554 | draw_sprites( | |
554 | draw_sprites( | |
555 | 555 | |
556 | 556 | return 0; |
557 | 557 | } |
r17988 | r17989 | |
559 | 559 | UINT32 bnstars_state::screen_update_bnstars_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
560 | 560 | { |
561 | 561 | |
562 | | |
562 | | |
563 | 563 | |
564 | 564 | bitmap.fill(0x8000+0, cliprect); /* bg color */ |
565 | 565 | |
r17988 | r17989 | |
568 | 568 | m_ms32_bg_tilemap[1]->set_scrolly(0, m_ms32_bg1_scroll[0x0c/4] + m_ms32_bg1_scroll[0x14/4] ); |
569 | 569 | m_ms32_bg_tilemap[1]->draw(bitmap, cliprect, 0,1); |
570 | 570 | |
571 | draw_roz( | |
571 | draw_roz( | |
572 | 572 | |
573 | 573 | m_ms32_tx_tilemap[1]->set_scrollx(0, m_ms32_tx1_scroll[0x00/4] + m_ms32_tx1_scroll[0x08/4] + 0x18); |
574 | 574 | m_ms32_tx_tilemap[1]->set_scrolly(0, m_ms32_tx1_scroll[0x0c/4] + m_ms32_tx1_scroll[0x14/4]); |
575 | 575 | m_ms32_tx_tilemap[1]->draw(bitmap, cliprect, 0,4); |
576 | 576 | |
577 | draw_sprites( | |
577 | draw_sprites( | |
578 | 578 | |
579 | 579 | return 0; |
580 | 580 | } |
r17988 | r17989 | |
---|---|---|
116 | 116 | |
117 | 117 | UINT32 diverboy_state::screen_update_diverboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
118 | 118 | { |
119 | // bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
120 | draw_sprites(screen.machine(), bitmap, cliprect); | |
119 | // bitmap.fill(get_black_pen(machine()), cliprect); | |
120 | draw_sprites(machine(), bitmap, cliprect); | |
121 | 121 | return 0; |
122 | 122 | } |
123 | 123 |
r17988 | r17989 | |
---|---|---|
460 | 460 | UINT32 vmetal_state::screen_update_varia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
461 | 461 | { |
462 | 462 | |
463 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
464 | screen.machine().priority_bitmap.fill(0, cliprect); | |
463 | bitmap.fill(get_black_pen(machine()), cliprect); | |
464 | machine().priority_bitmap.fill(0, cliprect); | |
465 | 465 | |
466 | 466 | m_mid2tilemap->set_scrollx(0, m_vmetal_videoregs[0x06a/2]-64 /*+ m_vmetal_videoregs[0x066/2]*/); |
467 | 467 | m_mid1tilemap->set_scrollx(0, m_vmetal_videoregs[0x07a/2]-64 /*+ m_vmetal_videoregs[0x076/2]*/); |
r17988 | r17989 | |
473 | 473 | |
474 | 474 | m_mid1tilemap->draw(bitmap, cliprect, 0, 0); |
475 | 475 | m_mid2tilemap->draw(bitmap, cliprect, 0, 0); |
476 | metro_draw_sprites( | |
476 | metro_draw_sprites( | |
477 | 477 | m_texttilemap->draw(bitmap, cliprect, 0, 0); |
478 | 478 | return 0; |
479 | 479 | } |
r17988 | r17989 | |
---|---|---|
220 | 220 | int sprite; |
221 | 221 | int gfxtop = screen.visible_area().min_y; |
222 | 222 | |
223 | bitmap.fill(palette_get_color( | |
223 | bitmap.fill(palette_get_color( | |
224 | 224 | |
225 | 225 | for( sprite = 0; sprite < 32; sprite++ ) |
226 | 226 | { |
r17988 | r17989 | |
240 | 240 | int flipx = flags & 0x20; |
241 | 241 | int code = sprite_data[ 15 - row ] + ( 256 * ( ( flags >> 6 ) & 3 ) ); |
242 | 242 | |
243 | drawgfx_transpen( bitmap, cliprect, | |
243 | drawgfx_transpen( bitmap, cliprect, | |
244 | 244 | } |
245 | 245 | } |
246 | 246 | } |
r17988 | r17989 | |
---|---|---|
74 | 74 | //FIXME: flip_screen_x should not be written! |
75 | 75 | flip_screen_set_no_update(1); |
76 | 76 | |
77 | | |
77 | | |
78 | 78 | bitmap.fill(0); |
79 | 79 | |
80 | 80 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
81 | 81 | |
82 | 82 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
83 | | |
83 | | |
84 | 84 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
85 | 85 | return 0; |
86 | 86 | } |
r17988 | r17989 | |
---|---|---|
850 | 850 | |
851 | 851 | UINT32 dwarfd_state::screen_update_dwarfd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
852 | 852 | { |
853 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
854 | drawCrt(screen.machine(), bitmap, cliprect); | |
853 | bitmap.fill(get_black_pen(machine()), cliprect); | |
854 | drawCrt(machine(), bitmap, cliprect); | |
855 | 855 | return 0; |
856 | 856 | } |
857 | 857 |
r17988 | r17989 | |
---|---|---|
111 | 111 | gfx_bpp = (m_colorram[count] & 0x80)>>7; //flag between 4 and 8 bpp |
112 | 112 | color = gfx_bpp ? ((m_colorram[count] & 0x70)>>4) : (m_colorram[count] & 0xf); |
113 | 113 | |
114 | drawgfx_opaque(bitmap,cliprect, | |
114 | drawgfx_opaque(bitmap,cliprect, | |
115 | 115 | |
116 | 116 | count+=2; |
117 | 117 | } |
r17988 | r17989 | |
---|---|---|
464 | 464 | |
465 | 465 | UINT32 meritm_state::screen_update_meritm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
466 | 466 | { |
467 | if( | |
467 | if( | |
468 | 468 | { |
469 | 469 | m_layer0_enabled^=1; |
470 | 470 | popmessage("Layer 0 %sabled",m_layer0_enabled ? "en" : "dis"); |
471 | 471 | } |
472 | if( | |
472 | if( | |
473 | 473 | { |
474 | 474 | m_layer1_enabled^=1; |
475 | 475 | popmessage("Layer 1 %sabled",m_layer1_enabled ? "en" : "dis"); |
476 | 476 | } |
477 | 477 | |
478 | bitmap.fill(get_black_pen( | |
478 | bitmap.fill(get_black_pen( | |
479 | 479 | |
480 | 480 | if ( m_layer0_enabled ) |
481 | 481 | { |
r17988 | r17989 | |
---|---|---|
182 | 182 | { |
183 | 183 | UINT16 data = *src++; |
184 | 184 | |
185 | *dest++ = screen.machine().pens[data & 0xff]; | |
186 | *dest++ = screen.machine().pens[data >> 8]; | |
185 | *dest++ = machine().pens[data & 0xff]; | |
186 | *dest++ = machine().pens[data >> 8]; | |
187 | 187 | } |
188 | 188 | } |
189 | 189 | return 0; |
r17988 | r17989 | |
---|---|---|
187 | 187 | { |
188 | 188 | int tile = m_videoram[count]; |
189 | 189 | int attr = m_videoram2[count]; |
190 | drawgfx_opaque(bitmap, cliprect, | |
190 | drawgfx_opaque(bitmap, cliprect, | |
191 | 191 | count++; |
192 | 192 | } |
193 | 193 | } |
r17988 | r17989 | |
199 | 199 | { |
200 | 200 | int tile = m_videoram[count]; |
201 | 201 | int attr = m_videoram2[count]; |
202 | drawgfx_transpen(bitmap, cliprect, | |
202 | drawgfx_transpen(bitmap, cliprect, | |
203 | 203 | count++; |
204 | 204 | } |
205 | 205 | } |
r17988 | r17989 | |
208 | 208 | { |
209 | 209 | int offs; |
210 | 210 | |
211 | int max_x = screen.machine().primary_screen->width() - 8; | |
212 | int max_y = screen.machine().primary_screen->height() - 8; | |
211 | int max_x = machine().primary_screen->width() - 8; | |
212 | int max_y = machine().primary_screen->height() - 8; | |
213 | 213 | |
214 | 214 | for (offs = 0xf800 / 2; offs < 0x10000 / 2 ; offs += 4/2) |
215 | 215 | { |
r17988 | r17989 | |
290 | 290 | tile_flipy = !tile_flipy; |
291 | 291 | } |
292 | 292 | |
293 | drawgfx_transpen( bitmap, cliprect, | |
293 | drawgfx_transpen( bitmap, cliprect, | |
294 | 294 | (tile & 0x1fff) + bank*0x4000, |
295 | 295 | attr, |
296 | 296 | tile_flipx, tile_flipy, |
r17988 | r17989 | |
---|---|---|
185 | 185 | UINT32 igs_m027_state::screen_update_igs_majhong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
186 | 186 | { |
187 | 187 | //?????????? |
188 | bitmap.fill(get_black_pen( | |
188 | bitmap.fill(get_black_pen( | |
189 | 189 | |
190 | 190 | //?????? |
191 | 191 | m_igs_bg_tilemap->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
---|---|---|
33 | 33 | |
34 | 34 | UINT32 buster_state::screen_update_buster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
35 | 35 | { |
36 | gfx_element *gfx = | |
36 | gfx_element *gfx = | |
37 | 37 | int count = 0x0000; |
38 | 38 | |
39 | 39 | int y,x; |
r17988 | r17989 | |
---|---|---|
638 | 638 | int y; |
639 | 639 | |
640 | 640 | #ifdef MAME_DEBUG |
641 | if ( | |
641 | if ( | |
642 | 642 | { |
643 | 643 | int msk = 0; |
644 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
645 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
644 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
645 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
646 | 646 | if (msk != 0) layers_ctrl &= msk; |
647 | 647 | } |
648 | 648 | #endif |
r17988 | r17989 | |
687 | 687 | } |
688 | 688 | } |
689 | 689 | |
690 | bitmap.fill(get_black_pen( | |
690 | bitmap.fill(get_black_pen( | |
691 | 691 | |
692 | 692 | if (layers_ctrl & 1) |
693 | 693 | { |
r17988 | r17989 | |
---|---|---|
369 | 369 | m_bg_tilemap->set_scrolly(col, m_scrollram[col * 8]); |
370 | 370 | |
371 | 371 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
372 | draw_sprites( | |
372 | draw_sprites( | |
373 | 373 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
374 | 374 | return 0; |
375 | 375 | } |
r17988 | r17989 | |
---|---|---|
124 | 124 | { |
125 | 125 | int tile = m_dealem_videoram[count + 0x1000] | (m_dealem_videoram[count] << 8); |
126 | 126 | count++; |
127 | drawgfx_opaque(bitmap,cliprect, | |
127 | drawgfx_opaque(bitmap,cliprect, | |
128 | 128 | } |
129 | 129 | } |
130 | 130 |
r17988 | r17989 | |
---|---|---|
498 | 498 | { |
499 | 499 | int coldat = m_colram[i+1] | (m_colram[i+0]<<8); |
500 | 500 | |
501 | palette_set_color_rgb( | |
501 | palette_set_color_rgb( | |
502 | 502 | } |
503 | 503 | |
504 | 504 | for (y=0;y<32;y++) |
r17988 | r17989 | |
512 | 512 | |
513 | 513 | if (tileno&0x800) |
514 | 514 | { |
515 | gfx = | |
515 | gfx = | |
516 | 516 | tileno &=0x7ff; |
517 | 517 | } |
518 | 518 | else |
519 | 519 | { |
520 | gfx = | |
520 | gfx = | |
521 | 521 | } |
522 | 522 | |
523 | 523 |
r17988 | r17989 | |
---|---|---|
238 | 238 | int layers_ctrl = -1; |
239 | 239 | |
240 | 240 | #if DARKHORS_DEBUG |
241 | if ( | |
241 | if ( | |
242 | 242 | { |
243 | 243 | int mask = 0; |
244 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
245 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
246 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
244 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
245 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
246 | if (machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
247 | 247 | if (mask != 0) layers_ctrl &= mask; |
248 | 248 | } |
249 | 249 | #endif |
250 | 250 | |
251 | bitmap.fill(get_black_pen( | |
251 | bitmap.fill(get_black_pen( | |
252 | 252 | |
253 | 253 | m_tmap->set_scrollx(0, (m_tmapscroll[0] >> 16) - 5); |
254 | 254 | m_tmap->set_scrolly(0, (m_tmapscroll[0] & 0xffff) - 0xff ); |
r17988 | r17989 | |
258 | 258 | m_tmap2->set_scrolly(0, (m_tmapscroll2[0] & 0xffff) - 0xff ); |
259 | 259 | if (layers_ctrl & 2) m_tmap2->draw(bitmap, cliprect, 0, 0); |
260 | 260 | |
261 | if (layers_ctrl & 4) draw_sprites( | |
261 | if (layers_ctrl & 4) draw_sprites( | |
262 | 262 | |
263 | 263 | #if DARKHORS_DEBUG |
264 | 264 | #if 0 |
r17988 | r17989 | |
725 | 725 | { |
726 | 726 | |
727 | 727 | // this isn't an st0020.. |
728 | m_gdfs_st0020->st0020_draw_all( | |
728 | m_gdfs_st0020->st0020_draw_all( | |
729 | 729 | |
730 | 730 | return 0; |
731 | 731 | } |
r17988 | r17989 | |
788 | 788 | |
789 | 789 | UINT32 darkhors_state::screen_update_jclub2o(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
790 | 790 | { |
791 | m_gdfs_st0020->st0020_draw_all( | |
791 | m_gdfs_st0020->st0020_draw_all( | |
792 | 792 | return 0; |
793 | 793 | } |
794 | 794 |
r17988 | r17989 | |
---|---|---|
91 | 91 | UINT32 albazc_state::screen_update_hanaroku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
92 | 92 | { |
93 | 93 | bitmap.fill(0x1f0, cliprect); // ??? |
94 | draw_sprites( | |
94 | draw_sprites( | |
95 | 95 | return 0; |
96 | 96 | } |
97 | 97 |
r17988 | r17989 | |
---|---|---|
190 | 190 | int layers_ctrl = -1; |
191 | 191 | |
192 | 192 | #ifdef MAME_DEBUG |
193 | if ( | |
193 | if ( | |
194 | 194 | { |
195 | 195 | int msk = 0; |
196 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1 << 0; // for m_tmap | |
197 | if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 1 << 1; // for sprites | |
196 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1 << 0; // for m_tmap | |
197 | if (machine().input().code_pressed(KEYCODE_A)) msk |= 1 << 1; // for sprites | |
198 | 198 | if (msk != 0) layers_ctrl &= msk; |
199 | 199 | } |
200 | 200 | #endif |
201 | 201 | |
202 | 202 | bitmap.fill(4095, cliprect); |
203 | 203 | |
204 | if (layers_ctrl & 2) draw_sprites( | |
204 | if (layers_ctrl & 2) draw_sprites( | |
205 | 205 | if (layers_ctrl & 1) m_tmap->draw(bitmap, cliprect, 0, 0); |
206 | 206 | |
207 | 207 | return 0; |
r17988 | r17989 | |
---|---|---|
373 | 373 | |
374 | 374 | UINT32 aristmk4_state::screen_update_aristmk4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
375 | 375 | { |
376 | gfx_element *gfx = | |
376 | gfx_element *gfx = | |
377 | 377 | int x,y; |
378 | 378 | int count = 0; |
379 | 379 | int color; |
r17988 | r17989 | |
389 | 389 | color = ((m_mkiv_vram[count]) & 0xe0) >> 5; |
390 | 390 | tile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0x3ff; |
391 | 391 | bgtile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles |
392 | uBackgroundColour( | |
392 | uBackgroundColour( | |
393 | 393 | gfx->decode(bgtile); // force the machine to update only the first 256 tiles. |
394 | 394 | // as we only update the background, not the entire display. |
395 | 395 | flipx = ((m_mkiv_vram[count]) & 0x04); |
r17988 | r17989 | |
---|---|---|
187 | 187 | int layers_ctrl = -1; |
188 | 188 | |
189 | 189 | #ifdef MAME_DEBUG |
190 | if ( | |
190 | if ( | |
191 | 191 | { |
192 | 192 | int msk = 0; |
193 | if (screen.machine().input().code_pressed(KEYCODE_T)) msk |= 1; | |
194 | if (screen.machine().input().code_pressed(KEYCODE_Y)) msk |= 2; | |
195 | if (screen.machine().input().code_pressed(KEYCODE_U)) msk |= 4; | |
196 | if (screen.machine().input().code_pressed(KEYCODE_I)) msk |= 8; | |
197 | if (screen.machine().input().code_pressed(KEYCODE_O)) msk |= 16; | |
193 | if (machine().input().code_pressed(KEYCODE_T)) msk |= 1; | |
194 | if (machine().input().code_pressed(KEYCODE_Y)) msk |= 2; | |
195 | if (machine().input().code_pressed(KEYCODE_U)) msk |= 4; | |
196 | if (machine().input().code_pressed(KEYCODE_I)) msk |= 8; | |
197 | if (machine().input().code_pressed(KEYCODE_O)) msk |= 16; | |
198 | 198 | if (msk != 0) layers_ctrl &= msk; |
199 | 199 | } |
200 | 200 | #endif |
201 | 201 | |
202 | 202 | if (layers_ctrl & 1) m_bg1_tmap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
203 | else bitmap.fill(get_black_pen( | |
203 | else bitmap.fill(get_black_pen( | |
204 | 204 | if (layers_ctrl & 2) m_bg2_tmap->draw(bitmap, cliprect, 0, 0); |
205 | 205 | if (layers_ctrl & 4) m_bg3_tmap->draw(bitmap, cliprect, 0, 0); |
206 | 206 | if (layers_ctrl & 8) m_bg4_tmap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
97 | 97 | |
98 | 98 | UINT32 murogmbl_state::screen_update_murogmbl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
99 | 99 | { |
100 | gfx_element *gfx = | |
100 | gfx_element *gfx = | |
101 | 101 | int count = 0; |
102 | 102 | |
103 | 103 | int y, x; |
r17988 | r17989 | |
---|---|---|
201 | 201 | |
202 | 202 | UINT32 bmcpokr_state::screen_update_bmcpokr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
203 | 203 | { |
204 | gfx_element *gfx = | |
204 | gfx_element *gfx = | |
205 | 205 | |
206 | 206 | int count = 0; |
207 | 207 | for (int y=0;y<32;y++) |
r17988 | r17989 | |
---|---|---|
1285 | 1285 | |
1286 | 1286 | bitmap.fill(0x000000, cliprect); |
1287 | 1287 | m_renderer->set_fb(&bitmap); |
1288 | m_renderer->render_displaylist( | |
1288 | m_renderer->render_displaylist( | |
1289 | 1289 | |
1290 | 1290 | |
1291 | 1291 | UINT16 *screen_src = (UINT16*)&m_screen_ram[m_scr_base]; |
r17988 | r17989 | |
---|---|---|
115 | 115 | |
116 | 116 | UINT32 cabaret_state::screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
117 | 117 | { |
118 | bitmap.fill(get_black_pen( | |
118 | bitmap.fill(get_black_pen( | |
119 | 119 | |
120 | 120 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
121 | 121 |
r17988 | r17989 | |
---|---|---|
230 | 230 | UINT32 olibochu_state::screen_update_olibochu(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
231 | 231 | { |
232 | 232 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
233 | draw_sprites( | |
233 | draw_sprites( | |
234 | 234 | return 0; |
235 | 235 | } |
236 | 236 |
r17988 | r17989 | |
---|---|---|
139 | 139 | int startaddr1 = m_hd46505_1_reg[0x0c]*256 + m_hd46505_1_reg[0x0d]; |
140 | 140 | |
141 | 141 | |
142 | draw_tilemap(screen.machine(), bitmap,cliprect,startaddr0,0,1,FALSE); | |
143 | draw_tilemap(screen.machine(), bitmap,cliprect,startaddr1,2,3,TRUE); | |
142 | draw_tilemap(machine(), bitmap,cliprect,startaddr0,0,1,FALSE); | |
143 | draw_tilemap(machine(), bitmap,cliprect,startaddr1,2,3,TRUE); | |
144 | 144 | return 0; |
145 | 145 | } |
146 | 146 |
r17988 | r17989 | |
---|---|---|
243 | 243 | |
244 | 244 | /*TILEMAP_DRAW_CATEGORY + TILEMAP_DRAW_OPAQUE doesn't suit well?*/ |
245 | 245 | m_sc0_tilemap->draw(bitmap, cliprect, 0,0); |
246 | draw_sprites( | |
246 | draw_sprites( | |
247 | 247 | m_sc1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_CATEGORY(1),0); |
248 | 248 | m_sc0w_tilemap->draw(bitmap, clip, 0,0); |
249 | 249 |
r17988 | r17989 | |
---|---|---|
216 | 216 | |
217 | 217 | UINT32 r2dx_v33_state::screen_update_rdx_v33(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
218 | 218 | { |
219 | bitmap.fill(get_black_pen( | |
219 | bitmap.fill(get_black_pen( | |
220 | 220 | |
221 | 221 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
222 | 222 | m_md_tilemap->draw(bitmap, cliprect, 0, 0); |
223 | 223 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
224 | 224 | |
225 | draw_sprites( | |
225 | draw_sprites( | |
226 | 226 | |
227 | 227 | m_tx_tilemap->draw(bitmap, cliprect, 0, 0); |
228 | 228 | |
r17988 | r17989 | |
231 | 231 | { |
232 | 232 | static UINT32 src_addr = 0x100000; |
233 | 233 | static int frame; |
234 | address_space &space = * | |
234 | address_space &space = * | |
235 | 235 | |
236 | //if( | |
236 | //if( | |
237 | 237 | // src_addr+=0x800; |
238 | 238 | |
239 | //if( | |
239 | //if( | |
240 | 240 | // src_addr-=0x800; |
241 | 241 | |
242 | 242 | frame++; |
243 | 243 | |
244 | 244 | popmessage("%08x 0",src_addr); |
245 | 245 | |
246 | //if( | |
246 | //if( | |
247 | 247 | if(frame == 5) |
248 | 248 | { |
249 | 249 | int i,data; |
r17988 | r17989 | |
---|---|---|
151 | 151 | #if 1 |
152 | 152 | // gfx roms viewer (toggle with enter, use pgup/down to browse) |
153 | 153 | int x, y, count = 0; |
154 | UINT8 *gfxdata = | |
154 | UINT8 *gfxdata = | |
155 | 155 | UINT8 data; |
156 | 156 | |
157 | if ( | |
157 | if ( | |
158 | 158 | if (m_view_roms) |
159 | 159 | { |
160 | if (screen.machine().input().code_pressed_once(KEYCODE_PGDN)) m_base += 512 * 256; | |
161 | if (screen.machine().input().code_pressed_once(KEYCODE_PGUP)) m_base -= 512 * 256; | |
160 | if (machine().input().code_pressed_once(KEYCODE_PGDN)) m_base += 512 * 256; | |
161 | if (machine().input().code_pressed_once(KEYCODE_PGUP)) m_base -= 512 * 256; | |
162 | 162 | m_base %= memregion("gfx1")->bytes(); |
163 | 163 | |
164 | 164 | count = m_base; |
165 | 165 | |
166 | bitmap.fill(get_black_pen( | |
166 | bitmap.fill(get_black_pen( | |
167 | 167 | for (y = 0 ; y < 256; y++) |
168 | 168 | { |
169 | 169 | for (x = 0; x < 512; x++) |
170 | 170 | { |
171 | data = (((count & 0xf) == 0) && ((count & 0x1e00) == 0)) ? get_white_pen( | |
171 | data = (((count & 0xf) == 0) && ((count & 0x1e00) == 0)) ? get_white_pen( | |
172 | 172 | bitmap.pix16(y, x) = data; |
173 | 173 | count++; |
174 | 174 | } |
r17988 | r17989 | |
---|---|---|
582 | 582 | |
583 | 583 | // if(color==0) color=0xf; |
584 | 584 | |
585 | drawgfx_transpen(bitmap, cliprect, | |
585 | drawgfx_transpen(bitmap, cliprect, | |
586 | 586 | |
587 | 587 | ++idx; |
588 | 588 | } |
r17988 | r17989 | |
604 | 604 | { |
605 | 605 | //for(int x=0;x<4;++x) |
606 | 606 | { |
607 | drawgfx_transpen(bitmap, cliprect, | |
607 | drawgfx_transpen(bitmap, cliprect, | |
608 | 608 | ++num; |
609 | 609 | } |
610 | 610 | } |
r17988 | r17989 | |
645 | 645 | for(int y=0;y<4;++y) |
646 | 646 | { |
647 | 647 | |
648 | drawgfx_transpen(bitmap, cliprect, | |
648 | drawgfx_transpen(bitmap, cliprect, | |
649 | 649 | ++strip_num; |
650 | 650 | } |
651 | 651 | } |
r17988 | r17989 | |
---|---|---|
308 | 308 | { |
309 | 309 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
310 | 310 | |
311 | draw_sprites( | |
311 | draw_sprites( | |
312 | 312 | return 0; |
313 | 313 | } |
314 | 314 |
r17988 | r17989 | |
---|---|---|
127 | 127 | UINT32 k3_state::screen_update_k3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
128 | 128 | { |
129 | 129 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
130 | draw_sprites( | |
130 | draw_sprites( | |
131 | 131 | return 0; |
132 | 132 | } |
133 | 133 |
r17988 | r17989 | |
---|---|---|
181 | 181 | { |
182 | 182 | UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (m_screen_flip ? 0 : 4); |
183 | 183 | UINT8 data = m_videoram[(((y ^ m_screen_flip) + yoffs) << 5) | ((x ^ m_screen_flip) >> 3)]; |
184 | plot_byte( | |
184 | plot_byte( | |
185 | 185 | } |
186 | 186 | |
187 | 187 | return 0; |
r17988 | r17989 | |
205 | 205 | offs_t n = ((offs >> 5) & 0xf0) | color; |
206 | 206 | color = color_prom[n] & 0x07; |
207 | 207 | |
208 | plot_byte( | |
208 | plot_byte( | |
209 | 209 | } |
210 | 210 | |
211 | 211 | return 0; |
r17988 | r17989 | |
---|---|---|
77 | 77 | //int blinkLine = (m_tile_control_ram[current_screen_character] & 0x40) >> 6; |
78 | 78 | //int blinkChar = (m_tile_control_ram[current_screen_character] & 0x80) >> 7; |
79 | 79 | |
80 | drawgfx_transpen(bitmap, cliprect, | |
80 | drawgfx_transpen(bitmap, cliprect, | |
81 | 81 | m_tile_ram[current_screen_character] + (0x100 * tileOffs), |
82 | 82 | palIndex, |
83 | 83 | 0, 0, charx*8, chary*8, 0); |
r17988 | r17989 | |
---|---|---|
1494 | 1494 | bitmap.fill(m_bgcolor, cliprect); |
1495 | 1495 | |
1496 | 1496 | #ifdef MAME_DEBUG |
1497 | if ( | |
1497 | if ( | |
1498 | 1498 | #endif |
1499 | 1499 | |
1500 | 1500 | copy_scroll_xp(bitmap, m_render_layer[2], *m_scrollx1, *m_scrolly1); |
r17988 | r17989 | |
1504 | 1504 | // HALF-HACK: apply RGB filter when the following conditions are met |
1505 | 1505 | i = m_io_ram[0xa0]; |
1506 | 1506 | j = m_io_ram[0xa1]; |
1507 | if (m_io_ram[0x2b] && (i>0xc6 && i<0xfe) && (j==0xc0 || j==0xed)) filter_bitmap( | |
1507 | if (m_io_ram[0x2b] && (i>0xc6 && i<0xfe) && (j==0xc0 || j==0xed)) filter_bitmap( | |
1508 | 1508 | return 0; |
1509 | 1509 | } |
1510 | 1510 |
r17988 | r17989 | |
---|---|---|
194 | 194 | |
195 | 195 | UINT32 statriv2_state::screen_update_statriv2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
196 | 196 | { |
197 | if (tms9927_screen_reset(screen.machine().device("tms"))) | |
198 | bitmap.fill(get_black_pen(screen.machine()), cliprect); | |
197 | if (tms9927_screen_reset(machine().device("tms"))) | |
198 | bitmap.fill(get_black_pen(machine()), cliprect); | |
199 | 199 | else |
200 | 200 | m_tilemap->draw(bitmap, cliprect, 0, 0); |
201 | 201 | return 0; |
r17988 | r17989 | |
---|---|---|
260 | 260 | { |
261 | 261 | int tile = m_tileram[count&0x7ff] | m_tileram[(count&0x7ff)+0x800]<<8; |
262 | 262 | |
263 | drawgfx_opaque(bitmap,cliprect, | |
263 | drawgfx_opaque(bitmap,cliprect, | |
264 | 264 | count++; |
265 | 265 | } |
266 | 266 | } |
r17988 | r17989 | |
---|---|---|
32 | 32 | int x,y,count; |
33 | 33 | const UINT8 *blit_ram = memregion("maincpu")->base(); |
34 | 34 | |
35 | if( | |
35 | if( | |
36 | 36 | m_test_x++; |
37 | 37 | |
38 | if( | |
38 | if( | |
39 | 39 | m_test_x--; |
40 | 40 | |
41 | if( | |
41 | if( | |
42 | 42 | m_test_y++; |
43 | 43 | |
44 | if( | |
44 | if( | |
45 | 45 | m_test_y--; |
46 | 46 | |
47 | if( | |
47 | if( | |
48 | 48 | m_start_offs+=0x2000; |
49 | 49 | |
50 | if( | |
50 | if( | |
51 | 51 | m_start_offs-=0x2000; |
52 | 52 | |
53 | if( | |
53 | if( | |
54 | 54 | m_start_offs++; |
55 | 55 | |
56 | if( | |
56 | if( | |
57 | 57 | m_start_offs--; |
58 | 58 | |
59 | if( | |
59 | if( | |
60 | 60 | m_type^=1; |
61 | 61 | |
62 | 62 | popmessage("%d %d %04x %d",m_test_x,m_test_y,m_start_offs,m_type); |
63 | 63 | |
64 | bitmap.fill(get_black_pen( | |
64 | bitmap.fill(get_black_pen( | |
65 | 65 | |
66 | 66 | count = (m_start_offs); |
67 | 67 | |
r17988 | r17989 | |
96 | 96 | color = blit_ram[count]; |
97 | 97 | |
98 | 98 | if(cliprect.contains(x, y)) |
99 | bitmap.pix32(y, x) = | |
99 | bitmap.pix32(y, x) = | |
100 | 100 | |
101 | 101 | count++; |
102 | 102 | } |
r17988 | r17989 | |
---|---|---|
104 | 104 | // int i; |
105 | 105 | static const int xxx=320,yyy=204; |
106 | 106 | |
107 | bitmap.fill(get_black_pen( | |
107 | bitmap.fill(get_black_pen( | |
108 | 108 | |
109 | 109 | // for (i=0;i<256;i++) |
110 | 110 | // { |
r17988 | r17989 | |
---|---|---|
253 | 253 | UINT32 acommand_state::screen_update_acommand(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
254 | 254 | { |
255 | 255 | m_bg_tilemap->draw(bitmap, cliprect, 0,0); |
256 | draw_sprites( | |
256 | draw_sprites( | |
257 | 257 | m_tx_tilemap->draw(bitmap, cliprect, 0,0); |
258 | 258 | |
259 | 259 | /*Order might be wrong,but these for sure are the led numbers tested*/ |
r17988 | r17989 | |
---|---|---|
111 | 111 | { |
112 | 112 | bitmap.fill(0, cliprect); |
113 | 113 | |
114 | astron_draw_characters(screen.machine(), bitmap, cliprect); | |
115 | astron_draw_sprites(screen.machine(), bitmap, cliprect); | |
114 | astron_draw_characters(machine(), bitmap, cliprect); | |
115 | astron_draw_sprites(machine(), bitmap, cliprect); | |
116 | 116 | |
117 | 117 | return 0; |
118 | 118 | } |
r17988 | r17989 | |
---|---|---|
212 | 212 | { |
213 | 213 | if (m_tileduty[i] == 1) |
214 | 214 | { |
215 | | |
215 | | |
216 | 216 | m_tileduty[i] = 0; |
217 | 217 | } |
218 | 218 | } |
r17988 | r17989 | |
---|---|---|
82 | 82 | continue; |
83 | 83 | } |
84 | 84 | |
85 | drawgfx_transpen(bitmap, cliprect, | |
85 | drawgfx_transpen(bitmap, cliprect, | |
86 | 86 | } |
87 | 87 | |
88 | 88 | /* draw alpha numerics */ |
r17988 | r17989 | |
92 | 92 | { |
93 | 93 | int num = m_alpha_num_ram[32 * i + j]; |
94 | 94 | |
95 | drawgfx_transpen(bitmap, cliprect, | |
95 | drawgfx_transpen(bitmap, cliprect, | |
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
r17988 | r17989 | |
103 | 103 | int horz = 256 - m_minor_obj_ram[i + 2]; |
104 | 104 | int vert = 256 - m_minor_obj_ram[i + 4]; |
105 | 105 | |
106 | drawgfx_transpen(bitmap, cliprect, | |
106 | drawgfx_transpen(bitmap, cliprect, | |
107 | 107 | } |
108 | 108 | |
109 | 109 | /* draw waves */ |
110 | 110 | for (i = 0; i < 4; i++) |
111 | 111 | { |
112 | drawgfx_transpen(bitmap, cliprect, | |
112 | drawgfx_transpen(bitmap, cliprect, | |
113 | 113 | } |
114 | 114 | |
115 | 115 | /* draw cursor */ |
r17988 | r17989 | |
---|---|---|
94 | 94 | UINT32 *spriteram32 = m_spriteram; |
95 | 95 | int offs,spr_offs,colour,sx,sy,h,w,dx,dy; |
96 | 96 | |
97 | bitmap.fill( | |
97 | bitmap.fill( | |
98 | 98 | |
99 | 99 | for(offs=(0x2000/4)-2;offs>-1;offs-=2) |
100 | 100 | { |
r17988 | r17989 | |
112 | 112 | |
113 | 113 | for(dx=0;dx<w;dx++) |
114 | 114 | for(dy=0;dy<h;dy++) |
115 | drawgfx_transpen(bitmap,cliprect, | |
115 | drawgfx_transpen(bitmap,cliprect, | |
116 | 116 | } |
117 | 117 | |
118 | 118 | return 0; |
r17988 | r17989 | |
---|---|---|
1118 | 1118 | UINT32 multigam_state::screen_update_multigam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
1119 | 1119 | { |
1120 | 1120 | /* render the ppu */ |
1121 | ppu2c0x_device *ppu = | |
1121 | ppu2c0x_device *ppu = | |
1122 | 1122 | ppu->render(bitmap, 0, 0, 0, 0); |
1123 | 1123 | return 0; |
1124 | 1124 | } |
r17988 | r17989 | |
---|---|---|
369 | 369 | if(bpp) |
370 | 370 | color&=0x3; |
371 | 371 | |
372 | drawgfx_opaque(bitmap,cliprect, | |
372 | drawgfx_opaque(bitmap,cliprect, | |
373 | 373 | count++; |
374 | 374 | |
375 | 375 | } |
r17988 | r17989 | |
---|---|---|
152 | 152 | int sy = m_colorram_bg[i]; |
153 | 153 | int color = m_colorram_bg[i + 1] & 0xf; |
154 | 154 | |
155 | drawgfx_transpen(bitmap, cliprect, | |
155 | drawgfx_transpen(bitmap, cliprect, | |
156 | 156 | code, |
157 | 157 | color, |
158 | 158 | flip, flip, |
r17988 | r17989 | |
---|---|---|
269 | 269 | /* If blanked, fill with black */ |
270 | 270 | if (state.blanked) |
271 | 271 | { |
272 | bitmap.fill(get_black_pen( | |
272 | bitmap.fill(get_black_pen( | |
273 | 273 | return 0; |
274 | 274 | } |
275 | 275 | |
r17988 | r17989 | |
283 | 283 | UINT8 pen = src[x >> 1]; |
284 | 284 | |
285 | 285 | /* Draw two 4-bit pixels */ |
286 | *dest++ = screen.machine().pens[pen >> 4]; | |
287 | *dest++ = screen.machine().pens[pen & 0x0f]; | |
286 | *dest++ = machine().pens[pen >> 4]; | |
287 | *dest++ = machine().pens[pen & 0x0f]; | |
288 | 288 | } |
289 | 289 | } |
290 | 290 |
r17988 | r17989 | |
---|---|---|
466 | 466 | { |
467 | 467 | int x,y,count; |
468 | 468 | |
469 | bitmap.fill(get_black_pen( | |
469 | bitmap.fill(get_black_pen( | |
470 | 470 | |
471 | 471 | count = (0x2000/2); |
472 | 472 | |
r17988 | r17989 | |
479 | 479 | color = (m_blit_ram[count] & 0xf000)>>12; |
480 | 480 | |
481 | 481 | if(cliprect.contains(x+3, y)) |
482 | bitmap.pix32(y, x+3) = | |
482 | bitmap.pix32(y, x+3) = | |
483 | 483 | |
484 | 484 | color = (m_blit_ram[count] & 0x0f00)>>8; |
485 | 485 | |
486 | 486 | if(cliprect.contains(x+2, y)) |
487 | bitmap.pix32(y, x+2) = | |
487 | bitmap.pix32(y, x+2) = | |
488 | 488 | |
489 | 489 | color = (m_blit_ram[count] & 0x00f0)>>4; |
490 | 490 | |
491 | 491 | if(cliprect.contains(x+1, y)) |
492 | bitmap.pix32(y, x+1) = | |
492 | bitmap.pix32(y, x+1) = | |
493 | 493 | |
494 | 494 | color = (m_blit_ram[count] & 0x000f)>>0; |
495 | 495 | |
496 | 496 | if(cliprect.contains(x+0, y)) |
497 | bitmap.pix32(y, x+0) = | |
497 | bitmap.pix32(y, x+0) = | |
498 | 498 | |
499 | 499 | count++; |
500 | 500 | } |
r17988 | r17989 | |
---|---|---|
517 | 517 | |
518 | 518 | bitmap.fill(0, cliprect); |
519 | 519 | |
520 | m_scn2674->scn2574_draw( | |
520 | m_scn2674->scn2574_draw( | |
521 | 521 | |
522 | 522 | return 0; |
523 | 523 | } |
r17988 | r17989 | |
---|---|---|
306 | 306 | UINT32 cham24_state::screen_update_cham24(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
307 | 307 | { |
308 | 308 | /* render the ppu */ |
309 | ppu2c0x_device *ppu = | |
309 | ppu2c0x_device *ppu = | |
310 | 310 | ppu->render(bitmap, 0, 0, 0, 0); |
311 | 311 | return 0; |
312 | 312 | } |
r17988 | r17989 | |
---|---|---|
154 | 154 | |
155 | 155 | m_bg_layer->draw(bitmap, cliprect, 0, 0); |
156 | 156 | m_fg_layer->draw(bitmap, cliprect, 0, 0); |
157 | | |
157 | | |
158 | 158 | return 0; |
159 | 159 | } |
160 | 160 |
r17988 | r17989 | |
---|---|---|
508 | 508 | for (x=0;x<64;x++) |
509 | 509 | { |
510 | 510 | int tile = m_gms_vidram2[count+0x600]; |
511 | drawgfx_opaque(bitmap,cliprect, | |
511 | drawgfx_opaque(bitmap,cliprect, | |
512 | 512 | count++; |
513 | 513 | } |
514 | 514 | } |
r17988 | r17989 | |
520 | 520 | for (x=0;x<64;x++) |
521 | 521 | { |
522 | 522 | int tile = m_gms_vidram[count]; |
523 | drawgfx_transpen(bitmap,cliprect, | |
523 | drawgfx_transpen(bitmap,cliprect, | |
524 | 524 | count++; |
525 | 525 | } |
526 | 526 | } |
r17988 | r17989 | |
---|---|---|
295 | 295 | UINT32 trvmadns_state::screen_update_trvmadns(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
296 | 296 | { |
297 | 297 | int x,y,count; |
298 | gfx_element *gfx = | |
298 | gfx_element *gfx = | |
299 | 299 | |
300 | 300 | bitmap.fill(0xd, cliprect); |
301 | 301 |
r17988 | r17989 | |
---|---|---|
121 | 121 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
122 | 122 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
123 | 123 | |
124 | | |
124 | | |
125 | 125 | bitmap.fill(0x100, cliprect); |
126 | 126 | |
127 | 127 | if (m_left_priority[0] == 0) |
128 | 128 | { |
129 | 129 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1); |
130 | 130 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
131 | | |
131 | | |
132 | 132 | } |
133 | 133 | else if (m_left_priority[0] == 2) |
134 | 134 | { |
135 | 135 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
136 | 136 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 4); |
137 | | |
137 | | |
138 | 138 | } |
139 | 139 | else |
140 | 140 | popmessage( "unknown left priority %08x", m_left_priority[0]); |
r17988 | r17989 | |
153 | 153 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
154 | 154 | deco16ic_pf_update(m_deco_tilegen2, m_pf3_rowscroll, m_pf4_rowscroll); |
155 | 155 | |
156 | | |
156 | | |
157 | 157 | bitmap.fill(0x500, cliprect); |
158 | 158 | |
159 | 159 | if (m_right_priority[0] == 0) |
160 | 160 | { |
161 | 161 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1); |
162 | 162 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
163 | | |
163 | | |
164 | 164 | } |
165 | 165 | else if (m_right_priority[0] == 2) |
166 | 166 | { |
167 | 167 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
168 | 168 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 4); |
169 | | |
169 | | |
170 | 170 | } |
171 | 171 | else |
172 | 172 | popmessage( "unknown right priority %08x", m_right_priority[0]); |
r17988 | r17989 | |
---|---|---|
127 | 127 | for (y = cliprect.min_y; y <= cliprect.max_y; ++y) |
128 | 128 | { |
129 | 129 | int i; |
130 | int num_entries = cubeqcpu_get_ptr_ram_val(screen.machine().device("line_cpu"), y); | |
131 | UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen.machine().device("line_cpu")); | |
130 | int num_entries = cubeqcpu_get_ptr_ram_val(machine().device("line_cpu"), y); | |
131 | UINT32 *stk_ram = cubeqcpu_get_stack_ram(machine().device("line_cpu")); | |
132 | 132 | UINT32 *dest = &bitmap.pix32(y); |
133 | 133 | UINT32 pen; |
134 | 134 |
r17988 | r17989 | |
---|---|---|
157 | 157 | if (m_screen_enable & 1) |
158 | 158 | copybitmap(bitmap, m_bitmap, 0,0,0,0, cliprect); |
159 | 159 | else |
160 | bitmap.fill(get_black_pen( | |
160 | bitmap.fill(get_black_pen( | |
161 | 161 | |
162 | 162 | return 0; |
163 | 163 | } |
r17988 | r17989 | |
---|---|---|
335 | 335 | UINT32 coolridr_state::screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
336 | 336 | { |
337 | 337 | /* planes seems to basically be at 0x8000 and 0x28000... */ |
338 | gfx_element *gfx = | |
338 | gfx_element *gfx = | |
339 | 339 | UINT32 count; |
340 | 340 | int y,x; |
341 | 341 | |
342 | 342 | |
343 | if( | |
343 | if( | |
344 | 344 | m_test_offs+=4; |
345 | 345 | |
346 | if( | |
346 | if( | |
347 | 347 | m_test_offs-=4; |
348 | 348 | |
349 | if( | |
349 | if( | |
350 | 350 | m_test_offs+=0x40; |
351 | 351 | |
352 | if( | |
352 | if( | |
353 | 353 | m_test_offs-=0x40; |
354 | 354 | |
355 | if( | |
355 | if( | |
356 | 356 | m_test_offs+=0x400; |
357 | 357 | |
358 | if( | |
358 | if( | |
359 | 359 | m_test_offs-=0x400; |
360 | 360 | |
361 | if( | |
361 | if( | |
362 | 362 | m_color++; |
363 | 363 | |
364 | if( | |
364 | if( | |
365 | 365 | m_color--; |
366 | 366 | |
367 | 367 | if(m_test_offs > 0x100000*4) |
r17988 | r17989 | |
---|---|---|
1000 | 1000 | |
1001 | 1001 | if (m_has_psac) |
1002 | 1002 | { |
1003 | device_t *k001604 = | |
1003 | device_t *k001604 = | |
1004 | 1004 | |
1005 | 1005 | k001604_draw_back_layer(k001604, bitmap, cliprect); |
1006 | 1006 | k001604_draw_front_layer(k001604, bitmap, cliprect); |
r17988 | r17989 | |
---|---|---|
38 | 38 | int y,x; |
39 | 39 | int count; |
40 | 40 | |
41 | bitmap.fill(get_black_pen( | |
41 | bitmap.fill(get_black_pen( | |
42 | 42 | |
43 | 43 | count = 0; |
44 | 44 | for (y=0;y<32;y++) |
r17988 | r17989 | |
47 | 47 | { |
48 | 48 | int dat; |
49 | 49 | dat = m_vram[count]; |
50 | drawgfx_transpen(bitmap,cliprect, | |
50 | drawgfx_transpen(bitmap,cliprect, | |
51 | 51 | count++; |
52 | 52 | } |
53 | 53 | } |
r17988 | r17989 | |
59 | 59 | { |
60 | 60 | int dat; |
61 | 61 | dat = m_vram[count]; |
62 | drawgfx_transpen(bitmap,cliprect, | |
62 | drawgfx_transpen(bitmap,cliprect, | |
63 | 63 | count++; |
64 | 64 | } |
65 | 65 | } |
r17988 | r17989 | |
---|---|---|
1073 | 1073 | globalyscroll += 8; |
1074 | 1074 | globalxscroll += 8; |
1075 | 1075 | |
1076 | bitmap.fill(screen.machine().pens[0], cliprect); | |
1077 | m_temp_reel_bitmap->fill(screen.machine().pens[0], cliprect); | |
1076 | bitmap.fill(machine().pens[0], cliprect); | |
1077 | m_temp_reel_bitmap->fill(machine().pens[0], cliprect); | |
1078 | 1078 | |
1079 | 1079 | /* render reels to bitmap */ |
1080 | 1080 | sfbonus_draw_reel_layer(screen,*m_temp_reel_bitmap,cliprect,0); |
r17988 | r17989 | |
1170 | 1170 | m_1800_regs[7]); |
1171 | 1171 | #endif |
1172 | 1172 | |
1173 | ipt = | |
1173 | ipt = | |
1174 | 1174 | if ((ipt == INPUT_PORTS_NAME(amcoe2_reels3)) || (ipt == INPUT_PORTS_NAME(amcoe2_reels4)) |
1175 | 1175 | || (ipt == INPUT_PORTS_NAME(amcoe2_poker))) |
1176 | 1176 | { |
r17988 | r17989 | |
---|---|---|
651 | 651 | |
652 | 652 | UINT32 crystal_state::screen_update_crystal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
653 | 653 | { |
654 | address_space &space = * | |
654 | address_space &space = * | |
655 | 655 | int DoFlip; |
656 | 656 | |
657 | 657 | UINT32 B0 = 0x0; |
r17988 | r17989 | |
716 | 716 | // rising edge |
717 | 717 | if (state) |
718 | 718 | { |
719 | address_space &space = * | |
719 | address_space &space = * | |
720 | 720 | UINT16 head, tail; |
721 | 721 | int DoFlip = 0; |
722 | 722 |
r17988 | r17989 | |
---|---|---|
109 | 109 | int tileno, colour; |
110 | 110 | tileno = m_video[count] | (m_video[count + 0x800] << 8); |
111 | 111 | colour = m_video[count + 0x1000] >> 3; |
112 | drawgfx_opaque(bitmap,cliprect, | |
112 | drawgfx_opaque(bitmap,cliprect, | |
113 | 113 | count++; |
114 | 114 | } |
115 | 115 | } |
r17988 | r17989 | |
---|---|---|
542 | 542 | UINT32 famibox_state::screen_update_famibox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
543 | 543 | { |
544 | 544 | /* render the ppu */ |
545 | ppu2c0x_device *ppu = | |
545 | ppu2c0x_device *ppu = | |
546 | 546 | ppu->render(bitmap, 0, 0, 0, 0); |
547 | 547 | return 0; |
548 | 548 | } |
r17988 | r17989 | |
---|---|---|
166 | 166 | { |
167 | 167 | int tile=0x30+((spriteram[i]>>2)&0x1f); |
168 | 168 | |
169 | drawgfx_transpen(bitmap,cliprect, | |
169 | drawgfx_transpen(bitmap,cliprect, | |
170 | 170 | tile, |
171 | 171 | spriteram[i+1], |
172 | 172 | 0, 0, |
173 | 173 | spriteram[i+3],spriteram[i+2],3); |
174 | 174 | |
175 | drawgfx_transpen(bitmap,cliprect, | |
175 | drawgfx_transpen(bitmap,cliprect, | |
176 | 176 | tile, |
177 | 177 | spriteram[i+1], |
178 | 178 | 0, 0, |
179 | 179 | spriteram[i+3]+8,spriteram[i+2],3); |
180 | 180 | |
181 | drawgfx_transpen(bitmap,cliprect, | |
181 | drawgfx_transpen(bitmap,cliprect, | |
182 | 182 | tile, |
183 | 183 | spriteram[i+1], |
184 | 184 | 0, 0, |
185 | 185 | spriteram[i+3]+8,spriteram[i+2]+8,3); |
186 | 186 | |
187 | drawgfx_transpen(bitmap,cliprect, | |
187 | drawgfx_transpen(bitmap,cliprect, | |
188 | 188 | tile, |
189 | 189 | spriteram[i+1], |
190 | 190 | 0, 0, |
r17988 | r17989 | |
---|---|---|
68 | 68 | UINT32 hitme_state::screen_update_hitme(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
69 | 69 | { |
70 | 70 | /* the card width resistor comes from an input port, scaled to the range 0-25 kOhms */ |
71 | double width_resist = | |
71 | double width_resist = | |
72 | 72 | /* this triggers a oneshot for the following length of time */ |
73 | 73 | double width_duration = 0.45 * 1000e-12 * width_resist; |
74 | 74 | /* the dot clock runs at the standard horizontal frequency * 320+16 clocks per scanline */ |
r17988 | r17989 | |
---|---|---|
101 | 101 | int charx, chary; |
102 | 102 | |
103 | 103 | /* make color 0 transparent */ |
104 | palette_set_color( | |
104 | palette_set_color( | |
105 | 105 | |
106 | 106 | /* clear */ |
107 | 107 | bitmap.fill(0, cliprect); |
r17988 | r17989 | |
115 | 115 | |
116 | 116 | /* Somewhere there's a flag that offsets the tilemap by 0x100*x */ |
117 | 117 | /* Palette is likely set somewhere as well (tile_control_ram?) */ |
118 | drawgfx_transpen(bitmap, cliprect, | |
118 | drawgfx_transpen(bitmap, cliprect, | |
119 | 119 | m_tile_ram[current_screen_character], |
120 | 120 | 0, |
121 | 121 | 0, 0, charx*8, chary*8, 0); |
r17988 | r17989 | |
---|---|---|
285 | 285 | { |
286 | 286 | int i; |
287 | 287 | |
288 | bitmap.fill(get_black_pen( | |
288 | bitmap.fill(get_black_pen( | |
289 | 289 | |
290 | 290 | if (!m_disp_enable) return 0; |
291 | 291 |
r17988 | r17989 | |
---|---|---|
295 | 295 | { |
296 | 296 | UINT8* gfxroms = memregion("gfx2")->base(); |
297 | 297 | |
298 | bitmap.fill(get_black_pen( | |
298 | bitmap.fill(get_black_pen( | |
299 | 299 | |
300 | ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, m_tilemap_ram[3], m_tilemap_regs[3], gfxroms ); | |
301 | draw_sprites(screen.machine(),bitmap,cliprect, 1); | |
302 | ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, m_tilemap_ram[2], m_tilemap_regs[2], gfxroms ); | |
300 | ttmjprd_draw_tilemap( machine(), bitmap, cliprect, m_tilemap_ram[3], m_tilemap_regs[3], gfxroms ); | |
301 | draw_sprites(machine(),bitmap,cliprect, 1); | |
302 | ttmjprd_draw_tilemap( machine(), bitmap, cliprect, m_tilemap_ram[2], m_tilemap_regs[2], gfxroms ); | |
303 | 303 | |
304 | 304 | /* |
305 | 305 | popmessage("%08x %08x %08x %08x %08x %08x", |
r17988 | r17989 | |
329 | 329 | { |
330 | 330 | UINT8* gfxroms = memregion("gfx2")->base(); |
331 | 331 | |
332 | bitmap.fill(get_black_pen( | |
332 | bitmap.fill(get_black_pen( | |
333 | 333 | |
334 | ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, m_tilemap_ram[1], m_tilemap_regs[1], gfxroms ); | |
335 | draw_sprites(screen.machine(),bitmap,cliprect, 0); | |
336 | ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, m_tilemap_ram[0], m_tilemap_regs[0], gfxroms ); | |
334 | ttmjprd_draw_tilemap( machine(), bitmap, cliprect, m_tilemap_ram[1], m_tilemap_regs[1], gfxroms ); | |
335 | draw_sprites(machine(),bitmap,cliprect, 0); | |
336 | ttmjprd_draw_tilemap( machine(), bitmap, cliprect, m_tilemap_ram[0], m_tilemap_regs[0], gfxroms ); | |
337 | 337 | |
338 | 338 | return 0; |
339 | 339 | } |
r17988 | r17989 | |
---|---|---|
774 | 774 | |
775 | 775 | m_gfx1_tilemap->draw(bitmap, cliprect, 0,0); |
776 | 776 | m_gfx0a_tilemap->draw(bitmap, cliprect, 0,0); |
777 | draw_sprites( | |
777 | draw_sprites( | |
778 | 778 | m_gfx0b_tilemap->draw(bitmap, cliprect, 0,0); |
779 | 779 | return 0; |
780 | 780 | } |
r17988 | r17989 | |
---|---|---|
362 | 362 | if (bgenable==3) m_reel4_tilemap->draw(bitmap, clip, 0, 0); |
363 | 363 | } |
364 | 364 | |
365 | if (tileattr&0x08) drawgfx_transpen(bitmap,clip, | |
365 | if (tileattr&0x08) drawgfx_transpen(bitmap,clip, | |
366 | 366 | |
367 | 367 | #else // treat it as priority flag instead (looks better in non-adult title screen - needs verifying) |
368 | if (!(tileattr&0x08)) drawgfx_transpen(bitmap,clip, | |
368 | if (!(tileattr&0x08)) drawgfx_transpen(bitmap,clip, | |
369 | 369 | |
370 | 370 | if (tileattr&0x04) |
371 | 371 | { |
r17988 | r17989 | |
375 | 375 | if (bgenable==3) m_reel4_tilemap->draw(bitmap, clip, 0, 0); |
376 | 376 | } |
377 | 377 | |
378 | if ((tileattr&0x08)) drawgfx_transpen(bitmap,clip, | |
378 | if ((tileattr&0x08)) drawgfx_transpen(bitmap,clip, | |
379 | 379 | #endif |
380 | 380 | |
381 | 381 | count++; |
r17988 | r17989 | |
---|---|---|
309 | 309 | int layers_ctrl = -1; |
310 | 310 | |
311 | 311 | #ifdef MAME_DEBUG |
312 | if ( | |
312 | if ( | |
313 | 313 | { |
314 | 314 | int msk = 0; |
315 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
316 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
317 | if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
318 | if (screen.machine().input().code_pressed(KEYCODE_R)) msk |= 8; | |
315 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
316 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
317 | if (machine().input().code_pressed(KEYCODE_E)) msk |= 4; | |
318 | if (machine().input().code_pressed(KEYCODE_R)) msk |= 8; | |
319 | 319 | if (msk != 0) layers_ctrl &= msk; |
320 | 320 | } |
321 | 321 | #endif |
322 | 322 | |
323 | bitmap.fill(get_black_pen( | |
323 | bitmap.fill(get_black_pen( | |
324 | 324 | |
325 | 325 | // Draw from priority 3 (bottom, converted to a bitmask) to priority 0 (top) |
326 | draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 8); | |
327 | draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 4); | |
328 | draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 2); | |
329 | draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 1); | |
326 | draw_sprites(machine(), bitmap, cliprect, layers_ctrl & 8); | |
327 | draw_sprites(machine(), bitmap, cliprect, layers_ctrl & 4); | |
328 | draw_sprites(machine(), bitmap, cliprect, layers_ctrl & 2); | |
329 | draw_sprites(machine(), bitmap, cliprect, layers_ctrl & 1); | |
330 | 330 | |
331 | 331 | return 0; |
332 | 332 | } |
r17988 | r17989 | |
---|---|---|
264 | 264 | |
265 | 265 | //popmessage("%04x",m_vregs[0/2]); |
266 | 266 | |
267 | draw_layer(screen.machine(),bitmap,cliprect,3); | |
268 | draw_layer(screen.machine(),bitmap,cliprect,2); | |
269 | draw_layer(screen.machine(),bitmap,cliprect,1); | |
270 | draw_layer(screen.machine(),bitmap,cliprect,0); | |
271 | draw_sprites(screen.machine(),bitmap,cliprect); | |
267 | draw_layer(machine(),bitmap,cliprect,3); | |
268 | draw_layer(machine(),bitmap,cliprect,2); | |
269 | draw_layer(machine(),bitmap,cliprect,1); | |
270 | draw_layer(machine(),bitmap,cliprect,0); | |
271 | draw_sprites(machine(),bitmap,cliprect); | |
272 | 272 | |
273 | 273 | return 0; |
274 | 274 | } |
r17988 | r17989 | |
---|---|---|
417 | 417 | { |
418 | 418 | pen_t pens[ASTROF_NUM_PENS]; |
419 | 419 | |
420 | astrof_get_pens( | |
420 | astrof_get_pens( | |
421 | 421 | |
422 | video_update_common( | |
422 | video_update_common( | |
423 | 423 | |
424 | 424 | return 0; |
425 | 425 | } |
r17988 | r17989 | |
429 | 429 | { |
430 | 430 | pen_t pens[TOMAHAWK_NUM_PENS]; |
431 | 431 | |
432 | tomahawk_get_pens( | |
432 | tomahawk_get_pens( | |
433 | 433 | |
434 | video_update_common( | |
434 | video_update_common( | |
435 | 435 | |
436 | 436 | return 0; |
437 | 437 | } |
r17988 | r17989 | |
---|---|---|
129 | 129 | // rising edge |
130 | 130 | if (state) |
131 | 131 | { |
132 | device_t *pandora = | |
132 | device_t *pandora = | |
133 | 133 | pandora_eof(pandora); |
134 | 134 | } |
135 | 135 | } |
r17988 | r17989 | |
---|---|---|
201 | 201 | |
202 | 202 | UINT32 igspoker_state::screen_update_igs_video(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
203 | 203 | { |
204 | bitmap.fill(get_black_pen( | |
204 | bitmap.fill(get_black_pen( | |
205 | 205 | |
206 | 206 | // FIX: CSK227IT must have some way to disable background, or wrong gfx? |
207 | 207 | if (m_bg_enable) m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
239 | 239 | |
240 | 240 | m_tmpbitmaps[0].fill(color_base); |
241 | 241 | |
242 | if ( | |
242 | if ( | |
243 | 243 | planes_enabled[0] ^= 1; |
244 | 244 | |
245 | if ( | |
245 | if ( | |
246 | 246 | planes_enabled[1] ^= 1; |
247 | 247 | |
248 | if ( | |
248 | if ( | |
249 | 249 | planes_enabled[2] ^= 1; |
250 | 250 | |
251 | if ( | |
251 | if ( | |
252 | 252 | planes_enabled[3] ^= 1; |
253 | 253 | |
254 | if ( | |
254 | if ( | |
255 | 255 | m_dbg_info = !m_dbg_info; |
256 | 256 | |
257 | if ( | |
257 | if ( | |
258 | 258 | m_dbg_gfx_e = !m_dbg_gfx_e; |
259 | 259 | |
260 | if ( | |
260 | if ( | |
261 | 261 | m_dbg_clr_e = !m_dbg_clr_e; |
262 | 262 | |
263 | if ( | |
263 | if ( | |
264 | 264 | m_dbg_vbank ^= 1; |
265 | 265 | |
266 | if ( | |
266 | if ( | |
267 | 267 | m_dbg_lookup = (m_dbg_lookup + 1) % 5; //0,1,2,3, 4-off |
268 | 268 | |
269 | 269 | |
270 | 270 | if (m_dbg_info) |
271 | 271 | { |
272 | 272 | sprintf(buf,"I-info, G-gfx, C-color, V-vbank, 1-4 enable planes"); |
273 | ui_draw_text(buf, 10, 0 * ui_get_line_height( | |
273 | ui_draw_text(buf, 10, 0 * ui_get_line_height( | |
274 | 274 | |
275 | 275 | sprintf(buf,"g:%1i c:%1i v:%1i vbk=%1i planes=%1i%1i%1i%1i ", m_dbg_gfx_e&1, m_dbg_clr_e&1, m_dbg_vbank, vbank&1, |
276 | 276 | planes_enabled[0], |
r17988 | r17989 | |
278 | 278 | planes_enabled[2], |
279 | 279 | planes_enabled[3] ); |
280 | 280 | |
281 | ui_draw_text(buf, 10, 1 * ui_get_line_height( | |
281 | ui_draw_text(buf, 10, 1 * ui_get_line_height( | |
282 | 282 | |
283 | 283 | if (m_dbg_lookup!=4) |
284 | 284 | { |
r17988 | r17989 | |
293 | 293 | { |
294 | 294 | sprintf(buf + strlen(buf), "%02x ", lookup_ram[lookup_offs + x + y * 16]); |
295 | 295 | } |
296 | ui_draw_text(buf, 0, (2 + y) * ui_get_line_height( | |
296 | ui_draw_text(buf, 0, (2 + y) * ui_get_line_height( | |
297 | 297 | } |
298 | 298 | } |
299 | 299 | } |
r17988 | r17989 | |
---|---|---|
78 | 78 | int x,y,count; |
79 | 79 | const UINT8 *blit_ram = memregion("gfx1")->base(); |
80 | 80 | |
81 | if( | |
81 | if( | |
82 | 82 | m_test_x++; |
83 | 83 | |
84 | if( | |
84 | if( | |
85 | 85 | m_test_x--; |
86 | 86 | |
87 | if( | |
87 | if( | |
88 | 88 | m_test_y++; |
89 | 89 | |
90 | if( | |
90 | if( | |
91 | 91 | m_test_y--; |
92 | 92 | |
93 | if( | |
93 | if( | |
94 | 94 | m_start_offs+=0x200; |
95 | 95 | |
96 | if( | |
96 | if( | |
97 | 97 | m_start_offs-=0x200; |
98 | 98 | |
99 | if( | |
99 | if( | |
100 | 100 | m_start_offs++; |
101 | 101 | |
102 | if( | |
102 | if( | |
103 | 103 | m_start_offs--; |
104 | 104 | |
105 | 105 | popmessage("%d %d %04x",m_test_x,m_test_y,m_start_offs); |
106 | 106 | |
107 | bitmap.fill(get_black_pen( | |
107 | bitmap.fill(get_black_pen( | |
108 | 108 | |
109 | 109 | count = (m_start_offs); |
110 | 110 | |
r17988 | r17989 | |
117 | 117 | color = (blit_ram[count] & 0xff)>>0; |
118 | 118 | |
119 | 119 | if(cliprect.contains(x, y)) |
120 | bitmap.pix32(y, x) = | |
120 | bitmap.pix32(y, x) = | |
121 | 121 | |
122 | 122 | count++; |
123 | 123 | } |
r17988 | r17989 | |
---|---|---|
111 | 111 | |
112 | 112 | if( color < 0x4 ) |
113 | 113 | { |
114 | drawgfx_opaque( bitmap, cliprect, | |
114 | drawgfx_opaque( bitmap, cliprect, | |
115 | 115 | } |
116 | 116 | else if( color >= 0x5 && color <= 0x7 ) |
117 | 117 | { |
r17988 | r17989 | |
119 | 119 | int x; |
120 | 120 | static const int spriteskip[] = { 1, 2, 4 }; |
121 | 121 | int spritesize = spriteskip[ color - 5 ]; |
122 | gfx_element *gfx = | |
122 | gfx_element *gfx = | |
123 | 123 | |
124 | 124 | for( x = 0; x < 16; x++ ) |
125 | 125 | { |
r17988 | r17989 | |
---|---|---|
519 | 519 | { |
520 | 520 | // m_videoreg[4] ???? It always has this value: 0xffeffff8 (2 signed bytes? values: -17 and -8 ?) |
521 | 521 | |
522 | | |
522 | | |
523 | 523 | |
524 | 524 | m_bg_tilemap->enable(m_videoreg[0] & 4); |
525 | 525 | m_md_tilemap->enable(m_videoreg[0] & 2); |
r17988 | r17989 | |
538 | 538 | m_fg_tilemap->draw(bitmap, cliprect, 0,1); |
539 | 539 | |
540 | 540 | if(m_videoreg[0] & 8) |
541 | copy_sprites( | |
541 | copy_sprites( | |
542 | 542 | |
543 | 543 | return 0; |
544 | 544 | } |
r17988 | r17989 | |
---|---|---|
80 | 80 | { |
81 | 81 | int y,x; |
82 | 82 | int count; |
83 | gfx_element *gfx = | |
83 | gfx_element *gfx = | |
84 | 84 | |
85 | 85 | count = 0; |
86 | 86 |
r17988 | r17989 | |
---|---|---|
171 | 171 | |
172 | 172 | UINT32 galaxygame_state::screen_update_galaxygame(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
173 | 173 | { |
174 | bitmap.fill(get_black_pen( | |
174 | bitmap.fill(get_black_pen( | |
175 | 175 | for (int i = 0; i < m_point_display_list_index; i++ ) |
176 | 176 | { |
177 | 177 | bitmap.pix16(m_point_display_list[i].x >> 7, m_point_display_list[i].y >> 7) = 1; |
r17988 | r17989 | |
---|---|---|
137 | 137 | |
138 | 138 | m_tilemap_bg->draw(bitmap, cliprect, 0, 0); |
139 | 139 | m_tilemap_fg->draw(bitmap, cliprect, 0, 0); |
140 | draw_sprites( | |
140 | draw_sprites( | |
141 | 141 | return 0; |
142 | 142 | } |
143 | 143 |
r17988 | r17989 | |
---|---|---|
192 | 192 | if (m_sprites[x + 1] & 0x10) |
193 | 193 | { |
194 | 194 | /* 32x32 sprites */ |
195 | drawgfx_transpen(bitmap, cliprect, | |
195 | drawgfx_transpen(bitmap, cliprect, | |
196 | 196 | } |
197 | 197 | else |
198 | 198 | { |
199 | 199 | /* 16x16 sprites */ |
200 | drawgfx_transpen(bitmap, cliprect, | |
200 | drawgfx_transpen(bitmap, cliprect, | |
201 | 201 | } |
202 | 202 | } |
203 | 203 | return 0; |
r17988 | r17989 | |
---|---|---|
157 | 157 | */ |
158 | 158 | |
159 | 159 | int x,y,z,pixdat; |
160 | bitmap.fill(get_black_pen( | |
160 | bitmap.fill(get_black_pen( | |
161 | 161 | |
162 | 162 | z=0; |
163 | 163 | for (y=0;y<230;y++) |
r17988 | r17989 | |
---|---|---|
58 | 58 | UINT32 kongambl_state::screen_update_kongambl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
59 | 59 | { |
60 | 60 | #if CUSTOM_DRAW |
61 | gfx_element *gfx = | |
61 | gfx_element *gfx = | |
62 | 62 | UINT32 count; |
63 | 63 | |
64 | 64 | count = 0; |
r17988 | r17989 | |
69 | 69 | { |
70 | 70 | UINT32 tile = m_vram[count] & 0xffff; |
71 | 71 | |
72 | if( | |
72 | if( | |
73 | 73 | drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8); |
74 | 74 | |
75 | 75 | count++; |
r17988 | r17989 | |
84 | 84 | { |
85 | 85 | UINT32 tile = m_vram[count] & 0xffff; |
86 | 86 | |
87 | if( | |
87 | if( | |
88 | 88 | drawgfx_transpen(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8,0); |
89 | 89 | |
90 | 90 | count++; |
r17988 | r17989 | |
93 | 93 | |
94 | 94 | |
95 | 95 | #else |
96 | device_t *k056832 = | |
96 | device_t *k056832 = | |
97 | 97 | |
98 | 98 | bitmap.fill(0, cliprect); |
99 | | |
99 | | |
100 | 100 | |
101 | 101 | k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 0); |
102 | 102 | k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 0); |
r17988 | r17989 | |
---|---|---|
962 | 962 | |
963 | 963 | UINT32 raiden2_state::screen_update_raiden2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
964 | 964 | { |
965 | bitmap.fill(get_black_pen( | |
965 | bitmap.fill(get_black_pen( | |
966 | 966 | |
967 | //if (! | |
967 | //if (! | |
968 | 968 | { |
969 | 969 | if (!(raiden2_tilemap_enable & 1)) |
970 | 970 | background_layer->draw(bitmap, cliprect, 0, 0); |
971 | 971 | } |
972 | 972 | |
973 | //if (! | |
973 | //if (! | |
974 | 974 | { |
975 | 975 | if (!(raiden2_tilemap_enable & 2)) |
976 | 976 | midground_layer->draw(bitmap, cliprect, 0, 0); |
977 | 977 | } |
978 | 978 | |
979 | //if (! | |
979 | //if (! | |
980 | 980 | { |
981 | 981 | if (!(raiden2_tilemap_enable & 4)) |
982 | 982 | foreground_layer->draw(bitmap, cliprect, 0, 0); |
983 | 983 | } |
984 | 984 | |
985 | //if (! | |
985 | //if (! | |
986 | 986 | { |
987 | 987 | //if (!(raiden2_tilemap_enable & 0x10)) |
988 | draw_sprites( | |
988 | draw_sprites( | |
989 | 989 | } |
990 | 990 | |
991 | //if (! | |
991 | //if (! | |
992 | 992 | { |
993 | 993 | if (!(raiden2_tilemap_enable & 8)) |
994 | 994 | text_layer->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
281 | 281 | { |
282 | 282 | if (m_vregs[0xcc / 2] & 0x80) |
283 | 283 | { |
284 | ddealer_draw_video_layer(screen.machine(), &m_vregs[0x1e0 / 2], m_left_fg_vram_top, m_left_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
285 | ddealer_draw_video_layer(screen.machine(), &m_vregs[0xcc / 2], m_right_fg_vram_top, m_right_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
284 | ddealer_draw_video_layer(machine(), &m_vregs[0x1e0 / 2], m_left_fg_vram_top, m_left_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
285 | ddealer_draw_video_layer(machine(), &m_vregs[0xcc / 2], m_right_fg_vram_top, m_right_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
286 | 286 | } |
287 | 287 | else |
288 | 288 | { |
289 | ddealer_draw_video_layer( | |
289 | ddealer_draw_video_layer( | |
290 | 290 | } |
291 | 291 | } |
292 | 292 | else |
293 | 293 | { |
294 | 294 | if (m_vregs[0xcc / 2] & 0x80) |
295 | 295 | { |
296 | ddealer_draw_video_layer(screen.machine(), &m_vregs[0xcc / 2], m_left_fg_vram_top, m_left_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
297 | ddealer_draw_video_layer(screen.machine(), &m_vregs[0x1e0 / 2], m_right_fg_vram_top, m_right_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
296 | ddealer_draw_video_layer(machine(), &m_vregs[0xcc / 2], m_left_fg_vram_top, m_left_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
297 | ddealer_draw_video_layer(machine(), &m_vregs[0x1e0 / 2], m_right_fg_vram_top, m_right_fg_vram_bottom, bitmap, cliprect, m_flipscreen); | |
298 | 298 | } |
299 | 299 | else |
300 | 300 | { |
301 | ddealer_draw_video_layer( | |
301 | ddealer_draw_video_layer( | |
302 | 302 | } |
303 | 303 | |
304 | 304 | } |
r17988 | r17989 | |
---|---|---|
461 | 461 | pen_t pens[NUM_PENS]; |
462 | 462 | offs_t offs; |
463 | 463 | |
464 | get_pens( | |
464 | get_pens( | |
465 | 465 | |
466 | 466 | for (offs = 0; offs < m_videoram.bytes(); offs++) |
467 | 467 | { |
r17988 | r17989 | |
---|---|---|
137 | 137 | UINT32 vpoker_state::screen_update_vpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
138 | 138 | { |
139 | 139 | UINT8 *videoram = m_videoram; |
140 | gfx_element *gfx = | |
140 | gfx_element *gfx = | |
141 | 141 | int count = 0x0000; |
142 | 142 | |
143 | 143 | int y,x; |
r17988 | r17989 | |
---|---|---|
287 | 287 | int layers_ctrl = m_video_enable ? -1 : 0; |
288 | 288 | |
289 | 289 | #ifdef MAME_DEBUG |
290 | if ( | |
290 | if ( | |
291 | 291 | { |
292 | 292 | int mask = 0; |
293 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
294 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
295 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
293 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
294 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
295 | if (machine().input().code_pressed(KEYCODE_A)) mask |= 4; | |
296 | 296 | if (mask != 0) layers_ctrl &= mask; |
297 | 297 | } |
298 | 298 | #endif |
r17988 | r17989 | |
323 | 323 | /* draw top of screen */ |
324 | 324 | clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin+2); |
325 | 325 | |
326 | bitmap.fill( | |
326 | bitmap.fill( | |
327 | 327 | |
328 | 328 | if (rowenable==0) |
329 | 329 | { // 0 and 1 are the same? or is there a global switchoff? |
r17988 | r17989 | |
347 | 347 | } |
348 | 348 | |
349 | 349 | } |
350 | else bitmap.fill(get_black_pen( | |
350 | else bitmap.fill(get_black_pen( | |
351 | 351 | |
352 | 352 | |
353 | 353 | if (layers_ctrl & 2) m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
r17988 | r17989 | |
---|---|---|
218 | 218 | { |
219 | 219 | for(x = 0; x < 512; x++) |
220 | 220 | { |
221 | bitmap.pix32(y, x) = | |
221 | bitmap.pix32(y, x) = | |
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
r17988 | r17989 | |
239 | 239 | for(x = 0; x < 512; ) |
240 | 240 | { |
241 | 241 | UINT16 pen = *src++; |
242 | bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf]; | |
243 | bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf]; | |
244 | bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf]; | |
245 | bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf]; | |
242 | bitmap.pix32(y, x++) = machine().pens[(pen >> 8) & 0xf]; | |
243 | bitmap.pix32(y, x++) = machine().pens[(pen >> 12) & 0xf]; | |
244 | bitmap.pix32(y, x++) = machine().pens[(pen >> 0) & 0xf]; | |
245 | bitmap.pix32(y, x++) = machine().pens[(pen >> 4) & 0xf]; | |
246 | 246 | } |
247 | 247 | } |
248 | 248 |
r17988 | r17989 | |
---|---|---|
167 | 167 | } |
168 | 168 | |
169 | 169 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
170 | draw_sprites( | |
170 | draw_sprites( | |
171 | 171 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
172 | 172 | return 0; |
173 | 173 | } |
r17988 | r17989 | |
---|---|---|
335 | 335 | UINT32 cb2001_state::screen_update_cb2001(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
336 | 336 | { |
337 | 337 | int count,x,y; |
338 | bitmap.fill(get_black_pen( | |
338 | bitmap.fill(get_black_pen( | |
339 | 339 | |
340 | 340 | count = 0x0000; |
341 | 341 | |
r17988 | r17989 | |
356 | 356 | tile += m_videobank*0x2000; |
357 | 357 | |
358 | 358 | |
359 | drawgfx_opaque(bitmap,cliprect, | |
359 | drawgfx_opaque(bitmap,cliprect, | |
360 | 360 | |
361 | 361 | count++; |
362 | 362 | } |
r17988 | r17989 | |
422 | 422 | tile += 0x1000; |
423 | 423 | } |
424 | 424 | |
425 | drawgfx_transpen(bitmap,cliprect, | |
425 | drawgfx_transpen(bitmap,cliprect, | |
426 | 426 | count++; |
427 | 427 | } |
428 | 428 | } |
r17988 | r17989 | |
---|---|---|
527 | 527 | m_tx_tilemap->draw(*m_tile, cliprect, 0, 0); |
528 | 528 | |
529 | 529 | m_obj1->fill(0); |
530 | drawgfx_transpen(*m_obj1, m_obj1->cliprect(), | |
530 | drawgfx_transpen(*m_obj1, m_obj1->cliprect(), | |
531 | 531 | OBJ_CODE(m_obj1_a), |
532 | 532 | OBJ_COLOR(m_obj1_a), |
533 | 533 | OBJ_FLIPX(m_obj1_a), OBJ_FLIPY(m_obj1_a), |
534 | 534 | 0, 0, 0); |
535 | 535 | |
536 | 536 | m_obj2->fill(0); |
537 | drawgfx_transpen(*m_obj2, m_obj2->cliprect(), | |
537 | drawgfx_transpen(*m_obj2, m_obj2->cliprect(), | |
538 | 538 | OBJ_CODE(m_obj2_a), |
539 | 539 | OBJ_COLOR(m_obj2_a), |
540 | 540 | OBJ_FLIPX(m_obj2_a), OBJ_FLIPY(m_obj2_a), |
r17988 | r17989 | |
---|---|---|
1082 | 1082 | { |
1083 | 1083 | for (uu=0;uu<1023;uu++) |
1084 | 1084 | { |
1085 | cps3_draw_tilemapsprite_line( | |
1085 | cps3_draw_tilemapsprite_line( | |
1086 | 1086 | } |
1087 | 1087 | } |
1088 | 1088 | bg_drawn[tilemapnum] = 1; |
r17988 | r17989 | |
1155 | 1155 | /* use the bpp value from the main list or the sublists? */ |
1156 | 1156 | if (whichbpp) |
1157 | 1157 | { |
1158 | if (!global_bpp) screen.machine().gfx[1]->set_granularity(256); | |
1159 | else screen.machine().gfx[1]->set_granularity(64); | |
1158 | if (!global_bpp) machine().gfx[1]->set_granularity(256); | |
1159 | else machine().gfx[1]->set_granularity(64); | |
1160 | 1160 | } |
1161 | 1161 | else |
1162 | 1162 | { |
1163 | if (!bpp) screen.machine().gfx[1]->set_granularity(256); | |
1164 | else screen.machine().gfx[1]->set_granularity(64); | |
1163 | if (!bpp) machine().gfx[1]->set_granularity(256); | |
1164 | else machine().gfx[1]->set_granularity(64); | |
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | { |
r17988 | r17989 | |
1169 | 1169 | |
1170 | 1170 | if (global_alpha || alpha) |
1171 | 1171 | { |
1172 | cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip, | |
1172 | cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip, | |
1173 | 1173 | } |
1174 | 1174 | else |
1175 | 1175 | { |
1176 | cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip, | |
1176 | cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip, | |
1177 | 1177 | } |
1178 | 1178 | count++; |
1179 | 1179 | } |
r17988 | r17989 | |
1239 | 1239 | pal += m_ss_pal_base << 5; |
1240 | 1240 | tile+=0x200; |
1241 | 1241 | |
1242 | cps3_drawgfxzoom(bitmap, cliprect, | |
1242 | cps3_drawgfxzoom(bitmap, cliprect, | |
1243 | 1243 | count++; |
1244 | 1244 | } |
1245 | 1245 | } |
r17988 | r17989 | |
---|---|---|
305 | 305 | UINT16 pixdata1; |
306 | 306 | UINT16 pixdata2; |
307 | 307 | |
308 | bitmap.fill(get_black_pen( | |
308 | bitmap.fill(get_black_pen( | |
309 | 309 | |
310 | | |
310 | | |
311 | 311 | |
312 | 312 | m_view2_0->kaneko16_prepare(bitmap, cliprect); |
313 | 313 | |
r17988 | r17989 | |
319 | 319 | m_sprite_bitmap_1->fill(0x0000, cliprect); |
320 | 320 | m_sprite_bitmap_2->fill(0x0000, cliprect); |
321 | 321 | |
322 | m_spritegen1->skns_draw_sprites(screen.machine(), *m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, screen.machine().root_device().memregion("gfx1")->base(), screen.machine().root_device().memregion ("gfx1")->bytes(), m_sprite_regs32_1 ); | |
323 | m_spritegen2->skns_draw_sprites(screen.machine(), *m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, screen.machine().root_device().memregion("gfx2")->base(), memregion ("gfx2")->bytes(), m_sprite_regs32_2 ); | |
322 | m_spritegen1->skns_draw_sprites(machine(), *m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, machine().root_device().memregion("gfx1")->base(), machine().root_device().memregion ("gfx1")->bytes(), m_sprite_regs32_1 ); | |
323 | m_spritegen2->skns_draw_sprites(machine(), *m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, machine().root_device().memregion("gfx2")->base(), memregion ("gfx2")->bytes(), m_sprite_regs32_2 ); | |
324 | 324 | |
325 | 325 | // ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes |
326 | 326 | for (y=0;y<240;y++) |
r17988 | r17989 | |
---|---|---|
103 | 103 | { |
104 | 104 | UINT16 srcpix = *src++; |
105 | 105 | |
106 | *dst++ = screen.machine().pens[256+(srcpix & 0xff) + (m_pal_fg_bank & 1 ? 0x100 : 0x000)]; | |
107 | *dst++ = screen.machine().pens[256+(srcpix >> 8) + (m_pal_fg_bank & 1 ? 0x100 : 0x000)]; | |
106 | *dst++ = machine().pens[256+(srcpix & 0xff) + (m_pal_fg_bank & 1 ? 0x100 : 0x000)]; | |
107 | *dst++ = machine().pens[256+(srcpix >> 8) + (m_pal_fg_bank & 1 ? 0x100 : 0x000)]; | |
108 | 108 | } |
109 | 109 | } |
110 | 110 |
r17988 | r17989 | |
---|---|---|
115 | 115 | { |
116 | 116 | bitmap.fill(0, cliprect); |
117 | 117 | |
118 | draw_layer(screen.machine(),bitmap,cliprect,1,2); | |
119 | draw_layer(screen.machine(),bitmap,cliprect,0,2); | |
118 | draw_layer(machine(),bitmap,cliprect,1,2); | |
119 | draw_layer(machine(),bitmap,cliprect,0,2); | |
120 | 120 | |
121 | 121 | return 0; |
122 | 122 | } |
r17988 | r17989 | |
125 | 125 | { |
126 | 126 | bitmap.fill(0, cliprect); |
127 | 127 | |
128 | draw_layer(screen.machine(),bitmap,cliprect,1,0); | |
129 | draw_layer(screen.machine(),bitmap,cliprect,2,0); | |
130 | draw_layer(screen.machine(),bitmap,cliprect,0,0); | |
128 | draw_layer(machine(),bitmap,cliprect,1,0); | |
129 | draw_layer(machine(),bitmap,cliprect,2,0); | |
130 | draw_layer(machine(),bitmap,cliprect,0,0); | |
131 | 131 | |
132 | 132 | return 0; |
133 | 133 | } |
r17988 | r17989 | |
---|---|---|
363 | 363 | int layers_ctrl = -1; |
364 | 364 | |
365 | 365 | #ifdef MAME_DEBUG |
366 | if ( | |
366 | if ( | |
367 | 367 | { |
368 | 368 | int mask = 0; |
369 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
370 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
369 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 1; | |
370 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 2; | |
371 | 371 | if (mask != 0) layers_ctrl &= mask; |
372 | 372 | } |
373 | 373 | #endif |
374 | 374 | |
375 | 375 | |
376 | bitmap.fill(get_black_pen( | |
376 | bitmap.fill(get_black_pen( | |
377 | 377 | |
378 | 378 | if (layers_ctrl & 1) copybitmap_trans(bitmap, m_bitmap[0][(m_regs[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff); |
379 | 379 | if (layers_ctrl & 2) copybitmap_trans(bitmap, m_bitmap[1][(m_regs[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff); |
r17988 | r17989 | |
---|---|---|
117 | 117 | m_tmap->draw(bitmap, cliprect, 0, 0); |
118 | 118 | |
119 | 119 | /* draw pitcher */ |
120 | drawgfx_transpen(bitmap, cliprect, | |
120 | drawgfx_transpen(bitmap, cliprect, | |
121 | 121 | |
122 | 122 | /* draw ball */ |
123 | 123 |
r17988 | r17989 | |
---|---|---|
196 | 196 | |
197 | 197 | if(sx|sy) |
198 | 198 | { |
199 | drawgfx_transpen(bitmap, cliprect, | |
199 | drawgfx_transpen(bitmap, cliprect, | |
200 | 200 | spriteram[offs+1] & 0x3f , |
201 | 201 | (spriteram[offs+2] & 0x1f), |
202 | 202 | flipx, flipy, |
r17988 | r17989 | |
---|---|---|
164 | 164 | int layers_ctrl = -1; |
165 | 165 | |
166 | 166 | #if DUNHUANG_DEBUG |
167 | if ( | |
167 | if ( | |
168 | 168 | { |
169 | 169 | int msk = 0; |
170 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
171 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
170 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
171 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
172 | 172 | if (msk != 0) layers_ctrl &= msk; |
173 | 173 | } |
174 | 174 | #endif |
175 | 175 | |
176 | bitmap.fill(get_black_pen( | |
176 | bitmap.fill(get_black_pen( | |
177 | 177 | |
178 | 178 | switch (m_layers) |
179 | 179 | { |
r17988 | r17989 | |
---|---|---|
196 | 196 | |
197 | 197 | UINT32 deco_ld_state::screen_update_rblaster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
198 | 198 | { |
199 | gfx_element *gfx = | |
199 | gfx_element *gfx = | |
200 | 200 | int y,x; |
201 | 201 | |
202 | 202 | bitmap.fill(0, cliprect); |
203 | 203 | |
204 | draw_sprites(screen.machine(), bitmap,cliprect,m_vram1,0x000); | |
205 | draw_sprites(screen.machine(), bitmap,cliprect,m_vram0,0x100); | |
204 | draw_sprites(machine(), bitmap,cliprect,m_vram1,0x000); | |
205 | draw_sprites(machine(), bitmap,cliprect,m_vram0,0x100); | |
206 | 206 | |
207 | 207 | for (y=0;y<32;y++) |
208 | 208 | { |
r17988 | r17989 | |
---|---|---|
118 | 118 | { |
119 | 119 | int tile = videoram[count]; |
120 | 120 | |
121 | drawgfx_opaque(bitmap,cliprect, | |
121 | drawgfx_opaque(bitmap,cliprect, | |
122 | 122 | /* wrap-around */ |
123 | drawgfx_opaque(bitmap,cliprect, | |
123 | drawgfx_opaque(bitmap,cliprect, | |
124 | 124 | |
125 | 125 | count++; |
126 | 126 | } |
r17988 | r17989 | |
142 | 142 | color = m_fg_fb[(xi+yi*8)+count*0x40]; |
143 | 143 | |
144 | 144 | if(color != 0 && cliprect.contains(x+yi, 256-y+xi)) |
145 | bitmap.pix16(x+yi, 256-y+xi) = | |
145 | bitmap.pix16(x+yi, 256-y+xi) = | |
146 | 146 | } |
147 | 147 | } |
148 | 148 |
r17988 | r17989 | |
---|---|---|
430 | 430 | { |
431 | 431 | |
432 | 432 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
433 | draw_sprites( | |
433 | draw_sprites( | |
434 | 434 | return 0; |
435 | 435 | } |
436 | 436 |
r17988 | r17989 | |
---|---|---|
204 | 204 | int startclipmin = 0; |
205 | 205 | const rectangle &visarea = screen.visible_area(); |
206 | 206 | |
207 | bitmap.fill(get_black_pen( | |
207 | bitmap.fill(get_black_pen( | |
208 | 208 | |
209 | 209 | for (i=0;i < 0x40;i++) |
210 | 210 | { |
r17988 | r17989 | |
---|---|---|
232 | 232 | { |
233 | 233 | int count; |
234 | 234 | int x,y; |
235 | gfx_element *gfx = | |
235 | gfx_element *gfx = | |
236 | 236 | |
237 | bitmap.fill(get_black_pen( | |
237 | bitmap.fill(get_black_pen( | |
238 | 238 | |
239 | 239 | int strip; |
240 | 240 | int page; |
r17988 | r17989 | |
243 | 243 | { |
244 | 244 | for (page = 7;page>0;page--) |
245 | 245 | { |
246 | draw_strip( | |
246 | draw_strip( | |
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
r17988 | r17989 | |
251 | 251 | { |
252 | 252 | for (page = 7;page>0;page--) |
253 | 253 | { |
254 | draw_strip( | |
254 | draw_strip( | |
255 | 255 | } |
256 | 256 | } |
257 | 257 |
r17988 | r17989 | |
---|---|---|
99 | 99 | /* first of all, fill the screen with the background color */ |
100 | 100 | bitmap.fill(0, cliprect); |
101 | 101 | |
102 | drawgfx_opaque(bitmap, cliprect, | |
102 | drawgfx_opaque(bitmap, cliprect, | |
103 | 103 | 0, |
104 | 104 | 0, |
105 | 105 | 0, 0, |
106 | 106 | m_objpos[0], m_objpos[1]); |
107 | 107 | |
108 | drawgfx_opaque(bitmap, cliprect, | |
108 | drawgfx_opaque(bitmap, cliprect, | |
109 | 109 | 0, |
110 | 110 | 0, |
111 | 111 | 0, 0, |
112 | 112 | m_objpos[2], m_objpos[3]); |
113 | 113 | |
114 | drawgfx_opaque(bitmap, cliprect, | |
114 | drawgfx_opaque(bitmap, cliprect, | |
115 | 115 | 0, |
116 | 116 | 0, |
117 | 117 | 0, 0, |
r17988 | r17989 | |
120 | 120 | for (offs = 0; offs < 8; offs++) |
121 | 121 | { |
122 | 122 | drawgfx_opaque(bitmap,/* ?? */ |
123 | cliprect, | |
123 | cliprect, | |
124 | 124 | offs, |
125 | 125 | 0, |
126 | 126 | 0, 0, |
r17988 | r17989 | |
---|---|---|
395 | 395 | tmptilemap0->draw(bitmap, cliprect, 0, 0); |
396 | 396 | tmptilemap1->draw(bitmap, cliprect, 0, 0); |
397 | 397 | |
398 | draw_sprites( | |
398 | draw_sprites( | |
399 | 399 | |
400 | 400 | return 0; |
401 | 401 | } |
r17988 | r17989 | |
---|---|---|
250 | 250 | |
251 | 251 | UINT32 panicr_state::screen_update_panicr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
252 | 252 | { |
253 | bitmap.fill(get_black_pen( | |
253 | bitmap.fill(get_black_pen( | |
254 | 254 | m_txttilemap->mark_all_dirty(); |
255 | 255 | m_bgtilemap->set_scrollx(0, m_scrollx); |
256 | 256 | m_bgtilemap->draw(bitmap, cliprect, 0,0); |
257 | draw_sprites( | |
257 | draw_sprites( | |
258 | 258 | m_txttilemap->draw(bitmap, cliprect, 0,0); |
259 | 259 | |
260 | 260 | return 0; |
r17988 | r17989 | |
---|---|---|
77 | 77 | int tile = m_tile_ram[x+y*32]; |
78 | 78 | int attr = m_tile_control_ram[x+y*32]; |
79 | 79 | |
80 | drawgfx_transpen(bitmap, cliprect, | |
80 | drawgfx_transpen(bitmap, cliprect, | |
81 | 81 | } |
82 | 82 | } |
83 | 83 |
r17988 | r17989 | |
---|---|---|
87 | 87 | |
88 | 88 | UINT32 miragemi_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
89 | 89 | { |
90 | address_space &space = | |
90 | address_space &space = | |
91 | 91 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
92 | 92 | |
93 | 93 | flip_screen_set(BIT(flip, 7)); |
94 | 94 | |
95 | | |
95 | | |
96 | 96 | |
97 | 97 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
98 | 98 | |
99 | 99 | bitmap.fill(256, cliprect); /* not verified */ |
100 | 100 | |
101 | 101 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
102 | | |
102 | | |
103 | 103 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
104 | | |
104 | | |
105 | 105 | |
106 | 106 | return 0; |
107 | 107 | } |
r17988 | r17989 | |
---|---|---|
442 | 442 | { |
443 | 443 | UINT16 *jm_scrollram = m_jm_scrollram; |
444 | 444 | UINT8 cur_prin; |
445 | jalmah_priority_system( | |
445 | jalmah_priority_system( | |
446 | 446 | |
447 | 447 | m_sc0_tilemap_0->set_scrollx(0, jm_scrollram[0] & 0xfff); |
448 | 448 | m_sc0_tilemap_1->set_scrollx(0, jm_scrollram[0] & 0x7ff); |
r17988 | r17989 | |
485 | 485 | m_sc3_tilemap_2->set_scrolly(0, jm_scrollram[7] & 0x1ff); |
486 | 486 | m_sc3_tilemap_3->set_scrolly(0, jm_scrollram[7] & 0x3ff); |
487 | 487 | |
488 | bitmap.fill( | |
488 | bitmap.fill( | |
489 | 489 | |
490 | 490 | for(cur_prin=1;cur_prin<=0x8;cur_prin<<=1) |
491 | 491 | { |
492 | if(cur_prin==m_sc0_prin) { draw_sc0_layer(screen.machine(),bitmap,cliprect); } | |
493 | if(cur_prin==m_sc1_prin) { draw_sc1_layer(screen.machine(),bitmap,cliprect); } | |
494 | if(cur_prin==m_sc2_prin) { draw_sc2_layer(screen.machine(),bitmap,cliprect); } | |
495 | if(cur_prin==m_sc3_prin) { draw_sc3_layer(screen.machine(),bitmap,cliprect); } | |
492 | if(cur_prin==m_sc0_prin) { draw_sc0_layer(machine(),bitmap,cliprect); } | |
493 | if(cur_prin==m_sc1_prin) { draw_sc1_layer(machine(),bitmap,cliprect); } | |
494 | if(cur_prin==m_sc2_prin) { draw_sc2_layer(machine(),bitmap,cliprect); } | |
495 | if(cur_prin==m_sc3_prin) { draw_sc3_layer(machine(),bitmap,cliprect); } | |
496 | 496 | } |
497 | 497 | |
498 | 498 | return 0; |
r17988 | r17989 | |
507 | 507 | m_sc0_tilemap_0->set_scrolly(0, jm_scrollram[4]); |
508 | 508 | m_sc3_tilemap_0->set_scrolly(0, jm_scrollram[7]); |
509 | 509 | |
510 | bitmap.fill( | |
510 | bitmap.fill( | |
511 | 511 | if(m_jm_vregs[0] & 1) { m_sc0_tilemap_0->draw(bitmap, cliprect, 0,0); } |
512 | 512 | if(m_jm_vregs[3] & 1) { m_sc3_tilemap_0->draw(bitmap, cliprect, 0,0); } |
513 | 513 | return 0; |
r17988 | r17989 | |
---|---|---|
119 | 119 | /* Global Column Coloring, GUESS! */ |
120 | 120 | color = m_col_line[(x*2) + 1] ? (m_col_line[(x*2) + 1] - 1) & 7 : 0; |
121 | 121 | |
122 | drawgfx_opaque(bitmap, cliprect, | |
122 | drawgfx_opaque(bitmap, cliprect, | |
123 | 123 | |
124 | 124 | count++; |
125 | 125 | } |
r17988 | r17989 | |
---|---|---|
105 | 105 | UINT32 spoker_state::screen_update_spoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
106 | 106 | { |
107 | 107 | |
108 | bitmap.fill(get_black_pen( | |
108 | bitmap.fill(get_black_pen( | |
109 | 109 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
110 | 110 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
111 | 111 | return 0; |
r17988 | r17989 | |
---|---|---|
222 | 222 | |
223 | 223 | UINT32 zr107_state::screen_update_jetwave(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
224 | 224 | { |
225 | device_t *k001604 = | |
225 | device_t *k001604 = | |
226 | 226 | |
227 | bitmap.fill( | |
227 | bitmap.fill( | |
228 | 228 | |
229 | 229 | K001005_draw(bitmap, cliprect); |
230 | 230 | |
r17988 | r17989 | |
233 | 233 | draw_7segment_led(bitmap, 3, 3, m_led_reg0); |
234 | 234 | draw_7segment_led(bitmap, 9, 3, m_led_reg1); |
235 | 235 | |
236 | sharc_set_flag_input( | |
236 | sharc_set_flag_input( | |
237 | 237 | return 0; |
238 | 238 | } |
239 | 239 | |
r17988 | r17989 | |
274 | 274 | |
275 | 275 | UINT32 zr107_state::screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
276 | 276 | { |
277 | device_t *k056832 = screen.machine().device("k056832"); | |
278 | bitmap.fill(screen.machine().pens[0], cliprect); | |
277 | device_t *k056832 = machine().device("k056832"); | |
278 | bitmap.fill(machine().pens[0], cliprect); | |
279 | 279 | |
280 | 280 | k056832_tilemap_draw(k056832, bitmap, cliprect, 1, 0, 0); |
281 | 281 | K001005_draw(bitmap, cliprect); |
r17988 | r17989 | |
284 | 284 | draw_7segment_led(bitmap, 3, 3, m_led_reg0); |
285 | 285 | draw_7segment_led(bitmap, 9, 3, m_led_reg1); |
286 | 286 | |
287 | sharc_set_flag_input( | |
287 | sharc_set_flag_input( | |
288 | 288 | return 0; |
289 | 289 | } |
290 | 290 |
r17988 | r17989 | |
---|---|---|
152 | 152 | { |
153 | 153 | int x,y,count; |
154 | 154 | |
155 | bitmap.fill(get_black_pen( | |
155 | bitmap.fill(get_black_pen( | |
156 | 156 | |
157 | 157 | // draw playfield |
158 | 158 | if (m_layer & 2) |
r17988 | r17989 | |
179 | 179 | color = ((pen_r >> (7-xi)) & 1)<<0; |
180 | 180 | color|= ((pen_g >> (7-xi)) & 1)<<1; |
181 | 181 | color|= ((pen_b >> (7-xi)) & 1)<<2; |
182 | bitmap.pix32(y, x+xi) = | |
182 | bitmap.pix32(y, x+xi) = | |
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
r17988 | r17989 | |
193 | 193 | { |
194 | 194 | for (x=0;x<32;x++) |
195 | 195 | { |
196 | gfx_element *gfx = | |
196 | gfx_element *gfx = | |
197 | 197 | int tile = m_bank << 8 | m_vram[x+y*0x100]; |
198 | 198 | int color = m_cram[x+y*0x100] & 0x3f; |
199 | 199 | |
r17988 | r17989 | |
221 | 221 | { |
222 | 222 | color = ((pen >> (7-xi)) & 1) ? 0x87 : 0; |
223 | 223 | if(color) |
224 | bitmap.pix32(y, x+xi) = | |
224 | bitmap.pix32(y, x+xi) = | |
225 | 225 | } |
226 | 226 | } |
227 | 227 |
r17988 | r17989 | |
---|---|---|
135 | 135 | { |
136 | 136 | drawgfx_opaque(bitmap, |
137 | 137 | cliprect, |
138 | | |
138 | | |
139 | 139 | m_bgram[index] + 256 * (m_bgram[index + 1] & 0xf), |
140 | 140 | m_bgram[index + 1] >> 4, |
141 | 141 | 0, 0, |
r17988 | r17989 | |
150 | 150 | { |
151 | 151 | drawgfx_transpen( bitmap, |
152 | 152 | cliprect, |
153 | | |
153 | | |
154 | 154 | m_videoram[(y * 32 + x) * 2 + 1] + (m_videoram[(y * 32 + x) * 2] & 7) * 256, |
155 | 155 | (m_videoram[(y * 32 + x) * 2] >> 3), |
156 | 156 | 0, 0, |
r17988 | r17989 | |
158 | 158 | } |
159 | 159 | } |
160 | 160 | |
161 | draw_sprites( | |
161 | draw_sprites( | |
162 | 162 | |
163 | 163 | return 0; |
164 | 164 | } |
r17988 | r17989 | |
---|---|---|
341 | 341 | int sx = 31 * 8 - videoram[0x380 + 0x10 + ball * 2]; |
342 | 342 | int sy = 30 * 8 - videoram[0x380 + 0x18 + ball * 2]; |
343 | 343 | |
344 | drawgfx_transpen(bitmap, cliprect, | |
344 | drawgfx_transpen(bitmap, cliprect, | |
345 | 345 | } |
346 | 346 | return 0; |
347 | 347 | } |
r17988 | r17989 | |
---|---|---|
47 | 47 | |
48 | 48 | UINT32 jackpool_state::screen_update_jackpool(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
49 | 49 | { |
50 | gfx_element *gfx = | |
50 | gfx_element *gfx = | |
51 | 51 | int count;// = 0x00000/2; |
52 | 52 | |
53 | 53 | int y,x; |
r17988 | r17989 | |
---|---|---|
897 | 897 | |
898 | 898 | if (m_priority_reg == 0) |
899 | 899 | { |
900 | | |
900 | | |
901 | 901 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
902 | draw_bitmap( | |
902 | draw_bitmap( | |
903 | 903 | } |
904 | 904 | else if (m_priority_reg == 1) |
905 | 905 | { |
906 | draw_bitmap(screen.machine(), bitmap); | |
907 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
906 | draw_bitmap(machine(), bitmap); | |
907 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
908 | 908 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
909 | 909 | } |
910 | 910 | else if (m_priority_reg == 2) |
911 | 911 | { |
912 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
913 | draw_bitmap(screen.machine(), bitmap); | |
912 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
913 | draw_bitmap(machine(), bitmap); | |
914 | 914 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
915 | 915 | } |
916 | 916 | else if (m_priority_reg == 3) |
917 | 917 | { |
918 | 918 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
919 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
920 | draw_bitmap(screen.machine(), bitmap); | |
919 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
920 | draw_bitmap(machine(), bitmap); | |
921 | 921 | } |
922 | 922 | else if (m_priority_reg == 7) |
923 | 923 | { |
924 | 924 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
925 | draw_bitmap(screen.machine(), bitmap); | |
926 | screen.machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
925 | draw_bitmap(machine(), bitmap); | |
926 | machine().device<decospr_device>("spritegen")->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); | |
927 | 927 | } |
928 | 928 | return 0; |
929 | 929 | } |
r17988 | r17989 | |
---|---|---|
89 | 89 | UINT32 taitowlf_state::screen_update_taitowlf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
90 | 90 | { |
91 | 91 | int x,y,count; |
92 | const UINT8 *blit_ram = | |
92 | const UINT8 *blit_ram = | |
93 | 93 | |
94 | bitmap.fill(get_black_pen( | |
94 | bitmap.fill(get_black_pen( | |
95 | 95 | |
96 | 96 | count = (0); |
97 | 97 | |
r17988 | r17989 | |
104 | 104 | color = (blit_ram[count] & 0xff); |
105 | 105 | |
106 | 106 | if(cliprect.contains(x+0, y)) |
107 | bitmap.pix32(y, x+0) = | |
107 | bitmap.pix32(y, x+0) = | |
108 | 108 | |
109 | 109 | count++; |
110 | 110 | } |
r17988 | r17989 | |
---|---|---|
97 | 97 | int count; |
98 | 98 | int y, x; |
99 | 99 | |
100 | bitmap.fill( | |
100 | bitmap.fill( | |
101 | 101 | |
102 | 102 | m_txt_tilemap->set_scrolly(0, m_tilemap_regs[0] - 3); |
103 | 103 | m_txt_tilemap->set_scrollx(0, m_tilemap_regs[1]); |
r17988 | r17989 | |
139 | 139 | |
140 | 140 | // is spriteram[offs + 0] & 0x200 flipy? it's always set |
141 | 141 | |
142 | drawgfx_transpen(bitmap, cliprect, | |
142 | drawgfx_transpen(bitmap, cliprect, | |
143 | 143 | } |
144 | 144 | } |
145 | 145 |
r17988 | r17989 | |
---|---|---|
1137 | 1137 | |
1138 | 1138 | UINT32 funkball_state::screen_update_funkball(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1139 | 1139 | { |
1140 | voodoo_update( | |
1140 | voodoo_update( | |
1141 | 1141 | return 0; |
1142 | 1142 | } |
1143 | 1143 |
r17988 | r17989 | |
---|---|---|
222 | 222 | |
223 | 223 | UINT32 mirax_state::screen_update_mirax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
224 | 224 | { |
225 | draw_tilemap(screen.machine(),bitmap,cliprect,1); | |
226 | draw_sprites(screen.machine(),bitmap,cliprect); | |
227 | draw_tilemap(screen.machine(),bitmap,cliprect,0); | |
225 | draw_tilemap(machine(),bitmap,cliprect,1); | |
226 | draw_sprites(machine(),bitmap,cliprect); | |
227 | draw_tilemap(machine(),bitmap,cliprect,0); | |
228 | 228 | return 0; |
229 | 229 | } |
230 | 230 |
r17988 | r17989 | |
---|---|---|
64 | 64 | int index=y*64+x; |
65 | 65 | if(m_video&1) |
66 | 66 | { |
67 | DRAW_TILE(screen.machine(),0,0); | |
68 | DRAW_TILE(screen.machine(),0x800,1); | |
67 | DRAW_TILE(machine(),0,0); | |
68 | DRAW_TILE(machine(),0x800,1); | |
69 | 69 | } |
70 | 70 | |
71 | 71 | if(m_video&2) |
72 | 72 | { |
73 | DRAW_TILE(screen.machine(),0x1000,0); | |
74 | DRAW_TILE(screen.machine(),0x1800,1); | |
73 | DRAW_TILE(machine(),0x1000,0); | |
74 | DRAW_TILE(machine(),0x1800,1); | |
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
r17988 | r17989 | |
---|---|---|
237 | 237 | for (x = 0; x < 32; x++) |
238 | 238 | { |
239 | 239 | UINT8 *base = &videoram[y * 64 + x * 2 + 1]; |
240 | drawgfx_opaque(bitmap, cliprect, | |
240 | drawgfx_opaque(bitmap, cliprect, | |
241 | 241 | } |
242 | 242 | |
243 | 243 | return 0; |
r17988 | r17989 | |
---|---|---|
504 | 504 | if(m_pri) //used in Frog & Spiders level 3 |
505 | 505 | { |
506 | 506 | if(!(m_bitmap_disable)) |
507 | draw_bitmap( | |
507 | draw_bitmap( | |
508 | 508 | |
509 | 509 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
510 | 510 | } |
r17988 | r17989 | |
513 | 513 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
514 | 514 | |
515 | 515 | if(!(m_bitmap_disable)) |
516 | draw_bitmap( | |
516 | draw_bitmap( | |
517 | 517 | } |
518 | 518 | |
519 | 519 | /* Sprites are the same as in Galaxian */ |
r17988 | r17989 | |
540 | 540 | if (offs < 3 * 4) |
541 | 541 | sy++; |
542 | 542 | |
543 | drawgfx_transpen(bitmap,cliprect, | |
543 | drawgfx_transpen(bitmap,cliprect, | |
544 | 544 | code,color, |
545 | 545 | flipx,flipy, |
546 | 546 | sx,sy,0); |
r17988 | r17989 | |
---|---|---|
406 | 406 | |
407 | 407 | code = (code & 0x7f) | ((flags & 0x30) << 3); |
408 | 408 | |
409 | drawgfx_transpen(bitmap, cliprect, | |
409 | drawgfx_transpen(bitmap, cliprect, | |
410 | 410 | } |
411 | 411 | |
412 | 412 | { |
r17988 | r17989 | |
417 | 417 | { |
418 | 418 | c = m_videoram[y * 32 + x]; |
419 | 419 | if (x > 1 && x < 30) |
420 | drawgfx_transpen(bitmap, cliprect, | |
420 | drawgfx_transpen(bitmap, cliprect, | |
421 | 421 | else |
422 | drawgfx_opaque(bitmap, cliprect, | |
422 | drawgfx_opaque(bitmap, cliprect, | |
423 | 423 | } |
424 | 424 | } |
425 | 425 | return 0; |
r17988 | r17989 | |
---|---|---|
161 | 161 | int layers_ctrl = -1; |
162 | 162 | |
163 | 163 | #ifdef MAME_DEBUG |
164 | if ( | |
164 | if ( | |
165 | 165 | { |
166 | 166 | int msk = 0; |
167 | if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
168 | if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
167 | if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1; | |
168 | if (machine().input().code_pressed(KEYCODE_W)) msk |= 2; | |
169 | 169 | if (msk != 0) layers_ctrl &= msk; |
170 | 170 | } |
171 | 171 | #endif |
172 | 172 | |
173 | 173 | if (layers_ctrl & 1) m_bg_tmap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
174 | else bitmap.fill(get_black_pen( | |
174 | else bitmap.fill(get_black_pen( | |
175 | 175 | |
176 | bitmap.fill(get_black_pen( | |
176 | bitmap.fill(get_black_pen( | |
177 | 177 | if (layers_ctrl & 2) m_fg_tmap->draw(bitmap, cliprect, 0, 0); |
178 | 178 | |
179 | 179 | return 0; |
r17988 | r17989 | |
---|---|---|
184 | 184 | UINT32 egghunt_state::screen_update_egghunt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
185 | 185 | { |
186 | 186 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
187 | draw_sprites( | |
187 | draw_sprites( | |
188 | 188 | return 0; |
189 | 189 | } |
190 | 190 |
r17988 | r17989 | |
---|---|---|
1275 | 1275 | // and applies it's own external colour circuity |
1276 | 1276 | UINT32 segac2_state::screen_update_segac2_new(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
1277 | 1277 | { |
1278 | const pen_t *paldata = | |
1278 | const pen_t *paldata = | |
1279 | 1279 | if (!m_segac2_enable_display) |
1280 | 1280 | { |
1281 | bitmap.fill(get_black_pen( | |
1281 | bitmap.fill(get_black_pen( | |
1282 | 1282 | return 0; |
1283 | 1283 | } |
1284 | 1284 |
r17988 | r17989 | |
---|---|---|
117 | 117 | |
118 | 118 | UINT32 sandscrp_state::screen_update_sandscrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
119 | 119 | { |
120 | device_t *pandora = | |
120 | device_t *pandora = | |
121 | 121 | bitmap.fill(0, cliprect); |
122 | 122 | |
123 | 123 | int i; |
124 | 124 | |
125 | | |
125 | | |
126 | 126 | |
127 | 127 | m_view2_0->kaneko16_prepare(bitmap, cliprect); |
128 | 128 | |
r17988 | r17989 | |
173 | 173 | // rising edge |
174 | 174 | if (state) |
175 | 175 | { |
176 | device_t *pandora = | |
176 | device_t *pandora = | |
177 | 177 | m_sprite_irq = 1; |
178 | update_irq_state( | |
178 | update_irq_state( | |
179 | 179 | pandora_eof(pandora); |
180 | 180 | } |
181 | 181 | } |
r17988 | r17989 | |
---|---|---|
228 | 228 | { |
229 | 229 | bitmap.fill(0, cliprect); |
230 | 230 | |
231 | gpworld_draw_tiles(screen.machine(), bitmap, cliprect); | |
232 | gpworld_draw_sprites(screen.machine(), bitmap, cliprect); | |
231 | gpworld_draw_tiles(machine(), bitmap, cliprect); | |
232 | gpworld_draw_sprites(machine(), bitmap, cliprect); | |
233 | 233 | |
234 | 234 | return 0; |
235 | 235 | } |
r17988 | r17989 | |
---|---|---|
58 | 58 | |
59 | 59 | tile|= m_tile_bank << 12; |
60 | 60 | |
61 | drawgfx_opaque(bitmap,cliprect, | |
61 | drawgfx_opaque(bitmap,cliprect, | |
62 | 62 | |
63 | 63 | count+=2; |
64 | 64 | } |
r17988 | r17989 | |
---|---|---|
141 | 141 | m_tilemap_2->set_scrolly(0, m_umipoker_scrolly[2]); |
142 | 142 | m_tilemap_3->set_scrolly(0, m_umipoker_scrolly[3]); |
143 | 143 | |
144 | bitmap.fill(get_black_pen( | |
144 | bitmap.fill(get_black_pen( | |
145 | 145 | |
146 | 146 | m_tilemap_0->draw(bitmap, cliprect, 0,0); |
147 | 147 | m_tilemap_1->draw(bitmap, cliprect, 0,0); |
r17988 | r17989 | |
---|---|---|
166 | 166 | UINT32 gamecstl_state::screen_update_gamecstl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
167 | 167 | { |
168 | 168 | int i, j; |
169 | gfx_element *gfx = | |
169 | gfx_element *gfx = | |
170 | 170 | UINT32 *cga = m_cga_ram; |
171 | 171 | int index = 0; |
172 | 172 |
r17988 | r17989 | |
---|---|---|
149 | 149 | int i; |
150 | 150 | static const int xxx = 320, yyy = 204; |
151 | 151 | |
152 | bitmap.fill(get_black_pen( | |
152 | bitmap.fill(get_black_pen( | |
153 | 153 | |
154 | 154 | for (i = 0; i < 256; i++) |
155 | 155 | { |
156 | 156 | int dat = (m_pal[i * 2 + 1] << 8) | m_pal[i * 2]; |
157 | palette_set_color_rgb( | |
157 | palette_set_color_rgb( | |
158 | 158 | } |
159 | 159 | |
160 | 160 | count = 0; |
r17988 | r17989 | |
---|---|---|
276 | 276 | |
277 | 277 | UINT32 nwktr_state::screen_update_nwktr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
278 | 278 | { |
279 | device_t *voodoo = screen.machine().device("voodoo"); | |
280 | device_t *k001604 = screen.machine().device("k001604"); | |
279 | device_t *voodoo = machine().device("voodoo"); | |
280 | device_t *k001604 = machine().device("k001604"); | |
281 | 281 | |
282 | bitmap.fill( | |
282 | bitmap.fill( | |
283 | 283 | |
284 | 284 | voodoo_update(voodoo, bitmap, cliprect); |
285 | 285 |
r17988 | r17989 | |
---|---|---|
233 | 233 | |
234 | 234 | if (state.blanked) |
235 | 235 | { |
236 | bitmap.fill(get_black_pen( | |
236 | bitmap.fill(get_black_pen( | |
237 | 237 | return 0; |
238 | 238 | } |
239 | 239 | |
r17988 | r17989 | |
247 | 247 | UINT8 pen = src[(x-cliprect.min_x)>>1]; |
248 | 248 | |
249 | 249 | /* Draw two 4-bit pixels */ |
250 | *dest++ = screen.machine().pens[(pen >> 4) & 0xf]; | |
251 | *dest++ = screen.machine().pens[pen & 0xf]; | |
250 | *dest++ = machine().pens[(pen >> 4) & 0xf]; | |
251 | *dest++ = machine().pens[pen & 0xf]; | |
252 | 252 | } |
253 | 253 | } |
254 | 254 |
r17988 | r17989 | |
---|---|---|
103 | 103 | m_watchdog_count++; |
104 | 104 | |
105 | 105 | if (m_watchdog_count == 0x10) |
106 | | |
106 | | |
107 | 107 | } |
108 | 108 | } |
109 | 109 |
r17988 | r17989 | |
---|---|---|
255 | 255 | UINT16 *pri_ram; |
256 | 256 | |
257 | 257 | #ifdef MAME_DEBUG |
258 | if ( | |
258 | if ( | |
259 | 259 | { |
260 | 260 | int mask = 0; |
261 | if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 0x01; | |
262 | if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 0x02; | |
263 | if (screen.machine().input().code_pressed(KEYCODE_E)) mask |= 0x04; | |
264 | if (screen.machine().input().code_pressed(KEYCODE_R)) mask |= 0x08; | |
265 | if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 0x10; | |
266 | if (screen.machine().input().code_pressed(KEYCODE_S)) mask |= 0x20; | |
267 | if (screen.machine().input().code_pressed(KEYCODE_D)) mask |= 0x40; | |
268 | if (screen.machine().input().code_pressed(KEYCODE_F)) mask |= 0x80; | |
261 | if (machine().input().code_pressed(KEYCODE_Q)) mask |= 0x01; | |
262 | if (machine().input().code_pressed(KEYCODE_W)) mask |= 0x02; | |
263 | if (machine().input().code_pressed(KEYCODE_E)) mask |= 0x04; | |
264 | if (machine().input().code_pressed(KEYCODE_R)) mask |= 0x08; | |
265 | if (machine().input().code_pressed(KEYCODE_A)) mask |= 0x10; | |
266 | if (machine().input().code_pressed(KEYCODE_S)) mask |= 0x20; | |
267 | if (machine().input().code_pressed(KEYCODE_D)) mask |= 0x40; | |
268 | if (machine().input().code_pressed(KEYCODE_F)) mask |= 0x80; | |
269 | 269 | if (mask) layer_enable &= mask; |
270 | 270 | } |
271 | 271 | #endif |
r17988 | r17989 | |
294 | 294 | |
295 | 295 | #ifdef MAME_DEBUG |
296 | 296 | if ((layer_enable != -1) && (pri_addr == 0xff)) |
297 | bitmap.pix16(y, x) = get_black_pen( | |
297 | bitmap.pix16(y, x) = get_black_pen( | |
298 | 298 | else |
299 | 299 | #endif |
300 | 300 | bitmap.pix16(y, x) = m_layer[l][scr_addr] | (l << 8); |
r17988 | r17989 | |
---|---|---|
190 | 190 | |
191 | 191 | #if 0 |
192 | 192 | /* debug */ |
193 | if( | |
193 | if( | |
194 | 194 | { |
195 | 195 | ++xixi; |
196 | 196 | printf("%x\n",xixi); |
197 | 197 | } |
198 | 198 | |
199 | if( | |
199 | if( | |
200 | 200 | { |
201 | 201 | --xixi; |
202 | 202 | printf("%x\n",xixi); |
r17988 | r17989 | |
273 | 273 | else |
274 | 274 | yb=y+(height-yw-1)*8+global_y; |
275 | 275 | |
276 | drawgfx_alpha(bitmap,cliprect, | |
276 | drawgfx_alpha(bitmap,cliprect, | |
277 | 277 | tileno++; |
278 | 278 | } |
279 | 279 | } |
r17988 | r17989 | |
287 | 287 | |
288 | 288 | memcpy(m_sprram_old, m_sprram, 0x80000); |
289 | 289 | |
290 | if( | |
290 | if( | |
291 | 291 | { |
292 | 292 | FILE *p=fopen("tileram.bin","wb"); |
293 | 293 | fwrite(m_tileram, 1, 0x100000*16, p); |
r17988 | r17989 | |
---|---|---|
64 | 64 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
65 | 65 | |
66 | 66 | /* draw sprite */ |
67 | drawgfx_transpen(bitmap, cliprect, | |
67 | drawgfx_transpen(bitmap, cliprect, | |
68 | 68 | m_video_ram[0x399] >> 4, |
69 | 69 | 0, |
70 | 70 | 0, 0, |
r17988 | r17989 | |
---|---|---|
71 | 71 | // rising edge |
72 | 72 | if (state) |
73 | 73 | { |
74 | address_space &space = * | |
74 | address_space &space = * | |
75 | 75 | dec8_mxc06_karn_buffer_spriteram_w(space, 0, 0); |
76 | 76 | } |
77 | 77 | } |
r17988 | r17989 | |
---|---|---|
466 | 466 | { |
467 | 467 | int prilevel; |
468 | 468 | |
469 | bitmap.fill(get_black_pen( | |
469 | bitmap.fill(get_black_pen( | |
470 | 470 | |
471 | 471 | // popmessage("%08x %08x", m_viewregs0[0], m_viewregs0[1]); |
472 | 472 | // popmessage("%08x %08x %08x %08x %08x %08x", m_tilemap_regs[0][0],m_tilemap_regs[0][1],m_tilemap_regs[0][2],m_tilemap_regs[0][3],m_tilemap_regs[0][4],m_tilemap_regs[0][5]); |
r17988 | r17989 | |
484 | 484 | /* prio isnt certain but seems to work.. */ |
485 | 485 | for (prilevel = 0xf; prilevel >0; prilevel--) |
486 | 486 | { |
487 | if (prilevel == ((m_tilemap_regs[3][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen.machine(),bitmap,cliprect, 3); | |
488 | if (prilevel == ((m_tilemap_regs[2][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen.machine(),bitmap,cliprect, 2); | |
489 | if (prilevel == ((m_tilemap_regs[1][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen.machine(),bitmap,cliprect, 1); | |
490 | if (prilevel == ((m_tilemap_regs[0][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen.machine(),bitmap,cliprect, 0); | |
487 | if (prilevel == ((m_tilemap_regs[3][0]&0x0f000000)>>24)) rabbit_drawtilemap(machine(),bitmap,cliprect, 3); | |
488 | if (prilevel == ((m_tilemap_regs[2][0]&0x0f000000)>>24)) rabbit_drawtilemap(machine(),bitmap,cliprect, 2); | |
489 | if (prilevel == ((m_tilemap_regs[1][0]&0x0f000000)>>24)) rabbit_drawtilemap(machine(),bitmap,cliprect, 1); | |
490 | if (prilevel == ((m_tilemap_regs[0][0]&0x0f000000)>>24)) rabbit_drawtilemap(machine(),bitmap,cliprect, 0); | |
491 | 491 | |
492 | 492 | if (prilevel == 0x09) // should it be selectable? |
493 | 493 | { |
494 | rabbit_clearspritebitmap(screen.machine(),bitmap,cliprect); | |
495 | draw_sprites(screen.machine(),bitmap,cliprect); // render to bitmap | |
496 | draw_sprite_bitmap(screen.machine(),bitmap,cliprect); // copy bitmap to screen | |
494 | rabbit_clearspritebitmap(machine(),bitmap,cliprect); | |
495 | draw_sprites(machine(),bitmap,cliprect); // render to bitmap | |
496 | draw_sprite_bitmap(machine(),bitmap,cliprect); // copy bitmap to screen | |
497 | 497 | } |
498 | 498 | } |
499 | 499 | return 0; |
r17988 | r17989 | |
---|---|---|
186 | 186 | |
187 | 187 | m_bg_tilemap->set_scrollx(0, ((m_port0_data & 0x40) << 2) + m_scrollx + SX_POS); // TODO |
188 | 188 | m_bg_tilemap->set_scrolly(0, ((m_port0_data & 0x80) << 1) + m_scrolly + SY_POS); // TODO |
189 | bitmap.fill(get_black_pen( | |
189 | bitmap.fill(get_black_pen( | |
190 | 190 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
191 | 191 | pandora_update(m_pandora, bitmap, cliprect); |
192 | 192 |
r17988 | r17989 | |
---|---|---|
2422 | 2422 | // rising edge |
2423 | 2423 | if (state) |
2424 | 2424 | { |
2425 | cpc_multiface2_device* mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device( | |
2425 | cpc_multiface2_device* mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device( | |
2426 | 2426 | |
2427 | 2427 | if(mface2 != NULL) |
2428 | 2428 | { |
r17988 | r17989 | |
---|---|---|
2192 | 2192 | |
2193 | 2193 | if (&screen != m_main_scr) |
2194 | 2194 | { |
2195 | sscope = | |
2195 | sscope = | |
2196 | 2196 | if (!sscope) |
2197 | 2197 | { |
2198 | 2198 | occluded_view = 1; |
r17988 | r17989 | |
2219 | 2219 | // save a copy of current bitmap for the binocular hack |
2220 | 2220 | if (sscope) |
2221 | 2221 | { |
2222 | sscope_binocular_hack = | |
2222 | sscope_binocular_hack = | |
2223 | 2223 | |
2224 | 2224 | if (&screen == m_left_lcd) |
2225 | 2225 | { |
r17988 | r17989 | |
2239 | 2239 | // use the copied bitmap for the binocular hack |
2240 | 2240 | if (sscope) |
2241 | 2241 | { |
2242 | sscope_binocular_hack = | |
2242 | sscope_binocular_hack = | |
2243 | 2243 | |
2244 | 2244 | if (&screen == m_left_lcd) |
2245 | 2245 | { |
r17988 | r17989 | |
---|---|---|
838 | 838 | for (x = 0; x < resx; x++) |
839 | 839 | // line_buffer[x] = (v[(x+y*resx)>>4] & (0x8000 >> ((x+y*resx) & 0xf))) ? 0 : 1; |
840 | 840 | line_buffer[x] = (v[(x+y*resx)>>4] & (0x8000 >> (x & 0xf))) ? 0 : 1; |
841 | draw_scanline8(bitmap, 0, y, resx, line_buffer, | |
841 | draw_scanline8(bitmap, 0, y, resx, line_buffer, | |
842 | 842 | } |
843 | 843 | return 0; |
844 | 844 | } |
r17988 | r17989 | |
---|---|---|
91 | 91 | crt_update(m_crt, bitmap); |
92 | 92 | pdp1_draw_lightpen(this, bitmap); |
93 | 93 | |
94 | pdp1_draw_panel( | |
94 | pdp1_draw_panel( | |
95 | 95 | copybitmap(bitmap, m_panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, cliprect); |
96 | 96 | |
97 | 97 | copybitmap(bitmap, m_typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, cliprect); |
r17988 | r17989 | |
---|---|---|
129 | 129 | |
130 | 130 | UINT32 hp48_state::screen_update_hp48(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
131 | 131 | { |
132 | hp48_state *state = screen.machine().driver_data<hp48_state>(); | |
133 | address_space &space = *screen.machine().device("maincpu")->memory().space(AS_PROGRAM); | |
132 | hp48_state *state = machine().driver_data<hp48_state>(); | |
133 | address_space &space = *machine().device("maincpu")->memory().space(AS_PROGRAM); | |
134 | 134 | int x, y, xp, i, addr; |
135 | 135 | int display = HP48_IO_4(0) >> 3; /* 1=on, 0=off */ |
136 | 136 | int left_margin = HP48_IO_4(0) & 7; /* 0..7 pixels for main bitmap */ |
r17988 | r17989 | |
142 | 142 | int menu_start = HP48_IO_20(0x30) & ~1; /* menu bitmap address */ |
143 | 143 | int fg = contrast + 2; |
144 | 144 | |
145 | LOG(( "%f hp48 video_update called: ", | |
145 | LOG(( "%f hp48 video_update called: ", | |
146 | 146 | |
147 | 147 | if ( !display || refresh ) |
148 | 148 | { |
r17988 | r17989 | |
---|---|---|
369 | 369 | { |
370 | 370 | case 0: |
371 | 371 | case VAR_VM0: |
372 | apple3_video_text40( | |
372 | apple3_video_text40( | |
373 | 373 | break; |
374 | 374 | |
375 | 375 | case VAR_VM1: |
376 | 376 | case VAR_VM1|VAR_VM0: |
377 | apple3_video_text80( | |
377 | apple3_video_text80( | |
378 | 378 | break; |
379 | 379 | |
380 | 380 | case VAR_VM3: |
381 | apple3_video_graphics_hgr( | |
381 | apple3_video_graphics_hgr( | |
382 | 382 | break; |
383 | 383 | |
384 | 384 | case VAR_VM3|VAR_VM0: |
385 | apple3_video_graphics_chgr( | |
385 | apple3_video_graphics_chgr( | |
386 | 386 | break; |
387 | 387 | |
388 | 388 | case VAR_VM3|VAR_VM1: |
389 | apple3_video_graphics_shgr( | |
389 | apple3_video_graphics_shgr( | |
390 | 390 | break; |
391 | 391 | |
392 | 392 | case VAR_VM3|VAR_VM1|VAR_VM0: |
393 | apple3_video_graphics_chires( | |
393 | apple3_video_graphics_chires( | |
394 | 394 | break; |
395 | 395 | } |
396 | 396 | return 0; |
r17988 | r17989 | |
---|---|---|
57 | 57 | |
58 | 58 | UINT32 dai_state::screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
59 | 59 | { |
60 | address_space &space = * | |
60 | address_space &space = * | |
61 | 61 | int i, j, k, l; |
62 | 62 | |
63 | 63 | UINT8* char_rom = memregion("gfx1")->base(); |
r17988 | r17989 | |
---|---|---|
90 | 90 | { |
91 | 91 | int by; |
92 | 92 | /* 64 bytes per line */ |
93 | char *line_ptr = ((char*) | |
93 | char *line_ptr = ((char*) | |
94 | 94 | |
95 | 95 | x = 0; |
96 | 96 | for (by=0; by<width>>3; by++) |
r17988 | r17989 | |
---|---|---|
86 | 86 | UINT16 *line; |
87 | 87 | int y, x, b; |
88 | 88 | |
89 | video_base = screen.machine().device<ram_device>(RAM_TAG)->size() - (m_screen_buffer ? MAC_MAIN_SCREEN_BUF_OFFSET : MAC_ALT_SCREEN_BUF_OFFSET); | |
90 | video_ram = (const UINT16 *) (screen.machine().device<ram_device>(RAM_TAG)->pointer() + video_base); | |
89 | video_base = machine().device<ram_device>(RAM_TAG)->size() - (m_screen_buffer ? MAC_MAIN_SCREEN_BUF_OFFSET : MAC_ALT_SCREEN_BUF_OFFSET); | |
90 | video_ram = (const UINT16 *) (machine().device<ram_device>(RAM_TAG)->pointer() + video_base); | |
91 | 91 | |
92 | 92 | for (y = 0; y < MAC_V_VIS; y++) |
93 | 93 | { |
r17988 | r17989 | |
373 | 373 | { |
374 | 374 | UINT32 *scanline; |
375 | 375 | int x, y, hres, vres; |
376 | UINT8 *vram8 = (UINT8 *) | |
376 | UINT8 *vram8 = (UINT8 *) | |
377 | 377 | |
378 | 378 | switch (m_rbv_montype) |
379 | 379 | { |
r17988 | r17989 | |
---|---|---|
29 | 29 | UINT32 ac1_state::screen_update_ac1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
30 | 30 | { |
31 | 31 | int x,y; |
32 | address_space &space = * | |
32 | address_space &space = * | |
33 | 33 | |
34 | 34 | for(y = 0; y < 16; y++ ) |
35 | 35 | { |
36 | 36 | for(x = 0; x < 64; x++ ) |
37 | 37 | { |
38 | 38 | int code = space.read_byte(AC1_VIDEO_MEMORY + x + y*64); |
39 | drawgfx_opaque(bitmap, cliprect, | |
39 | drawgfx_opaque(bitmap, cliprect, | |
40 | 40 | } |
41 | 41 | } |
42 | 42 | return 0; |
r17988 | r17989 | |
45 | 45 | UINT32 ac1_state::screen_update_ac1_32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
46 | 46 | { |
47 | 47 | int x,y; |
48 | address_space &space = * | |
48 | address_space &space = * | |
49 | 49 | |
50 | 50 | for(y = 0; y < 32; y++ ) |
51 | 51 | { |
52 | 52 | for(x = 0; x < 64; x++ ) |
53 | 53 | { |
54 | 54 | int code = space.read_byte(AC1_VIDEO_MEMORY + x + y*64); |
55 | drawgfx_opaque(bitmap, cliprect, | |
55 | drawgfx_opaque(bitmap, cliprect, | |
56 | 56 | } |
57 | 57 | } |
58 | 58 | return 0; |
r17988 | r17989 | |
---|---|---|
47 | 47 | if (m_disk_expansion && m_pcb_id == NO_BOARD) |
48 | 48 | { |
49 | 49 | // latch this input so it doesn't go at warp speed |
50 | if (( | |
50 | if (( | |
51 | 51 | { |
52 | 52 | m_last_frame_flip = 1; |
53 | 53 | m_fds_current_side++; |
r17988 | r17989 | |
60 | 60 | popmessage("Disk set to side %d", m_fds_current_side); |
61 | 61 | } |
62 | 62 | |
63 | if (!( | |
63 | if (!( | |
64 | 64 | m_last_frame_flip = 0; |
65 | 65 | } |
66 | 66 | return 0; |
r17988 | r17989 | |
---|---|---|
156 | 156 | ***************************************************************************/ |
157 | 157 | UINT32 pcw16_state::screen_update_pcw16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
158 | 158 | { |
159 | UINT8 *ram = | |
159 | UINT8 *ram = | |
160 | 160 | unsigned char *pScanLine = (unsigned char *)ram + 0x0fc00; //0x03c00; //0x020FC00; |
161 | 161 | |
162 | 162 | int y; |
r17988 | r17989 | |
---|---|---|
109 | 109 | |
110 | 110 | UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
111 | 111 | { |
112 | device_t *devconf = | |
112 | device_t *devconf = | |
113 | 113 | i8275_update( devconf, bitmap, cliprect); |
114 | 114 | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
115 | 115 | return 0; |
r17988 | r17989 | |
---|---|---|
51 | 51 | UINT8 *videoram = m_videoram; |
52 | 52 | int offs; |
53 | 53 | |
54 | bitmap.fill(get_black_pen( | |
54 | bitmap.fill(get_black_pen( | |
55 | 55 | |
56 | 56 | for(offs = 0; offs < 40*25; offs++) |
57 | 57 | { |
r17988 | r17989 | |
63 | 63 | color = m_colorram[offs]; |
64 | 64 | code = videoram[offs] | (color & 0x80) << 1; |
65 | 65 | |
66 | drawgfx_opaque(bitmap, cliprect, | |
66 | drawgfx_opaque(bitmap, cliprect, | |
67 | 67 | } |
68 | 68 | |
69 | 69 | return 0; |
r17988 | r17989 | |
83 | 83 | { |
84 | 84 | UINT8 *videoram = m_videoram; |
85 | 85 | |
86 | bitmap.fill(get_black_pen( | |
86 | bitmap.fill(get_black_pen( | |
87 | 87 | |
88 | 88 | if (m_mz700_mode) |
89 | 89 | return SCREEN_UPDATE16_CALL_MEMBER(mz700); |
r17988 | r17989 | |
---|---|---|
21 | 21 | UINT8 code2; |
22 | 22 | UINT8 col; |
23 | 23 | int y, x, b; |
24 | UINT8 *ram = | |
24 | UINT8 *ram = | |
25 | 25 | |
26 | 26 | for (x = 0; x < 48; x++) |
27 | 27 | { |
r17988 | r17989 | |
---|---|---|
413 | 413 | UINT32 cgenie_state::screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
414 | 414 | { |
415 | 415 | if( m_tv_mode ) |
416 | cgenie_refresh_tv_set( | |
416 | cgenie_refresh_tv_set( | |
417 | 417 | else |
418 | cgenie_refresh_monitor( | |
418 | cgenie_refresh_monitor( | |
419 | 419 | return 0; |
420 | 420 | } |
r17988 | r17989 | |
---|---|---|
1200 | 1200 | rect.max_y = cliprect.max_y; |
1201 | 1201 | |
1202 | 1202 | // update tiles |
1203 | //rom = | |
1203 | //rom = | |
1204 | 1204 | for(x=0;x<256;x++) |
1205 | 1205 | { |
1206 | 1206 | if(m_video.tile16_dirty[x] != 0) |
1207 | 1207 | { |
1208 | | |
1208 | | |
1209 | 1209 | m_video.tile16_dirty[x] = 0; |
1210 | 1210 | } |
1211 | 1211 | if(m_video.tile8_dirty[x] != 0) |
1212 | 1212 | { |
1213 | | |
1213 | | |
1214 | 1214 | m_video.tile8_dirty[x] = 0; |
1215 | 1215 | } |
1216 | 1216 | } |
r17988 | r17989 | |
1219 | 1219 | { |
1220 | 1220 | // Graphics screen(s) |
1221 | 1221 | if(priority == m_video.gfx_pri) |
1222 | x68k_draw_gfx( | |
1222 | x68k_draw_gfx( | |
1223 | 1223 | |
1224 | 1224 | // Sprite / BG Tiles |
1225 | 1225 | if(priority == m_video.sprite_pri /*&& (m_spritereg[0x404] & 0x0200)*/ && (m_video.reg[2] & 0x0040)) |
1226 | 1226 | { |
1227 | x68k_draw_sprites( | |
1227 | x68k_draw_sprites( | |
1228 | 1228 | if((m_spritereg[0x404] & 0x0008)) |
1229 | 1229 | { |
1230 | 1230 | if((m_spritereg[0x404] & 0x0030) == 0x10) // BG1 TXSEL |
r17988 | r17989 | |
1240 | 1240 | x68k_bg1->draw(bitmap,rect,0,0); |
1241 | 1241 | } |
1242 | 1242 | } |
1243 | x68k_draw_sprites( | |
1243 | x68k_draw_sprites( | |
1244 | 1244 | if((m_spritereg[0x404] & 0x0001)) |
1245 | 1245 | { |
1246 | 1246 | if((m_spritereg[0x404] & 0x0006) == 0x02) // BG0 TXSEL |
r17988 | r17989 | |
1256 | 1256 | x68k_bg1->draw(bitmap,rect,0,0); |
1257 | 1257 | } |
1258 | 1258 | } |
1259 | x68k_draw_sprites( | |
1259 | x68k_draw_sprites( | |
1260 | 1260 | } |
1261 | 1261 | |
1262 | 1262 | // Text screen |
r17988 | r17989 | |
1265 | 1265 | xscr = (m_crtc.reg[10] & 0x3ff); |
1266 | 1266 | yscr = (m_crtc.reg[11] & 0x3ff); |
1267 | 1267 | if(!(m_crtc.reg[20] & 0x1000)) // if text layer is set to buffer, then it's not visible |
1268 | x68k_draw_text( | |
1268 | x68k_draw_text( | |
1269 | 1269 | } |
1270 | 1270 | } |
1271 | 1271 | |
1272 | 1272 | #ifdef MAME_DEBUG |
1273 | if( | |
1273 | if( | |
1274 | 1274 | { |
1275 | 1275 | m_mfp.isra = 0; |
1276 | 1276 | m_mfp.isrb = 0; |
1277 | 1277 | // mfp_trigger_irq(MFP_IRQ_GPIP6); |
1278 | 1278 | // machine().device("maincpu")->execute().set_input_line_and_vector(6,ASSERT_LINE,0x43); |
1279 | 1279 | } |
1280 | if( | |
1280 | if( | |
1281 | 1281 | { |
1282 | 1282 | m_sprite_shift--; |
1283 | 1283 | popmessage("Sprite shift = %i",m_sprite_shift); |
1284 | 1284 | } |
1285 | if( | |
1285 | if( | |
1286 | 1286 | { |
1287 | 1287 | m_sprite_shift++; |
1288 | 1288 | popmessage("Sprite shift = %i",m_sprite_shift); |
r17988 | r17989 | |
---|---|---|
30 | 30 | UINT32 kramermc_state::screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
31 | 31 | { |
32 | 32 | int x,y; |
33 | address_space &space = * | |
33 | address_space &space = * | |
34 | 34 | |
35 | 35 | for(y = 0; y < 16; y++ ) |
36 | 36 | { |
37 | 37 | for(x = 0; x < 64; x++ ) |
38 | 38 | { |
39 | 39 | int code = space.read_byte(KRAMERMC_VIDEO_MEMORY + x + y*64); |
40 | drawgfx_opaque(bitmap, cliprect, | |
40 | drawgfx_opaque(bitmap, cliprect, | |
41 | 41 | } |
42 | 42 | } |
43 | 43 | return 0; |
r17988 | r17989 | |
---|---|---|
74 | 74 | |
75 | 75 | /* Empty event buffer for undisplayed frames noting the last border |
76 | 76 | colour (in case colours are not changed in the next frame). */ |
77 | NumItems = spectrum_EventList_NumEvents( | |
77 | NumItems = spectrum_EventList_NumEvents( | |
78 | 78 | if (NumItems) |
79 | 79 | { |
80 | pItem = spectrum_EventList_GetFirstItem(screen.machine()); | |
81 | spectrum_border_set_last_color ( screen.machine(), pItem[NumItems-1].Event_Data ); | |
82 | spectrum_EventList_Reset(screen.machine()); | |
83 | spectrum_EventList_SetOffsetStartTime ( screen.machine(), screen.machine().firstcpu->attotime_to_cycles(screen.scan_period() * screen.vpos()) ); | |
80 | pItem = spectrum_EventList_GetFirstItem(machine()); | |
81 | spectrum_border_set_last_color ( machine(), pItem[NumItems-1].Event_Data ); | |
82 | spectrum_EventList_Reset(machine()); | |
83 | spectrum_EventList_SetOffsetStartTime ( machine(), machine().firstcpu->attotime_to_cycles(screen.scan_period() * screen.vpos()) ); | |
84 | 84 | logerror ("Event log reset in callback fn.\n"); |
85 | 85 | } |
86 | 86 | } |
r17988 | r17989 | |
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | spectrum_border_draw( | |
162 | spectrum_border_draw( | |
163 | 163 | SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, |
164 | 164 | SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER, |
165 | 165 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
r17988 | r17989 | |
---|---|---|
29 | 29 | { |
30 | 30 | for (y = 127; y >=0; y--) |
31 | 31 | { |
32 | code1 = screen.machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x80]; | |
33 | code2 = screen.machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x00]; | |
32 | code1 = machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x80]; | |
33 | code2 = machine().device<ram_device>(RAM_TAG)->pointer()[0xd700 + Vaddr + 0x00]; | |
34 | 34 | for (b = 0; b < 8; b++) |
35 | 35 | { |
36 | 36 | bitmap.pix16(2*y, x*8+b) = ((code1 << b) & 0x80) ? 1 : 0; |
r17988 | r17989 | |
---|---|---|
76 | 76 | if (state) |
77 | 77 | { |
78 | 78 | /* if we chose another palette or colour mode, enable it */ |
79 | UINT8 chosen_palette = ( | |
79 | UINT8 chosen_palette = ( | |
80 | 80 | |
81 | 81 | if (chosen_palette != m_current_palette) // any changes? |
82 | 82 | { |
83 | 83 | m_current_palette = chosen_palette; // save new palette |
84 | 84 | if (!m_current_palette) |
85 | palette_set_colors_rgb( | |
85 | palette_set_colors_rgb( | |
86 | 86 | else |
87 | palette_set_colors_rgb( | |
87 | palette_set_colors_rgb( | |
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
r17988 | r17989 | |
97 | 97 | |
98 | 98 | output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); |
99 | 99 | |
100 | if ((m_shared & 4) || (!( | |
100 | if ((m_shared & 4) || (!( | |
101 | 101 | screen_on++; |
102 | 102 | |
103 | 103 | for (y = 0; y < 16; y++) |
r17988 | r17989 | |
138 | 138 | |
139 | 139 | output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); |
140 | 140 | |
141 | if ((m_shared & 4) || (!( | |
141 | if ((m_shared & 4) || (!( | |
142 | 142 | screen_on++; |
143 | 143 | |
144 | 144 | for (y = 0; y < 16; y++) |
r17988 | r17989 | |
179 | 179 | |
180 | 180 | output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); |
181 | 181 | |
182 | if ((m_shared & 4) || (!( | |
182 | if ((m_shared & 4) || (!( | |
183 | 183 | screen_on++; |
184 | 184 | |
185 | 185 | for (y = 0; y < 16; y++) |
r17988 | r17989 | |
216 | 216 | { |
217 | 217 | UINT8 y,ra,chr=32,gfx,screen_on=0; |
218 | 218 | UINT16 sy=0,ma=m_vidpg,x; |
219 | UINT8 col, bg=0, fg=0, options= | |
219 | UINT8 col, bg=0, fg=0, options= | |
220 | 220 | UINT8 *RAM = memregion("maincpu")->base(); |
221 | 221 | |
222 | 222 | /* get selected character generator */ |
r17988 | r17989 | |
384 | 384 | m_framecnt++; |
385 | 385 | m_speed = m_mc6845_reg[10]&0x20, m_flash = m_mc6845_reg[10]&0x40; // cursor modes |
386 | 386 | m_cursor = (m_mc6845_reg[14]<<8) | m_mc6845_reg[15]; // get cursor position |
387 | m_s_options= | |
387 | m_s_options= | |
388 | 388 | output_set_value("cass_led",(m_shared & 0x20) ? 1 : 0); |
389 | 389 | m_6845->screen_update(screen, bitmap, cliprect); |
390 | 390 | return 0; |
r17988 | r17989 | |
---|---|---|
77 | 77 | { |
78 | 78 | crt_update(m_crt, bitmap); |
79 | 79 | |
80 | tx0_draw_panel( | |
80 | tx0_draw_panel( | |
81 | 81 | copybitmap(bitmap, m_panel_bitmap, 0, 0, panel_window_offset_x, panel_window_offset_y, cliprect); |
82 | 82 | |
83 | 83 | copybitmap(bitmap, m_typewriter_bitmap, 0, 0, typewriter_window_offset_x, typewriter_window_offset_y, cliprect); |
r17988 | r17989 | |
---|---|---|
189 | 189 | /* 64 Column mode */ |
190 | 190 | unsigned short inkcolor = (m_port_ff_data & 0x38) >> 3; |
191 | 191 | for (count = 0; count < 192; count++) |
192 | ts2068_64col_scanline( | |
192 | ts2068_64col_scanline( | |
193 | 193 | } |
194 | 194 | else if ((m_port_ff_data & 7) == 2) |
195 | 195 | { |
196 | 196 | /* Extended Color mode */ |
197 | 197 | for (count = 0; count < 192; count++) |
198 | ts2068_hires_scanline( | |
198 | ts2068_hires_scanline( | |
199 | 199 | } |
200 | 200 | else if ((m_port_ff_data & 7) == 1) |
201 | 201 | { |
202 | 202 | /* Screen 6000-7aff */ |
203 | 203 | for (count = 0; count < 192; count++) |
204 | ts2068_lores_scanline( | |
204 | ts2068_lores_scanline( | |
205 | 205 | } |
206 | 206 | else |
207 | 207 | { |
208 | 208 | /* Screen 4000-5aff */ |
209 | 209 | for (count = 0; count < 192; count++) |
210 | ts2068_lores_scanline( | |
210 | ts2068_lores_scanline( | |
211 | 211 | } |
212 | 212 | |
213 | spectrum_border_draw( | |
213 | spectrum_border_draw( | |
214 | 214 | TS2068_TOP_BORDER, SPEC_DISPLAY_YSIZE, TS2068_BOTTOM_BORDER, |
215 | 215 | TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, |
216 | 216 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
r17988 | r17989 | |
229 | 229 | /* 64 Column mode */ |
230 | 230 | unsigned short inkcolor = (m_port_ff_data & 0x38) >> 3; |
231 | 231 | for (count = 0; count < 192; count++) |
232 | ts2068_64col_scanline( | |
232 | ts2068_64col_scanline( | |
233 | 233 | } |
234 | 234 | else if ((m_port_ff_data & 7) == 2) |
235 | 235 | { |
236 | 236 | /* Extended Color mode */ |
237 | 237 | for (count = 0; count < 192; count++) |
238 | ts2068_hires_scanline( | |
238 | ts2068_hires_scanline( | |
239 | 239 | } |
240 | 240 | else if ((m_port_ff_data & 7) == 1) |
241 | 241 | { |
242 | 242 | /* Screen 6000-7aff */ |
243 | 243 | for (count = 0; count < 192; count++) |
244 | ts2068_lores_scanline( | |
244 | ts2068_lores_scanline( | |
245 | 245 | } |
246 | 246 | else |
247 | 247 | { |
248 | 248 | /* Screen 4000-5aff */ |
249 | 249 | for (count = 0; count < 192; count++) |
250 | ts2068_lores_scanline( | |
250 | ts2068_lores_scanline( | |
251 | 251 | } |
252 | 252 | |
253 | spectrum_border_draw( | |
253 | spectrum_border_draw( | |
254 | 254 | SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, |
255 | 255 | TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, |
256 | 256 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
r17988 | r17989 | |
---|---|---|
75 | 75 | { |
76 | 76 | for (x=0;x<40;x++, i++) |
77 | 77 | { |
78 | drawgfx_opaque(bitmap, cliprect, | |
78 | drawgfx_opaque(bitmap, cliprect, | |
79 | 79 | videoram[i], 0, 0, 0, 8*x,8*y); |
80 | 80 | } |
81 | 81 | } |
r17988 | r17989 | |
---|---|---|
92 | 92 | |
93 | 93 | x = PCW_BORDER_WIDTH; |
94 | 94 | |
95 | roller_ram_ptr = | |
95 | roller_ram_ptr = | |
96 | 96 | |
97 | 97 | /* get line address */ |
98 | 98 | /* b16-14 control which bank the line is to be found in, b13-3 the address in the bank (in 16-byte units), and b2-0 the offset. Thus a roller RAM address bbbxxxxxxxxxxxyyy indicates bank bbb, address 00xxxxxxxxxxx0yyy. */ |
99 | 99 | line_data = ((unsigned char *)roller_ram_ptr)[0] | (((unsigned char *)roller_ram_ptr)[1]<<8); |
100 | 100 | |
101 | 101 | /* calculate address of pixel data */ |
102 | line_ptr = | |
102 | line_ptr = | |
103 | 103 | |
104 | 104 | for (by=0; by<90; by++) |
105 | 105 | { |
r17988 | r17989 | |
---|---|---|
182 | 182 | int x = 0; |
183 | 183 | |
184 | 184 | /* foreground colour white */ |
185 | oric_vh_update_attribute( | |
185 | oric_vh_update_attribute( | |
186 | 186 | /* background colour black */ |
187 | oric_vh_update_attribute(screen.machine(),(1<<3)); | |
188 | oric_vh_update_attribute(screen.machine(),(1<<4)); | |
187 | oric_vh_update_attribute(machine(),(1<<3)); | |
188 | oric_vh_update_attribute(machine(),(1<<4)); | |
189 | 189 | |
190 | 190 | for (byte_offset=0; byte_offset<40; byte_offset++) |
191 | 191 | { |
r17988 | r17989 | |
213 | 213 | } |
214 | 214 | |
215 | 215 | /* fetch data */ |
216 | c = RAM ? RAM[read_addr] : | |
216 | c = RAM ? RAM[read_addr] : | |
217 | 217 | |
218 | 218 | /* if bits 6 and 5 are zero, the byte contains a serial attribute */ |
219 | 219 | if ((c & ((1 << 6) | (1 << 5))) == 0) |
220 | 220 | { |
221 | oric_vh_update_attribute( | |
221 | oric_vh_update_attribute( | |
222 | 222 | |
223 | 223 | /* display background colour when attribute has been found */ |
224 | 224 | oric_vh_render_6pixels(bitmap, x, y, m_vh_state.active_foreground_colour, m_vh_state.active_background_colour, 0, (c & 0x080)); |
r17988 | r17989 | |
---|---|---|
19 | 19 | UINT8 code1,code2,code3,code4; |
20 | 20 | UINT8 col; |
21 | 21 | int y, x, b,draw_y; |
22 | UINT8 *ram = | |
22 | UINT8 *ram = | |
23 | 23 | |
24 | 24 | int width = (m_video_mode==0x00) ? 256 : 512; |
25 | 25 | rectangle screen_area(0,width+64-1,0,256+64-1); |
r17988 | r17989 | |
---|---|---|
36 | 36 | for(x = 0; x < 48; x++ ) |
37 | 37 | { |
38 | 38 | int code = m_video_ram[15 + x + y*64]; |
39 | drawgfx_opaque(bitmap, cliprect, | |
39 | drawgfx_opaque(bitmap, cliprect, | |
40 | 40 | } |
41 | 41 | } |
42 | 42 | return 0; |
r17988 | r17989 | |
---|---|---|
393 | 393 | |
394 | 394 | UINT32 apple1_state::screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
395 | 395 | { |
396 | apple1_vh_cursor_blink(screen.machine()); | |
397 | terminal_draw(screen.machine(), bitmap, cliprect, m_terminal); | |
396 | apple1_vh_cursor_blink(machine()); | |
397 | terminal_draw(machine(), bitmap, cliprect, m_terminal); | |
398 | 398 | return 0; |
399 | 399 | } |
r17988 | r17989 | |
---|---|---|
24 | 24 | int part1addr = (3-((m_orion128_video_page & 3) | orionproshift)) * 0x4000; |
25 | 25 | int part2addr = part1addr + 0x10000; |
26 | 26 | int video_mode = m_orion128_video_mode & m_video_mode_mask; |
27 | UINT8 *ram = | |
27 | UINT8 *ram = | |
28 | 28 | |
29 | 29 | for (x = 0; x < m_orion128_video_width; x++) |
30 | 30 | { |
r17988 | r17989 | |
---|---|---|
1814 | 1814 | |
1815 | 1815 | if(!(m_video.towns_video_reg[1] & 0x01)) |
1816 | 1816 | { |
1817 | if(! | |
1817 | if(! | |
1818 | 1818 | { |
1819 | 1819 | if((m_video.towns_layer_ctrl & 0x03) != 0) |
1820 | towns_crtc_draw_layer( | |
1820 | towns_crtc_draw_layer( | |
1821 | 1821 | } |
1822 | if(! | |
1822 | if(! | |
1823 | 1823 | { |
1824 | 1824 | if((m_video.towns_layer_ctrl & 0x0c) != 0) |
1825 | towns_crtc_draw_layer( | |
1825 | towns_crtc_draw_layer( | |
1826 | 1826 | } |
1827 | 1827 | } |
1828 | 1828 | else |
1829 | 1829 | { |
1830 | if(! | |
1830 | if(! | |
1831 | 1831 | { |
1832 | 1832 | if((m_video.towns_layer_ctrl & 0x0c) != 0) |
1833 | towns_crtc_draw_layer( | |
1833 | towns_crtc_draw_layer( | |
1834 | 1834 | } |
1835 | if(! | |
1835 | if(! | |
1836 | 1836 | { |
1837 | 1837 | if((m_video.towns_layer_ctrl & 0x03) != 0) |
1838 | towns_crtc_draw_layer( | |
1838 | towns_crtc_draw_layer( | |
1839 | 1839 | } |
1840 | 1840 | } |
1841 | 1841 | |
1842 | 1842 | #if 0 |
1843 | 1843 | #ifdef SPR_DEBUG |
1844 | if( | |
1844 | if( | |
1845 | 1845 | pshift+=0x80; |
1846 | if( | |
1846 | if( | |
1847 | 1847 | pshift-=0x80; |
1848 | 1848 | popmessage("Pixel shift = %08x",pshift); |
1849 | 1849 | #endif |
r17988 | r17989 | |
---|---|---|
17 | 17 | for (sx = 0; sx < 48; sx++) |
18 | 18 | { |
19 | 19 | drawgfx_opaque (bitmap, cliprect, |
20 | | |
20 | | |
21 | 21 | 1, 0, 0, sx * 8, 0); |
22 | 22 | } |
23 | 23 | |
r17988 | r17989 | |
26 | 26 | for (sx = 0; sx < 48; sx++) |
27 | 27 | { |
28 | 28 | drawgfx_opaque (bitmap, cliprect, |
29 | | |
29 | | |
30 | 30 | 1, 0, 0, sx * 8, (sy + 1) * 16); |
31 | 31 | } |
32 | 32 | } |
r17988 | r17989 | |
41 | 41 | for (sx = 0; sx < 48; sx++) |
42 | 42 | { |
43 | 43 | drawgfx_opaque (bitmap, cliprect, |
44 | | |
44 | | |
45 | 45 | 1, 0, 0, sx * 8, 0); |
46 | 46 | } |
47 | 47 | |
r17988 | r17989 | |
50 | 50 | for (sx = 0; sx < 48; sx++) |
51 | 51 | { |
52 | 52 | drawgfx_opaque (bitmap, cliprect, |
53 | | |
53 | | |
54 | 54 | 1, 0, 0, sx * 8, (sy + 1) * 14); |
55 | 55 | } |
56 | 56 | } |
r17988 | r17989 | |
---|---|---|
41 | 41 | if (code < 32) code = 32; |
42 | 42 | } |
43 | 43 | |
44 | drawgfxzoom_opaque (bitmap, cliprect, | |
44 | drawgfxzoom_opaque (bitmap, cliprect, | |
45 | 45 | videoram[offs + 2048] & 0x08 ? 0 : 1, 0, 0, sx, sy, 0x20000, 0x20000); |
46 | 46 | |
47 | 47 | if (videoram[offs] & 0x80) |
r17988 | r17989 | |
---|---|---|
800 | 800 | { |
801 | 801 | offs = current_row*64+x; |
802 | 802 | drawgfx_transpen(bitmap, cliprect, |
803 | | |
803 | | |
804 | 804 | videoram[offs], |
805 | 805 | 7, /* white */ |
806 | 806 | 0,0, |
r17988 | r17989 | |
811 | 811 | /* draw the cursor as a solid white block */ |
812 | 812 | /* (should use a filled rect here!) */ |
813 | 813 | drawgfx_transpen(bitmap, cliprect, |
814 | | |
814 | | |
815 | 815 | 191, /* a block */ |
816 | 816 | 7, /* white */ |
817 | 817 | 0,0, |
r17988 | r17989 | |
---|---|---|
204 | 204 | ssystem3_draw_led(bitmap, m_lcd.data[3]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '3'); |
205 | 205 | ssystem3_draw_led(bitmap, m_lcd.data[4]&1?1:0, ssystem3_led_pos[4].x, ssystem3_led_pos[4].y, '4'); |
206 | 206 | |
207 | if ( | |
207 | if ( | |
208 | 208 | static const int lcd_signs_on[]={ |
209 | 209 | 0, // empty |
210 | 210 | 1, // bauer |
r17988 | r17989 | |
221 | 221 | int figure, black; |
222 | 222 | int xp=263+x*22; |
223 | 223 | int yp=55+(y^7)*28; |
224 | ssystem3_playfield_getfigure( | |
224 | ssystem3_playfield_getfigure( | |
225 | 225 | ssystem3_draw_led(bitmap, lcd_signs_on[figure]&1?1:0, xp, yp, '6'); |
226 | 226 | ssystem3_draw_led(bitmap, lcd_signs_on[figure]&2?1:0, xp, yp, '8'); |
227 | 227 | ssystem3_draw_led(bitmap, lcd_signs_on[figure]&4?1:0, xp, yp, '9'); |
r17988 | r17989 | |
---|---|---|
35 | 35 | { |
36 | 36 | int code = m_p_videoram[ x + y*64 ] & 0x7f; |
37 | 37 | int attr = m_p_videoram[ x+1 + y*64 ] & 0x80; |
38 | drawgfx_opaque(bitmap, cliprect, | |
38 | drawgfx_opaque(bitmap, cliprect, | |
39 | 39 | } |
40 | 40 | } |
41 | 41 | return 0; |
r17988 | r17989 | |
---|---|---|
20 | 20 | UINT8 code_r,code_g,code_b; |
21 | 21 | UINT8 col; |
22 | 22 | int y, x, b; |
23 | UINT8 *ram = | |
23 | UINT8 *ram = | |
24 | 24 | |
25 | 25 | for (y = 0; y < 256; y++) |
26 | 26 | { |
r17988 | r17989 | |
---|---|---|
478 | 478 | UINT32 new_a2; |
479 | 479 | |
480 | 480 | /* calculate the m_flash value */ |
481 | m_flash = (( | |
481 | m_flash = (( | |
482 | 482 | |
483 | 483 | /* read out relevant softswitch variables; to see what has changed */ |
484 | 484 | new_a2 = effective_a2(this); |
r17988 | r17989 | |
---|---|---|
41 | 41 | int primo_scanline; |
42 | 42 | |
43 | 43 | for (primo_scanline=0; primo_scanline<192; primo_scanline++) |
44 | primo_draw_scanline( | |
44 | primo_draw_scanline( | |
45 | 45 | return 0; |
46 | 46 | } |
r17988 | r17989 | |
---|---|---|
125 | 125 | if (m_hector_flag_80c==0) |
126 | 126 | { |
127 | 127 | screen.set_visible_area(0, 243, 0, 227); |
128 | hector_hr( | |
128 | hector_hr( | |
129 | 129 | } |
130 | 130 | else |
131 | 131 | { |
132 | 132 | screen.set_visible_area(0, 243*2, 0, 227); |
133 | hector_80c( | |
133 | hector_80c( | |
134 | 134 | } |
135 | 135 | } |
136 | 136 | else |
137 | 137 | { |
138 | 138 | screen.set_visible_area(0, 113, 0, 75); |
139 | hector_hr( | |
139 | hector_hr( | |
140 | 140 | } |
141 | 141 | return 0; |
142 | 142 | } |
r17988 | r17989 | |
---|---|---|
19 | 19 | { |
20 | 20 | int y, x, b, j; |
21 | 21 | UINT8 *gfx = memregion("gfx1")->base(); |
22 | UINT8 *ram = | |
22 | UINT8 *ram = | |
23 | 23 | |
24 | 24 | for (y = 0; y < 16; y++) |
25 | 25 | { |
r17988 | r17989 | |
---|---|---|
640 | 640 | UINT32 bbc_state::screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
641 | 641 | { |
642 | 642 | |
643 | mc6845_device *mc6845 = | |
643 | mc6845_device *mc6845 = | |
644 | 644 | mc6845->update( bitmap, cliprect); |
645 | 645 | |
646 | 646 | return 0; |
r17988 | r17989 | |
665 | 665 | while((m_BBC_VSync)&&(c<60000)) |
666 | 666 | { |
667 | 667 | // Clock the 6845 |
668 | m6845_clock( | |
668 | m6845_clock( | |
669 | 669 | c++; |
670 | 670 | } |
671 | 671 | |
r17988 | r17989 | |
674 | 674 | // or until a timeout (this catches the 6845 with silly register values that would not give a VSYNC signal) |
675 | 675 | while((!m_BBC_VSync)&&(c<60000)) |
676 | 676 | { |
677 | if ((m_y_screen_pos>=cliprect.min_y) && (m_y_screen_pos<=cliprect.max_y)) (m_draw_function)( | |
677 | if ((m_y_screen_pos>=cliprect.min_y) && (m_y_screen_pos<=cliprect.max_y)) (m_draw_function)( | |
678 | 678 | |
679 | 679 | // and check the cursor |
680 | 680 | if (m_VideoULA_CR) BBC_Clock_CR(this); |
681 | 681 | |
682 | 682 | // Clock the 6845 |
683 | m6845_clock( | |
683 | m6845_clock( | |
684 | 684 | c++; |
685 | 685 | } |
686 | 686 |
r17988 | r17989 | |
---|---|---|
142 | 142 | sy = BORDER_V/2 + y; |
143 | 143 | sx = BORDER_H/2 + x * 8; |
144 | 144 | code = videoram[offs]; |
145 | drawgfx_opaque(bitmap,cliprect, | |
145 | drawgfx_opaque(bitmap,cliprect, | |
146 | 146 | } |
147 | 147 | } |
148 | 148 | break; |
r17988 | r17989 | |
162 | 162 | sx = BORDER_H/2 + x * 16; |
163 | 163 | code = videoram[offs]; |
164 | 164 | color = videoram[offs+1]; |
165 | drawgfx_opaque(bitmap,cliprect, | |
165 | drawgfx_opaque(bitmap,cliprect, | |
166 | 166 | } |
167 | 167 | } |
168 | 168 | break; |
r17988 | r17989 | |
181 | 181 | sy = BORDER_V/2 + y; |
182 | 182 | sx = BORDER_H/2 + x * 8; |
183 | 183 | code = videoram[offs]; |
184 | drawgfx_opaque(bitmap,cliprect, | |
184 | drawgfx_opaque(bitmap,cliprect, | |
185 | 185 | } |
186 | 186 | } |
187 | 187 | break; |
r17988 | r17989 | |
201 | 201 | sy = BORDER_V/2 + y * 2; |
202 | 202 | sx = BORDER_H/2 + x * 8; |
203 | 203 | code = videoram[offs]; |
204 | drawgfx_opaque(bitmap,cliprect, | |
204 | drawgfx_opaque(bitmap,cliprect, | |
205 | 205 | } |
206 | 206 | } |
207 | 207 | break; |
r17988 | r17989 | |
220 | 220 | sy = BORDER_V/2 + y; |
221 | 221 | sx = BORDER_H/2 + x * 16; |
222 | 222 | code = videoram[offs]; |
223 | drawgfx_opaque(bitmap,cliprect, | |
223 | drawgfx_opaque(bitmap,cliprect, | |
224 | 224 | } |
225 | 225 | } |
226 | 226 | break; |
r17988 | r17989 | |
240 | 240 | sx = BORDER_H/2 + x * 32; |
241 | 241 | code = videoram[offs]; |
242 | 242 | color = videoram[offs+1]; |
243 | drawgfx_opaque(bitmap,cliprect, | |
243 | drawgfx_opaque(bitmap,cliprect, | |
244 | 244 | } |
245 | 245 | } |
246 | 246 | break; |
r17988 | r17989 | |
261 | 261 | sy = BORDER_V/2 + y * 8; |
262 | 262 | sx = BORDER_H/2 + x * 8; |
263 | 263 | code = videoram[0x3800+offs]; |
264 | drawgfx_opaque(bitmap,cliprect, | |
264 | drawgfx_opaque(bitmap,cliprect, | |
265 | 265 | } |
266 | 266 | } |
267 | 267 | } |
r17988 | r17989 | |
278 | 278 | sx = BORDER_H/2 + x * 16; |
279 | 279 | code = videoram[0x3800+offs]; |
280 | 280 | color = videoram[0x3801+offs]; |
281 | drawgfx_opaque(bitmap,cliprect, | |
281 | drawgfx_opaque(bitmap,cliprect, | |
282 | 282 | } |
283 | 283 | } |
284 | 284 | } |
r17988 | r17989 | |
---|---|---|
207 | 207 | |
208 | 208 | UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
209 | 209 | { |
210 | device_t *devconf = | |
210 | device_t *devconf = | |
211 | 211 | rainbow_video_update( devconf, bitmap, cliprect); |
212 | 212 | return 0; |
213 | 213 | } |
r17988 | r17989 | |
---|---|---|
96 | 96 | dot |= pen[pen_i]<<pen_i; |
97 | 97 | |
98 | 98 | if(y < 512 && x*16+xi < 768) /* TODO: safety check */ |
99 | bitmap.pix16(y, x*16+xi) = | |
99 | bitmap.pix16(y, x*16+xi) = | |
100 | 100 | } |
101 | 101 | |
102 | 102 | count++; |
r17988 | r17989 | |
---|---|---|
87 | 87 | |
88 | 88 | UINT32 mz2000_state::screen_update_mz2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
89 | 89 | { |
90 | UINT8 *tvram = screen.machine().root_device().memregion("tvram")->base(); | |
91 | UINT8 *gvram = screen.machine().root_device().memregion("gvram")->base(); | |
90 | UINT8 *tvram = machine().root_device().memregion("tvram")->base(); | |
91 | UINT8 *gvram = machine().root_device().memregion("gvram")->base(); | |
92 | 92 | UINT8 *gfx_data = memregion("chargen")->base(); |
93 | 93 | int x,y,xi,yi; |
94 | 94 | UINT8 x_size; |
r17988 | r17989 | |
108 | 108 | pen |= ((gvram[count+0xc000] >> (xi)) & 1) ? 4 : 0; //G |
109 | 109 | pen &= m_gvram_mask; |
110 | 110 | |
111 | bitmap.pix16(y*2+0, x+xi) = screen.machine().pens[pen]; | |
112 | bitmap.pix16(y*2+1, x+xi) = screen.machine().pens[pen]; | |
111 | bitmap.pix16(y*2+0, x+xi) = machine().pens[pen]; | |
112 | bitmap.pix16(y*2+1, x+xi) = machine().pens[pen]; | |
113 | 113 | } |
114 | 114 | count++; |
115 | 115 | } |
r17988 | r17989 | |
149 | 149 | { |
150 | 150 | if(m_width80 == 0) |
151 | 151 | { |
152 | bitmap.pix16(res_y, res_x*2+0) = screen.machine().pens[pen]; | |
153 | bitmap.pix16(res_y, res_x*2+1) = screen.machine().pens[pen]; | |
152 | bitmap.pix16(res_y, res_x*2+0) = machine().pens[pen]; | |
153 | bitmap.pix16(res_y, res_x*2+1) = machine().pens[pen]; | |
154 | 154 | } |
155 | 155 | else |
156 | 156 | { |
157 | bitmap.pix16(res_y, res_x) = | |
157 | bitmap.pix16(res_y, res_x) = | |
158 | 158 | } |
159 | 159 | } |
160 | 160 | else |
161 | 161 | { |
162 | 162 | if(m_width80 == 0) |
163 | 163 | { |
164 | bitmap.pix16(res_y*2+0, res_x*2+0) = screen.machine().pens[pen]; | |
165 | bitmap.pix16(res_y*2+0, res_x*2+1) = screen.machine().pens[pen]; | |
166 | bitmap.pix16(res_y*2+1, res_x*2+0) = screen.machine().pens[pen]; | |
167 | bitmap.pix16(res_y*2+1, res_x*2+1) = screen.machine().pens[pen]; | |
164 | bitmap.pix16(res_y*2+0, res_x*2+0) = machine().pens[pen]; | |
165 | bitmap.pix16(res_y*2+0, res_x*2+1) = machine().pens[pen]; | |
166 | bitmap.pix16(res_y*2+1, res_x*2+0) = machine().pens[pen]; | |
167 | bitmap.pix16(res_y*2+1, res_x*2+1) = machine().pens[pen]; | |
168 | 168 | } |
169 | 169 | else |
170 | 170 | { |
171 | bitmap.pix16(res_y*2+0, res_x) = screen.machine().pens[pen]; | |
172 | bitmap.pix16(res_y*2+1, res_x) = screen.machine().pens[pen]; | |
171 | bitmap.pix16(res_y*2+0, res_x) = machine().pens[pen]; | |
172 | bitmap.pix16(res_y*2+1, res_x) = machine().pens[pen]; | |
173 | 173 | } |
174 | 174 | } |
175 | 175 | } |
r17988 | r17989 | |
---|---|---|
262 | 262 | dot = m_display_mask; |
263 | 263 | |
264 | 264 | if(y*mc6845_tile_height+yi < 216 && x*8+xi < 640) /* TODO: safety check */ |
265 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
265 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
266 | 266 | } |
267 | 267 | } |
268 | 268 | } |
r17988 | r17989 | |
---|---|---|
234 | 234 | |
235 | 235 | UINT32 c65_state::screen_update_c65(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
236 | 236 | { |
237 | device_t *vic3 = | |
237 | device_t *vic3 = | |
238 | 238 | |
239 | 239 | vic3_video_update(vic3, bitmap, cliprect); |
240 | 240 | return 0; |
r17988 | r17989 | |
---|---|---|
75 | 75 | int dot = (BITSWAP16(m_p_vram[count],7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8) >> (15-xi)) & 0x1; |
76 | 76 | |
77 | 77 | if(screen.visible_area().contains(x*16+xi, y)) |
78 | bitmap.pix16(y, x*16+xi) = | |
78 | bitmap.pix16(y, x*16+xi) = | |
79 | 79 | } |
80 | 80 | |
81 | 81 | count++; |
r17988 | r17989 | |
---|---|---|
447 | 447 | { |
448 | 448 | switch(cur_pri_lv & 3) // (palette color mode) |
449 | 449 | { |
450 | case 0: draw_text(screen.machine(),bitmap,cliprect); break; | |
451 | case 1: if(m_tsp.spr_on) { draw_sprites(screen.machine(),bitmap,cliprect); } break; | |
450 | case 0: draw_text(machine(),bitmap,cliprect); break; | |
451 | case 1: if(m_tsp.spr_on) { draw_sprites(machine(),bitmap,cliprect); } break; | |
452 | 452 | case 2: /* A = graphic 0 */ break; |
453 | 453 | case 3: /* B = graphic 1 */ break; |
454 | 454 | } |
r17988 | r17989 | |
---|---|---|
508 | 508 | |
509 | 509 | UINT32 pc6001_state::screen_update_pc6001(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
510 | 510 | { |
511 | pc6001_screen_draw( | |
511 | pc6001_screen_draw( | |
512 | 512 | |
513 | 513 | return 0; |
514 | 514 | } |
r17988 | r17989 | |
551 | 551 | color |= ((pen[1] & 2) << 2); |
552 | 552 | |
553 | 553 | if (cliprect.contains((x+i)*2+0, y)) |
554 | bitmap.pix16(y, (x+i)*2+0) = | |
554 | bitmap.pix16(y, (x+i)*2+0) = | |
555 | 555 | if (cliprect.contains((x+i)*2+1, y)) |
556 | bitmap.pix16(y, (x+i)*2+1) = | |
556 | bitmap.pix16(y, (x+i)*2+1) = | |
557 | 557 | } |
558 | 558 | |
559 | 559 | count++; |
r17988 | r17989 | |
599 | 599 | } |
600 | 600 | |
601 | 601 | if (cliprect.contains(x+i, y)) |
602 | bitmap.pix16(y, (x+i)) = | |
602 | bitmap.pix16(y, (x+i)) = | |
603 | 603 | } |
604 | 604 | |
605 | 605 | count++; |
r17988 | r17989 | |
610 | 610 | else if(m_exgfx_text_mode) |
611 | 611 | { |
612 | 612 | int xi,yi,pen,fgcol,bgcol,color; |
613 | UINT8 *gfx_data = | |
613 | UINT8 *gfx_data = | |
614 | 614 | |
615 | 615 | for(y=0;y<20;y++) |
616 | 616 | { |
r17988 | r17989 | |
639 | 639 | color = pen ? fgcol : bgcol; |
640 | 640 | |
641 | 641 | if (cliprect.contains(x*8+xi, y*12+yi)) |
642 | bitmap.pix16(((y*12+yi)), (x*8+xi)) = | |
642 | bitmap.pix16(((y*12+yi)), (x*8+xi)) = | |
643 | 643 | } |
644 | 644 | } |
645 | 645 | } |
r17988 | r17989 | |
648 | 648 | else |
649 | 649 | { |
650 | 650 | attr = m_video_ram[0]; |
651 | pc6001_screen_draw( | |
651 | pc6001_screen_draw( | |
652 | 652 | } |
653 | 653 | |
654 | 654 | return 0; |
r17988 | r17989 | |
683 | 683 | color = pen ? fgcol : bgcol; |
684 | 684 | |
685 | 685 | if (cliprect.contains(x*8+xi, y*12+yi)) |
686 | bitmap.pix16(((y*12+yi)), (x*8+xi)) = | |
686 | bitmap.pix16(((y*12+yi)), (x*8+xi)) = | |
687 | 687 | } |
688 | 688 | } |
689 | 689 | } |
r17988 | r17989 | |
702 | 702 | color = m_video_ram[count] & 0x0f; |
703 | 703 | |
704 | 704 | if (cliprect.contains(x+0, y+0)) |
705 | bitmap.pix16((y+0), (x+0)) = | |
705 | bitmap.pix16((y+0), (x+0)) = | |
706 | 706 | |
707 | 707 | color = (m_video_ram[count] & 0xf0) >> 4; |
708 | 708 | |
709 | 709 | if (cliprect.contains(x+1, y+0)) |
710 | bitmap.pix16((y+0), (x+1)) = | |
710 | bitmap.pix16((y+0), (x+1)) = | |
711 | 711 | |
712 | 712 | color = m_video_ram[count+1] & 0x0f; |
713 | 713 | |
714 | 714 | if (cliprect.contains(x+2, y+0)) |
715 | bitmap.pix16((y+0), (x+2)) = | |
715 | bitmap.pix16((y+0), (x+2)) = | |
716 | 716 | |
717 | 717 | color = (m_video_ram[count+1] & 0xf0) >> 4; |
718 | 718 | |
719 | 719 | if (cliprect.contains(x+3, y+0)) |
720 | bitmap.pix16((y+0), (x+3)) = | |
720 | bitmap.pix16((y+0), (x+3)) = | |
721 | 721 | |
722 | 722 | color = m_video_ram[count+2] & 0x0f; |
723 | 723 | |
724 | 724 | if (cliprect.contains(x+0, y+1)) |
725 | bitmap.pix16((y+1), (x+0)) = | |
725 | bitmap.pix16((y+1), (x+0)) = | |
726 | 726 | |
727 | 727 | color = (m_video_ram[count+2] & 0xf0) >> 4; |
728 | 728 | |
729 | 729 | if (cliprect.contains(x+1, y+1)) |
730 | bitmap.pix16((y+1), (x+1)) = | |
730 | bitmap.pix16((y+1), (x+1)) = | |
731 | 731 | |
732 | 732 | color = m_video_ram[count+3] & 0x0f; |
733 | 733 | |
734 | 734 | if (cliprect.contains(x+2, y+1)) |
735 | bitmap.pix16((y+1), (x+2)) = | |
735 | bitmap.pix16((y+1), (x+2)) = | |
736 | 736 | |
737 | 737 | color = (m_video_ram[count+3] & 0xf0) >> 4; |
738 | 738 | |
739 | 739 | if (cliprect.contains(x+3, y+1)) |
740 | bitmap.pix16((y+1), (x+3)) = | |
740 | bitmap.pix16((y+1), (x+3)) = | |
741 | 741 | |
742 | 742 | |
743 | 743 | count+=4; |
r17988 | r17989 | |
---|---|---|
422 | 422 | |
423 | 423 | for(i = 0; i < 4; i++) |
424 | 424 | { |
425 | vii_blit_page(screen.machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x20], m_video_regs + 0x10); | |
426 | vii_blit_page(screen.machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x21], m_video_regs + 0x16); | |
427 | vii_blit_sprites(screen.machine(), bitmap, cliprect, i); | |
425 | vii_blit_page(machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x20], m_video_regs + 0x10); | |
426 | vii_blit_page(machine(), bitmap, cliprect, i, 0x40 * m_video_regs[0x21], m_video_regs + 0x16); | |
427 | vii_blit_sprites(machine(), bitmap, cliprect, i); | |
428 | 428 | } |
429 | 429 | |
430 | 430 | for(y = 0; y < 240; y++) |
r17988 | r17989 | |
---|---|---|
547 | 547 | |
548 | 548 | bitmap.fill(MAKE_ARGB(0xff,0x00,0x00,0x00), cliprect); |
549 | 549 | |
550 | draw_gfxbitmap(screen.machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri); | |
551 | draw_fgtilemap(screen.machine(),bitmap,cliprect); | |
552 | draw_gfxbitmap(screen.machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri^0xff); | |
550 | draw_gfxbitmap(machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri); | |
551 | draw_fgtilemap(machine(),bitmap,cliprect); | |
552 | draw_gfxbitmap(machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri^0xff); | |
553 | 553 | |
554 | 554 | return 0; |
555 | 555 | } |
r17988 | r17989 | |
---|---|---|
102 | 102 | { |
103 | 103 | int x,y,yi; |
104 | 104 | UINT16 count; |
105 | UINT8 *vram = screen.machine().root_device().memregion("vram")->base(); | |
106 | UINT8 *attr = screen.machine().root_device().memregion("attr")->base(); | |
105 | UINT8 *vram = machine().root_device().memregion("vram")->base(); | |
106 | UINT8 *attr = machine().root_device().memregion("attr")->base(); | |
107 | 107 | UINT8 *gram = memregion("fbuf")->base(); |
108 | 108 | int x_width; |
109 | 109 | |
110 | bitmap.fill( | |
110 | bitmap.fill( | |
111 | 111 | |
112 | 112 | x_width = (m_display_reg & 0x80) ? 2 : 4; |
113 | 113 | |
r17988 | r17989 | |
125 | 125 | /* todo: clean this up! */ |
126 | 126 | if(x_width == 2) |
127 | 127 | { |
128 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = | |
128 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = | |
129 | 129 | } |
130 | 130 | else |
131 | 131 | { |
132 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = screen.machine().pens[color]; | |
133 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+1+CRTC_MIN_X) = screen.machine().pens[color]; | |
132 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+0+CRTC_MIN_X) = machine().pens[color]; | |
133 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+1+CRTC_MIN_X) = machine().pens[color]; | |
134 | 134 | } |
135 | 135 | |
136 | 136 | color = (gram[count] & 0x0f) >> 0; |
137 | 137 | if(x_width == 2) |
138 | 138 | { |
139 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = | |
139 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = | |
140 | 140 | } |
141 | 141 | else |
142 | 142 | { |
143 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+2+CRTC_MIN_X) = screen.machine().pens[color]; | |
144 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+3+CRTC_MIN_X) = screen.machine().pens[color]; | |
143 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+2+CRTC_MIN_X) = machine().pens[color]; | |
144 | bitmap.pix16(y+yi+CRTC_MIN_Y, x*4+3+CRTC_MIN_X) = machine().pens[color]; | |
145 | 145 | } |
146 | 146 | |
147 | 147 | count++; |
r17988 | r17989 | |
181 | 181 | case 3: bk_pen = (color ^ 0xf); break; //complementary |
182 | 182 | } |
183 | 183 | |
184 | if(blink && | |
184 | if(blink && | |
185 | 185 | color = bk_pen; |
186 | 186 | |
187 | 187 | for(yi=0;yi<8;yi++) |
188 | 188 | { |
189 | 189 | for(xi=0;xi<8;xi++) |
190 | 190 | { |
191 | UINT8 *gfx_data = | |
191 | UINT8 *gfx_data = | |
192 | 192 | int pen; |
193 | 193 | |
194 | 194 | pen = ((gfx_data[tile*8+yi]>>(7-xi)) & 1) ? (color+m_pal_mode) : bk_pen; |
195 | 195 | |
196 | 196 | if(pen != -1) |
197 | bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = | |
197 | bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = | |
198 | 198 | } |
199 | 199 | } |
200 | 200 | |
r17988 | r17989 | |
208 | 208 | { |
209 | 209 | case 0x00: cursor_on = 1; break; //always on |
210 | 210 | case 0x20: cursor_on = 0; break; //always off |
211 | case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
212 | case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
211 | case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
212 | case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
213 | 213 | } |
214 | 214 | |
215 | 215 | if(cursor_on) |
r17988 | r17989 | |
218 | 218 | { |
219 | 219 | for(xc=0;xc<8;xc++) |
220 | 220 | { |
221 | bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = | |
221 | bitmap.pix16(y*8+CRTC_MIN_Y-yc+7, x*8+CRTC_MIN_X+xc) = | |
222 | 222 | } |
223 | 223 | } |
224 | 224 | } |
r17988 | r17989 | |
---|---|---|
112 | 112 | UINT8 pen; |
113 | 113 | UINT32 count; |
114 | 114 | |
115 | bitmap.fill(get_black_pen( | |
115 | bitmap.fill(get_black_pen( | |
116 | 116 | |
117 | 117 | count = (0); |
118 | 118 | |
r17988 | r17989 | |
125 | 125 | pen = (m_p_videoram[count]) >> (15 - i) & 1; |
126 | 126 | |
127 | 127 | if (screen.visible_area().contains(x + i, y)) |
128 | bitmap.pix32(y, x + i) = | |
128 | bitmap.pix32(y, x + i) = | |
129 | 129 | } |
130 | 130 | |
131 | 131 | count++; |
r17988 | r17989 | |
---|---|---|
91 | 91 | dot = 0; |
92 | 92 | |
93 | 93 | if(y*mc6845_tile_height+yi < 200 && x*8+xi < 320) /* TODO: safety check */ |
94 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
94 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
95 | 95 | } |
96 | 96 | } |
97 | 97 | } |
r17988 | r17989 | |
---|---|---|
446 | 446 | UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
447 | 447 | { |
448 | 448 | UINT32 line = 0; |
449 | device_t *ssem_cpu = | |
449 | device_t *ssem_cpu = | |
450 | 450 | UINT32 accum = ssem_cpu->state().state_int(SSEM_A); |
451 | 451 | UINT32 bit = 0; |
452 | 452 | UINT32 word = 0; |
r17988 | r17989 | |
461 | 461 | { |
462 | 462 | if(word & (1 << (31 - bit))) |
463 | 463 | { |
464 | glyph_print( | |
464 | glyph_print( | |
465 | 465 | } |
466 | 466 | else |
467 | 467 | { |
468 | glyph_print( | |
468 | glyph_print( | |
469 | 469 | } |
470 | 470 | } |
471 | 471 | } |
r17988 | r17989 | |
474 | 474 | { |
475 | 475 | if(accum & (1 << bit)) |
476 | 476 | { |
477 | glyph_print( | |
477 | glyph_print( | |
478 | 478 | } |
479 | 479 | else |
480 | 480 | { |
481 | glyph_print( | |
481 | glyph_print( | |
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
r17988 | r17989 | |
486 | 486 | (m_store[(m_store_line << 2) | 1] << 16) | |
487 | 487 | (m_store[(m_store_line << 2) | 2] << 8) | |
488 | 488 | (m_store[(m_store_line << 2) | 3] << 0)); |
489 | glyph_print( | |
489 | glyph_print( | |
490 | 490 | return 0; |
491 | 491 | } |
492 | 492 |
r17988 | r17989 | |
---|---|---|
634 | 634 | |
635 | 635 | UINT32 mz2500_state::screen_update_mz2500(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
636 | 636 | { |
637 | bitmap.fill( | |
637 | bitmap.fill( | |
638 | 638 | |
639 | draw_cg_screen(screen.machine(),bitmap,cliprect,0); | |
640 | draw_tv_screen(screen.machine(),bitmap,cliprect); | |
641 | draw_cg_screen(screen.machine(),bitmap,cliprect,1); | |
639 | draw_cg_screen(machine(),bitmap,cliprect,0); | |
640 | draw_tv_screen(machine(),bitmap,cliprect); | |
641 | draw_cg_screen(machine(),bitmap,cliprect,1); | |
642 | 642 | // popmessage("%02x (%02x %02x) (%02x %02x) (%02x %02x) (%02x %02x)",m_cg_reg[0x0f],m_cg_reg[0x10],m_cg_reg[0x11],m_cg_reg[0x12],m_cg_reg[0x13],m_cg_reg[0x14],m_cg_reg[0x15],m_cg_reg[0x16],m_cg_reg[0x17]); |
643 | 643 | // popmessage("%02x",m_text_reg[0x0f]); |
644 | 644 |
r17988 | r17989 | |
---|---|---|
273 | 273 | { |
274 | 274 | int tile = m_p_videoram[count++]; |
275 | 275 | |
276 | drawgfx_opaque(bitmap, cliprect, | |
276 | drawgfx_opaque(bitmap, cliprect, | |
277 | 277 | } |
278 | 278 | } |
279 | 279 |
r17988 | r17989 | |
---|---|---|
485 | 485 | |
486 | 486 | if (&screen == m_color_screen) |
487 | 487 | { |
488 | tms9929a_device *tms9929a = | |
488 | tms9929a_device *tms9929a = | |
489 | 489 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
490 | 490 | bitmap_ind16 &src = tms9929a->get_bitmap(); |
491 | 491 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
r17988 | r17989 | |
---|---|---|
488 | 488 | |
489 | 489 | UINT32 vboy_state::screen_update_vboy_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
490 | 490 | { |
491 | bitmap.fill( | |
491 | bitmap.fill( | |
492 | 492 | int cur_spt; |
493 | 493 | |
494 | 494 | if(!(m_vip_regs.DPCTRL & 2)) /* Don't bother if screen is off */ |
r17988 | r17989 | |
514 | 514 | yi = ((y & 0x3)*2); |
515 | 515 | pix = (pen >> yi) & 3; |
516 | 516 | |
517 | bitmap.pix16(y, x) = | |
517 | bitmap.pix16(y, x) = | |
518 | 518 | } |
519 | 519 | } |
520 | 520 | } |
r17988 | r17989 | |
524 | 524 | |
525 | 525 | UINT32 vboy_state::screen_update_vboy_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
526 | 526 | { |
527 | bitmap.fill( | |
527 | bitmap.fill( | |
528 | 528 | int cur_spt; |
529 | 529 | |
530 | 530 | if(!(m_vip_regs.DPCTRL & 2)) /* Don't bother if screen is off */ |
r17988 | r17989 | |
---|---|---|
169 | 169 | for (i = 0; i < 768; i++) |
170 | 170 | { |
171 | 171 | /* Is the char code masked or not ??? */ |
172 | drawgfx_opaque(bitmap, cliprect, | |
172 | drawgfx_opaque(bitmap, cliprect, | |
173 | 173 | 0, 0, sx, sy); |
174 | 174 | |
175 | 175 | sx += 8; |
r17988 | r17989 | |
---|---|---|
148 | 148 | else |
149 | 149 | color = (pen_b) | (pen_r << 1) | (pen_g << 2); |
150 | 150 | |
151 | multi8_draw_pixel( | |
151 | multi8_draw_pixel( | |
152 | 152 | } |
153 | 153 | count++; |
154 | 154 | } |
r17988 | r17989 | |
176 | 176 | pen = (m_p_chargen[tile*8+yi] >> (7-xi) & 1) ? color : 0; |
177 | 177 | |
178 | 178 | if(pen) |
179 | multi8_draw_pixel( | |
179 | multi8_draw_pixel( | |
180 | 180 | } |
181 | 181 | } |
182 | 182 | |
183 | //drawgfx_opaque(bitmap, cliprect, | |
183 | //drawgfx_opaque(bitmap, cliprect, | |
184 | 184 | |
185 | 185 | // draw cursor |
186 | 186 | if(mc6845_cursor_addr+0xc000 == count) |
r17988 | r17989 | |
192 | 192 | { |
193 | 193 | case 0x00: cursor_on = 1; break; //always on |
194 | 194 | case 0x20: cursor_on = 0; break; //always off |
195 | case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
196 | case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
195 | case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
196 | case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
197 | 197 | } |
198 | 198 | |
199 | 199 | if(cursor_on) |
r17988 | r17989 | |
201 | 201 | for (yc=0; yc<(mc6845_tile_height-(mc6845_cursor_y_start & 7)); yc++) |
202 | 202 | { |
203 | 203 | for (xc=0; xc<8; xc++) |
204 | multi8_draw_pixel( | |
204 | multi8_draw_pixel( | |
205 | 205 | |
206 | 206 | } |
207 | 207 | } |
r17988 | r17989 | |
---|---|---|
186 | 186 | { |
187 | 187 | case 0x00: cursor_on = 1; break; //always on |
188 | 188 | case 0x20: cursor_on = 0; break; //always off |
189 | case 0x40: if(screen.machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
190 | case 0x60: if(screen.machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
189 | case 0x40: if(machine().primary_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink | |
190 | case 0x60: if(machine().primary_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink | |
191 | 191 | } |
192 | 192 | |
193 | 193 | if(cursor_on) |
r17988 | r17989 | |
---|---|---|
55 | 55 | return 0x40; |
56 | 56 | } |
57 | 57 | |
58 | UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect | |
58 | UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect | |
59 | 59 | { |
60 | address_space &space = * | |
60 | address_space &space = * | |
61 | 61 | |
62 | 62 | for(int y = 0; y < 24; y++ ) |
63 | 63 | { |
64 | 64 | for(int x = 0; x < 80; x++ ) |
65 | 65 | { |
66 | 66 | UINT8 code = space.read_byte(0x3000 + x + y*128); |
67 | drawgfx_opaque(bitmap, cliprect, | |
67 | drawgfx_opaque(bitmap, cliprect, | |
68 | 68 | } |
69 | 69 | } |
70 | 70 |
r17988 | r17989 | |
---|---|---|
134 | 134 | { |
135 | 135 | UINT8 *videoram = m_videoram; |
136 | 136 | screen.set_visible_area(0, 113, 0, 75); |
137 | hector_hr( | |
137 | hector_hr( | |
138 | 138 | return 0; |
139 | 139 | } |
140 | 140 |
r17988 | r17989 | |
---|---|---|
94 | 94 | int dot = (m_gvram[count] >> (12-xi*4)) & 0xf; |
95 | 95 | |
96 | 96 | if(y < 400 && x*4+xi < 640) /* TODO: safety check */ |
97 | bitmap.pix16(y, x*4+xi) = | |
97 | bitmap.pix16(y, x*4+xi) = | |
98 | 98 | } |
99 | 99 | |
100 | 100 | count++; |
r17988 | r17989 | |
117 | 117 | |
118 | 118 | if(pen != -1) |
119 | 119 | if(y*mc6845_tile_height < 400 && x*8+xi < 640) /* TODO: safety check */ |
120 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
120 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
121 | 121 | } |
122 | 122 | } |
123 | 123 | } |
r17988 | r17989 | |
132 | 132 | { |
133 | 133 | x = mc6845_cursor_addr % mc6845_h_display; |
134 | 134 | y = mc6845_cursor_addr / mc6845_h_display; |
135 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
135 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
r17988 | r17989 | |
---|---|---|
309 | 309 | { |
310 | 310 | int width; |
311 | 311 | |
312 | bitmap.fill( | |
312 | bitmap.fill( | |
313 | 313 | |
314 | 314 | width = m_x_width ? 80 : 40; |
315 | 315 | |
316 | 316 | if(m_gfx_mode) |
317 | draw_mixed_screen( | |
317 | draw_mixed_screen( | |
318 | 318 | else |
319 | 319 | { |
320 | draw_cg4_screen(screen.machine(),bitmap,cliprect,width); | |
321 | draw_tv_screen(screen.machine(),bitmap,cliprect,width); | |
320 | draw_cg4_screen(machine(),bitmap,cliprect,width); | |
321 | draw_tv_screen(machine(),bitmap,cliprect,width); | |
322 | 322 | } |
323 | 323 | |
324 | 324 | return 0; |
r17988 | r17989 | |
---|---|---|
86 | 86 | |
87 | 87 | UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
88 | 88 | { |
89 | device_t *devconf = | |
89 | device_t *devconf = | |
90 | 90 | i8275_update( devconf, bitmap, cliprect); |
91 | 91 | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
92 | 92 | return 0; |
r17988 | r17989 | |
---|---|---|
279 | 279 | if ( tile < 0xe0 ) |
280 | 280 | { |
281 | 281 | tile += ( m_io_regs[7] * 8 ); |
282 | drawgfx_opaque( bitmap, cliprect, | |
282 | drawgfx_opaque( bitmap, cliprect, | |
283 | 283 | } |
284 | 284 | else |
285 | 285 | { |
286 | 286 | tile -= 0xe0; |
287 | drawgfx_opaque( bitmap, cliprect, | |
287 | drawgfx_opaque( bitmap, cliprect, | |
288 | 288 | } |
289 | 289 | } |
290 | 290 | } |
r17988 | r17989 | |
---|---|---|
331 | 331 | |
332 | 332 | UINT32 pk8000_state::screen_update_pk8000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
333 | 333 | { |
334 | return pk8000_video_update(screen, bitmap, cliprect, | |
334 | return pk8000_video_update(screen, bitmap, cliprect, | |
335 | 335 | } |
336 | 336 | |
337 | 337 | /* Machine driver */ |
r17988 | r17989 | |
---|---|---|
90 | 90 | UINT32 count; |
91 | 91 | static int test_x; |
92 | 92 | |
93 | if( | |
93 | if( | |
94 | 94 | test_x++; |
95 | 95 | |
96 | if( | |
96 | if( | |
97 | 97 | test_x--; |
98 | 98 | |
99 | 99 | popmessage("%d",test_x); |
r17988 | r17989 | |
111 | 111 | int pen = (m_p_gvram[count] >> xi) & 1; |
112 | 112 | |
113 | 113 | if(y < 475 && x*16+xi < 640) /* TODO: safety check */ |
114 | bitmap.pix16(y, x*16+xi) = | |
114 | bitmap.pix16(y, x*16+xi) = | |
115 | 115 | } |
116 | 116 | |
117 | 117 | count++; |
r17988 | r17989 | |
140 | 140 | |
141 | 141 | //if(pen != -1) |
142 | 142 | if(y*19 < 475 && x*8+xi < 640) /* TODO: safety check */ |
143 | bitmap.pix16(y*19+yi, x*8+xi) = | |
143 | bitmap.pix16(y*19+yi, x*8+xi) = | |
144 | 144 | } |
145 | 145 | } |
146 | 146 | } |
r17988 | r17989 | |
156 | 156 | { |
157 | 157 | x = mc6845_cursor_addr % mc6845_h_display; |
158 | 158 | y = mc6845_cursor_addr / mc6845_h_display; |
159 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
159 | bitmap.pix16(y*mc6845_tile_height+yi, x*8+xi) = | |
160 | 160 | } |
161 | 161 | } |
162 | 162 | } |
r17988 | r17989 | |
---|---|---|
319 | 319 | |
320 | 320 | UINT32 vt100_state::screen_update_vt100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
321 | 321 | { |
322 | device_t *devconf = | |
322 | device_t *devconf = | |
323 | 323 | vt_video_update( devconf, bitmap, cliprect); |
324 | 324 | return 0; |
325 | 325 | } |
r17988 | r17989 | |
---|---|---|
394 | 394 | UINT32 pasogo_state::screen_update_pasogo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
395 | 395 | { |
396 | 396 | //static int width=-1,height=-1; |
397 | UINT8 *rom = | |
397 | UINT8 *rom = | |
398 | 398 | static const UINT16 c[]={ 3, 0 }; |
399 | 399 | int x,y; |
400 | 400 | // plot_box(bitmap, 0, 0, 64/*bitmap.width*/, bitmap.height, 0); |
r17988 | r17989 | |
---|---|---|
598 | 598 | char the_char; |
599 | 599 | |
600 | 600 | bitmap.fill(0, /*machine().visible_area*/panel_window); |
601 | apexc_draw_string(screen.machine(), bitmap, "power", 8, 0, 0); | |
602 | apexc_draw_string(screen.machine(), bitmap, "running", 8, 8, 0); | |
603 | apexc_draw_string(screen.machine(), bitmap, "data :", 0, 24, 0); | |
601 | apexc_draw_string(machine(), bitmap, "power", 8, 0, 0); | |
602 | apexc_draw_string(machine(), bitmap, "running", 8, 8, 0); | |
603 | apexc_draw_string(machine(), bitmap, "data :", 0, 24, 0); | |
604 | 604 | |
605 | 605 | copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, teletyper_window); |
606 | 606 | |
607 | 607 | |
608 | 608 | apexc_draw_led(bitmap, 0, 0, 1); |
609 | 609 | |
610 | apexc_draw_led(bitmap, 0, 8, | |
610 | apexc_draw_led(bitmap, 0, 8, | |
611 | 611 | |
612 | 612 | for (i=0; i<32; i++) |
613 | 613 | { |
614 | 614 | apexc_draw_led(bitmap, i*8, 32, (m_panel_data_reg << i) & 0x80000000UL); |
615 | 615 | the_char = '0' + ((i + 1) % 10); |
616 | apexc_draw_char( | |
616 | apexc_draw_char( | |
617 | 617 | if (((i + 1) % 10) == 0) |
618 | 618 | { |
619 | 619 | the_char = '0' + ((i + 1) / 10); |
620 | apexc_draw_char( | |
620 | apexc_draw_char( | |
621 | 621 | } |
622 | 622 | } |
623 | 623 | return 0; |
r17988 | r17989 | |
---|---|---|
825 | 825 | } |
826 | 826 | } |
827 | 827 | |
828 | UINT32 pc8801_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect | |
828 | UINT32 pc8801_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect | |
829 | 829 | { |
830 | bitmap.fill( | |
830 | bitmap.fill( | |
831 | 831 | |
832 | 832 | // popmessage("%04x %04x %02x",m_dma_address[2],m_dma_counter[2],m_dmac_mode); |
833 | 833 |
r17988 | r17989 | |
---|---|---|
158 | 158 | } |
159 | 159 | else // tile mode |
160 | 160 | { |
161 | gfx_data = | |
161 | gfx_data = | |
162 | 162 | |
163 | 163 | pen = (gfx_data[(tile*8)+yi]>>(7-xi) & 1) ? (attr & 0x7) : ((attr & 0x38) >> 3); |
164 | 164 | } |
165 | 165 | |
166 | bitmap.pix16(y*8+yi+16, x*8+xi+16) = | |
166 | bitmap.pix16(y*8+yi+16, x*8+xi+16) = | |
167 | 167 | } |
168 | 168 | } |
169 | 169 | } |
r17988 | r17989 | |
---|---|---|
780 | 780 | m_sprite_final_bitmap.fill(0x00, visarea); |
781 | 781 | bitmap.fill(0x80, visarea); |
782 | 782 | |
783 | draw_sprites( | |
783 | draw_sprites( | |
784 | 784 | } |
785 | 785 | } |
786 | 786 | else |
r17988 | r17989 | |
789 | 789 | m_sprite_final_bitmap.fill(0x00, cliprect); |
790 | 790 | bitmap.fill(0x80, cliprect); |
791 | 791 | |
792 | draw_sprites( | |
792 | draw_sprites( | |
793 | 793 | } |
794 | 794 | |
795 | 795 | |
r17988 | r17989 | |
829 | 829 | if (priority==pri) |
830 | 830 | { |
831 | 831 | // tilemap_num = layer; |
832 | which_tilemap_size = get_tilemap_dimensions( | |
832 | which_tilemap_size = get_tilemap_dimensions( | |
833 | 833 | bitmap_ind16 &src_bitmap = m_tilemap_sizes[layer][which_tilemap_size]->pixmap(); |
834 | int gfx_region = supracan_tilemap_get_region( | |
834 | int gfx_region = supracan_tilemap_get_region( | |
835 | 835 | int transmask = 0xff; |
836 | 836 | |
837 | 837 | switch (gfx_region) |
r17988 | r17989 | |
953 | 953 | |
954 | 954 | |
955 | 955 | if (m_vram[m_roz_unk_base0/2 + y]) // incxx = 0, no draw? |
956 | supracan_suprnova_draw_roz( | |
956 | supracan_suprnova_draw_roz( | |
957 | 957 | } |
958 | 958 | } |
959 | 959 | else |
960 | 960 | { |
961 | supracan_suprnova_draw_roz( | |
961 | supracan_suprnova_draw_roz( | |
962 | 962 | } |
963 | 963 | } |
964 | 964 | } |
r17988 | r17989 | |
---|---|---|
301 | 301 | |
302 | 302 | UINT32 cybiko_state::screen_update_cybiko(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
303 | 303 | { |
304 | hd66421_device *hd66421 = | |
304 | hd66421_device *hd66421 = | |
305 | 305 | hd66421->update_screen(bitmap, cliprect); |
306 | 306 | return 0; |
307 | 307 | } |
r17988 | r17989 | |
---|---|---|
170 | 170 | dot = (m_vram[count] >> (7-xi)) & 1; |
171 | 171 | |
172 | 172 | if(y*4+yi < 400 && x*8+xi < 640) /* TODO: safety check */ |
173 | bitmap.pix16(y*4+yi, x*8+xi) = | |
173 | bitmap.pix16(y*4+yi, x*8+xi) = | |
174 | 174 | } |
175 | 175 | |
176 | 176 | count++; |
r17988 | r17989 | |
---|---|---|
352 | 352 | |
353 | 353 | UINT32 svision_state::screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
354 | 354 | { |
355 | svision_state *state = | |
355 | svision_state *state = | |
356 | 356 | int x, y, i, j=XPOS/4+YPOS*0x30; |
357 | 357 | UINT8 *videoram = m_videoram; |
358 | 358 | |
r17988 | r17989 | |
384 | 384 | |
385 | 385 | UINT32 svision_state::screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
386 | 386 | { |
387 | svision_state *state = | |
387 | svision_state *state = | |
388 | 388 | int x, y, i, j = XPOS/4+YPOS*0x30; |
389 | 389 | UINT8 *videoram = m_videoram; |
390 | 390 | |
r17988 | r17989 | |
409 | 409 | } |
410 | 410 | else |
411 | 411 | { |
412 | bitmap.plot_box(3, 0, 162, 159, | |
412 | bitmap.plot_box(3, 0, 162, 159, | |
413 | 413 | } |
414 | 414 | return 0; |
415 | 415 | } |
r17988 | r17989 | |
---|---|---|
117 | 117 | |
118 | 118 | UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
119 | 119 | { |
120 | device_t *devconf = | |
120 | device_t *devconf = | |
121 | 121 | i8275_update( devconf, bitmap, cliprect); |
122 | 122 | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
123 | 123 | return 0; |
Previous | 199869 Revisions | Next |