Version 1.16.4 of ugBASIC and UGBASIC-IDE has been released, bringing numerous fixes and optimizations for all target platforms. The update includes preliminary support for the DOJO protocol and TSB Project.
This release emphasizes significant code optimization in terms of both space and speed. For processors like the MOS 6502/6510/8502 and Zilog Z80, the updated peephole optimizers generate more efficient code, and unused variables are now removed, reducing the footprint of embedded code. Systems with memory banks, such as the Commodore 64 REU (c64reu), Thomson MO6 (pc128op), Thomson TO8 (to8), and TRS-80 Color Computer 3 (coco3), benefit from automatic memory bank loading, even when resources aren’t marked as BANKED, freeing up significant space. Additionally, memory for parsing has been increased by 10, and dynamic strings are now more space-efficient through string transpilation.
With this release, ugBASIC has joined the “TSB Project,” a GitHub initiative aimed at porting commands and syntax from Simons’ BASIC and TUNED Simons’ BASIC into ugBASIC. New commands implemented include: PLACE, CMOB, MOB ON/OFF, LOOP…EXIT IF…END LOOP, CHECK, ROT, DRAW, CSET, CGOTO, HIRES, MULTI, MOD (as a command), COLOR, WAVE, PAUSE, ENVELOPE, DUP, INST, FILL, CIRCLE, INSERT, DRAW TO, JOY (using the TSB convention), %%, $$, CENTER AT, ON KEY, CHAR, PROC, NRM, AT (string swap), KEYGET, PAINT, DO NULL, D.POKE, D.PEEK, REC, and BLOCK. The goal is to ensure compatibility while providing advanced features, enabling users to recompile Simons’ BASIC projects through the OPTION DIALECT pragma.
This release also introduces DOJO protocol support, allowing ugBASIC to communicate with an external server (DOJO) for creating virtual “game rooms” online.
The pragma command behavior has been extended, allowing for greater customization of language features. For example, the Amstrad CPC (cpc) can now preserve the palette using the PALETTE PRESERVE pragma, and keyboard/joystick management can be handled directly under interrupt to ensure consistent input readings. Each target now has a specific keyboard driver with support for keyboard queuing.
The ZX Spectrum (zx) compiler has been updated to support directional input using the WASD standard, and random number generation has been improved for compatibility with other BASICs when using parameters 0 or 1 (RND(0), RND(1)). Additionally, floating-point number generation between 0.0 and 1.0 is now available “out of the box.” Disk image generation for the TRS-80 Color Computer 1/2/3 (coco, coco3) and the Commodore 64 with REU memory expansion (c64reu) has been enhanced. The DATA instruction now supports binary strings.
Finally, this version introduces “retro-compatible hacks” to ensure that games written with previous versions remain functional, even with minor specification changes.