Spent some time rewriting a8rawconv. Version 0.6 is attached.
The first main change is that the tool can now read .ATR and .ATX images and encode them to disk streams. This makes it possible to write ATX images back to physical disks with copy protection intact. The encoder supports missing sectors, bad sectors (CRC errors), deleted sectors, weak sectors, and long sectors. Because of fiddly issues with ATX sector timing, some tracks may require manually adjusting the write timing to fit a long track (-p 95), and types of tracks with overlapping sectors may be hopeless. The sector positions will differ a bit from the original, as well, so this isn't a pristine copy. However, it's good enough that I've been able to boot several VAPI images on my 1050 drive. MFM ED/DD formats are also supported, for a faster way to get 130/180K images onto a real disk than an SIO2PC or 10502PC disk copy.
The second main change is that the tool can directly read or write to a floppy through a SuperCard Pro device. This is done by using a special path for input or output, like scp0:96tpi or scp1:48tpi. For read, this is mainly just handy for spot checking tracks, as generally it's better to grab a full image with the SCP software for archival or repeated extraction tests. However, this is more useful for writing as a8rawconv can directly control the write splice points. I've added support for writing .scp images, but have run into problems with errors on sectors crossing the index mark when writing those images through the SCP tool; this avoids the extra step and bypasses that problem. I want to specially thank Jim Drew for providing SCP hardware to test with, which turned out to be rather simple to drive directly.
In theory, this version is able to do a conversion from KryoFlux stream format (track*.*.raw) to SuperCard Pro format (*.scp), but it's a bit rough at the moment - YMMV.
- Fixed writing of double-density ATR images.
- Fixed incorrect encoding of long sectors in ATX images.
- MFM decoder can now output bit decode debug spew (-vvv).
- Reduced angular position threshold for merging sectors (WTF would you write 12 versions of sector 1 on a track??).
SCP direct access is also supported under Linux, although I have only tested it in a VM -- compile only compileall.cpp. No snickering about my crappy serial port code. I didn't have a really easy way to detect the FTDI interface there, so it simply defaults to /dev/ttyUSB0; override if necessary (scp0:96tpi:/dev/ttyUSB1). You may also need to run as root to have permissions to write to the serial port.