#63232 - Ultima2876 - Sat Dec 10, 2005 10:02 am
Hey all.
When I do a fixed point calculation, such as:
score / 100000, = score * 0.00001, ~= (score * 168) >> 24.
That's fine, but what if score is a value that goes up to 999999? That calculation would need way more than 32 bits... would the GBA have to go into some slow software 64-bit mode, or would it simply lop off the upper bits (bad)? Or even some other magic solution that happens to solve my problem? I can't use 16 bit fixed point because, apart from having the same problem (to a lesser extent), it's not accurate enough.
This is more out of curiousity as to how the internals work more than anything, but info and/or ideas are appreciated nonetheless.
Thanks =P
When I do a fixed point calculation, such as:
score / 100000, = score * 0.00001, ~= (score * 168) >> 24.
That's fine, but what if score is a value that goes up to 999999? That calculation would need way more than 32 bits... would the GBA have to go into some slow software 64-bit mode, or would it simply lop off the upper bits (bad)? Or even some other magic solution that happens to solve my problem? I can't use 16 bit fixed point because, apart from having the same problem (to a lesser extent), it's not accurate enough.
This is more out of curiousity as to how the internals work more than anything, but info and/or ideas are appreciated nonetheless.
Thanks =P