#17904 - Lupin - Tue Mar 16, 2004 11:03 pm
I just implemented an ArcTan2 function by using an algorithm i found on an webpage. I wonder if my implementation is really faster than the bios swi call...
Well, how can i count the cycles of my code and how can i find out how many cycles get occupied by the bios instruction? I want to compare my code with Nintendos code :P
For everyone who is interested, you can find the code here:
http://home.arcor.de/lupin003/arctan2.txt
I swapped the parameters because for speed... you could also save some speed by removing the "div by 0"-check but i am not sure what the gba will do on a div by 0. (removing this check would also save the last movs operation)
What do you think about it? Do you have any other fast math routines to share? :)
_________________
Team Pokeme
My blog and PM ASM tutorials
Well, how can i count the cycles of my code and how can i find out how many cycles get occupied by the bios instruction? I want to compare my code with Nintendos code :P
For everyone who is interested, you can find the code here:
http://home.arcor.de/lupin003/arctan2.txt
I swapped the parameters because for speed... you could also save some speed by removing the "div by 0"-check but i am not sure what the gba will do on a div by 0. (removing this check would also save the last movs operation)
What do you think about it? Do you have any other fast math routines to share? :)
_________________
Team Pokeme
My blog and PM ASM tutorials