Page 1 of 1

Writing to a floppy in raw mode

Posted: Sun Apr 02, 2006 8:43 am
by earlz
I am going to make an application(and maybe later a driver) that will format a floppy disk(and later hdd's) using my own commands and using my own filesystem
then i want to be able to copy files from an ntfs/fat volume to my volume and be able to do directories and all that stuff

well everything is fine except I don't know how to write to a floppy disk sectors at a time, in rawmode

Re:Writing to a floppy in raw mode

Posted: Sat Apr 29, 2006 1:00 am
by earlz
anyone, please?

btw this is in windows

Re:Writing to a floppy in raw mode

Posted: Sat Apr 29, 2006 1:13 pm
by Candy
Jordan3 wrote: anyone, please?

btw this is in windows
That doesn't change my answer: DD.

DD (dunno what it stands for) is made for direct block-size copying from and to devices. There's a windows port of it by John Newbigin iirc, and it'll allow you to specify where to write, how much to write, from where etc.

Re:Writing to a floppy in raw mode

Posted: Sun Apr 30, 2006 10:19 am
by earlz
is it like a dll or other type of library so to use it easily from C

Re:Writing to a floppy in raw mode

Posted: Sun Apr 30, 2006 10:42 am
by QuiTeVexat
I'd suggest reading the source code of a win32 dd, such as the one mentioned above. Or if you're okay with a dirtier solution, you could just use dd externally and call it with stdlib's system() or the like.

Re:Writing to a floppy in raw mode

Posted: Tue May 02, 2006 7:03 pm
by Cjmovie_guest
You can look at the source for a program I wrote to write floppy images. You can look the functions up on MSDN.

http://hosted.cjmovie.net/OS/PartCopyX.c

you'll want info on the "CreateFile" and "WriteFile" functions. The program, if you wish to try it, requires the drive to be the letter followed by a colon, eg, "A:", "A" will not work.