BBC BASIC for SDL 2.0 v0.19a released

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Wed Nov 01, 2017 4:53 pm

I have updated BBCSDL, the cross-platform version of BBC BASIC for Windows, Linux, Mac-OS X, Raspberry Pi and Android. Full details of the new release may be found at the forum. Notable enhancements in this version are cross-platform support for network access, and that the Raspberry Pi edition now runs Andy Parkes' BBCEdit IDE as well as my SDLIDE. The Raspberry Pi edition now has substantially the same capabilities as the other desktop editions, including debugging and profiling.

Richard.

User avatar
BigEd
Posts: 1594
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby BigEd » Wed Nov 01, 2017 7:42 pm

Sounds good! BBC Basic is a good fit for the Pi, I think.

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Thu Nov 02, 2017 10:17 pm

BigEd wrote:Sounds good! BBC Basic is a good fit for the Pi, I think.

Yes, but Raspbian Stretch has a serious problem with its software OpenGL drivers (it runs much more slowly than the previous Raspbian Jessie) which is a great shame. BBCSDL is usable only if the 'experimental' (VC4) GL Driver is enabled, but that isn't always possible (for example it's incompatible with the camera module and also with Kodi).

Richard.

Image

User avatar
BigEd
Posts: 1594
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby BigEd » Thu Nov 02, 2017 10:56 pm

ouch! That's a serious performance regression, on the face of it.

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Fri Nov 03, 2017 9:34 am

BigEd wrote:ouch! That's a serious performance regression, on the face of it.

Indeed. Unfortunately nobody will accept responsibility for it: the Raspberry Pi people say it has arisen 'upstream' in Debian and therefore there is nothing they can do, but other Debian Stretch distributions don't seem to have suffered the same regression. My guess is that there's a configuration issue affecting only the armhf build, perhaps a change in compiler switches or a change in the compiler itself, causing inefficient code to be generated. It could be as simple as having accidentally disabled NEON (SIMD) instructions.

Anyway, there doesn't seem to be much prospect of it being fixed any time soon. Not many Raspberry Pi apps rely on OpenGL, so the motivation for doing so isn't that great. However BBC BASIC does (to be more precise, the version of SDL2 available from the RPi repository does); it works well with the GL Driver enabled, because that replaces the broken mesa drivers, but not otherwise.

Richard.

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Sun Dec 10, 2017 3:32 pm

Tried installing this on my Pi but the installer reports that all files to do with libsdl2- are not found.

Is this just me or is it a known problem?
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Mon Dec 11, 2017 10:28 am

flaxcottage wrote:Tried installing this on my Pi but the installer reports that all files to do with libsdl2- are not found. Is this just me or is it a known problem?

Nobody else has reported it. What model of RPi and what version of Raspbian are you running? Here I run it on an RPi 3 with Raspbian Stretch, and (so long as the VC4 GL Driver is enabled) it works pretty well considering the low-powered CPU. It should also run successfully with a late version of Raspbian Jessie, but anything earlier than the RPi 3 is really too slow to be usable (and SDL2 is rather out of date in Jessie's repo).

What messages are you getting from apt-get, exactly? I can't think of any reason why the libsdl2 packages would have been deleted from the repository, and I certainly hope they haven't!

Richard.

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Mon Dec 11, 2017 9:37 pm

Thanks for the quick response, Richard.

I am trying this with a Pi2 running Raspbian Wheezy
OS version.jpg


And this is the error message I get:
message.jpg


My Pi 3, running Raspbian Jessie is OK with version 0.16e. Is it the Wheezy version that is causing the problems?
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Mon Dec 11, 2017 11:40 pm

I've done some more work on this with my Pi 3. I used a new, clean Raspbian Stretch image as Richard suggested.

The libsdl2 files all installed exactly as they should. They also install under Raspbian Jessie but not under Raspbian Wheezy.

I used the install-rpi.txt file included with the bbc-rpi.zip file but, because I am a bit of a muppet with Linux, I found it difficult to follow exactly and had to do a lot of research and trial and error experimentation before I got it to work.

If it helps I have added to the instructions so that installation is easier for non-experts. [-o<

Anyway this is brilliant! =D> =D> It is much better than 'other BASICs' on the Raspberry Pi under Linux. It looks like I shall have to have a go at 'bare metal' programming of the GPIO pins using the built-in assembler. This should be fun. :lol:
Attachments
install-rpi.pdf
(160.86 KiB) Downloaded 12 times
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Tue Dec 12, 2017 9:11 am

flaxcottage wrote:It looks like I shall have to have a go at 'bare metal' programming of the GPIO pins using the built-in assembler.

You can if you want to, but it's not necessary (unless you want to do something for which BASIC is not fast enough). BBC BASIC for SDL 2.0 comes with the 'gpiolib.bbc' library, which allows you to access the RPi's GPIO pins from BASIC, without needing assembler or any other 'tricky' code. It is documented within the code of the library itself, but it's very straightforward.

You mention in one of your posts a very old version of BBCSDL. Because this is a product under active development, please make sure that you keep it updated to take advantage of new features as they are added, and bug fixes. The current version is 0.19b which incorporates a change that was necessary in order to run the Forces of Darkness and Xmas Demo II programs (and also a fix to the assembler). Of course you don't need to repeat the original installation process, unzipping the latest release is all that is necessary.

Richard.

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Tue Dec 12, 2017 10:08 am

Thanks, Richard. I might have known that you would have thought of GPIO access. :oops:

I have used the Windows version for a long time now. It was great for teaching and much better than Python, which seems de rigeur in schools these days. Why the language has not been accepted by the examination boards I cannot understand - I did use it myself for GCSE projects and managed to get it accepted by OCR for one of their qualifications.

Anyway that package had a huge manual, which I read. Perhaps I ought to read the one for this implementation of the language! :? #-o
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Tue Dec 12, 2017 12:48 pm

flaxcottage wrote:Why the language has not been accepted by the examination boards I cannot understand

It has always been accepted - in fact recommended - by OCR (the Oxford, Cambridge and RSA Examining Board). Although it's no longer a current publication, the 'OCR Computing for GCSE' student's book has an entire chapter in which all the code examples are listed in BBC BASIC! It says on page 211: "The code samples included in the chapter have been written in BBC BASIC because of the similarity of BBC BASIC to pseudocode which therefore makes it easier to translate the logic into other programming languages".

Although the other UK examining boards may not have been as proactive as OCR in recommending BBC BASIC, I am not aware that they have any specific objections to it and I've had no reports to that effect from the many schools who teach BBC BASIC to their students.

Richard.

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Tue Dec 12, 2017 4:55 pm

For the 2018 examination series WJEC will accept BASIC-derived languages and OCR will accept a generic BASIC language as being suitable for the Non-Examined Assessment (NEA) component of their GCSE Computer Science examinations. This is great. :D =D>

Unfortunately AQA and Pearsons/Edexcel will only accept one of several named languages and BBC BASIC is not one of those named languages. They accept Python, Java, Pascal-based languages, C-based languages and Visual Basic. These lists of languages change yearly depending on demand. For both the 2018 and 2019 examinations BBC BASIC is not an accepted language for the NEA. This is a great pity. :( [-X

Any forum members who are currently teaching Computer Science to GCSE level should, therefore, make sure they enter their students for either WJEC or OCR (He says mischievously). :twisted: :lol:
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Tue Dec 12, 2017 6:21 pm

flaxcottage wrote:They accept Python, Java, Pascal-based languages, C-based languages and Visual Basic.

BBC BASIC's CASE statement is based on Pascal's syntax (CASE thing OF) so that makes it a 'Pascal-based language', right? :wink:

Richard.

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Tue Dec 12, 2017 9:28 pm

Richard Russell wrote:BBC BASIC's CASE statement is based on Pascal's syntax (CASE thing OF) so that makes it a 'Pascal-based language', right? :wink:

Richard.


Ha ha ha! Love it! :lol: :lol: :lol:
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

User avatar
flaxcottage
Posts: 2888
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby flaxcottage » Thu Dec 14, 2017 2:28 pm

This is really great, thanks, Richard. =D> =D>

Up to now I have been using RISCOS on the Pi for my 'serious' programming and educational software.

Control through the GPIO pins is very easy using the gpio library supplied. I have managed to control a 16x2 OLED display direct from the GPIO pins using it. Configuring a 'User Port' using GPIO pins 20 - 27 inclusive is child's play.

My next step is to get some retro CAL software working. I tried the venerable Granny's Garden and it worked with minor tweaks!

Granny's Garden on Pi.jpg


I use this software because it is very well written and is a good indicator of BASIC compatibility with the BBC micro. So now Granny's Garden works on the Pi under Linux. :D The MODE7 emulation works well but is slow and is only usable on a Pi 3. Non-MODE7 programs work very quickly indeed and approach RISCOS for speed.
- John

I'll be at ...

Image

Well, actually 2018 and the 21st. They haven't changed the banner yet!! [-X :lol:

Richard Russell
Posts: 180
Joined: Sun Feb 27, 2011 10:35 am
Contact:

Re: BBC BASIC for SDL 2.0 v0.19a released

Postby Richard Russell » Thu Dec 14, 2017 7:48 pm

flaxcottage wrote:The MODE7 emulation works well but is slow and is only usable on a Pi 3.

That's true of double-height characters; I don't think single-height MODE 7 is particularly slow. The reason double-height is slow is that the characters are 'stretched' at run time, rather than being pre-rendered that size.

Richard.


Who is online

Users browsing this forum: No registered users and 3 guests