JordanLeich / Ultimate-Controller-Support

Fixes and adds additional controller support for Ultimate Alliance PC 2006 version.
2 stars 0 forks source link

Multiple controller icons simultaneously #1

Open JordanLeich opened 1 year ago

JordanLeich commented 1 year ago
ak2yny commented 1 year ago

Can you specify what you want to change from the current features?

JordanLeich commented 1 year ago

Can you specify what you want to change from the current features?

Nothing changed, this GitHub issue I made is just for what we were working on for getting different controllers to work together with different icons at the same time but we never figured it out due to how the changes handles controller drivers and how the game reads the files from the texs folder.

ak2yny commented 1 year ago

Alright, that's good. I'll add my research here then. (Maybe we should change the title?) The goal is for multiple controllers or easier set-up for people, instead of trial and error, i.e. try this and if it doesn't work, try the other one. So in the end, it should be possible to pick a controller and that's all they need to do.

MUA (and XML2 as well IIRC) give us some information about controllers:

[HKEY_CURRENT_USER\Software\Activision\Marvel Ultimate Alliance\Controls\PlayerConfig\Player0]
"DeviceUniqueID"="FF49ACC0-43DB-11EC-8001-444553540000"
"DeviceType"="0603146B-0000-0000-0000-504944564944"
"Config"=dword:00000001

Plus, they also give us the names of each registered controller: [HKEY_CURRENT_USER\Software\Activision\Marvel Ultimate Alliance\Controls\DeviceConfig\Wireless Controller] and a device number (which does seem to be inconsistent):

[HKEY_CURRENT_USER\Software\Activision\Marvel Ultimate Alliance\Controls\DeviceConfig\Controller (Xbox One For Windows)\ConfigGamepadCustom\Player3\MoveDown]
"Device0"=dword:00000003

DeviceType is probably a commonly known number, which we may be able to use to identify with the help of the internet. Config is automatic or manual configuration. Auto = 0, Manual = 1 Some common information about xinput and dinput on Windows 10 and 11 may help as well.

Here are some config files from various MarvelMods members who helped me research how buttons work. Manual set-ups are not that helpful though, as they may not match the default controller mapping, or they may have two mappings, and we don't know which one of them is the correct one.

Researching drivers would also be helpful.

I collected the information about each controller registry:

Bluetooth LE XINPUT compatible input device
00000007
0B13045E-0000-0000-0000-504944564944
Controller (Xbox One For Windows)
00000003
02FF045E-0000-0000-0000-504944564944 (D4B5DBA0-6816-11EC-8001-444553540000)
Controller (XBOX 360 For Windows)
00000003 (2x)
028E045E-0000-0000-0000-504944564944 (716792F0-461A-11EC-8001-444553540000)
Controller (XBOX 360 For Windows) - over Parsec, a 3 device (Xbox One) already registered.
00000004
DS3 Compatible HID Device
00000007
00027331-0000-0000-0000-504944564944 (A5512310-0DC1-11EC-8002-444553540000)
Wireless Controller - DS4 Controller (Wireless)
00000007 (2x)
09CC054C-0000-0000-0000-504944564944 (A679BA10-8874-11E9-8001-444553540000)
HORIPAD S
00000007
00C10F0D-0000-0000-0000-504944564944 (78062970-448D-11EC-8001-444553540000)
Controller (PC Compact Controller) - Nacon Controller (PS4)
00000003
0603146B-0000-0000-0000-504944564944 (FF49ACC0-43DB-11EC-8001-444553540000)
Other from the internet
Joystick - HOTAS Warthog
0402044F-0000-0000-0000-504944564944
Throttle - HOTAS Warthog
0404044F-0000-0000-0000-504944564944
Saitek Pro Flight Yoke
0BAC06A3-0000-0000-0000-504944564944
Saitek Pro Flight Rudder Pedals
076306a3-0000-0000-0000-504944564944
vmultia HID
ba1c001f-0000-0000-0000-504944564944
DSD 32 Button Controller - EST
8A3D04D8-0000-0000-0000-504944564944
MFG Crosswind V2
0A3816D0-0000-0000-0000-504944564944
WINWING JOYSTICK BASE1 + F18 GRIP
BE114098-0000-0000-0000-504944564944
WINWING THROTTLE BASE1 + F18 HANDLE
BE224098-0000-0000-0000-504944564944
WINWING F18 STARTUP PANEL
BE034098-0000-0000-0000-504944564944
WINWING F18 COMBAT READY PANEL
BE054098-0000-0000-0000-504944564944
WINWING F18 TAKEOFF PANEL
BE044098-0000-0000-0000-504944564944
F16 MFD 1
B351044F-0000-0000-0000-504944564944
F16 MFD 2
B352044F-0000-0000-0000-504944564944
T-Pendular-Rudder
B68F044F-0000-0000-0000-504944564944
T.16000M
B10A044F-0000-0000-0000-504944564944
L-VPC Stick MT-50CM2
812F3344-0000-0000-0000-504944564944
Joystick V2.04
00040001-0000-0000-0000-504944564944
TQSUSBA_R1
100312E0-0000-0000-0000-504944564944
BU0836A Interface
05BA16C0-0000-0000-0000-504944564944

The first number (e.g.00000007) is what the game sets as Device0/Device1 in for the button configuration. I was assuming that the number is an indication of the layout and/or type (bottom/top row and/or Logitech/360 font texture). However, Crescendo's test results with the Nacon Controller (3) gave different results (X/A instead of Circle/B and vice-versa - which is a third option). This same controller (Nacon) also seems to need the buttons fixed (same as Xbox One AFAIK), while the others with 00000003 don't need that (360 and 360 emu). The buttons might be taken from the top row and FontTexture0_beenox360 as well, but this test was never conducted. The Xbox One controller (3) does use the top row and needs the buttons fixed (some X1 setups seem to use the bottom row). The only 7 device that I can say for sure which row it uses is the DS3 controller and it uses the bottom row (and needs the button fix). So, the layout definitely doesn't depend on that number, and the texture/row is unknown.


Here is an important quote regarding using two different controllers at the same time:

Just double checked, it seems to work when it's just 1 controller (Nacon Wired PS4 Controller aka PC Compact Controller), but I checked again with both controllers and when the Horipad S controller is plugged in at the same time as the Nacon Controller it seems to take over and lock the Nacon controller out and also changes the buttons back the wrong way to the reversed Nintendo buttons (bottom button is cancel/exit, right button is select/confirm)

We were able to use two controllers at the same time, but tests about textures and icon rows are incomplete. It may not be possible to use both rows/textures at the same time in the game, as the game might get one of the rows and combine it with an in-game texture, where all controllers take the button icons from.