From 04fe0c9b300c7cacd73972cf732bb45e972896f6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 13 Aug 2020 00:38:16 +0200 Subject: [PATCH] Some bug fixes to the Compaq Presarior 4500 and its Super I/O chip. --- src/machine/m_at_socket7_s7.c | 4 ++-- src/sio/sio_fdc37c93x.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index f7286d16a..37ae8f018 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -668,12 +668,12 @@ machine_at_presario4500_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_at_common_init(model); + machine_at_common_init_ex(model, 2); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x14, PCI_CARD_ONBOARD, 4, 0, 0, 0); device_add(&i430vx_device); diff --git a/src/sio/sio_fdc37c93x.c b/src/sio/sio_fdc37c93x.c index 89038d51d..ba4b59b6d 100644 --- a/src/sio/sio_fdc37c93x.c +++ b/src/sio/sio_fdc37c93x.c @@ -632,7 +632,8 @@ fdc37c93x_write(uint16_t port, uint8_t val, void *priv) } -static uint8_t fdc37c93x_read(uint16_t port, void *priv) +static uint8_t +fdc37c93x_read(uint16_t port, void *priv) { fdc37c93x_t *dev = (fdc37c93x_t *) priv; uint8_t index = (port & 1) ? 0 : 1; @@ -676,7 +677,7 @@ fdc37c93x_reset(fdc37c93x_t *dev) dev->regs[0x26] = 0xF0; dev->regs[0x27] = 0x03; - for (i = 0; i < 10; i++) + for (i = 0; i < 11; i++) memset(dev->ld_regs[i], 0, 256); /* Logical device 0: FDD */ @@ -826,7 +827,7 @@ fdc37c93x_init(const device_t *info) nvr_bank_set(1, 0xff, dev->nvr); } - if (dev->chip_id == 0x03) + if (dev->is_apm || (dev->chip_id == 0x03)) dev->access_bus = device_add(&access_bus_device); if (dev->is_apm)