aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.3k stars 176 forks source link

[Controller issue] Using both Mayflash Magic NS/S adapter or a generic USB HID controller fails to load webMAN's key PAD shortcuts/Combos #1097

Closed Gui2Barbieri closed 2 months ago

Gui2Barbieri commented 2 months ago

webMAN's shortcuts button combos are not working when I use USB controlles or adapters, like a generic USB gamepad (HID) and a adapter like Mayflash Magic. Those devices do work on games though, even on PS2 Classics.

aldostools commented 2 months ago

webMAN MOD uses the official SDK to access the game controller events. Maybe these clones are not fully compatible.

I recommend you that use genuine DualShock3 or SIXAXIS controllers on PS3.

Gui2Barbieri commented 2 months ago

Okay, understood, I thought it was a bug because I tried using a gamepad button tester on the console, and the button registration is working fine (it detects the pressing of both select and start at the same time), so I found it weird that despite the console receiving the input, the temperatures are not displayed on the screen.

Anyway, even if the console receives the input, is it expected for webMAN combinations to not work this way?

DualShock 3 works fine.

aldostools commented 2 months ago

Verify that the combos are enabled in /setup.ps3

Also you can check if the virtual PAD is recognizing your controller: http://ps3.aldostools.org/pad.html

Gui2Barbieri commented 2 months ago

Also you can check if the virtual PAD is recognizing your controller: http://ps3.aldostools.org/pad.html

I can't get this to work, I put my PS3 local ip there, but it's not doing anything, perhaps I don't understand how it works? Also yes, combos are enabled in setup.ps3, the combos do work when using an official DualShock 3

aldostools commented 2 months ago

Then there should be some incompatibility with webMAN MOD.

This is the code that reads the combos. There is nothing special. image

Gui2Barbieri commented 2 months ago

I got webPAD working and it connected to my PS3, but it only allows me to use a virtual controller there, it doesn't give info about my USB controllers on the computer.

The combos sometimes works with the generic controller or using the Mayflash adapter USB, but that is rare.

This is the code that reads the combos. There is nothing special.

Unfortunately my programming skills are pretty limited, but I guess that code is using official functions so they can't be modified? In that case it would be a incompatibility of the PS3 rather than webMAN?

I got webPAD to work, not sure if you want me to test something there, thanks!

aldostools commented 2 months ago

I checked the source code of gamepad button tester and it reading 127 ports. But it's using an equivalent of cellPadGetInfo in PSL1GHT SDK, while webMAN MOD is using cellPadGetInfo2 which only accepts a maximum of 8 ports.

I tried to change cellPadGetInfo2 to cellPadGetInfo but for some reason it's not being recognized. I have to investigate.

Gui2Barbieri commented 2 months ago

Understood, thanks for taking your time into looking this, I really appreciate it :) !

I'm using the tester from Zar, so maybe making a replica of its behavior may help with this, since it manages to read the inputs from both the generic HID controller and the Mayflash Magic adapter. Thanks again!

aldostools commented 2 months ago

Yes, that is what I have been trying to do. You can try this test build. Unzip the file & replace /dev_hdd0/plugins/webftp_server.sprx then reboot webftp_server.zip

Gui2Barbieri commented 2 months ago

Unfortunately, my generic USB HID GamePad is still failing with that build, for example, I can't disable the syscalls using R2+triangle.

It's really weird, gamepad tester recognizes both buttons being pressed, guess I can live with it in case is too difficult to fix though.

The Mayflash Magic NS adapter recognizes the Wii U Pro Controller as a PS3 DS3 because it also works on safe mode, whereas my generic controller doesn't. Not sure if that has anything to do with maybe webMAN not accepting the button combos? Some button combos like holding R3+L3 for FPS does work without major issues on the Mayflash Magic NS, but not on the generic USB controller despite the input being recognized on gamepad tester. My only guess is it's because my Mayflash is being used as a official DS3 controller and the generic one is not.

Also, after looking more carefully, it seems that when I press "Start" and "Select" gamepad tester takes a bit to detect the start button, it only immediately detects the select button and maybe after 1 or 2 seconds the other one. Perhaps that's the issue? Some other inputs like R3+L3 are detected immediately and seems to work more reliable on webMAN, not 100% perfect, but I least I can activate the commands which is good enough.

EDIT: To be honest, I think that having to support third-party peripherals that you don't own is a pain, I will close this because it does work with the official DS3 without issues and that's what most people should be running anyway. I think this problem goes beyond the scope of webMAN and I believe it's better for me to deal with this on my own rather than using your time with peripherals you don't have, will make diagnosing things really difficult. Thanks for all your help :)