diff --git a/src/86Box.rc b/src/86Box.rc index 07282d465..997b7cf1b 100644 --- a/src/86Box.rc +++ b/src/86Box.rc @@ -189,8 +189,8 @@ FONT 9, "Segoe UI" BEGIN DEFPUSHBUTTON "OK",IDOK,55,89,50,14 PUSHBUTTON "Cancel",IDCANCEL,112,89,50,14 - EDITTEXT IDC_EDIT_HD_FILE_NAME,7,16,188,12 - PUSHBUTTON "...",IDC_CFILE,195,16,16,12 + EDITTEXT IDC_EDIT_HD_FILE_NAME,7,16,153,12 + PUSHBUTTON "&Specify...",IDC_CFILE,167,16,44,12 EDITTEXT IDC_EDIT_HD_SPT,183,34,28,12 EDITTEXT IDC_EDIT_HD_HPC,112,34,28,12 EDITTEXT IDC_EDIT_HD_CYL,42,34,28,12 diff --git a/src/disc_86f.c b/src/disc_86f.c index 83df71198..a939e9fe6 100644 --- a/src/disc_86f.c +++ b/src/disc_86f.c @@ -724,6 +724,10 @@ int d86f_wrong_densel(int drive) { case 0: default: + if (fdd_is_dd(drive)) + { + return 0; + } if (fdd_get_densel(drive)) { return 1; @@ -734,6 +738,10 @@ int d86f_wrong_densel(int drive) } break; case 1: + if (fdd_is_dd(drive)) + { + return 1; + } if (fdd_get_densel(drive)) { return 0; @@ -751,6 +759,10 @@ int d86f_wrong_densel(int drive) } break; case 2: + if (fdd_is_dd(drive) || !fdd_is_ed(drive)) + { + return 1; + } if (fdd_get_densel(drive)) { return 0; diff --git a/src/fdc.c b/src/fdc.c index 40f1c11f8..9e5b66cce 100644 --- a/src/fdc.c +++ b/src/fdc.c @@ -142,11 +142,11 @@ int discrate[4]; int discint; -int fdc_do_log = 1; +int fdc_do_log = 0; void fdc_log(const char *format, ...) { -// #ifdef ENABLE_FDC_LOG +#ifdef ENABLE_FDC_LOG if (fdc_do_log) { va_list ap; @@ -155,7 +155,7 @@ void fdc_log(const char *format, ...) va_end(ap); fflush(stdout); } -// #endif +#endif } void fdc_reset() @@ -429,6 +429,7 @@ int fdc_get_rwc(int drive) void fdc_update_rwc(int drive, int rwc) { + fdc_log("FDD %c: New RWC is %i\n", 0x41 + drive, rwc); fdc.rwc[drive] = rwc; fdc_rate(drive); } @@ -445,6 +446,7 @@ void fdc_update_boot_drive(int boot_drive) void fdc_update_densel_polarity(int densel_polarity) { + fdc_log("FDC: New DENSEL polarity is %i\n", densel_polarity); fdc.densel_polarity = densel_polarity; fdc_update_rates(); } @@ -456,12 +458,14 @@ uint8_t fdc_get_densel_polarity() void fdc_update_densel_force(int densel_force) { + fdc_log("FDC: New DENSEL force is %i\n", densel_force); fdc.densel_force = densel_force; fdc_update_rates(); } void fdc_update_drvrate(int drive, int drvrate) { + fdc_log("FDD %c: New drive rate is %i\n", 0x41 + drive, drvrate); fdc.drvrate[drive] = drvrate; fdc_rate(drive); } @@ -588,6 +592,7 @@ static void fdc_rate(int drive) { fdc_update_rate(drive); disc_set_rate(drive, fdc.drvrate[drive], fdc.rate); + fdc_log("FDD %c: Setting rate: %i, %i, %i (%i, %i)\n", 0x41 + drive, fdc.drvrate[drive], fdc.rate, fdc_get_densel(drive), fdc.rwc[drive], fdc.densel_force); fdd_set_densel(fdc_get_densel(drive)); } @@ -1822,6 +1827,7 @@ void fdc_error(int st5, int st6) fdc.res[4]=0x40|(fdd_get_head(real_drive(fdc.drive))?4:0)|fdc.rw_drive; fdc.res[5]=st5; fdc.res[6]=st6; + fdc_log("FDC Error: %02X %02X %02X\n", fdc.res[4], fdc.res[5], fdc.res[6]); switch(discint) { case 0x02: diff --git a/src/fdd.c b/src/fdd.c index d876552f6..35a2b6865 100644 --- a/src/fdd.c +++ b/src/fdd.c @@ -271,6 +271,11 @@ int fdd_is_525(int drive) return drive_types[fdd[drive].type].flags & FLAG_525; } +int fdd_is_dd(int drive) +{ + return (drive_types[fdd[drive].type].flags & 0x70) == 0x10; +} + int fdd_is_ed(int drive) { return drive_types[fdd[drive].type].flags & FLAG_HOLE2; diff --git a/src/fdd.h b/src/fdd.h index 11d9dee89..c4a18afbe 100644 --- a/src/fdd.h +++ b/src/fdd.h @@ -10,6 +10,7 @@ void fdd_set_densel(int densel); int fdd_can_read_medium(int drive); int fdd_doublestep_40(int drive); int fdd_is_525(int drive); +int fdd_is_dd(int drive); int fdd_is_ed(int drive); int fdd_is_double_sided(int drive); void fdd_set_head(int drive, int head); @@ -28,3 +29,6 @@ int fdd_get_densel(int drive); void fdd_setswap(int swap); char *fdd_getname(int type); + +char *fdd_get_internal_name(int type); +int fdd_get_from_internal_name(char *s); diff --git a/src/ne2000.c b/src/ne2000.c index 9bcad3036..f67b3f0d4 100644 --- a/src/ne2000.c +++ b/src/ne2000.c @@ -257,9 +257,9 @@ static uint8_t *ne2000_mac() void ne2000_generate_maclocal(int mac) { - maclocal[0] = 0x00; /* 00:00:1B (NE2000 ISA vendor prefix). */ + maclocal[0] = 0x00; /* 00:00:D8 (NE2000 ISA vendor prefix). */ maclocal[1] = 0x00; - maclocal[2] = 0x1B; + maclocal[2] = 0xD8; if (mac & 0xff000000) { diff --git a/src/pc.c b/src/pc.c index 2c9f891ad..a3a09c04f 100644 --- a/src/pc.c +++ b/src/pc.c @@ -769,7 +769,12 @@ void loadconfig(char *fn) for (c = 0; c < FDD_NUM; c++) { sprintf(temps, "fdd_%02i_type", c + 1); - fdd_set_type(c, config_get_int(NULL, temps, (c < 2) ? 2 : 0)); + p = (char *)config_get_string(NULL, temps, (c < 2) ? "525_2dd" : "none"); + if (p) + fdd_set_type(c, fdd_get_from_internal_name(p)); + else + fdd_set_type(c, (c < 2) ? 2 : 0); + sprintf(temps, "fdd_%02i_fn", c + 1); p = (char *)config_get_string(NULL, temps, ""); if (p) strcpy(discfns[c], p); @@ -965,7 +970,7 @@ void saveconfig() for (c = 0; c < FDD_NUM; c++) { sprintf(temps, "fdd_%02i_type", c + 1); - config_set_int(NULL, temps, fdd_get_type(c)); + config_set_string(NULL, temps, fdd_get_internal_name(fdd_get_type(c))); sprintf(temps, "fdd_%02i_fn", c + 1); config_set_string(NULL, temps, discfns[c]); sprintf(temps, "fdd_%02i_writeprot", c + 1); diff --git a/src/win-settings.c b/src/win-settings.c index 4790ce717..ff3f87c7a 100644 --- a/src/win-settings.c +++ b/src/win-settings.c @@ -2125,6 +2125,8 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W SendMessage(h, CB_SETCURSEL, 0, 0); h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL_IDE); SendMessage(h, CB_SETCURSEL, 0, 0); + h = GetDlgItem(hdlg, IDC_EDIT_HD_FILE_NAME); + EnableWindow(h, FALSE); no_update = 0; return TRUE;