Previous 199869 Revisions Next

r30735 Saturday 31st May, 2014 at 08:33:05 UTC by Alex Jackson
Fix lethalen sprite regression; adjust ROM loading so at least some of the mask ROM tests pass (nw)
[src/mame/drivers]lethal.c
[src/mame/video]k053244_k053245.c k053244_k053245.h lethal.c

trunk/src/mame/drivers/lethal.c
r30734r30735
462462      PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "DSW:4")
463463INPUT_PORTS_END
464464
465static const gfx_layout lethal_6bpp =
466{
467   16,16,
468   RGN_FRAC(1,2),
469   6,
470   { RGN_FRAC(1,2)+8,RGN_FRAC(1,2)+0, 8, 0, 24, 16 },
471   { 0, 1, 2, 3, 4, 5, 6, 7,
472   8*32+0, 8*32+1, 8*32+2, 8*32+3, 8*32+4, 8*32+5, 8*32+6, 8*32+7 },
473   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
474      16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
475   128*8
476};
477465
478/* we use this decode instead of the one done by the sprite video start due to it being 6bpp */
479static GFXDECODE_START( lethal )
480   GFXDECODE_ENTRY( "k053244", 0, lethal_6bpp,   0x000/*0x400*/, 256  ) /* sprites tiles */
481GFXDECODE_END
482
483
484466/* sound */
485467
486468static const k054539_interface k054539_config =
r30734r30735
511493
512494static const k056832_interface lethalen_k056832_intf =
513495{
514   "gfx1", 1,
496   "gfx1", 0,
515497   K056832_BPP_8LE,
516498   1, 0,
517499   KONAMI_ROM_DEINTERLEAVE_NONE,
r30734r30735
538520
539521   MCFG_EEPROM_SERIAL_ER5911_8BIT_ADD("eeprom")
540522
541   MCFG_GFXDECODE_ADD("gfxdecode", "palette", lethal)
523   MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
542524
543525   /* video hardware */
544526   MCFG_SCREEN_ADD("screen", RASTER)
r30734r30735
559541
560542   MCFG_DEVICE_ADD("k053244", K053244, 0)
561543   MCFG_GFX_PALETTE("palette")
544   MCFG_K05324X_BPP(6)
562545   MCFG_K05324X_OFFSETS(95, 0)
563546   MCFG_K05324X_CB(lethal_state, sprite_callback)
564547
r30734r30735
596579   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
597580
598581   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
599   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
600   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
582   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
583   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
601584   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
602585
603586   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
621604   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
622605
623606   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
624   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
625   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
607   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
608   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
626609   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
627610
628611   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
646629   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
647630
648631   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
649   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
650   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
632   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
633   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
651634   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
652635
653636   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
671654   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
672655
673656   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
674   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
675   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
657   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
658   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
676659   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
677660
678661   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
696679   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
697680
698681   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
699   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
700   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
682   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
683   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
701684   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
702685
703686   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
721704   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
722705
723706   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
724   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
725   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
707   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
708   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
726709   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
727710
728711   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
r30734r30735
746729   ROM_LOAD32_WORD( "191a09", 0x200000, 0x100000, CRC(e2028531) SHA1(63ccce7855d829763e9e248a6c3eb6ea89ab17ee) )
747730
748731   ROM_REGION( 0x400000, "k053244", ROMREGION_ERASE00 )   /* sprites */
749   ROM_LOAD32_WORD( "191a04", 0x000000, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
750   ROM_LOAD32_WORD( "191a05", 0x000002, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
732   ROM_LOAD32_WORD( "191a05", 0x000000, 0x100000, CRC(f2e3b58b) SHA1(0bbc2fe87a4fd00b5073a884bcfebcf9c2c402ad) )
733   ROM_LOAD32_WORD( "191a04", 0x000002, 0x100000, CRC(5c3eeb2b) SHA1(33ea8b3968b78806334b5a0aab3a2c24e45c604e) )
751734   ROM_LOAD32_WORD( "191a06", 0x200000, 0x100000, CRC(ee11fc08) SHA1(ec6dd684e8261b181d65b8bf1b9e97da5c4468f7) )
752735
753736   ROM_REGION( 0x200000, "k054539", 0 )    /* K054539 samples */
trunk/src/mame/video/lethal.c
r30734r30735
106106   m_k056832->tilemap_draw(screen, bitmap, cliprect, 2, K056832_DRAW_FLAG_MIRROR, 2);
107107   m_k056832->tilemap_draw(screen, bitmap, cliprect, 1, K056832_DRAW_FLAG_MIRROR, 4);
108108
109   m_k053244->sprites_draw_lethal(bitmap, cliprect, screen.priority());
109   m_k053244->sprites_draw(bitmap, cliprect, screen.priority());
110110
111111   // force "A" layer over top of everything
112112   m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, K056832_DRAW_FLAG_MIRROR, 0);
trunk/src/mame/video/k053244_k053245.c
r30734r30735
5454   128*8
5555};
5656
57// Lethal Enforcers has two k053244s hooked up to one k053245 to give 6bpp...
58// for now we just emulate it using an alternate gfx layout
59const gfx_layout k05324x_device::spritelayout_6bpp =
60{
61   16,16,
62   RGN_FRAC(1,2),
63   6,
64   { RGN_FRAC(1,2)+8,RGN_FRAC(1,2)+0, 24, 16, 8, 0 },
65   { 0, 1, 2, 3, 4, 5, 6, 7,
66   8*32+0, 8*32+1, 8*32+2, 8*32+3, 8*32+4, 8*32+5, 8*32+6, 8*32+7 },
67   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
68      16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
69   128*8
70};
5771
72
5873GFXDECODE_MEMBER( k05324x_device::gfxinfo )
5974   GFXDECODE_DEVICE(DEVICE_SELF, 0, spritelayout, 0, 1)
6075GFXDECODE_END
6176
77GFXDECODE_MEMBER( k05324x_device::gfxinfo_6bpp )
78   GFXDECODE_DEVICE(DEVICE_SELF, 0, spritelayout_6bpp, 0, 1)
79GFXDECODE_END
6280
81
6382k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6483   : device_t(mconfig, K053244, "K053244 & 053245 Sprite Generator", tag, owner, clock, "k05324x", __FILE__),
6584   device_gfx_interface(mconfig, *this, gfxinfo),
r30734r30735
7190   m_rombank(0),
7291   m_ramsize(0),
7392   m_z_rejection(0)
74{   
93{
7594}
7695
96void k05324x_device::set_bpp(device_t &device, int bpp)
97{
98   k05324x_device &dev = downcast<k05324x_device &>(device);
99   switch(bpp)
100   {
101      case 4:
102         device_gfx_interface::static_set_info(dev, gfxinfo);
103         break;
104      case 6:
105         device_gfx_interface::static_set_info(dev, gfxinfo_6bpp);
106         break;
107      default:
108         fatalerror("Unsupported bpp\n");
109   }
110}
77111
112
78113//-------------------------------------------------
79114//  device_start - device-specific startup
80115//-------------------------------------------------
r30734r30735
521556#endif
522557#undef NUM_SPRITES
523558}
524
525/* Lethal Enforcers has 2 of these chips hooked up in parallel to give 6bpp gfx.. let's cheat a
526  bit and make emulating it a little less messy by using a custom function instead */
527void k05324x_device::sprites_draw_lethal( bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap )
528{
529#define NUM_SPRITES 128
530   int offs, pri_code, i;
531   int sortedlist[NUM_SPRITES];
532   int flipscreenX, flipscreenY, spriteoffsX, spriteoffsY;
533   UINT8 drawmode_table[256];
534
535   memset(drawmode_table, DRAWMODE_SOURCE, sizeof(drawmode_table));
536   drawmode_table[0] = DRAWMODE_NONE;
537
538   flipscreenX = m_regs[5] & 0x01;
539   flipscreenY = m_regs[5] & 0x02;
540   spriteoffsX = (m_regs[0] << 8) | m_regs[1];
541   spriteoffsY = (m_regs[2] << 8) | m_regs[3];
542
543   for (offs = 0; offs < NUM_SPRITES; offs++)
544      sortedlist[offs] = -1;
545
546   /* prebuild a sorted table */
547   for (i = m_ramsize / 2, offs = 0; offs < i; offs += 8)
548   {
549      pri_code = m_buffer[offs];
550      if (pri_code & 0x8000)
551      {
552         pri_code &= 0x007f;
553
554         if (offs && pri_code == m_z_rejection)
555            continue;
556
557         if (sortedlist[pri_code] == -1)
558            sortedlist[pri_code] = offs;
559      }
560   }
561
562   for (pri_code = NUM_SPRITES - 1; pri_code >= 0; pri_code--)
563   {
564      int ox, oy, color, code, size, w, h, x, y, flipx, flipy, mirrorx, mirrory, shadow, zoomx, zoomy, pri;
565
566      offs = sortedlist[pri_code];
567      if (offs == -1)
568         continue;
569
570      /* the following changes the sprite draw order from
571           0  1  4  5 16 17 20 21
572           2  3  6  7 18 19 22 23
573           8  9 12 13 24 25 28 29
574          10 11 14 15 26 27 30 31
575          32 33 36 37 48 49 52 53
576          34 35 38 39 50 51 54 55
577          40 41 44 45 56 57 60 61
578          42 43 46 47 58 59 62 63
579
580          to
581
582           0  1  2  3  4  5  6  7
583           8  9 10 11 12 13 14 15
584          16 17 18 19 20 21 22 23
585          24 25 26 27 28 29 30 31
586          32 33 34 35 36 37 38 39
587          40 41 42 43 44 45 46 47
588          48 49 50 51 52 53 54 55
589          56 57 58 59 60 61 62 63
590      */
591
592      /* NOTE: from the schematics, it looks like the top 2 bits should be ignored */
593      /* (there are not output pins for them), and probably taken from the "color" */
594      /* field to do bank switching. However this applies only to TMNT2, with its */
595      /* protection mcu creating the sprite table, so we don't know where to fetch */
596      /* the bits from. */
597      code = m_buffer[offs + 1];
598      code = ((code & 0xffe1) + ((code & 0x0010) >> 2) + ((code & 0x0008) << 1)
599               + ((code & 0x0004) >> 1) + ((code & 0x0002) << 2));
600      color = m_buffer[offs + 6] & 0x00ff;
601      pri = 0;
602
603      if (!m_k05324x_cb.isnull())
604         m_k05324x_cb(&code, &color, &pri);
605
606      size = (m_buffer[offs] & 0x0f00) >> 8;
607
608      w = 1 << (size & 0x03);
609      h = 1 << ((size >> 2) & 0x03);
610
611      /* zoom control:
612         0x40 = normal scale
613        <0x40 enlarge (0x20 = double size)
614        >0x40 reduce (0x80 = half size)
615      */
616      zoomy = m_buffer[offs + 4];
617      if (zoomy > 0x2000)
618         continue;
619      if (zoomy)
620         zoomy = (0x400000 + zoomy / 2) / zoomy;
621      else
622         zoomy = 2 * 0x400000;
623      if ((m_buffer[offs] & 0x4000) == 0)
624      {
625         zoomx = m_buffer[offs + 5];
626         if (zoomx > 0x2000)
627            continue;
628         if (zoomx)
629            zoomx = (0x400000 + zoomx / 2) / zoomx;
630         else
631            zoomx = 2 * 0x400000;
632//          else zoomx = zoomy; /* workaround for TMNT2 */
633      }
634      else
635         zoomx = zoomy;
636
637      ox = m_buffer[offs + 3] + spriteoffsX;
638      oy = m_buffer[offs + 2];
639
640      ox += m_dx;
641      oy += m_dy;
642
643      flipx = m_buffer[offs] & 0x1000;
644      flipy = m_buffer[offs] & 0x2000;
645      mirrorx = m_buffer[offs + 6] & 0x0100;
646      if (mirrorx)
647         flipx = 0; // documented and confirmed
648      mirrory = m_buffer[offs + 6] & 0x0200;
649      shadow = m_buffer[offs + 6] & 0x0080;
650
651      if (flipscreenX)
652      {
653         ox = 512 - ox;
654         if (!mirrorx) flipx = !flipx;
655      }
656      if (flipscreenY)
657      {
658         oy = -oy;
659         if (!mirrory) flipy = !flipy;
660      }
661
662      ox = (ox + 0x5d) & 0x3ff;
663      if (ox >= 768) ox -= 1024;
664      oy = (-(oy + spriteoffsY + 0x07)) & 0x3ff;
665      if (oy >= 640) oy -= 1024;
666
667      /* the coordinates given are for the *center* of the sprite */
668      ox -= (zoomx * w) >> 13;
669      oy -= (zoomy * h) >> 13;
670
671      drawmode_table[gfx(0)->granularity() - 1] = shadow ? DRAWMODE_SHADOW : DRAWMODE_SOURCE;
672
673      for (y = 0; y < h; y++)
674      {
675         int sx, sy, zw, zh;
676
677         sy = oy + ((zoomy * y + (1<<11)) >> 12);
678         zh = (oy + ((zoomy * (y+1) + (1<<11)) >> 12)) - sy;
679
680         for (x = 0; x < w; x++)
681         {
682            int c, fx, fy;
683
684            sx = ox + ((zoomx * x + (1 << 11)) >> 12);
685            zw = (ox + ((zoomx * (x+1) + (1 << 11)) >> 12)) - sx;
686            c = code;
687            if (mirrorx)
688            {
689               if ((flipx == 0) ^ (2 * x < w))
690               {
691                  /* mirror left/right */
692                  c += (w - x - 1);
693                  fx = 1;
694               }
695               else
696               {
697                  c += x;
698                  fx = 0;
699               }
700            }
701            else
702            {
703               if (flipx) c += w-1-x;
704               else c += x;
705               fx = flipx;
706            }
707            if (mirrory)
708            {
709               if ((flipy == 0) ^ (2 * y >= h))
710               {
711                  /* mirror top/bottom */
712                  c += 8 * (h - y - 1);
713                  fy = 1;
714               }
715               else
716               {
717                  c += 8 * y;
718                  fy = 0;
719               }
720            }
721            else
722            {
723               if (flipy) c += 8 * (h - 1 - y);
724               else c += 8 * y;
725               fy = flipy;
726            }
727
728            /* the sprite can start at any point in the 8x8 grid, but it must stay */
729            /* in a 64 entries window, wrapping around at the edges. The animation */
730            /* at the end of the saloon level in Sunset Riders breaks otherwise. */
731            c = (c & 0x3f) | (code & ~0x3f);
732
733            if (zoomx == 0x10000 && zoomy == 0x10000)
734            {
735               gfx(0)->prio_transtable(bitmap,cliprect, /* hardcoded to 0 (decoded 6bpp gfx) for le */
736                     c,color,
737                     fx,fy,
738                     sx,sy,
739                     priority_bitmap,pri,
740                     drawmode_table);
741            }
742            else
743            {
744               gfx(0)->prio_zoom_transtable(bitmap,cliprect,  /* hardcoded to 0 (decoded 6bpp gfx) for le */
745                     c,color,
746                     fx,fy,
747                     sx,sy,
748                     (zw << 16) / 16,(zh << 16) / 16,
749                     priority_bitmap,pri,
750                     drawmode_table);
751
752            }
753         }
754      }
755   }
756#if 0
757if (machine().input().code_pressed(KEYCODE_D))
758{
759   FILE *fp;
760   fp=fopen("SPRITE.DMP", "w+b");
761   if (fp)
762   {
763      fwrite(m_buffer, 0x800, 1, fp);
764      popmessage("saved");
765      fclose(fp);
766   }
767}
768#endif
769#undef NUM_SPRITES
770}
771
772READ16_MEMBER( k05324x_device::k053244_reg_word_r )
773{
774   return(m_regs[offset * 2] << 8 | m_regs[offset * 2 + 1]);
775}
trunk/src/mame/video/k053244_k053245.h
r30734r30735
77#define MCFG_K05324X_CB_MEMBER(_name)   void _name(int *code, int *color, int *priority)
88
99
10#define MCFG_K05324X_BPP(_bpp) \
11   k05324x_device::set_bpp(*device, _bpp);
12
1013#define MCFG_K05324X_CB(_class, _method) \
1114   k05324x_device::set_k05324x_callback(*device, k05324x_cb_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
1215
r30734r30735
1720class k05324x_device : public device_t,
1821                     public device_gfx_interface
1922{
23   static const gfx_layout spritelayout;
24   static const gfx_layout spritelayout_6bpp;
25   DECLARE_GFXDECODE_MEMBER(gfxinfo);
26   DECLARE_GFXDECODE_MEMBER(gfxinfo_6bpp);
27
2028public:
2129   k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
2230   ~k05324x_device() {}
2331
24   static const gfx_layout spritelayout;
25   DECLARE_GFXDECODE_MEMBER(gfxinfo);
26
2732   // static configuration
33   static void set_bpp(device_t &device, int bpp);
2834   static void set_k05324x_callback(device_t &device, k05324x_cb_delegate callback) { downcast<k05324x_device &>(device).m_k05324x_cb = callback; }
2935   static void set_offsets(device_t &device, int x_offset, int y_offset)
3036   {
r30734r30735
4551   DECLARE_WRITE16_MEMBER( k053244_word_w );
4652   void bankselect(int bank);    /* used by TMNT2, Asterix and Premier Soccer for ROM testing */
4753   void sprites_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap);
48   void sprites_draw_lethal(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap); /* for lethal enforcers */
4954   void clear_buffer();
5055   void update_buffer();
5156   void set_z_rejection(int zcode); // common to k053244/5
r30734r30735
6974   int      m_rombank;       // 053244
7075   int      m_ramsize;
7176   int      m_z_rejection;
72
73   DECLARE_READ16_MEMBER( k053244_reg_word_r );    // OBJSET0 debug handler
7477};
7578
7679

Previous 199869 Revisions Next


© 1997-2024 The MAME Team