From 4df8fe26aa108c4a5ed629de599857fe49aa7768 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 13 Jun 2004 19:52:43 +0300 Subject: [PATCH] imported winuaesrc0828b1b.zip --- cfgfile.c | 68 ++++++---- include/options.h | 6 +- memory.c | 12 +- od-win32/resources/resource.h | 12 +- od-win32/resources/winuae.rc | 77 ++++++----- od-win32/win32.h | 2 +- od-win32/win32gui.c | 247 ++++++++++++++++++++++------------ 7 files changed, 267 insertions(+), 157 deletions(-) diff --git a/cfgfile.c b/cfgfile.c index 7d7c9bc1..1a8aa732 100755 --- a/cfgfile.c +++ b/cfgfile.c @@ -1940,9 +1940,9 @@ static void buildin_default_prefs_68020 (struct uae_prefs *p) static void buildin_default_prefs (struct uae_prefs *p) { - p->nr_floppies = 1; + p->nr_floppies = 2; p->dfxtype[0] = 0; - p->dfxtype[1] = -1; + p->dfxtype[1] = 0; p->dfxtype[2] = -1; p->dfxtype[3] = -1; @@ -2006,7 +2006,7 @@ static void set_68000_compa (struct uae_prefs *p, int compa) } } -static int bip_a1000 (struct uae_prefs *p, int config, int compa) +static int bip_a1000 (struct uae_prefs *p, int config, int compa, int romcheck) { int rom[4]; @@ -2018,64 +2018,69 @@ static int bip_a1000 (struct uae_prefs *p, int config, int compa) if (config == 1) p->chipmem_size = 0x40000; set_68000_compa (p, compa); - return configure_rom (p, rom, 1); + p->dfxtype[1] = -1; + return configure_rom (p, rom, romcheck); } -static int bip_cdtv (struct uae_prefs *p, int config, int compa) +static int bip_cdtv (struct uae_prefs *p, int config, int compa, int romcheck) { int rom[4]; rom[0] = 6; - rom[1] = -1; - if (!configure_rom (p, rom, 1)) + rom[1] = 32; + rom[2] = -1; + if (!configure_rom (p, rom, romcheck)) return 0; rom[0] = 22; rom[1] = 21; rom[2] = 20; rom[3] = -1; - if (!configure_rom (p, rom, 1)) + if (!configure_rom (p, rom, romcheck)) return 0; p->bogomem_size = 0; p->chipmem_size = 0x100000; p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE; + p->dfxtype[1] = -1; set_68000_compa (p, compa); return 1; } -static int bip_cd32 (struct uae_prefs *p, int config, int compa) +static int bip_cd32 (struct uae_prefs *p, int config, int compa, int romcheck) { int rom[2]; buildin_default_prefs_68020 (p); rom[0] = 18; rom[1] = -1; - if (!configure_rom (p, rom, 1)) + if (!configure_rom (p, rom, romcheck)) return 0; rom[0] = 19; - if (!configure_rom (p, rom, 1)) + if (!configure_rom (p, rom, romcheck)) return 0; p->nr_floppies = 0; p->dfxtype[0] = -1; + p->dfxtype[1] = -1; set_68020_compa (p, compa); return 1; } -static int bip_a1200 (struct uae_prefs *p, int config, int compa) +static int bip_a1200 (struct uae_prefs *p, int config, int compa, int romcheck) { - int rom[3]; + int rom[4]; buildin_default_prefs_68020 (p); rom[0] = 11; - rom[1] = 15; - rom[2] = -1; + rom[1] = 31; + rom[2] = 15; + rom[3] = -1; if (config == 1) p->fastmem_size = 0x400000; set_68020_compa (p, compa); - return configure_rom (p, rom, 1); + return configure_rom (p, rom, romcheck); } -static int bip_a600 (struct uae_prefs *p, int config, int compa) +static int bip_a600 (struct uae_prefs *p, int config, int compa, int romcheck) { int rom[5]; @@ -2088,10 +2093,10 @@ static int bip_a600 (struct uae_prefs *p, int config, int compa) p->chipmem_size = 0x100000; p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE; set_68000_compa (p, compa); - return configure_rom (p, rom, 1); + return configure_rom (p, rom, romcheck); } -static int bip_a500 (struct uae_prefs *p, int config, int compa) +static int bip_a500 (struct uae_prefs *p, int config, int compa, int romcheck) { int rom[4]; @@ -2100,14 +2105,18 @@ static int bip_a500 (struct uae_prefs *p, int config, int compa) { case 0: // KS 1.3, ECS Agnus, 0.5M Chip + 0.5M Slow rom[0] = 6; + rom[1] = 32; break; case 1: // KS 1.3, OCS Agnus, 0.5M Chip rom[0] = 6; + rom[1] = 32; p->bogomem_size = 0; p->chipset_mask = 0; + p->dfxtype[1] = -1; break; case 2: // KS 1.3, ECS Agnus, 1.0M Chip rom[0] = 6; + rom[1] = 32; p->bogomem_size = 0; p->chipmem_size = 0x100000; break; @@ -2117,6 +2126,7 @@ static int bip_a500 (struct uae_prefs *p, int config, int compa) rom[2] = 3; p->bogomem_size = 0; p->chipset_mask = 0; + p->dfxtype[1] = -1; break; case 4: // KS 1.2, OCS Agnus, 0.5M Chip + 0.5M Slow rom[0] = 5; @@ -2126,28 +2136,28 @@ static int bip_a500 (struct uae_prefs *p, int config, int compa) break; } set_68000_compa (p, compa); - return configure_rom (p, rom, 1); + return configure_rom (p, rom, romcheck); } -int build_in_prefs (struct uae_prefs *p, int model, int config, int compa) +int build_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck) { - if (model > 5) + if (model > 4) return 1; buildin_default_prefs (p); switch (model) { case 0: - return bip_a500 (p, config, compa); + return bip_a500 (p, config, compa, romcheck); + //case 1: + //return bip_a600 (p, config, compa, romcheck); case 1: - return bip_a600 (p, config, compa); + return bip_a1000 (p, config, compa, romcheck); case 2: - return bip_a1000 (p, config, compa); + return bip_a1200 (p, config, compa, romcheck); case 3: - return bip_a1200 (p, config, compa); + return bip_cd32 (p, config, compa, romcheck); case 4: - return bip_cd32 (p, config, compa); - case 5: - return bip_cdtv (p, config, compa); + return bip_cdtv (p, config, compa, romcheck); } return 0; } \ No newline at end of file diff --git a/include/options.h b/include/options.h index 20d98e66..2c8fd487 100755 --- a/include/options.h +++ b/include/options.h @@ -8,8 +8,8 @@ */ #define UAEMAJOR 0 -#define UAEMINOR 8 -#define UAESUBREV 28 +#define UAEMINOR 9 +#define UAESUBREV 90 typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; @@ -257,7 +257,7 @@ extern int cfgfile_get_description (const char *filename, char *description, int extern void cfgfile_show_usage (void); extern uae_u32 cfgfile_uaelib(int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen); extern void cfgfile_addcfgparam (char *); -extern int build_in_prefs (struct uae_prefs *p, int model, int config, int compa); +extern int build_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck); extern void fixup_prefs_dimensions (struct uae_prefs *prefs); diff --git a/memory.c b/memory.c index bb87c8b6..375f2c10 100755 --- a/memory.c +++ b/memory.c @@ -100,6 +100,7 @@ static struct romdata roms[] = { { "Kickstart v1.2", 33, 166, 0x0ed783d0, 262144, 4, 68000, ROMTYPE_KICK }, { "Kickstart v1.2", 33, 180, 0xa6ce1636, 262144, 5, 68000, ROMTYPE_KICK }, { "Kickstart v1.3", 34, 5, 0xc4f0f55f, 262144, 6, 68000, ROMTYPE_KICK }, + { "Kickstart v1.3 (Cloanto)", 34, 5, 0xe0f37258, 262144, 32, 68000, ROMTYPE_KICK }, { "Kickstart v2.04", 37, 175, 0xc3bdb240, 524288, 7, 68000, ROMTYPE_KICK }, { "Kickstart v2.05", 37, 299, 0x83028fb5, 524288, 8, 68000, ROMTYPE_KICK }, @@ -111,6 +112,7 @@ static struct romdata roms[] = { { "Kickstart v3.1", 40, 55, 0x14e93bcc, 524288, 13, 68020, ROMTYPE_KICK }, { "Kickstart v3.1", 40, 63, 0xfc24ae0d, 524288, 14, 68000, ROMTYPE_KICK }, { "Kickstart v3.1", 40, 68, 0x1483a091, 524288, 15, 68020, ROMTYPE_KICK }, + { "Kickstart v3.1 (Cloanto)", 40, 68, 0x43b6dd22, 524288, 31, 68020, ROMTYPE_KICK }, { "Kickstart v3.1", 40, 68, 0xd6bae334, 524288, 16, 68020, ROMTYPE_KICK }, { "Kickstart v3.1", 40, 70, 0x917100a0, 524288, 17, 68020, ROMTYPE_KICK }, @@ -1123,7 +1125,7 @@ void decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size, uae_u8 *key, i uae_u8 *load_keyfile (struct uae_prefs *p, char *path, int *size) { struct zfile *f; - uae_u8 *keybuf; + uae_u8 *keybuf = 0; int keysize = 0; char tmp[MAX_PATH]; @@ -1153,9 +1155,11 @@ uae_u8 *load_keyfile (struct uae_prefs *p, char *path, int *size) if (f) { zfile_fseek (f, 0, SEEK_END); keysize = zfile_ftell (f); - zfile_fseek (f, 0, SEEK_SET); - keybuf = malloc (keysize); - zfile_fread (keybuf, 1, keysize, f); + if (keysize > 0) { + zfile_fseek (f, 0, SEEK_SET); + keybuf = malloc (keysize); + zfile_fread (keybuf, 1, keysize, f); + } zfile_fclose (f); } *size = keysize; diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 264b8040..7fc725d6 100755 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -677,9 +677,19 @@ #define IDC_QUICKSTART_COMPATIBILITY 1676 #define IDC_QUICKSTART_CONFIG 1677 #define IDC_DF0Q 1678 +#define IDC_DF0QQ 1678 #define IDC_DF1Q 1679 #define IDC_QUICKSTART_HOSTCONFIG 1679 +#define IDC_DF1QQ 1680 #define IDC_CONFIGAUTO 1682 +#define IDC_DF0TEXTQ 1683 +#define IDC_DF0WPQ 1684 +#define IDC_EJECT0Q 1685 +#define IDC_DF1WPQ 1686 +#define IDC_EJECT1Q 1687 +#define IDC_DF1TEXTQ 1688 +#define IDC_DF0Q2 1689 +#define IDC_DF1Q2 1690 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 @@ -700,7 +710,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 198 #define _APS_NEXT_COMMAND_VALUE 40020 -#define _APS_NEXT_CONTROL_VALUE 1683 +#define _APS_NEXT_CONTROL_VALUE 1691 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index f12651cb..d8a4f66a 100755 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -31,36 +31,32 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Dialog // -IDD_KICKSTART DIALOGEX 0, 0, 300, 176 +IDD_KICKSTART DIALOGEX 0, 0, 300, 138 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTEXTHELP FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - GROUPBOX "ROM Settings:",-1,5,12,290,96 - RTEXT "Boot ROM File:",IDC_ROMTEXT,10,27,75,10 - COMBOBOX IDC_ROMFILE,89,24,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | + GROUPBOX "ROM Settings:",-1,5,0,290,74 + RTEXT "Boot ROM File:",IDC_ROMTEXT,10,15,75,10 + COMBOBOX IDC_ROMFILE,89,12,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_KICKCHOOSER,280,22,10,15 - RTEXT "Key File:",IDC_KEYTEXT,10,48,75,10 - COMBOBOX IDC_KEYFILE,89,45,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | + PUSHBUTTON "...",IDC_KICKCHOOSER,280,10,10,15 + RTEXT "Extended ROM File:",IDC_ROMFILE2TEXT,10,35,75,10 + COMBOBOX IDC_ROMFILE2,89,31,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_KEYCHOOSER,280,43,10,15 - RTEXT "Extended ROM File:",IDC_ROMFILE2TEXT,10,68,75,10 - COMBOBOX IDC_ROMFILE2,89,64,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | + PUSHBUTTON "...",IDC_ROMCHOOSER2,280,30,10,15 + RTEXT "Cartridge ROM File:",IDC_FLASHTEXT2,8,53,75,10 + COMBOBOX IDC_CARTFILE,89,50,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_ROMCHOOSER2,280,63,10,15 - RTEXT "Cartridge ROM File:",IDC_FLASHTEXT2,8,86,75,10 - COMBOBOX IDC_CARTFILE,89,83,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | - CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_CARTCHOOSER,280,83,10,15 - GROUPBOX "Misc settings:",-1,5,112,290,57 - RTEXT "Flash RAM File:",IDC_FLASHTEXT,8,126,75,10 - EDITTEXT IDC_FLASHFILE,89,124,185,15,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_FLASHCHOOSER,280,124,10,15 + PUSHBUTTON "...",IDC_CARTCHOOSER,280,50,10,15 + GROUPBOX "Misc settings:",-1,5,76,290,57 + RTEXT "Flash RAM File:",IDC_FLASHTEXT,8,90,75,10 + EDITTEXT IDC_FLASHFILE,89,88,185,15,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_FLASHCHOOSER,280,88,10,15 CONTROL "MAPROM emulation",IDC_MAPROM,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,104,150,80,10 + WS_TABSTOP,104,114,80,10 CONTROL "ShapeShifter support",IDC_KICKSHIFTER,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,196,150,80,10 + BS_AUTOCHECKBOX | WS_TABSTOP,196,114,80,10 END IDD_DISPLAY DIALOGEX 0, 0, 300, 194 @@ -861,7 +857,7 @@ BEGIN PUSHBUTTON "Clear registry",IDC_RESETREGISTRY,219,182,73,14 END -IDD_QUICKSTART DIALOGEX 0, 0, 300, 223 +IDD_QUICKSTART DIALOGEX 0, 0, 300, 234 STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN @@ -878,23 +874,33 @@ BEGIN RTEXT "Compatibility:",IDC_STATIC,8,70,55,10,SS_CENTERIMAGE COMBOBOX IDC_QUICKSTART_COMPATIBILITY,67,68,225,50, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Disk Drive",IDC_QUICKSTART_DF,5,126,294,60 + GROUPBOX "Disk Drive",IDC_QUICKSTART_DF,5,126,294,87 LTEXT "Disk Drive DF0:",IDC_STATIC,12,141,56,10,SS_CENTERIMAGE - PUSHBUTTON "Select Disk Image",IDC_DF0Q,79,139,84,15 + PUSHBUTTON "Select Disk Image",IDC_DF0QQ,79,138,84,15 RTEXT "Write Protected",IDC_STATIC,168,142,58,10, SS_CENTERIMAGE - CONTROL "",IDC_DF0WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | - WS_TABSTOP,233,139,10,15 - PUSHBUTTON "Eject",IDC_EJECT0,248,139,30,15 - PUSHBUTTON "...",IDC_DF0,282,139,10,15 - COMBOBOX IDC_DF0TEXT,11,157,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | - WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | + WS_TABSTOP,233,140,10,15 + PUSHBUTTON "Eject",IDC_EJECT0Q,248,139,30,15 + PUSHBUTTON "...",IDC_DF0Q2,282,139,10,15 + COMBOBOX IDC_DF0TEXTQ,11,157,282,75,CBS_DROPDOWN | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_DF1TEXTQ,11,193,282,75,CBS_DROPDOWN | + CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | + WS_TABSTOP,233,176,10,15 + PUSHBUTTON "Eject",IDC_EJECT1Q,248,175,30,15 + PUSHBUTTON "...",IDC_DF1Q2,282,175,10,15 CONTROL "Start in Quickstart-mode",IDC_QUICKSTARTMODE,"Button", - BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,202,212,94,10 + BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,202,221,94,10 COMBOBOX IDC_QUICKSTART_HOSTCONFIG,67,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Host configuration",IDC_QUICKSTART_HOST,5,91,294,33 RTEXT "Configuration:",IDC_STATIC,7,105,55,10,SS_CENTERIMAGE + LTEXT "Disk Drive DF1:",IDC_STATIC,12,179,56,10,SS_CENTERIMAGE + PUSHBUTTON "Select Disk Image",IDC_DF1QQ,79,175,84,15 + RTEXT "Write Protected",IDC_STATIC,168,178,58,10, + SS_CENTERIMAGE END @@ -958,8 +964,8 @@ IDI_MEMORY ICON "chip.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,8,28,0 - PRODUCTVERSION 0,8,28,0 + FILEVERSION 0,9,90,0 + PRODUCTVERSION 0,9,90,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -975,12 +981,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "WinUAE" - VALUE "FileVersion", "0.8.28" + VALUE "FileVersion", "0.9.90" VALUE "InternalName", "WinUAE" VALUE "LegalCopyright", "© 1996-2004 under the GNU Public License (GPL)" VALUE "OriginalFilename", "WinUAE.exe" VALUE "ProductName", "WinUAE" - VALUE "ProductVersion", "0.8.28" + VALUE "ProductVersion", "0.9.90" END END BLOCK "VarFileInfo" @@ -1050,6 +1056,7 @@ BEGIN IDD_QUICKSTART, DIALOG BEGIN RIGHTMARGIN, 299 + BOTTOMMARGIN, 223 END END #endif // APSTUDIO_INVOKED diff --git a/od-win32/win32.h b/od-win32/win32.h index 4aacb372..37167e74 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -21,7 +21,7 @@ extern int manual_painting_needed; extern int manual_palette_refresh_needed; extern int mouseactive, focus; #define WINUAEBETA 1 -#define WINUAEBETASTR " Beta 1" +#define WINUAEBETASTR " Beta 1.5" extern void my_kbd_handler (int, int, int); extern void clearallkeys(void); diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index 2cf4b5e8..609de182 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -77,6 +77,7 @@ static int full_property_sheet = 1; static struct uae_prefs *pguiprefs; struct uae_prefs workprefs; static int currentpage; +static int qs_request_reset; int gui_active; extern HWND (WINAPI *pHtmlHelp)(HWND, LPCSTR, UINT, LPDWORD ); @@ -220,11 +221,7 @@ static void show_rom_list (void) if (listrom (roms)) strcat (p, "available"); else strcat (p, "unavailable"); strcat (p, "\nAmiga 500 Kickstart 1.3: "); - roms[0] = 6; roms[1] = -1; - if (listrom (roms)) strcat (p, "available"); else strcat (p, "unavailable"); - - strcat (p, "\nAmiga 500+/600: "); - roms[0] = 7; roms[1] = 8; roms[2] = 9; roms[3] = 10; roms[4] = -1; + roms[0] = 6; roms[1] = 32; roms[2] = -1; if (listrom (roms)) strcat (p, "available"); else strcat (p, "unavailable"); strcat (p, "\nAmiga 1000: "); @@ -232,7 +229,7 @@ static void show_rom_list (void) if (listrom (roms)) strcat (p, "available"); else strcat (p, "unavailable"); strcat (p, "\nAmiga 1200: "); - roms[0] = 11; roms[1] = 15; roms[2] = -1; + roms[0] = 11; roms[1] = 31; roms[2] = 15; roms[3] = -1; if (listrom (roms)) strcat (p, "available"); else strcat (p, "unavailable"); ok = 0; @@ -249,7 +246,7 @@ static void show_rom_list (void) strcat (p, "\nCDTV: "); roms[0] = 20; roms[1] = 21; roms[2] = 22; roms[3] = -1; if (listrom (roms)) { - roms[0] = 6; roms[1] = -1; + roms[0] = 6; roms[1] = 32; roms[2] = -1; if (listrom (roms)) ok = 1; } @@ -747,12 +744,15 @@ int DiskSelection( HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, SetDlgItemText (hDlg, wParam, full_path); break; case IDC_DF0: - case IDC_DF0Q: + case IDC_DF0QQ: + case IDC_DF0Q2: SetDlgItemText (hDlg, IDC_DF0TEXT, full_path); strcpy( prefs->df[0], full_path ); DISK_history_add (full_path, -1); break; case IDC_DF1: + case IDC_DF1QQ: + case IDC_DF1Q2: SetDlgItemText (hDlg, IDC_DF1TEXT, full_path); strcpy( prefs->df[1], full_path ); DISK_history_add (full_path, -1); @@ -802,9 +802,6 @@ int DiskSelection( HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, case IDC_ROMFILE2: strcpy( workprefs.romextfile, full_path ); break; - case IDC_KEYFILE: - strcpy( workprefs.keyfile, full_path ); - break; case IDC_FLASHFILE: strcpy( workprefs.flashfile, full_path ); break; @@ -834,16 +831,6 @@ int DiskSelection( HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, RegSetValueEx( hWinUAEKey, "hdfPath", 0, REG_SZ, (CONST BYTE *)openFileName.lpstrFile, strlen( openFileName.lpstrFile ) + 1 ); } } - else if( flag == 6 || flag == 7 ) - { - amiga_path = strstr( openFileName.lpstrFile, openFileName.lpstrFileTitle ); - if( amiga_path && amiga_path != openFileName.lpstrFile ) - { - *amiga_path = 0; - if( hWinUAEKey ) - RegSetValueEx( hWinUAEKey, "KickstartPath", 0, REG_SZ, (CONST BYTE *)openFileName.lpstrFile, strlen( openFileName.lpstrFile ) + 1 ); - } - } } return result; } @@ -1008,10 +995,18 @@ static struct ConfigStruct *GetConfigs (struct ConfigStruct *configparent, int u if (strcmp (find_data.cFileName, ".") && strcmp (find_data.cFileName, "..")) { int ok = 0; config = AllocConfigStruct (); + strcpy (config->Path, shortpath); + strcpy (config->Fullpath, path); if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && usedirs) { if ((*level) < 2) { struct ConfigStruct *child; strcpy (config->Name, find_data.cFileName); + strcpy (config->Path, shortpath); + strcat (config->Path, config->Name); + strcat (config->Path, "\\"); + strcpy (config->Fullpath, path); + strcat (config->Fullpath, config->Name); + strcat (config->Fullpath, "\\"); config->Directory = 1; (*level)++; config->Parent = configparent; @@ -1046,8 +1041,6 @@ static struct ConfigStruct *GetConfigs (struct ConfigStruct *configparent, int u config->host = configparent->host; config->hardware = configparent->hardware; } - strcpy (config->Path, shortpath); - strcpy (config->Fullpath, path); config->Parent = configparent; if (configstore == NULL || configstoreallocated == configstoresize) { configstoreallocated += 100; @@ -1755,6 +1748,23 @@ static void checkautoload (HWND hDlg, struct ConfigStruct *config) EnableWindow (GetDlgItem (hDlg, IDC_CONFIGAUTO), configtypepanel > 0 && config && !config->Directory ? TRUE : FALSE); } +static struct ConfigStruct *fixloadconfig (HWND hDlg, struct ConfigStruct *config) +{ + int i; + + if ((!config && configtypepanel) || (config && (configtypepanel == 2 && !config->host) || (configtypepanel == 1 && !config->hardware))) { + for (i = 0; i < configstoresize; i++) { + struct ConfigStruct *cs = configstore[i]; + if (cs->Directory && ((configtypepanel == 1 && cs->hardware) || (configtypepanel == 2 && cs->host))) { + config = cs; + SetDlgItemText (hDlg, IDC_EDITPATH, config->Path); + break; + } + } + } + return config; +} + static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { char name_buf[MAX_DPATH]; @@ -1789,6 +1799,7 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM } checkautoload (hDlg, config); } + config = fixloadconfig (hDlg, config); if (config && config->item) TreeView_SelectItem (GetDlgItem(hDlg, IDC_CONFIGTREE), config->item); else @@ -1807,6 +1818,7 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM HandleConfiguration (hDlg, CONFIG_SAVE_FULL, config); recursive++; config = CreateConfigStore (config); + config = fixloadconfig (hDlg, config); InitializeConfigTreeView (hDlg); recursive--; break; @@ -1814,6 +1826,7 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM HandleConfiguration (hDlg, CONFIG_SAVE, config); recursive++; config = CreateConfigStore (config); + config = fixloadconfig (hDlg, config); InitializeConfigTreeView (hDlg); recursive--; break; @@ -1841,6 +1854,7 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM HandleConfiguration (hDlg, CONFIG_DELETE, config); recursive++; config = CreateConfigStore (config); + config = fixloadconfig (hDlg, config); InitializeConfigTreeView (hDlg); recursive--; break; @@ -1900,8 +1914,9 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case TVN_SELCHANGED: { LPNMTREEVIEW tv = (LPNMTREEVIEW)lParam; - config = (struct ConfigStruct*)tv->itemNew.lParam; - if (config) { + struct ConfigStruct *c = (struct ConfigStruct*)tv->itemNew.lParam; + if (c) { + config = c; if (!config->Directory) { SetDlgItemText (hDlg, IDC_EDITNAME, config->Name); SetDlgItemText (hDlg, IDC_EDITDESCRIPTION, config->Description); @@ -1909,9 +1924,9 @@ static BOOL CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemText (hDlg, IDC_EDITPATH, config->Path); } if (configtypepanel > 0) { - if (config && !config->Directory) + if (c && !c->Directory) ConfigToRegistry (config, configtypepanel); - checkautoload (hDlg, config); + checkautoload (hDlg, c); } return TRUE; } @@ -2125,10 +2140,9 @@ static BOOL CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP if (DirectorySelection (hDlg, 0, tmp)) { if (tmp[strlen (tmp) - 1] != '\\') strcat (tmp, "\\"); - if (scan_roms (tmp)) - set_path ("KickstartPath", tmp); - else + if (!scan_roms (tmp)) pre_gui_message ("No ROMs found"); + set_path ("KickstartPath", tmp); values_to_pathsdialog (hDlg); } break; @@ -2191,11 +2205,13 @@ static struct amigamodels amodels[] = { "Medium compatibility (recommended for most users)", "Low compatiblity (for PCs with low CPU power)" }, +/* { "A500+/A600", "High compatibility (>1.5GHz recommended)", "Medium compatibility (recommended for most users)", "Low compatiblity (for PCs with low CPU power)" }, +*/ { "A1000", "High compatibility (>1.5GHz recommended)", "Medium compatibility (recommended for most users)", @@ -2231,17 +2247,18 @@ static struct amigaconfig aconf[] = { { 0, "", "KS 1.2, OCS Agnus, 0.5M Chip" }, { 0, "", "KS 1.2, OCS Agnus, 0.5M Chip + 0.5M Slow" }, +/* { 1, "", "1.0M Chip" }, +*/ + { 1, "", "0.5M Chip" }, + { 1, "", "256K Chip" }, - { 2, "", "0.5M Chip" }, - { 2, "", "256K Chip" }, - - { 3, "", "2.0M Chip" }, - { 3, "", "2.0M Chip + 4.0M Fast" }, + { 2, "", "2.0M Chip" }, + { 2, "", "2.0M Chip + 4.0M Fast" }, - { 4, "", "CD32" }, + { 3, "", "CD32" }, - { 5, "", "CDTV" }, + { 4, "", "CDTV" }, { -1 } }; @@ -2253,15 +2270,13 @@ static void addfloppytype (HWND hDlg, int n); static void enable_for_quickstart (HWND hDlg) { int v = quickstart_ok && quickstart_ok_floppy ? TRUE : FALSE; - EnableWindow (GetDlgItem (guiDlg, IDOK), v); - EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), v); + EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), v && !full_property_sheet ? TRUE : FALSE); } -static void load_quickstart (HWND hDlg) +static void load_quickstart (HWND hDlg, int romcheck) { - EnableWindow (GetDlgItem (guiDlg, IDOK), FALSE); EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), FALSE); - quickstart_ok = build_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa); + quickstart_ok = build_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa, romcheck); enable_for_quickstart (hDlg); addfloppytype (hDlg, 0); addfloppytype (hDlg, 1); @@ -2288,8 +2303,6 @@ static void init_quickstartdlg (HWND hDlg) qssize = sizeof (tmp1); RegQueryValueEx (hWinUAEKey, "QuickStartHostConfig", 0, &dwType, (LPBYTE)tmp1, &qssize); if (firsttime == 0) { - quickstarthost (hDlg, tmp1); - load_quickstart (hDlg); if (hWinUAEKey) { qssize = sizeof (quickstart_model); RegQueryValueEx (hWinUAEKey, "QuickStartModel", 0, &dwType, (LPBYTE)&quickstart_model, &qssize); @@ -2298,7 +2311,15 @@ static void init_quickstartdlg (HWND hDlg) qssize = sizeof (quickstart_compa); RegQueryValueEx (hWinUAEKey, "QuickStartCompatibility", 0, &dwType, (LPBYTE)&quickstart_compa, &qssize); } - firsttime = 1; + if (quickstart) { + quickstarthost (hDlg, tmp1); + workprefs.df[0][0] = 0; + workprefs.df[1][0] = 0; + workprefs.df[2][0] = 0; + workprefs.df[3][0] = 0; + load_quickstart (hDlg, 1); + } + firsttime = 1; } CheckDlgButton (hDlg, IDC_QUICKSTARTMODE, quickstart); @@ -2364,6 +2385,10 @@ static void testimage (HWND hDlg) int reload = 0; quickstart_ok_floppy = 0; + if (workprefs.dfxtype[0] < 0) { + quickstart_ok_floppy = 1; + return; + } if (!workprefs.df[0][0]) return; ret = DISK_examine_image (&workprefs, 0); @@ -2376,15 +2401,15 @@ static void testimage (HWND hDlg) break; case 11: quickstart_ok_floppy = 1; - if (quickstart_model < 1) { - quickstart_model = 1; + if (quickstart_model != 2) { + quickstart_model = 2; pre_gui_message ("Selected disk image requires Kickstart 2.04 or 3.0\nConfiguration updated"); reload = 1; } break; case 12: quickstart_ok_floppy = 1; - if (quickstart_model < 2) { + if (quickstart_model != 2) { quickstart_model = 2; pre_gui_message ("Selected disk image requires Kickstart 3.0 or later\nConfiguration updated"); reload = 1; @@ -2401,7 +2426,7 @@ static void testimage (HWND hDlg) break; } if (reload) { - load_quickstart (hDlg); + load_quickstart (hDlg, 1); init_quickstartdlg (hDlg); } } @@ -2414,6 +2439,7 @@ static BOOL CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR int val, ret = FALSE; char tmp[MAX_DPATH]; static char df0[MAX_DPATH]; + static int dfxtype[2] = { -1, -1 }; switch( msg ) { @@ -2437,9 +2463,9 @@ static BOOL CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR if (val != CB_ERR && val != quickstart_model) { quickstart_model = val; init_quickstartdlg (hDlg); - load_quickstart (hDlg); + load_quickstart (hDlg, 1); if (quickstart && !full_property_sheet) - uae_reset (1); + qs_request_reset = 2; } break; case IDC_QUICKSTART_CONFIGURATION: @@ -2447,16 +2473,17 @@ static BOOL CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR if (val != CB_ERR && val != quickstart_conf) { quickstart_conf = val; init_quickstartdlg (hDlg); - load_quickstart (hDlg); + load_quickstart (hDlg, 1); if (quickstart && !full_property_sheet) - uae_reset (1); + qs_request_reset = 2; } break; case IDC_QUICKSTART_COMPATIBILITY: val = SendDlgItemMessage (hDlg, IDC_QUICKSTART_COMPATIBILITY, CB_GETCURSEL, 0, 0L); if (val != CB_ERR) { quickstart_compa = val; - load_quickstart (hDlg); + init_quickstartdlg (hDlg); + load_quickstart (hDlg, 0); } break; case IDC_QUICKSTART_HOSTCONFIG: @@ -2476,28 +2503,34 @@ static BOOL CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR quickstart = IsDlgButtonChecked (hDlg, IDC_QUICKSTARTMODE); if (hWinUAEKey) RegSetValueEx( hWinUAEKey, "QuickStartMode", 0, REG_DWORD, (CONST BYTE *)&quickstart, sizeof(quickstart)); + if (quickstart) { + init_quickstartdlg (hDlg); + load_quickstart (hDlg, 0); + } break; } } switch (LOWORD (wParam)) { - case IDC_DF0TEXT: - case IDC_DF0WP: - case IDC_EJECT0: - case IDC_DF0: - case IDC_DF0Q: - case IDC_DF1TEXT: - case IDC_DF1WP: - case IDC_EJECT1: - case IDC_DF1: - case IDC_DF1Q: + case IDC_DF0TEXTQ: + case IDC_DF0WPQ: + case IDC_EJECT0Q: + case IDC_DF0QQ: + case IDC_DF0Q2: + case IDC_DF1TEXTQ: + case IDC_DF1WPQ: + case IDC_EJECT1Q: + case IDC_DF1QQ: + case IDC_DF1Q2: ret = FloppyDlgProc (hDlg, msg, wParam, lParam); break; } recursive--; } - if (strcmp (workprefs.df[0], df0)) { + if (strcmp (workprefs.df[0], df0) || workprefs.dfxtype[0] != dfxtype[0] || workprefs.dfxtype[1] != dfxtype[1]) { strcpy (df0, workprefs.df[0]); + dfxtype[0] = workprefs.dfxtype[0]; + dfxtype[1] = workprefs.dfxtype[1]; testimage (hDlg); enable_for_quickstart (hDlg); } @@ -2515,7 +2548,7 @@ static void init_aboutdlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat); CharFormat.dwMask |= CFM_BOLD | CFM_SIZE | CFM_FACE; CharFormat.dwEffects = CFE_BOLD; - CharFormat.yHeight = 18 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */ + CharFormat.yHeight = 18 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */ strcpy (CharFormat.szFaceName, "Times New Roman"); SendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat); @@ -3456,7 +3489,6 @@ static void values_from_kickstartdlg (HWND hDlg) { getromfile (hDlg, IDC_ROMFILE, workprefs.romfile, sizeof (workprefs.romfile)); getromfile (hDlg, IDC_ROMFILE2, workprefs.romextfile, sizeof (workprefs.romextfile)); - getromfile (hDlg, IDC_KEYFILE, workprefs.keyfile, sizeof (workprefs.keyfile)); getromfile (hDlg, IDC_CARTFILE, workprefs.cartfile, sizeof (workprefs.cartfile)); } @@ -3472,7 +3504,6 @@ static void values_to_kickstartdlg (HWND hDlg) keybuf = load_keyfile (&workprefs, NULL, &keysize); addromfiles (fkey, hDlg, IDC_ROMFILE, workprefs.romfile, keybuf, keysize, ROMTYPE_KICK | ROMTYPE_KICKCD32); addromfiles (fkey, hDlg, IDC_ROMFILE2, workprefs.romextfile, keybuf, keysize, ROMTYPE_EXTCD32 | ROMTYPE_EXTCDTV); - addromfiles (fkey, hDlg, IDC_KEYFILE, workprefs.keyfile, keybuf, keysize, ROMTYPE_KEY); addromfiles (fkey, hDlg, IDC_CARTFILE, workprefs.cartfile, keybuf, keysize, ROMTYPE_AR); free_keyfile (keybuf); if (fkey) @@ -3533,7 +3564,6 @@ static BOOL CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARA { case IDC_ROMFILE: case IDC_ROMFILE2: - case IDC_KEYFILE: case IDC_CARTFILE: values_from_kickstartdlg (hDlg); break; @@ -3551,11 +3581,6 @@ static BOOL CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARA values_to_kickstartdlg (hDlg); break; - case IDC_KEYCHOOSER: - DiskSelection( hDlg, IDC_KEYFILE, 7, &workprefs, 0); - values_to_kickstartdlg (hDlg); - break; - case IDC_FLASHCHOOSER: DiskSelection( hDlg, IDC_FLASHFILE, 11, &workprefs, 0); values_to_kickstartdlg (hDlg); @@ -4999,11 +5024,17 @@ static void out_floppyspeed (HWND hDlg) #define BUTTONSPERFLOPPY 6 static int floppybuttons[][BUTTONSPERFLOPPY] = { - { IDC_DF0TEXT,IDC_DF0,IDC_EJECT0,IDC_DF0TYPE,IDC_DF0WP,IDC_DF0Q }, + { IDC_DF0TEXT,IDC_DF0,IDC_EJECT0,IDC_DF0TYPE,IDC_DF0WP,-1 }, { IDC_DF1TEXT,IDC_DF1,IDC_EJECT1,IDC_DF1TYPE,IDC_DF1WP,-1 }, { IDC_DF2TEXT,IDC_DF2,IDC_EJECT2,IDC_DF2TYPE,IDC_DF2WP,-1 }, { IDC_DF3TEXT,IDC_DF3,IDC_EJECT3,IDC_DF3TYPE,IDC_DF3WP,-1 } }; +static int floppybuttonsq[][BUTTONSPERFLOPPY] = { + { IDC_DF0TEXTQ,IDC_DF0Q2,IDC_EJECT0Q,-1,IDC_DF0WPQ,IDC_DF0QQ }, + { IDC_DF1TEXTQ,IDC_DF1Q2,IDC_EJECT1Q,-1,IDC_DF1WPQ,IDC_DF1QQ }, + { -1,-1,-1,-1,-1,-1 }, + { -1,-1,-1,-1,-1,-1 } +}; static void addfloppytype (HWND hDlg, int n) { @@ -5012,9 +5043,15 @@ static void addfloppytype (HWND hDlg, int n) int f_eject = floppybuttons[n][2]; int f_type = floppybuttons[n][3]; int f_wp = floppybuttons[n][4]; - int f_driveq = floppybuttons[n][5]; + + int f_textq = floppybuttonsq[n][0]; + int f_driveq = floppybuttonsq[n][1]; + int f_ejectq = floppybuttonsq[n][2]; + int f_wpq = floppybuttonsq[n][4]; + int f_driveqq = floppybuttonsq[n][5]; + int nn = workprefs.dfxtype[n] + 1; - int state, i; + int state, i, chk; char *s; HKEY fkey; char tmp[1000]; @@ -5026,27 +5063,48 @@ static void addfloppytype (HWND hDlg, int n) SendDlgItemMessage (hDlg, f_type, CB_SETCURSEL, nn, 0); EnableWindow(GetDlgItem(hDlg, f_text), state); + if (f_textq >= 0) + EnableWindow(GetDlgItem(hDlg, f_textq), state); EnableWindow(GetDlgItem(hDlg, f_eject), TRUE); + if (f_ejectq >= 0) + EnableWindow(GetDlgItem(hDlg, f_ejectq), TRUE); EnableWindow(GetDlgItem(hDlg, f_drive), state); if (f_driveq >= 0) EnableWindow(GetDlgItem(hDlg, f_driveq), state); - CheckDlgButton(hDlg, f_wp, disk_getwriteprotect (workprefs.df[n]) && state == TRUE ? BST_CHECKED : 0); - EnableWindow(GetDlgItem(hDlg, f_wp), state && DISK_validate_filename (workprefs.df[n], 0, 0) ? TRUE : FALSE); + if (f_driveqq >= 0) + EnableWindow(GetDlgItem(hDlg, f_driveqq), state); + chk = disk_getwriteprotect (workprefs.df[n]) && state == TRUE ? BST_CHECKED : 0; + CheckDlgButton(hDlg, f_wp, chk); + if (f_wpq >= 0) + CheckDlgButton(hDlg, f_wpq, chk); + chk = state && DISK_validate_filename (workprefs.df[n], 0, 0) ? TRUE : FALSE; + EnableWindow(GetDlgItem(hDlg, f_wp), chk); + if (f_wpq >= 0) + EnableWindow(GetDlgItem(hDlg, f_wpq), chk); fkey = read_disk_history (); SendDlgItemMessage(hDlg, f_text, CB_RESETCONTENT, 0, 0); SendDlgItemMessage(hDlg, f_text, WM_SETTEXT, 0, (LPARAM)workprefs.df[n]); + if (f_textq >= 0) { + SendDlgItemMessage(hDlg, f_textq, CB_RESETCONTENT, 0, 0); + SendDlgItemMessage(hDlg, f_textq, WM_SETTEXT, 0, (LPARAM)workprefs.df[n]); + } i = 0; while (s = DISK_history_get (i)) { i++; SendDlgItemMessage(hDlg, f_text, CB_ADDSTRING, 0, (LPARAM)s); + if (f_textq >= 0) + SendDlgItemMessage(hDlg, f_textq, CB_ADDSTRING, 0, (LPARAM)s); if (fkey) { sprintf (tmp, "Image%02d", i); RegSetValueEx(fkey, tmp, 0, REG_SZ, (CONST BYTE *)s, strlen(s) + 1); } - if (!strcmp (workprefs.df[n], s)) + if (!strcmp (workprefs.df[n], s)) { SendDlgItemMessage (hDlg, f_text, CB_SETCURSEL, i - 1, 0); + if (f_textq >= 0) + SendDlgItemMessage (hDlg, f_textq, CB_SETCURSEL, i - 1, 0); + } if (nn <= 0) break; } @@ -5068,7 +5126,7 @@ static void getfloppytype (HWND hDlg, int n) static void getfloppyname (HWND hDlg, int n) { int val; - int f_text = floppybuttons[n][0]; + int f_text = currentpage == QUICKSTART_ID ? floppybuttonsq[n][0] : floppybuttons[n][0]; char tmp[1000]; tmp[0] = 0; @@ -5143,6 +5201,8 @@ static BOOL CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l SetDlgItemText (hDlg, IDC_DF1TEXT, workprefs.df[1]); SetDlgItemText (hDlg, IDC_DF2TEXT, workprefs.df[2]); SetDlgItemText (hDlg, IDC_DF3TEXT, workprefs.df[3]); + SetDlgItemText (hDlg, IDC_DF0TEXTQ, workprefs.df[0]); + SetDlgItemText (hDlg, IDC_DF1TEXTQ, workprefs.df[1]); SendDlgItemMessage (hDlg, IDC_FLOPPYSPD, TBM_SETPOS, TRUE, workprefs.floppy_speed ? exact_log2 ((workprefs.floppy_speed) / 100) + 1 : 0); out_floppyspeed (hDlg); @@ -5158,10 +5218,12 @@ static BOOL CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l switch (LOWORD (wParam)) { case IDC_DF0TEXT: + case IDC_DF0TEXTQ: getfloppyname (hDlg, 0); addfloppytype (hDlg, 0); break; case IDC_DF1TEXT: + case IDC_DF1TEXTQ: getfloppyname (hDlg, 1); addfloppytype (hDlg, 1); break; @@ -5190,10 +5252,12 @@ static BOOL CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l switch (LOWORD (wParam)) { case IDC_DF0WP: - floppysetwriteprotect (hDlg, 0, IsDlgButtonChecked (hDlg, IDC_DF0WP)); + case IDC_DF0WPQ: + floppysetwriteprotect (hDlg, 0, currentpage == QUICKSTART_ID ? IsDlgButtonChecked (hDlg, IDC_DF0WPQ) : IsDlgButtonChecked (hDlg, IDC_DF0WP)); break; case IDC_DF1WP: - floppysetwriteprotect (hDlg, 1, IsDlgButtonChecked (hDlg, IDC_DF1WP)); + case IDC_DF1WPQ: + floppysetwriteprotect (hDlg, 1, currentpage == QUICKSTART_ID ? IsDlgButtonChecked (hDlg, IDC_DF1WPQ) : IsDlgButtonChecked (hDlg, IDC_DF1WP)); break; case IDC_DF2WP: floppysetwriteprotect (hDlg, 2, IsDlgButtonChecked (hDlg, IDC_DF2WP)); @@ -5202,12 +5266,15 @@ static BOOL CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l floppysetwriteprotect (hDlg, 3, IsDlgButtonChecked (hDlg, IDC_DF3WP)); break; case IDC_DF0: - case IDC_DF0Q: + case IDC_DF0QQ: + case IDC_DF0Q2: DiskSelection (hDlg, wParam, 0, &workprefs, 0); disk_insert (0, workprefs.df[0]); addfloppytype (hDlg, 0); break; case IDC_DF1: + case IDC_DF1QQ: + case IDC_DF1Q2: DiskSelection (hDlg, wParam, 0, &workprefs, 0); disk_insert (1, workprefs.df[1]); addfloppytype (hDlg, 1); @@ -5223,14 +5290,18 @@ static BOOL CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l addfloppytype (hDlg, 3); break; case IDC_EJECT0: + case IDC_EJECT0Q: disk_eject(0); SetDlgItemText (hDlg, IDC_DF0TEXT, ""); + SetDlgItemText (hDlg, IDC_DF0TEXTQ, ""); workprefs.df[0][0] = 0; addfloppytype (hDlg, 0); break; case IDC_EJECT1: + case IDC_EJECT1Q: disk_eject(1); SetDlgItemText (hDlg, IDC_DF1TEXT, ""); + SetDlgItemText (hDlg, IDC_DF1TEXTQ, ""); workprefs.df[1][0] = 0; addfloppytype (hDlg, 1); break; @@ -5393,6 +5464,11 @@ static void enable_for_portsdlg( HWND hDlg ) EnableWindow( GetDlgItem( hDlg, IDC_SER_CTSRTS), FALSE ); EnableWindow( GetDlgItem( hDlg, IDC_SERIAL_DIRECT), FALSE ); EnableWindow( GetDlgItem( hDlg, IDC_SERIAL), FALSE ); +#else + v = workprefs.use_serial ? TRUE : FALSE; + EnableWindow( GetDlgItem( hDlg, IDC_SHARED), v); + EnableWindow( GetDlgItem( hDlg, IDC_SER_CTSRTS), v); + EnableWindow( GetDlgItem( hDlg, IDC_SERIAL_DIRECT), v); #endif #if !defined (PARALLEL_PORT) EnableWindow( GetDlgItem( hDlg, IDC_PRINTERLIST), FALSE ); @@ -6995,7 +7071,10 @@ static int GetSettings (int all_options, HWND hwnd) if (quit_program) psresult = -2; + else if (qs_request_reset && quickstart) + uae_reset (qs_request_reset == 2 ? 1 : 0); + qs_request_reset = 0; full_property_sheet = 0; return psresult; } -- 2.47.3