Skip to content

Commit ba0e584

Browse files
committed
WIP EVO DOC
1 parent 5ac34f2 commit ba0e584

20 files changed

Lines changed: 519 additions & 22 deletions

evo-doc/8ca2-background-image.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# `.8ca2` background images
22

3-
Sample files: `Image1.8ca2` through `Image7.8ca2`.
3+
Sample files:
4+
5+
- `Image1.8ca2` through `Image7.8ca2`
6+
- `testData/evo/img_compare/background.8ca2`
7+
- `testData/evo/img_compare/background_ticonnectevo.8ca2`
48

59
Metadata:
610

@@ -31,10 +35,25 @@ size = 33601
3135
data = byte string, length 33601
3236
```
3337

38+
We have a hard-coded CBOR prefix of 70 bytes long before the RGB565 pixel data:
39+
40+
```text
41+
BF top-level map(*)
42+
"metaData": BF
43+
"type": 5
44+
"version": 1
45+
"flags": 1
46+
"name": 44 B0 E8 00 00 Image1 token, patched per slot
47+
FF
48+
"version": 1
49+
"size": 0x8341 33601
50+
"data": 59 83 41 0B ... byte string, first byte marker
51+
```
52+
3453
The image data byte string is:
3554

3655
```text
37-
data[0] image-format marker; 0x16 in the provided samples
56+
data[0] image-format marker
3857
data[1..] 33600 bytes of RGB565 pixel data
3958
```
4059

@@ -48,7 +67,9 @@ format = RGB565, little-endian words
4867
```
4968

5069
The converter draws the input image onto a 160 by 105 white canvas,
51-
converts RGBA8888 to RGB565, then writes rows bottom-to-top:
70+
preserving aspect ratio and centering the result. It disables canvas
71+
image smoothing, converts RGBA8888 to RGB565, then writes rows
72+
bottom-to-top:
5273

5374
```text
5475
stored row 0 = source/display row 104
@@ -68,4 +89,10 @@ let g6 = (word >> 5) & 0x3f;
6889
let b5 = word & 0x1f;
6990
```
7091

71-
It seems `0x0b` is the first data byte made by the converter but all provided calculator files use `0x16`?
92+
Observed data markers:
93+
94+
```text
95+
0x0B TI Connect Evo image import output
96+
0x16 calculator/exported samples and img2calc-generated output
97+
```
98+

evo-doc/8ci2-picture.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# `.8ci2` pictures
2+
3+
Sample files:
4+
5+
- `Pic1.8ci2` through `Pic6.8ci2`
6+
- `testData/evo/img_compare/Zelda.8ci2`
7+
8+
Metadata:
9+
10+
```text
11+
metaData.type = 4
12+
metaData.version = 1
13+
metaData.flags = 1
14+
metaData.name = Pic token, little-endian, then 0000
15+
```
16+
17+
Observed Pic name tokens:
18+
19+
```text
20+
Pic1 E880 TOK_VAR_PIC1
21+
Pic2 E881 TOK_VAR_PIC2
22+
Pic3 E882 TOK_VAR_PIC3
23+
Pic4 E883 TOK_VAR_PIC4
24+
Pic5 E884 TOK_VAR_PIC5
25+
Pic6 E885 TOK_VAR_PIC6
26+
```
27+
28+
The token table also defines `Pic7` through `Pic9` and `Pic0`:
29+
30+
```text
31+
Pic7 E886 TOK_VAR_PIC7
32+
Pic8 E887 TOK_VAR_PIC8
33+
Pic9 E888 TOK_VAR_PIC9
34+
Pic0 E889 TOK_VAR_PIC0
35+
```
36+
37+
Body fields:
38+
39+
```text
40+
version = 1
41+
size = 33441
42+
data = byte string, length 33441
43+
```
44+
45+
Observed data layout:
46+
47+
```text
48+
data[0] picture-format marker; 0x0F in the provided samples
49+
data[1..] 33440 bytes of packed pixel data
50+
```
51+
52+
`33440 = 160 * 209`, which is 209 rows with 160 bytes per row. Each
53+
byte stores two 4-bit pixels, so the pixel geometry is:
54+
55+
```text
56+
width = 320 pixels
57+
height = 209 pixels
58+
bpp = 4
59+
stride = 160 bytes per row
60+
```
61+
62+
img2calc generates type `4` `.8ci2` files with this layout:
63+
64+
```text
65+
size = 33441
66+
data = 0F followed by 33440 packed 4-bpp bytes
67+
```
68+
69+
For each output byte, img2calc writes the left pixel in the high nibble
70+
and the right pixel in the low nibble:
71+
72+
```text
73+
byte = (left_palette_index << 4) | right_palette_index
74+
```
75+
76+
For `.8ci2`, img2calc writes rows top-to-bottom: output byte 0 is the
77+
leftmost two pixels of display row 0. This differs from img2calc's
78+
`.8ca2` path, where it vertically flips while reading the RGB pixels, so
79+
the stored RGB565 payload is bottom-to-top.
80+
81+
The sample bytes are packed 4-bit color indices:
82+
83+
```text
84+
byte 0x03 two pixels: color 0, color 3
85+
byte 0x30 two pixels: color 3, color 0
86+
byte 0x33 two pixels: color 3, color 3
87+
```

evo-doc/8xl2-list.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ L6 E835 TOK_VAR_LIST_6
2424

2525
Custom named lists use `TOK_VAR_LIST_NAME` followed by variable-letter
2626
tokens, then `0000`. The user-facing list marker `(L)` is not stored as
27-
an ordinary `L` character; it is represented by `E836`.
27+
an ordinary `L` character; it is represented by `E836`. The calculator
28+
UI allows custom list names up to five letters; the exported files
29+
currently present in the sample tree include one-letter, three-letter,
30+
and generated formula-list names.
2831

2932
Examples:
3033

evo-doc/8xn2-number.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ metaData.flags = 0 or 8 in the samples
1111
metaData.name = variable token, little-endian, then 0000
1212
```
1313

14+
The observed `metaData.flags = 8` top-level samples are `X.8xn2` and
15+
`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.
19+
1420
Body fields:
1521

1622
```text

evo-doc/8xp2-program.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,58 @@ PREC.8xp2:
188188
```
189189

190190
`PREC.8xp2` contains `TOK_COLON` (`E418`) for multiple statements on one source line.
191+
192+
## Additional token samples
193+
194+
The `more/seq` samples confirm that program data remains a plain
195+
little-endian 16-bit token stream even for sequence and graph-related
196+
commands.
197+
198+
`prgm_only_seq_command.8xp2` has program name `A` and contains only:
199+
200+
```text
201+
E44D TOK_SERIES
202+
0000 TOK_EOS
203+
```
204+
205+
`missing2.8xp2` has program name `B`:
206+
207+
```text
208+
E6C6 TOK_RECV_MBL
209+
E41C TOK_NEW_LINE
210+
E6C7 TOK_SEND_MBL
211+
E41C TOK_NEW_LINE
212+
E593 TOK_MGT
213+
E41C TOK_NEW_LINE
214+
E4F9 TOK_DEL_LAST
215+
0000 TOK_EOS
216+
```
217+
218+
`missing.8xp2` has program name `A` and includes one token per line for
219+
several sequence-window variables and commands:
220+
221+
```text
222+
E9A3 TOK_VAR_UTHETA_MIN
223+
E9A4 TOK_VAR_UTHETA_MAX
224+
E9A6 TOK_VAR_UT_MIN
225+
E9A7 TOK_VAR_UT_MAX
226+
E9AC TOK_VAR_UN_MAX
227+
E9AA TOK_VAR_UN_MIN
228+
E9A8 TOK_VAR_UT_STEP
229+
E9A5 TOK_VAR_UTHETA_STEP
230+
E9B0 TOK_VAR_UPLOT_STEP
231+
E99F TOK_VAR_UXRES
232+
E59C TOK_AUTO_FILL_ON
233+
E59D TOK_AUTO_FILL_OFF
234+
E59E TOK_AUTO_CALC_ON
235+
E59F TOK_AUTO_CALC_OFF
236+
E600 TOK_DRAWLINE
237+
E601 TOK_DRAWDOT
238+
E60A TOK_WEBOFF
239+
E41A TOK_APOST
240+
E499 TOK_DT
241+
0000 TOK_EOS
242+
```
243+
244+
Every entry except the last is followed by `E41C TOK_NEW_LINE` in the
245+
file.

evo-doc/8xt2-table-setup.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ metaData.name = E8BC 0000
1313

1414
`E8BC` is `TOK_VAR_TBLSETUP`.
1515

16-
The top-level body contains:
16+
The top-level body has no scalar `version` or `size` fields in the
17+
sample. It contains:
1718

1819
```text
1920
data = indefinite CBOR array of nested custom scalar entries
@@ -52,5 +53,7 @@ TBL_STEP:
5253
data words = 0001 0001 001F
5354
```
5455

55-
The custom scalar encoding matches the exact integer-like samples in `.8xn2`.
56-
56+
The custom scalar encoding matches the exact integer-like samples in
57+
`.8xn2`. The top-level settings container owns the array; only the
58+
nested type `17` entries have scalar `version`, `flags`, `arraylen`,
59+
`size`, and `data` fields.

evo-doc/8xv2-appvar.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ data = app-specific byte string
2020
```
2121

2222
Unlike `.8xp2` and `.8xy2`, the appvar data is not a generic TI-BASIC
23-
token stream. It is owned by the corresponding app or system feature.
23+
token stream and has no `arraylen` field. It is owned by the
24+
corresponding app or system feature. Readers should treat the payload as
25+
opaque unless they implement the specific appvar subtype, and writers
26+
should preserve it byte-for-byte when round-tripping.
2427

2528
## `PolyCnfg.8xv2`
2629

@@ -57,4 +60,3 @@ data = 08 53 53 4f 01 01 01 00 96 e5 82 e5 85 e5 87 e5
5760
```
5861

5962
The ASCII bytes at `data[1..3]` spell `SSO`.
60-

evo-doc/8xw2-window.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Each nested entry is itself a CBOR map with:
2525
```text
2626
metaData.type = 17
2727
metaData.version = 1
28-
metaData.flags = 0
28+
metaData.flags = 0 or 8
2929
metaData.name = setting token, little-endian, then 0000
3030
3131
version = 1
@@ -38,11 +38,11 @@ data = custom scalar payload
3838
Observed `Window.8xw2` entries:
3939

4040
```text
41-
00 E98F TOK_VAR_XMIN size 12
42-
01 E990 TOK_VAR_XMAX size 12
41+
00 E98F TOK_VAR_XMIN metaData.flags 8, size 12
42+
01 E990 TOK_VAR_XMAX metaData.flags 8, size 12
4343
02 E991 TOK_VAR_XSCL size 6
44-
03 E993 TOK_VAR_YMIN size 12
45-
04 E994 TOK_VAR_YMAX size 12
44+
03 E993 TOK_VAR_YMIN metaData.flags 8, size 12
45+
04 E994 TOK_VAR_YMAX metaData.flags 8, size 12
4646
05 E995 TOK_VAR_YSCL size 6
4747
06 E992 TOK_VAR_X_RES size 6
4848
07 E9B2 TOK_VAR_DELTA_X size 12
@@ -80,6 +80,6 @@ THETA_MAX:
8080
```
8181

8282
The nested scalar `data` encoding matches the `.8xn2` custom scalar
83-
shape, but the semantic mapping of all numeric words is still under
84-
investigation.
85-
83+
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`.

evo-doc/8xy2-equation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ metaData.flags = 4 in the sample
1111
metaData.name = equation token, little-endian, then 0000
1212
```
1313

14+
The body has no `flags` key. The observed metadata flag `4` appears to
15+
belong to equation graph/display state rather than to the expression
16+
token stream. More equation samples are needed before naming this bit.
17+
1418
For `Y1.8xy2`:
1519

1620
```text
@@ -63,4 +67,3 @@ an expression rather than a multi-line program.
6367
26 E411 TOK_RPAREN
6468
27 0000 TOK_EOS
6569
```
66-

evo-doc/8xz2-rclwindw.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@ metaData.name = E8BB 0000
1414
`E8BB` is labeled `TOK_VAR_ZSTO` in the token table and displayed by
1515
the web app as `RclWindw` / user zoom.
1616

17-
The top-level body contains:
17+
The top-level body has no scalar `version` or `size` fields in the
18+
sample. It contains:
1819

1920
```text
2021
data = indefinite CBOR array of nested custom scalar entries
2122
```
2223

2324
Each nested entry uses `metaData.type = 17` and the same custom scalar
24-
layout as `.8xn2` number data.
25+
layout as `.8xn2` number data:
26+
27+
```text
28+
metaData.type = 17
29+
metaData.version = 1
30+
metaData.flags = 0
31+
metaData.name = setting token, little-endian, then 0000
32+
33+
version = 1
34+
flags = 0
35+
arraylen = number of 16-bit words in data
36+
size = byte length of data; equals arraylen * 2
37+
data = custom scalar payload
38+
```
2539

2640
Observed entries:
2741

@@ -63,4 +77,3 @@ UTHETA_MAX:
6377
UTHETA_STEP:
6478
00 57 99 38 69 99 08 13 01 ff 23 00
6579
```
66-

0 commit comments

Comments
 (0)