; Y = rotation index
; Temp+16 = pointer to the raw sprite info with an
; 8 byte cache index table
bne !We_are_Not_First ; STA above does not change flags
stx FirstCache ; X still holds Cache_Next-1
tax ; NOW get prev
lda #0 ; Only need to clear here
sta Cache_Prev-1,y ; *BUG HERE* -1 added.
And there you go! Beleive it or not, this tiny bit of code is the whole reason XeO3 got started!! I wrote the whole sprite routine to try THIS big of code out! Stupid really... but there ya go!
Many thanks guys!