These programming resources are intended for 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.
(Also available without source code - smaller download.)
This C library is designed for use by programs that process 3D models in the simple object geometry format developed by Wavefront for their Advanced Visualizer software. It depends another C library by the same author, CBLibrary, but only for debugging facilities and a few simple macros.
Release 4 (30th August 2018)
primitive_intersectmust not ignore intersections between the given edge and a polygon which are coincident with the polygon's corners. Consequently
vertex_array_edges_intersectnow reports intersections at the start and end coordinates of both edges.
primitive_delete_allno longer omits to reset the flags concerning any cached normal vertex and bounding box.
primitive_contains(which checks a stronger constraint) and
primitive_clipis now reported in verbose mode.
primitive_get_top_yby using the cached bounding box.
primitive_contains_pointnow returns early if the input vertex is part of the definition of the polygon.
primitive_containsnow returns early if any vertex of one polygon is found to be outside the other.
primitive_intersectnow safely handle the case where a primitive has no sides.
primitive_get_bboxfor use when the result doesn't need to be copied.
coord_less_thanfunction for use by
vector_xy_greater_or_equalfunction for use in primitive bounding box checks.
vertex_array_find_duplicatesnow returns the number of duplicates or a failure indication.
(Also available without source code - smaller download.)
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.
Release 55 (19 Aug 2018)
stringbuffer_append_separated, for use when appending file names to a path or extensions to a file name.
A short introduction to using dynamic areas in BASIC programs, including two small example programs.
Release 1 (8th May 1999)
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.
(Note: requires APCS-32 supporting C library)
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).
Version 2.01 (15th March 2003)
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
INSTR) are replicated by equivalent
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.
Release 6 (11th September 2003)
ls_', to increase their uniqueness and make it easier to avoid name clashes.
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.
Steven Haslam (32-bit compatibility by Christopher Bazley, much additional work by Harriet Bazley)
Module: Version 2.12 (13th October 2002)
BASIC support library: 3rd December 2002
SlidingHeap_ExtendBlocknow rounds requested block sizes up to the nearest word, just as
SlidingHeap_NewBlockalways has.... Optimised this to use single
BICin place of AND NOT construction.
SlidingHeap_ScrapBlock(as far as I know, never called during entire history of module) dealing with the possibility of non-word-aligned blocks.