Changes

Programming:Hardware scrolling 2

93 bytes added, 12:50, 30 October 2006
Now you can use fast sprite routines to draw.
For this to work you need to ensure that 1024 is exactly divisible by the width .1024 is the maximum scroll offset which can be programmed to register 12 and height 13 of the screen, when multiplied together equal 1024crtc.
width (in chars)*height (in chars) = 1024. One common screen size is 32 chars wide, 32 chars tall.
Now if you only scroll vertically you can avoid the problem completely. Ideal for vertical shoot em ups.
With a screen size of 40 chars x20 chars, the maximum scroll offset is 224 chars.
 
If you combine this with the register 3 trick (to scroll in byte sized increments),
then you get up to 7 seconds of scrollif you scroll every frame:
(224 * 2)/60 = 7 seconds
 
Otherwise you get 224/40 = 5 screens which can be scrolled
[[Category:Programming]]
Anonymous user