Fix EGA/VGA/SVGA odd-even handling of write mask
Matches my AMD Stoney + S3 Trio64V2, and also Intel's 2023 GPU docs (which *still* tend to be more accurate than IBM's), and makes more sense than what we've (I've?) been doing.
This commit is contained in:
@@ -1180,9 +1180,7 @@ ega_write(uint32_t addr, uint8_t val, void *priv)
|
||||
cycles -= video_timing_write_b;
|
||||
|
||||
if (ega->chain2_write) {
|
||||
writemask2 &= ~0xa;
|
||||
if (addr & 1)
|
||||
writemask2 <<= 1;
|
||||
writemask2 &= 0x5 << (addr & 1);
|
||||
}
|
||||
|
||||
addr = ega_remap_cpu_addr(addr, ega);
|
||||
|
||||
@@ -1689,9 +1689,7 @@ svga_write_common(uint32_t addr, uint8_t val, uint8_t linear, void *priv)
|
||||
addr &= ~3;
|
||||
addr = ((addr & 0xfffc) << 2) | ((addr & 0x30000) >> 14) | (addr & ~0x3ffff);
|
||||
} else if (svga->chain2_write) {
|
||||
writemask2 &= ~0xa;
|
||||
if (addr & 1)
|
||||
writemask2 <<= 1;
|
||||
writemask2 &= 0x5 << (addr & 1);
|
||||
addr &= ~1;
|
||||
addr <<= 2;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user