F16 is a Fixedpoint library developed for primary use on the Dingoo A320. It features most needed instructions to convert from/to F16 values, basic arithmetics and comparison functions. A full instruction list can be found at github.
I wrote it to implement a raymarcher on the Dingo A320 which is a small handheld gaming device capable of running Linux.
This standard viewcoordinate calculation
float px = ((float)x/XRES - 0.5f) * 2.f; float py = ((float)y/YRES - 0.5f) * 2.f;
Would in F16 look like this:
F16 px = Div(i2f(x),i2f(XRES)); px = Sub(px,fl2f(0.5f)); px = Mul(px,fl2f(2.0f)); F16 py = Div(i2f(y),i2f(YRES)); py = Sub(py,fl2f(0.5f)); py = Mul(py,fl2f(2.0f));
Not the fanciest way but fast and withouth an FPU :)
Below you can see the Raymarcher implementation crosscompiled for a Dingoo-A320 which runs a ~330MHz MIPS processor without an FPU.