Previous BackToHowtos Next

Emulating an Acorn on a PC with RedSquirrel


Requirements:
Files needed:
The ROM files may be hardest to find as their distribution is, strictly speaking, illegal; they contain the operating system, so they're like a pirated version of Windows 95. As the version number goes down (3.5, 3.1) it doesn't seem such a big issue and ROM images are easier to find, but PlayKiSS needs at least 3.5. It will work with version 4, the currently latest version, but don't expect to find RiscOS 4 ROMs for download anywhere. Acorn owners can of course transfer their own ROM to a PC; how to do so is explained on Acorn websites.

The first thing to do is unzip the RedSquirrel archive to a path that isn't too long, to save typing: "C:\Program Files\Redsquirrel0.5" is a bit long for me, so I unzipped it to "K:\rs". As the archive should be unzipped with relative pathnames preserved, it will unzip to "K:\rs\RedSquirrel Release\etc." which is still too long for me, so I move the subdirectories in "RedSquirrel Release" up one directory and delete it. I can now make a shortcut to Redsquirrel.exe and put it wherever I like: on the Desktop, in Start Menu|Programs or in the QuickLaunch bar. I now have "K:\rs" with three subdirectories: Hostfs, Models and Plugins.

There is also a RedSquirrel archive in .exe form, which unzips the files to a specified directory and makes the shortcut itself. I prefer the zipped version because it gives me more control over what goes where.

Don't click on the RedSquirrel icon yet! You'll get an emulator window with a blank screen, and any other open applications may hang. RedSquirrel needs ROM files, and has to be told where to find them.

Under "Models" there is a subdirectory "Arm7 RISC OS 3.7". In this subdirectory is a file model.cfg. This file sets a number of options, like how to boot (commandline or GUI, which on the Acorn is called "the Wimp") and where to find the ROM images: "Romsets\\Riscos3_70". These two subdirectories have to be made, and the ROM images (four files with the extension "rom") unzipped into the second one.

I now have four files in the ROM directory:
K:\rs\Models\Arm7 RISC OS 3.7\romsets\riscos3_70\Ic24.rom
K:\rs\Models\Arm7 RISC OS 3.7\romsets\riscos3_70\Ic25.rom
K:\rs\Models\Arm7 RISC OS 3.7\romsets\riscos3_70\Ic26.rom
K:\rs\Models\Arm7 RISC OS 3.7\romsets\riscos3_70\Ic27.rom

If I tried to run any program under RedSquirrel now, I would get an error message that the boot sequence is missing, so I'll have to unzip the universal boot sequence in a way that doesn't destroy its Acorn file attributes. The Acorn file system differs from the MS-DOS file system in the following ways:
- Filetypes aren't seen from the extension (".txt", ".exe") but are stored as filetype attributes of the file.
- The maximum filename length is 10 characters (as opposed to MS-DOS 11 characters plus period to separate filename and extension) and anything longer than that is chopped off after the tenth character. The period is counted as a character and changed to a slash.
- Instead of a backslash, a "$" is used in path names.
- There is a limited number of files per (sub)directory.

To get round the filename and maximum file number limits, various file systems have been made for the Acorn, two non-commercial ones being X-Files and raFS. RedSquirrel has its own filesystem, HostFS, which serves a double purpose of enhanced filesystem and Windows-to-Acorn filetype translator. There are three places to open a file from in RedSquirrel:
- An emulated RiscOS disk. This is an image file on a FAT partition which is accessed as if it was a separate disk. In RedSquirrel, this disk emulation is a bit iffy, so it's best not used; in this case, it's not necessary.
- An emulated floppy disk. Same principle as the Risc disk and also not needed.
- HostFS: the directory "K:\rs\hostfs" and any directory under it.

So, uniboot.zip has to be unzipped into the hostfs directory, but without losing its filetype attributes. This requires one file from infozip.zip, namely unzip, the Acorn port of the normal DOS UNZIP.EXE. This file can also be found separately, but it has to be the right version: I've found a version of about 31kB which didn't work, so look for a file of about 51kB. It's safest to just pull it out of infozip.zip, though. This can be done with any DOS/Windows unzipper. Put both uniboot.zip and unzip in the hostfs directory. Then double-click on the RedSquirrel icon. Click on "Go for it" and accept the default processor model. Then, unless you have a very fast computer, go make a cup of tea.

After a while, you'll see a black screen in the emulator window, and "HostFS filer". Then, the screen turns a number of colours until it settles for grey, displays the Acorn logo, and goes dark grey with a marbled bar at the bottom containing a number of icons. The ":0" is the emulated floppy drive, which you can forget about. Press F12 to bring up the command line prompt, which in RiscOS starts with a "*".

Next follows a bit of preparation. In windows, make a subdirectory "uniboot" in the hostfs directory. Rename unzip in the hostfs directory to unzip,ff8 - use a comma, not a period! This sets the filetype of unzip to "executable". It's also possible to do this in the HostFS directory by right-clicking on the file, choosing "File [name]" which opens a second popup, choosing "Set type" and typing a name or code in the text field; but this way is quicker. The filetype of uniboot.zip doesn't have to be set; HostFS has deduced it from the file extension.

Some commands mean different things to a PC and an Acorn: the "dir" command, for instance. Like DOS "cd", it doesn't produce a list of files, but sets the current directory. Type

dir hostfs::hostfs
unzip uniboot -d uniboot
or, if you want it all on one line:
hostfs::hostfs.$.unzip hostfs::hostfs.$.uniboot -d uniboot

The subdirectory is necessary, else unzip will refuse to work. In the hostfs directory, there is now a subdirectory "!Boot" in "uniboot" containing files with names like "boot,feb" and "spr,ff9". The codes after the comma are HostFS's way of preserving Acorn filetype attributes on a FAT filesystem. MS-DOS files are likewise translated: a file readme.txt shows up with a text file icon in HostFS, because HostFS recognizes ".txt" and gives files with this extension the "text" attribute. Now that uniboot.zip has been unzipped, the directory "!Boot" can be moved from the temporary subdirectory into the main hostfs directory, and the directory "uniboot" can be deleted. This is best done in Windows.

In "K:\rs\Plugins\Hostfs\extensions.txt", an ASCII file containing the extension to filetype translations HostFS uses, there should be a line

ffb : bas
If it's not there, add it, or you'll get a "HOn not found" error when restarting the emulator.

Now, the system has to be told where to boot from. Type the following at the command line:

hostfs
configure filesystem hostfs
configure boot
This information is written into a file called cmos.ram. To leave the command line, push the cursor-right key and then the Enter key. (I don't know if this is the official way, but it works for me.)

On a slow computer, it may be impossible to type anything at the command line because "dir hostfs" only produces an endless string of "d"s. In that case, get access to a faster computer, install RedSquirrel and unzip uniboot.zip as per the instructions above, re-zip it, put it on diskettes and re-unzip it in the hostfs directory of your own computer. Also, copy the file cmos.ram from "Models" and subdirectory of the processor you chose - generally, "..\Models\Arm7 RISC OS 3.7" - into the same directory on the slow computer. (Don't forget to clean up on the other computer afterwards.) It stands to reason, though, that if the emulator has problems with detecting keypresses, any FKiSS4 code that has to do with keys is not going to work.

You should now have something like "K:\rs\hostfs\!Boot"; the exclamation mark means that this is an application, rather than an ordinary directory. Now, do a hard reset. The black screen will appear again, with "HostFS filer" and then something about a ROM being patched and the return code being too large. I always ignore that. If you got this far, it's time to unpack PlayKISS. Under Windows, put Pkiss.spk in the hostfs directory. This can be unpacked in two ways: in the emulated Acorn environment with SparkFS or SparkPlug (the first has to be paid for, the second didn't work for me), or simply under DOS. For the DOS approach, take NSPARK.EXE out of nspark.tar (any Windows unzipper will open .tar files these days) and put that in the hostfs directory too. Open a DOS box, change to the hostfs directory and type:

nspark -uT pkiss.spk

This unpacks the Spark archive with its file attributes preserved and creates a directory/application "!PlayKISS" in the hostfs directory. Double-click on the HostFS icon to see it; double-click on the !PlayKISS icon itself to start the viewer. An icon appears in the marbled bar at the bottom; dragging the icon of a directory containing kiss data (or of the KiSS archive if you have SparkFS installed) over this icon will load the set.

A word about the cursor. In the emulator window, there is a blue cursor which follows the white cursor in a halting way. The blue cursor belongs to the emulated Acorn, the white one to Windows. To drag or click in the emulator window, use the blue cursor. To position it without having the white cursor go beyond the emulator window, vary the mouse speed; moving quickly will leave the blue pointer behind, going very slowly will have the blue pointer catch up with the white one and creep past it.

There is a menu setting "Window|Capture mouse" to stop both cursors interfering with each other. This is the only thing that will bring the blue cursor back to normal when, due to white-cursor activity, it has selected a rectangle in the emulator window and won't respond. However, with that setting, the user loses the white cursor and can't do anything outside the emulator window. The trick to bring back the white cursor is to type Alt-H, Enter; the white cursor will now appear to close the "About" dialog.

I can advise against using SparkPlug, which may hang the emulator, but for the adventurous: surf for dearchive.bas or splug.bas, which are self-extracting archives. Put the file in the hostfs directory, rename it splug,ffb or dearchive,ffb, start RedSquirrel and click on the HostFS icon; HostFS should have set the filetype to "Basic" because of the extension. Double-click on the file, and a SparkPlug icon should appear when the application has unpacked itself.



Previous BackToHowtos Next