Page 1 of 1

ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 12:12 pm
by IanS
If I had an old ST-506 drive connected to an A440, what would be a way to create a bit-for-bit copy of the drive. I have IDE and SCSI drives to put the image on, which can then be copied over Econet or Ethernet to other machines for safe keeping.

I had planned to use !FCFS to read the drive, but it complains about it not being E-format.

I guess I need something like the SCSIReader in SCSITools from https://www.4corn.co.uk/articles/riscix121c/, but for ADFS. Does anyone have anything suitable already written?

I have got a file level copy of the data carefully saved, but I'd like to create a full image before the drive goes back into its original machine.

(This is the drive from - viewtopic.php?f=16&t=13540)

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 12:28 pm
by crj
How's your programming?

It may be worth seeing whether ADFS_DiscOp 1 gets data off the disc. If it does, write a loop to read a few hundred kilobytes at a time and store them somewhere; you might be home and dry.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 12:42 pm
by IanS
crj wrote:How's your programming?

It may be worth seeing whether ADFS_DiscOp 1 gets data off the disc. If it does, write a loop to read a few hundred kilobytes at a time and store them somewhere; you might be home and dry.
I was trying to avoid having to write anything, I was looking for something that would just work. I don't have any other ADFS hard disc to try it on, and I don't want to be using the old drive any longer than necessary.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 1:13 pm
by SteveBagley
IanS wrote: I was trying to avoid having to write anything, I was looking for something that would just work. I don't have any other ADFS hard disc to try it on, and I don't want to be using the old drive any longer than necessary.
I came across this a couple of years ago -- looks like the programming has already been done for you :)

https://offog.org/notes/archiving/acorn-a310/

Steve

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 1:21 pm
by IanS
SteveBagley wrote:
IanS wrote: I was trying to avoid having to write anything, I was looking for something that would just work. I don't have any other ADFS hard disc to try it on, and I don't want to be using the old drive any longer than necessary.
I came across this a couple of years ago -- looks like the programming has already been done for you :)

https://offog.org/notes/archiving/acorn-a310/
I found that googling, but it uses serial to do the transfer, I have other local (faster) storage where I should be able to write the image. I don't want to power on the drive any longer than needed.

Maybe what I'm looking for doesn't already exist.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 2:10 pm
by DutchAcorn
If you have a SCSI podule in your A440, you could file copy everything to a SCSI drive and image that using a SCSI-fitted PC using Linux DD?

(I know, lot of assumptions..)

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 4:29 pm
by IanS
DutchAcorn wrote:If you have a SCSI podule in your A440, you could file copy everything to a SCSI drive and image that using a SCSI-fitted PC using Linux DD?

(I know, lot of assumptions..)
I already have a file level copy of the data, I was trying to get a bit-for-bit disc image. Doesn't seem like there is anything quick and easy available to do that.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 4:39 pm
by philb
No, I can't think of any easy way to do that. Hard disks don't show up in DeviceFS, do they? Assuming not, I think the ADFS_DiscOp suggestion is probably about as good as it gets. Sadly *BACKUP only works for floppy disks if I remember right.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 4:52 pm
by BeebMaster
Can you use dd within RISCix?

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 5:56 pm
by IanS
BeebMaster wrote:Can you use dd within RISCix?
Yes, in theory.

I think that just trades one problem into many others. I'd then have to work out how to get networking working and a way to copy the file from RISCiX.

I'll probably just stick with the file level copy I have.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 6:37 pm
by crj

Code: Select all

F$ = destination_filename
D% = source_drive_number
S% = disc_size_in_bytes
B% = 256*1024 : REM buffer size

DIM M% B%
F% = OPENOUT(F$)
I% = 0
WHILE I%<S%
  PROCtransfer(S%-I%)
ENDWHILE
CLOSE#F%
END

DEF PROCtransfer(N%)
    IF N%>B% THEN N%=B%
    SYS "ADFS_DiscOp",0,1,(D%*&20000000)+I%,M%,N%
    SYS "OS_GBPB",2,F%,M%,N%
    I% = I% + N%
ENDPROC
Disclaimer: I've not written any significant BBC Basic in well over a decade and I don't have a machine I can test that on. It might be horribly wrong. It almost certainly has some minor glitch or other.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 6:58 pm
by ajw99uk
IanS wrote:
BeebMaster wrote:Can you use dd within RISCix?
Yes, in theory.

I think that just trades one problem into many others. I'd then have to work out how to get networking working and a way to copy the file from RISCiX.

I'll probably just stick with the file level copy I have.
Ether1 and Ether2 cards supported, plus (apparently) Ether3 using the installation from 4corn.co.uk; ifconfig and route commands to get onto your local LAN then ftp. Been transferring stuff the other way and RISCiX ftp is >50% faster than ANT's!

I could also suggest ARMLinux or NetBSD-acorn26, but getting either up and running on a A440 would be "interesting", I think.

IIRC I did once set up a ST506 podule in a RiscPC, soft-loading the ADFS module from 3.10 as ADFS in a RiscPC ROM does not support ST506. Again IIRC, that RPC was on 4.02, possibly 4.39 by the time of the experiment. ARMLinux for RiscPC is more straightforward option than for Archimedes (not sure if there is a driver for the ST506 podule - ARMLinux has been done as an OS/hdf image for arcem so the chances seem reasonable, though it may have dropped out of the source tree since then).

Final thought - the ST506 interface supports two drives, so if you can source a second HD in better condition (and necessary cables), that could give you breathing space to copy files and then extract bit-for-bit over serial from the "new" HD.

All subject to available hardware and time, of course!

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 7:48 pm
by crj
Note that those old Ethernet cards support 10BASE2 and AUI, not 10BASE-T. You'll also need a 10BASE-T transceiver. (And you have to change links to make the card use said transceiver.)

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 7:54 pm
by philb
Not that it really helps the original poster with his immediate problem, but http://www.pdp8online.com/mfm/ seems like quite a good solution for whole-disk copies of arbitrary old MFM drives. I have bought one of those boards in hopes of being able to retrieve the data from some of the old disks in unknown formats that I have kicking around.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 8:20 pm
by timw
I wrote the attached quick Basic program a while ago to extract just the RISCiX partition from an ST506 drive.
PExtract,ffb.zip
(753 Bytes) Downloaded 23 times
If you modify this prog to copy the whole drive, it ends up looking almost identical to crj's proposed code posted earlier.
PExtract2,ffb.zip
(486 Bytes) Downloaded 21 times

Code: Select all

drive%=4
filename$="HostFS:$.Partition"
:
memsize%=512*1024
POffs%=0
PSize%=10*1024*1024
DIMmem%memsize%
:
out%=OPENOUT(filename$)
FORadd%=POffs%TOPOffs%+PSize%STEPmemsize%
 PRINT".";
 IF(POffs%+PSize%-add%)<memsize% memsize%=POffs%+PSize%-add%
 SYS"ADFS_DiscOp",,1,(4<<29)ORadd%,mem%,memsize%
 SYS"OS_GBPB",2,out%,mem%,memsize%
NEXT
CLOSE#out%
You will need to edit the program with the correct source disc size (PSize%), and the location of the output file.

Re: ST-506 Hard disc image creation

Posted: Sat Sep 30, 2017 8:54 pm
by flibble
IanS wrote:I guess I need something like the SCSIReader in SCSITools from https://www.4corn.co.uk/articles/riscix121c/, but for ADFS. Does anyone have anything suitable already written?
At the CCH earlier this year Sarah Walker and I bodged SCSIReader into ADFSReader to image an st506 drive, if memory serves all you need to so is change the SCSI_* SWIs to ADFS_* with the same names. Oh possibly some changes for sector sizes too ...

Sorry I've not got the file to hand to give out.

Re: ST-506 Hard disc image creation

Posted: Sun Oct 01, 2017 3:28 pm
by IanS
timw wrote: If you modify this prog to copy the whole drive, it ends up looking almost identical to crj's proposed code posted earlier.

You will need to edit the program with the correct source disc size (PSize%), and the location of the output file.
Thanks, I think I now have an image of the drive.

I pressume drive% should have gone in the ADFS_DiscOp, rather than the hard-coded "4", but as it was drive 4 I wanted, it didn't matter.

Re: ST-506 Hard disc image creation

Posted: Mon Oct 02, 2017 5:27 pm
by timw
IanS wrote:I pressume drive% should have gone in the ADFS_DiscOp, rather than the hard-coded "4", but as it was drive 4 I wanted, it didn't matter.
Correct. The most important thing is that it's DiscOp 1 and not 2...