Bytes | Values | Notes |
0-3 4-7 8-11 12- |
"MIRP" 0x00000000 data size data... |
Section Type (reversed) Seems to be a zero all the time Size of data in bytes Data, grouped into Types |
The first four bytes of the data section (e.g. bytes 12-15 in the table above) give the starting point of the first Type in the data section. I.e. if bytes 12-15 give the number 5,000, this would equate to byte 5,012 including the header.
From this point on, the 32-bit numbers will be referred to in the 'correct' order. I.e. not like the "MIRP" in the above table. If you're looking at a 3DO file with a hex editor, the 4 bytes for each number will be in the 'incorrect', or network order: b3 b2 b1 b0.
Some numbers are 32bit integers, others are 32bit floats. The floats are generally used for coordinates (vertex & texture), and can be identified by their huge values if you read them in as an integer :-)
Most of the Types point to other Types. Those that don't are the T-8XX's which define polygons and a couple of others. Basically, the PRIM structure can be drawn as a tree. (Sometimes a recursive tree - track.3do's).
Some more notes:
These images mean: general node;
leaf node (primitive or other); car-specific; finished!
General format is T-x (where x is hexadecimal); brief description; list of components that make up the type (nearly all 32bit integers/floats, where entries end with ..., it means there are a variable number of them); Long description
For the quick look table below, these images signify the different components:
=offset (i.e. pointer to a child node)
=colour
=string offset
=scale (float)
=integer
=float
=vertex number
=plane number
=normal number
= texture x,y pairing (2 floats)
number = this number appears
count = there are this many 'things' to follow - where a thing is in brackets
and followed by ...
Type (hex) | Format | Description |
003 | 3,![]() ![]() ![]() ![]() ![]() |
SRB Chooser & Placer & Scaler |
004 | 4,count, ![]() |
Multi child node |
005-1 | 5,![]() ![]() |
Selector: mip file without display class |
005-4 | 5,![]() ![]() |
Selector: ? display class ? |
005-5 | 5,![]() ![]() ![]() |
Selector: mip file with display class |
005-8 | 5,![]() ![]() ![]() ![]() |
Selector: ? |
005-C | 5,![]() ![]() ![]() ![]() ![]() |
Selector: ? |
005-D | 5,![]() ![]() ![]() ![]() ![]() |
Selector: ? |
005-11 | 5,![]() ![]() |
Selector: ? |
005-20 | 5,![]() ![]() |
Selector: ? |
005-24 | 5,![]() ![]() ![]() |
Selector: ? |
005-2C | 5,![]() ![]() ![]() ![]() ![]() |
Selector: ? |
006 | 6,![]() ![]() |
Plane, single child node |
007 | 7,![]() ![]() ![]() |
Plane, double child node |
008 | 8,![]() ![]() ![]() ![]() ![]() |
Plane, quad child node |
009 | 9,![]() ![]() ![]() ![]() |
Plane, triple child node |
00A | A,![]() ![]() ![]() ![]() |
Plane, triple child node |
00B | B,![]() ![]() ![]() |
Plane, double child node |
00D | D,![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Positioner |
00E | E,![]() |
3DO File Chooser |
00F | F,![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Track visibility box |
010 | 10,count,![]() |
?Chooser of some description? |
011 | 11,![]() ![]() ![]() ![]() ![]() |
Trk relation? |
013 | 13,![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Positioner (3DO) |
014 | 14,![]() ![]() |
? |
016 | 16,![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Positioner |
017 | 17,count,![]() |
Room? |
019 | 19,![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Bounding cuboid - seen lots of places |
01F | 1F,0,![]() ![]() ![]() |
Car Polygon, textured |
020 | 20,0,0,![]() ![]() ![]() ![]() |
Car Polygon, textured, smooth shading |
021 | 21,0,![]() ![]() ![]() ![]() |
Car Polygon, textured, smooth shading, normals |
815 | 815,![]() ![]() ![]() |
Line |
81B | 81B,![]() ![]() |
Polygon, flat shading |
81C | 81C,![]() ![]() ![]() |
Polygon, smooth shading |
81D | 81D,![]() ![]() ![]() |
Polygon, normals |
81E | 81E,![]() ![]() ![]() ![]() |
Polygon, smooth shading, normals |
81F | 81F,0,![]() ![]() ![]() |
Polygon, textured |
820 | 820,0,![]() ![]() ![]() ![]() |
Polygon, textured, smooth shading |
821 | 821,0,![]() ![]() ![]() ![]() |
Polygon, textured, normals |
A03 | A03,![]() ![]() ![]() ![]() ![]() |
SRB Selector |
Number | Type of thing in class | Menu option that affects the class |
0 | Track | Track Textures |
1 | Grass, curb, edge, bank | Terrain Textures |
2 | Fence, armco | Wall Textures |
4 | ![]() |
Car Textures |
8 | Trees? | ?? |
10 | Startline, starting grid boxes | ?Track Textures? |
13 | ![]() |
?Car Textures? |
17 | ![]() |
?Cockpit Texture? |
18 | ???insidelf | ?? |
19 | ![]() |
Driver Textures |
20 | Racing groove | Racing Groove |
General Nodes
3, vertex number, colour, string offset, float, int
Where 'above' is taken from the plane in the direction of X,Y,Z, and below
is in the opposite direction.
6, plane number, offset
The plane number references the PLAN section. The offset contains the polygons visible when the viewer is 'above' the plane.
7, plane number, offset, offset
A dual child node, with a plane. Each offset is followed only if the contents can be seen.
8, plane number, offset1, offset2, offset3, offset4
This behaves like T-9 and T-A, in that the first and last offsets are the sub-trees 'above' and 'beneath' the plane. The second and third offsets are the sub-trees 'on' the plane, one viewed from above, the other when viewed from beneath.
This node is used in places like a fence bordering the track, where the fence can be viewed from both sides.
9, plane number, offset1, offset2, offset3
The plane number references into the PLAN section. One or more of the offsets is often NULL (i.e. 0xffffffff).
The first offset is for things that can be seen 'below', the second for 'above', and the third is always followed, as far as I can tell (above/below, that is).
Same as T-9
No idea why T-A and T-9 are the same, so there must be some difference. Possibly to do with the plane number, but more likely to do with the context they appear, i.e. what Types do they point at and are pointed at from? Or maybe, T-A and T-9 are the same, but the sub-trees are the opposite way around - i.e. above=below, below=above?.
D, dx, dy, dz, rotx?, roty?, rotz?, scale, offset
7 floats, suggesting 3 for xyz, 3 for rotations & 1 for a scale (usually 1.0 - i.e. not scaled). The three rotations are usually in the range -6.28 to 6.28, i.e. -1radian to +1radian.This type seems to be a general transformation node - that is, all children of this node are changed by this node.
F, plane1,offset1, plane2,offset2, plane3,offset3, plane4,offset4, offset5, 0xFFFFFFFF (-1) 0,0,0,0, no. of following sets, sets...
where a set is: float, float, float, offset.
Where planes & offsets can be 0xffffffff and
shouldn't be followed if they are.
I.e. 4 zeroes indicates there is no more data,
4 zeroes and a 3 indicate there is 3*16 bytes more. The three entries
listed as float could be x,y,z coordinates but I'm just guessing.
An example of a T-F would be F, (p,o), (p,o), (p,o),
(p,o), o,-1, 0,0,0,0,4, (x,y,z,off), (x,y,z,off), (x,y,z,off), (x,y,z,off).
The offsets contained with the sets point to 3DO chooser nodes - T-13's. I.e. a T-F might point to 4 other T-F's and 2 T-13's.
These nodes should not be treated as part of a single large tree. They create loops if treated this way. For more information see the Track part of this page.
The vertex is the reference point used when calculating how far away the viewer is.
If the node was: 11, 0, 123, 2, 3 pairs, (100, tree1), (50, tree2),
(0, tree3)
Then from infinity to 100 metres away then tree1 will be followed; from
100 to 50 metres tree2 will be followed and 50 to 0 metres tree3.
Found in lotus/lotus.3do & presumably other cars.14, number, number.
So this Type looks like T-10 with unknown numbers
16, float, float, float, float, float, float, float, offset
Found in lotus/lotus.3do. Almost identical to T-D & T-13, with 7 floats and an offset
17, no. of vertices, vertices...
Found in lotus/lotus.3do & other cars. Seems to define an area via vertices.
A03, vertex number, colour, string offset, float, int3
Looks like T-3 but for the cars. Untested.
1f, 0, number (hex 05000000 or 0a000000), no. of vertices, texture x,y pairs..., vertex numbers...Looks remarkably like T-81f, just with an extra number at the start. Only found in car 3do's.
20, 0, 0, number (hex 01000000), no. of vertices, texture x,y, pairs..., vertex numbers..., vertex colours...Looks remarkably like T-820, just with a few more numbers at the start. Only found in car 3do's.
21, 0, number (hex 02000000), no. of vertices, texture x,y, pairs..., vertex numbers..., vertex normals...Looks remarkably like T-821, just with an extra number at the start. Only found in car 3do's. The last set of numbers are normals for lighting effects.
815, colour, vertex1, vertex2
Probably the simplest primitive, 815's define lines. These are used for things like telegraph wires and don't appear very often.
821, 0, colour, no. of vertices, x,y pairings..., vertex numbers..., vertex normals...
This looks like a polygon with texture mapping, flat shading, specular shading.