1 Idea for new JPC-RR dumpformat:
3 All numbers are big-endian.
5 BYTE is 1 byte, WORD is 2, DWORD is 4, QWORD is 8.
7 VARIABLE has bit 7 set for all but the last byte, and only 7 low bits in each
8 byte contribute. Thus e.g. 130 is encoded as 0x81 0x02.
10 Dump is split into one or more chapters, just concatenated one after another.
11 Timecodes in first chapter start from 0 and in each subsequent chapter they start
12 from last timecode of previous chapter.
15 The structure of each chapter:
16 ------------------------------
17 Offset: Length: Description:
18 0 16 Magic: FFFFh JPCRRMULTIDUMP
19 16 2 Number of streams (WORD). Must be nonzero.
20 18 ? Stream header table (consists of stream header elements)
21 ? ? Data table (consists of data elements and special elements)
23 Stream header element structure:
24 --------------------------------
25 Offset: Length: Description:
26 0 2 Channel number (WORD, FFFFh is reserved an MUST NOT be used)
27 All stream numbers must be unique within chapter.
35 4 2 Stream name length in bytes (0 if no name).
36 6 ? Stream name (UTF-8).
38 Special element (time skip):
39 ----------------------------
40 Offset: Length: Description:
41 0 6 Magic: FFFFFFFFFFFFh
43 Signals that no events occur in 2^32-1 ns. Last known timestamp is updated.
47 Offset: Length: Description:
48 0 2 Stream number. WORD, FFFFh MUST NOT be used.
49 2 4 Time in nanoseconds (DWORD) relative to last timestamp.
51 7 ? Event payload data size (not counting any headers, VARIABLE).
52 ? ? Event payload data.
54 Payload for stream type 0 subtype 0/1 (video frame):
55 ----------------------------------------------------
56 Offset: Length: Description:
57 0 2 Frame width (WORD)
58 2 2 Frame height (WORD)
59 4 ? If subtype is 0, Raw RGBx video data.
60 If subtype is 1, zlib-compressed Raw RGBx video data.
62 Payload for stream type 1/2 subtype 0 (audio volume):
63 -----------------------------------------------------
64 Offset: Length: Description:
65 0 4 Left channel volume numerator (DWORD)
66 4 4 Left channel volume denumerator (DWORD)
67 8 4 Right channel volume numerator (DWORD)
68 12 4 Right channel volume denumerator (DWORD)
70 Payload for stream type 1 subtype 1 (PCM sample):
71 -------------------------------------------------
72 Offset: Length: Description:
73 0 2 Left sample (signed WORD).
74 2 2 Right sample (signed WORD).
76 Payload for stream type 2 subtype 1/2 (FM write):
77 -------------------------------------------------
78 Offset: Length: Description:
79 0 1 Low byte of register number (BYTE). The bit 8 of register number is clear if
80 subtype is 1, set if subtype is 2.
84 Payload for stream type 2 subtype 3 (Reset):
85 --------------------------------------------
88 Payload for stream type 3 (dummy):
89 ----------------------------------
92 Payload for stream type 4 subtype 0 (Subtitle):
93 -----------------------------------------------
94 Offset: Length: Description:
95 0 8 Length of subtitle display in ns (QWORD).
96 8 ? UTF-8 encoded subtitle text.
98 Payload for stream type 5 subtype 71 (Game name):
99 -------------------------------------------------
100 Offset: Length: Description:
101 0 ? UTF-8 encoded game name.
103 Payload for stream type 5 subtype 65 (Authors):
104 -----------------------------------------------
105 Offset: Length: Description:
106 0 ? UTF-8 encoded authors string.
108 Payload for stream type 5 subtype 76 (Length):
109 -----------------------------------------------
110 Offset: Length: Description:
111 0 8 Length of movie in ns (QWORD).
113 Payload for stream type 5 subtype 82 (Rerecords):
114 -------------------------------------------------
115 Offset: Length: Description:
116 0 8 Number of rerecords (QWORD).