diff --git a/src/chipset/stpc.c b/src/chipset/stpc.c index 0609e2df5..a4dc8df96 100644 --- a/src/chipset/stpc.c +++ b/src/chipset/stpc.c @@ -492,6 +492,8 @@ stpc_reg_read(uint16_t addr, void *priv) if (addr == 0x22) ret = dev->reg_offset; + else if (dev->reg_offset >= 0xc0) + return 0xff; /* Cyrix CPU registers: let the CPU code handle those */ else ret = dev->regs[dev->reg_offset]; @@ -522,8 +524,6 @@ stpc_setup(stpc_t *dev) { stpc_log("STPC: setup()\n"); - memset(dev, 0, sizeof(stpc_t)); - /* Northbridge */ dev->pci_conf[0][0x00] = 0x4a; dev->pci_conf[0][0x01] = 0x10; @@ -601,7 +601,7 @@ stpc_setup(stpc_t *dev) dev->pci_conf[2][0x47] = 0x97; /* USB */ - if (dev->local & STPC_USB) { + if (dev->usb) { dev->pci_conf[3][0x00] = 0x4a; dev->pci_conf[3][0x01] = 0x10; dev->pci_conf[3][0x02] = 0x30; @@ -636,6 +636,8 @@ stpc_init(const device_t *info) stpc_log("STPC: init()\n"); stpc_t *dev = (stpc_t *) malloc(sizeof(stpc_t)); + memset(dev, 0, sizeof(stpc_t)); + dev->local = info->local; pci_add_card(0x0B, stpc_nb_read, stpc_nb_write, dev); diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index b707ce59c..3aaed7075 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -142,7 +142,8 @@ extern CPU cpus_i486[]; extern CPU cpus_Am486[]; extern CPU cpus_Cx486[]; #if defined(DEV_BRANCH) && defined(USE_STPC) -extern CPU cpus_STPC[]; +extern CPU cpus_STPC6675[]; +extern CPU cpus_STPC133[]; #endif extern CPU cpus_WinChip[]; extern CPU cpus_WinChip_SS7[]; diff --git a/src/cpu/cpu_table.c b/src/cpu/cpu_table.c index a22ee521b..ca84055db 100644 --- a/src/cpu/cpu_table.c +++ b/src/cpu/cpu_table.c @@ -367,12 +367,16 @@ CPU cpus_Cx486[] = { }; #if defined(DEV_BRANCH) && defined(USE_STPC) -CPU cpus_STPC[] = { - {"STPC 66", CPU_Cx486DX2, fpus_internal, 66666666, 1.0, 0x430, 0, 0x001a, CPU_SUPPORTS_DYNAREC, 12,12, 6, 6, 8}, /* timings assumed */ - {"STPC 75", CPU_Cx486DX2, fpus_internal, 75000000, 1.0, 0x430, 0, 0x001a, CPU_SUPPORTS_DYNAREC, 12,12, 6, 6, 8}, - {"STPC 100", CPU_Cx486DX2, fpus_internal, 100000000, 1.0, 0x430, 0, 0x001a, CPU_SUPPORTS_DYNAREC, 12,12, 6, 6, 8}, - {"STPC 133", CPU_Cx486DX2, fpus_internal, 133333333, 2.0, 0x430, 0, 0x001b, CPU_SUPPORTS_DYNAREC, 12,12, 6, 6, 8}, - {"", -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +/* All STPC timings and Cyrix CPUID values assumed. */ +CPU cpus_STPC6675[] = { + {"STPC 66", CPU_Cx486DX, fpus_internal, 66666666, 1.0, 0x430, 0, 0x051a, CPU_SUPPORTS_DYNAREC, 7, 7, 3, 3, 5}, + {"STPC 75", CPU_Cx486DX, fpus_internal, 75000000, 1.0, 0x430, 0, 0x051a, CPU_SUPPORTS_DYNAREC, 7, 7, 3, 3, 5}, + {"", -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +}; + +CPU cpus_STPC133[] = { + {"STPC 133", CPU_Cx486DX2, fpus_internal, 133333333, 2.0, 0x430, 0, 0x0b1b, CPU_SUPPORTS_DYNAREC, 14,14, 6, 6, 10}, + {"", -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; #endif diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 6219e0c03..90e1ac223 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -635,7 +635,7 @@ machine_at_itoxstar_init(const machine_t *model) device_add(&keyboard_ps2_ami_pci_device); device_add(&stpc_client_device); device_add(&ide_vlb_device); - device_add(&sst_flash_39sf020_device); + device_add(&sst_flash_29ee020_device); hwm_values_t machine_hwm = { { /* fan speeds (incorrect divisor for some reason) */ @@ -684,7 +684,7 @@ machine_at_arb1479_init(const machine_t *model) device_add(&keyboard_ps2_ami_pci_device); device_add(&stpc_consumer2_device); device_add(&ide_vlb_2ch_device); - device_add(&sst_flash_39sf020_device); + device_add(&sst_flash_29ee020_device); return ret; } @@ -713,7 +713,7 @@ machine_at_pcm9340_init(const machine_t *model) device_add(&keyboard_ps2_ami_pci_device); device_add(&stpc_elite_device); device_add(&ide_vlb_device); - device_add(&sst_flash_39sf020_device); + device_add(&sst_flash_29ee020_device); return ret; } @@ -737,7 +737,7 @@ machine_at_pcm5330_init(const machine_t *model) pci_register_slot(0x0C, PCI_CARD_SPECIAL, 0, 0, 0, 0); pci_register_slot(0x0D, PCI_CARD_SPECIAL, 0, 0, 0, 0); pci_register_slot(0x0E, PCI_CARD_SPECIAL, 0, 0, 0, 0); - device_add(&w83977f_device); + device_add(&w83977f_370_device); device_add(&keyboard_ps2_ami_pci_device); device_add(&stpc_atlas_device); device_add(&ide_vlb_device); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index b785f2008..657975fbf 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -228,10 +228,10 @@ const machine_t machines[] = { { "[SiS 496] Rise Computer R418", "r418", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 255, 1, 255, machine_at_r418_init, NULL }, { "[SiS 496] Zida Tomato 4DP", "4dps", MACHINE_TYPE_486, {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 255, 1, 255, machine_at_4dps_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_STPC) - { "[STPC Client] ITOX STAR", "itoxstar", MACHINE_TYPE_486, {{"ST", cpus_STPC}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 255, machine_at_itoxstar_init, NULL }, - { "[STPC Consumer-II] Acrosser AR-B1479", "arb1479", MACHINE_TYPE_486, {{"ST", cpus_STPC}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 32, 160, 8, 255, machine_at_arb1479_init, NULL }, - { "[STPC Elite] Advantech PCM-9340", "pcm9340", MACHINE_TYPE_486, {{"ST", cpus_STPC}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 32, 32, 0, 255, machine_at_pcm9340_init, NULL }, - { "[STPC Atlas] AAEON PCM-5330", "pcm5330", MACHINE_TYPE_486, {{"ST", cpus_STPC}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 64, 64, 0, 255, machine_at_pcm5330_init, NULL }, + { "[STPC Client] ITOX STAR", "itoxstar", MACHINE_TYPE_486, {{"ST", cpus_STPC6675}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 255, machine_at_itoxstar_init, NULL }, + { "[STPC Consumer-II] Acrosser AR-B1479", "arb1479", MACHINE_TYPE_486, {{"ST", cpus_STPC133}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 32, 160, 8, 255, machine_at_arb1479_init, NULL }, + { "[STPC Elite] Advantech PCM-9340", "pcm9340", MACHINE_TYPE_486, {{"ST", cpus_STPC133}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 32, 32, 0, 255, machine_at_pcm9340_init, NULL }, + { "[STPC Atlas] AAEON PCM-5330", "pcm5330", MACHINE_TYPE_486, {{"ST", cpus_STPC133}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 64, 64, 0, 255, machine_at_pcm5330_init, NULL }, #endif /* Socket 4 machines */ diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 8eb444253..def8e978a 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -627,7 +627,7 @@ win_settings_machine_recalc_cpu_m(HWND hdlg) SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp); c++; } - EnableWindow(h, TRUE); + EnableWindow(h, (c == 1) ? FALSE : TRUE); if (temp_cpu >= c) temp_cpu = (c - 1); SendMessage(h, CB_SETCURSEL, temp_cpu, 0);