Raspberry BASIC

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Richard Russell

Pages: 1 [2] 3 4 5
16
BBC BASIC / BBC BASIC for SDL 2.0 version 1.27a released
« on: December 30, 2021, 05:17:13 PM »
I've 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:

  • BASIC Interpreter / Run Time Engine

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

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

  • 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.

  • 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).

  • 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).


17
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: November 27, 2021, 05:48:35 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.39.  The changes in this version are:

  • Fixed an off-by-one bug which resulted in a crash if the response to an INPUT LINE statement was a maximum length string (255 characters).

  • Added a new example program patience.bbc which is a simple Patience (Solitaire) program, adapted from one first published in Practical Computing nearly 40 years ago!  Note that it uses VT100 line-drawing characters, which may need to be enabled in some terminal emulators (particularly PuTTY).  See the code for more information.
Version 0.39 may be downloaded from the usual place:


18
BBC BASIC / BBC BASIC for SDL 2.0 version 1.26a released
« on: November 19, 2021, 01:54:45 PM »
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:

  • 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).

  • 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.

  • 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.

  • 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).

19
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: October 21, 2021, 11:33:35 AM »
I have updated the Console Mode editions of BBC BASIC to version 0.38.  The changes in this version are:

  • The SUM operator has been introduced, which does modulo-2⁶⁴ addition (modulo 2⁶⁴ subtraction and multiplication are also possible using it); this brings the console editions into line with BBC BASIC for SDL 2.0.

  • The Raspberry Pi Pico  edition now has a working assembler (thanks to Memotech Bill), which supports the subset of the Thumb 2 instruction set executed by the ARM Cortex-M0+ CPU.  A new example program hello.bbc is included to demonstrate its use.

Version 0.38 may be downloaded from the usual place:


The Raspberry Pi Pico download consists of a UF2 file containing a flash image, including an initialised filesystem.  To program the Pico, connect it via USB whilst the button is pressed; it will appear as an external drive (typically D:\ in Windows or /dev/ttyACM0 on a Pi).  Then copy the UF2 file to that drive.

20
BBC BASIC / BBC BASIC for SDL 2.0 version 1.25a released
« on: October 08, 2021, 03:58:15 PM »
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:

  • 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]
      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)
  • IDEs and Utilities

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

  • Libraries

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

  • 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).

21
BBC BASIC / BBC BASIC for the Raspberry Pi Pico
« on: August 26, 2021, 02:39:52 PM »
Eric Olson and 'Memotech Bill' have developed a version of BBC BASIC (based on mine) for the Raspberry Pi Pico, it's a Work In Progress but is substantially working and can run all the example programs supplied with the Console Mode editions.  There's a GitHub repository here.

Despite the Pico being a $5 microcontroller with only 264K of RAM it suits this application very well, not least because of BBC BASIC's simple memory management (which was of course originally designed for a machine with only as little as 16K of RAM, the BBC Micro).  Something like 240K of memory is available for the BASIC program, variables, stack and libraries.

22
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: August 26, 2021, 02:26:06 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.36.  The changes in this version are:

  • Fixed a memory leak which could occur if you incompletely initialise a string array from a list of literals.

  • Added macros to support CPUs having strict alignment requirements (e.g. the ARM Cortex-M0+).

  • Reduced the memory footprint by removing unneccessary sound and graphics allocations.

  • Allow PAGE to be reduced (if you are aware of the dangers) in low-memory situations.

  • Added a fix (in Windows only) for fread() not always updating the file pointer correctly (this appears not to affect 64-bit Windows but it's safer to fix it anyway).

Version 0.36 may be downloaded from the usual place:


23
BBC BASIC / BBC BASIC for SDL 2.0 version 1.24a released
« on: August 20, 2021, 05:37:41 PM »
I've released version 1.24a 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:

  • BASIC Interpreter / Run Time Engine

    Implemented GCOL modes 5-7 (in the web edition these are approximated by the closest available blend modes).

    Relative plot commands (e.g. DRAW BY x,y) no longer discard the LS bit of the offsets.

    Fixed a memory leak which could occur if you incompletely initialise a string array from a list of literals.

    Added macros to support CPUs having strict alignment requirements (e.g. the ARM Cortex-M1).

    Updated Emscripten to version 2.0.5 (still old, but recent versions won't run BBC BASIC owing to an SDL threading deadlock).

  • IDEs and Utilities

    SDLIDE now captures the mouse while dragging, to avoid an anomaly that could result if the drag continued beyond the edge of the window.  Also fixed another bug affecting dragging.

    Fixed Alt+F X (keyboard shortcut for Exit) not working in SDLIDE (oops!).

  • Libraries

    Updated ellipse.bbc to support GCOL modes 5-7.

  • 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).

24
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: July 20, 2021, 09:19:08 PM »
You would think the Raspberry Pi Foundation would have learned their lesson trying to offer your own OS.

I will concentrate on supporting whichever OS is more popular with users.  It's obvious that many more Raspberry Pis will be running the official 64-bit Debian than the unofficial 64-bit Ubuntu.

25
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: July 20, 2021, 10:30:46 AM »
Ubuntu 64 for the RPI is an option of the official RPi installer.

I didn't use an "installer", I just downloaded this 64-bit OS image and flashed it into a memory card.  I don't see any 64-bit Ubuntu image at that site.

Quote
Based on the support and updates coming from Ubuntu for the RPi 64 I foresee Ubuntu becoming RPi's default 64 bit offering.

That isn't the impression I've gained from 'official' pronouncements.  The description of the current 64-bit version of Raspberry Pi OS (Debian) as 'beta test' makes me think that is what will become the default 64-bit offering.  For example see this (long) thread at the forum.

26
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: July 20, 2021, 08:21:24 AM »
Would this version allow me to run BBC BASIC on my Ubuntu ARM 64 bit OS on a RPi 4B?

I only intend to build binaries for 'official' releases of Raspberry Pi OS (which is Debian, not Ubuntu) so currently that's the 32-bit 'stable' release and the 64-bit beta-test version.  My expectation would be that the Console Mode edition of BBC BASIC is unlikely to care whether it's Debian or Ubuntu, but the GUI version might be more fussy because of its dependence on graphics drivers etc.

If it turns out that the binary is not compatible with Ubuntu you could easily build a custom version (either Console or GUI) from the source, which should have a better chance of running.

27
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: July 18, 2021, 02:13:34 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.35.  The changes in this version are:

  • An edition for the 64-bit Raspberry Pi OS (currently in beta test) has been added.  This typically runs more than twice as fast as the 32-bit Raspberry Pi edition.

  • The Mac M1 ('Apple Silicon') edition now has an AArch64 assembler.  It has limited usefulness because Apple enforce the Hardened Runtime on this platform, but you could still use it to export assembled code to a file.

Version 0.35 may be downloaded from the usual place:


28
BBC BASIC / BBC BASIC for SDL 2.0 version 1.23a released
« on: July 09, 2021, 01:19:32 PM »
I've released version 1.23a 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:

  • BASIC Interpreter / Run Time Engine

    An experimental build for the 64-bit Raspberry Pi OS has been added (with many thanks to Simon Willcocks who wrote the AArch64 assembler which made it possible).  This runs more than twice as fast as the 32-bit Pi OS edition!

    On a MODE change, the window will be centered only if it would otherwise extend beyond the edge of the desktop.

    If SDL's message system is unavailable (which it currently is on 64-bit Pi OS), fatal errors will be reported in a MODE 7 window.

  • IDEs and Utilities

    Extended SDLIDE.bbc so Ctrl+Backspace is delete word left and Ctrl+Delete is delete word right.  Alt (Option) may be used instead of Ctrl, for compatibility with Apple Macs.

    Extended the Cross Reference utility to report mismatched quotes, parentheses and braces.

    Fixed a couple of minor bugs in the Cruncher, one of which could cause the output file to be larger than it needed to be.

    Updated BBCEdit to version 0.38.1, with thanks to Andy Parkes.

  • Libraries

    Added msgbox.bbc which provides support for Message Boxes, similar to those available in Windows.

    Updated filedlg to save and restore the VDU state (e.g. colours, viewports).

    Updated the Box2D libraries to be compatible with the 64-bit Raspberry Pi OS.

    Extended sdldebug.bbc and timerlib.bbc to include a 64-bit ARM (AArch64) version of the assembler code.

  • Example Programs

    Extended hello.bbc to include a 64-bit ARM (AArch64) version of the assembler code.

    Simplified telstar.bbc by using the built-in MODE 7 font in BBCSDL (and MODE7LIB in BB4W).

    Updated several examples to replace SDL's message boxes with BBC BASIC-created ones.

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).

29
BBC BASIC / Re: New: Console Mode editions of BBC BASIC
« on: June 11, 2021, 02:57:53 PM »
I have updated the Console Mode editions of BBC BASIC to version 0.34.  The changes in this version are:

  • I've (hopefully) worked around the apparent bug in MinGW's implementation of the _ftelli64() function.
  • Execution speed has been improved by about 10% by optimising the expression evaluator.

Version 0.34 may be downloaded from the usual place:


30
BBC BASIC / BBC BASIC for SDL 2.0 version 1.22a released
« on: May 28, 2021, 04:56:15 PM »
I've released version 1.22a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android, iOS and in-browser.  The changes in this version are as follows:

  • BASIC Interpreter / Run Time Engine

    Cmd+left, Cmd+right, Cmd+up and Cmd+down are mapped to Home, End, Ctrl+Home and Ctrl+End, respectively, for improved compatibility with Apple Macs.

    In the in-browser edition *RUN now runs JavaScript code (previously it did nothing useful) e.g. OSCLI "window.open(""http://www.rtrussell.co.uk"")"

    The QUIT n statement can now accept a parameter of zero (ARM and 64-bit editions only, 32-bit x86 editions always could).

    A few performance optimisations have been carried out (e.g. fixing memory alignment issues).

  • IDEs and Utilities

    In SDLIDE.bbc Alt+left and Alt+right are mapped to Word Left and Word Right, respectively, for improved compatibility with Apple Macs.

    Added a -P command-line switch to SDLIDE.bbc to activate the profiler.

    The Android and iOS editions report if a later version is available.

  • Libraries

    Changed gleslib.bbc and ogllib.bbc to call glLightfv by address rather than name.

  • Example Programs

    Added Newton's Cradle simulation (cradle.bbc in examples/physics).

    Bundled the set of instructive Box2D demos in examples/physics/samples (these all use Debug Draw graphics).

    Updated sudoku.bbc to add Tidy and New Game options (the difficulty of the generated game is very variable!).

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, Raspbian, Android, iOS, 64-bit Linux and in-browser editions, currently).

Pages: 1 [2] 3 4 5