1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Correct Nick interrupt prediction.

This commit is contained in:
Thomas Harte 2021-07-03 00:05:13 -04:00
parent 964d2d4fa4
commit 278671cdb9

View File

@ -463,11 +463,9 @@ void Nick::set_output_type(OutputType type, bool force_flush) {
// MARK: - Sequence points.
Cycles Nick::get_next_sequence_point() const {
// TODO: the below is incorrect; unit test and correct.
// Changing to e.g. Cycles(1) reveals the relevant discrepancy.
// return Cycles(1);
constexpr int load_point = 2*16;
constexpr int load_point = 16; // i.e. 16 cycles after the start of the line, the
// interrupt line may change. That is, after the
// second byte of the mode line has been read.
// Any mode line may cause a change in the interrupt output, so as a first blush
// just always report the time until the end of the mode line.