Merge branch 'master' of https://github.com/86Box/86Box into feature/savquest
This commit is contained in:
@@ -549,32 +549,45 @@ BEGIN
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,118,94,10
|
||||
END
|
||||
|
||||
DLG_CFG_STORAGE DIALOG DISCARDABLE 107, 0, 267, 111
|
||||
DLG_CFG_STORAGE DIALOG DISCARDABLE 107, 0, 267, 211
|
||||
STYLE DS_CONTROL | WS_CHILD
|
||||
FONT 9, "Segoe UI"
|
||||
BEGIN
|
||||
LTEXT "SCSI Controller:",IDT_1717,7,9,64,10
|
||||
COMBOBOX IDC_COMBO_SCSI,64,7,155,120,CBS_DROPDOWNLIST |
|
||||
LTEXT "HD Controller:",IDT_1718,7,9,64,10
|
||||
COMBOBOX IDC_COMBO_HDC,64,7,155,120,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI,222,7,38,12
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_HDC,222,7,38,12
|
||||
|
||||
LTEXT "HD Controller:",IDT_1718,7,28,64,10
|
||||
COMBOBOX IDC_COMBO_HDC,64,26,155,120,CBS_DROPDOWNLIST |
|
||||
LTEXT "FD Controller:",IDT_1768,7,28,64,10
|
||||
COMBOBOX IDC_COMBO_FDC,64,26,155,120,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_HDC,222,26,38,12
|
||||
|
||||
LTEXT "FD Controller:",IDT_1768,7,47,64,10
|
||||
COMBOBOX IDC_COMBO_FDC,64,45,155,120,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_FDC,222,45,38,12
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_FDC,222,26,38,12
|
||||
|
||||
CONTROL "Tertiary IDE Controller",IDC_CHECK_IDE_TER,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,66,199,10
|
||||
PUSHBUTTON "Configure",IDC_BUTTON_IDE_TER,222,64,38,12
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,47,199,10
|
||||
PUSHBUTTON "Configure",IDC_BUTTON_IDE_TER,222,45,38,12
|
||||
|
||||
CONTROL "Quaternary IDE Controller",IDC_CHECK_IDE_QUA,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,85,199,10
|
||||
PUSHBUTTON "Configure",IDC_BUTTON_IDE_QUA,222,83,38,12
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,66,199,10
|
||||
PUSHBUTTON "Configure",IDC_BUTTON_IDE_QUA,222,64,38,12
|
||||
|
||||
GROUPBOX "SCSI",IDC_GROUP_SCSI,7,85,253,93
|
||||
LTEXT "Controller 1:",IDT_1763,16,102,48,10
|
||||
COMBOBOX IDC_COMBO_SCSI_1,73,100,137,120,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI_1,213,100,38,12
|
||||
LTEXT "Controller 2:",IDT_1764,16,121,48,10
|
||||
COMBOBOX IDC_COMBO_SCSI_2,73,119,137,120,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI_2,213,119,38,12
|
||||
LTEXT "Controller 3:",IDT_1765,16,140,48,10
|
||||
COMBOBOX IDC_COMBO_SCSI_3,73,138,137,120,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI_3,213,138,38,12
|
||||
LTEXT "Controller 4:",IDT_1766,16,159,48,10
|
||||
COMBOBOX IDC_COMBO_SCSI_4,73,157,137,120,
|
||||
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI_4,213,157,38,12
|
||||
END
|
||||
|
||||
DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 107, 0, 267, 154
|
||||
@@ -1114,7 +1127,7 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_4096 "Hard disk (%s)"
|
||||
IDS_4097 "%01i:%01i"
|
||||
IDS_4098 "%i"
|
||||
IDS_4098 "%01i"
|
||||
IDS_4099 "MFM/RLL or ESDI CD-ROM drives never existed"
|
||||
IDS_4100 "Custom..."
|
||||
IDS_4101 "Custom (large)..."
|
||||
@@ -1151,6 +1164,7 @@ BEGIN
|
||||
IDS_4132 "This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?"
|
||||
IDS_4133 "Parent and child disk timestamps do not match"
|
||||
IDS_4134 "Could not fix VHD timestamp."
|
||||
IDS_4135 "%01i:%02i"
|
||||
|
||||
IDS_4352 "MFM/RLL"
|
||||
IDS_4353 "XTA"
|
||||
@@ -1164,7 +1178,7 @@ BEGIN
|
||||
IDS_4610 "ESDI (%01i:%01i)"
|
||||
IDS_4611 "IDE (%01i:%01i)"
|
||||
IDS_4612 "ATAPI (%01i:%01i)"
|
||||
IDS_4613 "SCSI (ID %02i)"
|
||||
IDS_4613 "SCSI (%01i:%02i)"
|
||||
|
||||
IDS_5120 "CD-ROM %i (%s): %s"
|
||||
|
||||
@@ -1174,7 +1188,7 @@ BEGIN
|
||||
|
||||
IDS_5632 "Disabled"
|
||||
IDS_5637 "ATAPI (%01i:%01i)"
|
||||
IDS_5638 "SCSI (ID %02i)"
|
||||
IDS_5638 "SCSI (%01i:%02i)"
|
||||
|
||||
IDS_5888 "160 kB"
|
||||
IDS_5889 "180 kB"
|
||||
|
||||
@@ -295,7 +295,9 @@ is_valid_cdrom(int i)
|
||||
{
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
|
||||
return 0;
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current == 0))
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !MACHINE_HAS_SCSI &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
return 0;
|
||||
return cdrom[i].bus_type != 0;
|
||||
}
|
||||
@@ -305,7 +307,9 @@ is_valid_zip(int i)
|
||||
{
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
|
||||
return 0;
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current == 0))
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !MACHINE_HAS_SCSI &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
return 0;
|
||||
return zip_drives[i].bus_type != 0;
|
||||
}
|
||||
@@ -315,7 +319,9 @@ is_valid_mo(int i)
|
||||
{
|
||||
if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
|
||||
return 0;
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current == 0))
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !MACHINE_HAS_SCSI &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
return 0;
|
||||
return mo_drives[i].bus_type != 0;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,8 @@ static int temp_lpt_devices[3];
|
||||
static int temp_serial[4], temp_lpt[3];
|
||||
|
||||
/* Other peripherals category */
|
||||
static int temp_fdc_card, temp_hdc, temp_scsi_card, temp_ide_ter, temp_ide_qua;
|
||||
static int temp_fdc_card, temp_hdc, temp_ide_ter, temp_ide_qua;
|
||||
static int temp_scsi_card[SCSI_BUS_MAX];
|
||||
static int temp_bugger;
|
||||
static int temp_postcard;
|
||||
static int temp_isartc;
|
||||
@@ -136,7 +137,7 @@ static int settings_list_to_midi[20], settings_list_to_midi_in[20];
|
||||
static int settings_list_to_hdc[20];
|
||||
|
||||
static int max_spt = 63, max_hpc = 255, max_tracks = 266305;
|
||||
static uint64_t mfm_tracking, esdi_tracking, xta_tracking, ide_tracking, scsi_tracking[2];
|
||||
static uint64_t mfm_tracking, esdi_tracking, xta_tracking, ide_tracking, scsi_tracking[8];
|
||||
static uint64_t size;
|
||||
static int hd_listview_items, hdc_id_to_listview_index[HDD_NUM];
|
||||
static int no_update = 0, existing = 0, chs_enabled = 0;
|
||||
@@ -369,7 +370,8 @@ win_settings_init(void)
|
||||
temp_serial[i] = serial_enabled[i];
|
||||
|
||||
/* Other peripherals category */
|
||||
temp_scsi_card = scsi_card_current;
|
||||
for (i = 0; i < SCSI_BUS_MAX; i++)
|
||||
temp_scsi_card[i] = scsi_card_current[i];
|
||||
temp_fdc_card = fdc_type;
|
||||
temp_hdc = hdc_current;
|
||||
temp_ide_ter = ide_ter_enabled;
|
||||
@@ -485,7 +487,8 @@ win_settings_changed(void)
|
||||
i = i || (temp_serial[j] != serial_enabled[j]);
|
||||
|
||||
/* Peripherals category */
|
||||
i = i || (scsi_card_current != temp_scsi_card);
|
||||
for (j = 0; j < SCSI_BUS_MAX; j++)
|
||||
i = i || (temp_scsi_card[j] != scsi_card_current[j]);
|
||||
i = i || (fdc_type != temp_fdc_card);
|
||||
i = i || (hdc_current != temp_hdc);
|
||||
i = i || (temp_ide_ter != ide_ter_enabled);
|
||||
@@ -572,7 +575,8 @@ win_settings_save(void)
|
||||
serial_enabled[i] = temp_serial[i];
|
||||
|
||||
/* Peripherals category */
|
||||
scsi_card_current = temp_scsi_card;
|
||||
for (i = 0; i < SCSI_BUS_MAX; i++)
|
||||
scsi_card_current[i] = temp_scsi_card[i];
|
||||
hdc_current = temp_hdc;
|
||||
fdc_type = temp_fdc_card;
|
||||
ide_ter_enabled = temp_ide_ter;
|
||||
@@ -1530,7 +1534,7 @@ static BOOL CALLBACK
|
||||
win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int c, d;
|
||||
int is_at;
|
||||
int e, is_at;
|
||||
LPTSTR lptsTemp;
|
||||
char *stransi;
|
||||
const device_t *scsi_dev, *fdc_dev;
|
||||
@@ -1611,7 +1615,8 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
/*SCSI config*/
|
||||
c = d = 0;
|
||||
settings_reset_content(hdlg, IDC_COMBO_SCSI);
|
||||
for (e = 0; e < SCSI_BUS_MAX; e++)
|
||||
settings_reset_content(hdlg, IDC_COMBO_SCSI_1 + e);
|
||||
while (1) {
|
||||
generate_device_name(scsi_card_getdevice(c), scsi_card_get_internal_name(c), 1);
|
||||
|
||||
@@ -1622,13 +1627,17 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
scsi_dev = scsi_card_getdevice(c);
|
||||
|
||||
if (device_is_valid(scsi_dev, machines[temp_machine].flags)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_SCSI, win_get_string(IDS_2103));
|
||||
else
|
||||
settings_add_string(hdlg, IDC_COMBO_SCSI, (LPARAM) device_name);
|
||||
for (e = 0; e < SCSI_BUS_MAX; e++) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_SCSI_1 + e, win_get_string(IDS_2103));
|
||||
else
|
||||
settings_add_string(hdlg, IDC_COMBO_SCSI_1 + e, (LPARAM) device_name);
|
||||
|
||||
if ((c == 0) || (c == temp_scsi_card[e]))
|
||||
settings_set_cur_sel(hdlg, IDC_COMBO_SCSI_1 + e, d);
|
||||
}
|
||||
|
||||
settings_list_to_device[0][d] = c;
|
||||
if ((c == 0) || (c == temp_scsi_card))
|
||||
settings_set_cur_sel(hdlg, IDC_COMBO_SCSI, d);
|
||||
d++;
|
||||
}
|
||||
}
|
||||
@@ -1636,8 +1645,10 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
c++;
|
||||
}
|
||||
|
||||
settings_enable_window(hdlg, IDC_COMBO_SCSI, d);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SCSI, scsi_card_has_config(temp_scsi_card));
|
||||
for (c = 0; c < SCSI_BUS_MAX; c++) {
|
||||
settings_enable_window(hdlg, IDC_COMBO_SCSI_1 + c, d);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SCSI_1 + c, scsi_card_has_config(temp_scsi_card[c]));
|
||||
}
|
||||
is_at = IS_AT(temp_machine);
|
||||
settings_enable_window(hdlg, IDC_CHECK_IDE_TER, is_at);
|
||||
settings_enable_window(hdlg, IDC_BUTTON_IDE_TER, is_at && temp_ide_ter);
|
||||
@@ -1673,14 +1684,16 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_HDC, hdc_has_config(temp_hdc));
|
||||
break;
|
||||
|
||||
case IDC_CONFIGURE_SCSI:
|
||||
temp_scsi_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI)];
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, (void *)scsi_card_getdevice(temp_scsi_card));
|
||||
case IDC_CONFIGURE_SCSI_1 ... IDC_CONFIGURE_SCSI_4:
|
||||
c = LOWORD(wParam) - IDC_CONFIGURE_SCSI_1;
|
||||
temp_scsi_card[c] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI_1 + c)];
|
||||
temp_deviceconfig |= deviceconfig_inst_open(hdlg, (void *)scsi_card_getdevice(temp_scsi_card[c]), c + 1);
|
||||
break;
|
||||
|
||||
case IDC_COMBO_SCSI:
|
||||
temp_scsi_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI)];
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SCSI, scsi_card_has_config(temp_scsi_card));
|
||||
case IDC_COMBO_SCSI_1 ... IDC_COMBO_SCSI_4:
|
||||
c = LOWORD(wParam) - IDC_COMBO_SCSI_1;
|
||||
temp_scsi_card[c] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI_1 + c)];
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SCSI_1 + c, scsi_card_has_config(temp_scsi_card[c]));
|
||||
break;
|
||||
|
||||
case IDC_CHECK_IDE_TER:
|
||||
@@ -1706,7 +1719,8 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_SAVESETTINGS:
|
||||
temp_hdc = settings_list_to_hdc[settings_get_cur_sel(hdlg, IDC_COMBO_HDC)];
|
||||
temp_fdc_card = settings_list_to_fdc[settings_get_cur_sel(hdlg, IDC_COMBO_FDC)];
|
||||
temp_scsi_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI)];
|
||||
for (c = 0; c < SCSI_BUS_MAX; c++)
|
||||
temp_scsi_card[c] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_SCSI_1 + c)];
|
||||
temp_ide_ter = settings_get_check(hdlg, IDC_CHECK_IDE_TER);
|
||||
temp_ide_qua = settings_get_check(hdlg, IDC_CHECK_IDE_QUA);
|
||||
|
||||
@@ -1896,8 +1910,8 @@ add_locations(HWND hdlg)
|
||||
settings_add_string(hdlg, IDC_COMBO_HD_CHANNEL, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
for (i = 0; i < 64; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4135), i >> 4, i & 15);
|
||||
settings_add_string(hdlg, IDC_COMBO_HD_ID, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -1943,7 +1957,7 @@ next_free_scsi_id(uint8_t *id)
|
||||
{
|
||||
int64_t i;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
for (i = 0; i < 64; i++) {
|
||||
if (!(scsi_tracking[i >> 3] & (0xffLL << ((i & 0x07) << 3LL)))) {
|
||||
*id = i;
|
||||
return;
|
||||
@@ -2126,7 +2140,7 @@ win_settings_hard_disks_update_item(HWND hdlg, int i, int column)
|
||||
wsprintf(szText, plat_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id);
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id >> 4, temp_hdd[i].scsi_id >> 4 & 15);
|
||||
break;
|
||||
}
|
||||
lvI.pszText = szText;
|
||||
@@ -2200,7 +2214,7 @@ win_settings_hard_disks_recalc_list(HWND hdlg)
|
||||
wsprintf(szText, plat_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id);
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id >> 4, temp_hdd[i].scsi_id >> 4 & 15);
|
||||
break;
|
||||
}
|
||||
lvI.pszText = szText;
|
||||
@@ -3575,7 +3589,7 @@ win_settings_cdrom_drives_recalc_list(HWND hdlg)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom[i].scsi_device_id >> 4, temp_cdrom[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -3632,7 +3646,7 @@ win_settings_mo_drives_recalc_list(HWND hdlg)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case MO_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_mo_drives[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_mo_drives[i].scsi_device_id >> 4, temp_mo_drives[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -3695,7 +3709,7 @@ win_settings_zip_drives_recalc_list(HWND hdlg)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case ZIP_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_zip_drives[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_zip_drives[i].scsi_device_id >> 4, temp_zip_drives[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -4006,7 +4020,7 @@ win_settings_cdrom_drives_update_item(HWND hdlg, int i)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom[i].scsi_device_id >> 4, temp_cdrom[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -4059,7 +4073,7 @@ win_settings_mo_drives_update_item(HWND hdlg, int i)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case MO_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_mo_drives[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_mo_drives[i].scsi_device_id >> 4, temp_mo_drives[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -4117,7 +4131,7 @@ win_settings_zip_drives_update_item(HWND hdlg, int i)
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case ZIP_BUS_SCSI:
|
||||
wsprintf(szText, plat_get_string(fsid), temp_zip_drives[i].scsi_device_id);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_zip_drives[i].scsi_device_id >> 4, temp_zip_drives[i].scsi_device_id & 15);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -4154,8 +4168,8 @@ cdrom_add_locations(HWND hdlg)
|
||||
settings_add_string(hdlg, IDC_COMBO_CD_SPEED, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
for (i = 0; i < 64; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4135), i >> 4, i & 15);
|
||||
settings_add_string(hdlg, IDC_COMBO_CD_ID, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -4222,8 +4236,8 @@ mo_add_locations(HWND hdlg)
|
||||
settings_add_string(hdlg, IDC_COMBO_MO_BUS, win_get_string(combo_id_to_string_id(i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
for (i = 0; i < 64; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4135), i >> 4, i & 15);
|
||||
settings_add_string(hdlg, IDC_COMBO_MO_ID, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -4301,8 +4315,8 @@ zip_add_locations(HWND hdlg)
|
||||
settings_add_string(hdlg, IDC_COMBO_ZIP_BUS, win_get_string(combo_id_to_string_id(i)));
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
for (i = 0; i < 64; i++) {
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4135), i >> 4, i & 15);
|
||||
settings_add_string(hdlg, IDC_COMBO_ZIP_ID, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
|
||||
@@ -503,8 +503,9 @@ ui_sb_update_panes(void)
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (cdrom[i].bus_type != 0)
|
||||
sb_parts++;
|
||||
@@ -515,8 +516,9 @@ ui_sb_update_panes(void)
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (zip_drives[i].bus_type != 0)
|
||||
sb_parts++;
|
||||
@@ -527,8 +529,9 @@ ui_sb_update_panes(void)
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (mo_drives[i].bus_type != 0)
|
||||
sb_parts++;
|
||||
@@ -545,7 +548,8 @@ ui_sb_update_panes(void)
|
||||
sb_parts++;
|
||||
if (c_ide && (ide_int || !memcmp(hdc_name, "xtide", 5) || !memcmp(hdc_name, "ide", 3)))
|
||||
sb_parts++;
|
||||
if (c_scsi && (scsi_int || (scsi_card_current != 0)))
|
||||
if (c_scsi && (scsi_int || (scsi_card_current[0] != 0) || (scsi_card_current[1] != 0) ||
|
||||
(scsi_card_current[2] != 0) || (scsi_card_current[3] != 0)))
|
||||
sb_parts++;
|
||||
if (do_net)
|
||||
sb_parts++;
|
||||
@@ -575,8 +579,9 @@ ui_sb_update_panes(void)
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) &&
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (cdrom[i].bus_type != 0) {
|
||||
edge += icon_width;
|
||||
@@ -591,8 +596,9 @@ ui_sb_update_panes(void)
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) &&
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (zip_drives[i].bus_type != 0) {
|
||||
edge += icon_width;
|
||||
@@ -607,8 +613,9 @@ ui_sb_update_panes(void)
|
||||
if ((mo_drives[i].bus_type == MO_BUS_ATAPI) &&
|
||||
!ide_int && memcmp(hdc_name, "ide", 3))
|
||||
continue;
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) &&
|
||||
!scsi_int && (scsi_card_current == 0))
|
||||
if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !scsi_int &&
|
||||
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
|
||||
(scsi_card_current[2] == 0) && (scsi_card_current[3] == 0))
|
||||
continue;
|
||||
if (mo_drives[i].bus_type != 0) {
|
||||
edge += icon_width;
|
||||
@@ -646,7 +653,8 @@ ui_sb_update_panes(void)
|
||||
sb_map[SB_HDD | HDD_BUS_IDE] = sb_parts;
|
||||
sb_parts++;
|
||||
}
|
||||
if (c_scsi && (scsi_int || (scsi_card_current != 0))) {
|
||||
if (c_scsi && (scsi_int || (scsi_card_current[0] != 0) || (scsi_card_current[1] != 0) ||
|
||||
(scsi_card_current[2] != 0) || (scsi_card_current[3] != 0))) {
|
||||
edge += icon_width;
|
||||
iStatusWidths[sb_parts] = edge;
|
||||
sb_part_meanings[sb_parts] = SB_HDD | HDD_BUS_SCSI;
|
||||
|
||||
Reference in New Issue
Block a user