video/pc_vga.cpp: fix pixel_xfer transfer shifting, makes Windows 95 to be usable in SVGA 8bpp mode

This commit is contained in:
angelosa 2022-12-26 03:39:08 +01:00
parent 3292c78bfe
commit aede45e42e

View File

@ -3295,8 +3295,12 @@ void ibm8514a_device::ibm8514_write_fg(uint32_t offset)
src = ibm8514.fgcolour;
break;
case 0x0040:
src = ibm8514.pixel_xfer;
{
// Windows 95 in svga 8bpp mode wants this (start logo, moving icons around, games etc.)
u32 shift_values[4] = { 0, 8, 16, 24 };
src = (ibm8514.pixel_xfer >> shift_values[(ibm8514.curr_x - ibm8514.prev_x) & 3]) & 0xff;
break;
}
case 0x0060:
// video memory - presume the memory is sourced from the current X/Y co-ords
src = m_vga->mem_linear_r(((ibm8514.curr_y * IBM8514_LINE_LENGTH) + ibm8514.curr_x));