Previous 199869 Revisions Next

r21468 Wednesday 27th February, 2013 at 16:04:59 UTC by David Haywood
blending prep
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21467r21468
416416   UINT16 m_textOffset;
417417   UINT32 m_blitterClearMode;
418418   INT16 m_blitterClearCount;
419   pen_t m_tilepals[0x10000];
419420
420421   // store the blit params here
421422   UINT32 m_spriteblit[12];
r21467r21468
446447   required_ioport m_io_an7;
447448   required_ioport m_io_config;
448449
449   bitmap_rgb32 m_temp_bitmap_sprites[4];
450   bitmap_rgb32 m_temp_bitmap_sprites2[4];
450   bitmap_ind16 m_temp_bitmap_sprites;
451   bitmap_ind16 m_temp_bitmap_sprites2;
451452   bitmap_ind16 m_zbuffer_bitmap;
452453   bitmap_ind16 m_zbuffer_bitmap2;
453454
454   bitmap_rgb32 m_screen1_bitmap;
455   bitmap_rgb32 m_screen2_bitmap;
455   bitmap_ind16 m_bg_bitmap;
456   bitmap_ind16 m_bg_bitmap2;
457
458
459   bitmap_ind16 m_screen1_bitmap;
460   bitmap_ind16 m_screen2_bitmap;
456461   int m_scsp_last_line;
457462   UINT8 an_mux_data;
458463   UINT8 sound_data, sound_fifo;
r21467r21468
493498   virtual void machine_start();
494499   virtual void machine_reset();
495500   virtual void video_start();
496   UINT32 screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int which);
497   UINT32 screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
498   UINT32 screen_update_coolridr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
501
502   void coolriders_drawgfx_opaque(bitmap_ind16 &dest, const rectangle &cliprect, gfx_element *gfx,
503      UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
504
505   void coolriders_drawgfx_transpen(bitmap_ind16 &dest, const rectangle &cliprect, gfx_element *gfx,
506      UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
507      UINT32 transpen);
508
509   void draw_bg_coolridr(bitmap_ind16 &bitmap, const rectangle &cliprect, int which);
510   UINT32 screen_update_coolridr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which);
511   UINT32 screen_update_coolridr1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
512   UINT32 screen_update_coolridr2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
499513   void blit_current_sprite(address_space &space);
500514   INTERRUPT_GEN_MEMBER(system_h1);
501515   TIMER_DEVICE_CALLBACK_MEMBER(system_h1_main);
r21467r21468
598612      if (machine().gfx[m_gfx_index] == 0)
599613         break;
600614
601   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites[0]);
602   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2[0]);
615   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites);
616   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2);
603617   machine().primary_screen->register_screen_bitmap(m_zbuffer_bitmap);
604618   machine().primary_screen->register_screen_bitmap(m_zbuffer_bitmap2);
619   machine().primary_screen->register_screen_bitmap(m_bg_bitmap);
620   machine().primary_screen->register_screen_bitmap(m_bg_bitmap2);
605621
606622
607623
608
609   // testing, not right
610   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites[1]);
611   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2[1]);
612   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites[2]);
613   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2[2]);
614   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites[3]);
615   machine().primary_screen->register_screen_bitmap(m_temp_bitmap_sprites2[3]);
616
617624   machine().primary_screen->register_screen_bitmap(m_screen1_bitmap);
618625   machine().primary_screen->register_screen_bitmap(m_screen2_bitmap);
619626
r21467r21468
635642   (everything else is unknown at current time)
636643*/
637644
638UINT32 coolridr_state::screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int which)
645
646
647
648
649#define COOLRIDERS_DRAWGFX_CORE(PIXEL_TYPE, COOL_PIXEL_OP)                               \
650do {                                                                                    \
651   do {                                                                                \
652      const UINT8 *srcdata;                                                           \
653      INT32 destendx, destendy;                                                       \
654      INT32 srcx, srcy;                                                               \
655      INT32 curx, cury;                                                               \
656      INT32 dy;                                                                       \
657                                                                  \
658      assert(dest.valid());                                                           \
659      assert(gfx != NULL);                                                            \
660      assert(dest.cliprect().contains(cliprect));                                     \
661      assert(code < gfx->elements());                                             \
662                                                                  \
663      /* ignore empty/invalid cliprects */                                            \
664      if (cliprect.empty())                                                           \
665         break;                                                                      \
666                                                                  \
667      /* compute final pixel in X and exit if we are entirely clipped */              \
668      destendx = destx + gfx->width() - 1;                                                \
669      if (destx > cliprect.max_x || destendx < cliprect.min_x)                        \
670         break;                                                                      \
671                                                                  \
672      /* apply left clip */                                                           \
673      srcx = 0;                                                                       \
674      if (destx < cliprect.min_x)                                                     \
675      {                                                                               \
676         srcx = cliprect.min_x - destx;                                              \
677         destx = cliprect.min_x;                                                     \
678      }                                                                               \
679                                                                  \
680      /* apply right clip */                                                          \
681      if (destendx > cliprect.max_x)                                                  \
682         destendx = cliprect.max_x;                                                  \
683                                                                  \
684      /* compute final pixel in Y and exit if we are entirely clipped */              \
685      destendy = desty + gfx->height() - 1;                                               \
686      if (desty > cliprect.max_y || destendy < cliprect.min_y)                        \
687         break;                                                                      \
688                                                                  \
689      /* apply top clip */                                                            \
690      srcy = 0;                                                                       \
691      if (desty < cliprect.min_y)                                                     \
692      {                                                                               \
693         srcy = cliprect.min_y - desty;                                              \
694         desty = cliprect.min_y;                                                     \
695      }                                                                               \
696                                                                  \
697      /* apply bottom clip */                                                         \
698      if (destendy > cliprect.max_y)                                                  \
699         destendy = cliprect.max_y;                                                  \
700                                                                  \
701      /* apply X flipping */                                                          \
702      if (flipx)                                                                      \
703         srcx = gfx->width() - 1 - srcx;                                             \
704                                                                  \
705      /* apply Y flipping */                                                          \
706      dy = gfx->rowbytes();                                                           \
707      if (flipy)                                                                      \
708      {                                                                               \
709         srcy = gfx->height() - 1 - srcy;                                                \
710         dy = -dy;                                                                   \
711      }                                                                               \
712                                                                  \
713      /* fetch the source data */                                                     \
714      srcdata = gfx->get_data(code);                                      \
715                                                                  \
716      /* compute how many blocks of 4 pixels we have */                           \
717      UINT32 numblocks = (destendx + 1 - destx) / 4;                              \
718      UINT32 leftovers = (destendx + 1 - destx) - 4 * numblocks;                  \
719                                                               \
720      /* adjust srcdata to point to the first source pixel of the row */          \
721      srcdata += srcy * gfx->rowbytes() + srcx;                                   \
722                                                               \
723      /* non-flipped 8bpp case */                                                 \
724      if (!flipx)                                                                 \
725      {                                                                           \
726         /* iterate over pixels in Y */                                          \
727         for (cury = desty; cury <= destendy; cury++)                            \
728         {                                                                       \
729            PIXEL_TYPE *destptr = &dest.pixt<PIXEL_TYPE>(cury, destx);          \
730            const UINT8 *srcptr = srcdata;                                      \
731            srcdata += dy;                                                      \
732                                                               \
733            /* iterate over unrolled blocks of 4 */                             \
734            for (curx = 0; curx < numblocks; curx++)                            \
735            {                                                                   \
736               COOL_PIXEL_OP(destptr[0], srcptr[0]);                     \
737               COOL_PIXEL_OP(destptr[1], srcptr[1]);                     \
738               COOL_PIXEL_OP(destptr[2], srcptr[2]);                     \
739               COOL_PIXEL_OP(destptr[3], srcptr[3]);                     \
740                                                               \
741               srcptr += 4;                                                    \
742               destptr += 4;                                                   \
743            }                                                                   \
744                                                               \
745            /* iterate over leftover pixels */                                  \
746            for (curx = 0; curx < leftovers; curx++)                            \
747            {                                                                   \
748               COOL_PIXEL_OP(destptr[0], srcptr[0]);                     \
749               srcptr++;                                                       \
750               destptr++;                                                      \
751            }                                                                   \
752         }                                                                       \
753      }                                                                           \
754                                                               \
755      /* flipped 8bpp case */                                                     \
756      else                                                                        \
757      {                                                                           \
758         /* iterate over pixels in Y */                                          \
759         for (cury = desty; cury <= destendy; cury++)                            \
760         {                                                                       \
761            PIXEL_TYPE *destptr = &dest.pixt<PIXEL_TYPE>(cury, destx);          \
762            const UINT8 *srcptr = srcdata;                                      \
763            srcdata += dy;                                                      \
764                                                               \
765            /* iterate over unrolled blocks of 4 */                             \
766            for (curx = 0; curx < numblocks; curx++)                            \
767            {                                                                   \
768               COOL_PIXEL_OP(destptr[0], srcptr[ 0]);                    \
769               COOL_PIXEL_OP(destptr[1], srcptr[-1]);                    \
770               COOL_PIXEL_OP(destptr[2], srcptr[-2]);                    \
771               COOL_PIXEL_OP(destptr[3], srcptr[-3]);                    \
772                                                               \
773               srcptr -= 4;                                                    \
774               destptr += 4;                                                   \
775            }                                                                   \
776                                                               \
777            /* iterate over leftover pixels */                                  \
778            for (curx = 0; curx < leftovers; curx++)                            \
779            {                                                                   \
780               COOL_PIXEL_OP(destptr[0], srcptr[0]);                     \
781               srcptr--;                                                       \
782               destptr++;                                                      \
783            }                                                                   \
784         }                                                                       \
785      }                                                                           \
786   } while (0);                                                                        \
787} while (0)
788
789
790#define COOLRIDERS_PIXEL_OP_REMAP_OPAQUE(DEST, SOURCE)                               \
791do                                                                                  \
792{                                                                                   \
793   (DEST) = paldata[SOURCE];                                                       \
794}                                                                                   \
795while (0)
796
797#define COOLRIDERS_PIXEL_OP_REMAP_TRANSPEN(DEST, SOURCE)                             \
798do                                                                                  \
799{                                                                                   \
800   UINT32 srcdata = (SOURCE);                                                      \
801   if (srcdata != transpen)                                                        \
802      (DEST) = paldata[srcdata];                                                  \
803}                                                                                   \
804while (0)
805
806
807
808void coolridr_state::coolriders_drawgfx_opaque(bitmap_ind16 &dest, const rectangle &cliprect, gfx_element *gfx,
809      UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty)
639810{
811   const pen_t *paldata = &m_tilepals[gfx->colorbase() + gfx->granularity() * (color % gfx->colors())];
812   code %= gfx->elements();
813   COOLRIDERS_DRAWGFX_CORE(UINT16, COOLRIDERS_PIXEL_OP_REMAP_OPAQUE);
814}
815
816void coolridr_state::coolriders_drawgfx_transpen(bitmap_ind16 &dest, const rectangle &cliprect, gfx_element *gfx,
817      UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
818      UINT32 transpen)
819{
820   // special case invalid pens to opaque
821   if (transpen > 0xff)
822      return coolriders_drawgfx_opaque(dest, cliprect, gfx, code, color, flipx, flipy, destx, desty);
823
824   // use pen usage to optimize
825   code %= gfx->elements();
826   if (gfx->has_pen_usage())
827   {
828      // fully transparent; do nothing
829      UINT32 usage = gfx->pen_usage(code);
830      if ((usage & ~(1 << transpen)) == 0)
831         return;
832
833      // fully opaque; draw as such
834      if ((usage & (1 << transpen)) == 0)
835         return coolriders_drawgfx_opaque(dest, cliprect, gfx, code, color, flipx, flipy, destx, desty);
836   }
837
838   // render
839    const pen_t *paldata = &m_tilepals[gfx->colorbase() + gfx->granularity() * (color % gfx->colors())] ;
840   COOLRIDERS_DRAWGFX_CORE(UINT16, COOLRIDERS_PIXEL_OP_REMAP_TRANSPEN);
841}
842
843void coolridr_state::draw_bg_coolridr(bitmap_ind16 &bitmap, const rectangle &cliprect, int which)
844{
845
640846   int bg_r,bg_g,bg_b;
641847
848
849
850
851
642852   if(m_pen_fill[which])
643853   {
644      /* logic here is a bit of a guess. */
854#if 0
855      /* logic here is a bit of a guess. - should probably be 555 like everything else.. or we are going to have to have a rgb32 bitmap? */
645856      bg_r = (((m_pen_fill[which] >> 16) & 0x7f) << 1) | (((m_pen_fill[which] >> 16) & 0x80) >> 7);
646857      bg_g = (((m_pen_fill[which] >> 8) & 0x7f) << 1) | (((m_pen_fill[which] >> 8) & 0x80) >> 7);
647858      bg_b = (((m_pen_fill[which] >> 0) & 0x7f) << 1) | (((m_pen_fill[which] >> 0) & 0x80) >> 7);
648859      bitmap.fill(MAKE_ARGB(0xff,bg_r,bg_g,bg_b),cliprect);
860#endif
861
862      bg_r = (((m_pen_fill[which] >> 16) & 0x78) >> 2) | (((m_pen_fill[which] >> 16) & 0x80) >> 7);
863      bg_g = (((m_pen_fill[which] >> 8) & 0x78) >> 2) | (((m_pen_fill[which] >> 8) & 0x80) >> 7);
864      bg_b = (((m_pen_fill[which] >> 0) & 0x78) >> 2) | (((m_pen_fill[which] >> 0) & 0x80) >> 7);
865      bitmap.fill( (bg_r<<10) | (bg_g << 5) | bg_b  ,cliprect);
866
649867   }
650868   else
651869   {
r21467r21468
670888      bg_b = (VREG(0x3c) >> 0) & 0x1f;
671889      apply_rgb_control(which,&bg_r,&bg_g,&bg_b);
672890
673      bitmap.fill(MAKE_ARGB(0xff,pal5bit(bg_r),pal5bit(bg_g),pal5bit(bg_b)),cliprect);
891      bitmap.fill(VREG(0x3c),cliprect);
674892
675
893     
676894      UINT16 basey = scrolly>>4;
677895      for (int y=0;y<25;y++)
678896       {
r21467r21468
684902            /* bike select enables bits 15-12, pretty sure one of these is tile bank (because there's a solid pen on 0x3ff / 0x7ff). */
685903            tile = (vram_data & 0x7ff) | ((vram_data & 0x8000) >> 4);
686904
687            drawgfx_transpen(bitmap,cliprect,gfx,tile,color,0,0,(x*16)-(scrollx&0xf),(y*16)-(scrolly&0xf),transpen_setting ? -1 : 0);
905            coolriders_drawgfx_transpen(bitmap,cliprect,gfx,tile,color,0,0,(x*16)-(scrollx&0xf),(y*16)-(scrolly&0xf),transpen_setting ? -1 : 0);
688906
689907            basex++;
690908         }
r21467r21468
692910      }
693911   }
694912
913
914}
915
916UINT32 coolridr_state::screen_update_coolridr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which)
917{
918
695919   if (which==0)
696920   {
697921      // will probably need a custom function
698      copybitmap_trans(bitmap, m_screen1_bitmap, 0, 0, 0, 0, cliprect, 0xff000000);
922      copybitmap_trans(bitmap, m_screen1_bitmap, 0, 0, 0, 0, cliprect, 0x8000);
699923   }
700924   else
701925   {
702926      // will probably need a custom function
703      copybitmap_trans(bitmap, m_screen2_bitmap, 0, 0, 0, 0, cliprect, 0xff000000);
927      copybitmap_trans(bitmap, m_screen2_bitmap, 0, 0, 0, 0, cliprect, 0x8000);
704928   }
705929
706930   return 0;
707931}
708932
709UINT32 coolridr_state::screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
933UINT32 coolridr_state::screen_update_coolridr1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
710934{
711935#if 0
712936   if (screen.machine().input().code_pressed_once(KEYCODE_W))
r21467r21468
724948   return screen_update_coolridr(screen,bitmap,cliprect,0);
725949}
726950
727UINT32 coolridr_state::screen_update_coolridr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
951UINT32 coolridr_state::screen_update_coolridr2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
728952{
729953   return screen_update_coolridr(screen,bitmap,cliprect,1);
730954}
r21467r21468
739963   UINT8* indirect_tiles;
740964   UINT32* indirect_zoom;
741965   UINT32 spriteblit[12];
742   bitmap_rgb32* drawbitmap;
966   bitmap_ind16* drawbitmap;
743967   bitmap_ind16* zbitmap;
744968   UINT16 zpri;
745969   UINT8 blittype;
r21467r21468
9551179      const int pixelOffsetnextX = ((hPositionTable) + ((h+1)* 16 * hZoomHere)) / 0x40; \
9561180      if (drawy>clipmaxY) { break; }; \
9571181      if (drawy<clipminY) { drawy++; continue; }; \
958      line = &drawbitmap->pix32(drawy); \
1182      line = &drawbitmap->pix16(drawy); \
9591183      zline = &object->zbitmap->pix16(drawy); \
9601184      int blockwide = pixelOffsetnextX-pixelOffsetX; \
9611185      if (pixelOffsetX+blockwide <clipminX) { drawy++; continue; } \
r21467r21468
9941218      int realy = ((y*incy)>>21); \
9951219      const int drawy = pixelOffsetY+y; \
9961220      if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \
997      line = &drawbitmap->pix32(drawy); \
1221      line = &drawbitmap->pix16(drawy); \
9981222      zline = &object->zbitmap->pix16(drawy); \
9991223      int drawx = pixelOffsetX; \
10001224      for (int x = 0; x < blockwide; x++) \
r21467r21468
10131237   { \
10141238      const int drawy = pixelOffsetY+realy; \
10151239      if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \
1016      line = &drawbitmap->pix32(drawy); \
1240      line = &drawbitmap->pix16(drawy); \
10171241      zline = &object->zbitmap->pix16(drawy); \
10181242      int drawx = pixelOffsetX; \
10191243      for (int realx = 0; realx < 16; realx++) \
r21467r21468
10451269      if (object->zpri < zline[drawx]) \
10461270      { \
10471271         { \
1048            line[drawx] = (pal5bit((pix >> 10) & 0x1f)<<16)|(pal5bit((pix >> 5) & 0x1f)<<8)|pal5bit((pix >> 0) & 0x1f); \
1272            line[drawx] = pix&0x7fff; \
10491273            zline[drawx] = object->zpri; \
10501274         } \
10511275      } \
r21467r21468
10741298void *coolridr_state::draw_object_threaded(void *param, int threadid)
10751299{
10761300   cool_render_object *object = reinterpret_cast<cool_render_object *>(param);
1077   bitmap_rgb32* drawbitmap = object->drawbitmap;
1301   bitmap_ind16* drawbitmap = object->drawbitmap;
10781302
10791303   /************* object->spriteblit[3] *************/
10801304
r21467r21468
17661990         UINT32 incy = 0x8000000 / vZoom;
17671991
17681992         // DEBUG: Draw 16x16 block
1769         UINT32* line;
1993         UINT16* line;
17701994         UINT16* zline;
17711995
17721996
r21467r21468
20792303   // which queue, which bitmap
20802304   if (m_blitterMode == 0x30 || m_blitterMode == 0x40 || m_blitterMode == 0x4f || m_blitterMode == 0x50 || m_blitterMode == 0x60)
20812305   {
2082      testobject->drawbitmap = &m_temp_bitmap_sprites[0];
2306      testobject->drawbitmap = &m_temp_bitmap_sprites;
20832307      testobject->zbitmap = &m_zbuffer_bitmap;
20842308      // pass these from the type 1 writes
20852309      testobject->clipvals[0] = m_clipvals[0][0];
r21467r21468
20902314   }
20912315   else // 0x90, 0xa0, 0xaf, 0xb0, 0xc0
20922316   {
2093      testobject->drawbitmap = &m_temp_bitmap_sprites2[0];
2317      testobject->drawbitmap = &m_temp_bitmap_sprites2;
20942318      testobject->zbitmap = &m_zbuffer_bitmap2;
20952319      // pass these from the type 1 writes
20962320      testobject->clipvals[0] = m_clipvals[1][0];
r21467r21468
23162540      {
23172541         const rectangle& visarea = machine().primary_screen->visible_area();
23182542
2319         // test code
2320         int i = 0;
2321
23222543         if(m_blitterClearMode == 0x8c200000)
23232544         {
2545            // wait for our sprite rendering to finish
23242546            osd_work_queue_wait(m_work_queue[0], osd_ticks_per_second() * 100);
2325            copybitmap(m_screen1_bitmap, m_temp_bitmap_sprites[i], 0, 0, 0, 0, visarea);
2326            m_temp_bitmap_sprites[i].fill(0xff000000, visarea);
2547           
2548            // copy our old buffer to the actual screen
2549            copybitmap(m_screen1_bitmap, m_temp_bitmap_sprites, 0, 0, 0, 0, visarea);
2550           
2551            //m_temp_bitmap_sprites.fill(0xff000000, visarea);
2552            // render the tilemap to the backbuffer, ready for having sprites drawn on it
2553            draw_bg_coolridr(m_temp_bitmap_sprites, visarea, 0);
2554            // wipe the z-buffer ready for the sprites     
23272555            m_zbuffer_bitmap.fill(0xffff, visarea);
23282556            // almost certainly wrong
23292557            m_clipvals[0][0] = 0;
r21467r21468
23332561         }
23342562         else if(m_blitterClearMode == 0x8c800000)
23352563         {
2564            // wait for our sprite rendering to finish
23362565            osd_work_queue_wait(m_work_queue[1], osd_ticks_per_second() * 100);
2337            copybitmap(m_screen2_bitmap, m_temp_bitmap_sprites2[i], 0, 0, 0, 0, visarea);
2338            m_temp_bitmap_sprites2[i].fill(0xff000000, visarea);
2566
2567            // copy our old buffer to the actual screen
2568            copybitmap(m_screen2_bitmap, m_temp_bitmap_sprites2, 0, 0, 0, 0, visarea);
2569            //m_temp_bitmap_sprites2.fill(0xff000000, visarea);
2570            // render the tilemap to the backbuffer, ready for having sprites drawn on it
2571            draw_bg_coolridr(m_temp_bitmap_sprites2, visarea, 1);
2572            // wipe the z-buffer ready for the sprites           
23392573            m_zbuffer_bitmap2.fill(0xffff, visarea);
23402574            // almost certainly wrong
23412575            m_clipvals[1][0] = 0;
r21467r21468
24442678   b = ((m_h1_pal[offset] & 0x001f) >> 0);
24452679   apply_rgb_control(screen_type,&r,&g,&b);
24462680
2447   palette_set_color_rgb(machine(),offset,pal5bit(r),pal5bit(g),pal5bit(b));
2681//   palette_set_color_rgb(machine(),offset,pal5bit(r),pal5bit(g),pal5bit(b));
2682   m_tilepals[offset&0xffff] = (r<<10) | (g<<5) | b;
24482683}
24492684
24502685void coolridr_state::sysh1_dma_transfer( address_space &space, UINT16 dma_index )
r21467r21468
33723607   MCFG_SCREEN_UPDATE_DRIVER(coolridr_state, screen_update_coolridr2)
33733608
33743609   MCFG_PALETTE_LENGTH(0x10000)
3610   MCFG_PALETTE_INIT( RRRRR_GGGGG_BBBBB )
3611
33753612   MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
33763613
33773614   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")

Previous 199869 Revisions Next


© 1997-2024 The MAME Team