Thomas Harte
c8c1792c3f
Made a first attempt at HFE support.
2017-08-17 22:20:02 -04:00
Thomas Harte
e6683e7f2d
Added the base skeletal stuff of HFE support.
2017-08-17 21:48:48 -04:00
Thomas Harte
2c2dd8073c
Modified to return nullptr if asked for an extended disk image track that doesn't exist.
2017-08-17 15:32:24 -04:00
Thomas Harte
4f8b89772e
Improved logic for detecting when all sense has been derived from a track to spot any repeated track, not necessarily the first one. That avoids sectors that run over the index hold and obscure the first throwing things.
2017-08-17 15:31:53 -04:00
Thomas Harte
733ee5a5c3
Ensured no attempt to put a null track into the cache
2017-08-17 15:30:02 -04:00
Thomas Harte
fedf5a44a6
Imposes a maximum track length.
2017-08-17 15:20:49 -04:00
Thomas Harte
da3e8655e9
Withdrew some caveman debugging nonsense.
2017-08-17 13:25:19 -04:00
Thomas Harte
42ad670ec8
Fixed: catalogue bitmap is in blocks, not sectors.
2017-08-17 12:47:47 -04:00
Thomas Harte
468770b382
Removed debugging nonsense.
2017-08-15 22:06:58 -04:00
Thomas Harte
6cfc3daacb
Introduced a test within the disk controller so as not to request illegal tracks from disks, instead automatically substituting an 'unformatted' track. Which is just empty.
2017-08-15 21:52:12 -04:00
Thomas Harte
7b92b235e1
Further upped assert
s, thereby discovering the mistake I'd recently introduced: seeking properly within the event source as per its potential left-clipping, but then not allowing for that in the calculated current time.
2017-08-15 16:25:46 -04:00
Thomas Harte
c196f0018f
Upped the assert quotient.
2017-08-15 16:15:09 -04:00
Thomas Harte
73080d6c36
Added an easy way for disk controllers to clamp termination of written data exactly to the index hole.
...
This commit also temporarily provides a whole load of extra logging and minor logic improvements from the 8272. I'm mid-flow on finding a particularly vicious error in its handling of writing; wait for the pull request. But, at least: now waits for the first part of a post-ID gap before writing data, and attempts partially to handle appearance of the index hole during writing a track. More work to do on that though.
2017-08-15 16:05:10 -04:00
Thomas Harte
9541a2a5f0
Corrections: seek_to
now takes the segment_start_time
into account, correcting a windowing error where segments overlay other segments. Also added some asserts while bug hunting, and corrected the steps taken when inserting a longer-than-a-track segment so that each is correctly windowed.
2017-08-15 15:54:09 -04:00
Thomas Harte
944222eba4
Added: write_id_data_joiner
can now be instructed not to write the first portion of gap. Which makes more sense as an option, to avoiding splicing errors.
2017-08-15 15:29:23 -04:00
Thomas Harte
a366298022
Factored out the standard [M]FM gap and mark groups, to increase 8272 readability and because it's pretty-much certain I'll need them again if ever I try to tackle e.g. the 8271.
2017-08-14 16:03:35 -04:00
Thomas Harte
4df9307d25
Factored out the dull and repetitious stuff of writing n bytes of the same value.
2017-08-14 15:50:36 -04:00
Thomas Harte
cefec7a19f
Sought more robustly (i.e. less repetitively) to handle dispatch, including cancelling seeks where appropriate.
2017-08-14 10:37:39 -04:00
Thomas Harte
1011143dbe
Sought to correct my interpretation of 'gap 3'.
2017-08-13 21:52:48 -04:00
Thomas Harte
750f2cb883
Flagged as not read-only, at least for now, to allow 8272 writing tests definitively to function.
2017-08-13 18:54:39 -04:00
Thomas Harte
1576b4500b
Added documentation.
2017-08-13 18:27:00 -04:00
Thomas Harte
e1e9a06712
Made an attempt at format a track.
2017-08-13 18:05:19 -04:00
Thomas Harte
6e36f8ffa4
Removed index-hole announcement.
2017-08-13 12:50:24 -04:00
Thomas Harte
b0a7208cc7
Strung together a very basic version of 8272 write [/deleted] data. Lots of cases as-yet unhandled.
2017-08-13 12:50:07 -04:00
Thomas Harte
eec42aa7ae
Entrusted further status to drives; also adjusted them to report read only if diskless, which I now believe to be correct.
2017-08-13 11:50:49 -04:00
Thomas Harte
186048a88e
Made an attempt to fix the condition for setting a broken header CRC.
2017-08-12 16:39:32 -04:00
Thomas Harte
daafebe7ac
Moved curly bracket.
2017-08-11 19:19:04 -04:00
Thomas Harte
2d81acb82e
Upped C++ standard to C++14 and added an #if that's intended to use the built-in std::gcd when compiled on C++17 or better. Fixed for new signedness warnings resulting for taking the step to C++14.
2017-08-11 19:18:45 -04:00
Thomas Harte
82ca49c840
Adjusted to avoid calls to ::greatest_common_divisor(numerator % denominator, denominator)
unless necessary.
2017-08-11 19:05:46 -04:00
Thomas Harte
0c8769e335
Just to be safe.
2017-08-11 18:41:08 -04:00
Thomas Harte
83c7d34df2
Switched to populating the sector cache with everything in a track the first time anything on that track is requested. That avoids the problem whereby each request of a non-existent sector costs two spins.
2017-08-11 18:40:16 -04:00
Thomas Harte
a12671010a
Sector
size is now reported, and CRC failures are merely indicated, not cause for a sector to be thrown away.
2017-08-11 16:23:33 -04:00
Thomas Harte
edb088526f
Simplified slightly, and updated TODO as to still-missing functionality.
2017-08-11 14:33:34 -04:00
Thomas Harte
80ebc63101
Updated the SSD file format container to specify sector sizes, now that it's no longer implicit.
2017-08-11 14:30:35 -04:00
Thomas Harte
cf1403bc79
Increased documentation.
2017-08-11 14:27:07 -04:00
Thomas Harte
fcf63a7547
Expands the [M]FM encoder to respect some new Sector flags: it will now wilfully make CRC errors, omit data, include data that is different than the ID's declared length, write deleted data, and can be commanded as to header/data gaps and what should be within them. All based around expanding towards the needs for reproduction of the CPC's .DSK file format.
2017-08-11 14:24:50 -04:00
Thomas Harte
0411b51582
Added an attempt to deal with 16-bit allocation units, and to ensure middle-of-file holes are respected.
2017-08-11 10:59:37 -04:00
Thomas Harte
026101a268
Killed logic_extents_per_physical, since I don't know how to handle it, and instituted tracks, to allow a decision about short versus long allocation units.
2017-08-11 10:46:50 -04:00
Thomas Harte
734099a956
Threw a sector cache into my MFM parser, in an attempt to cut down analysis costs. Also made it aware of multiple heads.
2017-08-11 10:29:13 -04:00
Thomas Harte
6be5851484
Cleaned up.
2017-08-10 22:34:29 -04:00
Thomas Harte
994179f188
Taking a whole bunch of guesses, this might be correct.
2017-08-10 22:33:08 -04:00
Thomas Harte
6a65c7a52a
Started working on a CPC-oriented analyser; for now I just want to be able to make a good guess at the appropriate file to load from a disk. As it turns out, the CPC simply adopts the CP/M format, so a generic parser is appropriate. This is its beginning.
2017-08-10 17:10:21 -04:00
Thomas Harte
7d1023ea98
Added a 'ready' getter to Drive
, formally to let the drive take ownership of that test.
2017-08-08 21:15:56 -04:00
Thomas Harte
2b0dcf8573
Transcribed the status bits that I think actually need to be obeyed.
2017-08-07 12:37:45 -04:00
Thomas Harte
47732ffb98
Prevented the 8272 from overreading ID fields (and, by doing so, overrunning its internal buffer). Exposed the MFMController's CRC generator for inspection.
2017-08-07 12:37:22 -04:00
Thomas Harte
56d65ba6f3
Adapted slightly, to retain the ability to advertise an incorrect size, to adjust the confusion I've created by having two different types of thing both called new_sector, and to print a warning when ignoring error flags.
2017-08-07 12:12:04 -04:00
Thomas Harte
895a3cbf24
Corrected reading of the track size table for extended disks. My first extended disk has now loaded.
2017-08-07 11:38:19 -04:00
Thomas Harte
d951c8c1c2
Fixed search for track start position with extended disks: it's no longer an infinite loop. So that's a pretty good performance improvement.
2017-08-07 11:36:29 -04:00
Thomas Harte
a294963e98
Made an absolutely basic attempt to accommodate some extended disk images.
2017-08-07 11:26:15 -04:00
Thomas Harte
c839556a27
Fixed: rewind the file to check for 'EXTENDED' if 'MV - CPC' failed.
2017-08-06 19:47:10 -04:00