Realistic CD-ROM timings on ATAPI PIO, ATAPI DMA, SCSI NCR 53c810, and SCSI Adaptec/Buslogic;
Added ability to select emulated CD-ROM drive speed; The Adaptec and BusLogic SCSI controllers are no longer threaded; Two fixes in video/vid_s3.c.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Windows 86Box Settings dialog handler.
|
||||
*
|
||||
* Version: @(#)win_settings.c 1.0.40 2018/03/06
|
||||
* Version: @(#)win_settings.c 1.0.41 2018/03/07
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
@@ -3961,6 +3961,7 @@ static BOOL win_settings_cdrom_drives_recalc_list(HWND hwndList)
|
||||
{
|
||||
fsid = combo_id_to_format_string_id(temp_cdrom_drives[i].bus_type);
|
||||
|
||||
lvI.iSubItem = 0;
|
||||
switch (temp_cdrom_drives[i].bus_type)
|
||||
{
|
||||
case CDROM_BUS_DISABLED:
|
||||
@@ -3989,6 +3990,21 @@ static BOOL win_settings_cdrom_drives_recalc_list(HWND hwndList)
|
||||
|
||||
if (ListView_InsertItem(hwndList, &lvI) == -1)
|
||||
return FALSE;
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
if (temp_cdrom_drives[i].bus_type == CDROM_BUS_DISABLED)
|
||||
lvI.pszText = plat_get_string(IDS_2152);
|
||||
else {
|
||||
wsprintf(szText, L"%ix", temp_cdrom_drives[i].speed);
|
||||
lvI.pszText = szText;
|
||||
}
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
if (ListView_SetItem(hwndList, &lvI) == -1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -4102,7 +4118,7 @@ static BOOL win_settings_cdrom_drives_init_columns(HWND hwndList)
|
||||
lvc.iSubItem = 0;
|
||||
lvc.pszText = plat_get_string(IDS_2082);
|
||||
|
||||
lvc.cx = 392;
|
||||
lvc.cx = 342;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
|
||||
if (ListView_InsertColumn(hwndList, 0, &lvc) == -1)
|
||||
@@ -4110,6 +4126,17 @@ static BOOL win_settings_cdrom_drives_init_columns(HWND hwndList)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lvc.iSubItem = 1;
|
||||
lvc.pszText = plat_get_string(IDS_2178);
|
||||
|
||||
lvc.cx = 50;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
|
||||
if (ListView_InsertColumn(hwndList, 1, &lvc) == -1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -4130,7 +4157,6 @@ static BOOL win_settings_zip_drives_init_columns(HWND hwndList)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
lvc.iSubItem = 1;
|
||||
lvc.pszText = plat_get_string(IDS_2143);
|
||||
|
||||
@@ -4294,6 +4320,21 @@ static void win_settings_cdrom_drives_update_item(HWND hwndList, int i)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
if (temp_cdrom_drives[i].bus_type == CDROM_BUS_DISABLED)
|
||||
lvI.pszText = plat_get_string(IDS_2152);
|
||||
else {
|
||||
wsprintf(szText, L"%ix", temp_cdrom_drives[i].speed);
|
||||
lvI.pszText = szText;
|
||||
}
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
if (ListView_SetItem(hwndList, &lvI) == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void win_settings_zip_drives_update_item(HWND hwndList, int i)
|
||||
@@ -4367,6 +4408,13 @@ static void cdrom_add_locations(HWND hdlg)
|
||||
}
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_SPEED);
|
||||
for (i = 1; i <= 52; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, L"%ix", i);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_ID);
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
@@ -4390,6 +4438,7 @@ static void cdrom_add_locations(HWND hdlg)
|
||||
|
||||
free(lptsTemp);
|
||||
}
|
||||
|
||||
static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -4416,6 +4465,16 @@ static void cdrom_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
EnableWindow(h, FALSE);
|
||||
ShowWindow(h, SW_HIDE);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_SPEED);
|
||||
if (bus == CDROM_BUS_DISABLED) {
|
||||
EnableWindow(h, FALSE);
|
||||
ShowWindow(h, SW_HIDE);
|
||||
} else {
|
||||
ShowWindow(h, SW_SHOW);
|
||||
EnableWindow(h, TRUE);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom_drives[cdlv_current_sel].speed - 1, 0);
|
||||
}
|
||||
|
||||
switch(bus)
|
||||
{
|
||||
case CDROM_BUS_ATAPI_PIO_ONLY: /* ATAPI (PIO-only) */
|
||||
@@ -4496,6 +4555,7 @@ static void zip_add_locations(HWND hdlg)
|
||||
|
||||
free(lptsTemp);
|
||||
}
|
||||
|
||||
static void zip_recalc_location_controls(HWND hdlg, int assign_id)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -4969,6 +5029,8 @@ win_settings_other_removable_devices_proc(HWND hdlg, UINT message, WPARAM wParam
|
||||
}
|
||||
cdrom_untrack(cdlv_current_sel);
|
||||
assign = (temp_cdrom_drives[cdlv_current_sel].bus_type == b2) ? 0 : 1;
|
||||
if (temp_cdrom_drives[cdlv_current_sel].bus_type == CDROM_BUS_DISABLED)
|
||||
temp_cdrom_drives[cdlv_current_sel].speed = 8;
|
||||
if ((b2 == CDROM_BUS_ATAPI_PIO_ONLY) && (temp_cdrom_drives[cdlv_current_sel].bus_type == CDROM_BUS_ATAPI_PIO_AND_DMA))
|
||||
assign = 0;
|
||||
else if ((b2 == CDROM_BUS_ATAPI_PIO_AND_DMA) && (temp_cdrom_drives[cdlv_current_sel].bus_type == CDROM_BUS_ATAPI_PIO_ONLY))
|
||||
@@ -5030,6 +5092,20 @@ cdrom_bus_skip:
|
||||
rd_ignore_change = 0;
|
||||
return FALSE;
|
||||
|
||||
case IDC_COMBO_CD_SPEED:
|
||||
if (rd_ignore_change)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rd_ignore_change = 1;
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_SPEED);
|
||||
temp_cdrom_drives[cdlv_current_sel].speed = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_update_item(h, cdlv_current_sel);
|
||||
rd_ignore_change = 0;
|
||||
return FALSE;
|
||||
|
||||
case IDC_COMBO_ZIP_BUS:
|
||||
if (rd_ignore_change)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user