Logo

Kryoflux to IMD

flux2imd

flux2imd processes Kryoflux files into an IMD file. Due to current limitations of IMD it cannot store some historic disk formats, in this case flux2imd saves a hex dump of the sectors for post analysis.

usage

flux2imd -v|-V | [-b] [-d[n]] [-f format] [-g] [-h[n]] [-p] [-s] zipfile|rawfile]+

options can be in any order, before the first file name
OptionMeaning
-v/-V show version information and exit. Must be only option
-bwill write bad (idam or data) sectors to the log file
-dsets debug flags to n (n is in hex) default is 1 which echos log to console
-fforces the specified format, use -f help for more info
-gwill write good (idam and data) sectors to the log file
-hdisplays flux histogram. n is optional number of levels
-pignores parity bit in sector dump ascii display
-sforce writing of physical sector order in the log file

Note ZDS disks and rawfiles force -g, as image files are not created

raw filenames should be named in the following format

[prefix] [2 digit cylinder] . [1 digit head] . raw

e.g GW500203.1.raw where the prefix is GW5002, cylinder is 3 and head is 1.

To process a whole disk, include the raw filenames for all cylinders into a single zip file. This is includes those for both heads, if a double sided disk.

Current limits for the types of disk supported are

  • 2 heads, 0 or 1
  • 84 cylinders. 0 - 83
  • 52 sectors. Sectors should be consecutively numbered but need not start at 0.
  • FM, MFM or M2FM encoding
  • soft sector formats and a limited set of hard sector formats. See forcing a disk format below.
  • 250kb/s or 500 kb/s transfer rate. (5¼" and 8" disks).

logged information

When processing a file, flux2imd creates a log file that is named after the input file, with .raw or .zip replaced by .log. The log file contains information about the processing and will include additional information as follows, dependent on the options selected

OptionAdditional data in log file
-bShows hex dumps of bad sectors. The format used shows alternative decodes for suspect data
-gShows hex dumps of valid sectors. Always enabled for raw files and formats IMD does not support
-hFor each track a histogram of the data is shown, indicating the spread of clock/data bits
-pWhen dumping sectors, the parity bit is removed
-sAlways writes the physical sector order in the log file. Always done for missing sectors

forcing a disk format

Normally flux2imd can determine the disk format, however for poor quality disks, it may be necessary to explicitly declare the disk format. The -f option supports this and as noted -f help shows a summary of the predefined formats and how to create a custom one. The current list is

FormatDescription
FM55 1/4" SD **
FM5-16x1285 1/4" SD 16 x 128 sectors
FM5-15x1285 1/4" SD 15 x 128 sectors
FM8-26x1288" SD 26 x 128 sectors
NSI-SD5 1/4" SD NSI 10 x 256 hard sectors
SD8H8" SD hard sectors **
ZDSZDS 8" SD 32 x 128 sectors
LSILSI 8" SD 32 x 128 sectors
MFM55 1/4" DD **
MFM5-16x2565 1/4" DD 16 x 256 sectors
MFM5-10x5125 1/4" DD 10 x 512 sectors **
MFM5-8x5125 1/4" DD 8 x 512 sectors
WREN5 1/4" Wren DD 10 x 512 sectors
DD88" DD MFM & M2FM **
MFM8-52x1288" DD 52 x 128 sectors
MFM8-26x2568" DD 26 x 256 sectors
M2FM8-INTEL8" Intel M2FM DD 52 x 128 sectors
M2FM8-HP8" HP DD 30 x 256 sectors
TI8" TI 26 x 288 sectors
DD5H** 5 1/4" DD hard sectors
MTECHMtech 5 1/4" DD 16 x 256 hard sectors
NSI-DDNSI 5 1/4" DD 10 x 512 hard sectors

Note ** formats will auto adapt based on detected sectors / encoding

Current predefined multi formats are

PDS [0/0]FM5,MFM5-16x256

Bespoke multi formats can be created using a comma separated list of formats. A prefix is used to determine when the format applies; they are in precedence order

PrefixFormat applies to
[c/h]cylinder c head h
[c] or [c/*]to cylinder c
[*/h]to head h
[*] or [*/*] or no prefixto all cylinders / heads

if there is no match then flux2imd will attempt to auto detect the format

debug options

Although flux2imd supports a level of debugging, for the non DEBUG build, -d can only be used to echo log file information to the screen, as the tool processes the data.

In the DEBUG build, the -d option takes a hex value argument, which is the sum of the options below. Most of these are primarily of interest during analysing new disk formats.

01 -> echo02 -> flux04 -> detect08 -> pattern
10 -> AM20 -> decode40 -> no Opt80 -> tracker

Where

echoshows log data on the screen as per normal builds
fluxshows information on the flux file
detectshows information on the format detection
patternshows information from the bit pattern recogniser
AMshows the address mark matches
decodeshows information on what has been decoded
no Optrescans the track trying all options, even if all sectors have been resolved this is primarily for my internal use
trackershows shifts in the format detection

Last Updated: 31-Oct-2020Copyright © 2020 Mark Ogden