BBC BASIC for SDL 2.0 version 1.11a released

for discussion of bbc basic for windows/sdl, brandy and more
Post Reply
Deleted User 9295

BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

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.
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

Richard Russell wrote: Fri Mar 27, 2020 9:58 pmChanged 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).
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

Richard Russell wrote: Fri Mar 27, 2020 9:58 pm 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.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by lurkio »

I'm on macOS Mojave, and I've somehow got BBCSDL into a state where the IDE that comes up by default every time I launch BBCSDL is SDLIDE, which is fine.

But, out of curiosity, and to help out a forum member I'm in contact with who's using BBCSDL on Windows and has accidentally got stuck on BBCEdit and wants to revert to SDLIDE, how do you change the default IDE?

:?:
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

lurkio wrote: Fri Apr 24, 2020 11:34 pmhow do you change the default IDE?
Delete the file chooseide.dat which you will find in your @usr$ directory (which you can discover using PRINT @usr$).
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by lurkio »

Richard Russell wrote: Sat Apr 25, 2020 10:09 am
lurkio wrote: Fri Apr 24, 2020 11:34 pmhow do you change the default IDE?
Delete the file chooseide.dat which you will find in your @usr$ directory (which you can discover using PRINT @usr$).
Thank you.

A few more questions on the other forum member's behalf:

Can you set up the SDLIDE editor window so that text will line-wrap to the window-width?

What is the limit to the length (in chars) of a line in the editor window? Can the limit be increased?

:?:
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

lurkio wrote: Sat Apr 25, 2020 11:47 amCan you set up the SDLIDE editor window so that text will line-wrap to the window-width?
No, just as with the BBC BASIC for Windows editor there's a 1:1 correspondence between program line and displayed line. I personally dislike code editors that 'wrap' because it means the concept of a 'line' is ambiguous.
What is the limit to the length (in chars) of a line in the editor window? Can it be increased?
I don't think the code of SDLIDE deliberately imposes a limit, but since a (tokenised) BBC BASIC program line cannot exceed 251 characters (excluding the line number) and since the longest keyword is OTHERWISE that means a line cannot exceed 251 * 9 = 2259 characters in any case. The maximum length of any 'sensible' line is much less.

I think there may be a 'graphical' limit to the line length of 32767 pixels, but whether that limits the number of characters will depend on the font size. Edit: There definitely is such a limit because of the way the VDU stream limits graphics coordinates to 16-bits.
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.11a released

Post by Deleted User 9295 »

Richard Russell wrote: Sat Apr 25, 2020 12:35 pmwhether that limits the number of characters will depend on the font size.
A little experimentation suggests that below about 10pt the 2259-character limit (imposed by the tokenised program format) kicks in first, but at larger font sizes the 32767-pixel limit hits you before that is reached.
Post Reply

Return to “modern implementations of classic programming languages”