The fxSDK is a development kit for CASIO calculators of the fx-9860G and fx-CG series. It is based on gint, a unikernel that provides a free-standing runtime for add-ins with new APIs, custom drivers and advanced performance tricks. This has been my main project since about 2015 so I'm excited to introduce it!
The SDK works on Linux, Mac OS with some tweaks, and WSL on Windows. It is based on the latest gcc for SH3/SH4, using a custom (slightly incomplete) C99 libc with a ported math library, and the latest libstdc++ supporting C++20. The canonical build system for libs and add-ins is CMake, with a normal-enough setup that dual-targeting calculators and PCs is reasonably easy. All of this is tied with a package-manager-like tool for automating installs.
The unikernel, gint, provides the runtime for add-ins (like libfxcg). It has its own drivers which it runs by taking control of the hardware from the OS, which means it gives add-ins full access to the display, timers, DMA, DSP, and interrupts in general. Add-ins can still programmatically switch between gint and the normal OS runtime, commonly to invoke the main menu or to access the file system, for which there is a Unix/libc interface (open/fopen/opendir).
gint's focal point (and the most exciting part for me) is performance. It comes with a profiling library that can measure instruction sequences down to the cycle, very efficient image rendering, and it uses many assembler optimization techniques that I believe I am the first to use. I've had some impressive results, such as games running at 100 FPS full-screen on simple frames on the fx-CG 50 with no overclock (* when using a pretty crazy rendering pipeline).
Some random highlights of using gint include a streamlined system for converting images, fonts and other assets at compile-time; a USB driver that allows you to take screenshots and video capture of add-ins in real-time (with some slowdown); and access to a ton more memory, both through extra heap arenas in gint's memory allocator and through custom linker sections for on-chip memory.
The main downsides of using it stem from lost interactions with the OS, so it works best for applications that don't try to integrate with the OS' UI or look-and-feel, like games. You also have to carry the library and kernel code in add-ins, making G3A files larger (usually by 50-100 kiB).
-
The fxSDK has long been the system of choice for writing add-ins on Planète Casio. Initially I was hesitant to advertise it here because I didn't want to "compete" with the PrizmSDK, but seeing as there is little activity I'm hoping I can help and inspire some of you to pick up your fx-CG again.
Since I've been at it actively for 7 years I have a ton of cool stories and ideas I want to share, but that would never fit on a single post. I'll stop here for now, let me know if you want to learn more about any of the things I briefly touched upon!
If you want to try out the SDK, start at the fxSDK repository's README which will walk through the install process through all of the relevant repositories.
The SDK works on Linux, Mac OS with some tweaks, and WSL on Windows. It is based on the latest gcc for SH3/SH4, using a custom (slightly incomplete) C99 libc with a ported math library, and the latest libstdc++ supporting C++20. The canonical build system for libs and add-ins is CMake, with a normal-enough setup that dual-targeting calculators and PCs is reasonably easy. All of this is tied with a package-manager-like tool for automating installs.
The unikernel, gint, provides the runtime for add-ins (like libfxcg). It has its own drivers which it runs by taking control of the hardware from the OS, which means it gives add-ins full access to the display, timers, DMA, DSP, and interrupts in general. Add-ins can still programmatically switch between gint and the normal OS runtime, commonly to invoke the main menu or to access the file system, for which there is a Unix/libc interface (open/fopen/opendir).
gint's focal point (and the most exciting part for me) is performance. It comes with a profiling library that can measure instruction sequences down to the cycle, very efficient image rendering, and it uses many assembler optimization techniques that I believe I am the first to use. I've had some impressive results, such as games running at 100 FPS full-screen on simple frames on the fx-CG 50 with no overclock (* when using a pretty crazy rendering pipeline).
Some random highlights of using gint include a streamlined system for converting images, fonts and other assets at compile-time; a USB driver that allows you to take screenshots and video capture of add-ins in real-time (with some slowdown); and access to a ton more memory, both through extra heap arenas in gint's memory allocator and through custom linker sections for on-chip memory.
The main downsides of using it stem from lost interactions with the OS, so it works best for applications that don't try to integrate with the OS' UI or look-and-feel, like games. You also have to carry the library and kernel code in add-ins, making G3A files larger (usually by 50-100 kiB).
-
The fxSDK has long been the system of choice for writing add-ins on Planète Casio. Initially I was hesitant to advertise it here because I didn't want to "compete" with the PrizmSDK, but seeing as there is little activity I'm hoping I can help and inspire some of you to pick up your fx-CG again.
Since I've been at it actively for 7 years I have a ton of cool stories and ideas I want to share, but that would never fit on a single post. I'll stop here for now, let me know if you want to learn more about any of the things I briefly touched upon!
If you want to try out the SDK, start at the fxSDK repository's README which will walk through the install process through all of the relevant repositories.