BBC BASIC for SDL 2.0 v0.25a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
Post Reply
guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

BBC BASIC for SDL 2.0 v0.25a released

Post by guest » Sat 20 Oct 2018, 22:35

(Cross-posted from the Discussion Group)

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:
  • 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.
  • 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.
  • Libraries

    The 'dlglib.bbc' (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 'gleslib.bbc' (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 'nowait.bbc' (non-blocking function replacements) library has been enhanced so that the FNinput function better supports UTF-8 keyboard input (e.g. the £ sign).
  • Example Programs

    A new example program 'colorcycle.bbc' (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 'pyramid.bbc' program has been modified so as not to scale the texture image to have power-of-two dimensions, since this is no longer necessary.
  • Installation

    Installation on Linux and the Raspberry Pi has been simplified by the inclusion of a shell script 'mkicon.sh' 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.

David Williams
Posts: 86
Joined: Wed 04 Jul 2018, 16:23

Re: BBC BASIC for SDL 2.0 v0.25a released

Post by David Williams » Sun 21 Oct 2018, 15:11

The enabling of the 'Create Application' facility makes this an especially interesting update for me, so thanks for that.


David.
--

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: BBC BASIC for SDL 2.0 v0.25a released

Post by guest » Sun 21 Oct 2018, 16:33

David Williams wrote:
Sun 21 Oct 2018, 15:11
The enabling of the 'Create Application' facility makes this an especially interesting update for me, so thanks for that.
To be fair it only automates what you've always been able to do manually - it's just a packaging exercise - but it makes it easier and quicker.

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: BBC BASIC for SDL 2.0 v0.25a released

Post by guest » Wed 24 Oct 2018, 22:21

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.

Post Reply