This guide describes the problems regarding making software for older versions of RISC OS work on new (current) systems, such as the Beagle board, RaspberryPi, Panda board, etc.
While RISC OS itself is largely the same at the API level, the underlying hardware is fundamentally different.
If you are new to programming the ARM, I do not recommend this guide as it will make numerous references to “old” and “new” methods. No production ARM offers the older 26 bit modes, and it’s probably been a decade since any did. Please don’t waste your time learning any of this unless you have a specific need of this information.
If you recall, RISC OS originally ran on the ARM 2 and ARM 3 processors in such advanced (for their time) machines as the A310, A440, A3000, and the A5000. In those days, the machine had a 26 bit address bus permitting a maximum of 64MB to be addressed. Because of this, various processor “flags” (the current operating mode, the result of the least mathematical calculation, etc) were incorporated into the “Program Counter” that pointed to the address of the instruction being executed.
This describes the behaviour of all versions of RISC OS prior to RISC OS 5.
In this day and age, modern System-on-Chip (SoC) boards are likely to come with at least 256MB on board, and the more your board costs, the more it is likely to offer, up to Gigabyte sizes.
This necessitated a change in how the ARM addresses memory and holds status. R15, or PC, is now a full 32 bit pointer and the Processor Status Register (for the status and operating mode) is now a new special register. The differences are explained in more detail here
To put it bluntly, unless your programs are written in BASIC, your old code will not work (at least, not natively – you can run many old programs using Aemulor. You can read what Aemulor does and visit the Aemulor site).
If your program is written in BASIC, with no assembly language code contained within, then you do not need to do anything. BASIC is interpreted, therefore your program will work.
There are a few points you may wish to check up on:
MODE
and CIRCLE
and DRAW
and such still work, modern hardware generally cannot provide 2, 4, or 16 colour display modes. These days the standard screen dimensions are likely to be large and colour depth 16 million colours. Selecting MODE 2
on a RaspberryPi actually selects MODE 28
which is quite different. You may need to check that the colours you expected to set are, in fact, being set. The SWI ColourTrans_SetGCOL may help.The official development suite contains an updated 32 bit safe version of the ABC compiler. So long as your program does not contain embedded assembler code, it should suffice to rebuild your program from source using the latest version of the compiler.
Most software for RISC OS is written in C due to its speed, flexibility, and greater ease of maintenance than other languages available.
If your program is written in <I>pure C</I>, all you will need to do is to rebuild your project using the latest official development suite or GCC if you originally used that.
If you are using libraries that are not the standard libraries provided with the compiler, you will need to replace your older libraries with newer, compatible, versions. In order to help you:
Sorry, this is as far as has been written at this time.
Please check back soon!