Applied all mainline PCem commits;
Added experimental NVidia Riva TNT2 emulation (patch from MoochMcGee); ASUS P/I-P54TP4XE, ASUS P/I-P55T2P4, and ASUS P/I-P55TVP4 are back; National Semiconductor PC87306 Super I/O chip now correctly reenables devices after a chip power cycle; Several FDC improvements and the behavior is now a bit closer to real hardware (based on actual tests); Added MR Intel Advanced/ATX with Microid Research BIOS with support for 4 floppy drives and up to 4 IDE controllers; Added floppy drives 3 and 4, bringing the maximum to 4; You can now connect hard disks to the tertiary IDE controller; Correct undocumented behavior of the LEA instruction with register is back on 286 and later CPU's; Pentium-rea models with Intel chipsets now have port 92 (with alternate reset and alternate A20 toggle); Overhauled DMA channel read and write routines and fixed cascading; Improved IMG detection of a bad BPB (or complete lack of a BPB); Added preliminary emulation of PS/2 1.44 MB and PC-98 1.25 MB 3-mode drives (both have an inverted DENSEL pin); Removed the incorrect Amstrad mouse patch from TheCollector1995; Fixed ATAPI CD-ROM disk change detection; Windows IOCTL CD-ROM handler now tries to use direct SCSI passthrough for more things, including obtaining CD-ROM capacity; The Diamond Stealth32 (ET4000/W32p) now also works correctly on the two Award SiS 496/497 boxes; The (S)VGA handler now converts 6-bit RAMDAC RGB channels to standard 8-bit RGB using a lookup table generated at emulator start, calculated using the correct intensity conversion method and treating intensity 64 as equivalent to 63; Moved a few options from the Configuration dialog box to the menu; SIO, PIIX, and PIIX3 now have the reset control register on port CF9 as they should; Several bugfixes.
This commit is contained in:
253
src/win-config.c
253
src/win-config.c
@@ -16,6 +16,7 @@
|
||||
#include "fdd.h"
|
||||
#include "gameport.h"
|
||||
#include "model.h"
|
||||
#include "mouse.h"
|
||||
#include "nvr.h"
|
||||
#include "resources.h"
|
||||
#include "sound.h"
|
||||
@@ -26,8 +27,20 @@
|
||||
extern int is486;
|
||||
static int romstolist[ROM_MAX], listtomodel[ROM_MAX], romstomodel[ROM_MAX], modeltolist[ROM_MAX];
|
||||
static int settings_sound_to_list[20], settings_list_to_sound[20];
|
||||
static int settings_mouse_to_list[20], settings_list_to_mouse[20];
|
||||
static int settings_network_to_list[20], settings_list_to_network[20];
|
||||
|
||||
static int mouse_valid(int type, int model)
|
||||
{
|
||||
if (type == MOUSE_TYPE_PS2 && !(models[model].flags & MODEL_PS2))
|
||||
return 0;
|
||||
if (type == MOUSE_TYPE_AMSTRAD && !(models[model].flags & MODEL_AMSTRAD))
|
||||
return 0;
|
||||
if (type == MOUSE_TYPE_OLIM24 && !(models[model].flags & MODEL_OLIM24))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char temp_str[256];
|
||||
@@ -38,12 +51,12 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
int temp_GAMEBLASTER, temp_GUS, temp_SSI2001, temp_voodoo, temp_sound_card_current;
|
||||
int temp_dynarec;
|
||||
int cpu_flags;
|
||||
int temp_fda_type, temp_fdb_type;
|
||||
int temp_fd1_type, temp_fd2_type, temp_fd3_type, temp_fd4_type;
|
||||
int temp_network_card_current;
|
||||
int temp_network_interface_current;
|
||||
int temp_always_serial;
|
||||
int temp_joystick_type;
|
||||
int temp_aha154x;
|
||||
int cpu_type;
|
||||
int temp_mouse_type;
|
||||
|
||||
UDACCEL accel;
|
||||
// pclog("Dialog msg %i %08X\n",message,message);
|
||||
@@ -170,33 +183,12 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
h=GetDlgItem(hdlg, IDC_CHECKSSI);
|
||||
SendMessage(h, BM_SETCHECK, SSI2001, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECK2);
|
||||
SendMessage(h, BM_SETCHECK, slowega, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECK4);
|
||||
SendMessage(h, BM_SETCHECK, cga_comp, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKFORCE43);
|
||||
SendMessage(h, BM_SETCHECK, force_43, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKOVERSCAN);
|
||||
SendMessage(h, BM_SETCHECK, enable_overscan, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKFLASH);
|
||||
SendMessage(h, BM_SETCHECK, enable_flash, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKSYNC);
|
||||
SendMessage(h, BM_SETCHECK, enable_sync, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKSERIAL);
|
||||
SendMessage(h, BM_SETCHECK, mouse_always_serial, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECKVOODOO);
|
||||
SendMessage(h, BM_SETCHECK, voodoo_enabled, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECK_AHA154X);
|
||||
SendMessage(h, BM_SETCHECK, aha154x_enabled, 0);
|
||||
|
||||
cpu_flags = models[romstomodel[romset]].cpu[cpu_manufacturer].cpus[cpu].cpu_flags;
|
||||
h=GetDlgItem(hdlg, IDC_CHECKDYNAREC);
|
||||
if (!(cpu_flags & CPU_SUPPORTS_DYNAREC) || (cpu_flags & CPU_REQUIRES_DYNAREC))
|
||||
@@ -205,14 +197,6 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
EnableWindow(h, TRUE);
|
||||
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && cpu_use_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOCHC);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"A little");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"A bit");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Some");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"A lot");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Infinite");
|
||||
SendMessage(h, CB_SETCURSEL, cache, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOSPD);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"8-bit");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Slow 16-bit");
|
||||
@@ -225,7 +209,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
h = GetDlgItem(hdlg, IDC_MEMSPIN);
|
||||
SendMessage(h, UDM_SETBUDDY, (WPARAM)GetDlgItem(hdlg, IDC_MEMTEXT), 0);
|
||||
SendMessage(h, UDM_SETRANGE, 0, (models[romstomodel[romset]].min_ram << 16) | models[romstomodel[romset]].max_ram);
|
||||
if (!models[model].is_at)
|
||||
if (!models[model].flags & MODEL_AT)
|
||||
SendMessage(h, UDM_SETPOS, 0, mem_size);
|
||||
else
|
||||
SendMessage(h, UDM_SETPOS, 0, mem_size / 1024);
|
||||
@@ -233,6 +217,12 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
accel.nInc = models[model].ram_granularity;
|
||||
SendMessage(h, UDM_SETACCEL, 1, (LPARAM)&accel);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CONFIGUREMOD);
|
||||
if (model_getdevice(model))
|
||||
EnableWindow(h, TRUE);
|
||||
else
|
||||
EnableWindow(h, FALSE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CONFIGUREVID);
|
||||
if (video_card_has_config(video_old_to_new(gfxcard)))
|
||||
EnableWindow(h, TRUE);
|
||||
@@ -251,29 +241,57 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
else
|
||||
EnableWindow(h, FALSE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBODRA);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"None");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 360k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M Dual RPM");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 720k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M PS/2");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.25M PC-98");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M 3-Mode");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 2.88M");
|
||||
SendMessage(h, CB_SETCURSEL, fdd_get_type(0), 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODRB);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR2);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"None");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 360k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M Dual RPM");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 720k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M PS/2");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.25M PC-98");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M 3-Mode");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 2.88M");
|
||||
SendMessage(h, CB_SETCURSEL, fdd_get_type(1), 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR3);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"None");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 360k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M Dual RPM");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 720k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M PS/2");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.25M PC-98");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M 3-Mode");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 2.88M");
|
||||
SendMessage(h, CB_SETCURSEL, fdd_get_type(2), 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR4);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"None");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 360k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5.25\" 1.2M Dual RPM");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 720k");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M PS/2");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.25M PC-98");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 1.44M 3-Mode");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3.5\" 2.88M");
|
||||
SendMessage(h, CB_SETCURSEL, fdd_get_type(3), 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_TEXT_MB);
|
||||
if (models[model].is_at)
|
||||
if (models[model].flags & MODEL_AT)
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM)(LPCSTR)"MB");
|
||||
else
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM)(LPCSTR)"KB");
|
||||
@@ -296,6 +314,48 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
EnableWindow(h, (joystick_get_max_joysticks(joystick_type) >= 3) ? TRUE : FALSE);
|
||||
h = GetDlgItem(hdlg, IDC_JOY4);
|
||||
EnableWindow(h, (joystick_get_max_joysticks(joystick_type) >= 4) ? TRUE : FALSE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOWS);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"System default");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"0 W/S");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"1 W/S");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"2 W/S");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"3 W/S");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"4 W/S");
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"5 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_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);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOMOUSE);
|
||||
c = d = 0;
|
||||
while (1)
|
||||
{
|
||||
char *s = mouse_get_name(c);
|
||||
int type;
|
||||
|
||||
if (!s)
|
||||
break;
|
||||
|
||||
type = mouse_get_type(c);
|
||||
settings_mouse_to_list[c] = d;
|
||||
|
||||
if (mouse_valid(type, model))
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)s);
|
||||
|
||||
settings_list_to_mouse[d] = c;
|
||||
d++;
|
||||
}
|
||||
c++;
|
||||
}
|
||||
|
||||
SendMessage(h, CB_SETCURSEL, settings_mouse_to_list[mouse_type], 0);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
@@ -313,7 +373,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
mem = models[temp_model].min_ram;
|
||||
else if (mem > models[temp_model].max_ram)
|
||||
mem = models[temp_model].max_ram;
|
||||
if (models[temp_model].is_at)
|
||||
if (models[temp_model].flags & MODEL_AT)
|
||||
mem *= 1024;
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOVID);
|
||||
@@ -335,27 +395,12 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
h = GetDlgItem(hdlg, IDC_CHECKSSI);
|
||||
temp_SSI2001 = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKFORCE43);
|
||||
force_43 = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKOVERSCAN);
|
||||
enable_overscan = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKFLASH);
|
||||
enable_flash=SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKSYNC);
|
||||
enable_sync = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKSERIAL);
|
||||
temp_always_serial = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKVOODOO);
|
||||
temp_voodoo = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECK_AHA154X);
|
||||
temp_aha154x = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOSND);
|
||||
temp_sound_card_current = settings_list_to_sound[SendMessage(h, CB_GETCURSEL, 0, 0)];
|
||||
|
||||
@@ -365,19 +410,25 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
h = GetDlgItem(hdlg, IDC_COMBONET);
|
||||
temp_network_card_current = settings_list_to_network[SendMessage(h, CB_GETCURSEL, 0, 0)];
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBODRA);
|
||||
temp_fda_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODRB);
|
||||
temp_fdb_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR1);
|
||||
temp_fd1_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR2);
|
||||
temp_fd2_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR3);
|
||||
temp_fd3_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_COMBODR4);
|
||||
temp_fd4_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOJOY);
|
||||
temp_joystick_type = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOMOUSE);
|
||||
temp_mouse_type = settings_list_to_mouse[SendMessage(h, CB_GETCURSEL, 0, 0)];
|
||||
|
||||
if (temp_model != model || gfx != gfxcard || mem != mem_size || temp_cpu != cpu || temp_cpu_m != cpu_manufacturer ||
|
||||
fpu != hasfpu || temp_GAMEBLASTER != GAMEBLASTER || temp_GUS != GUS ||
|
||||
temp_SSI2001 != SSI2001 || temp_sound_card_current != sound_card_current ||
|
||||
temp_voodoo != voodoo_enabled || temp_dynarec != cpu_use_dynarec || temp_always_serial != mouse_always_serial ||
|
||||
temp_fda_type != fdd_get_type(0) || temp_fdb_type != fdd_get_type(1) || temp_network_card_current != network_card_current || temp_aha154x != aha154x_enabled)
|
||||
temp_voodoo != voodoo_enabled || temp_dynarec != cpu_use_dynarec || temp_mouse_type != mouse_type ||
|
||||
temp_fd1_type != fdd_get_type(0) || temp_fd2_type != fdd_get_type(1) || temp_fd3_type != fdd_get_type(2) || temp_fd4_type != fdd_get_type(3) || temp_network_card_current != network_card_current)
|
||||
{
|
||||
if (MessageBox(NULL,"This will reset 86Box!\nOkay to continue?","86Box",MB_OKCANCEL)==IDOK)
|
||||
{
|
||||
@@ -393,14 +444,14 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
SSI2001 = temp_SSI2001;
|
||||
sound_card_current = temp_sound_card_current;
|
||||
voodoo_enabled = temp_voodoo;
|
||||
aha154x_enabled = temp_aha154x;
|
||||
cpu_use_dynarec = temp_dynarec;
|
||||
|
||||
fdd_set_type(0, temp_fda_type);
|
||||
fdd_set_type(1, temp_fdb_type);
|
||||
fdd_set_type(0, temp_fd1_type);
|
||||
fdd_set_type(1, temp_fd2_type);
|
||||
fdd_set_type(2, temp_fd3_type);
|
||||
fdd_set_type(3, temp_fd4_type);
|
||||
|
||||
network_card_current = temp_network_card_current;
|
||||
mouse_always_serial = temp_always_serial;
|
||||
|
||||
mem_resize();
|
||||
loadbios();
|
||||
@@ -417,16 +468,13 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
h = GetDlgItem(hdlg, IDC_COMBOSPD);
|
||||
video_speed = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECK4);
|
||||
cga_comp=SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
|
||||
cpu_manufacturer = temp_cpu_m;
|
||||
cpu = temp_cpu;
|
||||
cpu_set();
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOCHC);
|
||||
cache=SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
mem_updatecache();
|
||||
h = GetDlgItem(hdlg, IDC_COMBOWS);
|
||||
cpu_waitstates = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cpu_update_waitstates();
|
||||
|
||||
saveconfig();
|
||||
|
||||
@@ -506,7 +554,7 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
SendMessage(h, BM_SETCHECK, ((cpu_flags & CPU_SUPPORTS_DYNAREC) && temp_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC), 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_TEXT_MB);
|
||||
if (models[temp_model].is_at)
|
||||
if (models[temp_model].flags & MODEL_AT)
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM)(LPCSTR)"MB");
|
||||
else
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM)(LPCSTR)"KB");
|
||||
@@ -526,6 +574,49 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
accel.nSec = 0;
|
||||
accel.nInc = models[temp_model].ram_granularity;
|
||||
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);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CONFIGUREMOD);
|
||||
if (model_getdevice(temp_model))
|
||||
EnableWindow(h, TRUE);
|
||||
else
|
||||
EnableWindow(h, FALSE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBOMOUSE);
|
||||
temp_mouse_type = settings_list_to_mouse[SendMessage(h, CB_GETCURSEL, 0, 0)];
|
||||
SendMessage(h, CB_RESETCONTENT, 0, 0);
|
||||
c = d = 0;
|
||||
while (1)
|
||||
{
|
||||
char *s = mouse_get_name(c);
|
||||
int type;
|
||||
|
||||
if (!s)
|
||||
break;
|
||||
|
||||
type = mouse_get_type(c);
|
||||
settings_mouse_to_list[c] = d;
|
||||
|
||||
if (mouse_valid(type, temp_model))
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)s);
|
||||
|
||||
settings_list_to_mouse[d] = c;
|
||||
d++;
|
||||
}
|
||||
|
||||
c++;
|
||||
}
|
||||
if (mouse_valid(temp_mouse_type, temp_model))
|
||||
SendMessage(h, CB_SETCURSEL, settings_mouse_to_list[temp_mouse_type], 0);
|
||||
else
|
||||
SendMessage(h, CB_SETCURSEL, 0, 0);
|
||||
}
|
||||
break;
|
||||
case IDC_COMBOCPUM:
|
||||
@@ -559,6 +650,14 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
else
|
||||
EnableWindow(h, TRUE);
|
||||
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;
|
||||
case IDC_COMBO3:
|
||||
@@ -581,9 +680,23 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
|
||||
else
|
||||
EnableWindow(h, TRUE);
|
||||
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;
|
||||
|
||||
case IDC_CONFIGUREMOD:
|
||||
h = GetDlgItem(hdlg, IDC_COMBO1);
|
||||
temp_model = listtomodel[SendMessage(h, CB_GETCURSEL, 0, 0)];
|
||||
|
||||
deviceconfig_open(hdlg, (void *)model_getdevice(temp_model));
|
||||
break;
|
||||
|
||||
case IDC_CONFIGUREVID:
|
||||
h = GetDlgItem(hdlg, IDC_COMBOVID);
|
||||
SendMessage(h, CB_GETLBTEXT, SendMessage(h, CB_GETCURSEL, 0, 0), (LPARAM)temp_str);
|
||||
|
||||
Reference in New Issue
Block a user