BBC BASIC
Development >> Raspberry Pi >> Raspbian Stretch released http://bbcbasic.conforums.com/index.cgi?board=raspberry&action=display&num=1503233154 Raspbian Stretch released
Post by Richard Russell on Aug 20th, 2017, 12:45pm
The long-awaited new version of the Raspberry Pi operating system - Raspbian Stretch - has now been released. This has a couple of implications for BBCSDL running on that platform:
The version of SDL available from the repository is now 2.0.5 (the latest); previously it was 2.0.2. One improvement is that the sound effects accompanying 'dropperz.bbc' now work.
Whereas, previously, enabling the 'GL Driver' was optional (albeit that BBC BASIC ran slowly without it) it is now essential. However that driver should be more stable and the bugs associated with its use fixed.
If anybody experiences problems running BBCSDL with Raspbian Stretch please report them here.
Richard.
Re: Raspbian Stretch released
Post by hitsware on Aug 21st, 2017, 12:13am
> the repository
url ?
Re: Raspbian Stretch released
Post by Richard Russell on Aug 21st, 2017, 07:09am
No, I meant the standard Raspbian repository - you don't need a URL (that's sort of the point). Installation instructions are in the supplied install-rpi.txt file - you must have already followed them when installing SDL 2.0.2 previously?
Richard.
Re: Raspbian Stretch released
Post by hitsware on Aug 21st, 2017, 11:03am
apt-get ?
Someone gave me a link to ? and I downloaded it before .
Re: Raspbian Stretch released
Post by hitsware on Aug 21st, 2017, 3:00pm
This one what? The download links are, of course, to be found on the web page.
I don't leave earlier versions available for download; my policy (as with BB4W) is only to support the very latest release, so each new version replaces the previous one(s). I naturally assumed that you were already running 0.18a, is that not the case?
It would be irritating and repetitive to respond to every support request with "are you running the latest version?" but that is taken as read. Every release has bug fixes so there's always a chance one of them will have addressed the very issue you are asking about.
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 21st, 2017, 6:08pm
Where do you keep bbcsdl in that you do not need to do a 'cd' or add /xxx/xxx/bbcsdl for the chmod and to run ?
You can extract the files anywhere you like, within reason. Some people just leave the zip in 'Downloads' which is probably where it got stored by default. I prefer to create a new directory ~/BBCBASIC and move the zip file there before unzipping it. But it's just a matter of personal preference, which is why I say nothing about it in the installation file.
If you're happy to run BBCSDL from a terminal prompt, which is what I generally do, then obviously you need to 'cd' to wherever you've put it first. An alternative, and perhaps nicer, approach is to create a desktop shortcut so you just need to double-click on that to run it. Again it's your choice.
But anyway a few days ago you were talking about your own experience of running BBCSDL, saying that it ran slowly and describing how you were using it to create MIDI music. So you must have done all this before; why are you asking about it again now?
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 21st, 2017, 9:28pm
Because I thought that perhaps something wrong in my installation may have caused the 'latency' . Speaking of which seems to be somewhat abundant in Stretch. It may not quite be ready for 'prime time'. bbcsdl may be somewhat snappier than the Jessie version, but not much. (GL engaged) Did you say you had a RPi 3 rather than a RPi 3-B ? Assuming the same performance, our perceptions must be very different. But then it is your Baby Re: Raspbian Stretch released
Post by Richard Russell on Aug 21st, 2017, 11:25pm
Because I thought that perhaps something wrong in my installation may have caused the 'latency'.
If it runs, it's correctly installed. Installation 'errors' can't affect the speed!
Quote:
Assuming the same performance, our perceptions must be very different.
What operation(s), precisely, do you find slow? Are you sure you're judging it from a practical perspective, and not simply expecting everything to react 'instantly' because that's what you're used to (e.g. on your mobile phone)?
The BBCSDL IDE is written in BBC BASIC, an interpreted language and as such one of the slowest of all BASICs. That interpreter is written in C (unlike BB4W which is written in assembler) so that results in at least another factor-of-two slowdown. And that is running on a slow computer, the Raspberry Pi.
So of course it's going to be comparatively very slow, but to me all that matters is that it is fast enough. So long as the editor can keep up with my typing speed, and the various menu functions etc. respond promptly, what does it matter whether it takes 1ms, 10ms or 100ms?
If you're looking for a modern, fast, compiled, native code, programming language that will fly even on a slow device like the RPi, BBC BASIC isn't it and never will be!
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 22nd, 2017, 2:28pm
> What operation(s), precisely, do you find slow?
To move a line of code up or down (ENTER or BACKSPACE) takes ~1/2 second ........
If you move (drag) the output screen, it leaves a trail of images.
@ times when you click the RUN arrow, it takes ~ 1 sec to initiate. @ times if you get an ERROR message (Mistake or Syntax) you first see the capital M or S then after ~1 second the rest of the word
Caveat: I realize that "@ times" is not very concise (though true)
Re: Raspbian Stretch released
Post by Richard Russell on Aug 22nd, 2017, 4:12pm
To move a line of code up or down (ENTER or BACKSPACE) takes ~1/2 second ........
Agreed. I can easily speed that up in a future release.
Quote:
If you move (drag) the output screen, it leaves a trail of images.
With the scrollbar you mean? I've never seen that: it doesn't happen here. What kind of monitor are you using? Mine is a Panasonic HDTV fed with HDMI.
Quote:
@ times if you get an ERROR message (Mistake or Syntax) you first see the capital M or S then after ~1 second the rest of the word
That's normal. All my versions of BBC BASIC behave that way, because screen refresh is a low priority in immediate mode. It doesn't affect running BASIC programs in normal circumstances, especially as you can force a refresh with *REFRESH.
Can you check for me what the CPU meter (top right hand corner of screen) is reading when SDLIDE is 'idle', that is simply waiting for keyboard input? Here it reads 1% or 2% most of the time. Anything higher would be indicative of a problem.
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 22nd, 2017, 8:19pm
> With the scrollbar you mean?
No........Put cursor in bar accross the top of output window. Hold down left button and drag the window accross the screen. Interestingly it doesn't do it with GL disabled ?
> Here it reads 1% or 2% most of the time.
Stretch w/GL 1% - 2% Stretch GLoff 60%-70% !!!!! Jessie 20% - 30% Never thought of looking @ that ...
Re: Raspbian Stretch released
Post by Richard Russell on Aug 22nd, 2017, 10:03pm
>Hold down left button and drag the window accross the screen.
It works perfectly here, but either way it's unrelated to BBC BASIC. You can ask at the Raspberry Pi forum if you like, but more than likely they'll simply say the VC4 driver is 'experimental' so strange things sometimes happen!
Quote:
Stretch w/GL 1% - 2% Stretch GLoff 60%-70% !!!!!
Software-emulated OpenGL rendering is very CPU-intensive and, as previously noted, seemingly even slower on Stretch. That's why I say enabling the GL driver is essential for BBCSDL.
Richard. Re: Raspbian Stretch released
Post by Richard Russell on Aug 23rd, 2017, 9:45pm
I've now tried every one of the example programs supplied with BBCSDL on a Raspberry Pi running Raspbian Stretch, and everything works as expected (with the previously mentioned caveat that the 'experimental' GL Driver must be enabled). With the version of SDL available from the Raspbian repository also having been updated from 2.0.2 to 2.0.5, this is a confidence boost.
I have to keep reminding myself that the Raspberry Pi has an ARM processor; it still feels really strange to be running what looks and feels like BBC BASIC for Windows on a non-x86 computer! I've been telling anybody who asked, for years, that there was zero chance that 'my' BBC BASIC would ever be ported to ARM, and I firmly believed it. That it has now happened is hard to get my head around.
Richard.
Re: Raspbian Stretch released
Post by hitsware on Aug 25th, 2017, 6:22pm
But how about Brandy ? And the RISCOS version ? Did " your " BBCBasic come after ?
Re: Raspbian Stretch released
Post by Richard Russell on Aug 25th, 2017, 8:47pm
But how about Brandy ? And the RISCOS version ? Did " your " BBCBasic come after ?
Is this what you wanted (these dates are approximate, corrections would be welcome)?
6502 BBC BASIC (Sophie Wilson): 1981 BBC BASIC (Z80) (Richard Russell): 1982 ARM BASIC V (Sophie Wilson): 1984 BBC BASIC (86) (Richard Russell): 1986 BBC BASIC for Windows (Richard Russell): 2001 Brandy BASIC (Dave Daniels): 2003 BBC BASIC for SDL 2.0 (Richard Russell): 2015
There are some less well known versions from other authors.
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 25th, 2017, 9:13pm
> Is this what you wanted
..........
You should ( or maybe someone has ? ) write a book about the life and times of BBCBasic .......
Re: Raspbian Stretch released
Post by Richard Russell on Aug 26th, 2017, 10:24am
You should ( or maybe someone has ? ) write a book about the life and times of BBCBasic
I'm not aware of a book, but there's this magazine article from several years ago.
Richard. Re: Raspbian Stretch released
Post by Richard Russell on Aug 26th, 2017, 5:03pm
The apparent slowness of Raspbian Stretch isn't limited to BBC BASIC, or even to SDL, because the standard 'glxgears' 3D demo program is reporting dramatically different speeds here. If I enter this command at a terminal prompt:
Code:
glxgears -info
it reports around 180 frames-per-second on Raspbian Jessie but only around 45 fps on Stretch, that's a 4:1 reduction (in both cases with the 'experimental' GL Driver disabled). Something's definitely not right so I've reported it at the Raspberry Pi forum; it will be interesting to see what they say.
Richard.
Re: Raspbian Stretch released
Post by Richard Russell on Aug 26th, 2017, 8:28pm
I've reported it at the Raspberry Pi forum; it will be interesting to see what they say.
The initial reaction there is that it might be specific to my RPi hardware. I'm doubtful of that, so can I ask everybody with a Raspberry Pi to please check as follows:
Disable (if necessary) the experimental GL Driver and reboot.
At a command prompt enter glxgears -info
Wait for the FPS value to stabilise
Please post here what frames-per-second it reports, what colours the gears are, and your machine details (RPi model, version of Raspbian etc.)
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 28th, 2017, 2:14pm
I get:
command not found
Stretch has obvious problems. GL or not I get black flashes when switching windows and it is not responsive. Re: Raspbian Stretch released
Post by Richard Russell on Aug 28th, 2017, 2:34pm
Indeed. Hopefully now I've raised the issue at the Raspberry Pi forum they will devote some effort to fixing the problems with Stretch, although there seems to be little urgency as yet.
You should be OK with the VC4 GL Driver enabled however. Yes there is the occasional, very brief, screen 'flash' (the same thing happens in Jessie) but otherwise it seems to be stable and it is certainly fast. You really cannot complain about the speed of BBCSDL now I've addressed the specific issues you raised of 'insert line' and 'delete line' which I admit were slow in v0.18a.
This YouTube video, which at the end shows four copies of BBCSDL running simultaneously on a Raspberry Pi, demonstrates beyond doubt that it's not slow!
Richard.
Re: Raspbian Stretch released
Post by hitsware on Aug 28th, 2017, 3:25pm
pi@raspberrypi:~$ glxgears -info bash: glxgears: command not found pi@raspberrypi:~$
The Raspberry people know Stretch is not ironed out. Their modus operandi is to be on the edge. It was only about the time of the advent of Pixel, that Jessie became quite well mannered.
Re: Raspbian Stretch released
Post by Richard Russell on Aug 28th, 2017, 3:51pm
although it is in the BBC BASIC installation instructions.
Richard. Re: Raspbian Stretch released
Post by hitsware on Aug 28th, 2017, 3:56pm
OK Right ..... I don't have BBCSDL on this SD Re: Raspbian Stretch released
Post by Richard Russell on Sep 4th, 2017, 5:03pm
An 'official' response, of sorts, here but personally I don't think it's very satisfactory because even if "the change of behaviour comes from upstream Debian packages" if it affects only the armhf build and not (x86) Debian stable shouldn't the Raspberry Pi people accept some responsibility?
Richard.
Re: Raspbian Stretch released
Post by hitsware on Sep 6th, 2017, 5:31pm
Have you tried " vc4 fkms " ( whatever that is ) ?
You may be expecting ' professional ' results from a ' hobbiest ' platform . Besides which the essence of Linux is an undoneness, left up to the user to resolve. No Bill Gates sheparding our cyber-efforts Re: Raspbian Stretch released
Post by Richard Russell on Sep 6th, 2017, 7:50pm
The BBCSDL installation instructions for the Raspberry Pi specifically tell you to enable that driver (the 'experimental' GL Driver)! I - and I think most other people - consider the performance of BBC BASIC to be quite acceptable with it enabled. You alone seem to feel it's still too unresponsive (I assume that you've updated your copy to 0.18b in which I have addressed your concerns about the 'delete line' and 'insert line' operations).
Quote:
You may be expecting ' professional ' results from a ' hobbiest ' platform .
All I am "expecting" is that Stretch should give as good results, or nearly so, as Jessie (rather than a fourfold slowdown when using the Mesa software driver). Do you think that is unreasonable?
I'm not sure that you fully grasp the issues surrounding the Raspberry Pi and the Mesa software driver. I would suggest that, if you have not already done so, you read the relevant threads at the SDL forum and at the Raspberry Pi forum to get a better understanding.
Richard. Re: Raspbian Stretch released
Post by hitsware on Sep 6th, 2017, 10:06pm
> specifically tell you
I am not using Stretch. Nothing to do with Basic or SDL. ( though I'm sure they are affected ) I've gone to Jessie Lite. Stretch needs alot of work to run as smooth. My main purpose is music and sound and the Stretch version of Sonic-Pi (my latest fave) is as messed up as the rest. (Part of that is a graphics problem so ??)
edit: I looked at the threads you linked to. For now perhaps you should reccomend Jessie to BBCSDL users ?
Re: Raspbian Stretch released
Post by Richard Russell on Sep 7th, 2017, 07:48am
For now perhaps you should reccomend Jessie to BBCSDL users ?
Why would I want to do that? In Stretch, with the VC4 GL driver enabled, BBC BASIC works perfectly, as far as I have been able to ascertain: it is fast, there are no problems with the sound and it uses an up-to-date version of SDL (2.0.5). However in Jessie (again with that driver enabled) sound from some BBC BASIC programs (notably Dropperz) doesn't work at all, sound from other programs is highly distorted when played through the HDMI output, and the version of SDL is out-of-date (2.0.2).
So by my assessment it is far better for a BBC BASIC user to use Stretch rather than Jessie, so long as they can enable the GL Driver. If for some reason they cannot enable that driver then the situation is different, but hopefully that will be rare.
When you thought that enabling the GL Driver broke the MIDI output it turned out to be your own mistake. Are you certain that the sound problems you think you've seen in Stretch aren't from a similar cause?
Richard.
Re: Raspbian Stretch released
Post by hitsware on Sep 7th, 2017, 3:17pm
> Are you certain that the sound problems > you think you've seen in Stretch aren't > from a similar cause?
Not being as 100% cock sure of myself as yourself, I cannot be sure, but probably. 1) The ' midi ' function added (with Stretch) does not connect to Timidity. I was sure it would by default. (as would the Microsoft synth in the Windows version) But no. In fact Dr. Aaron (developer) wasn't even aware of Timidity. 2) If I install FluidSynth (an alternative midisynth) the Sonic Pi screen swells vertically to the point of quasi-unusable. Fun, fun ,fun, till my Daddy takes the keyboard away
In a sense it is a similar cause. When I run into a certain degree of complicaction, I drop it. Otherwise (cyber- challenged as I am) I would spend forever trying to fix my computer and have no time left for music.