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:

acorn1

…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.

acorn-c

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.

riscos-web

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:

aclock-riscos

 

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

riscos-cmd

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

 

16 Comments

  1. avatar ampharos says:

    The Brits liked this stuff? Most be the drugs.

    That seems pretty counter-intuitive

  2. avatar Roy says:

    I’d get RPi and install RISC on it ;)

  3. avatar ampharos NT says:

    TSE works!

  4. avatar Tux says:

    Back to IRC pl0x, we moved TSE to a VPS

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

  • My RSS Feed

  • Chinese (Simplified)Chinese (Traditional)FrenchGermanHungarianItalianJapanesePortugueseRussianSpanish
  • Archives

    • 2013 (53)
    • 2012 (168)
    • 2011 (254)
    • 2010 (150)
    • 2009 (104)
    • 2008 (26)
    • 2007 (23)
  • webneko

    Neko