From de4e1795cc2cab26711926836bebaaa00ac45155 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sun, 1 Feb 2026 21:50:31 -0600 Subject: [PATCH 1/2] CS423x: Make bits 2-0 of control register C0 writable, fixes Win3.1 v2.02 driver invalid codec error and Win9x v2.86 driver code 10 --- src/sound/snd_cs423x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index b9004454e..264171b1e 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -290,7 +290,7 @@ cs423x_write(uint16_t addr, uint8_t val, void *priv) ad1848_init(&dev->ad1848, dev->ad1848_type); ad1848_set_cd_audio_channel(&dev->ad1848, AD1848_AUX2); } - val = 0x00; + val &= 0x07; break; case 1: /* Version / Chip ID */ From 2d777403f91236c757104bf07e7e72681a79b54f Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sun, 1 Feb 2026 22:11:30 -0600 Subject: [PATCH 2/2] AD1848: Remove old CS423xB/4235/4239 I18/I19 mixer hack as it's no longer needed --- src/sound/snd_ad1848.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index 44e328842..181d2158e 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -411,19 +411,6 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv) goto readonly_i; } - /* HACK: the Windows 9x driver's "Synth" control writes to this - register with no remapping, even if internal FM is enabled. */ - if (ad1848->index == 18) { - if (val & 0x80) - ad1848->fm_vol_l = 0; - else - ad1848->fm_vol_l = (int) ad1848_vols_5bits_aux_gain[val & 0x1f]; - } else { - if (val & 0x80) - ad1848->fm_vol_r = 0; - else - ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f]; - } } if ((ad1848->type >= AD1848_TYPE_CS4232) && (ad1848->type <= AD1848_TYPE_CS4236)) { if (ad1848->index == 18) {