Reworked floppy handling a bit, fixes booting from floppies;

Applied mainline PCem commit that fixes Windows 3.1.
This commit is contained in:
OBattler
2016-11-09 00:15:43 +01:00
parent e2a2815b01
commit 02014df53a
6 changed files with 170 additions and 173 deletions

View File

@@ -211,6 +211,15 @@ void disc_poll(int drive, int head)
if (!disc_notfound)
fdc_notfound();
}
/* If both heads are enabled and this is head 1, do not advance to avoid double advancing. */
if ((disc_poll_enable[drive][head] && disc_poll_enable[drive][head ^ 1]) && head)
{
return;
}
if (drives[drive].advance)
drives[drive].advance(drive);
}
void disc_poll_00()
@@ -368,7 +377,6 @@ void disc_head_poll_common(int drive, int head)
{
disc_poll_enable[drive][head] ^= 1;
head_time[drive][head] = 0;
if (disc_poll_enable[drive][head]) disc_poll_enable[drive][head ^ 1] = 0;
// pclog("Head (%i, %i) %s\n", drive, head, disc_poll_enable[drive][head] ? "enabled" : "disabled");
}