-
Notifications
You must be signed in to change notification settings - Fork 68
DDL Parse Trees
Yannik Marchand edited this page Nov 28, 2023
·
21 revisions
You may be surprised to see the real names of parameter and structure members on many of the wiki pages. NEX has automatically generated the code that encodes/decodes method parameters and structures from a data definition language (DDL), and many games contain the parse tree of the DDL declarations in their data segment. It's encoded in big-endian byte order (regardless of the platform) and looks as follows:
Type | Description |
---|---|
Uint32 | Magic number (0xCD652312) |
Uint8 | Unknown (always 0) |
Uint32 | Major version |
Uint32 | Minor version |
Uint32 | Micro version |
Uint32 | Build version |
NameSpace | Root namespace |
Type | Description |
---|---|
Uint32 | Number of elements (N) |
Element (N) | Namespace elements |
Type | Description |
---|---|
Uint8 | Type id |
Body |
ID | Type |
---|---|
1 | NameSpaceItem |
2 | Declaration |
3 | DOClassDeclaration |
4 | DatasetDeclaration |
5 | TypeDeclaration |
6 | Variable |
8 | RMC |
9 | Action |
10 | AdapterDeclaration |
11 | PropertyDeclaration |
12 | ProtocolDeclaration |
13 | Parameter |
14 | ReturnValue |
15 | ClassDeclaration |
16 | TemplateDeclaration |
17 | SimpleTypeDeclaration |
18 | TemplateInstance |
19 | DDLUnitDeclaration |
20 | DupSpaceDeclaration |
Type | Description |
---|---|
Uint32 | Length (N) |
Bytes (N) | String (without null terminator) |
Type | Description |
---|---|
Uint8 | Declaration type (see element) |
String | Full type name |
Only if declaration type is TemplateInstance:
Type | Description |
---|---|
String | Base type name |
Uint8 | Number of arguments (N) |
DeclarationUse (N) | Argument declaration use |
Type | Description |
---|---|
String | Name |
The second parse tree item is always the same as the first parse tree item. I don't know why it's stored twice.
Type | Description |
---|---|
ParseTreeItem | Parse tree item |
ParseTreeItem | Parse tree item |
Type | Description |
---|---|
NameSpaceItem | Namespace item |
String | DDL unit name |
Namespace | Properties |
Type | Description |
---|---|
Declaration | Declaration |
String | Parent class name |
Uint32 | Class id |
Namespace | Namespace |
Type | Description |
---|---|
Declaration | Declaration |
Namespace | Variables |
Type | Description |
---|---|
Declaration | Declaration |
Type | Description |
---|---|
Declaration | Declaration |
NameSpace | Parameters |
Type | Description |
---|---|
NameSpaceItem | Namespace item |
DeclarationUse | Declaration use |
Uint32 | Array size |
Type | Description |
---|---|
MethodDeclaration | Method declaration |
NameSpace | Parameters |
Type | Description |
---|---|
MethodDeclaration | Method declaration |
NameSpace | Parameters |
Type | Description |
---|---|
Declaration | Declaration |
Type | Description |
---|---|
Declaration | Declaration |
Uint32 | Category mask |
Uint32 | Allowed target mask |
Type | Description |
---|---|
Declaration | Declaration |
NameSpace | Methods |
Type | Description |
---|---|
Variable | Variable |
DeclarationUse | Declaration use |
Uint32 | Array size |
Uint8 | Type (1=input, 2=output, 3=both) |
Type | Description |
---|---|
Variable | Variable |
DeclarationUse | Declaration use |
Uint32 | Array size |
Type | Description |
---|---|
TypeDeclaration | Type declaration |
String | Parent class name |
NameSpace | Class members |
Type | Description |
---|---|
TypeDeclaration | Type declaration |
Uint32 | Number of template arguments |
Type | Description |
---|---|
TypeDeclaration | Type declaration |
Type | Description |
---|---|
TypeDeclaration | Type declaration |
String | Base type name |
Uint32 | Number of template arguments (N) |
String (N) | Template arguments |
Type | Description |
---|---|
Declaration | Declaration |
String | Unit name |
String | Unit dir |
Type | Description |
---|---|
Declaration | Declaration |
- Home
-
NEX
- PRUDP Protocol
- RMC Protocol
-
NEX Services
- Common
- Nintendo
- Kerberos Authentication
- Hpp Server
- NPLN
- Pia
- Switch Servers
- Other Pages