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.

The most interesting library modules are probably Drag, Entity, Loader2, Saver, Scheduler and PseudoFlex. The first four 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. The Scheduler module is a system for managing null events and scheduling functions to be called in the future. The PseudoFlex module usurps Acorn's flex library and redirects calls to Simon P. Bullen's fortified memory allocation shell (for debugging).

Author

Chris Bazley

Latest version

Release 29 (27 Jan 2008)

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

Chris Bazley

Latest version

Version 2.01 (15th March 2003)

Changes since last release


Directory iconLoader demo and documentation

(Note: example application requires Toolbox modules)

Description

The Loader component is part of CBLibrary, which is distributed separately from this demo, with source code under the Lesser General Public License. You will need to obtain CBLibrary in order to recompile this demo or use Loader in your own programs. Acorn's Flex, Toolbox and Event libraries are also a requirement.

Essentially a layer on top of Eventlib's message handlers, Loader centrally handles incoming data transfers for all parts of your application. A client-supplied handler function is called when a data transfer is successfully concluded.

The client application registers an interest in listening for certain file types dragged to particular areas of the user interface. This approach fits well with an object-oriented programming style, as listeners may be registered when a Toolbox object is created or shown and deregistered when it is deleted or hidden.

This example application is supplied with full source code. There is also extensive documentation as an HTML/EasiWriter document.

Author

Chris Bazley

Latest version

Version 0.15 (28 Oct 2006)

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

Chris 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 Chris Bazley, much additional work by Harriet Bazley)

Latest version

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

Changes since last release



ICRA (Internet Content Rating Association) Valid HTML 4.0!