1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-09 01:29:44 +00:00
Commit Graph

36 Commits

Author SHA1 Message Date
Thomas Harte
a3d37640aa Switch include guards to #pragma once. 2024-01-16 23:34:46 -05:00
Thomas Harte
d3189acaa6 Add a constexpr route that explicitly calculates the simplest possible form. 2022-01-01 17:14:52 -05:00
Thomas Harte
512a52e88d Increases const correctness, marks some additional constructors as constexpr, switches std::atomic construction style. 2020-05-20 23:34:26 -04:00
Thomas Harte
25996ce180 Further doubles down on construction syntax for type conversions. 2020-05-09 23:00:39 -04:00
Thomas Harte
98daad45c7 Removers Factors.hpp; now this is a C++17 project. 2020-01-19 23:18:59 -05:00
Thomas Harte
1b4b6b0aee Renames: NumberTheory -> Numeric. 2020-01-19 23:14:35 -05:00
Thomas Harte
39d7e3c62c Ensures relative_exponents less than or equal to -32 don't overflow. 2019-07-26 22:19:40 -04:00
Thomas Harte
08671ed69c Fixes setting of a Time to a float. 2019-06-05 14:43:34 -04:00
Thomas Harte
5d6b5d9f10 Eliminates all emdashes in cross-platform code. 2018-05-13 15:34:31 -04:00
Thomas Harte
0b771ce61a Removes all instances of the copyright symbol. 2018-05-13 15:19:52 -04:00
Thomas Harte
4c6dc597f4 Converts Time::get into a template, introduces a via-a-double fallback for the timed event loop. 2018-04-25 19:54:39 -04:00
Thomas Harte
5e3e91373a Switches all unsigned int and double casts to functional style. 2017-10-21 19:49:04 -04:00
Thomas Harte
e152ed2e61 Made an attempt to avoid GCD costs when accumulating Times with a common clock rate (/divisor). 2017-07-21 18:20:27 -04:00
Thomas Harte
e01f3f06c8 Completed curly bracket movement. 2017-03-26 14:34:47 -04: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
d2ad2c756e Added enough shovelling to write rubbish for an entire sector. 2016-12-25 15:46:49 -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
4d4852bb78 Ensured that Times 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
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 Periods 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
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
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
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
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
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
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
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