Previous 199869 Revisions Next

r31067 Saturday 21st June, 2014 at 21:07:23 UTC by David Haywood
more findings (nw)
[src/mame/video]deco_zoomspr.c

trunk/src/mame/video/deco_zoomspr.c
r31066r31067
278278           0x01ff - Y block offset
279279   */
280280
281   /* Sprite global disable bit */
282   if (dragngun_sprite_ctrl&0x40000000)
283      return;
281   /* Sprite global disable bit - can't be, it's set in lockload calibration menu where the targets are sprites */
282//   if (dragngun_sprite_ctrl&0x40000000)
283//      return;
284284
285285   for (offs = 0;offs < 0x800;offs += 8)
286286   {
r31066r31067
293293      if (!scalex || !scaley) /* Zero pixel size in X or Y - skip block */
294294         continue;
295295
296      if (spritedata[offs+0]&0x400)
297         layout_ram = dragngun_sprite_layout_1_ram + ((spritedata[offs+0]&0x1ff)*4); //CHECK!
296      int layoutram_offset = (spritedata[offs + 0] & 0x1ff) * 4;
297
298      if (spritedata[offs + 0] & 0x400)
299         layout_ram = dragngun_sprite_layout_1_ram;
298300      else
299         layout_ram = dragngun_sprite_layout_0_ram + ((spritedata[offs+0]&0x1ff)*4); //1ff in drag gun code??
300      h = (layout_ram[1]>>0)&0xf;
301      w = (layout_ram[1]>>4)&0xf;
301         layout_ram = dragngun_sprite_layout_0_ram;
302      h = (layout_ram[layoutram_offset + 1]>>0)&0xf;
303      w = (layout_ram[layoutram_offset + 1]>>4)&0xf;
302304      if (!h || !w)
303305         continue;
304306
305307      sx = spritedata[offs+2] & 0x3ff;
306308      sy = spritedata[offs+3] & 0x3ff;
307      bx = layout_ram[2] & 0x1ff;
308      by = layout_ram[3] & 0x1ff;
309      bx = layout_ram[layoutram_offset + 2] & 0x1ff;
310      by = layout_ram[layoutram_offset + 3] & 0x1ff;
309311      if (bx&0x100) bx=1-(bx&0xff);
310312      if (by&0x100) by=1-(by&0xff); /* '1 - ' is strange, but correct for Dragongun 'Winners' screen. */
311313      if (sx >= 512) sx -= 1024;
r31066r31067
333335      fx = spritedata[offs+4]&0x8000;
334336      fy = spritedata[offs+5]&0x8000;
335337
338      int lookupram_offset = layout_ram[layoutram_offset + 0] & 0x1fff;
339
336340//      if (spritedata[offs+0]&0x400)
337      if (layout_ram[0]&0x2000)
338         lookup_ram = dragngun_sprite_lookup_1_ram + (layout_ram[0]&0x1fff);
341      if (layout_ram[layoutram_offset + 0] & 0x2000)
342         lookup_ram = dragngun_sprite_lookup_1_ram;
339343      else
340         lookup_ram = dragngun_sprite_lookup_0_ram + (layout_ram[0]&0x1fff);
344         lookup_ram = dragngun_sprite_lookup_0_ram;
341345
342346      zoomx=scalex * 0x10000 / (w*16);
343347      zoomy=scaley * 0x10000 / (h*16);
r31066r31067
356360         for (x=0; x<w; x++) {
357361            int bank,sprite;
358362
359            sprite = ((*(lookup_ram++))&0x3fff);
363            sprite = lookup_ram[lookupram_offset];
364            sprite &= 0x3fff;
360365
366            lookupram_offset++;
367
361368            /* High bits of the sprite reference into the sprite control bits for banking */
362369            switch (sprite&0x3000) {
363370            default:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team