I'm sure that Intellasys will send you a forth drive, because you are actually writing some code, and it would not be just for a souvenir. When I was at Forth Day, they told me that there were still some Forth Drives available.
Jason
While I worked there, I made sure that T18worked on gforth.Ah - that was you - thanks again.
I can detect that the drive is there, but I don't think OS X supportsthose ioctl calls, and I'm not even really sure what they aresupposed to be doing.I looked them up at the linux documentation project (glad i rememberedthis one): They are a rather obscure interface to scsi calls: Unknownioctl function codes "trickle" through to the scsi layer. See foryourself at..and on the following page about "SG_IO", which is the op actuallybeing used in the vf "scsi>" word.I'm sure this doesn't exist on mac os - so i think i have to use theiokit to reimplement the scsi call (or even libusb?).Let's see how far i get without having the hardware.
I'm also not sure yet whether i need docs about the onspec usb chipused, or if it needs a driver. Chances are, that the information inthe source is almost sufficient.
I would appreciate if you could look how the forthdrive appears inthe /dev directory (with what name), and/or maybe more important,its usb device info - vid, pid, class (i fathom i'll have to use theusb interface at least for finding the device).
> > ..and on the following page about "SG_IO", which is the op actually
> > being used in the vf "scsi>" word.
> >
> > I'm sure this doesn't exist on mac os - so i think i have to use the
> > iokit to reimplement the scsi call (or even libusb?).
> > Let's see how far i get without having the hardware.
>
> I'll take a look, but I suspect that the scsi route is a dead end.
>
> > I'm also not sure yet whether i need docs about the onspec usb chip
> > used, or if it needs a driver. Chances are, that the information in
> > the source is almost sufficient.
>
> I've managed to get some documentation, which makes no mention of a
> scsi interface.
I wrote the original Windows code that accessed the Forth drive,
and learned more than I wanted to know about ioctl() and
friends, USB and memory sticks. Since then, we've done several
USB device implementations.
The ForthDrive is a USB memory stick (Mass Storage Class) that
uses vendor specific commands to access the SEAforth chip. All
USB sticks use MSC, which is why you don't need host drivers for
them. Most sensible memory sticks use Bulk Only Transport (BOT)
which uses SCSI commands with USB as the transport. The
nightmare is all documented at http://www.usb.org.
The SEAforth interface is achieved by using vendor-specific SCSI
commands, so you must get to the correct interface on the host
system. The original Windows code was released by IntellaSys and
was very heavily documented. This documentation disappeared in
the ports to other operating systems. If only people documented
their code, life would be so much easier for others. The old
idea "if it was hard to write, it should be hard to read" is
rubbish!
Stephen
--
Stephen Pelc, ste...@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Ah, that may be the missing piece to this puzzle. I don't know if
you wrote the SwiftForth implementation that is included with the
VentureForth 1.3.5 26-Sep-2008 release, but it is missing the BOT
clue. I too am learning more than I wanted to know, but this might
give me something to search for among the OS X documentation.
Thanks for speaking up!
DaR
Here it is. I hope the formatting doesn't mess it up to bad.
High Speed device @ 2
(0x55100000): .............................................
Composite device: "SEAforth24A-TD "
Device Descriptor
Descriptor Version Number: 0x0200
Device Class: 0 (Composite)
Device Subclass: 0
Device Protocol: 0
Device MaxPacketSize: 64
Device VendorID/ProductID: 0x55AA/0x2B30 (OnSpec
Electronic Inc.)
Device Version Number: 0x0104
Number of Configurations: 1
Manufacturer String: 1 "IntellaSys "
Product String: 2 "SEAforth24A-TD "
Serial Number String: 3 "010908000039"
Configuration Descriptor
Length (and contents): 32
Raw Descriptor (hex) 0000: 09 02 00 20 01 01 00 80
64 09 04 00 00 02 08 06
Raw Descriptor (hex) 0010: 50 00 07 05 01 02 00 02
00 07 05 82 02 00 02 00
Unknown Descriptor 0020:
Number of Interfaces: 1
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 200 ma
Interface #0 - Mass Storage/SCSI
Alternate Setting 0
Number of Endpoints 2
Interface Class: 8 (Mass Storage)
Interface Subclass; 6 (SCSI)
Interface Protocol: 80
Endpoint 0x01 - Bulk Output
Address: 0x01 (OUT)
Attributes: 0x02 (Bulk no synchronization data
endpoint)
Max Packet Size: 512
Polling Interval: 0 ( Endpoint never NAKs)
Endpoint 0x82 - Bulk Input
Address: 0x82 (IN)
Attributes: 0x02 (Bulk no synchronization data
endpoint)
Max Packet Size: 512
Polling Interval: 0 ( Endpoint never NAKs)
Device Qualifier Descriptor
Descriptor Version Number: 0x0200
Device Class 0 (Composite)
Device Subclass 0
Device Protocol 0
Device MaxPacketSize: 64
Number of Configurations: 1
bReserved: 0
Other Speed Configuration Descriptor
Length (and contents): 18
Raw Descriptor (hex) 0000: 09 07 00 12 01 01 00 80
64 09 04 00 00 00 00 00
Raw Descriptor (hex) 0010: 00 00
Number of Interfaces: 1
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 200 ma
Interface #0 - Unknown
Alternate Setting 0
Number of Endpoints 0
Interface Class: 0 (Unknown)
Interface Subclass; 0
Interface Protocol: 0
DaR