Formatting SD/CF cards for use on RISC OS 3.1

Arc/RPCs, peripherals, RISCOS operating system & ARM kit eg GP2x, BeagleBoard
steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Sat Jun 22, 2013 10:37 am

I thought I'd write up a little 'how to' guide, detailing the easiest way to format an SD card for use under RISC OS 3.1 (via an IDE to SD/CF card adapter). This is somewhat a 'black art' because of the lack of a user-friendly RISC OS HDD formatting application.

Important: This guide will be using !HForm v2.62 on a RISC OS 5 Raspberry Pi, to format an SD card suitable for use on RISC OS 3.1. This version of !HForm only runs on RISC OS 3.6 and later. The same principals can be applied for CF cards, if using a RISC OS 3.6 or later RiscPC to format via an IDE/CF adapter.

Also I'm only considering a single partition here - there is no RISC OS 'standard' for multiple partition formats, so these tend to have different formatting requirements specific to the individual IDE interface being used on RISC OS 3.1.

Requirements:

1) A Raspberry Pi.
2) A SD card 512Mb or larger (don't go too large because you can only use the first ~500 Mb in practice - any extra space is wasted).
3) A SD card to IDE adaptor, for use on RISC OS 3.1, plenty available on certain popular auction sites.
4) If your RISC OS 3.1 computer is an older 'Archimedes' badged computer (A310/A4x0/A540/A3000) you will also need an IDE interface podule.

Load up RISC OS 5 on the Pi. Set up a RAM disc, with 1Mb or so free, and copy the directory "Utilities.Caution" from the RISC OS 5 SD card, into the RAM disc.

Now pull out your RISC OS 5 SD card, and pop in the SD card which you want to format for use on RISC OS 3.1 (this procedure is perfectly safe on RISC OS 5, but don't try it under Linux!).

Next, from the 'Caution' directory on the RAM disc, run !HForm. Follow the questions on the screen, using the answers below:

- You want to format the SD card, so enter 'M' for SDFS.
- And '0' for drive.

When HForm lists the 'Suggested shape' of the SD card, there are three numbers provided: Cylinders (eg. 953), Heads (eg. 64) and Sectors/track (eg. 32). Find a pen and paper, and a calculator, then multiply these three numbers together, then multiply the result by 512. eg. 953 * 64 * 32 * 512 = 999,292,928. This is the true unformatted size of the SD card in bytes. Divide by 1024 twice, to get the size in Mb. eg. 999,292,928 / 1024 / 1024 = 953 Mb. Make sure this is above 512 Mb, then continue.

- If !HForm asks whether you want to 'retain this shape', say 'N'
- HForm now asks for your desired SD card 'shape'
- enter 16 for the number of Heads
- enter 63 sectors per track
- enter 1021 cylinders
- enter 1020 for 'Parking cylinder'

The above settings generate a 503 Mb drive, which is the best size for RISC OS 3.1. You could format up to 512 Mb, but going above 503 Mb doubles the 'LFAU' large file allocation unit, which has a very detrimental impact on space usage on the card, so stay at 503 Mb for best compromise.

- It will now ask if you want to add to the defect list, enter 'A' for no
- When it asks if you want to format or initialise, enter 'I' for initialise
- For 'Soak test' enter 'N'
- For 'Bootable disc' enter 'Y'

Next, *very importantly* when asked if you want 'long filenames', say 'N' for no, because long filenames are not compatible with Risc OS 3.1.

- It will then ask 'Are you sure?' - if you are, say 'Y'
- And finally, it will ask what size LFAU you need, if you have used the values I gave above, enter 1024.

In a matter of seconds, your SD card will be initialised as a 503 Mb card, blank and ready to use on RISC OS 3.1 :)

I've tested cards formatted like this through SD/CF to IDE adapters on the Acorn IDE interface on a RiscPC and A4000, and on an ICS ideA IDE interface on an A310 and on a Watford Electronics IDE interface on an A540. The card also works fine on a Raspberry Pi, so you can copy large quantities of downloaded data onto the card via the Pi, and then move the card into your RISC OS 3.1 computer. (make sure the RISC OS 3.1 computer is switched off when you remove/insert the card - or you will loose data!).

Steve
Last edited by steve3000 on Sat Jun 22, 2013 5:52 pm, edited 1 time in total.

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Sat Jun 22, 2013 2:35 pm

Thanks again for the guide Steve, I'm hitting a problem after these two steps:

- You want to format the SD card, so enter 'M' for SDFS.
- And '0' for drive.

... HForm fails with "The disc drive is empty at line 730" and then exits.

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Sat Jun 22, 2013 2:50 pm

Success! Kind of. With a different SD card it worked fine. However the card still won't read in my A3000 (I get the "invalid disc 0" type error on boot, and no disc shows up once I hit the desktop).

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Sat Jun 22, 2013 2:56 pm

Dammit! Getting closer now - I formatted instead of initialised the disk, and now my A3000 boots fine with it and shows it on the desktop as "untitled". When I try and open it however it errors with "Failed to load DOS FAT sectors error when reading IDEFS::Untitled.$".

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Sat Jun 22, 2013 5:01 pm

Many apologies Andy! I got my numbers wrong! :oops:

I knew I'd seen the same error you'd seen ('Failed to load DOS FAT sectors') at one point in my testing. So I've double checked my notes, and it seems I posted up the wrong set of values!

I've updated my original post above - the values you need are:

16 Heads, 63 sectors per track, 1021 cylinders and 1020 for 'Parking cylinder'.

It's the 'Heads' and 'Sectors per track' which are really important, the values '16' and '63' for these have never given me any errors on RISC OS 3.1. With these correct numbers, just using 'Initialise' should be fine :)

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Mon Jun 24, 2013 7:50 am

All good now Steve, nice one :)

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Mon Jun 24, 2013 8:26 am

Spoke too soon :(

It works mostly, but I get enough "disc error 13" write errors when using the card on the A3000 to make it non-viable unfortunately.

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Mon Jun 24, 2013 4:35 pm

AndyGarton wrote:Spoke too soon :(

It works mostly, but I get enough "disc error 13" write errors when using the card on the A3000 to make it non-viable unfortunately.
Oh dear...that sounds bad. Is the SD card known to be good? If you format it on the PC, can you fill it *completely* and then copy everything off again with no errors or problems? I've never had a "Disc error 13" on an SD card, but that is what you get on IDE drives when they fail - and I really doubt it's got anything to do with the formatting.

How much free and used space is reported when you press f12 and type *Free?

And if you press f12 then type *Verify does it return with 'Verified OK'?

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by AndyGarton » Mon Jun 24, 2013 5:15 pm

Thanks Steve, I'm away from my A3000 now so answers to those will have to wait a few days. I did try a verify and that was ok. I've used the card before for other things without any issues but it could easily have gone bad so I'll also try a different card.

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Mon Jun 24, 2013 5:33 pm

Ok, I'd definitely recommend reformatting on the PC in case the card was/is bad - there are some good tools out there - I use sdformatter 3.1 from sdcard.org which claims to carry out a full format to the correct sd card specification.

To 'verify' the card is ok, I use 'H2Testw' (search google) it maxes out the card and tests the full extent of error free, useable data storage.

If the card passes both of these, then retry the Pi initialisation process above. You should end up with 502 Mb of free space.

sirbod
Posts: 988
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by sirbod » Wed Aug 14, 2013 11:29 am

steve3000 wrote:16 Heads, 63 sectors per track, 1021 cylinders and 1020 for 'Parking cylinder'.
I'm not sure why its different to your figures, but the breakpoint for a 1024 LFAU on my A5000 is:

16 Heads, 63 sectors, 1015 cylinders

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Wed Aug 14, 2013 12:20 pm

Interesting. I've not tried on an earlier version of !HForm as you will be using on the A5000 (v2.62 needs RISC OS 3.7) - but possibly there is a difference in the calculation used?

What version are you using? I'll have a try on a spare card and see if the LFAU changes at different places depending on !HForm version...

sirbod
Posts: 988
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by sirbod » Wed Aug 14, 2013 12:40 pm

steve3000 wrote:Interesting. I've not tried on an earlier version of !HForm as you will be using on the A5000 (v2.62 needs RISC OS 3.7) - but possibly there is a difference in the calculation used?

What version are you using?
2.19

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by Zarchos » Wed Aug 14, 2013 6:17 pm

Slightly off topic but :
Has somebody tried to connect DOMs (Disk On Modules) to our Archies ?
I own some, old ones whose sizes < 512 Mb but I never managed to format them without numerous errors.

So, Steve, ready to issue another 'how to' :wink:

Still happy to be back in the Acorn World ? :D

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Wed Aug 14, 2013 8:46 pm

Zarchos wrote:So, Steve, ready to issue another 'how to' :wink:

Still happy to be back in the Acorn World ? :D
Haha it's a bit different to 20 years ago, but my A4000 still boots faster than my PC - some things don't change :D

I've not seen one of these DOMs before - what fitting do they have - full 3.5" IDE plug, along with 4-pin power connector, or a smaller 2.5" / laptop drive plug?

What errors did you get when formatting - or did it just not work?

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by Zarchos » Thu Aug 15, 2013 5:47 am

Hello.

The DOMs I've got are full 3'' 1/2 with a power supply connector (2 wires terminated by a connector as found on CD ROMs or full size hard drives).
They are males so it's perfect to plug in the motherboard or podule female connector.

Although !HForm gave me some infos about them (or the software provided by various IDE podules manufacturers), either formatting never started or completed OK, or the disk was never mounted.

Is there a generic tool somewhere ( I guess on the PC ) which could give the DOMs parameters (in case it's the RISC OS software which don't detect them correctly) ?
Or the idea is to use the hd parameters autodetection as implemented in all PC now ?
Or just force the parameters entrie with the values you gave ?

Cheers,
Xavier.

User avatar
hoglet
Posts: 8273
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by hoglet » Thu Aug 15, 2013 6:27 am

Zarchos wrote:Is there a generic tool somewhere ( I guess on the PC ) which could give the DOMs parameters (in case it's the RISC OS software which don't detect them correctly) ?
If you have access to a Linux machine, take a look at the link here:
http://www.mombu.com/programming/os9/t- ... 14649.html

This provides examples of using fdisk, sfdisk and hdparm

There are known incompatibilities between the IDE implementation of early Acorn computers, and *some* more modern drives. For example, my 8GB Kingston Elite Pro will not boot, even if I dd an known good image to it.

This weekend I'm going to have another go at generating a blank 503MB image following the guide above. I'll zip it up and post it here if it's small enough. You could then try copying it on to your device using dd on a Linux machine.

Dave

pauljh
Posts: 24
Joined: Thu Jan 07, 2016 1:32 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by pauljh » Sat Jan 30, 2016 3:49 pm

Hello All,
After not having an Archimedes for 20 ish years I've just got a A3000 with Watford IDE, HD was well dead, so now it has a IDE-SD adaptor, I've initialized the SD card using the instructions above, BUT still my archimedes comes up as "Bad Drive". I've added it under Disks - IDE Hard disks, (so it shows as :4). My memory of Riscos is close to 0. Any help anyone?

Regards

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Sat Jan 30, 2016 3:57 pm

Hi Paul,
I think the problem is that the Watford interface is set up in a different way to the Acorn interface. The !configure application only sets up Acorn interface (which your A3000 won't have). So use !Configure to change the IDE Hard Discs back to 0, then reset.

Now press f12 and type:

*Configure Filesystem IDEFS
*Configure IDEFSDiscs 1

Then reset. This should set up the Watford interface - but depending on the version, there is a possibility it may need a specific configure programme. Let us know if these commands get you any further, then we'll see.

pauljh
Posts: 24
Joined: Thu Jan 07, 2016 1:32 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by pauljh » Sun Jan 31, 2016 1:11 pm

Hi Steve,
Thanks for this, unfortunately this morning the machine doesn't initialize. I get a the usual mix of screen colours, a constant power led and then the disk led flashing 4 times, pause, flash 4 times. I notice from searching this forum they are binary codes, but can't seam to find an explanation anywhere for what the codes mean? I've reseated all the chips, removed the IDE interface for the moment and still the same (even with Delete held down). The battery "looks good", but I haven't cut it yet and added a replacement.

Any links to the LED codes anywhere?

regards


pauljh
Posts: 24
Joined: Thu Jan 07, 2016 1:32 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by pauljh » Sun Jan 31, 2016 1:40 pm

Well I've found a link to explain the nybble sequences and I'm getting a 409, which i believe is a MEMC CAM mapping failed?

User avatar
paulv
Posts: 3854
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by paulv » Sun Jan 31, 2016 1:50 pm

&409 is indeed MEMC CAM mapping failure.

As you've got an A3000, you can't easily change or reseat the MEMC chip but I'd first check for dry joints around MEMC. Then I'd inspect the ROM jumpers to make sure they're in good condition and not failed. After that, if you have a RAM expansion fitted, I'd remove it, clean the headers and connectors and reseat it. If the error persists then it's time to fit RISC OS 2 and hope the machine will boot. If it does, is time to start running some memory tests...

Paul

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by Zarchos » Sun Jan 31, 2016 2:06 pm

From recent experiences I think it's now harder and harder to find a working A3000 unless its battery has been changed several years ago.

pauljh
Posts: 24
Joined: Thu Jan 07, 2016 1:32 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by pauljh » Sun Jan 31, 2016 2:22 pm

Hi All,
Thanks for the help, I decided to remove the battery and the leak was minimal, none onto the PCB, so happy with that, I've looked round the MEMC (the one close to the battery??) and it "looks" okay, its odd it worked yesterday until I messed around the the IDE. So if it is a MEMC error, is reseating (assuming its removal-able) the only solution?

Regards!
-

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by Zarchos » Sun Jan 31, 2016 2:27 pm

The MEMC is soldered onto the A3000 motherboard unfortunately. (it's the big chip located in the South East, and the name is written on the motherboard).

Has your Archie got a memory expansion ? You could remove it (gently, if it's been there for years it's going to be reluctant to leave its place).

Wait for other people' ideas before attempting anything, there are some specialists here.

Even though you don't see damages near the battery location, you can have some broken tracks in this area ...

User avatar
paulv
Posts: 3854
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by paulv » Sun Jan 31, 2016 2:32 pm

On the A3000 all the major chips are soldered in so reseating isn't an option. You'd have to break out a rework solder station to fix and dry joints if that is the problem.

IME the A3000 is the most problematic motherboard for fitting and refitting it into the case and also fitting podules whilst not twisting or bending the board and causing joints to fail.

IIRC MEMC is under the keyboard on the right of the motherboard as you look at it. It's marked on the PCB as MEMC so there should be no mistaking it.

You may want to start a new thread on fixing this error rather than continuing in this one as this could get lengthy.

Paul

iainjh
Posts: 329
Joined: Mon May 14, 2012 11:18 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by iainjh » Sat Mar 26, 2016 11:42 pm

Hi,

is the raspberry pi process above, still current /seen as the simplest way to format an SD card for an A3020?

I have a A3020, have a CF card and adaptor that seems to work but hasnt yet been formatted. I also have a 2-chip sd card<> ide adaptor so could use that if this still the current best method..

cheers

PS has anyone shared images to pre-configured CF or SD card 'hard drive images' to alternatively write with winimage etc?

iainjh
Posts: 329
Joined: Mon May 14, 2012 11:18 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by iainjh » Tue Jan 17, 2017 11:15 pm

a short update from me and my A3020.. and a request for further help :(

1. using steve3000's wonderful guide above, I easily and quickly formatted an Sd card and for some time it has worked perfectly! thank you!

2. however I no longer have a pi2 and want to bulk load some games... I now only have a pi3 and the risc os 5 image i have on SD doesnt seem to work on the Pi3! does anyone please please have a link to a working SD card .img that i can use wth my Pi3?

tia! :)

steve3000
Posts: 1987
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Formatting SD/CF cards for use on RISC OS 3.1

Post by steve3000 » Tue Jan 17, 2017 11:45 pm

Hi Iain,
Glad my guide worked for you :)

As for RPi 3 and RISC OS 5, best place to check is the riscosopen.org downloads area and forum. I don't have a RPi 3 myself, but from what I've read, the latest RISC OS 5 ROM files are compatible with RPi 3, so you should be able to update the rom on your SD card and get it functioning :)

Post Reply