Subject: Re: (Small) Hardware donation(s)... & help
To: Robert Black <r.black@ic.ac.uk>
From: A.S.MCGough <A.S.McGough@newcastle.ac.uk>
List: port-arm32
Date: 02/20/1997 12:05:43
On Tue, 18 Feb 1997, Robert Black wrote:
 
> Seriously, if anybody else is going to write a driver, we will be happy to 
> lend some assistance (or at least I will).

This is probably a one more for mark than rob but ....

After a hard disc corruption on my computer the other day (RiscOs side) I 
finally re-coded an old disc recovery utility into C. Having finished 
recovering my files I realised the code could easily be ported to unix by 
the changing of a few system calls and the like. I now have a small 
program that works under unix that should be able to read directly from 
the disc surface and allow the option to save files from the RiscOs side 
down to the unix side. NOTE this is a rather dirty hack of a program and 
only allows files to be read. When I log in as root the program opens a 
device (eg /dev/wd0c) as a normal file and reads the data from it. 
Unfortunatly [wd/sd][012...]c is the raw mount to the device and starts 
from the beginning of the partition tables etc. Could someone explain:

1) How do I open wd0a etc. as a partition just for reading from - all 
normal read requests fail.

2) How to calculate the offset to the start of the RiscOs partition. If 1 
not possible.

3) Get info into converting what I have into a proper device driver.

steve..

PS, At the moment I'd be happy enough to be able to use this to read 
files over from RiscOs rather than having to re-boot the system.