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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 5:35 pm

jahboater wrote:
Sun Apr 14, 2019 5:23 pm
I presume if you select -mstrict-align GCC will "break up" large items and write them out as individual bytes.
That sounds expensive, compared with a trap. It implies that GCC will split it up if it doesn't know whether the address is aligned or not (which is likely to be whenever it's via a void* pointer) even if in most cases it was actually aligned and didn't need splitting.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 5:41 pm

ScriptBasic wrote:
Sun Apr 14, 2019 5:31 pm
I'm using Brandy's SDL BBC BASIC graphic library module with ScriptBasic which seems to work okay.
Sadly not an option I have, because Brandy is SDL 1 but mine is SDL 2.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 5:52 pm

I'm using SDL 1.2 with the BBC BASIC and SDL_gfx extension modules for ScriptBasic.

SDL 1 & 2 reminds me of the Windons delimia with 32 bit vs 64 bit.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 6:31 pm

ScriptBasic wrote:
Sun Apr 14, 2019 5:52 pm
I'm using SDL 1.2 with the BBC BASIC and SDL_gfx extension modules for ScriptBasic.
The Raspberry Pi, as a relatively slow machine, benefits from the hardware acceleration that SDL 2 can take advantage of, but SDL 1 can't. That's particularly evident in some of the YouTube videos, for example 'Video games' (David Williams' prizewinning 'Forces of Darkness') and 'Sprites' (80 aliens moving independently with shadows). I suspect - unless you're about to prove me wrong - that SDL 1 would struggle to match that performance.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 6:33 pm

Please don't cross posts from other forums, we've had quite a few posts on basic recently, we don't need this as well.
How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect?

User avatar
PeterO
Posts: 4517
Joined: Sun Jul 22, 2012 4:14 pm

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 6:46 pm

ScriptBasic wrote:
Sun Apr 14, 2019 6:33 pm
Please don't cross posts from other forums, we've had quite a few posts on basic recently, we don't need this as well.
How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect?
Why ? You made a big fuss about making your own forum, so use that !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 7:12 pm

Think of the Raspberry BASIC forum as an extension module for forums that don't get it.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 8:14 pm

ScriptBasic wrote:
Sun Apr 14, 2019 6:33 pm
How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect?
I suggested that when the forum categories were reorganised a few months ago, but it didn't happen.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 8:40 pm

I suspect - unless you're about to prove me wrong - that SDL 1 would struggle to match that performance.
You are a much more experianced BASIC developer than I and don't doubt your findings. If I were a game programmer, I wouldn't be using an interpretive BASIC anyways. I'm happy the BBC and gfx extension modules even work with a traditionally console BASIC interpreter like ScriptBasic. The intent was to give SB users a simple graphics narrative to use when character based output just won't do.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21873
Joined: Sat Jul 30, 2011 7:41 pm

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 8:45 pm

ScriptBasic wrote:
Sun Apr 14, 2019 6:33 pm
Please don't cross posts from other forums, we've had quite a few posts on basic recently, we don't need this as well.
How about creating a BASIC board so folks don't have to link to forums that do give BASIC some respect?
Because most of the people interested in BASIC are currently in ths thread....and that ain't enough to have your own forum.

And that's coming from someone who learned to program with BBC BASIC on BBC Micro serial number 3336, that he still has in the loft.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 8:54 pm

My goal with ScriptBasic is to prove your theory wrong. There comes a point in your life you realize that the only way to move forward doesn't have to be dancing.

The Raspberry Pi project is about beginners and the curious where cost isn't a road block. Why discourage valnurable minds with complex languages that skip the BASICs?
Last edited by ScriptBasic on Sun Apr 14, 2019 9:03 pm, edited 1 time in total.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 9:01 pm

ScriptBasic wrote:
Sun Apr 14, 2019 8:40 pm
If I were a game programmer, I wouldn't be using an interpretive BASIC anyways.
You should chat to David Williams, the author of 'Forces of Darkness' and other prizewinning games. He'd explain why he finds BBC BASIC particularly well suited to games programming; you can also look at his website which showcases a whole load of games, written by him and others in BBC BASIC. Of the four most recent games coding contests held at SyntaxBomb, three have been won by programs written in BBC BASIC. Go figure!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21873
Joined: Sat Jul 30, 2011 7:41 pm

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 9:04 pm

ScriptBasic wrote:
Sun Apr 14, 2019 8:54 pm
My goal with ScriptBasic is to prove your theory wrong. There comes a point in your life that the only way to move forward isn't dancing.
Not sure what you are trying to say. Just keep it polite, avoid flame wars, and don't flood the forum. Simples.
ScriptBasic wrote:
Sun Apr 14, 2019 8:54 pm
The Raspberry Pi project is about beginners and the curious where cost isn't a road block. Why discourage valnurable minds with complex languages that skip the BASICs?
Who's discouraging it? No-one. To misquote, absence of forum does not imply absence of encouragement.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 9:41 pm

You should chat to David Williams.
BBC BASIC for Windows is a compiler and well suited for gaming. I said I wouldn't use a BASIC interpreter for game programming.

I know of a serious game developer that uses ScriptBasic as his gaming engine embedded scripting language.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 10:04 pm

ScriptBasic wrote:
Sun Apr 14, 2019 9:41 pm
BBC BASIC for Windows is a compiler
No it isn't. BBC BASIC is interpreted (indeed, my versions are well towards the 'pure interpreter' end of the spectrum, with only tokenised keywords as a contribution to performance and none of the pre-processing steps that Brandy uses). If you are thinking of BB4W's capability of creating a self-contained EXE, that is achieved by packaging the run-time engine and the BASIC program into a single file, rather like a zip.

Anyway, one of the videos I linked to was to 'Forces of Darkness' running on a Raspberry Pi using the cross-platform BBC BASIC for SDL 2.0. The program is 100% interpreted BASIC (but with a heavy reliance on SDL2's accelerated graphics).
Last edited by RichardRussell on Sun Apr 14, 2019 10:08 pm, edited 1 time in total.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 10:06 pm

What?

I want my $50 back. :D

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 10:16 pm

ScriptBasic wrote:
Sun Apr 14, 2019 10:06 pm
I want my $50 back. :D
I am always prepared to refund the payment of any dissatisfied customer, and have occasionally done so voluntarily despite not being asked. But I would refer you to the documentation, which states "The Compile command allows you to create a stand-alone executable file from your BBC BASIC program. Although this is not a true compiler in the traditional sense (your program is still interpreted) the end result is effectively the same".

Also, at the FAQ page: "In traditional terms BBC BASIC is an interpreted language; it has many features which are not compatible with direct conversion to machine code (e.g. the EVAL function and the assembler). BBC BASIC for Windows uses the term compile for the process of creating a stand-alone executable file containing a compressed form of your BASIC program plus a Run Time Engine to execute it".
Last edited by RichardRussell on Sun Apr 14, 2019 10:25 pm, edited 1 time in total.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 10:23 pm

Just kidding.

It was $50 well spent.

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

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 10:42 pm

ScriptBasic wrote:
Sun Apr 14, 2019 10:23 pm
Just kidding.
I know, but I take my obligations as a vendor seriously. Although BBC BASIC for Windows is a commercial product, BBC BASIC for SDL 2.0 (which is the subject of this thread) is entirely free, and always will be - even the Windows edition. It can't create an exe file, but the MacOS edition does build a self-contained application (as a .dmg file), and a free tool is available from my website to build an Android .apk file that you can distribute.

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Sun Apr 14, 2019 11:07 pm

The tool is cool but does BBC BASIC dev environment run on my phone?

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

Re: Introduction to BBC BASIC

Mon Apr 15, 2019 1:55 am

ScriptBasic wrote:
Sun Apr 14, 2019 11:07 pm
The tool is cool but does BBC BASIC dev environment run on my phone?
The 'mobile' editions (Android, iOS and in principle a Raspberry Pi with the official touchscreen - to keep this on-topic) use a simplified 'IDE' suited to the touch environment. It lacks several features of the desktop editions, but can be used to edit BASIC programs and even write them from scratch if you are determined.

But for serious development of mobile applications in BBC BASIC I'd recommend mounting the Android file system as a remote USB drive on a PC or Mac, then running the appropriate desktop edition to do the heavy lifting. Compatibility is so good that most debugging can take place on the desktop platform, especially if it has a touchscreen, but when you want to test the app in the final environment you can simply use the 'touch IDE' to run it on the mobile device.

It's not quite as straightforward in iOS because you can't mount the filesystem in the same way, but you can copy the program to the device using iTunes (again over a USB connection) so it's only a couple more clicks.

A final word of caution: quite soon (before the end of the year) Google will be imposing a condition that an Android app must have a 64-bit build for it to be accepted in the Play Store. Since Android BBC BASIC is currently 32-bits only you won't be able to distribute apps that way. iOS BBC BASIC is already 64-bits so it's not a problem in the long term, but it needs somebody to get an Android 64-bit build working.

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

Re: Introduction to BBC BASIC

Mon Apr 15, 2019 2:53 am

ScriptBasic wrote:
Sun Apr 14, 2019 5:31 pm
I'm using Brandy's SDL BBC BASIC graphic library module with ScriptBasic which seems to work okay.
But your BASIC isn't BBC BASIC
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
PeterO
Posts: 4517
Joined: Sun Jul 22, 2012 4:14 pm

Re: Introduction to BBC BASIC

Mon Apr 15, 2019 7:02 am

ScriptBasic wrote:
Sun Apr 14, 2019 7:12 pm
Think of the Raspberry BASIC forum as an extension module for forums that don't get it.
Absolutely NOT ! If you are going to run a forum on a subject, then it should be the first point of call not the last hope for the desperate !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
ScriptBasic
Posts: 577
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Introduction to BBC BASIC

Tue Apr 16, 2019 12:03 am

Absolutely NOT ! If you are going to run a forum on a subject, then it should be the first point of call not the last hope for the desperate !
I don't make the rules here. Python is the language of choice by the Raspberry Pi foundation and BASIC is acknowledged but not recommended. The RaspberryBASIC.org forum is for those that think differently.

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

Re: Introduction to BBC BASIC

Tue Apr 16, 2019 8:12 am

ScriptBasic wrote:
Tue Apr 16, 2019 12:03 am
BASIC is acknowledged but not recommended.
Eben Upton himself is enthusiastic about BBC BASIC: https://www.raspberrypi.org/blog/learn- ... with-eben/

Return to “Other programming languages”