Thanks for the codes and they should be in these formats
8bit codes are 0x00YYYYYY 0x000000XX (XX = max is FF = 255)
16bit codes are 0x10YYYYYY 0x0000XXXX (XXXX = max is FFFF = 65535)
32bit codes are 0x20YYYYYY 0xXXXXXXXX
and the AP and SP codes should also be easy to find
