From 351390b579a6d61b879f6a1a5a77ec1ed180b6d8 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 18 Jan 2025 10:59:35 -0300 Subject: [PATCH] CS423x: Change Control Indirect Address reserved bit readout for VS440FX BIOS --- src/sound/snd_cs423x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index f28be9778..a75f695d9 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -147,12 +147,19 @@ cs423x_read(uint16_t addr, void *priv) ret |= 0x04; break; + case 3: /* Control Indirect Access Register */ + /* Intel VS440FX BIOS tells CS4236 from CS4232 through the upper bits. Setting them is enough. */ + ret |= 0xf0; + break; + case 4: /* Control Indirect Data Register */ ret = dev->indirect_regs[dev->regs[3]]; break; case 5: /* Control/RAM Access */ - /* Reading RAM is undocumented; the Windows drivers do so. */ + /* Reading RAM is undocumented, but performed by: + - Windows drivers (unknown purpose) + - Intel VS440FX BIOS (PnP ROM checksum recalculation) */ if (dev->ram_dl == 3) ret = dev->ram_data[dev->ram_addr++]; break;