Changed the MO icons to proper ones, added cassette icons, merged the Floppy drives and CD-ROM drives section of the Settings dialog into one, and changed the configuration file format accordingly with a backward compatibility measure added to correctly load older configuration files.
213
src/config.c
@@ -111,6 +111,9 @@ typedef struct {
|
||||
|
||||
static list_t config_head;
|
||||
|
||||
/* TODO: Backwards compatibility, get rid of this when enough time has passed. */
|
||||
static int backwards_compat = 0;
|
||||
|
||||
|
||||
#ifdef ENABLE_CONFIG_LOG
|
||||
int config_do_log = ENABLE_CONFIG_LOG;
|
||||
@@ -1003,6 +1006,7 @@ load_hard_disks(void)
|
||||
}
|
||||
|
||||
|
||||
/* TODO: Backwards compatibility, get rid of this when enough time has passed. */
|
||||
/* Load "Floppy Drives" section. */
|
||||
static void
|
||||
load_floppy_drives(void)
|
||||
@@ -1012,6 +1016,72 @@ load_floppy_drives(void)
|
||||
wchar_t *wp;
|
||||
int c;
|
||||
|
||||
if (!backwards_compat)
|
||||
return;
|
||||
|
||||
for (c=0; c<FDD_NUM; c++) {
|
||||
sprintf(temp, "fdd_%02i_type", c+1);
|
||||
p = config_get_string(cat, temp, (c < 2) ? "525_2dd" : "none");
|
||||
fdd_set_type(c, fdd_get_from_internal_name(p));
|
||||
if (fdd_get_type(c) > 13)
|
||||
fdd_set_type(c, 13);
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "fdd_%02i_fn", c + 1);
|
||||
wp = config_get_wstring(cat, temp, L"");
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* NOTE:
|
||||
* Temporary hack to remove the absolute
|
||||
* path currently saved in most config
|
||||
* files. We should remove this before
|
||||
* finalizing this release! --FvK
|
||||
*/
|
||||
if (! wcsnicmp(wp, usr_path, wcslen(usr_path))) {
|
||||
/*
|
||||
* Yep, its absolute and prefixed
|
||||
* with the EXE path. Just strip
|
||||
* that off for now...
|
||||
*/
|
||||
wcsncpy(floppyfns[c], &wp[wcslen(usr_path)], sizeof_w(floppyfns[c]));
|
||||
} else
|
||||
#endif
|
||||
wcsncpy(floppyfns[c], wp, sizeof_w(floppyfns[c]));
|
||||
|
||||
/* if (*wp != L'\0')
|
||||
config_log("Floppy%d: %ls\n", c, floppyfns[c]); */
|
||||
sprintf(temp, "fdd_%02i_writeprot", c+1);
|
||||
ui_writeprot[c] = !!config_get_int(cat, temp, 0);
|
||||
config_delete_var(cat, temp);
|
||||
sprintf(temp, "fdd_%02i_turbo", c + 1);
|
||||
fdd_set_turbo(c, !!config_get_int(cat, temp, 0));
|
||||
config_delete_var(cat, temp);
|
||||
sprintf(temp, "fdd_%02i_check_bpb", c+1);
|
||||
fdd_set_check_bpb(c, !!config_get_int(cat, temp, 1));
|
||||
config_delete_var(cat, temp);
|
||||
}
|
||||
|
||||
delete_section_if_empty(cat);
|
||||
}
|
||||
|
||||
|
||||
/* Load "Floppy and CD-ROM Drives" section. */
|
||||
static void
|
||||
load_floppy_and_cdrom_drives(void)
|
||||
{
|
||||
char *cat = "Floppy and CD-ROM drives";
|
||||
char temp[512], tmp2[512], *p;
|
||||
char s[512];
|
||||
unsigned int board = 0, dev = 0;
|
||||
wchar_t *wp;
|
||||
int c, d = 0;
|
||||
|
||||
/* TODO: Backwards compatibility, get rid of this when enough time has passed. */
|
||||
backwards_compat = (find_section(cat) == NULL);
|
||||
|
||||
memset(temp, 0x00, sizeof(temp));
|
||||
for (c=0; c<FDD_NUM; c++) {
|
||||
sprintf(temp, "fdd_%02i_type", c+1);
|
||||
p = config_get_string(cat, temp, (c < 2) ? "525_2dd" : "none");
|
||||
@@ -1072,19 +1142,6 @@ load_floppy_drives(void)
|
||||
config_delete_var(cat, temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Load "Other Removable Devices" section. */
|
||||
static void
|
||||
load_other_removable_devices(void)
|
||||
{
|
||||
char *cat = "Other removable devices";
|
||||
char temp[512], tmp2[512], *p;
|
||||
char s[512];
|
||||
unsigned int board = 0, dev = 0;
|
||||
wchar_t *wp;
|
||||
int c, d = 0;
|
||||
|
||||
memset(temp, 0x00, sizeof(temp));
|
||||
for (c=0; c<CDROM_NUM; c++) {
|
||||
@@ -1179,6 +1236,102 @@ load_other_removable_devices(void)
|
||||
sprintf(temp, "cdrom_%02i_iso_path", c+1);
|
||||
config_delete_var(cat, temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Load "Other Removable Devices" section. */
|
||||
static void
|
||||
load_other_removable_devices(void)
|
||||
{
|
||||
char *cat = "Other removable devices";
|
||||
char temp[512], tmp2[512], *p;
|
||||
char s[512];
|
||||
unsigned int board = 0, dev = 0;
|
||||
wchar_t *wp;
|
||||
int c, d = 0;
|
||||
|
||||
/* TODO: Backwards compatibility, get rid of this when enough time has passed. */
|
||||
if (backwards_compat) {
|
||||
memset(temp, 0x00, sizeof(temp));
|
||||
for (c=0; c<CDROM_NUM; c++) {
|
||||
sprintf(temp, "cdrom_%02i_host_drive", c+1);
|
||||
cdrom[c].host_drive = config_get_int(cat, temp, 0);
|
||||
cdrom[c].prev_host_drive = cdrom[c].host_drive;
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_parameters", c+1);
|
||||
p = config_get_string(cat, temp, NULL);
|
||||
if (p != NULL)
|
||||
sscanf(p, "%01u, %s", &d, s);
|
||||
else
|
||||
sscanf("0, none", "%01u, %s", &d, s);
|
||||
cdrom[c].sound_on = d;
|
||||
cdrom[c].bus_type = hdd_string_to_bus(s, 1);
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_speed", c+1);
|
||||
cdrom[c].speed = config_get_int(cat, temp, 8);
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
/* Default values, needed for proper operation of the Settings dialog. */
|
||||
cdrom[c].ide_channel = cdrom[c].scsi_device_id = c + 2;
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_ide_channel", c+1);
|
||||
if (cdrom[c].bus_type == CDROM_BUS_ATAPI) {
|
||||
sprintf(tmp2, "%01u:%01u", (c+2)>>1, (c+2)&1);
|
||||
p = config_get_string(cat, temp, tmp2);
|
||||
sscanf(p, "%01u:%01u", &board, &dev);
|
||||
board &= 3;
|
||||
dev &= 1;
|
||||
cdrom[c].ide_channel = (board<<1)+dev;
|
||||
|
||||
if (cdrom[c].ide_channel > 7)
|
||||
cdrom[c].ide_channel = 7;
|
||||
} else {
|
||||
sprintf(temp, "cdrom_%02i_scsi_id", c+1);
|
||||
if (cdrom[c].bus_type == CDROM_BUS_SCSI) {
|
||||
cdrom[c].scsi_device_id = config_get_int(cat, temp, c+2);
|
||||
|
||||
if (cdrom[c].scsi_device_id > 15)
|
||||
cdrom[c].scsi_device_id = 15;
|
||||
} else
|
||||
config_delete_var(cat, temp);
|
||||
}
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
sprintf(temp, "cdrom_%02i_image_path", c+1);
|
||||
wp = config_get_wstring(cat, temp, L"");
|
||||
config_delete_var(cat, temp);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* NOTE:
|
||||
* Temporary hack to remove the absolute
|
||||
* path currently saved in most config
|
||||
* files. We should remove this before
|
||||
* finalizing this release! --FvK
|
||||
*/
|
||||
if (! wcsnicmp(wp, usr_path, wcslen(usr_path))) {
|
||||
/*
|
||||
* Yep, its absolute and prefixed
|
||||
* with the EXE path. Just strip
|
||||
* that off for now...
|
||||
*/
|
||||
wcsncpy(cdrom[c].image_path, &wp[wcslen(usr_path)], sizeof_w(cdrom[c].image_path));
|
||||
} else
|
||||
#endif
|
||||
wcsncpy(cdrom[c].image_path, wp, sizeof_w(cdrom[c].image_path));
|
||||
|
||||
if (cdrom[c].host_drive && (cdrom[c].host_drive != 200))
|
||||
cdrom[c].host_drive = 0;
|
||||
|
||||
if ((cdrom[c].host_drive == 0x200) &&
|
||||
(wcslen(cdrom[c].image_path) == 0))
|
||||
cdrom[c].host_drive = 0;
|
||||
}
|
||||
}
|
||||
backwards_compat = 0;
|
||||
|
||||
memset(temp, 0x00, sizeof(temp));
|
||||
for (c=0; c<ZIP_NUM; c++) {
|
||||
@@ -1386,6 +1539,8 @@ config_load(void)
|
||||
load_ports(); /* Ports (COM & LPT) */
|
||||
load_other_peripherals(); /* Other peripherals */
|
||||
load_hard_disks(); /* Hard disks */
|
||||
load_floppy_and_cdrom_drives(); /* Floppy and CD-ROM drives */
|
||||
/* TODO: Backwards compatibility, get rid of this when enough time has passed. */
|
||||
load_floppy_drives(); /* Floppy drives */
|
||||
load_other_removable_devices(); /* Other removable devices */
|
||||
|
||||
@@ -1872,10 +2027,10 @@ save_hard_disks(void)
|
||||
|
||||
/* Save "Floppy Drives" section. */
|
||||
static void
|
||||
save_floppy_drives(void)
|
||||
save_floppy_and_cdrom_drives(void)
|
||||
{
|
||||
char *cat = "Floppy drives";
|
||||
char temp[512];
|
||||
char *cat = "Floppy and CD-ROM drives";
|
||||
char temp[512], tmp2[512];
|
||||
int c;
|
||||
|
||||
for (c=0; c<FDD_NUM; c++) {
|
||||
@@ -1917,18 +2072,6 @@ save_floppy_drives(void)
|
||||
config_set_int(cat, temp, fdd_get_check_bpb(c));
|
||||
}
|
||||
|
||||
delete_section_if_empty(cat);
|
||||
}
|
||||
|
||||
|
||||
/* Save "Other Removable Devices" section. */
|
||||
static void
|
||||
save_other_removable_devices(void)
|
||||
{
|
||||
char *cat = "Other removable devices";
|
||||
char temp[512], tmp2[512];
|
||||
int c;
|
||||
|
||||
for (c=0; c<CDROM_NUM; c++) {
|
||||
sprintf(temp, "cdrom_%02i_host_drive", c+1);
|
||||
if ((cdrom[c].bus_type == 0) || (cdrom[c].host_drive != 200)) {
|
||||
@@ -1978,6 +2121,18 @@ save_other_removable_devices(void)
|
||||
}
|
||||
}
|
||||
|
||||
delete_section_if_empty(cat);
|
||||
}
|
||||
|
||||
|
||||
/* Save "Other Removable Devices" section. */
|
||||
static void
|
||||
save_other_removable_devices(void)
|
||||
{
|
||||
char *cat = "Other removable devices";
|
||||
char temp[512], tmp2[512];
|
||||
int c;
|
||||
|
||||
for (c=0; c<ZIP_NUM; c++) {
|
||||
sprintf(temp, "zip_%02i_parameters", c+1);
|
||||
if (zip_drives[c].bus_type == 0) {
|
||||
@@ -2064,7 +2219,7 @@ config_save(void)
|
||||
save_ports(); /* Ports (COM & LPT) */
|
||||
save_other_peripherals(); /* Other peripherals */
|
||||
save_hard_disks(); /* Hard disks */
|
||||
save_floppy_drives(); /* Floppy drives */
|
||||
save_floppy_and_cdrom_drives(); /* Floppy and CD-ROM drives */
|
||||
save_other_removable_devices(); /* Other removable devices */
|
||||
|
||||
config_write(cfg_path);
|
||||
|
@@ -46,7 +46,7 @@
|
||||
#define IDS_2070 2070 // "Ports (COM & LPT)"
|
||||
#define IDS_2071 2071 // "Other peripherals"
|
||||
#define IDS_2072 2072 // "Hard disks"
|
||||
#define IDS_2073 2073 // "Floppy drives"
|
||||
#define IDS_2073 2073 // "Floppy and CD-ROM drives"
|
||||
#define IDS_2074 2074 // "Other removable devices"
|
||||
#define IDS_2075 2075 // "CD-ROM images (*.ISO;*.CU.."
|
||||
#define IDS_2076 2076 // "Surface-based images (*.8.."
|
||||
@@ -112,7 +112,6 @@
|
||||
#define IDS_2136 2136 // "Don't Exit"
|
||||
#define IDS_2137 2137 // "Reset"
|
||||
#define IDS_2138 2138 // "Don't Reset"
|
||||
#define IDS_2139 2139 // "CD-ROM drives"
|
||||
|
||||
#define IDS_4096 4096 // "Hard disk (%s)"
|
||||
#define IDS_4097 4097 // "%01i:%01i"
|
||||
@@ -189,6 +188,16 @@
|
||||
#define IDS_5899 5899 // "2.88 MB"
|
||||
#define IDS_5900 5900 // "ZIP 100"
|
||||
#define IDS_5901 5901 // "ZIP 250"
|
||||
#define IDS_5902 5902 // "3.5\" 128Mb M.O. (ISO 10090)"
|
||||
#define IDS_5903 5903 // "3.5\" 230Mb M.O. (ISO 13963)"
|
||||
#define IDS_5904 5904 // "3.5\" 540Mb M.O. (ISO 15498)"
|
||||
#define IDS_5905 5905 // "3.5\" 640Mb M.O. (ISO 15498)"
|
||||
#define IDS_5906 5906 // "3.5\" 1.3Gb M.O. (GigaMO)"
|
||||
#define IDS_5907 5907 // "3.5\" 2.3Gb M.O. (GigaMO 2)"
|
||||
#define IDS_5908 5908 // "5.25\" 600Mb M.O."
|
||||
#define IDS_5909 5909 // "5.25\" 650Mb M.O."
|
||||
#define IDS_5910 5910 // "5.25\" 1Gb M.O."
|
||||
#define IDS_5911 5911 // "5.25\" 1.3Gb M.O."
|
||||
|
||||
#define IDS_6144 6144 // "Perfect RPM"
|
||||
#define IDS_6145 6145 // "1%% below perfect RPM"
|
||||
@@ -199,7 +208,7 @@
|
||||
|
||||
#define IDS_LANG_ENUS IDS_7168
|
||||
|
||||
#define STR_NUM_2048 92
|
||||
#define STR_NUM_2048 91
|
||||
#define STR_NUM_3072 11
|
||||
#define STR_NUM_4096 18
|
||||
#define STR_NUM_4352 7
|
||||
@@ -207,7 +216,7 @@
|
||||
#define STR_NUM_5120 1
|
||||
#define STR_NUM_5376 7
|
||||
#define STR_NUM_5632 7
|
||||
#define STR_NUM_5888 14
|
||||
#define STR_NUM_5888 24
|
||||
#define STR_NUM_6144 4
|
||||
#define STR_NUM_7168 1
|
||||
|
||||
|
@@ -104,17 +104,16 @@ typedef struct {
|
||||
media status. */
|
||||
pad, pad0;
|
||||
|
||||
uint32_t medium_size,
|
||||
base;
|
||||
uint16_t sector_size;
|
||||
uint8_t type;
|
||||
|
||||
void *priv;
|
||||
|
||||
FILE *f;
|
||||
void *priv;
|
||||
|
||||
wchar_t image_path[1024],
|
||||
prev_image_path[1024];
|
||||
|
||||
uint32_t type, medium_size,
|
||||
base;
|
||||
uint16_t sector_size;
|
||||
|
||||
} mo_drive_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -135,9 +134,9 @@ typedef struct {
|
||||
uint16_t request_length, max_transfer_len;
|
||||
|
||||
int requested_blocks, packet_status,
|
||||
total_length, do_page_save,
|
||||
unit_attention, request_pos,
|
||||
old_len, pad3;
|
||||
total_length, do_page_save,
|
||||
unit_attention, request_pos,
|
||||
old_len, pad3;
|
||||
|
||||
uint32_t sector_pos, sector_len,
|
||||
packet_len, pos;
|
||||
|
@@ -38,9 +38,8 @@
|
||||
#define DLG_CFG_PERIPHERALS 117 /* sub-dialog of config */
|
||||
#define DLG_CFG_HARD_DISKS 118 /* sub-dialog of config */
|
||||
#define DLG_CFG_HARD_DISKS_ADD 119 /* sub-dialog of config */
|
||||
#define DLG_CFG_FLOPPY_DRIVES 120 /* sub-dialog of config */
|
||||
#define DLG_CFG_CDROM_DRIVES 121 /* sub-dialog of config */
|
||||
#define DLG_CFG_OTHER_REMOVABLE_DEVICES 122 /* sub-dialog of config */
|
||||
#define DLG_CFG_FLOPPY_AND_CDROM_DRIVES 120 /* sub-dialog of config */
|
||||
#define DLG_CFG_OTHER_REMOVABLE_DEVICES 121 /* sub-dialog of config */
|
||||
|
||||
/* Static text label IDs. */
|
||||
#define IDT_1700 1700 /* Language: */
|
||||
@@ -101,11 +100,11 @@
|
||||
#define IDT_1766 1766 /* Board #4: */
|
||||
#define IDT_1767 1767 /* ISA RTC: */
|
||||
#define IDT_1768 1768 /* Ext FD Controller: */
|
||||
#define IDT_1769 1769 /* MO drives: */
|
||||
#define IDT_1770 1770 /* Bus: */
|
||||
#define IDT_1771 1771 /* ID: */
|
||||
#define IDT_1772 1772 /* Channel */
|
||||
#define IDT_1773 1773 /* Type: */
|
||||
#define IDT_1769 1769 /* MO drives: */
|
||||
#define IDT_1770 1770 /* Bus: */
|
||||
#define IDT_1771 1771 /* ID: */
|
||||
#define IDT_1772 1772 /* Channel */
|
||||
#define IDT_1773 1773 /* Type: */
|
||||
|
||||
|
||||
/*
|
||||
@@ -201,7 +200,7 @@
|
||||
#define IDC_CONFIGURE_ISAMEM_3 1147
|
||||
#define IDC_CONFIGURE_ISAMEM_4 1148
|
||||
|
||||
#define IDC_HARD_DISKS 1150 /* hard disk config */
|
||||
#define IDC_HARD_DISKS 1150 /* hard disks config */
|
||||
#define IDC_LIST_HARD_DISKS 1151
|
||||
#define IDC_BUTTON_HDD_ADD_NEW 1152
|
||||
#define IDC_BUTTON_HDD_ADD 1153
|
||||
@@ -220,7 +219,7 @@
|
||||
#define IDC_COMBO_HD_TYPE 1165
|
||||
#define IDC_PBAR_IMG_CREATE 1166
|
||||
|
||||
#define IDC_REMOV_DEVICES 1170 /* removable dev config */
|
||||
#define IDC_REMOV_DEVICES 1170 /* floppy and cd-rom drives config */
|
||||
#define IDC_LIST_FLOPPY_DRIVES 1171
|
||||
#define IDC_COMBO_FD_TYPE 1172
|
||||
#define IDC_CHECKTURBO 1173
|
||||
@@ -230,7 +229,8 @@
|
||||
#define IDC_COMBO_CD_ID 1177
|
||||
#define IDC_COMBO_CD_LUN 1178
|
||||
#define IDC_COMBO_CD_CHANNEL_IDE 1179
|
||||
#define IDC_LIST_ZIP_DRIVES 1180
|
||||
|
||||
#define IDC_LIST_ZIP_DRIVES 1180 /* other removable devices config */
|
||||
#define IDC_COMBO_ZIP_BUS 1181
|
||||
#define IDC_COMBO_ZIP_ID 1182
|
||||
#define IDC_COMBO_ZIP_LUN 1183
|
||||
@@ -240,11 +240,11 @@
|
||||
#define IDC_LIST_MO_DRIVES 1187
|
||||
#define IDC_COMBO_MO_BUS 1188
|
||||
#define IDC_COMBO_MO_ID 1189
|
||||
#define IDC_COMBO_MO_LUN 1191
|
||||
#define IDC_COMBO_MO_CHANNEL_IDE 1192
|
||||
#define IDC_COMBO_MO_TYPE 1193
|
||||
#define IDC_COMBO_MO_LUN 1190
|
||||
#define IDC_COMBO_MO_CHANNEL_IDE 1191
|
||||
#define IDC_COMBO_MO_TYPE 1192
|
||||
|
||||
#define IDC_SLIDER_GAIN 1190 /* sound gain dialog */
|
||||
#define IDC_SLIDER_GAIN 1193 /* sound gain dialog */
|
||||
|
||||
#define IDC_EDIT_FILE_NAME 1200 /* new floppy image dialog */
|
||||
#define IDC_COMBO_DISK_SIZE 1201
|
||||
|
@@ -163,9 +163,8 @@ extern void NewFloppyDialogCreate(HWND hwnd, int id, int part);
|
||||
#define SETTINGS_PAGE_PORTS 5
|
||||
#define SETTINGS_PAGE_PERIPHERALS 6
|
||||
#define SETTINGS_PAGE_HARD_DISKS 7
|
||||
#define SETTINGS_PAGE_FLOPPY_DRIVES 8
|
||||
#define SETTINGS_PAGE_CDROM_DRIVES 9
|
||||
#define SETTINGS_PAGE_OTHER_REMOVABLE_DEVICES 10
|
||||
#define SETTINGS_PAGE_FLOPPY_AND_CDROM_DRIVES 8
|
||||
#define SETTINGS_PAGE_OTHER_REMOVABLE_DEVICES 9
|
||||
|
||||
extern void win_settings_open(HWND hwnd);
|
||||
extern void win_settings_open_ex(HWND hwnd, int category);
|
||||
|
@@ -315,20 +315,20 @@ BEGIN
|
||||
WS_BORDER,53,45,166,14
|
||||
END
|
||||
|
||||
DLG_CONFIG DIALOG DISCARDABLE 0, 0, 366, 251
|
||||
DLG_CONFIG DIALOG DISCARDABLE 0, 0, 366, 256
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "86Box Settings"
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,246,230,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,307,230,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,246,235,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,307,235,50,14
|
||||
CONTROL "List2",IDC_SETTINGSCATLIST,"SysListView32",LVS_LIST |
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,7,90,207
|
||||
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,1,221,363,1
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,7,90,212
|
||||
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,1,226,363,1
|
||||
/* Leave this commented out until we get into localization. */
|
||||
#if 0
|
||||
LTEXT "Language:",IDT_1700,7,232,41,10
|
||||
COMBOBOX IDC_COMBO_LANG,48,231,108,120,CBS_DROPDOWN | WS_VSCROLL |
|
||||
LTEXT "Language:",IDT_1700,7,237,41,10
|
||||
COMBOBOX IDC_COMBO_LANG,48,236,108,120,CBS_DROPDOWN | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
#endif
|
||||
END
|
||||
@@ -594,7 +594,7 @@ BEGIN
|
||||
LTEXT "Size (MB):",IDT_1729,7,54,33,8
|
||||
LTEXT "Type:",IDT_1730,86,54,24,8
|
||||
LTEXT "File name:",IDT_1731,7,7,204,9
|
||||
COMBOBOX IDC_COMBO_HD_BUS,33,71,58,12,CBS_DROPDOWNLIST |
|
||||
COMBOBOX IDC_COMBO_HD_BUS,33,71,58,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Bus:",IDT_1721,7,73,24,8
|
||||
COMBOBOX IDC_COMBO_HD_CHANNEL,134,71,77,12,CBS_DROPDOWNLIST |
|
||||
@@ -610,7 +610,7 @@ BEGIN
|
||||
WS_BORDER,7,16,204,12
|
||||
END
|
||||
|
||||
DLG_CFG_FLOPPY_DRIVES DIALOG DISCARDABLE 97, 0, 267, 103
|
||||
DLG_CFG_FLOPPY_AND_CDROM_DRIVES DIALOG DISCARDABLE 97, 0, 267, 222
|
||||
STYLE DS_CONTROL | WS_CHILD
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
@@ -625,38 +625,33 @@ BEGIN
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,131,86,64,10
|
||||
CONTROL "Check BPB",IDC_CHECKBPB,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,196,86,64,10
|
||||
END
|
||||
|
||||
DLG_CFG_CDROM_DRIVES DIALOG DISCARDABLE 97, 0, 267, 150
|
||||
STYLE DS_CONTROL | WS_CHILD
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
CONTROL "List1",IDC_LIST_CDROM_DRIVES,"SysListView32",LVS_REPORT |
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER |
|
||||
WS_TABSTOP,7,18,253,60
|
||||
LTEXT "CD-ROM drives:",IDT_1739,7,7,50,8
|
||||
COMBOBOX IDC_COMBO_CD_BUS,33,85,90,12,CBS_DROPDOWNLIST |
|
||||
WS_TABSTOP,7,117,253,60
|
||||
LTEXT "CD-ROM drives:",IDT_1739,7,107,50,8
|
||||
COMBOBOX IDC_COMBO_CD_BUS,33,185,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Bus:",IDT_1740,7,87,24,8
|
||||
COMBOBOX IDC_COMBO_CD_ID,170,85,90,12,CBS_DROPDOWNLIST |
|
||||
LTEXT "Bus:",IDT_1740,7,187,24,8
|
||||
COMBOBOX IDC_COMBO_CD_ID,170,185,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "ID:",IDT_1741,131,87,38,8
|
||||
COMBOBOX IDC_COMBO_CD_CHANNEL_IDE,170,85,90,12,CBS_DROPDOWNLIST |
|
||||
LTEXT "ID:",IDT_1741,131,187,38,8
|
||||
COMBOBOX IDC_COMBO_CD_CHANNEL_IDE,170,185,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Channel:",IDT_1742,131,87,38,8
|
||||
COMBOBOX IDC_COMBO_CD_SPEED,33,105,90,12,CBS_DROPDOWNLIST |
|
||||
LTEXT "Channel:",IDT_1742,131,187,38,8
|
||||
COMBOBOX IDC_COMBO_CD_SPEED,33,205,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Speed:",IDT_1758,7,107,24,8
|
||||
LTEXT "Speed:",IDT_1758,7,207,24,8
|
||||
END
|
||||
|
||||
DLG_CFG_OTHER_REMOVABLE_DEVICES DIALOG DISCARDABLE 97, 0, 267, 221
|
||||
DLG_CFG_OTHER_REMOVABLE_DEVICES DIALOG DISCARDABLE 97, 0, 267, 222
|
||||
STYLE DS_CONTROL | WS_CHILD
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
|
||||
CONTROL "List1",IDC_LIST_MO_DRIVES,"SysListView32",LVS_REPORT |
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER |
|
||||
WS_TABSTOP,7,18,253,60
|
||||
WS_TABSTOP,7,17,253,60
|
||||
LTEXT "MO drives:",IDT_1769,7,7,50,8
|
||||
COMBOBOX IDC_COMBO_MO_BUS,33,85,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
@@ -675,17 +670,17 @@ BEGIN
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER |
|
||||
WS_TABSTOP,7,137,253,60
|
||||
LTEXT "ZIP drives:",IDT_1759,7,127,50,8
|
||||
COMBOBOX IDC_COMBO_ZIP_BUS,23,204,90,12,CBS_DROPDOWNLIST |
|
||||
COMBOBOX IDC_COMBO_ZIP_BUS,23,205,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Bus:",IDT_1753,7,206,14,8
|
||||
COMBOBOX IDC_COMBO_ZIP_ID,149,204,61,12,CBS_DROPDOWNLIST |
|
||||
LTEXT "Bus:",IDT_1753,7,207,14,8
|
||||
COMBOBOX IDC_COMBO_ZIP_ID,149,205,61,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "ID:",IDT_1754,120,206,28,8
|
||||
COMBOBOX IDC_COMBO_ZIP_CHANNEL_IDE,149,204,61,12,CBS_DROPDOWNLIST |
|
||||
LTEXT "ID:",IDT_1754,120,207,28,8
|
||||
COMBOBOX IDC_COMBO_ZIP_CHANNEL_IDE,149,205,61,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Channel:",IDT_1755,120,206,28,8
|
||||
LTEXT "Channel:",IDT_1755,120,207,28,8
|
||||
CONTROL "ZIP 250",IDC_CHECK250,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,218,204,44,10
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,218,205,44,10
|
||||
END
|
||||
|
||||
|
||||
@@ -720,10 +715,12 @@ END
|
||||
49 ICON DISCARDABLE "win/icons/zip_active.ico"
|
||||
56 ICON DISCARDABLE "win/icons/mo.ico"
|
||||
57 ICON DISCARDABLE "win/icons/mo_active.ico"
|
||||
64 ICON DISCARDABLE "win/icons/hard_disk.ico"
|
||||
65 ICON DISCARDABLE "win/icons/hard_disk_active.ico"
|
||||
80 ICON DISCARDABLE "win/icons/network.ico"
|
||||
81 ICON DISCARDABLE "win/icons/network_active.ico"
|
||||
64 ICON DISCARDABLE "win/icons/cassette.ico"
|
||||
65 ICON DISCARDABLE "win/icons/cassette_active.ico"
|
||||
80 ICON DISCARDABLE "win/icons/hard_disk.ico"
|
||||
81 ICON DISCARDABLE "win/icons/hard_disk_active.ico"
|
||||
96 ICON DISCARDABLE "win/icons/network.ico"
|
||||
97 ICON DISCARDABLE "win/icons/network_active.ico"
|
||||
144 ICON DISCARDABLE "win/icons/floppy_525_empty.ico"
|
||||
145 ICON DISCARDABLE "win/icons/floppy_525_empty_active.ico"
|
||||
152 ICON DISCARDABLE "win/icons/floppy_35_empty.ico"
|
||||
@@ -734,13 +731,15 @@ END
|
||||
177 ICON DISCARDABLE "win/icons/zip_empty_active.ico"
|
||||
184 ICON DISCARDABLE "win/icons/mo_empty.ico"
|
||||
185 ICON DISCARDABLE "win/icons/mo_empty_active.ico"
|
||||
192 ICON DISCARDABLE "win/icons/cassette_empty.ico"
|
||||
193 ICON DISCARDABLE "win/icons/cassette_empty_active.ico"
|
||||
240 ICON DISCARDABLE "win/icons/machine.ico"
|
||||
241 ICON DISCARDABLE "win/icons/display.ico"
|
||||
242 ICON DISCARDABLE "win/icons/input_devices.ico"
|
||||
243 ICON DISCARDABLE "win/icons/sound.ico"
|
||||
244 ICON DISCARDABLE "win/icons/ports.ico"
|
||||
245 ICON DISCARDABLE "win/icons/other_peripherals.ico"
|
||||
246 ICON DISCARDABLE "win/icons/floppy_drives.ico"
|
||||
246 ICON DISCARDABLE "win/icons/floppy_and_cdrom_drives.ico"
|
||||
247 ICON DISCARDABLE "win/icons/other_removable_devices.ico"
|
||||
248 ICON DISCARDABLE "win/icons/floppy_disabled.ico"
|
||||
249 ICON DISCARDABLE "win/icons/cdrom_disabled.ico"
|
||||
@@ -933,7 +932,7 @@ BEGIN
|
||||
IDS_2070 "Ports (COM & LPT)"
|
||||
IDS_2071 "Other peripherals"
|
||||
IDS_2072 "Hard disks"
|
||||
IDS_2073 "Floppy drives"
|
||||
IDS_2073 "Floppy & CD-ROM drives"
|
||||
IDS_2074 "Other removable devices"
|
||||
IDS_2075 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
|
||||
IDS_2076 "Surface images (*.86F)\0*.86F\0"
|
||||
@@ -1023,7 +1022,6 @@ BEGIN
|
||||
IDS_2136 "Don't Exit"
|
||||
IDS_2137 "Reset"
|
||||
IDS_2138 "Don't Reset"
|
||||
IDS_2139 "CD-ROM drives"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
@@ -1093,6 +1091,16 @@ BEGIN
|
||||
IDS_5899 "2.88 MB"
|
||||
IDS_5900 "ZIP 100"
|
||||
IDS_5901 "ZIP 250"
|
||||
IDS_5902 "3.5"" 128Mb M.O. (ISO 10090)"
|
||||
IDS_5903 "3.5"" 230Mb M.O. (ISO 13963)"
|
||||
IDS_5904 "3.5"" 540Mb M.O. (ISO 15498)"
|
||||
IDS_5905 "3.5"" 640Mb M.O. (ISO 15498)"
|
||||
IDS_5906 "3.5"" 1.3Gb M.O. (GigaMO)"
|
||||
IDS_5907 "3.5"" 2.3Gb M.O. (GigaMO 2)"
|
||||
IDS_5908 "5.25"" 600Mb M.O."
|
||||
IDS_5909 "5.25"" 650Mb M.O."
|
||||
IDS_5910 "5.25"" 1Gb M.O."
|
||||
IDS_5911 "5.25"" 1.3Gb M.O."
|
||||
|
||||
IDS_6144 "Perfect RPM"
|
||||
IDS_6145 "1%% below perfect RPM"
|
||||
|
BIN
src/win/icons/cassette.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/win/icons/cassette_active.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/win/icons/cassette_empty.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/win/icons/cassette_empty_active.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/win/icons/floppy_and_cdrom_drives.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -477,7 +477,7 @@ media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case IDM_MO_IMAGE_NEW:
|
||||
NewFloppyDialogCreate(hwnd, id | 0x80, 0); /* NewZIPDialogCreate */
|
||||
NewFloppyDialogCreate(hwnd, id | 0x100, 0); /* NewZIPDialogCreate */
|
||||
break;
|
||||
|
||||
case IDM_MO_IMAGE_EXISTING_WP:
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include <86box/random.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/scsi_device.h>
|
||||
#include <86box/mo.h>
|
||||
#include <86box/zip.h>
|
||||
#include <86box/win.h>
|
||||
|
||||
@@ -173,6 +174,7 @@ create_86f(WCHAR *file_name, disk_size_t disk_size, uint8_t rpm_mode)
|
||||
|
||||
|
||||
static int is_zip;
|
||||
static int is_mo;
|
||||
|
||||
|
||||
static int
|
||||
@@ -204,7 +206,7 @@ create_sector_image(WCHAR *file_name, disk_size_t disk_size, uint8_t is_fdi)
|
||||
fat2_offs = fat1_offs + fat_size;
|
||||
zero_bytes = fat2_offs + fat_size + root_dir_bytes;
|
||||
|
||||
if (!is_zip && is_fdi) {
|
||||
if (!is_zip && !is_mo && is_fdi) {
|
||||
empty = (unsigned char *) malloc(base);
|
||||
memset(empty, 0, base);
|
||||
|
||||
@@ -222,7 +224,7 @@ create_sector_image(WCHAR *file_name, disk_size_t disk_size, uint8_t is_fdi)
|
||||
empty = (unsigned char *) malloc(total_size);
|
||||
memset(empty, 0x00, zero_bytes);
|
||||
|
||||
if (!is_zip) {
|
||||
if (!is_zip && !is_mo) {
|
||||
memset(empty + zero_bytes, 0xF6, total_size - zero_bytes);
|
||||
|
||||
empty[0x00] = 0xEB; /* Jump to make MS-DOS happy. */
|
||||
@@ -352,10 +354,21 @@ create_zip_sector_image(WCHAR *file_name, disk_size_t disk_size, uint8_t is_zdi,
|
||||
fwrite(empty, 1, 2048, f);
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) 1, (LPARAM) 0);
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
fwrite(&empty[0x0800], 1, 2048, f);
|
||||
free(empty);
|
||||
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) 2, (LPARAM) 0);
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
pbar_max -= 2;
|
||||
}
|
||||
|
||||
@@ -507,6 +520,106 @@ create_zip_sector_image(WCHAR *file_name, disk_size_t disk_size, uint8_t is_zdi,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
create_mo_sector_image(WCHAR *file_name, int8_t disk_size, uint8_t is_mdi, HWND hwnd)
|
||||
{
|
||||
HWND h;
|
||||
FILE *f;
|
||||
const mo_type_t *dp = &mo_types[disk_size];
|
||||
uint8_t *empty;
|
||||
uint32_t total_size = 0;
|
||||
uint32_t total_sectors = 0;
|
||||
uint32_t sector_bytes = 0;
|
||||
uint16_t base = 0x1000;
|
||||
uint32_t pbar_max = 0;
|
||||
uint32_t i;
|
||||
MSG msg;
|
||||
|
||||
f = plat_fopen(file_name, L"wb");
|
||||
if (!f)
|
||||
return 0;
|
||||
|
||||
sector_bytes = dp->bytes_per_sector;
|
||||
total_sectors = dp->sectors;
|
||||
total_size = total_sectors * sector_bytes;
|
||||
|
||||
pbar_max = dp->sectors >> 11;
|
||||
if (is_mdi)
|
||||
pbar_max += base;
|
||||
pbar_max >>= 11;
|
||||
pbar_max--;
|
||||
|
||||
h = GetDlgItem(hwnd, IDC_COMBO_RPM_MODE);
|
||||
EnableWindow(h, FALSE);
|
||||
ShowWindow(h, SW_HIDE);
|
||||
h = GetDlgItem(hwnd, IDT_1751);
|
||||
EnableWindow(h, FALSE);
|
||||
ShowWindow(h, SW_HIDE);
|
||||
h = GetDlgItem(hwnd, IDC_PBAR_IMG_CREATE);
|
||||
SendMessage(h, PBM_SETRANGE32, (WPARAM) 0, (LPARAM) pbar_max);
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) 0, (LPARAM) 0);
|
||||
EnableWindow(h, TRUE);
|
||||
ShowWindow(h, SW_SHOW);
|
||||
h = GetDlgItem(hwnd, IDT_1757);
|
||||
EnableWindow(h, TRUE);
|
||||
ShowWindow(h, SW_SHOW);
|
||||
|
||||
h = GetDlgItem(hwnd, IDC_PBAR_IMG_CREATE);
|
||||
pbar_max++;
|
||||
|
||||
if (is_mdi) {
|
||||
empty = (unsigned char *) malloc(base);
|
||||
memset(empty, 0, base);
|
||||
|
||||
*(uint32_t *) &(empty[0x08]) = (uint32_t) base;
|
||||
*(uint32_t *) &(empty[0x0C]) = total_size;
|
||||
*(uint16_t *) &(empty[0x10]) = (uint16_t) sector_bytes;
|
||||
*(uint8_t *) &(empty[0x14]) = (uint8_t) 25;
|
||||
*(uint8_t *) &(empty[0x18]) = (uint8_t) 64;
|
||||
*(uint8_t *) &(empty[0x1C]) = (uint8_t) (dp->sectors / 64) / 25;
|
||||
|
||||
fwrite(empty, 1, 2048, f);
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) 1, (LPARAM) 0);
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
fwrite(&empty[0x0800], 1, 2048, f);
|
||||
free(empty);
|
||||
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) 2, (LPARAM) 0);
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
pbar_max -= 2;
|
||||
}
|
||||
|
||||
empty = (unsigned char *) malloc(total_size);
|
||||
memset(empty, 0x00, total_size);
|
||||
|
||||
for (i = 0; i < pbar_max; i++) {
|
||||
fwrite(&empty[i << 11], 1, 2048, f);
|
||||
SendMessage(h, PBM_SETPOS, (WPARAM) i + 2, (LPARAM) 0);
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
free(empty);
|
||||
|
||||
fclose(f);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int fdd_id, sb_part;
|
||||
|
||||
static int file_type = 0; /* 0 = IMG, 1 = Japanese FDI, 2 = 86F */
|
||||
@@ -562,7 +675,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
uint8_t disk_size, rpm_mode;
|
||||
int ret;
|
||||
FILE *f;
|
||||
int zip_types;
|
||||
int zip_types, mo_types;
|
||||
wchar_t *twcs;
|
||||
|
||||
switch (message) {
|
||||
@@ -574,6 +687,11 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
zip_types = zip_drives[fdd_id].is_250 ? 2 : 1;
|
||||
for (i = 0; i < zip_types; i++)
|
||||
SendMessage(h, CB_ADDSTRING, 0, win_get_string(IDS_5900 + i));
|
||||
} else if (is_mo) {
|
||||
mo_types = 10;
|
||||
/* TODO: Proper string ID's. */
|
||||
for (i = 0; i < mo_types; i++)
|
||||
SendMessage(h, CB_ADDSTRING, 0, win_get_string(IDS_5902 + i));
|
||||
} else {
|
||||
for (i = 0; i < 12; i++)
|
||||
SendMessage(h, CB_ADDSTRING, 0, win_get_string(IDS_5888 + i));
|
||||
@@ -606,22 +724,24 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
disk_size = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
if (is_zip)
|
||||
disk_size += 12;
|
||||
if (file_type == 2) {
|
||||
if (!is_zip && !is_mo && (file_type == 2)) {
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_RPM_MODE);
|
||||
rpm_mode = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
ret = create_86f(fd_file_name, disk_sizes[disk_size], rpm_mode);
|
||||
} else {
|
||||
if (is_zip)
|
||||
ret = create_zip_sector_image(fd_file_name, disk_sizes[disk_size], file_type, hdlg);
|
||||
if (is_mo)
|
||||
ret = create_mo_sector_image(fd_file_name, disk_size, file_type, hdlg);
|
||||
else
|
||||
ret = create_sector_image(fd_file_name, disk_sizes[disk_size], file_type);
|
||||
}
|
||||
if (ret) {
|
||||
if (is_zip)
|
||||
//ui_sb_mount_zip_img(fdd_id, sb_part, 0, fd_file_name);
|
||||
zip_mount(fdd_id, fd_file_name, 0);
|
||||
else if (is_mo)
|
||||
mo_mount(fdd_id, fd_file_name, 0);
|
||||
else
|
||||
//ui_sb_mount_floppy_img(fdd_id, sb_part, 0, fd_file_name);
|
||||
floppy_mount(fdd_id, fd_file_name, 0);
|
||||
} else {
|
||||
new_floppy_msgbox_header(hdlg, MBX_ERROR, (wchar_t *) IDS_4108, (wchar_t *) IDS_4115);
|
||||
@@ -639,7 +759,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (wcslen(wopenfilestring) && (wcslen(wopenfilestring) <= 256)) {
|
||||
twcs = &wopenfilestring[wcslen(wopenfilestring)];
|
||||
twcs[0] = L'.';
|
||||
if (!is_zip && (filterindex == 3)) {
|
||||
if (!is_zip && !is_mo && (filterindex == 3)) {
|
||||
twcs[1] = L'8';
|
||||
twcs[2] = L'6';
|
||||
twcs[3] = L'f';
|
||||
@@ -671,6 +791,11 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
file_type = 1;
|
||||
else
|
||||
file_type = 0;
|
||||
} else if (is_mo) {
|
||||
if (((wcs_len >= 4) && !wcsicmp(ext, L".MDI")))
|
||||
file_type = 1;
|
||||
else
|
||||
file_type = 0;
|
||||
} else {
|
||||
if (((wcs_len >= 4) && !wcsicmp(ext, L".FDI")))
|
||||
file_type = 1;
|
||||
@@ -717,5 +842,10 @@ NewFloppyDialogCreate(HWND hwnd, int id, int part)
|
||||
fdd_id = id & 0x7f;
|
||||
sb_part = part;
|
||||
is_zip = !!(id & 0x80);
|
||||
is_mo = !!(id & 0x100);
|
||||
if (is_zip && is_mo) {
|
||||
fatal("Attempting to create a new image dialog that is for both ZIP and MO at the same time\n");
|
||||
return;
|
||||
}
|
||||
DialogBox(hinstance, (LPCTSTR)DLG_NEW_FLOPPY, hwnd, NewFloppyDialogProcedure);
|
||||
}
|
||||
|
@@ -322,13 +322,13 @@ win_settings_init(void)
|
||||
else if (zip_drives[i].bus_type == ZIP_BUS_SCSI)
|
||||
scsi_tracking[zip_drives[i].scsi_device_id >> 3] |= (1 << ((zip_drives[i].scsi_device_id & 0x07) << 3));
|
||||
}
|
||||
memcpy(temp_mo_drives, mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
for (i = 0; i < MO_NUM; i++) {
|
||||
if (mo_drives[i].bus_type == MO_BUS_ATAPI)
|
||||
ide_tracking |= (1 << (mo_drives[i].ide_channel << 3));
|
||||
else if (mo_drives[i].bus_type == MO_BUS_SCSI)
|
||||
scsi_tracking[mo_drives[i].scsi_device_id >> 3] |= (1 << ((mo_drives[i].scsi_device_id & 0x07) << 3));
|
||||
}
|
||||
memcpy(temp_mo_drives, mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
for (i = 0; i < MO_NUM; i++) {
|
||||
if (mo_drives[i].bus_type == MO_BUS_ATAPI)
|
||||
ide_tracking |= (1 << (mo_drives[i].ide_channel << 3));
|
||||
else if (mo_drives[i].bus_type == MO_BUS_SCSI)
|
||||
scsi_tracking[mo_drives[i].scsi_device_id >> 3] |= (1 << ((mo_drives[i].scsi_device_id & 0x07) << 3));
|
||||
}
|
||||
|
||||
temp_deviceconfig = 0;
|
||||
}
|
||||
@@ -411,7 +411,7 @@ win_settings_changed(void)
|
||||
/* Other removable devices category */
|
||||
i = i || memcmp(cdrom, temp_cdrom, CDROM_NUM * sizeof(cdrom_t));
|
||||
i = i || memcmp(zip_drives, temp_zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
||||
i = i || memcmp(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
i = i || memcmp(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
|
||||
i = i || !!temp_deviceconfig;
|
||||
|
||||
@@ -540,7 +540,7 @@ win_settings_save(void)
|
||||
zip_drives[i].f = NULL;
|
||||
zip_drives[i].priv = NULL;
|
||||
}
|
||||
memcpy(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
memcpy(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||
for (i = 0; i < MO_NUM; i++) {
|
||||
mo_drives[i].f = NULL;
|
||||
mo_drives[i].priv = NULL;
|
||||
@@ -3518,7 +3518,7 @@ win_settings_hard_disks_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lPar
|
||||
{
|
||||
HWND h = NULL;
|
||||
int old_sel = 0, b = 0, assign = 0;
|
||||
const uint8_t hd_icons[2] = { 64, 0 };
|
||||
const uint8_t hd_icons[2] = { 80, 0 };
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
@@ -3754,7 +3754,7 @@ win_settings_cdrom_drives_recalc_list(HWND hwndList)
|
||||
WCHAR szText[256];
|
||||
|
||||
lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
|
||||
lvI.stateMask = lvI.iSubItem = lvI.state = 0;
|
||||
lvI.stateMask = lvI.iSubItem = lvI.state = 0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
fsid = combo_id_to_format_string_id(temp_cdrom[i].bus_type);
|
||||
@@ -4007,6 +4007,7 @@ win_settings_mo_drives_init_columns(HWND hwndList)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
win_settings_zip_drives_init_columns(HWND hwndList)
|
||||
{
|
||||
@@ -4150,6 +4151,7 @@ win_settings_cdrom_drives_update_item(HWND hwndList, int i)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
win_settings_mo_drives_update_item(HWND hwndList, int i)
|
||||
{
|
||||
@@ -4296,7 +4298,7 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
int i = 0;
|
||||
HWND h;
|
||||
|
||||
int bus = temp_cdrom[lv1_current_sel].bus_type;
|
||||
int bus = temp_cdrom[lv2_current_sel].bus_type;
|
||||
|
||||
for (i = IDT_1741; i < (IDT_1742 + 1); i++) {
|
||||
h = GetDlgItem(hdlg, i);
|
||||
@@ -4319,7 +4321,7 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
} else {
|
||||
ShowWindow(h, SW_SHOW);
|
||||
EnableWindow(h, TRUE);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv1_current_sel].speed - 1, 0);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv2_current_sel].speed - 1, 0);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDT_1758);
|
||||
@@ -4338,12 +4340,12 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
EnableWindow(h, TRUE);
|
||||
|
||||
if (assign_id)
|
||||
temp_cdrom[lv1_current_sel].ide_channel = next_free_ide_channel();
|
||||
temp_cdrom[lv2_current_sel].ide_channel = next_free_ide_channel();
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_CHANNEL_IDE);
|
||||
ShowWindow(h, SW_SHOW);
|
||||
EnableWindow(h, TRUE);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv1_current_sel].ide_channel, 0);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv2_current_sel].ide_channel, 0);
|
||||
break;
|
||||
case CDROM_BUS_SCSI: /* SCSI */
|
||||
h = GetDlgItem(hdlg, IDT_1741);
|
||||
@@ -4351,12 +4353,12 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
EnableWindow(h, TRUE);
|
||||
|
||||
if (assign_id)
|
||||
next_free_scsi_id((uint8_t *) &temp_cdrom[lv1_current_sel].scsi_device_id);
|
||||
next_free_scsi_id((uint8_t *) &temp_cdrom[lv2_current_sel].scsi_device_id);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_ID);
|
||||
ShowWindow(h, SW_SHOW);
|
||||
EnableWindow(h, TRUE);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv1_current_sel].scsi_device_id, 0);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom[lv2_current_sel].scsi_device_id, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4364,15 +4366,15 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
static void
|
||||
mo_add_locations(HWND hdlg)
|
||||
{
|
||||
LPTSTR lptsTemp;
|
||||
char *temp;
|
||||
LPTSTR lptsTemp;
|
||||
char *temp;
|
||||
HWND h;
|
||||
int i = 0;
|
||||
|
||||
lptsTemp = (LPTSTR) malloc(512 * sizeof(WCHAR));
|
||||
temp = (char*) malloc(30*sizeof(char));
|
||||
lptsTemp = (LPTSTR) malloc(512 * sizeof(WCHAR));
|
||||
temp = (char*) malloc(30*sizeof(char));
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS);
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS);
|
||||
for (i = MO_BUS_DISABLED; i <= MO_BUS_SCSI; i++) {
|
||||
if ((i == MO_BUS_DISABLED) || (i >= MO_BUS_ATAPI))
|
||||
SendMessage(h, CB_ADDSTRING, 0, win_get_string(combo_id_to_string_id(i)));
|
||||
@@ -4390,21 +4392,21 @@ mo_add_locations(HWND hdlg)
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_MO_TYPE);
|
||||
for (int i=0; i < KNOWN_MO_DRIVE_TYPES; i++) {
|
||||
memset(temp, 0, 30);
|
||||
memcpy(temp, mo_drive_types[i].vendor, 8);
|
||||
temp[strlen(temp)] = ' ';
|
||||
memcpy(temp + strlen(temp), mo_drive_types[i].model, 16);
|
||||
temp[strlen(temp)] = ' ';
|
||||
memcpy(temp + strlen(temp), mo_drive_types[i].revision, 4);
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_MO_TYPE);
|
||||
for (int i=0; i < KNOWN_MO_DRIVE_TYPES; i++) {
|
||||
memset(temp, 0, 30);
|
||||
memcpy(temp, mo_drive_types[i].vendor, 8);
|
||||
temp[strlen(temp)] = ' ';
|
||||
memcpy(temp + strlen(temp), mo_drive_types[i].model, 16);
|
||||
temp[strlen(temp)] = ' ';
|
||||
memcpy(temp + strlen(temp), mo_drive_types[i].revision, 4);
|
||||
|
||||
mbstowcs(lptsTemp, temp, strlen(temp)+1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
mbstowcs(lptsTemp, temp, strlen(temp)+1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
free(temp);
|
||||
free(lptsTemp);
|
||||
free(temp);
|
||||
free(lptsTemp);
|
||||
}
|
||||
|
||||
|
||||
@@ -4639,12 +4641,14 @@ static LRESULT CALLBACK
|
||||
#else
|
||||
static BOOL CALLBACK
|
||||
#endif
|
||||
win_settings_floppy_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
win_settings_floppy_and_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND h = NULL;
|
||||
int i = 0, old_sel = 0;
|
||||
int i = 0, old_sel = 0, b = 0, assign = 0;
|
||||
uint32_t b2 = 0;
|
||||
WCHAR szText[256];
|
||||
const uint8_t fd_icons[15] = { 248, 16, 16, 16, 16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 0 };
|
||||
const uint8_t cd_icons[3] = { 249, 32, 0 };
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
@@ -4673,6 +4677,33 @@ win_settings_floppy_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
|
||||
h = GetDlgItem(hdlg, IDC_CHECKBPB);
|
||||
SendMessage(h, BM_SETCHECK, temp_fdd_check_bpb[lv1_current_sel], 0);
|
||||
|
||||
lv2_current_sel = 0;
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_init_columns(h);
|
||||
image_list_init(h, (const uint8_t *) cd_icons);
|
||||
win_settings_cdrom_drives_recalc_list(h);
|
||||
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||
cdrom_add_locations(hdlg);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
|
||||
switch (temp_cdrom[lv2_current_sel].bus_type) {
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
b = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI:
|
||||
b = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
b = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
SendMessage(h, CB_SETCURSEL, b, 0);
|
||||
|
||||
cdrom_recalc_location_controls(hdlg, 0);
|
||||
|
||||
ignore_change = 0;
|
||||
return TRUE;
|
||||
|
||||
@@ -4700,6 +4731,39 @@ win_settings_floppy_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
|
||||
h = GetDlgItem(hdlg, IDC_CHECKBPB);
|
||||
SendMessage(h, BM_SETCHECK, temp_fdd_check_bpb[lv1_current_sel], 0);
|
||||
ignore_change = 0;
|
||||
} else if ((((LPNMHDR)lParam)->code == LVN_ITEMCHANGED) && (((LPNMHDR)lParam)->idFrom == IDC_LIST_CDROM_DRIVES)) {
|
||||
old_sel = lv2_current_sel;
|
||||
lv2_current_sel = get_selected_drive(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
if (lv2_current_sel == old_sel)
|
||||
return FALSE;
|
||||
else if (lv2_current_sel == -1) {
|
||||
ignore_change = 1;
|
||||
lv2_current_sel = old_sel;
|
||||
ListView_SetItemState(h, lv2_current_sel, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||
ignore_change = 0;
|
||||
return FALSE;
|
||||
}
|
||||
ignore_change = 1;
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
|
||||
switch (temp_cdrom[lv2_current_sel].bus_type) {
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
b = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI:
|
||||
b = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
b = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
SendMessage(h, CB_SETCURSEL, b, 0);
|
||||
|
||||
mo_recalc_location_controls(hdlg, 0);
|
||||
ignore_change = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4729,109 +4793,7 @@ win_settings_floppy_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM l
|
||||
h = GetDlgItem(hdlg, IDC_LIST_FLOPPY_DRIVES);
|
||||
win_settings_floppy_drives_update_item(h, lv1_current_sel);
|
||||
break;
|
||||
}
|
||||
ignore_change = 0;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
static LRESULT CALLBACK
|
||||
#else
|
||||
static BOOL CALLBACK
|
||||
#endif
|
||||
win_settings_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND h = NULL;
|
||||
int old_sel = 0, b = 0, assign = 0;
|
||||
uint32_t b2 = 0;
|
||||
const uint8_t cd_icons[3] = { 249, 32, 0 };
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
ignore_change = 1;
|
||||
|
||||
lv1_current_sel = 0;
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_init_columns(h);
|
||||
image_list_init(h, (const uint8_t *) cd_icons);
|
||||
win_settings_cdrom_drives_recalc_list(h);
|
||||
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||
cdrom_add_locations(hdlg);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
|
||||
switch (temp_cdrom[lv1_current_sel].bus_type) {
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
b = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI:
|
||||
b = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
b = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
SendMessage(h, CB_SETCURSEL, b, 0);
|
||||
|
||||
cdrom_recalc_location_controls(hdlg, 0);
|
||||
|
||||
ignore_change = 0;
|
||||
return TRUE;
|
||||
|
||||
case WM_NOTIFY:
|
||||
if (ignore_change)
|
||||
return FALSE;
|
||||
|
||||
if ((((LPNMHDR)lParam)->code == LVN_ITEMCHANGED) && (((LPNMHDR)lParam)->idFrom == IDC_LIST_CDROM_DRIVES)) {
|
||||
old_sel = lv1_current_sel;
|
||||
lv1_current_sel = get_selected_drive(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
if (lv1_current_sel == old_sel)
|
||||
return FALSE;
|
||||
else if (lv1_current_sel == -1) {
|
||||
ignore_change = 1;
|
||||
lv1_current_sel = old_sel;
|
||||
ListView_SetItemState(h, lv1_current_sel, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||
ignore_change = 0;
|
||||
return FALSE;
|
||||
}
|
||||
ignore_change = 1;
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
|
||||
switch (temp_cdrom[lv1_current_sel].bus_type) {
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
b = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI:
|
||||
b = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
b = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
SendMessage(h, CB_SETCURSEL, b, 0);
|
||||
|
||||
mo_recalc_location_controls(hdlg, 0);
|
||||
ignore_change = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (ignore_change)
|
||||
return FALSE;
|
||||
|
||||
ignore_change = 1;
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDC_COMBO_CD_BUS:
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
b = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
@@ -4846,42 +4808,42 @@ win_settings_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
|
||||
b2 = CDROM_BUS_SCSI;
|
||||
break;
|
||||
}
|
||||
if (b2 == temp_cdrom[lv1_current_sel].bus_type)
|
||||
if (b2 == temp_cdrom[lv2_current_sel].bus_type)
|
||||
break;
|
||||
cdrom_untrack(lv1_current_sel);
|
||||
assign = (temp_cdrom[lv1_current_sel].bus_type == b2) ? 0 : 1;
|
||||
if (temp_cdrom[lv1_current_sel].bus_type == CDROM_BUS_DISABLED)
|
||||
temp_cdrom[lv1_current_sel].speed = 8;
|
||||
temp_cdrom[lv1_current_sel].bus_type = b2;
|
||||
cdrom_untrack(lv2_current_sel);
|
||||
assign = (temp_cdrom[lv2_current_sel].bus_type == b2) ? 0 : 1;
|
||||
if (temp_cdrom[lv2_current_sel].bus_type == CDROM_BUS_DISABLED)
|
||||
temp_cdrom[lv2_current_sel].speed = 8;
|
||||
temp_cdrom[lv2_current_sel].bus_type = b2;
|
||||
cdrom_recalc_location_controls(hdlg, assign);
|
||||
cdrom_track(lv1_current_sel);
|
||||
cdrom_track(lv2_current_sel);
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_update_item(h, lv1_current_sel);
|
||||
win_settings_cdrom_drives_update_item(h, lv2_current_sel);
|
||||
break;
|
||||
|
||||
case IDC_COMBO_CD_ID:
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_ID);
|
||||
cdrom_untrack(lv1_current_sel);
|
||||
temp_cdrom[lv1_current_sel].scsi_device_id = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cdrom_track(lv1_current_sel);
|
||||
cdrom_untrack(lv2_current_sel);
|
||||
temp_cdrom[lv2_current_sel].scsi_device_id = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cdrom_track(lv2_current_sel);
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_update_item(h, lv1_current_sel);
|
||||
win_settings_cdrom_drives_update_item(h, lv2_current_sel);
|
||||
break;
|
||||
|
||||
case IDC_COMBO_CD_CHANNEL_IDE:
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_CHANNEL_IDE);
|
||||
cdrom_untrack(lv1_current_sel);
|
||||
temp_cdrom[lv1_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cdrom_track(lv1_current_sel);
|
||||
cdrom_untrack(lv2_current_sel);
|
||||
temp_cdrom[lv2_current_sel].ide_channel = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
cdrom_track(lv2_current_sel);
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_update_item(h, lv1_current_sel);
|
||||
win_settings_cdrom_drives_update_item(h, lv2_current_sel);
|
||||
break;
|
||||
|
||||
case IDC_COMBO_CD_SPEED:
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_SPEED);
|
||||
temp_cdrom[lv1_current_sel].speed = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
|
||||
temp_cdrom[lv2_current_sel].speed = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_update_item(h, lv1_current_sel);
|
||||
win_settings_cdrom_drives_update_item(h, lv2_current_sel);
|
||||
break;
|
||||
}
|
||||
ignore_change = 0;
|
||||
@@ -4893,6 +4855,7 @@ win_settings_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
static LRESULT CALLBACK
|
||||
#else
|
||||
@@ -4903,7 +4866,7 @@ win_settings_other_removable_devices_proc(HWND hdlg, UINT message, WPARAM wParam
|
||||
HWND h = NULL;
|
||||
int old_sel = 0, b = 0, assign = 0;
|
||||
uint32_t b2 = 0;
|
||||
const uint8_t mo_icons[3] = { 251, 56, 0 };
|
||||
const uint8_t mo_icons[3] = { 251, 56, 0 };
|
||||
const uint8_t zip_icons[3] = { 250, 48, 0 };
|
||||
|
||||
switch (message) {
|
||||
@@ -5195,11 +5158,8 @@ void win_settings_show_child(HWND hwndParent, DWORD child_id)
|
||||
case SETTINGS_PAGE_HARD_DISKS:
|
||||
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_HARD_DISKS, hwndParent, win_settings_hard_disks_proc);
|
||||
break;
|
||||
case SETTINGS_PAGE_FLOPPY_DRIVES:
|
||||
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_FLOPPY_DRIVES, hwndParent, win_settings_floppy_drives_proc);
|
||||
break;
|
||||
case SETTINGS_PAGE_CDROM_DRIVES:
|
||||
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_CDROM_DRIVES, hwndParent, win_settings_cdrom_drives_proc);
|
||||
case SETTINGS_PAGE_FLOPPY_AND_CDROM_DRIVES:
|
||||
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_FLOPPY_AND_CDROM_DRIVES, hwndParent, win_settings_floppy_and_cdrom_drives_proc);
|
||||
break;
|
||||
case SETTINGS_PAGE_OTHER_REMOVABLE_DEVICES:
|
||||
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_OTHER_REMOVABLE_DEVICES, hwndParent, win_settings_other_removable_devices_proc);
|
||||
@@ -5222,13 +5182,8 @@ win_settings_main_insert_categories(HWND hwndList)
|
||||
lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
|
||||
lvI.stateMask = lvI.iSubItem = lvI.state = 0;
|
||||
|
||||
for (i = 0; i < 11; i++) {
|
||||
if (i <= 8)
|
||||
lvI.pszText = plat_get_string(IDS_2065+i);
|
||||
else if (i == 9)
|
||||
lvI.pszText = plat_get_string(IDS_2139);
|
||||
else if (i == 10)
|
||||
lvI.pszText = plat_get_string(IDS_2074);
|
||||
for (i = 0; i < 10; i++) {
|
||||
lvI.pszText = plat_get_string(IDS_2065+i);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = i;
|
||||
|
||||
@@ -5275,7 +5230,7 @@ win_settings_main_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND h = NULL;
|
||||
int category, i = 0, j = 0;
|
||||
const uint8_t cat_icons[12] = { 240, 241, 242, 243, 80, 244, 245, 64, 246, 32, 247, 0 };
|
||||
const uint8_t cat_icons[12] = { 240, 241, 242, 243, 96, 244, 245, 80, 246, 247, 0 };
|
||||
|
||||
hwndParentDialog = hdlg;
|
||||
|
||||
|
@@ -259,6 +259,7 @@ StatusBarCreateZIPTip(int part)
|
||||
wcscpy(sbTips[part], tempTip);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
StatusBarCreateMOTip(int part)
|
||||
{
|
||||
@@ -287,6 +288,7 @@ StatusBarCreateMOTip(int part)
|
||||
wcscpy(sbTips[part], tempTip);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
StatusBarCreateDiskTip(int part)
|
||||
{
|
||||
@@ -677,12 +679,12 @@ ui_sb_update_panes(void)
|
||||
break;
|
||||
|
||||
case SB_HDD: /* Hard disk */
|
||||
sb_part_icons[i] = 64;
|
||||
sb_part_icons[i] = 80;
|
||||
StatusBarCreateDiskTip(i);
|
||||
break;
|
||||
|
||||
case SB_NETWORK: /* Network */
|
||||
sb_part_icons[i] = 80;
|
||||
sb_part_icons[i] = 96;
|
||||
StatusBarCreateNetworkTip(i);
|
||||
break;
|
||||
|
||||
@@ -806,12 +808,14 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 48; i < 50; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 56; i < 58; i++)
|
||||
for (i = 56; i < 58; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 64; i < 66; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 80; i < 82; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 96; i < 98; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 144; i < 146; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 152; i < 154; i++)
|
||||
@@ -820,7 +824,9 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 176; i < 178; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 184; i < 186; i++)
|
||||
for (i = 184; i < 186; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 192; i < 194; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
for (i = 243; i < 244; i++)
|
||||
hIcon[i] = LoadIconEx((PCTSTR) (uintptr_t) i);
|
||||
|