http://problemkaputt.de/gbatek-ds-cart- ... meters.htm
That was quite a huge project, the SPI commands for the infrared port have been quite harmless, but then I couldn't stop adding more and more specs for the infrared commands, instruction set, memory maps, accelerometer and lcd controller.
Maybe the hardest part were the P-walker IR commands, they were already documented on dmitry's webpage, but I couldn't make any sense of that table. I've spent several days on sorting and reformatting the table (like moving the word EEPROM to the begin of each line for EEPROM related commands), but that didn't really help on making it more legible.
I've finally spent some more days on disassembling the firmware myself and making two new separate tables from scratch up (one for incoming packets, and one for outgoing packets). I hope it's a bit more clear which commands/replies have what parameter bytes. The overall descriptions are ripped from dmitry's table - I didn't reverse-engineer everything from scratch up.
Alongsides, I've noticed a few things that appear to be wrong on dmitry's webpage:
Code: Select all
Cmd 16h has 38h-byte data (not 34h-byte data)
Cmd 40h,42h,44h are mis-numbered (and one of them is completely missing)
Cmd 2Ah,2Ch are said to have incoming data for "RTC" (seems to be wrong?)
Cmd 32h,40h,52h,60h are said to have incoming data for "RTC" (seems true?)
Cmd WHAT is used to set RTC? (2Ah/2Ch don't? and 32h/etc are said to be unused)
Elsewhere CMD_52 is said TO BE USED from nds, hence "dir=g2w", not "?2w"?
Cmd F0h is marked as unknown/unused transfer direction, but also says from NDS
struct EnrollData is missing the last byte (that says if/how to init LCD)
struct EventBitmap might mean a boolean array (probably not bitmap graphics)?
0x0172-0x017F unused does actually start at 0171h, not 0172h?
does "0xCE88" (aka CE44h+4) really relate to "99999 steps reached"??? (looks more like 9999999 decimal?)
the 16bit value "copied from unk_0" (32bit) probably means "unk_2" (16bit)
small typos: fine=find, intead=instead, tmie=time
For reading the p-walker step counters, several data structures are containing "steps", but it isn't always clear which "steps since when" are meant, since today, since last sync, since forever? So it's still kinda unknown how to use which values for reading the step counters.