Matrix Brandy BASIC VI for console and SDL1.2: V1.23.1 released
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Some better news, I've got networking working on the SharedCLibrary RISC OS build. I have therefore rebuilt my standalone Telstar/Viewdata/Teletext client on this as it's a third of the size of the SharedUnixLib build, and gives me a single application build that runs on anything from a RISC OS 3 Archimedes all the way to a Raspberry Pi.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Very much an aside and an observation - Debian Bookworm has made the switch from upstream to Matrix Brandy. This should eventually filter down to Ubuntu and Raspian Raspberry OS.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
That's great to hear. Do you have any more details?...
1. Is it replacing the old Brandy BASIC debian package (i.e. replacing it by matrix-brandy) or is it in addition to the old Brandy BASIC?
2. Do you know what the new package will be called / where we can find out?
Thanks.
Mike
1. Is it replacing the old Brandy BASIC debian package (i.e. replacing it by matrix-brandy) or is it in addition to the old Brandy BASIC?
2. Do you know what the new package will be called / where we can find out?
Thanks.
Mike
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
It's replacing it entirely, and as of the build I installed a couple of weeks back, it's just 'brandy'. I found it by randomly googling "Matrix Brandy" and ignoring the alcohol-related results, then had a go at installing Bookworm in a VM.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
I see there's some info on it here: https://packages.debian.org/bookworm/brandy
Also, I see that the latest long-term support version of ubuntu (version 22.04) is based on "bookworm", so Matrix Brandy should have hit ubuntu already.
Also, I see that the latest long-term support version of ubuntu (version 22.04) is based on "bookworm", so Matrix Brandy should have hit ubuntu already.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Downloading the ISO now. According to https://packages.ubuntu.com/jammy/brandy it indeed looks like it has been picked up. Not sure how Debian tracks updates though, perhaps I need to email the package maintainer when I put out an update? (I'm a Red Hat / AlmaLinux / former CentOS man)mike12f wrote: ↑Sun Jun 19, 2022 4:54 pm I see there's some info on it here: https://packages.debian.org/bookworm/brandy
Also, I see that the latest long-term support version of ubuntu (version 22.04) is based on "bookworm", so Matrix Brandy should have hit ubuntu already.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Does it all work? The ubuntu link you sent seems to indicate it is the latest version of MatrixBrandy that they've packaged up, is that right?
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Yes, I just tried this on Ubuntu Jammy, and it's Matrix Brandy BASIC VI version 1.22.13 that runs.
Nice work!
Nice work!
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
It did work, yes. But, it is the latest release version, not the latest available in git with fixes that I've added since 26th January.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
True, but to see an Ubuntu package with source even from the current year is pretty amazing. The 26 January release can't be that bad, can it?
They don't seem to package tbrandy or sbrandy, only the graphical version
They don't seem to package tbrandy or sbrandy, only the graphical version
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
What are tbrandy and sbrandy?
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
These are the text-only console-mode builds. 'sbrandy' has a very limited VDU driver, but great for running as a scripting language, 'tbrandy' has a somewhat more feature-rich VDU driver, and can optionally emit Tektronix codes for graphics functions.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Hi Soruk, that sounds interesting.
I couldn't find tbrandy or sbrandy after running make. Should they have?
Also, I couldn't find any documentation on them. Is there any? Do these products need publicising a bit more?
Thanks!
Mike.
I couldn't find tbrandy or sbrandy after running make. Should they have?
Also, I couldn't find any documentation on them. Is there any? Do these products need publicising a bit more?
Thanks!
Mike.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
To build all, do:
Code: Select all
make cleanall; make text; make clean; make
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
-
- Posts: 99
- Joined: Fri May 14, 2021 4:21 pm
- Contact:
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
This sounds like an interesting alternative to running a BBC MIcro emulator, if you only want to mess around in BBC BASIC.
Can someone tell me whether the graphical version of Brandy BASIC will run in a virtual terminal i.e. the terminals you access by pressing CTRL-ALT-F1, CTRL-ALT-F2, etc?
I'd rather avoid the overhead of X-Windows when running Brandy BASIC, and having the graphics output appear in a separate window on a GUI desktop would kill the illusion that I'm using a BBC Micro.
Also, I'm a bit confused about the tbrandy and sbrandy variants. Are they completely separate programs? Or does Brandy BASIC work like gvim i.e. there is a single executable that can run either on the desktop, or in a terminal, by setting different command line options (or renaming the executable)?
Can someone tell me whether the graphical version of Brandy BASIC will run in a virtual terminal i.e. the terminals you access by pressing CTRL-ALT-F1, CTRL-ALT-F2, etc?
I'd rather avoid the overhead of X-Windows when running Brandy BASIC, and having the graphics output appear in a separate window on a GUI desktop would kill the illusion that I'm using a BBC Micro.
Also, I'm a bit confused about the tbrandy and sbrandy variants. Are they completely separate programs? Or does Brandy BASIC work like gvim i.e. there is a single executable that can run either on the desktop, or in a terminal, by setting different command line options (or renaming the executable)?
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
No, Matrix Brandy requires X.
I don't run it to pretend to be a BBC Micro, I run it to write software. It won't look like a Beeb because it shells out to a separate editor, typically vi (or I use micro, because it is a text editor). The window you type immediate commands in in Matrix Brandy is a graphical window, but the editing is done in the calling terminal window.
tbrandy and sbrandy are separate executables, yes. They have different dependencies from Brandy
I don't run it to pretend to be a BBC Micro, I run it to write software. It won't look like a Beeb because it shells out to a separate editor, typically vi (or I use micro, because it is a text editor). The window you type immediate commands in in Matrix Brandy is a graphical window, but the editing is done in the calling terminal window.
tbrandy and sbrandy are separate executables, yes. They have different dependencies from Brandy
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
You can edit your programs in "immediate mode", but you don't have the BBC Micro cursor copying. Instead, you can do EDIT <line number> to edit a line like you would edit a line in a text editor.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
-
- Posts: 99
- Joined: Fri May 14, 2021 4:21 pm
- Contact:
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
I'm perfectly fine with editing programs using a regular editor like vi.
But it's a shame that graphics can't be displayed directly on the framebuffer without needing X-Windows. I though that was possible with SDL1.2, but I could be wrong.
But it's a shame that graphics can't be displayed directly on the framebuffer without needing X-Windows. I though that was possible with SDL1.2, but I could be wrong.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
It can be, but your user needs write permissions to the framebuffer or SDL will fail to initialise.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Soruk,
I tried sbrandy and tbrandy - thanks they worked.
1. Is there any documentation for them?
2. What's the difference?
3. Why not bundle tbrandy into the brandy executable but it runs with a command-line argument flag instead e.g. "./brandy --tbrandy". Then tbrandy would be automatically get bundled into the next release of the brandy package on Debian.
4. Also, unrelatedly, if I install brandy using "apt get", will I be able to run a text-file BBC basic program from linux by double-clicking on it if I put a header comment at the top of the file, e.g. something like "#!/bin/bash", but adapted for brandy?
Sorry to pile the questions onto you today!
I tried sbrandy and tbrandy - thanks they worked.
1. Is there any documentation for them?
2. What's the difference?
3. Why not bundle tbrandy into the brandy executable but it runs with a command-line argument flag instead e.g. "./brandy --tbrandy". Then tbrandy would be automatically get bundled into the next release of the brandy package on Debian.
4. Also, unrelatedly, if I install brandy using "apt get", will I be able to run a text-file BBC basic program from linux by double-clicking on it if I put a header comment at the top of the file, e.g. something like "#!/bin/bash", but adapted for brandy?
Sorry to pile the questions onto you today!
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
That works from the command line with something like #!/usr/bin/env brandy. I've had it do something messy with the terminal settings sometimes if the window immediately opens and closes, so I had to type reset to get the terminal window usable again.
Many Linux desktops have made it hard to double click an executable script without having an associated .desktop file. I call it annoying, they call it security
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Thanks! That worked. The "security" problem wasn't an issue for me after I did the chmod +x on the file.scruss wrote: ↑Sun Jul 03, 2022 1:40 pm That works from the command line with something like #!/usr/bin/env brandy. I've had it do something messy with the terminal settings sometimes if the window immediately opens and closes, so I had to type reset to get the terminal window usable again.
Many Linux desktops have made it hard to double click an executable script without having an associated .desktop file. I call it annoying, they call it security
As I haven't got a proper install of brandy in my system, I just copied a symbolic-link file to my brandy executable into my ~/bin folder, and now the #!/usr/bin/env brandy header works well.
-
- Posts: 99
- Joined: Fri May 14, 2021 4:21 pm
- Contact:
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Interesting. So it will work, at least in theory.
Can you tell me how to obtain the necessary write permissions? I'm presuming that running as root would work, but for obvious reasons, that's not a good long term solution.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Running as root will work, but as you said, it's not exactly ideal. Otherwise, it's rather distro-dependent. On a Raspberry Pi, the 'pi' user is likely to work, though I haven't tested that in a while, it did work on a several-years-old installation.Grasshopper wrote: ↑Mon Jul 04, 2022 11:21 amInteresting. So it will work, at least in theory.
Can you tell me how to obtain the necessary write permissions? I'm presuming that running as root would work, but for obvious reasons, that's not a good long term solution.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
It all depends on whether the user is a member of the video group, because that's who owns the framebuffer device:
On Raspberry Pi OS with the default user*:
Notes:
Code: Select all
ls -la /dev/fb*
crw-rw---- 1 root video 29, 0 Jun 10 17:57 /dev/fb0
Code: Select all
sudo usermod -G video pi
- you have to log out and back in again for the effects of usermod to be seen. Check with the groups command
- As of about three weeks ago, there is no longer a default 'pi' user on new installations of Raspberry Pi OS
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Earlier today I've checked in an important bug fix / workaround for the sdl12-compat library. Some distros (notably RHEL 9 and its derivatives) ship with this instead of the real SDL-1.2.15 library. sdl12-compat is a binary and source compatibility library that an SDL 1.2 app can link against, but under the lid it's using SDL 2.
I spotted an issue with that when tinkering with AlmaLinux 9 where the keysym.unicode value isn't correctly populated when the CTRL key is used. I have raised an issue on their github, but in the meantime I've added a workaround as this situation is detectable (keysym.unicode is zero), to use the keysym.sym value to work out what should be returned and use that instead. If it's supposed to be zero for a particular key sequence, the workaround can return this and all is good. Once it's fixed in the library and it's trickled down to the distros, I'll remove the workaround.
I spotted an issue with that when tinkering with AlmaLinux 9 where the keysym.unicode value isn't correctly populated when the CTRL key is used. I have raised an issue on their github, but in the meantime I've added a workaround as this situation is detectable (keysym.unicode is zero), to use the keysym.sym value to work out what should be returned and use that instead. If it's supposed to be zero for a particular key sequence, the workaround can return this and all is good. Once it's fixed in the library and it's trickled down to the distros, I'll remove the workaround.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Having realised (after HOW long?!) that I can run the Raspberry Pi OS 64-bit version on a 3B (I don't have an RPi4), and from a thread over at the Distillery, I set about getting Matrix Brandy to build on it. It worked out of the box, only needing a small tweak to label the CPU as ARM-64bit instead of "Unknown".
Additionally, from that Distillery thread I discovered that, on ARM32 (and ARM26) setting a%%=2^63 gave me a negative number! Clearly incorrect, so added some checks that if the sign bit flipped unexpectedly, it's to be handled as a number out of range. (It was correctly handled on x86 and x86-64 by itself. Something different about the ARM.)
Additionally, from that Distillery thread I discovered that, on ARM32 (and ARM26) setting a%%=2^63 gave me a negative number! Clearly incorrect, so added some checks that if the sign bit flipped unexpectedly, it's to be handled as a number out of range. (It was correctly handled on x86 and x86-64 by itself. Something different about the ARM.)
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
-
Last edited by dhr2 on Sat Nov 05, 2022 5:50 pm, edited 2 times in total.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
Oops. This came in due to an issue on ARM platforms where large numbers might get its sign flipped unexpectedly, so catch and issue an out of range error. Bascically, if the sign of the float and the sign of the int64 cast differed, then complain.dhr2 wrote: ↑Thu Aug 18, 2022 9:06 pm Hello,
I've been dabbling in BBC BASIC programming again lately, writing code tweets to send to the BBCMicroBot on twitter (here's one of them https://twitter.com/bbcmicrobot/status/ ... 6398552064 )
I just built the latest version of Matrix Brandy from github and ran into a bug:This is giving a "number out of range" error.Code: Select all
PRINT 0.5 AND 1
Specifically it seems to cause this error for any kind of bitwise operator given any value > 0.0 and < 1.0 (or any value > -1.0 and < 0.0)
The previous versions of brandy that I have been using (which are a few years old by now) didn't behave this way, it definitely seems to be new, so I thought I'd let you know.
But I forgot to take into account zero. So, now, don't raise an error if the sign of the int64 cast is zero.
This fix is checked into git so please pull the change and rebuild.
Matrix Brandy BASIC VI (work in progress) The Distillery (another work in progress) Note Quiz (New educational software for the BBC and modern kit)
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
BBC Master 128, PiTubeDirect (Pi 3B), Pi1MHz, 5.25+3.5in dual floppy.
Re: Matrix Brandy BASIC VI for console and SDL1.2: V1.22.13 released
-
Last edited by dhr2 on Sat Nov 05, 2022 5:49 pm, edited 1 time in total.