wryhode 2025-02-19 21:03 (Edited)
I've seen multiple references to free or unlimited floating point operations being possible on the platform. (Meaning no cycles used) So... how, exactly? Is it as simple as declaring a variable to be 0.0
, then doing maths with it? Or does it need more advanced setup / constraints?
Timo 2025-02-19 21:15
They are not free, but they cost the same number of (virtual) CPU cycles as integers. Actually there are no integers, everything is float. But what people mean is, that there is no EXTRA cost for floats.
Real classic CPUs would spend many CPU cycles for a single float operation.
Timo 2025-02-19 21:19
LowRes NX has the same CPU cycle limit as the original Game Boy. But the counting of it is very simplified, so Nx can usually do more in the same time.
wryhode 2025-02-20 11:43
I see, thanks for the clarification :)
nathanielbabiak 2025-02-22 02:04
There's two more things to note:
#1. It's not just floating-point operations that are fast on this fantasy console, but also transcendental functions (e.g., SIN, EXP, LOG, ^, SQR, etc.).
#2. If you get into algorithms, and coding them up on this platform, you'll find that many algorithms focus on avoiding floating point, or avoiding transcendental functions entirely, but here it can be avoided.
That second one is the biggest reason I like this fantasy console so much - it's got an interesting graphics architecture, but you don't need to count clock cycles to do a lot of stuff.