Re: A86: Re: sprites


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

Re: A86: Re: sprites




I figured it out ... the a reg was being destroyed.
Feel free to use this routine, it's about 40% faster than the copy sprite
algorithm in Trent's tutorial, and about 3 times faster than what bioserrors just
posted  :-)

;Input = sprite size in bc, video mem location in hl, sprite location in de

 ld bc,8                   ;sprite size
the_loop:
 ldi
 ret po                       ;return when bc is 0
 ld a,e
 add a,15
 ld e,a                       ;add increment to e
 jr nc,the_loop
 inc d
 jr the_loop


Follow-Ups: References: