Either I'm doing something wrong or the VRES doesn't work in char modes as in pixel modes... I can't get the char lines to repeat. For line_height = x I get x different lines...
Well... I must have completely misunderstood everything...:
"VRES should always be clear for character modes."
I think this is because: according the specification, "
if VRES is set then the next scanline of this modeline continues at the next byte in video RAM, if VRES is clear then the LD1 pointer is reloaded so the same data will be displayed on each scanline." This is written for PIXEL mode, but I think this sentence is true for every video modes (what VRES actually does with LD1 is the same in every modes) just in some cases it simply does not make any sense in a given video mode, because the nature of that mode (like in ch modes?)! So actually effect of VRES bit set/reset - I think, again! - works the very same way in every modes, just the "visible result" is different because different modes uses LD1/LD2 in different ways then to "show" pixels then on your screen ...
So VRES bit seems to set the behaviour of LD1 in the mentioned way. I guess it does something similar in character mode as well (or generally in every modes), just it does not make sense there to use "VRES is set" state. In ch mode, LD1 defines the character codes to be displayed (and LD2 points to the font data). Now that explains very well, why specification says, that "VRES should be clear" for character modes: one LPB describes one character line, the number of scanlines for the LPB defines the height of the used ch pixels (this is also a strength of Nick, that the height of a char is not defined at all just only by user, eg in Commodore 64 is strictly 8 pixels unless some very complex raster interrupt timed tricks are used or so, by burning significant amount of your CPU time just for this, by also exploiting some VIC-II "bugs" maybe). Since for every new scanlines of a given character involves the next line of font data of the character, LD2 can change and will at the same column of next line. However since line by line Nick should show the newer and newer line of the font data of the
SAME CHARACTER CODE, it means, LD1 should be the same during this process, that is, LD1 should be re-loaded at every scanline, that is, VRES should be clear for this ... Of course you can actually set VRES in ch mode, just the result will be ... well ... interesting
You can guess what it does with VRES set, if you know how exactly LD1 and LD2 is used in ch modes ...
Either I'm doing something wrong or the VRES doesn't work in char modes as in pixel modes... I can't get the char lines to repeat. For line_height = x I get x different lines...
Of course not. What is "repeating" _already_ in character mode is using the same character code multiple times for its all scanlines. You can't repeat the character line itself then (it would be repeating the repeated stuff) ... In pixel mode the situation is different, as Nick "directly" reads/displays pixels, while in ch modes, there is an indirect mode: character code indexed font data is transferred to pixels (how? depending in colour mode of course) ... And here "character code" is same for the given column of the given character line, but font data is not (of course).
Well, it's my best understanding of the topic, at least!