Commit Graph

21 Commits

Author SHA1 Message Date
Howard M. Harte
2d4e2b87bc micropolis: Improve decode a little more.
seekToPattern() can skip the index hole if it doesn't find the
SYNC pattern.  If this happens too close to the end of the flux
stream, it can result in a conflicted sector.  In this case,
discard the sector.
2022-02-25 21:59:18 -08:00
David Given
eade2e279e Make the internal disk data structures all const, to allow us to pass them to
the GUI UI thread safely.
2022-02-24 22:46:10 +01:00
Howard M. Harte
8d04d17e39 Fix override warnings in decoders. 2022-02-22 22:45:39 -08:00
Howard M. Harte
d69944dd8c Micropolis: Add support for MZOS checksum.
Vector MZOS uses a different sector checksum than the standard
Micropolis checksum used by MDOS, CP/M and OASIS.  Automatically
detect the checksum on the disk by default, but allow the user
to force the use of a specific checksum using the
--decoder.micropolis.checksum_type parameter.
2022-02-19 14:10:56 -08:00
Howard M. Harte
a25111e411 Micropolis: Improve decode.
* Discard a partial sector at the end of the track.
    * Do not seek to the index mark for the first sector.
    * Use a 64-bit pattern to match the SYNC.
    * If SYNC is found too early, search for a subsequent SYNC.
    * While decoding the sector record, enforce the SYNC pattern
      and track ID.
2022-02-19 14:10:44 -08:00
Howard M. Harte
6866d5d3fa Require 16 sectors for Micropolis disks. 2022-02-19 14:10:35 -08:00
David Given
0933dc1afa Partially complete rework of all the decoders to avoid seeking inside the
fluxmap. This requires resetting the FluxDecoder, which loses any pending
state, resulting in bad reads for (some) formats which don't have gaps between
sectors --- the DVK MX is the main victim.
2022-02-12 00:55:09 +01:00
Eric Anderson
bd854d29a4 Merge branch 'master' into micropolis-275 2021-12-29 12:39:07 -06:00
dg
36c2263675 Fix the Micropolis decoder after the PLL upgrade. 2021-12-06 22:20:18 +00:00
Eric Anderson
ce5fcaf172 Micropolis raw 275 byte sectors
These are used by formats like VGI since the ECC varied per machine and
the 10 extra bytes of user data may contain useful information.
2021-10-02 22:59:14 -07:00
Eric Anderson
41e9c46cba Port Micropolis encoder to protobuf-based config 2021-10-02 16:24:38 -07:00
Eric Anderson
c54de27503 Merge branch 'master' into micropolis-write
Let's not act like this actually compiles.
2021-10-02 12:45:56 -07:00
David Given
fa36af454e The encoders and decoders all build now. 2021-07-15 23:13:59 +02:00
David Given
e9d80423ae Convert the Micropolis decoder. 2021-07-11 16:00:46 +02:00
David Given
f8674230ed Add prototypes for all the decoders because it's easier to do them in one go... 2021-07-11 12:52:34 +02:00
David Given
4ab8b4984d Rename all InputProto and OutputProtos for clarity. 2021-05-15 18:05:53 +02:00
David Given
f741ad058e Convert the ZilogMcz decoder. 2021-05-15 17:40:20 +02:00
David Given
f46e444aa2 Convert the Micropolis decoder. 2021-05-15 14:10:08 +02:00
Eric Anderson
8b71c0d737 Add Micropolis encoder
Has not been tested on a Micropolis machine.
2021-01-10 15:18:00 -08:00
Eric Anderson
b8786866db Fix carry handling in Micropolis checksum
Two bugs make a right, mostly. The very last carry should be ignored and
when adding the low and high bytes they commonly would commonly produce
a carry which was being ignored. On the test disks these two bugs
cancelled themselves out, except only for track 1, side 1, sector 0. I
had noticed it was suspicously off-by-one earlier for both test disks,
but the cause wasn't obvious.

On some old 1980s disks, with real data, it changed number of bad
sectors from 224 (out of 2464) to 5 for one disk and 81 to 3 for
another.
2020-10-04 19:55:25 -05:00
Eric Anderson
82bd1bead4 Add Micropolis decoder
Resolves #187
2020-10-03 13:05:06 -05:00