65
65
0: horizontal scroll
67
4: Style of colscroll (low 4 bits, top 4 bits do nothing)
68
6: Style of rowscroll (low 4 bits, top 4 bits do nothing)
70
Rowscroll/Colscroll styles:
71
0: 256 scroll registers (Robocop)
72
1: 128 scroll registers
73
2: 64 scroll registers
74
3: 32 scroll registers (Heavy Barrel, Midres)
75
4: 16 scroll registers (Bad Dudes, Sly Spy)
76
5: 8 scroll registers (Hippodrome)
77
6: 4 scroll registers (Heavy Barrel)
78
7: 2 scroll registers (Heavy Barrel, used on other games but registers kept at 0)
79
8: 1 scroll register (ie, none)
81
Values above are *multiplied* by playfield shape.
67
4: colscroll shifter (low 4 bits, top 4 bits do nothing)
68
6: rowscroll shifter (low 4 bits, top 4 bits do nothing)
70
Row & column scroll can be applied simultaneously or by themselves.
71
The shift register controls the granularity of the scroll offsets
72
(more details given later).
83
74
Playfield priority (Bad Dudes, etc):
84
In the bottommost playfield, pens 8-15 can have priority over the next playfield.
85
In that next playfield, pens 8-15 can have priority over sprites.
75
In the bottommost playfield, pens 8-15 can have priority over the next playfield.
76
In that next playfield, pens 8-15 can have priority over sprites.
87
78
Bit 0: Playfield inversion
88
79
Bit 1: Enable playfield mixing (for palettes 8-15 only)
89
80
Bit 2: Enable playfield/sprite mixing (for palettes 8-15 only)
91
82
Priority word (Midres):
92
Bit 0 set = Playfield 3 drawn over Playfield 2
93
~ = Playfield 2 drawn over Playfield 3
94
Bit 1 set = Sprites are drawn inbetween playfields
95
~ = Sprites are on top of playfields
83
Bit 0 set = Playfield 3 drawn over Playfield 2
84
~ = Playfield 2 drawn over Playfield 3
85
Bit 1 set = Sprites are drawn inbetween playfields
86
~ = Sprites are on top of playfields
91
Implement multi-width sprites (used by Birdtry).
92
Implement sprite/tilemap orthogonality (not strictly needed as no
93
games make deliberate use of it).
99
95
***************************************************************************/
101
97
#include "driver.h"
102
#include "vidhrdw/generic.h"
104
static struct tilemap *pf1_tilemap_0,*pf1_tilemap_1,*pf1_tilemap_2;
105
static struct tilemap *pf2_tilemap_0,*pf2_tilemap_1,*pf2_tilemap_2;
106
static struct tilemap *pf3_tilemap_0,*pf3_tilemap_1,*pf3_tilemap_2;
108
data16_t *dec0_pf1_data,*dec0_pf2_data,*dec0_pf3_data;
109
data16_t *dec0_pf1_rowscroll,*dec0_pf2_rowscroll,*dec0_pf3_rowscroll;
110
data16_t *dec0_pf1_colscroll,*dec0_pf2_colscroll,*dec0_pf3_colscroll;
111
static data16_t dec0_pf1_control_0[4];
112
static data16_t dec0_pf1_control_1[4];
113
static data16_t dec0_pf2_control_0[4];
114
static data16_t dec0_pf2_control_1[4];
115
static data16_t dec0_pf3_control_0[4];
116
static data16_t dec0_pf3_control_1[4];
117
static data16_t *dec0_spriteram;
118
static data16_t dec0_pri;
98
#include "includes/dec0.h"
100
static tilemap *pf1_tilemap_0,*pf1_tilemap_1,*pf1_tilemap_2;
101
static tilemap *pf2_tilemap_0,*pf2_tilemap_1,*pf2_tilemap_2;
102
static tilemap *pf3_tilemap_0,*pf3_tilemap_1,*pf3_tilemap_2;
104
UINT16 *dec0_pf1_data,*dec0_pf2_data,*dec0_pf3_data;
105
UINT16 *dec0_pf1_rowscroll,*dec0_pf2_rowscroll,*dec0_pf3_rowscroll;
106
UINT16 *dec0_pf1_colscroll,*dec0_pf2_colscroll,*dec0_pf3_colscroll;
107
static UINT16 dec0_pf1_control_0[4];
108
static UINT16 dec0_pf1_control_1[4];
109
static UINT16 dec0_pf2_control_0[4];
110
static UINT16 dec0_pf2_control_1[4];
111
static UINT16 dec0_pf3_control_0[4];
112
static UINT16 dec0_pf3_control_1[4];
113
static UINT16 *dec0_spriteram;
114
static UINT16 dec0_pri;
120
116
/******************************************************************************/
220
216
/******************************************************************************/
222
static void dec0_pf1_update(void)
224
int offs,lines,height,scrolly,scrollx;
225
struct tilemap *tilemap_ptr;
228
flip_screen_set(dec0_pf1_control_0[0]&0x80);
230
/* Master scroll registers */
231
scrollx = dec0_pf1_control_1[0];
232
scrolly = dec0_pf1_control_1[1];
234
/* Playfield shape */
235
switch (dec0_pf1_control_0[3]&0x3) {
236
case 0: height=1; tilemap_ptr=pf1_tilemap_0; break; /* 4x1, 256 rows */
237
case 1: height=2; tilemap_ptr=pf1_tilemap_1; break; /* 2x2, 512 rows */
238
case 2: height=4; tilemap_ptr=pf1_tilemap_2; break; /* 1x4, 1024 rows */
239
default: height=2; tilemap_ptr=pf1_tilemap_1; break; /* Never happens */
242
/* Column scroll - may be screen-wise rather than tilemap-wise, not confirmed yet */
243
if (dec0_pf1_control_0[0]&0x8 && dec0_pf1_colscroll[0]) {
244
tilemap_set_scroll_cols(tilemap_ptr,32);
245
tilemap_set_scroll_rows(tilemap_ptr,1);
246
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
248
for (offs = 0;offs < 32;offs++)
249
tilemap_set_scrolly(tilemap_ptr, offs, scrolly + dec0_pf1_colscroll[offs]);
252
/* Row scroll enable bit */
253
else if (dec0_pf1_control_0[0]&0x4) {
254
/* Rowscroll style */
255
switch (dec0_pf1_control_1[3]&0xf) {
256
case 0: lines=256; break; /* 256 horizontal scroll registers (Robocop) */
257
case 1: lines=128; break; /* 128 horizontal scroll registers (Not used?) */
258
case 2: lines=64; break; /* 64 horizontal scroll registers (Not used?) */
259
case 3: lines=32; break; /* 32 horizontal scroll registers (Heavy Barrel title screen) */
260
case 4: lines=16; break; /* 16 horizontal scroll registers (Bad Dudes, Sly Spy) */
261
case 5: lines=8; break; /* 8 horizontal scroll registers (Not used?) */
262
case 6: lines=4; break; /* 4 horizontal scroll registers (Not used?) */
263
case 7: lines=2; break; /* 2 horizontal scroll registers (Not used?) */
267
tilemap_set_scroll_cols(tilemap_ptr,1);
268
tilemap_set_scroll_rows(tilemap_ptr,lines*height);
269
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
270
for (offs = 0; offs < lines*height; offs++)
271
tilemap_set_scrollx(tilemap_ptr,offs,scrollx + dec0_pf1_rowscroll[offs]);
273
else { /* Scroll registers not enabled */
274
tilemap_set_scroll_rows(tilemap_ptr,1);
275
tilemap_set_scroll_cols(tilemap_ptr,1);
276
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
277
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
281
static void dec0_pf2_update(void)
283
int offs,lines,height,scrolly,scrollx;
284
struct tilemap *tilemap_ptr;
286
/* Master scroll registers */
287
scrollx = dec0_pf2_control_1[0];
288
scrolly = dec0_pf2_control_1[1];
290
/* Playfield shape */
291
switch (dec0_pf2_control_0[3]&0x3) {
292
case 0: height=1; tilemap_ptr=pf2_tilemap_0; break; /* 4x1, 256 rows */
293
case 1: height=2; tilemap_ptr=pf2_tilemap_1; break; /* 2x2, 512 rows */
294
case 2: height=4; tilemap_ptr=pf2_tilemap_2; break; /* 1x4, 1024 rows */
295
default: height=2; tilemap_ptr=pf2_tilemap_1; break; /* Never happens */
298
/* Column scroll - may be screen-wise rather than tilemap-wise, not confirmed yet */
299
if (dec0_pf2_control_0[0]&0x8 && (dec0_pf2_colscroll[0] || dec0_pf2_colscroll[1])) {
300
switch (dec0_pf2_control_1[2]&0x7) {
301
case 0: lines=1; break;
302
case 1: lines=2; break;
303
case 2: lines=4; break;
304
case 3: lines=8; break;
305
case 4: lines=16; break;
306
case 5: lines=32; break;
307
case 6: lines=64; break;
308
case 7: lines=128; break;
311
if (height==2) lines*=2; else if (height==1) lines*=4;
313
tilemap_set_scroll_cols(tilemap_ptr,lines);
314
tilemap_set_scroll_rows(tilemap_ptr,1);
315
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
317
for (offs = 0;offs < lines;offs++)
318
tilemap_set_scrolly(tilemap_ptr, offs, scrolly + dec0_pf2_colscroll[offs]);
321
/* Row scroll enable bit */
322
else if (dec0_pf2_control_0[0]&0x4) {
323
/* Rowscroll style */
324
switch (dec0_pf2_control_1[3]&0xf) {
325
case 0: lines=256; break; /* 256 horizontal scroll registers (Robocop) */
326
case 1: lines=128; break; /* 128 horizontal scroll registers (Not used?) */
327
case 2: lines=64; break; /* 64 horizontal scroll registers (Not used?) */
328
case 3: lines=32; break; /* 32 horizontal scroll registers (Heavy Barrel title screen) */
329
case 4: lines=16; break; /* 16 horizontal scroll registers (Bad Dudes, Sly Spy) */
330
case 5: lines=8; break; /* 8 horizontal scroll registers (Not used?) */
331
case 6: lines=4; break; /* 4 horizontal scroll registers (Not used?) */
332
case 7: lines=2; break; /* 2 horizontal scroll registers (Not used?) */
336
tilemap_set_scroll_cols(tilemap_ptr,1);
337
tilemap_set_scroll_rows(tilemap_ptr,lines*height);
338
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
339
for (offs = 0; offs < lines*height; offs++)
340
tilemap_set_scrollx(tilemap_ptr,offs,scrollx + dec0_pf2_rowscroll[offs]);
342
else { /* Scroll registers not enabled */
343
tilemap_set_scroll_rows(tilemap_ptr,1);
344
tilemap_set_scroll_cols(tilemap_ptr,1);
345
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
346
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
350
static void dec0_pf3_update(void)
352
int offs,lines,height,scrolly,scrollx;
353
struct tilemap *tilemap_ptr;
355
/* Master scroll registers */
356
scrollx = dec0_pf3_control_1[0];
357
scrolly = dec0_pf3_control_1[1];
359
/* Playfield shape */
360
switch (dec0_pf3_control_0[3]&0x3) {
361
case 0: height=1; tilemap_ptr=pf3_tilemap_0; break; /* 4x1, 256 rows */
362
case 1: height=2; tilemap_ptr=pf3_tilemap_1; break; /* 2x2, 512 rows */
363
case 2: height=4; tilemap_ptr=pf3_tilemap_2; break; /* 1x4, 1024 rows */
364
default: height=2; tilemap_ptr=pf3_tilemap_1; break; /* Never happens */
367
/* Column scroll - may be screen-wise rather than tilemap-wise, not confirmed yet */
368
if (dec0_pf3_control_0[0]&0x8 && (dec0_pf3_colscroll[0] || dec0_pf3_colscroll[1])) {
369
switch (dec0_pf3_control_1[2]&0x7) {
370
case 0: lines=2; break;
371
case 1: lines=2; break;
372
case 2: lines=4; break;
373
case 3: lines=8; break;
374
case 4: lines=16; break;
375
case 5: lines=32; break;
376
case 6: lines=64; break;
377
case 7: lines=128; break;
380
if (height==2) lines*=2; else if (height==1) lines*=4;
382
tilemap_set_scroll_cols(tilemap_ptr,lines);
383
tilemap_set_scroll_rows(tilemap_ptr,1);
384
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
386
for (offs = 0;offs < lines;offs++) {
387
tilemap_set_scrolly(tilemap_ptr, offs, scrolly + dec0_pf3_colscroll[offs]);
391
/* Row scroll enable bit */
392
else if (dec0_pf3_control_0[0]&0x4) {
393
/* Rowscroll style */
394
switch (dec0_pf3_control_1[3]&0xf) {
395
case 0: lines=256; break; /* 256 horizontal scroll registers (Robocop) */
396
case 1: lines=128; break; /* 128 horizontal scroll registers (Not used?) */
397
case 2: lines=64; break; /* 64 horizontal scroll registers (Not used?) */
398
case 3: lines=32; break; /* 32 horizontal scroll registers (Heavy Barrel title screen) */
399
case 4: lines=16; break; /* 16 horizontal scroll registers (Bad Dudes, Sly Spy) */
400
case 5: lines=8; break; /* 8 horizontal scroll registers (Not used?) */
401
case 6: lines=4; break; /* 4 horizontal scroll registers (Not used?) */
402
case 7: lines=2; break; /* 2 horizontal scroll registers (Not used?) */
406
tilemap_set_scroll_cols(tilemap_ptr,1);
407
tilemap_set_scroll_rows(tilemap_ptr,lines*height);
408
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
409
for (offs = 0; offs < lines*height; offs++)
410
tilemap_set_scrollx(tilemap_ptr,offs,scrollx + dec0_pf3_rowscroll[offs]);
412
else { /* Scroll registers not enabled */
413
tilemap_set_scroll_rows(tilemap_ptr,1);
414
tilemap_set_scroll_cols(tilemap_ptr,1);
415
tilemap_set_scrollx(tilemap_ptr,0,scrollx);
416
tilemap_set_scrolly(tilemap_ptr,0,scrolly);
218
static void custom_tilemap_draw(mame_bitmap *bitmap,
219
const rectangle *cliprect,
220
tilemap *tilemap_ptr,
221
const UINT16 *rowscroll_ptr,
222
const UINT16 *colscroll_ptr,
223
const UINT16 *control0,
224
const UINT16 *control1,
227
const mame_bitmap *src_bitmap = tilemap_get_pixmap(tilemap_ptr);
229
int column_offset=0, src_x=0, src_y=0;
230
unsigned int scrollx=control1[0];
231
unsigned int scrolly=control1[1];
232
int width_mask = src_bitmap->width - 1;
233
int height_mask = src_bitmap->height - 1;
234
int row_scroll_enabled = (rowscroll_ptr && (control0[0]&0x4));
235
int col_scroll_enabled = (colscroll_ptr && (control0[0]&0x8));
240
/* Column scroll & row scroll may per applied per pixel, there are
241
shift registers for each which control the granularity of the row/col
242
offset (down to per line level for row, and per 8 lines for column).
244
Nb: The row & col selectors are _not_ affected by the shape of the
245
playfield (ie, 256*1024, 512*512 or 1024*256). So even if the tilemap
246
width is only 256, 'src_x' should not wrap at 256 in the code below (to
247
do so would mean the top half of row RAM would never be accessed which
250
Nb2: Real hardware exhibits a strange bug with column scroll on 'mode 2'
251
(256*1024) - the first column has a strange additional offset, but
252
curiously the first 'wrap' (at scroll offset 256) does not have this offset,
253
it is displayed as expected. The bug is confimed to only affect this mode,
254
the other two modes work as expected. This bug is not emulated, as it
255
doesn't affect any games.
259
src_y = (src_bitmap->height - 256) - scrolly;
263
for (y=0; y<=cliprect->max_y; y++) {
264
if (row_scroll_enabled)
265
src_x=scrollx + rowscroll_ptr[(src_y >> (control1[3]&0xf))&(0x1ff>>(control1[3]&0xf))];
270
src_x=(src_bitmap->width - 256) - src_x;
272
for (x=0; x<=cliprect->max_x; x++) {
273
if (col_scroll_enabled)
274
column_offset=colscroll_ptr[((src_x >> 3) >> (control1[2]&0xf))&(0x3f>>(control1[2]&0xf))];
276
p = (((UINT16*)src_bitmap->line[(src_y + column_offset)&height_mask])[src_x&width_mask]);
279
if ((flags&TILEMAP_IGNORE_TRANSPARENCY) || (p&0xf))
281
if( flags & TILEMAP_FRONT )
283
/* Top 8 pens of top 8 palettes only */
285
plot_pixel(bitmap, x, y, Machine->pens[p]);
289
plot_pixel(bitmap, x, y, Machine->pens[p]);
420
297
/******************************************************************************/
422
static void dec0_pf1_draw(struct mame_bitmap *bitmap,const struct rectangle *cliprect,int flags,int pri)
299
static void dec0_pf1_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
424
tilemap_set_enable(pf1_tilemap_0,0);
425
tilemap_set_enable(pf1_tilemap_1,0);
426
tilemap_set_enable(pf1_tilemap_2,0);
428
301
switch (dec0_pf1_control_0[3]&0x3) {
429
302
case 0: /* 4x1 */
430
tilemap_set_enable(pf1_tilemap_0,1);
431
tilemap_draw(bitmap,cliprect,pf1_tilemap_0,flags,pri);
303
custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_0,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
433
305
case 1: /* 2x2 */
435
tilemap_set_enable(pf1_tilemap_1,1);
436
tilemap_draw(bitmap,cliprect,pf1_tilemap_1,flags,pri);
307
custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_1,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
438
309
case 2: /* 1x4 */
439
tilemap_set_enable(pf1_tilemap_2,1);
440
tilemap_draw(bitmap,cliprect,pf1_tilemap_2,flags,pri);
310
custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_2,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
445
static void dec0_pf2_draw(struct mame_bitmap *bitmap,const struct rectangle *cliprect,int flags,int pri)
315
static void dec0_pf2_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
447
tilemap_set_enable(pf2_tilemap_0,0);
448
tilemap_set_enable(pf2_tilemap_1,0);
449
tilemap_set_enable(pf2_tilemap_2,0);
451
317
switch (dec0_pf2_control_0[3]&0x3) {
452
318
case 0: /* 4x1 */
453
tilemap_set_enable(pf2_tilemap_0,1);
454
tilemap_draw(bitmap,cliprect,pf2_tilemap_0,flags,pri);
319
custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_0,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
456
321
case 1: /* 2x2 */
458
tilemap_set_enable(pf2_tilemap_1,1);
459
tilemap_draw(bitmap,cliprect,pf2_tilemap_1,flags,pri);
323
custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_1,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
461
325
case 2: /* 1x4 */
462
tilemap_set_enable(pf2_tilemap_2,1);
463
tilemap_draw(bitmap,cliprect,pf2_tilemap_2,flags,pri);
326
custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_2,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
468
static void dec0_pf3_draw(struct mame_bitmap *bitmap,const struct rectangle *cliprect,int flags,int pri)
331
static void dec0_pf3_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
470
tilemap_set_enable(pf3_tilemap_0,0);
471
tilemap_set_enable(pf3_tilemap_1,0);
472
tilemap_set_enable(pf3_tilemap_2,0);
474
333
switch (dec0_pf3_control_0[3]&0x3) {
475
334
case 0: /* 4x1 */
476
tilemap_set_enable(pf3_tilemap_0,1);
477
tilemap_draw(bitmap,cliprect,pf3_tilemap_0,flags,pri);
335
custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_0,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
479
337
case 1: /* 2x2 */
481
tilemap_set_enable(pf3_tilemap_1,1);
482
tilemap_draw(bitmap,cliprect,pf3_tilemap_1,flags,pri);
339
custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_1,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
484
341
case 2: /* 1x4 */
485
tilemap_set_enable(pf3_tilemap_2,1);
486
tilemap_draw(bitmap,cliprect,pf3_tilemap_2,flags,pri);
342
custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_2,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
491
347
/******************************************************************************/
493
349
VIDEO_UPDATE( hbarrel )
351
flip_screen_set(dec0_pf1_control_0[0]&0x80);
499
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
500
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
353
dec0_pf3_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
501
354
dec0_drawsprites(bitmap,cliprect,0x08,0x08);
502
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK,0);
503
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
355
dec0_pf2_draw(bitmap,cliprect,0);
505
357
/* HB always keeps pf2 on top of pf3, no need explicitly support priority register */
507
359
dec0_drawsprites(bitmap,cliprect,0x08,0x00);
508
dec0_pf1_draw(bitmap,cliprect,0,0);
360
dec0_pf1_draw(bitmap,cliprect,0);
511
363
/******************************************************************************/
513
365
VIDEO_UPDATE( baddudes )
515
/* WARNING: priority inverted wrt all the other games */
367
flip_screen_set(dec0_pf1_control_0[0]&0x80);
520
369
/* WARNING: inverted wrt Midnight Resistance */
521
370
if ((dec0_pri & 0x01) == 0)
523
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
525
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
527
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK,0);
529
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT,1);
372
dec0_pf2_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
373
dec0_pf3_draw(bitmap,cliprect,0);
531
375
if (dec0_pri & 2)
532
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
376
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT); /* Foreground pens only */
534
378
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
536
380
if (dec0_pri & 4)
537
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT,1); /* Foreground pens only */
381
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT); /* Foreground pens only */
541
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
543
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
545
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK,0);
547
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
385
dec0_pf3_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
386
dec0_pf2_draw(bitmap,cliprect,0);
549
388
if (dec0_pri & 2)
550
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT,1);
389
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT); /* Foreground pens only */
552
391
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
554
393
if (dec0_pri & 4)
555
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
394
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT); /* Foreground pens only */
558
dec0_pf1_draw(bitmap,cliprect,0,0);
397
dec0_pf1_draw(bitmap,cliprect,0);
561
400
/******************************************************************************/
606
439
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
608
dec0_pf1_draw(bitmap,cliprect,0,0);
441
dec0_pf1_draw(bitmap,cliprect,0);
611
444
/******************************************************************************/
613
446
VIDEO_UPDATE( birdtry )
615
/* This game doesn't have the extra playfield chip on the game board */
618
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
619
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
448
flip_screen_set(dec0_pf1_control_0[0]&0x80);
450
/* This game doesn't have the extra playfield chip on the game board, but
451
the palette does show through. */
452
fillbitmap(bitmap,Machine->pens[768],cliprect);
453
dec0_pf2_draw(bitmap,cliprect,0);
620
454
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
621
dec0_pf1_draw(bitmap,cliprect,0,0);
455
dec0_pf1_draw(bitmap,cliprect,0);
624
458
/******************************************************************************/
626
460
VIDEO_UPDATE( hippodrm )
462
flip_screen_set(dec0_pf1_control_0[0]&0x80);
632
464
if (dec0_pri & 0x01)
634
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
635
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
636
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK,0);
637
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT,1);
466
dec0_pf2_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
467
dec0_pf3_draw(bitmap,cliprect,0);
641
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
642
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
643
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK,0);
644
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
471
dec0_pf3_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
472
dec0_pf2_draw(bitmap,cliprect,0);
647
475
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
648
dec0_pf1_draw(bitmap,cliprect,0,0);
476
dec0_pf1_draw(bitmap,cliprect,0);
651
479
/******************************************************************************/
653
481
VIDEO_UPDATE( slyspy )
483
flip_screen_set(dec0_pf1_control_0[0]&0x80);
659
dec0_pf3_draw(bitmap,cliprect,TILEMAP_BACK|TILEMAP_IGNORE_TRANSPARENCY,0);
660
dec0_pf3_draw(bitmap,cliprect,TILEMAP_FRONT|TILEMAP_IGNORE_TRANSPARENCY,1);
661
dec0_pf2_draw(bitmap,cliprect,TILEMAP_BACK,0);
662
if (!(dec0_pri&0x80))
663
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
485
dec0_pf3_draw(bitmap,cliprect,TILEMAP_IGNORE_TRANSPARENCY);
486
dec0_pf2_draw(bitmap,cliprect,0);
665
488
dec0_drawsprites(bitmap,cliprect,0x00,0x00);
490
/* Redraw top 8 pens of top 8 palettes over sprites */
667
491
if (dec0_pri&0x80)
668
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT,1);
492
dec0_pf2_draw(bitmap,cliprect,TILEMAP_FRONT);
670
dec0_pf1_draw(bitmap,cliprect,0,0);
494
dec0_pf1_draw(bitmap,cliprect,0);
673
497
/******************************************************************************/
882
700
pf1_tilemap_0 = tilemap_create(get_pf1_tile_info,tile_shape0_8x8_scan,TILEMAP_TRANSPARENT, 8, 8,128, 32);
883
701
pf1_tilemap_1 = tilemap_create(get_pf1_tile_info,tile_shape1_8x8_scan,TILEMAP_TRANSPARENT, 8, 8, 64, 64);
884
702
pf1_tilemap_2 = tilemap_create(get_pf1_tile_info,tile_shape2_8x8_scan,TILEMAP_TRANSPARENT, 8, 8, 32,128);
885
pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan, TILEMAP_SPLIT, 16,16, 64, 16);
886
pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan, TILEMAP_SPLIT, 16,16, 32, 32);
887
pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan, TILEMAP_SPLIT, 16,16, 16, 64);
888
pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan, TILEMAP_SPLIT, 16,16, 64, 16);
889
pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan, TILEMAP_SPLIT, 16,16, 32, 32);
890
pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan, TILEMAP_SPLIT, 16,16, 16, 64);
703
pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan, TILEMAP_TRANSPARENT,16,16, 64, 16);
704
pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan, TILEMAP_TRANSPARENT,16,16, 32, 32);
705
pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan, TILEMAP_TRANSPARENT,16,16, 16, 64);
706
pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan, TILEMAP_TRANSPARENT,16,16, 64, 16);
707
pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan, TILEMAP_TRANSPARENT,16,16, 32, 32);
708
pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan, TILEMAP_TRANSPARENT,16,16, 16, 64);
892
710
if (!pf1_tilemap_0 || !pf1_tilemap_1 || !pf1_tilemap_2
893
711
|| !pf2_tilemap_0 || !pf2_tilemap_1 || !pf2_tilemap_2
894
712
|| !pf3_tilemap_0 || !pf3_tilemap_1 || !pf3_tilemap_2)
897
tilemap_set_transparent_pen(pf1_tilemap_0,0);
898
tilemap_set_transparent_pen(pf1_tilemap_1,0);
899
tilemap_set_transparent_pen(pf1_tilemap_2,0);
900
tilemap_set_transparent_pen(pf2_tilemap_0,0);
901
tilemap_set_transparent_pen(pf2_tilemap_1,0);
902
tilemap_set_transparent_pen(pf2_tilemap_2,0);
903
tilemap_set_transparent_pen(pf3_tilemap_0,0);
904
tilemap_set_transparent_pen(pf3_tilemap_1,0);
905
tilemap_set_transparent_pen(pf3_tilemap_2,0);
906
tilemap_set_transmask(pf2_tilemap_0,0,0xffff,0x0001); /* Transparent pen 1 only */
907
tilemap_set_transmask(pf2_tilemap_1,0,0xffff,0x0001); /* Transparent pen 1 only */
908
tilemap_set_transmask(pf2_tilemap_2,0,0xffff,0x0001); /* Transparent pen 1 only */
909
tilemap_set_transmask(pf3_tilemap_0,0,0xffff,0x0001); /* Transparent pen 1 only */
910
tilemap_set_transmask(pf3_tilemap_1,0,0xffff,0x0001); /* Transparent pen 1 only */
911
tilemap_set_transmask(pf3_tilemap_2,0,0xffff,0x0001); /* Transparent pen 1 only */
912
tilemap_set_transmask(pf2_tilemap_0,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
913
tilemap_set_transmask(pf2_tilemap_1,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
914
tilemap_set_transmask(pf2_tilemap_2,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
915
tilemap_set_transmask(pf3_tilemap_0,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
916
tilemap_set_transmask(pf3_tilemap_1,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
917
tilemap_set_transmask(pf3_tilemap_2,1,0x00ff,0xff01); /* Bottom/Top 8 pen split */
919
715
dec0_spriteram=spriteram16;