Hi.
I'm currently trying to compile the saturn C code of a game (floupix) that I wrote for the Saturn many years ago, this time for more up-to-date architectures.
I want to reuse the code rather than rewrite it for the fine-tweaked physics of the game to be exactly the same as the original.
Most of the code use the SGL (Saturn Graphic Library), for everything, making it very easy to just replace almost all SGL missing parts (mainly display text at a given position and display sprites at given position, scale and rotation, and wait for the screen sync)
Now my problem is that all the SGL API uses a decimal number representation called FIXED.
FIXED is a signed 32 bits fixed point representation (1-8 in SGL developer's manual). The SGL provide math functions like slMulFX, slDivFX, slSquartFX etc. to handle this fixed point format.
So I need to replace theses functions by their exact equivalent for the physics to fully match the original.
My question, for those who read up to this point and would be expert in this precise field : how are the FIXED math operations implemented in SGL, or maybe, on the Saturn hardware ?
Thanks.
I'm currently trying to compile the saturn C code of a game (floupix) that I wrote for the Saturn many years ago, this time for more up-to-date architectures.
I want to reuse the code rather than rewrite it for the fine-tweaked physics of the game to be exactly the same as the original.
Most of the code use the SGL (Saturn Graphic Library), for everything, making it very easy to just replace almost all SGL missing parts (mainly display text at a given position and display sprites at given position, scale and rotation, and wait for the screen sync)
Now my problem is that all the SGL API uses a decimal number representation called FIXED.
FIXED is a signed 32 bits fixed point representation (1-8 in SGL developer's manual). The SGL provide math functions like slMulFX, slDivFX, slSquartFX etc. to handle this fixed point format.
So I need to replace theses functions by their exact equivalent for the physics to fully match the original.
My question, for those who read up to this point and would be expert in this precise field : how are the FIXED math operations implemented in SGL, or maybe, on the Saturn hardware ?
Thanks.