26 January 2024, 23:10 | #1 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,542
|
Way to detect 4 player joystick adapter?
I was wondering if there was a way to detect if a 4 player joystick adapter (Dynablaster style) is present.
Also if there's a general guide on how to use it. The closest I've found is the source code for a Blitz Basic third party library |
27 January 2024, 11:56 | #2 |
Registered User
Join Date: Sep 2019
Location: Finland
Posts: 363
|
The joysticks are wired to parallel port pins which are directly available in the CIA registers:
bit 2 in $bfd000 = adapter port 1 fire bit 0 in $bfd000 = adapter port 2 fire bits 0-3 in $bfe101 = adapter port 1 directions bits 4-7 in $bfe101 = adapter port 2 directions These are active low signals. I read some example sources in the recent past where these were used, I added support to my own application successfully. |
27 January 2024, 12:08 | #3 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
Correct. I bought a 4-player adapter in the 90s and started to write some games using it, so I could check my old sources.
The directions are:
|
27 January 2024, 22:45 | #4 |
Zone Friend
Join Date: Sep 2001
Location: Germany
Posts: 812
|
|
28 January 2024, 04:35 | #5 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,542
|
Thanks all, that's a very handy reference!
|
29 January 2024, 01:24 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
No. Most games we did in the 90s have never been finished. The source I checked for the 4-player adapter was M.U.L.E. 92 (only intro and player-selection exists): https://night.owl.de/index.php?id=56
Last edited by phx; 29 January 2024 at 01:58. Reason: typo |
30 January 2024, 12:09 | #7 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,346
|
Yup, reading is pretty simple as described. I have also seen (and built) adaptors that support two buttons on the extra controllers, but that's not a standard feature.
As for detection, there's no way to detect it because it's completely passive. All the joystick inputs are open-circuit until they're actually used, so electrically there's no difference between an empty parallel port and a 4-player adaptor with untouched joysticks. It would be trivial to add a little bit of logic to enable detection, but with so many passive adaptors out there, the horse has bolted on that one. |
01 February 2024, 06:35 | #8 | |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,542
|
Quote:
The reason I'm interested in supporting second fire is future proofing for Scorpion - there are at least some four player games in development (notably Mixel's Wizonk). It would be cool to offer, for example, second fire jump on custom parallel port adapters that have that feature. |
|
04 February 2024, 21:02 | #9 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,346
|
Yeah, just reading a couple of the extra control bits in $bfd000 - the exact bit I'm not sure of. I'll have to dig out my adaptor to see which lines I used, but as far as I know, there's not a single game that uses it, and WinUAE doesn't emulate it. Probably the only software that does use it is ControllerTest, a controller tester I wrote.
I would suggest that adding it to Scorpion would be a good way of establishing a standard for 2-button 4-player adaptors, so any way you can get it working would be a valid approach. Edit: Gah, now I'm just thinking about a way to go the whole hog and do an active 4-player adaptor with support for CD32-type controllers via the parallel port, with backwards compatibility for games expecting the standard 1-button 4-player adaptor. I don't need any more projects... Last edited by Daedalus; 04 February 2024 at 21:15. |
06 February 2024, 19:40 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
|
WinUAE has "Parallel port Joy1 Spare/2nd Button" input event that maps to normally unused parallel port pin (not mapped by default). I think there was at least one game that used it.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
4 player adapter games... | poppe | Amiga scene | 71 | 27 July 2023 10:13 |
Joystick not détect | Mac-A500 | support.FS-UAE | 5 | 06 December 2021 19:58 |
How does WinUAE detect joystick inputs on pause? | BeamCoder | support.WinUAE | 2 | 05 July 2021 18:22 |
Wanted: Joystick 2 Player Y-Adapter | cebulba | MarketPlace | 2 | 07 January 2006 20:46 |
WinUAE doesn't detect joystick button (via ppjoy) | oldpx | support.WinUAE | 16 | 15 July 2004 22:42 |
|
|