texacala Posted October 23, 2011 Share Posted October 23, 2011 Vertical fine scrolls can be used by setting Bit 5 of each display list instruction and enabling VSCROL at $D405. Does that mean the LMS instruction too? And after setting up, do I scroll by adding or subtracting 40 to the top of the screen address (just like coarse scrolling)? Or is the scroll itself performed by poking to $D405? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted October 23, 2011 Share Posted October 23, 2011 I've never used fine scrolling, but surely the fine scroll bit must be set on the LMS too. To scroll more than 16 scan lines, you must use a combination of coarse and fine scrolling. De Re Atari explains it better than I dare to attempt: http://www.atariarchives.org/dere/chapt06.php Quote Link to comment Share on other sites More sharing options...
MaPa Posted October 23, 2011 Share Posted October 23, 2011 The fine scroll is done only by setting the $d405 register itself. If you want to scroll more than one gr. mode line (AFAIK you can't scroll more scanlines than the height of used graphic mode line), you have to use coarse scroll by changing LMS address. Quote Link to comment Share on other sites More sharing options...
phaeron Posted October 23, 2011 Share Posted October 23, 2011 You set the vertical scroll bit on all mode lines you want to be scrolled except for the last one. This means you cannot smooth scroll a single mode line. The height of the scrolled region is one mode line less and one scan line more than if it weren't scrolled. For instance, if you have 15 mode 2 lines, the height is (15 - 1)*8+1 = 113 scanlines. This works by changing the height of the starting and ending mode lines, so any DLIs or horizontal scrolling you've got attached to mode lines in the scrolled region will shift as well. The VSCROL register at $D405 sets the scroll amount in scanlines, with increasing values moving the region up by taking lines off the top and adding them at the bottom. VSCROL has four bits, but it should only be set from 0 up to one minus the normal mode height (7 for character modes). Setting it to other values will result in artifacts. You should adjust the screen address by a row at the same time that the VSCROL value wraps around to continue smoothly scrolling. Don't try to set a DLI on the last line of the vertically scrolled region. This can be made to work, but the timing is usually so tight that it breaks. Quote Link to comment Share on other sites More sharing options...
texacala Posted October 23, 2011 Author Share Posted October 23, 2011 Ok, if I'm following, is it correct that you can only vertical fine scroll in one direction? That is, VSCROL lets you scroll zero to 16 scanlines (mode line dependent) but is there a provision to move up or down? Coarse scrolling allows both directions via adding or subtracting a line length. Maybe I'm not understanding how VSCROL works though. Quote Link to comment Share on other sites More sharing options...
phaeron Posted October 23, 2011 Share Posted October 23, 2011 You can only scroll one way with fine vertical scrolling, but you can scroll the other way by combining it with coarse scrolling. Fine scroll by 7 scanlines one way and coarse scroll by an entire row the other way and you get one scanline of scroll in the other direction. Quote Link to comment Share on other sites More sharing options...
MaPa Posted October 24, 2011 Share Posted October 24, 2011 You do fine scrolling up by changing VSCROL register to 0,1,2... and scrolling down by 7,6,5... or whatever is your gr. mode line height. Both combined with coarse scroll. For example text mode you want to scroll up so you do VSCROL 0,1,2... 7, then you set VSCROL back to 0 and set LMS to LMS+40 (depends on your screen layout). Vice versa when scrolling down, you have set VSCROL to 7 and LMS to LMS-40 and then changing VSCROL to 6,5,4..0 and then again 7 and LMS-40. Quote Link to comment Share on other sites More sharing options...
texacala Posted October 24, 2011 Author Share Posted October 24, 2011 Ah, that makes sense, I hadn't thought about mixing fine/coarse like this. Thanks for everyone's comments; this should be enough to get me started! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.