diff --git a/src/include/86box/sio.h b/src/include/86box/sio.h index c7098cfdb..d5fc88fb4 100644 --- a/src/include/86box/sio.h +++ b/src/include/86box/sio.h @@ -43,6 +43,7 @@ extern const device_t fdc37c931apm_compaq_device; extern const device_t fdc37c932fr_device; extern const device_t fdc37c932qf_device; extern const device_t fdc37c935_device; +extern const device_t fdc37c935_370_device; extern const device_t fdc37c935_no_nvr_device; extern const device_t fdc37m60x_device; extern const device_t fdc37m60x_370_device; diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 7bbf49edf..9e2ed9a26 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -657,7 +657,7 @@ machine_at_brio80xx_init(const machine_t *model) pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); device_add(&i430vx_device); device_add(&piix3_device); - device_add(&fdc37c935_device); + device_add(&fdc37c935_370_device); device_add(&sst_flash_29ee020_device); return ret; @@ -726,7 +726,7 @@ machine_at_pb810_init(const machine_t *model) device_add(&i430vx_device); device_add(&piix3_device); - device_add(&fdc37c935_device); + device_add(&fdc37c935_370_device); device_add(&intel_flash_bxt_device); return ret; diff --git a/src/sio/sio_fdc37c93x.c b/src/sio/sio_fdc37c93x.c index 7d8e12795..97fcb3fbd 100644 --- a/src/sio/sio_fdc37c93x.c +++ b/src/sio/sio_fdc37c93x.c @@ -54,6 +54,7 @@ typedef struct fdc37c93x_t { uint8_t is_apm; uint8_t has_nvr; uint8_t tries; + uint8_t port_370; uint8_t gpio_regs[2]; uint8_t auxio_reg; uint8_t regs[48]; @@ -785,7 +786,7 @@ fdc37c93x_reset(fdc37c93x_t *dev) dev->regs[0x21] = 0x01; dev->regs[0x22] = 0x39; dev->regs[0x24] = 0x04; - dev->regs[0x26] = 0xF0; + dev->regs[0x26] = dev->port_370 ? 0x70 : 0xF0; dev->regs[0x27] = 0x03; for (uint8_t i = 0; i < 11; i++) @@ -940,13 +941,14 @@ fdc37c93x_init(const device_t *info) dev->fdc = device_add(&fdc_at_smc_device); - dev->uart[0] = device_add_inst(&ns16550_device, 1); - dev->uart[1] = device_add_inst(&ns16550_device, 2); + dev->uart[0] = device_add_inst(&ns16550_device, 1); + dev->uart[1] = device_add_inst(&ns16550_device, 2); - dev->chip_id = info->local & 0xff; - dev->is_apm = (info->local >> 8) & 0x01; - is_compaq = (info->local >> 8) & 0x02; - dev->has_nvr = !((info->local >> 8) & 0x04); + dev->chip_id = info->local & 0xff; + dev->is_apm = (info->local >> 8) & 0x01; + is_compaq = (info->local >> 8) & 0x02; + dev->has_nvr = !((info->local >> 8) & 0x04); + dev->port_370 = ((info->local >> 8) & 0x08); dev->gpio_regs[0] = 0xff; #if 0 @@ -1053,6 +1055,20 @@ const device_t fdc37c935_device = { .config = NULL }; +const device_t fdc37c935_370_device = { + .name = "SMC FDC37C935 Super I/O (Port 370h)", + .internal_name = "fdc37c935_370", + .flags = 0, + .local = 0x802, + .init = fdc37c93x_init, + .close = fdc37c93x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + const device_t fdc37c935_no_nvr_device = { .name = "SMC FDC37C935 Super I/O", .internal_name = "fdc37c935",