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

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

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

4
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:


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

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

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

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

9
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:


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

11
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:


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

13
BBC BASIC / BBC BASIC for SDL 2.0 version 1.21a released
« on: April 16, 2021, 01:41:25 pm »
I've released version 1.21a 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

    Mapped keyboard shortcuts Cmd+A, Cmd+C, Cmd+F, Cmd+V, Cmd+X and Cmd+Z to their Ctrl equivalents for improved compatibility with Apple Macs.

    Fixed a couple of minor differences between the 32-bit x86 editions and the ARM/64-bit editions.

  • IDEs and Utilities

    Added compiler directives to SDLIDE.bbc to simplify building a standalone version in BB4W.

    Modified memusage.bbc, profiler.bbc, searchin.bbc and sdldebug.bbc to be compatible with BB4W as well as BBCSDL.

  • Libraries

    Added box2ddbg.bbc to support Box2D Debug Graphics, largely compatible with the equivalent BB4W library.

    Fixed a bug in box2dlib.bbc affecting Gear Joints on 64-bit platforms.

    Fixed a bug in dlglib.bbc causing the trackbar control not to scale to the specified range.

    Fixed a bug in treeview.bbc causing mouse clicks not to be reliably detected.

  • Example Programs

    Added pinball.bbc (in examples/physics) which demonstrates combining Box2D and 3D rendering.

    Added voronoi.bbc (in examples/graphics/) which is another shader demo.

    Modified recorder.bbc to increase the range of level adjustment (100% is now 'mid-range').

    Modified the other demos in examples/physics to take advantage of the box2ddbg library (press D to display the Debug Graphics).
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).

14
BBC BASIC / BBC BASIC for SDL 2.0 version 1.20a released
« on: March 04, 2021, 08:08:19 pm »
I've released version 1.20a 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

    Fixed FOR...NEXT loops misbehaving with negative non-integer STEP on ARM editions (Raspberry Pi, Android, iOS).

    Fixed *KEY not correctly handling strings such as |!|H (ARM and 64-bit editions only).

  • IDEs and Utilities

    Fixed compiler.bbc incorrectly crunching structure members in rare circumstances.

    Fixed SDLIDE.bbc crashing in MacOS if the Tab key was pressed.

  • Libraries

    Modified webgllib.bbc to be 64-bit compatible (it can be used on platforms other than in-browser).

    Modified filedlg.bbc so that you can type a full (absolute) path into the File name box.

    Modified menulib.bbc so that drop-down menus can be hidden from the menu bar (by setting their title to an empty string).

    Fixed editbox.bbc not reliably setting the 'changed' flag, and mispositioning the caret on blank lines.

  • Example Programs

    Modified Ceefax.bbc to add function key shortcuts (f1-f4) for the coloured buttons; also fixed a crash if a page number with a leading zero was entered.

    Modified sudoku.bbc so the timeout only applies to the 'Count' option, not to 'Solve', so it can solve any puzzle even on slow machines.
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).

15
BBC BASIC / BBC BASIC for SDL 2.0 version 1.18a released
« on: December 04, 2020, 12:28:38 pm »
I've released version 1.18a 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

    Added a new command-line switch -borderless to remove the title bar.

    Extended the PTR() pseudo-variable (again) to accept a function or procedure name as a parameter.

    Fixed an obscure bug which could cause a star-command to crash if within 256 bytes of the end of a library!

  • IDEs and Utilities

    Updated BBCEdit to version 0.37.2, which speeds up directory listings when there are many files.

    Modified SDLIDE to make the behaviour of Backspace more consistent, for example you can backspace through the line-number field.

  • Libraries

    Added Svein's excellent pdflib library for creating PDF files (single A4 page only).

    Fixed a bug in aagfxlib causing 'dashed' lines to be sometimes drawn slightly too long.

    Modified box2dgfx, imglib, shaderlib and webgllib to clip to the current graphics viewport, if any.

  • Example Programs

    Added saa505x.bbc in examples/tools, to demonstrate the different MODE 7 character sets.

    Added raytrace.bbc in examples/graphics, another shader demo from Shadertoy.com.

    Updated aagfxdem.bbc in examples/graphics, to check that 'dashed' lines are the right length.


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

Please remember that if you use the BBC2APK Android Application Generator you should download a new APK template to ensure that any updates to the run-time engine are incorporated in your own apps.

Pages: [1] 2 3 4