open FDDE DIR 1
& b7 T' Z, m4 K# R7 ?. Yopen FDDE TOC 2
1 J$ Y) a c5 u9 c/ w- Odo G) ~" J9 G k
getdstring CHUNK 4 29 B9 T# U- N: C2 M7 z& i$ n# r t: m
get DUNNO long 2
' |8 C) {# {6 K5 ~+ b get DUNNO long 2& U% D% ~% l9 K, i1 W2 I- K
get FILES long 2
7 j, N; j. a; X' q# j8 E. a get DUNNO long 23 Y) h, V0 e( Y
get DUNNO long 2& w+ M( a) N3 t( P; h C
get DUNNO long 2
/ o1 n. l$ r8 e6 g1 D' J get DUNNO long 2
. n5 t4 S! @+ E9 ~ pwhile CHUNK != "REST"- e. j5 N; c+ X& N
savepos NAMEPTR 1
( Z: k* c! x: A" n7 _for i = 1 to FILES
% a: q9 W0 D/ V8 k# @" E get DUNNO long 2
/ W& Y* ~9 i g% k get SIZE long 23 {% Z0 Q' w+ r4 I, L
math SIZE >>= 2
# G: e) f( ^$ J1 l5 b0 H get OFFSET long 2
3 p8 Z% i$ i* h/ @7 d. L1 \ goto NAMEPTR 1
f9 h9 q8 @7 K' k3 o! [/ P" e get NAMEOFF long 1- E* _; _8 l* y4 _# \
savepos NAMEPTR 1& u' g0 ~( l3 n8 h. ~1 b
goto NAMEOFF 1# d* k# h, T& u$ _+ c4 t6 @0 o* i5 C
get NAME string 1
7 P) Z1 ]+ p) c" Q& S log NAME OFFSET SIZE
' ^& T" g5 H @6 O& Tnext i- u% O# U+ Q+ x; j% x
2 _; ~8 N; O* c6 Y! U$ Q* @9 ]- W, s0 Z7 l
这是解包器
7 h$ r+ N4 D7 ^5 y/ G9 k8 R: Z7 G! p! z" ^% @
for 里面读取toc的部分,long就是4个字节9 P+ O! \) n$ N" V" j7 v
get DUNNO long 2
5 ?8 A/ r, q5 Q; d9 J, l get SIZE long 2
, ?4 \2 W, ^: S, W$ r8 Q8 @( H) O$ L math SIZE >>= 2
( O4 q7 J! T1 ~+ j* f8 {3 Y get OFFSET long 2
9 ^5 c7 E% B* Y% W! n' Z" @* x) X# O8 r6 Z5 _; \ I
for 里面读取dir的部分,long就是4个字节1 D0 @+ \3 ^+ u$ o+ n4 g
goto NAMEPTR 1
8 N1 x6 \% [4 ], _! s0 E/ i get NAMEOFF long 1
$ W" a& U) ^2 ~+ ^9 p savepos NAMEPTR 18 E1 p; B. h1 E& c1 e
goto NAMEOFF 1
8 J* K$ `# b% X get NAME string 1 |