Use a macro for sine waves.

So far they're identical, but amplitude could change.
This commit is contained in:
yenatch
2014-05-05 15:58:43 -04:00
parent 2a2b5d7f23
commit ddc88bed4b
2 changed files with 15 additions and 23 deletions

View File

@@ -191,3 +191,14 @@ ENDC
ENDM
sine_wave: MACRO
; \1: amplitude
x = 0
rept $20
; Round up.
dw (sin(x) + (sin(x) & $ff)) >> 8
x = x + \1 * $40000
endr
ENDM