From 9808f62921c20386292552722b2af5b937ae29e2 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Tue, 15 Aug 2023 01:25:28 +0200 Subject: [PATCH] Compile fix, now the ATI 68860 RAMDAC is using the proper 8514/A ON flag when needed. --- src/video/vid_ati68860_ramdac.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/video/vid_ati68860_ramdac.c b/src/video/vid_ati68860_ramdac.c index 4038e24d8..c8a7bca85 100644 --- a/src/video/vid_ati68860_ramdac.c +++ b/src/video/vid_ati68860_ramdac.c @@ -68,19 +68,20 @@ void ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga) { ati68860_ramdac_t *ramdac = (ati68860_ramdac_t *) priv; + ibm8514_t *dev = &svga->dev8514; switch (addr) { case 0: - svga_out(ibm8514_on ? 0x2ec : 0x3c8, val, svga); + svga_out(dev->on ? 0x2ec : 0x3c8, val, svga); break; case 1: - svga_out(ibm8514_on ? 0x2ed : 0x3c9, val, svga); + svga_out(dev->on ? 0x2ed : 0x3c9, val, svga); break; case 2: - svga_out(ibm8514_on ? 0x2ea : 0x3c6, val, svga); + svga_out(dev->on ? 0x2ea : 0x3c6, val, svga); break; case 3: - svga_out(ibm8514_on ? 0x2eb : 0x3c7, val, svga); + svga_out(dev->on ? 0x2eb : 0x3c7, val, svga); break; default: ramdac->regs[addr & 0xf] = val; @@ -171,20 +172,21 @@ uint8_t ati68860_ramdac_in(uint16_t addr, void *priv, svga_t *svga) { const ati68860_ramdac_t *ramdac = (ati68860_ramdac_t *) priv; + ibm8514_t *dev = &svga->dev8514; uint8_t temp = 0; switch (addr) { case 0: - temp = svga_in(ibm8514_on ? 0x2ec : 0x3c8, svga); + temp = svga_in(dev->on ? 0x2ec : 0x3c8, svga); break; case 1: - temp = svga_in(ibm8514_on ? 0x2ed : 0x3c9, svga); + temp = svga_in(dev->on ? 0x2ed : 0x3c9, svga); break; case 2: - temp = svga_in(ibm8514_on ? 0x2ea : 0x3c6, svga); + temp = svga_in(dev->on ? 0x2ea : 0x3c6, svga); break; case 3: - temp = svga_in(ibm8514_on ? 0x2eb : 0x3c7, svga); + temp = svga_in(dev->on ? 0x2eb : 0x3c7, svga); break; case 4: case 8: