Merge pull request #5535 from iamgreaser/gm/vga-ega-planemask-oddeven-fix

Fix EGA/VGA/SVGA odd-even handling of write mask
This commit is contained in:
Miran Grča
2025-05-02 02:17:42 +02:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -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);

View File

@@ -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