![]() |
![]() |
#1 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
ICD AdIDE CPRM sector info
I was asked about the "CPRM" sector used by the ICD AdIDE ROM and figured someone else might be interested in this. It could help if you want to manually edit the CPRM sector in order to use a larger drive which the ICD Format software doesn't like.
The first sector on the drive is used by the ROM, and is (mostly) hidden from normal access. It contains a "CPRM" signature at the start, then the number of heads, cylinders and sectors/track. In the CPRM sector you have: offset 4: heads offset 6: cyls offset 8: sectors/track offset 10: 0 in one HDF I created, $F300 in another???. Not sure what this is for, but see below. It seems the AdIDE ROM may need bit 0 of the word at offset 10 to be 1 in order to actually use the values from the CPRM sector. If that bit is not set, the ROM doesn't issue an INITIALIZE DRIVE PARAMETERS command. And that bit wasn't set to 1 by the ICD Format software when I tested in WinUAE. The heads value recorded in the CPRM sector by the ICD formatter software seems to be the number of heads. When that value is written to the IDE Drive/Head Register, 1 needs to be subtracted from it. But the ROM code doesn't seem to do that. So if you want 16 heads, you should put 15 in the heads field. There are a couple of ways to access the CPRM sector in software (as opposed to unplugging the drive and hooking it up to a PC). The AdIDE ROM supports SCSI command $1F which seems to be used for writing the CPRM sector. Also, it may be possible to read/write the CPRM sector manually by issuing a READ (10) or WRITE (10) command (via HD_SCSICMD) with LBA = $FFFFFFFF. For SCSI command $1F, the CDB looks like this: 1F hh cc cc ss xx Where hh is number of heads, cccc number of cylinders, ss sectors/track, xx gets sign-extended to a word and put in CPRM offset 10. Edit to add: Also, the disk capacity as reported in response to a READ CAPACITY SCSI command has the all-too-common off-by-one error. The reported capacity is one sector more than it should be. Last edited by mark_k; 31 March 2015 at 13:19. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ICD Adspeed/AdIDE CF Drive/KS 2.05 Hardware pr0n | Dropcheck | Hardware pics | 33 | 08 February 2015 21:27 |
Saving an ICD AdIDE. Expert help required. | fc.studio | support.Hardware | 0 | 20 March 2008 11:47 |
ICD AdIDE Manual | fc.studio | request.Other | 7 | 19 March 2008 07:26 |
ICD Adspeed/AdIDE info? | Dropcheck | support.Hardware | 6 | 26 January 2008 20:34 |
ICD adIDE 2 Capabilities | Runey | support.Hardware | 2 | 22 April 2005 05:27 |
|
|