Raw disc reading tools
Theo Markettos (89) 919 posts |
I have a need to image some RISC OS and DOS floppies and IDE drives. It turns out one IDE drive, which I think originally came from an A4, doesn’t play nicely with my USB adaptor. But I think the Risc PC floppy and IDE controller should be old enough to handle it. So what’s a good tool to take bit-for-bit images of discs on RISC OS, without interpreting the data? I think some of the emulator tools can do this, but is it feasible to extract a raw image of the data (eg a DOS floppy) without extra metadata? Bonus points if they can handle corrupted sectors. |
Steffen Huber (91) 1953 posts |
CloneDisc by Piccolo Systems? Or read via low-level Filecore sector ops in a simple loop, if ADFS recognizes it. Or read via low-level SCSI-Ops if accessible via USB-IDE adapter, for which I could probably provide some code (if I can find it). |
Steffen Huber (91) 1953 posts |
It looks like CloneDisc needs RO5, so for a bog standard Risc PC, you’d need to additionally softload RO5… |
Jeffrey Lee (213) 6048 posts |
I believe that USB adaptors only support drives which support LBA. But there doesn’t seem to be a large amount of info about this on the ‘net, so it would be useful if you could confirm that all your LBA drives work and it’s only non-LBA drives which don’t. I think in one of my searches, I did find a forum post from someone who was able to read a CHS IDE drive using a USB adapter, but only by writing a script that would map the desired CHS address to the corresponding IDE register values, and then map those register values back to an LBA address so that it can be fed to the USB adapter (which would then map it to LBA IDE register values, which would be interpreted by the drive as CHS register values). Of course the forum post neglected to include any sample code for this. |
Rick Murray (539) 13840 posts |
Whatever filing system it actually works with will provide a DiscOp SWI (ADFS_DiscOp, etc). Simply read the disc geometry (number of sectors) and then make a loop to read each sector in turn, writing it to wherever. |
David Boddie (1934) 222 posts |
Maybe Peter Howkins can help, if he can dig out the program he used to clone an old RISC iX hard disk. I found another thread about disk cloning, but it’s mostly general advice. I started to write something to read an ADFS-formatted hard drive on RISC OS, then I got the opportunity to plug it into an IDE interface on a Linux box, so just used dd instead. |
Theo Markettos (89) 919 posts |
I don’t think that’s the case. It will boot in the old PC it came from, and the BIOS in that had it set to LBA (along with the exact C/H/S dimensions, landing zone, the works). ddrescue is only able to get at the first 8KB (of 256MB), and dmesg is full of errors. It’s a Quantum Daytona 256MB. I probably have some old cloning tools lurking around somewhere (I believe a NetBSD install once came with them), but I thought these days emulators had disc imaging tools? |
Matthew Phillips (473) 721 posts |
I wrote an application called DiscImage a long time ago (last updated in 2002): http://sinenomine.co.uk/software/#DiscImage If it doesn’t do what you want, let me know and I might be able to get my head round the code and improve it. It can’t handle corrupted sectors. I think it’s limited to floppy drives, but it might be possible to modify it. I wrote it in C and the zip file includes the source. |
Peter Howkins (211) 236 posts |
I thought I had something for directly imaging ADFS discs, but it appears that it’s on the hard-disc of someone else’s computer (maybe I should have imaged it …). The ADFS version was hacked from my SCSI version here, you will need to tweak all the SCSI disc op SWIs to their ADFS equivalents and, I believe, potentially change it so it’s not hard-coded to image :4. I think there might also have been a change needed related to sector sizes, 512B vs 2KB? It’s in the SCSITools/other subdirectory |