BBC BASIC
« BBC BASIC for SDL 2.0 v0.13a released »

Welcome Guest. Please Login or Register.
Jan 20th, 2018, 6:08pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BBC BASIC for SDL 2.0 v0.13a released  (Read 846 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx BBC BASIC for SDL 2.0 v0.13a released
« Thread started on: May 12th, 2016, 10:09pm »

I am pleased to announce the release of version 0.13a of the Cross-Platform (SDL 2.0) implementation of BBC BASIC. It may be downloaded for the currently-supported platforms as follows (it is hoped that Mac OS will follow at some point):
You are cautioned not to extract bbcsdl20.zip or bbclinux.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:
  1. All editions now come with an IDE allowing programs to be created, edited and run. In the case of the Win32 and Linux ports this is a 'classic' IDE (written by Andy Parkes - for bug reports see the Help menu) and in the case of the Android port it is a 'touch optimised' IDE for mobile devices (see separate post to follow).

  2. A new system variable @platform% is introduced, containing the SDL version number in the most-significant three bytes and a platform ID in the LS byte (0 = Win32, 1 = Linux, 2 = MacOS, 3 = Android).

  3. New command-line switches -fixedsize and -fullscreen control the created window.

  4. A 2048x2048 pixel bitmap is used, allowing graphics to be plotted anywhere within this 'canvas' (perhaps as a temporary 'scratchpad', outside the current display window).

  5. The Win32 and Linux versions will automatically run the file bbcsdl.bbc if present.

  6. *SYS 2 enables SDL_FINGERDOWN, SDL_FINGERMOTION and SDL_FINGERUP messages to be received by the ON MOUSE handler. See PIANO.BBC for an example.

  7. *SYS 4 enables SDL_MULTIGESTURE messages to be received by the ON SYS handler.

  8. INKEY(-256) now returns &53 (ASC"S"), i.e. 'SDL', as the 'machine ID'. This can be used to determine what SYS (API) functions are available.

  9. You can specify the height of a font in pixels rather than 'points', using the same method as with BB4W (at present BBCSDL assumes a DPI value of 96 because there isn't a reliable way of determining the true value that works on all platforms; this may be resolved when SDL 2.0.4 becomes more commonly available).
In addition the Android edition is built using SDL 2.0.4 rather than SDL 2.0.3. There are some significant differences so I would welcome reports of how well version 0.13a works on Android (86) devices - and yes there are now several users who have them!

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBC BASIC for SDL 2.0 v0.13a released
« Reply #1 on: May 16th, 2016, 9:05pm »

I've updated the Android edition (only) to version 0.13b. It may be downloaded from here:

http://www.rtr.myzen.co.uk/BBCBasic.apk

The easiest way to install this is probably to download it directly to your Android (86) device using the built-in browser. So long as you don't uninstall the old version first, any files you have created should be preserved.

The main changes in this version are to the 'Touch IDE' utility as follows:
  1. The file browser adds @lib$ and @usr$ on every screen, so that these directories can be opened with a single tap.

  2. The New menu (long-pressing on an empty line in the file browser) has an Exit item, to return to immediate mode.

  3. The font styles and sizes can be changed by putting the file .touchiderc in the @usr$ directory. This should be a plain-text file similar to the following:

    Code:
    editfont=FreeMono,24
    guifont=FreeSans,24 
Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBC BASIC for SDL 2.0 v0.13a released
« Reply #2 on: May 17th, 2016, 08:48am »

on May 16th, 2016, 9:05pm, Richard Russell wrote:
The font styles and sizes can be changed by putting the file .touchiderc in the @usr$ directory.

The fonts which are currently supplied, and therefore may be selected, are FreeSans, FreeSerif, FreeMono and DejaVuSansMono. These fonts vary in respect of code-point coverage, so if you need a specific character or support for a specific alphabet you may need to check their suitability. If you want to use a font other than one of these you will need to save its TTF file in BBC BASIC's @lib$ folder. Please be aware of Copyright issues in respect of fonts (the GNU 'Free' fonts and the 'DejaVu' fonts should be safe to use).

I should probably add that there is nothing stopping the user selecting a proportional-spaced font for the program editor. That will not work correctly in the specific (but important) respect that tapping on the screen will not position the text cursor (caret) at the nearest character. It would in principle be possible to adapt the program to work properly with a proportional-spaced font, so I would be interested to know if anybody thinks that would be a worthwhile change.

Note that the BB4W editor only lets you select a fixed-pitch (monospaced) font, although in fact the reason for that restriction has long since been removed. Support for foreign-language glyphs like Chinese means you cannot assume that even a 'monospaced' font actually has all the characters the same width!

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBC BASIC for SDL 2.0 v0.13a released
« Reply #3 on: May 20th, 2016, 9:48pm »

I've updated the Android 86 edition of BBC BASIC (again) to version 0.13c. It may be downloaded from the usual place:

http://www.rtr.myzen.co.uk/BBCBasic.apk

This update fixes an issue which arises because Android devices usually have a 16 bits-per-pixel (RGB565) display. As a result the POINT() function couldn't be relied upon to return the correct value, because the colour at the specified coordinates might not be exactly the same as that in BBC BASIC's palette.

I have now changed the POINT() function so that - as in BB4W - it returns the nearest palette entry to the colour, rather than assuming there will be an exact match. This makes the function slightly slower but since POINT() is already very slow in the SDL version the difference won't be noticeable.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBC BASIC for SDL 2.0 v0.13a released
« Reply #4 on: Jun 6th, 2016, 11:07am »

I've discovered a silly bug in the SDL 2.0 versions of BBC BASIC: the PLOT codes which should specify 'plot in the inverse colour' (for example PLOT 86 for a triangle) don't work. The more commonly used 'plot in foreground colour' and 'plot in background colour' do work properly.

I will fix this in the next release. Meanwhile if you need a workaround you can set the foreground colour to 'invert' (GCOL 4,0) and then use the 'plot in foreground' PLOT codes, which will have the desired effect.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls