Login
Back to forumSee the full topicGo to last reply

Posted By

bubis
on 2018-03-15
17:37:49
 Re: Starting off again

I have never done split screens and (different) vertical scroll but I think I know what is the issue here. The issue is $FF1F not being in sych with $FF06.

Some concepts first to make sure we are on the same page:

Vertical scroll register (vscroll) = lower 3 bits of $FF06
Vertical subaddress register (vsub) = lower 3 bits of $FF1F
Vertical line register (vline) = $FF1D + the 9th bit is in the lowest bit of $FF1C.

The vsub register drives which pixel row of the possible 8 of a char is actually rendered to the screen. TED initializes it to be 7 when vline = 0 and increments it at the beginning of each raster line after the first badline occurs. The first badline occures when vline&7 = vscroll and a second badline occures in the next rasterline and this is repeated until the bottom of the window. So, on a standard screen when vscroll = 3 the first badline occures in rasterline 3, vsub is incremented at the beginning of the next rasterline and becomes 0 (TED will keep incrementing it from here on), the second badline is triggered and TED starts rendering the (first) character row (and the window). This is all what TED does to keep the occurrence of the second badline (when a new character row starts rendering) and the restart of the vsub register in sync.

So, if you change vscroll on the way, you also need to change vsub to keep them in sync, otherwise you will have those strange broken character lines where the content is changing in every character row but vsub is not in sync, so the top rasterline of the char is not where is should be.



Back to top


Copyright © Plus/4 World Team, 2001-2024