Author |
Topic: BBC BASIC for SDL 2.0 v0.13a released (Read 1001 times) |
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
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:
The file browser adds @lib$ and @usr$ on every screen, so that these directories can be opened with a single tap.
The New menu (long-pressing on an empty line in the file browser) has an Exit item, to return to immediate mode.
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,24guifont=FreeSans,24 Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
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.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
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.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
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.
|
|
Logged
|
|
|
|
|