BBC BASIC for SDL 2.0 v0.25a released

Hated Moron

I have today released version 0.25a of 'BBC BASIC for SDL 2.0', the cross platform interpreter for Windows, Linux, MacOS, Raspberry Pi, Android and iOS.  The changes in this version are as follows:

  1. Integrated Development Environment (SDLIDE)

    The 'Create Application' facility has now been enabled (desktop editions only), allowing you to create a 'standalone' application that can be distributed.  I should emphasise that this does not create a 'single-file executable' in the way that BB4W does; that has no meaning in a cross-platform context.  Instead it creates an 'application bundle' (a ZIP file in the case of Windows, Linux and Raspberry Pi; a DMG file in the case of MacOS).  Note that in the case of Linux and the Raspberry Pi, SDL2 must still be installed separately (if it has not already been).

    By default the BASIC program is 'crunched', reducing its size and increasing execution speed.  This also has the useful side-effect of obfuscating the program, making 'reverse engineering' much more difficult (this is more effective than the equivalent BB4W facility).

  2. BASIC Interpreter

    The operation of the VDU 14 'paged mode' has been improved.  Previously output would pause *after* the screen had scrolled, causing the first line to be lost.  Now it pauses *before* the screen scrolls, as it should, so that the first 'page' can be read in its entirety before output is resumed by pressing the Shift key.

  3. Libraries

    The '' (dialogue box emulation) library now supports the BS_ICON style bit, which allows an icon image (typically with a transparent background) to be displayed on a button

    The '' (3D graphics) library has been modified to allow iOS to load a texture which does not have power-of-two dimensions (so-called NPOT).  Previously iOS was the only platform not to support such textures, and this modification brings it into line with the others.

    The '' (non-blocking function replacements) library has been enhanced so that the FNinput function better supports UTF-8 keyboard input (e.g. the £ sign).

  4. Example Programs

    A new example program '' (in the graphics directory) demonstrates how 'palette animation' may be emulated, in this case to animate the title page from one of David Williams's games.

    The '' program has been modified so as not to scale the texture image to have power-of-two dimensions, since this is no longer necessary.

  5. Installation

    Installation on Linux and the Raspberry Pi has been simplified by the inclusion of a shell script '' which should automatically create a desktop shortcut that will launch BBC BASIC.
This new version may be downloaded, for all the supported platforms, from the usual place.  If you use the bbc2apk Android Application Generator it is important that you download a new 'template' to update it to the new version.  The released source code (used to build the Raspberry Pi and iOS editions, currently) has been updated to this latest version, and can be found in the same place as previously announced.

Hated Moron

For those who may be interested, the cruncher used by the new SDLIDE Create application facility converts most variables, arrays, structures, procedure and function calls to 'fast tokens' (equivalent to specifying them in REM!Fast directives in BB4W) which significantly speeds up access to these objects and leads to more effective code obfuscation than simply abbreviating them. Indeed neither the BB4W nor SDLIDE editors will even load a program crunched this way (although BBCEdit will).

Any REM!Fast directives, for example present for compatibility with BB4W, will therefore be ignored (although they will do no harm); REM!Keep directives may of course be used to force retention of a variable's (etc.) original name, in case it is accessed using EVAL or for some other reason must not be crunched. An additional compiler directive REM!Appname allows the 'App name' field in the Create Application dialogue to be initialised.

Note that, unlike in BB4W and BBC2APK, an existing 'executable' created from a previous compile does not initialise the build settings (crunch options, embedded files list etc.); the only way to preset these settings is by putting compiler directives in your program. Although the loss of this feature may be considered a pity, the complication of reading the contents of a previously generated ZIP or DMG file was too great.