Previous 199869 Revisions Next

r21258 Thursday 21st February, 2013 at 11:45:57 UTC by David Haywood
remove some old code
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21257r21258
364364#include "rendlay.h"
365365
366366
367
367368class coolridr_state : public driver_device
368369{
369370public:
r21257r21258
912913            }
913914            else if (m_blitterSerialCount == 4)
914915            {
915               m_blit4_unused = data & 0xf8fefefe;
916               m_blit4 = data & 0x07010101;
916               if (!(m_blit0 & 1)) // don't bother for non-sprites
917               {   
918                  m_blit4_unused = data & 0xf8fefefe;
919                  m_blit4 = data & 0x07010101;
917920
918               if (m_blit4_unused) printf("unknown bits in blit word %d -  %08x\n", m_blitterSerialCount, m_blit4_unused);
921                  if (m_blit4_unused) printf("unknown bits in blit word %d -  %08x\n", m_blitterSerialCount, m_blit4_unused);
919922
920               // ---- -111 ---- ---v ---- ---u ---- ---x
921               // 1 = used bits? (unknown purpose.. might be object colour mode)
922               // x = x-flip?
923               // u = probably y-flip? used on a few objects here and there...
924               // v = unknown, not used much, occasional object
923                  // ---- -111 ---- ---v ---- ---u ---- ---x
924                  // 1 = used bits? (unknown purpose.. might be object colour mode)
925                  // x = x-flip?
926                  // u = probably y-flip? used on a few objects here and there...
927                  // v = unknown, not used much, occasional object
928               }
925929            }
926930            else if (m_blitterSerialCount == 5)
927931            {
r21257r21258
10081012
10091013                  }
10101014
1011     
1012                  int random;
1013               
1014                  random = 0;
1015
1016                  // not used much..
1017                  /*
1018                  if (m_blit4 &0x00010000)
1019                  {
1020                     //PRINT_BLIT_STUFF
1021                     m_b1colorNumber = machine().rand() | 0xff000000;
1022                     random = 1;
1023                  }
1024                  else
1025                  {
1026                     
1027                  }
1028                  */
1029
10301015                  //if (m_b1mode)
10311016                  //{
10321017                  //   PRINT_BLIT_STUFF
r21257r21258
12781263                           h = m_hCellCount;
12791264                           continue;
12801265                        }
1266                           
1267                        int lookupnum = h + (v*m_hCellCount);
12811268                       
1282
1283                        // It's unknown if it's row-major or column-major
1284                        // TODO: Study the CRT test and "Cool Riders" logo for clues.
1285                        UINT32 spriteNumber = 0;
1286
1269                        // with this bit enabled the tile numbers gets looked up using 'data' (which would be m_blit11) (eg 03f40000 for startup text)
1270                        // this allows text strings to be written as 8-bit ascii in one area (using command 0x10), and drawn using multi-width sprites
1271                        if (m_indirect_tile_enable)
12871272                        {
1288                           int lookupnum = h + (v*m_hCellCount);
1289                       
1290                           // with this bit enabled the tile numbers gets looked up using 'data' (which would be m_blit11) (eg 03f40000 for startup text)
1291                           // this allows text strings to be written as 8-bit ascii in one area (using command 0x10), and drawn using multi-width sprites
1292                           if (m_indirect_tile_enable)
1293                           {
1294                              const UINT32 memOffset = data;
1295                              lookupnum = space.read_byte(memOffset + h + (v*m_hCellCount));
1296                           }
1273                           const UINT32 memOffset = data;
1274                           lookupnum = space.read_byte(memOffset + h + (v*m_hCellCount));
1275                        }
12971276
12981277
1299                           // these should be 'cell numbers' (tile numbers) which look up RLE data?
1300                           spriteNumber = get_20bit_data( m_b3romoffset, lookupnum);     
1278                        // these should be 'cell numbers' (tile numbers) which look up RLE data?
1279                        UINT32 spriteNumber = get_20bit_data( m_b3romoffset, lookupnum );     
13011280
1302                           int i = 1;// skip first 10 bits for now
1303                           int data_written = 0;
1281                        int i = 1;// skip first 10 bits for now
1282                        int data_written = 0;
13041283
1305                           while (data_written<256)
1306                           {
1284                        while (data_written<256)
1285                        {
13071286
1308                              UINT16 compdata = get_10bit_data( m_b3romoffset, spriteNumber + i);
1287                           UINT16 compdata = get_10bit_data( m_b3romoffset, spriteNumber + i);
13091288                           
1310                              if (((compdata & 0x300) == 0x000) || ((compdata & 0x300) == 0x100))
1311                              {
1312                                 // mm ccrr rrr0
1313                                 int encodelength = (compdata & 0x03e)>>1;
1314                                 int data = (compdata & 0x3c0) >> 6;
1289                           if (((compdata & 0x300) == 0x000) || ((compdata & 0x300) == 0x100))
1290                           {
1291                              // mm ccrr rrr0
1292                              int encodelength = (compdata & 0x03e)>>1;
1293                              int data = (compdata & 0x3c0) >> 6;
13151294
1316                                 while (data_written<256 && encodelength >=0)
1317                                 {
1318                                    m_tempshape[data_written] = data;
1319                                    encodelength--;
1320                                    data_written++;
1321                                 }
1322                              }
1323                              else if ((compdata & 0x300) == 0x200)
1295                              while (data_written<256 && encodelength >=0)
13241296                              {
1325                                 // mm cccc ccrr
1326                                 int encodelength = (compdata & 0x003);
1327                                 int data = (compdata & 0x3fc) >> 6;
1328
1329                                 while (data_written<256 && encodelength >=0)
1330                                 {
1331                                    m_tempshape[data_written] = data;
1332                                    encodelength--;
1333                                    data_written++;
1334                                 }
1335
1297                                 m_tempshape[data_written] = data;
1298                                 encodelength--;
1299                                 data_written++;
13361300                              }
1337                              else
1301                           }
1302                           else if ((compdata & 0x300) == 0x200)
1303                           {
1304                              // mm cccc ccrr
1305                              int encodelength = (compdata & 0x003);
1306                              int data = (compdata & 0x3fc) >> 6;
1307
1308                              while (data_written<256 && encodelength >=0)
13381309                              {
1339                                 // mm cccc cccc
1340                                 m_tempshape[data_written] = data&0xff;
1310                                 m_tempshape[data_written] = data;
1311                                 encodelength--;
13411312                                 data_written++;
13421313                              }
13431314
1344                              i++;
13451315                           }
1316                           else
1317                           {
1318                              // mm cccc cccc
1319                              m_tempshape[data_written] = data&0xff;
1320                              data_written++;
1321                           }
13461322
1323                           i++;
1324                        }
1325
13471326                           
1348                           //
1349                           //if (spriteNumber == 0x00)
1350                           //   continue;
1327
13511328                           
1352                        }
1329                       
13531330
13541331                        int blockwide = ((16*m_hZoom)/0x40)-1;
13551332                        int blockhigh = ((16*m_vZoom)/0x40)-1;
r21257r21258
13571334                        if (blockwide<=0) blockwide = 1;
13581335                        if (blockhigh<=0) blockhigh = 1;
13591336
1360
1361                        UINT32 color = 0xffffffff;
1362                        // HACKS to draw coloured blocks in easy to distinguish colours
1363                        if (m_blitterMode == 0x30 || m_blitterMode == 0x90)
1364                        {
1365                           if (m_b1colorNumber == 0x5b)
1366                              color = 0xffff0000;
1367                           else if (m_b1colorNumber == 0x5d)
1368                              color = 0xff00ff00;
1369                           else if (m_b1colorNumber == 0x5e)
1370                              color = 0xff0000ff;
1371                           else
1372                              color = 0xff00ffff;
1373                        }
1374                        else if (m_blitterMode == 0x40 || m_blitterMode == 0xa0)
1375                        {
1376                           color = 0xff000000 | (((m_b1colorNumber & 0xff) | 0x80)-0x40);
1377                        }
1378                        else if (m_blitterMode == 0x50 || m_blitterMode == 0xb0)
1379                        {
1380                           color = 0xff000000 | ((((m_b1colorNumber & 0xff) | 0x80)-0x40) << 8);
1381                        }
1382                        else if (m_blitterMode == 0x60 || m_blitterMode == 0xc0)
1383                        {
1384                           color = 0xff000000 | ((((m_b1colorNumber & 0xff) | 0x80)-0x40) << 16);
1385                        }
1386                        if (random == 1)
1387                           color = m_b1colorNumber;
1388
13891337                        // DEBUG: Draw 16x16 block
13901338                        UINT32* line;
13911339                        for (int y = 0; y < 16; y++)
r21257r21258
14041352                                 if (line[drawx]==0) line[drawx] = clut[pix+0x4000];
14051353                           }
14061354                        }
1407                        color++;
1355                       
14081356#if 0 // this one does zooming
14091357                        // DEBUG: Draw 16x16 block
14101358                        UINT32* line;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team