Thomas Harte
b9fad184d7
Added just enough for a complete manual test of writing to a .ADF with the 1770 then getting the correct result parsing it back on the host side in order potentially to update a file.
...
... which means that now it's time to worry about when and how mounted files should actually update themselves. Which will make for some fun with threading, I dare say.
2016-12-28 23:00:47 -05:00
Thomas Harte
af1b396c9e
Found an ugly issue with Storage::Time
as implemented (i) to be unsigned; and (ii) automatically to simplify. Will need to fix. Here's a quick workaround for this one segment of code.
2016-12-28 22:57:11 -05:00
Thomas Harte
9cb902cc4f
Experimentally marked ADF as writable too, immediately discovering a mistake in the analysing MFM decoder.
2016-12-28 22:34:22 -05:00
Thomas Harte
e4000bd060
Added some even more verbose logging; slightly simplified write loop logic, and decided it's definitely write_byte
that's responsible for CRC generator feeding.
2016-12-28 21:24:19 -05:00
Thomas Harte
ce814c9e99
These can be const.
2016-12-28 21:23:22 -05:00
Thomas Harte
bfe6c0a0c1
Ensured that FileHolder
gets a writeable file reference if one is possible, and records whether the file in hand is read-only. So now the SSD class can answer honestly.
2016-12-28 20:09:14 -05:00
Thomas Harte
4adcb46665
Fixed FM-mode CRC generation.
2016-12-28 19:51:27 -05:00
Thomas Harte
46a93d2e12
Fixed errors to ensure that FM disks, at least, follow the same CRC generation rules when being built from sectors and when being parsed.
2016-12-28 19:48:46 -05:00
Thomas Harte
1277a67f9a
Introduced data_mode_ to replace is_reading_data_, representing that there are now three possible modes. When writing, any input from the read head won't affect the CRC generator.
2016-12-28 19:26:21 -05:00
Thomas Harte
720b1e5802
Attempted to ensure proper CRC generation for FM-format input.
2016-12-28 18:56:53 -05:00
Thomas Harte
8cd1575891
Similar fix to that over in Oric land: ensure a known, effective initial value for the Plus 3's control register.
2016-12-28 18:52:36 -05:00
Thomas Harte
3a9ad3fb08
Fixed Oric .DSK handling, per my latest understanding. Which creates a desire to write shorts directly to the disk surface, so exposed that in the encoder.
2016-12-28 18:50:28 -05:00
Thomas Harte
90151e2094
Fixed to ensure a known initial control register value, which has taken effect.
2016-12-28 18:49:32 -05:00
Thomas Harte
7a627b782d
Reintroduced writing of MFM sync marks when writing a sector.
2016-12-28 18:48:50 -05:00
Thomas Harte
a568172758
Made steps towards proper CRC generation. Am currently comparing against Oric disk images, as — amongst other things — they include precomputed CRCs.
2016-12-28 18:29:37 -05:00
Thomas Harte
99993a1b24
Since it's about to become important that objective results match, added a couple of objective-result tests for the CRC generator.
2016-12-27 19:03:46 -05:00
Thomas Harte
9c0f622a2e
Started working CRC checking into the 1770. Discovered immediately that my generated CRC does not match that built into the Oric disk images. So mine is pretty-much certainly wrong. An opportunity for learning!
2016-12-26 16:46:26 -05:00
Thomas Harte
0490a47058
Worked on the all-around framework for decoding sectors back from tracks when closing down a file. Hit the wall that the parser is more observant of CRCs than the WD. No, really. So I guess I have to stop avoiding that whole issue.
2016-12-26 14:24:33 -05:00
Thomas Harte
83c433c142
Deviated from the data sheet, which seems likely to be correct. Hence removed a whole load of the temporary logging.
2016-12-26 12:48:49 -05:00
Thomas Harte
742c5df367
With lots of logging arising temporarily, fixed bug whereby conversion to a patched track would lead to holding a track with a distinct measure of time, leading to improperly-placed patches.
2016-12-25 22:00:39 -05:00
Thomas Harte
b538ee5bd8
Fixed discovery of correct active period and setting of track time, when seeking.
2016-12-25 21:32:50 -05:00
Thomas Harte
a6d038cad9
Eliminated special case that doesn't seek properly and isn't needed. Added TODO.
2016-12-25 21:32:14 -05:00
Thomas Harte
4fca30b81f
Made the Plus 3 less chatty, documented invalidate_track
.
2016-12-25 21:06:58 -05:00
Thomas Harte
26710c988d
Modified SSD to ensure a fully-formatted surface is represented even if no track data is in the source file. This corrects the controller's sense of write success.
2016-12-25 20:40:06 -05:00
Thomas Harte
acc35885cd
Attempted to reduce track invalidations.
2016-12-25 20:38:25 -05:00
Thomas Harte
c0a1264ab0
Slightly improved legibility.
2016-12-25 20:19:47 -05:00
Thomas Harte
e2b829f68e
Made an attempt to write the proper address mark.
2016-12-25 20:15:07 -05:00
Thomas Harte
beaa868079
Factored the MFM parser out into encodings.
2016-12-25 20:00:57 -05:00
Thomas Harte
1349e85d83
[Mostly] fixed track write-back.
2016-12-25 19:19:22 -05:00
Thomas Harte
74e98fd097
Made an attempt to write actual data (albeit that CRC calculation is still missing).
2016-12-25 19:18:45 -05:00
Thomas Harte
007c13ec16
Fixed: cycles_per_bit_ isn't a function of the rotational multiplier, it's absolute. Also made sure that exactly hitting the end of a bit counts.
2016-12-25 16:35:39 -05:00
Thomas Harte
98be6ede45
Shuffled a little to reduce risk of overflow, ensured writing is a loop, still seem to be writing too quickly for some reason.
2016-12-25 16:13:05 -05:00
Thomas Harte
d2ad2c756e
Added enough shovelling to write rubbish for an entire sector.
2016-12-25 15:46:49 -05:00
Thomas Harte
ec55a25620
It makes sense to simplify these ahead of time.
2016-12-25 12:32:25 -05:00
Thomas Harte
aceb7e3b6b
Started implementing write sector on the 1770, immediately deciding it would be useful to have a callback for end-of-queued-data-written from disk controller. So had a go at implementing that, naively. More investigation required.
2016-12-25 12:31:38 -05:00
Thomas Harte
901f19f89c
Added enough stuff that SSDs attached to a 1770 will now reach the entry point for writing.
2016-12-25 09:46:12 -05:00
Thomas Harte
e56beb3e9c
Merge pull request #86 from TomHarte/DiskWrites
...
Implements backing work for in-memory disk writes
2016-12-25 09:37:20 -05:00
Thomas Harte
9d555c4a02
Let's try just declining to pump the PLL while in write mode. Added documentation to explain.
2016-12-25 09:19:18 -05:00
Thomas Harte
b57038edc5
Actually, at least index holes will still be receivable while writing, so this wasn't entirely correct. Probably best to leave it in.
2016-12-25 09:16:09 -05:00
Thomas Harte
d606bd7ce5
Added saturation test, fixed code as indicated.
2016-12-24 23:29:37 -05:00
Thomas Harte
09ff9d6a26
Introduced a couple more floating-point conversion tests, fixed errors uncovered.
2016-12-24 23:21:19 -05:00
Thomas Harte
e25195a718
Added a single test for Storage::Time
, discovering that I had the wrong sign on float conversions.
2016-12-24 22:59:01 -05:00
Thomas Harte
af69b21033
This is almost complete, except that it doesn't act appropriately if some bits are written but not enough to cover the entire writing period.
2016-12-24 22:51:26 -05:00
Thomas Harte
f601d796f5
Added documentation.
2016-12-24 22:37:20 -05:00
Thomas Harte
6e94d0c19f
Extended Storage::Disk::Disk
to permit write-back of modified tracks, exposed some interface via Storage::Disk::Drive
.
2016-12-24 22:11:31 -05:00
Thomas Harte
7f303cfceb
Continued the baby steps.
2016-12-24 21:54:43 -05:00
Thomas Harte
afc6f4129c
Withdrew unused tally.
2016-12-24 21:47:57 -05:00
Thomas Harte
1e416d4af0
Withdrew now-unused and never-implemented API from TimedEventLoop
, and the redundant track time count from DiskController
.
2016-12-24 21:02:10 -05:00
Thomas Harte
bedea48d03
This is a much better way of dealing with being partway into an incoming event. Subject to eliminating overruns, of course.
2016-12-24 20:54:27 -05:00
Thomas Harte
4cb17143ef
Messing around trying to lock down timing precisely. Which includes formal initial conditions.
2016-12-24 15:18:46 -05:00