open FDDE DIR 16 B+ V6 w. l6 O( t+ w$ X- O
open FDDE TOC 2. V5 J1 m" P, w) b
do 1 o& u$ s s. t/ y8 H6 f
getdstring CHUNK 4 22 \3 p5 W6 [; B9 v* Z# _, G
get DUNNO long 2
. f% a. i! F: p get DUNNO long 2
1 s1 ?5 r% c# h7 m get FILES long 2( m& L0 T; i/ ]1 \+ f u; s
get DUNNO long 2$ R+ m: r( L1 l; g: P& m; M! n- Z
get DUNNO long 2" j/ a& D5 M' h. c
get DUNNO long 2
3 s- I, o5 j+ F; F get DUNNO long 2
L" d+ ^9 w8 o3 W; zwhile CHUNK != "REST", p* i1 K0 _, o8 r
savepos NAMEPTR 17 h4 [+ G) Z( b: {+ w! k* |
for i = 1 to FILES- B4 @2 G& [3 c( g& i
get DUNNO long 2
! P( L) H8 X$ v get SIZE long 2
" `% |; t* u: i: Q6 n: Y2 k math SIZE >>= 21 m9 f* W% L ~( R8 K
get OFFSET long 2
j. A# E u p& m6 Z goto NAMEPTR 13 _( N+ {1 X; m& S! L
get NAMEOFF long 1& o- ^) Z7 \$ Z6 P: [; u
savepos NAMEPTR 1% _) m7 i- ~5 a
goto NAMEOFF 16 K% e6 N9 E4 n) H% |8 k, y
get NAME string 1& q$ x8 {; U0 i. @2 |+ v( h
log NAME OFFSET SIZE9 u- l: N [/ k( m: z" \' I
next i
" C6 \. [2 R, ?7 H# T
* K! F) ^$ t3 n5 G4 s' R% r
m: L! a" z: O( G' F这是解包器
) ]( j8 I* ], R* p' F! w2 q+ ], K" q5 ]+ `8 k
for 里面读取toc的部分,long就是4个字节
K, v: y. T! j: |9 \' q* S get DUNNO long 2, x2 P5 I& e7 m' _/ l% G
get SIZE long 2! F: ? A/ R$ g3 I8 V% g2 w
math SIZE >>= 2/ R" j1 G" M, ^/ l+ @7 Z& A$ H; O
get OFFSET long 2
. j2 U" N! ]. O9 f; {$ H! K/ M- d" f& ]
for 里面读取dir的部分,long就是4个字节
# ` I/ D; a" e- v( D goto NAMEPTR 1* |# a3 y( e; u; S
get NAMEOFF long 1. i4 W* T( W, s* A. P
savepos NAMEPTR 11 W6 f/ h6 I- {+ l1 t& J* s
goto NAMEOFF 1, x5 N. y y0 O* V4 H8 x
get NAME string 1 |