This new update includes a compiler that can compile SuperBASIC programs directly to x86 code for much faster execution.
This project has been developed over many years, starting with a SuperBASIC grammar, then a hand-coded parser, a temporary interpreter to test the QDOS integration, and more recently the logic to perform type inference for variables and use a standard compiler backend library to generate the x86 code.
Since the compiled BASIC program still runs in the emulator, it has access to the rest of QDOS and the QL hardware. It can also invoke loaded extension keywords and toolkits, although they run slower under normal emulation. Math functions (SIN, INT, etc.) and some other functions and procedures (DATE, BLOCK, etc.) are implemented natively to avoid emulation.
Floating point numbers use x86 double precision and the compiler automatically detects what variables can use faster integer math depending on their usage.
The compiler accepts the Sinclair SuperBASIC syntax, plus some Minerva and SMSQ/E extensions like integer for loop variables and hex constants. There are also a few limitations, for example computed GOTOs are not accepted.
The picture above is a screenshot from a demo animation that is available on the software page of my web site and allows to "fly" in a cityscape rendered in real-time by a SuperBASIC program. There is also a video illustrating the huge speed ups that the animation gained from running on the original QL to PC emulation and from there to PC compilation:
Q-emuLator version 4.3 also adds support for placing microdrive images in .qlpak packages. The GST 68K-OS qlpak on my web site has been updated to also include a microdrive read-only image (in GST format) of the system utilities cartridge.
Finally, a new FPS command is available in the debugger to display the frame rate of a QL game or animation.
