Quote:
|
Originally Posted by Cat_358
Good afternoon! I am engaged in research of structure of file CarinDB. That I know all is that a file binary. I wish to find the information on a structure of this file or its data structure. Whether if someone knows very much I ask  to share Has to me sense to study format TELEATLAS and specification SDAL? All thanks.
|
SDAL has nothing to do with carindb, because carindb was created in the early 1990s and was much earlier than SDAL
Here's what I know of the format of carindb file
' Words and dwords stored in big endian format.
' All data stored in blocks, each block can occupy 1 to 8 CD sectors
' (1 sector = 2048 bytes)
' Each block has the following structure:
' 1. header
' 2. section descriptor
' 3. service data
' 4. section_0
' 5. section_1
' ....
' ....
' X.section_N
' header has the following format:
' off Size
' 0 4 BLOCK_ID
' 4 2 BLOCK_TYPE
' 6 1 COMPRESSION_FLAG
' 7 1 UNCOMPRESSED_SIZE
' BLOCK_ID divided in two parts:
' 24 high bits - number of sector from which this block starts
(calculated
' from the start of carindb file)
' low 8 bits - size of block (in sectors)
' eg:
' BLOCK_ID = 0x01030000
' = Block #3, 1 sector long
' first 8 bytes of example carindb file are
' 00 00 00 01 00 12 00 00 (fm offset 0 to offset 7)
' BLOCK_ID = first 4 bytes of carindb
' 00 00 00 01 (fm offset 0 to offset 3)
' 00 00 00 = sector number start
' 01 = length of sector (2048 bytes)
' CD format:
' big endian = read words as they occur
' data is words of dwords
' word = 2 bytes (integer)
' dword = doubleword or 4 bytes (double integer or long)
' location is stored as a 32-bit dword
' off size
' 0 4 BLOCK_ID
' 4 2 BLOCK_TYPE
' 6 1 COMPRESSION_FLAG
' 7 1 UNCOMPRESSED_SIZE
' therefore sector ID for 3rd sector (sctr 2) = 00 00 02 01
' Sector 0 = character set
' Sector 1 = CD info
' Sector 2 =
(I don't know the rest of the sectors)
There is some info on the GPS Passion forum in French from some people that
tried to reverse engineer the file format:
http://www.gpspassion.com/forumsen/t...TOPIC_ID=17476
From Page 3 of this forum topic vmatias writes:
Types de blocs trouves dans un CARINdb :
Block de type 0x00, taille de l'entete : ? octets
Extrait : 00 A2 7E 01 00 00 01 03 00 74 00 03
Block de type 0x01, taille de l'entete : ? octets
Extrait : 01 AC D4 01 00 01 00 00 00 74 00 02
Block de type 0x02, taille de l'entete : ? octets
Extrait : 01 A1 2C 01 00 02 00 00 00 74 00 02 00 88 00 02
Block de type 0x03, taille de l'entete : 12
Extrait : 01 8A 42 06 00 03 00 00 00 74 00 02
(POI Spatial Index Parcel) ?
Block de type 0x04, taille de l'entete : 16 octets (?)
01 59 D1 01 00 04 00 00 00 10 00 BA 00 B7 EC 03 ........
-------- -- ----------- ----- ----- ----------- --------
A B C D E F G
A - Index dans le fichier
B - Nombre de blocs de 2ko
C - Type d'enregistrement
D - Type de parcelle
E - Nombre d'enregistrements
F - Parcel ID ?
G - Champs de 10 octets (longueur totale = (E * 10) )
Block de type 0x06, taille de l'entete : 16 octets ( POI ? )
Decompose en deux parties :
1 - Binaire de ?? octets
2 - Texte avec 0x00 comme delimiteur.
Block de type 0x07, taille de l'entete : 24 octets (Infos Pays ?)
Il se decompose comme suit(?) :
00 00 02 01 00 07 00 00 01 3C 00 21 02 04 00 0B 00 5D A7 08 FB 88 78 00
-------- -- ----------------- ----- ----------- ----------- -----------
A B C D
A = Numero du bloc
B = Nombre de blocs de 2k (0x800)
C = Type de bloc (information)
D = Nombre d'enregistrements
Decompose en deux parties :
1 - Binaire de 24 octets (12 enrg)
2 - Texte avec 0x00 comme delimiteur.
Block de type 0x08, taille de l'entete : 16 octets (?)
00 58 4E 03 00 08 00 00 00 10 04 00 00 A0 00 00
-------- -- ----------------- ----- -----------
A B C D
A = Numero du bloc
B = Nombre de blocs de 2k (0x800)
C = Type de bloc (information)
D = Nombre d'enregistrements (taille 12)
Block de type 0x0A, taille de l'entete : 40 octets
00 00 04 01 00 0A 00 00 00 28 00 17 00 E0 00 17 00 00 00 00 04 D4 00 21 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-------- -- ----------- ----- ----- ----------- ----------- ----------- -----------
----------- ----------- -----------
A B C C' D E F F' F'' F''' G H
00 00 04 01 00 0A 00 00 00 28 00 17 -> Binaire de 8 Octets
00 E0 00 17 -> Binaire de 44 Octets
00 00 00 00 -> 0
04 D4 00 21 -> Binaire de 12 Octets
00 00 00 00 -> 0
00 00 00 00 -> 0
G = Bloc suivant
H = Bloc precedent
Decompose en quatre parties :
1 - Binaire de 8 octets
2 - Binaire de 44 octets
3 - Binaire de 12 octets
4 - Texte avec 0x00 comme delimiteur.
Block de type 0x0B, taille de l'entete : 12 octets ? ( ? )
00 00 03 01 00 0B 00 00 00 0C 00 0E
-------- -- ----------------- -----
A B C D
A = Numero du bloc
B = Nombre de blocs de 2k (0x800)
C = Type de bloc (information)
D = Nombre d'enregistrements (12 octets)
Block de type 0x0C, taille de l'entete : 40 octets ? ( ? )
00 00 0F 08 00 0C 00 00 00 28 01 64 0B 48 01 27 00 00 00 00 22 54 00 4B 00
00 00 00 25 E4 00 0C 00 00 17 07 00 00 00 00
-------- -- ----------- ----- ----- ----------- ----------- ----------- -----------
----------- ----------- -----------
A B C C' D E F F' F'' F''' G H
A = Numero du bloc
B = Nombre de blocs de 2k (0x800)
C = Type de bloc (information)
C' = Type de bloc (information)
D = Nombre d'enregistrements
E = Block 0B 48 de 0x0127 enregistrements
F = Block 00 00 de 0x0000 enregistrements
F' = Block 22 54 de 0x004B enregistrements
F'' = Block 00 00 de 0x0000 enregistrements
F'''= Block 25 E4 de 0x000C enregistrements
G = Bloc suivant
H = Bloc precedent
Decompose en ?? parties :
1 - Binaire de 8 Octets de 0x0164 enregistrements (2848 octets)
2 - Binaire de 20 Octets de 0x0127 enregistrements (5900 octets)
3 - Binaire de 00 Octets (Null) de 0x0000 enregistrements (12 octets ?)
4 - Binaire de 12 Octets de 0x004B enregistrements (900 octets)
5 - Binaire de 00 Octets (Null) de 0x0000 enregistrements (10 octets)
4 - Binaire de 12 Octets de 0x000C enregistrements (144 octets)
6 - Texte