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
Thomas Harte
77da582e88
Switched the container in which events are passed to int
, with the intention of subclasses extending the receivable range.
2017-08-06 12:35:20 -04:00
Thomas Harte
ffadb04761
Documented, and removed a couple of Event types that are WD-specific but had accidentally flown into here. Will need to figure out how best to expose the CRC result too, but I'm willing to let that one drop out naturally as I implement the 8272.
2017-08-06 11:36:36 -04:00
Thomas Harte
29288b690e
Switched disk controllers to be instantiated explicitly in terms of cycles, created an Amstrad-specific subclass of the 8272 to record the direct programmatic availability of all disk motors bundled together, and otherwise adjusted to ensure the thing is clocked and that the motor is enabled and disabled appropriately. The 8272 is also now formally a subclass of the incoming MDM controller.
2017-08-06 09:45:16 -04:00
Thomas Harte
4d60b8801c
Started trying to factor out just the PLL stream -> FM/MFM events part that is presently in the WD1770.
2017-08-05 22:26:15 -04:00
Thomas Harte
192f232d3f
Silenced warnings.
2017-08-05 11:53:29 -04:00
Thomas Harte
6e4d3b8a77
Added enough logic to produce some sort of version of a completely unprotected DSK. So enough to start bootstrapping an FDC emulation, at least.
2017-08-05 11:44:53 -04:00
Thomas Harte
8eda24261c
Removed unnecessary header — it's implied by being a child of FileHolder.
2017-08-05 11:44:06 -04:00
Thomas Harte
75c59fefab
Added an empty husk to begin support for Amstrad CPC disk image formats.
2017-08-05 10:02:10 -04:00
Thomas Harte
a3b16b6dfa
Further beefs up the list of chunks that this TZX parser can either comprehend or skip.
2017-08-03 12:13:41 -04:00
Thomas Harte
2d2cefb0b0
Adjusted factoring to introduce support for block 10.
2017-08-02 14:36:47 -04:00
Thomas Harte
2fd071e45d
Made an honest attempt at outputting turbo speed data block data. The CPC now at least starts to load.
2017-08-02 14:24:34 -04:00
Thomas Harte
d7a5c3f49a
Added support for the ID 20 block and fixed a minor error in my skip-the-contents version of block 11: length is three bytes long, not two. This gives me enough structure properly to get to the end of my current test CDT, albeit without making any of the noises.
2017-08-02 14:12:34 -04:00
Thomas Harte
819761f9fb
Fixed another uninitialised pointer.
2017-08-02 13:56:35 -04:00
Thomas Harte
9d953421d8
After a quick check, added a couple of other _delegate initialisations. I should probably find a way to template this.
2017-08-01 07:07:43 -04:00
Thomas Harte
4b5e9ffb83
Ensured is_at_end_
is initially cleared by default.
2017-07-27 22:22:43 -04:00
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
8d1dacd951
Clean ups along the Electron::Tape line: ensured that the ClockReceiver is opted into only once, and that its run_for
propagates all the way along the chain.
2017-07-25 20:01:30 -04:00
Thomas Harte
d056f2e246
Updated comment.
2017-07-24 21:51:22 -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
6633537fb8
Discovering that there is such a thing as P81 — a ZX81 file without the name omitted — added support for it. Extended FileHolder while I was here to retain the file name and be able to supply its extension, as my quick-fix test-the-last-character approach to o/p/80/81 discrimination stops working with p81 thrown into the mix and this feels like the correct factoring.
2017-07-22 16:02:25 -04:00
Thomas Harte
313b36944f
Ensured that the final bit of a tape isn't dropped even if the tape ends exactly after it, by not posting a false pulse, being less restrictive about what can cap a bit, and in any case using a long gap as the end-of-file bookend.
2017-07-22 15:41:33 -04:00
Thomas Harte
456fdda6c2
Ensured that the mark_end step can't overwrite another recognised symbol.
2017-07-22 15:40:22 -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
6d5807ec4b
Fixed sign and ensured that the DataFromString
implementation is of the thing declared in the header.
2017-07-21 21:24:28 -04:00
Thomas Harte
64865b3f41
Signedness fixes.
2017-07-21 21:23:34 -04:00
Thomas Harte
163c0f1b44
Ensured offset
means exactly one thing.
2017-07-21 20:58:17 -04:00
Thomas Harte
2d8e7e9f8b
Removed reference to a parameter long-since dead.
2017-07-21 20:46:25 -04:00
Thomas Harte
a026998682
Marginally optimised set_offset
to avoid reset
s when possible.
2017-07-21 20:43:20 -04:00
Thomas Harte
06ea81fdb2
Made sure that unrecognised waves don't block the symbol queue, and allowed any type of nonsense to be skipped before finding a byte.
2017-07-21 20:23:26 -04:00
Thomas Harte
d69b1e2d11
Switched parsing logic to looking only for upward zero crossings, that being my new understanding of the ROM.
2017-07-21 19:39:38 -04:00
Thomas Harte
a3e0024980
Chopped time accumulation out of the default Tape
process because it's proving to be sufficiently expensive for a TZX as not to be worthwhile. Introduced a cheaper position capturing/restoring method.
2017-07-21 18:55:03 -04:00
Thomas Harte
d9a2c32aca
Made an attempt to obey the proper TZX rules on gaps, and to hit the common-clock-rate Time
optimisation.
2017-07-21 18:21:12 -04:00
Thomas Harte
e152ed2e61
Made an attempt to avoid GCD costs when accumulating Time
s with a common clock rate (/divisor).
2017-07-21 18:20:27 -04:00
Thomas Harte
70af075012
Determined what appears to be an appropriate workaround for the ZX81 TZX that I've managed to obtain.
2017-07-19 21:28:33 -04:00
Thomas Harte
c8cee88e33
Ensured that a stopped tape outputs a false
level and took an extra safety check in instantiation.
2017-07-18 22:49:11 -04:00
Thomas Harte
35296017b5
Clarified meaning of is_high_ flag and ensured it is honoured properly.
2017-07-17 21:36:05 -04:00
Thomas Harte
130d598ec9
Corrected some minor out-of-style breaks, and ensured that the name of ZX81 files is returned.
2017-07-17 19:52:54 -04:00
Thomas Harte
0350925c1e
Started sketching out greater support. Mostly TODOs right now, but pulse sequence and pure tone are implemented. I probably also need at least the CSW block to hit everything you might see in a ZX80 or ZX81 tape. Then I can worry about the rest when I have a way to test them.
2017-07-17 19:38:15 -04:00
Thomas Harte
94e3dd0d4f
Merge branch 'master' into TZX
2017-07-17 19:07:05 -04:00
Thomas Harte
eafdd7dbd7
Corrected decompressed size expectations: it may be up to five times the size of the number of waves, as waves are up to five bytes in length.
2017-07-17 19:04:25 -04:00
Thomas Harte
127b584e79
Ensured that resetting a TZX resets the is-at-end flag.
2017-07-17 07:52:28 -04:00
Thomas Harte
2179edc7fe
Adjusted to allow the very first thing found to be data, and ensured that unrecognised symbols break files just as gaps do.
2017-07-17 07:43:47 -04:00
Thomas Harte
9108495586
Added a safety seek.
2017-07-17 07:35:53 -04:00
Thomas Harte
fa617eac6b
Spotted that pilot and data segments have different encodings — of course! — and attempted to adapt.
2017-07-17 07:34:10 -04:00
Thomas Harte
b63971caf7
Took a first, incorrect, shot at TZX chunk 0x19, the generalised data block.
2017-07-16 22:40:38 -04:00
Thomas Harte
7327da6350
Switched the nascent TZX
to use the new PulseQueuedTape
.
2017-07-16 22:06:56 -04:00
Thomas Harte
8f72fc4a44
Factored out from the UEF implementation the concept of being a tape that has a queue of pending pulses and manages that queue.
2017-07-16 22:04:40 -04:00
Thomas Harte
238348c885
Performed the initial wiring to announce that this application supports TZX files and to route them to the ZX80/81 static analyser. The TZX class itself does not yet do much beyond basic validation. I think it'll be easiest if it follows in UEF's footsteps in queuing up pulses ahead of time, so some factoring out is now required.
2017-07-16 21:33:11 -04:00
Thomas Harte
b3861ff755
Reduced copying of Pulses.
2017-07-16 19:49:31 -04:00
Thomas Harte
c2bc34fd87
Eliminated the PLLParser class. I think the proper abstraction if and when another machine requires PLL-esque parsing is probably to template out the Acorn wiring of a PLL to a Parser, and/or generalise the Acorn shifter. It'll be easier to decide when the time comes.
2017-07-16 19:25:26 -04:00
Thomas Harte
1d3ae31755
Abstracted the concept of an Acorn shifter away from being a PLLParser. The Acorn tape parser now skips using that class and uses the shifter. The actual Electron also uses the shifter. So the two are completely aligned. Net result: the Electron should successfully load exactly when static analysis was successful.
2017-07-16 19:24:01 -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
c8575fe6e0
Mild clean ups, and a tweak to permitted top and bottom phase.
2017-07-16 13:39:08 -04:00
Thomas Harte
4489f120f9
Eliminated foolish double indirection on phase history.
2017-07-15 22:40:38 -04:00
Thomas Harte
253f9603ed
Split the normal tape parser class into two in order to add a new option: a PLL-driven tape parser. Decided to see what happens if I attempt to use that to parse CSW Acorn data.
2017-07-15 19:07:35 -04:00
Thomas Harte
b743566339
Corrected under-request of data: was erroneously supplying the size of input as the expected size of output.
2017-07-15 15:19:03 -04:00
Thomas Harte
648618d280
Tweaked bit timing decision.
2017-07-13 21:26:05 -04:00
Thomas Harte
ae1a130843
Fixed: length of 0 is a special case.
2017-07-13 20:57:27 -04:00
Thomas Harte
33d16ae0cd
Fixes: individual static analysers reset tapes, for potential successors. The ZX81 file analyser no longer overruns its buffer upon receiving a file that is shorter than 11 bytes.
2017-07-12 21:34:08 -04:00
Thomas Harte
f09fe30af5
Attempted a full implementation of CSW. All in memory for now.
2017-07-12 21:23:59 -04:00
Thomas Harte
33eadb5549
Started taking further steps towards CSW support; reading the ZLib documentation is next.
2017-07-11 22:41:10 -04:00
Thomas Harte
368bff1a82
Added a shell class that will one day be able to parse CSW files, plus the logic and metadata to instantiate it when a CSW presents itself.
2017-07-10 21:43:58 -04:00
Thomas Harte
d853841dd5
Further lightened up my file-is-ZX81 check.
2017-07-10 20:44:13 -04:00
Thomas Harte
bcb7c27cc4
Given that I'm not racing this any more, turned the intended 1 second back into 1 second.
2017-07-08 19:21:33 -04:00
Thomas Harte
2f42874fd3
Another fix to deal with real-time fighting: allow 8 and 18 pulses to be recognised as 1s and 0s. That's because the hand-off from ROM routines to parsing may occur very shortly before the first pulse of a valid sequence, making it look like there's a ghost. A cleaner solution needs to be found, probably revolving around allowing parsers to be attached to tapes and therefore to run constantly.
2017-07-06 22:33:03 -04:00
Thomas Harte
84d0e9b4cd
Accept a pulse that begins exactly on seek_time as being found while seeking.
2017-07-06 22:31:45 -04:00
Thomas Harte
a53011f778
Extended intro and outro length because right now I'm racing this myself. Can return to normal once tape motor control is implemented.
2017-07-06 22:31:12 -04:00
Thomas Harte
919fc48cc5
Fixed dumb out-of-bounds access error.
2017-06-22 22:28:50 -04:00
Thomas Harte
87ee8450fe
Minor rejig: it's much more likely that something that can't be distinguished is a ZX81 program. TODO: some sort of BASIC token parsing, to be more confident.
2017-06-22 20:23:14 -04:00
Thomas Harte
52d9ddf9e5
Gave the binary tape player a more logical assignment of wave level to output level. Which miraculously appears to have been the issue with the ZX80/81 tape loading — the inconsistency of silences seems to have been the issue.
2017-06-21 22:13:24 -04:00
Thomas Harte
e6e6e4e62b
Adds an extra character for padding the ZX81 table.
2017-06-12 22:08:11 -04:00
Thomas Harte
626737b9fa
Started mucking about with some string conversion routines. Not finished yet.
2017-06-12 21:32:36 -04:00
Thomas Harte
22de481557
Made an attempt to get .p/.80 checked and as far as the emulated machine.
2017-06-12 19:41:59 -04:00
Thomas Harte
77aa3c187e
Rebranded ZX80O as ZX80O81P, with an eye to making it accept ZX81 .p files. Adjusted the initial selection part of the static analyser appropriately.
2017-06-11 21:38:32 -04:00
Thomas Harte
ee0283c985
Modified to use an in-memory buffer for file contents.
2017-06-11 21:35:09 -04:00
Thomas Harte
2c6414ce11
Adjusted to allow inspect_waves to swallow a gap before a bit if necessary, increasing the opportunities for its call.
2017-06-11 18:31:09 -04:00
Thomas Harte
e5aea632ee
Updated curly bracket placement.
2017-06-11 17:29:22 -04:00
Thomas Harte
c2bc9a8c62
Ensured no namespace collision in double-include guards.
2017-06-11 16:41:15 -04:00
Thomas Harte
256ba4028b
Rejigged to eliminate semi-duplication of the is-a-file test.
2017-06-08 21:52:13 -04:00
Thomas Harte
b07af2660d
Adjusted to make sure that the very end of a tape is properly measured.
2017-06-08 21:33:35 -04:00
Thomas Harte
bc0d70b2f7
Added: a shout-out when the tape has been exhausted.
2017-06-08 21:32:27 -04:00
Thomas Harte
c6e48dfd56
Given that a final gap is semantically part of describing tape contents, ensured one formally appears before declaring that the tape has ended.
2017-06-08 21:31:54 -04:00
Thomas Harte
c775db50ef
Ensured no out-of-bounds accesses.
2017-06-08 21:31:03 -04:00
Thomas Harte
ee4c8b5ad2
Ensured final byte plays out.
2017-06-08 19:51:49 -04:00
Thomas Harte
d8b76e31c3
Added and improved the is-this-ZX80-stuff test. It seems some bytes are going missing in the to->from tape conversion.
2017-06-08 19:49:18 -04:00
Thomas Harte
7e10c7f9d8
Relocated the ZX80/81 concept of a 'file' out from Tape into Data, given that it's an exact duplicate of memory.
2017-06-08 19:09:51 -04:00
Thomas Harte
c47128f433
Widened tolerances and ensured zero bits aren't prematurely discarded.
2017-06-07 17:50:03 -04:00
Thomas Harte
8aab9acc10
Eliminated use of the zero level; now definitively returns a low/high input.
2017-06-07 17:39:29 -04:00
Thomas Harte
dbd2944c13
Took an initial run at the ZX80/81 parser.
2017-06-07 17:27:05 -04:00
Thomas Harte
4603fa6f24
Extended explicitly to support a token of lookahead, which is pretty much what was on offer anyway. Also corrected instance variable names, as per better adoption of C++ norms.
2017-06-07 17:21:57 -04:00
Thomas Harte
60300851ea
Started sketching out a tape parser for ZX80 and '81 files. I think this'll help me to verify whether the .O input is working.
2017-06-07 10:12:13 -04:00
Thomas Harte
58312ea2b7
Updated to new standardisation on curly bracket placement.
2017-06-07 10:05:43 -04:00
Thomas Harte
cb534d8b85
Corrected comment.
2017-06-07 10:05:16 -04:00
Thomas Harte
4677cebf40
Rejigged to correct: spaces go after bits, not after bytes.
2017-06-06 18:29:15 -04:00
Thomas Harte
7399f3d798
Caveman debugging in place, it looks like this file is returning nonsense.
2017-06-06 18:18:55 -04:00
Thomas Harte
faeecf7665
Made sure that there's nothing but silence at the end of the tape, even if the .O file is too long.
2017-06-06 18:16:47 -04:00
Thomas Harte
8c1769f157
Made a quick attempt at serialising from ZX80 .O to waves.
2017-06-04 16:59:26 -04:00
Thomas Harte
655809517c
Ensured that there is a subclass of file that is entrusted to load .O/.80 files, and that the code routes such files to it, noting that it should consider whether a ZX80 is required.
2017-06-04 16:37:03 -04:00
Thomas Harte
5d91a2600d
Permitted ROM-style PRGs that are not a power-of-two in size, and added extra safety checks on loading data from a tape.
2017-05-08 22:15:35 -04:00
Thomas Harte
2807e3134f
Implemented speedy header finding. So that's half of it.
2017-05-07 20:32:48 -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
0f399b0a0c
Made type conversion explicit.
2016-12-30 19:59:01 -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
bbd94749f4
... and I guess an instant maximal simplification is also easy if length ends up being 0
2016-12-29 11:02:21 -05:00
Thomas Harte
54900ca3fb
Addition and subtraction can end immediately without performing any extra work if the operand is 0
2016-12-29 11:00:47 -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
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
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
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
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
Thomas Harte
4d4852bb78
Ensured that Time
s start life in their simplest form.
2016-12-24 15:18:03 -05:00
Thomas Harte
4728bda0a2
Added an additional constructor to make sure that regular ints go to the correct place.
2016-12-24 13:27:57 -05:00
Thomas Harte
1e970a9772
Started stepping slowly towards allowing writing on the disk controller, taking the opportunity to introduce self-simplifying behaviour to Storage::Time.
2016-12-24 13:07:23 -05:00
Thomas Harte
e4e0347638
Attempted to consolidate some of the repetition.
2016-12-21 22:17:00 -05:00
Thomas Harte
03579f33f1
Fixed multi-coverage insertion, via an appropriate test.
2016-12-20 21:38:32 -05:00
Thomas Harte
7eca910cc5
Fixed insertion location finding logic, working on the relevant test.
2016-12-20 21:14:05 -05:00
Thomas Harte
823ab9bc34
Completed initial non-trivial test, fixing revealed errors.
2016-12-20 19:15:36 -05:00
Thomas Harte
5a508ea0df
Attempted properly to cover the exactly-equal starts and ends cases, and to improve meaning.
2016-12-20 18:32:49 -05:00
Thomas Harte
63d861a2f3
Switched from C-in-the-brain manual offset counting to using iterators like an ordinary C++ person.
2016-12-20 18:17:54 -05:00
Thomas Harte
6f17076003
Switched to much more logical shared_ptr
ownership of PCMSegmentEventSource
s by Period
s.
2016-12-20 18:13:10 -05:00
Thomas Harte
497b2ae4dd
Still by manual inspection: the time for the next event should be provisional until proven acceptable, allowing a proper measurement of time until exiting the period to be taken; also fixed the accumulated period error when seeking back onto the underlying track.
2016-12-20 08:14:16 -05:00
Thomas Harte
6bdde542c5
Edging towards functioning automatic tests, fixed right-period adjustment and slightly decreased searching cost while in the process of adding a test.
2016-12-20 07:52:14 -05:00
Thomas Harte
ec624eaab1
Made an attempt fully to implement PCMPatchedTrack. Which now requires tests.
2016-12-20 07:30:57 -05:00
Thomas Harte
1ef1f6ec69
Attempted to implemnt seek_to
and to finish add_segment
. Started doing a little of get_next_event
but ran out of time for the day.
2016-12-19 21:46:02 -05:00
Thomas Harte
8f937ceac8
Made an attempt to come up with a data structure that actually makes sense (though perhaps this is textbook list
rather than vector
stuff? I guess it depends on the frequency I expect inserts to occur versus reads) and to implement inserts. Though the Period
s aren't yet honoured.
2016-12-19 07:42:43 -05:00
Thomas Harte
e081f224b6
Implemented a very basic PCMTrack
test, nevertheless revealing an oversight in PCMSegmentEventSource
related to improperly counting to the index hole if the final bit is set. Took that as a message that I should comment and document the event source.
2016-12-18 22:53:24 -05:00
Thomas Harte
a6354ebb01
Reimplemented PCMTrack
to use PCMSegmentEventSource
, eliminating code duplication.
2016-12-18 21:37:05 -05:00
Thomas Harte
f9a5595dad
Added seeking tests, correcting such errors as uncovered.
2016-12-18 10:19:24 -05:00
Thomas Harte
3297f6d545
Made an attempt to implement seek_to
on PCMSegmentEventSource
, taking account of off-by-half counting.
2016-12-17 22:44:33 -05:00
Thomas Harte
3116a2cf4c
Realised I was actually testing PCMSegmentEventSource
, not PCMSegment
; implemented a spread of tests; hence fixed PCMSegmentEventSource.
2016-12-17 21:47:13 -05:00
Thomas Harte
254cc41fd6
Made an attempt to separate and isolate the stuff of creating flux events from a PCMSegment
, eventually to factor that out of PCMTrack
and make it available also to PCMPatchedTrack
.
2016-12-17 21:13:57 -05:00
Thomas Harte
313db75303
Ensured the patchable track owns its underlying track.
2016-12-17 18:17:22 -05:00
Thomas Harte
f1a08b7ab5
Opted to pass times by reference and added enough to PCMPatchedTrack that it could start being used by the disk controller, albeit that it doesn't work.
2016-12-17 16:26:45 -05:00
Thomas Harte
dc08a23ceb
This is going to be a slow walk, I think. This class attempts to be the scratchpad which will hold in-memory track modifications.
2016-12-16 19:20:38 -05:00
Thomas Harte
c4041b06a8
This'll do as a write interface, won't it?
2016-12-07 22:19:20 -05:00
Thomas Harte
3f7f2c6117
'Tape' has joined the new underscore orthodoxy.
2016-12-03 12:05:19 -05:00
Thomas Harte
0dc2aa6454
Commuted all of 'Storage' other than 'Tape' to postfix underscores.
2016-12-03 11:59:28 -05:00
Thomas Harte
81ee834530
As well as a bunch of logging, reinstated rotation position preservation across tracks.
2016-12-02 18:36:47 -05:00
Thomas Harte
93c573bfa9
Implemented missing status bits (other than the index hole), and a head loading delay for the Microdisc.
2016-12-01 21:13:16 -05:00
Thomas Harte
2222cb65d6
Split the status up into flags, assembled into a register upon demand. Attempted to implement some of the differences between the 1770/1772 and 1773/1793. Albeit with a motor fix still in place.
2016-11-30 22:26:02 -05:00
Thomas Harte
f44542c18c
Improved naming: this now explains what, not the mechanics of how.
2016-11-26 23:35:11 +08:00
Thomas Harte
5c8ecd3051
It probably needs a better name, but hastily implemented track caching at the Disk level.
2016-11-26 14:27:06 +08:00
Thomas Harte
2f86b07cfa
Added a parser for Oric-format MFM disks. Causing my first disk to load!
2016-11-26 13:40:10 +08:00
Thomas Harte
dcfdd73077
Switched to more conventional runtime polymorphism, also now allowing encoders (shifters as were) to be obtained, as a slightly lower-level interface than vector-of-sectors.
2016-11-26 13:39:20 +08:00
Thomas Harte
b180f04c87
Okay, so this file format wasn't what I hoped it was. It's another hack. Lots of work to do.
2016-11-26 10:19:10 +08:00
Thomas Harte
7613755f94
Fixed addressing: types are 1 and 2, not 0 and 1.
2016-11-26 10:13:12 +08:00
Thomas Harte
8499783b14
Dragged multibyte primitives and signature checks up to the base class. Implemented support for Oric MFM-style .DSK, at the file format level.
2016-11-21 20:47:16 +08:00
Thomas Harte
31c2548804
Created a base class for the boilerplate fopen
stuff, switched as many classes as possible to its use, switched to postfix underscores and non-camelCase names.
2016-11-21 20:14:09 +08:00
Thomas Harte
97811fe590
Made minor fix to ensure that a header that appears to extend beyond the end of an Oric .TAP doesn't create an ostensibly endless tape.
2016-11-15 12:02:03 +08:00
Thomas Harte
fce48b9b8c
I am instructed that the Oric actually catches only positive transitions, and compares the distance between those to a threshold. So here's an altered version of the tape parser that does that.
2016-11-09 06:37:10 -05:00
Thomas Harte
c257e7f58d
Implemented better sync-to-zero and discovered a header counting bug plus, probably, a misleading representation of gaps in the Oric TAP decoder.
2016-11-07 20:17:06 -05:00
Thomas Harte
80702616ea
Had a quick go at using the Oric parser for static analysis. Found out that synchronisation is lost. Need to investigate.
2016-11-06 22:56:38 -05:00
Thomas Harte
7205c3f82b
Made an attempt to build in Oric slow/fast detection.
2016-11-06 21:31:10 -05:00
Thomas Harte
d1ef2f7c63
Made an attempt to consolidate what I learnt of Oric encoding while building this hastily and untidily directly into the Oric implementation.
...
(while adding support for the slow tape encoding mode)
2016-11-06 19:22:09 -05:00
Thomas Harte
353c1c8ea3
Shifted ownership of PETSCII -> string conversion down to the storage layer, where it's useful for tape parsing.
2016-11-06 18:43:51 -05:00
Thomas Harte
1b15bc3a6c
Started relocating the tape parsers down from static analyser to storage, to signify that they may be used by the emulation (if fast loading is supported on that machine).
2016-11-06 16:13:13 -05:00
Thomas Harte
827a919368
This is an initial attempt at reading actual tape data. It loses sync though.
2016-11-02 22:30:53 -04:00
Thomas Harte
d3634488e6
Made an attempt better to deal with multiple-file TAPs; also started using a zero level for the header/data gap.
2016-10-24 21:59:06 -04:00
Thomas Harte
cbbd31c2e0
Explained what this recently factored-out class does, and removed code from the header.
2016-10-20 19:33:25 -04:00
Thomas Harte
cc0b70828b
Removed attempt at multiple-file logic, at least for the time being. Starting to wonder whether I actually need anything beyond a literal streaming of bytes?
2016-10-16 22:15:24 -04:00
Thomas Harte
fae1bb0db9
First successful game loaded! It turns out exactly one '$' is correct. Probably.
2016-10-15 21:49:41 -04:00
Thomas Harte
952a24f769
A quick hard-wiring of the OricTAP code to get the first file in a .tap correct, damn the rest, and I'm getting some on-screen feedback. Hooray!
2016-10-15 21:39:53 -04:00
Thomas Harte
a608bbebfb
Performed enough wiring to put the onus back onto OricTAP to do appropriate things.
2016-10-15 21:32:59 -04:00
Thomas Harte
6d7c3f6ac2
Factored out the now-sampling binary-level tape player from the Vic and connected it up to the Oric.
2016-10-15 21:21:18 -04:00
Thomas Harte
4f78d693e9
Reintroduced gap as a string of 1s, made an attempt to look up bit ordering. Still unclear on high/low versus low/high.
2016-10-11 08:07:51 -04:00
Thomas Harte
70f004efbb
This may be feeding bits in the wrong direction or calculting the wrong parity or doing something else amiss but should now be correct as to bytes.
2016-10-11 07:57:10 -04:00
Thomas Harte
df01c78039
It's a bit of a mess but this is probably close to appropriate for Oric TAP files.
2016-10-11 07:39:48 -04:00
Thomas Harte
abf47efd40
Factored out Commodore is-a-ROM test, allowing it to be used from the Commodore analyser and thereby allowing ROMs to get as far as the machine again.
2016-09-29 19:39:13 -04:00
Thomas Harte
4010f36238
Ensured tape-formatted PRGs reach a conclusion.
2016-09-29 19:12:26 -04:00
Thomas Harte
ca53fac732
Switched to assuming a single-sided disk, moved out magic constants.
2016-09-26 21:20:30 -04:00
Thomas Harte
572d5587d9
Made a first stab at enabling multi-disk machines and thereby obeying (some of) the Plus 3's status register.
2016-09-25 21:24:16 -04:00
Thomas Harte
9bbcbd1001
Renamed class, intending to turn a Disk::Drive
into literally just that, and have a thing with a PLL that consumes events be a Controller
.
2016-09-25 20:05:56 -04:00
Thomas Harte
523dbb9678
This'll do for getting the ADF into the machine.
2016-09-25 18:32:26 -04:00
Thomas Harte
de863719d0
Made a first attempt at Acorn ADFS support plus the start of a suitable analyser.
2016-09-25 17:46:11 -04:00
Thomas Harte
a9e65e9b7a
Tweaked disk side density, added call-outs to a WD1770 if the Electron had one (albeit without run_for_cycles
yet as I need to figure out the clock rate), added a shell of the basic functions of the WD1770. No implementation yet.
2016-09-19 22:06:56 -04:00
Thomas Harte
64f2538b1f
Added CRC checking to DFS comprehension; fixed a bunch of places where I'd used Objective-C's #import
rather than #include
.
2016-09-19 08:16:06 -04:00
Thomas Harte
8a1b805d11
Fixed file offset calculation for single-sided images.
2016-09-19 07:34:10 -04:00
Thomas Harte
b1e7f2dfd0
There's no cache and no CRC checking yet, but this is probably a rough outline of an FM parser.
2016-09-18 22:03:06 -04:00
Thomas Harte
d1c861d3a5
That should be that, I hope.
2016-09-18 21:09:32 -04:00
Thomas Harte
02c9a82cb5
Edging towards SSD/DSD support. Hold on!
2016-09-18 19:32:08 -04:00
Thomas Harte
91cd7e143b
Started on the SSD/DSD support. Realised I had ommitted multiple head support from my disk class. Fixed that.
2016-09-18 19:21:02 -04:00
Thomas Harte
5409c8ec54
Switched PCMSegment
s to std::vector
; ensured generated [M]FM tracks are correctly sized, thereby making sure the individual flux windows will be correctly sized.
2016-09-18 18:56:35 -04:00
Thomas Harte
d9aaf456f0
Adapted pervasively to MSB-first output. Which seems to be correct.
2016-09-18 18:46:58 -04:00
Thomas Harte
180c3df2d4
Calling it 'number theory' probably isn't accurate but extracted the CRC stuff and started using it for [M]FM encoding.
2016-09-18 18:33:26 -04:00
Thomas Harte
55a7418cbf
Parameterised to perform FM and MFM encodings, at least subject to CRCs still being missing.
2016-09-18 17:16:20 -04:00
Thomas Harte
22eed60d2b
Started sketching out basic MFM track encoding. Which possibly even means that the shifters don't need to be public?
2016-09-18 16:53:21 -04:00
Thomas Harte
0089c830c6
This possibly correctly encapsultes the lowest level of FM and MFM rules.
2016-09-18 14:17:06 -04:00
Thomas Harte
bcf91de7e9
Declared support for the Acorn disk files, started hammering out an encoder.
2016-09-18 13:35:54 -04:00
Thomas Harte
6454508db8
Added a quick bit of documentation.
2016-09-18 10:30:52 -04:00
Thomas Harte
65b568003d
Clarified TODO.
2016-09-18 10:29:45 -04:00
Thomas Harte
8c2bf099ad
Cut down to one GCD and clarified variable names, getting more explicit about what's going on.
2016-09-18 10:24:09 -04:00
Thomas Harte
79ef38b123
Attempted to use the new get_cycles_until_next_event
method to take some repetition outside of the PLL and drive event loops.
2016-09-17 22:02:38 -04:00
Thomas Harte
dbb758aaf1
Workaround for a weird bug that suddenly appears to manifest: gzgetc is returning the file name, not bytes from the file. Seems to be related to improper initialisation of the next
field within the gzFile header. I can't immediately see where ZLib intends to do that so it's a bit mysterious. But the larger-than-8 readers could probably save time by reading in blocks anyway.
2016-09-17 22:01:25 -04:00
Thomas Harte
14a9edcf5d
Made an attempt to do the time base conversion upfront, saving a lot of hassle and allowing greater prediction.
2016-09-17 19:52:27 -04:00
Thomas Harte
9d6dcb80a7
Started work on a GCR parser and the helper functions that lie behind that.
2016-09-13 21:53:36 -04:00
Thomas Harte
e3571e8b9e
Added insurance against an infinite loop should the tape be exhausted.
2016-09-12 22:22:23 -04:00
Thomas Harte
eeec516fa6
Implemented seeking on tapes, mucked about a bit more with the Commodore analyser, at least temporarily removed cropping from the Vic emulator.
2016-09-11 17:09:00 -04:00
Thomas Harte
1de6097f06
Shuffled C stuff out on top.
2016-09-08 21:08:03 -04:00
Thomas Harte
24251a2768
Negligible indentation fix.
2016-09-08 07:49:43 -04:00
Thomas Harte
01e5dae512
Threw in 300-baud support. Why not?
2016-09-08 07:48:20 -04:00
Thomas Harte
3e925e80a3
Added a field-filling constructor for pulses.
2016-09-08 07:41:44 -04:00
Thomas Harte
1e7b5330f5
More or less rewrote, to use a filled-per-chunk buffer of upcoming pulses rather than working them out as requests come. Which is more straightforward — all the code for a particular chunk goes in exactly one place — and much easier to extend. So threw in a provisional 0104 implementation.
2016-09-08 07:41:26 -04:00
Thomas Harte
d7d5f24aab
Attempted, at least, to insert a dummy byte as per the specification.
2016-09-06 21:51:04 -04:00
Thomas Harte
11850b872d
Sought to emulate 0111 as a longer 0110 to test a particular HQ UEF. Some progress. Not great.
2016-09-05 18:28:43 -04:00
Thomas Harte
21e5f407d8
I need to get a bit more definitive on naming but this gets all the way to setting a configuration upon an Electron.
2016-08-31 22:03:42 -04:00
Thomas Harte
963a479908
Made a quick first attempt at getting a file name from Acorn tape, failing terribly but at least formalising tapes being able to signal their end.
2016-08-29 21:53:06 -04:00
Thomas Harte
d1abfc040c
Addressed my dithering here: the file format containers themselves should do nothing but inspect the data to find out whether it is of the correct format. The machine steps are there for machine-specific validation. So it's probably easier to treat a binary ROM image just as a binary ROM image. Therefore, the Acorn-specific .rom detection is now in an Acorn-specific area.
2016-08-29 08:48:49 -04:00
Thomas Harte
29c972f4b8
Added hacky segue into analysis for all Electron formats. Added analyser to try to differentiate Acorn-format ROMs from other things called .rom, which are likely to be numerous.
2016-08-28 12:43:17 -04:00
Thomas Harte
d9f0065154
Sketched out just enough classes to get through the get-contents-into-memory step of static analysis.
2016-08-28 12:20:40 -04:00
Thomas Harte
24938326ac
ROMs definitely have no behaviour other than responding to memory accesses. Cartridges might. So picked the more general term. Sketched out a class at least to parse PRG as though it were a cartridge. Hence the static analyser can guess at whether a PRG is a cartridge or an ordinary program.
2016-08-27 18:26:51 -04:00
Thomas Harte
a1b3a18d11
Started forcing a resolution on ROMs by doing. But have immediately misstepped. Rename coming momentarily...
2016-08-27 18:17:40 -04:00
Thomas Harte
82c8459055
Minor tidying of namespace usage declarations.
2016-08-27 17:18:12 -04:00
Thomas Harte
56c0d70c1f
Gave disks their own namespace.
2016-08-27 17:15:09 -04:00
Thomas Harte
c0402d0c2b
Gave tapes their own namespace.
2016-08-27 17:09:45 -04:00
Thomas Harte
8c333059a8
Turning this into a slog: gave UEF
a more appropriate name, got as far as now having to decide what to do about ROMs as to structure. I guess they're machine specific, so specific classes?
2016-08-27 16:40:21 -04:00
Thomas Harte
73ce67bee8
Added some documentation of the intention here.
2016-08-19 11:04:59 -04:00
Thomas Harte
4edd1214f1
This has now successfully loaded its first PRG-as-a-tape.
2016-08-19 10:58:42 -04:00
Thomas Harte
2935848f35
Adopted header/header/data/data pattern. But still not complete joy.
2016-08-17 08:03:34 -04:00
Thomas Harte
e5523dbbed
This gets through loading the first(/only?) copy. I tried repeating it with a bit-flipped header, now I'm trying repeating the header with a different file type. More documentation searching to do, I guess.
2016-08-16 22:17:08 -04:00
Thomas Harte
1bca9aa2bb
Fixed parity: now calculated from the actual byte and works the other way around. The Vic now believes it is loading the actual program. So I guess bytes, headers and the lead-in is working.
2016-08-16 21:41:09 -04:00
Thomas Harte
dfe9fb83ef
This proves that bytes are being deposited properly. For the first 36 anyway, and with no announcement.
2016-08-16 21:09:50 -04:00
Thomas Harte
12f8aff65b
Lengths I'd taken seem to have been for dipoles, not single poles. So I just doubled the clock rate. Also I was producing each dipole as high then low, when they should probably be low then high. The Vic now at least recognises that something is happening on the tape.
2016-08-16 19:46:53 -04:00
Thomas Harte
3a23d5d8cf
Adjusted the check digit.
2016-08-15 22:44:36 -04:00
Thomas Harte
dbe47f3f45
I've obviously misunderstood something as, as far as I'm concerned, this should at least get me a 'LOADING'.
2016-08-15 22:40:05 -04:00
Thomas Harte
7994148f55
I'm starting to make a little headway, I think: this performs lead-ins and countdowns, though with no actual data or anything as helpful as that.
2016-08-15 22:10:53 -04:00
Thomas Harte
7e2b4554ea
This likely forms the Commodore dipoles correctly. It just stays stuck in leader tone forever is all.
2016-08-15 20:08:50 -04:00
Thomas Harte
38aec44d85
Made sufficient changes for the Vic itself to believe it can recast a PRG as a tape and insert it that way. So now the ball is in the court of: how the heck are Commodore tapes encoded?
2016-08-15 19:44:41 -04:00
Thomas Harte
3aa40212f3
Fixed minor documentation error; admitted that this class didn't invent the idea of a pulse.
2016-08-15 19:37:21 -04:00
Thomas Harte
9d76cd9b60
Removed dead instance storage.
2016-08-04 21:41:12 -04:00
Thomas Harte
3e90b85ff8
Made an attempt to insert proper conversions to/from rotational speed. The Time
class is now really turning into a full-on quotient. Might need refactoring.
2016-08-04 21:36:39 -04:00
Thomas Harte
e57ab1025d
Fixed location calculation, up to a point.
2016-08-03 22:33:00 -04:00
Thomas Harte
9af9b28baf
Made very first attempt at closing the loop on this. But it's time for work.
2016-08-03 08:16:23 -04:00
Thomas Harte
e15241dc3c
Added ability to query how long since the new interval was set to the timed event loop. Discovered that LCM will returning the net effect of the common factors only. Otherwise continued iterating towards time preservation.
2016-08-03 07:49:00 -04:00
Thomas Harte
a3a3486f54
Okay, it's becoming more apparent where the (very mild) complexity will be here. But started moving towards retaining rotation between tracks.
2016-08-03 07:33:26 -04:00
Thomas Harte
21f1fa37a4
Fixed Time
addition, added accumulation of distance into track into the disk drive, added a short circuit for LCM.
2016-08-03 07:26:05 -04:00
Thomas Harte
30f8b6baa4
Made an attempt to add the necessary extension to Track
, with a concrete implementation in PCMTrack
, to support time-based seeking, the intended mechanism for not magically spinning the disk back to the index hole upon every head step.
2016-08-03 06:59:45 -04:00
Thomas Harte
d832e5e10d
Reduced 1540 PLL to running at 4Mhz. Which is possibly correct (?) Made minor change to avoid divide if possible.
2016-08-02 21:28:50 -04:00
Thomas Harte
bc10b3ee9a
It appears the problem is as simple as sectors being counted from zero.
2016-08-01 10:08:38 -04:00
Thomas Harte
f5e4ea3351
Some minor tidying, lots more of the caveman stuff as I try to determine what I'm doing wrong.
2016-08-01 09:43:08 -04:00
Thomas Harte
a00f9adba3
Made a first attempt at D64 support. Made an error somewhere but this should be 90% of it.
2016-08-01 08:41:16 -04:00
Thomas Harte
58297f1baf
Performed the basic metadata and routing for opening D64 files. Realised that I wasn't actually necessarily catching exceptions properly for all file opens, and fixed.
2016-08-01 07:09:15 -04:00
Thomas Harte
ee2a7c9415
Added slightly to exposition, to match other formats.
2016-08-01 06:54:57 -04:00
Thomas Harte
2799a87218
Reduced possibility of overflow on LCM, improved commenting widely, removed one stale piece of G64 bootstrapping caveman stuff.
2016-08-01 06:04:55 -04:00
Thomas Harte
198fbbedc7
Reeled back all appropriate pieces of caveman debugging.
2016-07-31 13:42:34 -04:00
Thomas Harte
2332f72875
Formalised clock-rate multiplication within disk drives, discovered that the stepper didn't have ideal behaviour for my timed event loop and hence nailed down the semantics a ilttle more.
...
(obiter: the 1540 now appears to discern the correct sequence of bits. Framing is off in my test printfs but that's neither here nor there).
2016-07-31 13:32:30 -04:00
Thomas Harte
6ee784a893
Increased logging; discovered I was packing events together too closely. Now getting some zeros.
2016-07-30 04:30:55 -04:00
Thomas Harte
fead524eb5
Attempted to give the PLL a litte extra leeway, and fixed PCMTrack
length test.
2016-07-29 18:52:50 -04:00
Thomas Harte
8f62211f5e
Wired up the 1540 as a PLL delegate. Which prima facie means it should start receiving a bit stream. Except that I clearly have something in the timing way off — either my flux transitions are far too short or I need to significantly increase the clock rate on the PLL.
2016-07-29 12:08:18 -04:00
Thomas Harte
89a1881fef
Started turning the 1540 into an actual disk drive.
2016-07-29 11:03:09 -04:00
Thomas Harte
6532b3a8c8
Filled in a calculation of clocks per bit that'll do.
2016-07-29 07:51:07 -04:00
Thomas Harte
f984de42a3
Took some small steps towards having a disk drive that at least can select a track and pump relevant events into a PLL.
2016-07-29 07:31:02 -04:00
Thomas Harte
0e581c7607
Factored out the stuff of running a timed event loop from the TapePlayer.
2016-07-29 07:15:46 -04:00
Thomas Harte
e55db0cfe8
Made an attempt to eliminate creeping tape processing accuracy misses, which implied factoring out the GCM and LCD functions, which I then felt didn't really amount to signal processing.
2016-07-29 05:19:01 -04:00
Thomas Harte
5c1614ce7b
Attempted to simplify, very slightly.
2016-07-28 14:35:39 -04:00
Thomas Harte
015cea494d
Switched to a much-more straightforward PLL. I think I'm just fiddling now rather than moving forwards. Probably time to move on?
2016-07-28 11:32:14 -04:00
Thomas Harte
e061e849d4
Had a second bash at the PLL. Probably I should read some of the literature.
2016-07-27 16:24:24 -04:00
Thomas Harte
63f39608a6
Added just enough to get back to a working build.
2016-07-15 20:35:19 -04:00
Thomas Harte
165dbd9651
Started fleshing this out a bit. Hopefully.
2016-07-15 08:28:34 -04:00
Thomas Harte
0aa90b943b
Switched to specifying bit length as a quotient for the purposes of a PCMSegment and verified that I had the logic for picking a Commodore time zone backwards: bigger numbers are faster, not slower.
...
Started sketching out a DiskDrive class.
2016-07-15 06:51:11 -04:00
Thomas Harte
6afd619791
Eliminated floating point arithmetic.
2016-07-14 19:47:00 -04:00
Thomas Harte
6b4fec37ff
Moved down to a single divide.
2016-07-14 19:45:08 -04:00
Thomas Harte
481475a0f4
Switched to a full-on linear regression. Which causes the current tests to pass.
2016-07-14 19:42:01 -04:00
Thomas Harte
6d6b26b99f
Actually made things worse.
2016-07-14 07:32:27 -04:00
Thomas Harte
d8d3464c56
Made a quick-hack attempt at PLL synchronisation. Which doesn't work.
2016-07-14 07:31:23 -04:00
Thomas Harte
d1fe07f14d
Added test of perfect DPLL input timing.
2016-07-12 21:42:23 -04:00
Thomas Harte
94db45456e
Started sketching out the basic form here, albeit that it doesn't yet do _the only thing it advertises itself as useful for_.
2016-07-12 20:23:56 -04:00
Thomas Harte
75d95c0bc0
Sketched out an interface for a digial PLL. Not persuaded yet. Baby steps.
2016-07-11 22:12:58 -04:00
Thomas Harte
1e9eedc314
Factored out the PCM track since it's going to be a useful construct for almost every file format. Documented it a little better.
2016-07-10 18:36:52 -04:00
Thomas Harte
66895d3ac7
Actually, I think this is the correct conversion from received speed to clock rate. It'll become obvious if it's not when I get back to working on the 1541 itself.
2016-07-10 18:24:12 -04:00
Thomas Harte
19ee430d4a
Made an effort to support zoned tracks, at least.
2016-07-10 18:07:53 -04:00
Thomas Harte
6593caca93
Switched to a probably more helpful way around of expecting bits in bytes.
2016-07-10 16:21:52 -04:00
Thomas Harte
845a00ccef
Attempted via linear search to implement PCMTrack::get_next_event
.
2016-07-10 16:17:25 -04:00
Thomas Harte
f9510c1b67
Put sufficiently much of PCMTrack
into place to get to a stored list of segments, having determined a common clock rate between them and therefore a complete track length.
2016-07-10 16:10:05 -04:00
Thomas Harte
4ae9f5ad5d
Added preliminaries of reading the speed zone information.
2016-07-10 13:42:45 -04:00
Thomas Harte
8ae78ba4e0
Fixed signature check and fseek
parameter order.
2016-07-10 13:32:59 -04:00
Thomas Harte
ff49857f5c
Started sketching out support for the G64 file format.
2016-07-10 10:17:53 -04:00
Thomas Harte
9e3d6b762b
Sketched out the generic interface for a disk, documenting it and the tape interface while I'm here.
2016-07-10 08:54:39 -04:00
Thomas Harte
c306d705e1
Made a quick first attempt at all-the-way-through tape wiring for the Vic.
2016-06-26 19:43:09 -04:00
Thomas Harte
37ba42a52f
Factored out the stuff of playing a tape, started basic sketch of the Vic-related classes.
2016-06-26 19:03:57 -04:00
Thomas Harte
ee19417ded
Made an attempt quickly to implement parsing of the Commodore .TAP file format.
2016-06-25 16:09:32 -04:00
Thomas Harte
21ca1ef86b
Started attempting to clarify instance variable usage.
2016-03-12 23:19:10 -05:00
Thomas Harte
2b8fb5b615
Made an attempt to fix my 0114 implementation.
2016-02-20 23:13:58 -05:00
Thomas Harte
f7fc7cb932
Implemented some portion of 0114; ensured I'm safely skipping chunks in all cases.
2016-02-20 22:18:00 -05:00
Thomas Harte
ec3cccbb0d
Working towards HQ UEF support: fixed bug whereby writing to tape output would reset input pulse stepper; added support for chunk 0116 and approximate support for 0113.
2016-02-20 22:03:14 -05:00