(S)VGA: Update graphics mode blink behaviour to match something more feasible
This commit is contained in:
@@ -480,7 +480,8 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits)
|
||||
const int dwshift = highres ? 0 : 1;
|
||||
const int dotwidth = 1 << dwshift;
|
||||
const int charwidth = dotwidth * (combine8bits ? 4 : 8);
|
||||
const uint8_t blinkmask = (attrblink && blinked ? 0x8 : 0x0);
|
||||
const uint8_t blinkmask = (attrblink ? 0x7 : 0xF);
|
||||
const uint8_t blinkval = (attrblink && blinked ? 0x8 : 0x0);
|
||||
|
||||
if ((svga->displine + svga->y_add) < 0)
|
||||
return;
|
||||
@@ -586,9 +587,13 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits)
|
||||
= (edatlookup[(edat[0] >> inshift) & 3][(edat[1] >> inshift) & 3])
|
||||
| (edatlookup[(edat[2] >> inshift) & 3][(edat[3] >> inshift) & 3] << 2);
|
||||
|
||||
// FIXME: Confirm blink behaviour is actually XOR on real hardware
|
||||
uint32_t c0 = ((dat >> 4) & svga->plane_mask) ^ blinkmask;
|
||||
uint32_t c1 = (dat & svga->plane_mask) ^ blinkmask;
|
||||
// FIXME: Confirm blink behaviour on real hardware
|
||||
// This is how it behaves on an Intel GMA 4500MHD (2008).
|
||||
// That includes 8bpp modes.
|
||||
// However, an AMD Stoney Ridge (2016) seems to ignore blink in 8bpp modes.
|
||||
|
||||
uint32_t c0 = ((dat >> 4) & svga->plane_mask & blinkmask) | blinkval;
|
||||
uint32_t c1 = (dat & svga->plane_mask & blinkmask) | blinkval;
|
||||
if (combine8bits) {
|
||||
uint32_t ccombined = (c0 << 4) | c1;
|
||||
uint32_t p0 = svga->map8[ccombined];
|
||||
|
Reference in New Issue
Block a user