4void setWord(
void *buffer, word Data,
bool BigEndian)
25void setDword(
void *buffer, dword Data,
bool BigEndian)
35 p[1] = (Data >> 16) & 0xff;
36 p[2] = (Data >> 8) & 0xff;
42 p[2] = (Data >> 16) & 0xff;
43 p[1] = (Data >> 8) & 0xff;
67 char *pStart, *pEnd, *pItems, *pInfo;
73 while((*pItems != 0) && (pItems < pEnd))
77 if(pItems != pEnd) pItems++;
79 pInfo = &Buffer[p + 0x0008];
80 memcpy(pInfo, pItems, pEnd - pItems + 1);
81 pInfo += (pEnd - pItems + 1);
82 memcpy(pInfo, pStart, pItems - pStart + 1);
98 Buffer[p + 0x0000] = 0x54;
99 Buffer[p + 0x0001] = 0x46;
100 Buffer[p + 0x0002] = 0x72;
101 Buffer[p + 0x0003] = 0x63;
103 Buffer[p + 0x0004] = 0x50;
104 Buffer[p + 0x0005] = 0x00;
113 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
116 w = (RECHeaderInfo->
SITPIdx << 6) |
122 setWord(&Buffer[p + 0x0002], w, TRUE);
129 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
133 Buffer[p + 0x0000] = RECHeaderInfo->
TPSatIndex;
136 memcpy(&Buffer[p + 0x0002], RECHeaderInfo->
TPUnknown3, 2);
140 memcpy(&Buffer[p + 0x000c], RECHeaderInfo->
TPUnknown5, 2);
146 Buffer[p + 0x0002] = (int)(RECHeaderInfo->
EventDuration / 60);
153 Buffer[p + 0x0011] = EventTextLength;
155 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
156 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
158 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 14);
166 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
167 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
171 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
183 byte EventTextLength;
187 Buffer[p + 0x0000] = 0x54;
188 Buffer[p + 0x0001] = 0x46;
189 Buffer[p + 0x0002] = 0x72;
190 Buffer[p + 0x0003] = 0x63;
192 Buffer[p + 0x0004] = 0x50;
193 Buffer[p + 0x0005] = 0x00;
202 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
205 Flags = (RECHeaderInfo->
SITPIdx << 6) |
211 setWord(&Buffer[p + 0x0002], Flags, TRUE);
218 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
224 Buffer[p + 0x0003] = RECHeaderInfo->
TPUnknown2;
228 Buffer[p + 0x000b] = RECHeaderInfo->
TPUnknown4;
235 Buffer[p + 0x0002] = (int)(RECHeaderInfo->
EventDuration / 60);
242 Buffer[p + 0x0011] = EventTextLength;
244 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
245 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
247 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 14);
255 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
256 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
260 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
272 byte EventTextLength;
276 Buffer[p + 0x0000] = 0x54;
277 Buffer[p + 0x0001] = 0x46;
278 Buffer[p + 0x0002] = 0x72;
279 Buffer[p + 0x0003] = 0x63;
281 Buffer[p + 0x0004] = 0x50;
282 Buffer[p + 0x0005] = 0x00;
291 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
294 Flags = (RECHeaderInfo->
SITPIdx >> 6) |
300 setWord(&Buffer[p + 0x0002], Flags, TRUE);
307 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
321 Buffer[p + 0x0002] = (int)(RECHeaderInfo->
EventDuration / 60);
328 Buffer[p + 0x0011] = EventTextLength;
330 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
331 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
333 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 14);
341 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
342 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
346 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
358 byte EventTextLength;
362 Buffer[p + 0x0000] = 0x54;
363 Buffer[p + 0x0001] = 0x46;
364 Buffer[p + 0x0002] = 0x72;
365 Buffer[p + 0x0003] = 0x63;
367 Buffer[p + 0x0004] = 0x50;
368 Buffer[p + 0x0005] = 0x00;
377 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
380 Flags = (RECHeaderInfo->
SITPIdx << 6) |
386 setWord(&Buffer[p + 0x0002], Flags, TRUE);
393 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
399 Buffer[p + 0x0003] = RECHeaderInfo->
TPUnknown2;
403 Buffer[p + 0x000b] = RECHeaderInfo->
TPUnknown4;
406 memcpy(&Buffer[p + 0x0010], RECHeaderInfo->
TPUnknown7, 8);
411 Buffer[p + 0x0002] = (int)(RECHeaderInfo->
EventDuration / 60);
418 Buffer[p + 0x0011] = EventTextLength;
420 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
421 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
423 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 14);
431 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
432 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
436 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
448 byte EventTextLength;
452 Buffer[p + 0x0000] = 0x54;
453 Buffer[p + 0x0001] = 0x46;
454 Buffer[p + 0x0002] = 0x72;
455 Buffer[p + 0x0003] = 0x63;
457 Buffer[p + 0x0004] = 0x50;
458 Buffer[p + 0x0005] = 0x10;
467 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
470 Flags = (RECHeaderInfo->
SITPIdx << 6) |
476 setWord(&Buffer[p + 0x0002], Flags, TRUE);
483 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 28);
489 Buffer[p + 0x0003] = RECHeaderInfo->
TPUnknown2;
493 Buffer[p + 0x000b] = RECHeaderInfo->
TPUnknown4;
501 Buffer[p + 0x0002] = (int)(RECHeaderInfo->
EventDuration / 60);
508 Buffer[p + 0x0011] = EventTextLength;
510 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
511 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
513 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 10);
521 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
522 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
526 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
538 byte EventTextLength;
542 Buffer[p + 0x0000] = 0x54;
543 Buffer[p + 0x0001] = 0x46;
544 Buffer[p + 0x0002] = 0x72;
545 Buffer[p + 0x0003] = 0x63;
547 Buffer[p + 0x0004] = 0x00;
548 Buffer[p + 0x0005] = 0x80;
560 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
569 setWord(&Buffer[p +0x0002], Flags, FALSE);
577 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
585 Buffer[p + 0x0003] = (int)(RECHeaderInfo->
EventDuration / 60);
592 Buffer[p + 0x0011] = EventTextLength;
594 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
595 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 273 - EventTextLength);
603 Buffer[p + 0x0000] = RECHeaderInfo->
TPSatIndex;
605 Flags = (RECHeaderInfo->
TPPilot << 11) |
606 (RECHeaderInfo->
TPFEC << 7) |
609 (RECHeaderInfo->
TPMode << 1) |
611 setWord(&Buffer[p + 0x0001], Flags, FALSE);
613 Buffer[p + 0x0003] = RECHeaderInfo->
TPUnknown2;
626 memcpy(&Buffer[p + 0x0004], RECHeaderInfo->
Bookmark, 177 *
sizeof(dword));
638 byte EventTextLength;
642 Buffer[p + 0x0000] = 0x54;
643 Buffer[p + 0x0001] = 0x46;
644 Buffer[p + 0x0002] = 0x72;
645 Buffer[p + 0x0003] = 0x63;
647 Buffer[p + 0x0004] = 0x00;
648 Buffer[p + 0x0005] = 0x80;
660 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
669 setWord(&Buffer[p +0x0002], Flags, FALSE);
677 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
685 Buffer[p + 0x0003] = (int)(RECHeaderInfo->
EventDuration / 60);
692 Buffer[p + 0x0011] = EventTextLength;
694 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
695 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 273 - EventTextLength);
703 Buffer[p + 0x0000] = RECHeaderInfo->
TPSatIndex;
706 Buffer[p + 0x0003] = RECHeaderInfo->
TPUnknown2;
710 Buffer[p + 0x000b] = RECHeaderInfo->
TPUnknown4;
719 memcpy(&Buffer[p + 0x0004], RECHeaderInfo->
Bookmark, 177 *
sizeof(dword));
731 byte EventTextLength;
735 Buffer[p + 0x0000] = 0x54;
736 Buffer[p + 0x0001] = 0x46;
737 Buffer[p + 0x0002] = 0x72;
738 Buffer[p + 0x0003] = 0x63;
740 Buffer[p + 0x0004] = 0x00;
741 Buffer[p + 0x0005] = 0x80;
753 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
762 setWord(&Buffer[p +0x0002], Flags, FALSE);
770 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 24);
778 Buffer[p + 0x0003] = (int)(RECHeaderInfo->
EventDuration / 60);
785 Buffer[p + 0x0011] = EventTextLength;
787 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
788 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 273 - EventTextLength);
801 Buffer[p + 0x000b] = RECHeaderInfo->
TPUnknown6;
808 memcpy(&Buffer[p + 0x0004], RECHeaderInfo->
Bookmark, 177 *
sizeof(dword));
820 byte EventTextLength;
824 Buffer[p + 0x0000] = 0x54;
825 Buffer[p + 0x0001] = 0x46;
826 Buffer[p + 0x0002] = 0x72;
827 Buffer[p + 0x0003] = 0x63;
829 Buffer[p + 0x0004] = 0x50;
830 Buffer[p + 0x0005] = 0x00;
839 Buffer[p + 0x0000] = RECHeaderInfo->
SISatIndex;
848 setWord(&Buffer[p + 0x0002], w, FALSE);
855 strncpy(&Buffer[p + 0x000e], RECHeaderInfo->
SISvcName, 28);
859 Buffer[p + 0x0000] = RECHeaderInfo->
TPSatIndex;
862 memcpy(&Buffer[p + 0x0002], RECHeaderInfo->
TPUnknown3, 2);
866 memcpy(&Buffer[p + 0x000c], RECHeaderInfo->
TPUnknown5, 2);
872 Buffer[p + 0x0003] = (int)(RECHeaderInfo->
EventDuration / 60);
879 Buffer[p + 0x0011] = EventTextLength;
881 strncpy(&Buffer[p + 0x0013], RECHeaderInfo->
EventEventName, EventTextLength);
882 strncpy(&Buffer[p + 0x0013 + EventTextLength], RECHeaderInfo->
EventEventDescription, 257 - EventTextLength);
884 memcpy(&Buffer[p + 0x0116], RECHeaderInfo->
EventUnknown2, 14);
892 Buffer[p + 0x0000] = RECHeaderInfo->
CryptFlag;
893 memcpy(&Buffer[p + 0x0001], RECHeaderInfo->
CryptUnknown2, 3);
897 memcpy(&Buffer[p + 0x0000], RECHeaderInfo->
Bookmark, 64 *
sizeof(dword));
911 memset(Buffer, 0, 8192);
924 case ST_ST: ret = FALSE;
break;
925 case ST_CT: ret = FALSE;
break;
SYSTEM_TYPE GetSystemType(void)