This page is designed for the more competent 'tamperers' amongst you, who want to tweak and customise the RISC OS !Boot sequence. Although I've tried to be as precise and detailed as possible, please don't blame me if you mess up your !Boot sequence. Always take backups if you think you're likely to do something which may have an adverse effect on the smooth running of your computer.
The purpose of PV_Patch is two fold;
Creating a RAM disc in motherboard RAM
Having got a Kinetic processor card fitted, with 128MB onboard RAM, plus 32MB of RAM on the main Risc PC motherboard, I like keeping a permanent 64MB RAM disc, onto which I copy !Scrap at bootup. This not only ensures that software requiring !Scrap (such as Photodesk and Fresco) runs at maximum speed, but also means that I flush the scrap directory completely on rebooting the computer.
In order to keep the Kinetic RAM free for application space (as it's faster) I wanted the RAM disc to reside in motherboard RAM. One method of doing this is to temporarily claim maximum amounts of memory before allocating the RAM disc. Then, freeing the previously claimed memory. Unfortunately due to limits imposed on the various areas, this is quite difficult to do if you've got a 128MB Kinetic card - hence my ClaimMem utility module.
ClaimMem is a small ARM code utility which is run as early as possible in the !Boot sequence (before other modules claim their own memory). It will temporarily claim the maximum amount of Dynamic application space, create a 64MB RAM disc and then free the dynamic application space.
Because the memory may differ in individual machines, I've supplied the source code in the form of a short BASIC program. You may need to experiment with different values if you have different memory requirements. Once run, it will assemble a module and save it into Boot:Utils. I've tested with RISC OS Select.
If you get a 'Not enough memory' error during the subsequent rebooting of the machine, you need to edit the values and try again - I've not had time to tidy up the program to auto-detect memory requirements etc.
Patching the ROM to allow the softloading of CLib on RISC OS Select
If using Select 1 or 2, you may find there is a restriction on softloading the CLibrary in order to run newer software. The second purpose of PV_Patch is to allow the softloading of CLib when using RISC OS Select 4.33 or lower. The restriction was removed in Select release 3 (ROS 4.34 upwards)
You may want to edit my Obey file if you only want one or the other of these facilities.
The easiest way to install PV_Patch is to copy ClaimMem and PV_Patch into the Boot:Utils directory. Then add a line to Boot:Utils.BootRun in order to run the patch as soon as possible during the booting of the computer.
Installing the files
Firstly download PV_Patch from here, then drag the contents of the ZIP archive over the top of your existing !Boot application. This will copy the relevant files into Boot:Utils.
You should also either copy the Clib module into Boot:Utils (which is, strictly speaking the wrong place for it to go, as modules should be kept inside !System) or modify the last line of PV_Patch to point to wherever CLib is installed - generally Boot:Resources.!System.310.Modules.CLib.
You can't reference the System path because at the point PV_Patch loads in the boot sequence, System won't have been seen!
Having copied the files, you need to add a single line to the Boot:Utils.BootRun file. To do this, load Boot:Utils.BootRun into your favourite editor and scroll down to the section which looks like;
It comes just before some lines which look like;
You want to add a couple of lines which read as follows;
| Run Pauls patch as soon as possible! Obey -c Boot:Utils.PV_Patch
The first line (starting with a |) is a comment, so that you know what the line does if you come back to it in the future.
The file should now look something like;
Now save the file. It should now be set up to run PV_Patch next time you reboot the machine. If you would like a more detailed explanation of what it does, please read on.
What it does
The /Boot:Utils.ClaimMem line of PV_Patch runs my ClaimMem module, as described above. If you don't have a Kinetic card or don't want !Scrap copied into a RAM disc on bootup, then you should remove or comment out this line.
The rest of PV_Patch checks to see which version of RISC OS Select you are running and issues the appropriate patch to allow CLib to be softloaded.
Lastly, it loads CLib, assuming you don't have a newer version already in ROM. Again, make sure that you have copied CLib into Boot:Utils.
Last edit: 10th Apr 2016 at 4:57pm (2538 days ago)