Previous 199869 Revisions Next

r21181 Tuesday 19th February, 2013 at 14:31:20 UTC by David Haywood
use the 2nd tilemap for screen 2 (nw)
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21180r21181
289289   UINT32 m_colorNumber;
290290   UINT16 m_vCellCount;
291291   UINT16 m_hCellCount;
292   UINT16 m_vPosition;
293   UINT16 m_hPosition;
292   int m_vPosition;
293   int m_hPosition;
294294
295295   required_device<cpu_device> m_maincpu;
296296   required_device<cpu_device> m_subcpu;
r21180r21181
343343   m_test_offs = 0x2000;
344344}
345345
346// might be a page 'map / base' setup somewhere, but it's just used for ingame backgrounds
347/* 0x00000 - 0x1ffff = screen 1 */
348/* 0x20000 - 0x3ffff = screen 2 */
349/* 0x40000 - 0xfffff = ? */
346350UINT32 coolridr_state::screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int which)
347351{
348352   /* planes seems to basically be at 0x8000 and 0x28000... */
349353   gfx_element *gfx = machine().gfx[2];
350354   UINT32 count;
351355   int y,x;
352
356   int color;
353357   count = m_test_offs/4;
358   color = m_color;
354359
360   if (which==1)
361   {
362      count += 0x20000/4;
363      color += 2;
364   }
365
355366   for (y=0;y<64;y++)
356367   {
357368      for (x=0;x<128;x+=2)
r21180r21181
359370         int tile;
360371
361372         tile = (m_h1_vram[count] & 0x0fff0000) >> 16;
362         drawgfx_opaque(bitmap,cliprect,gfx,tile,m_color,0,0,(x+0)*16,y*16);
373         drawgfx_opaque(bitmap,cliprect,gfx,tile,color,0,0,(x+0)*16,y*16);
363374
364375         tile = (m_h1_vram[count] & 0x00000fff) >> 0;
365         drawgfx_opaque(bitmap,cliprect,gfx,tile,m_color,0,0,(x+1)*16,y*16);
376         drawgfx_opaque(bitmap,cliprect,gfx,tile,color,0,0,(x+1)*16,y*16);
366377
367378         count++;
368379      }
r21180r21181
541552            {
542553               m_vPosition = (data & 0xffff0000) >> 16;
543554               m_hPosition = (data & 0x0000ffff);
555
556               if (m_hPosition & 0x8000) m_hPosition -= 0x10000;
557               if (m_vPosition & 0x8000) m_vPosition -= 0x10000;
544558            }
545559            else if (m_blitterSerialCount == 11)
546560            {
r21180r21181
595609            m_blitterSerialCount++;
596610         }
597611         // ??
612         else if (m_blitterMode == 0x10)
613         {
614         }
598615         else
599616         {
600617            logerror("unk blit mode %02x\n", m_blitterMode);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team