These notes are based on my research/experiments trying to get a third party DualShock 3 controller working with Nintendont. Whilst this ultimately proved to be unsuccessful, I learned a lot along the way. Information appears to be scattered across multiple topics so I'm sharing this information here as it might help someone else. This post topic covers detailed steps to map buttons to create a custom configuration file.
I found the following information particularly useful -
- https://gbatemp.net/threads/nintendont-controller-configurations.355035/#post-4782346
- https://gbatemp.net/threads/nintendont-controller-configurations.355035/page-4#post-4975050
- https://code.google.com/archive/p/nintendon-t/wikis/ControllerSetup.wiki
Due to my lack of success with the third party DualShock 3 controller I mentioned, I purchased a Mayflash Magic NS 2. This adapter is used in the instructions below to illustrate how to compile a custom configuration file.
NOTE - the Magic NS 2 adapter supports a number of different modes. DInput mode was used in my tests as information in the GBATemp forum recommends the use of this mode.
HIDTest is used on the Wii/vWii to test controller compatibility - https://github.com/FIX94/Nintendont/raw/master/controllerconfigs/HID_Test.dol
Copy HID_Test.dol to SD:\apps\HIDTest > rename as boot.dol > launch via the Wii/vWii homebrew channel.
Launching HIDTest with an XBox One S controller connected to the Magic NS2 adapter, the following was displayed -
The number/letter pairs at the bottom of the HIDTest output are in hexadecimal format. These are the default values for the Magic NS 2 adapter in DInput mode - output with no controller buttons pressed. Other controllers/adapters will likely display different default values and may also have more or less pairs of numbers/characters. Each pair of numbers represents a hexadecimal offset that will be specified in the controller configuration file.
Assuming that the controller is compatible, the default numbers will change at one or more offsets when each button is pressed.
Cyan in his post here uses a very helpful colour code to illustrate the syntax used in the controller configuration file. The following has been copied from Cyan's post -
Button to assign in the game = offset number affected by your action , Value you see when you press this button.
Information here defines the syntax as -
[Button] = [offset] , [mask].
Offsets are numbered from 0 -
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 --> Hexadecimal offset
00 00 08 80 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00 --> DEFAULT values (Magic NS 2)
Changes (to default values) when the A button is pressed on the controller -
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 --> Hexadecimal offset
00 00 08 80 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00 --> DEFAULT values
04 00 08 80 80 80 80 00 00 00 00 00 00 FF 00 00 00 00 00 00 --> A button
offset affected and mask are in bold. The FF value at offset 0D can be ignored.
Configuration file entry - A=00,04
The following will also work - A=0,04
Standard buttons that will need to be defined in the configuration file (using the format [Button]=[offset],[mask]) -
A=[offset],[mask] --> GameCube A button.
B=[offset],[mask] --> GameCube B button.
X=[offset],[mask] --> GameCube X button.
Y=[offset],[mask] --> GameCube Y button.
Z=[offset],[mask] --> GameCube Z button.
L=[offset],[mask] --> GameCube L trigger.
R=[offset],[mask] --> GameCube R trigger.
S=[offset],[mask] --> GameCube Start/Pause button.
Left=[offset],[mask] --> GameCube Dpad Left
Right=[offset],[mask] --> GameCube Dpad Right
Up=[offset],[mask] --> GameCube Dpad Up
Down=[offset],[mask] --> GameCube Dpad Down
RightUp=[offset],[mask] --> GameCube Dpad Right+Up
DownRight=[offset],[mask] --> GameCube Dpad Right+Down
UpLeft=[offset],[mask] --> GameCube Dpad Left+Up
DownLeft=[offset],[mask] --> GameCube Dpad Left+Down
Analogue sticks are handled differently and use the syntax Stick = Offset - Mask is not required. This is covered in more detail later -
StickX=[offset] --> GameCube left analogue stick X-axis
StickY=[offset] --> GameCube left analogue stick Y-axis
CStickX=[offset] --> GameCube right analogue stick X-axis
CStickY=[offset] --> GameCube right analogue stick Y-axis
The configuration file will also need to contain other entries (some are optional and can be omitted) -
VID=#### --> Vendor ID
PID=#### --> Product ID
Polltype=# --> "...Use 1 (so far only the PS3 controller needed 0).." (from here)
DPAD=# --> DPAD (supported values include 0 and 1)
DigitalLR=# (supported values include 1 for digital triggers and 0 for analogue triggers)
LAnalog=[offset] --> Use for analogue triggers in conjunction with DigitalLR=0
RAnalog=[offset] --> Use for analogue triggers in conjunction with DigitalLR=0
Power=[offset],[mask] --> Power button
ZL=[offset],[mask] --> used in conjunction with DigitalLR=1 (covered in more detail below)
MultiIn=# --> use for adapters that support multiple controllers and set MultiIn=1
MultiInValue=# --> use in conjunction with MultiIn=1 to define port(s)
I found the following information particularly useful -
- https://gbatemp.net/threads/nintendont-controller-configurations.355035/#post-4782346
- https://gbatemp.net/threads/nintendont-controller-configurations.355035/page-4#post-4975050
- https://code.google.com/archive/p/nintendon-t/wikis/ControllerSetup.wiki
Due to my lack of success with the third party DualShock 3 controller I mentioned, I purchased a Mayflash Magic NS 2. This adapter is used in the instructions below to illustrate how to compile a custom configuration file.
NOTE - the Magic NS 2 adapter supports a number of different modes. DInput mode was used in my tests as information in the GBATemp forum recommends the use of this mode.
HIDTest is used on the Wii/vWii to test controller compatibility - https://github.com/FIX94/Nintendont/raw/master/controllerconfigs/HID_Test.dol
Copy HID_Test.dol to SD:\apps\HIDTest > rename as boot.dol > launch via the Wii/vWii homebrew channel.
Launching HIDTest with an XBox One S controller connected to the Magic NS2 adapter, the following was displayed -
Code:
HIDTest
Built : Apr 20 2014 00:24:00
Version : 0.6
Firmware: 55.23.31
Failed to open config
HIDVersion:40001
Getting list of HID compatible devices...
DeviceID:0
VID:33DF PID:000A
HIDVers:3 IntClass:0 SubIntClass:0
bEndpolntAddress:01
wMaxPacketSize :64
Press some buttons, if the values change the device is compatible
Press power or turn the wiimote off to power down
00 00 08 80 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00
The number/letter pairs at the bottom of the HIDTest output are in hexadecimal format. These are the default values for the Magic NS 2 adapter in DInput mode - output with no controller buttons pressed. Other controllers/adapters will likely display different default values and may also have more or less pairs of numbers/characters. Each pair of numbers represents a hexadecimal offset that will be specified in the controller configuration file.
Assuming that the controller is compatible, the default numbers will change at one or more offsets when each button is pressed.
Cyan in his post here uses a very helpful colour code to illustrate the syntax used in the controller configuration file. The following has been copied from Cyan's post -
Button to assign in the game = offset number affected by your action , Value you see when you press this button.
Information here defines the syntax as -
[Button] = [offset] , [mask].
Offsets are numbered from 0 -
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 --> Hexadecimal offset
00 00 08 80 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00 --> DEFAULT values (Magic NS 2)
Changes (to default values) when the A button is pressed on the controller -
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 --> Hexadecimal offset
00 00 08 80 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00 --> DEFAULT values
04 00 08 80 80 80 80 00 00 00 00 00 00 FF 00 00 00 00 00 00 --> A button
offset affected and mask are in bold. The FF value at offset 0D can be ignored.
Configuration file entry - A=00,04
The following will also work - A=0,04
Standard buttons that will need to be defined in the configuration file (using the format [Button]=[offset],[mask]) -
A=[offset],[mask] --> GameCube A button.
B=[offset],[mask] --> GameCube B button.
X=[offset],[mask] --> GameCube X button.
Y=[offset],[mask] --> GameCube Y button.
Z=[offset],[mask] --> GameCube Z button.
L=[offset],[mask] --> GameCube L trigger.
R=[offset],[mask] --> GameCube R trigger.
S=[offset],[mask] --> GameCube Start/Pause button.
Left=[offset],[mask] --> GameCube Dpad Left
Right=[offset],[mask] --> GameCube Dpad Right
Up=[offset],[mask] --> GameCube Dpad Up
Down=[offset],[mask] --> GameCube Dpad Down
RightUp=[offset],[mask] --> GameCube Dpad Right+Up
DownRight=[offset],[mask] --> GameCube Dpad Right+Down
UpLeft=[offset],[mask] --> GameCube Dpad Left+Up
DownLeft=[offset],[mask] --> GameCube Dpad Left+Down
Analogue sticks are handled differently and use the syntax Stick = Offset - Mask is not required. This is covered in more detail later -
StickX=[offset] --> GameCube left analogue stick X-axis
StickY=[offset] --> GameCube left analogue stick Y-axis
CStickX=[offset] --> GameCube right analogue stick X-axis
CStickY=[offset] --> GameCube right analogue stick Y-axis
The configuration file will also need to contain other entries (some are optional and can be omitted) -
VID=#### --> Vendor ID
PID=#### --> Product ID
Polltype=# --> "...Use 1 (so far only the PS3 controller needed 0).." (from here)
DPAD=# --> DPAD (supported values include 0 and 1)
DigitalLR=# (supported values include 1 for digital triggers and 0 for analogue triggers)
LAnalog=[offset] --> Use for analogue triggers in conjunction with DigitalLR=0
RAnalog=[offset] --> Use for analogue triggers in conjunction with DigitalLR=0
Power=[offset],[mask] --> Power button
ZL=[offset],[mask] --> used in conjunction with DigitalLR=1 (covered in more detail below)
MultiIn=# --> use for adapters that support multiple controllers and set MultiIn=1
MultiInValue=# --> use in conjunction with MultiIn=1 to define port(s)
Last edited by akadiddy,