BBC BASIC for SDL 2.0 version 1.08a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
RichardRussell
Posts: 90
Joined: Tue 15 Oct 2019, 09:10

BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell » Sun 01 Dec 2019, 11:07

Just released, version 1.08a 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

    The version of SDL supplied with the Windows, MacOS and iOS editions has been updated to 2.0.10. This version has the new float-coordinate rendering functions, in case you want to experiment with them. Note that there are significant changes in SDL which impact BBC BASIC, so if you notice anything not working properly please report it. (The Android edition is still at 2.0.5; the build tools being used don't work with later versions).

    Fixed a bug which sometimes required the use of '*run command' when '*command' should have worked (64-bit and ARM editions only).

    Fixed a bug which, in rare circumstances, could cause the INSTALL statement to hang (64-bit and ARM editions only).

  2. IDEs and Utilities

    SDLIDE: Goto Line (Ctrl+G) can now be executed by pressing Enter as well as clicking the OK button.

    SDLIDE: The customisable 'wheelspeed' value no longer affects clicking on the scrollbar arrows.

    Compiler: Fixed a bug causing single-capital-letter variables like A&, B# and C$ not to be crunched to 'fast' variables (they still won't be if also used as structure members).

  3. Libraries

    Modified 'arraylib.bbc' so that if an error occurs in PROC_invert() the LOCAL variables are restored (an error is to be expected if the matrix is non-invertible).

    Modified 'dlglib.bbc' to improve the listbox drag-scroll functionality.

    Updated 'eventlib.bbc' to be 64-bit compatible.

  4. Example Programs

    Added 'ellipsefit.bbc' (in the examples/general folder) which demonstrates that an axis-aligned ellipse can be defined by four points. This program is also compatible with BBC BASIC for Windows.

    Added 'bezierfit.bbc' (in the examples/general folder) to demonstrate fitting a smooth curve to a set of data points. This program is also compatible with BBC BASIC for Windows.

    Added 'multitouch.bbc' (in the examples/general folder) to demonstrate detecting multiple touch points. Requires a touchscreen or a multi-touch trackpad.

    Modified 'SkyBaby' to include a 'dynamic grid' in the SkyView display (requested by a user). As you zoom in the grid spacing gets finer; the grid lines are labelled with the altitude and azimuth in degrees.
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 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.
My posts are moderated; if you are seeing this it has already been approved. If you have a comment about the style or tone of the message please report it to the moderators by clicking the exclamation mark icon rather than complaining on the public forum.

RichardRussell
Posts: 90
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell » Tue 10 Dec 2019, 22:59

Is anybody experiencing problems with the Windows edition of BBCSDL v1.08a? I've received a report from a Windows 10 user that it does not run on his system: specifically the Choose IDE window freezes before anything is drawn. It runs fine on all the PCs I've tried here (a Windows 7 desktop, a Windows 10 desktop and a Windows 10 laptop).

I was aware that updating SDL to 2.0.10 (not just on Windows) was a risk, but ultimately one has to trust the libraries one is using - and 2.0.10 does include the float-coordinate rendering functions which may be important.

Can I ask everybody who has tried v1.08a on Windows to report here whether or not it worked, and for anybody who has not yet tried it, please do so and similarly report here.
My posts are moderated; if you are seeing this it has already been approved. If you have a comment about the style or tone of the message please report it to the moderators by clicking the exclamation mark icon rather than complaining on the public forum.

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

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by David Williams » Wed 11 Dec 2019, 15:50

Richard wrote: "Can I ask everybody who has tried v1.08a on Windows to report here whether or not it worked, and for anybody who has not yet tried it, please do so and similarly report here."

It works here, but it exhibits the same issue I had with v1.07a when running BBCSDL under Windows: when I attempt to open the filer window in order to load a file, it doesn't always respond to mouse clicks when I try to select a file. Sometimes it takes up to 4 or 5 clicks before a file is selected. This didn't seem to happen under Linux (at least with v1.07a), and it didn't happen either under Windows with v1.06a.

I haven't downloaded v1.08a for Linux yet, I'm busy with other stuff at the moment.

Two other issues about which you may already be aware:

SDLIDE (Windows/Linux): When you load a program, then subsequently clear it by clicking the 'New' icon to (perhaps to begin entering a new program into the IDE), the filename of the previous loaded program is not cleared in the 'Save As...' dialogue box (as it is with BB4W). So, the risk is you could end up accidentally overwriting the previous saved program (which I *think* I've done at least once). I don't know if this issue was present before v1.07a.

SDLIDE (Windows): This is a longstanding one. When I attempt to load up SDLIDE (by double-clicking bbcsdl.exe), the IDE doesn't always appear. Instead an 'immediate mode' window sometimes appears titled something like "BBC BASIC for Win32 version 1.08a" with a prompt awaiting input (I can type PRINT "HELLO", etc.), but no IDE. It's intermittent. I was able to reproduce the issue just now (and took a screenshot in case you need to see it).


David.
--

PS. I don't know who's responsible for this, but exactly *why* is BBCode switched off in this section of the forum? I wanted to quote Richard in the usual BBCode way.

User avatar
hellomike
Posts: 55
Joined: Sat 09 Jun 2018, 09:47

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by hellomike » Wed 11 Dec 2019, 16:40

Hi Richard,

Yes, I experienced that problem on a older Win10 laptop. On my Win10 desktop it works fine.
Didn't do much yet to figure out why it doesn't work on the laptop but I'm happy to do some testing if you want me to.

Oh wait...........
I did try copying over C:\Users\<user>\AppData\Roaming\BBCBasic\sdlide.ini to the laptop.

Didn't help.

Mike

RNBW
Posts: 12
Joined: Thu 05 Apr 2018, 21:41

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RNBW » Wed 11 Dec 2019, 17:31

I do have problems with opening folders using SDLIDE using 1.08a in Windows 10. Sometimes they won't open at all and sometimes the folder opens after several clicks. Files sometimes take a couple of clicks to open. I don't have the problem with BBCEdit.

RichardRussell
Posts: 90
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell » Wed 11 Dec 2019, 18:21

David Williams wrote:
Wed 11 Dec 2019, 15:50
Sometimes it takes up to 4 or 5 clicks before a file is selected.
Have you tried holding the button down a little longer when you 'click'? The reason I ask is that dlglib.bbc only ever polls the button state using MOUSE rather than the (better) ON MOUSE event method. As a result a short click may be missed. If that doesn't help I don't know the cause.
When you load a program, then subsequently clear it by clicking the 'New' icon to (perhaps to begin entering a new program into the IDE), the filename of the previous loaded program is not cleared in the 'Save As...' dialogue box (as it is with BB4W).
That could probably be addressed quite easily; I'll take a look.
This is a longstanding one. When I attempt to load up SDLIDE (by double-clicking bbcsdl.exe), the IDE doesn't always appear. Instead an 'immediate mode' window sometimes appears
Yes, this has been reported before. I don't see how my code can be at fault since it 'never' happens in Linux or Mac OS. If it happened consistently perhaps a workaround could be found by trial and error, but as it's so intermittent it's something I put up with. If you've any clue as to the cause (the source code is available at Github) I'd love to know.
PS. I don't know who's responsible for this, but exactly *why* is BBCode switched off in this section of the forum? I wanted to quote Richard in the usual BBCode way.
No idea. Sadly I don't even know what BBCode is, and I've never knowingly used it! The only thing I'm aware of, that is deliberately different in this section, is that only nominated members (including admins and me) can create new threads, whilst anybody can reply. Could that be linked?
My posts are moderated; if you are seeing this it has already been approved. If you have a comment about the style or tone of the message please report it to the moderators by clicking the exclamation mark icon rather than complaining on the public forum.

RichardRussell
Posts: 90
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell » Wed 11 Dec 2019, 18:33

Typical! I've looked at the code of dlglib.bbc and it does use ON MOUSE after all; I could have sworn that it didn't! This is why I rarely do any coding these days. :cry:

So the unresponsiveness is a mystery; can you please check whether dlgdemo.bbc (in the examples/general folder) exhibits the same behaviour? If it does, it will be much more amenable to debugging than SDLIDE is itself.
My posts are moderated; if you are seeing this it has already been approved. If you have a comment about the style or tone of the message please report it to the moderators by clicking the exclamation mark icon rather than complaining on the public forum.

RichardRussell
Posts: 90
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by RichardRussell » Wed 11 Dec 2019, 21:27

hellomike wrote:
Wed 11 Dec 2019, 16:40
Didn't do much yet to figure out why it doesn't work on the laptop but I'm happy to do some testing if you want me to.
My difficulty is that I have tested it on no fewer than five different PCs here: two Windows 10 laptops, two Windows 10 desktops (one with a 64-bit CPU and one with a 32-bit CPU) and a Windows 7 desktop. It runs fine on all of these, with no occurrences of the reported fault on any of them (and of course what is substantially the same code runs in Linux, including Raspbian, and MacOS). This makes it really challenging to come up with a plausible explanation.

So yes, of course, I would be delighted if you can do some testing to find out what the issue might be, but I can't really give you any guidance. What happens if you try to run the interpreter on its own, without the IDE or any other tools to complicate things? One way of doing that is to rename bbcsdl.bbc to something different.
My posts are moderated; if you are seeing this it has already been approved. If you have a comment about the style or tone of the message please report it to the moderators by clicking the exclamation mark icon rather than complaining on the public forum.

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

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by David Williams » Thu 12 Dec 2019, 05:49

I have run dlgdemo.bbc with BBCSDL versions 1.06a, 1.07a and 1.08a under Windows (SDLIDE). No problems at all with regards responsiveness with v1.06a (clicking a 'List box item' whether very short, short or long mouse button presses always results in the item being selected). However, under versions v1.07a and 1.08a, only fast mouse button presses are 'detected' in the listbox; longer ones are not registered. Same goes for the file selector window. By the way, double-clicking a listbox item (which I know you're not supposed to do!) results in the message "OK pressed, settings were:", which doesn't happen with the BB4W version of the program.

So, in summary: v1.06a works fine with regards to responsiveness (files always select without fail, listbox items select without fail), but BBCSDL (Win32) versions v1.07a and v1.08a have the issue.

EDIT: Just run dlgdemo.bbc under BBCSDL (LInux Mint) v1.08a, and same issue: short mouse button presses are required otherwise they're not registered.

David.
--

User avatar
hellomike
Posts: 55
Joined: Sat 09 Jun 2018, 09:47

Re: BBC BASIC for SDL 2.0 version 1.08a released

Post by hellomike » Thu 12 Dec 2019, 10:53

(Why don't I see the iconbar for adding BBCode when I reply messages in the Announcement forum??? Nevermind)

OK,
On the Win10 problem laptop I renamed bbcsdl.bbc and then double clicked bbcsdl.exe.
The command line window appears. Statement execute OK but the typing itself alternates between the character typed and black block characters.

I made the following program and saved it in the same directory under T.bbc.

A=PI
B=-9.87654321
PRINT A*B
END

When I CHAIN "T.bbc", it works however in the output I still see the block characters 50% of the time.
When I CHAIN "fern.bbc", there is a (the) crash.
When I CHAIN "15_Puzzle_Game.bbc" (unaltered, see my BB4W addition in Rosetta Code) it also works but COLOUR or CLS statements cause screen to switch to black on white and vice versa.

Hope this helps, if you need me to send sceendumps, I can email them to you.

Regards,

Mike

Post Reply