|
|||||||||
NEW Powerful Development Tools to Push Sega Saturn’s Limits…A new development library by Danny , SaturnMath++ has just been released. SaturnMath++ is a C++23 library dedicated to Sega Saturn hardware, offering essential mathematical operations tailored for fixed-point arithmetic and geometric calculations. ![]() Why is this important, though? Well, the Sega Saturn has always been an interesting piece of hardware, with an arguably complex architecture that is, at the same time, simply brimming with potential… It’s a fascinating collection CPUs, VDPs, DSPs & microcontrollers that always allowed for more than one way of doing things, and this relative freedom is what really set it apart from PlayStation and made it a real ‘programmer’s machine’ . Unlike N64, both Saturn & PlayStation did NOT have a Z-Buffer (depth buffer), which means that in order to draw 3D environments that were perspective-correct, they relied heavily on fixed-point arithmetic and lookup tables in order to basically approximate your character’s position in 3-dimensional space. The required maths had to be crunched by the system’s CPU and were pretty power hungry. Often times, this limitation would result in warped surfaces near the camera (aka affine texture warping) . Some games suffered from this more than others, and depending on how good the math was , certain developers were able to mitigate this flaw almost entirely. (Saturn’s use of quads for geometry also helps with this). Below is an example of Lobotomy Software’s Quake (upscaled to 4K) . No warping here… When it comes to homebrew game development, though, most folks have had to rely on SGL for math calculations, which is basically the same thing developers used (and struggled with) back in the day… SegaXtreme member Danny has decided to do something about that with the release of his new math library! SaturnMath++ is a high-performance mathematical library specifically engineered for Sega Saturn game development. It provides a comprehensive suite of fixed-point arithmetic operations, vector/matrix transformations, and geometric calculations optimized for the Saturn’s SH-2 processors. Developed with the Saturn’s unique hardware architecture in mind, SaturnMath++ addresses the platform’s key constraints while maximizing performance:
Danny claims to have spent months just on the alternate trigonometric functions and square root functions, and SegaXtreme members SLACK and Hassmaschine helped test the the square root functions with good results. The trigonometric functions still need to be tested on real hardware, but they appear to be a bit faster via emulation, and significantly more accurate, with higher resolution. Danny has written a special algorithm for interpolation that avoids gaps the way standard lookup tables do and does not require costly divisions [speaking in terms of CPU cycles]. Whether you’re developing a 3D racing game, a 2D sprite-based platformer, or a complex simulation, SaturnMath++ provides the mathematical foundation you need without sacrificing precious CPU cycles. SaturnMath++ will be used natively within SuperReye’s SRL (SaturnRingLibrary) , an easy to use SGL (SegaGraphicsLibrary) wrapper written in C++ that is currently in development. ![]()
|
|||||||||