-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys_usbd: Emulate Dimensions Toypad #15763
Conversation
5ccd921
to
a9e0081
Compare
Btw, please don't force push during code reviews. |
@Megamouse apologies - saw a notification come in with the first 3 comments so thought you had finished an initial review |
LGTM for now except for that thread thing. |
@Megamouse much appreciated, thanks for the quick reviews! Will try to sort out some threading, and play a bit more of the game to see if I can complete the list of commands |
f7dd27e
to
da70bde
Compare
Latest commit adds more Dimensions crypto, so that users can use any existing dumps they have from their own toy tags, as well as creating blank figures with the correct data expected by the game |
97cebc8
to
65c9ba3
Compare
Is there anything missing or why is this a draft? |
Haven't had much time to play more of the game yet, but I am just waiting to mark this as not draft until I have been able to see what responses look like with a real toypad for the commands that are currently unimplemented (line 589 of Dimensions.cpp). I assume for the color commands that they will be blank responses as well as the ones already implemented, but will look to confirm this. |
I could mark as ready for now if you want this merged and look to retrospectively add the missing command implementations |
No rush, but if you think it's already "playable", we can merge |
I would say it's playable in it's current state, will keep an eye on discord/github issues if anything pops up. Let me just rebase against master and mark as ready for review |
65c9ba3
to
d693476
Compare
The lego dimensions toy pad emulator made by berny23 is open source and could maybe be to help. |
Seems more stable than the other ToyPad emulator used before, but crashed the emulation when tried to move a figure to a position that was already filled, and doesn't always recognise the middle option like when doing master builds. |
The scale keystone* that makes you bigger and smaller sometimes doesnt work when you for example try to move a character from big to small |
Also isnt it possible to make the ui a bit smaller? |
Here is what happens 2024-07-20.22-43-11.1.mp4 |
@taiko1 what is the first level where the scale keystone is used? |
Is this PR based on Bernys`s work? |
There's a scale puzzle in The Simpsons adventure world, behind The Simpsons house |
Yes mostly based on Berny's toypad emulator/node-ld fork |
@Matt14451 what platform are you using? I have no issues moving figures to a spot already filled on my Mac but could be platform specific |
Windows 11, might be one-off but game crashed as soon as did that |
If you can reproduce that would be helpful, was it immediately on the first move to a filled slot or was it after a few moves around? |
Sorry for not responding but you can find these puzzles inside of different adventure worlds |
I think the issue might be that it instantly moves the character causing it not to work but i could be wrong since it still reacts when i switch slot |
I think it could be fixed by adding like a small delay when moving the character |
I will see if adding a pause between the replies sent to the portal for swapping the characters might help, might need to spend some more time with a real portal and see if it also does the same thing |
Has it been fixed? |
I haven't made any changes to the timings of responses yet but if you want to raise an issue so I can track it that would be helpful |
The update made it so that it takes out the character you have and places a new one of it when moving the same character causing the keystones not work properly |
attempting to utilize the rip keystone from the series 2 story packs causes Dimensions Manager to go into a connection loop. |
Hello? |
This pr is closed, please raise an issue rather than commenting here |
This PR aims to implement an Emulated Toypad for the Lego Dimensions games, which will close #15318
The Toypad behaves very similarly to the Infinity Base, with two interrupt endpoints (one for reading and one for writing), but the main difference is that the game will act as if the portal has been disconnected if an empty read message is returned. In order to get around this, I created a new method in sys_usbd.cpp to push the fake transfer to the list of fake transfers when there is actually a message to respond with.
The UI I have created is meant to resemble the physical Toypad (as closely as possible as I could with Qt), with the layout matching what you will see during the game:
The UI also has a tool that allows you to easily move figures between spaces on the portal, which is often required in game:
I still have a few commands that I need to understand how to respond to, but I haven't seen them called by the game as of yet - will unmark as draft when that is the case.