Move sprite to X,Y (as LINE) in assembly

Página 4/4
1 | 2 | 3 |

Por flyguille

Prophet (3028)

Imagen del flyguille

26-09-2013, 23:44

if you want to use anyway COS / SIN in assembler do this

you don't needs the ACTUAL COS / SIN code

use BASIC to generate cos/sin values, output the value table to a file, then include all values to your asm code as data

if you want to handle those values as pure integer in the assembler, multiply the result by 512 (for a precision compatible with 360 degrees). Or you can go for a full 16bits precision, ranging it from -32768 to 32767, so as it is full 16bits, you can multiply it by any other 16bits value and get the high word as the integer result, and the lower word as the fraction result. Remember that 16 bit x 16bit = 32bits result.

Por DanySoft

Champion (452)

Imagen del DanySoft

27-09-2013, 20:05

Yes, I understood everything.
Now we can calculate cos / sin in BASIC and convert. 16bit DB for correct functionality.
And we can use SJASM or ASMSX Smile


Página 4/4
1 | 2 | 3 |