dingusdev / dingusppc

An experimental emulator
GNU General Public License v3.0
200 stars 21 forks source link

Feature Request - Emulated Joysticks #24

Open Danfun64 opened 2 years ago

Danfun64 commented 2 years ago

At this present time, there aren't any Macintosh emulators that emulate analog joysticks. I understand that this request would be a long-term goal and other things like "Implement ADB input device support" would have to come first, but to have a Mac emulator that did Star Wars X-Wing and Star Wars Tie Fighter justice would be a blast.

Recommended joysticks to emulate first that are supported on both games are the CH Products Flightstick Pro and the CH Products Jetstick, followed by the Thrustmaster Mark I Flight Control System. Other joysticks mentioned are either "joysticks as mouse input" or only supported by Tie Fighter.

Attached are the Joystick readmes that came with both games for a longer list of joysticks supported. X-Wing Joystick Read Me.txt TIE Fighter Joystick Read Me.txt

joevt commented 1 year ago

USB joysticks will present a HID interface which enumerates all the buttons and axis.

The problem with ADB joysticks is that they don't follow any standard so you need to do some reverse engineering to figure out what bits are for each button and axis. Before you can get those bits, an ADB driver needs to switch the joystick from mouse mode to joystick mode. The exact method of doing that also needs to be reverse engineered.

If those joysticks have drivers with source code then that would make things easier.

I have a Microsoft SideWinder 3D Pro ADB joystick. I wrote a driver for Mac OS X (along with a Mac OS X driver for Griffin iMate USB to ADB adapter). There's other source code for Thrustmaster ADB joysticks: http://tmmacosx.sourceforge.net Here's another (including another Griffin iMate driver): https://github.com/desaintmartin/Thrustmaster-ADB-Mac-OS-X-Driver and another Griffin iMate driver: https://code.google.com/archive/p/imate-osx/source

Danfun64 commented 1 year ago

I believe some of those joysticks are supported in DOS (and by extension have code in PCem/86box). I don't really know how helpful that is though.....

joevt commented 1 year ago

PC's don't have ADB so I don't think the ADB joysticks can be supported by a PC. Maybe you mean that PS2 or game port or USB versions of the ADB joysticks exist or that some of those joysticks also had a USB or PS2 or game port connector.

The point of this feature request is to enable any joystick that can be connected to a modern Mac or PC to be treated as one of the ADB joysticks that the emulated Mac can support.

Now, if a modern version of the ADB joysticks exist, or if an ADB adapter can be used with the ADB joysticks to connect it to the emulator's host OS, then they would be perfect for the emulation of themselves in the emulator.

upintheairsheep commented 1 month ago

Keith Kaisershot is working on bringing support for the Pippin’s applejack controller