1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Tweaks contended timing.

This commit is contained in:
Thomas Harte 2021-03-31 22:51:20 -04:00
parent 48f794dc2d
commit 4f80523828

View File

@ -88,9 +88,12 @@ template <VideoTiming timing> class Video {
.cycles_per_line = 228 * 2,
.lines_per_frame = 311,
.interrupt_time = 56545 * 2,
.interrupt_time = 56542 * 2,
.contention_leadin = 2 * 2, // TODO: is this 2? Or 4? Or... ?
// i.e. video fetching begins five cycles after the start of the
// contended memory pattern below; that should put a clear two
// cycles between a Z80 access and the first video fetch.
.contention_leadin = 5 * 2,
.contention_duration = 129 * 2,
.delays = {
@ -311,7 +314,9 @@ template <VideoTiming timing> class Video {
}
const int time_into_line = delay_time % timings.cycles_per_line;
if(time_into_line >= timings.contention_duration) return 0;
if(time_into_line >= timings.contention_duration) {
return 0;
}
return timings.delays[time_into_line & 15];
}