./mfm_read --transitions_file ../callan_raw1 --drive 1 --heads 8 --cylinders 320This is raw data as captured by the emulator, but what exactly is it?
The PRU (programmable realtime unit) on the BBB samples MFM data at 200 Mhz. This is pretty amazing. It doesn't store all that information, what it does is to store the spacing between rising edges. The record for a track in the transition file is a series of 16 bit unsigned numbers that are a count (in units of 200 Mhz sample times) of the time between rising edges (0 to 1 transitions). This is called "delta format".
The file itself is organized so there is a header, followed by a bunch of variable length records. Each record begins with a track header that holds the cylinder and head value for that track, along with a count of how much data follows. If you want a specific track, you have to read the file sequentially from the start and seek past each record. There is no way to seek directly to a given track. This is hardly an issue since the file is generally processed sequentially.
Going from delta format to something more recognizable is a signficant bit of processing. It is handled by wd_mfm_decoder.c This is the biggest file among the sources (2500 lines).
Tom's Computer Info / [email protected]