From 0ce5384a5660e5cb506d0336840e4c99bce0191a Mon Sep 17 00:00:00 2001 From: itsme Date: Wed, 7 Jul 2021 11:42:34 +0200 Subject: added layout of table definition --- docs/cronos-research.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file 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 ## structure definitions records start numbering at '1'. +Names are stored as: `byte strlen + char value[strlen]` The first entry contains: byte array { - byte strlen - char name[strlen] + Name keyname uint32_t index_or_size; // size when bit31 is set. byte data[size] } +this results in a dictionary, with keys like: `Bank`, `BankId`, `BankTable`, `Base`nnn, etc. + +the `Base000` entry contains the record number for the table definition of the first table. + +## table definitions + + byte version + word16 unk1 + word16 unk2 + word16 unk3 + word32 unk4 + word32 unk5 + Name tablename + Name unk6 + word32 unk7 + word32 nrfields + + array { + word16 entrysize -- total nr of bytes in this entry. + word16 fieldtype 0 = sysnum, 2 = text, 4 = number + word32 fieldindex ?? + Name fieldname + word32 + byte + word32 fieldindex ?? + word32 fieldsize + word32 ? + ... + } fields[nrfields] + + ... + + + -- cgit v1.2.3