; This will run 100% in DSP internal P Memory! ; High precision stuff, full 3*3 filter! ; basin dimentions: be sure not to make them too big! ; This might overflow the DSP RAM! ; Fucking dsp mixer limits this size smaller than a goddamn stamp! WIDTH: = 144 HEIGHT: = 82 TOTALWIDTH: = WIDTH+2 TOTALHEIGHT: = HEIGHT+2 SCALAR: = 1 get: MACRO __getl: jclr #0,X:<<$FFE9,__getl movep X:<<$FFEB,\1 ENDM send: MACRO __sendl: jclr #1,X:<<$FFE9,__sendl movep \1,X:<<$FFEB ENDM ORG P:$0000 jmp
TOTALWIDTH*TOTALHEIGHT+1,n7 move #>xbuf-(TOTALWIDTH+1),r0 clr a #>ybuf-(TOTALWIDTH+1),r4 do n7,<_end_loop _loop: move a,x:(r0)+ a,y:(r4)+ _end_loop: rts send_ybuffer: move #<2,n0 move #>ybuf+1,r0 move #>SCALAR,x1 move y:(r0)+,x0 do #xbuf+1,r0 move #>SCALAR,x1 move x:(r0)+,x0 do #ybuf-TOTALWIDTH,r0 ;top move #>ybuf-1,r1 ;left move #>ybuf+1,r2 ;right move #>ybuf+TOTALWIDTH,r3 ;bottom move #>xbuf,r4 ;current move #>ybuf-TOTALWIDTH-1,r5 ;left top move #>ybuf+TOTALWIDTH-1,r6 ;left bottom move #<2,n2 move #<2,n3 move #<2,n4 move #<2,n5 move #<2,n6 move #<$7C,y1 move #<$20,x1 do #xbuf-TOTALWIDTH,r0 ;top move #>xbuf-1,r1 ;left move #>xbuf+1,r2 ;right move #>xbuf+TOTALWIDTH,r3 ;bottom move #>ybuf,r4 ;current move #>xbuf-TOTALWIDTH-1,r5 ;left top move #>xbuf+TOTALWIDTH-1,r6 ;left bottom move #<2,n2 move #<2,n3 move #<2,n4 move #<2,n5 move #<2,n6 move #<$7C,y1 move #<$20,x1 do #