-
original url : http://brandonw.net/consoles/skylanders/
-
specs + code : http://freakshare.com/files/payrqavo/SkylanderEditor.zip.html
-
-
the skylanders portal demystified
-
-
If you haven't heard of the game Skylanders: Spyro's Adventure, google
-
it.
-
-
It's a video game for the PC/Mac, Wii, PS3, Xbox 360, and 3DS which
-
comes with a USB "Portal of Power", a small platform that wirelessly
-
reads and writes to Skylanders toys. Whatever toy you put on there, the
-
character it represents will magically appear in-game where you can play
-
with it, upgrade its stats, etc. Character data is saved wirelessly
-
back to the toy itself.
-
-
This page attempts to explain how this all works (as I understand it so
-
far).
-
-
the portal
-
There are two main versions of the portal that I've encountered so far
-
-- the wired one (PC/Mac, Xbox 360) and the wireless one (PS3/Wii/3DS).
-
-
They work basically the same way -- the portal (or wireless USB
-
receiver, in the case of the wireless ones) constantly transmits status
-
data back to the host, and also responds to read/write toy data
-
requests.
-
-
The protoocol couldn't be simpler -- the first byte of the data is a
-
character representing the command, and then the data comes after it.
-
For the wired version, 0B 14 is placed before the command character.
-
-
I don't have the wired version with me at the moment, so forgive the
-
crappy specifics at the moment about that one.
-
-
The commands are:
-
R -- run? restart? I don't know. It's necessary to send this to start
-
the status responses flying across. Responds with empty R packet.
-
A -- activate? I don't know. I send it after the R, but I don't know
-
that it's really necessary. Responds with empty A packet.
-
S -- status. This is the packet the portal/dongle keeps sending back to
-
the host (PC/360/PS3/Mac/Wii/whatever). Toy placement/removal is
-
reported here, but I haven't looked into it all that closely yet.
-
C -- color. The next 3 bytes after this are the RGB values for the color
-
you want to set. No response sent back.
-
Z -- sleeping. The dongle for the wireless version reports this when it
-
can't find the portal.
-
Q -- query. This is sent when you want to request a block of data from
-
the toy. Responds with Q packet of the requested data.
-
W -- write. This is sent when you want to write data to a block on the
-
toy. Responds with empty R packet.
-
The PC/Xbox 360 version of the portal reports vendor ID 0x1430, product
-
ID 0x1F17. The Wii wireless version of the portal reports vendor ID
-
0x1430, product ID 0x0150. This is probably the same as the others, but
-
I'm not sure.
-
-
The wired version contains two interrupt endpoints, incoming is 0x01 and
-
outgoing is 0x02. Commands are sent/received over these. Responses are
-
always 0x20 bytes and padded with zeroes.
-
-
The wireless version's dongle is a standard HID device, so it only
-
contains one incoming endpoint (0x01). Statuses and responses are
-
received over this endpoint, but to send commands, it's done through a
-
standard USB control request (bmRequestType 0x21, bRequest 0x09, wValue
-
0x0200, wIndex zero). It's also possible for the Wii to send requests
-
0x0A and 0x0B with no data attached, I don't know yet what these are.
-
Both commands and responses are always 0x20 bytes, padded with zeroes.
-
-
-
-
Request Format/Details
-
R 52
-
A 41 <1 byte, unknown, always 0x01>
-
S 53 <4 bytes, status data?> <1 byte, auto-incrementing
-
sequence>
-
C 43 <3 bytes, R/G/B value>
-
Z 5A
-
W 57 10 <block number> <0x10 bytes of data>
-
-
Q is tricky.
-
When a NEW skylander is placed on the portal the skylander must be read via:
-
Q 51 21 0 <0x10 bytes of data> i.e. The zero block must be read with 0x21.
-
Q 51 11 <block number> <0x10 bytes of data>
-
-
When an OLD skylander that is already on the portal must be read we use:
-
Q 51 20 0 <0x10 bytes of data> i.e. The zero block must be read with 0x20.
-
Q 51 10 <block number> <0x10 bytes of data>
-
-
Q should come back with a response of the form
-
51 11 <block number> <data> for a NEW skylander
-
51 10 <block number> <data> for an OLD skylander
-
-
A response like 51 01 ... indicates an error.
-
-
If you find that the write isn't working (especially on the wired
-
version), pad the request out to 0x20 bytes and specify 0x20 instead of
-
0x10 with the command. It's dumb like that (off-by-one bug, I suspect); I
-
haven't tested if that would break the wireless version or not.
-
-
The wireless version has a tendency to just not respond, so if you write
-
your own application that does this stuff, try commands multiple times,
-
and if writing data, query the block immediately afterward to make sure
-
the write took. The game and web site do this as well.
-
-
Be aware that the Xbox 360 version has an Infineon security chip (method
-
3, version 1.00), so if you intend to emulate the portal on the Xbox
-
360, you're going to have to resort to some weird trickery.
-
-
raw toy data
-
The character itself can store up to 1KB of data, separated into 64
-
16-byte "blocks" (64 * 16 = 1024 bytes). A group of 4 blocks is
-
(traditionally) a "sector." All data is stored Little Endian.
-
-
Below is a decrypted dump of one of my characters, Gill Grunt (some
-
sensitive information masked out with "XX"):
-
-
Block 00: XX XX XX XX CA 81 01 0F C3 85 14 91 55 50 10 11
-
Block 01: 0E 00 00 00 XX XX XX XX XX XX XX XX 00 00 58 E3
-
Block 02: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 03: 00 00 00 00 00 00 0F 0F 0F 69 00 00 00 00 00 00
-
Block 04: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 05: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 06: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 07: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 08: 00 00 00 00 00 6D 01 00 00 78 2E DF 3F 18 2C DD
-
Block 09: 00 00 00 01 00 00 00 00 AF 2A BC 87 21 A8 63 9A
-
Block 0A: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 0B: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 0C: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 0D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
-
Block 0E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 0F: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 11: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 12: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 13: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 14: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 15: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 16: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 17: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 18: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 19: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 1A: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 1B: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 1C: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 1D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 1E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 1F: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 21: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 22: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 23: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 24: 00 00 00 00 00 70 01 00 00 79 F8 ED 3F 18 C8 7A
-
Block 25: 00 00 00 01 00 00 00 00 AF 2A BC 87 21 A8 63 9A
-
Block 26: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 27: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 28: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 29: 35 14 16 0A DB 07 00 00 00 00 00 00 00 00 00 01
-
Block 2A: 35 14 16 0A DB 07 00 00 00 00 00 00 00 00 00 00
-
Block 2B: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 2C: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 2D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 2E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 2F: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 31: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 32: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 33: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 34: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 35: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 36: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 37: 00 00 00 00 00 00 7F 0F 08 69 00 00 00 00 00 00
-
Block 38: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-
Block 39: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00