Hi all,
After several years of work it is time for me to release the first "alpha" version of my C game library for MSX: MSXgl.
The goal of MSXgl (formerly known as CMSX) is to offer to C programmers, the whole set of functionalities to create games on MSX with high performances. Sure, a C program can never be as efficient as a program written entirely in assembler, but the goal is to try to get as close as possible.
Even if there are certainly many things still to optimize, the most expensive features are written in assembler and the library uses as much as possible the new features of SDCC 4.1.12 to pass parameters through the registers rather than through the stack. Also, the library is dynamically compiled to allow the user to configure the functionalities to optimize them for his needs.
The other goal was to create a library that could be totally independent of the BIOS. This is good for performance and makes it much easier to use the 16K of page 0. The library provides an interrupt handling code to easily create ROMs that always remain on page 0.
The MSXgl’s Build Tool allows to create a final program for a large number of formats in 1-click:
- Plain ROM from 8K to 64K (interrupt handler can be install in page 0),
- Mapped ROM from 64K to 4096K (ASCII-8, ASCII-16, Konami and Konami SCC mappers),
- MSX-DOS 1 or 2 binary program,
- BASIC binary program.
For now, the library supports the following devices: VDP (TMS9918 and V9938), PSG (AY-3-8910), Keyboard/Joystick, ROM mapper, slot manager, and Real Time Clock (RP-5C01).
Here are also the supported audio formats:
- PT3 (Vortex Tracker II)
- ayFX
- VGM (AY-3-8910 only)
- PCM-Encoder (aka. "Crystal clean PCM 8bit samples on the poor PSG")
The library is far from being “mature” yet, but it already allows to run my Final Smash tennis game and a lot of sample programs.
Among the things left to do:
- Support for Linux/MacOS environment (script/tools uses win64)
- Disk support (even for ROM)
- MSX2+ & Turbo R specific features support
- Support for other devices (especially sound processors)
A big thanks to the members of the MSX Ressource Center and MSX Village without whom this library would never have been possible.
The library is distribute under Creative Commons BY-SA license. Tools or sources from other authors could use other free license.
For those who would worry that one more C library only disperse the energy that could be put in one (like Fusion-C), be reassured. On the contrary, I am in regular contact with EricB, the one behind Fusion-C, and I present him all the new features I add to my library so that he can add them in Fusion-C.
If you're interested to alpha-test MSXgl – whether it's just to compiling and test sample programs or to create a new one – I'm available here (or on Discord) to guide you through your first steps.