diff --git a/src/basic/math_trans/poly_sin.s b/src/basic/math_trans/e2ef.poly_sin.s similarity index 59% rename from src/basic/math_trans/poly_sin.s rename to src/basic/math_trans/e2ef.poly_sin.s index 4b4f466f..4f034b1d 100644 --- a/src/basic/math_trans/poly_sin.s +++ b/src/basic/math_trans/e2ef.poly_sin.s @@ -3,7 +3,13 @@ ;; #LAYOUT# * BASIC_0 #TAKE ;; #LAYOUT# * * #IGNORE +; This file is under the MIT license, it contains code released by Microsoft Corporation. +; See LICENSE for more information. + ; Polynomial for the sine function +; +; This is 2 coefficients shorter than SINCON in the Microsoft implementation. +; See https://www.c64-wiki.com/wiki/SIN !ifdef CONFIG_TRANSCENDENTAL_FUNCTIONS { @@ -18,12 +24,6 @@ poly_sin: +PUT_CONST_POLY_SIN_3 +PUT_CONST_POLY_SIN_4 +PUT_CONST_POLY_SIN_5 - +PUT_CONST_POLY_SIN_6 - - -; Constant 0.75 needed for sine calculation -sin_three_quarters: - !byte $80, $40, $00, $00, $00 - + +PUT_CONST_POLY_SIN_6 } diff --git a/tools/similarity.c b/tools/similarity.c index b32a2c70..4f24c5eb 100644 --- a/tools/similarity.c +++ b/tools/similarity.c @@ -33,7 +33,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = { 0xBDDD, 0xBF51, 0xBFB4, 0xBFEC, 0xE264, 0xE26A, - 0xE30E, 0xE37A, + 0xE2EF, 0xE37A, };