Support for 2bpp (screen mode 1)

This commit is contained in:
Angelo Salese 2014-04-02 20:23:58 +00:00
parent 3f5b920514
commit 1a773ac104
2 changed files with 33 additions and 0 deletions

View File

@ -913,6 +913,7 @@ WRITE32_MEMBER(archimedes_state::archimedes_vidc_w)
m_vidc_bpp_mode = ((val & 0x0c) >> 2); m_vidc_bpp_mode = ((val & 0x0c) >> 2);
m_vidc_interlace = ((val & 0x40) >> 6); m_vidc_interlace = ((val & 0x40) >> 6);
m_vidc_pixel_clk = (val & 0x03); m_vidc_pixel_clk = (val & 0x03);
//todo: vga/svga modes sets 0x1000
vidc_dynamic_res_change(); vidc_dynamic_res_change();
} }
else else

View File

@ -77,6 +77,38 @@ UINT32 archimedes_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
} }
} }
break; break;
case 1: //2 bpp
{
for(y=0;y<ysize;y++)
{
for(x=0;x<xsize;x+=4)
{
pen = vram[count];
for(xi=0;xi<4;xi++)
{
res_x = x+xi+xstart;
res_y = (y+ystart)*(m_vidc_interlace+1);
if(m_vidc_interlace)
{
if (cliprect.contains(res_x, res_y) && (res_x) <= xend && (res_y) <= yend)
bitmap.pix32(res_y, res_x) = m_palette->pen((pen>>(xi*2))&0x3);
if (cliprect.contains(res_x, res_y+1) && (res_x) <= xend && (res_y+1) <= yend)
bitmap.pix32(res_y+1, res_x) = m_palette->pen((pen>>(xi*2))&0x3);
}
else
{
if (cliprect.contains(res_x, res_y) && (res_x) <= xend && (res_y) <= yend)
bitmap.pix32(res_y, res_x) = m_palette->pen((pen>>(xi*2))&0x3);
}
}
count++;
}
}
}
break;
case 2: //4 bpp case 2: //4 bpp
{ {
for(y=0;y<ysize;y++) for(y=0;y<ysize;y++)