PRI Text
========

PRI <version>
TRACK <cylinder> <head>
TRACK SIZE <size>
CLOCK <val>
INDEX
MODE <mode>
OFFSET <val>
RATE <clock-rate>
RAW <bit>...
ROTATE <cnt>
ROTATE SET <cnt>
ROTATE TRACK <cylinder> <head> <cnt>
WEAK <val>
WEAK RUN <cnt>


Mode RAW
--------

<val>
BIT [0|1]*
FILL <size> <val>
REP <count> <val>


Mode IBM-FM
-----------

<val>[/<clock>]

AM <val> := <val>/C7

BIT [0|1]*

CHECK START
CHECK END
CHECK SUM
CRC := CHECK SUM

DAM := SYNC FB/C7

EOT := FILL TRACK FF

FILL <size> <val>[/<clock>]
FILL TRACK <val>[/<clock>]

GAP <cnt> := REP <cnt> FF

IAM <v1> <v2> := REP <v1> FF SYNC FC/D7 REP <v2> FF

IDAM := SYNC FE/C7

REP <count> <val>[/<clock>]

SECT <c> <h> <s> <n>

SYNC := REP 6 00


Mode IBM-MFM
------------

<val>[/<clock>]

AM <val> := CHECK START A1/04 A1/04 A1/04 <val>

BIT [0|1]*

CHECK START
CHECK END
CHECK SUM
CRC := CHECK SUM

DAM := SYNC AM FB

EOT := FILL TRACK 4E

FILL <size> <val>[/<clock>]
FILL TRACK <val>[/<clock>]

GAP <cnt> := REP <cnt> 4E

IAM <v1> <v2> := REP <v1> 4E SYNC REP 3 C2/08 FC REP <v2> 4E

IDAM := SYNC AM FE

REP <cnt> <val>[/<clock>]

SECT <c> <h> <s> <n>

SYNC := REP 12 00


MODE MAC-GCR
-----------

<hex>
<hex>/<bitcnt>

"<"
">"

BIT [0|1]*

CHECK START
CHECK END
CHECK SUM

EOT := FILL TRACK SYNC GROUP

FILL TRACK <val>
FILL <size> SYNC
FILL <size> SYNC GROUP
FILL <size> <val>[/<bitcnt>]

REP <cnt> <val>

SECT <c> <h> <s> <mode>
SECT END

SYNC <count>
SYNC GROUP <count>
