
Hello. I'm an aspiring developer and I'm currently trying to dissect the portal of power protocol to potentially create a built-in emulator for dolphin. Is there any way that I could monitor USB traffic going through dolphin?
Monitor USB communication
|
05-30-2022, 10:56 PM
![]()
Hello. I'm an aspiring developer and I'm currently trying to dissect the portal of power protocol to potentially create a built-in emulator for dolphin. Is there any way that I could monitor USB traffic going through dolphin?
05-31-2022, 12:46 AM
I'd like to clarify that the portal is a HID device with a winusb driver because that is what the wiki said to use
Last time I checked (ages ago), you could view general USB data by going to View -> Show Log Configuration, then select Info as the Verbosity level and check IOS - USB as Log Type. If you need additional information (like individual bytes for a given transfer or something), it's possible to add your own log data by modifying Dolphin's source code and compiling it yourself. I've done that on a couple of occasions, specifically with USB monitoring in Dolphin, and it works pretty well.
Anyway, I think the protocol for the Skylanders Portal of Power has been documented previously. This was the first search result I got: https://github.com/tresni/PoweredPortals/wiki/USB-Protocols There may be other resources with more information as well, so check around before trying to reverse-engineer the entire thing. EDIT: Here are some more notes about the protocol: https://gist.github.com/parkerlreed/a19d50deccaedbe15517a19bc70ff2e5 (05-31-2022, 03:39 AM)Shonumi Wrote: Last time I checked (ages ago), you could view general USB data by going to View -> Show Log Configuration, then select Info as the Verbosity level and check IOS - USB as Log Type. If you need additional information (like individual bytes for a given transfer or something), it's possible to add your own log data by modifying Dolphin's source code and compiling it yourself. I've done that on a couple of occasions, specifically with USB monitoring in Dolphin, and it works pretty well. Thank you. I already knew about this documentation. Sadly, some of the information in these documents seem incorrect. For example, both report the devices to send a byte array that has 16 entries, but everything I see lets me conclude it is 32 entries. Also, these do not document the trap team portal. The real reason I want to see the data sent is because I can't get the device to respond to any of my command. But thank you for the log. I needed that Edit: I found the place where data is logged. Tomorrow, I will 1. find a branch that actually runs and 2. get to logging the actual data 05-31-2022, 05:44 AM
I also forgot to mention, but apparently RPCS3 has functional emulation of the Portal of Power. It might be another resource to look into.
Anyway, good luck with your efforts! If currently available information is lacking, I'd love to see up-to-date and unified documentation replace it. Additionally, as a matter of video game preservation, I think Dolphin ought to directly emulate the Portal eventually. I have a huge 05-31-2022, 04:03 PM
Hey. Thanks for pointing me to rpcs3. It has brought up some questions, but it seems useful. One of these wierd things is that the portal is an hid device but they seem to be emulating it as a usb device. Using control transfers and interrupt transfer. Both of which are in the usb specs but not the hid specs. this might explain why I can never get the portal to respond to my commands. But I don’t think so since it uses dolphin hid emulation. Also, could you maybe help me out with logging the actual data being sent? The requests seem to be containing memory addresses for the ingoing and outgoing data, but I can’t find a way to read that memory address. I come from languages like c# where memory is managed for me
05-31-2022, 05:10 PM
Update on my previous reply that has not yet been approved: it seems like the portal uses hid for outgoing communication and control reports for incoming data. Dolphin never reports data going out over his but does occasionally reports stalls for control transfers
07-19-2022, 10:51 PM
I've been trying to implement the same thing but I've never gotten past being able to emulate a device! I have an original Wired Traptanium portal, and I've recently made the switch from Windows to an M1 Mac, but MacOS's kernel device claiming has made that impossible. As someone with practically 0 experience with C/C++ and hardware emulation I've definitely struggled to try and get anything working, lol. Unsure if you've managed to make any progress, but I made a fork of the dolphin repo, and added some changes to the Qt menu to add in a dialog window to load/create/clear a skylander from a slot, but that's about it so far. Maybe we can try and collaborate to see where we can get?
|
« Next Oldest | Next Newest »
|