- Joined
- Oct 27, 2002
- Messages
- 23,749
- Trophies
- 4
- Age
- 45
- Location
- Engine room, learning
- XP
- 15,648
- Country
You need to put the difference with the "normal" state, as it act like a mask, in binary mode.Thanks, if not by you I couldn't get it work, so, if HIDTest says a Letter, I need to put a 0? Thank you so much fur reply!!!
You don't need to put the value you see, but give the "bit" which change its state.
each buttons are coded on 8 bits
0000 0000
which means that 1 "part" of the HID can hold 8 different Digital buttons (1 button per bit).
1000 0000 A
0100 0000 B
0010 0000 X
0001 0000 Y
0000 1000 L
0000 0100 R
0000 0010 Start
0000 0001 Select
If you press two buttons at the same time, you will have two bit at "1" at the same time
0010 1000 X + L
1001 0000 A+Y
etc.
Your controller seems to code buttons only on 4 bits instead of 8, the default value was 0F, and when you press A if became 4F
0F = 0000 1111
4F = 0100 1111
which means the "mask" which trigger the A button is the second* bit state in the first 4 bits (not the second's 4 bit part at the end)
0100 0000 is the mask you need to put in the controller.ini, which is 40
(*second in human reading order, left to right, not endian)
in controller.ini
A=40 means that Nintendont will check the second* bit state only
A=4F means that Nintendont will check 5 different bits, and all 5 need to be at 1 to send A command to the game.
40 AND 4F are fine, as long as whatever combination of button you push, it never affects the "1111" part.
if the "1111" are affected in some way, you need to find each possible state of your 5th group and find their binary values.
using "40" ensure that only 1 bit is checked at a time.
If special buttons (turbo, slowmo, etc.) affects these 1111, you could have "0100 1101" and it would make your "4F" not working anymore.