Simtec USB technical

From RISC OS

(Difference between revisions)
Jump to: navigation, search
(Added info about disc formatting)
(OtherDevs details)
Line 2: Line 2:
Plug in a USB drive and it appears with its name on the iconbar, eg USB_DISK with hard spaces (Alt-160) replacing spaces in the DOS disc name.
Plug in a USB drive and it appears with its name on the iconbar, eg USB_DISK with hard spaces (Alt-160) replacing spaces in the DOS disc name.
 +
 +
MassFS doesn't support devices over 2GB (due to the limitations of RISC OS' image filing systems) and doesn't provide any means to access the raw sector data of such devices.  It appears devices larger than 2GB aren't recognised even if they have a partition smaller than 2GB.
To save off a DOSDisc image of the disc, do
To save off a DOSDisc image of the disc, do
Line 23: Line 25:
:r2 = size in sectors (512 bytes each)
:r2 = size in sectors (512 bytes each)
:r3 = flags?
:r3 = flags?
 +
 +
===OtherDevs file===
 +
The !MassFS.OtherDevs file is a way of tweaking various options to persuade MassFS to work with a USB Mass Storage device.  It won't help if the device is not supported by the underlying USB stack: if it is not detected by *USBDevices, or hangs *USBDevices.  It consists of a list of entries <tt>VVVV:PPPP=FFFFF</tt> where
 +
* VVVV: 4 digit hex vendor ID
 +
* PPPP: 4 digit hex product ID
 +
* FFFFF: alphanumeric codes describing flag settings for this device.
 +
The codes mean as follows:
 +
* U: do not attempt to support this device (in case it's accidentally inserted)
 +
* R: is a card reader
 +
* r: might be a card reader, so check
 +
* L: correctly supports "get maximum LUNs" command
 +
* 2: has 2 LUNs
 +
* 3: has 3 LUNs
 +
* and so on until
 +
* 8: has 8 LUNs
 +
* Q: doesn't support Request Sense
 +
* q: supports Request Sense if an error occurs
 +
* _: supports reset recovery (experimental)
 +
* T: requires test before Read Size
 +
* t: doesn't support START up command
 +
* C: supports READ CAPACITY (if not, READ FORMAT CAPACITIES will be used instead)
 +
* w: disable writing (make read-only)
 +
For example:
 +
# Device: TwinMOS 256Mb Pen Drive
 +
# Submitted by CJE
 +
126f:2035=LR_T
==References==
==References==
News posting by Jason Tribbeck: [[http://groups.google.co.uk/group/comp.sys.acorn.hardware/msg/39c434435615653f | MassFS formatting]]
News posting by Jason Tribbeck: [[http://groups.google.co.uk/group/comp.sys.acorn.hardware/msg/39c434435615653f | MassFS formatting]]

Revision as of 22:41, 22 April 2006

MassFS

Plug in a USB drive and it appears with its name on the iconbar, eg USB_DISK with hard spaces (Alt-160) replacing spaces in the DOS disc name.

MassFS doesn't support devices over 2GB (due to the limitations of RISC OS' image filing systems) and doesn't provide any means to access the raw sector data of such devices. It appears devices larger than 2GB aren't recognised even if they have a partition smaller than 2GB.

To save off a DOSDisc image of the disc, do

*Copy MassFS::USB_DISK adfs::HardDisc.$.temp.usbimage

To format the disc as FAT16 (DOS) format, use MkDOSDisc from the PC card sources (download the 3.06 source and extract MkDOSDisc from inside PCConfig/MKDOSdisc/. To format as 32MByte, do

*MkDOSDisc MassFS::USB_DISK.$ 32 -initdos

Don't try to format the disc larger than the size it actually is: it might be worth stepping down a megabyte or two from the published size, and beware that some devices are measured in sizes of million bytes (ie 32MB is 32,000,000 bytes rather than 32*1024*1024 bytes).

SWI MassFS_GetDriveCount (&56700)

On exit:
r0 = number of drives managed by MassFS

SWI MassFS_GetDriveInfo (&56701)

On entry:
r0 = drive number (from zero to number of drives managed by MassFS minus one)
On exit:
r0 = ?
r1 -> drive name
r1+20 -> connection?:drive_name:vendor_id:product_id (separated by colons, &3A)
r2 = size in sectors (512 bytes each)
r3 = flags?

OtherDevs file

The !MassFS.OtherDevs file is a way of tweaking various options to persuade MassFS to work with a USB Mass Storage device. It won't help if the device is not supported by the underlying USB stack: if it is not detected by *USBDevices, or hangs *USBDevices. It consists of a list of entries VVVV:PPPP=FFFFF where

  • VVVV: 4 digit hex vendor ID
  • PPPP: 4 digit hex product ID
  • FFFFF: alphanumeric codes describing flag settings for this device.

The codes mean as follows:

  • U: do not attempt to support this device (in case it's accidentally inserted)
  • R: is a card reader
  • r: might be a card reader, so check
  • L: correctly supports "get maximum LUNs" command
  • 2: has 2 LUNs
  • 3: has 3 LUNs
  • and so on until
  • 8: has 8 LUNs
  • Q: doesn't support Request Sense
  • q: supports Request Sense if an error occurs
  • _: supports reset recovery (experimental)
  • T: requires test before Read Size
  • t: doesn't support START up command
  • C: supports READ CAPACITY (if not, READ FORMAT CAPACITIES will be used instead)
  • w: disable writing (make read-only)

For example:

# Device: TwinMOS 256Mb Pen Drive
# Submitted by CJE
126f:2035=LR_T

References

News posting by Jason Tribbeck: [| MassFS formatting]

Personal tools