isage / vixen

ViXEn - Vita X-input Enabler
MIT License
23 stars 4 forks source link

Core dump when trying to add controller #8

Closed Soundtoxin closed 1 year ago

Soundtoxin commented 1 year ago

2023-06-14-144115 2023-06-14-143839

Coredumps: psp2core-1686771512-0x00000b2ceb-eboot.bin.psp2dmp https://files.catbox.moe/7v5w5u.psp2dmp

psp2core-1686771665-0x0000052e9d-eboot.bin.psp2dmp https://files.catbox.moe/6gl37e.psp2dmp

The controller I'm trying to add currently is an Open-Frame1 running HayBox firmware. It uses a Raspberry Pi Pico for the microcontroller and it presents itself as an Xbox 360 Wireless Receiver by default.

[10934751.840978] usb 3-9.3.1: New USB device found, idVendor=045e, idProduct=02a1, bcdDevice= 1.00
[10934751.840984] usb 3-9.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10934751.840986] usb 3-9.3.1: Product: Pico
[10934751.840988] usb 3-9.3.1: Manufacturer: Raspberry Pi
[10934751.840990] usb 3-9.3.1: SerialNumber: E66118C417909121
[10934751.855498] input: Generic X-Box pad as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.3/3-9.3.1/3-9.3.1:1.0/input/input2200
[10934751.859214] cdc_acm 3-9.3.1:1.1: ttyACM0: USB ACM device
Bus 003 Device 055: ID 045e:02a1 Microsoft Corp. Xbox 360 Wireless Receiver for Windows

Initially I had the 8BitVita plugin also installed/enabled, but I tried removing its line from my tai config and rebooting and still had the same issue.

Soundtoxin commented 1 year ago

I have also now tried a Flatbox Rev 5 (also powered by an RP2040-based microcontroller, the RP2040-Zero) running GP2040-CE firmware.

Coredump: psp2core-1686772532-0x000014226f-eboot.bin.psp2dmp https://files.catbox.moe/urecrp.psp2dmp

This one pretends to be a regular Xbox 360 controller in xinput mode from what I can tell.

[10935779.302356] usb 3-9.3.1: new full-speed USB device number 56 using xhci_hcd
[10935779.405695] usb 3-9.3.1: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.14
[10935779.405702] usb 3-9.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10935779.405704] usb 3-9.3.1: Product: XInput STANDARD GAMEPAD
[10935779.405706] usb 3-9.3.1: Manufacturer: Microsoft
[10935779.405707] usb 3-9.3.1: SerialNumber: 1.0
[10935779.411720] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.3/3-9.3.1/3-9.3.1:1.0/input/input2201
Bus 003 Device 056: ID 045e:028e Microsoft Corp. Xbox360 Controller

In both cases I saw the right VID and PID in VXHelper, but after selecting it, the app would have the error.

isage commented 1 year ago

Did you install vixen-helper.skprx?

Soundtoxin commented 1 year ago

I think I forgot that step initially, but I've just done that now and I'm still getting an error.

New coredump in case it's different: psp2core-1686773282-0x0000052b21-eboot.bin.psp2dmp https://files.catbox.moe/pouvka.psp2dmp

edit: Also, nothing has generated a vixen.txt so far.

isage commented 1 year ago

it isn't different. it tries to call function from skprx and fails to do so, because it either isn't installed or installed wrong. or you didn't reboot.

Soundtoxin commented 1 year ago

Indeed. I had ur0:tai/vixenhelper.skprx instead of ur0:tai/vixen-helper.skprx in my config.txt.

Soundtoxin commented 1 year ago

Now I've gone through the process of adding the controller for the Open-Frame1 and the buttons don't appear to work. Here's my vixen.txt.

vixen.txt

I skipped mapping left analog stick for now, but dpad should still be able to move me through menus. The face buttons don't seem to do anything either.

isage commented 1 year ago

It isn't process for adding controller, it's a process of helping me add controller support. So ofc buttons won't work.

If you want proper support - map everything you want to be supported, including analogs, then send vixen.txt and wait.

Soundtoxin commented 1 year ago

Oh, my mistake. Well, I got the Flatbox working now, it's just the Frame1 that didn't seem to work still. The Frame1 shows as Bus 003 Device 055: ID 045e:02a1 Microsoft Corp. Xbox 360 Wireless Receiver for Windows in lsusb which is not on the supported controllers list. I see a similar 0291 listed for a wireless receiver but not 02a1. Just adding that would probably take care of things. The controller itself has different modes for regular games and fighting games, so mappings would probably even be fine automatically. BTW, sorry to cover so many controllers/problems in this one issue, but thank you for your help so far. I at least got one of them working which is really cool.

isage commented 1 year ago

vixen.zip try that one. added 02a1 to device list.

Soundtoxin commented 1 year ago

Still not working with that version installed, unfortunately. I replaced the file I had, rebooted from the henkaku menu, and didn't notice a change.

I started doing a new mapping in the helper in case the file was needed, but it's a bit confusing since these were basically made to play Smash Bros Melee and other similar games. It's normally got "light shield" and "medium" shield buttons which are like activating the triggers on a GameCube controller to different degrees. There are also modifier buttons to emulate different angles and amount of push on an analog stick with digital buttons, so I'd rather not do too much manual mapping and mess up the clever stuff built into the firmware by accident. I think if it's mapped like an Xbox 360 controller, the firmware will probably take care of the rest. It works fine on PC for playing Rivals of Aether, for example.

Let me know if there's any other info I can get you.

isage commented 1 year ago

Wait, it's wired, right? Why the hell does it present itself as wireless receiver.

I'll try to dig into pico fw to see how it actually works

isage commented 1 year ago

vixen.zip meanwhile, try that one

Soundtoxin commented 1 year ago

Yeah, it's wired. It's just a compatibility thing. There's actually a commit to change it to present as another controller (A Mad Catz 360 controller that's already supported by your plugin, luckily) due to some issues with the dpad on Linux with the current identifier, but the change isn't in a release yet.

https://github.com/JonnyHaystack/HayBox/commit/33045e946b80e2dfd3c0f8db346991aa6a011ff6

meanwhile, try that one

Still not working.

I was worried maybe the controller was going into DInput mode instead of XInput and that could be part of the problem, but since it shows up with the right ID (same as on my PC) in VXHelper, it's probably in XInput mode. From the HayBox README it looks like you can force it into DInput, but I don't see a way to force it into XInput, it's just supposed to default to XInput unless it thinks it's plugged into a GameCube/Switch (which I think it determines based on the voltage it receives).

isage commented 1 year ago

Do you get "Device isn't supported" notification when you plug it in?

Soundtoxin commented 1 year ago

No. I don't think I've seen that at all since installing vixen.

isage commented 1 year ago

okay, looks like i found the issue. while it reports itself as xbox360 (xinput) controller and seem to send same values for buttons, length of data and "operation" bytes are wrong/different.

welp, let's try that one. vixen.zip

Soundtoxin commented 1 year ago

Hm. Still doesn't seem to work at all.

isage commented 1 year ago

Do you know how to use PrincessLog?

Soundtoxin commented 1 year ago

No, I've only had a Vita and Vita TV for a week or two.

Is it this? https://github.com/CelesteBlue-dev/PSVita-RE-tools/tree/master/PrincessLog/build

Found some instructions here https://forum.devchroma.nl/index.php?topic=80.0

Looks like I run netcat on a computer pointed to the Vita and then I guess the logs show up on my computer. Is that right? I can give it a go later.

isage commented 1 year ago

Yep

isage commented 1 year ago

When you set it up, use this version, plug in controller, press any button, then unplug. send the logs vixen.zip

Soundtoxin commented 1 year ago

Having some troubles. Nothing was showing up on my PC for some reason, so I changed the server to my phone and used nc from inside termux. nc keeps quitting out kinda fast so not sure if I got any good info. I tried setting a wait time to 10 seconds for the last one to stop the disconnecting. I also wasn't sure if kernel debug stuff should be on or not. I had it on at first but tried turning it off after I had a 5k+ line file where a bunch of the lines were the same. I'm a bit worried none of these logs will be any good, but here they are.

vitalog.txt vitalog2.txt vitalog3.txt

I won't have your trained eye, but I at least see vendor: 045e in that first log, so maybe there's something good there.

isage commented 1 year ago

Yep, that's good. Try that one vixen.zip

Soundtoxin commented 1 year ago

Finally getting somewhere! Analog up and left work, but down and right don't seem to work. Dpad works. Cross, circle, square, and triangle all work. *For some reason down works in vitashell but not on the main menu

I thought to change the mode on the controller from Melee mode to Rivals mode and actually the analog stick works as expected here. I think Melee mode doesn't move the analog stick as far due to a smaller gate on GameCube controllers, so I guess it works fine as long as I'm not in Melee mode! I think this is probably good enough. Do you know of a good way to test all the buttons and see what they're doing? Like a button tester app?

isage commented 1 year ago

https://github.com/isage/vitesin

Soundtoxin commented 1 year ago

Sweet! Yep, everything works. Thank you so much! I'll close this issue now.