Eliminating Phantom Floppy Disk Drives under Windows 95/98/Me
Updated: December 4, 2001
*
This article is for system manufacturers who build systems for Microsoft® Windows® Millennium Edition (Windows Me) and for Windows 95/98/Me.
Systems that do not include a floppy disk drive or controller can have a "phantom" floppy drive A listed in miscellaneous user interfaces in Windows.
This article clarifies:
•
How to eliminate phantom floppy drives from appearing in miscellaneous user interfaces such as My Computer.
•
How to get devices mapped as drive A other than an industry-standard legacy FDC-based 1.44-MB, 3.5-inch floppy disk drive.
Windows 95/98/Me will show floppy disk drives in miscellaneous user interfaces based on how BIOS support for Int 11 and Int 13 has been implemented. Use the information described in this article to implement your BIOS and verify there are no longer any phantom disk drives. This will result in preventing phantom (non-existent) drives from appearing in most of the Windows 95/98/Me user interfaces (UI).
Note: Not all Windows 95/98/Me user interfaces respond to hot plugging events. For example, if you hot-attach a USB floppy disk drive, My Computer will properly show the added device without a reboot, but there may be other less frequently used user interfaces that do not update until after a reboot.
BIOS Int 11 and Int 13 Implementation Guidelines
Interrupt Description
Int 11
Equipment determination. All subfunctions are required.
If there are devices that appear as floppy drives (for example, El Torito-capable CD-ROM devices), then:
•
Bit Mask 0x0001 (bit 0) in AL must be set.
•
Bits 6 and 7 must properly indicate the number of floppy drive devices and devices that appear as floppy devices.
Note: The two count bits are a zero-based count (00b means 1 floppy, 01b means 2 floppies, 10b means 3 floppies, and 11b means 4 floppies).
If there are no devices that appear as floppy drives, then:
•
Bit mask 0x0001 (bit 0) must be clear.
•
Bits 6 and 7 must be set to 0.
Int 13
High-capacity drive support. All subfunctions required, including AH = 40h-48h.
ROM BIOS must set the head settle, motor start, and format gap values in the disk table pointed to by interrupt vector 1Eh.
Implement the INT 13h AH = 17h call (that is, set the DASD type for format).
Support the change line (INT 13h AH = 15h) on INT 13h floppy drives. Support INT 13h AH = 8 (Get Device Parameters). The INT 13h AH = 8 Get Device Parameters call must not turn on the drive motor for floppy drives.
Implement the extended INT 13h services (AH functions 41h - 48h).
For INT 13h with AH = 48h for installed floppy drives:
•
If there are no floppy drives attached as INT 13h devices, INT 13h AH = 48h must fail for all floppy drive numbers (drive 0, in particular). However, INT 13h AH = 8 on drive number 0 (DL==0) must work even if there are no INT 13h floppy drives, and it must return a floppy drive count of 0 in the DL register to indicate that no floppy drives are present.
•
If a floppy drive is an industry-standard 1.44-MB, 3.5-inch drive, the INT 13h AH = 8 call on the device should not modify the BL register.
•
If the device is something other than an industry standard 1.44-MB, 3.5-inch drive, but is media compatible with the 1.44-MB floppy standard, the INT 13h AH = 8 call on the device should return the parameters for a 1.44-MB industry-standard floppy drive but set the BL register to 10h and return the true maximum-supported capacity drive parameters on the INT 13h AH = 48h call.
•
For floppy devices that are not media compatible with the 1.44-MB floppy standard, the INT 13h AH = 8 call should return the closest reasonable parameters, set the BL register to 10h, and return the true maximum supported capacity parameters on the INT 13h AH = 48h call. The INT 13h AH = 8 Get Device Parameters call must not turn on the drive motor for floppy drives.
USB 1.44-MB Floppy Disk Drives as Drive A
If you are building a PC that uses a USB 1.44-MB floppy disk drive in place of a legacy FDC-based 1.44-MB floppy drive and you want to map the USB floppy drive to Drive A, it is important that the INT 13h AH = 8 ROM BIOS call (Get Device Parameters) on the device should return with BL= 0x10.
If the floppy drive type returned in the BL register is not 10h, DISKTSD will "pick" a drive letter selecting the first available drive letter.
Call to action for eliminating phantom floppy disk drives
•
Be certain to map USB 1.44-MB floppy disk drives to drive A as described in this article.
微软在规范中指出,如果设备是与1.44M工业标准软盘兼容的,就应该让 int13/ah=8h 返回C/H/S=80/2/18的几何参数;如果设备不是与1.44M工业标准软盘兼容的,就应该适当地让 int13/ah=8h 返回最接近实际容量的几何参数。这个设备显然不是与1.44M工业标准软盘兼容的,因为按照这个标准去读取扇区会死机(前面说过,即便在DOS下也死机)。因此,它返回 80/2/18 是错误的。它应该返回 C = 7 或 8(后来在 int13/ah=48h中返回的C=96,幸亏当 H 和 S 都正确时,即便参数 C 是错的也不那么容易导致死机),H=255,S=63,这样才接近实际的几何容量。其次,当 BIOS 接到不合适的参数时就死机了,这肯定是 BIOS 的巨大 BUG,毫无疑问了。因此,这就讲清楚了,这个 BIOS 有两个严重的 BUG。
[ Last edited by neiljoy on 2006-7-27 at 12:32 ]作者: globemobile 时间: 2006-8-7 21:46 多谢不点!
试了一下,在我这台机上,还是不能读U盘,不过也不死机,而是屏幕滚动若干信息,然后进入命令行。
[ Last edited by globemobile on 2006-8-16 at 09:00 ]作者: electronixtar 时间: 2006-8-7 22:17 关注关注作者: 不点 时间: 2006-8-20 17:37 globemobile:
我们并未编写 USB 设备的驱动程序。读 U 盘的功能是 BIOS 实现的。如果你的 BIOS 不提供 U 盘的 int13 接口,我们是没办法读 U 盘的。neiljoy 的机器的 BIOS 提供了 U 盘的 int13 接口,只不过它含有 BUG 而已。我们生办法躲过了 BIOS 的 BUG,从而可以读取 U 盘。如果你知道自己的主板 BIOS 具有 USB 启动的功能(比如 CMOS setup 中可以见到从 USB 启动机器的选项),那么这个 BIOS 也就提供了 U 盘的 int13 接口。如果你的 BIOS 提供了 U 盘的 int13 接口,那么你可以参考以下这个网页中的详细测试方法,把你的测试结果报告上来,我们仍然有希望针对你的机器的特点,获得访问 U 盘的方法。现在可以肯定,所有在 U 盘读取时出现故障的机器,都是由于其 BIOS 的某个 BUG 造成的(正如我在上面所说的那样),本质上都不属于 GNU GRUB 的错误,更不是 GRUB4DOS 的错误。