Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

Get RISC OS running on Puppy Linux with RPCEmu

By Paul Stewart. Published: 23rd Feb 2009, 06:23:43 | Permalink | Printable

As demonstrated at the South West 2009 show, Paul Stewart has managed to produce not only a guide to getting RPCEmu up and running on Puppy Linux - a light-weight and user-friendly flavour of Linux - he's also produced a live CD so anyone interested in trying out RISC OS can boot straight into Linux and test drive the OS.

Puppy Linux is a fat-free distribution of GNU/Linux that is designed to be run from hard discs, CD-ROMs or even USB memory sticks. I decided it would be an interesting exercise to get the lean RISC OS running under the open source emulator RPCEmu on this novice-friendly, lightweight flavour of Linux.

Download a live CD with RPCEmu pre-prepared

Paul has also produced a live CD that includes a pre-built Puppy Linux installation and RPCEmu ready to go. All you have to do is provide the RISC OS ROM image. Download the CD image, burn it to disc, boot your PC from it and it will run inside the computer's RAM - allowing you to test drive Puppy Linux, the emulator and RISC OS without having to install anything on your PC's hard disc. If you want to keep any settings or changes made within Puppy Linux, these can be saved to a USB memory stick or some other storage media to be used again later.

Click here for more details
The distribution I have used is Puppy Linux (dingo) 4.1. This little guide assumes you have already installed Puppy Linux onto your PC - although there is a live CD to try out. There is no reason why it should not work on other Puppy Linux distributions, but watch out for things that have changed. If you are a novice at Linux, I recommend you set aside at least half a day to follow these instructions. Anyone reasonably confident in Linux will most probably complete these instructions within the hour.

Be aware that these instructions deviate slightly from the official RISC OS installation guide provided with the downloadable RISC OS 4 ROM from RISCOS Ltd as it uses the HostFS system for storing files within RISC OS rather than an emulated hard disc.

Before we get started, Puppy Linux uses X Windows for its desktop and ROX as the filer. This basically gives a look and feel similar to that of Microsoft Windows. Copying and moving files/folders around is simply a case of dragging and dropping icons. This guide is not an introduction to Puppy Linux but assumes the user is fairly competent in computing. No programming knowledge is required - simply follow the instructions and it will work. Screenshots are included and click on one to see a larger version.

Pre-install configuration
1. Install Puppy Linux 4.1 (full install). This also works when booting from a Puppy Live CD however installing it on a hard disc would be much more useful. Also, if you are running from a live CD, I would suggest a system with 1GB of RAM is a minimum.
2. Configure a network connection and test your connection to internet. A connection to the internet is vital to follow these instructions.

Pre-install setup
Download and install Puppy packages:
1. Start Puppy Linux 4.1 Dingo.
2. Start Seamonkey, the web browser.
3. Download devx_410.sfs. It's a 79MB file and by default this will download into /root/my-documents/ Devx_410 is version dependent - if you are running Puppy Linux 4.12, then you will need to download the devx_412.sfs file. The devx SFS module is a package of various applications in a single file and it is required to provide a C/C++ compiler environment to build both RPCEmu and associated files such as Allegro.
4. Move the devx_410.sfs file to the / folder (the root directory).
5. Download Subversion
6. Browse to My Documents.
7. Single click on subversion-1.5.2.pet. The Subversion installation process will begin.

8. Run PETGet package manager, the Puppy Package Manager.

The Puppy Package Manager lets you install official applications but as you will see not all the packages required to build RPCEmu are in the latest version of Puppy. However these components are required and must be installed. Installing a package is a case of single clicking on the package name. Some packages will require other related packages to be installed, which are known as dependencies. These will be automatically downloaded and installed, assuming the package manger knows where to find them.

9. Install the dotpuphandler PET package.

10. Install the xorg_xorg_ful_dri-7.3 package.
11. Close the Puppy Package Manager.
12. Download a liballegro4.2 Debian package from a list here.
13. Download the liballegro4.2 source code from here.
14. Download liballegro4.2-plugin-jack from a list here.
15. Download libxxf86dga1 from a list here.

As you've now downloaded some extra Debian packages, it's time to install them via Puppy Linux's web browser-based installer.
1. Open a console window by single-clicking on the Console desktop icon.
2. Type pb-debianinstaller and hit Enter.
3. Select 'Yes' when prompted to start the web server.
4. The Dillo web browser will now start and show the Debian install page. Follow the on-screen instructions and install libxxf86dga1

5. Close the browser window when the process is complete and return to the console window.
6. Re-type pb-debianinstaller and hit Enter.
7. The Dillo web browser will now start and show the Debian install page. Follow the on-screen instructions and install liballegro4.2.
8. Close the browser window when the process is complete and return to console window.
9. Type pb-debianinstaller and hit Enter.
10. The Dillo web browser will now start and show the Debian install page. Follow the on-screen instructions and install liballegro4.2-plugin-jack.
11. The installer will complain about a dependency but click on Install anyway.
12. Close the browser window and the console window.

Next, you should open the devx_410.sfs file using the following steps. This file was downloaded earlier and moved to the root (/) folder. Now we need to mount it so that Puppy Linux can use it. Open a console window using the Console desktop icon and type the following commands, hitting Enter after each line:

cd ..
mkdir /mnt/devx
mount -o loop /devx_410.sfs /mnt/devx
cp -a /mnt/devx/* /

You may see some error messages about a file being busy but it is safe to ignore these. You will get a short burst of hard disc activity as the files are copied out of the package and then the # command prompt will return. Close the Console window.

Next, we should unpack and compile Allegro from the downloaded source code. Allegro is a library of useful bits of code for video games and multimedia programs, and is used by RPCEmu. This library must be present otherwise RPCEmu will not build or run. The next few steps will build the Allegro library:

1. Open /root/my-documents/ in the Filer and locate allegro4.2_4.2.0.orig.tar.gz.
2. Single-click on the file. This will open the de-archiver tool.
3. Select all the files within.
4. Extract to /root/my-documents.

5. Open /root/my-documents/allegro-4.2.0 in the Filer.
6. Now we need to build it - see allegro-4.2.0docs/build/unix.txt if you want detailed information about this. However, let's crack on by right-clicking in the open Filer window and navigating to 'Window' and then click on 'Terminal Here'.
7. Type the following commands into the Console window that opens, hitting Enter at the end of each line and remembering to wait for the previous command to finish before moving onto the next one:
su -c "make install"
ln -s /usr/local/share/aclocal/allegro.m4 /usr/share/aclocal/allegro.m4

8. Close the console window.

Building RPCEmu
The next step is to download the source code to RPCEmu and compile it.

1. Open a Console window as explained previously.
2. Type svn co svn://svn.riscos.info/rpcemu/trunk rpcemu and hit Enter.
3. The latest source will be fetched and stored in a rpcemu folder in /root/.
4. Type following commands in the terminal window, hitting Enter after each line:
cd rpcemu/src/

Ignore a warning about audiofile.m4, if it appears. If you are warned "macro 'AM_PATH_ALLEGRO' not found in library", then you have forgotten to create the symbolic link in step 7 above - the ln -s command.

5. Continue preparing RPCEmu for compilation by executing these commands in order in the terminal:
./configure --enable-dynarec
cd ..

Getting RISC OS
Provided nothing went wrong, RPCEmu is now built with its dynamic recompiler enabled, which boosts the speed of the emulator. This part of RPCEmu converts chunks of ARM programs into Intel x86 processor code on-the-fly, which are directly executed by the host computer's processor. You can now close console window.

You can either extract the contents of the RISC OS ROMs from a real machine or if you're new or returning to RISC OS, you can purchase RISC OS 4 from RISCOS Ltd and download a ROM image.

1. Point your web browser at RISCOS Ltd's Sales Page

2. Purchase "Virtually Free RISC OS 4.02 (Download Version)" for £5.
3. Proceed to download the zip file containing the OS ROM and associated installation files to your my-documents folder.

4. Open a Filer window showing my-documents.
5. Create a folder called RO4.
6. Extract vfree402.zip into RO4 by singe clicking on it.

7. Close XArchive once it's finished.
8. Browse to /root/my-documents/RO4
9. Copy the RISC OS ROM file ROM402 into the roms folder inside the rpcemu folder.
10. Inside the rpcemu folder, create a directory called hostsfs and another called poduleroms if they don't already exist.
11. Copy the RO4disk,ff8 file inside the RO4 folder into the hostfs folder.
12. You also need to download the RO4 Boot sequence from here and save it in your my-documents folder.
13. Download a disc image of a RISC OS file system formatted hard disc from here and save it in your my-documents folder.
14. Extract the archive into the /root/rpcemu directory, overwriting any files that may already exist inside.
15. Edit rpc.cfg in the rpcemu directory using a text editor program, ensuring its contents are as follows:

mouse_following = 1
cdrom_type = 0
cdrom_enabled = 1
blit_optimisation = 0
refresh_rate = 60
stretch_mode = 0
sound_enabled = 1
vram_size = 2
cpu_type = ARM710
mem_size = 128
ipaddress =

It's time to start up the emulator and configure RISC OS within the emulator.
1. Open a Console window.
2. Type cd rpcemu and hit Enter.
3. Type ./rpcemu and hit Enter.

A window will pop up and the emulator should load the OS ROM into memory and begin booting the OS. Soon enough, you'll have a working RISC OS desktop on your Linux system. Don't worry about the extra console window, we'll come to that later. Let's finish setting up the vanilla RISC OS 4 you downloaded from the RISCOS Ltd website.

1. In the RISC OS desktop, open the RISC OS Task Manager by clicking on the cube icon in the bottom right-hand corner of the desktop.
2. Increase the memory slot for the next program you run to 8MB or more by dragging the red bar labeled Next to the right until the number next to it reaches 8000K.

3. Click on the HostFS icon in the bottom left-hand side of the desktop on to open its Filer window.
4. Double-click on the RO4disk executable file in the Filer window.
5. The installer should run. Drag the icon from the installer window to the HostFS:$ Filer window to start the installation of the operating system's files.

6. Move the !hostfs application in the HostFS:$ Filer window to !Boot.Choices.Boot.Tasks by doing the following: hold down the left Shift key and double-click (known as a Shift-double-click) on the !Boot application in the Filer window. In the new Filer window that opens, double-click on the Choices directory, then Boot in the next Filer window, and finally Tasks in the next Filer window. Hold down Shift and drag the !hostfs application into the Tasks Filer window.
7. Shift-double-click on the !hostfs application in the Tasks Filer window and Shift-double-click on the !Run file inside to open it using Edit, the text editor.
8. Comment out the line that starts rmensure by putting a | (the upright line character, also known as a pipe) at the start of it.
9. Save the file by pressing F3 and hitting Enter. Then close the Edit window.

Now we need to tell RISC OS to boot from HostFS.

1. Open a RISC OS command prompt by holding down Control and pressing F12.
2. Type con. filesystem hostfs and hit Enter.
3. Close the command window.
4. Shutdown RISC OS by holding down Control and Shift and pressing F12. Choose Shutdown from the window that pops up and stop the emulator by holding down Control and pressing the End key. From the menu in the top corner of the RISC OS screen, select File and then Exit.

Now, back in Linux, it's time to put the finishing touches to your RPCEmu installation.

1. Copy the file rpcemu/hostfs/!Boot/Choices/Boot/Tasks/!hostfs/hostfsrm.ffa into the rpcemu/poduleroms directory by opening a Filer window and navigating through the aforementioned directories.
2. Pin the rpcemu folder to your desktop by dragging the folder to the desktop.

To run the emulator from now on, click on the rpcemu folder on your desktop and then on the rpcemu executable in the Filer window. RISC OS within the emulator will boot using the files stored in hostfs. You now have a working RPCEmu system running the standard RISC OS 4 boot sequence.

Configuring the screen resolution
There would appear to be a couple of issues with ROL's boot sequence when using HostFS to store the system's files, as opposed to using an emulated hard disc. These issues prevent the configuration of display resolution and getting networking work. Here's how to fix this, starting from Linux:

1. Copy the RO4install.zip file to into root/rpcemu/hostfs.
2. Start RPCEmu from the Linux desktop.
3. Once RISC OS has booted to the desktop, click on the HostFS icon on the iconbar, open the Apps directory in the Filer window that appears and double-click on the !Sparkplug application.
4. Drag the RO4install/zip file from the HostFS:$ Filer window onto the Sparkplug icon on the iconbar.
5. A new window will open showing the contents of the zip file. Copy !RO4Instal to the HostFS:$ Filer window.
6. Double-click on the !RO4Instal application and follow the on-screen prompts to install more system files. Accept the default 'install to' path and even though the installer will advise there is not enough space on the destination drive, ignore this and click on "Go ahead anyway".
7. Once the installer has finished, take a look at the HostFS:$ Filer window and copy the application InactiveRes.Choices.Boot.Tasks.!hostfs into !Boot.Choices.Tasks.
8. Reboot RISC OS by holding down Control, Shift and F12 as before, choose Shutdown and then click on the Restart button. It is now possible to change the screen resolution within Configure, which is run when you double-click on !Boot from the RISC OS desktop.

You can also now delete from within RISC OS HostFS:$.!RO4Instal, HostFS:$.RO4disc and HostFS:$.RO4install/zip.

To get networking up and running, allowing RISC OS software to access the network and internet, follow these steps:
1. Under Puppy and using Seamonkey, the web browser on Puppy Linux, download !System from here.
2. Move the zip file into rpcemu/hostfs.
3. If it's not already running, start RPCEmu.
4. Run !Sparkplug from HostFS:$.Apps, if it's not already running.
5. Drag the System zip file from HostFS:$ onto the Sparkplug iconbar icon and copy the !System application in the Filer window that appears to the HostFS:$ Filer window.
6. Double-click on !Boot and click on the System icon in the Configure application that opens. Drag the unpacked !System application onto the installation window that opens up and click on 'Merge' to install it.
7. Delete both the unpacked !System and System/zip from HostFS:$ as they are no longer needed.
8. Under Puppy, copy the directory rpcemu/riscos-progs/EtherRPCEm into rpcemu/Hostfs
9. Back in the RISC OS desktop, open the EtherRPCEmu directory that appears in the HostFS:$ Filer window.
10. In the Configure application, click on the Boot icon and then the Install icon in the window that pops up. Drag the !Boot application within the EtherRPCEm directory onto the installation window that has opened up and click on 'Merge'.

11. Close the Boot install windows (by clicking on 'Set') and in the Configure application's main panel, click on the System icon. Drag the !System application within the EtherRPCEm directory to the installation window that opens up and click on 'Merge'.

12. Close the Configure application.
13. Delete the EtherRPCEm directory from within RISC OS as this is no longer required and reboot RISC OS for good measure.
14. Once you're back in the RISC OS desktop, double-click on the !Boot application again to run the Configure program.
15. Click on the Network icon and then the Internet icon in the window that pops up.
16. Tick the box that's labeled 'Enable TCP/IP Protocol Suite'.
17. Click on the Interfaces icon and a new window will pop up
18. Click on the 'Configure' button that's alongside the EtherRPCEmu entry, and then in the window that pops up click on 'Manually' in the box labelled 'Obtain IP address'.
19. In the box labelled 'IP', type: and in the box labelled 'Netmask', type:

20. Click on the 'Set' button, then click on the 'Close' button.
21. Click on the Routing icon, and in the window that pops up, find the box labelled 'Gateway' and type:

22. Click on the 'Set' button.
23. Click the Host names icon.
24. In the window that pops up, in the box labbeled 'Host name', type: rpcemu.
25. For 'Local domain', type: riscoslocalnet.invalid.
26. In your Puppy Linux desktop, open a Terminal window and type in the command cat /etc/resolv.conf. Hit Enter and some text will appear in the Terminal window.
27. Take the first IP address that appears, such as although it will depend on your own network, and, going back to the RISC OS desktop, type it into the box labeled 'Primary name server'.
28. Click on the 'Set' button.
29. Click on the 'Close' button.
30. Click on the 'Set' button.
31. Click on the 'Reset now' option to restart RISC OS with the new settings.

Once back in the desktop, hold Control and press F12 to open a command window. Check the network settings are working by first pinging the RISC OS side. Type this command and hit Enter: ping Hit escape to stop the program. You should see a list of replies from and no errors. Try the command ping to check the Linux side of the emulator is working, and again, there should be no errors. Double-check your settings if any of the pings fail, otherwise that's the RISC OS side complete and you can minimise the RPCEmu window.

To configuring the networking side on Puppy Linux, from the Linux desktop do the following:
1. Click on the Setup icon.
2. Click on 'Setup a firewall'.

3. Click on 'Custom'.
4. Click on 'OK'.
5. Click on 'OK'.
6. Click on 'OK'.
7. Click on 'Yes'
8. Enter tap0.

9. Click on 'OK'.
10. Click on 'No'.
11. Click on 'OK'.
12. Click on 'Yes'.
13. Press any key to continue. The 'performing sanity checks' bit must read '[Passed]'.
14. Click on 'Yes'.
15. Press Enter.
16. Click on 'Cancel' to close the Puppy Setup window.

If you now go back to the emulator and in the open command window, type ping google.com and hit Enter. You should now get a reply, assuming your internet connection is active and is not blocking pings to the outside world, rather than a list of errors. Be aware that if you are too quick, the firewall may not have finished initialising - so give it 10 seconds first to make sure.

What we need to do next is to create a shortcut to the firewall on your desktop Puppy Linux:
1. Minimise RPCEmu and open a Filer window on your Linux desktop.
2. Navigate to the directory /etc/rc.d.
3. Drag the rc.firewall script file to your desktop.

Due to the way the networking is setup within RPCEmu, you will need to single-click on the rc.firewall file on your desktop after every time you start the emulator. This is because the network interface used to join Linux to RISC OS is not created until after the emulator has started.

That's it. RPCEmu is now up and running and able to access the network and internet. Try downloading the NetSurf browser for RISC OS, copying the download to the hostfs directory, unpacking it all using SparkPlug and, having followed the installation instructions, browse the internet from within RISC OS.

Middle mouse button emulation
Middle mouse button emulation for two button mice is possible by clicking both mouse buttons together. If this does not work, you need to configure Puppy to emulate the middle mouse button. Shutdown RISC OS and exit RPCEmu and do as follows:
1. In the Linux desktop, click on the Setup icon.
2. Click on 'Change the mouse and keyboard'.
3. Click on 'Choose type of mouse' and un-tick 'Mouse has a scroll wheel'. Tick 'Middle button emulated on a 2 button mouse'.

4. Click on 'OK'.
5. Click on 'OK'.
6. Click on 'Cancel'.
7. Reboot your Linux system.

CD-ROM support
Enabling CD-ROM support within RPCEmu is very easy:
1. From the Puppy desktop, click on the Setup icon.
2. Click on 'Setup CD and DVD reader and burner drives'.

3. Select the device you want to be seen as a CD-ROM, which will be within RPCEmu.
4. Click on 'Exit'.

5. Return to RPCEmu and hold down Control while pressing End to bring up the RPCEmu menu.
6. From the Settings menu, select CD-ROM.
7. Click on 'IOCTL'.

8. Within RISC OS, double-click on the !Boot application to run the Configure program.
9. Click on the Discs icon and set the number of CD-ROM devices to 1, click on Set and close the Configuration program. A CD-ROM icon should appear in the bottom left-hand corner of the desktop, and clicking on it will access the physical CD-ROM device set up in Puppy Linux.

The CD-ROM device is now configured. You need to configure the CD-ROM each time you start RPCEmu, repeating steps 5 to 7.

That's all folks, it's been a trip - all that remains to say is that full-screen mode does not seem to work under Puppy Linux. Let us know if there are any errors or inconsistencies in this guide.


Getting started with Puppy Linux
Puppy Linux discussion forum
RPCEmu mailing list A guide to getting RPCEmu running on GNU/Debian Linux and networking instructions

Previous: South West 2009 show report
Next: Moving tributes to Paul Vigay flood in


Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end

Networking on the Live CD version of this differs from the above. When thinking about creating the Live CD (after I wrote the above instructions), I wanted to get ShareFS working, which will not work with the above set of instructions. The Live CD uses a network bridge to achieve this rather than the Internet Connection Sharing as used in the above Firewall instructions.

 is a RISC OS Usersa110 on 23/2/09 7:35PM
[ Reply | Permalink | Report ]

I'm interested in getting RPCEmu to run on Fedora, but cannot find where to download the source from. Is it my imagination, or is there no zip file/tarball etc of the RPCEmu sources?

 is a RISC OS UserDS1 on 26/2/09 1:14PM
[ Reply | Permalink | Report ]

It depresses and terrifies me that people use Puppy. Most packages are "maintained" by people who are mostly completely clueless, and completely ignorant of the security and legal implications of how they've done it. It's all a huge horrible hack, as I discovered when I tried to make NetSurf packages for it, and ended up rewriting half of the package authoring tools to not be fundamentally broken. Not recommended by me; use Fedora or Ubuntu.

Fortunately, much of this walk-through applies to most distributions.

DS1: Use subversion to check out the source code.

 is a RISC OS Userrjek on 26/2/09 5:38PM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • Copying vinyl to CDs
    Play it again, Sam
     10 comments, latest by Heathcliffe on 15/2/06 9:49AM. Published: 11 Feb 2006

  • Random article

  • UniPod speed tested
    IDE and ethernet with a need for speed
     28 comments, latest by micken on 17/8/04 3:53PM. Published: 2 Jun 2004

  • Useful links

    News and media:

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster


    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign

    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    "Thanks for the unkind comments. Why are the young such ****s? "
    Page generated in 0.1557 seconds.