User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Tue Sep 15, 2020 6:55 pm

scruss wrote:
Tue Sep 15, 2020 6:41 pm
Richard - you might want to update the installation file, as it's missing the libsdl2-net-2.0-0 requirement.
Not according to what I see here it isn't! This is what it says in the install-rpi.txt file:

Code: Select all

 sudo apt-get install libsdl2-2.0-0
 sudo apt-get install libsdl2-ttf-2.0-0
 sudo apt-get install libsdl2-net-2.0-0
 sudo apt-get install mesa-utils
(I didn't know when I wrote the file that you could include multiple packages in the same line).

User avatar
scruss
Posts: 3392
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Introduction to BBC BASIC

Tue Sep 15, 2020 9:02 pm

Yes, but after installing just those, the user will see:

Code: Select all

./bbcsdl 
./bbcsdl: error while loading shared libraries: libSDL2_net-2.0.so.0: cannot open shared object file: No such file or directory
The libSDL2_net library is definitely required:

Code: Select all

ldd bbcsdl | grep -i sdl
	libSDL2-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 (0xb6deb000)
	libSDL2_ttf-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL2_ttf-2.0.so.0 (0xb6dd4000)
	libSDL2_net-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL2_net-2.0.so.0 (0xb6dc0000)
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Tue Sep 15, 2020 9:27 pm

scruss wrote:
Tue Sep 15, 2020 9:02 pm
The libSDL2_net library is definitely required:
Well, I've never installed it and BBC BASIC works here (RPi 3 and RPi 4). My system doesn't even recognise the underscore variety of the library, only the hyphen one that my install file specifies:

Code: Select all

sudo apt-get install libsdl2-net-2.0-0
libsdl2-net-2.0-0 is already the newest version (2.0.1+dfsg1-4).

sudo apt-get install libsdl2_net-2.0-0
E: Unable to locate package libsdl2_net-2.0-0
Are you running regular 32-bit Raspbian Buster or something different?

User avatar
hitsware
Posts: 250
Joined: Sat Mar 26, 2016 10:12 pm
Location: sacramento , california , usa
Contact: Website

Re: Introduction to BBC BASIC

Tue Sep 15, 2020 9:50 pm

Thank You Richard .
Works fine now .
( 3 B + ....... Stretch )

Suggestion for install-rpi.txt :

make a folder " foo "" <<<<<<<<<<<<<<<<<<
extract bbc-rpi.zip into " foo " <<<<<<<<<<<<

Update your Raspberry Pi:
sudo apt-get update
sudo apt-get dist-upgrade

Install SDL 2.0:
sudo apt-get install libsdl2-2.0-0
sudo apt-get install libsdl2-ttf-2.0-0
sudo apt-get install libsdl2-net-2.0-0
sudo apt-get install mesa-utils
cd / / foo/ <<<<<<<<<<<<<<<<<<< the important part
chmod +x bbcsdl
chmod +x mkicon.sh

Enable the 'experimental' GL Driver (may require a reboot):
sudo raspi-config
Advanced Options... GL Driver... GL (Full KMS)... Ok... Finish

To start BBC BASIC:
./bbcsdl

To create a desktop shortcut:
./mkicon.sh
http://www.hitswares.com/

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Tue Sep 15, 2020 10:27 pm

hitsware wrote:
Tue Sep 15, 2020 9:50 pm
Suggestion for install-rpi.txt :

make a folder " foo "" <<<<<<<<<<<<<<<<<<
extract bbc-rpi.zip into " foo " <<<<<<<<<<<<
So you want install-rpi.txt to contain the instructions for extracting install-rpi.txt... :lol: :roll:

Anyway I don't like to be that prescriptive. Whilst I would personally choose to install it in a new folder, not everybody might and there's no actual necessity to do so: if you install it in your home directory it will work fine. So I'd rather leave the instructions as they are and let the user choose how and where they want to install it.

User avatar
scruss
Posts: 3392
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Introduction to BBC BASIC

Wed Sep 16, 2020 1:37 am

RichardRussell wrote:
Tue Sep 15, 2020 9:27 pm
Are you running regular 32-bit Raspbian Buster or something different?
Yup. On a system that had never had BBC BASIC on it, so there were no lurking libraries. I'd just pasted in your apt-get lines, put of course couldn't paste them back from history as they start with a space and hence disappear. (bash assumes any entry that starts with a space is something you want forgotten and won't commit it to history.)

I wouldn't have reported it if it weren't a real problem under Raspberry Pi OS.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
hitsware
Posts: 250
Joined: Sat Mar 26, 2016 10:12 pm
Location: sacramento , california , usa
Contact: Website

Re: Introduction to BBC BASIC

Wed Sep 16, 2020 3:48 am

> So you want install-rpi.txt to contain the instructions for extracting install-rpi.txt... :lol: :roll:

Here ' s the way I see it :
For ....

Code: Select all

chmod +x bbcsdl

chmod +x mkicon.sh

 ./bbcsdl

 ./mkicon.sh
To work one needs be
in the same directory
as ( I don't know which )
files from the .bbc . zip
It clutters the home directory
to have all those files .
Vs .
1 folder .......
PLUS !
It is easy for a newb ( like me )
to get confused when terminal
commands stop working ......
http://www.hitswares.com/

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Wed Sep 16, 2020 4:49 am

scruss wrote:
Wed Sep 16, 2020 1:37 am
I wouldn't have reported it if it weren't a real problem under Raspberry Pi OS.
So you say, but you still haven't told me what you want me to change! My existing install-rpi.txt file does install libsdl2-net, as it always has, so I neither understand what the problem is nor how I am supposed to fix it. I did install BBC BASIC from scratch on a brand new RPi 4 using only the instructions in that file (although I would have typed them in, not copied-and-pasted), and it worked correctly here. Nobody else has reported a similar problem.

If you want me to remove the leading spaces (I had no idea they were significant in bash) or even put the multiple libraries in a single command I can consider that, but neither explains why the existing file is not working for you.

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Wed Sep 16, 2020 5:16 am

hitsware wrote:
Wed Sep 16, 2020 3:48 am
It is easy for a newb ( like me ) to get confused when terminal commands stop working ......
I'm afraid it's the nature of Linux that the installation process requires you to be more knowledgeable and experienced than when installing on the other OSes supported by BBCSDL. The instructions in install-rpi.txt aren't visible until you've figured out how to unzip the downloaded file, and by then you've already committed yourself to what directory they are in! I really don't think it would be helpful to add something like "if you've just unzipped the files into your home directory, delete them and start again"!

The only foolproof solution to your problem would be for me to supply BBC BASIC in a more 'automated' format such as a .deb file that can be installed using apt. I could do that for the Raspberry Pi edition, probably, but not for the generic Linux editions, which I don't want to be specific to any particular 'flavour' of Linux.

User avatar
hitsware
Posts: 250
Joined: Sat Mar 26, 2016 10:12 pm
Location: sacramento , california , usa
Contact: Website

Re: Introduction to BBC BASIC

Wed Sep 16, 2020 2:56 pm

The problem easily arises if one ( as I often do )
extract into the downloads folder .

> "if you've just unzipped the files into your home directory,
> delete them and start again" !

? " place these ( extracted ) files into a folder named " bbc " "

The .deb ( especially if in the RPi repository ) would
certainly gain some usage of BBCBasic ....
http://www.hitswares.com/

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Mon Sep 21, 2020 2:06 pm

With the portfolio of 'my' versions of BBC BASIC now being quite large I have created this grid showing which version has which capabilities. The boxes marked ? indicate features of which the version is theoretically capable, but I haven't yet attempted an implementation:

feature_table.png
feature_table.png (40.39 KiB) Viewed 409 times

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Thu Oct 01, 2020 2:40 pm

I've released version 1.16a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android, iOS and in-browser. This is an interim release to fix a bug and a regression, it affects the 64-bit, ARM and Browser editions only, the 32-bit x86 editions have not been updated:

  1. Fixed a bug affecting the ON ... PROC statement (it could report a Syntax Error when there was nothing wrong).
  2. Fixed a regression in the ellipse.bbc library (causing filled ellipses not to plot if the GCOL mode was OR, AND, XOR or invert).
This new version may be downloaded from the usual location. The GitHub repository has been updated.

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Wed Oct 07, 2020 9:02 am

I have updated the Console Mode editions of BBC BASIC to version 0.28, to fix a couple of bugs:

  • ON ... PROC did not work correctly and could report a Syntax error even with valid code.
  • ON ERROR LOCAL could, in rare circumstances, misbehave if used in a nested function.
Version 0.28 may be downloaded as follows:

User avatar
RichardRussell
Posts: 681
Joined: Thu Jun 21, 2012 10:48 am

Re: Introduction to BBC BASIC

Sun Oct 11, 2020 4:31 pm

The webgllib.bbc library has been written primarily to support 3D graphics on the in-browser (Emscripten / Web Assembly) edition of BBC BASIC for SDL 2.0. Here are some of its features:

  • Substantially compatible with the D3DLIBA (for BB4W), ogllib (for desktop BBCSDL) and gleslib (for mobile BBCSDL) libraries.

  • Implemented using shader programs rather than the legacy Fixed Function Pipeline used by the other libraries.

  • Uses retained mode rather than immediate mode; there are no client-side arrays and all objects are stored in GPU memory. This is necessary for compatibility with WebGL and OpenGLES 2.0, and also offers some performance benefits.

  • Alpha-blending and specular reflections are always enabled, they can only be disabled by explicitly setting the alpha to 1.0 and the specular component of lights and/or textures to 0.0. However the alpha value is taken only from the vertex parameters or a texture, not from a material.

  • Lighting calculations always take account of the sign of the normal vector. This is different from the way the Fixed Function Pipeline works and you may need to reverse the direction of the normal to achieve compatibility. Face culling works as expected so you may need to arrange that the direction of the normal corresponds to the vertex winding order. Two-sided textures are not supported

  • There is a maximum of five lights (although this could be increased). These may be point-source, directional or spotlight, but there is currently no support for falloff with distance, and the spotlight cone has a hard boundary.

  • Although the library is primarily intended to be used with the in-browser edition of BBCSDL (WebGL) it is compatible with OpenGL and OpenGLES 2.0 so should also work on other platforms including the Raspberry Pi. This may provide some performance benefits, such as per-pixel lighting calculations.

I would be interested in your experiences of using this library.

Return to “Other programming languages”