-
Notifications
You must be signed in to change notification settings - Fork 1
/
sphinx_edb.bt
123 lines (104 loc) · 2.92 KB
/
sphinx_edb.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//--------------------------------------
//--- 010 Editor v6.0.3 Binary Template
//
// File: Sphinx .edb files
// Author: Swyter
// Revision: 2016-02-29
// Purpose: GameCube version
//--------------------------------------
/* next fields are platform-dependent */
if (ReadByte() == 'M') LittleEndian(); else BigEndian();
struct
{
char xx_magic[4]; // GEOM
uint xx_hash_ref <format=hex>; // individual resource-locator thing
uint version; // as it appears in the Filelist descriptor
uint flags <format=hex>; // as it appears in the Filelist descriptor
uint unk_base_addr <format=hex>; // 0x3EA8XXXX, physical DLL-like base address for relocations?
uint total_size <format=hex>; // the full size of the actual file
uint partl_size <format=hex>; // the partial size with just the initial chunk (as it appears in Filelist)
uint zero[6];
uint total_size_b <format=hex>;
uint total_size_plus <format=hex>; // total memory to allocate?
uint zero_b[8];
byte filler[100];
struct{
uint one;
uint hashcode <format=hex>;
short zero;
short count;
uint thing <format=hex>;
uint crap;
} hashentries[8];
struct{
uint offset <format=hex>;
uint offset_b <format=hex>;
uint zero;
short count;
short onezeroeight <format=hex>;
uint offset_c <format=hex>;
} item[7];
} head;
//mc_sphin.edb
//uint undisclosed_crap[0x70/4];
struct
{
uint one;
uint important_thing;
uint index_count;
} jumper[7];
struct a
{
uint thing <format=hex>;
short thing_a <format=hex>;
short count; // <format=hex>;
uint thingb <format=hex>;
uint thingc <format=hex>;
uint thingd <format=hex>;
}entry[385];
struct b
{
uint thing <format=hex>;
short thing_a <format=hex>;
short count; // <format=hex>;
uint thingb <format=hex>;
uint thingc <format=hex>;
//uint thingd <format=hex>;
}entry_b[223];
struct
{
uint spreadsheet_number;
uint spreadsheetabs_offset <format=hex>;
uint zeros[2];
}spreadsheet_listing[7];
byte thing[0xf40];
struct spreadsheet_block
{
uint count;
struct
{
uint hashcode_ref <format=hex>; // hashcodes.h --> #define HT_Text_HASHCODE_BASE 0x43000000
uint offset_str <format=hex>; // relative offset to the start of the multibyte, zero-ended string,
uint offset_nxt <format=hex>; // next string?
uint lots_of_effs <format=hex>; // 0xFFFFFFFF (??)
} spreadsheet_index[count];
};// spreadsheet_block;
/*
struct
{
short a;
short b;
uint thong;
} lut[50];
* /
//byte a[2];
//*
//float tmp[60000];
local int i, j;/*
for (i=3;i+4<sizeof(tmp);i+=3)
{
Printf("v %f %f %f\n# %#x\n", tmp[i-2],tmp[i-1],tmp[i], startof(tmp[i-2]));
}
* /
for (i=GetSelStart(), j=i+GetSelSize(); i<j; i+=sizeof(float)*3)
Printf("v %f %f %f\n# %#x\n", ReadFloat(i), ReadFloat(i+1), ReadFloat(i+2), i);