summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritsme <itsme@xs4all.nl>2021-07-07 11:42:34 +0200
committeritsme <itsme@xs4all.nl>2021-07-07 11:42:34 +0200
commit0ce5384a5660e5cb506d0336840e4c99bce0191a (patch)
treee02aa412a45a49e9599038a12d25cee12c68b565
parent6153bded0c8f6a1e8d8c6c3c2b69a66b47dde585 (diff)
added layout of table definition
-rw-r--r--docs/cronos-research.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/docs/cronos-research.md b/docs/cronos-research.md
index 75b9c61..ec074d7 100644
--- a/docs/cronos-research.md
+++ b/docs/cronos-research.md
@@ -125,14 +125,48 @@ Its first byte defines, which table it belongs to. It is encoded in cp1251 (or p
125## structure definitions 125## structure definitions
126 126
127records start numbering at '1'. 127records start numbering at '1'.
128Names are stored as: `byte strlen + char value[strlen]`
128 129
129The first entry contains: 130The first entry contains:
130 131
131 byte 132 byte
132 array { 133 array {
133 byte strlen 134 Name keyname
134 char name[strlen]
135 uint32_t index_or_size; // size when bit31 is set. 135 uint32_t index_or_size; // size when bit31 is set.
136 byte data[size] 136 byte data[size]
137 } 137 }
138 138
139this results in a dictionary, with keys like: `Bank`, `BankId`, `BankTable`, `Base`nnn, etc.
140
141the `Base000` entry contains the record number for the table definition of the first table.
142
143## table definitions
144
145 byte version
146 word16 unk1
147 word16 unk2
148 word16 unk3
149 word32 unk4
150 word32 unk5
151 Name tablename
152 Name unk6
153 word32 unk7
154 word32 nrfields
155
156 array {
157 word16 entrysize -- total nr of bytes in this entry.
158 word16 fieldtype 0 = sysnum, 2 = text, 4 = number
159 word32 fieldindex ??
160 Name fieldname
161 word32
162 byte
163 word32 fieldindex ??
164 word32 fieldsize
165 word32 ?
166 ...
167 } fields[nrfields]
168
169 ...
170
171
172