From 2d79719df5a3d02419138af4069b4b47313d8443 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Tue, 16 Mar 2021 17:06:47 +0100 Subject: [PATCH] Restored the PCI bit (bit 7) of regs 0xec and 0xef of ports 0x21xb to the w32p when enabled as such. --- src/video/vid_et4000w32.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index e4a9e4611..0c0042837 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -334,10 +334,17 @@ uint8_t et4000w32p_in(uint16_t addr, void *p) return (et4000->regs[0xec] & 0xf) | 0x30; /*ET4000/W32i rev B*/ else if (et4000->type == ET4000W32) return (et4000->regs[0xec] & 0xf); /*ET4000/W32*/ - else if (et4000->type == ET4000W32P || et4000->type == ET4000W32_DIAMOND) - return (et4000->regs[0xec] & 0xf) | 0x60; /*ET4000/W32p rev D*/ - else - return (et4000->regs[0xec] & 0xf) | 0x70; /*ET4000/W32p rev C*/ + else if (et4000->type == ET4000W32P || et4000->type == ET4000W32_DIAMOND) { + if (et4000->pci) + return (et4000->regs[0xec] & 0xf) | 0xe0; /*ET4000/W32p rev D*/ + else + return (et4000->regs[0xec] & 0xf) | 0x60; /*ET4000/W32p rev D*/ + } else { + if (et4000->pci) + return (et4000->regs[0xec] & 0xf) | 0xf0; /*ET4000/W32p rev C*/ + else + return (et4000->regs[0xec] & 0xf) | 0x70; /*ET4000/W32p rev C*/ + } } if (et4000->index == 0xee) /*Preliminary implementation*/ { @@ -354,10 +361,17 @@ uint8_t et4000w32p_in(uint16_t addr, void *p) return et4000->regs[0xef] | 0x30; /*ET4000/W32i rev B*/ else if (et4000->type == ET4000W32) return et4000->regs[0xef]; /*ET4000/W32*/ - else if (et4000->type == ET4000W32P || et4000->type == ET4000W32_DIAMOND) - return et4000->regs[0xef] | 0x60; /*ET4000/W32p rev D*/ - else - return et4000->regs[0xec] | 0x70; /*ET4000/W32p rev C*/ + else if (et4000->type == ET4000W32P || et4000->type == ET4000W32_DIAMOND) { + if (et4000->pci) + return et4000->regs[0xef] | 0xe0; /*ET4000/W32p rev D*/ + else + return et4000->regs[0xef] | 0x60; /*ET4000/W32p rev D*/ + } else { + if (et4000->pci) + return et4000->regs[0xec] | 0xf0; /*ET4000/W32p rev C*/ + else + return et4000->regs[0xec] | 0x70; /*ET4000/W32p rev C*/ + } } return et4000->regs[et4000->index]; }