GPI files with subareas and the meaning of the GPH extra bytesIn the GPH file some areas are filled with bytes that do not fit into the GPI file record structure. They occur after the following GPI records as seen in
GPHOffsets.txt:
ID ID-hex bytes
8 0008 32
9 0009 32
10 0010 64
34 0022 32
42 002A 256
141 008D 480
To get an idea about the meaning of those bytes, I took a closer look at these GPI images. Figures 42 and 141 in particular show what is going on here.
Apparently these special GPI files are subdivided to support alternative selection or animation. After a full analysis of the corresponding GPH files content, I came to the following conclusion:
The extra bytes consist of 16 bytes for each subarea: 4 bytes for every X- resp. Y-value, which gives 8 for any "point" where two "points" define a subarea (top-left to bottom-right). As madman271 pointed out (see chapter
GPH record: horizontal and vertical stretch values), are
"... these values similar like when we using UV mapping, mean minimum value is 0.0 and maximum value is 1.0."GPH file analysis of the GPIs with subareas:
GPI 008Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
8 0008 00014A 46 0040 0040 64x64 3F80 3F80 3F80 3F80 1 1
000178 32 bytes
Bytes:
014A: 08 00 00 00 02 00 40 00 00 00 40 00 00 00 00 00
00 00 00 00 80 3F 00 00 80 3F 01 00 00 00 00 00
00 00 00 00 00 00 00 00 80 3F 00 00 80 3F
0178: 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 80 3F = 0.0, 0.0 / 0.5, 1.0
00 00 00 3F 00 00 00 00 00 00 80 3F 00 00 80 3F = 0.5, 0.0 / 1.0, 1.0
3F8000 = 1, 3F0000 = 0.5
=> 2 subareas
GPI 009Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
9 0009 000198 78 0010 0008 16x8 3F80 3F00 3F00 3F80 1 0.5
0001C6 32 bytes
Bytes:
0198: 09 00 00 00 02 00 10 00 00 00 08 00 00 00 00 00
00 00 00 00 80 3F 00 00 00 3F 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 3F 00 00 80 3F
01C6: 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 3F = 0.0, 0.0 / 0.5, 0.5
00 00 00 00 00 00 00 3F 00 00 00 3F 00 00 80 3F = 0.0, 0.5 / 0.5, 1.0
=> 2 subareas
GPI 010Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
10 000A 0001E6 78 0010 0010 16x16 3F80 3F80 3F80 3F80 1 1
000214 64 bytes
Bytes:
01E6: 0A 00 00 00 04 00 10 00 00 00 10 00 00 00 00 00
00 00 00 00 80 3F 00 00 80 3F 00 00 00 00 00 00
00 00 00 00 00 00 00 00 80 3F 00 00 80 3F
0214; 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 3F = 0.0, 0.0 / 0.5, 0.5
00 00 00 00 00 00 00 3F 00 00 00 3F 00 00 80 3F = 0.0, 0.5 / 0.5, 1.0
00 00 00 3F 00 00 00 00 00 00 80 3F 00 00 00 3F = 0.5, 0.0 / 1.0, 0.5
00 00 00 3F 00 00 00 3F 00 00 80 3F 00 00 80 3F = 0.5, 0.5 / 1.0, 1.0
=> 4 subareas
GPI 034Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
34 0022 000676 46 0040 0020 64x32 3F80 3F00 3F00 3F80 1 0.5
0006A4 32 bytes
Bytes:
0676: 22 00 00 00 02 00 40 00 00 00 20 00 00 00 00 00
00 00 00 00 80 3F 00 00 00 3F 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 3F 00 00 80 3F
06A4: 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 3F = 0.0, 0.0 / 0.5, 0.5
00 00 00 00 00 00 00 3F 00 00 00 3F 00 00 80 3F = 0.0, 0.5 / 0.5, 1.0
=> 2 subareas
GPI 042Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
42 002A 000806 46 0100 0080 256x128 3F80 3F00 3F00 3F80 1 0.5
000834 256 bytes
Bytes:
0806: 2A 00 00 00 10 00 00 01 00 00 80 00 00 00 00 00
00 00 00 00 80 3F 00 00 00 3F 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 3F 00 00 80 3F
0834: 00 00 00 00 00 00 00 00 00 00 FA 3D 00 00 FA 3D : 0,0 / x,x
00 00 00 00 00 00 FA 3D 00 00 FA 3D 00 00 7A 3E : 0,x / x,2x
00 00 00 00 00 00 7A 3E 00 00 FA 3D 00 80 BB 3E : 0,2x / x,3x
00 00 00 00 00 80 BB 3E 00 00 FA 3D 00 00 FA 3E : 0,3x / x,4x
00 00 00 00 00 00 FA 3E 00 00 FA 3D 00 40 1C 3F : 0,4x / x,5x
00 00 00 00 00 40 1C 3F 00 00 FA 3D 00 80 3B 3F : 0,5x / x,6x
00 00 FA 3D 00 00 00 00 00 00 7A 3E 00 00 FA 3D : x,0 / 2x,x
00 00 FA 3D 00 00 FA 3D 00 00 7A 3E 00 00 7A 3E : x,x / 2x,2x
00 00 FA 3D 00 00 7A 3E 00 00 7A 3E 00 80 BB 3E : x,2x / 2x,3x
00 00 FA 3D 00 80 BB 3E 00 00 7A 3E 00 00 FA 3E : x,3x / 2x,4x
00 00 FA 3D 00 00 FA 3E 00 00 7A 3E 00 40 1C 3F : x,4x / 2x,5x
00 00 FA 3D 00 40 1C 3F 00 00 7A 3E 00 80 3B 3F : x,5x / 2x,6x
00 00 7A 3E 00 00 00 00 00 80 BB 3E 00 00 FA 3D : 2x,0 / 3x,x
00 00 7A 3E 00 00 FA 3D 00 80 BB 3E 00 00 7A 3E : 2x,x / 3x,2x
00 00 7A 3E 00 00 7A 3E 00 80 BB 3E 00 80 BB 3E : 2x,2x / 3x,3x
00 00 7A 3E 00 80 BB 3E 00 80 BB 3E 00 00 FA 3E : 2x,3x / 3x,4x
=> 16 subareas (3 rows with 6,6,4 parts)
3DFA0000 = 0.1220703125 = x
3E7A0000 = 0.244140625 = 2x
3EBB8000 = 0.3662109375 = 3x
3EFA0000 = 0.48828125 = 4x
3F1C4000 = 0.6103515625 = 5x
3F3B8000 = 0.732421875 = 6x
GPI 141Offset:
ID ID_Hex Offset Length width height asp.ratio dimension vdim hdim dimh dec dimv dec
141 008D 001AD0 46 0100 00D5 256x213 3F80 3F55 3F55 3F80 1 0.8300313
001AFE 480 bytes
Bytes:
1AD0: 8d 00 00 00 1e 00 00 01 00 00 d5 00 00 00 00 00
00 00 00 00 80 3f 00 00 55 3f 00 00 00 00 00 00
00 00 00 00 00 00 00 00 55 3f 00 00 80 3f
1AFE: 00 00 00 00 00 00 00 00 00 00 FA 3D 00 00 FA 3D : 0,0 / x,x
00 00 00 00 00 00 FA 3D 00 00 FA 3D 00 00 7A 3E : 0,x / x,2x
00 00 00 00 00 00 7A 3E 00 00 FA 3D 00 80 BB 3E : 0,2x / x,3x
00 00 00 00 00 80 BB 3E 00 00 FA 3D 00 00 FA 3E : 0,3x / x,4x
00 00 00 00 00 00 FA 3E 00 00 FA 3D 00 40 1C 3F : 0,4x / x,5x
00 00 00 00 00 40 1C 3F 00 00 FA 3D 00 80 3B 3F : 0,5x / x,6x
00 00 FA 3D 00 00 00 00 00 00 7A 3E 00 00 FA 3D : x,0 / 2x,x
00 00 FA 3D 00 00 FA 3D 00 00 7A 3E 00 00 7A 3E : x,x / 2x,2x
00 00 FA 3D 00 00 7A 3E 00 00 7A 3E 00 80 BB 3E : x,2x / 2x,3x
00 00 FA 3D 00 80 BB 3E 00 00 7A 3E 00 00 FA 3E : x,3x / 2x,4x
00 00 FA 3D 00 00 FA 3E 00 00 7A 3E 00 40 1C 3F : x,4x / 2x,5x
00 00 FA 3D 00 40 1C 3F 00 00 7A 3E 00 80 3B 3F : x,5x / 2x,6x
00 00 7A 3E 00 00 00 00 00 80 BB 3E 00 00 FA 3D : 2x,0 / 3x,x
00 00 7A 3E 00 00 FA 3D 00 80 BB 3E 00 00 7A 3E : 2x,x / 3x,2x
00 00 7A 3E 00 00 7A 3E 00 80 BB 3E 00 80 BB 3E : 2x,2x / 3x,3x
00 00 7A 3E 00 80 BB 3E 00 80 BB 3E 00 00 FA 3E : 2x,3x / 3x,4x
00 00 7A 3E 00 00 FA 3E 00 80 BB 3E 00 40 1C 3F : 2x,4x / 3x,5x
00 00 7A 3E 00 40 1C 3F 00 80 BB 3E 00 80 3B 3F : 2x,5x / 3x,6x
00 80 BB 3E 00 00 00 00 00 00 FA 3E 00 00 FA 3D : 3x,0 / 4x,x
00 80 BB 3E 00 00 FA 3D 00 00 FA 3E 00 00 7A 3E : 3x,x / 4x,2x
00 80 BB 3E 00 00 7A 3E 00 00 FA 3E 00 80 BB 3E : 3x,2x / 4x,3x
00 80 BB 3E 00 80 BB 3E 00 00 FA 3E 00 00 FA 3E : 3x,3x / 4x,4x
00 80 BB 3E 00 00 FA 3E 00 00 FA 3E 00 40 1C 3F : 3x,4x / 4x,5x
00 80 BB 3E 00 40 1C 3F 00 00 FA 3E 00 80 3B 3F : 3x,5x / 4x,6x
00 00 FA 3E 00 00 00 00 00 40 1C 3F 00 00 FA 3D : 4x,0 / 5x,x
00 00 FA 3E 00 00 FA 3D 00 40 1C 3F 00 00 7A 3E : 4x,x / 5x,2x
00 00 FA 3E 00 00 7A 3E 00 40 1C 3F 00 80 BB 3E : 4x,2x / 5x,3x
00 00 FA 3E 00 80 BB 3E 00 40 1C 3F 00 00 FA 3E : 4x,3x / 5x,4x
00 00 FA 3E 00 00 FA 3E 00 40 1C 3F 00 40 1C 3F : 4x,4x / 5x,5x
00 00 FA 3E 00 40 1C 3F 00 40 1C 3F 00 80 3B 3F : 4x,5x / 5x,6x
=> 30 subareas; 5 rows with 6 parts each.
3DFA0000 = 0.1220703125 = x
and so on like seen in GPI 042.
GPH record formatIn the special GPI file records an additional value occurs at offset 4-5 that contains the number of subareas used. It is 0 if no subdividing is done.
To the new extended GPI record format looks like this:
GPI033meaning hex dec offset
ID 21 00 33 00-01
subareas 00 00 0 04-05
width 40 00 64 06-07
height 20 00 32 10-11
dim-width org. 00 00 80 3F 1.0 18-21
dim-height org. 00 00 80 3F 1.0 22-25
dim-height 00 00 80 3F 1.0 38-41
dim-width 00 00 80 3F 1.0 42-45
GPI034meaning hex dec offset
ID 22 00 34 00-01
subareas 02 00 2 04-05
width 40 00 64 06-07
height 20 00 32 10-11
dim-width org. 00 00 80 3F 1.0 18-21
dim-height org. 00 00 00 3F 0.5 22-25
dim-height 00 00 00 3F 0.5 38-41
dim-width 00 00 80 3F 1.0 42-45
GPHOffsetsThe subareas value is now included into the output file
GPHOffsets.txt created by the new GPHRecords v0.912 programm, which is part of the
GPHUpdater archive.
The output for GPI 33 and 34 will now look like
ID ID_Hex Offset Length subs width height asp.ratio dimension vdim hdim dimh dec dimv dec asp.quot dim quot
33 0021 000648 46 0000 0100 0100 256x256 3F80 3F80 3F80 3F80 1 1 1 1
34 0022 000676 46 0002 0040 0020 64x32 3F80 3F00 3F00 3F80 1 0.5 2 2
0006A4 32 bytes, 2 subareas
Unknown meaningsA few GPI IDs have got a value <> 0000 at offset 26-27.
ID 008 = 08 00 : 01 00
ID 077 = 4D 00 : 03 00
ID 116 = 74 00 : 03 00
ID 118 = 76 00 : 03 00
ID 267 = 0B 01 : 04 00
I am not yet aware of its meaning.
petrus' gpaedia filesEdited 8 time(s). Last edit at 10/11/2021 05:30PM by petrus.