Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03392 Interface Minor Always Aug 16, 2009, 15:41 Dec 18, 2009, 07:28
Tester isucamper View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows XP (64-bit)
Status [?] Acknowledged Driver
Version 0.131 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 03392: Unable to retain JOYCODE_4_BUTTON16 as input.
Description While playing a game, I can set an input to JOYCODE_4_BUTTON16 but upon rebooting the game, the input is read as JOYCODE_4_BUTTON15.

This is for ALL games. I have tested with Tin Star, FrontLine, Wild Western, and Toki. I believe
Steps To Reproduce 1. Start game.
2. Set any input to JOYCODE_4_BUTTON16.
3. Quit game.
4. Restart game.
5 Input will be set to JOYCODE_4_BUTTON15.
Additional Information This may also be a problem with inputs less than JOYCODE_4_BUTTON16.

JOYCODE_4_BUTTON17 appears to be fine.
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
4
User avatar
No.05077
etabeta
Developer
Oct 28, 2009, 16:06
edited on: Oct 28, 2009, 16:07
EDIT: I misread the original report, sorry
User avatar
No.05234
urebelscum
Tester
Dec 3, 2009, 08:18
I think this is the same as shown in this video over at youtube:

It shows joystick 1 as not able to save button 17 (shown as button 16 in UI) for the first joystick (JOYCODE_1).
User avatar
No.05273
urebelscum
Tester
Dec 14, 2009, 06:04
More details:
-Problem with any joystick number.
-Assuming the button numbering starts with 1, the problem is with any joystick button 17, not 16, if you look at windows control panel.
-However, Mame's UI menu starts the numbering at zero, so button 17 is shown as "button 16" when first entered.
-Mame has internal button names start with 1 and go up to 16. Mame uses these names in the cfg files.
-For buttons 17 and up, Mame uses the source code numbering, which starts at 0. This makes button 17 to be also called "button 16", just like button 16.

Steps to reproduce:
Get joystick with 17 or more buttons. Note which buttons are buttons 15, 16 & 17 in the windows control panel.
Start any game in Mame with joysticks enabled. (Easier if it has three or more buttons.)
Map button 15 to the game's first button, button 16 to the second button, and button 17 to the third button. Notice mame's UI calls them buttons 14-16.
Exit Mame and open the cfg file. The first button will have button 15, and the second & third buttons will both have "button 16".
Restart game. In Mame's UI, both the second & third buttons will list "button 15".
If button 18 is tried, it show in UI and save in cfg file as "button 17".
User avatar
No.05289
urebelscum
Tester
Dec 18, 2009, 07:28
Tested and comfirmed one 0.135, with a gpwiz40 on joysticks 1 & 2:
Description:
Mame saves both button 16 & button 17 as "JOYCODE_#_BUTTON16", so when next loaded, mame reads both as button 16. This is further confused by the UI calling buttons by their array index number, not their human number. IOW, mame UI show button 1 as "Button 0", button 16 as "Button 15", and button 17 as "Button 16".

This bug occurs in both default.cfg and game specific cfg files, and in all games.

Additional information:
It is not a problem for any other buttons; only button 17 on any gamepad interfaced joystick.

As just a tester, I can't correct the description or additional information.

I don't have 4 joysticks ATM to confirm joystick 4 is special or not.