Changes

Jump to: navigation, search

Programming:CPC Plus Horizontal scroll

710 bytes added, 07:31, 27 January 2009
defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee
</pre>
 
User Fano has this to say:
There seems to have an error in "CPC Plus Horizontal scroll".It doesn't work properly on winape.Could you test it on a real CPC+ to be sure ?
 
I just wrote a little fix in case of (ln142-156)
 
<pre>
The horizontal pixel scroll offset is updated for every pixel.
;; The CRTC scroll offset is updated for every CRTC character (every 16 pixels in mode 2
;; OR every 8 pixels in mode 1 OR every 4 pixels in mode 0).
 
scroll_speed EQU 2 ;; increments for pixel scrolling:
;; 1 for mode 2
;; 2 for mode 1
;; 4 for mode 0
 
 
.scroll_right
;; get horizontal pixel scroll offset
ld a,(horz_pixel_offset)
sub scroll_speed
and &f
ld (horz_pixel_offset),a
cp 16-scroll_speed
ret nz</pre>
[[Category:CPC Plus]]
[[Category:Programming]]
1,963
edits