RISC OS


RISC OS-related links

Google Groups (comp.sys.acorn.programmer)
Raspberry Pi RISC OS forum
RISC OS Open Ltd. forum
Stardot
The Icon Bar
AMCOG Games


Click here to see my BBC BASIC-related YouTube™ videos


I primarily use RPCEmu running RISC OS 5.xx to write programs (mostly simple games and graphical ditties) for RISC OS, although my target platform is the Raspberry Pi (and more specifically, the Raspberry Pi 2 which I consider my ‘minimum spec’ platform). Generally, I'm not concerned with ensuring that my programs are compatible with RISC OS 3, 4 or 6 - I develop for RISC OS 5, maintained & developed by RISC OS Open Limited. If, in due course, I create a vaguely saleable game or other type of program, then of course I shall endeavour to make sure it runs under as many different RISC OS flavours and ARM-based hardware configurations as possible.

Note: Many of these programs are subject to more-or-less continual revision, incremental improvement and optimisation.
Also note that these programs are NOT intended to be exemplares of good programming practice, or of efficient and optimised code. They will invariably contain clumsy code and inefficient algorithms. You've been warned!

Program Type Vers Screenshot Description Download Code Filetype Notes
Lifeform Demo 1.0 A worm-like creature moves organically around the screen. Comes in two versions: ‘Lifeform’ uses a 800x600 screen mode, and runs at 60+ fps on a Raspberry Pi 2. ‘Lifeform2’ uses a 640x480 screen mode, but employs anti-aliasing to reduce the appearance of ‘jaggies’. This version runs at around 30 fps on an RPi2. Lifeform:
Crunched

Lifeform2:
Crunched
Lifeform:
BASIC
Lifeform2:
BASIC & ASM
BASIC (&FFB) -
Star Wars opening crawl Demo 1.0 Runs at 60+ fps on a Raspberry Pi 2. 100% BASIC, uses OS_SpriteOp to render all graphics (except the stars which are 'poked' directly inside a BASIC loop). Download
BASIC Zip (&A91) Use !SparkFS to open.
Face64x64 Demo 1.0 Pseudo-‘texture mapping’ in BASIC (never a good idea!). A miserable frame rate on the Raspberry Pi 2 (6 or 7 fps!). The image consists of 64x64 (= 4096) quadrilaterals, and involves many thousands of floating point maths operations every frame. Download
BASIC ArcFSArc (&3FB) Use !SparkFS to open.
Spinny Demo 1.0 Sprites dancing around on a rotating background. 60+ fps on a Raspberry Pi 2. Download
BASIC ArcFSArc (&3FB) Use !SparkFS to open.
Nematodes Demo 1.0 Nematodes slithering around on the screen. 60+ fps on a Raspberry Pi 2 (based on 5 nematodes with shadows). Download
BASIC ArcFSArc (&3FB) Turning the shadows off may improve performance. A lot of floating point maths going on in this program, and most (if not all) of it could be converted to use only fixed-point arithmetic and lookup tables. I'd expect a significant boost in performance.
Use !SparkFS to open.
Worm Demo 1.0 'Snake' would have been a better title, admittedly. Move a little spotted worm around the screen with the mouse. 60+ fps on a Raspberry Pi 2. Download
BASIC ArcFSArc (&3FB) Three screen resolutions are offered, but not all of them are available on some systems. This program creates pre-rotated sprites (realtime sprite rotation not practical with OS_SpriteOp!). Preparing all the sprites takes around 16 seconds on a Raspberry Pi 2. Program is 99% BASIC, with a little assembler code to create sprite masks and the shadow sprites.
Use !SparkFS to open.
RndAliens Demo 1.0 60 - 70 fps on a Raspberry Pi 2 (30 sprites with shadows). Randomly generated 'alien' sprites flying around on the screen. Press up/down arrow keys to increase/decrease number of sprites. Press 'S' to toggle shadows on/off. Crunched
BASIC BASIC (&FFB) Significant efficiency boosts would come from using fixed-point integers and lookup tables for, e.g. inverse tangent. The program is mostly BASIC and OS_SpriteOp is used to draw the sprites, but a little bit of machine code was necessary in order to create the transparency masks (otherwise it would take an age in BASIC!). The main loop is 100% BASIC.
Rope Demo 1.0 2D rope physics. Original FreeBASIC version by Michael Nissen; converted to 'BBC BASIC for Windows' by DW, then subsequently modified for ARM BBC BASIC V (by DW again). Crunched
Uncrunched
BASIC BASIC (&FFB) -
Tunnel Demo 1.0 A pseudo-3D tunnel effect.
Frame rates - Tunnel 1: 59/60 fps, Tunnel 2: 30 fps, Tunnel 3: 60 fps.
The frame rates are based on running the crunched versions of the programs on a Raspberry Pi 2.
Tunnel 1:
Crunched
Uncrunched
Tunnel 2:
Crunched
Uncrunched
Tunnel 3:
Crunched
Uncrunched
BASIC BASIC (&FFB) -
Chunky, low-res rasters Demo 1.0 Simulates old, chunky, low-res CRT rasters. Apart from that, there's really not much point to this little demo! It runs at 58-60 fps on a Raspberry Pi 2. Crunched
Uncrunched
BASIC BASIC (&FFB) -
Rotating RPi Logo II Demo 1.0 The RPi logo rotating in three dimensions. A rather variable frame rate, but typically 50-60 fps on a Raspberry Pi 2. It still uses the previously-mentioned inefficient method to scale and perspectivize the sprite. Download BASIC ArcFSArc (&3FB) -
BodgerBAS Demo 1.2 & 1.5 A 2013, BBC BASIC remake of ArcEmpire's 1991 mini-demo, 'Bodgering'. The original version was written in ARM assembly language (using BASIC V's assembler), and of course runs at (at least) 50 fps on an 8MHz ARM2 machine. My remake should hopefully run at 50 fps (or more) on a 25MHz ARM3 (it won't run at all on an ARM2 or ARM250 -- too slow!). ARM3 version:
Download

Raspberry Pi version:
Download

Original 1991 (ASM) version:
Download
BASIC ArcFSArc (&3FB) The ARM3 version runs fine under Arculator (RISC OS 3.1, ARM3 @ 25MHz), and under RPCEmu (RISC OS 3.7 and 5.21). It is intended for ARM3 machines. The ARM3 version won't run correctly on the Raspberry Pi.
3D Scroller Demo 1.0 A Star Wars-style opening crawl effect (you know what I'm referring to!). This one runs at 20 fps on a Raspberry Pi 2, but the scroller should run at more-or-less the same speed across different RISC OS + ARM configurations. It runs at a pitiful 3 fps on my laptop PC under RPCEmu. :-( Download (includes non-crunched source)
BASIC ArcFSArc (&3FB) Download size is 1.55 MB, expanding to nearly 16 MB (the archive contains a large BMP-format image). It takes a few seconds to load the image (especially if running the program straight out of the archive), and to convert the BMP image to RISC OS sprite format. I use !SparkFS on the Raspberry Pi 2.
RotZoom 3D Demo 1.0 A sprite rotating in 3D about all three axes at 60 fps (on a Raspberry Pi 2). Download (includes non-crunched source)
BASIC ArcFSArc (&3FB) Use !SparkFS to open.
Sprite Zoom 3D II Demo 1.0 Uses pre-scaled sprites... and a lot of memory (130 MB)!. This version features a larger image (640x640 as opposed to the 480x480 one employed in the previous version). Maintains a fairly consistent 60 fps on the Raspberry Pi 2. Download (includes non-crunched source)
BASIC ArcFSArc (&3FB) Use !SparkFS to open.
Stars III Demo 1.0 Zooms around a finite starfield consisting of 1000 stars. The starfield is contained within a 40000x40000x40000 box. 60 fps on a Raspberry Pi 2 (occasionally drops down to 58/59 fps). Coming soon (maybe): an infinite starfield! This effect's a bit lame as, whilst you're moving around in 3D, you're always facing the same direction. Hi-res:
Crunched
Uncrunched

Lo-res:
Crunched
Uncrunched
BASIC BASIC (&FFB) Tested under RISC OS 5.21 on a standard Raspberry Pi 2, and RPCEmu.
Sprite Zoom 3D Demo 1.0 OS_SpriteOp 52 in action! Long-time RISC OS users might remember ArcEmpire's Transmortal demo. Well, the effect produced by this little prog may serve as a reminder. Real-time (no pre-rendered frames). Runs at a fairly consistent 60 fps on a standard Raspberry Pi 2 (which rather surprised me given the sheer naffness of the method employed). Download (includes non-crunched source)
BASIC ArcFSArc (&3FB) On the Raspberry Pi 2 use a compatible version of !SparkFS or !SparkPlug because ArcFS doesn't seem to work properly on the RPi 2.
Sprite Warp Demo 1.0 More fun with OS_SpriteOp. :-)
60 fps on a standard Raspberry Pi 2.
Crunched

Crunched (with colourful background)
BASIC BASIC (&FFB) Tested under RISC OS 5.21 on a standard Raspberry Pi 2, and RPCEmu.
3D landcape Demo 1.0 Flying around a landscape somewhat reminiscent of the one in Zarch. 30 fps on a standard Raspberry Pi 2. Crunched (640x480; 256 colours)

Crunched (320x256; 256 colours)
BASIC BASIC (&FFB) Tested under RISC OS 5.21 on a standard Raspberry Pi 2, and RPCEmu.
3D ROOL logo Demo 1.0 Displays the ROOL (RISC OS Open Ltd.) logo rotating in 3D. The rotating object comprises 237 ‘vector balls’ depth-sorted and Z-scaled. Crunched

Crunched (Variation 1)
Crunched (Variation 2)
BASIC BASIC (&FFB) Tested under RISC OS 5.21 on a standard Raspberry Pi 2, and RPCEmu.
3D spiral Demo 1.0 Displays a rotating 3D spiral consisting of Z-scaled and depth-sorted ball sprites. Crunched
(16M colours)

Crunched
(256 colours)
BASIC BASIC (&FFB) Tested on a Raspberry Pi 2 and RPCEmu, each running RISC OS 5.21. High frame rate (50 - 60 fps) on the RPi 2 for the 256-colour version; ~30 fps for 16M-colour version. There is a startup delay as sprites are being pre-scaled and ‘colorized’.
Pseudo-3D starfield 2 Demo 1.0 Draws a pseudo-3D starfield using scaled sprites. 60 fps on a Raspberry Pi 2. Crunched Uncrunched Text BASIC BASIC (&FFB) RISC OS 5.21+ only. Uses a 32bpp (16M colours) screen mode.
Smooth lines Demo 1.2 Draws anti-aliased straight lines using an effective but admittedly quite naive, inefficient method. These are notWu anti-aliased lines’, which are probably more efficient (though not necessarily better-looking, I think!). Press the up/down arrow keys to increase/decrease the number of lines; press 'A' to toggle between anti-aliased lines and chunky lines drawn by RISC OS graphics routines. Crunched Uncrunched Text BASIC & ASM BASIC (&FFB) -
Pseudo-3D starfield Demo 1.3 A pseudo-3D starfield. 60 fps on a Raspberry Pi 2. Crunched Uncrunched Text BASIC BASIC (&FFB) -
Rotating ROOL logo Demo 1.4 The RISC OS Open Ltd. logo (or my approximate rendering of it) rotating in very nearly three dimensions. 60 fps on a Raspberry Pi 2. Crunched Uncrunched Text BASIC BASIC (&FFB) -
Rotating ROOL logo + pseudo-3D starfield Demo 1.7 The RISC OS Open Ltd. logo plus starfield. 58-60 fps on an RPi2. I had to resort to a little bit of assembly language to generate a sprite mask on-the-fly, because this useful bit of functionality is sadly missing from the standard RISC OS SpriteOp SWI. Crunched Uncrunched Text BASIC & ASM BASIC (&FFB) -
Rotating RPi logo Demo 1.4 Rotating RPi logo. 58-60 fps on a Raspberry Pi 2. Many significant optimisations are possible. Crunched Uncrunched Text BASIC BASIC (&FFB) -
Bugs Game 1.02 RISC OS version of the Flash-based original. A very simple game. Possibly the first RISC OS game to feature real-time anti-aliased sprites. Developed primarily with RPCEmu. Click here BASIC & ASM ArcFSArc (&3FB) -

Contact:   webmaster AT proggies DOT uk

This page was last updated on 18-Feb-2016