## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Virtual Hard Disk Device Driver

The virtual hard disk device driver (VDSK) provides virtual disk support for multiple DOS sessions and supports access to the disk through BIOS (INT 13h) calls. Since BIOS accesses the hardware ports directly, the virtual hard disk device driver component overrides the BIOS by directly emulating INT 13h for hard disks. The virtual hard disk device driver component does not provide I/O port level access to the disk controllers. Access to hardware ports that are supported for the diskette drive, and BIOS INT 13h calls, are not emulated; instead, they are run from the actual BIOS. INT 13h support includes:

AH=00h Reset diskette system
AH=01h Status of disk system
AH=02h Read sectors into memory (both diskette and hard disk)
AH=03h Write sectors from memory (diskette only)
AH=04h Verify sectors (both diskette and hard disk)
AH=05h Format track (diskette only)
AH=08h Get current drive parameters (both diskette and hard disk)
AH=0Ch Seek
AH=15h Get disk type (both diskette and hard disk)
AH=16h Change of disk status (diskette only)
AH=17h Set disk type (diskette only)
AH=18h Set media type for format (diskette only)

The INT 13h emulator is also responsible for maintaining the diskette and hard disk areas of the ROM BIOS data area.

Typical steps of an INT 13h access are listed below:

A DOS application accesses the disk through the INT 13h interface. The INT 13h call is trapped by the virtual hard disk device driver.

A request packet is built and sent to the physical hard disk device driver . The DOS session is then blocked, waiting for the request to finish.

Upon receiving the request packet, if the disk is currently busy, the physical hard disk device driver queues the request.

When the request is completed, the physical device driver notifies virtual device driver, which unblocks the DOS session.

Because the virtual hard disk device driver component does not support register level accesses of the disk controller, all accesses to its registers are trapped and ignored.

Note: Timing-related copy protection can fail because real-time access is not guaranteed. Sector WRITE and FORMAT requests are not supported for hard disk. Sector WRITE and FORMAT operations are supported for diskette.