Skylander - Traptanium portal cleanup

- Remove "Status" query responses from reset request
- Add additional request types for newer portal
This commit is contained in:
Desterly 2021-04-08 15:43:36 -04:00 committed by Megamouse
parent 63e4ac80bd
commit 99d6f9c7a9

View File

@ -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);
@ -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;
@ -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