accessing 800K disks from Windows ?

This is a discussion on accessing 800K disks from Windows ? within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, Does anyone know if it is possible to access a floppy disk in Windows (XP) directly via BIOS-calls ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    8

    accessing 800K disks from Windows ?

    Hi all,

    Does anyone know if it is possible to access a floppy disk in Windows (XP) directly via BIOS-calls ?
    I want to read 800 Kb DSDD floppies, i.e. 80 tracks, 10 sectors, 2 sides. The default MSDOS diskformat for DSDD floppies however is 720 Kb (9 sectors).

    By using _bios_disk (e.g. GNU C, Borland C), it is possible to access floppies of 800Kb. My program works fine but only in (native) MSDOS, not in Windows. When I access the 10th sector in Windows, I get an error or I get the 1st sector of the next track :-). In MSDOS everything works fine, so it's clearly not a problem of the BIOS or the hardware.
    I guess Windows is blocking this kind of direct access.

    What do I have to do ? I don't want to keep rebooting my PC with an MSDOS startdisk anymore... I want to process these disks directly from Windows ! Do I have to write a Windows driver - is a driver allowed to do this kind of access ? Or can it still be done by writing a "normal" program ?

    Thanks in advance !

  2. #2
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    take a look at DeviceIoControl, specifically the control code VWIN32_DIOC_DOS_INT13 (there are also other dos interrupts)

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

  4. #4
    Registered User
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    8
    Thanks for the replies !

    I will check the material on the links, seems like I might succeed in my project :-)

    Are the VWIN32 control codes compatible with WinXP ?

    Thanks

  5. #5
    Registered User
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    8
    Mmm... I still have a problem.
    - VWIN32 seems not to be compatible with WinXP - it only works for 95/98/ME. The VWIN32 codes would have been the solution though :-)
    - For WinXP I don't find a control code for the DeviceIoControl function that let me instruct it to read data from a particular sector on a *non-standard* disk file system. I think Microsoft always assumes that the file system is one of the supported ones (fat12 or whatever). I guess this is due to the fact that DeviceIoControl calls the WinXP devicedriver for the floppy drive, which in turn assumes it is a MSDOS compliant standard disk layout). So that would mean that I have to write another driver ? Am I correct or don't I understand anything of it ?

    Why did Microsoft stop the support for direct interrupts in WinXP ?

    I'm getting frustrated...

  6. #6
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,259
    Yep, you pretty much hit the nail on the head there. Under an NT-based OS, you can't call legacy BIOS interrupts as you may not have legacy hardware to use it with (i.e. a floppy drive connected via USB), as well as it generally being perceived as a security risk.

    That's progress for you...

  7. #7
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Did you try the code that I linked to?

  8. #8
    Registered User
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    8
    Thanks Smurf for the reply, although the news you bring is not the one I wanted to hear :-)

    Anonytmouse, yes I tried your code. It worked perfectly for 720K disks.
    When I used my 800 K floppy disks, the program did read 720 K and then gave an error (error 87 - invalid parameter).
    I looked at the 720 K image it created out of the 800 K disk, and found the same problem as with my old _bios_disk program: the image doesn't contain every 10th sector. For each track, it reads 9 sectors and then continues the next track. The 10th sector is skipped every time, so there is 512 bytes missing after every block of 4608 bytes.
    It seems like the WinXP floppy disk driver only expects 9 sectors, so it ignores the physical 10th sectors...

    What do you think ? Can this still be solved without writing a completely new WinXP floppy driver ?

  9. #9
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

  10. #10
    Registered User
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    8
    OK, a nightmare has come true :-)
    So I have to write a driver. Sounds like fun !
    I will start reading some books on the WinXP OS architecture and driver development...

    Thanks for the feedback and the links !

    Kris

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  2. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 03:44 AM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21