fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 414 lines 10 kB view raw
1.TH PRI 1 "2025-04-15" "HH" "pce" 2\ 3.SH NAME 4pri \- convert and modify PCE raw image files 5 6.SH SYNOPSIS 7.BI pri " [options] [input-file] [options] [output-file]" 8 9.SH DESCRIPTION 10\fBpri\fR(1) is used to modify and convert PCE raw image 11files. 12 13.SH OPTIONS 14.TP 15.BI "-c, --cylinder " "cyl1[-cyl2]" 16Select a range of cylinders. 17\ 18.TP 19.BI "-e, --edit " "what val" 20For all selected tracks, set track attribute \fIwhat\fR to \fIval\fR. 21For boolean attributes, a value of 0 disables the attribute and any other 22value enables it. 23Recognized attributes are: 24.RS 25.TP 26.B clock 27The bit clock rate. 28.TP 29.B data 30Initialize the track using \fIval\fR. 31.TP 32.B readonly 33Set the read-only attribute for the image. 34.TP 35.B size 36Set the track size in bits. 37.TP 38.B woz-cleaned 39Set the cleaned attribute for WOZ images. 40.TP 41.B woz-track-sync 42Set the track sync attribute for WOZ images. 43.RE 44\ 45.TP 46.B "-f, --info" 47Print information about the current image or the next image loaded. 48\ 49.TP 50.BI "-h, --head " "head1[-head2]" 51Select a range of heads. 52\ 53.TP 54.BI "-i, --input " filename 55Load an image from \fIfilename\fR. 56\ 57.TP 58.BI "-I, --input-format " format 59Set the input file format to \fIformat\fR. 60Valid formats are: 61.RS 62.TP 63.B pbit 64The PBIT file format. This has been superseded by PRI. 65.TP 66.B pri 67The native PCE raw image file format. 68.TP 69.B tc 70Transcopy dump format. Support for this format is highly experimental. 71.TP 72.B woz 73The Applesauce WOZ disk image format. 74.TP 75.B moof 76The Applesauce MOOF disk image format. 77.RE 78\ 79.TP 80.B "-l, --list-short" 81List all tracks in the current image or in the next image loaded. 82Using this options prints one line per track. 83\ 84.TP 85.B "-L, --list-long" 86List all tracks in the current image or in the next image loaded. 87\ 88.TP 89.BI "-m, --merge " filename 90Load an image from \fIfilename\fR and copy all tracks that are not 91in the current image into the current image. 92\ 93.TP 94.BI "-M --merge-overwrite " filename 95Load an image from \fIfilename\fR and copy all tracks into the 96current image. Tracks that exist in both images will be overwritten 97in the current image. 98\ 99.TP 100.BI "-o, --output " filename 101Set the output file name. Before exiting, the current image will 102be written to this file. 103\ 104.TP 105.BI "-O, --output-format " format 106Set the output file format to \fIformat\fR. See the \fI-I\fR option 107for a list of valid formats. 108\ 109.TP 110.BI "-p, --operation " "name [arg...]" 111Perform an operation on the current image. Valid operations are: 112.RS 113.TP 114.BI "comment-add " text 115Add \fItext\fR to the image comment. 116.TP 117.BI "comment-load " filename 118Load the image comment from file \fIfilename\fR. 119.TP 120.B comment-print 121Print the current image comment. 122.TP 123.BI "comment-save " filename 124Save the current image comment to \fIfilename\fR. 125.TP 126.BI "comment-set " text 127Set the image comment to \fItext\fR. 128.TP 129.BI "decode " "type filename" 130Decode the image and save it as a psi sector image to \fIfilename\fR. 131Valid decode types are: 132.RS 133.TP 134.B auto 135Try to decode each track as ibm-mfm, ibm-fm and mac-gcr. 136.TP 137.B ibm-fm 138IBM FM 139.TP 140.B mac-gcr 141Apple Macintosh GCR 142.TP 143.B ibm-mfm 144IBM MFM 145.RE 146.TP 147.B delete 148Delete all selected tracks. 149.TP 150.B "double-step" 151Remove odd numbered tracks. 152.TP 153.B "double-step-even" 154Remove even numbered tracks. 155.TP 156.BI "event-add " "type position value" 157Add a new event of type \fItype\fR at bit position \fIposition\fR with 158value \fIvalue\fR on all selected tracks. The event type can be 159specified as a numerical value or as a type name. 160.TP 161.B "event-clear" 162Clear all events of all types from the selected tracks. 163.TP 164.BI "event-del " "type ( \fB@\fIindex1[-index2] | offset1[-offset2] | \fBall\fI)" 165Delete events from the selected tracks. The type can be specified as 166a numerical value, as a type name or as \fBall\fR. The range specifies 167a range of event indices as reported by \fBevent-list\fR, a 168range of bit offsets, or \fBall\fR. 169.TP 170.BI "event-list " "type ( \fB@\fIindex1[-index2] | offset1[-offset2] | \fBall\fI)" 171List events from the selected tracks. The type can be specified as 172a numerical value, as a type name or as \fBall\fR. The range specifies 173a range of event indices, a range of bit offsets, or \fBall\fR. 174.TP 175.BI "encode " "type filename" 176Load a psi sector image from \fIfilename\fR and encode it. 177Valid encode types are: 178.RS 179.TP 180.B auto 181Automatically determine the encoding for each track. 182.TP 183.B ibm-fm 184IBM FM 185.TP 186.B mac-gcr 187Apple Macintosh GCR 188.TP 189.B ibm-mfm 190IBM MFM 191.RE 192.TP 193.B "half-rate" 194Remove all odd-numbered bits to create a new track with half the data rate. 195.TP 196.B "half-step" 197Duplicate all tracks. This is the reverse of double-step. 198.TP 199.B info 200Print information about the current image (same as \fB-f\fR). 201.TP 202.BI "mac-align " "mode" 203Align all selected tracks on Macintosh GCR disks relative to the index. 204Possible values for \fImode\fR are: 205.RS 206.TP 207.B gap 208Align the start of the longest gap between sectors with the index. 209.TP 210.B gap-end 211Align the end of the longest gap between sectors with the index. 212.TP 213.B index 214Align the start of the first sector on a track with the index. 215.TP 216.B sector, sector-end 217Align the end of the sector before the lowest numbered sector with the index. 218.TP 219.B sector-id 220Align the start of the lowest numbered sector with the index. 221.RE 222.TP 223.BI "mfm-align-am " "what pos" 224Rotate the track such that the first address mark of type \fIwhat\fR on 225the track is at bit position \fIpos\fR. Possible values for \fIwhat\fR are: 226.RS 227.TP 228.B "all" 229All address mark types 230.TP 231.B "iam" 232Index address marks 233.TP 234.B "idam" 235ID address marks 236.TP 237.B "dam" 238Data address marks 239.PP 240Multiple types can be combined by joining them with a '+' or a '-' sign. 241For example, the type \fBall-iam\fR specifies all address mark types except 242index address marks. 243.RE 244.TP 245.B new 246Create new tracks. 247.TP 248.BI "rotate " cnt 249Rotate all selected tracks left by \fIcnt\fR bits. If \fIcnt\fR 250is negative, the track is rotated right. 251.TP 252.BI "rotate-angle " angle 253Rotate all selected tracks left by \fIangle\fR degrees. If \fIangle\fR 254is negative, the track is rotated right. 255.TP 256.BI "save " filename 257Save all selected tracks to \fIfilename\fR. The contents of the 258tracks are written sequentially to the file. 259.TP 260.B "weak-clean" 261Clean up the weak bit events on all selected tracks. 262.TP 263.BI "weak-close " max 264If two weak bits are separated by up to \fImax\fR non-weak bits, turn all 265non-weak bits in between into weak bits. 266.TP 267.BI "weak-detect " max 268Detect weak bits. All zero bits that are preceded by at least \fImax\fR zero 269bits are mared as weak. 270.TP 271.BI "weak-expand " "left right" 272Expand runs of weak bits by adding \fIleft\fR weak bits before every weak 273bit and \fIright\fR weak bits after every weak bit. 274.TP 275.BI "weak-load " filename 276Load the weak bit mask of all selected tracks from \fIfilename\fR. The weak 277bit masks are of the same size as the track data. 278.TP 279.BI "weak-open " max 280Remove all runs of up to \fImax\fR weak bits. 281.TP 282.BI "weak-save " filename 283Save the weak bit mask of all selected tracks to \fIfilename\fR. The weak 284bit masks are of the same size as the track data. 285.TP 286.BI "weak-set " "val" 287Set bits that are marked as weak to \fIval\fR which can be one of the 288following: 289.RS 290.TP 291.B 0 292Set bits to 0 293.TP 294.B 1 295Set bits to 1 296.TP 297.B flip 298Invert bits 299.TP 300.B random 301Set bits to a random value 302.RE 303.RE 304\ 305.TP 306.BI "-r, --data-rate " "rate" 307Set the default data rate. The default is 500000. If \fIrate\fR is 308greater than 1000 it is assumed to be in bits per second, otherwise 309it is assumed to be in kbits per seconds. 310\ 311.TP 312.BI "-s, --set " "parameter value" 313Set a parameter value. Recognized parameters are: 314.RS 315.TP 316.BI "mac-align " mode 317When decoding Macintosh GCR tracks to text, align them using \fImode\fR. The 318rotation required for the alignment is recorded in the text output and undone 319when the text is re-encoded, so this alignment is purely for readability. 320See the \fB-p mac-align\fR operation for a description of the possible values 321for \fImode\fR. 322.TP 323.BI "mfm-auto-gap3 " boolean 324Automatically set the GAP3 length. The default is true. 325.TP 326.BI "mfm-clock " integer 327Set the MFM clock rate (this is twice the data rate). The default is 328500000, suitable for double density disks. 329.TP 330.BI "mfm-iam " boolean 331If false, skip the index address mark. The default is false. 332.TP 333.BI "mfm-gap1 " integer 334Set the GAP1 length in bytes. The default is 0. 335.TP 336.BI "mfm-gap3 " integer 337Set the GAP3 length in bytes. The default is 80. 338.TP 339.BI "mfm-gap4a " integer 340Set the GAP4A length in bytes. The default is 96. 341.TP 342.BI "mfm-min-size " integer 343Set the minimal sector size when decoding MFM. 344.TP 345.BI "mfm-nopos " integer 346If set to a non-zero value, ignore the PSI sector positions when encoding 347MFM tracks. 348.TP 349.BI "mfm-track-size " integer 350Set the track size in bits. 351.TP 352.BI "fm-auto-gap3 " boolean 353Automatically set the GAP3 length. The default is true. 354.TP 355.BI "fm-clock " integer 356Set the FM clock rate (this is twice the data rate). The default is 357250000, suitable for single density disks. 358.TP 359.BI "fm-iam " boolean 360If false, skip the index address mark. The default is false. 361.TP 362.BI "fm-gap1 " integer 363Set the GAP1 length in bytes. The default is 26. 364.TP 365.BI "fm-gap3 " integer 366Set the GAP3 length in bytes. The default is 27. 367.TP 368.BI "fm-gap4a " integer 369Set the GAP4A length in bytes. The default is 40. 370.TP 371.BI "fm-track-size " integer 372Set the track size in bits. 373.TP 374.BI "psi-pos " boolean 375Enable or disable setting the sector position in decoded PSI files. The 376default is not to record the position. 377.TP 378.BI "text-align " boolean 379If true, bit-align the text output to the first address mark on a track. 380The default is true. 381.RE 382\ 383.TP 384.BI "-t, --track " "c h" 385Select tracks. This is the same as using the \fB-c\fR and \fB-h\fR options. 386\ 387.TP 388.B "-v, --verbose" 389Enable verbose operation. 390\ 391.TP 392.B "-x, --invert" 393Invert the selection. 394\ 395.TP 396.B "-z, --clear" 397Clear the selection. 398\ 399.TP 400.B --help 401Print usage information. 402\ 403.TP 404.B --version 405Print version information. 406 407.SH SEE ALSO 408.BR pce-ibmpc "(1)," 409.BR pce-macplus "(1)," 410.BR pce-img "(1)," 411.BR psi "(1)" 412 413.SH AUTHOR 414Hampa Hug <hampa@hampa.ch>