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

Re: Introduction to BBC BASIC

Thu Feb 27, 2020 2:40 pm

Code: Select all

[email protected]:~ $ hexdump /home/pi/Desktop/bbc.txt
0000000 0001                                   
0000001
[email protected]:~ $ hexdump -C /home/pi/Desktop/bbc.txt
00000000  01                                                |.|
00000001
[email protected]:~ $ xxd /home/pi/Desktop/bbc.txt
00000000: 01                                       .
[email protected]:~ $ 
Thank You ( s ) ......... : )
Can the old ( er ? ) forum ( not the present ( blue one ) ) be viewed anyplace ?

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

Re: Introduction to BBC BASIC

Thu Feb 27, 2020 3:42 pm

hitsware wrote:
Thu Feb 27, 2020 2:40 pm
Can the old ( er ? ) forum ( not the present ( blue one ) ) be viewed anyplace ?
The archives of the original Yahoo! group (back to 2005) can be browsed and searched at the current Groups.io group:

https://groups.io/g/bb4w

The archives of the old Conforums boards (back to 2007) can be browsed and searched at the current forum:

https://www.bbcbasic.co.uk/forum/viewfo ... 2fe0a5ab6d

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 2:01 pm

Is there a way to transfer an installed RPi bbcbasic from
one Raspbian version to another ?
I.E. if I want to update (or go back) or refresh my SD
without having to reinstall bbcbasic ....

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 2:21 pm

hitsware wrote:
Fri Feb 28, 2020 2:01 pm
Is there a way to transfer an installed RPi bbcbasic from one Raspbian version to another ?
I.E. if I want to update (or go back) or refresh my SD without having to reinstall bbcbasic ....
You need to distinguish BBC BASIC itself from the SDL2, SDL2_ttf and SDL2_net libraries that it relies on. Those libraries get installed 'system wide' and I don't know how you'd go about transferring them, and anyway you should always be better off installing them from the repository appropriate to the version of Raspbian (e.g. Stretch or Buster) in case there are subtle differences that impact on the libraries.

As far as BBC BASIC itself is concerned it's no more than the set of files and directories that come in the zip, which can be transferred straightforwardly. But having said that I'm always finding new bugs (sadly) and there's a new release every 6 weeks or so, so I'd strongly recommend you always use the latest version anyway (currently v1.10a).

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 2:53 pm

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 &
chmod +x bbcsdl &
chmod +x mkicon.sh &
./mkicon.sh 
This doesn't seem to work
( Nor did I think it would ) : )
Could you create something
with my ( I hope ) apparent intent ?
I.E. a txt file that can be copied and
pasted into the terminal and will do
the whole installation with one step .

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 3:13 pm

hitsware wrote:
Fri Feb 28, 2020 2:53 pm
Could you create something with my ( I hope ) apparent intent ?
No. If I knew how to write a script that will install BBC BASIC in a single command don't you think I would have already done so to make a user's life easier?! The fact is that the only OS I know how to use in any detail is Windows; Linux, MacOS and the rest are a mystery to me, and it's only through SDL acting as an abstraction layer, and hence isolating me from the OS, that I've been able to create versions of BBC BASIC for them.

Perhaps somebody who understands Linux will be able to help you (and if I can steal any script they create that will be a useful spinoff!).

User avatar
rpdom
Posts: 16719
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 3:25 pm

RichardRussell wrote:
Fri Feb 28, 2020 3:13 pm
If I knew how to write a script that will install BBC BASIC in a single command don't you think I would have already done so to make a user's life easier?
If I get time, I may have a look at that for you. I have some experience of creating a .deb file with correct dependencies and config files and stuff.
Unreadable squiggle

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 4:14 pm

Code: Select all

[email protected]:~ $ # Update your Raspberry Pi:
[email protected]:~ $  sudo apt update &
[1] 8205
[email protected]:~ $  sudo apt dist-upgrade & 
[2] 8206
[email protected]:~ $ #Install SDL 2.0:
[email protected]:~ $  sudo apt install libsdl2-2.0-0 &
[3] 8207
[email protected]:~ $  sudo apt install libsdl2-ttf-2.0-0 &
[4] 8208
[email protected]:~ $  sudo apt install libsdl2-net-2.0-0 &
[5] 8209
[email protected]:~ $  sudo apt install mesa-utils &
[6] 8210
[email protected]:~ $ #chmod +x bbcsdl
[email protected]:~ $  #chmod +x mkicon.sh
[email protected]:~ $ 
[email protected]:~ $ #Enable the 'experimental' GL Driver (may require a reboot):
[email protected]:~ $ 
[email protected]:~ $  #sudo raspi-config
[email protected]:~ $  #Advanced Options... GL Driver... GL (Full KMS)... Ok... Finish
[email protected]:~ $ 
[email protected]:~ $ #To start BBC BASIC:
[email protected]berrypi:~ $ 
[email protected]:~ $  #./bbcsdl
[email protected]:~ $ 
[email protected]:~ $ #To create a desktop shortcut:
[email protected]:~ $ 
[email protected]:~ $  #./mkicon.sh
[email protected]:~ $ 
[email protected]:~ $ #RTR 20-Oct-2018
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Reading package lists... Done
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Building dependency tree       
Reading state information... Done
libsdl2-ttf-2.0-0 is already the newest version (2.0.15+dfsg1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
I think I got a little ways , but ( IIRC ) a ' cd ' is needed

User avatar
rpdom
Posts: 16719
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 5:05 pm

hitsware wrote:
Fri Feb 28, 2020 4:14 pm
I think I got a little ways , but ( IIRC ) a ' cd ' is needed

Code: Select all

[email protected]rypi:~ $ #Install SDL 2.0:
[email protected]:~ $  sudo apt install libsdl2-2.0-0 &
[3] 8207
[email protected]:~ $  sudo apt install libsdl2-ttf-2.0-0 &
[4] 8208
[email protected]:~ $  sudo apt install libsdl2-net-2.0-0 &
[5] 8209
[email protected]:~ $  sudo apt install mesa-utils &
[6] 8210
These commands are totally wrong. You do not want to run apt as a background task. Especially multiple invocations of it. They will conflict.
Try just doing it all on one line without the "&" on the end".

Code: Select all

[email protected]:~ $ #Install SDL 2.0:
[email protected]:~ $  sudo apt install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-net-2.0-0 mesa-utils
Unreadable squiggle

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 6:41 pm

Code: Select all

[email protected]:~ $  sudo apt install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-net-2.0-0 mesa-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libsdl2-net-2.0-0 is already the newest version (2.0.1+dfsg1-4).
libsdl2-ttf-2.0-0 is already the newest version (2.0.15+dfsg1-1).
libsdl2-2.0-0 is already the newest version (2.0.9+dfsg1-1+rpt1).
The following additional packages will be installed:
  libglew2.1 libglu1-mesa
Suggested packages:
  glew-utils
The following NEW packages will be installed:
  libglew2.1 libglu1-mesa mesa-utils
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 320 kB of archives.
After this operation, 1,291 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.mirror.constant.com/raspbian buster/main armhf libglew2.1 armhf 2.1.0-4 [160 kB]
Get:2 http://raspbian-us.ngc292.space/raspbian buster/main armhf libglu1-mesa armhf 9.0.0-2.1 [130 kB]
Get:3 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf mesa-utils armhf 8.4.0-1+b1 [30.4 kB]
Fetched 320 kB in 2s (176 kB/s)      
Selecting previously unselected package libglew2.1:armhf.
(Reading database ... 98168 files and directories currently installed.)
Preparing to unpack .../libglew2.1_2.1.0-4_armhf.deb ...
Unpacking libglew2.1:armhf (2.1.0-4) ...
Selecting previously unselected package libglu1-mesa:armhf.
Preparing to unpack .../libglu1-mesa_9.0.0-2.1_armhf.deb ...
Unpacking libglu1-mesa:armhf (9.0.0-2.1) ...
Selecting previously unselected package mesa-utils.
Preparing to unpack .../mesa-utils_8.4.0-1+b1_armhf.deb ...
Unpacking mesa-utils (8.4.0-1+b1) ...
Setting up libglew2.1:armhf (2.1.0-4) ...
Setting up libglu1-mesa:armhf (9.0.0-2.1) ...
Setting up mesa-utils (8.4.0-1+b1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
[email protected]:~ $ 
Good - O ! .... Isn't there a way to automatically answer yes
to the ' do you want to allocate space y/n ' ..... ?

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

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 6:48 pm

hitsware wrote:
Fri Feb 28, 2020 2:53 pm

Code: Select all

sudo apt-get install mesa-utils
I'm not sure that you actually need mesa-utils to run BBC BASIC, I think I recommended installing it so that you can run glxinfo and glxgears to assess OpenGL performance and confirm that the 'experimental' GL driver is enabled (necessary on an RPi 3 to achieve acceptable speed).

User avatar
rpdom
Posts: 16719
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Introduction to BBC BASIC

Fri Feb 28, 2020 7:54 pm

hitsware wrote:
Fri Feb 28, 2020 6:41 pm
Good - O ! .... Isn't there a way to automatically answer yes
to the ' do you want to allocate space y/n ' ..... ?
Yes. Add -y somewhere in the command line, like this.

Code: Select all

[email protected]:~ $  sudo apt -y install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-net-2.0-0 mesa-utils
Unreadable squiggle

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

Re: Introduction to BBC BASIC

Sun Mar 01, 2020 9:07 pm

The real fun is BBCBasic on Android ! 8-)

Amiga Man
Posts: 6
Joined: Mon Jul 30, 2012 12:28 pm

Re: Introduction to BBC BASIC

Sun Mar 15, 2020 7:09 pm

Hello there,

I have download BBC Basic onto the /home/pi/BBC MIRCO then I double the icon called bbcsdl for the BBC Basic IDE to come open but nothing happen!

What am I doing wrong?

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

Re: Introduction to BBC BASIC

Sun Mar 15, 2020 7:39 pm

Amiga Man wrote:
Sun Mar 15, 2020 7:09 pm
What am I doing wrong?
Sorry, no idea. Try running it from the command prompt (./bbcsdl) rather than using the icon.

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

Re: Introduction to BBC BASIC

Mon Mar 16, 2020 5:22 pm

Amiga Man wrote:
Sun Mar 15, 2020 7:09 pm
Hello there,

I have download BBC Basic onto the /home/pi/BBC MIRCO then I double the icon called bbcsdl for the BBC Basic IDE to come open but nothing happen!

What am I doing wrong?
Did you follow the instructions in the archive? At the very least, you need to do this in a terminal beforehand:

Code: Select all

 sudo apt -y install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-net-2.0-0 mesa-utils
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Amiga Man
Posts: 6
Joined: Mon Jul 30, 2012 12:28 pm

Re: Introduction to BBC BASIC

Thu Mar 19, 2020 9:57 pm

Thanks to all guys and I got it working now 8-)

I just learning BBC Basic for first time on new PI 4 :-)
So it going take bit of time to learn most of what commands does!

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

Re: Introduction to BBC BASIC

Thu Mar 19, 2020 10:56 pm

Amiga Man wrote:
Thu Mar 19, 2020 9:57 pm
So it going take bit of time to learn most of what commands does!
If you're a complete beginner you may find the tutorial helpful (it was originally written for BBC BASIC for Windows but is substantially relevant to BBC BASIC for SDL 2.0). On the other hand if you're familiar with the BASIC language but need to learn about BBC BASIC's 'idiosyncracies' you can browse the manual (again focussed on BB4W but largely relevant to BBCSDL) or just try the supplied example programs.

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

Re: Introduction to BBC BASIC

Fri Mar 27, 2020 9:59 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. 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).

ejolson
Posts: 4859
Joined: Tue Mar 18, 2014 11:47 am

Re: Introduction to BBC BASIC

Fri Mar 27, 2020 10:05 pm

RichardRussell wrote:
Fri Mar 27, 2020 9:59 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.
Thanks for your continued work!

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

Re: Introduction to BBC BASIC

Sat Mar 28, 2020 11:04 am

RichardRussell wrote:
Fri Mar 27, 2020 9:59 pm
Changed the default MODE 7 font to be more similar to RISC OS and Matrix Brandy.
This is the font I am now using for MODE 7. 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
mode7font.png (27.99 KiB) Viewed 637 times

Characters 0-31, not shown, are two-letter symbols for the Videotex/Teletext control codes (e.g. AR for Alpha Red).

Puffergas
Posts: 74
Joined: Thu Dec 19, 2019 12:16 am

Re: Introduction to BBC BASIC

Thu Apr 09, 2020 11:09 pm

I enjoyed reading about the history of BBC BASIC, on Richard's web page. It reminds me of the Raspberry Pi and it seems odd that it is not more common in the Pi world. In high school I had my computer basic class on the Wang 2200 and now I learned (on this thread) that BASIC causes irreversible brain damage :oops: Maybe that is the reason it is not included in Raspbian.? Since the damage is already done, I have BBC BASIC installed and need to read the tutorial and manual.

Heater
Posts: 15354
Joined: Tue Jul 17, 2012 3:02 pm

Re: Introduction to BBC BASIC

Fri Apr 10, 2020 12:03 am

It was Edsger Dijkstra who started the whole thing about BASIC causing brain damage.

BUT be aware that the BASIC language he was talking about was nothing like BBC BASIC.

Many "modern" BASICs are not really BASIC at all. Think Visual BASIC and so on. They are modern block structured languages modeled on Algol.

Quite likely Edsger would not have been so hard on them.
Memory in C++ is a leaky abstraction .

ejolson
Posts: 4859
Joined: Tue Mar 18, 2014 11:47 am

Re: Introduction to BBC BASIC

Fri Apr 10, 2020 2:56 am

Heater wrote:
Fri Apr 10, 2020 12:03 am
It was Edsger Dijkstra who started the whole thing about BASIC causing brain damage.
Perhaps a more useful quote in this day, age and even forum thread is when
Edsger wrote: Program testing can be used to show the presence of bugs, but never to show their absence!
Dijkstra (1970) "Notes On Structured Programming" (EWD249), Section 3 ("On The Reliability of Mechanisms"), corollary at the end.

Heater
Posts: 15354
Joined: Tue Jul 17, 2012 3:02 pm

Re: Introduction to BBC BASIC

Fri Apr 10, 2020 5:26 am

Surely Dijkstra cannot be the first one to have made that observation.

I recall when it occurred to me shortly after discovering programming. I was horrified.

Which is why, 40 years later, I'm enthusiastic about Rust. Rust provably makes whole classes of bugs impossible to write.
Memory in C++ is a leaky abstraction .

Return to “Other programming languages”