BBC BASIC for SDL 2.0 version 1.11a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
RichardRussell

BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

I've released version 1.11a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS. The changes in this version are as follows:

  1. BASIC Interpreter / Run Time Engine

    Enabled render batching (in SDL 2.0.10 and later) which should improve graphics performance.

    Rationalised the VDU variables, e.g. ?444 and @vdu%!248 no longer have their previous functions.

    Added @vdu.w{a&,b&,c&,d&}, @size{x%,y%} and @char{x%,y%} to mirror some system variables.

    32-bit x86 editions now support the 64-bit indirection operator (]) as 64-bit and ARM editions always have.

    VDU 27,n (output symbol for character codes 0-31 and 127) now works in VDU 5 as well as VDU 4 mode.

    Changed the default MODE 7 font to be more similar to RISC OS and Matrix Brandy.

    Fixed a bug causing BBCSDL not to run properly if the installation path contained a 'dot' character.

  2. IDEs and Utilities

    Updated BBCEdit to version 0.32.4, which fixes a minor bug in the last release.

    Enhanced SDLIDE so that the Tab key inserts eight spaces in the editor.

    Fixed a bug in the Compiler utility which could cause crunching to fail with code containing both 32-bit and 64-bit versions of a structure (e.g. box2dlib.bbc is in this category).

    Fixed a bug in the Search BASIC Programs utility which could cause it to freeze in rare circumstances.

  3. Libraries

    The ogllib and gleslib 3D graphics libraries have been modified to improve support for point-source, spot- and directional lights (compatible, as far as I can reasonably achieve, with BB4W).

    The ellipse library has been updated to be compatible with 'render batching'.

    The dlglib library has minor improvements to the textbox and listbox.

    Svein has updated his treeview library to version 3.08, which has improved performance.

  4. Example Programs

    Added spotlight.bbc in examples/graphics to demonstrate the different light types available in OpenGL.

    Added pintograph.bbc in examples/physics, a Box2D simulation of a drawing machine originally by Svein Svensson. This program is compatible with BB4W if the Box2D libraries are installed.

    Added trebuchet.bbc in examples/physics, a Box2D simulation of a trebuchet by David Marples. This program is compatible with BB4W if the Box2D libraries are installed.

    Modified getri.bbc to report whether render batching is enabled.

    Updated tower.bbc to ensure compatibility with render batching.
This new version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspbian, iOS and 64-bit Linux editions, currently).

Please remember that if you use the BBC2APK Android Application Generator you should download a new APK template to ensure that any updates to the run-time engine are incorporated in your own apps.
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

Richard Russell wrote: Fri 27 Mar 2020, 21:58Changed the default MODE 7 font to be more similar to RISC OS and Matrix Brandy.
This is the font I am now using for MODE7. It's loosely based on the Bedstead-ext font but, since that is a 12x20 bitmap stretched (with anti-aliasing) to 16x20, 'smooth' diagonals run at a different angle; this particularly affects characters like / and K. I also think I've done a better job with some of the accented characters and ligatures than Bedstead does (admittedly theirs are limited by the underlying 12x20 matrix). Of course not all these characters are available in MODE 7, which uses only 7-bit addressing, but they are if the font is used in another mode via VDU 23,22...:

mode7font.png
Characters 0-31, not shown, are two-letter symbols for the Videotex/Teletext control codes (e.g. AR for Alpha Red).
You do not have the required permissions to view the files attached to this post.
DDRM

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by DDRM »

Excellent - thanks, Richard - and well done on getting the forum back up and running!

Best wishes,

D
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

RichardRussell wrote: Sat 28 Mar 2020, 10:54Of course not all these characters are available in MODE 7, which uses only 7-bit addressing, but they are if the font is used in another mode via VDU 23,22...:
Here are some more details. In BBCSDL the built-in MODEs (except 7) always select the original 8x8 bitmap font for compatibility with the BBC Micro (etc.), ARM BASIC running on RISC OS, and Matrix Brandy. So for example MODE 6 (which has the same number of characters per row, and the same number of rows, as MODE 7) uses the 8x8 font. However if you select a 'custom' mode using VDU 23,22.... then the much better quality 'teletext' font will be selected if the character width is at least 16 pixels and the character height at least 20 lines, e.g.:

Code: Select all

      VDU 23,22,640;500;16,20,16,0
This selects a mode with 40 characters per row and 25 rows like MODE 6 but using the 16x20 'teletext' font, in which case all the characters in the above graphic are available at their conventional ANSI codes (characters 0-31 and 127 must be obtained using VDU 27,n). If for some reason you want to force the use of the 8x8 font you can do that by setting the 'OEM' bit (the LSB of the final parameter):

Code: Select all

      VDU 23,22,640;500;16,20,16,1
which will select a mode identical to MODE 6.
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

RichardRussell wrote: Sat 28 Mar 2020, 09:51 I've released version 1.11a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS.
For anybody who may be struggling to install it on MacOS 10.15 'Catalina', and being faced with apparently insuperable security warnings, the required incantation can be found at the bottom of this page.
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

For the record I've found a couple of obscure bugs in programs supplied with BBCSDL v1.11a (and earlier):
  • The box2dgfx library misbehaves if the y-origin (set by ORIGIN or VDU 29) is non-zero and PROC_gfxMatrix() is called.

  • The SkyBaby example program incorrectly adjusts for Daylight Saving Time on (e.g.) Android but works correctly on Windows! This very surprising result arises because the mktime() C run-time library function behaves differently on different platforms. :shock:
I'll fix them in the next release, but since that is not due for a couple of weeks it's as well to be aware.
RichardRussell

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by RichardRussell »

Message deleted as off-topic. Please try to keep your posts relevant to BBC BASIC.