BBC BASIC for SDL 2.0 version 1.32a released

for discussion of bbc basic for windows/sdl, brandy and more
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.24a released

Post by Deleted User 9295 »

Comment deleted.
Last edited by Deleted User 9295 on Sun Sep 26, 2021 10:28 pm, edited 1 time in total.
nicolagiacobbe
Posts: 215
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Re: BBC BASIC for SDL 2.0 version 1.24a released

Post by nicolagiacobbe »

Well. iOS is not my preferite platform but would be interesting to hear (in plain terms) why it won't work and what did apple do to render a difficult situation even worse.
User avatar
baz4096
Posts: 1101
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: BBC BASIC for SDL 2.0 version 1.24a released

Post by baz4096 »

I've had issues with SDL on iOS before. Commonly used functions, in my case for keyboard entry in a game, were suddenly classified as "potential keyloggers", and threw up FUD warnings to our users. Updates weren't accepted until we refactored and used different input functions. IIRC.
I run a little online shop called "Vintage Imitation Parts" to sell a few Acorn Archimedes and BBC Micro related bits and pieces, such as my imitation keyboard surrounds and just recently my imitation function strips.

Take a look! vintage.imitation.parts
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.24a released

Post by Deleted User 9295 »

I've released version 1.25a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    PAGE may now be lowered without generating an error. This is dangerous in general, but in limited memory environments (e.g. the Raspberry Pi Pico) it can be useful, as it was on the original BBC Micro.

    Implemented a new SUM operator which performs modulo-2^64 addition, i.e. overflows are ignored. Using this operator modulo-2^64 subtraction and multiplication functions can be written:

    Code: Select all

          DEF FNsub64(a%%,b%%)=a%%SUMNOTb%%SUM1
          DEF FNmul64(a%%,b%%)LOCALA%,B%:A%=a%%AND&7FFFFFFF:B%=b%%AND&7FFFFFFF
          =A%*B%SUM((a%%>>31)*B%<<<31)SUM(A%*(b%%>>31)<<<31)SUM((a%%>>31AND3)*(b%%>>31AND3)<<<62)
    
  2. IDEs and Utilities

    No changes (other than the version number of SDLIDE.bbc being updated).

  3. Libraries

    stringlib.bbc modified so that FN_binary() and FN_tobase() accept 64-bit integers.

  4. Example Programs

    There are no changes to the example programs in this release.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
Last edited by Deleted User 9295 on Fri Oct 08, 2021 11:17 pm, edited 2 times in total.
User avatar
BigEd
Posts: 6261
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: BBC BASIC for SDL 2.0 version 1.25a released

Post by BigEd »

> Using this operator modulo-2^64 subtraction and multiplication functions can be written

Hurrah!
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.25a released

Post by Deleted User 9295 »

BigEd wrote: Fri Oct 08, 2021 6:02 pm > Using this operator modulo-2^64 subtraction and multiplication functions can be written
Hurrah!
I've managed to simplify the modulo-264 multiplication routine a little:

Code: Select all

      DEF FNmul64(a%%,b%%)LOCALA%,B%:A%=a%%AND&7FFFFFFF:B%=b%%AND&7FFFFFFF:a%%=a%%>>31:b%%=b%%>>31
      =A%*B%SUM(a%%*B%<<<31)SUM(A%*b%%<<<31)SUM((a%%AND3)*(b%%AND3)<<<62)
Can anybody do any better?
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.25a released

Post by Deleted User 9295 »

Richard Russell wrote: Fri Oct 08, 2021 11:28 pm Can anybody do any better?
This is the program I used to verify my version, by comparing the result from FNmul64() with the equivalent x86-64 instruction:

Code: Select all

      DIM ]^P% 100,]^L% -1
      [OPT 11
      .mul64
      mov rax,[REL ^b%%]
      mul qword [REL ^c%%]
      mov [REL ^a%%],rax
      ret
      ]

      *hex 64
      REPEAT
        b%% = RND EOR RND <<< 32
        c%% = RND EOR RND <<< 32
        CALL mul64
        IF a%% <> FNmul64(b%%,c%%) PRINT "Failed: should be &";~a%% " but was &";~FNmul64(b%%,c%%)
        WAIT 0
      UNTIL FALSE
      END

      DEF FNmul64(a%%,b%%)LOCALA%,B%:A%=a%%AND&7FFFFFFF:B%=b%%AND&7FFFFFFF:a%%=a%%>>31:b%%=b%%>>31
      =A%*B%SUM(a%%*B%<<<31)SUM(A%*b%%<<<31)SUM((a%%AND3)*(b%%AND3)<<<62)
The *hex64 is present only so the 64-bit values can be printed in the event of a failure; the function works in *hex32 mode as well.
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.26a released

Post by Deleted User 9295 »

I've released version 1.26a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    Changed the behaviour of VDU 127 (DEL) in VDU 5 mode to correspond to that of Acorn systems, i.e. the background GCOL mode is ignored.

    Fixed a bug causing VDU 127 not to work correctly in VDU 5 mode if the text direction has been changed.

    Fixed a bug (in ARM and 64-bit editions only) whereby characters plotted in VDU 5 mode could not be read back using GET(x,y).

  2. IDEs and Utilities

    Fixed a minor bug in SDLIDE.bbc which could cause incorrect indentation of lines added at the end of a program.

    Modified compiler.bbc so that message boxes still work when path names are very long.

    Modified compiler.bbc (on Windows only) to be tolerant of spaces in the path to BBCSDL.

  3. Libraries

    Added gfxlib.bbc which partially emulates David Williams's GFXLIB2 library for BB4W; see gfxlib_docs.pdf for a detailed description.

    Added audiolib to support playing music (including MP3) and sound effects.

    Modified dlglib so that it works correctly if @ox% or @oy% is non-zero, or the graphics ORIGIN has been moved.

  4. Example Programs

    Added cowboy.bbc in examples/games; this is David Williams's GFXLIB2 demo for BB4W, converted to use the new gfxlib library.

    Added metronome.bbc in examples/sounds (this is also compatible with BBC BASIC for Windows).

    Modified lemmings.bbc and tower.bbc to use the new audiolib library.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.26a released

Post by Deleted User 9295 »

Richard Russell wrote: Fri Nov 19, 2021 1:50 pm Added metronome.bbc in examples/sounds (this is also compatible with BBC BASIC for Windows).
Here's a screen grab. I considered posting a video, but it could have been one of the most boring and irritating videos ever! You can however run it yourself (without needing to install anything) here.

metronome.png
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.26a released

Post by Deleted User 9295 »

Sadly it would appear that, once again, the latest version of SDL 2.0 (which I used to build the Windows release of BBCSDL v1.26a) has suffered a regression which affects graphics plotting. In particular, but not limited to, RECTANGLE FILL no longer draws a rectangle inclusive of the bounding coordinates, which it should (and did up until this latest release). :(

So I've rebuilt the Windows edition with an earlier version of SDL (2.0.16) and updated the Zip available for download to v1.26b. Sorry about this, but I'm dependent on SDL2 working as it's advertised to, and if it doesn't things inevitably go wrong.

I have reported this regression at the SDL forum; there's been no response so far.
nicolagiacobbe
Posts: 215
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Re: BBC BASIC for SDL 2.0 version 1.26a released

Post by nicolagiacobbe »

Many thanks as always Russell, the FNmul64() is a nice touch that remind me of one thing: is there a BBC basic library for unlimited length arithmetic?
I had to write my own routines for dealing with big numbers but they weren't optimized for sure (I have also to add that even in that form they were well up to the job but finding something more efficient would be nice).
Deleted User 9295

Re: BBC BASIC for SDL 2.0 version 1.26a released

Post by Deleted User 9295 »

nicolagiacobbe wrote: Sun Dec 05, 2021 8:24 pm is there a BBC basic library for unlimited length arithmetic?
There's bigint.bbc (supplied with BBCSDL) but it was never finished, for example it has unsigned arithmetic but not signed arithmetic.

Of course there are off-the-shelf libraries like MAPM and GMP and many others which you can call from BBC BASIC.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

BBC BASIC for SDL 2.0 version 1.27a released

Post by Soruk »

Richard has released version 1.27a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:

1. BASIC Interpreter / Run Time Engine

Treat hexadecimal pointers in *LOAD commands etc. as unsigned numbers.

Disable ON ERROR when in AUTO line-entry mode (64-bit and ARM editions only).

2. IDEs and Utilities

The compiler utility can now build a 'web application' bundle to deploy online using https://wasm.bbcbasic.co.uk/bbcsdl.html?app=<URL of web bundle>.

Fixed a race-hazard in the debugger which could cause a rare crash during variable listing.

3. Libraries

Updated gfxlib and gfxlib_docs.pdf to add PROC_gfxPlotColumnListScale, PROC_gfxPlotRowListScale and FN_gfxLoadTextureSwapRGB.

Updated audiolib to add PROC_mixCancel (truncates a sound effect) and PROC_mixSoundLevel (plays a sound effect at a specified level).

4. Example Programs

Added candle.bbc (in examples/graphics), an animation of a burning candle, adapted from a program by David Williams.

Added compiler directives to a few examples so they run as web applications without modification.


This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).

Richard is unlikely to see any feedback in this thread, this is a repost from here.
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

BBC BASIC for SDL 2.0 version 1.28a released

Post by Soruk »

Richard has released version 1.28a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:

1. BASIC Interpreter / Run Time Engine

Updated SDL2_ttf to version 2.0.18 (Windows edition only); note that this changes the appearance of some fonts, especially in small sizes.

ARM and 64-bit versions brought into line with 32-bit x86 versions in a couple of minor respects.

2. IDEs and Utilities

Updated about.bbc to be compatible with SDL2_ttf version 2.0.18 or later (in reporting the version of FreeType).

3. Libraries

Updated imglib.bbc to support displaying animated GIFs (there is an updated BB4W library too).

Updated gfxlib.bbc to include PROC_gfxGaussianBlur3x3 (also updated gfxlib_docs.pdf).

Updated dlglib.bbc to behave better with SDL2_ttf version 2.0.18 or later.

4. Example Programs

Added anigif.bbc (in examples/graphics) to illustrate displaying an animated GIF.

Modified telstar.bbc so that F11 sends a carriage-return character to the line.


This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: BBC BASIC for SDL 2.0 version 1.28a released

Post by Soruk »

Richard has released version 1.29a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    Added support for Serial I/O (e.g. EXT# returning the number of bytes waiting in a serial input buffer).

    Fixed a minor graphics bug which could cause fill operations to fail if an odd-value relative coordinate was supplied.
  2. IDEs and Utilities

    Updated searchin.bbc to avoid it being confused by an Acorn-format tokenised program.

    Improved error reporting if SDLIDE.bbc fails to create a temporary file.
  3. Libraries

    Optimised aagfxlib by calling SDL2 API functions by address rather than by name.
  4. Example Programs

    Added conway.bbc (in examples/general), a version of Conway's Game of Life in which the calculations are performed by the GPU.

    Added video.bbc (in examples/general) as a proof-of-principle demonstration of playing a video, albeit uncompressed and with no sound.
Important note for Android users: the Code Signing Certificate has been updated, and because the company from which I have previously obtained them has closed down the new certificate has a different ID. You will need to uninstall BBC BASIC before you can install v1.29a; take care to backup (e.g. to a PC) anything you need in @usr$.

This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: BBC BASIC for SDL 2.0 version 1.30a released

Post by Soruk »

Richard has released version 1.30a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    OS Filing System errors now update the SDL error string, for the convenience of BASIC programs.

    iOS edition only: Reduced size of the back button on iPads.

    iOS edition only: Reinstated the ability to create a home screen icon to run a specific BASIC program (which stopped working at some point).
  2. IDEs and Utilities

    The Compile utility no longer quits if an embedded file cannot be found.

    Touch IDE: The background may now be selected from a choice of eight colours.

    Android and iOS only: added the ability to disable or enable fullscreen mode.
  3. Libraries

    Updated gfxlib to accept negative inter-character spacing values (@vdu.w.d&).
  4. Example Programs

    Added bugs.bbc (in examples/games), written by David Williams in 2006 based on the Flash game Ladybug Sumo.

    Added pageturn.bbc (in examples/graphics) which is a BBCSDL conversion of the old BB4W demo.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: BBC BASIC for SDL 2.0 version 1.31a released

Post by Soruk »

Richard has released version 1.31a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    Updated the bundled stb_image library to version 2.2.7.

    (Windows and MacOS editions only) Updated the bundled SDL library to version 2.0.22.

    (Windows and MacOS editions only) Updated the bundled SDL_ttf library to version 2.0.18, which includes FreeType version 2.10.4.
  2. IDEs and Utilities

    Updated compiler.bbc to allow the selection of multiple embedded files.

    Updated SDLIDE.bbc to ensure compatibility with SDL version 2.0.22.
  3. Libraries

    Extended dlglib.bbc to support multiple-selection listboxes (LBS_MULTIPLESEL or LBS_EXTENDEDSEL style).

    Extended filedlg.bbc to support the selection of multiple files.

    Updated pdflib.bbc to ensure compatibility with SDL2_ttf version 2.0.18.
  4. Example Programs

    Added pdfdemo.bbc (in examples/general) to demonstrate creating a PDF file.

    Updated the list of available videotex services in telstar.bbc.

    Fixed a minor bug in pageturn.bbc affecting the shading of the 'fold'.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

BBC BASIC for SDL 2.0 version 1.32a released

Post by Soruk »

Richard has released version 1.32a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    Fixed a minor issue affecting returned ON MOUSE coordinates when @panx% is negative.

  2. IDEs and Utilities

    Updated SDLIDE to support keyword abbreviations (but you are recommended not to use them!).

  3. Libraries

    Added mysqllib.bbc for queryimg a MySQL database (not compatible with the in-browser edition).

  4. Example Programs

    Added mysqldem.bbc (in examples/general) to demonstrate the mysqllib library by querying a public database.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).

Richard has also announced elsewhere:
Richard Russell wrote: As you know, the release of v1.32a was over two weeks late. I really struggled to maintain enough concentration to get it ready at all, and I am forced to accept that my condition has deteriorated to a point where I won't be able to do routine development work. So I am formally announcing that BBC BASIC for SDL 2.0 is entering a new phase, and you should not expect any further regular updates.
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.
Soruk
Posts: 1136
Joined: Mon Jul 09, 2018 11:31 am
Location: Basingstoke, Hampshire
Contact:

Re: BBC BASIC for SDL 2.0 version 1.32a released

Post by Soruk »

Richard has released version 1.33a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, Mac OS, Linux, Raspberry Pi OS, Android, iOS and in-browser. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    The *FLOAT 80 command has been enabled in ARM editions, because although they do not support 80-bit floats the
    command is needed to be able to write a 64-bit integer to a data file without loss of precision.

  2. IDEs and Utilities

    Fixed compiler.bbc failing to upload a web bundle for testing, more than once per session.

  3. Libraries

    Added FN_readlinesocketM() to socklib.bbc, for use when multiple concurrent connections are open.

  4. Example Programs

    Modified Ceefax.bbc to restore functionality of the Sport index after a change to the BBC website.
This version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspberry Pi, Android, iOS, 64-bit Linux and in-browser editions, currently).
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.
Post Reply

Return to “modern implementations of classic programming languages”