Right, one option would be for the emulator to have a
FM, MFM or RLL front end
Oh for %deity's sake... I am sure it was regarded as a Good Thing (if not
essential) that the emulator works with all controllers _without
modification_. In other words, no separate MFM and RLL versions.
In any case, do you know the exact encoding details of every ST506
controller ever made? I certainly don't, and I've repaired a heck of a
lot of them.
If you're going to go far enough to decode the MFM (or whatever)
encoding, you might as well also recognise sectors, etc and just store
the user data (and any filesystem pointers in the headers, etc). This is
very efficient of emulator RAM, but it means you need a different
emulator for each controller/system. And you need to know a lot about how
the controller actually encodes the data.
and actually decode the bitstream. Then the
write-precomp could be undone...
However, for udoing write precompensation, I am not conviced that you
need to know details of the encoding. Precompensation is a kludge to
correct for a magnetic effect on the disk. How the pulses in the
bitstream are shifted should only depend on that bitstream, and not on
the data in encodes or how it encodes it. Therefore it should be possible
to undo it without knowing the encoding method.
-tony