Thomas Harte
4abd62e62b
Standardises on const [Half]Cycles
as the thing called and returned, rather than const [Half]Cycles &
as it's explicitly defined to be only one int
in size, so using a reference is overly weighty.
2017-07-27 22:05:29 -04:00
Thomas Harte
8361756dc4
Switched definitively to the works-for-now approach of requiring an explicit opt-in where somebody wants to clock a whole-cycle receiver from a half-cycle clock.
2017-07-27 07:40:02 -04:00
Thomas Harte
75d67ee770
Relocated ClockReceiver.hpp as it's a dependency for parts of the static analyser, and therefore needs to be distinct from the actual emulation parts.
2017-07-25 20:20:55 -04:00
Thomas Harte
a1e9a54765
Eliminated redundant uses of ClockReceiver
and sought to ensure that proper run_for
s are inherited all the way down.
2017-07-25 20:09:13 -04:00
Thomas Harte
8a2bdb8d22
Converted the TimedEventLoop and the things that sit atop it into ClockReceiver
s.
2017-07-24 21:19:05 -04:00
Thomas Harte
b3ae920746
Converted the DPLL and disk controller classes to be ClockReceiver
s.
2017-07-24 21:04:47 -04:00
Thomas Harte
45ec5f8eab
Eliminated implicit sign conversion.
2017-07-21 21:53:27 -04:00
Thomas Harte
1d01acce06
Fixed differing types of loop variables and targets.
2017-07-21 21:53:05 -04:00
Thomas Harte
163c0f1b44
Ensured offset
means exactly one thing.
2017-07-21 20:58:17 -04:00
Thomas Harte
e5188a60dc
Settled on the new average-of-length approach to a PLL window sizing, eliminating the old errors-of-phase approach. Since it anchors automatically to the original target clocks per bit, killed the explicit mention of a tolerance.
2017-07-16 19:03:50 -04:00
Thomas Harte
e71d13c090
With the new PLL implementation, switching to a deeper window size returns the Acorn tape parser to: working.
2017-07-16 17:12:12 -04:00
Thomas Harte
51177e4e1f
Attempted a different implementation of the PLL, that responds to changes only once.
2017-07-16 16:49:04 -04:00
Thomas Harte
4489f120f9
Eliminated foolish double indirection on phase history.
2017-07-15 22:40:38 -04:00
Thomas Harte
e01f3f06c8
Completed curly bracket movement.
2017-03-26 14:34:47 -04:00
Thomas Harte
f94f34f053
Made an attempt at read track. Which means process_input_bit can't just swallow syncs any more; it now reports them as tokens of type ::Sync.
2017-01-01 20:39:19 -05:00
Thomas Harte
b3c33d993a
Made an attempt to explain the requirements placed upon Disk
subclasses that wish to support writing.
2016-12-31 15:30:48 -05:00
Thomas Harte
8eb21c6702
The "MFM...Byte"s aren't MFM-specific, they're relevant to both FM and MFM encoding. So renamed them. Also slimmed syntax within MFM.cpp mostly where emigration from the Acorn disk analyser had left a residue of lengthy namespace specification.
2016-12-31 15:25:11 -05:00
Thomas Harte
52b850a3f5
Quick extra: make sure parsed tracks don't overflow the 6400 byte space available in an MFM disk. Which might be better expressed as 6250?
2016-12-31 12:51:52 -05:00
Thomas Harte
cfbab1448c
Switched to a track parsing that disallows synchronisation values within sector contents.
2016-12-31 12:23:08 -05:00
Thomas Harte
12549ff412
Might as well get the file offset before entering the critical section; also moved the lock guard down more explicitly to group with the second set of actions.
2016-12-31 11:48:46 -05:00
Thomas Harte
6f0b5427e4
Made an attempt to avoid repetition of sync bytes.
2016-12-31 00:20:00 -05:00
Thomas Harte
0123b37213
Made an attempt to include sync values in the stream and properly to align.
2016-12-31 00:11:31 -05:00
Thomas Harte
ea4d85e1cd
The virtual disk constructed is the same across all tracks. So why not just request zero?
2016-12-31 00:10:35 -05:00
Thomas Harte
f217d508b8
Completed first attempt at write support for Oric disk images.
2016-12-30 23:12:46 -05:00
Thomas Harte
1f625fad66
Decided that if this is an [M]FM parsing function then it should be something more intelligent than a mere PLL record. Which I guess conveniently implies Oric DSK-esque behaviour. But properly defined, rather than very vaguely.
2016-12-30 23:10:52 -05:00
Thomas Harte
632b3c63b1
Added the infrastructure necessary for Oric disks to appear writeable to the machine and to receive changed tracks.
2016-12-30 22:51:48 -05:00
Thomas Harte
d581294479
Added get_track
to get the PLL output for a complete track.
2016-12-30 19:59:23 -05:00
Thomas Harte
3b29e6a473
Ensured SSD and ADFs are grown if required.
2016-12-30 18:08:12 -05:00
Thomas Harte
07dacff42d
Added writing for Acorn ADF disks, plus appropriate TODOs in both similar bits of boilerplate.
2016-12-30 18:03:30 -05:00
Thomas Harte
c85450648f
Fix: make sure copies have proper event lengths. Also made it much clearer what's going on with the initial copy to the heap.
2016-12-30 17:55:46 -05:00
Thomas Harte
c740d9655a
Fixed: index_count_ may have been left high by a previous call; reset it just in case.
2016-12-30 17:55:06 -05:00
Thomas Harte
d09e7ac1e8
Made an attempt at reacting appropriately if the very first thing that looks like a sector doesn't pan out.
2016-12-30 17:44:35 -05:00
Thomas Harte
5d63556870
Period
s need a custom copy constructor too, if they're going to avoid sharing an event_source.
2016-12-30 17:39:52 -05:00
Thomas Harte
81a3cbac45
Ensured a copy is passed for writing back rather than the original.
2016-12-30 17:26:44 -05:00
Thomas Harte
63ff5165a4
After a quick bit of reading, discovered the virtual copy constructor pattern really is only a convention in C++, and conformed to it. Which hopefully gives copyable tracks.
2016-12-30 17:25:39 -05:00
Thomas Harte
71dbd78cf2
If asynchronous background processing is to occur on tracks then, given that they inherently have state, they'll need to be copyable, and ideally 'cheaply' (though it's not too great a priority). So started implementing appropriate copy constructors. Also introduced an extra level of indirection to PCMSegmentEventSource
so that it can copy itself without copying the underlying PCMSegment
, which is 95% of the heft of a track in all currently-implemented cases.
2016-12-30 14:23:26 -05:00
Thomas Harte
f88f3c65e9
Removed duplicated newline.
2016-12-30 14:21:36 -05:00
Thomas Harte
82bb78fb2d
Ensured that get_sector copes even if any invalid sectors are encountered.
2016-12-30 14:21:14 -05:00
Thomas Harte
6fc692cd34
Attempted to switch to an asynchronous means for continuous file updates. Testing with SSD, as usual.
2016-12-29 22:15:58 -05:00
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
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
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
720b1e5802
Attempted to ensure proper CRC generation for FM-format input.
2016-12-28 18:56:53 -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
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
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
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