RISC OS programming



These programming resources are intended for ARM powered computers running RISC OS. The title and icon of each package are linked to the relevant Zip archive for download. On RISC OS computers Zip files may be opened using SparkPlug, SparkFS (commercial) or Infozip.


Directory iconCBLibrary

(Also available without source code - smaller download.)

Description

This is yet another C library for RISC OS. Actually, it is more like a personal collection of modules that happen to be common to many of my applications. It has a large number of external dependencies, including most of the libraries supplied with the Acorn C/C++ development suite.

I do not seriously expect many other programmers to use CBLibrary, but it has to be in the public domain in order that the programs that use it can meaningfully be released under the GNU General Public Licence.

Four library modules provide a complete implementation of the data transfer, drag and drop, and clipboard protocols described in the RISC OS 3 PRM and application notes 240 and 241.

Another module usurps calls to Acorn's flex library functions and redirects them to Simon P. Bullen's fortified memory allocation shell (as a debugging aid).

Other useful functionality: a null event manager that can schedule functions to be called back at timed intervals, iterator objects for traversing a directory tree, string buffers that manage their own memory allocation and provide a single-step undo history, and a list of user data with methods to enumerate unsaved data or find data by file name.

Author

Christopher Bazley

Latest version

Release 54 (18 Jun 2017)New!

Changes since last release


Directory iconDynamic Areas tutorial

Description

A short introduction to using dynamic areas in BASIC programs, including two small example programs.

Author

Harriet Bazley

Latest version

Release 1 (8th May 1999)


Fonts directory iconFontLib/FontTest

Description

This is a sample application which attempts to demonstrate various aspects of using outline fonts in a WIMP application. It is assumed that the user is reasonably familiar with the basic principles of writing multi-tasking WIMP applications. Harriet has tried to hide away as much of the 'workings' as she can in the FONT_Lib library file.

Author

Harriet Bazley

Latest version

February 2000


RISC OS module file iconJoystick emulation module

(Note: requires APCS-32 supporting C library)

Description

It is difficult for games programmers to implement support for joysticks without access to actual hardware. This module has been written to help - specifically, to allow me to test the new joystick support in Star Fighter 3000.

The cost of an interface and a decent joystick to go with it is quite expensive. If, like me, you are too miserly to pay for the real thing, this module may provide the solution. It allows games to be tested against a 'virtual' (emulated) joystick, which is controlled using the numeric keypad. Not particularly useful for playing games, but for testing purposes certainly far better than nothing.

Various emulation modes are supported, including "switched" (emulates an Atari-type joystick), "analogue" (emulates a PC-type joystick) and "damped" (uses a gradual decay function to make keyboard control of an analogue stick easier).

Author

Christopher Bazley

Latest version

Version 2.01 (15th March 2003)

Changes since last release


Directory iconLongStr BASIC library

Description

In BBC BASIC, it is impossible to use text strings of greater than 255 characters in length. This can be frustrating if you want to allow for long file paths in your program, or you need to manipulate some data that originated in a less restricted environment.

My LongStr library is quite slow and was hastily written, but it does a fair job of bypassing this limit. Virtually all BASIC's string handling keywords (with the exception of INSTR) are replicated by equivalent library functions.

The library functions are described in some detail in the accompanying documentation, which also contains guidelines and advice for use. There is also an example program.

Author

Christopher Bazley

Latest version

Release 6 (11th September 2003)

Changes since last release


RISC OS module file iconSlidingHeap module

Description

The SlidingHeap module creates and manages a sliding heap of blocks of memory claimed from a program's Wimpslot as necessary, thus avoiding the fragmentation caused by repeatedly claiming and releasing memory from the RMA. The order of blocks in the heap may change and their location will vary as other blocks grow and shrink. It is rather like Acorn C's 'flex' library, but is suitable for use from BASIC/ARM code programs.

This new release of SlidingHeap has been reconstructed from a disassembly, in the absence of the original source code. Apart from being 32-bit compatible (for use on RISC OS 5) other improvements include a new SWI to increase the maximum number of blocks.

The module is distributed under the GNU Public Licence with full source code, demonstration programs and extensive documentation in both text and StrongHelp format.

Author

Steven Haslam (32-bit compatibility by Christopher Bazley, much additional work by Harriet Bazley)

Latest version

Module: Version 2.12 (13th October 2002)
BASIC support library: 3rd December 2002

Changes since last release