Skip to content
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

Skylander - Change portal version #10061

Merged
merged 3 commits into from
Apr 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion rpcs3/Emu/Io/Skylander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
// Shutdowns the portal
ensure(buf_size == 2 || buf_size == 32);
q_result = {
0x52, 0x02, 0x0A, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
0x53, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x53 packets are sent when there is a query but no pending data to get status of figures. Also you're using static values for the packet number which is definitely incorrect, see

void sky_portal::get_status(u8* reply_buf)
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. Initially it appeared the status packets were required but after further testing it appears it was just a timing issue reading the portal. The only real change needed is the version info in byte 2/3 from 0A03 to 1800.

That being said, there's a few additional query types I'm tracking down to see if they require any real response. It doesn't appear so but I'd rather be sure.

I'll update the PR tonight once I find those.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont understand this at all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please tell me where I need to put that code if u can please beacuse my traps arent working in game when I use the emulator portal

q_queries.push(q_result);
q_result = {
0x53, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
q_queries.push(q_result);
q_result = {
0x52, 0x02, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
q_queries.push(q_result);
g_skyportal.deactivate();
break;
Expand Down