From 7c6e390c951843b4229a70ac373796f85e303277 Mon Sep 17 00:00:00 2001 From: Alexander Babikov <2708460+lemondrops@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:49:11 +0500 Subject: [PATCH 1/2] nvr_at: Re-add a forgotten check for VIA NVR Fixes the GT694VA and CUV4X-LS stuck at POST C1 C0 --- src/nvr_at.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvr_at.c b/src/nvr_at.c index f233e82ba..a881444c2 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1096,7 +1096,7 @@ nvr_at_init(const device_t *info) io_sethandler(0x0070, 2, nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr); } - if ((info->local & 0x1f) == 0x11) { + if (((info->local & 0x1f) == 0x11) || ((info->local & 0x1f) == 0x17)) { io_sethandler(0x0072, 2, nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr); } From 66d250d011b7212ce31d0595ca3d9344dbf8b6fc Mon Sep 17 00:00:00 2001 From: Alexander Babikov <2708460+lemondrops@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:53:17 +0500 Subject: [PATCH 2/2] machine: Move the GT694VA code to the correct file --- src/include/86box/machine.h | 2 +- src/machine/m_at_slot1.c | 42 ++++++++++++++++++++++++++++++++++++ src/machine/m_at_socket370.c | 42 ------------------------------------ 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 596972ded..052e55abd 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -681,6 +681,7 @@ extern int machine_at_p6sba_init(const machine_t *); extern int machine_at_ficka6130_init(const machine_t *); extern int machine_at_p3v133_init(const machine_t *); extern int machine_at_p3v4x_init(const machine_t *); +extern int machine_at_gt694va_init(const machine_t *); extern int machine_at_vei8_init(const machine_t *); @@ -702,7 +703,6 @@ extern int machine_at_awo671r_init(const machine_t *); extern int machine_at_63a1_init(const machine_t *); extern int machine_at_s370sba_init(const machine_t *); extern int machine_at_apas3_init(const machine_t *); -extern int machine_at_gt694va_init(const machine_t *); extern int machine_at_cuv4xls_init(const machine_t *); extern int machine_at_6via90ap_init(const machine_t *); extern int machine_at_s1857_init(const machine_t *); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 2cc76c69b..ec818871a 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -572,6 +572,48 @@ machine_at_p3v4x_init(const machine_t *model) return ret; } +int +machine_at_gt694va_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/gt694va/21071100.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + 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, 3, 4); + pci_register_slot(0x0D, PCI_CARD_SOUND, 4, 1, 2, 3); /* assumed */ + pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + device_add(&via_apro133a_device); + device_add(&via_vt82c596b_device); + device_add(&w83977ef_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 1024); + device_add(&w83782d_device); /* fans: CPU, unused, unused; temperatures: System, CPU1, unused */ + hwm_values.voltages[1] = 1500; /* IN1 (unknown purpose, assumed Vtt) */ + hwm_values.fans[0] = 4500; /* BIOS does not display <4411 RPM */ + hwm_values.fans[1] = 0; /* unused */ + hwm_values.fans[2] = 0; /* unused */ + hwm_values.temperatures[2] = 0; /* unused */ + + if (sound_card_current == SOUND_INTERNAL) { + device_add(&es1371_onboard_device); + device_add(&cs4297_device); /* assumed */ + } + + return ret; +} + int machine_at_vei8_init(const machine_t *model) { diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index d11dc0876..1388eec3a 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -344,48 +344,6 @@ machine_at_apas3_init(const machine_t *model) return ret; } -int -machine_at_gt694va_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/gt694va/21071100.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - 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, 3, 4); - pci_register_slot(0x0D, PCI_CARD_SOUND, 4, 1, 2, 3); /* assumed */ - pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - device_add(&via_apro133a_device); - device_add(&via_vt82c596b_device); - device_add(&w83977ef_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 1024); - device_add(&w83782d_device); /* fans: CPU, unused, unused; temperatures: System, CPU1, unused */ - hwm_values.voltages[1] = 1500; /* IN1 (unknown purpose, assumed Vtt) */ - hwm_values.fans[0] = 4500; /* BIOS does not display <4411 RPM */ - hwm_values.fans[1] = 0; /* unused */ - hwm_values.fans[2] = 0; /* unused */ - hwm_values.temperatures[2] = 0; /* unused */ - - if (sound_card_current == SOUND_INTERNAL) { - device_add(&es1371_onboard_device); - device_add(&cs4297_device); /* assumed */ - } - - return ret; -} - int machine_at_cuv4xls_init(const machine_t *model) {