BBC BASIC
General >> Announcements >> BBC BASIC for SDL 2.0 v0.14a released http://bbcbasic.conforums.com/index.cgi?board=announcements&action=display&num=1470047257 BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 1st, 2016, 10:27am
I am pleased to announce the release of version 0.14a of the Cross-Platform (SDL 2.0) implementation of BBC BASIC. It may be downloaded for all the currently-supported platforms as follows:
The Mac version should run on all operating system versions from Snow Leopard (10.6) onwards. In the case of both the Android (x86) and Mac OS versions you may need to override the security settings to allow an application to be installed from an unknown source.
You are cautioned not to extract the Win32 version (bbcsdl20.zip) to your 'BBC BASIC for Windows' installation folder because it would overwrite the libraries and example programs with incompatible versions! Create a new directory for it.
The main changes in this version are as follows: The 'desktop' editions (Win32, Linux and Mac OS) now come with a choice of IDE. When you run the bbcsdl application you are prompted to select either Andy Parkes' BBCEdit.bbc or my SDLIDE.bbc (adapted from bbcide.bbc). Please try them both; Andy and I welcome feedback.
A new library dlglib.bbc and associated example program dlgdemo.bbc are supplied. The library supports the creation of simple modal, non-moveable, dialogue boxes using a syntax similar to that used by WINLIB2. This can make porting programs which use dialogue boxes considerably easier.
The @ox% and @oy% system variables, to support scrolling over a large canvas, are implemented in a way compatible with BB4W. A new example program scroll.bbc is supplied to demonstrate their use; you scroll the window contents by using the cursors keys or dragging with the mouse or touchscreen.
A new example program flood.bbc (in the graphics directory) illustrates the flood-fill capabilities of BBC BASIC.
Both the CLG statement and drawing text at the graphics cursor (VDU 5 mode) now support the logical plotting modes - OR, AND, XOR and INVERT - as controlled by the first parameter of GCOL.
A new command *OSK [on/off] is implemented to enable or disable the On Screen Keyboard (primarily for use with the Android version).Please remember that even if you have only a Windows PC you can experiment with this cross-platform SDL 2.0 version of BBC BASIC. I am still looking for people to contribute to the documentation and libraries.
Richard.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by jbk on Aug 2nd, 2016, 12:00am
hello Richard I tested the Windows version and it works ok Re: BBC BASIC for SDL 2.0 v0.14a released
Post by jbk on Aug 2nd, 2016, 11:21am
hello Richard on my Mac when I double-clicked on the bbcsdl application it would not launch properly, however I copied the contents of bbcsdl to a new folder and from the terminal changed to the Resources folder and launched bbcsdl with SDLIDE.bbc as parameter and it launched ok, ran some tests and they work ok. also tried BBCEdit but the start-up window was too small to display all the menus and when resizing the window it would not refresh the window leaving the enlarged area blank.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 2nd, 2016, 1:27pm
on my Mac when I double-clicked on the bbcsdl application it would not launch properly
When you extracted the disk image file (BBCBasic.dmg) it should have created an Application (BBCBasic.app). You should definitely not be looking 'inside' that application nor attempting to execute anything called 'bbcsdl'. Instead, you should execute the BBC Basic Application itself by double-clicking on its icon.
Quote:
however I copied the contents of bbcsdl to a new folder and from the terminal changed to the Resources folder and launched bbcsdl with SDLIDE.bbc as parameter and it launched ok
That is neither necessary nor correct. You should treat the application bundle as an opaque entity.
Here are the installation instructions that the person who tested the app for me recommended: Download the BBCBasic.dmg file to the Downloads folder:
Open the .dmg file (you may be asked to address the Security & Privacy option under Allow Apps):
Copy the BBCBasic app to your Application folder or the Desktop (or wherever you want it):
Double-click on the app to run it.Quote:
also tried BBCEdit but the start-up window was too small to display all the menus and when resizing the window it would not refresh the window leaving the enlarged area blank.
Please report any problems with BBCEdit to its author Andy Parkes; contact details are in the Help menu.
Richard.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by jbk on Aug 2nd, 2016, 1:43pm
Richard, that's exactly what I did but the program segfaults, however if I launch it as I mentioned then it works. Quote:
Richard, that's exactly what I did but the program segfaults
Very strange. Perhaps you could investigate further and if possible let me know where the problem arises. As you probably know, when you double-click on an app bundle it executes the file having the same name as the bundle, in the Contents/MacOS folder.
So in this case you should be able to simulate the effect of double-clicking on the application by executing the file BBCBasic.app/Contents/MacOS/BBCBasic. This is a hard link to the file BBCBasic.app/Contents/Resources/bbcsdl. The symptom you describe would happen if the disk image file didn't properly recreate the link, but that would be a bit worrying.
Richard.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by jbk on Aug 2nd, 2016, 3:03pm
Richard, from the terminal I cd into BBCBasic.app/Contents/MacOS and then issued ./BBCBasic BBCBasic.bbc a window opened with the message "choose ide" but after a couple of seconds it segfaulted
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 2nd, 2016, 4:04pm
Richard, from the terminal I cd into BBCBasic.app/Contents/MacOS and then issued ./BBCBasic BBCBasic.bbc a window opened with the message "choose ide" but after a couple of seconds it segfaulted
OK. I'm not too sure why you added the BBCBasic.bbc parameter because obviously Mac OS doesn't do that. To reproduce what the OS does when you double-click on the app you should be issuing the command ./BBCBasic alone.
However I don't expect that makes any difference in practice. If I have understood what you have said so far, issuing the command ./bbcsdl in the Resources folder works, but issuing the command ./BBCBasic in the MacOS folder doesn't. But that ought to be 'impossible' because the latter is a hard link to the former, so as far as the OS is concerned you are doing exactly the same thing!
I am unavoidably having to use SDL 2.0.3 because the latest release (2.0.4) isn't available as a 32-bit Framework for Mac OS for some strange reason (it'a almost as if the SDL maintainers have forgotten that modern Macs still happily execute 32-bit applications!).
Richard. Re: BBC BASIC for SDL 2.0 v0.14a released
Post by jbk on Aug 2nd, 2016, 4:37pm
Richard I am happy that it's working on the Mac, I made a shell script to launch BBCBasic and so far all the demos work.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 2nd, 2016, 4:59pm
I am pleased to announce the release of version 0.14a of the Cross-Platform (SDL 2.0) implementation of BBC BASIC.
Richard
I've tried out BBCSDL2.0 v0.14a on Windows and Mac (both latest OS), not all the files, but those I have tried work perfectly. I'm pleased to see it working on the Mac because I bought a second hand Mac Mini, which I've upgraded. It will be good to be able to use BBC Basic on it.
First impressions about the IDEs: Looks: I prefer yours. Working: I prefer a light background and I couldn't immediately see if the colours could be changed on Andy's IDE. I think I will play with both of them for a while, to see which I like best.
Ray
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 3rd, 2016, 10:25pm
I prefer a light background and I couldn't immediately see if the colours could be changed on Andy's IDE.
To be fair, there's no way to get a non-white background on my IDE (other than to edit the code)! The other syntax colours can be selected, but not the editor background.
Richard.
Re: BBC BASIC for SDL 2.0 v0.14a released
Post by Richard Russell on Aug 4th, 2016, 08:35am
Although it works fine here, a couple of people have reported that the Win32 edition crashes in bbcsdl.bbc as a result of this statement:
Code:
SYS "SDL_SetWindowSize", @hwnd%, dlg%!8 DIV 2, dlg%!12 DIV 2
The reason for the crash isn't clear, but experimentally it seems that changing the window size using VDU 23,22 instead fixes the issue:
Code:
VDU 23,22,dlg%!8 DIV 2;dlg%!12 DIV 2;8,16,16,128+8