Leszek Chmielewski wrote:
You coded the fdrawcmd.sys? It should work with onboard floppy connector under Win2K.

Yes, and yes :-)


I changed the code from example HANDLE h = CreateFile("\\\\.\\fdraw0", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL) to PureBasic syntax: Handle.l=CreateFile_("\\\\.\\fdraw0",#GENERIC_READ|#GENERIC_WRITE,0,#Null,#OPEN_EXISTING,0,#Null)

but Handle returns always -1. I guess, that's not correct.

The actual path being opened is \\.\fdraw0, but the backslash characters
need to be escaped in C by adding additional backslashes before each.

Try changing "\\\\.\\fdraw0" to "\\.\fdraw0"  and see if that works.  If
it doesn't, check GetLastError() to see what it returns.  If you're
still having trouble, e-mail me off the list and I'll look into it.


maybe it could be easier to use a standard SAM Disc, and create a dummy file, which has a Sector bitmap that reserves all sectors nr 10
 on the whole disc.

That's pretty much what I had in mind, but with additional dummy entries
to reserve sector 10 on the directory tracks.  2 hidden entries can be
added to each, to prevent the listing stopping so the remaining entries
will be searched.

When the image is used in the emulator, saving will not use sector 10 in
the directory since it has hidden files in it.  The dummy file prevents
sector 10 being used across the rest of the disk.

To write to a USB floppy drive would just need the 10th sector to be
dropped, and the remaining 720K written to the raw device.  When opening
the USB drive in SimCoupe, the emulator will need to provide suitable
dummy details for every sector 10.


A Image of 256 Bytes of the last directory entry, which is precalculated and could be written on any disc, reserving sectors that are not accessable from PC. Any files saved after that on this disc, would be avoid writing these sectors, so no need to change SimCoupe.

If there are more than 17 files on the disk, getting a directory listing
would attempt to read track 0 sector 10.  A SimCoupe change is still
needed to return something for that read attempt.  It would also be wise
to block attempts to write to sector 10, since it can't be saved.

Si

Reply via email to