--- In [email protected], "Michael Przybilla" <[EMAIL PROTECTED]> wrote: > > Hi > Has anyone tried to an succeeded in implementing the DStar scramble > code in ANSI C? > The scramble procedure is described in > http://www.jarl.com/d-star/shogen.pdf on top of page 8 > > 73 > Micha >
This is not ANSI C code. But most easy method is the table methdo for scramble. So, I listed 83 bytes of scramble table. Becasue RFheader needs 83 bytes and slow data field needs 3 bytes. You apply the each byte of following scramble table to the each desired byte with "XOR". 0x70, 0x4F, 0x93, 0x40, 0x64, 0x74, 0x6D, 0x30, 0x2B, 0xE7, 0x2D, 0x54, 0x5F, 0x8A, 0x1D, 0x7F, 0xB8, 0xA7, 0x49, 0x20, 0x32, 0xBA, 0x36, 0x98, 0x95, 0xF3, 0x16, 0xAA, 0x2F, 0xC5, 0x8E, 0x3F, 0xDC, 0xD3, 0x24, 0x10, 0x19, 0x5D, 0x1B, 0xCC, 0xCA, 0x79, 0x0B, 0xD5, 0x97, 0x62, 0xC7, 0x1F, 0xEE, 0x69, 0x12, 0x88, 0x8C, 0xAE, 0x0D, 0x66, 0xE5, 0xBC, 0x85, 0xEA, 0x4B, 0xB1, 0xE3, 0x0F, 0xF7, 0x34, 0x09, 0x44, 0x46, 0xD7, 0x06, 0xB3, 0x72, 0xDE, 0x42, 0xF5, 0xA5, 0xD8, 0xF1, 0x87, 0x7B, 0x9A, 0x04 Example of RF header (First byte) ^ 0x70 (Second byte) ^ 0x4f (Third byte) ^ 0x93 (4th byte) ^ 0x40 .. and Slow data field. (First byte) ^ 0x70 (Second byte) ^ 0x4f (Third byte) ^ 0x93 ^ is "XOR". Satoshi 7m3tjz
