anyone have any idea how i could dump the raw data from a floppy disk and write it back? i'm trying to create an imaging program like winimage, only needs to work for floppies.. anyone that can help at all let me know. thanks in advance
Posted on 2002-01-21 00:42:13 by mc
Posted on 2002-01-21 00:56:04 by Bit7
bit7, is this win32 compatible? nice prog...
Posted on 2002-01-21 03:18:17 by mob
Some days ago I wrote a simple piece of code in a few minutes that reads a floppy disk and writes it to a file. I wrote it because someone had a disk from a sony mavica camera that was damaged.
It only works on NT/2k and the code doesn't check for anything...


invoke CreateFile, CTXT("disk.dat"), GENERIC_WRITE,\
FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0,0
mov edi, eax
invoke CreateFile, CTXT("\\.\A:"), GENERIC_READ, \
FILE_SHARE_READ OR FILE_SHARE_WRITE,\
NULL, OPEN_EXISTING, 0, 0
mov ebx, eax
xor esi, esi
.WHILE esi<1434
mov eax, esi
shl eax, 10
invoke SetFilePointer, ebx, eax,0, FILE_BEGIN
invoke ReadFile, ebx, addr buffer, 1024, addr bytesWritten, 0
invoke WriteFile, edi, addr buffer, bytesWritten, addr buffer1,0
inc esi
.ENDW
invoke CloseHandle, edi
invoke CloseHandle, ebx
Posted on 2002-01-21 08:04:14 by Thomas
Thomas: anything on writing the file back to a floppy? would just reversing the loop work? (ie: put \\.\a: in edi and disk.dat in ebx) also, any ideas how to make it work on win9x?

Bit7: your program looks nice, but on my system it appears to not do anything but fill the progress bar, is it win9x only?

well thanks to you both, maybe i can do some os checking and use bits of code from what each of you gave me. much thanks.
Posted on 2002-01-21 13:30:54 by mc`
Thomas: anything on writing the file back to a floppy? would just reversing the loop work? (ie: put \.\a: in edi and disk.dat in ebx)


Yes I think so.

also, any ideas how to make it work on win9x?


No, sorry. It is possible and there have been previous threads on this subject, try searching the board.

Thomas
Posted on 2002-01-21 14:43:50 by Thomas
mc,

Attached is a file which works on win95 and winxp
which will back up a file from the hard drive to
floppy disks by splitting it up into pieces which
will fit on the floppy in the floppy drive. It
will delete any files already on the floppy and
set the volume label, in a weak attempt to keep
the user from forgetting to change the floppy when
necessary. The program checks for existing space
on the floppy and writes that much to the floppy.
It keeps asking for floppies until the process
is completed.

hth

farrier
Posted on 2002-01-21 18:53:49 by farrier
hi, i'm sorry, i've tested my program only on w95/98.

b7
Posted on 2002-01-22 07:50:57 by Bit7