Windows config dialogue now only allows PCI graphics cards on PCI systems.
This commit is contained in:
parent
b5c11bc981
commit
d366da23ec
6 changed files with 52 additions and 49 deletions
|
|
@ -49,6 +49,7 @@ enum
|
|||
DEVICE_NOT_WORKING = 1, /*Device does not currently work correctly and will be disabled in a release build*/
|
||||
DEVICE_AT = 2, /*Device requires an AT-compatible system*/
|
||||
DEVICE_MCA = 0x20, /*Device requires an MCA system*/
|
||||
DEVICE_PCI = 0x40 /*Device requires a PCI system*/
|
||||
};
|
||||
|
||||
int model_get_config_int(char *s);
|
||||
|
|
|
|||
|
|
@ -133,10 +133,10 @@ MODEL models[] =
|
|||
{"AMI 486 clone", ROM_AMI486, "ami486", { {"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}}, 0, MODEL_AT|MODEL_HAS_IDE, 1, 256, 1, at_ali1429_init, NULL},
|
||||
{"AMI WinBIOS 486", ROM_WIN486, "win486", { {"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}}, 0, MODEL_AT|MODEL_HAS_IDE, 1, 256, 1, at_ali1429_init, NULL},
|
||||
/* {"AMI WinBIOS 486 PCI", ROM_PCI486, { "Intel", cpus_i486, "AMD", cpus_Am486, "Cyrix", cpus_Cx486}, 0, 1, 1, 256, 1, at_um8881f_init},*/
|
||||
{"Award SiS 496/497", ROM_SIS496, "sis496", { {"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}}, 0, MODEL_AT|MODEL_HAS_IDE, 1, 256, 1, at_sis496_init, NULL},
|
||||
{"Intel Premiere/PCI", ROM_REVENGE, "revenge", { {"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}}, 0, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_batman_init, NULL},
|
||||
{"Intel Advanced/EV", ROM_ENDEAVOR, "endeavor", { {"Intel", cpus_PentiumS5}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_endeavor_init, NULL},
|
||||
{"Award 430VX PCI", ROM_430VX, "430vx", { {"Intel", cpus_Pentium}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 256, 1, at_i430vx_init, NULL},
|
||||
{"Award SiS 496/497", ROM_SIS496, "sis496", { {"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}}, 0, MODEL_AT|MODEL_PCI|MODEL_HAS_IDE, 1, 256, 1, at_sis496_init, NULL},
|
||||
{"Intel Premiere/PCI", ROM_REVENGE, "revenge", { {"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_batman_init, NULL},
|
||||
{"Intel Advanced/EV", ROM_ENDEAVOR, "endeavor", { {"Intel", cpus_PentiumS5}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_endeavor_init, NULL},
|
||||
{"Award 430VX PCI", ROM_430VX, "430vx", { {"Intel", cpus_Pentium}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 256, 1, at_i430vx_init, NULL},
|
||||
{"", -1, "", {{"", 0}, {"", 0}, {"", 0}}, 0,0,0, 0}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#define MODEL_OLIM24 8
|
||||
#define MODEL_HAS_IDE 0x10
|
||||
#define MODEL_MCA 0x20
|
||||
#define MODEL_PCI 0x40
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3517,7 +3517,7 @@ device_t mach64gx_device =
|
|||
device_t mach64vt2_device =
|
||||
{
|
||||
"ATI Mach64VT2",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
mach64vt2_init,
|
||||
mach64_close,
|
||||
mach64vt2_available,
|
||||
|
|
|
|||
|
|
@ -7290,7 +7290,7 @@ static device_config_t voodoo_config[] =
|
|||
device_t voodoo_device =
|
||||
{
|
||||
"3DFX Voodoo Graphics",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
voodoo_init,
|
||||
voodoo_close,
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,47 @@ static int mouse_valid(int type, int model)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void recalc_vid_list(HWND hdlg, int model)
|
||||
{
|
||||
HWND h = GetDlgItem(hdlg, IDC_COMBOVID);
|
||||
int c = 0, d = 0;
|
||||
int found_card = 0;
|
||||
|
||||
SendMessage(h, CB_RESETCONTENT, 0, 0);
|
||||
SendMessage(h, CB_SETCURSEL, 0, 0);
|
||||
|
||||
while (1)
|
||||
{
|
||||
char *s = video_card_getname(c);
|
||||
|
||||
if (!s[0])
|
||||
break;
|
||||
|
||||
if (video_card_available(c) && gfx_present[video_new_to_old(c)] &&
|
||||
((models[model].flags & MODEL_PCI) || !(video_card_getdevice(c)->flags & DEVICE_PCI)))
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)s);
|
||||
if (video_new_to_old(c) == gfxcard)
|
||||
{
|
||||
SendMessage(h, CB_SETCURSEL, d, 0);
|
||||
found_card = 1;
|
||||
}
|
||||
|
||||
d++;
|
||||
}
|
||||
|
||||
c++;
|
||||
}
|
||||
if (!found_card)
|
||||
SendMessage(h, CB_SETCURSEL, 0, 0);
|
||||
EnableWindow(h, models[model].fixed_gfxcard ? FALSE : TRUE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKVOODOO);
|
||||
EnableWindow(h, (models[model].flags & MODEL_PCI) ? TRUE : FALSE);
|
||||
h = GetDlgItem(hdlg, IDC_CONFIGUREVOODOO);
|
||||
EnableWindow(h, (models[model].flags & MODEL_PCI) ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
static void recalc_snd_list(HWND hdlg, int model)
|
||||
{
|
||||
HWND h = GetDlgItem(hdlg, IDC_COMBOSND);
|
||||
|
|
@ -181,28 +222,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
}
|
||||
SendMessage(h, CB_SETCURSEL, modeltolist[model], 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOVID);
|
||||
c = d = 0;
|
||||
while (1)
|
||||
{
|
||||
char *s = video_card_getname(c);
|
||||
|
||||
if (!s[0])
|
||||
break;
|
||||
|
||||
if (video_card_available(c) && gfx_present[video_new_to_old(c)])
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)s);
|
||||
if (video_new_to_old(c) == gfxcard)
|
||||
SendMessage(h, CB_SETCURSEL, d, 0);
|
||||
|
||||
d++;
|
||||
}
|
||||
|
||||
c++;
|
||||
}
|
||||
if (models[model].fixed_gfxcard)
|
||||
EnableWindow(h, FALSE);
|
||||
recalc_vid_list(hdlg, romstomodel[romset]);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOCPUM);
|
||||
c = 0;
|
||||
|
|
@ -517,27 +537,6 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
h = GetDlgItem(hdlg,IDC_COMBO1);
|
||||
temp_model = listtomodel[SendMessage(h,CB_GETCURSEL,0,0)];
|
||||
|
||||
/*Enable/disable gfxcard list*/
|
||||
h = GetDlgItem(hdlg, IDC_COMBOVID);
|
||||
if (!models[temp_model].fixed_gfxcard)
|
||||
{
|
||||
char *s = video_card_getname(video_old_to_new(gfxcard));
|
||||
|
||||
EnableWindow(h, TRUE);
|
||||
|
||||
c = 0;
|
||||
while (1)
|
||||
{
|
||||
SendMessage(h, CB_GETLBTEXT, c, (LPARAM)temp_str);
|
||||
if (!strcmp(temp_str, s))
|
||||
break;
|
||||
c++;
|
||||
}
|
||||
SendMessage(h, CB_SETCURSEL, c, 0);
|
||||
}
|
||||
else
|
||||
EnableWindow(h, FALSE);
|
||||
|
||||
/*Rebuild manufacturer list*/
|
||||
h = GetDlgItem(hdlg, IDC_COMBOCPUM);
|
||||
temp_cpu_m = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
|
|
@ -642,6 +641,8 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
|||
else
|
||||
SendMessage(h, CB_SETCURSEL, 0, 0);
|
||||
|
||||
recalc_vid_list(hdlg, temp_model);
|
||||
|
||||
recalc_hdd_list(hdlg, temp_model, 1);
|
||||
|
||||
recalc_snd_list(hdlg, temp_model);
|
||||
|
|
|
|||
Loading…
Reference in a new issue