- Introducing FX-CG[UI] and FX-CG[CL]
- 05 Aug 2012 11:15:38 pm
- Last edited by Tari on 16 Dec 2012 06:26:12 am; edited 1 time in total
FX-CG[UI] and FX-CG[CL] are two pieces of code designed to work together to make developing Prizm addins easier. To this point anything beyond simple unit tests has had to run on the calculator, making testing hard. This project aims to make testing/debugging easier and more accurate.
FX-CG[CL] is a library that you can link against your addin, and with a few compiler options, run the unmodified addin code on your PC. This makes debugging easy, since you can quickly iterate and you get the benefit of all the usual debuggers, profilers, etc.
I've only implemented a few functions at this point, but anything that libfxcg provides is fair game. Some of our "useful routines" poke directly at the hardware, so I'd like to put implementation of those in libfxcg so they can be emulated too.
FX-CG[UI] is the interface to FX-CG[CL], but separate because that allows the addin support library code to be simpler, and it means that future projects in the same vein (such as a true Prizm emulator) can use the same UI. It's implemented in Python on top of Qt, so it can run on just about any platform you could want.
The image at the top of the post is what this UI looks like right now, but I will be adding a clickable keyboard (and probably keyboard bindings for same) that communicates back to FX-CG[CL] for keypress handling.
A few more demo shots:
Testing the screen image transfer protocol. The [CL] implementation of Bdisp_PutDisp_DD does a fast color format conversion and sends the screen image in a simple packet to [UI].
You can save screenshots, and I hope to support animated screenshots as well.
If anybody's wondering how fast this decoupled approach is, the answer is "very". I was getting some absurd framerate out of it with early versions, and CPU usage for both processes is negligible when capped to 20 FPS.
Code
The code for both components is on Bitbucket for your hacking/feature-addition/just-using-it gratification:
https://bitbucket.org/tari/fx-cg-cl
https://bitbucket.org/tari/fx-cg-ui