I now have 99% compatability in my emulation of the legacy FDC
controller mentioned in previous posts. It seems I have one small piece
left. This legacy controller would automatically determine, at floppy
insertion time, whether the floppy was formatted in mode-0 (zerobased)
or mode-1 (non-zerobased). It would then set a bit in one of it's status
registers so software would be aware of the format. It also determined
the format type such as density, sectors per track, and sector size.
Also made available to software. I understand how to use the readid
rawcmd to determine all this information myself within my application.
My only problem seems to be a good method of detecting a disk change in
the floppy thread of my emulation. For this particular application,
being able to set up a signal handler with the floppy driver for a disk
change would have been ideal. I guess instead, I need to use the same
method as done in the diskd program?
However I cannot seem to get the diskd program to work as advertised.
When I issue the following command, with no floppy inserted in the
drive, in 10 seconds the ls command is executed. If I insert a floppy
imediatly after issuing the command, it still waits 10 seconds then
executes the ls command.
#diskd -d /dev/fd0 -i 100 -e ls
It appears that on my machine the FD_VERIFY bit is never being set and
the FD_DISK_NEWCHANGE and FD_DISK_CHANGED bits are always set. I'm not
sure what the FD_VERIFY bit has to do with a disk change. I'm also at a
loss as to why the other 2 bits are always set.
Any suggestions welcome.
Thanks in advance
fdutils mailing list