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.
@@ -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);
|
||||
|
||||