BBC BASIC for SDL 2.0 version 1.20a released


Hated Moron
 

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

  1. BASIC Interpreter / Run Time Engine

    Fixed FOR...NEXT loops misbehaving with negative non-integer STEP on ARM editions (Raspberry Pi, Android, iOS).

    Fixed *KEY not correctly handling strings such as |!|H (ARM and 64-bit editions only).

  2. IDEs and Utilities

    Fixed compiler.bbc incorrectly crunching structure members in rare circumstances.

    Fixed SDLIDE.bbc crashing in MacOS if the Tab key was pressed.

  3. Libraries

    Modified webgllib.bbc to be 64-bit compatible (it can be used on platforms other than in-browser).

    Modified filedlg.bbc so that you can type a full (absolute) path into the File name box.

    Modified menulib.bbc so that drop-down menus can be hidden from the menu bar (by setting their title to an empty string).

    Fixed editbox.bbc not reliably setting the 'changed' flag, and mispositioning the caret on blank lines.

  4. Example Programs

    Modified Ceefax.bbc to add function key shortcuts (f1-f4) for the coloured buttons; also fixed a crash if a page number with a leading zero was entered.

    Modified sudoku.bbc so the timeout only applies to the 'Count' option, not to 'Solve', so it can solve any puzzle even on slow machines.
This 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, Android, iOS, 64-bit Linux and in-browser editions, currently).


Tom Wilson k6abz
 

I ran it for about an hour tonight, fixing my countdown timer, and I found an interesting quirk. 


If I type “COLOR”, the editor expands that out to “COLOUR”, but does not advance the cursor, leaving it between the U and R. 


I would expect the text replacement to COLOUR to also place the cursor after the R, so the user does not inadvertently break up the command and end up with COLOU 15R. 


yes, that actually happened. 🤣


Hated Moron
 

On Thu, Mar 4, 2021 at 09:52 AM, ki6abz wrote:
If I type “COLOR”, the editor expands that out to “COLOUR”, but does not advance the cursor, leaving it between the U and R. 
I can see how that might happen: I expect it advances the cursor by the length of what you typed, not the length of the keyword it expanded it to.  It's probably not easily fixed, and I don't propose even to try.

It wasn't my decision to accept a variant spelling, that was something Acorn decided to do when they tried (and failed) to get the BBC Microcomputer into the US market.  They expended huge sums on modifying the machine's hardware and software (FCC compliance was a major pain, as I recall) and even had to replace 'BBC' with 'British Broadcasting Corporation' everywhere because of Brown Boveri & Cie owning those initials in the States at the time.  It still flopped, and all that wasted cash probably contributed to them eventually going bust.


Sean Miller
 

I can't feel any sympathy... it's a British computer so I think people can at least make the effort to type in English... after all the Americans haven't made the same allowances for us when it comes to most things since... 

I would *love* to be able to type 

.heading {
      colour: #000066;
}

...but, alas, I have to leave out the 'u'. 

I'm sure that those who use BBC Basic can make the same sacrifices as the rest of us have to when programming in most other languages.

Sean

On Thu, 4 Mar 2021 at 10:25, Richard Russell <news@...> wrote:
On Thu, Mar 4, 2021 at 09:52 AM, ki6abz wrote:
If I type “COLOR”, the editor expands that out to “COLOUR”, but does not advance the cursor, leaving it between the U and R. 
I can see how that might happen: I expect it advances the cursor by the length of what you typed, not the length of the keyword it expanded it to.  It's probably not easily fixed, and I don't propose even to try.

It wasn't my decision to accept a variant spelling, that was something Acorn decided to do when they tried (and failed) to get the BBC Microcomputer into the US market.  They expended huge sums on modifying the machine's hardware and software (FCC compliance was a major pain, as I recall) and even had to replace 'BBC' with 'British Broadcasting Corporation' everywhere because of Brown Boveri & Cie owning those initials in the States at the time.  It still flopped, and all that wasted cash probably contributed to them eventually going bust.


Hated Moron
 

This thread is specifically to announce a new release of BBC BASIC for SDL 2.0, please do not hijack it with off-topic comments.  This new release includes a very important bug fix for users running it on an ARM CPU, and it is vital that they update their copy (everybody should update as a matter of course anyway because there are many other less critical, but nonetheless important, bugs fixed).

I am going to lock the thread now so further attempts to reply will be blocked.  If you want to make a comment about this or anything else please start a new thread.


Hated Moron
 

On Thu, Mar 4, 2021 at 09:40 AM, Richard Russell wrote:
Modified webgllib.bbc to be 64-bit compatible (it can be used on platforms other than in-browser).
That is perhaps worth emphasising. webgllib.bbc was written to support 3D graphics in the in-browser edition of BBCSDL, because WebGL doesn't have the Fixed Function Pipeline (in OpenGL and OpenGL ES) that the other editions rely on. To make it work it was necessary to use shaders instead (and I was pleased to be able to achieve that, despite a very limited experience of shader programming).

It was only after I'd got it going that I realised that it actually worked better than the other libraries (ogllib.bbc and gleslib.bbc) in that lighting calculations are performed per pixel rather than per vertex. This can dramatically improve the realism of the end result, especially in cases when spotlights are used, and/or there are specular reflections.

Fortunately not only does it work better in those respects, it runs on all the other platforms (Windows, MacOS, Linux, Raspbian, Android, iOS) too! So if you want to take advantage of the improved rendering quality simply INSTALL webgllib instead of ogllib. It's not quite 100% compatible but it comes close (you'll notice a particularly dramatic effect if you perform the substitution in skaters.bbc!).


Hated Moron
 

On Thu, Mar 4, 2021 at 10:56 PM, Richard Russell wrote:
Fortunately not only does it work better in those respects, it runs on all the other platforms (Windows, MacOS, Linux, Raspbian, Android, iOS) too!
Note that the webgllib library's use of shaders seems to interfere with the normal operation of SDL 2.0, so that if you CHAIN another program or return to immediate mode you can end up with a black screen (it is still responding to input, but invisibly). This isn't normally important on a desktop platform, when it is usual to close the window in which the program was running anyway. But on Android and iOS it can mean that after running a program which uses webgllib you may need to fully-close and re-open the BBC BASIC app.