Re: A83: moving background


[Prev][Next][Index][Thread]

Re: A83: moving background




Remove the ld b,0 's  and get it a little bit faster :)

//Olle

>
>Just rotate every byte in the graph buffer through carry, like this:
>
>        ld    hl,PLOTSSCREEN
>        ld    b,0
>loop1:  rr    (hl)
>        djnz  loop1
>        ld    b,0
>loop2:  rr    (hl)
>        djnz  loop2
>        ld    b,0
>loop3:  rr    (hl)
>        djnz  loop3
>        ret
>
>That's optimized for speed, optimizing for size would use bc to loop through
>all of the buffer at once. This will scroll everything to the right one
>pixel, leaving the leftmost row trashed.
>
>Linus
>
>


Follow-Ups: References: