mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
Support for 2bpp (screen mode 1)
This commit is contained in:
parent
3f5b920514
commit
1a773ac104
@ -913,6 +913,7 @@ WRITE32_MEMBER(archimedes_state::archimedes_vidc_w)
|
||||
m_vidc_bpp_mode = ((val & 0x0c) >> 2);
|
||||
m_vidc_interlace = ((val & 0x40) >> 6);
|
||||
m_vidc_pixel_clk = (val & 0x03);
|
||||
//todo: vga/svga modes sets 0x1000
|
||||
vidc_dynamic_res_change();
|
||||
}
|
||||
else
|
||||
|
@ -77,6 +77,38 @@ UINT32 archimedes_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
|
||||
}
|
||||
}
|
||||
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
|
||||
{
|
||||
for(y=0;y<ysize;y++)
|
||||
|
Loading…
Reference in New Issue
Block a user