Skip to content

Commit f429868

Browse files
committed
Evo: add more documentation and test files.
1 parent ed00fba commit f429868

17 files changed

Lines changed: 258 additions & 24 deletions

evo-doc/8xd2-gdb.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# `.8xd2` graph databases
2+
3+
Sample file: `testData/evo/more/GDB1.8xd2`.
4+
5+
Metadata:
6+
7+
```text
8+
metaData.type = 3
9+
metaData.version = 1
10+
metaData.flags = 0
11+
metaData.name = E890 0000
12+
```
13+
14+
`E890` is `TOK_VAR_GDB1`.
15+
16+
Body fields:
17+
18+
```text
19+
version = 1
20+
size = 836
21+
data = Evo graph database payload
22+
```
23+
24+
The payload is not the same flat byte layout as pre-Evo `.8xd` graph
25+
database data. The observed payload begins with a tokenized settings
26+
header, followed by records marked with ASCII tags:
27+
28+
```text
29+
RAVI variable/value record
30+
NQEI equation display metadata record
31+
```
32+
33+
Observed header words:
34+
35+
```text
36+
000A
37+
E58B TOK_PARAM
38+
0001
39+
0000 TOK_EOS
40+
0000 TOK_EOS
41+
0000 TOK_EOS
42+
0010
43+
E5B2 TOK_RECTG
44+
E5B3 TOK_COORDON
45+
E606 TOK_GRIDOFF
46+
E5AC TOK_MEDGRAY
47+
E5A2 TOK_BLACK
48+
E608 TOK_LBLOFF
49+
E4F7 TOK_EXPR_ON
50+
E50B TOK_CRIT_PNTS_ON
51+
E5B7 TOK_BACK_OFF
52+
E5BB TOK_DETECT_ASYM_ON
53+
E60A TOK_WEBOFF
54+
```
55+
56+
The first `RAVI` records hold Parametric window settings:
57+
58+
```text
59+
token payload
60+
E996 TMIN
61+
E997 TMAX
62+
E998 T_STEP
63+
E98F XMIN
64+
E990 XMAX
65+
E991 XSCL
66+
E993 YMIN
67+
E994 YMAX
68+
E995 YSCL
69+
```
70+
71+
The equation section alternates `NQEI` display metadata records and
72+
`RAVI` equation expression records. In this sample:
73+
74+
```text
75+
pair NQEI style NQEI flags NQEI color token expr
76+
X1T/Y1T 8 2 E5A0 TOK_BLUE X1T=2T, Y1T=-5.5T
77+
X2T/Y2T 6 4 E5A1 TOK_RED X2T=cos(T/2, Y2T=sin(T/3
78+
X3T/Y3T 4 4 E5A4 TOK_GREEN X3T=T^2, Y3T=-T
79+
X4T/Y4T 1 6 E5A3 TOK_MAGENTA X4T=0, Y4T=T
80+
X5T/Y5T 1 0 or 1 E5A4 TOK_GREEN empty
81+
X6T/Y6T 1 0 or 1 E5A5 TOK_ORANGE empty
82+
```
83+
84+
The X1T/Y1T pair was disabled in the equation editor when this GDB was
85+
exported. Its `NQEI` flags are `2`, while the enabled pairs in this
86+
sample use `4` or `6`. This suggests bit `0x04` is tied to enabled /
87+
plotted equation state, but the exact meaning of bit `0x02` is still
88+
not fully proven.
89+
90+
The `NQEI` style values are not currently mapped to the legacy GDB
91+
`GraphStyle` enum. Observed values in this sample are:
92+
93+
```text
94+
8 blue thin line
95+
6 red dotted line
96+
4 green connected line
97+
1 magenta thick line
98+
```
99+

evo-doc/8xn2-number.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ metaData.name = variable token, little-endian, then 0000
1313

1414
The observed `metaData.flags = 8` top-level samples are `X.8xn2` and
1515
`Y.8xn2`. The same metadata flag appears on nested `XMIN`, `XMAX`,
16-
`YMIN`, and `YMAX` entries in `Window.8xw2`. This appears tied to
17-
special graph/window coordinate variables, not to the scalar data format
18-
itself.
16+
`YMIN`, and `YMAX` entries in `testData/evo/Window.8xw2`, while the
17+
same nested entries use `metaData.flags = 0` in
18+
`testData/evo/more/Window.8xw2` and
19+
`testData/evo/more/Window_parametric.8xw2`. This appears tied to
20+
metadata context for special graph/window coordinate variables, not to
21+
the scalar data format itself, and should not be required to recognize
22+
those variables.
1923

2024
Body fields:
2125

evo-doc/8xw2-window.md

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# `.8xw2` window settings
22

3-
Sample file: `Window.8xw2`.
3+
Sample files:
4+
5+
- `testData/evo/Window.8xw2`
6+
- `testData/evo/more/Window.8xw2`
7+
- `testData/evo/more/Window_parametric.8xw2`
48

59
Metadata:
610

@@ -35,14 +39,14 @@ size = byte length of data; equals arraylen * 2
3539
data = custom scalar payload
3640
```
3741

38-
Observed `Window.8xw2` entries:
42+
All observed `Window.8xw2` files contain the same entries:
3943

4044
```text
41-
00 E98F TOK_VAR_XMIN metaData.flags 8, size 12
42-
01 E990 TOK_VAR_XMAX metaData.flags 8, size 12
45+
00 E98F TOK_VAR_XMIN size 12
46+
01 E990 TOK_VAR_XMAX size 12
4347
02 E991 TOK_VAR_XSCL size 6
44-
03 E993 TOK_VAR_YMIN metaData.flags 8, size 12
45-
04 E994 TOK_VAR_YMAX metaData.flags 8, size 12
48+
03 E993 TOK_VAR_YMIN size 12
49+
04 E994 TOK_VAR_YMAX size 12
4650
05 E995 TOK_VAR_YSCL size 6
4751
06 E992 TOK_VAR_X_RES size 6
4852
07 E9B2 TOK_VAR_DELTA_X size 12
@@ -60,7 +64,12 @@ Observed `Window.8xw2` entries:
6064
19 E9AF TOK_VAR_PLOT_STEP size 6
6165
```
6266

63-
Representative custom scalar payloads:
67+
The root sample has `metaData.flags = 8` on `XMIN`, `XMAX`, `YMIN`,
68+
and `YMAX`. The `more/Window.8xw2` and
69+
`more/Window_parametric.8xw2` samples have `metaData.flags = 0` on all
70+
nested entries, including those coordinate variables.
71+
72+
Representative custom scalar payloads from `testData/evo/Window.8xw2`:
6473

6574
```text
6675
XMIN:
@@ -79,7 +88,52 @@ THETA_MAX:
7988
00 00 00 07 53 18 83 62 01 00 23 00
8089
```
8190

91+
Representative custom scalar payloads from
92+
`testData/evo/more/Window.8xw2`:
93+
94+
```text
95+
XMIN:
96+
00 00 00 00 00 00 90 15 ff 01 23 00
97+
98+
XMAX:
99+
00 00 00 27 63 79 70 15 01 00 23 00
100+
101+
XSCL:
102+
03 00 01 00 1f 00
103+
104+
YMIN:
105+
00 00 00 00 00 00 40 10 ff 01 23 00
106+
107+
YMAX:
108+
00 00 00 00 00 00 50 20 01 01 23 00
109+
110+
X_RES:
111+
02 00 01 00 1f 00
112+
113+
DELTA_X:
114+
00 95 11 09 11 96 93 54 01 fe 23 00
115+
116+
DELTA_Y:
117+
00 69 07 23 69 57 85 14 01 ff 23 00
118+
```
119+
120+
`testData/evo/more/Window_parametric.8xw2` was captured while the
121+
calculator was in Parametric mode. It has the same entry order and
122+
metadata flags as `testData/evo/more/Window.8xw2`; the observed payload
123+
differences are:
124+
125+
```text
126+
YMIN:
127+
00 00 00 00 00 00 40 15 ff 01 23 00
128+
129+
YMAX:
130+
00 00 00 00 00 00 50 25 01 01 23 00
131+
132+
DELTA_Y:
133+
00 62 84 53 61 34 66 19 01 ff 23 00
134+
```
135+
82136
The nested scalar `data` encoding matches the `.8xn2` custom scalar
83137
shape. The observed nested `metaData.flags = 8` values are limited to
84-
the X/Y min/max coordinate variables in this sample. Other window
85-
variables use `metaData.flags = 0`.
138+
the X/Y min/max coordinate variables in the root sample, but the newer
139+
samples show those same variables can also use `metaData.flags = 0`.

evo-doc/8xy2-equation.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
# `.8xy2` equations
22

3-
Sample file: `Y1.8xy2`.
3+
Sample files:
4+
5+
- `testData/evo/Y1.8xy2`
6+
- `testData/evo/more/X1T.8xy2` through `Y4T.8xy2`
47

58
Metadata:
69

710
```text
811
metaData.type = 7
912
metaData.version = 1
10-
metaData.flags = 4 in the sample
13+
metaData.flags = 4 or 6 in the samples
1114
metaData.name = equation token, little-endian, then 0000
1215
```
1316

14-
The body has no `flags` key. The observed metadata flag `4` appears to
17+
The body has no `flags` key. The observed metadata flags appear to
1518
belong to equation graph/display state rather than to the expression
16-
token stream. More equation samples are needed before naming this bit.
19+
token stream. In the standalone parametric equation samples, `X1T` /
20+
`Y1T` through `X3T` / `Y3T` use `metaData.flags = 4`, while `X4T` /
21+
`Y4T` use `metaData.flags = 6`.
22+
23+
The standalone equation files do not expose separate `lineStyle` or
24+
`color` keys. In the observed Evo GDB sample, pair style/color and
25+
enabled-state metadata are carried by adjacent `NQEI` records, not by
26+
the individual `.8xy2` expression records.
1727

1828
For `Y1.8xy2`:
1929

@@ -35,6 +45,21 @@ data = byte string of little-endian 16-bit expression tokens
3545
This is structurally close to a `.8xp2` program, but the token stream is
3646
an expression rather than a multi-line program.
3747

48+
Parametric samples:
49+
50+
```text
51+
file name bytes metaData.flags data hex code
52+
X1T.8xy2 50 e8 00 00 4 03 e4 13 e8 00 00 2T
53+
Y1T.8xy2 51 e8 00 00 4 2e e4 06 e4 0b e4 06 e4 13 e8 00 00
54+
-5.5T
55+
X2T.8xy2 52 e8 00 00 4 41 e4 13 e8 2b e4 03 e4 00 00 cos(T/2
56+
Y2T.8xy2 53 e8 00 00 4 3f e4 13 e8 2b e4 04 e4 00 00 sin(T/3
57+
X3T.8xy2 54 e8 00 00 4 13 e8 2c e4 03 e4 00 00 T^2
58+
Y3T.8xy2 55 e8 00 00 4 2e e4 13 e8 00 00 -T
59+
X4T.8xy2 56 e8 00 00 6 01 e4 00 00 0
60+
Y4T.8xy2 57 e8 00 00 6 13 e8 00 00 T
61+
```
62+
3863
`Y1.8xy2` token stream:
3964

4065
```text

evo-doc/evo-version-flags.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,23 @@ variable-level image/Pic metadata flag rather than a pixel-data flag.
9292

9393
## `metaData.flags = 4` for equations
9494

95-
The current `.8xy2` sample, `Y1.8xy2`, has:
95+
The current `.8xy2` samples use:
9696

9797
```text
98-
metaData.type = 7
99-
metaData.flags = 4
98+
metaData.type = 7
99+
metaData.flags = 4 or 6
100100
```
101101

102102
The body has no `flags` key. This likely belongs to equation
103-
graph/display state, not to the expression token stream itself. More
104-
equation samples are needed before naming the bit.
103+
graph/display state, not to the expression token stream itself.
104+
105+
In the observed Evo GDB sample, `testData/evo/more/GDB1.8xd2`, the
106+
equation display metadata is stored in `NQEI` records next to the
107+
equation expression records. The X1T/Y1T pair was disabled in the
108+
equation editor and has `NQEI` flags `2`; enabled pairs in the same
109+
file use `4` or `6`. This suggests bit `0x04` is tied to enabled /
110+
plotted equation state, while the exact meaning of bit `0x02` is still
111+
unknown.
105112

106113
The online calculator WASM contains a field-name table that includes
107114
common fields and graph/equation metadata fields:
@@ -126,7 +133,7 @@ X.8xn2 metaData.flags = 8, body flags = 0
126133
Y.8xn2 metaData.flags = 8, body flags = 0
127134
```
128135

129-
and in nested scalar entries inside `Window.8xw2`:
136+
and in nested scalar entries inside `testData/evo/Window.8xw2`:
130137

131138
```text
132139
XMIN metaData.flags = 8
@@ -135,15 +142,21 @@ YMIN metaData.flags = 8
135142
YMAX metaData.flags = 8
136143
```
137144

138-
Other window values in the same file use `metaData.flags = 0`.
145+
Other window values in the same file use `metaData.flags = 0`. A
146+
second window sample, `testData/evo/more/Window.8xw2`, and a
147+
Parametric-mode sample, `testData/evo/more/Window_parametric.8xw2`,
148+
use `metaData.flags = 0` for all nested entries, including `XMIN`,
149+
`XMAX`, `YMIN`, and `YMAX`.
150+
139151
Therefore bit `0x08` is not simply "decimal value" or "approximate
140152
number"; many decimal scalar values use metadata flag `0`.
141153

142154
The current best description is:
143155

144156
```text
145157
metaData.flags bit 0x08 appears tied to special graph/window coordinate
146-
variables, especially X/Y and X/Y min/max.
158+
variable metadata context, especially X/Y and X/Y min/max, but observed
159+
files do not always set it for those nested window variables.
147160
```
148161

149162
The precise semantic name is still unknown.

testData/evo/more/GDB1.8xd2

908 Bytes
Binary file not shown.

testData/evo/more/Window.8xw2

1.85 KB
Binary file not shown.
1.85 KB
Binary file not shown.

testData/evo/more/X1T.8xy2

84 Bytes
Binary file not shown.

testData/evo/more/X2T.8xy2

88 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)