forked from entropia/tip-toi-reveng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
games.txt
160 lines (133 loc) · 6.65 KB
/
games.txt
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
game table
----------
Offset to the game table lies at '0x0010'
Example from WWW Bauernhof
0001703d 0c 00 00 00 71 70 01 00 35 7a 01 00 91 7f 01 00
aa aa aa aa bb bb bb bb bb bb bb bb bb bb bb bb
0001704d cd 82 01 00 59 8a 01 00 e7 8e 01 00 4f 97 01 00
bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
0001705d 0f 9f 01 00 c7 9f 01 00 69 a1 01 00 69 ad 01 00
bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb
0001706d fb b2 01 00
bb bb bb bb
a = 32bit counter (number of games)
b = a * 32bit pointer to game header
game header
-----------
00017071 01 00 0b 00 05 00 00 00 04 00 81 05 00 00 6f 00
aa aa bb bb rr rr cc cc zz zz yy yy xx xx ww ww
00017081 de 00 97 76 01 00 a9 76 01 00 ab 76 01 00 ad 76
vv vv dd dd dd dd dd dd dd dd dd dd dd dd dd dd
00017091 01 00 b9 76 01 00 ff 70 01 00 83 71 01 00 05 72
dd dd dd dd dd dd ee ee ee ee ee ee ee ee ee ee
000170a1 01 00 87 72 01 00 09 73 01 00 8b 73 01 00 0d 74
ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
000170b1 01 00 8f 74 01 00 11 75 01 00 93 75 01 00 15 76
ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
000170c1 01 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00
ee ee uu uu uu uu uu uu uu uu uu uu uu uu uu uu
000170d1 00 00 00 00 00 00 c5 76 01 00 d3 76 01 00 e1 76
uu uu uu uu uu uu gg gg gg gg gg gg gg gg gg gg
000170e1 01 00 e3 76 01 00 e5 76 01 00 e7 76 01 00 e9 76
gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg
000170f1 01 00 eb 76 01 00 ed 76 01 00 ef 76 01 00
gg gg gg gg gg gg gg gg gg gg gg gg gg gg
a = 16bit type (type 253 is special see below)
b = 16bit count: number of subgames
r = 16bit number of rounds to play in this game
c = 16bit count (if type == 6) followed by c*16bit; (if type != 6) c=0 or c=1
z = 16bit: number of rounds to start with the "pre next round" sound, after that play the "pre last round" sound
y = 16bit: this defines the OID that triggers the "repeat last media" action
x = 16bit unknown
w = 16bit unknown (111 in all Bauernhof games)
v = 16bit unknown, sometimes v=2*w (222 in all Bauernhof games)
d = 5 (seems hardcoded) * 32bit pointers to playlistlist. These are
- playlists played when the game starts
- playlists played when the next level has been reached (game types 1, 4 and 40)
- playlists played after the game is finished (one playlist is selected randomly)
- playlists played at the beginning of a round
- playlists played at beginning to the last round
h = 2 * 32bit pointers to playlistlist (only for game type 6, not in this example). Judging from the referenced media found here in some products these playlists seem to be ignored. Sometimes the playlists are identical to the last two of the d.
- playlists at the beginning of a round
- playlists played at beginning to the last round
e = b * 32bit pointers to subgame
f = c * 32bit pointers to subgame (not existant in this example game)
u = 10 (this seems hardcoded) * 16bit. For each playlist in the playlistlist g u contains a 16bit value. At the end of the game u is checked from left to right. Each number in u is compared against the number of correct answers that the player has achieved throughout the game. The first number in u that is <= the number of correct answers defines the playlist to be played. u must be ordered in descending order. Example: u contains [5,3,1,0,0,0,0,0,0,0]. This means: if the player has 5 or more correct answers, the first playlist of g is played, when the player has 3 or 4 correct answers, the second playlist is played, if he has at least one correct answer, playlist 3 is played else playlist 4.
g = 10 (this seems hardcoded) * 32bit pointer to playlistlist
now it differs on type
if ( type == 6 )
1 * 32bit pointer to playlist
if ( type == 7 )
1 * 32bit pointer to playlistlist
if ( type == 8 )
1 * 32bit pointer to oidlist
1 * 32bit pointer to gameidlist
2 * 32bit pointer to playlistlist
if ( type == 9 )
75 * 32bit pointer to playlistlist
if ( type == 10 )
1 * 32bit pointer to playlistlist
if ( type == 16 )
1 * 32bit pointer to oidlist
3 * 32bit pointer to playlistlist
nothing for other types
end of block
type 253
--------
Type 253 is special and only consists of the value 0x00fd. It is supposed that this is some kind of (additional) "end of games" marker although this is redundant because the number of games can be found in the game table, too.
[In an earlier version of this document it was noted that the playlistlist for the power on sound that directly follows the 0x00fd belongs to this game. But as this playlistlist is referenced in the header (0x0071) this seems wrong now.]
subgame
-------
000170ff 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00
0001710f 00 00 00 00 02 00 8e 05 9f 05 00 00 21 00 79 05
aa aa bb bb bb bb cc cc ee ee ff ff
0001711f 7a 05 7b 05 7c 05 7d 05 83 05 84 05 85 05 86 05
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0001712f 87 05 88 05 89 05 8a 05 8b 05 8c 05 8d 05 8e 05
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0001713f 8f 05 90 05 91 05 92 05 93 05 94 05 95 05 96 05
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0001714f 97 05 98 05 99 05 9a 05 9b 05 9c 05 9e 05 9f 05
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0001715f f1 76 01 00 fd 76 01 00 07 77 01 00 09 77 01 00
gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg
0001716f 13 77 01 00 15 77 01 00 1f 77 01 00 29 77 01 00
gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg gg
0001717f 33 77 01 00
gg gg gg gg
unknown = 20 byte
a = 16bit count
b = a * 16bit oids : OIDs that represent a correct answer
c = 16bit count
d = c * 16bit oid : unknown
e = 16bit count
f = e * 16bit oid : all OIDs of the page the game belongs to. Pointing at an OID that is not contained in this list results in "please flip back to page xx" being played (4th playlist in g)
g = 9 (seems hardcoded) * 32bit pointer to playlistlist
playlistlist
------------
000176f1 01 00 f7 76 01 00
aa aa bb bb bb bb
a = 16bit count (can be zero than no b is present)
b = a * 32bit pointer to playlist
playlist
--------
000176f7 02 00 b3 01 ba 01
aa aa bb bb bb bb
a = 16bit count
b = a * 16bit id of media to be played
oidlist
--------
Example:
03 00 b2 06 b3 06 b4 06
aa aa bb bb bb bb bb bb
a = 16bit count
b = a * 16bit oids
TODO: add live example
gameidlist
----------
Example:
03 00 0a 00 0b 00 0c 00
aa aa bb bb bb bb bb bb
a = 16bit count
b = a * 16bit game ids
TODO: add live example