Skip to content

Commit

Permalink
Skylander - Traptanium portal cleanup
Browse files Browse the repository at this point in the history
- Remove "Status" query responses from reset request
- Add additional request types for newer portal
  • Loading branch information
Desterly authored and Megamouse committed Apr 15, 2021
1 parent 63e4ac8 commit 99d6f9c
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions rpcs3/Emu/Io/Skylander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,28 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
g_skyportal.set_leds(buf[1], buf[2], buf[3]);
break;
}
case 'J':
{
// Sync status from game?
ensure(buf_size == 7);
q_result[0] = 0x4A;
q_queries.push(q_result);
break;
}
case 'L':
{
// Audio Download status?
ensure(buf_size == 5);
q_result[0] = 0x4C;
q_queries.push(q_result);
break;
}
case 'M':
{
// ?
// Audio Firmware version
// Return version of 0 to prevent attempts to
// play audio on the portal
ensure(buf_size == 2);
q_result[0] = 0x4D;
q_result[1] = buf[1];
q_queries.push(q_result);
Expand All @@ -272,13 +291,7 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
// Shutdowns the portal
ensure(buf_size == 2 || buf_size == 32);
q_result = {
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};
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};
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 All @@ -289,6 +302,12 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
ensure(buf_size == 1 || buf_size == 32);
break;
}
case 'V':
{
// ?
ensure(buf_size == 4);
break;
}
case 'W':
{
// Writes a block
Expand Down

0 comments on commit 99d6f9c

Please sign in to comment.