ST-506 Hard disc image creation

chat about arc/risc pc gaming & RISC OS software here (NOT the core OS!)

Related forum: adventures


User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

ST-506 Hard disc image creation

Postby IanS » Sat Sep 30, 2017 12:12 pm

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)

crj
Posts: 329
Joined: Thu May 02, 2013 4:58 pm

Re: ST-506 Hard disc image creation

Postby crj » Sat Sep 30, 2017 12:28 pm

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.

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: ST-506 Hard disc image creation

Postby IanS » Sat Sep 30, 2017 12:42 pm

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.

SteveBagley
Posts: 129
Joined: Sun Mar 15, 2015 8:44 pm

Re: ST-506 Hard disc image creation

Postby SteveBagley » Sat Sep 30, 2017 1:13 pm

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

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: ST-506 Hard disc image creation

Postby IanS » Sat Sep 30, 2017 1:21 pm

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.

User avatar
DutchAcorn
Posts: 1635
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands

Re: ST-506 Hard disc image creation

Postby DutchAcorn » Sat Sep 30, 2017 2:10 pm

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..)
Paul

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: ST-506 Hard disc image creation

Postby IanS » Sat Sep 30, 2017 4:29 pm

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.

philb
Posts: 118
Joined: Sat Aug 05, 2017 6:05 pm

Re: ST-506 Hard disc image creation

Postby philb » Sat Sep 30, 2017 4:39 pm

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.

User avatar
BeebMaster
Posts: 2475
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: ST-506 Hard disc image creation

Postby BeebMaster » Sat Sep 30, 2017 4:52 pm

Can you use dd within RISCix?
Image

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: ST-506 Hard disc image creation

Postby IanS » Sat Sep 30, 2017 5:56 pm

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.

crj
Posts: 329
Joined: Thu May 02, 2013 4:58 pm

Re: ST-506 Hard disc image creation

Postby crj » Sat Sep 30, 2017 6:37 pm

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.

ajw99uk
Posts: 108
Joined: Fri Sep 29, 2017 3:00 pm
Location: W Yorks, UK

Re: ST-506 Hard disc image creation

Postby ajw99uk » Sat Sep 30, 2017 6:58 pm

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!
Running RISCOS: A5000, A540, R140, RiscPC, RPi B
Running *nix: SGI Fuel & Indigo2, RPi2, x86, amd64, RiscPC, A540, R140

crj
Posts: 329
Joined: Thu May 02, 2013 4:58 pm

Re: ST-506 Hard disc image creation

Postby crj » Sat Sep 30, 2017 7:48 pm

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.)

philb
Posts: 118
Joined: Sat Aug 05, 2017 6:05 pm

Re: ST-506 Hard disc image creation

Postby philb » Sat Sep 30, 2017 7:54 pm

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.

timw
Posts: 26
Joined: Tue May 10, 2016 6:55 pm

Re: ST-506 Hard disc image creation

Postby timw » Sat Sep 30, 2017 8:20 pm

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 7 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 5 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.

User avatar
flibble
Posts: 592
Joined: Tue Sep 22, 2009 10:29 am
Contact:

Re: ST-506 Hard disc image creation

Postby flibble » Sat Sep 30, 2017 8:54 pm

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.

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: ST-506 Hard disc image creation

Postby IanS » Sun Oct 01, 2017 3:28 pm

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.

timw
Posts: 26
Joined: Tue May 10, 2016 6:55 pm

Re: ST-506 Hard disc image creation

Postby timw » Mon Oct 02, 2017 5:27 pm

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...


Return to “software”

Who is online

Users browsing this forum: No registered users and 1 guest