CS423x: Add proper on-board CS4236B to the Intel AP440FX

Default PnP ID patches have been removed as the AP440FX BIOS confirms the CSC4236 ID never changed (as later documented on CS4235/9)
This commit is contained in:
RichardG867
2025-02-08 00:06:54 -03:00
parent b7f7975054
commit 34fbecb377
3 changed files with 20 additions and 16 deletions

View File

@@ -172,6 +172,7 @@ extern const device_t cs4235_device;
extern const device_t cs4235_onboard_device;
extern const device_t cs4236_onboard_device;
extern const device_t cs4236b_device;
extern const device_t cs4236b_onboard_device;
extern const device_t cs4237b_device;
extern const device_t cs4238b_device;

View File

@@ -14169,7 +14169,7 @@ const machine_t machines[] = {
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_virge_325_onboard_pci_device,
.snd_device = &cs4236b_device,
.snd_device = &cs4236b_onboard_device,
.net_device = NULL
},
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the

View File

@@ -818,23 +818,10 @@ cs423x_load_defaults(cs423x_t *dev, uint8_t *dest)
dest[4] = 0x43; /* code base byte */
break;
case CRYSTAL_CS4236B:
dest[22] = 0x35; /* default PnP ID */
break;
case CRYSTAL_CS4237B:
dest[22] = 0x37; /* default PnP ID */
break;
case CRYSTAL_CS4238B:
dest[22] = 0x38; /* default PnP ID */
break;
case CRYSTAL_CS4235:
case CRYSTAL_CS4239:
dest[4] = 0x05; /* code base byte */
dest[12] = 0x08; /* external decode length */
dest[22] = 0x36; /* default PnP ID - explicitly stated to be the CS4236 non-B one */
break;
}
break;
@@ -904,13 +891,15 @@ cs423x_init(const device_t *info)
case CRYSTAL_CS4238B:
case CRYSTAL_CS4235:
case CRYSTAL_CS4239:
/* Same WSS codec and EEPROM structure. */
/* Different WSS codec families. */
dev->ad1848_type = (dev->type >= CRYSTAL_CS4235) ? AD1848_TYPE_CS4235 : ((dev->type >= CRYSTAL_CS4236B) ? AD1848_TYPE_CS4236B : AD1848_TYPE_CS4236);
dev->pnp_offset = 0x4013;
/* Different Chip Version and ID registers (N/A on CS4236), which shouldn't be reset by ad1848_init. */
dev->ad1848.xregs[25] = dev->type;
/* Same EEPROM structure. */
dev->pnp_offset = 0x4013;
if (!(info->local & CRYSTAL_NOEEPROM)) {
/* Start a new EEPROM with the default configuration data. */
cs423x_load_defaults(dev, &dev->eeprom_data[4]);
@@ -1117,6 +1106,20 @@ const device_t cs4236b_device = {
.config = NULL
};
const device_t cs4236b_onboard_device = {
.name = "Crystal CS4236B",
.internal_name = "cs4236b",
.flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4236B | CRYSTAL_NOEEPROM,
.init = cs423x_init,
.close = cs423x_close,
.reset = cs423x_reset,
.available = cs423x_available,
.speed_changed = cs423x_speed_changed,
.force_redraw = NULL,
.config = NULL
};
const device_t cs4237b_device = {
.name = "Crystal CS4237B",
.internal_name = "cs4237b",