VirtualAcorn Technical support:
Altering the capacity of ADFS hard disc images.

This article was originally published in RISCWorld Magazine.

There has been one particular niggle experienced by VirtualAcorn customers over the last few weeks, this concerns the installation of !FontDirPro, from LookSystems. !FontDirPro needs to be installed on a filecore filing system, unfortunately HostFS, the file system used by VirtualAcorn, isn't a file core filing system so !FontDirPro won't work if it's been installed on HostFS. Luckily we were aware of this problem as there are a few other applications (including Sibelius) that suffer the same problem. So VirtualRPC is supplied with a 200Mb ADFS partition that can be used to install problem software.

The ADFS partition

I call the ADFS disc a partition, but it isn't really. It's simply a big file that Windows sees just as a file, but that RISC OS sees as an ADFS harddisc. If you want to set up the ADFS disc then you need to make sure that your VirtualAcorn installation is up to date. Take a note of your VitualAcorn CD serial number (that's the serial number printed on the CD) and then pop along to the VirtualAcorn website and go to the downloads section. With your CD serial number you can work out which downloads you need to install to get your VirtualAcorn installation up to date. Before downloading any of the upgrades read the upgrade instructions on the website very carefully, as if you make a mistake you may need to re-install from scratch. Also make sure you aren't tempted to "cherry pick" upgrades, you need to install then in sequence from the earliest one that applies to your CD serial number to the newest. Having updated your VirtualAcorn you can now set up the ADFS partition.

Setting up the ADFS partition

This is very easy. Restart VirtualRPC and then click on HardDisc4, double click on !Boot, and go to the Discs option. Then set the number of IDEDiscs to 1 and click on the Set button. You may well get a warning from RISC OS that "Changing the number of discs is potentially dangerous" but don't worry and carry on. After a few seconds a new drive icon called IDEDisc4 will appear on the RISC OS icon bar. If you open this new disc you will see a readme file and two applications called !BootADFS and !BootHostFS.

These two applications control which filing system RISC OS boots from, double clicking on !BootADFS will copy your entire !Boot sequence onto the ADFS drive and re-configure VirtualAcorn to boot from there. !BootHostFS will simply set VirtualRPC to boot from your existing !Boot sequence on the HostFS harddisc and will not copy any files. So far so good, so in order to install programs that need a file core filing system in theory all you need to do is run !Boot ADFS and go and boil the kettle. Once you come back and the !Boot sequence has been copied you can simply re-start VRPC and install programs to the ADFS partition.

However there is a potential problem waiting to bite users (and me) in the backside. If you were to go down to the IDEDisc4 icon on the iconbar and click menu and then click on free you will see that the drive is a fixed size, and a small size as well. Indeed on some early VirtualRPC-SE installations the drive can be as small as 50Mb. So what happens if either your !Boot sequence, or your copy of !FontDirPro is bigger then the size of the ADFS partition? Obviously you can't install FontDirPro, or can you? Well actually you can make a bigger ADFS partition quite easily, if you know how....

Making a bigger ADFS partition

The first thing to do is to take a backup of the !BootADFS, !BootHostFS and Readme files on the existing IDEDisc4 disc. The best idea is to open the HostFS::HardDisc4.$.Filing directory and then create a new directory called ADFS, now copy the three items over. This needs to be done now as in order to make a new ADFS disc the old one will have to be deleted. Having copied the three items you can shut down VirtualRPC, as the next steps need to be performed under Windows.

Firstly we need to get rid of the existing ADFS partition.

Go to My Computer, then DriveC then to Program Files then into the VirtualAcorn folder. Now open your particular VirtualRPC and then go into Models folder and the into the Arm7 RISC OS folder. You will see a file called HardDisc4.hdf this is the RISC OS ADFS harddisc. You need to delete this file, if you are feeling sensibly paranoid you might want to take a backup first. Having deleted the file you then need to open the Model.cfg file in the same folder. Simply double click on the file, hopefully it will open into Notepad, if not choose to open it using a program chosen from a list, and choose NotePad. You will now see a human readable text configuration file. Find the section for the IDEDisc, which should look something like this:

[IdeDisc]
Shape = "384 16 63 512"
Filename = "HardDisc4.hdf"

The section we are interested in is the Shape section, this defines the size of the ADFS disc. In the example above the disc has 384 cylinders,16 heads and 63 sectors per track. So we can quite obviously increase the size of the drive by altering the numbers. However we need to be slightly careful. Firstly since we are making an IDEDisc for use with ADFS we cannot increase the number if heads beyond 16. So to make things simple lets look at the current size of the drive. We can work out the drives approximate formatted capacity in K simply by dividing the number of cylinders by 2, this gives us a current drive size of 192Mb, which is close enough for our purposes. So if the value of 384 is doubled to 768 the drive size will be doubled to just under 400Mb. So the new [IDEDisc] section of the model.cfg file should read:

[IdeDisc]
Shape = "768 16 63 512"
Filename = "HardDisc4.hdf"

Save the file and then make the same changes to any other models files (e.g. Arm7500 and StrongArm). This is very important, if you do not do this then things will go wrong.

Now re-start VirtualRPC. There will be a slight pause while the new HardDisc.hdf file is created and then VRPC will start up normally. The IDEDisc4 icon will be replaced with an icon that just says 4, this is because the drive isn't currently formatted. Just like a real ADFS disc !Hform needs to be used to format the drive for RISC OS. !Hform is located in the HostFS::Harddisc4.$.Utilities directory. To format the new dive just double click on !HForm in the normal way.

Formatting the ADFS partition

The single tasking !Hform window will open with the current drive number (4) selected, so press Return. Now select the make of disc, which is number 9 (for other).So enter 9 and press return. Next the sectors per track will be shown, the correct value of 63 will already be entered so press return again. The number of heads (16) will then be shown, again press return. Now the number of cylinders will be shown, this again will be already entered as the correct figure of 768 so press return again. Next the Drive parameter init flag of 1 is shown, again press return. The parking cylinder is then shown, this will also have the correct value of 768 so once again press return.

Next !HForm will ask about the defect list, just type A (no more changes) and press return once more. !Hform will then ask if you want to format or just initilaise the drive. Type I (for initialise) and press return. Soak testing isn't required so on the next option type N and then press return. Next !Hform will ask if you want to make this disc bootable, type Y and press return. !HForm then asks if you want long files names on the disc, press Y and then return. Finally !Hform will confirm that you want to format the disc, again press Y and then return. Finally you need to type in the large file allocation unit, the default value of 256 will be shown on screen. This needs to be changed, so type 512 and once more press return.

!HForm will now pause as it writes the disc map, the hard drive light on your PC will come on at this point. After a few seconds !Hform will finish and will report the formatted size of the drive, press Space to return to the RISC OS desktop. Now there is one final step. The newly formatted drive is still called 4, press MENU over it and go up to name disc. You will see that in fact the disc is called HardDisc4. However the HostFS harddisc is also called HardDisc4 and so we need to rename the new ADFS drive, delete the current name and type IDEDisc4 and press return.

Using the ADFS partition

That's almost it. All that has to be done now is to copy back the !BootADFS and !BootHostFS applications from the ADFS directory created earlier inside the filing directory. The new ADFS partition is now ready to be used. Of course if you wanted a bigger disc you could simply double the number of cylinders again. Altering the shape in the models file to:

Shape = "1536 16 63 512"

would give you an ADFS drive of 755MB, which should be big enough for almost any !FontDirPro installation.

[Home] [Products] [FAQ] [Order] [Contact] [Press Releases] [Tech Support] [Downloads]

 Copyright (c) 2017 3QD Developments Ltd. All rights reserved. All trademarks are acknowledged. All details are correct at the time of publication, E & OE.
Last Edit Date 01/11/17
info@virtualacorn.co.uk
s