Merge pull request #909 from richardg867/master
STPC machine improvements
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user