UnDead Posted January 19, 2023 Share Posted January 19, 2023 Hi All, I have the following setup: (Arch Linux, atari800 5.0.0-1 from AUR, and hexagons.de 2 port joystick to USB adapter): % sdl-jstest --list Found 2 joystick(s) Joystick Name: 'hexagons.de Retro-Joystick' Joystick Number: 0 Number of Axes: 2 Number of Buttons: 2 Number of Hats: 0 Number of Balls: 0 Joystick Name: 'hexagons.de Retro-Joystick' Joystick Number: 1 Number of Axes: 2 Number of Buttons: 2 Number of Hats: 0 Number of Balls: 0 and the Competition Pro (old, good DB9 version) joysitck in port #0: Joystick Name: 'hexagons.de Retro-Joystick' Joystick Number: 0 Axes 2: 0: 0 [ # ] 1: 0 [ # ] Buttons 2: 0: 0 [ ] 1: 0 [ ] Hats 0: Balls 0: Press Ctrl-c to exit as you can see, the joystick is used "by Axes", not "by Hats". It works without any problem with Hatari, Altirra (with wine), fs-uae etc... But, with the atari800 only the fire button works, because the emulator seems to force the use of Hats (according to the input.c source file). Have any of you heard of a patch that allows you to use joysticks in the configuration I have? From the level of the SDL library, this is not a problem, so adding support for such adapters to the atari800 should not be a black magic. I searched for something like this in search engines (not only Google), but I didn't come up with anything specific, hence my question on the forum. Best regards, UnDead Quote Link to comment Share on other sites More sharing options...
invisible kid Posted January 19, 2023 Share Posted January 19, 2023 So these kind of issues will take a bit of elbow grease to come up with the right solution. Sometimes I use a ps3 controller and the analog stick will be forced as the joystick. When I don't like that, I will load up xboxdrv with dpad only which will overide the kernel driver and use the dpad: xboxdrv --detach-kernel-driver -D -s --dpad-only Then atari800 sees the dpad instead of the analog stick. Not sure if this will help you, so just offering it up just in case. And sometimes I use antimicrox to set up macros. You can map all inputs, keyboard and controller. Quote Link to comment Share on other sites More sharing options...
UnDead Posted January 19, 2023 Author Share Posted January 19, 2023 23 minutes ago, invisible kid said: So these kind of issues will take a bit of elbow grease to come up with the right solution. Sometimes I use a ps3 controller and the analog stick will be forced as the joystick. When I don't like that, I will load up xboxdrv with dpad only which will overide the kernel driver and use the dpad: xboxdrv --detach-kernel-driver -D -s --dpad-only Then atari800 sees the dpad instead of the analog stick. Not sure if this will help you, so just offering it up just in case. And sometimes I use antimicrox to set up macros. You can map all inputs, keyboard and controller. The problem is that the adapter I have is designed to connect digital joysticks to the USB port (so there are only "two state" axes with values of -32768 or 32767) and no hats at all. So there is no /dev/input/uinput device in the system, i.e. the xboxdrv utility will not work (and the needed uinput module cannot be loaded into the kernel). Quote Link to comment Share on other sites More sharing options...
invisible kid Posted January 19, 2023 Share Posted January 19, 2023 Oh well, good luck. Quote Link to comment Share on other sites More sharing options...
ivop Posted January 19, 2023 Share Posted January 19, 2023 Have you looked at Controller Configuration -> Configure real joysticks -> Use hat/D-PAD (no/yes) ? 1 Quote Link to comment Share on other sites More sharing options...
UnDead Posted January 20, 2023 Author Share Posted January 20, 2023 20 hours ago, ivop said: Have you looked at Controller Configuration -> Configure real joysticks -> Use hat/D-PAD (no/yes) ? I started with enabling these settings. But since it didn't work... I've looked at the emulator's sources in C, so now I know how the emulator uses joysticks/pads (via SDL) and what calls to this library it uses. I already know that currently it has no right to work properly, because it's just an emulator that supports joysticks working only as "Hat". So the current code does not allow the use of digital joysticks connected via a USB adapter (which is interesting because other emulators support them without any problems). Hence my question: does anyone have a patch that allows the use of such a configuration? I prefer to make sure before I start writing such a patch myself, and in the process it turns out that someone has already done it a long time ago. Quote Link to comment Share on other sites More sharing options...
ivop Posted January 20, 2023 Share Posted January 20, 2023 Perhaps you can use joy2key from retropie or Qjoypad to map the axis' to numpad 4 8 5 6 and right control. 1 1 Quote Link to comment Share on other sites More sharing options...
invisible kid Posted January 20, 2023 Share Posted January 20, 2023 I just thought of something else. I have a joystick adapter from "Retro Link" and it wasn't communicating correctly with the kernel module resulting in the up direction in one of the input joysticks not working. But it's possible to launch the kernel module with a patch argument: rmmod usbhid;modprobe usbhid quirks=0x1292:0x4154:0x40 And then it works correctly. I found out the particulars by googling the name of the adapter and usbhid. It would have to be a known issue that someone else has dealt with before for there to be an entry available. Once again this might not help you at all, good luck if it doesn't. 1 1 Quote Link to comment Share on other sites More sharing options...
ivop Posted January 20, 2023 Share Posted January 20, 2023 3 hours ago, ivop said: Perhaps you can use joy2key from retropie or Qjoypad to map the axis' to numpad 4 8 5 6 and right control. joy2key -X -axis 0xffb4 0xffb6 0xffb8 0xffb2 -buttons 0xffe4 0xffe4 The hex values are from /usr/include/X11/keysymdef.h 1 Quote Link to comment Share on other sites More sharing options...
UnDead Posted January 20, 2023 Author Share Posted January 20, 2023 2 hours ago, invisible kid said: I just thought of something else. I have a joystick adapter from "Retro Link" and it wasn't communicating correctly with the kernel module resulting in the up direction in one of the input joysticks not working. But it's possible to launch the kernel module with a patch argument: rmmod usbhid;modprobe usbhid quirks=0x1292:0x4154:0x40 And then it works correctly. I found out the particulars by googling the name of the adapter and usbhid. It would have to be a known issue that someone else has dealt with before for there to be an entry available. Once again this might not help you at all, good luck if it doesn't. Maybe not exactly what I did, but that's the way I went - that is - I checked various settings related to usbhid and it got me to experiment with different versions of the system kernel. Also, it seems that in the current version of the atari800 emulator in Arch Linux it works with some "trick", i.e. the emulator actually wants to use the SDL 1.2 library, and the current version is 2.0, so the package is installed as one of the dependencies - sdl12-compat, whose task is to "translate" references to SDL 1.2 functions into functions in SDL 2.0. All this, together with the latest kernel, caused some strange problem (only the fire button works). I changed the kernel to LTS, i.e. 5.15.89 and ... it started, i.e. all directions in the joystick work in the atari800 - currently CX40, but also in any other from the era). Anyway... thank you! 2 Quote Link to comment Share on other sites More sharing options...
invisible kid Posted January 21, 2023 Share Posted January 21, 2023 I tried to see if I could use the Configure Real Joystick settings to use the dpad on my ps3 controller but it did not work, so I still have to use xboxdrv. No big deal, just noting it for others. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.