; bilinear rotozoom (palette based) ; ; we have to keep the texture in dsp ram for speed ; this causes a problem, namely saving ram (for soundmixer) ; we can choose: ; ; a) 64*64 texture ; b) 128*128 texture, banked x:even,y:odd ; c) 128*128 texture, interleaved (2 texels in 1 word) ; ; a) might look crappy, but is simple and fast ; b) looks good, but is somewhat slower <- ; c) looks good (as b), but is slowest ; ; i chose to dump the concept of wrapping.. tough luck, but faster. ; seems to work now.. reasonable speed. ; one problem: you need to pack the pixels into words to kill as much ; cpu handshakes as possible.. this might require some minor unrolling.. ; ; update: fixed all the shit.. i think it's still slow due to banking.. ; ; update: sending two pixels in one transfers speeds it up. ; ; update: speeded up lots, cos we keep vars in internal x/y mem. DOUBLE: = 1 ; send two pixels per transfer? get: MACRO jclr #0,X:<<$FFE9,* movep X:<<$FFEB,\1 ENDM send: MACRO jclr #1,X:<<$FFE9,* movep \1,X:<<$FFEB ENDM org p:0 jmp texture,r0 do x0,_loop get x:(r0) get y:(r0)+ _loop: rts org x:0 texturemask: dc 128 ; texturewidth uv_table: uv_xstep: ds 1 ; u_xstep uv_ystep: ds 1 ; u_ystep uv_start: ds 1 ; u_start uv_x: ds 1 ; u_x uv_y: ds 1 ; u_y prv_pixel: ds 1 scalar: dc 128/2 ; scalar for (u,v) fractions ds 1 texture: ds 128*128/2 org y:0 dc $003F80 ; texture v_mask ds 1 ; v_xstep ds 1 ; v_ystep ds 1 ; v_start ds 1 ; v_x ds 1 ; v_y texturesize: dc 128*128 dc $000080 ; <<8 scalar for pixel multiplex ds 1 ds 128*128/2 ; texture