• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 2 3 4 5 ... 117 Next »

Monitor USB communication
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Monitor USB communication
05-30-2022, 10:56 PM
#1
mandar1jn Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: May 2022
Question 
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?
Find
Reply
05-31-2022, 12:46 AM
#2
mandar1jn Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: May 2022
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
Find
Reply
05-31-2022, 03:39 AM (This post was last modified: 05-31-2022, 03:42 AM by Shonumi.)
#3
Shonumi Offline
Linux User/Tester
**********
Administrators
Posts: 6,513
Threads: 55
Joined: Dec 2011
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
Website Find
Reply
05-31-2022, 05:32 AM (This post was last modified: 05-31-2022, 05:35 AM by mandar1jn.)
#4
mandar1jn Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: May 2022
(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.

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

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
Find
Reply
05-31-2022, 05:44 AM
#5
Shonumi Offline
Linux User/Tester
**********
Administrators
Posts: 6,513
Threads: 55
Joined: Dec 2011
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 fetish interest for emulating gaming hardware and peripherals, so it's exciting to see something new being researched.
Website Find
Reply
05-31-2022, 04:03 PM
#6
mandar1jn Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: May 2022
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
Find
Reply
05-31-2022, 05:10 PM
#7
mandar1jn Offline
Junior Member
**
Posts: 5
Threads: 1
Joined: May 2022
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
Find
Reply
07-19-2022, 10:51 PM
#8
hidenthusiast Offline
Junior Member
**
Posts: 16
Threads: 4
Joined: Nov 2020
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?
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode