···11+/*****************************************************************************
22+ * pce *
33+ *****************************************************************************/
44+55+/*****************************************************************************
66+ * File name: src/drivers/pri/pri-enc-fm.h *
77+ * Created: 2014-12-28 by Hampa Hug <hampa@hampa.ch> *
88+ * Copyright: (C) 2014 Hampa Hug <hampa@hampa.ch> *
99+ *****************************************************************************/
1010+1111+/*****************************************************************************
1212+ * This program is free software. You can redistribute it and / or modify it *
1313+ * under the terms of the GNU General Public License version 2 as published *
1414+ * by the Free Software Foundation. *
1515+ * *
1616+ * This program is distributed in the hope that it will be useful, but *
1717+ * WITHOUT ANY WARRANTY, without even the implied warranty of *
1818+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
1919+ * Public License for more details. *
2020+ *****************************************************************************/
2121+2222+2323+#ifndef PCE_PRI_FM_IBM_H
2424+#define PCE_PRI_FM_IBM_H 1
2525+2626+2727+#include <drivers/pri/pri.h>
2828+#include <drivers/psi/psi.h>
2929+3030+3131+typedef struct {
3232+ unsigned long clock;
3333+ unsigned long track_size;
3434+3535+ char enable_iam;
3636+ char auto_gap3;
3737+3838+ unsigned gap4a;
3939+ unsigned gap1;
4040+ unsigned gap3;
4141+} pri_enc_fm_t;
4242+4343+4444+psi_trk_t *pri_decode_fm_trk (pri_trk_t *trk, unsigned h);
4545+psi_img_t *pri_decode_fm (pri_img_t *img);
4646+4747+void pri_encode_fm_init (pri_enc_fm_t *par, unsigned long clock, unsigned rpm);
4848+int pri_encode_fm_trk (pri_trk_t *dtrk, psi_trk_t *strk, pri_enc_fm_t *par);
4949+int pri_encode_fm_img (pri_img_t *dimg, psi_img_t *simg, pri_enc_fm_t *par);
5050+pri_img_t *pri_encode_fm (psi_img_t *img, pri_enc_fm_t *par);
5151+pri_img_t *pri_encode_fm_sd_300 (psi_img_t *img);
5252+5353+5454+#endif
···115115Set the image comment to \fItext\fR.
116116.TP
117117.BI "decode " "type filename"
118118-Decode the image and save it as a pri sector image to \fIfilename\fR.
118118+Decode the image and save it as a psi sector image to \fIfilename\fR.
119119Valid decode types are:
120120.RS
121121+.TP
122122+.B auto
123123+Try to decode each track as mfm, fm and gcr.
121124.TP
122125.B fm
123126IBM FM
···127130.TP
128131.B mfm
129132IBM MFM
130130-.TP
131131-.B mfm-fm
132132-IBM MFM/FM. Tracks are decoded as MFM first and if no sectors are found,
133133-they are decoded as FM.
134133.RE
135134.TP
136135.B delete
···143142Remove even numbered tracks.
144143.TP
145144.BI "encode " "type filename"
146146-Load a pri sector image from \fIfilename\fR and encode it.
145145+Load a psi sector image from \fIfilename\fR and encode it.
147146Valid encode types are:
148147.RS
148148+.TP
149149+.B auto
150150+Automatically determine the encoding for each track
151151+.TP
152152+.B fm
153153+IBM FM
149154.TP
150155.B gcr
151156Apple Macintosh GCR
···199204Set the GAP4A length in bytes. The default is 96.
200205.TP
201206.BI "mfm-min-size " integer
202202-Set the minimal sector size when decoding MFM/FM.
207207+Set the minimal sector size when decoding MFM.
203208.TP
204209.BI "mfm-track-size " integer
210210+Set the track size in bits.
211211+.TP
212212+.BI "fm-auto-gap3 " boolean
213213+Automatically set the GAP3 length. The default is true.
214214+.TP
215215+.BI "fm-clock " integer
216216+Set the FM clock rate (this is twice the data rate). The default is
217217+250000, suitable for single density disks.
218218+.TP
219219+.BI "fm-iam " boolean
220220+If false, skip the index address mark. The default is false.
221221+.TP
222222+.BI "fm-gap1 " integer
223223+Set the GAP1 length in bytes. The default is 26.
224224+.TP
225225+.BI "fm-gap3 " integer
226226+Set the GAP3 length in bytes. The default is 27.
227227+.TP
228228+.BI "fm-gap4a " integer
229229+Set the GAP4A length in bytes. The default is 40.
230230+.TP
231231+.BI "fm-track-size " integer
205232Set the track size in bits.
206233.RE
207234\