NOTE: This post is for programmers, tinkerers.
So I noticed a post on the Chessy forum about the Yahoo Packet Analyzer and had a solution based on something else already included within YtoICS code.
About YPA though, I was testing the YPA program and logged into the chess game rooms and noticed it would capture some packets but not all. What I saw and was familiar with was the Create Room code, 2 other misc codes, and I tried to find more familiar packet codes by joining a game in progress. Unfortunately, it didn't really capture any more packets like game_in_progress (0x30) or moves or game_status packets so some functionally is missing. I'm guessing those are table opcodes it doesn't capture but it'll display the room op codes. Actually when I think about it more, it doesn't capture all room updates either because seat updates happen often and I didn't see any of those. So its packet capturing abilities are not fully realized... Maybe I don't know how to use the program though.
Now, within STUCI, there is a subroutine called op_debug. There is also a table listing opcodes and the functions that are called by them. If an opcode is received without a function to point to, it will give you a warning within the ICS interface. In these warnings it gives you an opcode number too. You can add this opcode and point it to the subroutine op_debug in the code. Next time, the warning won't be displayed but instead you'll get the parameters that were passed by the opcode so you can analyze it. The op_debug subroutine output is hard to read though. I suggest adding one line to the debug code so it'll display unprintable data in a format you can read now.
Where the code in op_debug says:
$d->Purity(1);
Add a line that also says:
$d->Useqq(1);
It'll output unreadable characters with \ and their code or normal perl code \n \t \r etcetc.
There, now if you want to analyze some of the unimplemented opcodes, just change the routine they point to from op_unimplemented to op_debug.
Ummm, I think that's it. So have fun with it...












News