RISC World

VirtualAcorn Tech Support

More from Aaron's tech support notebook

It's been a very busy couple of months at VirtualAcorn Towers. Firstly we have now released the new StrongArm versions of both VirtualAcorns. I did hint in the last column that we were working on new versions and now they are available as upgrades for existing users. More details are available from Anyway that's enough shameless plugs for my own products, lets move on to the tech support notebook.

Printing from BASIC

I quite often get asked if VirtualAcorn products can print from BASIC. The answer, of course, is yes, provided the application concerned is using the RISC OS printing method. However, what people really tend to mean is "Can I print from my old single tasking BASIC program that I wrote 22 years ago on the BBC?" The answer to this has always been no, you can't. The best idea is to update the program so it either works in the desktop, or saves a file that can subsequently be printed by another application.

Now of course the above isn't a very helpful answer. I do however point out that what someone really want to do is print out text directly. This method was great on dot matrix printers but many modern inkjet printers don't support text only printing any longer, but a surprising number of laser printers do. So anyway lets get to the point.I was contacted by Stuart Tyrell (of STD and AdvantageSix fame) who had run into the same problem, but had sat down and come up with a solution. The solution, like all good ideas was very simple, worked perfectly and yet seemed totally bonkers. Stuart provide me with a sample piece of code as follows:

10 : REM Printer Test 2 for VA
20 : REM Stuart Tyrrell
30 : REM
40 : REM Set printer type 50 to point to the printer
50 : REM To check the printer name:
60 : REM a) Install the printer under Windows
70 : REM b) Run "showprinters" in the printing directory in RISC OS
80 : REM c) Replace the bit after HostFS:: with the printer name
90 : *SET PrinterType$50 HostFS::Panasonic_KX_P7110_PCL6
100 : :
110 : REM Now select this printer type
120 : *FX 5,50
130 : :
140 : REM Turn off the printer ignore character, otherwise everything
150 : REM appears on one line!
160 : *fx 182,255,0
170 : :
180 : REM Print something!
190 : VDU 2
200 : FOR T=1 TO 10
210 : PRINT SPC(T*4);"test!!!"
220 : NEXT
230 : :
240 : REM Don't forget the page feed, especially on a laser!
260 : VDU 12
261 : :
262 : REM Bye!
270 : VDU 3

As you can see the program sets up a printer type of 50, and then opens this printer, prints some text, then closes the printer. What had me stumped was that I couldn't see how it was working, especially as Windows itself can't do this trick! Eventually I realised what was happening. When VirtualAcorn prints it dumps data directly into the Windows print queue, by-passing most of the Windows printing system. The file that is generated by RISC OS simply gets sent straight to the printer with no further processing. So provided the printer "knows" what to do with plain text, it will print it. Of course most printers sold these days are so called GDI printers, meaning they have no God Damn Intelligence, and can't print "raw" text files. So before trying this method on your own programs make sure your printer can handle plain text files.

It's a very trivial task to alter any single tasking program that prints out text to work on VirtualAcorn and I thank Stuart for his creative solution to a long running issue for some users.

I have put the BASIC code in the software directory. Note that before using it you will need to set up the correct Printer$Type string. Information on doing this is reproduced in the REM statements at the start of the program.

And now some bug fixes...

VRPC-SA and VRPC-AdjustSA printing problem

As we have been on the subject of printing I ought to mention that a few users have had problems with printing anything at all on the new StrongArm VirtualAcorns. Graeme was able to quickly identify the problem and fix it. So if you do have a printing problem on an SA VirtualAcorn you will need to install the fix. I have put copies of these in the software directory of this issue. Note that these small upgrades are not for use with VirtualRPC-SE or VirtualRP-Adjust!


All copies of VRPC come with the iSVPatch inside the Boot sequence. This patch is designed to allow non RO4 compatible versions of various iSVProducts software titles, such as Mr Clippy and DrawWorks Millennium to run on versions of RISC OS higher than 3.7. The patch was quickly knocked up in 1999 when I was given a copy of RISC Os 4 for testing, and discovered that a lot of the iSV titles wouldn't run properly. Anyway recently a couple of problems showed up. The most important one was with the new versions of GhostScript, as ported by Martin Wuerther. Initially I didn't think that the patch could be to blame as it had been in circulation for years with no reported problems.

However, Martin was correct, the patch was up the spout. It was a simple mistake, instead of using TEQ (Test Equivalence) commands, it used CMP (Compare) commands and make a mess of some file operations. Martin provided a sample program to show the problem and Dave Holden at APDL was able to fix the problem and produce a new patch. So, if you want to run the new versions of GhostScript, or any program that uses GhostScript, such as TechWriter on VRPC-SE or VirtualRPCAdjust (non StrongArm versions) you will need to install a new version of iSVPatch.

The patch normally lives in Boot.Choices.Boot.Tasks. (on RISC OS 4) or Boot.Choices.Default.Boot.Tasks (On RISC OS Adjust). Simply replace the existing version with the new version in the software directory. It might also be worth seeing if the old version of the patch is installed on any "real" machines as well, because it might also cause problems with GhostScript on "real" hardware.

That's it for this issue, I can't give you a hint as to what will be in the next column because at the moment I don't have a clue.