bubble: bring in the second call to sine
was already doing it via .include but was weird I had done the first but not the second
This commit is contained in:
parent
de0c366e75
commit
46c79e587e
|
@ -249,7 +249,51 @@ rl_smc:
|
|||
sta STEMP1L ; 3
|
||||
lda RXH ; 3
|
||||
|
||||
.include "sin_unrolled.s"
|
||||
;=======================
|
||||
|
||||
; / 6.28 is roughly the same as *0.16
|
||||
; = .5 .25 .125 .0625 .03125
|
||||
; 1/6.28 = 0.16 = 0 0 1 0 1 0 0 0 = 0x28
|
||||
|
||||
; i=(i*0x28)>>8;
|
||||
|
||||
; A has STEMP1H
|
||||
|
||||
; i2=i<<3;
|
||||
|
||||
|
||||
asl STEMP1L ; 5
|
||||
rol ; 2
|
||||
asl STEMP1L ; 5
|
||||
rol ; 2
|
||||
asl STEMP1L ; 5
|
||||
rol ; 2
|
||||
|
||||
; i1=i<<5;
|
||||
|
||||
ldx STEMP1L ; 3
|
||||
stx STEMP2L ; 3
|
||||
|
||||
sta STEMP1H ; 3
|
||||
|
||||
asl STEMP2L ; 5
|
||||
rol ; 2
|
||||
asl STEMP2L ; 5
|
||||
rol ; 2
|
||||
|
||||
; i=(i1+i2)>>8;
|
||||
|
||||
; We ignore the low byte as we don't need it
|
||||
; possibly inaccurate as we don't clear carry?
|
||||
|
||||
adc STEMP1H ; 2
|
||||
tax ; 2
|
||||
|
||||
; sl=fsinh[i];
|
||||
|
||||
; tradeoff size for speed by having lookup
|
||||
; table for sign bits
|
||||
; the sign lookup only saves like 2 cycles
|
||||
|
||||
;=====================
|
||||
; U+=sin(RX)
|
||||
|
|
Loading…
Reference in New Issue