Only enable waitstate selection on CPUs where it has any practical effect (286/386).
This commit is contained in:
parent
8927b50d70
commit
5457531753
2 changed files with 29 additions and 1 deletions
|
|
@ -1553,7 +1553,7 @@ void cpu_update_waitstates()
|
||||||
/* Disable prefetch emulation */
|
/* Disable prefetch emulation */
|
||||||
cpu_prefetch_cycles = 0;
|
cpu_prefetch_cycles = 0;
|
||||||
}
|
}
|
||||||
else if (cpu_waitstates)
|
else if (cpu_waitstates && (cpu_s->cpu_type >= CPU_286 && cpu_s->cpu_type <= CPU_386DX))
|
||||||
{
|
{
|
||||||
/* Waitstates override */
|
/* Waitstates override */
|
||||||
cpu_prefetch_cycles = cpu_waitstates+1;
|
cpu_prefetch_cycles = cpu_waitstates+1;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||||
int cpu_flags;
|
int cpu_flags;
|
||||||
int temp_fda_type, temp_fdb_type;
|
int temp_fda_type, temp_fdb_type;
|
||||||
int temp_joystick_type;
|
int temp_joystick_type;
|
||||||
|
int cpu_type;
|
||||||
|
|
||||||
UDACCEL accel;
|
UDACCEL accel;
|
||||||
// pclog("Dialog msg %i %08X\n",message,message);
|
// pclog("Dialog msg %i %08X\n",message,message);
|
||||||
|
|
@ -251,6 +252,11 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"6 W/S");
|
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"6 W/S");
|
||||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"7 W/S");
|
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"7 W/S");
|
||||||
SendMessage(h, CB_SETCURSEL, cpu_waitstates, 0);
|
SendMessage(h, CB_SETCURSEL, cpu_waitstates, 0);
|
||||||
|
cpu_type = models[romstomodel[romset]].cpu[cpu_manufacturer].cpus[cpu].cpu_type;
|
||||||
|
if (cpu_type >= CPU_286 && cpu_type <= CPU_386DX)
|
||||||
|
EnableWindow(h, TRUE);
|
||||||
|
else
|
||||||
|
EnableWindow(h, FALSE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
|
@ -463,6 +469,13 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||||
accel.nSec = 0;
|
accel.nSec = 0;
|
||||||
accel.nInc = models[temp_model].ram_granularity;
|
accel.nInc = models[temp_model].ram_granularity;
|
||||||
SendMessage(h, UDM_SETACCEL, 1, (LPARAM)&accel);
|
SendMessage(h, UDM_SETACCEL, 1, (LPARAM)&accel);
|
||||||
|
|
||||||
|
h = GetDlgItem(hdlg, IDC_COMBOWS);
|
||||||
|
cpu_type = models[temp_model].cpu[temp_cpu_m].cpus[temp_cpu].cpu_type;
|
||||||
|
if (cpu_type >= CPU_286 && cpu_type <= CPU_386DX)
|
||||||
|
EnableWindow(h, TRUE);
|
||||||
|
else
|
||||||
|
EnableWindow(h, FALSE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_COMBOCPUM:
|
case IDC_COMBOCPUM:
|
||||||
|
|
@ -496,6 +509,14 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||||
else
|
else
|
||||||
EnableWindow(h, TRUE);
|
EnableWindow(h, TRUE);
|
||||||
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && temp_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && temp_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
||||||
|
|
||||||
|
h = GetDlgItem(hdlg, IDC_COMBOWS);
|
||||||
|
cpu_type = models[temp_model].cpu[temp_cpu_m].cpus[temp_cpu].cpu_type;
|
||||||
|
if (cpu_type >= CPU_286 && cpu_type <= CPU_386DX)
|
||||||
|
EnableWindow(h, TRUE);
|
||||||
|
else
|
||||||
|
EnableWindow(h, FALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_COMBO3:
|
case IDC_COMBO3:
|
||||||
|
|
@ -518,6 +539,13 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||||
else
|
else
|
||||||
EnableWindow(h, TRUE);
|
EnableWindow(h, TRUE);
|
||||||
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && temp_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && temp_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
||||||
|
|
||||||
|
h = GetDlgItem(hdlg, IDC_COMBOWS);
|
||||||
|
cpu_type = models[temp_model].cpu[temp_cpu_m].cpus[temp_cpu].cpu_type;
|
||||||
|
if (cpu_type >= CPU_286 && cpu_type <= CPU_386DX)
|
||||||
|
EnableWindow(h, TRUE);
|
||||||
|
else
|
||||||
|
EnableWindow(h, FALSE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue