Virtual Acorn – Fun with Virtualized RISC OS

(this is a guest post from Tenox)

Virtual Acorn let’s you run RISC OS on a Windows or Mac OS X host like VMware, VirtualBox or Qemu. The company page has this picture:


…you probably don’t want to do this for real!

Currently there is a sale going on and you can buy VirtualRPC-SA for about $100. My primary reason for getting it was of course porting aclock to RISC OS. I have also decided to purchase the original compiler because it allows to target the funky 26 bit CPU. Alternatively GCC is available.


VirtualRPC comes “pre-installed” with the OS on a ROM image. The operating system at first glance is nice looking and for a while it’s good fun in to explore and play. You can even browse the web and use weird applications like you never seen. You can find a lot of software apps here and here and here. However for any more than that it’s not very unusable.


Porting of aclock was was by far a most difficult one ever, maybe except Plan 9. To display text on the screen you need to use system calls directly, for which you use a special function called _swi() or _swix(). There is no concept of sleep() so I had to improvise with an empty loop. Fortunately there are screen codes that allow to position the cursor, clear screen etc.

void cls(void) {
     (void) _swix(OS_WriteI + 12, 0);

The result is far from pretty but it will do for version 1:



Some funnies, which actually weren’t that funny at the time:

A directory separator in RISC OS is “.” (yes a dot) for example: root.folder.subfolder.file. The C compiler expects .c as a file extension as it would on Unix or Windows. Except naming file “aclock.c” would make a directory aclock with c file in it. Fortunately, or maybe not, extensions in RISC OS are actually prefixing, not postfixing a file. So you have c.aclock or o.aclock. Except c and o are directories. You can see c and o folders in the screenshot above. Are you confused yet?

The operating system does actually have concept of a command line interface. Try to figure out the commands!

  • dir – change directory aka “cd” on the planet Earth
  • cat – list directory aka “ls” or “dir” in your normal OS


There is more, so I encourage you to try yourself just for the fun!