
Сообщение от
ARTi
нашел чью-то ссылку полностью скорректированной схемы, однако потерял ее. Почему-то мне кажется, что Вы имеете к этому отношение
Не имею, честное слово.
Про ссылку такую я не помню, поэтому просто выпишу здесь то, что у меня получилось в итоге для фирменных машин:
Top border height: 48 lines
Bottom border height: 40 lines
Vertical retrace:
48K: 64 - top border height = 16 lines
128K: 63 - top border height = 15 lines
Hidden bottom lines: 56 - bottom border height = 16 lines
Border width: 48 pixels (given the pixel is 1/2 of a tick)
Field width: screen area width + border width * 2 = 352 pixels
Field height: top border height + screen area height + bottom border height = 280 lines
Horizontal retrace:
48K: 48 ticks
128K: 52 ticks
Ticks per line: field width / pixels per tick + horizontal retrace
48K: 224
128K: 228
ULA cycle length: 4 ticks
First visible tick: lines per vertical retrace * ticks per line - border width / pixels per tick + ULA cycle length
48K: 3612 (+ 1) = 3613
128K: 3400 (- 1) = 3399
Ticks per frame: (lines per vertical retrace + top border height + screen area height + bottom border height + hidden bottom lines) * ticks per line
48K: 69888
128K: 70908
ULA contention base:
48K: 14335th tick since last INT
128K: 14361st tick since last INT
How to compute ULA delay:
Код:
if(ticks_since_INT < contention_base) {
delay = 0;
} else if(ticks_since_INT >= contention_base + screen_area_height * ticks_per_line) {
delay = 0;
} else {
tick_on_line = (ticks_since_INT - contention_base) % ticks_per_line;
if(tick_on_line >= screen_area_width / pixels_per_tick) {
delay = 0;
} else {
tick_in_ULA_cycle = tick_on_line % 8;
delay = (tick_in_ULA_cycle == 7) ? 0 : (6 - tick_in_ULA_cycle);
}
}
Floating bus base:
48K: 14338th tick since last INT
128K: 14364th tick since last INT
Если нужна выверенная растактовка по циклам инструкций Z80, дайте знать, я выпишу сюда прямо из исходного текста.