Hi Phil, (01)
Comments inline. (02)
Jonathan (03)
Philip Gust wrote:
> I've found something called USB Overdrive that claims to be a
> configurable, shareware MacOS X driver for a variety of USB devices
> including joysticks. Here's a URL:
> http://www.versiontracker.com/dyn/moreinfo/macosx/13443&vid=41640.
> <http://www.versiontracker.com/dyn/moreinfo/macosx/13443%26vid=41640.%A0> (04)
This could be a possibility. Unfortunately, it's not open source. (05)
> I also found the general Human Interface Device (HID) framework,
> including an HID Manager for accessing USB devices such as joysticks.
> Here's a URL:
>
>http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Families_Ref/chapter_11_section_7.html (06)
HID is also what is used in Linux. (07)
> Applications use something called InputSprocket to interact with the HID
> Manager. Here's an article written by the lead InputSprocket architect
> with some code samples:
> http://www.mactech.com/articles/mactech/Vol.15/15.01/InsideInputSprocket/
> . Nouveau Systems is a member of the Apple Developers Network so we can
> probably get some advice on this. (08)
This is a good link and is probably worth having a developer with access
to a MacOS X machine look into this more. (09)
> There is also a Java Input API project at java.net that seems to have a
> framework with an OSX plugin: https://jinput.dev.java.net/ (010)
I'll look into this API a little more to see what they are providing. (011)
> All of these tell me that there probably isn't a regular device similar
> to the Linux /dev/input/js* that we can use directly. (012)
I found a project called SDL that is a cross-platform multimedia library
designed to provide low level access to audio, keyboard, mouse, joystick
for the following platforms: Linux, Windows, BeOS, MacOS Classic, MacOS
X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. (013)
http://www.libsdl.org/index.php (014)
They seem to have added support for /dev/joy for *BSD unixes. It doesn't
explicitly mention support for MacOS X, but it might work anyway. (015)
http://www.libsdl.org/pipermail/sdl/2004-January/058892.html (016)
I guess we'll need someone with a MacOS X machine to verify one way or
the other. (017)
>> I suspect that Windows does not use device files in a UNIX-like way, so
>> that probably means the only way to get access to a device is through
>> the usual Microsoft-specific APIs. If that is the case, it is almost
>> definite that Microsoft-specific native code will need to be written. (018)
That is ok as long as we have platform-neutral interfaces that abstract
out the Windows-specific code. (019)
> Using Cygwin is a pretty long shot, and has the drawback of requiring
> Cygwin to be installed (it's pretty big). (020)
I'm not sure that it buys us anything, since I don't believe it has
device level support beyond what is already supported in Windows. (021)
> There are several Java packages out there that claim to support
> joysticks through JNI interfaces to Windows DLLs. Several of them are
> multi-platform and include Windows. JInput (
> https://jinput.dev.java.net/) <https://jinput.dev.java.net/)%A0> and
> JavaJoystick ( http://sourceforge.net/projects/javajoystick/). Others
> are are Windows-only (cf
> http://www.cybergarage.org/vr/device/joystick/java/,
> <http://www.cybergarage.org/vr/device/joystick/java/,%A0>
> http://www.hardcode.de/jxinput/,
> http://www.bigredswitch.co.uk/toolbox/joystick/).
>
> If none of these work out, the JNI code will have to write directly to
> Microsoft DirectInput. Here's a brief article that shows how to
> interface a joystick through DirectInput:
> http://msdn.microsoft.com/coding4fun/gamedevelopment/beginning4/default.aspx (022)
Yes, it might be easiest to start with something like this and build our
own driver. (023)
>> > Whichever way, I plan on doing a decent device-side interface that
>> > will make it simple to plug in native code support. (024)
Agreed. (025)
> JInput looks to be the most promising because it has a platform-specific
> plugin architecture with plugins for Win32i, Linux, and OS X. I'd
> consider looking at this first to provide native layer abstraction. (026)
Agreed. (027)
> Agreed. It would be convenient, however, if the same underlying native
> libraries could be used for both projects. (028)
The main advantage of the existing Java-based driver is that it is pure
Java (no JNI) which is really nice from a stability standpoint. As soon
as you introduce native code into a Java-based program, it increases the
chances that the VM will crash. Of course, the primary disadvantage is
what we have already discussed -- it only works on machines in which we
can read an input stream from a joystick device file (Linux; maybe BSD
and MacOS X; no Windows). (029)
> Just one other note. You mentioned that Radio Shack was no longer
> producing the DB-15 to USB PC Gaming Adapter (26-164). I've found
> another source. It's slightly more expensive, but we could get enough
> for all the keysets. Here's the URL:
> http://www.trianglecables.com/usbtojoydbad.html (030)
That's a good link to have. Please hold off from buying any more
adapters for the moment though. Only one out of the seven keysets that
we currently have is a DA-15 female version (which, with the
hand-crafted cable, acts as an analog joystick). The other six are DB-25
male versions. I'm not completely sure yet if the other six will be more
similar to an analog joystick or a serial or parallel port style device.
I will try to obtain the pinout for those six keysets soon so we can
determine what kind of converter cables we will need to buy and/or build. (031)
Jonathan (032)
_________________________________________________________________
Message Archives: http://chm.cim3.net/forum/nls-technical/
Shared Files: http://chm.cim3.net/file/work/project/nls-restore/
Community Portal: http://www.computerhistory.org/
To Post: mailto:nls-technical@chm.cim3.net
Community Wiki: http://chm.cim3.net/cgi-bin/wiki.pl?NLS_Restoration (033)
|