From 3988f6fa45faf7d2782cfd8f674f6b3c1917fd15 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Fri, 12 Jun 2020 19:18:28 +0300 Subject: [PATCH] Added the Acer V60N An i686 Acer BIOS board. Works as intended --- src/cpu_common/cpu.c | 29 +++++++++++++++++++++++++++++ src/include/86box/machine.h | 1 + src/machine/m_at_socket8.c | 31 +++++++++++++++++++++++++++++++ src/machine/machine_table.c | 1 + 4 files changed, 62 insertions(+) diff --git a/src/cpu_common/cpu.c b/src/cpu_common/cpu.c index e29099c46..67fa82234 100644 --- a/src/cpu_common/cpu.c +++ b/src/cpu_common/cpu.c @@ -60,6 +60,7 @@ # include "codegen.h" #endif +/* #define ENABLE_CPU_LOG 1 */ static void cpu_write(uint16_t addr, uint8_t val, void *priv); static uint8_t cpu_read(uint16_t addr, void *priv); @@ -195,6 +196,7 @@ uint64_t apic_base_msr = 0; uint64_t pat_msr = 0; uint64_t msr_ia32_pmc[8] = {0, 0, 0, 0, 0, 0, 0, 0}; uint64_t ecx17_msr = 0; +uint64_t ecx2a_msr = 0; uint64_t ecx79_msr = 0; uint64_t ecx8x_msr[4] = {0, 0, 0, 0}; uint64_t ecx116_msr = 0; @@ -204,6 +206,9 @@ uint64_t ecx186_msr = 0; uint64_t ecx187_msr = 0; uint64_t ecx1e0_msr = 0; uint64_t ecx404_msr = 0; +uint64_t ecx408_msr = 0; +uint64_t ecx40c_msr = 0; +uint64_t ecx410_msr = 0; uint64_t ecx570_msr = 0; uint64_t ecx83_msr = 0; /* AMD K5 and K6 MSR's. */ @@ -2882,6 +2887,18 @@ void cpu_RDMSR() EAX = ecx404_msr & 0xffffffff; EDX = ecx404_msr >> 32; break; + case 0x408: + EAX = ecx408_msr & 0xffffffff; + EDX = ecx408_msr >> 32; + break; + case 0x40c: + EAX = ecx40c_msr & 0xffffffff; + EDX = ecx40c_msr >> 32; + break; + case 0x410: + EAX = ecx410_msr & 0xffffffff; + EDX = ecx410_msr >> 32; + break; case 0x570: EAX = ecx570_msr & 0xffffffff; EDX = ecx570_msr >> 32; @@ -3229,6 +3246,9 @@ void cpu_WRMSR() /* pclog("APIC_BASE write: %08X%08X\n", EDX, EAX); */ // apic_base_msr = EAX | ((uint64_t)EDX << 32); break; + case 0x2A: + ecx2a_msr = EAX | ((uint64_t)EDX << 32); + break; case 0x79: ecx79_msr = EAX | ((uint64_t)EDX << 32); break; @@ -3301,6 +3321,15 @@ void cpu_WRMSR() case 0x404: ecx404_msr = EAX | ((uint64_t)EDX << 32); break; + case 0x408: + ecx408_msr = EAX | ((uint64_t)EDX << 32); + break; + case 0x40c: + ecx40c_msr = EAX | ((uint64_t)EDX << 32); + break; + case 0x410: + ecx410_msr = EAX | ((uint64_t)EDX << 32); + break; case 0x570: ecx570_msr = EAX | ((uint64_t)EDX << 32); break; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 26414ae4e..18ada3e7b 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -324,6 +324,7 @@ extern int machine_at_ax59pro_init(const machine_t *); extern int machine_at_mvp3_init(const machine_t *); /* m_at_socket8.c */ +extern int machine_at_v60n_init(const machine_t *); extern int machine_at_686nx_init(const machine_t *); extern int machine_at_mb600n_init(const machine_t *); extern int machine_at_8500ttc_init(const machine_t *); diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index be03a41fb..0e9efc0ce 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -100,6 +100,37 @@ machine_at_mb600n_init(const machine_t *model) return ret; } +int +machine_at_v60n_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/v60n/V60NE5.BIN", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + 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(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); + device_add(&i440fx_device); + device_add(&piix3_device); + device_add(&keyboard_ps2_pci_device); + device_add(&fdc37c935_device); + device_add(&acerm3a_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + int machine_at_8500ttc_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index cc32bad64..2ca0718ec 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -283,6 +283,7 @@ const machine_t machines[] = { /* Socket 8 machines */ /* 440FX */ + { "[Socket 8 FX] Acer V60N", "v60n", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_v60n_init, NULL }, { "[Socket 8 FX] Gigabyte GA-686NX", "686nx", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_686nx_init, NULL }, { "[Socket 8 FX] PC Partner MB600N", "mb600n", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_mb600n_init, NULL }, { "[Socket 8 FX] Biostar MB-8500ttc", "8500ttc", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 127, machine_at_8500ttc_init, NULL },