Page 2 of 6
Re: Smonson's untitled simple harddisk project
Posted: 17 Jul 2020 13:03
by Smonson
beel1 wrote: 17 Jul 2020 12:06
Maybe you can start first with Atari's AHDI?
ICD made ACSI-SCSI adapters known for their extended SCSI commands set support (group 1) using 2-bytes commands (IIRC $1F+group1 command byte) where ACSI is limited to 5bits commands (group0)
I think you're right there, I have also seen another forum post hinting about this behaviour. Looks like opcode 0x1f is used as as escaping mechanism. Excellent to know!
I think I also discovered something about the other problem, too. Looks like ENQUIRY reports more data about the device, including the total number of blocks, if the host makes requests with the ENABLE VITAL PRODUCT DATA bit set and PAGE 0xb0 (Block Limits) parameter. Well, I guess I'll implement that next!
Re: Smonson's untitled simple harddisk project
Posted: 17 Jul 2020 13:51
by Smonson
No no, I'm totally out of the ballpark. There is a READ BLOCK LIMITS command in scsi-0, but it's not mentioned at all in the Integration Guide, and it's so old that it doesn't appear in the copy of the SCSI spec that I have. But I finally found a reference to it on page 121 of an old scanned copy of the manual for a tape drive from 1986 :lol:
Re: Smonson's untitled simple harddisk project
Posted: 17 Jul 2020 14:00
by Smonson
Nope, wrong again. I'm just going to stop talking now.
Re: Smonson's untitled simple harddisk project
Posted: 17 Jul 2020 18:57
by stephen_usher
See page 460 of this document (Rigid drive geometry parameters page, 0x04h ):
https://www.google.co.uk/url?sa=t&rct=j ... I2B3FSW_YD
Re: Smonson's untitled simple harddisk project
Posted: 18 Jul 2020 00:39
by Smonson
Thank you very much
@stephen_usher! This has gotta be it!
Re: Smonson's untitled simple harddisk project
Posted: 18 Jul 2020 07:23
by Smonson
Phew! After implementing that geometry page thing, plus read, write, and format, I can format the device in the AHCI drivers now (with 100% bad sectors). ICD Pro doesn't work at all. I think it's set up to only work with SCSI drives.
I set it up with 1 head, 10 sectors per track, and 8 tracks but the formatter utility decided there were 780 sectors and a total of 32MB of data. No idea how it's arriving at those numbers. But perhaps once I add the ability to save and load data to an SD card there'll be more clues to work from.
Re: Smonson's untitled simple harddisk project
Posted: 18 Jul 2020 13:26
by beel1
Rigid Drive Geometry Parameters page (04h)
This mode page has been declared obsolete by the T10 committee.
So I guess this is the reason why RaSCSI cannot be partitioned with AHDI or SCSItools (511MB falsely reported IIRC), but is OK with ICD Pro (my ACSI-SCSI adapter is group1 compatible) :D
Re: Smonson's untitled simple harddisk project
Posted: 19 Jul 2020 03:18
by Smonson
So, I think I got this all pretty close to working... I still need to speed up the SD card transfers because there's a 3-second timeout on ACSI transfers, after which the operation gets aborted. And of course the AHDI drivers insist on doing 128-sector bursts which is too many for most of my SD cards to do in 3 seconds. However, I do have one that seems fast enough. I will work on that problem later.
I got through the AHDI formatting and partitioning process OK but then nothing happens. The docs mention assigning drive letters to the partitions but they don't explain how to do that.
Re: Smonson's untitled simple harddisk project
Posted: 19 Jul 2020 07:46
by czietz
Drive letters are assigned to the partitions automatically at the next reboot when AHDI is loaded.
Re: Smonson's untitled simple harddisk project
Posted: 19 Jul 2020 08:40
by Smonson
Thanks @czietz. I guess that means there's something wrong with the data on the disk itself.