Author Topic: [Ubuntu 12.04] Controller 1 moves my mouse? (0.17h) [Solution: Use HIDMode 3]  (Read 4036 times)

Offline Damien

  • Baby Retrode
  • *
  • Posts: 16
  • Karma: +0/-0
Hi, I recently patched to the latest firmware 0.17h only to find that with the default options the buttons pressed on the controller 1 port were not recognised anymore and that the directional pad moves my mouse cursor to the edges of my screen. I guessed it was because of the recent addition of snes mouse support so I have modified HIDMode from 1 to 2 as a workaround.

[edit] Is it related to the pinned down topic? My controller works, it just has an incorrect behaviour.
« Last Edit: 15/May/2013 05:00:02 AM by Matthias_H »

Offline Matthias_H

  • Retrode Forum Techie
  • A Retrode Hero
  • *****
  • Posts: 552
  • Karma: +21/-0
Re: [Ubuntu 12.04] Controller 1 moves my mouse? (0.17h)
« Reply #1 on: 09/Oct/2012 02:36:28 PM »
Hi, Are you using an original SNES controller or a 3rd-party product? I might have to revise the detection routine for the mouse, or move it into the config file altogether, since it is so rarely used.
https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.

Offline shybry

  • Baby Retrode
  • *
  • Posts: 4
  • Karma: +0/-0
Re: [Ubuntu 12.04] Controller 1 moves my mouse? (0.17h)
« Reply #2 on: 06/May/2013 05:13:17 AM »
I have similar issues with the latest firmware (0.18c) for a Retrode 2 on Ubuntu 12.04. All original Nintendo/Sega controllers.

HIDMode 1:
  • Doesn't result in any usable joysticks.
  • When I use the d-pad on the SNES controller plugged into the port on the left side (closest to the USB port) the mouse moves.
  • Apparently two different mouse devices are detected (presumably one is for the SNES mouse which I can't test, I'm guessing the other is what should be the joystick):

Code: [Select]
$ ls -l /dev/input/by-id/|grep Retrode
lrwxrwxrwx 1 root root 10 May  5 23:16 usb-Retrode_UG_Retrode-if01-event-mouse -> ../event15
lrwxrwxrwx 1 root root  9 May  5 23:16 usb-Retrode_UG_Retrode-if01-mouse -> ../mouse2
lrwxrwxrwx 1 root root 10 May  5 23:16 usb-Retrode_UG_Retrode-if02-event-mouse -> ../event16
lrwxrwxrwx 1 root root  9 May  5 23:16 usb-Retrode_UG_Retrode-if02-mouse -> ../mouse3

HIDMode 2:
  • One joystick with 4 axes (2 from SNES1/Genesis1, 2 from SNES2/Genesis2) is detected.
  • Contrary to the changelog for 0.18a, according to sdl-jstest, 32 buttons are reported (unsure if bug or feature), though I can only press 16 of them (0-7 and 16-23).

Code: [Select]
$ ls -l /dev/input/by-id/|grep Retrode
lrwxrwxrwx 1 root root 10 May  5 23:18 usb-Retrode_UG_Retrode-if01-event-joystick -> ../event15
lrwxrwxrwx 1 root root  6 May  5 23:18 usb-Retrode_UG_Retrode-if01-joystick -> ../js1

Is it possible that in HIDMode 1 that the joystick device(s?) might emit mouse events? The xboxdrv documentation implies that such behaviour would result in a mouse device being detected under Linux, though I might be reading between the lines too much:

Quote
To make sure sure that a mouse, keyboard or joystick device is properly detected by Xorg, the kernel or libraries such [as] SDL xboxdrv will insert extra dummy events. For example a mouse device needs REL_X and REL_Y events to be detected as such, but a configuration that only wants to emulate the mouse buttons won't provide those, thus xboxdrv will add them automatically.

Using HIDMode 2 is a decent enough workaround for anything 1-or-2-player. Less than ideal for Bomberman or the like...

Offline Matthias_H

  • Retrode Forum Techie
  • A Retrode Hero
  • *****
  • Posts: 552
  • Karma: +21/-0
Re: [Ubuntu 12.04] Controller 1 moves my mouse? (0.17h)
« Reply #3 on: 06/May/2013 03:46:49 PM »
How about keyboard mode [HIDMode] 3? That should work even under the most adverse circumstances, and starting with FW version 0.18b or so it even supports a full four players.
https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.

Offline shybry

  • Baby Retrode
  • *
  • Posts: 4
  • Karma: +0/-0
Re: [Ubuntu 12.04] Controller 1 moves my mouse? (0.17h)
« Reply #4 on: 07/May/2013 02:12:50 AM »
Oh, duh, I should have tried that. Yes, HIDMode 3 works fine. Thanks!