DD floppy drives now correctly ignore DENSEL when reading DD floppies;
Ne2000 now uses the correct vendor ID for the MAC address, per information from waltje; File name text box in Add hard disk dialog is now correctly disabled; Floppy drive types are now stored as readable string in the configuration file.
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
12
src/fdc.c
12
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:
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
9
src/pc.c
9
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);
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user