A nice person has put together a pretty-darn-good online (dis)assembler at http://nabaztag.iroise.net/ but there’s absolutely _no_ documentation for the assembly code which it uses. I found that the easiest way to find out about it was to capture a real type 5 packet which the Violet server sent to my Nabaztag, and to upload it to the disassembler and read what it sent back.
It would appear that it starts with a line like:
ID 0x12345678
which specifies the “tc” parameter that the Nabaztag uses on the URL it requests (it also puts the ID of the previous program which it ran as the “tn” parameter).
The program then has a line which always says:
TRANSITION IMMEDIATE
I assume this is something to do with how the Nabaztag changes from one program to the next, but I’ve only ever seen it say this and there’s not much in the assembly description about what other values there could be.
After these, then the program starts. The assembler allows labels in the code, as long as they end with a “:” when being defined and are referenced by prefixing them with an “@”. These labels can be referenced whenever an opcode takes a type “w” parameter - the assembler will change them for the address of the label.
The Iroise assembler will also allow blocks of raw data to be added to the hex output, using a series of “DATAH” commands. It allows you to upload a file (eg a midifile) to be added to the end of the hexcode, which I assume you can reference in the assembly somehow (eg using the MIDIPLAY command). I haven’t tried using music commands yet, so I don’t know anything about them, but beware that these blocks of data often get confused for actual opcodes by the disassembler, which can cause some head-scratching when you’re trying to figure out what a Violet program is doing.