Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Maintenance & Feedback » JJ2+ Issue Tracker

Bug Report Phantom controller input

Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,690

Violet CLM has disabled reputation

May 16, 2018, 12:58 PM
Violet CLM is offline
Reply With Quote
Phantom controller input

Hi folks. Some people have reported receiving constant input from controllers or controller-like devices that do not seem to correspond to things they are intentionally doing, e.g. their mouse cursor constantly moves to the left, or their rabbit tries to move down and right. I have no way of replicating any of these problems locally, because I don't own the same devices that you do, but what I can do is give you this:

plus_controller_diagnostics.zip

That's the latest release of JJ2+, minimally modified to constantly show all controller input information. (Only while ingame--if your phantom controller makes it impossible for you to navigate the menu system, load JJ2 directly into a level by command line/drag+drop.) If you experience such phantom input, please a) explain what your specific problem is, b) post a screenshot of the various numbers in their base state (i.e. when you are not intentionally doing anything), and c) report how the numbers are affected by any related experiments you choose to do.

Thanks!
__________________
MKG

JCF Member

Joined: Jan 1970

Posts: 1

MKG has disabled reputation

Jun 17, 2018, 02:36 PM
MKG is offline
Reply With Quote
Exclamation A report here

You know, I'm using the latest WINE stable release (3.9) to run Jazz Jackrabbit 2 and I'm have some really bad problems with my Sanmos TWIN SHOCK gamepad.

One one the symptoms just happens to be "mouse pointer constantly moving to the left", so I figured that I'd report the problem here.

Another problem is that the player always looks up unless I move the stick into the up direction.

From what I could gather, it seems that the stick only returns integers, which explains why the directional button works erratically; and dwPOV return numbers from 0 to 31500, being 65535 when nothing is pressed.

This is what is being reported when nothing is pressed: https://i.imgur.com/yQ3FDXm.png
This is what reports when the Button 2 is being pressed: https://i.imgur.com/rkwBTdi.png
And this is when I move the left stick to it's left-up position and the right stick to it's right-down position: https://i.imgur.com/jyrFEoq.png

Though I might report this to the WINE team as well since in WINE's Joystick configuration panel, the 1, 2, 3 and 4 buttons flicker when holding them pressed, instead of just staying pressed and I recieve this message in the terminal:
0029:err:hid_report: process_hid_report Device reports coming in too fast, last report not read yet!

And here's the video of WINE's control panel bug: https://youtu.be/3jqli888hRs
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,690

Violet CLM has disabled reputation

Jun 22, 2018, 05:19 PM
Violet CLM is offline
Reply With Quote
Report from Genstar, who I guess is having J2O account problems:

Combination of WINE and TWINSHOCK controller "moves the mouse cursor to the left in-game and some buttons work too fast on menus, directional keys don't even work properly and only the jump button works"

"In control joy.cpl, the 1,2,3 and 4 buttons flicker when pressed instead of just staying pressed... Also got the "device reporting too fast" error on the terminal when running WINE control joy.cpl"

Nothing pressed:

Button 2 pressed:

"when left stick is up-left and right stick is down-right":


"dwPOV shows from 0 to 31500, being 65535 when nothing is being pressed on the POV"
__________________
Robo4900 Robo4900's Avatar

JCF Member

Joined: Sep 2011

Posts: 1,045

Robo4900 has disabled reputation

Aug 17, 2018, 03:21 PM
Robo4900 is offline
Reply With Quote
So, whenever I select a level from Home Cooked, and only from Home Cooked, the controller constantly registers movement right and down (EDIT: I have tested this further, and found this behaviour if I use the command line loading, but only for A Generic SP Episode II. My own custom levels seem to not be affected by this. Perhaps it's memory usage related?). This includes it making me stomp whenever I'm in the air, for instance if I've jumped. It also doesn't let me manually move down or right at all.


TSF level 1, working normally:



HH '17 loaded from its custom J2E episode, working normally:



A custom level I was working on a few years ago, loaded from a command line argument, working normally:



Same custom level, not working normally; stuck moving down and right:




Different custom level, same problem:
__________________
Virus666

JCF Member

Joined: Jan 1970

Posts: 4

Virus666 has disabled reputation

Aug 29, 2018, 04:55 AM
Virus666 is offline
Reply With Quote
Exclamation Happens on Linux as well

I can confirm that such incidence happens with Jazz Jackrabbit 2 1.23, JJ2+ 5.6 via Lutris (Wine-Staging 3.10 i386) on Linux Mint 19 (x64) Mate with Logitech F310 Xinput/DirectInput. As the game is started with Jazz2.exe -menu -windowed -nolog -nospy executable and arguments, mouse cursor immediately moves left even in OS level. When a map is started, the character looks up as it is shown in previous posts. I found related lines in the readme of the latest release of JJ2+:

"Improved support for DirectInput/XInput (read: XBox-style) controllers:

JJ2+ should now ignore corrupted controller data instead of seeming to constantly press the left and up keys."

https://docs.jj2.plus/

It looks like some Windows and WINE setups fail to "gnore corrupted controller data." When -nojoy argument is added, problem disappears but as it disables controller support, it's a bit pointless. Alternatively, Linux users can emulate keyboard buttons on controller with AntiMicro but that would be a dirty solution to be honest.

Here are the Lutris page and code of the installer script:

https://lutris.net/games/jazz-jackrabbit-2/
https://lutris.net/games/install/2782/view
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,690

Violet CLM has disabled reputation

Aug 29, 2018, 08:48 AM
Violet CLM is offline
Reply With Quote
Okay. Did you get any data from the plus_controller_diagnostics.zip I linked prominently in the opening post? Also, does your character constantly look up in regular JJ2 (without the JJ2+ patch applied) as well, or is your problem unique to JJ2+ v5.6?
__________________
Virus666

JCF Member

Joined: Jan 1970

Posts: 4

Virus666 has disabled reputation

Sep 3, 2018, 10:45 AM
Virus666 is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
Okay. Did you get any data from the plus_controller_diagnostics.zip I linked prominently in the opening post? Also, does your character constantly look up in regular JJ2 (without the JJ2+ patch applied) as well, or is your problem unique to JJ2+ v5.6?

Sorry for late reply. Unfortunately I am not competent enough to make plus_controller_diagnostics.zip or regular v5.6 version of JJ2+ run with WINE manually. Lutris script that automates installation makes use of additional tools some of are AutoHotkey, Helper. Merging and overwriting Lutris installation with your diagnostics tool didn't provide the additional data shown in previous posts.

As I installed JJ2 via WINE manually, JJ2 1.23 without JJ2+ doesn't have phantom controller issues that I experienced with JJ2+ v5.6. Here are my findings;

JJ2 1.23 without JJ2+ (controller is active):
- Characters do not constantly look up.
- Controller buttons work without a problem, they can also be remapped.
- No mouse cursor capture and/or shifting issue occurs.

JJ2 1.23 with JJ2+ v5.6 (controller is active):
- Characters do look up constantly.
- Most of controller buttons do not work. If up button is pressed, character stops looking up, but when you stop pressing, it returns to looking up. Jump, fire, pause, menu buttons work but down, left, right buttons do not work. Buttons cannot be remapped since up button is being constantly pressed. Up button works in menus but other direction keys do not work.
- Mouse cursor moves left in OS level if it is on the window of JJ2. Even if the cursor leaves JJ2 window, it keeps moving to the left edge of the desktop.
Virus666

JCF Member

Joined: Jan 1970

Posts: 4

Virus666 has disabled reputation

Mar 31, 2019, 04:53 AM
Virus666 is offline
Reply With Quote
Lightbulb JJ2+ v5.5 works

As March 2019, phantom controller input as well as moving mouse cursor issues with JJ2+ v5.6 still exist on Linux. By curiosity, I manually installed the game with WINE, applied 1.23 patch and JJ2+ v5.6 to bypass AutoHotkey, Helper files that Lutris script uses; the bugs are still there.

Today, I found plus.zip version of JJ2+ v5.5 on archive.org; edited Lutris script to replaced JJ2+ v5.6 URL with v5.5 URL, installed the game via edited Lutris script; lo and behold... And it worked without phantom controller input and moving mouse cursor issues!

https://web.archive.org/web/20171223...2plus/plus.zip
https://lutris.net/games/install/2782/view
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,690

Violet CLM has disabled reputation

Apr 10, 2019, 10:22 AM
Violet CLM is offline
Reply With Quote
(You don't really need archive.org, by the way, we link to all the older versions in the first post of the general JJ2+ thread.)
__________________
French French's Avatar

JCF Member

Joined: Jul 2013

Posts: 20

French is doing well so far

Jul 16, 2019, 12:15 AM
French is offline
Reply With Quote
Red face Analysis of effects with P220 gamepad

Hello,

Here is my analysis of what happens with my gamepad, using the debugging JJ2+ version given by Violet CLM. I’m playing TSF on Windows 7.

I’ve got a very simple gamepad which is called ‘P220’ in other pieces of software:

You’ve got four arrows on the left with button 7 above, and six buttons on the right with button 8 above. In the middle you’ve got a scale of five steps 0–25–50–75–100 and you can move on it with + and − buttons to light up the LEDs (I’ve never really understood its meaning).

My gamepad works perfectly with JJ2 vanilla. I’ve configured the controls like this:


Trying to change these controls does not work with JJ2+, i.e. I can press Enter or a button of my gamepad to ask for changing the control, but then pressing a button or an arrow has no effect and I must press Escape (or button 7) to get back.

Here is what happens when I start the game:


Then using the buttons changes the values in the following ways.
  1. Pressing Left changes dwXpos to 0 and pressing Right changes it to 65535.
  2. Pressing Up changes dwYpos to 0 and pressing Down changes it to 65535.
  3. Using the + and − buttons changes dwZpos: 100 ⇔ 0; 75 ⇔ 16383; 50 ⇔ 32767; 25 ⇔ 49151; 0 ⇔ 65535.
  4. dwButtonNumber always shows the number of non-arrows buttons that are pressed, except according to point 6. So it can go from 0 to 7.
  5. Pressing any button gets dwButtons increased of 2 power button number minus 1. Say button number is n, then pressing that button adds 2^(n − 1) to dwButtons, and releasing it removes that same amount. E.g. pressing button 3 adds 4 (which is 2^(3 − 1)), pressing buttons 8 and 1 adds 129 (which is 2^(8 − 1) + 2^(1 − 1)). This is impacted by point 6 just below.
  6. Pressing buttons 1 to 6 at once (so the six buttons at the same time) is identical to pressing just buttons 4 and 6 (no matter which other buttons are pressed), so it increases dwButtonsNumber of 2 instead of 6, and dwButtons of 40 instead of 63.
  7. (Other dw values never change.)

Now regarding the effects in the game:
  1. Arrows do not work, but pressing Up makes my rabbit stop looking up (and it also allows Up and Down to work on my keyboard).
  2. All other buttons work normally, except button 7.
  3. Button 7 works like the Escape key (but non-repeated), so it opens the menu. But when it closes the menu and I keep it pressed, then it works normally i.e. my rabbit is running if I make it jump or move.

Effects in the menu:
  1. Button 7 still works like the Escape key (but non-repeated, i.e. you must press it several times to get back several times).
  2. All other numbered buttons have a very weird effect: it’s like pressing the Enter key and the Up arrow key, and it repeats instantly (Enter, Up, Enter, Up, Enter… as I keep it pressed). The repetition is like when you keep any key pressed, but there is no initial delay before the repetition starts, and it repeats even faster.
  3. Arrow buttons do not work, except the Up arrow, but it moves the cursor when unpressed (instead of moving it when pressed).
  4. Up is triggered when I get back to the main menu (with Escape or button 7) and when I open the ingame menu, so it immediately selects ‘Quit’.
  5. As mentioned above, trying to change the controls of my gamepad does not work.

So here is the straightforward analysis. Violet CLM, do you need more, i.e. do you want to see what happens if I change the controls from JJ2 vanilla and I get back to JJ2+? Or should I test something else with my gamepad?

Thanks in advance.

Last edited by French; Jul 16, 2019 at 12:29 AM. Reason: Add JJ2 version and OS version
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 10:30 AM.