Skip to content

Commit a7308c8

Browse files
Merge pull request #5931 from merubird/dev/fix-missing-floppy
fix: missing floppy drive after harddisk boot
2 parents 3e9a67b + 43b7693 commit a7308c8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/ints/bios_disk.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,20 @@ static Bitu INT13_DiskHandler(void) {
20832083
reg_ah = 0x00;
20842084
break;
20852085
case 0x08: /* Get drive parameters */
2086-
if(driveInactive(drivenum)) {
2086+
if(driveInactive(drivenum)) {
2087+
if(drivenum == 0) {
2088+
// if no floppy drive 0 mounted, return fixed values for 1.44MB drive
2089+
// This fixes a problem in some DOS applications that occurred when booting from the hard disk without a mounted floppy disk.
2090+
reg_ax = 0x00;
2091+
reg_bl = 4;
2092+
reg_ch = 79;
2093+
reg_cl = 18;
2094+
reg_dh = 1;
2095+
reg_dl = 1;
2096+
last_status = 0x00;
2097+
CALLBACK_SCF(false);
2098+
return CBRET_NONE;
2099+
}
20872100
last_status = 0x07;
20882101
reg_ah = last_status;
20892102
CALLBACK_SCF(true);

0 commit comments

Comments
 (0)