Thread: Bug Report Phantom controller input
View Single Post
French French's Avatar

JCF Member

Joined: Jul 2013

Posts: 26

French is doing well so far

Jul 16, 2019, 01:15 AM
French is offline
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 01:29 AM. Reason: Add JJ2 version and OS version