[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] How to recognize a type of drive?



2014-03-19 19:51 GMT+01:00 Gerhard Stoll <gerhard_stoll@gmx.de>:
> Am 08.02.2014 um 12:47 schrieb David Gálvez:
>
>> major: Major Device Number
>> 0..7: Devices on the ACSI bus with ATARI-compatible command set
>> 8..15: Devices on the SCSI bus
>> 16..17: Devices connected to the primary IDE interface
>> 18..19: Devices connected to a secondary IDE interface
>> 20..23: Additional IDE devices
>> 24..63: Extensions as defined in the pun field in the PUN_INFO structure
>> 64: Devices on the standard floppy controller
>> 65..255: Extensions outside the scope of AHDI.
>>
>> From major 32 to 63 is an USB device. (this isn't documented but it's
>> what is using Didier's TOS and MiNT)
>
> That mean that the table must be like that?
>

Yes

> major: Major Device Number
> 0..7: Devices on the ACSI bus with ATARI-compatible command set
> 8..15: Devices on the SCSI bus
> 16..17: Devices connected to the primary IDE interface
> 18..19: Devices connected to a secondary IDE interface
> 20..23: Additional IDE devices
> 24..31: Extensions as defined in the pun field in the PUN_INFO structure      <--- changed
> 32..63: USB device                                                                                           <--- new
> 64: Devices on the standard floppy controller
> 65..255: Extensions outside the scope of AHDI.
>

but notice that USB devices major numbers assignment from 32 to 63
follows the rule "Extensions as defined in the pun field in the
PUN_INFO structure", see below the new mask used for USB in the pun
field in the PUN_INFO structure.

#define PUN_DEV           0x1F /* device number of HD */
#define PUN_UNIT          0x07 /* Unit number */
#define PUN_SCSI          0x08 /* 1=SCSI 0=ACSI */
#define PUN_IDE           0x10 /* Falcon IDE */
#define PUN_USB           0x20 /* USB */
#define PUN_REMOVABLE     0x40 /* Removable media */
#define PUN_VALID         0x80 /* zero if valid */