EDITTEXT IDC_RESERVED,347,125,40,15,ES_NUMBER
RTEXT "Block size:",IDC_BLOCKSIZE_TEXT,299,147,45,10
EDITTEXT IDC_BLOCKSIZE,347,144,40,15,ES_NUMBER
- LTEXT "HD Controller:",IDC_STATIC,10,127,54,10,SS_CENTERIMAGE
- PUSHBUTTON "Full drive/RDB mode",IDC_HDF_RDB,83,123,127,14
- COMBOBOX IDC_HDF_FEATURE_LEVEL,214,123,75,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ LTEXT "HD Controller:",IDC_STATIC,10,131,54,10,SS_CENTERIMAGE
+ COMBOBOX IDC_HDF_FEATURE_LEVEL,163,123,126,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HDF_CONTROLLER,6,145,152,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HDF_CONTROLLER_UNIT,163,145,63,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HDF_CONTROLLER_TYPE,231,145,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "OK",IDOK,147,271,50,14
PUSHBUTTON "Cancel",IDCANCEL,203,271,50,14
RTEXT "Cylinders:",IDC_CYLINDERS_TEXT,300,128,43,10,NOT WS_VISIBLE
+ CONTROL "Full drive/RDB mode",IDC_HDF_RDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,117,95,10
END
IDD_FILESYS DIALOGEX 15, 25, 396, 111
memset (&hfd, 0, sizeof hfd);
hfd.ci.readonly = true;
hfd.ci.blocksize = 512;
+ hdf->rdb = 0;
if (hdf_open (&hfd, current_hfdlg.ci.rootdir) > 0) {
for (i = 0; i < 16; i++) {
hdf_read_rdb (&hfd, id, i * 512, 512);
hdf->ci.devname[0] = 0;
if (blocksize >= 512)
hdf->ci.blocksize = blocksize;
+ hdf->rdb = 1;
break;
}
}
bool rdb = is_hdf_rdb ();
bool physgeo = rdb && ischecked(hDlg, IDC_HDF_PHYSGEOMETRY);
bool disables = !rdb || (rdb && current_hfdlg.ci.controller_type == HD_CONTROLLER_TYPE_UAE);
+ bool rdsk = current_hfdlg.rdb;
sethd(hDlg);
if (!disables)
CheckDlgButton (hDlg, IDC_HDF_RW, !current_hfdlg.ci.readonly);
CheckDlgButton (hDlg, IDC_HDF_AUTOBOOT, ISAUTOBOOT(¤t_hfdlg.ci));
CheckDlgButton (hDlg, IDC_HDF_DONOTMOUNT, !ISAUTOMOUNT(¤t_hfdlg.ci));
- ew (hDlg, IDC_HDF_RDB, !rdb);
ew (hDlg, IDC_HDF_AUTOBOOT, disables);
ew (hDlg, IDC_HDF_DONOTMOUNT, disables);
hide (hDlg, IDC_HDF_AUTOBOOT, !disables);
hide (hDlg, IDC_HARDFILE_BOOTPRI, !disables);
hide (hDlg, IDC_HARDFILE_BOOTPRI_TEXT, !disables);
hide (hDlg, IDC_HDF_PHYSGEOMETRY, !rdb);
- if (!rdb)
+ if (rdb) {
+ ew(hDlg, IDC_HDF_RDB, !rdsk);
+ setchecked(hDlg, IDC_HDF_RDB, true);
+ } else {
+ ew(hDlg, IDC_HDF_RDB, TRUE);
+ setchecked(hDlg, IDC_HDF_RDB, false);
+ }
+ if (!rdb) {
setchecked(hDlg, IDC_HDF_PHYSGEOMETRY, false);
+ }
hide(hDlg, IDC_RESERVED_TEXT, rdb);
hide(hDlg, IDC_CYLINDERS_TEXT, !rdb);
gui_set_string_cursor(hdmenutable, hDlg, IDC_HDF_CONTROLLER, current_hfdlg.ci.controller_type + current_hfdlg.ci.controller_type_unit * HD_CONTROLLER_NEXT_UNIT);
SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.ci.bootpri, TRUE);
break;
case IDC_HDF_RDB:
- SetDlgItemText (hDlg, IDC_PATH_FILESYS, _T(""));
- SetDlgItemText (hDlg, IDC_HARDFILE_DEVICE, _T(""));
- current_hfdlg.ci.sectors = current_hfdlg.ci.reserved = current_hfdlg.ci.surfaces = 0;
- current_hfdlg.ci.bootpri = 0;
- sethardfile (hDlg);
+ if (ischecked(hDlg, IDC_HDF_RDB)) {
+ SetDlgItemText(hDlg, IDC_PATH_FILESYS, _T(""));
+ SetDlgItemText(hDlg, IDC_HARDFILE_DEVICE, _T(""));
+ current_hfdlg.ci.sectors = current_hfdlg.ci.reserved = current_hfdlg.ci.surfaces = 0;
+ current_hfdlg.ci.bootpri = 0;
+ } else {
+ TCHAR tmp[MAX_DPATH];
+ _tcscpy(tmp, current_hfdlg.ci.rootdir);
+ default_hfdlg(¤t_hfdlg, false);
+ _tcscpy(current_hfdlg.ci.rootdir, tmp);
+ }
+ sethardfile(hDlg);
break;
case IDC_PATH_GEOMETRY_SELECTOR:
if (DiskSelection (hDlg, IDC_PATH_GEOMETRY, 23, &workprefs, NULL, current_hfdlg.ci.geometry)) {
if (v != *p) {
set_phys_cyls(hDlg);
updatehdfinfo (hDlg, true, false, false);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
case IDC_RESERVED:
current_hfdlg.ci.physical_geometry = true;
}
updatehdfinfo (hDlg, true, false, false);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
case IDC_HEADS:
if (v != *p) {
set_phys_cyls(hDlg);
updatehdfinfo (hDlg, true, false, false);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
case IDC_BLOCKSIZE:
if (v != *p) {
set_phys_cyls(hDlg);
updatehdfinfo (hDlg, true, false, true);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
case IDC_RESERVED:
current_hfdlg.ci.physical_geometry = true;
}
updatehdfinfo (hDlg, true, false, true);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
case IDC_HEADS:
if (v != *p) {
set_phys_cyls(hDlg);
updatehdfinfo (hDlg, true, false, true);
- ew (hDlg, IDC_HDF_RDB, !is_hdf_rdb ());
+ setchecked(hDlg, IDC_HDF_RDB, !is_hdf_rdb());
}
break;
}