Previous 199869 Revisions Next

r21442 Tuesday 26th February, 2013 at 00:19:52 UTC by Angelo Salese
Fixed RGB for right screen, and attempted to guess a better algo for crashing
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21441r21442
402402      m_work_queue[0] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
403403      m_work_queue[1] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
404404   }
405   
405
406406   // Blitter state
407407   UINT16 m_textBytesToWrite;
408408   INT16  m_blitterSerialCount;
r21441r21442
10291029      interestingly there is a bit to determine the screen number this applies to, even if that should already be implied from m_blitterMode
10301030
10311031      screen 1 clipping(?)
1032                         
1032
10331033      unknown sprite list type 1 - 00000001 003f00f0 027801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10341034      unknown sprite list type 1 - 00000001 003f00f0 03e001f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10351035      unknown sprite list type 1 - 00000001 003f00f0 000700e3 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
r21441r21442
10661066      unknown sprite list type 1 - 00000001 003f00f0 04f803f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10671067      unknown sprite list type 1 - 00000001 003f00f0 020701fb 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10681068      unknown sprite list type 1 - 00000001 003f00f0 02240363 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1069                                                     
1069
10701070     NOTE, we only copy across [1] [2] and [3]   as [0] [1] and [2]
10711071       the 3rd dword seems to be some kind of offset, it's 0x207 on the 2nd screen, and the actual x-clip rects are also higher on that screen?
10721072
10731073      note this is practically the same format as the sysh1_fb_data_w commands..
1074   
1075   
1076   
1074
1075
1076
10771077      between stages (screen 1)
10781078      unknown sprite list type 1 - 00000001 000000a4 000701f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10791079      unknown sprite list type 1 - 00000001 0000017f 000701f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
r21441r21442
13011301      unknown sprite list type 1 - 00000001 0000017f 000701f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
13021302      unknown sprite list type 1 - 00000001 0000017f 000701f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
13031303      unknown sprite list type 1 - 00000001 0000017f 000701f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1304   
1304
13051305   romania
13061306      unknown sprite list type 1 - 00000001 00000001 00000001 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1307   */                                                               
1307   */
13081308
13091309   // how does this really work? there's more to it
13101310   // used in film strip attract mode, and between stages
r21441r21442
13241324      if (clipmaxX<CLIPMINX_FULL) clipmaxX = CLIPMINX_FULL;
13251325      if (clipmaxX>CLIPMAXX_FULL) clipmaxX = CLIPMAXX_FULL;
13261326      if (clipminX>clipmaxX) clipminX = clipmaxX;
1327   
1327
13281328      clipminY = miny -1;
13291329      if (clipminY<CLIPMINY_FULL) clipminY = CLIPMINY_FULL;
13301330      if (clipminY>CLIPMAXY_FULL) clipminY = CLIPMAXY_FULL;
r21441r21442
13321332      if (clipmaxY<CLIPMINY_FULL) clipmaxY = CLIPMINY_FULL;
13331333      if (clipmaxY>CLIPMAXY_FULL) clipmaxY = CLIPMAXY_FULL;
13341334      if (clipminY>clipmaxY) clipminY = clipmaxY;
1335   
13361335
1336
13371337      //b1colorNumber = object->state->machine().rand()&0xfff;
13381338   }
13391339
r21441r21442
17801780   else if (blit0==1)
17811781   {
17821782
1783   
17841783
1784
17851785      if (m_blitterMode&0x80)
17861786      {
17871787         // HACK...
r21441r21442
22262226   }
22272227   else if(m_rgb_ctrl[screen_num].setting == 0x800) /* when you get hit TODO: algo might be different. */
22282228   {
2229      *g &= (0x1f - m_rgb_ctrl[screen_num].gradient);
2230      *b &= (0x1f - m_rgb_ctrl[screen_num].gradient);
2229      *r += m_rgb_ctrl[screen_num].gradient;
2230      *g -= m_rgb_ctrl[screen_num].gradient;
2231      *b -= m_rgb_ctrl[screen_num].gradient;
2232      if(*r > 0x1f) { *r = 0x1f; }
2233      if(*g < 0) { *g = 0; }
2234      if(*b < 0) { *b = 0; }
22312235   }
22322236   else
22332237   {
r21441r21442
22382242void coolridr_state::flush_pal_data( UINT16 offset )
22392243{
22402244   int r,g,b;
2241   int screen_type = (offset & 0x400) >> 10;
2245   int screen_type = (offset & 0x200) >> 9;
22422246
22432247   r = ((m_h1_pal[offset] & 0x7c00) >> 10);
22442248   g = ((m_h1_pal[offset] & 0x03e0) >> 5);
r21441r21442
23422346         case 0x44: /* screen 2 / */
23432347            m_rgb_ctrl[(cmd & 4) >> 2].setting = m_framebuffer_vram[(0+dma_index)/4] & 0xffffe0;
23442348            m_rgb_ctrl[(cmd & 4) >> 2].gradient = m_framebuffer_vram[(0+dma_index)/4] & 0x1f;
2345            for(int i=((cmd & 4) * 0x100);i<((cmd & 4) * 0x100)+0x400;i++)
2349
2350            /* 0x000-0x1ff - 0x400-0x5ff screen 1 */
2351            /* 0x200-0x3ff - 0x600-0x7ff screen 2 */
2352            for(int i=((cmd & 4) << 7);i<((cmd & 4) << 7)+0x200;i++)
2353            {
23462354               flush_pal_data( i );
2355               flush_pal_data( i + 0x400 );
2356            }
2357
23472358            dma_index+=4;
23482359            break;
23492360         default:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team