Previous 199869 Revisions Next

r21357 Saturday 23rd February, 2013 at 05:38:01 UTC by Angelo Salese
Fixed text colors in Cool Riders. Yay, a game that more or less uses PROM mechanism in 1994 ...
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21356r21357
644644      int realx = ((x*incx)>>21); \
645645
646646
647
647/* the two tables that the patent claims are located at:
648   0x1ec800
649   0x1f0000
650   0x3ec800
651   0x3f0000
652of each rom ... ROM 1 + 2 gives the full palette data for each pixel, in even/odd order.
653TODO: fix anything that isn't text.
654*/
648655#define DRAW_PIX \
649656   if (pix) \
650657   { \
651658      { \
652         if (!line[drawx]) line[drawx] = clut[pix+0x4000]; \
659         if (!line[drawx]) \
660         { \
661            int r,g,b; \
662            int dot; \
663            int color_offs; \
664            color_offs = (b1colorNumber & 0x3ff)*0x40; \
665            color_offs+= pix & 0x3e; \
666            color_offs+= (pix & 0x01)*0x400000; \
667            color_offs+= 0x1ec800; \
668            dot = (m_compressedgfx[color_offs+0]<<8) | m_compressedgfx[color_offs+1]; \
669            r = pal5bit((dot >> 10) & 0x1f); \
670            g = pal5bit((dot >> 5) & 0x1f); \
671            b = pal5bit((dot >> 0) & 0x1f); \
672            line[drawx] = r<<16 | g<<8 | b; \
673         } \
653674      } \
654675   } \
655676
656677/* This is a RLE-based sprite blitter (US Patent #6,141,122), very unusual from Sega... */
657678void coolridr_state::blit_current_sprite(address_space &space)
658679{
659   const pen_t *clut = &machine().pens[0];
680//   const pen_t *clut = &machine().pens[0];
660681
661682   // Serialized 32-bit words in order of appearance:
662683   //  0: 00000000 - unknown, 0x00000000 or 0x00000001, 0 seems to be regular sprite, 1 seems to change meaning of below, possible clip area?
r21356r21357
766787   // 000u0ccc  - c = colour? u = 0/1
767788   UINT32 blit1_unused = m_spriteblit[1] & 0xfffef800;
768789   UINT32 b1mode = (m_spriteblit[1] & 0x00010000)>>16;
769   //UINT32 b1colorNumber = (m_spriteblit[1] & 0x000007ff);    // Probably more bits
790   UINT32 b1colorNumber = (m_spriteblit[1] & 0x000007ff);    // Probably more bits
770791
771792   if (blit1_unused!=0) printf("blit1 unknown bits set %08x\n", m_spriteblit[1]);
772793
r21356r21357
775796   // seems to be more complex than just transparency
776797   UINT32 blit2_unused = m_spriteblit[2]&0xff80f800;
777798   UINT32 b2tpen = (m_spriteblit[2] & 0x007f0000)>>16;
778   //UINT32 b2colorNumber = (m_spriteblit[2] & 0x000007ff);
799//   UINT32 b2colorNumber = (m_spriteblit[2] & 0x000001ff);
779800
801//   if(b1colorNumber > 0x60 || b2colorNumber)
802//      printf("%08x %08x\n",b1colorNumber,b2colorNumber);
803
804
780805   if (blit2_unused!=0) printf("blit1 unknown bits set %08x\n", m_spriteblit[2]);
781806   if (b1mode)
782807   {
r21356r21357
796821   UINT32 blit3_unused = m_spriteblit[3] & 0xffe00000;
797822   UINT32 b3romoffset = (m_spriteblit[3] & 0x001fffff)*16;
798823
799
800824   if (blit3_unused) printf("unknown bits in blit word %d -  %08x\n", 3, blit3_unused);
801825
802826
r21356r21357
867891
868892   UINT32 textlookup =  m_spriteblit[11];
869893
894
895
870896   /* DRAW */
871897   UINT16 used_hCellCount = hCellCount;
872898   UINT16 used_vCellCount = vCellCount;
r21356r21357
10011027         }
10021028
10031029      }
1030//   printf("%08x %08x %08x %04x %04x\n",textlookup,m_spriteblit[3],b3romoffset,b1colorNumber,b2colorNumber);
10041031
10051032
10061033      for (int h = 0; h < used_hCellCount; h++)
r21356r21357
22902317//  machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
22912318   m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
22922319
2320
2321
22932322//   memcpy(m_soundram, memregion("soundcpu")->base()+0x80000, 0x80000);
22942323//  m_soundcpu->reset();
22952324
r21356r21357
24402469   ROM_LOAD16_WORD_SWAP( "mpr-17646.ic7", 0x2000000, 0x0400000, CRC(b77eb2ad) SHA1(b832c0f1798aca39adba840d56ae96a75346670a) ) // 0490
24412470   ROM_LOAD16_WORD_SWAP( "mpr-17645.ic6", 0x2400000, 0x0400000, CRC(56968d07) SHA1(e88c3d66ea05affb4681a25d155f097bd1b5a84b) ) // 0049
24422471
2443
24442472   ROM_REGION( 0x80000, "scsp1", 0 )   /* first SCSP's RAM */
24452473   ROM_FILL( 0x000000, 0x80000, 0 )
24462474

Previous 199869 Revisions Next


© 1997-2024 The MAME Team